         Edinburgh IMP77 Compiler - Version 8.4
    1 %begin
		.Ltext0:
				.globl	main
		main:
		.LFB185:
		.LVL0:
				subq	$1048, %rsp
				movq	%fs:40, %rax
				movq	%rax, 1032(%rsp)
				xorl	%eax, %eax
    2 %externalroutinespec phex %alias "s_phex" (%integer x)
				call	_imp_initialise@PLT
		.LVL1:
		.LBB32:
		.LBB33:
    3 %integer i,j,k,corr,fail
    4 %integerfn div(%integer x,y)
    5 %result=x//y
				movl	$20, %eax
		.LBE33:
		.LBE32:
				leaq	3(%rax), %rsi
				testq	%rax, %rax
				cmovns	%rax, %rsi
				sarq	$2, %rsi
		.LBE36:
		.LBE35:
				leaq	7(%rax), %rsi
				testq	%rax, %rax
				cmovns	%rax, %rsi
				sarq	$3, %rsi
		.LBE38:
		.LBE37:
				cmpl	%esi, %edi
				leaq	15(%rax), %rcx
				testq	%rax, %rax
				cmovns	%rax, %rcx
				sarq	$4, %rcx
		.LBE40:
		.LBE39:
				cmpl	%ecx, %esi
				movq	%rax, %rcx
		.LVL10:
				shrq	$63, %rcx
				addq	%rax, %rcx
				sarq	%rcx
		.LBE34:
		.LBE41:
    6 %end
    7 fail=0
				movl	$0, %edx
    8 %for k=20,-1,-20%cycle
    9       %if k//2#div(k,2) %then fail=1
				leal	-1(%rax), %ecx
		.LVL7:
				movl	%ecx, %esi
				shrl	$31, %esi
				addl	%ecx, %esi
				sarl	%esi
		.LVL8:
				subq	$1, %rax
		.LVL9:
		.LBB41:
		.LBB34:
				cmpl	%ecx, %esi
   10       %if k//4#div(k,4) %then fail=1
				leal	3(%rax), %edi
				testl	%eax, %eax
				cmovns	%eax, %edi
				sarl	$2, %edi
		.LBB35:
		.LBB36:
				cmpl	%esi, %edi
				cmovne	%r8d, %edx
		.LVL3:
		.L5:
				leal	7(%rax), %edi
				testl	%eax, %eax
				cmovns	%eax, %edi
				sarl	$3, %edi
		.LBB37:
		.LBB38:
				cmovne	%r8d, %edx
		.LVL11:
		.L4:
				jmp	.L2
		.LVL12:
		.L13:
		.L3:
   11       %if k//8#div(k,8) %then fail=1
				movl	$1, %r8d
		.LVL2:
		.L2:
				cmpq	$-20, %rax
				je	.L13
		.LVL6:
   12       %if k//16#div(k,16) %then fail=1
				cmovne	%r8d, %edx
		.LVL4:
		.L6:
				leal	15(%rax), %esi
				testl	%eax, %eax
				cmovns	%eax, %esi
				sarl	$4, %esi
		.LBB39:
		.LBB40:
   13       %if k//1#div(k,1) %then fail=1
				cmovne	%r8d, %edx
		.LVL5:
   14 %repeat
   15 %if fail=0 %then printstring("TEST OK") %else printstring("Divide in error")
				testl	%edx, %edx
				jne	.L8
		.LVL13:
		.LBB42:
   16 newline
				movabsq	$21197623525590356, %rax
		.LVL14:
				movl	$0, %edx
		.LVL15:
				movq	%rax, 769(%rsp)
				movq	%rdx, 777(%rsp)
				leaq	785(%rsp), %rdi
				movl	$239, %ecx
				movl	$0, %eax
				rep stosb
				movb	$7, 768(%rsp)
				movq	%rsp, %rdi
				leaq	768(%rsp), %rsi
				movl	$32, %ecx
				rep movsq
		.LVL16:
				movb	$7, (%rsp)
				leaq	512(%rsp), %rdi
				movq	%rsp, %rsi
				movl	$32, %ecx
				rep movsq
		.LBE42:
		.LBB43:
		.LBB44:
				subq	$256, %rsp
				leaq	768(%rsp), %rsi
				movl	$32, %ecx
				movq	%rsp, %rdi
				rep movsq
				call	_imp_printstring@PLT
		.LVL17:
				addq	$256, %rsp
		.L9:
		.LBE44:
		.LBE43:
		.LBB45:
		.LBB46:
				call	_imp_newline@PLT
		.LVL18:
		.LBE46:
		.LBE45:
		.LBB47:
		.LBB48:
				movl	$0, %edi
				call	exit@PLT
		.LVL19:
		.L8:
		.LBE48:
		.LBE47:
		.LBB49:
   17 %endofprogram
?CORR unused
?J unused
?I unused
?PHEX unused
   17 Statements compiled
				movabsq	$7575166055177677124, %rax
		.LVL20:
				movabsq	$32210684681199726, %rdx
		.LVL21:
				movq	%rax, 769(%rsp)
				movq	%rdx, 777(%rsp)
				leaq	785(%rsp), %rdi
				movl	$239, %ecx
				movl	$0, %eax
				rep stosb
				movb	$15, 768(%rsp)
				leaq	256(%rsp), %rdi
				leaq	768(%rsp), %rsi
				movl	$32, %ecx
				rep movsq
		.LVL22:
				movb	$15, 256(%rsp)
				leaq	768(%rsp), %rdi
				leaq	256(%rsp), %rsi
				movl	$32, %ecx
				rep movsq
		.LBE49:
		.LBB50:
		.LBB51:
				subq	$256, %rsp
				leaq	1024(%rsp), %rsi
				movl	$32, %ecx
				movq	%rsp, %rdi
				rep movsq
				call	_imp_printstring@PLT
		.LVL23:
				addq	$256, %rsp
				jmp	.L9
		.LBE51:
		.LBE50:
		.LFE185:
		.Letext0:
