// File: /workspace/github_cpp_makefile_star2_O3/bjohnsonfl[P]Overhead-Chess-Engine-/bitboard.cpp
// Function: inBetweenBitMask()
void inBetweenBitMask(){
    //credit to stockfish
    for(square sq1= a1; sq1<numOfSq; sq1++){
        for(square sq2= a1; sq2<numOfSq; sq2++){
            if(!(openBoardAttacks[p_rook][sq1] & squareBitMask[sq2])) continue;
            
            inBetweenSqBitMask[sq1][sq2] = sliderAttacks(sq1, squareBitMask[sq2], p_rook) & sliderAttacks(sq2, squareBitMask[sq1], p_rook);
            lineSqBitMask[sq1][sq2] = (sliderAttacks(sq1, 0, p_rook) & sliderAttacks(sq2, 0, p_rook)) | squareBitMask[sq1] |squareBitMask[sq2] ;
           
            
        }
        for(square sq2= a1; sq2<numOfSq; sq2++){
            
            if(!(openBoardAttacks[p_bishop][sq1] & squareBitMask[sq2])) continue;
            inBetweenSqBitMask[sq1][sq2] = sliderAttacks(sq1, squareBitMask[sq2], p_bishop) & sliderAttacks(sq2, squareBitMask[sq1], p_bishop);
            lineSqBitMask[sq1][sq2] = (sliderAttacks(sq1, 0, p_bishop) & sliderAttacks(sq2, 0, p_bishop)) | squareBitMask[sq1] |squareBitMask[sq2] ;
                
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
xorl %eax, %eax
leaq 0x8a9d(%rip), %rdi      # 0xbde0
leaq 0x1a396(%rip), %r12     # 0x1d6e0
leaq 0x1a58f(%rip), %r13     # 0x1d8e0
xorl %ebp, %ebp
leaq 0x9186(%rip), %rcx      # 0xc4e0
movq 0x600(%rcx,%rbp,8), %rdx
leaq 0x4d37(%rip), %rsi      # 0x80a0
xorl %r8d, %r8d
movq (%r8,%rdi), %r9
testq %rdx, %r9
je 0x33ef
leaq 0x1a164(%rip), %rbx     # 0x1d4e0
movq (%rbx,%rbp,8), %r10
andq %r9, %r10
imulq (%r12,%rbp,8), %r10
xorl %ecx, %ecx
leaq 0x4d0f(%rip), %r11      # 0x80a0
subb (%r11,%rbp,4), %cl
shrq %cl, %r10
movq (%rdi,%rbp,8), %r11
movq (%r8,%rbx), %rbx
andq %r11, %rbx
imulq (%r8,%r12), %rbx
movb (%rsi), %r14b
xorl %ecx, %ecx
subb %r14b, %cl
shrq %cl, %rbx
movl %r10d, %ecx
movq (%r13,%rbp,8), %r10
movl %ebx, %ebx
movq (%r8,%r13), %r14
movq (%r14,%rbx,8), %rbx
andq (%r10,%rcx,8), %rbx
leaq (%rax,%r8), %rcx
leaq 0xa10c(%rip), %r15      # 0xd4e0
movq %rbx, (%r15,%rcx)
movq (%r14), %rbx
andq (%r10), %rbx
orq %r11, %r9
orq %rbx, %r9
leaq 0x120f5(%rip), %r10     # 0x154e0
movq %r9, (%r10,%rcx)
addq $0x8, %r8
addq $0x4, %rsi
cmpq $0x200, %r8             # imm = 0x200
jne 0x336c
leaq 0x90d5(%rip), %rcx      # 0xc4e0
movq 0x400(%rcx,%rbp,8), %rdx
leaq 0x4d86(%rip), %rsi      # 0x81a0
xorl %r8d, %r8d
movq (%r8,%rdi), %r9
testq %rdx, %r9
je 0x34b1
leaq 0xe26af(%rip), %rbx     # 0xe5ae0
movq (%rbx,%rbp,8), %r10
andq %r9, %r10
leaq 0xe28a1(%rip), %r14     # 0xe5ce0
imulq (%r14,%rbp,8), %r10
xorl %ecx, %ecx
leaq 0x4d53(%rip), %r11      # 0x81a0
subb (%r11,%rbp,4), %cl
shrq %cl, %r10
movq (%rdi,%rbp,8), %r11
movq (%r8,%rbx), %rbx
andq %r11, %rbx
imulq (%r8,%r14), %rbx
movb (%rsi), %r14b
xorl %ecx, %ecx
subb %r14b, %cl
shrq %cl, %rbx
movl %r10d, %ecx
leaq 0xe2a67(%rip), %r14     # 0xe5ee0
movq (%r14,%rbp,8), %r10
movl %ebx, %ebx
movq (%r8,%r14), %r14
movq (%r14,%rbx,8), %rbx
andq (%r10,%rcx,8), %rbx
leaq (%rax,%r8), %rcx
leaq 0xa04a(%rip), %r15      # 0xd4e0
movq %rbx, (%r15,%rcx)
movq (%r14), %rbx
andq (%r10), %rbx
orq %r11, %r9
orq %rbx, %r9
leaq 0x12033(%rip), %r10     # 0x154e0
movq %r9, (%r10,%rcx)
addq $0x8, %r8
addq $0x4, %rsi
cmpq $0x200, %r8             # imm = 0x200
jne 0x341d
incq %rbp
addq $0x200, %rax            # imm = 0x200
cmpq $0x40, %rbp
jne 0x3353
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq