         Edinburgh IMP77 Compiler - Version 8.4
    1 %begin
				NO_APP
		.Ltext0:
				.align	2
		ACKERMANN.5988:
		.LFB186:
		.LVL4:
		 		link.w %fp,#-1024
		 		movem.l #15932,-(%sp)
    2   %integer %function ackermann(%integer m,n)
		.LVL0:
		 		link.w %fp,#0
		 		move.l %a3,-(%sp)
		 		move.l %a2,-(%sp)
		 		move.l 8(%fp),%a2
		 		move.l 12(%fp),-(%sp)
		 		move.l 8(%fp),-(%sp)
		 		jsr _imp_initialise
		.LVL5:
    3     %result = n+1 %if m = 0
		 		tst.l %a2
		 		jeq .L5
		.L2:
    4     %result = ackermann(m-1,1) %if n = 0
		 		tst.l 12(%fp)
		 		jeq .L6
		.L4:
		 		move.l 12(%fp),%d0
		 		addq.l #1,%d0
		.L1:
    5     %result = ackermann(m-1,ackermann(m,n-1))
		 		move.l 12(%fp),%a0
		 		pea -1(%a0)
		 		move.l %a2,-(%sp)
		 		lea ACKERMANN.5988,%a3
		 		jsr (%a3)
		.LVL1:
		 		addq.l #8,%sp
		 		move.l %d0,-(%sp)
		 		pea -1(%a2)
		 		jsr (%a3)
		.LVL2:
		 		addq.l #8,%sp
		 		jra .L1
		.L5:
		 		pea 1.w
		 		pea -1(%a2)
		 		jsr ACKERMANN.5988
		.LVL3:
		 		addq.l #8,%sp
		 		jra .L1
		.LFE186:
				.section	.rodata
		.LC0:
		 		.byte	15
		 		.string	"Wrong result!  "
		 		.zero	239
		.LC1:
		 		.byte	5
		 		.string	"Done."
		 		.zero	249
				.align	2
				.globl	main
		main:
		.LFB185:
    6   %end
		 		move.l -8(%fp),%a2
		 		move.l -4(%fp),%a3
		 		unlk %fp
		 		rts
		.L6:
    7
    8   %owninteger i,j,k,k1,t1,t2
    9
   10   k = 16;  k1 = 1
		 		moveq #16,%d0
		 		move.l %d0,K.5994
   11   %for i = 1,1,6 %cycle
		 		moveq #1,%d1
		 		move.l %d1,K1.5995
		 		addq.l #8,%sp
   12     t1 = cputime            ;! cputime is in clocks_per_tick which is 1000000
		 		move.l %d0,T1.5996
   13     j = ackermann(3,i)
		 		lea ACKERMANN.5988,%a5
		.LBB27:
		 		move.l I.5992,-(%sp)
		 		pea 3.w
		 		jsr (%a5)
		.LVL20:
		 		addq.l #8,%sp
		 		move.l %d0,J.5993
		.LBB42:
		.LBB43:
		 		jsr (%a3)
		.LVL21:
		.LBE43:
		.LBE42:
   14     t2 = cputime
		 		clr.l %d0
		.LBB24:
		.LBB25:
		 		lea _imp_cputime,%a3
		.LBE25:
		.LBE24:
		 		move.l I.5992,%d0
		 		moveq #6,%d1
		 		cmp.l %d0,%d1
		 		jeq .L12
		.L9:
		 		move.l %d0,T2.5997
   15     %if j # k-3 %then printstring("Wrong result!  ") %and newline
		 		addq.l #1,%d0
		 		move.l %d0,I.5992
		.LBB41:
		.LBB26:
		 		jsr (%a3)
		.LVL19:
		.LBE26:
		.LBE41:
		 		move.l K.5994,%d0
		 		subq.l #3,%d0
		 		cmp.l J.5993,%d0
		 		jeq .L8
		.LBB44:
   16     print((t2-t1){/1000},7,3)
		 		move.l %fp,%d4
		.LVL6:
		 		add.l #-256,%d4
		.LVL7:
		 		move.l %fp,%d3
		.LVL8:
		 		add.l #-1024,%d3
		.LVL9:
		 		move.l %fp,%d2
		.LVL10:
		 		add.l #-512,%d2
		.LVL11:
		.LBE27:
		.LBB28:
		.LBB29:
		 		lea _imp_newline,%a4
		 		jra .L9
		.L8:
		.LVL12:
		.LBE29:
		.LBE28:
		.LBB31:
		.LBB32:
		 		pea 3.w
		 		pea 7.w
		.LBE32:
		.LBE31:
		 		move.l T2.5997,%d0
		 		sub.l T1.5996,%d0
		.LBB34:
		.LBB33:
		 		fmove.l %d0,%fp0
		.LVL13:
		 		fmove.d %fp0,-(%sp)
		 		lea _imp_print,%a2
		 		jsr (%a2)
		.LVL14:
		.LBE33:
		.LBE34:
		.LBB35:
		.LBB36:
		 		pea 3.w
		 		pea 7.w
		.LBE36:
		.LBE35:
		 		move.l #256,%d5
		 		move.l %d5,-(%sp)
		 		pea .LC0
		 		move.l %d4,-(%sp)
		 		lea memcpy,%a2
		 		jsr (%a2)
		.LVL22:
		 		move.l %d5,-(%sp)
		 		move.l %d4,-(%sp)
		 		move.l %d3,-(%sp)
		 		jsr (%a2)
		.LVL23:
		 		move.l %d5,-(%sp)
		 		move.l %d3,-(%sp)
		 		move.l %d2,-(%sp)
		 		jsr (%a2)
		.LVL24:
		.LBE44:
		.LBB45:
		.LBB46:
		 		lea (-220,%sp),%sp
		 		move.l %sp,%d0
		 		move.l %d5,-(%sp)
		 		move.l %d2,-(%sp)
		 		move.l %d0,-(%sp)
		 		jsr (%a2)
		.LVL25:
		 		lea (12,%sp),%sp
		 		jsr _imp_printstring
		.LVL26:
		.LBE46:
		.LBE45:
		.LBB47:
		.LBB30:
		 		add.l %d5,%sp
		 		jsr (%a4)
		.LVL27:
		 		jra .L8
		.L12:
		.L10:
		.LBE30:
		.LBE47:
		.LBB48:
   17     print(3000*(t2-t1)/(512*k1-15*k+9*i+37),7,3)
		 		move.l T2.5997,%d1
		 		sub.l T1.5996,%d1
		 		move.l %d1,%d0
		 		add.l %d0,%d0
		 		add.l %d1,%d0
		 		lsl.l #4,%d0
		 		sub.l %d1,%d0
		 		lsl.l #3,%d0
		 		sub.l %d1,%d0
		 		lsl.l #3,%d0
		 		move.l K1.5995,%d1
		 		moveq #9,%d5
		 		lsl.l %d5,%d1
		.LVL15:
		 		move.l K.5994,%d5
		 		move.l %d5,%d6
		 		lsl.l #4,%d6
		 		sub.l %d6,%d5
		 		move.l %d1,%a0
		 		add.l %d5,%a0
		 		move.l I.5992,%d5
		 		move.l %d5,%d1
		.LVL16:
		 		lsl.l #3,%d1
		 		move.l %d1,%a1
		 		add.l %d5,%a1
		 		lea 37(%a0,%a1.l),%a1
		 		move.l %a1,%d1
		 		divs.l %d1,%d0
		.LBB38:
		.LBB37:
		 		fmove.l %d0,%fp0
		 		fmove.d %fp0,-(%sp)
		 		jsr (%a2)
		.LVL17:
		.LBE37:
		.LBE38:
		.LBB39:
		.LBB40:
		 		lea (32,%sp),%sp
		 		jsr (%a4)
		.LVL18:
		.LBE40:
		.LBE39:
   18     newline
   19     k1 = 4*k1;  k = 2*k
		 		move.l K1.5995,%d0
		 		lsl.l #2,%d0
		 		move.l %d0,K1.5995
   20   %repeat
		 		move.l K.5994,%d0
		 		add.l %d0,%d0
		 		move.l %d0,K.5994
		.LDL1:
   21   printstring("Done."); newline
		 		move.l %fp,%d2
		.LVL28:
		 		add.l #-256,%d2
		.LVL29:
		 		move.l #256,%d3
		.LVL30:
		 		move.l %d3,-(%sp)
		 		pea .LC1
		 		move.l %d2,-(%sp)
		 		lea memcpy,%a2
		 		jsr (%a2)
		.LVL31:
		 		move.l %fp,%d4
		.LVL32:
		 		add.l #-768,%d4
		.LVL33:
		 		move.l %d3,-(%sp)
		 		move.l %d2,-(%sp)
		 		move.l %d4,-(%sp)
		 		jsr (%a2)
		.LVL34:
		 		move.l %d3,-(%sp)
		 		move.l %d4,-(%sp)
		 		move.l %d2,-(%sp)
		 		jsr (%a2)
		.LVL35:
		.LBE48:
		.LBB49:
		.LBB50:
		 		lea (-220,%sp),%sp
		 		move.l %sp,%d0
		 		move.l %d3,-(%sp)
		 		move.l %d2,-(%sp)
		 		move.l %d0,-(%sp)
		 		jsr (%a2)
		.LVL36:
		 		lea (12,%sp),%sp
		 		jsr _imp_printstring
		.LVL37:
		.LBE50:
		.LBE49:
		.LBB51:
		.LBB52:
		 		add.l %d3,%sp
		 		jsr _imp_newline
		.LVL38:
		.LBE52:
		.LBE51:
		.LBB53:
		.LBB54:
		 		clr.l -(%sp)
		 		jsr exit
		.LVL39:
		.LBE54:
		.LBE53:
		.LFE185:
				.comm	T2.5997,4,2
				.comm	J.5993,4,2
				.comm	T1.5996,4,2
				.comm	I.5992,4,2
				.comm	K1.5995,4,2
				.comm	K.5994,4,2
		.Letext0:
   22 %endofprogram
   23 Statements compiled
