Update codebase to remove clang warnings (and a couple of legit errors
[typhoon.git] / src / bitboard.s
1 # GNU C version 4.0.1 (Apple Inc. build 5465) (i686-apple-darwin9)
2 #       compiled by GNU C version 4.0.1 (Apple Inc. build 5465).
3 # GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
4 # options passed:  -D__DYNAMIC__ -fPIC -mmacosx-version-min=10.5.1 -m64
5 # -mtune=generic -march=apple -auxbase -fverbose-asm
6 # options enabled:  -fPIC -falign-jumps-max-skip -falign-loops
7 # -falign-loops-max-skip -fargument-alias -fasynchronous-unwind-tables
8 # -fbranch-count-reg -fcommon -feliminate-unused-debug-types -ffunction-cse
9 # -fgcse-lm -fident -fivopts -fkeep-static-consts -fleading-underscore
10 # -flocal-alloc -floop-optimize2 -fpeephole -freg-struct-return
11 # -fsched-interblock -fsched-spec -fsched-stalled-insns-dep
12 # -fsplit-ivs-in-unroller -ftree-loop-im -ftree-loop-ivcanon
13 # -ftree-loop-optimize -funwind-tables -fverbose-asm
14 # -fzero-initialized-in-bss -m80387 -mhard-float -mno-soft-float -mieee-fp
15 # -mfp-ret-in-387 -maccumulate-outgoing-args -mmmx -msse -msse2 -msse3
16 # -m128bit-long-double -m64 -mtune=generic64 -march=apple
17 # -mmacosx-version-min=10.5.1
18
19 # Compiler executable checksum: 0a7d9e41e786877ed5cbeb90e063cdab
20
21 .globl _BBSQUARE
22         .data
23         .align 5
24 _BBSQUARE:
25         .quad   1
26         .quad   2
27         .quad   4
28         .quad   8
29         .quad   16
30         .quad   32
31         .quad   64
32         .quad   128
33         .quad   256
34         .quad   512
35         .quad   1024
36         .quad   2048
37         .quad   4096
38         .quad   8192
39         .quad   16384
40         .quad   32768
41         .quad   65536
42         .quad   131072
43         .quad   262144
44         .quad   524288
45         .quad   1048576
46         .quad   2097152
47         .quad   4194304
48         .quad   8388608
49         .quad   16777216
50         .quad   33554432
51         .quad   67108864
52         .quad   134217728
53         .quad   268435456
54         .quad   536870912
55         .quad   1073741824
56         .quad   2147483648
57         .quad   4294967296
58         .quad   8589934592
59         .quad   17179869184
60         .quad   34359738368
61         .quad   68719476736
62         .quad   137438953472
63         .quad   274877906944
64         .quad   549755813888
65         .quad   1099511627776
66         .quad   2199023255552
67         .quad   4398046511104
68         .quad   8796093022208
69         .quad   17592186044416
70         .quad   35184372088832
71         .quad   70368744177664
72         .quad   140737488355328
73         .quad   281474976710656
74         .quad   562949953421312
75         .quad   1125899906842624
76         .quad   2251799813685248
77         .quad   4503599627370496
78         .quad   9007199254740992
79         .quad   18014398509481984
80         .quad   36028797018963968
81         .quad   72057594037927936
82         .quad   144115188075855872
83         .quad   288230376151711744
84         .quad   576460752303423488
85         .quad   1152921504606846976
86         .quad   2305843009213693952
87         .quad   4611686018427387904
88         .quad   -9223372036854775808
89 .globl _BBWHITESQ
90         .align 3
91 _BBWHITESQ:
92         .quad   -6172840429334713771
93 .globl _BBBLACKSQ
94         .align 3
95 _BBBLACKSQ:
96         .quad   6172840429334713770
97 .globl _BBFILE
98         .align 5
99 _BBFILE:
100         .quad   72340172838076673
101         .quad   144680345676153346
102         .quad   289360691352306692
103         .quad   578721382704613384
104         .quad   1157442765409226768
105         .quad   2314885530818453536
106         .quad   4629771061636907072
107         .quad   -9187201950435737472
108 .globl _BBRANK
109         .align 5
110 _BBRANK:
111         .quad   0
112         .quad   -72057594037927936
113         .quad   71776119061217280
114         .quad   280375465082880
115         .quad   1095216660480
116         .quad   4278190080
117         .quad   16711680
118         .quad   65280
119         .quad   255
120 .globl _BBROOK_PAWNS
121         .align 3
122 _BBROOK_PAWNS:
123         .quad   -9114861777597660799
124         .text
125 .globl _SlowCountBits
126 _SlowCountBits:
127 LFB33:
128         pushq   %rbp    #
129 LCFI0:
130         movq    %rsp, %rbp      #,
131 LCFI1:
132         movq    %rdi, -24(%rbp) # bb, bb
133         movl    $0, -4(%rbp)    #, uCount
134         jmp     L2      #
135 L3:
136         leaq    -4(%rbp), %rax  #, tmp63
137         incl    (%rax)  # uCount
138         movq    -24(%rbp), %rdx # bb, D.5028
139         decq    %rdx    # D.5028
140         leaq    -24(%rbp), %rax #, tmp65
141         andq    %rdx, (%rax)    # D.5028, bb
142 L2:
143         cmpq    $0, -24(%rbp)   #, bb
144         jne     L3      #,
145         movl    -4(%rbp), %eax  # uCount, D.5029
146         leave
147         ret
148 LFE33:
149         .const
150         .align 5
151 _foldedTable:
152         .long   63
153         .long   30
154         .long   3
155         .long   32
156         .long   59
157         .long   14
158         .long   11
159         .long   33
160         .long   60
161         .long   24
162         .long   50
163         .long   9
164         .long   55
165         .long   19
166         .long   21
167         .long   34
168         .long   61
169         .long   29
170         .long   2
171         .long   53
172         .long   51
173         .long   23
174         .long   41
175         .long   18
176         .long   56
177         .long   28
178         .long   1
179         .long   43
180         .long   46
181         .long   27
182         .long   0
183         .long   35
184         .long   62
185         .long   31
186         .long   58
187         .long   4
188         .long   5
189         .long   49
190         .long   54
191         .long   6
192         .long   15
193         .long   52
194         .long   12
195         .long   40
196         .long   7
197         .long   42
198         .long   45
199         .long   16
200         .long   25
201         .long   57
202         .long   48
203         .long   13
204         .long   10
205         .long   39
206         .long   8
207         .long   44
208         .long   20
209         .long   47
210         .long   38
211         .long   22
212         .long   17
213         .long   37
214         .long   36
215         .long   26
216         .text
217 .globl _DeBruijnFirstBit
218 _DeBruijnFirstBit:
219 LFB34:
220         pushq   %rbp    #
221 LCFI2:
222         movq    %rsp, %rbp      #,
223 LCFI3:
224         movq    %rdi, -24(%rbp) # bb, bb
225         cmpq    $0, -24(%rbp)   #, bb
226         jne     L7      #,
227         movl    $0, -28(%rbp)   #, D.5036
228         jmp     L9      #
229 L7:
230         movq    -24(%rbp), %rdx # bb, D.5037
231         decq    %rdx    # D.5037
232         leaq    -24(%rbp), %rax #, tmp77
233         xorq    %rdx, (%rax)    # D.5037, bb
234         movq    -24(%rbp), %rax # bb, bb
235         movl    %eax, %edx      # bb, D.5038
236         movq    -24(%rbp), %rax # bb, bb
237         shrq    $32, %rax       #, D.5039
238         xorl    %edx, %eax      # D.5038, tmp70
239         movl    %eax, -4(%rbp)  # tmp70, folded
240         movl    -4(%rbp), %eax  # folded, folded
241         imull   $2015959759, %eax, %eax #, folded, D.5041
242         sarl    $26, %eax       #, D.5042
243         cltq
244         leaq    0(,%rax,4), %rdx        #, tmp73
245         leaq    _foldedTable(%rip), %rax        #, tmp74
246         movl    (%rdx,%rax), %eax       # foldedTable, D.5043
247         incl    %eax    # D.5044
248         movl    %eax, -28(%rbp) # D.5044, D.5036
249 L9:
250         movl    -28(%rbp), %eax # D.5036, <result>
251         leave
252         ret
253 LFE34:
254         .data
255         .align 5
256 _uTable.5051:
257         .long   0
258         .long   1
259         .long   2
260         .long   1
261         .long   3
262         .long   1
263         .long   2
264         .long   1
265         .long   4
266         .long   1
267         .long   2
268         .long   1
269         .long   3
270         .long   1
271         .long   2
272         .long   1
273         .text
274 .globl _SlowFirstBit
275 _SlowFirstBit:
276 LFB35:
277         pushq   %rbp    #
278 LCFI4:
279         movq    %rsp, %rbp      #,
280 LCFI5:
281         movq    %rdi, -24(%rbp) # bb, bb
282         movl    $0, -8(%rbp)    #, uShifts
283         jmp     L12     #
284 L13:
285         movq    -24(%rbp), %rax # bb, bb
286         andl    $15, %eax       #, tmp65
287         movl    %eax, -4(%rbp)  # tmp65, u
288         cmpl    $0, -4(%rbp)    #, u
289         je      L14     #,
290         movl    -4(%rbp), %eax  # u, u.5
291         mov     %eax, %eax      # u.5, u.5
292         leaq    0(,%rax,4), %rdx        #, tmp67
293         leaq    _uTable.5051(%rip), %rax        #, tmp68
294         movl    (%rdx,%rax), %edx       # uTable, D.5060
295         movl    -8(%rbp), %eax  # uShifts, uShifts
296         sall    $2, %eax        #, D.5061
297         addl    %eax, %edx      # D.5061,
298         movl    %edx, -28(%rbp) #, D.5058
299         jmp     L16     #
300 L14:
301         leaq    -24(%rbp), %rax #, tmp72
302         shrq    $4, (%rax)      #, bb
303         leaq    -8(%rbp), %rax  #, tmp74
304         incl    (%rax)  # uShifts
305 L12:
306         cmpq    $0, -24(%rbp)   #, bb
307         jne     L13     #,
308         movl    $0, -28(%rbp)   #, D.5058
309 L16:
310         movl    -28(%rbp), %eax # D.5058, <result>
311         leave
312         ret
313 LFE35:
314         .data
315         .align 5
316 _uTable.5068:
317         .long   0
318         .long   1
319         .long   2
320         .long   2
321         .long   3
322         .long   3
323         .long   3
324         .long   3
325         .long   4
326         .long   4
327         .long   4
328         .long   4
329         .long   4
330         .long   4
331         .long   4
332         .long   4
333         .text
334 .globl _SlowLastBit
335 _SlowLastBit:
336 LFB36:
337         pushq   %rbp    #
338 LCFI6:
339         movq    %rsp, %rbp      #,
340 LCFI7:
341         movq    %rdi, -24(%rbp) # bb, bb
342         movl    $15, -8(%rbp)   #, uShifts
343         jmp     L20     #
344 L21:
345         movabsq $-1152921504606846976, %rax     #, tmp65
346         andq    -24(%rbp), %rax # bb, D.5074
347         shrq    $60, %rax       #, D.5075
348         movl    %eax, -4(%rbp)  # D.5075, u
349         cmpl    $0, -4(%rbp)    #, u
350         je      L22     #,
351         movl    -4(%rbp), %eax  # u, u.6
352         mov     %eax, %eax      # u.6, u.6
353         leaq    0(,%rax,4), %rdx        #, tmp67
354         leaq    _uTable.5068(%rip), %rax        #, tmp68
355         movl    (%rdx,%rax), %edx       # uTable, D.5078
356         movl    -8(%rbp), %eax  # uShifts, uShifts
357         sall    $2, %eax        #, D.5079
358         addl    %eax, %edx      # D.5079,
359         movl    %edx, -28(%rbp) #, D.5076
360         jmp     L24     #
361 L22:
362         leaq    -24(%rbp), %rax #, tmp72
363         salq    $4, (%rax)      #, bb
364         leaq    -8(%rbp), %rax  #, tmp74
365         decl    (%rax)  # uShifts
366 L20:
367         cmpq    $0, -24(%rbp)   #, bb
368         jne     L21     #,
369         movl    $0, -28(%rbp)   #, D.5076
370 L24:
371         movl    -28(%rbp), %eax # D.5076, <result>
372         leave
373         ret
374 LFE36:
375 .globl _CoorFromBitBoardRank8ToRank1
376 _CoorFromBitBoardRank8ToRank1:
377 LFB37:
378         pushq   %rbp    #
379 LCFI8:
380         movq    %rsp, %rbp      #,
381 LCFI9:
382         subq    $32, %rsp       #,
383 LCFI10:
384         movq    %rdi, -24(%rbp) # pbb, pbb
385         movl    $136, -8(%rbp)  #, c
386         movq    -24(%rbp), %rax # pbb, pbb
387         movq    (%rax), %rdi    #* pbb, D.5088
388         call    _FirstBit       #
389         movl    %eax, -4(%rbp)  # D.5089, uFirstBit
390         cmpl    $0, -4(%rbp)    #, uFirstBit
391         je      L28     #,
392         leaq    -4(%rbp), %rax  #, tmp76
393         decl    (%rax)  # uFirstBit
394         movl    -4(%rbp), %eax  # uFirstBit, D.5090
395         andl    $248, %eax      #, D.5090
396         leal    (%rax,%rax), %edx       #, D.5091
397         movl    -4(%rbp), %eax  # uFirstBit, D.5092
398         andl    $7, %eax        #, D.5092
399         orl     %edx, %eax      # D.5091, tmp70
400         movl    %eax, -8(%rbp)  # tmp70, c
401         movq    -24(%rbp), %rax # pbb, pbb
402         movq    (%rax), %rdx    #* pbb, D.5093
403         movq    -24(%rbp), %rax # pbb, pbb
404         movq    (%rax), %rax    #* pbb, D.5094
405         decq    %rax    # D.5095
406         andq    %rax, %rdx      # D.5095, D.5096
407         movq    -24(%rbp), %rax # pbb, pbb
408         movq    %rdx, (%rax)    # D.5096,* pbb
409 L28:
410         movl    -8(%rbp), %eax  # c, D.5097
411         leave
412         ret
413 LFE37:
414 .globl _CoorFromBitBoardRank1ToRank8
415 _CoorFromBitBoardRank1ToRank8:
416 LFB38:
417         pushq   %rbp    #
418 LCFI11:
419         movq    %rsp, %rbp      #,
420 LCFI12:
421         subq    $32, %rsp       #,
422 LCFI13:
423         movq    %rdi, -24(%rbp) # pbb, pbb
424         movq    -24(%rbp), %rax # pbb, pbb
425         movq    (%rax), %rdi    #* pbb, D.5106
426         call    _LastBit        #
427         movl    %eax, -4(%rbp)  # D.5107, uLastBit
428         movl    $136, -8(%rbp)  #, c
429         cmpl    $0, -4(%rbp)    #, uLastBit
430         je      L32     #,
431         leaq    -4(%rbp), %rax  #, tmp76
432         decl    (%rax)  # uLastBit
433         movq    -24(%rbp), %rax # pbb, pbb
434         movq    (%rax), %rdx    #* pbb, D.5108
435         movq    -24(%rbp), %rax # pbb, pbb
436         movq    (%rax), %rax    #* pbb, D.5109
437         decq    %rax    # D.5110
438         andq    %rax, %rdx      # D.5110, D.5111
439         movq    -24(%rbp), %rax # pbb, pbb
440         movq    %rdx, (%rax)    # D.5111,* pbb
441         movl    -4(%rbp), %eax  # uLastBit, D.5112
442         andl    $248, %eax      #, D.5112
443         leal    (%rax,%rax), %edx       #, D.5113
444         movl    -4(%rbp), %eax  # uLastBit, D.5114
445         andl    $7, %eax        #, D.5114
446         orl     %edx, %eax      # D.5113, tmp73
447         movl    %eax, -8(%rbp)  # tmp73, c
448 L32:
449         movl    -8(%rbp), %eax  # c, D.5115
450         leave
451         ret
452 LFE38:
453         .section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support
454 EH_frame1:
455         .set L$set$0,LECIE1-LSCIE1
456         .long L$set$0
457 LSCIE1:
458         .long   0x0
459         .byte   0x1
460         .ascii "zR\0"
461         .byte   0x1
462         .byte   0x78
463         .byte   0x10
464         .byte   0x1
465         .byte   0x10
466         .byte   0xc
467         .byte   0x7
468         .byte   0x8
469         .byte   0x90
470         .byte   0x1
471         .align 3
472 LECIE1:
473         .globl _SlowCountBits.eh
474 _SlowCountBits.eh:
475 LSFDE1:
476         .set L$set$1,LEFDE1-LASFDE1
477         .long L$set$1
478 LASFDE1:
479         .long   LASFDE1-EH_frame1
480         .quad   LFB33-.
481         .set L$set$2,LFE33-LFB33
482         .quad L$set$2
483         .byte   0x0
484         .byte   0x4
485         .set L$set$3,LCFI0-LFB33
486         .long L$set$3
487         .byte   0xe
488         .byte   0x10
489         .byte   0x86
490         .byte   0x2
491         .byte   0x4
492         .set L$set$4,LCFI1-LCFI0
493         .long L$set$4
494         .byte   0xd
495         .byte   0x6
496         .align 3
497 LEFDE1:
498         .globl _DeBruijnFirstBit.eh
499 _DeBruijnFirstBit.eh:
500 LSFDE3:
501         .set L$set$5,LEFDE3-LASFDE3
502         .long L$set$5
503 LASFDE3:
504         .long   LASFDE3-EH_frame1
505         .quad   LFB34-.
506         .set L$set$6,LFE34-LFB34
507         .quad L$set$6
508         .byte   0x0
509         .byte   0x4
510         .set L$set$7,LCFI2-LFB34
511         .long L$set$7
512         .byte   0xe
513         .byte   0x10
514         .byte   0x86
515         .byte   0x2
516         .byte   0x4
517         .set L$set$8,LCFI3-LCFI2
518         .long L$set$8
519         .byte   0xd
520         .byte   0x6
521         .align 3
522 LEFDE3:
523         .globl _SlowFirstBit.eh
524 _SlowFirstBit.eh:
525 LSFDE5:
526         .set L$set$9,LEFDE5-LASFDE5
527         .long L$set$9
528 LASFDE5:
529         .long   LASFDE5-EH_frame1
530         .quad   LFB35-.
531         .set L$set$10,LFE35-LFB35
532         .quad L$set$10
533         .byte   0x0
534         .byte   0x4
535         .set L$set$11,LCFI4-LFB35
536         .long L$set$11
537         .byte   0xe
538         .byte   0x10
539         .byte   0x86
540         .byte   0x2
541         .byte   0x4
542         .set L$set$12,LCFI5-LCFI4
543         .long L$set$12
544         .byte   0xd
545         .byte   0x6
546         .align 3
547 LEFDE5:
548         .globl _SlowLastBit.eh
549 _SlowLastBit.eh:
550 LSFDE7:
551         .set L$set$13,LEFDE7-LASFDE7
552         .long L$set$13
553 LASFDE7:
554         .long   LASFDE7-EH_frame1
555         .quad   LFB36-.
556         .set L$set$14,LFE36-LFB36
557         .quad L$set$14
558         .byte   0x0
559         .byte   0x4
560         .set L$set$15,LCFI6-LFB36
561         .long L$set$15
562         .byte   0xe
563         .byte   0x10
564         .byte   0x86
565         .byte   0x2
566         .byte   0x4
567         .set L$set$16,LCFI7-LCFI6
568         .long L$set$16
569         .byte   0xd
570         .byte   0x6
571         .align 3
572 LEFDE7:
573         .globl _CoorFromBitBoardRank8ToRank1.eh
574 _CoorFromBitBoardRank8ToRank1.eh:
575 LSFDE9:
576         .set L$set$17,LEFDE9-LASFDE9
577         .long L$set$17
578 LASFDE9:
579         .long   LASFDE9-EH_frame1
580         .quad   LFB37-.
581         .set L$set$18,LFE37-LFB37
582         .quad L$set$18
583         .byte   0x0
584         .byte   0x4
585         .set L$set$19,LCFI8-LFB37
586         .long L$set$19
587         .byte   0xe
588         .byte   0x10
589         .byte   0x86
590         .byte   0x2
591         .byte   0x4
592         .set L$set$20,LCFI9-LCFI8
593         .long L$set$20
594         .byte   0xd
595         .byte   0x6
596         .align 3
597 LEFDE9:
598         .globl _CoorFromBitBoardRank1ToRank8.eh
599 _CoorFromBitBoardRank1ToRank8.eh:
600 LSFDE11:
601         .set L$set$21,LEFDE11-LASFDE11
602         .long L$set$21
603 LASFDE11:
604         .long   LASFDE11-EH_frame1
605         .quad   LFB38-.
606         .set L$set$22,LFE38-LFB38
607         .quad L$set$22
608         .byte   0x0
609         .byte   0x4
610         .set L$set$23,LCFI11-LFB38
611         .long L$set$23
612         .byte   0xe
613         .byte   0x10
614         .byte   0x86
615         .byte   0x2
616         .byte   0x4
617         .set L$set$24,LCFI12-LCFI11
618         .long L$set$24
619         .byte   0xd
620         .byte   0x6
621         .align 3
622 LEFDE11:
623         .subsections_via_symbols