// File: /workspace/github_cpp_makefile_star2_O2/tyhsu[P]Ewn/play.cpp
// Function: Play::two_AIs_mode()
void Play::two_AIs_mode()
{
    cout << "==========The first AI (A)==========" << endl;
    EwnAI ewnAI1;
    cout << "==========The second AI (B)==========" << endl;
    EwnAI ewnAI2;
    this->game.print_board();
    while (1) {
        int dice = this->game.roll_dice();
        cout << "dice: " << dice+1 << endl;

        int game_status;
        if (!this->game.get_is_switch())	// the first AI (A)
            game_status = this->game.update_game_status(ewnAI1.AI_move(this->game, dice));
        else					// the second AI (B)
            game_status = this->game.update_game_status(ewnAI2.AI_move(this->game, dice));
        this->game.print_board();

        //update: 0(game continues), 1(A wins), 2(B wins)
        if (game_status!=0) {
            cout << "====================================" << endl;
            if (game_status==1) cout << "A is the winner!!!" << endl;
            else cout << "B is the winner!!!" << endl;
            cout << "====================================" << endl;
            return;
        }
        this->game.switch_player();
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x718, %rsp            # imm = 0x718
movq %rdi, %rbx
movq 0x9496(%rip), %r14      # 0xbfc8
leaq 0x5629(%rip), %rsi      # 0x8162
movq %r14, %rdi
callq 0x2150
movq %rax, %rdi
callq 0x2090
leaq -0x570(%rbp), %rdi
callq 0x3c24
leaq 0x562b(%rip), %rsi      # 0x8187
movq %r14, %rdi
callq 0x2150
movq %rax, %rdi
callq 0x2090
leaq -0x2d0(%rbp), %rdi
callq 0x3c24
movq %rbx, %rdi
callq 0x6652
leaq -0x658(%rbp), %r12
leaq -0x30(%rbp), %r13
leaq -0x740(%rbp), %r14
movq %rbx, %rdi
callq 0x679c
movl %eax, %r15d
movq 0x9424(%rip), %rdi      # 0xbfc8
leaq 0x558a(%rip), %rsi      # 0x8135
callq 0x2150
leal 0x1(%r15), %esi
movq %rax, %rdi
callq 0x2210
movq %rax, %rdi
callq 0x2090
movq %rbx, %rdi
callq 0x6d72
testb %al, %al
je 0x2bfe
movq %r12, %rdi
movq %rbx, %rsi
callq 0x6336
leaq -0x2d0(%rbp), %rdi
movq %r12, %rsi
movl %r15d, %edx
callq 0x3f00
movq %rax, -0x30(%rbp)
movq %rbx, %rdi
movq %r13, %rsi
callq 0x692c
jmp 0x2c2a
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6336
leaq -0x570(%rbp), %rdi
movq %r14, %rsi
movl %r15d, %edx
callq 0x3f00
movq %rax, -0x30(%rbp)
movq %rbx, %rdi
movq %r13, %rsi
callq 0x692c
movl %eax, %r15d
movq %rbx, %rdi
callq 0x6652
testl %r15d, %r15d
jne 0x2c47
movq %rbx, %rdi
callq 0x6a92
jmp 0x2b92
movq 0x937a(%rip), %rdi      # 0xbfc8
leaq 0x58da(%rip), %rsi      # 0x852f
callq 0x2150
movq %rax, %rdi
callq 0x2090
cmpl $0x1, %r15d
leaq 0x54cf(%rip), %rax      # 0x813c
leaq 0x54db(%rip), %rsi      # 0x814f
cmoveq %rax, %rsi
movq 0x9349(%rip), %rdi      # 0xbfc8
callq 0x2150
movq %rax, %rdi
callq 0x2090
movq 0x9335(%rip), %rdi      # 0xbfc8
leaq 0x5895(%rip), %rsi      # 0x852f
callq 0x2150
movq %rax, %rdi
callq 0x2090
leaq -0x2d0(%rbp), %rdi
callq 0x3b3e
leaq -0x570(%rbp), %rdi
callq 0x3b3e
addq $0x718, %rsp            # imm = 0x718
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2ce2
jmp 0x2cd5
movq %rax, %rbx
jmp 0x2cf1
jmp 0x2ce2
jmp 0x2ce2
jmp 0x2ce2
jmp 0x2ce2
movq %rax, %rbx
leaq -0x2d0(%rbp), %rdi
callq 0x3b3e
leaq -0x570(%rbp), %rdi
callq 0x3b3e
movq %rbx, %rdi
callq 0x2220
nop