// File: /workspace/github_cpp_makefile_star2_O3/ATOMIC-LICHESS[P]ATOMKRAFT/bitboard.cpp
// Function: init_bitboards()
void init_bitboards() {

  int rookDeltas[4][2] = {{0,1},{0,-1},{1,0},{-1,0}};
  int bishopDeltas[4][2] = {{1,1},{-1,1},{1,-1},{-1,-1}};

  init_masks();
  init_step_attacks();
  init_sliding_attacks(RAttacks, RAttackIndex, RMask, RShift, RMult, rookDeltas);
  init_sliding_attacks(BAttacks, BAttackIndex, BMask, BShift, BMult, bishopDeltas);
  init_pseudo_attacks();
  init_between_bitboards();
}

// Assembly:
movabsq $0x101010101010101, %rcx # imm = 0x101010101010101
movabsq $-0x55aa55aa55aa55ab, %rax # imm = 0xAA55AA55AA55AA55
movq %rax, 0x1112de(%rip)    # 0x1195c0
movabsq $0x55aa55aa55aa55aa, %rax # imm = 0x55AA55AA55AA55AA
movq %rax, 0x1112d5(%rip)    # 0x1195c8
movq %rcx, 0x1112d6(%rip)    # 0x1195d0
movq $0xff, 0x11130b(%rip) # 0x119610
movl $0x1, %edx
movl $0xff, %esi
leaq 0x1112ba(%rip), %rax    # 0x1195d0
leaq 0x1112f3(%rip), %rdi    # 0x119610
addq %rcx, %rcx
movq %rcx, (%rax,%rdx,8)
shlq $0x8, %rsi
movq %rsi, (%rdi,%rdx,8)
incq %rdx
cmpq $0x8, %rdx
jne 0x831d
xorl %esi, %esi
leaq 0x111312(%rip), %rcx    # 0x119650
leaq 0x11134b(%rip), %rdx    # 0x119690
testq %rsi, %rsi
je 0x8360
movq -0x8(%rax,%rsi,8), %r8
cmpq $0x7, %rsi
jne 0x8363
movl $0x8, %r9d
xorl %r10d, %r10d
jmp 0x836c
xorl %r8d, %r8d
leaq 0x1(%rsi), %r9
movq 0x8(%rax,%rsi,8), %r10
orq %r10, %r8
movq %r8, (%rcx,%rsi,8)
orq (%rax,%rsi,8), %r8
movq %r8, (%rdx,%rsi,8)
movq %r9, %rsi
cmpq $0x8, %r9
jne 0x8345
xorl %r8d, %r8d
leaq 0x111342(%rip), %rsi    # 0x1196d0
xorl %r9d, %r9d
movq 0x38(%rdi,%r9,8), %r10
orq 0x38(%rsi,%r9,8), %r10
movq %r10, 0x30(%rsi,%r9,8)
movq (%r8,%rdi), %r10
orq 0x40(%r8,%rsi), %r10
movq %r10, 0x48(%r8,%rsi)
decq %r9
addq $0x8, %r8
cmpq $-0x7, %r9
jne 0x8391
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq $0x0, 0x110fcf(%rip) # 0x1193a0
movq $-0x1, 0x1111d4(%rip) # 0x1195b0
movdqa 0x26cdc(%rip), %xmm0    # 0x2f0c0
xorl %edi, %edi
movdqa 0x26ce2(%rip), %xmm1    # 0x2f0d0
leaq 0x110dab(%rip), %r13    # 0x1191a0
pcmpeqd %xmm2, %xmm2
leaq 0x110fb0(%rip), %r8     # 0x1193b0
movdqa 0x26f78(%rip), %xmm3    # 0x2f380
movdqa %xmm1, %xmm4
psllq %xmm0, %xmm4
pshufd $0xee, %xmm0, %xmm5     # xmm5 = xmm0[2,3,2,3]
movdqa %xmm1, %xmm6
psllq %xmm5, %xmm6
movsd %xmm4, %xmm6            # xmm6 = xmm4[0],xmm6[1]
movapd %xmm6, (%rdi,%r13)
xorpd %xmm2, %xmm6
movapd %xmm6, (%rdi,%r8)
paddq %xmm3, %xmm0
addq $0x10, %rdi
cmpq $0x200, %rdi            # imm = 0x200
jne 0x8408
movb $0x1, %dil
xorl %r8d, %r8d
leaq 0x11b301(%rip), %r9     # 0x123750
leaq 0x11b6fa(%rip), %r10    # 0x123b50
leaq 0x11baf3(%rip), %r11    # 0x123f50
movq %r8, %rbx
shlq $0x9, %rbx
shlq $0x6, %r8
addq %rsi, %r8
xorl %r14d, %r14d
movl %r14d, %r15d
andl $-0x8, %r15d
movq (%r15,%r8), %r15
movl %r14d, %r12d
andl $0x7, %r12d
shll $0x3, %r12d
movq (%r12,%rax), %rbp
andq %r15, %rbp
leaq (%rbx,%r14,8), %rsi
movq %rbp, (%r9,%rsi)
movq (%r12,%rdx), %rbp
andq %r15, %rbp
andq (%r12,%rcx), %r15
movq %rbp, (%r10,%rsi)
movq %r15, (%r11,%rsi)
incq %r14
cmpq $0x40, %r14
jne 0x846e
movl $0x1, %r8d
testb $0x1, %dil
movl $0x0, %edi
leaq 0x11120b(%rip), %rsi    # 0x1196d0
jne 0x845d
movdqa 0x26b41(%rip), %xmm0    # 0x2f010
movdqa 0x26b49(%rip), %xmm1    # 0x2f020
movdqa 0x26b51(%rip), %xmm2    # 0x2f030
movdqa 0x26b59(%rip), %xmm3    # 0x2f040
xorl %eax, %eax
movdqa 0x26e9f(%rip), %xmm4    # 0x2f390
movdqa 0x26ea7(%rip), %xmm5    # 0x2f3a0
movdqa 0x26eaf(%rip), %xmm6    # 0x2f3b0
movdqa 0x26bd7(%rip), %xmm7    # 0x2f0e0
leaq 0x11c440(%rip), %rcx    # 0x124950
movdqa 0x26c17(%rip), %xmm8    # 0x2f130
movdqa %xmm1, %xmm10
psrld $0x1, %xmm10
movdqa %xmm0, %xmm11
psrld $0x1, %xmm11
movdqa %xmm3, %xmm12
psrld $0x1, %xmm12
movdqa %xmm2, %xmm13
psrld $0x1, %xmm13
pand %xmm4, %xmm13
pand %xmm4, %xmm12
pand %xmm4, %xmm11
pand %xmm4, %xmm10
movdqa %xmm1, %xmm9
psubd %xmm10, %xmm9
movdqa %xmm0, %xmm10
psubd %xmm11, %xmm10
movdqa %xmm3, %xmm11
psubd %xmm12, %xmm11
movdqa %xmm2, %xmm12
psubd %xmm13, %xmm12
movdqa %xmm9, %xmm13
psrld $0x2, %xmm13
pand %xmm5, %xmm13
pand %xmm5, %xmm9
paddd %xmm13, %xmm9
movdqa %xmm10, %xmm13
psrld $0x2, %xmm13
pand %xmm5, %xmm13
pand %xmm5, %xmm10
paddd %xmm13, %xmm10
movdqa %xmm11, %xmm13
psrld $0x2, %xmm13
pand %xmm5, %xmm13
pand %xmm5, %xmm11
paddd %xmm13, %xmm11
movdqa %xmm12, %xmm13
psrld $0x2, %xmm13
pand %xmm5, %xmm13
pand %xmm5, %xmm12
paddd %xmm13, %xmm12
movdqa %xmm12, %xmm13
psrld $0x4, %xmm13
paddd %xmm12, %xmm13
movdqa %xmm11, %xmm14
psrld $0x4, %xmm14
paddd %xmm11, %xmm14
movdqa %xmm10, %xmm12
psrld $0x4, %xmm12
paddd %xmm10, %xmm12
movdqa %xmm9, %xmm10
psrld $0x4, %xmm10
paddd %xmm9, %xmm10
pand %xmm6, %xmm10
pand %xmm6, %xmm12
pand %xmm6, %xmm14
pand %xmm6, %xmm13
pshufd $0xf5, %xmm13, %xmm11   # xmm11 = xmm13[1,1,3,3]
pmuludq %xmm7, %xmm13
pshufd $0xe8, %xmm13, %xmm9    # xmm9 = xmm13[0,2,2,3]
pmuludq %xmm7, %xmm11
pshufd $0xe8, %xmm11, %xmm11   # xmm11 = xmm11[0,2,2,3]
punpckldq %xmm11, %xmm9   # xmm9 = xmm9[0],xmm11[0],xmm9[1],xmm11[1]
pshufd $0xf5, %xmm14, %xmm13   # xmm13 = xmm14[1,1,3,3]
pmuludq %xmm7, %xmm14
pshufd $0xe8, %xmm14, %xmm11   # xmm11 = xmm14[0,2,2,3]
pmuludq %xmm7, %xmm13
pshufd $0xe8, %xmm13, %xmm13   # xmm13 = xmm13[0,2,2,3]
punpckldq %xmm13, %xmm11  # xmm11 = xmm11[0],xmm13[0],xmm11[1],xmm13[1]
pshufd $0xf5, %xmm12, %xmm13   # xmm13 = xmm12[1,1,3,3]
pmuludq %xmm7, %xmm12
pshufd $0xe8, %xmm12, %xmm12   # xmm12 = xmm12[0,2,2,3]
pmuludq %xmm7, %xmm13
pshufd $0xe8, %xmm13, %xmm13   # xmm13 = xmm13[0,2,2,3]
punpckldq %xmm13, %xmm12  # xmm12 = xmm12[0],xmm13[0],xmm12[1],xmm13[1]
pshufd $0xf5, %xmm10, %xmm13   # xmm13 = xmm10[1,1,3,3]
pmuludq %xmm7, %xmm10
pshufd $0xe8, %xmm10, %xmm10   # xmm10 = xmm10[0,2,2,3]
pmuludq %xmm7, %xmm13
pshufd $0xe8, %xmm13, %xmm13   # xmm13 = xmm13[0,2,2,3]
punpckldq %xmm13, %xmm10  # xmm10 = xmm10[0],xmm13[0],xmm10[1],xmm13[1]
psrld $0x18, %xmm10
psrld $0x18, %xmm12
packuswb %xmm12, %xmm10
psrld $0x18, %xmm11
psrld $0x18, %xmm9
packuswb %xmm9, %xmm11
packuswb %xmm10, %xmm11
movdqa %xmm11, (%rax,%rcx)
addq $0x10, %rax
paddd %xmm8, %xmm3
paddd %xmm8, %xmm2
paddd %xmm8, %xmm1
paddd %xmm8, %xmm0
cmpq $0x100, %rax            # imm = 0x100
jne 0x8519
xorl %eax, %eax
movl $0x39b9, %edx           # imm = 0x39B9
leaq 0x273a0(%rip), %rsi     # 0x2fac0
leaq 0x111029(%rip), %rdi    # 0x119750
movl %eax, %r8d
andl $0x7, %r8d
movl %eax, %ecx
shrl $0x3, %ecx
movl $0x1, %r10d
leaq 0x273a8(%rip), %r11     # 0x2fae8
btq %r10, %rdx
jb 0x87b6
leaq (%r10,%r10,8), %rbx
movl (%rsi,%rbx,4), %ebp
movq %r10, %rbx
shlq $0x9, %rbx
addq %rdi, %rbx
leaq (%rbx,%rax,8), %rbx
movq %r11, %r14
addl %eax, %ebp
cmpl $0x3f, %ebp
ja 0x87ab
movl %ebp, %r15d
andl $0x7, %r15d
movl %r8d, %r12d
subl %r15d, %r12d
movl %r12d, %r15d
negl %r15d
cmovsl %r12d, %r15d
movl %ebp, %r12d
shrl $0x3, %r12d
movl %ecx, %r9d
subl %r12d, %r9d
movl %r9d, %r12d
negl %r12d
cmovsl %r9d, %r12d
cmpl %r12d, %r15d
cmoval %r15d, %r12d
cmpl $0x2, %r12d
ja 0x87ab
movl %ebp, %r9d
movq (%r13,%r9,8), %r9
orq %r9, (%rbx)
movl (%r14), %ebp
addq $0x4, %r14
testl %ebp, %ebp
jne 0x875e
incq %r10
addq $0x24, %r11
cmpq $0xf, %r10
jne 0x8740
incq %rax
cmpq $0x40, %rax
jne 0x8727
leaq 0x3e2c5(%rip), %rbx     # 0x46aa0
leaq 0x3e1be(%rip), %r14     # 0x469a0
leaq 0x3dfb7(%rip), %rdx     # 0x467a0
leaq 0x270d0(%rip), %rcx     # 0x2f8c0
leaq 0x26dc9(%rip), %r8      # 0x2f5c0
leaq 0x274e2(%rip), %r9      # 0x2fce0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x894a
leaq 0x106590(%rip), %r15    # 0x10eda0
leaq 0x106489(%rip), %r12    # 0x10eca0
leaq 0x106282(%rip), %rdx    # 0x10eaa0
leaq 0x26f9b(%rip), %rcx     # 0x2f7c0
leaq 0x26b94(%rip), %r8      # 0x2f3c0
leaq 0x274cd(%rip), %r9      # 0x2fd00
movq %r15, %rdi
movq %r12, %rsi
callq 0x894a
xorl %eax, %eax
leaq 0x11bb09(%rip), %rdx    # 0x124350
leaq 0x11bd02(%rip), %rsi    # 0x124550
leaq 0x11befb(%rip), %rcx    # 0x124750
xorl %edi, %edi
movl (%rdi,%r12), %r8d
movq (%r15,%r8,8), %r8
movq %r8, (%rax,%rdx)
movl (%rdi,%r14), %r9d
movq (%rbx,%r9,8), %r9
movq %r9, (%rax,%rsi)
orq %r8, %r9
movq %r9, (%rax,%rcx)
addq $0x4, %rdi
addq $0x8, %rax
cmpq $0x100, %rdi            # imm = 0x100
jne 0x8857
xorl %esi, %esi
leaq 0x112ec0(%rip), %rdi    # 0x11b750
movq %r13, %r8
movq (%rcx,%rsi,8), %r9
movl %esi, %r10d
andl $0x7, %r10d
movl %esi, %r11d
shrl $0x3, %r11d
xorl %ebx, %ebx
testq %r9, (%r13,%rbx,8)
je 0x891a
movl %ebx, %eax
andl $0x7, %eax
movl %r10d, %edx
subl %eax, %edx
movl %edx, %ebp
negl %ebp
cmovsl %edx, %ebp
movl %ebx, %eax
shrl $0x3, %eax
movl %r11d, %edx
subl %eax, %edx
movl %edx, %r14d
negl %r14d
cmovsl %edx, %r14d
movl %ebx, %eax
subl %esi, %eax
cmpl %r14d, %ebp
cmoval %ebp, %r14d
cltd
idivl %r14d
leal (%rax,%rsi), %edx
cmpq %rdx, %rbx
je 0x891a
movq %rsi, %rdx
shlq $0x9, %rdx
addq %rdi, %rdx
leaq (%rdx,%rbx,8), %rdx
movq (%rdx), %r14
cltq
leaq (%rsi,%rax,2), %r15
leaq (%r8,%rax,8), %r12
xorl %ebp, %ebp
orq (%r12,%rbp,8), %r14
leal (%r15,%rbp), %ecx
addq %rax, %rbp
cmpq %rbx, %rcx
jne 0x8907
movq %r14, (%rdx)
incq %rbx
cmpq $0x40, %rbx
jne 0x88a7
incq %rsi
addq $0x8, %r8
cmpq $0x40, %rsi
leaq 0x11be1b(%rip), %rcx    # 0x124750
jne 0x8893
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq