-
Notifications
You must be signed in to change notification settings - Fork 0
/
inp.out
90 lines (90 loc) · 1.37 KB
/
inp.out
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
.text
MOVE $s0, $sp
li $t0, 2
sw $t0, $sp
B main
f:
addiu $sp, $sp, -12
sw $ra, 8($sp)
sw $s1, 4($sp)
lw $s1, $sp
addiu $sp, $sp, -4
li $t0, 4
sw $t0, $sp
lw $v0, $sp
move a0, v0
li $v0, 4
syscall
main:
addiu $sp, $sp, -12
sw $ra, 8($sp)
sw $s1, 4($sp)
lw $s1, $sp
addiu $sp, $sp, -16
li $t0, 0
sw $t0, $sp
Label_1:
lw $t0, $sp
lw $t0, $t0
sw $t0, $sp
addiu $sp, $sp, -4
li $t0, 3
sw $t0, $sp
lw $t0, $sp
lw $t1, $4($sp)
XOR $t0, $t0, $t1
SLTU $t0, $0, $t0
addiu $sp, $sp, 4
sw $t0, $sp
lw $t0, $sp
addiu $sp, $sp, 4
BEQZ $t0, Label_2
addiu $sp, $sp, -16
li $t0, 0
sw $t0, $sp
B Label_5
Label_3:
lw $t0, $sp
lw $t0, $t0
sw $t0, $sp
addiu $sp, $sp, -4
li $t0, 5
sw $t0, $sp
lw $t0, $sp
lw $t1, $4($sp)
ADDU $t0, $t0, $t1
addiu $sp, $sp, 4
sw $t0, $sp
ADDIU $t0, $s1, -4
addiu $sp, $sp, -4
sw $t0, $sp
lw $t1, $4($sp)
lw $t0, $sp
sw $t1, t0
addiu $sp, $sp, 8
Label_5:
lw $t0, $sp
lw $t0, $t0
sw $t0, $sp
addiu $sp, $sp, -4
li $t0, 5
sw $t0, $sp
lw $t0, $sp
lw $t1, $4($sp)
SLT $t0, $t0, $t1
addiu $sp, $sp, 4
sw $t0, $sp
lw $t0, $sp
addiu $sp, $sp, 4
BEQZ $t0, Label_4
B Label_3
Label_4:
B Label_1
Label_2:
addiu $sp, $sp, -4
JAL f
sw $v0, $sp
lw $v0, $sp
move a0, v0
li $v0, 4
syscall