// File: /workspace/github_cpp_makefile_star2_O3/bonetblai[P]mdp-engine/ctp3/main.cc
// Function: main
int main(int argc, const char **argv) {
    int cache_capacity = (int)5e5;
    int shortcut_cost = (int)5e3;
    float dead_end_value = 0;
    unsigned num_trials = 1;

    int calculate_features = 0;
    int calculate_nsamples = 0;

    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] == 'c') || (string(*argv) == "--shortcut-cost") ) {
            shortcut_cost = 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 if( ((*argv)[1] == 'f') || (string(*argv) == "--calculate-features") ) {
            calculate_nsamples = strtoul(argv[1], 0, 0);
            calculate_features = true;
            ++argv;
            --argc;
        } else {
            usage(cout);
            exit(-1);
        }
    }

    // read problem parameters
    CTP::graph_t graph(false, shortcut_cost);
    if( argc >= 1 ) {
        ifstream is(argv[0], ifstream::in);
        if( !graph.parse(is) ) exit(-1);
        is.close();
    } else {
        usage(cout);
        exit(-1);
    }

    // build problem instances
    cout << "main: seed=" << Algorithm::g_seed << endl;
    Random::set_seed(Algorithm::g_seed);
    state_t::initialize(graph, false, cache_capacity);
    problem_t problem(graph, dead_end_value, false, cache_capacity);

    if( calculate_features ) {
        float probability = probability_bad_weather(graph, calculate_nsamples);
        cout << "P(bad weather)=" << probability << endl;
        pair<float, float> p = branching_factor(problem, calculate_nsamples);
        cout << "avg-branching=" << p.first << endl;
        cout << "max-branching=" << p.second << endl;
    }

    // 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;
    dispatcher.insert_heuristic("ctp-min-min()", new ctp_min_min_t(problem));
    dispatcher.insert_policy("ctp-optimistic()", new ctp_optimistic_policy_t(problem, graph, 1.0));
    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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x4b8, %rsp            # imm = 0x4B8
movq %rsi, %r12
movl %edi, %ebp
xorps %xmm0, %xmm0
movaps %xmm0, 0xd0(%rsp)
movq $0x0, 0xe0(%rsp)
xorl %r13d, %r13d
leaq 0x2b0(%rsp), %rbx
xorl %edi, %edi
movq %rbx, %rsi
callq 0x5190
xorps %xmm0, %xmm0
cvtsi2ssq (%rbx), %xmm0
movss %xmm0, 0x6c(%rsp)
xorps %xmm0, %xmm0
cvtsi2ssq 0x8(%rbx), %xmm0
movss %xmm0, 0x64(%rsp)
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
movq %rbx, %rsi
callq 0x5190
xorps %xmm0, %xmm0
cvtsi2ssq (%rbx), %xmm0
movss %xmm0, 0x68(%rsp)
xorps %xmm0, %xmm0
cvtsi2ssq 0x8(%rbx), %xmm0
movss %xmm0, 0xc(%rsp)
movq 0x3763f(%rip), %rax     # 0x3cfd8
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl $0xfffffefb, %edx       # imm = 0xFFFFFEFB
andl 0x18(%rax,%rcx), %edx
orl $0x4, %edx
movl %edx, 0x18(%rax,%rcx)
leaq 0x8(%r12), %r15
cmpl $0x3, %ebp
jl 0x5d2d
movq $0x0, 0xf0(%rsp)
movl $0x1, %eax
movq %rax, 0x28(%rsp)
xorps %xmm0, %xmm0
movss %xmm0, 0x10(%rsp)
movl $0x1388, %eax           # imm = 0x1388
movq %rax, 0x100(%rsp)
leaq 0x2b0(%rsp), %r13
leaq 0x108(%rsp), %r14
movq $0x0, 0xf8(%rsp)
movq 0x8(%r12), %rsi
cmpb $0x2d, (%rsi)
jne 0x5d0f
movq %r13, %rdi
movq %r14, %rdx
callq 0x5100
movq %r13, %rdi
leaq 0x2579f(%rip), %rsi     # 0x2b1c8
callq 0x50c0
movl %eax, %ebx
movq 0x2b0(%rsp), %rdi
leaq 0x2c0(%rsp), %rax
cmpq %rax, %rdi
je 0x5a4a
callq 0x5260
testl %ebx, %ebx
je 0x5c7f
movq (%r15), %rsi
cmpb $0x72, 0x1(%rsi)
je 0x5c3f
movq %r13, %rdi
movq %r14, %rdx
callq 0x5100
movq %r13, %rdi
leaq 0x25760(%rip), %rsi     # 0x2b1d4
callq 0x50c0
movl %eax, %ebx
movq 0x2b0(%rsp), %rdi
leaq 0x2c0(%rsp), %rax
cmpq %rax, %rdi
je 0x5a95
callq 0x5260
testl %ebx, %ebx
je 0x5c3f
movq (%r15), %rsi
cmpb $0x73, 0x1(%rsi)
je 0x5c8a
movq %r13, %rdi
movq %r14, %rdx
callq 0x5100
movq %r13, %rdi
leaq 0x2571f(%rip), %rsi     # 0x2b1de
callq 0x50c0
movl %eax, %ebx
movq 0x2b0(%rsp), %rdi
leaq 0x2c0(%rsp), %rax
cmpq %rax, %rdi
je 0x5ae0
callq 0x5260
testl %ebx, %ebx
je 0x5c8a
movq (%r15), %rsi
cmpb $0x74, 0x1(%rsi)
je 0x5caa
movq %r13, %rdi
movq %r14, %rdx
callq 0x5100
movq %r13, %rdi
leaq 0x256db(%rip), %rsi     # 0x2b1e5
callq 0x50c0
movl %eax, %ebx
movq 0x2b0(%rsp), %rdi
leaq 0x2c0(%rsp), %rax
cmpq %rax, %rdi
je 0x5b2b
callq 0x5260
testl %ebx, %ebx
je 0x5caa
movq (%r15), %rsi
cmpb $0x63, 0x1(%rsi)
je 0x5cc3
movq %r13, %rdi
movq %r14, %rdx
callq 0x5100
movq %r13, %rdi
leaq 0x25699(%rip), %rsi     # 0x2b1ee
callq 0x50c0
movl %eax, %ebx
movq 0x2b0(%rsp), %rdi
leaq 0x2c0(%rsp), %rax
cmpq %rax, %rdi
je 0x5b76
callq 0x5260
testl %ebx, %ebx
je 0x5cc3
movq (%r15), %rsi
cmpb $0x64, 0x1(%rsi)
je 0x5cdf
movq %r13, %rdi
movq %r14, %rdx
callq 0x5100
movq %r13, %rdi
leaq 0x2565e(%rip), %rsi     # 0x2b1fe
callq 0x50c0
movl %eax, %ebx
movq 0x2b0(%rsp), %rdi
leaq 0x2c0(%rsp), %rax
cmpq %rax, %rdi
je 0x5bc1
callq 0x5260
testl %ebx, %ebx
je 0x5cdf
movq (%r15), %rsi
cmpb $0x66, 0x1(%rsi)
je 0x5c10
movq %r13, %rdi
movq %r14, %rdx
callq 0x5100
movq %r13, %rdi
leaq 0x25628(%rip), %rsi     # 0x2b20f
callq 0x50c0
movl %eax, %ebx
movq 0x2b0(%rsp), %rdi
leaq 0x2c0(%rsp), %rax
cmpq %rax, %rdi
je 0x5c08
callq 0x5260
testl %ebx, %ebx
jne 0x6952
movq 0x10(%r12), %rdi
addq $0x10, %r12
xorl %esi, %esi
xorl %edx, %edx
callq 0x50e0
movq %rax, 0xf8(%rsp)
addl $-0x2, %ebp
movl $0x1, %eax
movq %rax, 0xf0(%rsp)
jmp 0x5cfc
movq 0x10(%r12), %rsi
movq %r13, %rdi
movq %r14, %rdx
callq 0x5100
leaq 0xd0(%rsp), %rdi
movq %r13, %rsi
callq 0xd78e
movq 0x2b0(%rsp), %rdi
leaq 0x2c0(%rsp), %rax
cmpq %rax, %rdi
je 0x5c79
callq 0x5260
addq $0x10, %r12
jmp 0x5cf9
decl %ebp
movb $0x0, 0x375d0(%rip)     # 0x3d258
jmp 0x5cff
movq 0x10(%r12), %rdi
addq $0x10, %r12
xorl %esi, %esi
xorl %edx, %edx
callq 0x50e0
movl %eax, 0x3761a(%rip)     # 0x3d2bc
movl %eax, 0x37618(%rip)     # 0x3d2c0
jmp 0x5cf9
movq 0x10(%r12), %rdi
addq $0x10, %r12
xorl %esi, %esi
xorl %edx, %edx
callq 0x50e0
movq %rax, 0x28(%rsp)
jmp 0x5cf9
movq 0x10(%r12), %rdi
addq $0x10, %r12
xorl %esi, %esi
xorl %edx, %edx
callq 0x50e0
movq %rax, 0x100(%rsp)
jmp 0x5cf9
movq 0x10(%r12), %rdi
addq $0x10, %r12
xorl %esi, %esi
callq 0x5210
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x10(%rsp)
addl $-0x2, %ebp
movq %r12, %r15
movq %r15, %r12
addq $0x8, %r15
cmpl $0x2, %ebp
jg 0x5a06
cmpl $0x0, 0xf0(%rsp)
sete %r12b
movq 0xf8(%rsp), %r13
movq 0x100(%rsp), %rcx
jmp 0x5d48
movl $0x1388, %ecx           # imm = 0x1388
xorps %xmm0, %xmm0
movss %xmm0, 0x10(%rsp)
movl $0x1, %eax
movq %rax, 0x28(%rsp)
movb $0x1, %r12b
xorl %eax, %eax
movq %rax, 0x1c0(%rsp)
movb $0x0, 0x1c8(%rsp)
movl %ecx, 0x1cc(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x1d0(%rsp)
movups %xmm0, 0x1e0(%rsp)
movups %xmm0, 0x1f0(%rsp)
movups %xmm0, 0x200(%rsp)
movq %rax, 0x210(%rsp)
cmpl $0x2, %ebp
jl 0x693a
movq (%r15), %rsi
leaq 0x2b0(%rsp), %rdi
movl $0x8, %edx
callq 0x5440
leaq 0x1c0(%rsp), %rdi
leaq 0x2b0(%rsp), %rsi
callq 0x6bb2
testb %al, %al
je 0x6948
leaq 0x2b0(%rsp), %rdi
callq 0x5080
leaq 0x2b0(%rsp), %rdi
callq 0x50a0
movq 0x371f0(%rip), %rdi     # 0x3cfd8
leaq 0x25435(%rip), %rsi     # 0x2b224
movl $0xb, %edx
callq 0x52e0
movl 0x374bd(%rip), %esi     # 0x3d2bc
movq 0x371d2(%rip), %rdi     # 0x3cfd8
callq 0x51d0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x5270
movsbl %al, %esi
movq %rbx, %rdi
callq 0x5040
movq %rax, %rdi
callq 0x51e0
movslq 0x37480(%rip), %rdi     # 0x3d2bc
leaq 0x2b0(%rsp), %rbx
movw %di, 0x4(%rbx)
movw %di, 0x2(%rbx)
movw %di, (%rbx)
callq 0x53f0
movq %rbx, %rdi
callq 0x5120
leaq 0x1c0(%rsp), %rdi
xorl %esi, %esi
movl $0x7a120, %edx          # imm = 0x7A120
callq 0x71c0
leaq 0x2b0(%rsp), %r15
leaq 0x1c0(%rsp), %r14
movq %r15, %rdi
movq %r14, %rsi
movss 0x10(%rsp), %xmm0
xorl %edx, %edx
movl $0x7a120, %ecx          # imm = 0x7A120
callq 0x7358
testb %r12b, %r12b
jne 0x5fd5
leaq 0x1c0(%rsp), %rdi
movl %r13d, %esi
callq 0x7428
movss %xmm0, 0x10(%rsp)
movq 0x3711a(%rip), %rdi     # 0x3cfd8
leaq 0x2536b(%rip), %rsi     # 0x2b230
movl $0xf, %edx
callq 0x52e0
xorps %xmm0, %xmm0
cvtss2sd 0x10(%rsp), %xmm0
movq 0x370f9(%rip), %rdi     # 0x3cfd8
callq 0x53b0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x5270
movsbl %al, %esi
movq %rbx, %rdi
callq 0x5040
movq %rax, %rdi
callq 0x51e0
leaq 0x2b0(%rsp), %rdi
movl %r13d, %esi
callq 0x75bd
movaps %xmm0, 0x10(%rsp)
movq 0x370ae(%rip), %rdi     # 0x3cfd8
leaq 0x2530f(%rip), %rsi     # 0x2b240
movl $0xe, %edx
callq 0x52e0
xorps %xmm0, %xmm0
cvtss2sd 0x10(%rsp), %xmm0
movq 0x3708d(%rip), %rdi     # 0x3cfd8
callq 0x53b0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x5270
movsbl %al, %esi
movq %rbx, %rdi
callq 0x5040
movq %rax, %rdi
callq 0x51e0
movq 0x37057(%rip), %rdi     # 0x3cfd8
leaq 0x252c7(%rip), %rsi     # 0x2b24f
movl $0xe, %edx
callq 0x52e0
movaps 0x10(%rsp), %xmm0
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
cvtss2sd %xmm0, %xmm0
movq 0x37032(%rip), %rdi     # 0x3cfd8
callq 0x53b0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x5270
movsbl %al, %esi
movq %rbx, %rdi
callq 0x5040
movq %rax, %rdi
callq 0x51e0
xorps %xmm0, %xmm0
movaps %xmm0, 0xb0(%rsp)
xorl %eax, %eax
movq %rax, 0xc0(%rsp)
movq %rax, 0xa0(%rsp)
movaps %xmm0, 0x90(%rsp)
leaq 0x360ff(%rip), %rcx     # 0x3c100
leaq 0x228(%rsp), %rdx
movq %rcx, -0x10(%rdx)
movl %eax, (%rdx)
movq %rax, 0x8(%rdx)
movq %rdx, 0x10(%rdx)
movq %rdx, 0x18(%rdx)
movq %rax, 0x20(%rdx)
leaq 0x258(%rsp), %rcx
movl %eax, (%rcx)
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
leaq 0x288(%rsp), %rcx
movl %eax, (%rcx)
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
leaq 0x118(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x251f8(%rip), %rsi     # 0x2b25e
leaq 0x251fe(%rip), %rdx     # 0x2b26b
leaq 0x108(%rsp), %rdi
callq 0xd386
movl $0x20, %edi
callq 0x5290
movq %r15, 0x8(%rax)
movq $0x0, 0x10(%rax)
movl $0x0, 0x18(%rax)
leaq 0x35f4a(%rip), %rcx     # 0x3bfe8
movq %rcx, (%rax)
leaq 0x218(%rsp), %rdi
leaq 0x108(%rsp), %rsi
movq %rax, %rdx
callq 0x7752
movq 0x108(%rsp), %rdi
leaq 0x118(%rsp), %rax
cmpq %rax, %rdi
je 0x60d3
callq 0x5260
leaq 0x108(%rsp), %rdi
leaq 0x118(%rsp), %rax
movq %rax, (%rdi)
leaq 0x2517f(%rip), %rsi     # 0x2b26c
leaq 0x25188(%rip), %rdx     # 0x2b27c
callq 0xd386
movl $0x38, %edi
callq 0x5290
movq %r15, 0x8(%rax)
movl 0x371b3(%rip), %ecx     # 0x3d2c0
movl %ecx, 0x10(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x14(%rax)
leaq 0x35f5a(%rip), %rcx     # 0x3c078
movq %rcx, (%rax)
movq %r14, 0x28(%rax)
movl $0x3f800000, 0x30(%rax) # imm = 0x3F800000
leaq 0x218(%rsp), %rdi
leaq 0x108(%rsp), %rsi
movq %rax, %rdx
callq 0x77cc
movq 0x108(%rsp), %rdi
leaq 0x118(%rsp), %rax
cmpq %rax, %rdi
je 0x615e
callq 0x5260
movq 0xd0(%rsp), %rax
movq 0xd8(%rsp), %rcx
subq %rax, %rcx
shrq $0x5, %rcx
testl %ecx, %ecx
jle 0x6373
leaq 0x110(%rsp), %r13
leaq 0x108(%rsp), %r14
leaq 0x2b0(%rsp), %rbp
leaq 0x250e1(%rip), %rbx     # 0x2b27d
xorl %edi, %edi
movq %rdi, 0x10(%rsp)
shlq $0x5, %rdi
addq %rax, %rdi
movl $0x0, 0x110(%rsp)
xorl %eax, %eax
movq %rax, 0x118(%rsp)
movq %r13, 0x120(%rsp)
movq %r13, 0x128(%rsp)
movq %rax, 0x130(%rsp)
movq %r14, %rsi
movl $0x2c, %edx
callq 0x7845
movq 0x120(%rsp), %r15
cmpq %r13, %r15
je 0x6338
leaq 0x20(%r15), %r14
leaq 0x40(%r15), %r12
leaq 0x218(%rsp), %rdi
movq %rbp, %rsi
movq %r14, %rdx
movq %r12, %rcx
callq 0x7a98
movq %r14, %rdi
movq %rbx, %rsi
callq 0x50c0
testl %eax, %eax
je 0x62b3
movq %r14, %rdi
leaq 0x25057(%rip), %rsi     # 0x2b287
callq 0x50c0
testl %eax, %eax
jne 0x6324
leaq 0x280(%rsp), %rdi
movq %r12, %rsi
callq 0x29286
leaq 0x288(%rsp), %rcx
cmpq %rcx, %rax
je 0x6324
movq 0x40(%rax), %r14
testq %r14, %r14
je 0x6324
leaq 0x40(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x40(%r15), %rsi
movq 0x48(%r15), %rdx
addq %rsi, %rdx
leaq 0x30(%rsp), %r12
movq %r12, %rdi
callq 0xd65c
movq %r14, 0x50(%rsp)
leaq 0xb0(%rsp), %rdi
movq %r12, %rsi
callq 0x29310
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x6324
jmp 0x631f
leaq 0x220(%rsp), %rdi
movq %r12, %rsi
callq 0x28f46
leaq 0x228(%rsp), %rcx
cmpq %rcx, %rax
je 0x6324
movq 0x40(%rax), %r14
testq %r14, %r14
je 0x6324
leaq 0x40(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x40(%r15), %rsi
movq 0x48(%r15), %rdx
addq %rsi, %rdx
leaq 0x30(%rsp), %r12
movq %r12, %rdi
callq 0xd65c
movq %r14, 0x50(%rsp)
leaq 0x90(%rsp), %rdi
movq %r12, %rsi
callq 0x28fd0
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x6324
callq 0x5260
movq %r15, %rdi
callq 0x52f0
movq %rax, %r15
cmpq %r13, %rax
jne 0x61f5
leaq 0x108(%rsp), %r14
movq %r14, %rdi
callq 0xd6f2
movq 0x10(%rsp), %rdi
incq %rdi
movq 0xd0(%rsp), %rax
movq 0xd8(%rsp), %rcx
subq %rax, %rcx
shrq $0x5, %rcx
movslq %ecx, %rcx
cmpq %rcx, %rdi
jl 0x619e
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movq $0x0, 0x40(%rsp)
movq 0x90(%rsp), %rsi
movq 0x98(%rsp), %rax
subq %rsi, %rax
shrq $0x3, %rax
imull $0xcccccccd, %eax, %eax # imm = 0xCCCCCCCD
testl %eax, %eax
jle 0x64b8
leaq 0x10c(%rsp), %r13
xorl %ebx, %ebx
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
leaq 0x108(%rsp), %r15
xorl %r12d, %r12d
xorl %ebp, %ebp
movq 0x20(%rsi,%r12), %rdx
addq %r12, %rsi
movl %r14d, 0x108(%rsp)
movq %rbx, 0x40(%r13)
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%r13)
movups %xmm0, 0x20(%r13)
movups %xmm0, 0x10(%r13)
movups %xmm0, (%r13)
movb $0x1, 0x164(%rsp)
movq %rbx, 0x168(%rsp)
movl %r14d, 0x170(%rsp)
movups %xmm0, 0x48(%r13)
leaq 0x188(%rsp), %rax
movq %rax, 0x178(%rsp)
movq %rbx, 0x180(%rsp)
movb $0x0, 0x188(%rsp)
leaq 0x218(%rsp), %rdi
leaq 0x2d0(%rsp), %rcx
movq %r15, %r8
callq 0x88cc
leaq 0x30(%rsp), %rdi
movq %r15, %rsi
callq 0x8af4
movq 0x178(%rsp), %rdi
leaq 0x188(%rsp), %rax
cmpq %rax, %rdi
je 0x646d
callq 0x5260
cmpb $0x0, 0x164(%rsp)
jne 0x6489
movq 0x168(%rsp), %rdi
testq %rdi, %rdi
je 0x6489
callq 0x5340
incq %rbp
movq 0x90(%rsp), %rsi
movq 0x98(%rsp), %rax
subq %rsi, %rax
shrq $0x3, %rax
imull $0xcccccccd, %eax, %eax # imm = 0xCCCCCCCD
cltq
addq $0x28, %r12
cmpq %rax, %rbp
jl 0x63c6
movb 0x36d9a(%rip), %al      # 0x3d258
testb %al, %al
leaq 0x25306(%rip), %rcx     # 0x2b7cd
leaq 0x25a94(%rip), %rsi     # 0x2bf62
cmovneq %rcx, %rsi
leaq 0x14(%rsi), %rdx
testb %al, %al
leaq 0x108(%rsp), %rdi
leaq 0x118(%rsp), %rax
movq %rax, (%rdi)
cmoveq %rsi, %rdx
callq 0xd386
movq 0x108(%rsp), %rsi
movq 0x110(%rsp), %rdx
movq 0x36acd(%rip), %rdi     # 0x3cfd8
callq 0x52e0
movq %rax, %rbx
leaq 0x24d74(%rip), %rsi     # 0x2b28e
movl $0x53, %edx
movq %rax, %rdi
callq 0x52e0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x5270
movsbl %al, %esi
movq %rbx, %rdi
callq 0x5040
movq %rax, %rdi
callq 0x51e0
movq 0x108(%rsp), %rdi
leaq 0x118(%rsp), %rax
cmpq %rax, %rdi
je 0x6568
callq 0x5260
movq 0x30(%rsp), %rdx
movq 0x38(%rsp), %rax
cmpq %rax, %rdx
je 0x65d3
subq %rdx, %rax
shrq $0x3, %rax
imull $0xe9bd37a7, %eax, %eax # imm = 0xE9BD37A7
testl %eax, %eax
jle 0x65d3
xorl %r14d, %r14d
movq 0x36a46(%rip), %rbx     # 0x3cfd8
leaq 0x218(%rsp), %r15
xorl %r12d, %r12d
addq %r14, %rdx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x8b50
incq %r12
movq 0x30(%rsp), %rdx
movq 0x38(%rsp), %rax
subq %rdx, %rax
shrq $0x3, %rax
imull $0xe9bd37a7, %eax, %eax # imm = 0xE9BD37A7
cltq
addq $0xb8, %r14
cmpq %rax, %r12
jl 0x659d
xorps %xmm0, %xmm0
movaps %xmm0, 0x70(%rsp)
movq $0x0, 0x80(%rsp)
movq 0xb0(%rsp), %rsi
movq 0xb8(%rsp), %rax
subq %rsi, %rax
shrq $0x3, %rax
imull $0xcccccccd, %eax, %eax # imm = 0xCCCCCCCD
testl %eax, %eax
jle 0x66c9
leaq 0x2d0(%rsp), %rbx
xorl %ebp, %ebp
leaq 0x218(%rsp), %r15
leaq 0x108(%rsp), %r12
leaq 0x70(%rsp), %r13
xorl %r14d, %r14d
movq 0x20(%rsi,%rbp), %rdx
addq %rbp, %rsi
leaq 0x118(%rsp), %rax
movq %rax, 0x108(%rsp)
movq $0x0, 0x110(%rsp)
movb $0x0, 0x118(%rsp)
movq %r15, %rdi
movq %rbx, %rcx
movq %r12, %r8
movq 0x28(%rsp), %r9
pushq $0x1
pushq $0x64
callq 0x9492
addq $0x10, %rsp
movq %r13, %rdi
movq %r12, %rsi
callq 0x965c
movq 0x108(%rsp), %rdi
leaq 0x118(%rsp), %rax
cmpq %rax, %rdi
je 0x669a
callq 0x5260
incq %r14
movq 0xb0(%rsp), %rsi
movq 0xb8(%rsp), %rax
subq %rsi, %rax
shrq $0x3, %rax
imull $0xcccccccd, %eax, %eax # imm = 0xCCCCCCCD
cltq
addq $0x28, %rbp
cmpq %rax, %r14
jl 0x662e
movb 0x36b89(%rip), %al      # 0x3d258
testb %al, %al
leaq 0x2588a(%rip), %rsi     # 0x2bf62
leaq 0x250ee(%rip), %rcx     # 0x2b7cd
cmovneq %rcx, %rsi
leaq 0x14(%rsi), %rdx
testb %al, %al
leaq 0x108(%rsp), %rdi
leaq 0x118(%rsp), %rax
movq %rax, (%rdi)
cmoveq %rsi, %rdx
callq 0xd386
movq 0x108(%rsp), %rsi
movq 0x110(%rsp), %rdx
movq 0x368bc(%rip), %rdi     # 0x3cfd8
callq 0x52e0
movq %rax, %rbx
leaq 0x24bb7(%rip), %rsi     # 0x2b2e2
movl $0x51, %edx
movq %rax, %rdi
callq 0x52e0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x5270
movsbl %al, %esi
movq %rbx, %rdi
callq 0x5040
movq %rax, %rdi
callq 0x51e0
movq 0x108(%rsp), %rdi
leaq 0x118(%rsp), %rax
cmpq %rax, %rdi
je 0x6779
callq 0x5260
movq 0x70(%rsp), %rdx
movq 0x78(%rsp), %rax
cmpq %rax, %rdx
je 0x67e1
subq %rdx, %rax
shrq $0x3, %rax
imull $0x38e38e39, %eax, %eax # imm = 0x38E38E39
testl %eax, %eax
jle 0x67e1
xorl %r15d, %r15d
movq 0x36835(%rip), %rbx     # 0x3cfd8
leaq 0x218(%rsp), %r14
xorl %r12d, %r12d
addq %r15, %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x96c4
incq %r12
movq 0x70(%rsp), %rdx
movq 0x78(%rsp), %rax
subq %rdx, %rax
shrq $0x3, %rax
imull $0x38e38e39, %eax, %eax # imm = 0x38E38E39
cltq
addq $0x48, %r15
cmpq %rax, %r12
jl 0x67ae
movq 0x367f0(%rip), %rdi     # 0x3cfd8
leaq 0x24b45(%rip), %rsi     # 0x2b334
movl $0x11, %edx
callq 0x52e0
movss 0xc(%rsp), %xmm0
addss 0x64(%rsp), %xmm0
movss %xmm0, 0xc(%rsp)
leaq 0x108(%rsp), %rbx
xorl %edi, %edi
movq %rbx, %rsi
callq 0x5190
xorps %xmm0, %xmm0
cvtsi2ssq (%rbx), %xmm0
movss %xmm0, 0x10(%rsp)
xorps %xmm0, %xmm0
cvtsi2ssq 0x8(%rbx), %xmm0
subss 0xc(%rsp), %xmm0
movss %xmm0, 0x28(%rsp)
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
movq %rbx, %rsi
callq 0x5190
xorps %xmm0, %xmm0
cvtsi2ssq (%rbx), %xmm0
cvtsi2ssq 0x8(%rbx), %xmm1
addss 0x28(%rsp), %xmm1
mulss 0x2479b(%rip), %xmm1    # 0x2b004
movss 0x6c(%rsp), %xmm2
addss 0x68(%rsp), %xmm2
movss 0x10(%rsp), %xmm3
subss %xmm2, %xmm3
addss %xmm0, %xmm3
addss %xmm1, %xmm3
xorps %xmm0, %xmm0
cvtss2sd %xmm3, %xmm0
movq 0x36743(%rip), %rdi     # 0x3cfd8
callq 0x53b0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x5270
movsbl %al, %esi
movq %rbx, %rdi
callq 0x5040
movq %rax, %rdi
callq 0x51e0
leaq 0x70(%rsp), %rdi
callq 0x9a92
leaq 0x30(%rsp), %rdi
callq 0x9adc
leaq 0x218(%rsp), %rdi
callq 0x9b04
leaq 0x90(%rsp), %rdi
callq 0x9bc4
leaq 0xb0(%rsp), %rdi
callq 0x9c0e
leaq 0x2b0(%rsp), %rdi
callq 0x9c58
leaq 0x1c0(%rsp), %rdi
callq 0x9c8c
leaq 0xd0(%rsp), %rdi
callq 0x9cd4
xorl %eax, %eax
addq $0x4b8, %rsp            # imm = 0x4B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x36697(%rip), %rdi     # 0x3cfd8
callq 0x58cc
jmp 0x6948
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x5310
movq 0x3667f(%rip), %rdi     # 0x3cfd8
callq 0x58cc
jmp 0x6948
jmp 0x6a6c
jmp 0x6a6c
jmp 0x6a6c
jmp 0x6a6c
jmp 0x6a6c
jmp 0x6a6c
jmp 0x6a74
jmp 0x6a79
jmp 0x698a
movq %rax, %rbx
jmp 0x6b0a
jmp 0x6a64
jmp 0x6a64
movq %rax, %rbx
movq 0x108(%rsp), %rdi
leaq 0x118(%rsp), %rax
cmpq %rax, %rdi
je 0x6b0a
jmp 0x69d6
movq %rax, %rbx
movq 0x108(%rsp), %rdi
leaq 0x118(%rsp), %rax
cmpq %rax, %rdi
je 0x6b0a
callq 0x5260
jmp 0x6b0a
movq %rax, %rbx
leaq 0x2b0(%rsp), %rdi
callq 0x50a0
jmp 0x6b3e
jmp 0x6a6c
jmp 0x6a5c
movq %rax, %rbx
movq 0x2b0(%rsp), %rdi
leaq 0x2c0(%rsp), %rax
cmpq %rax, %rdi
je 0x6b4b
callq 0x5260
jmp 0x6b4b
jmp 0x6a6c
jmp 0x6a74
movq %rax, %rbx
movq 0x108(%rsp), %rdi
leaq 0x118(%rsp), %rax
cmpq %rax, %rdi
je 0x6ab3
jmp 0x6aae
movq %rax, %rbx
movq 0x108(%rsp), %rdi
leaq 0x118(%rsp), %rax
cmpq %rax, %rdi
je 0x6acf
callq 0x5260
jmp 0x6acf
movq %rax, %rbx
jmp 0x6b31
movq %rax, %rbx
jmp 0x6b3e
movq %rax, %rbx
jmp 0x6b4b
movq %rax, %rbx
jmp 0x6ab3
movq %rax, %rbx
jmp 0x6acf
jmp 0x6afa
movq %rax, %rbx
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x6afd
jmp 0x6aed
jmp 0x6afa
movq %rax, %rbx
movq 0x108(%rsp), %rdi
leaq 0x118(%rsp), %rax
cmpq %rax, %rdi
je 0x6ab3
callq 0x5260
leaq 0x70(%rsp), %rdi
callq 0x9a92
jmp 0x6acf
movq %rax, %rbx
leaq 0x108(%rsp), %rdi
callq 0x8b20
leaq 0x30(%rsp), %rdi
callq 0x9adc
jmp 0x6b0a
movq %rax, %rbx
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x6afd
callq 0x5260
jmp 0x6afd
jmp 0x6afa
jmp 0x6afa
jmp 0x6afa
movq %rax, %rbx
leaq 0x108(%rsp), %rdi
callq 0xd6f2
leaq 0x218(%rsp), %rdi
callq 0x9b04
leaq 0x90(%rsp), %rdi
callq 0x9bc4
leaq 0xb0(%rsp), %rdi
callq 0x9c0e
leaq 0x2b0(%rsp), %rdi
callq 0x9c58
leaq 0x1c0(%rsp), %rdi
callq 0x9c8c
leaq 0xd0(%rsp), %rdi
callq 0x9cd4
movq %rbx, %rdi
callq 0x5410