         Edinburgh IMP77 Compiler - Version 8.4
    1 %begin
				.option nopic
		.Ltext0:
				.align	1
		P2.6011:
		.LFB187:
		.LVL24:
				add	sp,sp,-1328
				sd	ra,1320(sp)
				sd	s0,1312(sp)
				sd	s1,1304(sp)
				lui	a5,%hi(__stack_chk_guard)
				ld	a5,%lo(__stack_chk_guard)(a5)
				sd	a5,1288(sp)
    2   %string(255) s
				call	_imp_initialise
		.LVL25:
    3   %integer n
    4
    5   %routine p1 (%string(*)%name k)
		.LVL12:
				add	sp,sp,-1312
				sd	ra,1304(sp)
				sd	s0,1296(sp)
				lui	s0,%hi(__stack_chk_guard)
				ld	a5,%lo(__stack_chk_guard)(s0)
				sd	a5,1288(sp)
		.LBB30:
    6     print string("p1: ")
				li	a2,256
				lui	a1,%hi(.LANCHOR0+256)
				addi	a1,a1,%lo(.LANCHOR0+256)
				add	a0,sp,1032
		.LVL13:
				call	memcpy
		.LVL14:
				li	a2,256
				add	a1,sp,1032
				add	a0,sp,264
				call	memcpy
		.LVL15:
				li	a2,256
				add	a1,sp,264
				add	a0,sp,1032
				call	memcpy
		.LVL16:
		.LBE30:
		.LBB31:
		.LBB32:
				li	a2,256
				add	a1,sp,1032
				mv	a0,sp
				call	memcpy
		.LVL17:
				mv	a0,sp
				call	_imp_printstring
		.LVL18:
				li	a2,256
				add	a1,sp,520
				add	a0,sp,776
				call	memcpy
		.LVL19:
		.LBE32:
		.LBE31:
		.LBB33:
		.LBB34:
				li	a2,256
				add	a1,sp,776
				mv	a0,sp
				call	memcpy
		.LVL20:
				mv	a0,sp
				call	_imp_printstring
		.LVL21:
		.LBE34:
		.LBE33:
		.LBB35:
		.LBB36:
				call	_imp_newline
		.LVL22:
		.LBE36:
		.LBE35:
    7     print string(k)
    8     newline
    9   %end
   10
				ld	a4,1288(sp)
				ld	a5,%lo(__stack_chk_guard)(s0)
				bne	a4,a5,.L8
				ld	ra,1304(sp)
				ld	s0,1296(sp)
				add	sp,sp,1312
				jr	ra
		.L8:
				call	__stack_chk_fail
		.LVL23:
		.LFE186:
				.align	1
				.globl	main
		main:
		.LFB185:
   11   %routine p2 (%string(*)%name k)
		.LVL0:
				add	sp,sp,-1312
				sd	ra,1304(sp)
				sd	s0,1296(sp)
				lui	s0,%hi(__stack_chk_guard)
				ld	a5,%lo(__stack_chk_guard)(s0)
				sd	a5,1288(sp)
		.LBB23:
   12     print string("p2: ")
				li	a2,256
				lui	a1,%hi(.LANCHOR0)
				addi	a1,a1,%lo(.LANCHOR0)
				add	a0,sp,1032
		.LVL1:
				call	memcpy
		.LVL2:
				li	a2,256
				add	a1,sp,1032
				add	a0,sp,264
				call	memcpy
		.LVL3:
				li	a2,256
				add	a1,sp,264
				add	a0,sp,1032
				call	memcpy
		.LVL4:
		.LBE23:
		.LBB24:
		.LBB25:
				li	a2,256
				add	a1,sp,1032
				mv	a0,sp
				call	memcpy
		.LVL5:
				mv	a0,sp
				call	_imp_printstring
		.LVL6:
				li	a2,256
				add	a1,sp,520
				add	a0,sp,776
				call	memcpy
		.LVL7:
		.LBE25:
		.LBE24:
		.LBB26:
		.LBB27:
				li	a2,256
				add	a1,sp,776
				mv	a0,sp
				call	memcpy
		.LVL8:
				mv	a0,sp
				call	_imp_printstring
		.LVL9:
		.LBE27:
		.LBE26:
		.LBB28:
		.LBB29:
				call	_imp_newline
		.LVL10:
		.LBE29:
		.LBE28:
   13     print string(k)
   14     newline
   15   %end
   16
				ld	a4,1288(sp)
				ld	a5,%lo(__stack_chk_guard)(s0)
				bne	a4,a5,.L4
				ld	ra,1304(sp)
				ld	s0,1296(sp)
				add	sp,sp,1312
				jr	ra
		.L4:
				call	__stack_chk_fail
		.LVL11:
		.LFE187:
				.align	1
		P1.6004:
		.LFB186:
   17   %routine pass (%routine p (%string(*)%name k), %string(*)%name k)
   18     p(k)
				add	a0,sp,264
		.LVL27:
				call	P1.6004
		.LVL28:
		.L12:
		.LBE48:
		.LBE47:
		.LBB49:
				li	a2,256
				mv	a1,s0
				add	a0,sp,520
				call	memcpy
		.LVL29:
				li	a2,256
				add	a1,sp,520
				add	a0,sp,776
				call	memcpy
		.LVL30:
				li	a2,256
				add	a1,sp,776
				add	a0,sp,1032
				call	memcpy
		.LVL31:
		.LBE49:
		.LBB50:
		.LBB51:
				li	a2,256
				add	a1,sp,1032
				mv	a0,sp
				call	memcpy
		.LVL32:
				mv	a0,sp
				call	_imp_printstring
		.LVL33:
		.LBE51:
		.LBE50:
		.LBB52:
		.LBB53:
				call	_imp_newline
		.LVL34:
		.L10:
		.LBE53:
		.LBE52:
				add	a0,sp,264
		.LVL38:
				call	P2.6011
		.LVL39:
				j	.L12
		.LBE55:
		.LBE54:
		.LFE185:
				.section	.rodata
				.align	3
				.set	.LANCHOR0,. + 0
		.LC2:
				.byte	4
				.string	"p2: "
				.zero	250
		.LC3:
				.byte	4
				.string	"p1: "
				.zero	250
		.LC1:
				.byte	9
				.string	"test done"
				.zero	245
		.Letext0:
   19   %end
   20
   21   %cycle
   22     read(n)
				add	a0,sp,260
				call	_imp_readint
		.LVL35:
   23     read(s)
				add	a0,sp,264
				call	_imp_readitem
		.LVL36:
   24     %if n = 1 %start
				li	s1,1
		.LBB46:
				lw	a5,260(sp)
				beq	a5,s1,.L15
		.L11:
		.LVL37:
		.LBB54:
		.LBB55:
   25       pass(p1,s)
   26     %else
   27       pass(p2,s)
   28     %finish
   29     print string("test done")
				lui	s0,%hi(.LANCHOR0+512)
				addi	s0,s0,%lo(.LANCHOR0+512)
				j	.L10
		.L15:
		.LVL26:
		.LBE46:
		.LBB47:
		.LBB48:
   30     newline
   31   %repeat
   32
   33 %end
   34 %end %of %file
   29 Statements compiled
