#include <perms.h>
// Edinburgh IMP77 Compiler - Version 8.4
//
// 1 %begin
int main(int argc, char **argv) { /*%begin*/
_imp_initialise(argc, argv);
// 2 %integer fred, jim, i
int FRED;
int JIM;
int I;
// 3 first:
U_1000:;
// 4 jim = 1
JIM = 1;
// 5 %if jim = 1 %then -> first
if (JIM != 1) goto L_0001;
goto U_1000;
L_0001:;
// 6 jim = 2
JIM = 2;
// 7 %if jim = 2 %then -> second
if (JIM != 2) goto L_0002;
goto U_1001;
L_0002:;
// 8 %for fred = 1, 10, jim %cycle
// %for FRED = 1, 10, JIM %cycle
{
int _final = JIM;
if (invalid_for_loop(1, 10, _final)) _imp_signal(5, 1, 0, "Illegal cycle FRED = 1, 10, JIM");
FRED = -9;
L_0003:
if (FRED == _final) goto L_0004;
FRED += 10;
// 9 %if i = 55 %then %continue
if (I != 55) goto L_0006;
goto L_0005;
L_0006:;
// 10 %if i = 99 %then %exit
if (I != 99) goto L_0007;
goto L_0004;
L_0007:;
// 11 i = i+1
I = I + 1;
// 12 %repeat
L_0005:;
goto L_0003;
}
L_0004:;
// 13 %while fred < jim %cycle
L_0008:;
if (FRED >= JIM) goto L_0009;
// 14 %if i = 55 %then %continue
if (I != 55) goto L_000A;
goto L_000B;
L_000A:;
// 15 %if i = 99 %then %exit
if (I != 99) goto L_000C;
goto L_0009;
L_000C:;
// 16 i = i+1
I = I + 1;
// 17 %repeat
L_000B:;
goto L_0008;
L_0009:;
// 18 %cycle
L_000D:;
// 19 %if i = 55 %then %continue
if (I != 55) goto L_000E;
goto L_000F;
L_000E:;
// 20 %if i = 99 %then %exit
if (I != 99) goto L_0010;
goto L_0011;
L_0010:;
// 21 i = i+1
I = I + 1;
// 22 %repeat %until fred = jim
L_000F:;
if (FRED == JIM) goto L_0011;
goto L_000D;
L_0011:;
// 23 %cycle
L_0012:;
// 24 %if i = 55 %then %continue
if (I != 55) goto L_0013;
goto L_0014;
L_0013:;
// 25 %if i = 99 %then %exit
if (I != 99) goto L_0015;
goto L_0016;
L_0015:;
// 26 i = i+1
I = I + 1;
// 27 %repeat
L_0014:;
goto L_0012;
L_0016:;
// 28 second:
U_1001:;
// 29 %endofprogram
_imp_stop(0);
return 0;
end_0:;
}