         Edinburgh IMP77 Compiler - Version 8.4
    1 %BEGIN
		.Ltext0:
		FACT.6025:
		.LFB190:
				leal	4(%esp), %ecx
				andl	$-16, %esp
				pushl	-4(%ecx)
				pushl	%ebp
				movl	%esp, %ebp
				pushl	%edi
				pushl	%esi
				pushl	%ebx
				pushl	%ecx
				subl	$552, %esp
				call	__x86.get_pc_thunk.bx
				addl	$_GLOBAL_OFFSET_TABLE_, %ebx
				movl	%ecx, %eax
				movl	4(%eax), %edx
				movl	%edx, -556(%ebp)
				movl	%gs:20, %edi
				movl	%edi, -28(%ebp)
				xorl	%edi, %edi
				leal	8(%ebp), %edx
				movl	%edx, -552(%ebp)
				subl	$8, %esp
				pushl	-556(%ebp)
				pushl	(%eax)
				call	_imp_initialise@PLT
				addl	$16, %esp
    2 %owninteger fail=0
    3 %INTEGER I
    4 %INTEGERFN FACT(%INTEGER N,mult)
				pushl	%ebp
				movl	%esp, %ebp
				pushl	%ebx
				subl	$20, %esp
				call	__x86.get_pc_thunk.ax
				addl	$_GLOBAL_OFFSET_TABLE_, %eax
				movl	%ecx, %ebx
				movl	%ecx, -12(%ebp)
    5       %IF N<=1 %THENRESULT=mult
				cmpl	$1, 8(%ebp)
				jg	.L6
				movl	12(%ebp), %eax
				jmp	.L4
		.L6:
				nop
		.L3:
    6       %RESULT=FACT(N-1,mult*N)
				movl	12(%ebp), %eax
				imull	8(%ebp), %eax
				movl	8(%ebp), %edx
				subl	$1, %edx
				subl	$8, %esp
				pushl	%eax
				pushl	%edx
				movl	%ebx, %ecx
				call	FACT.6025
				addl	$16, %esp
		.L4:
    7 %END
				movl	-4(%ebp), %ebx
				leave
				ret
		.LFE190:
				.section	.rodata
				.align 32
		.LC0:
				.byte	7
				.string	"TEST OK"
				.zero	247
				.globl	main
		main:
		.LFB189:
    8 %ROUTINE COMPARE(%INTEGER I,J)
				pushl	%ebp
				movl	%esp, %ebp
				pushl	%edi
				pushl	%esi
				pushl	%ebx
				subl	$556, %esp
				call	__x86.get_pc_thunk.bx
				addl	$_GLOBAL_OFFSET_TABLE_, %ebx
				movl	%ecx, -556(%ebp)
				movl	%gs:20, %eax
				movl	%eax, -28(%ebp)
				xorl	%eax, %eax
    9       %UNLESS I=J %START
				movl	8(%ebp), %eax
				cmpl	12(%ebp), %eax
				je	.L22
		.LBB17:
				nop
		.L19:
   10          PRINTSTRING("ERROR")
				leal	-284(%ebp), %eax
				leal	.LC1@GOTOFF(%ebx), %edx
				movl	$64, %ecx
				movl	%eax, %edi
				movl	%edx, %esi
				rep movsl
				leal	-540(%ebp), %eax
				leal	-284(%ebp), %edx
				movl	$64, %ecx
				movl	%eax, %edi
				movl	%edx, %esi
				rep movsl
				leal	-284(%ebp), %eax
				leal	-540(%ebp), %edx
				movl	$64, %ecx
				movl	%eax, %edi
				movl	%edx, %esi
				rep movsl
		.LBE17:
		.LBB18:
		.LBB19:
				subl	$256, %esp
				movl	%esp, %eax
				movl	%eax, %edi
				leal	-284(%ebp), %eax
				movl	$64, %edx
				movl	%eax, %esi
				movl	%edx, %ecx
				rep movsl
				call	_imp_printstring@PLT
				addl	$256, %esp
		.LBE19:
		.LBE18:
   11          WRITE(I,5); WRITE(J,5)
				subl	$8, %esp
				pushl	$5
				pushl	8(%ebp)
				call	_imp_writeint@PLT
				addl	$16, %esp
				subl	$8, %esp
				pushl	$5
				pushl	12(%ebp)
				call	_imp_writeint@PLT
				addl	$16, %esp
   12          Fail=1; NEWLINE
				movl	$1, FAIL.6021@GOTOFF(%ebx)
		.LBB20:
		.LBB21:
				call	_imp_newline@PLT
		.LBE21:
		.LBE20:
   13       %FINISH
   14 %END
				jmp	.L19
		.L22:
				nop
				movl	-28(%ebp), %eax
				xorl	%gs:20, %eax
				je	.L21
				call	__stack_chk_fail_local
		.L21:
				leal	-12(%ebp), %esp
				popl	%ebx
				popl	%esi
				popl	%edi
				popl	%ebp
				ret
		.LFE191:
				.comm	FAIL.6021,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:
		.LFB192:
				movl	(%esp), %eax
				ret
		.LFE192:
				.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:
		.LFB193:
				movl	(%esp), %ebx
				ret
		.LFE193:
		.Letext0:
   15       COMPARE(FACT(I,1),I*FACT(I-1,1)) %FOR I=2,1,100
				movl	$1, -548(%ebp)
		.L8:
				cmpl	$100, -548(%ebp)
				je	.L15
				addl	$1, -548(%ebp)
				movl	-548(%ebp), %eax
				leal	-1(%eax), %edx
				subl	$8, %esp
				leal	-552(%ebp), %eax
				pushl	$1
				pushl	%edx
				movl	%eax, %ecx
				call	FACT.6025
				addl	$16, %esp
				imull	-548(%ebp), %eax
				movl	%eax, %esi
				subl	$8, %esp
				leal	-552(%ebp), %eax
				pushl	$1
				pushl	-548(%ebp)
				movl	%eax, %ecx
				call	FACT.6025
				addl	$16, %esp
				movl	%eax, %edx
				subl	$8, %esp
				leal	-552(%ebp), %eax
				pushl	%esi
				pushl	%edx
				movl	%eax, %ecx
				call	COMPARE.6030
				addl	$16, %esp
				jmp	.L8
		.L15:
				nop
		.L10:
   16       %if fail=0 %then printstring("TEST OK")
				movl	FAIL.6021@GOTOFF(%ebx), %eax
				testl	%eax, %eax
				jne	.L16
		.LBB12:
				leal	-284(%ebp), %eax
				leal	.LC0@GOTOFF(%ebx), %edx
				movl	$64, %ecx
				movl	%eax, %edi
				movl	%edx, %esi
				rep movsl
				leal	-540(%ebp), %eax
				leal	-284(%ebp), %edx
				movl	$64, %ecx
				movl	%eax, %edi
				movl	%edx, %esi
				rep movsl
				leal	-284(%ebp), %eax
				leal	-540(%ebp), %edx
				movl	$64, %ecx
				movl	%eax, %edi
				movl	%edx, %esi
				rep movsl
		.LBE12:
		.LBB13:
		.LBB14:
				subl	$256, %esp
				movl	%esp, %eax
				movl	%eax, %edi
				leal	-284(%ebp), %eax
				movl	$64, %edx
				movl	%eax, %esi
				movl	%edx, %ecx
				rep movsl
				call	_imp_printstring@PLT
				addl	$256, %esp
				jmp	.L12
		.L16:
		.LBE14:
		.LBE13:
				nop
		.L12:
				movl	$0, -544(%ebp)
		.LBB15:
		.LBB16:
				subl	$12, %esp
				pushl	-544(%ebp)
				call	exit@PLT
		.LBE16:
		.LBE15:
		.LFE189:
				.section	.rodata
				.align 32
		.LC1:
				.byte	5
				.string	"ERROR"
				.zero	249
		COMPARE.6030:
		.LFB191:
   17 %ENDOFPROGRAM
   19 Statements compiled
