// File: /workspace/github_cpp_makefile_star2_O1/jswaff[P]prophet3/test/pos__test.cpp
// Function: test_remove_rook_castling_availability()
void test_remove_rook_castling_availability() {
    position pos;
    reset_pos(&pos);
    assert(can_castle_wk(&pos));
    assert(can_castle_wq(&pos));
    assert(can_castle_bk(&pos));
    assert(can_castle_bq(&pos));

    remove_rook_castling_availability(&pos,A1);
    assert(can_castle_wk(&pos));
    assert(!can_castle_wq(&pos));
    assert(can_castle_bk(&pos));
    assert(can_castle_bq(&pos));

    remove_rook_castling_availability(&pos,H8);
    assert(can_castle_wk(&pos));
    assert(!can_castle_wq(&pos));
    assert(!can_castle_bk(&pos));
    assert(can_castle_bq(&pos));

    remove_rook_castling_availability(&pos,H8);
    assert(can_castle_wk(&pos));
    assert(!can_castle_wq(&pos));
    assert(!can_castle_bk(&pos));
    assert(can_castle_bq(&pos));

    remove_rook_castling_availability(&pos,H1);
    assert(!can_castle_wk(&pos));
    assert(!can_castle_wq(&pos));
    assert(!can_castle_bk(&pos));
    assert(can_castle_bq(&pos));

    remove_rook_castling_availability(&pos,A8);
    assert(pos.castling_rights==0);

}

// Assembly:
pushq %rbx
subq $0x1d0, %rsp            # imm = 0x1D0
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa43
movq %rbx, %rdi
callq 0xa966
testb %al, %al
je 0x230a3
leaq 0x8(%rsp), %rdi
callq 0xa96f
testb %al, %al
je 0x230c2
leaq 0x8(%rsp), %rdi
callq 0xa97a
testb %al, %al
je 0x230e1
leaq 0x8(%rsp), %rdi
callq 0xa986
testb %al, %al
je 0x23100
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movl $0x38, %esi
callq 0xa992
movq %rbx, %rdi
callq 0xa966
testb %al, %al
je 0x2311f
leaq 0x8(%rsp), %rdi
callq 0xa96f
testb %al, %al
jne 0x2313e
leaq 0x8(%rsp), %rdi
callq 0xa97a
testb %al, %al
je 0x2315d
leaq 0x8(%rsp), %rdi
callq 0xa986
testb %al, %al
je 0x2317c
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movl $0x7, %esi
callq 0xa992
movq %rbx, %rdi
callq 0xa966
testb %al, %al
je 0x2319b
leaq 0x8(%rsp), %rdi
callq 0xa96f
testb %al, %al
jne 0x231ba
leaq 0x8(%rsp), %rdi
callq 0xa97a
testb %al, %al
jne 0x231d9
leaq 0x8(%rsp), %rdi
callq 0xa986
testb %al, %al
je 0x231f8
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movl $0x7, %esi
callq 0xa992
movq %rbx, %rdi
callq 0xa966
testb %al, %al
je 0x23217
leaq 0x8(%rsp), %rdi
callq 0xa96f
testb %al, %al
jne 0x23236
leaq 0x8(%rsp), %rdi
callq 0xa97a
testb %al, %al
jne 0x23255
leaq 0x8(%rsp), %rdi
callq 0xa986
testb %al, %al
je 0x23274
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movl $0x3f, %esi
callq 0xa992
movq %rbx, %rdi
callq 0xa966
testb %al, %al
jne 0x23293
leaq 0x8(%rsp), %rdi
callq 0xa96f
testb %al, %al
jne 0x232b2
leaq 0x8(%rsp), %rdi
callq 0xa97a
testb %al, %al
jne 0x232d1
leaq 0x8(%rsp), %rdi
callq 0xa986
testb %al, %al
je 0x232f0
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0xa992
cmpl $0x0, 0x140(%rbx)
jne 0x2330f
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbx
retq
leaq 0x12e9b(%rip), %rdi     # 0x35f45
leaq 0x125d7(%rip), %rsi     # 0x35688
leaq 0x12e5e(%rip), %rcx     # 0x35f16
movl $0xf0, %edx
callq 0x20d0
leaq 0x12df8(%rip), %rdi     # 0x35ec1
leaq 0x125b8(%rip), %rsi     # 0x35688
leaq 0x12e3f(%rip), %rcx     # 0x35f16
movl $0xf1, %edx
callq 0x20d0
leaq 0x12e03(%rip), %rdi     # 0x35eeb
leaq 0x12599(%rip), %rsi     # 0x35688
leaq 0x12e20(%rip), %rcx     # 0x35f16
movl $0xf2, %edx
callq 0x20d0
leaq 0x12dcf(%rip), %rdi     # 0x35ed6
leaq 0x1257a(%rip), %rsi     # 0x35688
leaq 0x12e01(%rip), %rcx     # 0x35f16
movl $0xf3, %edx
callq 0x20d0
leaq 0x12e1f(%rip), %rdi     # 0x35f45
leaq 0x1255b(%rip), %rsi     # 0x35688
leaq 0x12de2(%rip), %rcx     # 0x35f16
movl $0xf6, %edx
callq 0x20d0
leaq 0x12d7b(%rip), %rdi     # 0x35ec0
leaq 0x1253c(%rip), %rsi     # 0x35688
leaq 0x12dc3(%rip), %rcx     # 0x35f16
movl $0xf7, %edx
callq 0x20d0
leaq 0x12d87(%rip), %rdi     # 0x35eeb
leaq 0x1251d(%rip), %rsi     # 0x35688
leaq 0x12da4(%rip), %rcx     # 0x35f16
movl $0xf8, %edx
callq 0x20d0
leaq 0x12d53(%rip), %rdi     # 0x35ed6
leaq 0x124fe(%rip), %rsi     # 0x35688
leaq 0x12d85(%rip), %rcx     # 0x35f16
movl $0xf9, %edx
callq 0x20d0
leaq 0x12da3(%rip), %rdi     # 0x35f45
leaq 0x124df(%rip), %rsi     # 0x35688
leaq 0x12d66(%rip), %rcx     # 0x35f16
movl $0xfc, %edx
callq 0x20d0
leaq 0x12cff(%rip), %rdi     # 0x35ec0
leaq 0x124c0(%rip), %rsi     # 0x35688
leaq 0x12d47(%rip), %rcx     # 0x35f16
movl $0xfd, %edx
callq 0x20d0
leaq 0x12d0a(%rip), %rdi     # 0x35eea
leaq 0x124a1(%rip), %rsi     # 0x35688
leaq 0x12d28(%rip), %rcx     # 0x35f16
movl $0xfe, %edx
callq 0x20d0
leaq 0x12cd7(%rip), %rdi     # 0x35ed6
leaq 0x12482(%rip), %rsi     # 0x35688
leaq 0x12d09(%rip), %rcx     # 0x35f16
movl $0xff, %edx
callq 0x20d0
leaq 0x12d27(%rip), %rdi     # 0x35f45
leaq 0x12463(%rip), %rsi     # 0x35688
leaq 0x12cea(%rip), %rcx     # 0x35f16
movl $0x102, %edx            # imm = 0x102
callq 0x20d0
leaq 0x12c83(%rip), %rdi     # 0x35ec0
leaq 0x12444(%rip), %rsi     # 0x35688
leaq 0x12ccb(%rip), %rcx     # 0x35f16
movl $0x103, %edx            # imm = 0x103
callq 0x20d0
leaq 0x12c8e(%rip), %rdi     # 0x35eea
leaq 0x12425(%rip), %rsi     # 0x35688
leaq 0x12cac(%rip), %rcx     # 0x35f16
movl $0x104, %edx            # imm = 0x104
callq 0x20d0
leaq 0x12c5b(%rip), %rdi     # 0x35ed6
leaq 0x12406(%rip), %rsi     # 0x35688
leaq 0x12c8d(%rip), %rcx     # 0x35f16
movl $0x105, %edx            # imm = 0x105
callq 0x20d0
leaq 0x12caa(%rip), %rdi     # 0x35f44
leaq 0x123e7(%rip), %rsi     # 0x35688
leaq 0x12c6e(%rip), %rcx     # 0x35f16
movl $0x108, %edx            # imm = 0x108
callq 0x20d0
leaq 0x12c07(%rip), %rdi     # 0x35ec0
leaq 0x123c8(%rip), %rsi     # 0x35688
leaq 0x12c4f(%rip), %rcx     # 0x35f16
movl $0x109, %edx            # imm = 0x109
callq 0x20d0
leaq 0x12c12(%rip), %rdi     # 0x35eea
leaq 0x123a9(%rip), %rsi     # 0x35688
leaq 0x12c30(%rip), %rcx     # 0x35f16
movl $0x10a, %edx            # imm = 0x10A
callq 0x20d0
leaq 0x12bdf(%rip), %rdi     # 0x35ed6
leaq 0x1238a(%rip), %rsi     # 0x35688
leaq 0x12c11(%rip), %rcx     # 0x35f16
movl $0x10b, %edx            # imm = 0x10B
callq 0x20d0
leaq 0x12be9(%rip), %rdi     # 0x35eff
leaq 0x1236b(%rip), %rsi     # 0x35688
leaq 0x12bf2(%rip), %rcx     # 0x35f16
movl $0x10e, %edx            # imm = 0x10E
callq 0x20d0