blob: 5315afcf0f061b6da1998cab205ce0ff0ac333b7 (
plain)
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
|
func Main()
t.3 = HeapAllocZ(24)
[t.3+0] = :functable_BBS
t.4 = t.3
t.5 = [t.4+0]
t.6 = [t.5+0]
t.7 = 10
t.2 = call t.6(t.4 t.7)
t.8 = t.2
PrintIntS(t.8)
ret
const functable_BBS
:BBS_Start
:BBS_Sort
:BBS_Print
:BBS_Init
func BBS_Start(this t.0 )
t.3 = [this]
t.4 = t.0
t.3 = [t.3+12]
t.2 = call t.3(this t.4)
t.1 = t.2
t.6 = [this]
t.6 = [t.6+8]
t.5 = call t.6(this )
t.1 = t.5
t.7 = 99999
PrintIntS(t.7)
t.9 = [this]
t.9 = [t.9+4]
t.8 = call t.9(this )
t.1 = t.8
t.11 = [this]
t.11 = [t.11+8]
t.10 = call t.11(this )
t.1 = t.10
t.12 = 0
ret t.12
func BBS_Sort(this )
t.2 = [this+20]
t.3 = 1
t.1 = Sub(t.2 t.3)
t.0 = t.1
t.6 = 0
t.7 = 1
t.5 = Sub(t.6 t.7)
t.4 = t.5
while23_test:
t.9 = t.4
t.10 = t.0
t.8 = LtS(t.9 t.10)
t.11 = t.8
if0 t.11 goto :while23_end
while23_body:
t.12 = 1
while28_test:
t.14 = t.12
t.16 = t.0
t.17 = 1
t.15 = Add(t.16 t.17)
t.18 = t.15
t.13 = LtS(t.14 t.18)
t.19 = t.13
if0 t.19 goto :while28_end
while28_body:
t.22 = t.12
t.23 = 1
t.21 = Sub(t.22 t.23)
t.20 = t.21
t.26 = [this+16]
t.27 = MulS(t.20 4)
t.27 = Add(t.27 4)
t.27 = Add(t.26 t.27)
t.25 = [t.27]
t.24 = t.25
t.30 = [this+16]
t.31 = MulS(t.12 4)
t.31 = Add(t.31 4)
t.31 = Add(t.30 t.31)
t.29 = [t.31]
t.28 = t.29
t.33 = t.28
t.34 = t.24
t.32 = LtS(t.33 t.34)
t.35 = t.32
if0 t.35 goto :if45_else
if45_body:
t.38 = t.12
t.39 = 1
t.37 = Sub(t.38 t.39)
t.36 = t.37
t.42 = [this+16]
t.43 = MulS(t.36 4)
t.43 = Add(t.43 4)
t.43 = Add(t.42 t.43)
t.41 = [t.43]
t.40 = t.41
t.44 = [this+16]
t.45 = MulS(t.36 4)
t.45 = Add(t.45 4)
t.45 = Add(t.44 t.45)
t.47 = [this+16]
t.48 = MulS(t.12 4)
t.48 = Add(t.48 4)
t.48 = Add(t.47 t.48)
t.46 = [t.48]
[t.45] = t.46
t.49 = [this+16]
t.50 = MulS(t.12 4)
t.50 = Add(t.50 4)
t.50 = Add(t.49 t.50)
[t.50] = t.40
goto :if45_end
if45_else:
t.51 = 0
if45_end:
t.53 = t.12
t.54 = 1
t.52 = Add(t.53 t.54)
t.12 = t.52
goto :while28_test
while28_end:
t.56 = t.0
t.57 = 1
t.55 = Sub(t.56 t.57)
t.0 = t.55
goto :while23_test
while23_end:
t.58 = 0
ret t.58
func BBS_Print(this )
t.0 = 0
while69_test:
t.2 = t.0
t.3 = [this+20]
t.1 = LtS(t.2 t.3)
t.4 = t.1
if0 t.4 goto :while69_end
while69_body:
t.6 = [this+16]
t.7 = MulS(t.0 4)
t.7 = Add(t.7 4)
t.7 = Add(t.6 t.7)
t.5 = [t.7]
t.8 = t.5
PrintIntS(t.8)
t.10 = t.0
t.11 = 1
t.9 = Add(t.10 t.11)
t.0 = t.9
goto :while69_test
while69_end:
t.12 = 0
ret t.12
func BBS_Init(this t.0 )
[this+20] = t.0
t.1 = call :AllocArray(t.0)
[this+16] = t.1
t.2 = [this+16]
t.3 = MulS(0 4)
t.3 = Add(t.3 4)
t.3 = Add(t.2 t.3)
[t.3] = 20
t.4 = [this+16]
t.5 = MulS(1 4)
t.5 = Add(t.5 4)
t.5 = Add(t.4 t.5)
[t.5] = 7
t.6 = [this+16]
t.7 = MulS(2 4)
t.7 = Add(t.7 4)
t.7 = Add(t.6 t.7)
[t.7] = 12
t.8 = [this+16]
t.9 = MulS(3 4)
t.9 = Add(t.9 4)
t.9 = Add(t.8 t.9)
[t.9] = 18
t.10 = [this+16]
t.11 = MulS(4 4)
t.11 = Add(t.11 4)
t.11 = Add(t.10 t.11)
[t.11] = 2
t.12 = [this+16]
t.13 = MulS(5 4)
t.13 = Add(t.13 4)
t.13 = Add(t.12 t.13)
[t.13] = 11
t.14 = [this+16]
t.15 = MulS(6 4)
t.15 = Add(t.15 4)
t.15 = Add(t.14 t.15)
[t.15] = 6
t.16 = [this+16]
t.17 = MulS(7 4)
t.17 = Add(t.17 4)
t.17 = Add(t.16 t.17)
[t.17] = 9
t.18 = [this+16]
t.19 = MulS(8 4)
t.19 = Add(t.19 4)
t.19 = Add(t.18 t.19)
[t.19] = 19
t.20 = [this+16]
t.21 = MulS(9 4)
t.21 = Add(t.21 4)
t.21 = Add(t.20 t.21)
[t.21] = 5
t.22 = 0
ret t.22
func AllocArray(size)
bytes = MulS(size 4)
bytes = Add(bytes 4)
v = HeapAllocZ(bytes)
[v] = size
ret v
|