104 lines
1.9 KiB
Plaintext
104 lines
1.9 KiB
Plaintext
continue_and_state_change:
|
|
CP r1, r0
|
|
LI64 r10, 3d
|
|
LI64 r11, 4d
|
|
LI64 r12, 2d
|
|
LI64 r3, 10d
|
|
6: JLTU r2, r3, :0
|
|
CP r1, r2
|
|
JMP :1
|
|
0: JNE r2, r12, :2
|
|
CP r2, r11
|
|
JMP :3
|
|
2: JNE r2, r10, :4
|
|
1: JMP :5
|
|
4: ADDI64 r2, r2, 1d
|
|
3: JMP :6
|
|
5: JALA r0, r31, 0a
|
|
infinite_loop:
|
|
ADDI64 r254, r254, -24d
|
|
ST r31, r254, 0a, 24h
|
|
LI64 r32, 1d
|
|
CP r33, r0
|
|
CP r1, r33
|
|
1: JNE r1, r32, :0
|
|
JMP :0
|
|
0: CP r2, r33
|
|
JAL r31, r0, :continue_and_state_change
|
|
JMP :1
|
|
LD r31, r254, 0a, 24h
|
|
ADDI64 r254, r254, 24d
|
|
JALA r0, r31, 0a
|
|
main:
|
|
ADDI64 r254, r254, -48d
|
|
ST r31, r254, 0a, 48h
|
|
CP r2, r0
|
|
JAL r31, r0, :multiple_breaks
|
|
CP r32, r1
|
|
LI64 r1, 3d
|
|
JEQ r32, r1, :0
|
|
LI64 r1, 1d
|
|
JMP :1
|
|
0: CP r33, r1
|
|
LI64 r34, 4d
|
|
CP r2, r34
|
|
JAL r31, r0, :multiple_breaks
|
|
CP r35, r34
|
|
LI64 r36, 10d
|
|
JEQ r1, r36, :2
|
|
LI64 r1, 2d
|
|
JMP :1
|
|
2: CP r2, r0
|
|
JAL r31, r0, :state_change_in_break
|
|
JEQ r1, r0, :3
|
|
CP r1, r33
|
|
JMP :1
|
|
3: CP r2, r35
|
|
JAL r31, r0, :state_change_in_break
|
|
JEQ r1, r36, :4
|
|
CP r1, r35
|
|
JMP :1
|
|
4: CP r2, r36
|
|
JAL r31, r0, :continue_and_state_change
|
|
JEQ r1, r36, :5
|
|
LI64 r1, 5d
|
|
JMP :1
|
|
5: CP r2, r33
|
|
JAL r31, r0, :continue_and_state_change
|
|
JEQ r1, r0, :6
|
|
LI64 r1, 6d
|
|
JMP :1
|
|
6: JAL r31, r0, :infinite_loop
|
|
CP r1, r0
|
|
1: LD r31, r254, 0a, 48h
|
|
ADDI64 r254, r254, 48d
|
|
JALA r0, r31, 0a
|
|
multiple_breaks:
|
|
LI64 r8, 3d
|
|
LI64 r7, 10d
|
|
4: JLTU r2, r7, :0
|
|
CP r1, r2
|
|
JMP :1
|
|
0: ADDI64 r1, r2, 1d
|
|
JNE r1, r8, :2
|
|
1: JMP :3
|
|
2: CP r2, r1
|
|
JMP :4
|
|
3: JALA r0, r31, 0a
|
|
state_change_in_break:
|
|
LI64 r7, 3d
|
|
LI64 r8, 10d
|
|
4: JLTU r2, r8, :0
|
|
CP r1, r2
|
|
JMP :1
|
|
0: JNE r2, r7, :2
|
|
CP r1, r0
|
|
1: JMP :3
|
|
2: ADDI64 r2, r2, 1d
|
|
JMP :4
|
|
3: JALA r0, r31, 0a
|
|
timed out
|
|
code size: 634
|
|
ret: 10
|
|
status: Ok(())
|