         Edinburgh IMP77 Compiler - Version 8.4
    1 %begin
				.section	".text"
		.Ltext0:
				.section	".rodata"
		.LC0:
				.byte	3
				.asciz	"d2("
				.skip	251
		.LC1:
				.byte	2
				.asciz	", "
				.skip	252
		.LC2:
				.byte	4
				.asciz	") = "
				.skip	250
		.LC3:
				.byte	3
				.asciz	",  "
				.skip	251
				.section	".text"
				.align 4
				.global main
				.proc	04
		main:
		.LFB185:
				.register	%g2, #scratch
				.register	%g3, #scratch
				.register	%g7, #ignore
		.LVL0:
				save	%sp, -4096, %sp
		.LVL1:
				add	%sp, -720, %sp
				ldx	[%g7+40], %g1
				stx	%g1, [%fp+2039]
				mov	0, %g1
    2   ! It would appear that Imp and C do not store their arrays in the same x-major order.
				mov	%i1, %o1
				call	_imp_initialise, 0
				 mov	%i0, %o0
		.LVL2:
    3   %integerarray d2(0:1, 0:2)
    4   %ownintegerarray d1(0:5) = 0,1,2,3,4,5
    5   %integername d, e
    6   %integer i,j
    7   d == d2(0,0);            e == d1(0);              d = e;
    8   d == INTEGER(addr(d)+4); e == INTEGER(ADDR(e)+4); d = e
    9   d == INTEGER(addr(d)+4); e == INTEGER(ADDR(e)+4); d = e
				sethi	%hi(4096), %g1
				xor	%g1, -288, %g1
				sethi	%hi(D1.6057), %g2
				lduw	[%g2+%lo(D1.6057)], %g3
				add	%fp, 2047, %g4
				st	%g3, [%g4+%g1]
		.LVL3:
		.LBB76:
		.LBB77:
				add	%g4, %g1, %g1
		.LVL4:
		.LBE77:
		.LBE76:
   10   d == INTEGER(addr(d)+4); e == INTEGER(ADDR(e)+4); d = e
				lduw	[%g2+%lo(D1.6057)+4], %g3
				st	%g3, [%g1+4]
   11   d == INTEGER(addr(d)+4); e == INTEGER(ADDR(e)+4); d = e
				lduw	[%g2+%lo(D1.6057)+8], %g3
				st	%g3, [%g1+8]
   12   d == INTEGER(addr(d)+4); e == INTEGER(ADDR(e)+4); d = e
				lduw	[%g2+%lo(D1.6057)+12], %g3
				st	%g3, [%g1+12]
   13   %for i = 0, 1, 1 %cycle
				lduw	[%g2+%lo(D1.6057)+16], %g3
				st	%g3, [%g1+16]
   14     %for j = 0, 1, 2 %cycle
				lduw	[%g2+%lo(D1.6057)+20], %g2
				st	%g2, [%g1+20]
		.LVL5:
				mov	%g1, %l0
				mov	%g1, %l1
				mov	-1, %i0
		.LBB78:
   15       printstring("d2(");write(i,0);printstring(", ");write(j,0);printstring(") = "); write(d2(i,j),0);printstring(",  ");
				sethi	%hi(.LC0), %l4
				or	%l4, %lo(.LC0), %l4
				sethi	%hi(4096), %i2
				xor	%i2, -264, %i1
		.LVL6:
				add	%g4, %i1, %i1
		.LBE78:
		.LBB79:
		.LBB80:
				xor	%i2, -544, %i5
				add	%g4, %i5, %i5
		.LBE80:
		.LBE79:
		.LBB82:
				mov	-1, %i4
		.LVL9:
		.L2:
				mov	256, %o2
				mov	%l4, %o1
				call	memcpy, 0
				 add	%fp, 1783, %o0
		.LVL11:
				mov	256, %o2
				add	%fp, 1783, %o1
				call	memcpy, 0
				 mov	%i1, %o0
		.LVL12:
				mov	256, %o2
				mov	%i1, %o1
				call	memcpy, 0
				 add	%fp, 759, %o0
		.LVL13:
		.LBE85:
		.LBB86:
		.LBB81:
				mov	256, %o2
				add	%fp, 759, %o1
				call	memcpy, 0
				 mov	%i5, %o0
		.LVL14:
				call	_imp_printstring, 0
				 mov	%i5, %o0
		.LVL15:
		.LBE81:
		.LBE86:
   16     %repeat
				mov	0, %o1
				call	_imp_writeint, 0
				 sra	%i0, 0, %o0
		.LVL16:
		.LBB87:
				cmp	%i0, 1
				bne,a,pt %icc, .L17
				 add	%i0, 1, %i0
		.L5:
		.LBB98:
		.LBB99:
				call	_imp_newline, 0
				 mov	-1, %i2
		.LVL35:
		.LBE99:
		.LBE98:
		.LBB100:
   17     newline
				sethi	%hi(.LC1), %l3
				or	%l3, %lo(.LC1), %l3
				xor	%i2, -8, %i2
				add	%g4, %i2, %i2
		.LBE82:
		.LBB83:
				add	%i0, 1, %i0
		.LVL8:
		.L17:
				mov	%l1, %i3
				mov	256, %o2
				mov	%l3, %o1
				call	memcpy, 0
				 add	%fp, 1783, %o0
		.LVL17:
				mov	256, %o2
				add	%fp, 1783, %o1
				call	memcpy, 0
				 mov	%i2, %o0
		.LVL18:
				mov	256, %o2
				mov	%i2, %o1
				call	memcpy, 0
				 add	%fp, 503, %o0
		.LVL19:
		.LBE87:
		.LBB88:
		.LBB89:
				mov	256, %o2
				add	%fp, 503, %o1
				call	memcpy, 0
				 mov	%i5, %o0
		.LVL20:
				call	_imp_printstring, 0
				 mov	%i5, %o0
		.LVL21:
		.LBE89:
		.LBE88:
				cmp	%i4, 2
				bne,pt	%icc, .L2
				 add	%i3, 4, %i3
		.L3:
		.LBB96:
		.LBB97:
				call	_imp_newline, 0
				 add	%l1, 12, %l1
		.LVL34:
		.LDL2:
		.LBE97:
		.LBE96:
   18   %repeat
				add	%i4, 1, %i4
		.LVL10:
		.LBB85:
				mov	0, %o1
				call	_imp_writeint, 0
				 sra	%i4, 0, %o0
		.LVL22:
		.LBB90:
   19   newline
				sethi	%hi(.LC2), %l5
				or	%l5, %lo(.LC2), %l5
		.LBE83:
		.LBB84:
				mov	256, %o2
				mov	%l5, %o1
				call	memcpy, 0
				 add	%fp, 1783, %o0
		.LVL23:
				mov	256, %o2
				add	%fp, 1783, %o1
				call	memcpy, 0
				 add	%fp, -1801, %o0
		.LVL24:
				mov	256, %o2
				add	%fp, -1801, %o1
				call	memcpy, 0
				 add	%fp, 247, %o0
		.LVL25:
		.LBE90:
		.LBB91:
		.LBB92:
				mov	256, %o2
				add	%fp, 247, %o1
				call	memcpy, 0
				 mov	%i5, %o0
		.LVL26:
				call	_imp_printstring, 0
				 mov	%i5, %o0
		.LVL27:
		.LBE92:
		.LBE91:
   20   %for i = 0, 1, 2 %cycle
				mov	0, %o1
				call	_imp_writeint, 0
				 ldsw	[%i3], %o0
		.LVL28:
		.LBB93:
				mov	256, %o2
				mov	%l2, %o1
				call	memcpy, 0
				 add	%fp, 1783, %o0
		.LVL29:
				mov	256, %o2
				add	%fp, 1783, %o1
				call	memcpy, 0
				 add	%fp, -1545, %o0
		.LVL30:
				mov	256, %o2
				add	%fp, -1545, %o1
				call	memcpy, 0
				 add	%fp, -9, %o0
		.LVL31:
		.LBE93:
		.LBB94:
		.LBB95:
				mov	256, %o2
				add	%fp, -9, %o1
				call	memcpy, 0
				 mov	%i5, %o0
		.LVL32:
				call	_imp_printstring, 0
				 mov	%i5, %o0
		.LVL33:
		.LDL1:
		.LBE95:
		.LBE94:
   21     %for j = 0, 1, 1 %cycle
				sethi	%hi(.LC3), %l2
				or	%l2, %lo(.LC3), %l2
		.LVL7:
		.LBE84:
   22       printstring("d2(");write(j,0);printstring(", ");write(i,0);printstring(") = "); write(d2(j,i),0);printstring(",  ");
				sethi	%hi(.LC0), %l2
				or	%l2, %lo(.LC0), %l2
		.LBE100:
		.LBB101:
		.LBB102:
				sethi	%hi(4096), %i5
				xor	%i5, -544, %i5
				add	%fp, 2047, %g1
				add	%g1, %i5, %i5
		.LBE102:
		.LBE101:
		.LBB104:
				mov	-1, %i4
		.LVL40:
		.L6:
				mov	256, %o2
				mov	%l2, %o1
				call	memcpy, 0
				 add	%fp, -521, %o0
		.LVL42:
				mov	256, %o2
				add	%fp, -521, %o1
				call	memcpy, 0
				 add	%fp, -1289, %o0
		.LVL43:
				mov	256, %o2
				add	%fp, -1289, %o1
				call	memcpy, 0
				 add	%fp, 1783, %o0
		.LVL44:
		.LBE109:
		.LBB110:
		.LBB103:
				mov	256, %o2
				add	%fp, 1783, %o1
				call	memcpy, 0
				 mov	%i5, %o0
		.LVL45:
				call	_imp_printstring, 0
				 mov	%i5, %o0
		.LVL46:
		.LBE103:
		.LBE110:
   23     %repeat
				cmp	%i2, 2
				be,pn	%icc, .L15
				 nop
		.LVL38:
		.L8:
				mov	0, %o1
				call	_imp_writeint, 0
				 sra	%i4, 0, %o0
		.LVL47:
		.LBB111:
   24     newline
				sethi	%hi(.LC1), %l1
				or	%l1, %lo(.LC1), %l1
		.LBE104:
		.LBB105:
				add	%i2, 1, %i2
		.LVL39:
				mov	%l0, %i3
				mov	256, %o2
				mov	%l1, %o1
				call	memcpy, 0
				 add	%fp, -521, %o0
		.LVL48:
				mov	256, %o2
				add	%fp, -521, %o1
				call	memcpy, 0
				 add	%fp, -1033, %o0
		.LVL49:
				mov	256, %o2
				add	%fp, -1033, %o1
				call	memcpy, 0
				 add	%fp, 1527, %o0
		.LVL50:
		.LBE111:
		.LBB112:
		.LBB113:
				mov	256, %o2
				add	%fp, 1527, %o1
				call	memcpy, 0
				 mov	%i5, %o0
		.LVL51:
				call	_imp_printstring, 0
				 mov	%i5, %o0
		.LVL52:
		.LBE113:
		.LBE112:
				cmp	%i4, 1
				bne,pt	%icc, .L6
				 add	%i3, 12, %i3
   25   %repeat
				add	%i4, 1, %i4
		.LVL41:
		.LBB109:
				mov	0, %o1
				call	_imp_writeint, 0
				 sra	%i2, 0, %o0
		.LVL53:
		.LBB114:
   26   newline
				sethi	%hi(.LC2), %i0
				or	%i0, %lo(.LC2), %i0
		.LBE105:
		.LBB106:
				mov	256, %o2
				mov	%i0, %o1
				call	memcpy, 0
				 add	%fp, -521, %o0
		.LVL54:
				mov	256, %o2
				add	%fp, -521, %o1
				call	memcpy, 0
				 add	%fp, -777, %o0
		.LVL55:
				mov	256, %o2
				add	%fp, -777, %o1
				call	memcpy, 0
				 add	%fp, 1271, %o0
		.LVL56:
		.LBE114:
		.LBB115:
		.LBB116:
				mov	256, %o2
				add	%fp, 1271, %o1
				call	memcpy, 0
				 mov	%i5, %o0
		.LVL57:
				call	_imp_printstring, 0
				 mov	%i5, %o0
		.LVL58:
		.LBE116:
		.LBE115:
				ba,pt	%xcc, .L16
				 nop
		.L15:
		.L9:
		.LBB120:
		.LBB121:
				call	_imp_newline, 0
				 nop
		.LVL65:
		.LBE121:
		.LBE120:
		.LBB122:
		.LBB123:
				call	exit, 0
				 mov	0, %o0
		.LVL66:
		.LBE123:
		.LBE122:
				nop
		.LFE185:
				.section	".data"
				.align 4
		D1.6057:
				.long	0
				.long	1
				.long	2
				.long	3
				.long	4
				.long	5
				.section	".text"
		.Letext0:
   27 %endofprogram
				mov	0, %o1
				call	_imp_writeint, 0
				 ldsw	[%i3], %o0
		.LVL59:
		.LBB117:
				mov	256, %o2
				mov	%i1, %o1
				call	memcpy, 0
				 add	%fp, -521, %o0
		.LVL60:
				mov	256, %o2
				add	%fp, -521, %o1
				call	memcpy, 0
				 add	%fp, -265, %o0
		.LVL61:
				mov	256, %o2
				add	%fp, -265, %o1
				call	memcpy, 0
				 add	%fp, 1015, %o0
		.LVL62:
		.LBE117:
		.LBB118:
		.LBB119:
				mov	256, %o2
				add	%fp, 1015, %o1
				call	memcpy, 0
				 mov	%i5, %o0
		.LVL63:
				call	_imp_printstring, 0
				 mov	%i5, %o0
		.LVL64:
		.LDL4:
		.LBE119:
		.LBE118:
   50 Statements compiled
				sethi	%hi(.LC3), %i1
		.LBE106:
				ba,pt	%xcc, .L8
				 or	%i1, %lo(.LC3), %i1
		.LVL36:
		.L16:
		.L7:
		.LBB107:
		.LBB108:
				call	_imp_newline, 0
				 add	%l0, 4, %l0
		.LVL37:
		.LDL3:
		.LBE108:
		.LBE107:
