// File: bonetblai[P]mdp-engine/race/main.cc
// Function: main
int main(int argc, const char **argv) {
    FILE *is = 0;
    float p = 1.0;
    unsigned num_trials = 1;
    float dead_end_value = 1e3;

    vector<string> requests;

    float start_time = Utils::read_time_in_seconds();
    cout << fixed;

    // parse arguments
    for( ++argv, --argc; (argc > 1) && (**argv == '-'); ++argv, --argc ) {
        if( string(*argv) == "--no-colors" ) {
            Utils::g_use_colors = false;
        } else if( ((*argv)[1] == 'r') || (string(*argv) == "--request") ) {
            requests.push_back(argv[1]);
            ++argv;
            --argc;
        } else if( ((*argv)[1] == 's') || (string(*argv) == "--seed") ) {
            Algorithm::g_seed = strtoul(argv[1], 0, 0);
            Online::g_seed = Algorithm::g_seed;
            ++argv;
            --argc;
        } else if( ((*argv)[1] == 't') || (string(*argv) == "--trials") ) {
            num_trials = strtoul(argv[1], 0, 0);
            ++argv;
            --argc;
        } else if( ((*argv)[1] == 'd') || (string(*argv) == "--dead-end-value") ) {
            dead_end_value = strtod(argv[1], 0);
            ++argv;
            --argc;
        } else {
            usage(cout);
            exit(-1);
        }
    }

    // read problem parameters
    if( argc >= 1 ) {
        is = fopen(argv[0], "r");
        if( argc >= 2 ) p = strtod(argv[1], 0);
    } else {
        usage(cout);
        exit(-1);
    }

    // build problem instances
    cout << "main: seed=" << Algorithm::g_seed << endl;
    Random::set_seed(Algorithm::g_seed);

    grid_t grid;
    grid.parse(cout, is);
    problem_t problem(grid, p, dead_end_value);
    fclose(is);

    // build requests
    vector<pair<string, Online::Policy::policy_t<state_t>*> > policies;
    vector<pair<string, Algorithm::algorithm_t<state_t>*> > algorithms;
    Dispatcher::dispatcher_t<state_t> dispatcher;
    for( int i = 0; i < int(requests.size()); ++i ) {
        const string &request_str = requests[i];
        std::multimap<std::string, std::string> request;
        Utils::tokenize(request_str, request);
        for( std::multimap<std::string, std::string>::const_iterator it = request.begin(); it != request.end(); ++it ) {
            dispatcher.create_request(problem, it->first, it->second);
            if( it->first == "algorithm" ) {
                Algorithm::algorithm_t<state_t> *algorithm = dispatcher.fetch_algorithm(it->second);
                if( algorithm != 0 ) algorithms.push_back(make_pair(it->second, algorithm));
            } else if( it->first == "policy" ) {
                Online::Policy::policy_t<state_t> *policy = dispatcher.fetch_policy(it->second);
                if( policy != 0 ) policies.push_back(make_pair(it->second, policy));
            }
        }
    }

    // solve problems with requested algorithms
    vector<Dispatcher::dispatcher_t<state_t>::solve_result_t> solve_results;
    for( int i = 0; i < int(algorithms.size()); ++i ) {
        const string &request = algorithms[i].first;
        const Algorithm::algorithm_t<state_t> &algorithm = *algorithms[i].second;
        Dispatcher::dispatcher_t<state_t>::solve_result_t result;
        dispatcher.solve(request, algorithm, problem.init(), result);
        solve_results.push_back(result);
    }

    cout << Utils::warning() << "the following stats may aggregate figures when elements are shared among algorithms" << endl;
    if( !solve_results.empty() ) {
        for( int i = 0; i < int(solve_results.size()); ++i ) {
            dispatcher.print_stats(cout, solve_results[i]);
        }
    }

    // evaluate requested policies
    vector<Dispatcher::dispatcher_t<state_t>::evaluate_result_t> evaluate_results;
    for( int i = 0; i < int(policies.size()); ++i ) {
        const string &request = policies[i].first;
        const Online::Policy::policy_t<state_t> &policy = *policies[i].second;
        Dispatcher::dispatcher_t<state_t>::evaluate_result_t result;
        dispatcher.evaluate(request, policy, problem.init(), result, num_trials, 100, true);
        evaluate_results.push_back(result);
    }

    cout << Utils::warning() << "the following stats may aggregate figures when elements are shared among policies" << endl;
    if( !evaluate_results.empty() ) {
        for( int i = 0; i < int(evaluate_results.size()); ++i ) {
            dispatcher.print_stats(cout, evaluate_results[i]);
        }
    }

    cout << "main: total-time=" << Utils::read_time_in_seconds() - start_time << endl;
    return 0;
}

// Assembly:
subq $0x6a8, %rsp            # imm = 0x6A8
movl $0x0, 0x6a4(%rsp)
movl %edi, 0x6a0(%rsp)
movq %rsi, 0x698(%rsp)
movq $0x0, 0x690(%rsp)
movl $0x3f800000, 0x68c(%rsp) # imm = 0x3F800000
movl $0x1, 0x688(%rsp)
movl $0x447a0000, 0x684(%rsp) # imm = 0x447A0000
leaq 0x668(%rsp), %rdi
callq 0x7ce0
callq 0x7cf0
movss %xmm0, 0x190(%rsp)
jmp 0x67eb
movss 0x190(%rsp), %xmm0
movss %xmm0, 0x664(%rsp)
movq 0x707cc(%rip), %rdi     # 0x76fd0
leaq 0x1565(%rip), %rsi      # 0x7d70
callq 0x60f0
jmp 0x6812
movq 0x698(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x698(%rsp)
movl 0x6a0(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x6a0(%rsp)
xorl %eax, %eax
cmpl $0x1, 0x6a0(%rsp)
movb %al, 0x18f(%rsp)
jle 0x6865
movq 0x698(%rsp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
sete %al
movb %al, 0x18f(%rsp)
movb 0x18f(%rsp), %al
testb $0x1, %al
jne 0x6875
jmp 0x712a
movq 0x698(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x178(%rsp)
leaq 0x62f(%rsp), %rdi
movq %rdi, 0x180(%rsp)
callq 0x6540
movq 0x178(%rsp), %rsi
movq 0x180(%rsp), %rdx
leaq 0x630(%rsp), %rdi
callq 0x6440
jmp 0x68bc
leaq 0x4e842(%rip), %rsi     # 0x55105
leaq 0x630(%rsp), %rdi
callq 0x7d90
movb %al, 0x177(%rsp)
jmp 0x68d9
leaq 0x630(%rsp), %rdi
callq 0x61b0
leaq 0x62f(%rsp), %rdi
callq 0x6360
movb 0x177(%rsp), %al
testb $0x1, %al
jne 0x6900
jmp 0x696e
movb $0x0, 0x709e1(%rip)     # 0x772e8
jmp 0x70fe
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x658(%rsp)
movl %eax, 0x654(%rsp)
jmp 0x7cbf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x658(%rsp)
movl %eax, 0x654(%rsp)
jmp 0x695c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x658(%rsp)
movl %eax, 0x654(%rsp)
leaq 0x630(%rsp), %rdi
callq 0x61b0
leaq 0x62f(%rsp), %rdi
callq 0x6360
jmp 0x7cbf
movq 0x698(%rsp), %rax
movq (%rax), %rax
movsbl 0x1(%rax), %ecx
movb $0x0, 0x606(%rsp)
movb $0x0, 0x605(%rsp)
movb $0x1, %al
cmpl $0x72, %ecx
movb %al, 0x176(%rsp)
je 0x6a23
movq 0x698(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x160(%rsp)
leaq 0x607(%rsp), %rdi
movq %rdi, 0x168(%rsp)
callq 0x6540
movq 0x160(%rsp), %rsi
movq 0x168(%rsp), %rdx
movb $0x1, 0x606(%rsp)
leaq 0x608(%rsp), %rdi
callq 0x6440
jmp 0x69ee
movb $0x1, 0x605(%rsp)
leaq 0x4e714(%rip), %rsi     # 0x55111
leaq 0x608(%rsp), %rdi
callq 0x7d90
movb %al, 0x15f(%rsp)
jmp 0x6a13
movb 0x15f(%rsp), %al
movb %al, 0x176(%rsp)
jmp 0x6a23
movb 0x176(%rsp), %al
movb %al, 0x15e(%rsp)
testb $0x1, 0x605(%rsp)
jne 0x6a3d
jmp 0x6a4a
leaq 0x608(%rsp), %rdi
callq 0x61b0
testb $0x1, 0x606(%rsp)
jne 0x6a56
jmp 0x6a63
leaq 0x607(%rsp), %rdi
callq 0x6360
movb 0x15e(%rsp), %al
testb $0x1, %al
jne 0x6a73
jmp 0x6bc2
movq 0x698(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x148(%rsp)
leaq 0x5df(%rsp), %rdi
movq %rdi, 0x150(%rsp)
callq 0x6540
movq 0x148(%rsp), %rsi
movq 0x150(%rsp), %rdx
leaq 0x5e0(%rsp), %rdi
callq 0x6440
jmp 0x6abb
leaq 0x668(%rsp), %rdi
leaq 0x5e0(%rsp), %rsi
callq 0x7dc0
jmp 0x6ad2
leaq 0x5e0(%rsp), %rdi
callq 0x61b0
leaq 0x5df(%rsp), %rdi
callq 0x6360
movq 0x698(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x698(%rsp)
movl 0x6a0(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x6a0(%rsp)
jmp 0x70fc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x658(%rsp)
movl %eax, 0x654(%rsp)
jmp 0x6b5b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x658(%rsp)
movl %eax, 0x654(%rsp)
testb $0x1, 0x605(%rsp)
jne 0x6b4c
jmp 0x6b59
leaq 0x608(%rsp), %rdi
callq 0x61b0
jmp 0x6b5b
testb $0x1, 0x606(%rsp)
jne 0x6b67
jmp 0x6b74
leaq 0x607(%rsp), %rdi
callq 0x6360
jmp 0x7cbf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x658(%rsp)
movl %eax, 0x654(%rsp)
jmp 0x6bb0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x658(%rsp)
movl %eax, 0x654(%rsp)
leaq 0x5e0(%rsp), %rdi
callq 0x61b0
leaq 0x5df(%rsp), %rdi
callq 0x6360
jmp 0x7cbf
movq 0x698(%rsp), %rax
movq (%rax), %rax
movsbl 0x1(%rax), %ecx
movb $0x0, 0x5b6(%rsp)
movb $0x0, 0x5b5(%rsp)
movb $0x1, %al
cmpl $0x73, %ecx
movb %al, 0x147(%rsp)
je 0x6c77
movq 0x698(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x130(%rsp)
leaq 0x5b7(%rsp), %rdi
movq %rdi, 0x138(%rsp)
callq 0x6540
movq 0x130(%rsp), %rsi
movq 0x138(%rsp), %rdx
movb $0x1, 0x5b6(%rsp)
leaq 0x5b8(%rsp), %rdi
callq 0x6440
jmp 0x6c42
movb $0x1, 0x5b5(%rsp)
leaq 0x4e4ca(%rip), %rsi     # 0x5511b
leaq 0x5b8(%rsp), %rdi
callq 0x7d90
movb %al, 0x12f(%rsp)
jmp 0x6c67
movb 0x12f(%rsp), %al
movb %al, 0x147(%rsp)
jmp 0x6c77
movb 0x147(%rsp), %al
movb %al, 0x12e(%rsp)
testb $0x1, 0x5b5(%rsp)
jne 0x6c91
jmp 0x6c9e
leaq 0x5b8(%rsp), %rdi
callq 0x61b0
testb $0x1, 0x5b6(%rsp)
jne 0x6caa
jmp 0x6cb7
leaq 0x5b7(%rsp), %rdi
callq 0x6360
movb 0x12e(%rsp), %al
testb $0x1, %al
jne 0x6cc7
jmp 0x6d7d
movq 0x698(%rsp), %rax
movq 0x8(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x60e0
movl %eax, 0x7061c(%rip)     # 0x77300
movl 0x70616(%rip), %eax     # 0x77300
movl %eax, 0x70614(%rip)     # 0x77304
movq 0x698(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x698(%rsp)
movl 0x6a0(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x6a0(%rsp)
jmp 0x70fa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x658(%rsp)
movl %eax, 0x654(%rsp)
jmp 0x6d5f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x658(%rsp)
movl %eax, 0x654(%rsp)
testb $0x1, 0x5b5(%rsp)
jne 0x6d50
jmp 0x6d5d
leaq 0x5b8(%rsp), %rdi
callq 0x61b0
jmp 0x6d5f
testb $0x1, 0x5b6(%rsp)
jne 0x6d6b
jmp 0x6d78
leaq 0x5b7(%rsp), %rdi
callq 0x6360
jmp 0x7cbf
movq 0x698(%rsp), %rax
movq (%rax), %rax
movsbl 0x1(%rax), %ecx
movb $0x0, 0x58e(%rsp)
movb $0x0, 0x58d(%rsp)
movb $0x1, %al
cmpl $0x74, %ecx
movb %al, 0x12d(%rsp)
je 0x6e32
movq 0x698(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x118(%rsp)
leaq 0x58f(%rsp), %rdi
movq %rdi, 0x120(%rsp)
callq 0x6540
movq 0x118(%rsp), %rsi
movq 0x120(%rsp), %rdx
movb $0x1, 0x58e(%rsp)
leaq 0x590(%rsp), %rdi
callq 0x6440
jmp 0x6dfd
movb $0x1, 0x58d(%rsp)
leaq 0x4e316(%rip), %rsi     # 0x55122
leaq 0x590(%rsp), %rdi
callq 0x7d90
movb %al, 0x117(%rsp)
jmp 0x6e22
movb 0x117(%rsp), %al
movb %al, 0x12d(%rsp)
jmp 0x6e32
movb 0x12d(%rsp), %al
movb %al, 0x116(%rsp)
testb $0x1, 0x58d(%rsp)
jne 0x6e4c
jmp 0x6e59
leaq 0x590(%rsp), %rdi
callq 0x61b0
testb $0x1, 0x58e(%rsp)
jne 0x6e65
jmp 0x6e72
leaq 0x58f(%rsp), %rdi
callq 0x6360
movb 0x116(%rsp), %al
testb $0x1, %al
jne 0x6e82
jmp 0x6f2d
movq 0x698(%rsp), %rax
movq 0x8(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x60e0
movl %eax, 0x688(%rsp)
movq 0x698(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x698(%rsp)
movl 0x6a0(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x6a0(%rsp)
jmp 0x70f8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x658(%rsp)
movl %eax, 0x654(%rsp)
jmp 0x6f0f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x658(%rsp)
movl %eax, 0x654(%rsp)
testb $0x1, 0x58d(%rsp)
jne 0x6f00
jmp 0x6f0d
leaq 0x590(%rsp), %rdi
callq 0x61b0
jmp 0x6f0f
testb $0x1, 0x58e(%rsp)
jne 0x6f1b
jmp 0x6f28
leaq 0x58f(%rsp), %rdi
callq 0x6360
jmp 0x7cbf
movq 0x698(%rsp), %rax
movq (%rax), %rax
movsbl 0x1(%rax), %ecx
movb $0x0, 0x566(%rsp)
movb $0x0, 0x565(%rsp)
movb $0x1, %al
cmpl $0x64, %ecx
movb %al, 0x115(%rsp)
je 0x6fe2
movq 0x698(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x100(%rsp)
leaq 0x567(%rsp), %rdi
movq %rdi, 0x108(%rsp)
callq 0x6540
movq 0x100(%rsp), %rsi
movq 0x108(%rsp), %rdx
movb $0x1, 0x566(%rsp)
leaq 0x568(%rsp), %rdi
callq 0x6440
jmp 0x6fad
movb $0x1, 0x565(%rsp)
leaq 0x4e16f(%rip), %rsi     # 0x5512b
leaq 0x568(%rsp), %rdi
callq 0x7d90
movb %al, 0xff(%rsp)
jmp 0x6fd2
movb 0xff(%rsp), %al
movb %al, 0x115(%rsp)
jmp 0x6fe2
movb 0x115(%rsp), %al
movb %al, 0xfe(%rsp)
testb $0x1, 0x565(%rsp)
jne 0x6ffc
jmp 0x7009
leaq 0x568(%rsp), %rdi
callq 0x61b0
testb $0x1, 0x566(%rsp)
jne 0x7015
jmp 0x7022
leaq 0x567(%rsp), %rdi
callq 0x6360
movb 0xfe(%rsp), %al
testb $0x1, %al
jne 0x7032
jmp 0x70de
movq 0x698(%rsp), %rax
movq 0x8(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x6230
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x684(%rsp)
movq 0x698(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x698(%rsp)
movl 0x6a0(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x6a0(%rsp)
jmp 0x70f6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x658(%rsp)
movl %eax, 0x654(%rsp)
jmp 0x70c0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x658(%rsp)
movl %eax, 0x654(%rsp)
testb $0x1, 0x565(%rsp)
jne 0x70b1
jmp 0x70be
leaq 0x568(%rsp), %rdi
callq 0x61b0
jmp 0x70c0
testb $0x1, 0x566(%rsp)
jne 0x70cc
jmp 0x70d9
leaq 0x567(%rsp), %rdi
callq 0x6360
jmp 0x7cbf
movq 0x6feeb(%rip), %rdi     # 0x76fd0
callq 0x6750
jmp 0x70ec
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x63d0
jmp 0x70f8
jmp 0x70fa
jmp 0x70fc
jmp 0x70fe
jmp 0x7100
movq 0x698(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x698(%rsp)
movl 0x6a0(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x6a0(%rsp)
jmp 0x6837
cmpl $0x1, 0x6a0(%rsp)
jl 0x7193
movq 0x698(%rsp), %rax
movq (%rax), %rdi
leaq 0x4e806(%rip), %rsi     # 0x5594c
callq 0x63c0
movq %rax, 0xf0(%rsp)
jmp 0x7155
movq 0xf0(%rsp), %rax
movq %rax, 0x690(%rsp)
cmpl $0x2, 0x6a0(%rsp)
jl 0x7191
movq 0x698(%rsp), %rax
movq 0x8(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x6230
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x68c(%rsp)
jmp 0x71ab
movq 0x6fe36(%rip), %rdi     # 0x76fd0
callq 0x6750
jmp 0x71a1
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x63d0
movq 0x6fe1e(%rip), %rdi     # 0x76fd0
leaq 0x4df83(%rip), %rsi     # 0x5513c
callq 0x62f0
movq %rax, 0xe8(%rsp)
jmp 0x71c8
movq 0xe8(%rsp), %rdi
movl 0x7012a(%rip), %esi     # 0x77300
callq 0x6420
movq %rax, 0xe0(%rsp)
jmp 0x71e5
movq 0xe0(%rsp), %rdi
movq 0x6fdc4(%rip), %rsi     # 0x76fb8
callq 0x6340
jmp 0x71fb
movl 0x700ff(%rip), %edi     # 0x77300
callq 0x7df0
jmp 0x7208
leaq 0x518(%rsp), %rdi
callq 0x7e30
jmp 0x7217
movq 0x690(%rsp), %rdx
movq 0x6fdaa(%rip), %rsi     # 0x76fd0
leaq 0x518(%rsp), %rdi
callq 0x53a60
jmp 0x7235
movss 0x68c(%rsp), %xmm0
movss 0x684(%rsp), %xmm1
leaq 0x460(%rsp), %rdi
leaq 0x518(%rsp), %rsi
callq 0x7e90
jmp 0x725e
movq 0x690(%rsp), %rdi
callq 0x6300
jmp 0x726d
leaq 0x448(%rsp), %rdi
callq 0x8400
leaq 0x430(%rsp), %rdi
callq 0x8410
leaq 0x398(%rsp), %rdi
callq 0x8420
jmp 0x7296
movl $0x0, 0x394(%rsp)
movl 0x394(%rsp), %eax
movl %eax, 0xdc(%rsp)
leaq 0x668(%rsp), %rdi
callq 0x8470
movq %rax, %rcx
movl 0xdc(%rsp), %eax
cmpl %ecx, %eax
jge 0x767c
movslq 0x394(%rsp), %rsi
leaq 0x668(%rsp), %rdi
callq 0x8490
movq %rax, 0x388(%rsp)
leaq 0x358(%rsp), %rdi
movq %rdi, 0xd0(%rsp)
callq 0x84b0
movq 0xd0(%rsp), %rsi
movq 0x388(%rsp), %rdi
movl $0x2c, %edx
callq 0x84c0
jmp 0x731c
leaq 0x358(%rsp), %rdi
callq 0x8850
movq %rax, 0x348(%rsp)
leaq 0x350(%rsp), %rdi
leaq 0x348(%rsp), %rsi
callq 0x8880
leaq 0x358(%rsp), %rdi
callq 0x88c0
movq %rax, 0x338(%rsp)
leaq 0x340(%rsp), %rdi
leaq 0x338(%rsp), %rsi
callq 0x8880
leaq 0x350(%rsp), %rdi
leaq 0x340(%rsp), %rsi
callq 0x88a0
testb $0x1, %al
jne 0x738e
jmp 0x7647
leaq 0x350(%rsp), %rdi
movq %rdi, 0xc0(%rsp)
callq 0x9ce0
movq 0xc0(%rsp), %rdi
movq %rax, 0xc8(%rsp)
callq 0x9ce0
movq 0xc8(%rsp), %rdx
movq %rax, %rcx
addq $0x20, %rcx
leaq 0x398(%rsp), %rdi
leaq 0x460(%rsp), %rsi
callq 0x88f0
jmp 0x73de
leaq 0x350(%rsp), %rdi
callq 0x9ce0
movq %rax, %rdi
leaq 0x4dd53(%rip), %rsi     # 0x55148
callq 0x7d90
movb %al, 0xbf(%rsp)
jmp 0x7403
movb 0xbf(%rsp), %al
testb $0x1, %al
jne 0x7413
jmp 0x7540
leaq 0x350(%rsp), %rdi
callq 0x9ce0
movq %rax, %rsi
addq $0x20, %rsi
leaq 0x398(%rsp), %rdi
callq 0x9d00
movq %rax, 0xb0(%rsp)
jmp 0x743e
movq 0xb0(%rsp), %rax
movq %rax, 0x330(%rsp)
cmpq $0x0, 0x330(%rsp)
je 0x753b
leaq 0x350(%rsp), %rdi
callq 0x9ce0
movq %rax, %rsi
addq $0x20, %rsi
leaq 0x308(%rsp), %rdi
leaq 0x330(%rsp), %rdx
callq 0x9dd0
jmp 0x7488
leaq 0x430(%rsp), %rdi
leaq 0x308(%rsp), %rsi
callq 0x9da0
jmp 0x749f
leaq 0x308(%rsp), %rdi
callq 0x9e10
jmp 0x753b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x658(%rsp)
movl %eax, 0x654(%rsp)
jmp 0x7cb2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x658(%rsp)
movl %eax, 0x654(%rsp)
jmp 0x7ca5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x658(%rsp)
movl %eax, 0x654(%rsp)
jmp 0x7c8b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x658(%rsp)
movl %eax, 0x654(%rsp)
jmp 0x766a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x658(%rsp)
movl %eax, 0x654(%rsp)
leaq 0x308(%rsp), %rdi
callq 0x9e10
jmp 0x766a
jmp 0x7633
leaq 0x350(%rsp), %rdi
callq 0x9ce0
movq %rax, %rdi
leaq 0x4dbfb(%rip), %rsi     # 0x55152
callq 0x7d90
movb %al, 0xaf(%rsp)
jmp 0x7565
movb 0xaf(%rsp), %al
testb $0x1, %al
jne 0x7575
jmp 0x7631
leaq 0x350(%rsp), %rdi
callq 0x9ce0
movq %rax, %rsi
addq $0x20, %rsi
leaq 0x398(%rsp), %rdi
callq 0x9e20
movq %rax, 0xa0(%rsp)
jmp 0x75a0
movq 0xa0(%rsp), %rax
movq %rax, 0x300(%rsp)
cmpq $0x0, 0x300(%rsp)
je 0x762f
leaq 0x350(%rsp), %rdi
callq 0x9ce0
movq %rax, %rsi
addq $0x20, %rsi
leaq 0x2d8(%rsp), %rdi
leaq 0x300(%rsp), %rdx
callq 0x9ef0
jmp 0x75e6
leaq 0x448(%rsp), %rdi
leaq 0x2d8(%rsp), %rsi
callq 0x9ec0
jmp 0x75fd
leaq 0x2d8(%rsp), %rdi
callq 0x9f30
jmp 0x762f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x658(%rsp)
movl %eax, 0x654(%rsp)
leaq 0x2d8(%rsp), %rdi
callq 0x9f30
jmp 0x766a
jmp 0x7631
jmp 0x7633
jmp 0x7635
leaq 0x350(%rsp), %rdi
callq 0x9f40
jmp 0x7346
leaq 0x358(%rsp), %rdi
callq 0x9f70
movl 0x394(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x394(%rsp)
jmp 0x72a1
leaq 0x358(%rsp), %rdi
callq 0x9f70
jmp 0x7c7e
leaq 0x2c0(%rsp), %rdi
callq 0x9f80
movl $0x0, 0x2bc(%rsp)
movl 0x2bc(%rsp), %eax
movl %eax, 0x9c(%rsp)
leaq 0x430(%rsp), %rdi
callq 0x9f90
movq %rax, %rcx
movl 0x9c(%rsp), %eax
cmpl %ecx, %eax
jge 0x77ef
movslq 0x2bc(%rsp), %rsi
leaq 0x430(%rsp), %rdi
movq %rdi, 0x90(%rsp)
callq 0x9fb0
movq 0x90(%rsp), %rdi
movq %rax, 0x2b0(%rsp)
movslq 0x2bc(%rsp), %rsi
callq 0x9fb0
movq 0x20(%rax), %rax
movq %rax, 0x2a8(%rsp)
leaq 0x258(%rsp), %rdi
callq 0x9fd0
jmp 0x7716
movq 0x2b0(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x2a8(%rsp), %rax
movq %rax, 0x80(%rsp)
leaq 0x460(%rsp), %rdi
callq 0xa180
movq %rax, 0x88(%rsp)
jmp 0x774a
movq 0x88(%rsp), %rcx
movq 0x80(%rsp), %rdx
movq 0x78(%rsp), %rsi
leaq 0x398(%rsp), %rdi
leaq 0x258(%rsp), %r8
callq 0xa010
jmp 0x7776
leaq 0x2c0(%rsp), %rdi
leaq 0x258(%rsp), %rsi
callq 0xa190
jmp 0x778d
leaq 0x258(%rsp), %rdi
callq 0xa200
movl 0x2bc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2bc(%rsp)
jmp 0x7694
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x658(%rsp)
movl %eax, 0x654(%rsp)
jmp 0x7c71
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x658(%rsp)
movl %eax, 0x654(%rsp)
leaq 0x258(%rsp), %rdi
callq 0xa200
jmp 0x7c71
leaq 0x238(%rsp), %rdi
callq 0xa230
jmp 0x77fe
movq 0x6f7cb(%rip), %rdi     # 0x76fd0
leaq 0x238(%rsp), %rsi
callq 0x6290
movq %rax, 0x70(%rsp)
jmp 0x7819
movq 0x70(%rsp), %rdi
leaq 0x4d934(%rip), %rsi     # 0x55159
callq 0x62f0
movq %rax, 0x68(%rsp)
jmp 0x7831
movq 0x68(%rsp), %rdi
movq 0x6f77b(%rip), %rsi     # 0x76fb8
callq 0x6340
jmp 0x7844
leaq 0x238(%rsp), %rdi
callq 0x61b0
leaq 0x2c0(%rsp), %rdi
callq 0xa2d0
testb $0x1, %al
jne 0x78ff
movl $0x0, 0x234(%rsp)
movl 0x234(%rsp), %eax
movl %eax, 0x64(%rsp)
leaq 0x2c0(%rsp), %rdi
callq 0xa320
movq %rax, %rcx
movl 0x64(%rsp), %eax
cmpl %ecx, %eax
jge 0x78fd
movslq 0x234(%rsp), %rsi
leaq 0x2c0(%rsp), %rdi
callq 0xaff0
movq %rax, %rdx
movq 0x6f71d(%rip), %rsi     # 0x76fd0
leaq 0x398(%rsp), %rdi
callq 0xa340
jmp 0x78c2
jmp 0x78c4
movl 0x234(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x234(%rsp)
jmp 0x7871
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x658(%rsp)
movl %eax, 0x654(%rsp)
leaq 0x238(%rsp), %rdi
callq 0x61b0
jmp 0x7c71
jmp 0x78ff
leaq 0x218(%rsp), %rdi
callq 0xb010
movl $0x0, 0x214(%rsp)
movl 0x214(%rsp), %eax
movl %eax, 0x60(%rsp)
leaq 0x448(%rsp), %rdi
callq 0xb020
movq %rax, %rcx
movl 0x60(%rsp), %eax
cmpl %ecx, %eax
jge 0x7a57
movslq 0x214(%rsp), %rsi
leaq 0x448(%rsp), %rdi
movq %rdi, 0x40(%rsp)
callq 0xb040
movq 0x40(%rsp), %rdi
movq %rax, 0x208(%rsp)
movslq 0x214(%rsp), %rsi
callq 0xb040
movq 0x20(%rax), %rax
movq %rax, 0x200(%rsp)
leaq 0x1b8(%rsp), %rdi
callq 0xb060
movq 0x208(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x200(%rsp), %rax
movq %rax, 0x50(%rsp)
leaq 0x460(%rsp), %rdi
callq 0xa180
movq %rax, 0x58(%rsp)
jmp 0x79b9
movq 0x58(%rsp), %rcx
movq 0x50(%rsp), %rdx
movq 0x48(%rsp), %rsi
movl 0x688(%rsp), %r9d
movq %rsp, %rax
movl $0x1, 0x8(%rax)
movl $0x64, (%rax)
leaq 0x398(%rsp), %rdi
leaq 0x1b8(%rsp), %r8
callq 0xb070
jmp 0x79f7
leaq 0x218(%rsp), %rdi
leaq 0x1b8(%rsp), %rsi
callq 0xb1d0
jmp 0x7a0e
leaq 0x1b8(%rsp), %rdi
callq 0xb240
movl 0x214(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x214(%rsp)
jmp 0x7917
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x658(%rsp)
movl %eax, 0x654(%rsp)
leaq 0x1b8(%rsp), %rdi
callq 0xb240
jmp 0x7c64
leaq 0x198(%rsp), %rdi
callq 0xa230
jmp 0x7a66
movq 0x6f563(%rip), %rdi     # 0x76fd0
leaq 0x198(%rsp), %rsi
callq 0x6290
movq %rax, 0x38(%rsp)
jmp 0x7a81
movq 0x38(%rsp), %rdi
leaq 0x4d720(%rip), %rsi     # 0x551ad
callq 0x62f0
movq %rax, 0x30(%rsp)
jmp 0x7a99
movq 0x30(%rsp), %rdi
movq 0x6f513(%rip), %rsi     # 0x76fb8
callq 0x6340
jmp 0x7aac
leaq 0x198(%rsp), %rdi
callq 0x61b0
leaq 0x218(%rsp), %rdi
callq 0xb250
testb $0x1, %al
jne 0x7b84
movl $0x0, 0x194(%rsp)
movl 0x194(%rsp), %eax
movl %eax, 0x2c(%rsp)
leaq 0x218(%rsp), %rdi
callq 0xb2a0
movq %rax, %rcx
movl 0x2c(%rsp), %eax
cmpl %ecx, %eax
jge 0x7b82
movslq 0x194(%rsp), %rsi
leaq 0x218(%rsp), %rdi
callq 0xb770
movq %rax, %rdx
movq 0x6f4b1(%rip), %rsi     # 0x76fd0
leaq 0x398(%rsp), %rdi
callq 0xb2c0
jmp 0x7b2e
jmp 0x7b30
movl 0x194(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x194(%rsp)
jmp 0x7ad9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x658(%rsp)
movl %eax, 0x654(%rsp)
jmp 0x7c64
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x658(%rsp)
movl %eax, 0x654(%rsp)
leaq 0x198(%rsp), %rdi
callq 0x61b0
jmp 0x7c64
jmp 0x7b84
movq 0x6f445(%rip), %rdi     # 0x76fd0
leaq 0x4d66d(%rip), %rsi     # 0x551ff
callq 0x62f0
movq %rax, 0x20(%rsp)
jmp 0x7b9e
callq 0x7cf0
movss %xmm0, 0x1c(%rsp)
jmp 0x7bab
movq 0x20(%rsp), %rdi
movss 0x1c(%rsp), %xmm0
movss 0x664(%rsp), %xmm1
subss %xmm1, %xmm0
callq 0x6210
movq %rax, 0x10(%rsp)
jmp 0x7bcf
movq 0x10(%rsp), %rdi
movq 0x6f3dd(%rip), %rsi     # 0x76fb8
callq 0x6340
jmp 0x7be2
movl $0x0, 0x6a4(%rsp)
leaq 0x218(%rsp), %rdi
callq 0xb790
leaq 0x2c0(%rsp), %rdi
callq 0xb7f0
leaq 0x398(%rsp), %rdi
callq 0xb850
leaq 0x430(%rsp), %rdi
callq 0xba50
leaq 0x448(%rsp), %rdi
callq 0xbab0
leaq 0x460(%rsp), %rdi
callq 0xbb10
leaq 0x518(%rsp), %rdi
callq 0xbc10
leaq 0x668(%rsp), %rdi
callq 0xbc70
movl 0x6a4(%rsp), %eax
addq $0x6a8, %rsp            # imm = 0x6A8
retq
leaq 0x218(%rsp), %rdi
callq 0xb790
leaq 0x2c0(%rsp), %rdi
callq 0xb7f0
leaq 0x398(%rsp), %rdi
callq 0xb850
leaq 0x430(%rsp), %rdi
callq 0xba50
leaq 0x448(%rsp), %rdi
callq 0xbab0
leaq 0x460(%rsp), %rdi
callq 0xbb10
leaq 0x518(%rsp), %rdi
callq 0xbc10
leaq 0x668(%rsp), %rdi
callq 0xbc70
movq 0x658(%rsp), %rdi
callq 0x6530
nopl (%rax)