         Edinburgh IMP77 Compiler - Version 8.4
    1 %BEGIN
		.Ltext0:
				.globl	main
		main:
		.LFB185:
		.LVL0:
				subq	$568, %rsp
				movq	%fs:40, %rax
				movq	%rax, 552(%rsp)
				xorl	%eax, %eax
    2
				call	_imp_initialise@PLT
		.LVL1:
    3 !
    4 ! TEST A MAP USE THAT IS DIFFICULT TO OPTIMISE
    5 !
    6 %RECORDFORMAT F(%INTEGER I,J,K,%BYTEARRAY VOL(1:5),
    7       %BYTE B,%BYTEARRAY LAB(1:3))
    8 %INTEGER I,J
    9 %RECORD(F) SP
   10 %RECORD(F)%NAME R
   11       R==SP
   12       R=0
				movq	$0, (%rsp)
				movq	$0, 8(%rsp)
				movq	$0, 16(%rsp)
   13       R_VOL(1)='A'
				movb	$65, 12(%rsp)
   14       R_VOL(2)='B'
				movb	$66, 13(%rsp)
   15       R_VOL(3)='C'
				movb	$67, 14(%rsp)
   16       R_VOL(4)='D'
				movb	$68, 15(%rsp)
   17       R_VOL(5)='E'
				movb	$69, 16(%rsp)
		.LVL2:
				movq	%rsp, %rax
				leaq	5(%rax), %rcx
		.LVL3:
		.L2:
   18       %FOR I=1,1,5 %CYCLE
   19          BYTEINTEGER(ADDR(R_I)+1+I)=R_VOL(I)
				movzbl	12(%rax), %edx
				movb	%dl, 2(%rax)
		.LDL1:
				addq	$1, %rax
		.LVL4:
   20       %REPEAT
   21       I=ADDR(R_VOL(5))
				cmpq	%rcx, %rax
				jne	.L2
		.L3:
		.LBB22:
		.LBB23:
				movq	%rsp, %rax
				leaq	16(%rax), %rdx
		.LVL5:
		.LBE23:
		.LBE22:
		.LBB24:
		.LBB25:
				addq	$18, %rax
		.LVL6:
		.LBE25:
		.LBE24:
   22       J=ADDR(R_LAB(1))
   23       %IF R_I=M'AB' %AND R_J=M'CDE'<<8 %AND J-I=2 %THEN %c
				movl	(%rsp), %edi
				cmpl	$16706, %edi
				je	.L9
		.L4:
   24          PRINTSTRING("TEST OK (Unswopped)") %AND %STOP
				cmpl	$1128547584, 4(%rsp)
				jne	.L5
   25       %if R_I=M'BA'<<16 %and R_j=M'EDC' %and J-I=2 %then %C
				cmpl	$1111556096, %edi
				jne	.L5
				subl	%edx, %eax
		.LVL11:
				cmpl	$2, %eax
				jne	.L5
		.LVL12:
		.LBB28:
   26          PRINTSTRING("TEST OK (Swopped)") %and %stop
				cmpl	$4539459, 4(%rsp)
				je	.L10
		.LVL7:
		.L5:
				movabsq	$2327040632739284308, %rax
				movabsq	$8102098288467924264, %rdx
		.LVL13:
				movq	%rax, 289(%rsp)
				movq	%rdx, 297(%rsp)
				movq	$2712677, 305(%rsp)
				movq	$0, 313(%rsp)
				leaq	321(%rsp), %rdi
				movl	$223, %ecx
				movl	$0, %eax
				rep stosb
				movb	$19, 288(%rsp)
				leaq	32(%rsp), %rdi
				leaq	288(%rsp), %rsi
				movl	$32, %ecx
				rep movsq
		.LVL14:
				movb	$19, 32(%rsp)
				leaq	288(%rsp), %rdi
				leaq	32(%rsp), %rsi
				movl	$32, %ecx
				rep movsq
		.LBE28:
		.LBB29:
		.LBB30:
				subq	$256, %rsp
		.LVL15:
				leaq	544(%rsp), %rsi
				movl	$32, %ecx
				movq	%rsp, %rdi
				rep movsq
				call	_imp_printstring@PLT
		.LVL16:
		.LBE30:
		.LBE29:
		.LBB31:
		.LBB32:
				addq	$256, %rsp
		.LVL17:
				movl	$0, %edi
				call	exit@PLT
		.LVL18:
		.L10:
		.LBE32:
		.LBE31:
   27       WRITE(R_I,5)
				movl	$5, %esi
				call	_imp_writeint@PLT
		.LVL8:
				subl	%edx, %eax
		.LVL19:
				cmpl	$2, %eax
				jne	.L5
		.LVL20:
		.LBB33:
				movabsq	$2327040632739284308, %rax
				movabsq	$7234312004649308968, %rdx
		.LVL21:
				movq	%rax, 289(%rsp)
				movq	%rdx, 297(%rsp)
				movq	$41, 305(%rsp)
				movq	$0, 313(%rsp)
				leaq	321(%rsp), %rdi
				movl	$223, %ecx
				movl	$0, %eax
				rep stosb
				movb	$17, 288(%rsp)
				leaq	32(%rsp), %rdi
				leaq	288(%rsp), %rsi
				movl	$32, %ecx
				rep movsq
		.LVL22:
				movb	$17, 32(%rsp)
				leaq	288(%rsp), %rdi
				leaq	32(%rsp), %rsi
				movl	$32, %ecx
				rep movsq
		.LBE33:
		.LBB34:
		.LBB35:
				subq	$256, %rsp
		.LVL23:
				leaq	544(%rsp), %rsi
				movl	$32, %ecx
				movq	%rsp, %rdi
				rep movsq
				call	_imp_printstring@PLT
		.LVL24:
		.LBE35:
		.LBE34:
		.LBB36:
		.LBB37:
				addq	$256, %rsp
		.LVL25:
				movl	$0, %edi
				call	exit@PLT
		.LVL26:
		.LBE37:
		.LBE36:
		.LFE185:
		.Letext0:
   28       WRITE(R_J,5)
				movl	$5, %esi
				movl	4(%rsp), %edi
				call	_imp_writeint@PLT
		.LVL9:
		.LBB26:
		.LBB27:
				movl	$0, %edi
				call	exit@PLT
		.LVL10:
		.L9:
		.LBE27:
		.LBE26:
   29 %ENDOFPROGRAM
   22 Statements compiled
