// File: /workspace/github_cpp_makefile_star2_O1/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, 0x110822(%rip)    # 0x1185c0
movabsq $0x55aa55aa55aa55aa, %rax # imm = 0x55AA55AA55AA55AA
movq %rax, 0x110819(%rip)    # 0x1185c8
movq %rcx, 0x11081a(%rip)    # 0x1185d0
movq $0xff, 0x11084f(%rip) # 0x118610
movl $0x1, %edx
movl $0xff, %esi
leaq 0x1107fe(%rip), %rax    # 0x1185d0
leaq 0x110837(%rip), %rdi    # 0x118610
addq %rcx, %rcx
movq %rcx, (%rax,%rdx,8)
shlq $0x8, %rsi
movq %rsi, (%rdi,%rdx,8)
incq %rdx
cmpq $0x8, %rdx
jne 0x7dd9
xorl %esi, %esi
leaq 0x110856(%rip), %rcx    # 0x118650
leaq 0x11088f(%rip), %rdx    # 0x118690
testq %rsi, %rsi
je 0x7e0d
movq -0x8(%rsi,%rax), %r8
jmp 0x7e10
xorl %r8d, %r8d
cmpq $0x38, %rsi
jne 0x7e1b
xorl %r9d, %r9d
jmp 0x7e20
movq 0x8(%rsi,%rax), %r9
orq %r8, %r9
movq %r9, (%rsi,%rcx)
orq (%rsi,%rax), %r9
movq %r9, (%rsi,%rdx)
addq $0x8, %rsi
cmpq $0x40, %rsi
jne 0x7e01
xorl %r8d, %r8d
leaq 0x11088d(%rip), %rsi    # 0x1186d0
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 0x7e46
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq $0x0, 0x11051a(%rip) # 0x1183a0
movq $-0x1, 0x11071f(%rip) # 0x1185b0
movdqa 0x263b7(%rip), %xmm0    # 0x2e250
xorl %edi, %edi
movdqa 0x263bd(%rip), %xmm1    # 0x2e260
leaq 0x1102f6(%rip), %r13    # 0x1181a0
pcmpeqd %xmm2, %xmm2
leaq 0x1104fb(%rip), %r8     # 0x1183b0
movdqa 0x263b3(%rip), %xmm3    # 0x2e270
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 0x7ebd
leaq 0x11b052(%rip), %rdi    # 0x122f50
leaq 0x11ac4b(%rip), %r8     # 0x122b50
leaq 0x11a844(%rip), %r9     # 0x122750
xorl %r11d, %r11d
movl $0x200, %r10d           # imm = 0x200
movq %r11, %rbx
shlq $0x6, %rbx
addq %rsi, %rbx
xorl %r14d, %r14d
movl %r14d, %r15d
andl $-0x8, %r15d
movq (%r15,%rbx), %r15
movl %r14d, %r12d
andl $0x7, %r12d
shll $0x3, %r12d
movq (%r12,%rax), %rbp
andq %r15, %rbp
movq %rbp, (%r9,%r14,8)
movq (%r12,%rdx), %rbp
andq %r15, %rbp
andq (%r12,%rcx), %r15
movq %rbp, (%r8,%r14,8)
movq %r15, (%rdi,%r14,8)
incq %r14
cmpq $0x40, %r14
jne 0x7f22
leaq 0x1(%r11), %rbx
addq %r10, %rdi
addq %r10, %r8
addq %r10, %r9
testq %r11, %r11
movq %rbx, %r11
je 0x7f15
movdqa 0x26304(%rip), %xmm0    # 0x2e280
movdqa 0x2630c(%rip), %xmm1    # 0x2e290
movdqa 0x26314(%rip), %xmm2    # 0x2e2a0
movdqa 0x2631c(%rip), %xmm3    # 0x2e2b0
xorl %eax, %eax
movdqa 0x26322(%rip), %xmm4    # 0x2e2c0
movdqa 0x2632a(%rip), %xmm5    # 0x2e2d0
movdqa 0x26332(%rip), %xmm6    # 0x2e2e0
movdqa 0x2633a(%rip), %xmm7    # 0x2e2f0
leaq 0x11b993(%rip), %rcx    # 0x123950
movdqa 0x2633a(%rip), %xmm8    # 0x2e300
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 0x7fc6
xorl %eax, %eax
movl $0x39b9, %edx           # imm = 0x39B9
leaq 0x26873(%rip), %rsi     # 0x2ea40
leaq 0x11057c(%rip), %rdi    # 0x118750
movl %eax, %r8d
andl $0x7, %r8d
movl %eax, %ecx
shrl $0x3, %ecx
movl $0x1, %r10d
leaq 0x2687b(%rip), %r11     # 0x2ea68
btq %r10, %rdx
jb 0x8263
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 0x8258
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 0x8258
movl %ebp, %r9d
movq (%r13,%r9,8), %r9
orq %r9, (%rbx)
movl (%r14), %ebp
addq $0x4, %r14
testl %ebp, %ebp
jne 0x820b
incq %r10
addq $0x24, %r11
cmpq $0xf, %r10
jne 0x81ed
incq %rax
cmpq $0x40, %rax
jne 0x81d4
leaq 0x3d818(%rip), %rbx     # 0x45aa0
leaq 0x3d711(%rip), %r14     # 0x459a0
leaq 0x3d50a(%rip), %rdx     # 0x457a0
leaq 0x265a3(%rip), %rcx     # 0x2e840
leaq 0x2629c(%rip), %r8      # 0x2e540
leaq 0x269b5(%rip), %r9      # 0x2ec60
movq %rbx, %rdi
movq %r14, %rsi
callq 0x83f7
leaq 0x105ae3(%rip), %r15    # 0x10dda0
leaq 0x1059dc(%rip), %r12    # 0x10dca0
leaq 0x1057d5(%rip), %rdx    # 0x10daa0
leaq 0x2646e(%rip), %rcx     # 0x2e740
leaq 0x26067(%rip), %r8      # 0x2e340
leaq 0x269a0(%rip), %r9      # 0x2ec80
movq %r15, %rdi
movq %r12, %rsi
callq 0x83f7
xorl %eax, %eax
leaq 0x11b05c(%rip), %rdx    # 0x123350
leaq 0x11b255(%rip), %rsi    # 0x123550
leaq 0x11b44e(%rip), %rcx    # 0x123750
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 0x8304
xorl %esi, %esi
leaq 0x112413(%rip), %rdi    # 0x11a750
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 0x83c7
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
cmovgl %ebp, %r14d
cltd
idivl %r14d
leal (%rax,%rsi), %edx
cmpq %rdx, %rbx
je 0x83c7
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 0x83b4
movq %r14, (%rdx)
incq %rbx
cmpq $0x40, %rbx
jne 0x8354
incq %rsi
addq $0x8, %r8
cmpq $0x40, %rsi
leaq 0x11b36e(%rip), %rcx    # 0x123750
jne 0x8340
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq