// File: /workspace/github_cpp_makefile_star2_O3/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 0xaa51
xorl %r14d, %r14d
movl 0x8(%rsp,%r14,4), %ebp
movl %ebp, %edi
callq 0xe769
testb %al, %al
je 0x23d1b
movq %rbx, %rdi
movl %r14d, %esi
movl $0x1, %edx
callq 0xaebe
testb %al, %al
je 0x23e1e
movq %rbx, %rdi
movl %r14d, %esi
movl $0x1, %edx
callq 0xae3b
testb %al, %al
je 0x23d56
jmp 0x23dff
movl %ebp, %edi
callq 0xe76f
testb %al, %al
je 0x23d56
movq %rbx, %rdi
movl %r14d, %esi
movl $0x1, %edx
callq 0xaebe
testb %al, %al
jne 0x23e9a
movq %rbx, %rdi
movl %r14d, %esi
movl $0x1, %edx
callq 0xae3b
testb %al, %al
je 0x23e7b
incq %r14
cmpq $0x40, %r14
jne 0x23cda
leaq 0x9789(%rip), %rsi      # 0x2d4f3
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa82
xorl %r14d, %r14d
movl 0x8(%rsp,%r14,4), %ebp
movl %ebp, %edi
callq 0xe769
testb %al, %al
je 0x23db5
movq %rbx, %rdi
movl %r14d, %esi
xorl %edx, %edx
callq 0xaebe
testb %al, %al
jne 0x23e3d
movq %rbx, %rdi
movl %r14d, %esi
xorl %edx, %edx
callq 0xae3b
testb %al, %al
jne 0x23dea
jmp 0x23e5c
movl %ebp, %edi
callq 0xe76f
testb %al, %al
je 0x23dea
movq %rbx, %rdi
movl %r14d, %esi
xorl %edx, %edx
callq 0xaebe
testb %al, %al
je 0x23eb9
movq %rbx, %rdi
movl %r14d, %esi
xorl %edx, %edx
callq 0xae3b
testb %al, %al
jne 0x23ed8
incq %r14
cmpq $0x40, %r14
jne 0x23d7a
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x1284c(%rip), %rdi     # 0x36652
leaq 0x118fb(%rip), %rsi     # 0x35708
leaq 0x12813(%rip), %rcx     # 0x36627
movl $0x1c1, %edx            # imm = 0x1C1
callq 0x20d0
leaq 0x1285a(%rip), %rdi     # 0x3667f
leaq 0x118dc(%rip), %rsi     # 0x35708
leaq 0x127f4(%rip), %rcx     # 0x36627
movl $0x1c0, %edx            # imm = 0x1C0
callq 0x20d0
leaq 0x12869(%rip), %rdi     # 0x366ad
leaq 0x118bd(%rip), %rsi     # 0x35708
leaq 0x127d5(%rip), %rcx     # 0x36627
movl $0x1cd, %edx            # imm = 0x1CD
callq 0x20d0
leaq 0x1287a(%rip), %rdi     # 0x366dd
leaq 0x1189e(%rip), %rsi     # 0x35708
leaq 0x127b6(%rip), %rcx     # 0x36627
movl $0x1ce, %edx            # imm = 0x1CE
callq 0x20d0
leaq 0x127d1(%rip), %rdi     # 0x36653
leaq 0x1187f(%rip), %rsi     # 0x35708
leaq 0x12797(%rip), %rcx     # 0x36627
movl $0x1c4, %edx            # imm = 0x1C4
callq 0x20d0
leaq 0x127dd(%rip), %rdi     # 0x3667e
leaq 0x11860(%rip), %rsi     # 0x35708
leaq 0x12778(%rip), %rcx     # 0x36627
movl $0x1c3, %edx            # imm = 0x1C3
callq 0x20d0
leaq 0x127ee(%rip), %rdi     # 0x366ae
leaq 0x11841(%rip), %rsi     # 0x35708
leaq 0x12759(%rip), %rcx     # 0x36627
movl $0x1d0, %edx            # imm = 0x1D0
callq 0x20d0
leaq 0x127fd(%rip), %rdi     # 0x366dc
leaq 0x11822(%rip), %rsi     # 0x35708
leaq 0x1273a(%rip), %rcx     # 0x36627
movl $0x1d1, %edx            # imm = 0x1D1
callq 0x20d0