// File: /workspace/github_cpp_makefile_star2_O3/tyhsu[P]Ewn/play.cpp
// Function: Play::compare_AI_mode()
void Play::compare_AI_mode()
{
    char mode_name[9][25] = { "evaluate_feature", \
                            "simulate_rand_type1", \
                            "simulate_rand_type2", \
                            "simulate_rand_type3", \
                            "simulate_rand_type4", \
                            "MCTS", \
                            "Random", \
                            "MCTS_simulate_rand_type3", \
                            "MCTS_simulate_rand_type4"};

    int mode_A, mode_B;
    int game_cnt;
    int win_cnt_A1 = 0, win_cnt_A2 = 0, win_cnt_B1 = 0, win_cnt_B2 = 0;
    double max_time_cost_A = 0, max_time_cost_B = 0;
    double total_time_cost_A = 0, total_time_cost_B = 0;
    double avg_move_timer_A1 = 0, avg_move_timer_B1 = 0, avg_move_timer_A2 = 0, avg_move_timer_B2 = 0;
    cout << "Please choose two AIs:" << endl;
    cout << "0)Minimax evaluating with feature" << endl;
    cout << "1)Minimax evaluating with simulation 1" << endl;
    cout << "2)Minimax evaluating with simulation 2" << endl;
    cout << "3)Minimax evaluating with simulation 3" << endl;
    cout << "4)Minimax evaluating with simulation 4" << endl;
    cout << "5)MCTS" << endl;
    cout << "6)Random" << endl;
    cout << "Choose: ";
    cout << "modeA choose: ";
    cin >> mode_A;
    cout << "modeB choose: ";
    cin >> mode_B;
    cout << "Please enter the count of the games: ";
    cin >> game_cnt;

    // modeA plays first, then modeB
    cout << "========== modeA then modeB ==========" << endl;
    for(int i = 0; i < game_cnt ; i++){
        Game init_game = this->game;
        EwnAI ewnAI1(mode_A);
        EwnAI ewnAI2(mode_B);
        while (1) {
            int debug = 0;
            int dice = init_game.roll_dice();

            int game_status;
            if (!init_game.get_is_switch()) {	// the first AI (A)
                cerr << "-";
                cerr.flush();
                clock_t init_time = clock();
                Movement mvmt = ewnAI1.AI_move(init_game, dice);
                game_status = init_game.update_game_status(mvmt);
                double time_cost = (double)(clock() - init_time) / CLOCKS_PER_SEC;
                max_time_cost_A = max(max_time_cost_A, time_cost);
                total_time_cost_A += time_cost;
                avg_move_timer_A1 += 1;
            }
            else {								// the second AI (B)
                cerr << "-";
                cerr.flush();
                clock_t init_time = clock();
                Movement mvmt = ewnAI2.AI_move(init_game, dice);
                game_status = init_game.update_game_status(mvmt);
                double time_cost = (double)(clock() - init_time) / CLOCKS_PER_SEC;
                max_time_cost_B = max(max_time_cost_B, time_cost);
                total_time_cost_B += time_cost;
                avg_move_timer_B1 += 1;
            }
            //update: 0(game continues), 1(A wins), 2(B wins)
            if (game_status!=0) {
                if (game_status==1) {
                    win_cnt_A1 ++ ;
                    cout << "A wins.  " << win_cnt_A1 + win_cnt_B1 << " games." << endl;
                }

                else {
                    win_cnt_B1 ++;
                    cout << "B wins.  " << win_cnt_A1 + win_cnt_B1 << " games." << endl;
                }
                break;
            }
            init_game.switch_player();
        }
    }
    printf("%-25s%-10s%-10s%-10s\n", "mode", "wins", "max_time_cost", "total_time_cost");
    printf("%-25s%-10d%-10lf%-10lf\n", mode_name[mode_A], win_cnt_A1, max_time_cost_A, total_time_cost_A);
    printf("%-25s%-10d%-10lf%-10lf\n", mode_name[mode_B], win_cnt_B1, max_time_cost_B, total_time_cost_B);

    // modeB plays first, then modeA
    cout << "========== modeB then modeA ==========" << endl;
    for (int i = 0; i < game_cnt ; i++){
        Game init_game = this->game;
        EwnAI ewnAI1(mode_B);
        EwnAI ewnAI2(mode_A);
        while (1) {
            int debug = 0;
            int dice = init_game.roll_dice();

            int game_status;
            if (!init_game.get_is_switch()) {	// the first AI (B)
                cerr << "-";
                cerr.flush();
                clock_t init_time = clock();
                Movement mvmt = ewnAI1.AI_move(init_game, dice);
                game_status = init_game.update_game_status(mvmt);
                double time_cost = (double)(clock() - init_time) / CLOCKS_PER_SEC;
                max_time_cost_B = max(max_time_cost_B, time_cost);
                avg_move_timer_B2 += 1;
            }
            else {							// the second AI (A)
                cerr << "-";
                cerr.flush();
                clock_t init_time = clock();
                Movement mvmt = ewnAI2.AI_move(init_game, dice);
                game_status = init_game.update_game_status(mvmt);
                double time_cost = (double)(clock() - init_time) / CLOCKS_PER_SEC;
                max_time_cost_A = max(max_time_cost_A, time_cost);
                avg_move_timer_A2 += 1;
            }
            //update: 0(game continues), 1(B wins), 2(A wins)
            if (game_status!=0) {
                if (game_status==1) {
                    win_cnt_B2 ++ ;
                    cout << "B wins.  " << win_cnt_A2 + win_cnt_B2 << " games." << endl;
                }

                else {
                    win_cnt_A2 ++;
                    cout << "A win.  " << win_cnt_A2 + win_cnt_B2 << " games." <<endl;
                }
                break;
            }
            init_game.switch_player();
        }
    }
    cout << endl << "==================================================" << endl;
    cout << "========== modeA then modeB ==========" << endl;
    printf("%-30s%-10s%-15s%-20s%-20s%s\n", "mode", "wins", "max_time_cost", "total_time_cost", "move_count", "time_cost_per_move(avg)");
    printf("%-30s%-10d%-15lf%-20lf%-20lf%lf\n", mode_name[mode_A], win_cnt_A1, max_time_cost_A, total_time_cost_A, avg_move_timer_A1, total_time_cost_A/avg_move_timer_A1);
    printf("%-30s%-10d%-15lf%-20lf%-20lf%lf\n", mode_name[mode_B], win_cnt_B1, max_time_cost_B, total_time_cost_B, avg_move_timer_B1, total_time_cost_B/avg_move_timer_B1);

    cout << "========== modeB then modeA ==========" << endl;
    printf("%-30s%-10s%-15s%-20s%-20s%s\n", "mode", "wins", "max_time_cost", "total_time_cost", "move_count", "time_cost_per_move(avg)");
    printf("%-30s%-10d%-15lf%-20lf%-20lf%lf\n", mode_name[mode_A], win_cnt_A2, max_time_cost_A, total_time_cost_A, avg_move_timer_A2, total_time_cost_A/avg_move_timer_A2);
    printf("%-30s%-10d%-15lf%-20lf%-20lf%lf\n", mode_name[mode_B], win_cnt_B2, max_time_cost_B, total_time_cost_B, avg_move_timer_B2, total_time_cost_B/avg_move_timer_B2);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xbd8, %rsp            # imm = 0xBD8
movq %rdi, -0x130(%rbp)
leaq 0x5962(%rip), %rsi      # 0x95c0
leaq -0x770(%rbp), %rdi
movl $0xe1, %edx
callq 0x20f0
movq 0x9352(%rip), %r15      # 0xcfc8
leaq 0x56b7(%rip), %rsi      # 0x9334
movl $0x16, %edx
movq %r15, %rdi
callq 0x2170
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20c0
leaq 0x5693(%rip), %rsi      # 0x934b
movl $0x21, %edx
movq %r15, %rdi
callq 0x2170
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20c0
leaq 0x567a(%rip), %rsi      # 0x936d
movl $0x26, %edx
movq %r15, %rdi
callq 0x2170
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20c0
leaq 0x5666(%rip), %rsi      # 0x9394
movl $0x26, %edx
movq %r15, %rdi
callq 0x2170
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20c0
leaq 0x5652(%rip), %rsi      # 0x93bb
movl $0x26, %edx
movq %r15, %rdi
callq 0x2170
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20c0
leaq 0x563e(%rip), %rsi      # 0x93e2
movl $0x26, %edx
movq %r15, %rdi
callq 0x2170
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20c0
leaq 0x562a(%rip), %rsi      # 0x9409
movl $0x6, %edx
movq %r15, %rdi
callq 0x2170
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20c0
leaq 0x55f6(%rip), %rsi      # 0x9410
movl $0x8, %edx
movq %r15, %rdi
callq 0x2170
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20c0
leaq 0x524c(%rip), %rsi      # 0x90a1
movl $0x8, %edx
movq %r15, %rdi
callq 0x2170
leaq 0x55b0(%rip), %rsi      # 0x9419
movl $0xe, %edx
movq %r15, %rdi
callq 0x2170
movq 0x915b(%rip), %r14      # 0xcfd8
leaq -0x30(%rbp), %rsi
movq %r14, %rdi
callq 0x20a0
leaq 0x5598(%rip), %rsi      # 0x9428
movl $0xe, %edx
movq %r15, %rdi
callq 0x2170
leaq -0x2c(%rbp), %rsi
movq %r14, %rdi
callq 0x20a0
leaq 0x5587(%rip), %rsi      # 0x9437
movl $0x25, %edx
movq %r15, %rdi
callq 0x2170
leaq -0x5c(%rbp), %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x20a0
leaq 0x558a(%rip), %rsi      # 0x945d
movl $0x26, %edx
movq %r15, %rdi
callq 0x2170
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20c0
movq $0x0, -0x88(%rbp)
xorpd %xmm0, %xmm0
movsd %xmm0, -0x98(%rbp)
cmpl $0x0, (%rbx)
movsd %xmm0, -0x40(%rbp)
movsd %xmm0, -0x38(%rbp)
movsd %xmm0, -0xa8(%rbp)
movsd %xmm0, -0xa0(%rbp)
movsd %xmm0, -0x78(%rbp)
movsd %xmm0, -0x80(%rbp)
movl $0x0, %eax
movq %rax, -0x70(%rbp)
movl $0x0, %eax
movq %rax, -0x68(%rbp)
jle 0x4495
movl $0x288, %ecx            # imm = 0x288
leaq -0x3e0(%rbp), %rax
leaq (%rax,%rcx), %rdx
movq %rdx, -0x48(%rbp)
movl $0x250, %edx            # imm = 0x250
leaq (%rax,%rdx), %rsi
movq %rsi, -0x120(%rbp)
movl $0x220, %esi            # imm = 0x220
leaq (%rax,%rsi), %rdi
movq %rdi, -0x110(%rbp)
movl $0x1d0, %edi            # imm = 0x1D0
leaq (%rax,%rdi), %r8
movq %r8, -0x100(%rbp)
movl $0x1a0, %r8d            # imm = 0x1A0
leaq (%rax,%r8), %r9
movq %r9, -0xf0(%rbp)
movl $0x150, %r9d            # imm = 0x150
leaq (%rax,%r9), %r10
movq %r10, -0xe0(%rbp)
leaq -0x680(%rbp), %r10
addq %r10, %rcx
movq %rcx, -0x90(%rbp)
addq %r10, %rdx
movq %rdx, -0x128(%rbp)
addq %r10, %rsi
movq %rsi, -0x118(%rbp)
addq %r10, %rdi
movq %rdi, -0x108(%rbp)
addq %r10, %r8
movq %r8, -0xf8(%rbp)
addq %r10, %r9
movq %r9, -0xe8(%rbp)
movl $0x120, %ecx            # imm = 0x120
leaq (%rax,%rcx), %rdx
movq %rdx, -0xd0(%rbp)
addq %r10, %rcx
movq %rcx, -0xd8(%rbp)
movl $0xd0, %ecx
leaq (%rax,%rcx), %rdx
movq %rdx, -0xc0(%rbp)
addq %r10, %rcx
movq %rcx, -0xc8(%rbp)
movl $0xa0, %ecx
addq %rcx, %rax
movq %rax, -0xb0(%rbp)
addq %r10, %rcx
movq %rcx, -0xb8(%rbp)
movsd %xmm0, -0x80(%rbp)
leaq 0x8d19(%rip), %r13      # 0xcd78
addq $0x10, %r13
movsd %xmm0, -0x78(%rbp)
movsd %xmm0, -0xa0(%rbp)
movsd %xmm0, -0xa8(%rbp)
movsd %xmm0, -0x38(%rbp)
movsd %xmm0, -0x40(%rbp)
movq $0x0, -0x68(%rbp)
leaq -0xbf8(%rbp), %r15
movq 0x8f58(%rip), %r12      # 0xcff0
movq $0x0, -0x70(%rbp)
xorl %r14d, %r14d
movl %r14d, -0x50(%rbp)
movq %r15, %rdi
movq -0x130(%rbp), %rsi
callq 0x78e2
movl -0x30(%rbp), %esi
leaq -0x680(%rbp), %rdi
callq 0x52ba
movl -0x2c(%rbp), %esi
leaq -0x3e0(%rbp), %rdi
callq 0x52ba
movq %r15, %rdi
callq 0x7e2a
movl %eax, %ebx
movq %r15, %rdi
callq 0x855c
testb %al, %al
je 0x4195
movl $0x1, %edx
movq %r12, %rdi
leaq 0x4f3e(%rip), %rsi      # 0x903b
callq 0x2170
movq %r12, %rdi
callq 0x20c0
callq 0x20b0
movq %rax, %r14
leaq -0xa28(%rbp), %rdi
movq %r15, %rsi
callq 0x78e2
leaq -0x3e0(%rbp), %rdi
leaq -0xa28(%rbp), %rsi
movl %ebx, %edx
callq 0x54a0
movq %rax, -0x58(%rbp)
movq %r15, %rdi
leaq -0x58(%rbp), %rsi
callq 0x7fea
movl %eax, %ebx
callq 0x20b0
subq %r14, %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
divsd 0x4f60(%rip), %xmm0     # 0x90c0
movsd -0x78(%rbp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, -0x78(%rbp)
maxsd -0x40(%rbp), %xmm0
movsd -0xa8(%rbp), %xmm1
addsd 0x4f45(%rip), %xmm1     # 0x90c8
movsd %xmm1, -0xa8(%rbp)
movsd %xmm0, -0x40(%rbp)
jmp 0x4237
movl $0x1, %edx
movq %r12, %rdi
leaq 0x4e97(%rip), %rsi      # 0x903b
callq 0x2170
movq %r12, %rdi
callq 0x20c0
callq 0x20b0
movq %rax, %r14
leaq -0xb10(%rbp), %rdi
movq %r15, %rsi
callq 0x78e2
leaq -0x680(%rbp), %rdi
leaq -0xb10(%rbp), %rsi
movl %ebx, %edx
callq 0x54a0
movq %rax, -0x58(%rbp)
movq %r15, %rdi
leaq -0x58(%rbp), %rsi
callq 0x7fea
movl %eax, %ebx
callq 0x20b0
subq %r14, %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
divsd 0x4eb9(%rip), %xmm0     # 0x90c0
movsd -0x80(%rbp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, -0x80(%rbp)
maxsd -0x38(%rbp), %xmm0
movsd -0xa0(%rbp), %xmm1
addsd 0x4e9e(%rip), %xmm1     # 0x90c8
movsd %xmm1, -0xa0(%rbp)
movsd %xmm0, -0x38(%rbp)
testl %ebx, %ebx
jne 0x4248
movq %r15, %rdi
callq 0x8150
jmp 0x40d4
cmpl $0x1, %ebx
jne 0x42c6
movl $0x9, %edx
movq 0x8d6f(%rip), %rdi      # 0xcfc8
leaq 0x5224(%rip), %rsi      # 0x9484
callq 0x2170
movl -0x50(%rbp), %r14d
movq -0x68(%rbp), %rcx
incl %ecx
movq -0x70(%rbp), %rax
movq %rcx, -0x68(%rbp)
leal (%rcx,%rax), %esi
movq 0x8d47(%rip), %rdi      # 0xcfc8
callq 0x21f0
movq %rax, %rbx
movl $0x7, %edx
movq %rax, %rdi
leaq 0x51f6(%rip), %rsi      # 0x948e
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
jmp 0x433d
movl $0x9, %edx
movq 0x8cf6(%rip), %rdi      # 0xcfc8
leaq 0x51bd(%rip), %rsi      # 0x9496
callq 0x2170
movl -0x50(%rbp), %r14d
movq -0x70(%rbp), %rax
incl %eax
movq %rax, -0x70(%rbp)
movq -0x68(%rbp), %rcx
leal (%rcx,%rax), %esi
movq 0x8cce(%rip), %rdi      # 0xcfc8
callq 0x21f0
movq %rax, %rbx
movl $0x7, %edx
movq %rax, %rdi
leaq 0x517d(%rip), %rsi      # 0x948e
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
movq -0x48(%rbp), %rdi
callq 0x5fa0
movq %r13, -0x1d8(%rbp)
movq -0x120(%rbp), %rdi
callq 0x4e0e
movq -0x110(%rbp), %rdi
callq 0x4e0e
movq %r13, -0x258(%rbp)
movq -0x100(%rbp), %rdi
callq 0x4e0e
movq -0xf0(%rbp), %rdi
callq 0x4e0e
movq %r13, -0x2d8(%rbp)
movq -0xe0(%rbp), %rdi
callq 0x4e0e
movq -0xd0(%rbp), %rdi
callq 0x4e0e
movq %r13, -0x358(%rbp)
movq -0xc0(%rbp), %rdi
callq 0x4e0e
movq -0xb0(%rbp), %rdi
callq 0x4e0e
movq %r13, -0x3d8(%rbp)
leaq -0x390(%rbp), %rdi
callq 0x4e0e
leaq -0x3c0(%rbp), %rdi
callq 0x4e0e
movq -0x90(%rbp), %rdi
callq 0x5fa0
movq %r13, -0x478(%rbp)
movq -0x128(%rbp), %rdi
callq 0x4e0e
movq -0x118(%rbp), %rdi
callq 0x4e0e
movq %r13, -0x4f8(%rbp)
movq -0x108(%rbp), %rdi
callq 0x4e0e
movq -0xf8(%rbp), %rdi
callq 0x4e0e
movq %r13, -0x578(%rbp)
movq -0xe8(%rbp), %rdi
callq 0x4e0e
movq -0xd8(%rbp), %rdi
callq 0x4e0e
movq %r13, -0x5f8(%rbp)
movq -0xc8(%rbp), %rdi
callq 0x4e0e
movq -0xb8(%rbp), %rdi
callq 0x4e0e
movq %r13, -0x678(%rbp)
leaq -0x630(%rbp), %rdi
callq 0x4e0e
leaq -0x660(%rbp), %rdi
callq 0x4e0e
incl %r14d
cmpl -0x5c(%rbp), %r14d
jl 0x40a3
leaq 0x5004(%rip), %rdi      # 0x94a0
leaq 0x4bf9(%rip), %rsi      # 0x909c
leaq 0x500c(%rip), %rdx      # 0x94b6
leaq 0x500a(%rip), %rcx      # 0x94bb
leaq 0x5011(%rip), %r8       # 0x94c9
xorl %eax, %eax
callq 0x2040
movslq -0x30(%rbp), %rax
leaq (%rax,%rax,4), %rax
leaq (%rax,%rax,4), %rax
leaq (%rax,%rbp), %rsi
addq $-0x770, %rsi           # imm = 0xF890
leaq 0x4ffc(%rip), %rbx      # 0x94d9
movq %rbx, %rdi
movq -0x68(%rbp), %rdx
movsd -0x38(%rbp), %xmm0
movsd -0x80(%rbp), %xmm1
movb $0x2, %al
callq 0x2040
movslq -0x2c(%rbp), %rax
leaq (%rax,%rax,4), %rax
leaq (%rax,%rax,4), %rax
leaq (%rax,%rbp), %rsi
addq $-0x770, %rsi           # imm = 0xF890
movq %rbx, %rdi
movq -0x70(%rbp), %rdx
movsd -0x40(%rbp), %xmm0
movsd -0x78(%rbp), %xmm1
movb $0x2, %al
callq 0x2040
leaq 0x4fc6(%rip), %rsi      # 0x94f1
movl $0x26, %edx
movq 0x8a91(%rip), %rbx      # 0xcfc8
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
cmpl $0x0, -0x5c(%rbp)
jle 0x4a9b
movl $0x288, %ecx            # imm = 0x288
leaq -0x3e0(%rbp), %rax
leaq (%rax,%rcx), %rdx
movq %rdx, -0x120(%rbp)
movl $0x250, %edx            # imm = 0x250
leaq (%rax,%rdx), %rsi
movq %rsi, -0x110(%rbp)
movl $0x220, %esi            # imm = 0x220
leaq (%rax,%rsi), %rdi
movq %rdi, -0x100(%rbp)
movl $0x1d0, %edi            # imm = 0x1D0
leaq (%rax,%rdi), %r8
movq %r8, -0xf0(%rbp)
movl $0x1a0, %r8d            # imm = 0x1A0
leaq (%rax,%r8), %r9
movq %r9, -0xe0(%rbp)
movl $0x150, %r9d            # imm = 0x150
leaq (%rax,%r9), %r10
movq %r10, -0xd0(%rbp)
leaq -0x680(%rbp), %r10
addq %r10, %rcx
movq %rcx, -0x128(%rbp)
addq %r10, %rdx
movq %rdx, -0x118(%rbp)
addq %r10, %rsi
movq %rsi, -0x108(%rbp)
addq %r10, %rdi
movq %rdi, -0xf8(%rbp)
addq %r10, %r8
movq %r8, -0xe8(%rbp)
addq %r10, %r9
movq %r9, -0xd8(%rbp)
movl $0x120, %ecx            # imm = 0x120
leaq (%rax,%rcx), %rdx
movq %rdx, -0xc0(%rbp)
addq %r10, %rcx
movq %rcx, -0xc8(%rbp)
movl $0xd0, %ecx
leaq (%rax,%rcx), %rdx
movq %rdx, -0xb0(%rbp)
addq %r10, %rcx
movq %rcx, -0xb8(%rbp)
movl $0xa0, %ecx
addq %rcx, %rax
movq %rax, -0x138(%rbp)
addq %r10, %rcx
movq %rcx, -0x140(%rbp)
xorpd %xmm0, %xmm0
movsd %xmm0, -0x50(%rbp)
leaq 0x86ff(%rip), %rbx      # 0xcd78
addq $0x10, %rbx
movsd %xmm0, -0x98(%rbp)
movq $0x0, -0x48(%rbp)
leaq -0xbf8(%rbp), %r12
movq 0x8955(%rip), %r13      # 0xcff0
movq $0x0, -0x88(%rbp)
xorl %r15d, %r15d
movl %r15d, -0x90(%rbp)
movq %r12, %rdi
movq -0x130(%rbp), %rsi
callq 0x78e2
movl -0x2c(%rbp), %esi
leaq -0x680(%rbp), %rdi
callq 0x52ba
movl -0x30(%rbp), %esi
leaq -0x3e0(%rbp), %rdi
callq 0x52ba
movq %r12, %rdi
callq 0x7e2a
movl %eax, %r14d
movq %r12, %rdi
callq 0x855c
testb %al, %al
je 0x4793
movl $0x1, %edx
movq %r13, %rdi
leaq 0x4934(%rip), %rsi      # 0x903b
callq 0x2170
movq %r13, %rdi
callq 0x20c0
callq 0x20b0
movq %rax, %r15
leaq -0x858(%rbp), %rdi
movq %r12, %rsi
callq 0x78e2
leaq -0x3e0(%rbp), %rdi
leaq -0x858(%rbp), %rsi
movl %r14d, %edx
callq 0x54a0
movq %rax, -0x58(%rbp)
movq %r12, %rdi
leaq -0x58(%rbp), %rsi
callq 0x7fea
movl %eax, %r14d
callq 0x20b0
subq %r15, %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
divsd 0x4954(%rip), %xmm0     # 0x90c0
maxsd -0x38(%rbp), %xmm0
movsd -0x98(%rbp), %xmm1
addsd 0x4947(%rip), %xmm1     # 0x90c8
movsd %xmm1, -0x98(%rbp)
movsd %xmm0, -0x38(%rbp)
jmp 0x4823
movl $0x1, %edx
movq %r13, %rdi
leaq 0x4899(%rip), %rsi      # 0x903b
callq 0x2170
movq %r13, %rdi
callq 0x20c0
callq 0x20b0
movq %rax, %r15
leaq -0x940(%rbp), %rdi
movq %r12, %rsi
callq 0x78e2
leaq -0x680(%rbp), %rdi
leaq -0x940(%rbp), %rsi
movl %r14d, %edx
callq 0x54a0
movq %rax, -0x58(%rbp)
movq %r12, %rdi
leaq -0x58(%rbp), %rsi
callq 0x7fea
movl %eax, %r14d
callq 0x20b0
subq %r15, %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
divsd 0x48b9(%rip), %xmm0     # 0x90c0
maxsd -0x40(%rbp), %xmm0
movsd -0x50(%rbp), %xmm1
addsd 0x48af(%rip), %xmm1     # 0x90c8
movsd %xmm1, -0x50(%rbp)
movsd %xmm0, -0x40(%rbp)
testl %r14d, %r14d
jne 0x4835
movq %r12, %rdi
callq 0x8150
jmp 0x46dd
cmpl $0x1, %r14d
jne 0x48c1
movl $0x9, %edx
movq 0x877d(%rip), %rdi      # 0xcfc8
leaq 0x4c44(%rip), %rsi      # 0x9496
callq 0x2170
movl -0x90(%rbp), %r15d
movq -0x88(%rbp), %rax
incl %eax
movq %rax, -0x88(%rbp)
movq -0x48(%rbp), %rcx
leal (%rcx,%rax), %esi
movq 0x874c(%rip), %rdi      # 0xcfc8
callq 0x21f0
movq %rax, %r14
movl $0x7, %edx
movq %rax, %rdi
leaq 0x4bfb(%rip), %rsi      # 0x948e
callq 0x2170
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20c0
jmp 0x493e
movl $0x8, %edx
movq 0x86fb(%rip), %rdi      # 0xcfc8
leaq 0x4c44(%rip), %rsi      # 0x9518
callq 0x2170
movl -0x90(%rbp), %r15d
movq -0x48(%rbp), %rcx
incl %ecx
movq -0x88(%rbp), %rax
movq %rcx, -0x48(%rbp)
leal (%rcx,%rax), %esi
movq 0x86cd(%rip), %rdi      # 0xcfc8
callq 0x21f0
movq %rax, %r14
movl $0x7, %edx
movq %rax, %rdi
leaq 0x4b7c(%rip), %rsi      # 0x948e
callq 0x2170
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20c0
movq -0x120(%rbp), %rdi
callq 0x5fa0
movq %rbx, -0x1d8(%rbp)
movq -0x110(%rbp), %rdi
callq 0x4e0e
movq -0x100(%rbp), %rdi
callq 0x4e0e
movq %rbx, -0x258(%rbp)
movq -0xf0(%rbp), %rdi
callq 0x4e0e
movq -0xe0(%rbp), %rdi
callq 0x4e0e
movq %rbx, -0x2d8(%rbp)
movq -0xd0(%rbp), %rdi
callq 0x4e0e
movq -0xc0(%rbp), %rdi
callq 0x4e0e
movq %rbx, -0x358(%rbp)
movq -0xb0(%rbp), %rdi
callq 0x4e0e
movq -0x138(%rbp), %rdi
callq 0x4e0e
movq %rbx, -0x3d8(%rbp)
leaq -0x390(%rbp), %rdi
callq 0x4e0e
leaq -0x3c0(%rbp), %rdi
callq 0x4e0e
movq -0x128(%rbp), %rdi
callq 0x5fa0
movq %rbx, -0x478(%rbp)
movq -0x118(%rbp), %rdi
callq 0x4e0e
movq -0x108(%rbp), %rdi
callq 0x4e0e
movq %rbx, -0x4f8(%rbp)
movq -0xf8(%rbp), %rdi
callq 0x4e0e
movq -0xe8(%rbp), %rdi
callq 0x4e0e
movq %rbx, -0x578(%rbp)
movq -0xd8(%rbp), %rdi
callq 0x4e0e
movq -0xc8(%rbp), %rdi
callq 0x4e0e
movq %rbx, -0x5f8(%rbp)
movq -0xb8(%rbp), %rdi
callq 0x4e0e
movq -0x140(%rbp), %rdi
callq 0x4e0e
movq %rbx, -0x678(%rbp)
leaq -0x630(%rbp), %rdi
callq 0x4e0e
leaq -0x660(%rbp), %rdi
callq 0x4e0e
incl %r15d
cmpl -0x5c(%rbp), %r15d
jl 0x46a9
jmp 0x4aac
xorpd %xmm0, %xmm0
movsd %xmm0, -0x50(%rbp)
movq $0x0, -0x48(%rbp)
movq 0x8515(%rip), %r14      # 0xcfc8
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20c0
movq %rax, %rbx
leaq 0x4a3d(%rip), %rsi      # 0x9521
movl $0x32, %edx
movq %rax, %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 0x493e(%rip), %rsi      # 0x945d
movl $0x26, %edx
movq %r14, %rdi
callq 0x2170
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20c0
leaq 0x4a22(%rip), %rax      # 0x957c
movq %rax, (%rsp)
leaq 0x49ef(%rip), %rdi      # 0x9554
leaq 0x4530(%rip), %r15      # 0x909c
leaq 0x4943(%rip), %r12      # 0x94b6
leaq 0x4941(%rip), %r13      # 0x94bb
leaq 0x4948(%rip), %r8       # 0x94c9
leaq 0x49e9(%rip), %r9       # 0x9571
movq %r15, %rsi
movq %r12, %rdx
movq %r13, %rcx
xorl %eax, %eax
callq 0x2040
movslq -0x30(%rbp), %rax
leaq (%rax,%rax,4), %rax
leaq (%rax,%rax,4), %rax
leaq (%rax,%rbp), %rsi
addq $-0x770, %rsi           # imm = 0xF890
movsd -0x80(%rbp), %xmm1
movapd %xmm1, %xmm3
movsd -0xa0(%rbp), %xmm2
divsd %xmm2, %xmm3
leaq 0x49c9(%rip), %rbx      # 0x9594
movq %rbx, %rdi
movq -0x68(%rbp), %rdx
movsd -0x38(%rbp), %xmm0
movb $0x4, %al
callq 0x2040
movslq -0x2c(%rbp), %rax
leaq (%rax,%rax,4), %rax
leaq (%rax,%rax,4), %rax
leaq (%rax,%rbp), %rsi
addq $-0x770, %rsi           # imm = 0xF890
movsd -0x78(%rbp), %xmm1
movapd %xmm1, %xmm3
movsd -0xa8(%rbp), %xmm2
divsd %xmm2, %xmm3
movq %rbx, %rdi
movq -0x70(%rbp), %rdx
movsd -0x40(%rbp), %xmm0
movb $0x4, %al
callq 0x2040
leaq 0x48cd(%rip), %rsi      # 0x94f1
movl $0x26, %edx
movq %r14, %rdi
callq 0x2170
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20c0
leaq 0x491d(%rip), %rax      # 0x957c
movq %rax, (%rsp)
leaq 0x48ea(%rip), %rdi      # 0x9554
movq %r15, %rsi
movq %r12, %rdx
movq %r13, %rcx
leaq 0x484f(%rip), %r8       # 0x94c9
leaq 0x48f0(%rip), %r9       # 0x9571
xorl %eax, %eax
callq 0x2040
movslq -0x30(%rbp), %rax
leaq (%rax,%rax,4), %rax
leaq (%rax,%rax,4), %rax
leaq (%rax,%rbp), %rsi
addq $-0x770, %rsi           # imm = 0xF890
movsd -0x80(%rbp), %xmm1
movapd %xmm1, %xmm3
movsd -0x98(%rbp), %xmm2
divsd %xmm2, %xmm3
movq %rbx, %rdi
movq -0x48(%rbp), %rdx
movsd -0x38(%rbp), %xmm0
movb $0x4, %al
callq 0x2040
movslq -0x2c(%rbp), %rax
leaq (%rax,%rax,4), %rax
leaq (%rax,%rax,4), %rax
leaq (%rax,%rbp), %rsi
addq $-0x770, %rsi           # imm = 0xF890
movsd -0x78(%rbp), %xmm1
movapd %xmm1, %xmm3
movsd -0x50(%rbp), %xmm2
divsd %xmm2, %xmm3
movq %rbx, %rdi
movq -0x88(%rbp), %rdx
movsd -0x40(%rbp), %xmm0
movb $0x4, %al
callq 0x2040
addq $0xbd8, %rsp            # imm = 0xBD8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4d1a
movq %rax, %rbx
jmp 0x4d40
jmp 0x4d31
jmp 0x4d31
jmp 0x4d31
jmp 0x4d31
jmp 0x4d31
jmp 0x4d31
jmp 0x4d31
jmp 0x4d31
jmp 0x4d31
movq %rax, %rbx
leaq -0x3e0(%rbp), %rdi
callq 0x4d54
leaq -0x680(%rbp), %rdi
callq 0x4d54
movq %rbx, %rdi
callq 0x2200