         Edinburgh IMP77 Compiler - Version 8.4
    1
		.Ltext0:
		A.6391:
		.LFB186:
    2 %BEGIN
		.LVL4:
				pushq	%rbp
				pushq	%rbx
				subq	$1080, %rsp
				movq	%fs:40, %rax
				movq	%rax, 1064(%rsp)
				xorl	%eax, %eax
				leaq	1104(%rsp), %rax
				movq	%rax, 16(%rsp)
    3 !***********************************************************************
				call	_imp_initialise@PLT
		.LVL5:
    4 !*    TESTS SOME VERY NOTTED CONDITIONS FOR CONSISTENCY. NO OPUT IF OK *
    5 !***********************************************************************
    6 %INTEGER I,J,K
    7 %ROUTINESPEC A
    8 %ROUTINESPEC B
    9 %ROUTINESPEC C
   10       K=0
				movl	$0, 8(%rsp)
   11       %CYCLE I=-1,1,1
   12          %CYCLE J=0,1,3
   13             %IFNOTNOTNOTNOT I=1 %THEN A %ELSE B
				cmpl	$1, 4(%rsp)
				je	.L66
		.L15:
   14             %IFNOT (%NOT I=1) %THEN A %ELSE B
				movl	$-2, %eax
				movl	4(%rsp), %eax
				cmpl	$1, %eax
				je	.L14
		.LVL7:
		.L11:
				movq	%rbx, %r10
				call	A.6391
		.LVL8:
				cmpl	$1, 4(%rsp)
				je	.L67
		.L17:
   15             %IF I=1 %THEN A %ELSE B
				movl	$-1, %ebp
				addl	$1, %eax
				movl	%eax, 4(%rsp)
				movl	%ebp, %eax
				jmp	.L39
		.L66:
				jmp	.L16
		.L67:
				movq	%rbx, %r10
				call	A.6391
		.LVL9:
				movl	(%rsp), %eax
				cmpl	$3, %eax
				je	.L65
		.LVL22:
		.L39:
				cmpl	$1, 4(%rsp)
				je	.L68
		.L19:
   16             C
				jmp	.L18
		.L68:
				movq	%rbx, %r10
				call	A.6391
		.LVL10:
				addl	$1, %eax
				movl	%eax, (%rsp)
				movq	%rbx, %r10
				call	C.6395
		.LVL26:
   17             %IFNOT I=1 %THEN A %ELSE B
				movq	%rsp, %rbx
				jmp	.L11
		.L12:
		.LVL6:
		.L65:
		.L13:
				jmp	.L20
		.L21:
				movq	%rbx, %r10
				call	B.6393
		.LVL23:
		.L16:
				cmpl	$1, 4(%rsp)
				je	.L21
   18             %UNLESS I=1 %THEN A %ELSE B
				movq	%rbx, %r10
				call	B.6393
		.LVL24:
		.L18:
				movq	%rbx, %r10
				call	A.6391
		.LVL27:
		.L22:
				cmpl	$1, 4(%rsp)
				je	.L23
   19             C
				movq	%rbx, %r10
				call	B.6393
		.LVL25:
		.L20:
				movq	%rbx, %r10
				call	A.6391
		.LVL28:
		.L24:
				movq	%rbx, %r10
				call	C.6395
		.LVL29:
   20             %IF I=1 %AND J#2 %THEN A %ELSE B
				cmpl	$1, 4(%rsp)
				jne	.L25
   21             %IF I=1 %ANDNOT J=2 %THEN A %ELSE B
				movq	%rbx, %r10
				call	B.6393
		.LVL11:
				jmp	.L22
		.L23:
				cmpl	$2, (%rsp)
				jne	.L69
		.L25:
				cmpl	$1, 4(%rsp)
				jne	.L27
   22             C
				movq	%rbx, %r10
				call	B.6393
		.LVL12:
				jmp	.L24
		.L69:
				movq	%rbx, %r10
				call	A.6391
		.LVL13:
				cmpl	$2, (%rsp)
				jne	.L70
		.L27:
				movq	%rbx, %r10
				call	C.6395
		.LVL32:
   23             %IF I=1 %OR 1<=J<=2 %THEN A %ELSE B
				jmp	.L26
		.L70:
				movq	%rbx, %r10
				call	A.6391
		.LVL14:
				cmpl	$1, 4(%rsp)
				je	.L29
		.LVL33:
		.LBB18:
   24             %IF I=1 %OR (1<=J %AND J<=2) %THEN A %ELSE B
				jmp	.L28
		.L29:
				cmpl	$1, 4(%rsp)
				je	.L32
   25             C
				movq	%rbx, %r10
				call	C.6395
		.LVL18:
		.LBB17:
				movq	%rbx, %r10
				call	B.6393
		.LVL30:
		.L26:
   26             %IF I=0=J %THEN A %ELSE B
				movl	(%rsp), %eax
				subl	$1, %eax
				cmpl	$1, %eax
				jbe	.L32
		.L33:
				movq	%rbx, %r10
				call	B.6393
		.LVL31:
		.L28:
   27             %IF I=0 %AND J=0 %THEN A %ELSE B
				cmpl	$0, 4(%rsp)
				jne	.L37
   28             C
				movq	%rbx, %r10
				call	A.6391
		.LVL17:
		.L34:
				cmpl	$0, (%rsp)
				je	.L64
		.L37:
				movq	%rbx, %r10
				call	C.6395
		.LVL21:
		.LDL1:
   29          %REPEAT
				cmpl	$0, 4(%rsp)
				jne	.L35
				movl	(%rsp), %eax
				subl	$1, %eax
				cmpl	$1, %eax
				jbe	.L29
		.L30:
		.LBE18:
				movq	%rbx, %r10
				call	A.6391
		.LVL37:
   30       %REPEAT
				jmp	.L38
		.L14:
		.LVL38:
		.LBB19:
   31       PRINTSTRING("PART 1 OK ")
				movq	%rbx, %r10
				call	B.6393
		.LVL16:
				jmp	.L34
		.L32:
				cmpl	$0, (%rsp)
				je	.L63
		.L35:
		.LBE17:
				movabsq	$5701611143174439248, %rax
				movl	$8267, %edx
				movq	%rax, 801(%rsp)
				movq	%rdx, 809(%rsp)
				movb	$0, 817(%rsp)
				movw	$0, 818(%rsp)
				movl	$0, 820(%rsp)
				leaq	824(%rsp), %rdi
				movl	$29, %ecx
				movl	$0, %eax
				rep stosq
				movb	$10, 800(%rsp)
				movq	800(%rsp), %rax
				movq	808(%rsp), %rdx
				movq	%rax, 32(%rsp)
				movq	%rdx, 40(%rsp)
		.LVL39:
				movb	$10, 32(%rsp)
		.LBE19:
		.LBB20:
		.LBB21:
				pushq	1048(%rsp)
				pushq	1048(%rsp)
				pushq	1048(%rsp)
				pushq	1048(%rsp)
				pushq	1048(%rsp)
				pushq	1048(%rsp)
				pushq	1048(%rsp)
				pushq	1048(%rsp)
				pushq	1048(%rsp)
				pushq	1048(%rsp)
				pushq	1048(%rsp)
				pushq	1048(%rsp)
				pushq	1048(%rsp)
				pushq	1048(%rsp)
				pushq	1048(%rsp)
				pushq	1048(%rsp)
				pushq	1048(%rsp)
				pushq	1048(%rsp)
				pushq	1048(%rsp)
				pushq	1048(%rsp)
				pushq	1048(%rsp)
				pushq	1048(%rsp)
				pushq	1048(%rsp)
				pushq	1048(%rsp)
				pushq	1048(%rsp)
				pushq	1048(%rsp)
				pushq	1048(%rsp)
				pushq	1048(%rsp)
				pushq	1048(%rsp)
				pushq	1048(%rsp)
				pushq	280(%rsp)
				pushq	280(%rsp)
				call	_imp_printstring@PLT
		.LVL40:
				addq	$256, %rsp
		.LBE21:
		.LBE20:
   32       %CYCLE I=-1,1,1
				movq	%rbx, %r10
				call	A.6391
		.LVL15:
		.L31:
				movq	%rbx, %r10
				call	B.6393
		.LVL20:
		.L38:
   33          %CYCLE J=0,1,3
				movq	%rbx, %r10
				call	A.6391
		.LVL36:
   34             %IF I=1 %ANDNOT J#1 %THEN A %ELSE B
				jmp	.L36
		.L64:
   35             %IF I=1 %ANDNOT (J#1) %THEN A %ELSE B
				movq	%rbx, %r10
				call	B.6393
		.LVL34:
				jmp	.L31
		.LVL35:
		.L63:
				movl	$-2, %eax
				movl	4(%rsp), %eax
				cmpl	$1, %eax
				je	.L43
		.L40:
				cmpl	$1, 4(%rsp)
				jne	.L44
				cmpl	$1, %eax
				je	.L72
		.L44:
				cmpl	$1, 4(%rsp)
				jne	.L46
   36             C
				movq	%rbx, %r10
				call	B.6393
		.LVL19:
		.L36:
				movl	$-1, %ebp
				addl	$1, %eax
				movl	%eax, 4(%rsp)
				movl	%ebp, %eax
				jmp	.L58
		.L72:
				movq	%rbx, %r10
				call	A.6391
		.LVL41:
				movl	(%rsp), %eax
				cmpl	$3, %eax
				je	.L71
		.L58:
				cmpl	$1, (%rsp)
				je	.L73
		.L46:
				movq	%rbx, %r10
				call	C.6395
		.LVL51:
   37             %IF I=1 %ORNOT 1<=J<=2 %THEN A %ELSE B
				jmp	.L45
		.L73:
				movq	%rbx, %r10
				call	A.6391
		.LVL42:
				addl	$1, %eax
				movl	%eax, (%rsp)
				cmpl	$1, 4(%rsp)
				je	.L48
		.LVL52:
		.LBB22:
   38             %IF I=1 %ORNOT (1<=J %AND J<=2) %THEN A %ELSE B
				jmp	.L47
		.LVL43:
		.L49:
				cmpl	$1, 4(%rsp)
				je	.L51
   39             C
				movq	%rsp, %rbx
				jmp	.L40
		.L41:
		.L71:
		.L42:
				movq	%rbx, %r10
				call	B.6393
		.LVL49:
		.L45:
				movq	%rbx, %r10
				call	C.6395
		.LVL56:
   40             %IF I=1 %AND J=2 %THEN A %ELSE B
				movq	%rbx, %r10
				call	B.6393
		.LVL50:
		.L47:
				movl	(%rsp), %eax
				subl	$1, %eax
				cmpl	$1, %eax
				jbe	.L52
		.L51:
				cmpl	$1, 4(%rsp)
				jne	.L54
   41             %IFNOT (%NOT (I=1 %AND J=2)) %THEN A %ELSE B
				cmpl	$2, (%rsp)
				je	.L74
		.L54:
				cmpl	$1, 4(%rsp)
				jne	.L56
   42             C
				movq	%rbx, %r10
				call	A.6391
		.LVL46:
				movq	%rbx, %r10
				call	C.6395
		.LVL48:
		.LDL2:
				movq	%rbx, %r10
				call	A.6391
		.LVL55:
		.L53:
				cmpl	$2, (%rsp)
				jne	.L56
   43          %REPEAT
				jmp	.L55
		.L56:
				movl	(%rsp), %eax
				subl	$1, %eax
				cmpl	$1, %eax
				jbe	.L49
		.LVL53:
		.L48:
		.LBE22:
				movq	%rbx, %r10
				call	A.6391
		.LVL58:
   44       %REPEAT
				jmp	.L57
		.L43:
		.LVL59:
		.LBB23:
   45       PRINTSTRING("TEST OK")
				movq	%rbx, %r10
				call	B.6393
		.LVL45:
				jmp	.L53
		.L74:
				movq	%rbx, %r10
				call	B.6393
		.LVL57:
		.L55:
				movabsq	$21197623525590356, %rax
				movl	$0, %edx
				movq	%rax, 801(%rsp)
				movq	%rdx, 809(%rsp)
				movb	$0, 817(%rsp)
				movw	$0, 818(%rsp)
				movl	$0, 820(%rsp)
				leaq	824(%rsp), %rdi
				movl	$29, %ecx
				movl	$0, %eax
				rep stosq
				movb	$7, 800(%rsp)
				movq	800(%rsp), %rax
				movq	808(%rsp), %rdx
				movq	%rax, 288(%rsp)
				movq	%rdx, 296(%rsp)
		.LVL60:
				movb	$7, 288(%rsp)
		.LBE23:
		.LBB24:
		.LBB25:
				pushq	1048(%rsp)
				pushq	1048(%rsp)
				pushq	1048(%rsp)
				pushq	1048(%rsp)
				pushq	1048(%rsp)
				pushq	1048(%rsp)
				pushq	1048(%rsp)
				pushq	1048(%rsp)
				pushq	1048(%rsp)
				pushq	1048(%rsp)
				pushq	1048(%rsp)
				pushq	1048(%rsp)
				pushq	1048(%rsp)
				pushq	1048(%rsp)
				pushq	1048(%rsp)
				pushq	1048(%rsp)
				pushq	1048(%rsp)
				pushq	1048(%rsp)
				pushq	1048(%rsp)
				pushq	1048(%rsp)
				pushq	1048(%rsp)
				pushq	1048(%rsp)
				pushq	1048(%rsp)
				pushq	1048(%rsp)
				pushq	1048(%rsp)
				pushq	1048(%rsp)
				pushq	1048(%rsp)
				pushq	1048(%rsp)
				pushq	1048(%rsp)
				pushq	1048(%rsp)
				pushq	536(%rsp)
				pushq	536(%rsp)
				call	_imp_printstring@PLT
		.LVL61:
		.LBE25:
		.LBE24:
		.LBB26:
		.LBB27:
				addq	$256, %rsp
				movl	$0, %edi
				call	exit@PLT
		.LVL62:
		.LBE27:
		.LBE26:
		.LFE185:
		.Letext0:
   46 %ROUTINE A; K=K<<8!'A'; %END
				movq	%rbx, %r10
				call	B.6393
		.LVL47:
		.L57:
				movq	%rbx, %r10
				call	A.6391
		.LVL54:
		.L50:
   47 %ROUTINE B; K=K<<8!'B'; %END
   48 %ROUTINE C
				movl	8(%r10), %eax
				sall	$8, %eax
				orl	$65, %eax
				movl	%eax, 8(%r10)
				pushq	%rbx
				movq	%r10, %rbx
   49       %IF K=M'AA' %OR K=M'BB' %OR K=M'AAA' %OR K=M'BBB' %THEN K=0 %ANDRETURN
				movl	8(%r10), %eax
				sall	$8, %eax
				orl	$66, %eax
				movl	%eax, 8(%r10)
				movl	8(%r10), %eax
				cmpl	$16705, %eax
				sete	%cl
				orl	%ecx, %edx
				cmpl	$4276545, %eax
				sete	%cl
				movq	%rbx, %r10
				call	B.6393
		.LVL44:
				jmp	.L50
		.L52:
   50       WRITE(I,1); WRITE(J,1); WRITE(K,1)
				ret
		.LFE186:
		B.6393:
		.LFB187:
				cmpl	$16962, %eax
				sete	%dl
				movl	4(%r10), %edi
				movl	$1, %esi
				call	_imp_writeint@PLT
		.LVL0:
   51       %MONITOR
				ret
		.LFE187:
		C.6395:
		.LFB188:
				movl	$1, %esi
				movl	(%rbx), %edi
				call	_imp_writeint@PLT
		.LVL1:
   52       %STOP
				orb	%cl, %dl
				jne	.L6
				cmpl	$4342338, %eax
				jne	.L4
		.L6:
				movl	8(%rbx), %edi
				movl	$1, %esi
				call	_imp_writeint@PLT
		.LVL2:
		.LBB15:
		.LBB16:
				movl	$0, %edi
				call	exit@PLT
		.LVL3:
		.LBE16:
		.LBE15:
		.LFE188:
				.globl	main
		main:
		.LFB185:
   53 %END
   54 %ENDOFPROGRAM
				movl	$0, 8(%r10)
				ret
		.L4:
   56 Statements compiled
