         Edinburgh IMP77 Compiler - Version 8.4
    1 %begin
				.section	".text"
		.Ltext0:
				.align 4
				.proc	04
		ACKERMANN.6058:
		.LFB186:
				.register	%g2, #scratch
				.register	%g3, #scratch
				.register	%g7, #ignore
		.LVL5:
				save	%sp, -1488, %sp
		.LVL6:
				ldx	[%g7+40], %g1
				stx	%g1, [%fp+2039]
				mov	0, %g1
    2   %integer %function ackermann(%integer m,n)
		.LVL0:
				save	%sp, -176, %sp
		.LVL1:
				mov	%i1, %o1
				call	_imp_initialise, 0
				 mov	%i0, %o0
		.LVL7:
    3     %result = n+1 %if m = 0
				brz,pn	%i0, .L3
				 add	%i1, 1, %o0
		.L2:
    4     %result = ackermann(m-1,1) %if n = 0
				brz,pn	%i1, .L5
				 add	%i1, -1, %i1
		.L4:
    5     %result = ackermann(m-1,ackermann(m,n-1))
				sra	%i1, 0, %o1
				call	ACKERMANN.6058, 0
				 mov	%i0, %o0
		.LVL2:
				add	%i0, -1, %i0
				mov	%o0, %o1
				call	ACKERMANN.6058, 0
				 sra	%i0, 0, %o0
		.LVL3:
		.L3:
				add	%i0, -1, %i0
				mov	1, %o1
				call	ACKERMANN.6058, 0
				 sra	%i0, 0, %o0
		.LVL4:
				sra	%o0, 0, %i0
				return	%i7+8
				 nop
		.LFE186:
				.section	".rodata"
		.LC0:
				.byte	15
				.asciz	"Wrong result!  "
				.skip	239
		.LC1:
				.byte	5
				.asciz	"Done."
				.skip	249
				.section	".text"
				.align 4
				.global main
				.proc	04
		main:
		.LFB185:
    6   %end
				sra	%o0, 0, %i0
				return	%i7+8
				 nop
		.L5:
    7
    8   %owninteger i,j,k,k1,t1,t2
    9
   10   k = 16;  k1 = 1
				sethi	%hi(K.6064), %g1
				mov	16, %g2
				st	%g2, [%g1+%lo(K.6064)]
   11   %for i = 1,1,6 %cycle
				sethi	%hi(K1.6065), %g1
				mov	1, %g2
				st	%g2, [%g1+%lo(K1.6065)]
   12     t1 = cputime            ;! cputime is in clocks_per_tick which is 1000000
				sethi	%hi(T1.6066), %i2
				st	%o0, [%i2+%lo(T1.6066)]
   13     j = ackermann(3,i)
				ldsw	[%i4+%lo(I.6062)], %o1
				call	ACKERMANN.6058, 0
				 mov	3, %o0
		.LVL14:
				sethi	%hi(J.6063), %i0
		.LBB33:
		.LBB34:
				call	_imp_cputime, 0
				 st	%o0, [%i0+%lo(J.6063)]
		.LVL15:
		.LBE34:
		.LBE33:
   14     t2 = cputime
				mov	0, %g1
				sethi	%hi(T2.6067), %i3
				sethi	%hi(K.6064), %i5
		.LBB24:
				lduw	[%i4+%lo(I.6062)], %g1
				cmp	%g1, 6
				be,pn	%icc, .L13
				 mov	256, %o2
		.L9:
				st	%o0, [%i3+%lo(T2.6067)]
   15     %if j # k-3 %then printstring("Wrong result!  ") %and newline
				sethi	%hi(I.6062), %i4
				add	%g1, 1, %g1
		.LBB31:
		.LBB32:
				call	_imp_cputime, 0
				 st	%g1, [%i4+%lo(I.6062)]
		.LVL13:
		.LBE32:
		.LBE31:
				lduw	[%i5+%lo(K.6064)], %g1
				add	%g1, -3, %g1
				lduw	[%i0+%lo(J.6063)], %g2
				cmp	%g1, %g2
				be,a,pt	%icc, .L8
				 lduw	[%i3+%lo(T2.6067)], %g1
		.LBB35:
   16     print((t2-t1){/1000},7,3)
				sethi	%hi(.LC0), %i1
		.LVL8:
		.LBE24:
				ba,pt	%xcc, .L9
				 or	%i1, %lo(.LC0), %i1
		.L8:
		.LVL9:
		.L14:
				lduw	[%i2+%lo(T1.6066)], %g2
				sub	%g1, %g2, %g1
				st	%g1, [%fp+743]
				ld	[%fp+743], %f0
		.LBB25:
		.LBB26:
				mov	3, %o2
				mov	7, %o1
				call	_imp_print, 0
				 fitod	%f0, %f0
		.LVL10:
		.LBE26:
		.LBE25:
				mov	256, %o2
				mov	%i1, %o1
				call	memcpy, 0
				 add	%fp, 1783, %o0
		.LVL16:
				mov	256, %o2
				add	%fp, 1783, %o1
				call	memcpy, 0
				 add	%fp, 1015, %o0
		.LVL17:
				mov	256, %o2
				add	%fp, 1015, %o1
				call	memcpy, 0
				 add	%fp, 1527, %o0
		.LVL18:
		.LBE35:
		.LBB36:
		.LBB37:
				mov	256, %o2
				add	%fp, 1527, %o1
				call	memcpy, 0
				 add	%fp, 751, %o0
		.LVL19:
				call	_imp_printstring, 0
				 add	%fp, 751, %o0
		.LVL20:
		.LBE37:
		.LBE36:
		.LBB38:
		.LBB39:
				call	_imp_newline, 0
				 nop
		.LVL21:
		.LBE39:
		.LBE38:
				ba,pt	%xcc, .L14
				 lduw	[%i3+%lo(T2.6067)], %g1
		.L13:
		.L10:
		.LBB40:
   17     print(3000*(t2-t1)/(512*k1-15*k+9*i+37),7,3)
				lduw	[%i3+%lo(T2.6067)], %g2
				lduw	[%i2+%lo(T1.6066)], %g1
				sub	%g2, %g1, %g2
				mulx	%g2, 3000, %g2
				sethi	%hi(K1.6065), %i0
				lduw	[%i0+%lo(K1.6065)], %g1
				sll	%g1, 9, %g1
				lduw	[%i5+%lo(K.6064)], %g3
				sll	%g3, 4, %g4
				sub	%g3, %g4, %g3
				add	%g1, %g3, %g1
				lduw	[%i4+%lo(I.6062)], %g4
				sll	%g4, 3, %g3
				add	%g3, %g4, %g3
				add	%g1, %g3, %g1
				add	%g1, 37, %g1
				sra	%g2, 0, %g2
				sra	%g1, 0, %g1
				sdivx	%g2, %g1, %g1
				stx	%g1, [%fp+743]
				ldd	[%fp+743], %f0
		.LBB27:
		.LBB28:
				mov	3, %o2
				mov	7, %o1
				call	_imp_print, 0
				 fitod	%f1, %f0
		.LVL11:
		.LBE28:
		.LBE27:
		.LBB29:
		.LBB30:
				call	_imp_newline, 0
				 nop
		.LVL12:
		.LBE30:
		.LBE29:
   18     newline
   19     k1 = 4*k1;  k = 2*k
				lduw	[%i0+%lo(K1.6065)], %g1
				sll	%g1, 2, %g1
				st	%g1, [%i0+%lo(K1.6065)]
   20   %repeat
				lduw	[%i5+%lo(K.6064)], %g1
				add	%g1, %g1, %g1
				st	%g1, [%i5+%lo(K.6064)]
		.LDL1:
   21   printstring("Done."); newline
				sethi	%hi(.LC1), %o1
				or	%o1, %lo(.LC1), %o1
				call	memcpy, 0
				 add	%fp, 1783, %o0
		.LVL22:
				mov	256, %o2
				add	%fp, 1783, %o1
				call	memcpy, 0
				 add	%fp, 1271, %o0
		.LVL23:
				mov	256, %o2
				add	%fp, 1271, %o1
				call	memcpy, 0
				 add	%fp, 1783, %o0
		.LVL24:
		.LBE40:
		.LBB41:
		.LBB42:
				mov	256, %o2
				add	%fp, 1783, %o1
				call	memcpy, 0
				 add	%fp, 751, %o0
		.LVL25:
				call	_imp_printstring, 0
				 add	%fp, 751, %o0
		.LVL26:
		.LBE42:
		.LBE41:
		.LBB43:
		.LBB44:
				call	_imp_newline, 0
				 nop
		.LVL27:
		.LBE44:
		.LBE43:
		.LBB45:
		.LBB46:
				call	exit, 0
				 mov	0, %o0
		.LVL28:
		.LBE46:
		.LBE45:
				nop
		.LFE185:
				.common	T2.6067,4,4
				.common	J.6063,4,4
				.common	T1.6066,4,4
				.common	I.6062,4,4
				.common	K1.6065,4,4
				.common	K.6064,4,4
		.Letext0:
   22 %endofprogram
   23 Statements compiled
