// File: /workspace/github_cpp_makefile_star2_O1/jswaff[P]prophet3/test/pos__test.cpp
// Function: test_is_enemy_and_friendly_occupied()
void test_is_enemy_and_friendly_occupied() {
    position pos;
    reset_pos(&pos);
    for (int32 sq=A8;sq <= H1; sq++) {
        int32 piece = pos.piece[sq];

        if (is_white_piece(piece)) {
            assert(is_friendly_occupied(&pos,(square_t)sq,WHITE));
            assert(!is_enemy_occupied(&pos,(square_t)sq,WHITE));
        } else if (is_black_piece(piece)) {
            assert(!is_friendly_occupied(&pos,(square_t)sq,WHITE));
            assert(is_enemy_occupied(&pos,(square_t)sq,WHITE));
        }
    }

    set_pos(&pos,"rnbqkbnr/pppppppp/8/8/4P3/8/PPPP1PPP/RNBQKBNR b KQkq e3 0 1");
    for (int32 sq=A8;sq <= H1; sq++) {
        int32 piece = pos.piece[sq];

        if (is_white_piece(piece)) {
            assert(!is_friendly_occupied(&pos,(square_t)sq,BLACK));
            assert(is_enemy_occupied(&pos,(square_t)sq,BLACK));
        } else if (is_black_piece(piece)) {
            assert(is_friendly_occupied(&pos,(square_t)sq,BLACK));
            assert(!is_enemy_occupied(&pos,(square_t)sq,BLACK));
        }
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x1d0, %rsp            # imm = 0x1D0
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa43
xorl %r14d, %r14d
movl 0x8(%rsp,%r14,4), %ebp
movl %ebp, %edi
callq 0xe823
testb %al, %al
je 0x23ec6
movq %rbx, %rdi
movl %r14d, %esi
movl $0x1, %edx
callq 0xaeb6
testb %al, %al
je 0x23fc9
movq %rbx, %rdi
movl %r14d, %esi
movl $0x1, %edx
callq 0xae33
testb %al, %al
je 0x23f01
jmp 0x23faa
movl %ebp, %edi
callq 0xe829
testb %al, %al
je 0x23f01
movq %rbx, %rdi
movl %r14d, %esi
movl $0x1, %edx
callq 0xaeb6
testb %al, %al
jne 0x24045
movq %rbx, %rdi
movl %r14d, %esi
movl $0x1, %edx
callq 0xae33
testb %al, %al
je 0x24026
incq %r14
cmpq $0x40, %r14
jne 0x23e85
leaq 0x955e(%rip), %rsi      # 0x2d473
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa74
xorl %r14d, %r14d
movl 0x8(%rsp,%r14,4), %ebp
movl %ebp, %edi
callq 0xe823
testb %al, %al
je 0x23f60
movq %rbx, %rdi
movl %r14d, %esi
xorl %edx, %edx
callq 0xaeb6
testb %al, %al
jne 0x23fe8
movq %rbx, %rdi
movl %r14d, %esi
xorl %edx, %edx
callq 0xae33
testb %al, %al
jne 0x23f95
jmp 0x24007
movl %ebp, %edi
callq 0xe829
testb %al, %al
je 0x23f95
movq %rbx, %rdi
movl %r14d, %esi
xorl %edx, %edx
callq 0xaeb6
testb %al, %al
je 0x24064
movq %rbx, %rdi
movl %r14d, %esi
xorl %edx, %edx
callq 0xae33
testb %al, %al
jne 0x24083
incq %r14
cmpq $0x40, %r14
jne 0x23f25
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x12621(%rip), %rdi     # 0x365d2
leaq 0x116d0(%rip), %rsi     # 0x35688
leaq 0x125e8(%rip), %rcx     # 0x365a7
movl $0x1c1, %edx            # imm = 0x1C1
callq 0x20d0
leaq 0x1262f(%rip), %rdi     # 0x365ff
leaq 0x116b1(%rip), %rsi     # 0x35688
leaq 0x125c9(%rip), %rcx     # 0x365a7
movl $0x1c0, %edx            # imm = 0x1C0
callq 0x20d0
leaq 0x1263e(%rip), %rdi     # 0x3662d
leaq 0x11692(%rip), %rsi     # 0x35688
leaq 0x125aa(%rip), %rcx     # 0x365a7
movl $0x1cd, %edx            # imm = 0x1CD
callq 0x20d0
leaq 0x1264f(%rip), %rdi     # 0x3665d
leaq 0x11673(%rip), %rsi     # 0x35688
leaq 0x1258b(%rip), %rcx     # 0x365a7
movl $0x1ce, %edx            # imm = 0x1CE
callq 0x20d0
leaq 0x125a6(%rip), %rdi     # 0x365d3
leaq 0x11654(%rip), %rsi     # 0x35688
leaq 0x1256c(%rip), %rcx     # 0x365a7
movl $0x1c4, %edx            # imm = 0x1C4
callq 0x20d0
leaq 0x125b2(%rip), %rdi     # 0x365fe
leaq 0x11635(%rip), %rsi     # 0x35688
leaq 0x1254d(%rip), %rcx     # 0x365a7
movl $0x1c3, %edx            # imm = 0x1C3
callq 0x20d0
leaq 0x125c3(%rip), %rdi     # 0x3662e
leaq 0x11616(%rip), %rsi     # 0x35688
leaq 0x1252e(%rip), %rcx     # 0x365a7
movl $0x1d0, %edx            # imm = 0x1D0
callq 0x20d0
leaq 0x125d2(%rip), %rdi     # 0x3665c
leaq 0x115f7(%rip), %rsi     # 0x35688
leaq 0x1250f(%rip), %rcx     # 0x365a7
movl $0x1d1, %edx            # imm = 0x1D1
callq 0x20d0