         Edinburgh IMP77 Compiler - Version 8.4
    1
				.option nopic
		.Ltext0:
				.align	1
		_imp_SQRT:
		.LFB61:
		.LVL0:
				add	sp,sp,-32
				sd	ra,24(sp)
				fsd	fs0,8(sp)
				fsqrt.d	fs0,fa0
				fmv.d.x	fa5,zero
				frflags	a4
				flt.d	a5,fa0,fa5
				fsflags a4
				bnez	a5,.L4
		.LVL1:
		.L1:
				fmv.d	fa0,fs0
				ld	ra,24(sp)
				fld	fs0,8(sp)
				add	sp,sp,32
				jr	ra
		.LVL2:
		.L4:
				call	sqrt
		.LVL3:
				j	.L1
		.LFE61:
				.align	1
		_imp_SIN:
		.LFB42:
		.LVL4:
				add	sp,sp,-16
				sd	ra,8(sp)
				call	sin
		.LVL5:
				ld	ra,8(sp)
				add	sp,sp,16
				jr	ra
		.LFE42:
				.align	1
		TABULATE.6006:
		.LFB186:
    2 %begin
		.LVL36:
				add	sp,sp,-1312
				sd	ra,1304(sp)
				sd	s0,1296(sp)
				lui	a5,%hi(__stack_chk_guard)
				ld	a5,%lo(__stack_chk_guard)(a5)
				sd	a5,1288(sp)
    3 %routine Tabulate (%longrealfn func(%longreal x),%longreal from,to,
		.LVL6:
				add	sp,sp,-1360
				sd	ra,1352(sp)
				sd	s0,1344(sp)
				sd	s1,1336(sp)
				sd	s2,1328(sp)
				fsd	fs0,1320(sp)
				fsd	fs1,1312(sp)
				fsd	fs2,1304(sp)
				mv	s2,a0
				mv	s1,a1
				lui	a5,%hi(__stack_chk_guard)
				ld	a5,%lo(__stack_chk_guard)(a5)
				sd	a5,1288(sp)
				call	_imp_initialise
		.LVL37:
		.LBB30:
    4    %integer steps)
    5 ! func(x) is the dummy formal function
    6 %real value,inc
    7 %integer i
    8 !
    9 inc=(to-from)/steps
				fsub.d	fs2,fa1,fa0
				fcvt.d.w	fa1,a1
		.LVL7:
				fdiv.d	fs2,fs2,fa1
				fcvt.s.d	fs2,fs2
		.LVL8:
   10 !
   11 value=from
				fcvt.s.d	fs0,fa0
		.LVL9:
		.LBB21:
   12 %for i=0,1,steps %cycle
   13    print(value,4,2) ; print(func(value),10,4) ; newline
				fcvt.d.s	fs1,fs0
		.LVL13:
		.LBB22:
		.LBB23:
				li	a1,2
				li	a0,4
				fmv.d	fa0,fs1
				call	_imp_print
		.LVL14:
		.LBE23:
		.LBE22:
   14    value=value+inc
				bltz	a1,.L18
		.LVL10:
		.L8:
				fmv.d	fa0,fs1
				jalr	s2
		.LVL15:
		.LBB24:
		.LBB25:
				li	a1,4
				li	a0,10
				call	_imp_print
		.LVL16:
		.LBE25:
		.LBE24:
		.LBB26:
		.LBB27:
				call	_imp_newline
		.LVL17:
		.LBE27:
		.LBE26:
				fadd.s	fs0,fs0,fs2
		.LVL18:
				lui	a5,%hi(_imp_current_file)
				ld	a1,%lo(_imp_current_file)(a5)
		.LVL23:
				beqz	a1,.L9
				add	a0,sp,776
		.LVL24:
				call	_imp_c2istr
		.LVL25:
		.L10:
				lui	a5,%hi(_imp_current_line)
				lw	s0,%lo(_imp_current_line)(a5)
				bnez	s0,.L11
				li	s0,14
		.L11:
				lui	a1,%hi(.LC3)
				addi	a1,a1,%lo(.LC3)
				add	a0,sp,1032
				call	_imp_c2istr
		.LVL26:
				li	a2,256
				add	a1,sp,776
				add	a0,sp,256
				call	memcpy
		.LVL27:
				li	a2,256
				add	a1,sp,1032
				mv	a0,sp
				call	memcpy
		.LVL28:
				li	a5,0
				li	a4,1
				li	a3,5
				mv	a2,sp
				mv	a1,s0
				add	a0,sp,256
				call	_signal_event
		.LVL29:
				j	.L8
		.LVL30:
		.L9:
		.LBB28:
				li	a2,256
				lui	a1,%hi(.LANCHOR0)
				addi	a1,a1,%lo(.LANCHOR0)
				add	a0,sp,1032
		.LVL31:
				call	memcpy
		.LVL32:
				li	a2,256
				add	a1,sp,1032
				add	a0,sp,520
				call	memcpy
		.LVL33:
		.LBE28:
				li	a2,256
				add	a1,sp,520
				add	a0,sp,776
				call	memcpy
		.LVL34:
				j	.L10
		.L19:
		.LBE29:
   15 %repeat
   16 %end ;!  of routine tabulate
   17 !
				li	a5,-1
				beq	s1,a5,.L7
				li	s0,-1
		.LVL11:
		.L13:
				bne	s1,s0,.L13
		.L12:
		.L7:
		.LBE21:
				ld	a4,1288(sp)
				lui	a5,%hi(__stack_chk_guard)
				ld	a5,%lo(__stack_chk_guard)(a5)
				bne	a4,a5,.L19
				ld	ra,1352(sp)
				ld	s0,1344(sp)
				ld	s1,1336(sp)
				ld	s2,1328(sp)
		.LVL19:
				fld	fs0,1320(sp)
		.LVL20:
				fld	fs1,1312(sp)
				fld	fs2,1304(sp)
		.LVL21:
				add	sp,sp,1360
				jr	ra
		.LVL22:
		.L18:
		.LBB29:
				call	__stack_chk_fail
		.LVL35:
		.LFE186:
				.align	1
				.globl	main
		main:
		.LFB185:
   18 ! now call with some functions....
				addw	s0,s0,1
		.LVL12:
   19 printstring("
				lui	s0,%hi(.LANCHOR0)
				addi	s0,s0,%lo(.LANCHOR0)
				li	a2,256
				add	a1,s0,256
				add	a0,sp,1032
				call	memcpy
		.LVL38:
				li	a2,256
				add	a1,sp,1032
				add	a0,sp,264
				call	memcpy
		.LVL39:
				li	a2,256
				add	a1,sp,264
				add	a0,sp,1032
				call	memcpy
		.LVL40:
		.LBE30:
		.LBB31:
		.LBB32:
				li	a2,256
				add	a1,sp,1032
				mv	a0,sp
				call	memcpy
		.LVL41:
				mv	a0,sp
				call	_imp_printstring
		.LVL42:
		.LBE32:
		.LBE31:
   20     x               sine(x)
   21 ")
   22 tabulate ( sin, 0.0,pi/2,10)
				li	a1,10
				lui	a5,%hi(.LC4)
				fld	fa1,%lo(.LC4)(a5)
				fmv.d.x	fa0,zero
				lui	a0,%hi(_imp_SIN)
				addi	a0,a0,%lo(_imp_SIN)
				call	TABULATE.6006
		.LVL43:
		.LBB33:
   23 ! note that the function name appears WITHOUT parameters in the call
   24 !
   25 printstring("
				li	a2,256
				add	a1,s0,512
				add	a0,sp,776
				call	memcpy
		.LVL44:
				li	a2,256
				add	a1,sp,776
				add	a0,sp,520
				call	memcpy
		.LVL45:
				li	a2,256
				add	a1,sp,520
				add	a0,sp,776
				call	memcpy
		.LVL46:
		.LBE33:
		.LBB34:
		.LBB35:
				li	a2,256
				add	a1,sp,776
				mv	a0,sp
				call	memcpy
		.LVL47:
				mv	a0,sp
				call	_imp_printstring
		.LVL48:
		.LBE35:
		.LBE34:
   26     x         squareroot(x)
   27 ")
   28 tabulate( sqrt, 0.0,10.0,5)
				li	a1,5
				lui	a5,%hi(.LC5)
				fld	fa1,%lo(.LC5)(a5)
				fmv.d.x	fa0,zero
				lui	a0,%hi(_imp_SQRT)
				addi	a0,a0,%lo(_imp_SQRT)
				call	TABULATE.6006
		.LVL49:
		.LBB36:
		.LBB37:
				li	a0,0
				call	exit
		.LVL50:
		.LBE37:
		.LBE36:
		.LFE185:
				.section	.rodata
				.align	3
				.set	.LANCHOR0,. + 0
		.LC2:
				.byte	17
				.string	"test-new/rt28.imp"
				.zero	237
		.LC0:
				.byte	29
				.string	"\n    x               sine(x)\n"
				.zero	225
		.LC1:
				.byte	29
				.string	"\n    x         squareroot(x)\n"
				.zero	225
				.section	.rodata.str1.8,"aMS",@progbits,1
				.align	3
		.LC3:
				.string	"Illegal cycle I = 0, 1, STEPS"
				.section	.srodata.cst8,"aM",@progbits,8
				.align	3
		.LC4:
				.word	1413754136
				.word	1073291771
		.LC5:
				.word	0
				.word	1076101120
		.Letext0:
   29 !
   30 %endofprogram
   18 Statements compiled
