// File: bonetblai[P]mdp-engine/wet/main.cc
// Function: main
int main(int argc, const char **argv) {
    size_t size = 0;
    float p = 0.0;
    unsigned num_trials = 1;

    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] == 'x') || (string(*argv) == "--version-x") ) {
                version += 1;
        } else if( ((*argv)[1] == 'y') || (string(*argv) == "--version-y") ) {
                version += 2;
        } else if( ((*argv)[1] == 'z') || (string(*argv) == "--version-z") ) {
                version += 4;
        } else {
            usage(cout);
            exit(-1);
        }
    }

    // check version modifiers
    if( ZVER && YVER ) {
        cout << "Y and Z cannot be used simultaneously." << endl;
        exit(-1);
    }

    // read problem parameters
    if( argc == 2 ) {
        size = strtoul(argv[0], 0, 0);
        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);
    state_t init(Random::random(size), Random::random(size));
    state_t goal(Random::random(size), Random::random(size));
    problem_t problem(size, p, init, goal);
    //problem.print(cout);

    // 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 $0x678, %rsp            # imm = 0x678
movl $0x0, 0x674(%rsp)
movl %edi, 0x670(%rsp)
movq %rsi, 0x668(%rsp)
movq $0x0, 0x660(%rsp)
movl $0x0, 0x65c(%rsp)
movl $0x1, 0x658(%rsp)
leaq 0x640(%rsp), %rdi
callq 0x7f70
callq 0x7f80
movss %xmm0, 0x1d8(%rsp)
jmp 0x6710
movss 0x1d8(%rsp), %xmm0
movss %xmm0, 0x63c(%rsp)
movq 0x6a8a7(%rip), %rdi     # 0x70fd0
leaq 0x18d0(%rip), %rsi      # 0x8000
callq 0x60f0
jmp 0x6737
movq 0x668(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x668(%rsp)
movl 0x670(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x670(%rsp)
xorl %eax, %eax
cmpl $0x1, 0x670(%rsp)
movb %al, 0x1d7(%rsp)
jle 0x678a
movq 0x668(%rsp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
sete %al
movb %al, 0x1d7(%rsp)
movb 0x1d7(%rsp), %al
testb $0x1, %al
jne 0x679a
jmp 0x730a
movq 0x668(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x1c0(%rsp)
leaq 0x607(%rsp), %rdi
movq %rdi, 0x1c8(%rsp)
callq 0x64b0
movq 0x1c0(%rsp), %rsi
movq 0x1c8(%rsp), %rdx
leaq 0x608(%rsp), %rdi
callq 0x63e0
jmp 0x67e1
leaq 0x4a95a(%rip), %rsi     # 0x51142
leaq 0x608(%rsp), %rdi
callq 0x8020
movb %al, 0x1bf(%rsp)
jmp 0x67fe
leaq 0x608(%rsp), %rdi
callq 0x61a0
leaq 0x607(%rsp), %rdi
callq 0x6320
movb 0x1bf(%rsp), %al
testb $0x1, %al
jne 0x6825
jmp 0x6893
movb $0x0, 0x6aaac(%rip)     # 0x712d8
jmp 0x72de
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x630(%rsp)
movl %eax, 0x62c(%rsp)
jmp 0x7f54
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x630(%rsp)
movl %eax, 0x62c(%rsp)
jmp 0x6881
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x630(%rsp)
movl %eax, 0x62c(%rsp)
leaq 0x608(%rsp), %rdi
callq 0x61a0
leaq 0x607(%rsp), %rdi
callq 0x6320
jmp 0x7f54
movq 0x668(%rsp), %rax
movq (%rax), %rax
movsbl 0x1(%rax), %ecx
movb $0x0, 0x5de(%rsp)
movb $0x0, 0x5dd(%rsp)
movb $0x1, %al
cmpl $0x72, %ecx
movb %al, 0x1be(%rsp)
je 0x6948
movq 0x668(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x1a8(%rsp)
leaq 0x5df(%rsp), %rdi
movq %rdi, 0x1b0(%rsp)
callq 0x64b0
movq 0x1a8(%rsp), %rsi
movq 0x1b0(%rsp), %rdx
movb $0x1, 0x5de(%rsp)
leaq 0x5e0(%rsp), %rdi
callq 0x63e0
jmp 0x6913
movb $0x1, 0x5dd(%rsp)
leaq 0x4a82c(%rip), %rsi     # 0x5114e
leaq 0x5e0(%rsp), %rdi
callq 0x8020
movb %al, 0x1a7(%rsp)
jmp 0x6938
movb 0x1a7(%rsp), %al
movb %al, 0x1be(%rsp)
jmp 0x6948
movb 0x1be(%rsp), %al
movb %al, 0x1a6(%rsp)
testb $0x1, 0x5dd(%rsp)
jne 0x6962
jmp 0x696f
leaq 0x5e0(%rsp), %rdi
callq 0x61a0
testb $0x1, 0x5de(%rsp)
jne 0x697b
jmp 0x6988
leaq 0x5df(%rsp), %rdi
callq 0x6320
movb 0x1a6(%rsp), %al
testb $0x1, %al
jne 0x6998
jmp 0x6ae7
movq 0x668(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x190(%rsp)
leaq 0x5b7(%rsp), %rdi
movq %rdi, 0x198(%rsp)
callq 0x64b0
movq 0x190(%rsp), %rsi
movq 0x198(%rsp), %rdx
leaq 0x5b8(%rsp), %rdi
callq 0x63e0
jmp 0x69e0
leaq 0x640(%rsp), %rdi
leaq 0x5b8(%rsp), %rsi
callq 0x8050
jmp 0x69f7
leaq 0x5b8(%rsp), %rdi
callq 0x61a0
leaq 0x5b7(%rsp), %rdi
callq 0x6320
movq 0x668(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x668(%rsp)
movl 0x670(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x670(%rsp)
jmp 0x72dc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x630(%rsp)
movl %eax, 0x62c(%rsp)
jmp 0x6a80
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x630(%rsp)
movl %eax, 0x62c(%rsp)
testb $0x1, 0x5dd(%rsp)
jne 0x6a71
jmp 0x6a7e
leaq 0x5e0(%rsp), %rdi
callq 0x61a0
jmp 0x6a80
testb $0x1, 0x5de(%rsp)
jne 0x6a8c
jmp 0x6a99
leaq 0x5df(%rsp), %rdi
callq 0x6320
jmp 0x7f54
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x630(%rsp)
movl %eax, 0x62c(%rsp)
jmp 0x6ad5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x630(%rsp)
movl %eax, 0x62c(%rsp)
leaq 0x5b8(%rsp), %rdi
callq 0x61a0
leaq 0x5b7(%rsp), %rdi
callq 0x6320
jmp 0x7f54
movq 0x668(%rsp), %rax
movq (%rax), %rax
movsbl 0x1(%rax), %ecx
movb $0x0, 0x58e(%rsp)
movb $0x0, 0x58d(%rsp)
movb $0x1, %al
cmpl $0x73, %ecx
movb %al, 0x18f(%rsp)
je 0x6b9c
movq 0x668(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x178(%rsp)
leaq 0x58f(%rsp), %rdi
movq %rdi, 0x180(%rsp)
callq 0x64b0
movq 0x178(%rsp), %rsi
movq 0x180(%rsp), %rdx
movb $0x1, 0x58e(%rsp)
leaq 0x590(%rsp), %rdi
callq 0x63e0
jmp 0x6b67
movb $0x1, 0x58d(%rsp)
leaq 0x4a5e2(%rip), %rsi     # 0x51158
leaq 0x590(%rsp), %rdi
callq 0x8020
movb %al, 0x177(%rsp)
jmp 0x6b8c
movb 0x177(%rsp), %al
movb %al, 0x18f(%rsp)
jmp 0x6b9c
movb 0x18f(%rsp), %al
movb %al, 0x176(%rsp)
testb $0x1, 0x58d(%rsp)
jne 0x6bb6
jmp 0x6bc3
leaq 0x590(%rsp), %rdi
callq 0x61a0
testb $0x1, 0x58e(%rsp)
jne 0x6bcf
jmp 0x6bdc
leaq 0x58f(%rsp), %rdi
callq 0x6320
movb 0x176(%rsp), %al
testb $0x1, %al
jne 0x6bec
jmp 0x6ca2
movq 0x668(%rsp), %rax
movq 0x8(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x60e0
movl %eax, 0x6a6f7(%rip)     # 0x71300
movl 0x6a6f1(%rip), %eax     # 0x71300
movl %eax, 0x6a6ef(%rip)     # 0x71304
movq 0x668(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x668(%rsp)
movl 0x670(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x670(%rsp)
jmp 0x72da
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x630(%rsp)
movl %eax, 0x62c(%rsp)
jmp 0x6c84
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x630(%rsp)
movl %eax, 0x62c(%rsp)
testb $0x1, 0x58d(%rsp)
jne 0x6c75
jmp 0x6c82
leaq 0x590(%rsp), %rdi
callq 0x61a0
jmp 0x6c84
testb $0x1, 0x58e(%rsp)
jne 0x6c90
jmp 0x6c9d
leaq 0x58f(%rsp), %rdi
callq 0x6320
jmp 0x7f54
movq 0x668(%rsp), %rax
movq (%rax), %rax
movsbl 0x1(%rax), %ecx
movb $0x0, 0x566(%rsp)
movb $0x0, 0x565(%rsp)
movb $0x1, %al
cmpl $0x74, %ecx
movb %al, 0x175(%rsp)
je 0x6d57
movq 0x668(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x160(%rsp)
leaq 0x567(%rsp), %rdi
movq %rdi, 0x168(%rsp)
callq 0x64b0
movq 0x160(%rsp), %rsi
movq 0x168(%rsp), %rdx
movb $0x1, 0x566(%rsp)
leaq 0x568(%rsp), %rdi
callq 0x63e0
jmp 0x6d22
movb $0x1, 0x565(%rsp)
leaq 0x4a42e(%rip), %rsi     # 0x5115f
leaq 0x568(%rsp), %rdi
callq 0x8020
movb %al, 0x15f(%rsp)
jmp 0x6d47
movb 0x15f(%rsp), %al
movb %al, 0x175(%rsp)
jmp 0x6d57
movb 0x175(%rsp), %al
movb %al, 0x15e(%rsp)
testb $0x1, 0x565(%rsp)
jne 0x6d71
jmp 0x6d7e
leaq 0x568(%rsp), %rdi
callq 0x61a0
testb $0x1, 0x566(%rsp)
jne 0x6d8a
jmp 0x6d97
leaq 0x567(%rsp), %rdi
callq 0x6320
movb 0x15e(%rsp), %al
testb $0x1, %al
jne 0x6da7
jmp 0x6e52
movq 0x668(%rsp), %rax
movq 0x8(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x60e0
movl %eax, 0x658(%rsp)
movq 0x668(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x668(%rsp)
movl 0x670(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x670(%rsp)
jmp 0x72d8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x630(%rsp)
movl %eax, 0x62c(%rsp)
jmp 0x6e34
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x630(%rsp)
movl %eax, 0x62c(%rsp)
testb $0x1, 0x565(%rsp)
jne 0x6e25
jmp 0x6e32
leaq 0x568(%rsp), %rdi
callq 0x61a0
jmp 0x6e34
testb $0x1, 0x566(%rsp)
jne 0x6e40
jmp 0x6e4d
leaq 0x567(%rsp), %rdi
callq 0x6320
jmp 0x7f54
movq 0x668(%rsp), %rax
movq (%rax), %rax
movsbl 0x1(%rax), %ecx
movb $0x0, 0x53e(%rsp)
movb $0x0, 0x53d(%rsp)
movb $0x1, %al
cmpl $0x78, %ecx
movb %al, 0x15d(%rsp)
je 0x6f07
movq 0x668(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x148(%rsp)
leaq 0x53f(%rsp), %rdi
movq %rdi, 0x150(%rsp)
callq 0x64b0
movq 0x148(%rsp), %rsi
movq 0x150(%rsp), %rdx
movb $0x1, 0x53e(%rsp)
leaq 0x540(%rsp), %rdi
callq 0x63e0
jmp 0x6ed2
movb $0x1, 0x53d(%rsp)
leaq 0x4a287(%rip), %rsi     # 0x51168
leaq 0x540(%rsp), %rdi
callq 0x8020
movb %al, 0x147(%rsp)
jmp 0x6ef7
movb 0x147(%rsp), %al
movb %al, 0x15d(%rsp)
jmp 0x6f07
movb 0x15d(%rsp), %al
movb %al, 0x146(%rsp)
testb $0x1, 0x53d(%rsp)
jne 0x6f21
jmp 0x6f2e
leaq 0x540(%rsp), %rdi
callq 0x61a0
testb $0x1, 0x53e(%rsp)
jne 0x6f3a
jmp 0x6f47
leaq 0x53f(%rsp), %rdi
callq 0x6320
movb 0x146(%rsp), %al
testb $0x1, %al
jne 0x6f54
jmp 0x6fcb
movl 0x6a39a(%rip), %eax     # 0x712f4
addl $0x1, %eax
movl %eax, 0x6a391(%rip)     # 0x712f4
jmp 0x72d6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x630(%rsp)
movl %eax, 0x62c(%rsp)
jmp 0x6fad
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x630(%rsp)
movl %eax, 0x62c(%rsp)
testb $0x1, 0x53d(%rsp)
jne 0x6f9e
jmp 0x6fab
leaq 0x540(%rsp), %rdi
callq 0x61a0
jmp 0x6fad
testb $0x1, 0x53e(%rsp)
jne 0x6fb9
jmp 0x6fc6
leaq 0x53f(%rsp), %rdi
callq 0x6320
jmp 0x7f54
movq 0x668(%rsp), %rax
movq (%rax), %rax
movsbl 0x1(%rax), %ecx
movb $0x0, 0x516(%rsp)
movb $0x0, 0x515(%rsp)
movb $0x1, %al
cmpl $0x79, %ecx
movb %al, 0x145(%rsp)
je 0x7080
movq 0x668(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x130(%rsp)
leaq 0x517(%rsp), %rdi
movq %rdi, 0x138(%rsp)
callq 0x64b0
movq 0x130(%rsp), %rsi
movq 0x138(%rsp), %rdx
movb $0x1, 0x516(%rsp)
leaq 0x518(%rsp), %rdi
callq 0x63e0
jmp 0x704b
movb $0x1, 0x515(%rsp)
leaq 0x4a11a(%rip), %rsi     # 0x51174
leaq 0x518(%rsp), %rdi
callq 0x8020
movb %al, 0x12f(%rsp)
jmp 0x7070
movb 0x12f(%rsp), %al
movb %al, 0x145(%rsp)
jmp 0x7080
movb 0x145(%rsp), %al
movb %al, 0x12e(%rsp)
testb $0x1, 0x515(%rsp)
jne 0x709a
jmp 0x70a7
leaq 0x518(%rsp), %rdi
callq 0x61a0
testb $0x1, 0x516(%rsp)
jne 0x70b3
jmp 0x70c0
leaq 0x517(%rsp), %rdi
callq 0x6320
movb 0x12e(%rsp), %al
testb $0x1, %al
jne 0x70cd
jmp 0x7144
movl 0x6a221(%rip), %eax     # 0x712f4
addl $0x2, %eax
movl %eax, 0x6a218(%rip)     # 0x712f4
jmp 0x72d4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x630(%rsp)
movl %eax, 0x62c(%rsp)
jmp 0x7126
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x630(%rsp)
movl %eax, 0x62c(%rsp)
testb $0x1, 0x515(%rsp)
jne 0x7117
jmp 0x7124
leaq 0x518(%rsp), %rdi
callq 0x61a0
jmp 0x7126
testb $0x1, 0x516(%rsp)
jne 0x7132
jmp 0x713f
leaq 0x517(%rsp), %rdi
callq 0x6320
jmp 0x7f54
movq 0x668(%rsp), %rax
movq (%rax), %rax
movsbl 0x1(%rax), %ecx
movb $0x0, 0x4ee(%rsp)
movb $0x0, 0x4ed(%rsp)
movb $0x1, %al
cmpl $0x7a, %ecx
movb %al, 0x12d(%rsp)
je 0x71f9
movq 0x668(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x118(%rsp)
leaq 0x4ef(%rsp), %rdi
movq %rdi, 0x120(%rsp)
callq 0x64b0
movq 0x118(%rsp), %rsi
movq 0x120(%rsp), %rdx
movb $0x1, 0x4ee(%rsp)
leaq 0x4f0(%rsp), %rdi
callq 0x63e0
jmp 0x71c4
movb $0x1, 0x4ed(%rsp)
leaq 0x49fad(%rip), %rsi     # 0x51180
leaq 0x4f0(%rsp), %rdi
callq 0x8020
movb %al, 0x117(%rsp)
jmp 0x71e9
movb 0x117(%rsp), %al
movb %al, 0x12d(%rsp)
jmp 0x71f9
movb 0x12d(%rsp), %al
movb %al, 0x116(%rsp)
testb $0x1, 0x4ed(%rsp)
jne 0x7213
jmp 0x7220
leaq 0x4f0(%rsp), %rdi
callq 0x61a0
testb $0x1, 0x4ee(%rsp)
jne 0x722c
jmp 0x7239
leaq 0x4ef(%rsp), %rdi
callq 0x6320
movb 0x116(%rsp), %al
testb $0x1, %al
jne 0x7246
jmp 0x72ba
movl 0x6a0a8(%rip), %eax     # 0x712f4
addl $0x4, %eax
movl %eax, 0x6a09f(%rip)     # 0x712f4
jmp 0x72d2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x630(%rsp)
movl %eax, 0x62c(%rsp)
jmp 0x729c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x630(%rsp)
movl %eax, 0x62c(%rsp)
testb $0x1, 0x4ed(%rsp)
jne 0x728d
jmp 0x729a
leaq 0x4f0(%rsp), %rdi
callq 0x61a0
jmp 0x729c
testb $0x1, 0x4ee(%rsp)
jne 0x72a8
jmp 0x72b5
leaq 0x4ef(%rsp), %rdi
callq 0x6320
jmp 0x7f54
movq 0x69d0f(%rip), %rdi     # 0x70fd0
callq 0x6680
jmp 0x72c8
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x6370
jmp 0x72d4
jmp 0x72d6
jmp 0x72d8
jmp 0x72da
jmp 0x72dc
jmp 0x72de
jmp 0x72e0
movq 0x668(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x668(%rsp)
movl 0x670(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x670(%rsp)
jmp 0x675c
movl 0x69fe4(%rip), %eax     # 0x712f4
andl $0x4, %eax
cmpl $0x0, %eax
je 0x7363
movl 0x69fd6(%rip), %eax     # 0x712f4
andl $0x2, %eax
cmpl $0x0, %eax
je 0x7363
movq 0x69ca3(%rip), %rdi     # 0x70fd0
leaq 0x49e58(%rip), %rsi     # 0x5118c
callq 0x62c0
movq %rax, 0x108(%rsp)
jmp 0x7343
movq 0x108(%rsp), %rdi
movq 0x69c66(%rip), %rsi     # 0x70fb8
callq 0x6300
jmp 0x7359
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x6370
cmpl $0x2, 0x670(%rsp)
jne 0x73af
movq 0x668(%rsp), %rax
movq (%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x60e0
movq %rax, 0x660(%rsp)
movq 0x668(%rsp), %rax
movq 0x8(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x6220
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x65c(%rsp)
jmp 0x73c7
movq 0x69c1a(%rip), %rdi     # 0x70fd0
callq 0x6680
jmp 0x73bd
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x6370
movq 0x69c02(%rip), %rdi     # 0x70fd0
leaq 0x49dde(%rip), %rsi     # 0x511b3
callq 0x62c0
movq %rax, 0x100(%rsp)
jmp 0x73e4
movq 0x100(%rsp), %rdi
movl 0x69f0e(%rip), %esi     # 0x71300
callq 0x63c0
movq %rax, 0xf8(%rsp)
jmp 0x7401
movq 0xf8(%rsp), %rdi
movq 0x69ba8(%rip), %rsi     # 0x70fb8
callq 0x6300
jmp 0x7417
movl 0x69ee3(%rip), %edi     # 0x71300
callq 0x8080
jmp 0x7424
movl 0x660(%rsp), %edi
callq 0x80c0
movl %eax, 0xf4(%rsp)
jmp 0x7439
movl 0x660(%rsp), %edi
callq 0x80c0
movl %eax, 0xf0(%rsp)
jmp 0x744e
movl 0xf0(%rsp), %edx
movl 0xf4(%rsp), %esi
leaq 0x4e8(%rsp), %rdi
callq 0x8110
jmp 0x746b
movl 0x660(%rsp), %edi
callq 0x80c0
movl %eax, 0xec(%rsp)
jmp 0x7480
movl 0x660(%rsp), %edi
callq 0x80c0
movl %eax, 0xe8(%rsp)
jmp 0x7495
movl 0xe8(%rsp), %edx
movl 0xec(%rsp), %esi
leaq 0x4e4(%rsp), %rdi
callq 0x8110
jmp 0x74b2
movq 0x660(%rsp), %rsi
movss 0x65c(%rsp), %xmm0
leaq 0x4a8(%rsp), %rdi
leaq 0x4e8(%rsp), %rdx
leaq 0x4e4(%rsp), %rcx
callq 0x8140
jmp 0x74e2
leaq 0x490(%rsp), %rdi
callq 0x8310
leaq 0x478(%rsp), %rdi
callq 0x8320
leaq 0x3e0(%rsp), %rdi
callq 0x8330
jmp 0x750b
movl $0x0, 0x3dc(%rsp)
movl 0x3dc(%rsp), %eax
movl %eax, 0xe4(%rsp)
leaq 0x640(%rsp), %rdi
callq 0x8380
movq %rax, %rcx
movl 0xe4(%rsp), %eax
cmpl %ecx, %eax
jge 0x78f1
movslq 0x3dc(%rsp), %rsi
leaq 0x640(%rsp), %rdi
callq 0x83a0
movq %rax, 0x3d0(%rsp)
leaq 0x3a0(%rsp), %rdi
movq %rdi, 0xd8(%rsp)
callq 0x83c0
movq 0xd8(%rsp), %rsi
movq 0x3d0(%rsp), %rdi
movl $0x2c, %edx
callq 0x83d0
jmp 0x7591
leaq 0x3a0(%rsp), %rdi
callq 0x8760
movq %rax, 0x390(%rsp)
leaq 0x398(%rsp), %rdi
leaq 0x390(%rsp), %rsi
callq 0x8790
leaq 0x3a0(%rsp), %rdi
callq 0x87d0
movq %rax, 0x380(%rsp)
leaq 0x388(%rsp), %rdi
leaq 0x380(%rsp), %rsi
callq 0x8790
leaq 0x398(%rsp), %rdi
leaq 0x388(%rsp), %rsi
callq 0x87b0
testb $0x1, %al
jne 0x7603
jmp 0x78bc
leaq 0x398(%rsp), %rdi
movq %rdi, 0xc8(%rsp)
callq 0x9bf0
movq 0xc8(%rsp), %rdi
movq %rax, 0xd0(%rsp)
callq 0x9bf0
movq 0xd0(%rsp), %rdx
movq %rax, %rcx
addq $0x20, %rcx
leaq 0x3e0(%rsp), %rdi
leaq 0x4a8(%rsp), %rsi
callq 0x8800
jmp 0x7653
leaq 0x398(%rsp), %rdi
callq 0x9bf0
movq %rax, %rdi
leaq 0x49b55(%rip), %rsi     # 0x511bf
callq 0x8020
movb %al, 0xc7(%rsp)
jmp 0x7678
movb 0xc7(%rsp), %al
testb $0x1, %al
jne 0x7688
jmp 0x77b5
leaq 0x398(%rsp), %rdi
callq 0x9bf0
movq %rax, %rsi
addq $0x20, %rsi
leaq 0x3e0(%rsp), %rdi
callq 0x9c10
movq %rax, 0xb8(%rsp)
jmp 0x76b3
movq 0xb8(%rsp), %rax
movq %rax, 0x378(%rsp)
cmpq $0x0, 0x378(%rsp)
je 0x77b0
leaq 0x398(%rsp), %rdi
callq 0x9bf0
movq %rax, %rsi
addq $0x20, %rsi
leaq 0x350(%rsp), %rdi
leaq 0x378(%rsp), %rdx
callq 0x9ce0
jmp 0x76fd
leaq 0x478(%rsp), %rdi
leaq 0x350(%rsp), %rsi
callq 0x9cb0
jmp 0x7714
leaq 0x350(%rsp), %rdi
callq 0x9d20
jmp 0x77b0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x630(%rsp)
movl %eax, 0x62c(%rsp)
jmp 0x7f47
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x630(%rsp)
movl %eax, 0x62c(%rsp)
jmp 0x7f3a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x630(%rsp)
movl %eax, 0x62c(%rsp)
jmp 0x7f13
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x630(%rsp)
movl %eax, 0x62c(%rsp)
jmp 0x78df
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x630(%rsp)
movl %eax, 0x62c(%rsp)
leaq 0x350(%rsp), %rdi
callq 0x9d20
jmp 0x78df
jmp 0x78a8
leaq 0x398(%rsp), %rdi
callq 0x9bf0
movq %rax, %rdi
leaq 0x499fd(%rip), %rsi     # 0x511c9
callq 0x8020
movb %al, 0xb7(%rsp)
jmp 0x77da
movb 0xb7(%rsp), %al
testb $0x1, %al
jne 0x77ea
jmp 0x78a6
leaq 0x398(%rsp), %rdi
callq 0x9bf0
movq %rax, %rsi
addq $0x20, %rsi
leaq 0x3e0(%rsp), %rdi
callq 0x9d30
movq %rax, 0xa8(%rsp)
jmp 0x7815
movq 0xa8(%rsp), %rax
movq %rax, 0x348(%rsp)
cmpq $0x0, 0x348(%rsp)
je 0x78a4
leaq 0x398(%rsp), %rdi
callq 0x9bf0
movq %rax, %rsi
addq $0x20, %rsi
leaq 0x320(%rsp), %rdi
leaq 0x348(%rsp), %rdx
callq 0x9e00
jmp 0x785b
leaq 0x490(%rsp), %rdi
leaq 0x320(%rsp), %rsi
callq 0x9dd0
jmp 0x7872
leaq 0x320(%rsp), %rdi
callq 0x9e40
jmp 0x78a4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x630(%rsp)
movl %eax, 0x62c(%rsp)
leaq 0x320(%rsp), %rdi
callq 0x9e40
jmp 0x78df
jmp 0x78a6
jmp 0x78a8
jmp 0x78aa
leaq 0x398(%rsp), %rdi
callq 0x9e50
jmp 0x75bb
leaq 0x3a0(%rsp), %rdi
callq 0x9e80
movl 0x3dc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x3dc(%rsp)
jmp 0x7516
leaq 0x3a0(%rsp), %rdi
callq 0x9e80
jmp 0x7f06
leaq 0x308(%rsp), %rdi
callq 0x9e90
movl $0x0, 0x304(%rsp)
movl 0x304(%rsp), %eax
movl %eax, 0xa4(%rsp)
leaq 0x478(%rsp), %rdi
callq 0x9ea0
movq %rax, %rcx
movl 0xa4(%rsp), %eax
cmpl %ecx, %eax
jge 0x7a6a
movslq 0x304(%rsp), %rsi
leaq 0x478(%rsp), %rdi
movq %rdi, 0x98(%rsp)
callq 0x9ec0
movq 0x98(%rsp), %rdi
movq %rax, 0x2f8(%rsp)
movslq 0x304(%rsp), %rsi
callq 0x9ec0
movq 0x20(%rax), %rax
movq %rax, 0x2f0(%rsp)
leaq 0x2a0(%rsp), %rdi
callq 0x9ee0
jmp 0x798b
movq 0x2f8(%rsp), %rax
movq %rax, 0x80(%rsp)
movq 0x2f0(%rsp), %rax
movq %rax, 0x88(%rsp)
leaq 0x4a8(%rsp), %rdi
callq 0xa080
movq %rax, 0x90(%rsp)
jmp 0x79c2
movq 0x90(%rsp), %rcx
movq 0x88(%rsp), %rdx
movq 0x80(%rsp), %rsi
leaq 0x3e0(%rsp), %rdi
leaq 0x2a0(%rsp), %r8
callq 0x9f10
jmp 0x79f1
leaq 0x308(%rsp), %rdi
leaq 0x2a0(%rsp), %rsi
callq 0xa090
jmp 0x7a08
leaq 0x2a0(%rsp), %rdi
callq 0xa100
movl 0x304(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x304(%rsp)
jmp 0x7909
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x630(%rsp)
movl %eax, 0x62c(%rsp)
jmp 0x7ef9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x630(%rsp)
movl %eax, 0x62c(%rsp)
leaq 0x2a0(%rsp), %rdi
callq 0xa100
jmp 0x7ef9
leaq 0x280(%rsp), %rdi
callq 0xa130
jmp 0x7a79
movq 0x69550(%rip), %rdi     # 0x70fd0
leaq 0x280(%rsp), %rsi
callq 0x6280
movq %rax, 0x78(%rsp)
jmp 0x7a94
movq 0x78(%rsp), %rdi
leaq 0x49730(%rip), %rsi     # 0x511d0
callq 0x62c0
movq %rax, 0x70(%rsp)
jmp 0x7aac
movq 0x70(%rsp), %rdi
movq 0x69500(%rip), %rsi     # 0x70fb8
callq 0x6300
jmp 0x7abf
leaq 0x280(%rsp), %rdi
callq 0x61a0
leaq 0x308(%rsp), %rdi
callq 0xa1d0
testb $0x1, %al
jne 0x7b7a
movl $0x0, 0x27c(%rsp)
movl 0x27c(%rsp), %eax
movl %eax, 0x6c(%rsp)
leaq 0x308(%rsp), %rdi
callq 0xa220
movq %rax, %rcx
movl 0x6c(%rsp), %eax
cmpl %ecx, %eax
jge 0x7b78
movslq 0x27c(%rsp), %rsi
leaq 0x308(%rsp), %rdi
callq 0xaef0
movq %rax, %rdx
movq 0x694a2(%rip), %rsi     # 0x70fd0
leaq 0x3e0(%rsp), %rdi
callq 0xa240
jmp 0x7b3d
jmp 0x7b3f
movl 0x27c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x27c(%rsp)
jmp 0x7aec
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x630(%rsp)
movl %eax, 0x62c(%rsp)
leaq 0x280(%rsp), %rdi
callq 0x61a0
jmp 0x7ef9
jmp 0x7b7a
leaq 0x260(%rsp), %rdi
callq 0xaf10
movl $0x0, 0x25c(%rsp)
movl 0x25c(%rsp), %eax
movl %eax, 0x68(%rsp)
leaq 0x490(%rsp), %rdi
callq 0xaf20
movq %rax, %rcx
movl 0x68(%rsp), %eax
cmpl %ecx, %eax
jge 0x7cd2
movslq 0x25c(%rsp), %rsi
leaq 0x490(%rsp), %rdi
movq %rdi, 0x48(%rsp)
callq 0xaf40
movq 0x48(%rsp), %rdi
movq %rax, 0x250(%rsp)
movslq 0x25c(%rsp), %rsi
callq 0xaf40
movq 0x20(%rax), %rax
movq %rax, 0x248(%rsp)
leaq 0x200(%rsp), %rdi
callq 0xaf60
movq 0x250(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x248(%rsp), %rax
movq %rax, 0x58(%rsp)
leaq 0x4a8(%rsp), %rdi
callq 0xa080
movq %rax, 0x60(%rsp)
jmp 0x7c34
movq 0x60(%rsp), %rcx
movq 0x58(%rsp), %rdx
movq 0x50(%rsp), %rsi
movl 0x658(%rsp), %r9d
movq %rsp, %rax
movl $0x1, 0x8(%rax)
movl $0x64, (%rax)
leaq 0x3e0(%rsp), %rdi
leaq 0x200(%rsp), %r8
callq 0xaf70
jmp 0x7c72
leaq 0x260(%rsp), %rdi
leaq 0x200(%rsp), %rsi
callq 0xb0d0
jmp 0x7c89
leaq 0x200(%rsp), %rdi
callq 0xb140
movl 0x25c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x25c(%rsp)
jmp 0x7b92
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x630(%rsp)
movl %eax, 0x62c(%rsp)
leaq 0x200(%rsp), %rdi
callq 0xb140
jmp 0x7eec
leaq 0x1e0(%rsp), %rdi
callq 0xa130
jmp 0x7ce1
movq 0x692e8(%rip), %rdi     # 0x70fd0
leaq 0x1e0(%rsp), %rsi
callq 0x6280
movq %rax, 0x40(%rsp)
jmp 0x7cfc
movq 0x40(%rsp), %rdi
leaq 0x4951c(%rip), %rsi     # 0x51224
callq 0x62c0
movq %rax, 0x38(%rsp)
jmp 0x7d14
movq 0x38(%rsp), %rdi
movq 0x69298(%rip), %rsi     # 0x70fb8
callq 0x6300
jmp 0x7d27
leaq 0x1e0(%rsp), %rdi
callq 0x61a0
leaq 0x260(%rsp), %rdi
callq 0xb150
testb $0x1, %al
jne 0x7dff
movl $0x0, 0x1dc(%rsp)
movl 0x1dc(%rsp), %eax
movl %eax, 0x34(%rsp)
leaq 0x260(%rsp), %rdi
callq 0xb1a0
movq %rax, %rcx
movl 0x34(%rsp), %eax
cmpl %ecx, %eax
jge 0x7dfd
movslq 0x1dc(%rsp), %rsi
leaq 0x260(%rsp), %rdi
callq 0xb670
movq %rax, %rdx
movq 0x69236(%rip), %rsi     # 0x70fd0
leaq 0x3e0(%rsp), %rdi
callq 0xb1c0
jmp 0x7da9
jmp 0x7dab
movl 0x1dc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1dc(%rsp)
jmp 0x7d54
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x630(%rsp)
movl %eax, 0x62c(%rsp)
jmp 0x7eec
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x630(%rsp)
movl %eax, 0x62c(%rsp)
leaq 0x1e0(%rsp), %rdi
callq 0x61a0
jmp 0x7eec
jmp 0x7dff
movq 0x691ca(%rip), %rdi     # 0x70fd0
leaq 0x49469(%rip), %rsi     # 0x51276
callq 0x62c0
movq %rax, 0x28(%rsp)
jmp 0x7e19
callq 0x7f80
movss %xmm0, 0x24(%rsp)
jmp 0x7e26
movq 0x28(%rsp), %rdi
movss 0x24(%rsp), %xmm0
movss 0x63c(%rsp), %xmm1
subss %xmm1, %xmm0
callq 0x6200
movq %rax, 0x18(%rsp)
jmp 0x7e4a
movq 0x18(%rsp), %rdi
movq 0x69162(%rip), %rsi     # 0x70fb8
callq 0x6300
jmp 0x7e5d
movl $0x0, 0x674(%rsp)
leaq 0x260(%rsp), %rdi
callq 0xb690
leaq 0x308(%rsp), %rdi
callq 0xb6f0
leaq 0x3e0(%rsp), %rdi
callq 0xb750
leaq 0x478(%rsp), %rdi
callq 0xb950
leaq 0x490(%rsp), %rdi
callq 0xb9b0
leaq 0x4a8(%rsp), %rdi
callq 0xba10
leaq 0x4e4(%rsp), %rdi
callq 0xba80
leaq 0x4e8(%rsp), %rdi
callq 0xba80
leaq 0x640(%rsp), %rdi
callq 0xba90
movl 0x674(%rsp), %eax
addq $0x678, %rsp            # imm = 0x678
retq
leaq 0x260(%rsp), %rdi
callq 0xb690
leaq 0x308(%rsp), %rdi
callq 0xb6f0
leaq 0x3e0(%rsp), %rdi
callq 0xb750
leaq 0x478(%rsp), %rdi
callq 0xb950
leaq 0x490(%rsp), %rdi
callq 0xb9b0
leaq 0x4a8(%rsp), %rdi
callq 0xba10
leaq 0x4e4(%rsp), %rdi
callq 0xba80
leaq 0x4e8(%rsp), %rdi
callq 0xba80
leaq 0x640(%rsp), %rdi
callq 0xba90
movq 0x630(%rsp), %rdi
callq 0x64a0
nop