         Edinburgh IMP77 Compiler - Version 8.4
    1
				.section	".text"
		.Ltext0:
				.section	.rodata.cst8,"aM",@progbits,8
				.align 8
		.LC3:
				.long	0
				.long	0
				.section	".text"
				.align 4
				.proc	07
		_imp_SQRT:
		.LFB61:
		.LVL0:
				save	%sp, -192, %sp
				fsqrtd	%f0, %f8
				std	%f8, [%fp+2039]
				sethi	%hi(.LC3), %g1
				ldd	[%g1+%lo(.LC3)], %f8
				fcmpd	%fcc0, %f0, %f8
				fbl,pn	%fcc0, .L3
				 nop
		.LVL1:
				ldd	[%fp+2039], %f0
				return	%i7+8
				 nop
		.LVL2:
		.L3:
				call	sqrt, 0
				 nop
		.LVL3:
				ldd	[%fp+2039], %f0
				return	%i7+8
				 nop
		.LFE61:
				.align 4
				.proc	07
		_imp_SIN:
		.LFB42:
		.LVL4:
				save	%sp, -176, %sp
				call	sin, 0
				 nop
		.LVL5:
				return	%i7+8
				 nop
		.LFE42:
				.section	.rodata.str1.8,"aMS",@progbits,1
				.align 8
		.LC4:
				.asciz	"Illegal cycle I = 0, 1, STEPS"
				.section	".rodata"
		.LC2:
				.byte	17
				.asciz	"test-new/rt28.imp"
				.skip	237
				.section	".text"
				.align 4
				.proc	020
		TABULATE.6061:
		.LFB186:
    2 %begin
		.LVL33:
				save	%sp, -1472, %sp
		.LVL34:
				ldx	[%g7+40], %g1
				stx	%g1, [%fp+2039]
				mov	0, %g1
    3 %routine Tabulate (%longrealfn func(%longreal x),%longreal from,to,
				.register	%g2, #scratch
				.register	%g7, #ignore
		.LVL6:
				save	%sp, -1504, %sp
		.LVL7:
				ldx	[%g7+40], %g1
				stx	%g1, [%fp+2039]
				mov	0, %g1
				mov	%i1, %o1
				call	_imp_initialise, 0
				 mov	%i0, %o0
		.LVL35:
		.LBB31:
    4    %integer steps)
    5 ! func(x) is the dummy formal function
    6 %real value,inc
    7 %integer i
    8 !
    9 inc=(to-from)/steps
				fsubd	%f4, %f2, %f4
		.LVL8:
				stx	%i3, [%fp+743]
				ldd	[%fp+743], %f8
				fitod	%f9, %f8
				fdivd	%f4, %f8, %f4
				fdtos	%f4, %f8
				st	%f8, [%fp+731]
		.LVL9:
   10 !
   11 value=from
				fdtos	%f2, %f8
		.LVL10:
		.LBB21:
   12 %for i=0,1,steps %cycle
   13    print(value,4,2) ; print(func(value),10,4) ; newline
				ld	[%fp+743], %f8
				fstod	%f8, %f10
		.LVL14:
		.LBB22:
		.LBB23:
				mov	2, %o2
				mov	4, %o1
				std	%f10, [%fp+735]
				call	_imp_print, 0
				 fmovd	%f10, %f0
		.LVL15:
		.LBE23:
		.LBE22:
   14    value=value+inc
				cmp	%i3, 0
				bl,pn	%icc, .L16
				 st	%f8, [%fp+743]
		.LVL11:
				call	%i0, 0
				 ldd	[%fp+735], %f0
		.LVL16:
		.LBB24:
		.LBB25:
				mov	4, %o2
				call	_imp_print, 0
				 mov	10, %o1
		.LVL17:
		.LBE25:
		.LBE24:
		.LBB26:
		.LBB27:
				call	_imp_newline, 0
				 nop
		.LVL18:
		.LBE27:
		.LBE26:
				ld	[%fp+743], %f8
				ld	[%fp+731], %f9
				fadds	%f8, %f9, %f8
		.LVL19:
				sethi	%hi(_imp_current_file), %g1
				ldx	[%g1+%lo(_imp_current_file)], %o1
				brz,pn	%o1, .L8
				 mov	256, %o2
				call	_imp_c2istr, 0
				 add	%fp, 1527, %o0
		.LVL22:
				sethi	%hi(_imp_current_line), %g1
		.L19:
				lduw	[%g1+%lo(_imp_current_line)], %i5
				cmp	%i5, 0
				be,a,pt	%icc, .L10
				 mov	14, %i5
		.L10:
				sethi	%hi(.LC4), %o1
				or	%o1, %lo(.LC4), %o1
				call	_imp_c2istr, 0
				 add	%fp, 1783, %o0
		.LVL23:
				mov	256, %o2
				add	%fp, 1527, %o1
				call	memcpy, 0
				 add	%fp, 1007, %o0
		.LVL24:
				mov	256, %o2
				add	%fp, 1783, %o1
				call	memcpy, 0
				 add	%fp, 751, %o0
		.LVL25:
				mov	0, %o5
				mov	1, %o4
				mov	5, %o3
				add	%fp, 751, %o2
				sra	%i5, 0, %o1
				call	_signal_event, 0
				 add	%fp, 1007, %o0
		.LVL26:
		.LBE29:
				sethi	%hi(.LC2), %o1
				or	%o1, %lo(.LC2), %o1
				call	memcpy, 0
				 add	%fp, 1783, %o0
		.LVL28:
				mov	256, %o2
				add	%fp, 1783, %o1
				call	memcpy, 0
				 add	%fp, 1271, %o0
		.LVL29:
		.LBE28:
				mov	256, %o2
				add	%fp, 1271, %o1
				call	memcpy, 0
				 add	%fp, 1527, %o0
		.LVL30:
		.LBE30:
				ba,pt	%xcc, .L19
				 sethi	%hi(_imp_current_line), %g1
		.LVL31:
		.L17:
   15 %repeat
   16 %end ;!  of routine tabulate
   17 !
				cmp	%i3, -1
		.L18:
				be,pn	%icc, .L6
				 nop
				mov	-1, %i5
		.LVL12:
		.L12:
				cmp	%i5, %i3
				bne,pt	%icc, .L12
				 st	%f8, [%fp+743]
		.L11:
		.LVL20:
		.L6:
		.LBE21:
				ldx	[%fp+2039], %g1
				ldx	[%g7+40], %g2
				xor	%g1, %g2, %g1
				mov	0, %g2
				brnz,pn	%g1, .L17
				 nop
				return	%i7+8
				 nop
		.LVL21:
		.L16:
		.LBB29:
				ba,pt	%xcc, .L18
				 cmp	%i3, -1
		.LVL27:
		.L8:
		.LBB30:
		.LBB28:
				call	__stack_chk_fail, 0
				 nop
		.LVL32:
				nop
		.LFE186:
				.section	".rodata"
		.LC0:
				.byte	29
				.asciz	"\n    x               sine(x)\n"
				.skip	225
		.LC1:
				.byte	29
				.asciz	"\n    x         squareroot(x)\n"
				.skip	225
				.section	.rodata.cst8
				.align 8
		.LC5:
				.long	1073291771
				.long	1413754136
				.align 8
		.LC6:
				.long	0
				.long	0
				.align 8
		.LC7:
				.long	1076101120
				.long	0
				.section	".text"
				.align 4
				.global main
				.proc	04
		main:
		.LFB185:
   18 ! now call with some functions....
				add	%i5, 1, %i5
		.LVL13:
   19 printstring("
				mov	256, %o2
				sethi	%hi(.LC0), %o1
				or	%o1, %lo(.LC0), %o1
				call	memcpy, 0
				 add	%fp, 1783, %o0
		.LVL36:
				mov	256, %o2
				add	%fp, 1783, %o1
				call	memcpy, 0
				 add	%fp, 1015, %o0
		.LVL37:
				mov	256, %o2
				add	%fp, 1015, %o1
				call	memcpy, 0
				 add	%fp, 1783, %o0
		.LVL38:
		.LBE31:
		.LBB32:
		.LBB33:
				mov	256, %o2
				add	%fp, 1783, %o1
				call	memcpy, 0
				 add	%fp, 751, %o0
		.LVL39:
				call	_imp_printstring, 0
				 add	%fp, 751, %o0
		.LVL40:
		.LBE33:
		.LBE32:
   20     x               sine(x)
   21 ")
   22 tabulate ( sin, 0.0,pi/2,10)
				mov	10, %o3
				sethi	%hi(.LC5), %g1
				ldd	[%g1+%lo(.LC5)], %f4
				sethi	%hi(.LC6), %i1
		.LVL41:
				ldd	[%i1+%lo(.LC6)], %f2
				sethi	%hi(_imp_SIN), %o0
				call	TABULATE.6061, 0
				 or	%o0, %lo(_imp_SIN), %o0
		.LVL42:
		.LBB34:
   23 ! note that the function name appears WITHOUT parameters in the call
   24 !
   25 printstring("
				mov	256, %o2
				sethi	%hi(.LC1), %o1
				or	%o1, %lo(.LC1), %o1
				call	memcpy, 0
				 add	%fp, 1527, %o0
		.LVL43:
				mov	256, %o2
				add	%fp, 1527, %o1
				call	memcpy, 0
				 add	%fp, 1271, %o0
		.LVL44:
				mov	256, %o2
				add	%fp, 1271, %o1
				call	memcpy, 0
				 add	%fp, 1527, %o0
		.LVL45:
		.LBE34:
		.LBB35:
		.LBB36:
				mov	256, %o2
				add	%fp, 1527, %o1
				call	memcpy, 0
				 add	%fp, 751, %o0
		.LVL46:
				call	_imp_printstring, 0
				 add	%fp, 751, %o0
		.LVL47:
		.LBE36:
		.LBE35:
   26     x         squareroot(x)
   27 ")
   28 tabulate( sqrt, 0.0,10.0,5)
				mov	5, %o3
				sethi	%hi(.LC7), %g1
				ldd	[%g1+%lo(.LC7)], %f4
				ldd	[%i1+%lo(.LC6)], %f2
				sethi	%hi(_imp_SQRT), %o0
				call	TABULATE.6061, 0
				 or	%o0, %lo(_imp_SQRT), %o0
		.LVL48:
		.LBB37:
		.LBB38:
				call	exit, 0
				 mov	0, %o0
		.LVL49:
		.LBE38:
		.LBE37:
				nop
		.LFE185:
		.Letext0:
   29 !
   30 %endofprogram
   18 Statements compiled
