         Edinburgh IMP77 Compiler - Version 8.4
    1 %begin
		.Ltext0:
				.section	.rodata.str1.8,"aMS",@progbits,1
				.align 8
		.LC1:
				.string	"Illegal cycle I = 2, 1, ROUNDS"
				.globl	main
		main:
		.LFB185:
		.LVL0:
				pushq	%r14
				pushq	%r13
				pushq	%r12
				pushq	%rbx
				subq	$1320, %rsp
				movq	%fs:40, %rax
				movq	%rax, 1304(%rsp)
				xorl	%eax, %eax
    2   %reals %long
				call	_imp_initialise@PLT
		.LVL1:
		.LBB18:
    3
    4   %integer rounds
    5   %real pi = 1.0
    6
				movsd	.LC0(%rip), %xmm0
		.LBB27:
				movsd	.LC0(%rip), %xmm0
				jmp	.L6
		.LFE185:
				.section	.rodata
				.align 16
		__PRETTY_FUNCTION__.5987:
				.string	"_imp_SELECTINPUT"
				.section	.rodata.cst8,"aM",@progbits,8
				.align 8
		.LC0:
				.long	0
				.long	1072693248
				.align 8
		.LC2:
				.long	0
				.long	1074790400
		.Letext0:
    7   !%on %event 9 %start
    8   !  print string("Cannot open file"); newline
    9   !  %stop
   10   !%finish
   11
   12   %integer i
   13
   14   open input(1, "rounds.txt");   ! open file
				movabsq	$8371755632515444594, %rax
				movl	$29816, %edx
				movq	%rax, 1041(%rsp)
				movq	%rdx, 1049(%rsp)
				movb	$0, 1057(%rsp)
				movw	$0, 1058(%rsp)
				movl	$0, 1060(%rsp)
				leaq	1064(%rsp), %rdi
				movl	$29, %ecx
				movl	$0, %eax
				rep stosq
				movb	$10, 1040(%rsp)
				movq	1040(%rsp), %rax
				movq	1048(%rsp), %rdx
				movq	%rax, 16(%rsp)
				movq	%rdx, 24(%rsp)
				movdqa	1056(%rsp), %xmm4
				movaps	%xmm4, 32(%rsp)
				movdqa	1072(%rsp), %xmm5
				movaps	%xmm5, 48(%rsp)
				movdqa	1088(%rsp), %xmm6
				movaps	%xmm6, 64(%rsp)
				movdqa	1104(%rsp), %xmm7
				movaps	%xmm7, 80(%rsp)
				movdqa	1120(%rsp), %xmm4
				movaps	%xmm4, 96(%rsp)
				movdqa	1136(%rsp), %xmm5
				movaps	%xmm5, 112(%rsp)
				movdqa	1152(%rsp), %xmm6
				movaps	%xmm6, 128(%rsp)
				movdqa	1168(%rsp), %xmm7
				movaps	%xmm7, 144(%rsp)
				movdqa	1184(%rsp), %xmm4
				movaps	%xmm4, 160(%rsp)
				movdqa	1200(%rsp), %xmm5
				movaps	%xmm5, 176(%rsp)
				movq	1216(%rsp), %r13
				movq	1224(%rsp), %r14
				movq	%r13, 192(%rsp)
				movq	%r14, 200(%rsp)
				movq	1232(%rsp), %rsi
				movq	1240(%rsp), %rdi
				movq	%rsi, 208(%rsp)
				movq	%rdi, 216(%rsp)
				movq	1248(%rsp), %r9
				movq	1256(%rsp), %r10
				movq	%r9, 224(%rsp)
				movq	%r10, 232(%rsp)
				movq	1264(%rsp), %rcx
				movq	1272(%rsp), %rbx
				movq	%rcx, 240(%rsp)
				movq	%rbx, 248(%rsp)
				movq	1280(%rsp), %r11
				movq	1288(%rsp), %r12
				movq	%r11, 256(%rsp)
				movq	%r12, 264(%rsp)
		.LVL2:
				movb	$10, 16(%rsp)
				movq	16(%rsp), %rax
				movq	24(%rsp), %rdx
				movq	%rax, 1040(%rsp)
				movq	%rdx, 1048(%rsp)
		.LBE18:
		.LBB19:
		.LBB20:
				pushq	%r12
				pushq	%r11
				pushq	%rbx
				pushq	%rcx
				pushq	%r10
				pushq	%r9
				pushq	%rdi
				pushq	%rsi
				pushq	%r14
				pushq	%r13
				pushq	1288(%rsp)
				pushq	1288(%rsp)
				pushq	1288(%rsp)
				pushq	1288(%rsp)
				pushq	1288(%rsp)
				pushq	1288(%rsp)
				pushq	1288(%rsp)
				pushq	1288(%rsp)
				pushq	1288(%rsp)
				pushq	1288(%rsp)
				pushq	1288(%rsp)
				pushq	1288(%rsp)
				pushq	1288(%rsp)
				pushq	1288(%rsp)
				pushq	1288(%rsp)
				pushq	1288(%rsp)
				pushq	1288(%rsp)
				pushq	1288(%rsp)
				pushq	1288(%rsp)
				pushq	1288(%rsp)
				pushq	%rdx
				pushq	%rax
				movl	$1, %edi
				call	_imp_openinput@PLT
		.LVL3:
		.LBE20:
		.LBE19:
		.LBB21:
		.LBB22:
				movl	$1, _imp_InStream(%rip)
				movq	296+_imp_infile(%rip), %rax
				movq	%rax, _imp_InFile(%rip)
				addq	$256, %rsp
				leaq	__PRETTY_FUNCTION__.5987(%rip), %rdi
				call	check_instream@PLT
		.LVL4:
		.LBE22:
		.LBE21:
   15   select input(1)
   16
   17   read(rounds)
				leaq	12(%rsp), %rdi
				call	_imp_readint@PLT
		.LVL5:
		.LBB23:
		.LBB24:
				call	_imp_closeinput@PLT
		.LVL6:
		.LBE24:
		.LBE23:
   18
   19   close input;                   ! close file
   20
   21   rounds = rounds + 2;           ! do this outside the loop
				movl	12(%rsp), %ebx
				leal	2(%rbx), %r12d
				movl	%r12d, 12(%rsp)
		.LVL7:
		.LBB25:
   22
   23   %for i=2, 1, rounds %cycle
   24     %long %real x = -1.0 + 2.0 * (i & 1); ! allows vectorization
   25     pi = pi + (x / (2 * i - 1)); ! double / unsigned = double
				testl	%ebx, %ebx
				js	.L13
		.L2:
		.LVL8:
				movapd	%xmm0, %xmm3
		.LVL9:
		.L7:
				movl	%edx, %eax
				andl	$1, %eax
				pxor	%xmm1, %xmm1
				cvtsi2sd	%eax, %xmm1
				addsd	%xmm1, %xmm1
				subsd	%xmm3, %xmm1
				pxor	%xmm2, %xmm2
				cvtsi2sd	%ecx, %xmm2
				divsd	%xmm2, %xmm1
				addsd	%xmm1, %xmm0
		.LVL11:
		.LDL1:
				addl	$2, %ecx
				leaq	528(%rsp), %rdi
				leaq	.LC1(%rip), %rsi
				call	_imp_c2istr@PLT
		.LVL17:
				movl	_imp_current_line(%rip), %r13d
				testl	%r13d, %r13d
				jne	.L3
				movl	$25, %r13d
		.L3:
				movq	_imp_current_file(%rip), %rsi
				testq	%rsi, %rsi
				je	.L4
				leaq	784(%rsp), %rdi
				call	_imp_c2istr@PLT
		.LVL18:
		.L5:
				subq	$256, %rsp
				leaq	784(%rsp), %rsi
				movl	$32, %ecx
				movq	%rsp, %rdi
				rep movsq
				subq	$256, %rsp
				leaq	1296(%rsp), %rsi
				movl	$32, %ecx
				movq	%rsp, %rdi
				rep movsq
				movl	$1, %edx
				movl	$5, %esi
				movl	%r13d, %edi
				call	_signal_event@PLT
		.LVL19:
				addq	$512, %rsp
				jmp	.L2
		.L4:
		.LVL20:
		.LBB26:
				movabsq	$8603403804667503988, %rax
				movabsq	$8388357149908364335, %rdx
				movq	%rax, 785(%rsp)
				movq	%rdx, 793(%rsp)
				movabsq	$482871946874, %rax
				movl	$0, %edx
				movq	%rax, 801(%rsp)
				movq	%rdx, 809(%rsp)
				leaq	817(%rsp), %rdi
				movl	$223, %ecx
				movl	$0, %eax
				rep stosb
				movb	$21, 784(%rsp)
				leaq	272(%rsp), %rdi
				leaq	784(%rsp), %rsi
				movl	$32, %ecx
				rep movsq
		.LVL21:
		.LBE26:
				movb	$21, 272(%rsp)
				leaq	784(%rsp), %rdi
				leaq	272(%rsp), %rsi
				movl	$32, %ecx
				rep movsq
				jmp	.L5
		.LVL22:
		.L10:
		.LBE34:
   26   %repeat
				movl	$1, %edx
		.LBE25:
   27
   28   pi = pi * 4
				cmpl	$1, %r12d
				je	.L10
				leal	2(%rbx), %esi
				movl	$3, %ecx
				cmpl	%edx, %esi
				jne	.L7
		.LVL12:
		.L6:
		.LBE27:
				mulsd	.LC2(%rip), %xmm0
		.LVL13:
		.LBB28:
		.LBB29:
				movl	$16, %edi
				call	_imp_printfl@PLT
		.LVL14:
		.LBE29:
		.LBE28:
		.LBB30:
		.LBB31:
				call	_imp_newline@PLT
		.LVL15:
		.LBE31:
		.LBE30:
		.LBB32:
		.LBB33:
				movl	$0, %edi
				call	exit@PLT
		.LVL16:
		.L13:
		.LBE33:
		.LBE32:
		.LBB34:
   29   print fl(pi, 16);              ! print 16 decimal digits of pi
				addl	$1, %edx
		.LVL10:
   30   newline
   31
   32 %endofprogram
   18 Statements compiled
