         Edinburgh IMP77 Compiler - Version 8.4
    1 %begin
				.option nopic
		.Ltext0:
				.align	1
				.globl	main
		main:
		.LFB185:
		.LVL0:
				add	sp,sp,-800
				sd	ra,792(sp)
				lui	a5,%hi(__stack_chk_guard)
				ld	a5,%lo(__stack_chk_guard)(a5)
				sd	a5,776(sp)
    2 %integer i, a,b,c, q
				call	_imp_initialise
		.LVL1:
		.LDL1:
		.LDL2:
		.LDL3:
		.LDL4:
		.LDL5:
		.LDL6:
		.LDL7:
		.LDL8:
		.LDL9:
		.LDL10:
		.LDL11:
		.LDL12:
		.LDL13:
		.LDL14:
		.LDL15:
		.LDL16:
		.LBB24:
    3
    4   q = 0;
    5
    6   %for i = 3,1,5 %cycle
    7     q = q+i
    8   %repeat
    9
   10   %for i = 3,2,5 %cycle
   11     q = q+i
   12   %repeat
   13
   14   %for i = 5,-1,3 %cycle
   15     q = q+i
   16   %repeat
   17
   18   %for i = 5,-2,3 %cycle
   19     q = q+i
   20   %repeat
   21
   22   a = 3; b = 1; c = 5
   23
   24   %for i = a, b, c %cycle
   25     q = q+i+a
   26   %repeat
   27
   28   a = 3; b = 2; c = 5
   29
   30   %for i = a, b, c %cycle
   31     q = q+i+a
   32   %repeat
   33
   34   a = 5; b = -1; c = 3
   35
   36   %for i = a, b, c %cycle
   37     q = q+i+a
   38   %repeat
   39
   40   a = 5; b = -2; c = 3
   41
   42   %for i = a, b, c %cycle
   43     q = q+i+a
   44   %repeat
   45
   46   %if q = 120 %then printstring("Pass!") %else printstring("Fail!")
   47   newline
				li	a2,256
				lui	a1,%hi(.LANCHOR0)
				addi	a1,a1,%lo(.LANCHOR0)
				add	a0,sp,520
				call	memcpy
		.LVL2:
				li	a2,256
				add	a1,sp,520
				add	a0,sp,264
				call	memcpy
		.LVL3:
				li	a2,256
				add	a1,sp,264
				add	a0,sp,520
				call	memcpy
		.LVL4:
		.LBE24:
		.LBB25:
		.LBB26:
				li	a2,256
				add	a1,sp,520
				mv	a0,sp
				call	memcpy
		.LVL5:
				mv	a0,sp
				call	_imp_printstring
		.LVL6:
		.LDL17:
		.LBE26:
		.LBE25:
		.LBB27:
		.LBB28:
				call	_imp_newline
		.LVL7:
		.LBE28:
		.LBE27:
		.LBB29:
		.LBB30:
				li	a0,0
				call	exit
		.LVL8:
		.LBE30:
		.LBE29:
		.LFE185:
				.section	.rodata
				.align	3
				.set	.LANCHOR0,. + 0
		.LC1:
				.byte	5
				.string	"Pass!"
				.zero	249
		.Letext0:
   48
   49 %endofprogram
   42 Statements compiled
