// File: bjohnsonfl[P]Overhead-Chess-Engine-/bitboard.cpp
// Function: allPawnAttacks()
void allPawnAttacks(){
    bitboard pawnA = 0ULL, pawnH = 0ULL, pawnAttacks = 0ULL;
    square sq = a1;
    
    for(rank rk = rank_1; rk<numOfRank-1; rk++)
    {
        for(file f = file_a; f<numOfFile; f++)
        {
            sq = rankFile_to_sq(rk, f);
            pawnA = squareBitMask[sq] & clearFile[file_a];
            pawnH = squareBitMask[sq] & clearFile[file_h];
            
            pawnAttacks |= (pawnA << noWe);
            pawnAttacks |= (pawnH << noEa);
            
            //printBitboard(pawnAttacks);
            openBoardPawnAttacks[0][sq] = pawnAttacks;
            pawnAttacks = 0ULL;
        }
    }
    
    for(rank rk = rank_8; rk > rank_1; rk--)
    {
        for(file f = file_a; f<numOfFile; f++)
        {
            sq = rankFile_to_sq(rk, f);
            pawnA = squareBitMask[sq] & clearFile[file_a];
            pawnH = squareBitMask[sq] & clearFile[file_h];
            
            pawnAttacks |= (pawnA >> -soWe);
            pawnAttacks |= (pawnH >> -soEa);
            
            //printBitboard(pawnAttacks);
            openBoardPawnAttacks[1][sq] = pawnAttacks;
            pawnAttacks = 0ULL;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq $0x0, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
cmpl $0x7, -0x20(%rbp)
jge 0x446b
movl $0x0, -0x24(%rbp)
cmpl $0x8, -0x24(%rbp)
jge 0x4459
movl -0x20(%rbp), %edi
movl -0x24(%rbp), %esi
callq 0x5a00
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, %ecx
leaq 0xeabd(%rip), %rax      # 0x12ea0
movq (%rax,%rcx,8), %rax
andq 0xf132(%rip), %rax      # 0x13520
movq %rax, -0x8(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, %ecx
leaq 0xeaa2(%rip), %rax      # 0x12ea0
movq (%rax,%rcx,8), %rax
andq 0xf14f(%rip), %rax      # 0x13558
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
shlq $0x7, %rax
orq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
shlq $0x9, %rax
orq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdx
movl -0x1c(%rbp), %eax
movl %eax, %ecx
leaq 0xfd63(%rip), %rax      # 0x141a0
movq %rdx, (%rax,%rcx,8)
movq $0x0, -0x18(%rbp)
leaq -0x24(%rbp), %rdi
xorl %esi, %esi
callq 0x5a20
jmp 0x43bf
jmp 0x445b
leaq -0x20(%rbp), %rdi
xorl %esi, %esi
callq 0x5a40
jmp 0x43ae
movl $0x7, -0x28(%rbp)
cmpl $0x0, -0x28(%rbp)
jle 0x4533
movl $0x0, -0x2c(%rbp)
cmpl $0x8, -0x2c(%rbp)
jge 0x4521
movl -0x28(%rbp), %edi
movl -0x2c(%rbp), %esi
callq 0x5a00
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, %ecx
leaq 0xe9f9(%rip), %rax      # 0x12ea0
movq (%rax,%rcx,8), %rax
andq 0xf06e(%rip), %rax      # 0x13520
movq %rax, -0x8(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, %ecx
leaq 0xe9de(%rip), %rax      # 0x12ea0
movq (%rax,%rcx,8), %rax
andq 0xf08b(%rip), %rax      # 0x13558
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
shrq $0x9, %rax
orq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
shrq $0x7, %rax
orq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdx
movl -0x1c(%rbp), %eax
movl %eax, %ecx
leaq 0xfc9f(%rip), %rax      # 0x141a0
movq %rdx, 0x200(%rax,%rcx,8)
movq $0x0, -0x18(%rbp)
leaq -0x2c(%rbp), %rdi
xorl %esi, %esi
callq 0x5a20
jmp 0x4483
jmp 0x4523
leaq -0x28(%rbp), %rdi
xorl %esi, %esi
callq 0x5a60
jmp 0x4472
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)