// File: /workspace/github_cpp_makefile_star2_O1/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, %r14
movq 0xa094(%rip), %rbx      # 0xcfc8
leaq 0x6227(%rip), %rsi      # 0x9162
movl $0x24, %edx
movq %rbx, %rdi
callq 0x2170
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20c0
leaq -0x570(%rbp), %rdi
callq 0x4e44
leaq 0x6205(%rip), %rsi      # 0x9187
movl $0x25, %edx
movq %rbx, %rdi
callq 0x2170
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq 0xa01b(%rip), %r12      # 0xcfc8
movq %r12, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20c0
leaq -0x2d0(%rbp), %rdi
callq 0x4e44
movq %r14, %rdi
callq 0x7d9c
leaq -0x2d0(%rbp), %r15
movq %r14, %rdi
callq 0x7fe4
movl %eax, %r13d
movl $0x6, %edx
movq %r12, %rdi
leaq 0x6143(%rip), %rsi      # 0x9135
callq 0x2170
leal 0x1(%r13), %esi
movq %r12, %rdi
callq 0x21f0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20c0
movq %r14, %rdi
callq 0x872e
testb %al, %al
je 0x306c
leaq -0x658(%rbp), %rdi
movq %r14, %rsi
callq 0x7a74
movq %r15, %rdi
leaq -0x658(%rbp), %rsi
movl %r13d, %edx
callq 0x5478
movq %rax, -0x30(%rbp)
movq %r14, %rdi
leaq -0x30(%rbp), %rsi
callq 0x818e
jmp 0x30a1
leaq -0x740(%rbp), %rdi
movq %r14, %rsi
callq 0x7a74
leaq -0x570(%rbp), %rdi
leaq -0x740(%rbp), %rsi
movl %r13d, %edx
callq 0x5478
movq %rax, -0x30(%rbp)
movq %r14, %rdi
leaq -0x30(%rbp), %rsi
callq 0x818e
movl %eax, %r13d
movq %r14, %rdi
callq 0x7d9c
testl %r13d, %r13d
je 0x317a
movl $0x24, %edx
movq %r12, %rdi
leaq 0x646b(%rip), %rsi      # 0x952f
callq 0x2170
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %r12, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20c0
cmpl $0x1, %r13d
leaq 0x6053(%rip), %rsi      # 0x914f
leaq 0x6039(%rip), %rax      # 0x913c
cmoveq %rax, %rsi
movl $0x12, %edx
movq %r12, %rdi
callq 0x2170
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %r12, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20c0
movl $0x24, %edx
movq %r12, %rdi
leaq 0x63e4(%rip), %rsi      # 0x952f
callq 0x2170
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %r12, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20c0
jmp 0x3182
movq %r14, %rdi
callq 0x8316
testl %r13d, %r13d
je 0x2fd8
movl $0x288, %eax            # imm = 0x288
leaq (%r15,%rax), %rdi
callq 0x6090
leaq 0x9bd8(%rip), %rbx      # 0xcd78
addq $0x10, %rbx
leaq -0x280(%rbp), %rax
movq %rbx, 0x1b8(%rax)
movq %rax, %r14
movl $0x250, %r12d           # imm = 0x250
leaq (%r15,%r12), %rdi
callq 0x4de6
movl $0x220, %r13d           # imm = 0x220
leaq (%r15,%r13), %rdi
callq 0x4de6
movq %rbx, 0x138(%r14)
movl $0x1d0, %r14d           # imm = 0x1D0
leaq (%r15,%r14), %rdi
callq 0x4de6
movl $0x1a0, %eax            # imm = 0x1A0
leaq (%r15,%rax), %rdi
callq 0x4de6
leaq -0x280(%rbp), %rax
movq %rbx, 0xb8(%rax)
movl $0x150, %eax            # imm = 0x150
leaq (%r15,%rax), %rdi
callq 0x4de6
movl $0x120, %eax            # imm = 0x120
leaq (%r15,%rax), %rdi
callq 0x4de6
leaq -0x280(%rbp), %rax
movq %rbx, 0x38(%rax)
movl $0xd0, %eax
leaq (%r15,%rax), %rdi
callq 0x4de6
movl $0xa0, %eax
addq %rax, %r15
movq %r15, %rdi
callq 0x4de6
leaq -0x280(%rbp), %rdi
movq %rbx, -0x48(%rdi)
callq 0x4de6
leaq -0x2b0(%rbp), %rdi
callq 0x4de6
leaq -0x570(%rbp), %r15
movl $0x288, %edi            # imm = 0x288
addq %r15, %rdi
callq 0x6090
leaq -0x520(%rbp), %rax
movq %rbx, 0x1b8(%rax)
addq %r15, %r12
movq %r12, %rdi
callq 0x4de6
addq %r15, %r13
movq %r13, %rdi
callq 0x4de6
leaq -0x520(%rbp), %rax
movq %rbx, 0x138(%rax)
addq %r15, %r14
movq %r14, %rdi
callq 0x4de6
movl $0x1a0, %edi            # imm = 0x1A0
addq %r15, %rdi
callq 0x4de6
leaq -0x520(%rbp), %r14
movq %rbx, 0xb8(%r14)
movl $0x150, %edi            # imm = 0x150
addq %r15, %rdi
callq 0x4de6
movl $0x120, %edi            # imm = 0x120
addq %r15, %rdi
callq 0x4de6
movq %rbx, 0x38(%r14)
movl $0xd0, %edi
addq %r15, %rdi
callq 0x4de6
movl $0xa0, %eax
addq %rax, %r15
movq %r15, %rdi
callq 0x4de6
movq %r14, %rdi
movq %rbx, -0x48(%r14)
callq 0x4de6
leaq -0x550(%rbp), %rdi
callq 0x4de6
addq $0x718, %rsp            # imm = 0x718
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3346
jmp 0x333b
movq %rax, %rbx
jmp 0x3355
jmp 0x3346
jmp 0x3346
jmp 0x3346
movq %rax, %rbx
leaq -0x2d0(%rbp), %rdi
callq 0x4d2c
leaq -0x570(%rbp), %rdi
callq 0x4d2c
movq %rbx, %rdi
callq 0x2200
nop