         Edinburgh IMP77 Compiler - Version 8.4
    1 %begin
		.Ltext0:
		DIV.6030:
		.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	$1080, %esp
				call	__x86.get_pc_thunk.bx
				addl	$_GLOBAL_OFFSET_TABLE_, %ebx
				movl	%ecx, %eax
				movl	4(%eax), %edx
				movl	%edx, -1084(%ebp)
				movl	%gs:20, %edi
				movl	%edi, -28(%ebp)
				xorl	%edi, %edi
				leal	8(%ebp), %edx
				movl	%edx, -1068(%ebp)
				subl	$8, %esp
				pushl	-1084(%ebp)
				pushl	(%eax)
				call	_imp_initialise@PLT
				addl	$16, %esp
    2 %externalroutinespec phex %alias "s_phex" (%integer x)
    3 %integer i,j,k,corr,fail
    4 %integerfn div(%integer x,y)
				pushl	%ebp
				movl	%esp, %ebp
				subl	$4, %esp
				call	__x86.get_pc_thunk.ax
				addl	$_GLOBAL_OFFSET_TABLE_, %eax
				movl	%ecx, -4(%ebp)
    5 %result=x//y
				movl	8(%ebp), %eax
				cltd
				idivl	12(%ebp)
    6 %end
				leave
				ret
		.LFE190:
				.section	.rodata
				.align 32
		.LC0:
				.byte	7
				.string	"TEST OK"
				.zero	247
				.align 32
		.LC1:
				.byte	15
				.string	"Divide in error"
				.zero	239
				.globl	main
		main:
		.LFB189:
    7 fail=0
				movl	$0, -1060(%ebp)
    8 %for k=20,-1,-20%cycle
				movl	$21, -1064(%ebp)
		.L4:
				cmpl	$-20, -1064(%ebp)
				je	.L23
				subl	$1, -1064(%ebp)
				nop
		.L6:
    9       %if k//2#div(k,2) %then fail=1
				movl	-1064(%ebp), %eax
				movl	%eax, %edx
				shrl	$31, %edx
				addl	%edx, %eax
				sarl	%eax
				movl	%eax, %esi
				subl	$8, %esp
				leal	-1068(%ebp), %eax
				pushl	$2
				pushl	-1064(%ebp)
				movl	%eax, %ecx
				call	DIV.6030
				addl	$16, %esp
				cmpl	%eax, %esi
				je	.L24
				movl	$1, -1060(%ebp)
				jmp	.L8
		.L24:
				nop
		.L8:
   10       %if k//4#div(k,4) %then fail=1
				movl	-1064(%ebp), %eax
				leal	3(%eax), %edx
				testl	%eax, %eax
				cmovs	%edx, %eax
				sarl	$2, %eax
				movl	%eax, %esi
				subl	$8, %esp
				leal	-1068(%ebp), %eax
				pushl	$4
				pushl	-1064(%ebp)
				movl	%eax, %ecx
				call	DIV.6030
				addl	$16, %esp
				cmpl	%eax, %esi
				je	.L25
				movl	$1, -1060(%ebp)
				jmp	.L10
		.L25:
				nop
		.L10:
   11       %if k//8#div(k,8) %then fail=1
				movl	-1064(%ebp), %eax
				leal	7(%eax), %edx
				testl	%eax, %eax
				cmovs	%edx, %eax
				sarl	$3, %eax
				movl	%eax, %esi
				subl	$8, %esp
				leal	-1068(%ebp), %eax
				pushl	$8
				pushl	-1064(%ebp)
				movl	%eax, %ecx
				call	DIV.6030
				addl	$16, %esp
				cmpl	%eax, %esi
				je	.L26
				movl	$1, -1060(%ebp)
				jmp	.L12
		.L26:
				nop
		.L12:
   12       %if k//16#div(k,16) %then fail=1
				movl	-1064(%ebp), %eax
				leal	15(%eax), %edx
				testl	%eax, %eax
				cmovs	%edx, %eax
				sarl	$4, %eax
				movl	%eax, %esi
				subl	$8, %esp
				leal	-1068(%ebp), %eax
				pushl	$16
				pushl	-1064(%ebp)
				movl	%eax, %ecx
				call	DIV.6030
				addl	$16, %esp
				cmpl	%eax, %esi
				je	.L27
				movl	$1, -1060(%ebp)
				jmp	.L14
		.L27:
				nop
		.L14:
   13       %if k//1#div(k,1) %then fail=1
				subl	$8, %esp
				leal	-1068(%ebp), %eax
				pushl	$1
				pushl	-1064(%ebp)
				movl	%eax, %ecx
				call	DIV.6030
				addl	$16, %esp
				cmpl	%eax, -1064(%ebp)
				je	.L28
				movl	$1, -1060(%ebp)
				jmp	.L4
		.L28:
				nop
		.L16:
   14 %repeat
				jmp	.L4
		.L23:
   15 %if fail=0 %then printstring("TEST OK") %else printstring("Divide in error")
				cmpl	$0, -1060(%ebp)
				jne	.L29
		.LBB12:
				leal	-284(%ebp), %eax
				leal	.LC0@GOTOFF(%ebx), %edx
				movl	$64, %ecx
				movl	%eax, %edi
				movl	%edx, %esi
				rep movsl
				leal	-1052(%ebp), %eax
				leal	-284(%ebp), %edx
				movl	$64, %ecx
				movl	%eax, %edi
				movl	%edx, %esi
				rep movsl
				leal	-540(%ebp), %eax
				leal	-1052(%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	-540(%ebp), %eax
				movl	$64, %edx
				movl	%eax, %esi
				movl	%edx, %ecx
				rep movsl
				call	_imp_printstring@PLT
				addl	$256, %esp
		.LBE14:
		.LBE13:
				jmp	.L19
		.L29:
				nop
		.L18:
		.LBB15:
				leal	-284(%ebp), %eax
				leal	.LC1@GOTOFF(%ebx), %edx
				movl	$64, %ecx
				movl	%eax, %edi
				movl	%edx, %esi
				rep movsl
				leal	-796(%ebp), %eax
				leal	-284(%ebp), %edx
				movl	$64, %ecx
				movl	%eax, %edi
				movl	%edx, %esi
				rep movsl
				leal	-284(%ebp), %eax
				leal	-796(%ebp), %edx
				movl	$64, %ecx
				movl	%eax, %edi
				movl	%edx, %esi
				rep movsl
		.LBE15:
		.LBB16:
		.LBB17:
				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
		.L19:
		.LBE17:
		.LBE16:
		.LBB18:
		.LBB19:
				call	_imp_newline@PLT
				movl	$0, -1056(%ebp)
		.LBE19:
		.LBE18:
		.LBB20:
		.LBB21:
				subl	$12, %esp
				pushl	-1056(%ebp)
				call	exit@PLT
		.LBE21:
		.LBE20:
		.LFE189:
				.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:
		.LFB191:
				movl	(%esp), %eax
				ret
		.LFE191:
				.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:
		.LFB192:
				movl	(%esp), %ebx
				ret
		.LFE192:
		.Letext0:
   16 newline
   17 %endofprogram
?CORR unused
?J unused
?I unused
?PHEX unused
   17 Statements compiled
