Project

General

Profile

popcnt.s

krufter_multiclet, 11/27/2013 12:57 PM

 
1
	.file	"popcnt.cpp"
2
	.text
3
	.type	_ZL12POPCNT_TablePKhj, @function
4
_ZL12POPCNT_TablePKhj:
5
.LFB0:
6
	.cfi_startproc
7
	pushl	%ebp
8
	.cfi_def_cfa_offset 8
9
	.cfi_offset 5, -8
10
	movl	%esp, %ebp
11
	.cfi_def_cfa_register 5
12
	subl	$16, %esp
13
	movl	$0, -16(%ebp)
14
	movl	12(%ebp), %eax
15
	shrl	$2, %eax
16
	movl	%eax, -12(%ebp)
17
	jmp	.L2
18
.L3:
19
	movl	8(%ebp), %eax
20
	movl	(%eax), %eax
21
	movl	%eax, -8(%ebp)
22
	movl	-8(%ebp), %eax
23
	andl	$255, %eax
24
	movzbl	_ZL9g_pop_cnt(%eax), %eax
25
	movzbl	%al, %edx
26
	movl	-8(%ebp), %eax
27
	shrl	$8, %eax
28
	andl	$255, %eax
29
	movzbl	_ZL9g_pop_cnt(%eax), %eax
30
	movzbl	%al, %eax
31
	addl	%eax, %edx
32
	movl	-8(%ebp), %eax
33
	shrl	$16, %eax
34
	andl	$255, %eax
35
	movzbl	_ZL9g_pop_cnt(%eax), %eax
36
	movzbl	%al, %eax
37
	addl	%eax, %edx
38
	movl	-8(%ebp), %eax
39
	shrl	$24, %eax
40
	movzbl	_ZL9g_pop_cnt(%eax), %eax
41
	movzbl	%al, %eax
42
	addl	%edx, %eax
43
	addl	%eax, -16(%ebp)
44
	addl	$4, 8(%ebp)
45
	subl	$1, -12(%ebp)
46
.L2:
47
	cmpl	$0, -12(%ebp)
48
	setne	%al
49
	testb	%al, %al
50
	jne	.L3
51
	movl	12(%ebp), %eax
52
	andl	$2, %eax
53
	testl	%eax, %eax
54
	je	.L4
55
	movl	8(%ebp), %eax
56
	movzwl	(%eax), %eax
57
	cwtl
58
	movl	%eax, -4(%ebp)
59
	movl	-4(%ebp), %eax
60
	andl	$255, %eax
61
	movzbl	_ZL9g_pop_cnt(%eax), %eax
62
	movzbl	%al, %edx
63
	movl	-4(%ebp), %eax
64
	shrl	$8, %eax
65
	movzbl	_ZL9g_pop_cnt(%eax), %eax
66
	movzbl	%al, %eax
67
	addl	%edx, %eax
68
	addl	%eax, -16(%ebp)
69
	addl	$2, 8(%ebp)
70
.L4:
71
	movl	12(%ebp), %eax
72
	andl	$1, %eax
73
	testl	%eax, %eax
74
	je	.L5
75
	movl	8(%ebp), %eax
76
	movzbl	(%eax), %eax
77
	movzbl	%al, %eax
78
	movzbl	_ZL9g_pop_cnt(%eax), %eax
79
	movzbl	%al, %eax
80
	addl	%eax, -16(%ebp)
81
.L5:
82
	movl	-16(%ebp), %eax
83
	leave
84
	.cfi_restore 5
85
	.cfi_def_cfa 4, 4
86
	ret
87
	.cfi_endproc
88
.LFE0:
89
	.size	_ZL12POPCNT_TablePKhj, .-_ZL12POPCNT_TablePKhj
90
	.globl	main
91
	.type	main, @function
92
main:
93
.LFB1:
94
	.cfi_startproc
95
	pushl	%ebp
96
	.cfi_def_cfa_offset 8
97
	.cfi_offset 5, -8
98
	movl	%esp, %ebp
99
	.cfi_def_cfa_register 5
100
	subl	$24, %esp
101
	movl	$1, -8(%ebp)
102
	movl	$4, 4(%esp)
103
	leal	-8(%ebp), %eax
104
	movl	%eax, (%esp)
105
	call	_ZL12POPCNT_TablePKhj
106
	movl	%eax, -4(%ebp)
107
	movl	$0, %eax
108
	leave
109
	.cfi_restore 5
110
	.cfi_def_cfa 4, 4
111
	ret
112
	.cfi_endproc
113
.LFE1:
114
	.size	main, .-main
115
	.section	.rodata
116
	.align 32
117
	.type	_ZL9g_pop_cnt, @object
118
	.size	_ZL9g_pop_cnt, 256
119
_ZL9g_pop_cnt:
120
	.byte	0
121
	.byte	1
122
	.byte	1
123
	.byte	2
124
	.byte	1
125
	.byte	2
126
	.byte	2
127
	.byte	3
128
	.byte	1
129
	.byte	2
130
	.byte	2
131
	.byte	3
132
	.byte	2
133
	.byte	3
134
	.byte	3
135
	.byte	4
136
	.byte	1
137
	.byte	2
138
	.byte	2
139
	.byte	3
140
	.byte	2
141
	.byte	3
142
	.byte	3
143
	.byte	4
144
	.byte	2
145
	.byte	3
146
	.byte	3
147
	.byte	4
148
	.byte	3
149
	.byte	4
150
	.byte	4
151
	.byte	5
152
	.byte	1
153
	.byte	2
154
	.byte	2
155
	.byte	3
156
	.byte	2
157
	.byte	3
158
	.byte	3
159
	.byte	4
160
	.byte	2
161
	.byte	3
162
	.byte	3
163
	.byte	4
164
	.byte	3
165
	.byte	4
166
	.byte	4
167
	.byte	5
168
	.byte	2
169
	.byte	3
170
	.byte	3
171
	.byte	4
172
	.byte	3
173
	.byte	4
174
	.byte	4
175
	.byte	5
176
	.byte	3
177
	.byte	4
178
	.byte	4
179
	.byte	5
180
	.byte	4
181
	.byte	5
182
	.byte	5
183
	.byte	6
184
	.byte	1
185
	.byte	2
186
	.byte	2
187
	.byte	3
188
	.byte	2
189
	.byte	3
190
	.byte	3
191
	.byte	4
192
	.byte	2
193
	.byte	3
194
	.byte	3
195
	.byte	4
196
	.byte	3
197
	.byte	4
198
	.byte	4
199
	.byte	5
200
	.byte	2
201
	.byte	3
202
	.byte	3
203
	.byte	4
204
	.byte	3
205
	.byte	4
206
	.byte	4
207
	.byte	5
208
	.byte	3
209
	.byte	4
210
	.byte	4
211
	.byte	5
212
	.byte	4
213
	.byte	5
214
	.byte	5
215
	.byte	6
216
	.byte	2
217
	.byte	3
218
	.byte	3
219
	.byte	4
220
	.byte	3
221
	.byte	4
222
	.byte	4
223
	.byte	5
224
	.byte	3
225
	.byte	4
226
	.byte	4
227
	.byte	5
228
	.byte	4
229
	.byte	5
230
	.byte	5
231
	.byte	6
232
	.byte	3
233
	.byte	4
234
	.byte	4
235
	.byte	5
236
	.byte	4
237
	.byte	5
238
	.byte	5
239
	.byte	6
240
	.byte	4
241
	.byte	5
242
	.byte	5
243
	.byte	6
244
	.byte	5
245
	.byte	6
246
	.byte	6
247
	.byte	7
248
	.byte	1
249
	.byte	2
250
	.byte	2
251
	.byte	3
252
	.byte	2
253
	.byte	3
254
	.byte	3
255
	.byte	4
256
	.byte	2
257
	.byte	3
258
	.byte	3
259
	.byte	4
260
	.byte	3
261
	.byte	4
262
	.byte	4
263
	.byte	5
264
	.byte	2
265
	.byte	3
266
	.byte	3
267
	.byte	4
268
	.byte	3
269
	.byte	4
270
	.byte	4
271
	.byte	5
272
	.byte	3
273
	.byte	4
274
	.byte	4
275
	.byte	5
276
	.byte	4
277
	.byte	5
278
	.byte	5
279
	.byte	6
280
	.byte	2
281
	.byte	3
282
	.byte	3
283
	.byte	4
284
	.byte	3
285
	.byte	4
286
	.byte	4
287
	.byte	5
288
	.byte	3
289
	.byte	4
290
	.byte	4
291
	.byte	5
292
	.byte	4
293
	.byte	5
294
	.byte	5
295
	.byte	6
296
	.byte	3
297
	.byte	4
298
	.byte	4
299
	.byte	5
300
	.byte	4
301
	.byte	5
302
	.byte	5
303
	.byte	6
304
	.byte	4
305
	.byte	5
306
	.byte	5
307
	.byte	6
308
	.byte	5
309
	.byte	6
310
	.byte	6
311
	.byte	7
312
	.byte	2
313
	.byte	3
314
	.byte	3
315
	.byte	4
316
	.byte	3
317
	.byte	4
318
	.byte	4
319
	.byte	5
320
	.byte	3
321
	.byte	4
322
	.byte	4
323
	.byte	5
324
	.byte	4
325
	.byte	5
326
	.byte	5
327
	.byte	6
328
	.byte	3
329
	.byte	4
330
	.byte	4
331
	.byte	5
332
	.byte	4
333
	.byte	5
334
	.byte	5
335
	.byte	6
336
	.byte	4
337
	.byte	5
338
	.byte	5
339
	.byte	6
340
	.byte	5
341
	.byte	6
342
	.byte	6
343
	.byte	7
344
	.byte	3
345
	.byte	4
346
	.byte	4
347
	.byte	5
348
	.byte	4
349
	.byte	5
350
	.byte	5
351
	.byte	6
352
	.byte	4
353
	.byte	5
354
	.byte	5
355
	.byte	6
356
	.byte	5
357
	.byte	6
358
	.byte	6
359
	.byte	7
360
	.byte	4
361
	.byte	5
362
	.byte	5
363
	.byte	6
364
	.byte	5
365
	.byte	6
366
	.byte	6
367
	.byte	7
368
	.byte	5
369
	.byte	6
370
	.byte	6
371
	.byte	7
372
	.byte	6
373
	.byte	7
374
	.byte	7
375
	.byte	8
376
	.ident	"GCC: (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2"
377
	.section	.note.GNU-stack,"",@progbits