         Edinburgh IMP77 Compiler - Version 8.4
    1 %externalroutine whatever(%integer x)
		.Ltext0:
				.globl	WHATEVER
		WHATEVER:
		.LFB189:
				pushl	%ebp
				movl	%esp, %ebp
				call	__x86.get_pc_thunk.ax
				addl	$_GLOBAL_OFFSET_TABLE_, %eax
    2 %end
				nop
				popl	%ebp
				ret
		.LFE189:
				.globl	XR1
		XR1:
		.LFB190:
?X unused
    3
    4 %externalroutine xr1(%routine fred(%integer p2))
				pushl	%ebp
				movl	%esp, %ebp
				call	__x86.get_pc_thunk.ax
				addl	$_GLOBAL_OFFSET_TABLE_, %eax
    5   %real r1
    6 %end
				nop
				popl	%ebp
				ret
		.LFE190:
				.globl	XM1
		XM1:
		.LFB191:
?R1 unused
?FRED unused
    7
    8 ! Should translate to:
    9
   10 ! void xr1(void (*fred)(int p2)) {
   11 !   float r1;
   12 ! }
   13
   14
   15 %externalintegermap xm1(%routine fred(%integer p2))
				pushl	%ebp
				movl	%esp, %ebp
				call	__x86.get_pc_thunk.ax
				addl	$_GLOBAL_OFFSET_TABLE_, %eax
   16   %owninteger oi1
   17   %result == oi1
				leal	OI1.6029@GOTOFF(%eax), %eax
   18 %end
				popl	%ebp
				ret
		.LFE191:
				.globl	main
		main:
		.LFB192:
?FRED unused
   19
   20 ! Should translate to:
   21
   22 ! int *xm1(void (*fred)(int p2)) {
   23 !   static int oi1;
   24 !   return &oi1;
   25 ! }
   26
   27 %begin
				leal	4(%esp), %ecx
				andl	$-16, %esp
				pushl	-4(%ecx)
				pushl	%ebp
				movl	%esp, %ebp
				pushl	%ebx
				pushl	%ecx
				subl	$16, %esp
				call	__x86.get_pc_thunk.bx
				addl	$_GLOBAL_OFFSET_TABLE_, %ebx
				movl	%ecx, %eax
				subl	$8, %esp
				pushl	4(%eax)
				pushl	(%eax)
				call	_imp_initialise@PLT
				addl	$16, %esp
   28   %integer i           ;! int I;
   29   %integername zz      ;! int *ZZ;
   30   zz == xm1(whatever)  ;! ZZ = XM1(&whatever);
				subl	$12, %esp
				leal	WHATEVER@GOTOFF(%ebx), %eax
				pushl	%eax
				call	XM1
				addl	$16, %esp
				movl	%eax, -20(%ebp)
   31   i = zz               ;! I = *ZZ;
				movl	-20(%ebp), %eax
				movl	(%eax), %eax
				movl	%eax, -16(%ebp)
				movl	$0, -12(%ebp)
		.LBB4:
		.LBB5:
				subl	$12, %esp
				pushl	-12(%ebp)
				call	exit@PLT
		.LBE5:
		.LBE4:
		.LFE192:
				.comm	OI1.6029,4,4
				.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:
		.LFB193:
				movl	(%esp), %eax
				ret
		.LFE193:
				.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:
		.LFB194:
				movl	(%esp), %ebx
				ret
		.LFE194:
		.Letext0:
   32 %end
   33
   34 %endoffile
   16 Statements compiled
