aboutsummaryrefslogtreecommitdiffstats
path: root/lcc/x86/linux/tst/array.sbk
blob: d50395caa187cbcf396186acfdf1fe611f877f76 (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
224
225
226
227
228
229
230
231
232
233
234
235
.globl main
.text
.align 16
.type main,@function
main:
pushl %ebp
pushl %ebx
pushl %esi
pushl %edi
movl %esp,%ebp
subl $60,%esp
movl $0,-8(%ebp)
.LC2:
movl $0,-4(%ebp)
.LC6:
movl -4(%ebp),%edi
movl -8(%ebp),%esi
movl %esi,%ebx
sall $4,%ebx
leal x(%ebx),%ebx
imul $1000,%esi,%esi
leal (%edi,%esi),%esi
movl %esi,(%ebx,%edi,4)
.LC7:
incl -4(%ebp)
cmpl $4,-4(%ebp)
jl .LC6
movl -8(%ebp),%edi
movl %edi,%esi
sall $4,%esi
leal x(%esi),%esi
movl %esi,y(,%edi,4)
.LC3:
incl -8(%ebp)
cmpl $3,-8(%ebp)
jl .LC2
call f
movl $0,-8(%ebp)
.LC10:
movl -8(%ebp),%edi
movl %edi,%esi
sall $4,%esi
leal -60(%ebp),%ebx
leal (%ebx,%esi),%esi
movl %esi,-12(%ebp)
movl %esi,y(,%edi,4)
movl $0,-4(%ebp)
.LC14:
movl -4(%ebp),%edi
leal (,%edi,4),%edi
movl -12(%ebp),%esi
movl -8(%ebp),%ebx
sall $4,%ebx
leal x(%ebx),%ebx
movl (%ebx,%edi),%ebx
movl %ebx,(%esi,%edi)
.LC15:
incl -4(%ebp)
cmpl $4,-4(%ebp)
jl .LC14
.LC11:
incl -8(%ebp)
cmpl $3,-8(%ebp)
jl .LC10
pushl $y
leal -60(%ebp),%edi
pushl %edi
call g
addl $8,%esp
movl $0,%eax
.LC1:
movl %ebp,%esp
popl %edi
popl %esi
popl %ebx
popl %ebp
ret
.Lf18:
.size main,.Lf18-main
.globl f
.align 16
.type f,@function
f:
pushl %ebp
pushl %ebx
pushl %esi
pushl %edi
movl %esp,%ebp
subl $8,%esp
movl $0,-8(%ebp)
.LC20:
movl $0,-4(%ebp)
.LC24:
movl -4(%ebp),%edi
movl -8(%ebp),%esi
sall $4,%esi
leal x(%esi),%esi
pushl (%esi,%edi,4)
pushl $.LC28
call printf
addl $8,%esp
.LC25:
incl -4(%ebp)
cmpl $4,-4(%ebp)
jl .LC24
.LC21:
incl -8(%ebp)
cmpl $3,-8(%ebp)
jl .LC20
pushl $.LC29
call printf
addl $4,%esp
movl $0,-8(%ebp)
.LC30:
movl $0,-4(%ebp)
.LC34:
movl -4(%ebp),%edi
movl -8(%ebp),%esi
movl y(,%esi,4),%esi
pushl (%esi,%edi,4)
pushl $.LC28
call printf
addl $8,%esp
.LC35:
incl -4(%ebp)
cmpl $4,-4(%ebp)
jl .LC34
.LC31:
incl -8(%ebp)
cmpl $3,-8(%ebp)
jl .LC30
pushl $.LC29
call printf
addl $4,%esp
movl $0,%eax
.LC19:
movl %ebp,%esp
popl %edi
popl %esi
popl %ebx
popl %ebp
ret
.Lf38:
.size f,.Lf38-f
.globl g
.align 16
.type g,@function
g:
pushl %ebp
pushl %ebx
pushl %esi
pushl %edi
movl %esp,%ebp
subl $8,%esp
movl $0,-8(%ebp)
.LC40:
movl $0,-4(%ebp)
.LC44:
movl -4(%ebp),%edi
movl -8(%ebp),%esi
sall $4,%esi
movl 20(%ebp),%ebx
leal (%ebx,%esi),%esi
pushl (%esi,%edi,4)
pushl $.LC28
call printf
addl $8,%esp
.LC45:
incl -4(%ebp)
cmpl $4,-4(%ebp)
jl .LC44
.LC41:
incl -8(%ebp)
cmpl $3,-8(%ebp)
jl .LC40
pushl $.LC29
call printf
addl $4,%esp
movl $0,-8(%ebp)
.LC48:
movl $0,-4(%ebp)
.LC52:
movl -4(%ebp),%edi
movl -8(%ebp),%esi
movl 24(%ebp),%ebx
movl (%ebx,%esi,4),%esi
pushl (%esi,%edi,4)
pushl $.LC28
call printf
addl $8,%esp
.LC53:
incl -4(%ebp)
cmpl $4,-4(%ebp)
jl .LC52
.LC49:
incl -8(%ebp)
cmpl $3,-8(%ebp)
jl .LC48
pushl $.LC29
call printf
addl $4,%esp
movl $0,%eax
.LC39:
movl %ebp,%esp
popl %edi
popl %esi
popl %ebx
popl %ebp
ret
.Lf56:
.size g,.Lf56-g
.bss
.globl y
.align 4
.type y,@object
.size y,12
.comm y,12
.globl x
.align 4
.type x,@object
.size x,48
.comm x,48
.data
.align 1
.LC29:
.byte 10
.byte 0
.align 1
.LC28:
.byte 32
.byte 37
.byte 100
.byte 0
.text
.ident "LCC: 4.1"