         Edinburgh IMP77 Compiler - Version 8.4
    1 ! This is test/repro.imp but with an extra scope of complexity.
		.Ltext0:
				.section	.rodata
		.LC0:
				.string	"main"
		.LC1:
				.string	"_imp_block_1000"
				.globl	main
		main:
		.LFB191:
    2 ! This recordformat spec does not get passed into the icode file.
    3
    4 %begin
				leal	4(%esp), %ecx
				andl	$-16, %esp
				pushl	-4(%ecx)
				pushl	%ebp
				movl	%esp, %ebp
				pushl	%ebx
				pushl	%ecx
				subl	$80, %esp
				call	__x86.get_pc_thunk.bx
				addl	$_GLOBAL_OFFSET_TABLE_, %ebx
				movl	%ecx, %eax
				movl	(%eax), %edx
				movl	4(%eax), %eax
				movl	%gs:20, %ecx
				movl	%ecx, -12(%ebp)
				xorl	%ecx, %ecx
				leal	8(%ebp), %ecx
				movl	%ecx, -16(%ebp)
				movl	%edx, -40(%ebp)
				movl	%eax, -44(%ebp)
				leal	-44(%ebp), %eax
				addl	$8, %eax
				leal	-44(%ebp), %edx
				movb	$-71, (%eax)
				movl	%edx, 1(%eax)
				movb	$-23, 5(%eax)
				leal	_imp_block_1000_backtrace.6175@GOTOFF(%ebx), %ecx
				leal	10(%eax), %edx
				subl	%edx, %ecx
				movl	%ecx, %edx
				movl	%edx, 6(%eax)
				leal	-44(%ebp), %eax
				addl	$18, %eax
				leal	-44(%ebp), %edx
				movb	$-71, (%eax)
				movl	%edx, 1(%eax)
				movb	$-23, 5(%eax)
				leal	main_backtrace.6165@GOTOFF(%ebx), %ecx
				leal	10(%eax), %edx
				subl	%edx, %ecx
				movl	%ecx, %edx
				movl	%edx, 6(%eax)
		.L2:
				leal	.LC0@GOTOFF(%ebx), %eax
				movl	%eax, -76(%ebp)
				leal	-44(%ebp), %eax
				addl	$18, %eax
				movl	%eax, -72(%ebp)
				leal	.L2@GOTOFF(%ebx), %eax
				movl	%eax, -68(%ebp)
				movl	_imp_current_frame@GOT(%ebx), %eax
				movl	(%eax), %eax
				movl	%eax, -64(%ebp)
				movl	_imp_current_frame@GOT(%ebx), %eax
				leal	-76(%ebp), %edx
				movl	%edx, (%eax)
				movl	-40(%ebp), %eax
				movl	-44(%ebp), %edx
				subl	$8, %esp
				pushl	%edx
				pushl	%eax
				call	_imp_initialise@PLT
				addl	$16, %esp
		.L3:
		.LBB7:
    5
    6 %recordformat stackfm(%integerarray ira(0:9))   { a top-level format of the same name }
    7
    8 %begin
				leal	.LC1@GOTOFF(%ebx), %eax
				movl	%eax, -60(%ebp)
				leal	-44(%ebp), %eax
				addl	$8, %eax
				movl	%eax, -56(%ebp)
				leal	.L3@GOTOFF(%ebx), %eax
				movl	%eax, -52(%ebp)
				movl	_imp_current_frame@GOT(%ebx), %eax
				movl	(%eax), %eax
				movl	%eax, -48(%ebp)
				movl	_imp_current_frame@GOT(%ebx), %eax
				leal	-60(%ebp), %edx
				movl	%edx, (%eax)
    9
   10 %recordformatspec stackfm                      { this *should* make a reference to stackfm below come from the inner format }
   11                                                { but the spec is not passed through to the icode by pass1 }
   12
   13 %recordformat blech(%integer x, %record (stackfm) %name link)
   14
   15 %recordformat stackfm(%integer s)              { inner definition of format }
   16
   17 %routine PASS2(%integer p, %record (blech) puke)
   18   %routine ASSEMBLE(%integer AMODE, %integer VARS, %integer LOCAL, %integer PARAMETERLIST, %integer %name GLOBALATTRIBUTES)
   19     %routine SHOWDATA(%record (STACKFM) %name V, %integer LEFT)
   20       %integer q = V_S                         { use inner definition. This works in icode2c but may be a case of two wrongs making a right! }
   21     %end
?Q unused
?LEFT unused
   22   %end
?SHOWDATA unused
?GLOBALATTRIBUTES unused
?PARAMETERLIST unused
?LOCAL unused
?VARS unused
?AMODE unused
   23 %end
?ASSEMBLE unused
?PUKE unused
?P unused
   24
   25 %end
				nop
		.L4:
				movl	-48(%ebp), %edx
				movl	_imp_current_frame@GOT(%ebx), %eax
				movl	%edx, (%eax)
				movl	$0, -80(%ebp)
		.LBE7:
		.LBB8:
		.LBB9:
				subl	$12, %esp
				pushl	-80(%ebp)
				call	exit@PLT
		.LBE9:
		.LBE8:
		.LFE191:
				.section	.rodata
		.LC2:
				.string	"\n\nLocal Variables:\n\n"
		_imp_block_1000_backtrace.6175:
		.LFB198:
				pushl	%ebp
				movl	%esp, %ebp
				pushl	%ebx
				subl	$20, %esp
				call	__x86.get_pc_thunk.ax
				addl	$_GLOBAL_OFFSET_TABLE_, %eax
				movl	%ecx, -12(%ebp)
				subl	$12, %esp
				leal	.LC2@GOTOFF(%eax), %edx
				pushl	%edx
				movl	%eax, %ebx
				call	_imp_diagf@PLT
				addl	$16, %esp
				nop
				movl	-4(%ebp), %ebx
				leave
				ret
		.LFE198:
				.section	.rodata
		.LC3:
				.string	"\n\nArguments:\n\n"
		.LC4:
				.string	"ARGC = %d\n"
		.LC5:
				.string	"ARGV @[%p]\n"
		.LC6:
				.string	"  ARGV(%d) = \"%s\"\n"
		.LC7:
				.string	"  ARGV(%d) = NULL\n"
		.LC8:
				.string	"\nLocal Variables:\n\n"
		main_backtrace.6165:
		.LFB199:
?PASS2 unused
   26
   27 %endofprogram
				pushl	%ebp
				movl	%esp, %ebp
				pushl	%esi
				pushl	%ebx
				subl	$32, %esp
				call	__x86.get_pc_thunk.bx
				addl	$_GLOBAL_OFFSET_TABLE_, %ebx
				movl	%ecx, %esi
				movl	%ecx, -28(%ebp)
				subl	$12, %esp
				leal	.LC3@GOTOFF(%ebx), %eax
				pushl	%eax
				call	_imp_diagf@PLT
				addl	$16, %esp
				movl	4(%esi), %eax
				subl	$8, %esp
				pushl	%eax
				leal	.LC4@GOTOFF(%ebx), %eax
				pushl	%eax
				call	_imp_diagf@PLT
				addl	$16, %esp
				movl	(%esi), %eax
				subl	$8, %esp
				pushl	%eax
				leal	.LC5@GOTOFF(%ebx), %eax
				pushl	%eax
				call	_imp_diagf@PLT
				addl	$16, %esp
		.LBB10:
				movl	$0, -12(%ebp)
				jmp	.L8
		.L9:
				movl	-12(%ebp), %eax
				leal	0(,%eax,4), %edx
				movl	(%esi), %eax
				addl	%edx, %eax
				movl	(%eax), %eax
				subl	$4, %esp
				pushl	%eax
				pushl	-12(%ebp)
				leal	.LC6@GOTOFF(%ebx), %eax
				pushl	%eax
				call	_imp_diagf@PLT
				addl	$16, %esp
				addl	$1, -12(%ebp)
		.L8:
				movl	4(%esi), %eax
				cmpl	%eax, -12(%ebp)
				jl	.L9
		.LBE10:
				movl	4(%esi), %eax
				leal	0(,%eax,4), %edx
				movl	(%esi), %eax
				addl	%edx, %eax
				movl	(%eax), %eax
				testl	%eax, %eax
				jne	.L10
				movl	4(%esi), %eax
				subl	$8, %esp
				pushl	%eax
				leal	.LC7@GOTOFF(%ebx), %eax
				pushl	%eax
				call	_imp_diagf@PLT
				addl	$16, %esp
				jmp	.L11
		.L10:
				movl	4(%esi), %eax
				leal	0(,%eax,4), %edx
				movl	(%esi), %eax
				addl	%edx, %eax
				movl	(%eax), %edx
				movl	4(%esi), %eax
				subl	$4, %esp
				pushl	%edx
				pushl	%eax
				leal	.LC6@GOTOFF(%ebx), %eax
				pushl	%eax
				call	_imp_diagf@PLT
				addl	$16, %esp
		.L11:
				subl	$12, %esp
				leal	.LC8@GOTOFF(%ebx), %eax
				pushl	%eax
				call	_imp_diagf@PLT
				addl	$16, %esp
				nop
				leal	-8(%ebp), %esp
				popl	%ebx
				popl	%esi
				popl	%ebp
				ret
		.LFE199:
				.section	.text.__x86.get_pc_thunk.ax,"axG",@progbits,__x86.get_pc_thunk.ax,comdat
				.globl	__x86.get_pc_thunk.ax
				.hidden	__x86.get_pc_thunk.ax
		__x86.get_pc_thunk.ax:
		.LFB200:
				movl	(%esp), %eax
				ret
		.LFE200:
				.section	.text.__x86.get_pc_thunk.bx,"axG",@progbits,__x86.get_pc_thunk.bx,comdat
				.globl	__x86.get_pc_thunk.bx
				.hidden	__x86.get_pc_thunk.bx
		__x86.get_pc_thunk.bx:
		.LFB201:
				movl	(%esp), %ebx
				ret
		.LFE201:
		.Letext0:
?STACKFM unused
   15 Statements compiled
