// File: /workspace/github_cpp_makefile_star2_O1/adamiaonr[P]rid-analytics/src/run-analysis.cpp
// Function: main
int main (int argc, char **argv) {

    // parse the arguments with an ArgvParser
    ArgvParser * cmds = create_argv_parser();

    // .scn config file path
    char scn_file[MAX_ARRAY_SIZE];
    // dir where all .csv files with output data will be saved
    char data_dir[MAX_ARRAY_SIZE];
    // output file name for this run
    char output_label[MAX_ARRAY_SIZE];
    // // verbose mode (no verbosity by default)
    // bool verbose = false;
    // evaluation parameters
    // request size (also largest possible |F|) in # of URL parameters
    int request_size = 0;       
    // bloom filter size (in bit)
    int bf_size = 0;
    // codes for mode:
    //  - bits 0 and 1 : resolution type:
    //      - 0 (00) : AML forwarding or flood
    //      - 1 (01) : RML forwarding or 'random link'
    //      - 2 (10) : 'hard fallback'
    //      - 3 (11) : 'soft fallback'
    //  - bit 2 : resolution on/off:
    //      - 0 : OFF
    //      - 1 : ON
    //
    // note : if mode is 00 and resolution is on, we 
    //        use feedback resolution (i.e. go back to source, then origin server)
    int mode = 0;
    // origin server location. default is '1'
    char origin_server[MAX_ARRAY_SIZE];
    strncpy(origin_server, "1", MAX_ARRAY_SIZE);
    // start router id. default is '0'
    char start_router[MAX_ARRAY_SIZE];
    strncpy(start_router, "0", MAX_ARRAY_SIZE);

    // parse() takes the arguments to main() and parses them according to 
    // ArgvParser rules
    int result = cmds->parse(argc, argv);

    // if something went wrong: show help option
    if (result != ArgvParser::NoParserError) {

        fprintf(stderr, "%s\n", cmds->parseErrorDescription(result).c_str());

        if (result != ArgvParser::ParserHelpRequested) {
            fprintf(stderr, "use option -h for help.\n");
        }

        delete cmds;
        return -1;

    } else {

        // otherwise, check for the different OPTION_
        if (cmds->foundOption(OPTION_SCN_FILE)) {

            strncpy(scn_file, (char *) cmds->optionValue(OPTION_SCN_FILE).c_str(), MAX_ARRAY_SIZE);
            
        } else {

            fprintf(stderr, "no .scn file path specified. use "\
                "option -h for help.\n");

            delete cmds;
            return -1;
        }

        if (cmds->foundOption(OPTION_DATA_DIR)) {

            strncpy(data_dir, (char *) cmds->optionValue(OPTION_DATA_DIR).c_str(), MAX_ARRAY_SIZE);
        
        } else {

            fprintf(stderr, "no data directory path specified. use "\
                "option -h for help.\n");

            delete cmds;
            return -1;
        }

        if (cmds->foundOption(OPTION_OUTPUT_LABEL)) {

            strncpy(output_label, (char *) cmds->optionValue(OPTION_OUTPUT_LABEL).c_str(), MAX_ARRAY_SIZE);

        } else {

            fprintf(stderr, "no output .csv file name specified. use "\
                "option -h for help.\n");

            delete cmds;
            return -1;
        }

        if (cmds->foundOption(OPTION_BF_SIZE)) {

            bf_size = std::stoi(cmds->optionValue(OPTION_BF_SIZE));   
        }

        if (cmds->foundOption(OPTION_REQUEST_SIZE)) {

            request_size = std::stoi(cmds->optionValue(OPTION_REQUEST_SIZE));
        }

        if (cmds->foundOption(OPTION_MM_MODE)) {

            mode = std::stoi(cmds->optionValue(OPTION_MM_MODE));
        }

        // incorrect delivery resolution mode
        if (cmds->foundOption(OPTION_RESOLV_MODE)) {
            int resolv = std::stoi(cmds->optionValue(OPTION_RESOLV_MODE));
            // left-shift the resolv bits by 3 and OR-it to mode
            mode |= (resolv << 2);
        }

        if (cmds->foundOption(OPTION_ORIGIN_SERVER)) {

            strncpy(origin_server, (char *) cmds->optionValue(OPTION_ORIGIN_SERVER).c_str(), MAX_ARRAY_SIZE);
        }

        if (cmds->foundOption(OPTION_START_ROUTER)) {

            strncpy(start_router, (char *) cmds->optionValue(OPTION_START_ROUTER).c_str(), MAX_ARRAY_SIZE);
        }

        // if (cmds->foundOption(OPTION_VERBOSE)) {
        //     verbose = true;
        // }
    }

    printf("rid-analytics : request_size = %d, bf_size = %d\n", request_size, bf_size);

    if (result == ArgvParser::ParserHelpRequested) {

        delete cmds;
        return -1;
    }

    // create an rid model environment (according to the specs on nw_filename)
    RID_Analytics * rid_analytics_env = 
        new RID_Analytics(
            std::string(scn_file),          // .scn file w/ topology info
            request_size, bf_size,          // parameters for FP rate calculation
            std::string(origin_server),     // origin server location: useful for latency
            mode,                           // how to handle (1) multiple matches; and (2) wrong deliveries
            std::string(data_dir), std::string(output_label));

    // ... and run the model
    rid_analytics_env->run(std::string(scn_file), std::string(start_router));
    printf("rid-analytics : output dir = %s, output label = %s\n", data_dir, output_label);

    // clean up after yourself...
    delete rid_analytics_env;
    delete cmds;

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x628, %rsp            # imm = 0x628
movq %rsi, %r14
movl %edi, %ebp
callq 0x19104
movq %rax, %rbx
leaq 0x16942(%rip), %rsi     # 0x30064
leaq 0x320(%rsp), %rdi
movl $0x100, %edx            # imm = 0x100
callq 0x4200
leaq 0x14b03(%rip), %rsi     # 0x2e23e
leaq 0x220(%rsp), %rdi
movl $0x100, %edx            # imm = 0x100
callq 0x4200
movq %rbx, %rdi
movl %ebp, %esi
movq %r14, %rdx
callq 0x1f99e
testl %eax, %eax
jne 0x1a243
leaq 0x10(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x17b32(%rip), %rsi     # 0x312a4
leaq 0x17b33(%rip), %rdx     # 0x312ac
movq %rsp, %rdi
callq 0x19074
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x1f83e
movl %eax, %ebp
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x197a4
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x43a0
testb %bpl, %bpl
je 0x1a258
leaq 0x30(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x17ae7(%rip), %rsi     # 0x312a4
leaq 0x17ae8(%rip), %rdx     # 0x312ac
leaq 0x20(%rsp), %rdi
callq 0x19074
movq %rsp, %rdi
leaq 0x20(%rsp), %rdx
movq %rbx, %rsi
callq 0x1f8b2
movq (%rsp), %r14
leaq 0x120(%rsp), %rdi
movl $0x100, %edx            # imm = 0x100
movq %r14, %rsi
callq 0x4200
leaq 0x10(%rsp), %rax
cmpq %rax, %r14
je 0x19811
movq 0x10(%rsp), %rsi
incq %rsi
movq %r14, %rdi
callq 0x43a0
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x19828
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x43a0
movq %rsp, %rdi
leaq 0x10(%rsp), %r14
movq %r14, (%rdi)
leaq 0x17aa5(%rip), %rsi     # 0x312df
leaq 0x17aa6(%rip), %rdx     # 0x312e7
callq 0x19074
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x1f83e
movl %eax, %ebp
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x19869
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x43a0
testb %bpl, %bpl
je 0x1a25f
leaq 0x20(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x17a5e(%rip), %rsi     # 0x312df
leaq 0x17a5f(%rip), %rdx     # 0x312e7
callq 0x19074
movq %rsp, %rdi
leaq 0x20(%rsp), %rdx
movq %rbx, %rsi
callq 0x1f8b2
movq (%rsp), %r14
leaq 0x520(%rsp), %rdi
movl $0x100, %edx            # imm = 0x100
movq %r14, %rsi
callq 0x4200
leaq 0x10(%rsp), %rax
cmpq %rax, %r14
je 0x198d0
movq 0x10(%rsp), %rsi
incq %rsi
movq %r14, %rdi
callq 0x43a0
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x198e7
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x43a0
movq %rsp, %rdi
leaq 0x10(%rsp), %r14
movq %r14, (%rdi)
leaq 0x17a28(%rip), %rsi     # 0x31321
leaq 0x17a2d(%rip), %rdx     # 0x3132d
callq 0x19074
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x1f83e
movl %eax, %ebp
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x19928
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x43a0
testb %bpl, %bpl
je 0x1a266
leaq 0x20(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x179e1(%rip), %rsi     # 0x31321
leaq 0x179e6(%rip), %rdx     # 0x3132d
callq 0x19074
movq %rsp, %rdi
leaq 0x20(%rsp), %rdx
movq %rbx, %rsi
callq 0x1f8b2
movq (%rsp), %r14
leaq 0x420(%rsp), %rdi
movl $0x100, %edx            # imm = 0x100
movq %r14, %rsi
callq 0x4200
leaq 0x10(%rsp), %rax
cmpq %rax, %r14
je 0x1998f
movq 0x10(%rsp), %rsi
incq %rsi
movq %r14, %rdi
callq 0x43a0
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x199a6
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x43a0
movq %rsp, %rdi
leaq 0x10(%rsp), %r14
movq %r14, (%rdi)
leaq 0x179b8(%rip), %rsi     # 0x31370
leaq 0x179b8(%rip), %rdx     # 0x31377
callq 0x19074
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x1f83e
movl %eax, %ebp
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x199e7
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x43a0
movq $0x0, 0x50(%rsp)
testb %bpl, %bpl
je 0x19abb
leaq 0x20(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x17968(%rip), %rsi     # 0x31370
leaq 0x17968(%rip), %rdx     # 0x31377
callq 0x19074
movq %rsp, %rdi
leaq 0x20(%rsp), %rdx
movq %rbx, %rsi
callq 0x1f8b2
movq (%rsp), %r14
callq 0x4060
movq %rax, %r15
movl (%rax), %ebp
movl $0x0, (%rax)
leaq 0x58(%rsp), %r12
movq %r14, %rdi
movq %r12, %rsi
movl $0xa, %edx
callq 0x4520
cmpq %r14, (%r12)
je 0x1a272
leaq -0x80000000(%rax), %rcx
movabsq $-0x100000000, %rdx     # imm = 0xFFFFFFFF00000000
cmpq %rdx, %rcx
leaq 0x10(%rsp), %r14
jb 0x1a27e
movl (%r15), %ecx
cmpl $0x22, %ecx
je 0x1a27e
movq %rax, 0x50(%rsp)
testl %ecx, %ecx
jne 0x19a8e
movl %ebp, (%r15)
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x19aa4
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x43a0
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x19abb
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x43a0
movq %rsp, %rdi
movq %r14, (%rdi)
leaq 0x178cf(%rip), %rsi     # 0x31397
leaq 0x178d4(%rip), %rdx     # 0x313a3
callq 0x19074
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x1f83e
movl %eax, %ebp
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x19af7
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x43a0
movq $0x0, 0x48(%rsp)
testb %bpl, %bpl
je 0x19bd3
leaq 0x20(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x1787f(%rip), %rsi     # 0x31397
leaq 0x17884(%rip), %rdx     # 0x313a3
callq 0x19074
movq %r13, %r15
movq %rsp, %rdi
leaq 0x20(%rsp), %rdx
movq %rbx, %rsi
callq 0x1f8b2
movq (%rsp), %r14
callq 0x4060
movq %rax, %r12
movl (%rax), %ebp
movl $0x0, (%rax)
leaq 0x58(%rsp), %r13
movq %r14, %rdi
movq %r13, %rsi
movl $0xa, %edx
callq 0x4520
cmpq %r14, (%r13)
je 0x1a28a
leaq -0x80000000(%rax), %rcx
movabsq $-0x100000000, %rdx     # imm = 0xFFFFFFFF00000000
cmpq %rdx, %rcx
leaq 0x10(%rsp), %r14
jb 0x1a296
movl (%r12), %ecx
cmpl $0x22, %ecx
je 0x1a296
movq %rax, 0x48(%rsp)
testl %ecx, %ecx
movq %r15, %r13
jne 0x19ba6
movl %ebp, (%r12)
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x19bbc
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x43a0
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x19bd3
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x43a0
movq %rsp, %rdi
movq %r14, (%rdi)
leaq 0x177ec(%rip), %rsi     # 0x313cc
leaq 0x177ec(%rip), %rdx     # 0x313d3
callq 0x19074
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x1f83e
movl %eax, %ebp
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x19c0f
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x43a0
movq $0x0, 0x40(%rsp)
testb %bpl, %bpl
je 0x19cec
leaq 0x20(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x1779c(%rip), %rsi     # 0x313cc
leaq 0x1779c(%rip), %rdx     # 0x313d3
callq 0x19074
movq %r13, %r12
movq %rsp, %rdi
leaq 0x20(%rsp), %rdx
movq %rbx, %rsi
callq 0x1f8b2
movq (%rsp), %r14
callq 0x4060
movq %rax, %r13
movl (%rax), %r15d
movl $0x0, (%rax)
leaq 0x58(%rsp), %rbp
movq %r14, %rdi
movq %rbp, %rsi
movl $0xa, %edx
callq 0x4520
cmpq %r14, (%rbp)
je 0x1a2a2
leaq -0x80000000(%rax), %rcx
movabsq $-0x100000000, %rdx     # imm = 0xFFFFFFFF00000000
cmpq %rdx, %rcx
leaq 0x10(%rsp), %r14
jb 0x1a2ae
movl (%r13), %ecx
cmpl $0x22, %ecx
je 0x1a2ae
movq %rax, 0x40(%rsp)
testl %ecx, %ecx
jne 0x19cbc
movl %r15d, (%r13)
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x19cd2
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x43a0
movq 0x20(%rsp), %rdi
movq %r12, %r13
cmpq %r12, %rdi
je 0x19cec
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x43a0
movq %rsp, %rdi
movq %r14, (%rdi)
leaq 0x1775e(%rip), %rsi     # 0x31457
leaq 0x17766(%rip), %rdx     # 0x31466
callq 0x19074
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x1f83e
movl %eax, %ebp
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x19d28
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x43a0
testb %bpl, %bpl
je 0x19e03
leaq 0x20(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x17717(%rip), %rsi     # 0x31457
leaq 0x1771f(%rip), %rdx     # 0x31466
callq 0x19074
movq %rsp, %rdi
leaq 0x20(%rsp), %rdx
movq %rbx, %rsi
callq 0x1f8b2
movq (%rsp), %r14
callq 0x4060
movq %rax, %r13
movl (%rax), %r12d
movl $0x0, (%rax)
leaq 0x58(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
movl $0xa, %edx
callq 0x4520
cmpq %r14, (%r15)
je 0x1a2ba
movq %rax, %rbp
addq $-0x80000000, %rax      # imm = 0x80000000
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
cmpq %rcx, %rax
leaq 0x10(%rsp), %r14
jb 0x1a2c6
movl (%r13), %eax
cmpl $0x22, %eax
je 0x1a2c6
testl %eax, %eax
jne 0x19dc5
movl %r12d, (%r13)
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x19ddb
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x43a0
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %r13
cmpq %r13, %rdi
je 0x19df7
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x43a0
shll $0x2, %ebp
orl 0x40(%rsp), %ebp
movq %rbp, 0x40(%rsp)
movq %rsp, %rdi
movq %r14, (%rdi)
leaq 0x176b0(%rip), %rsi     # 0x314c0
leaq 0x176b6(%rip), %rdx     # 0x314cd
callq 0x19074
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x1f83e
movl %eax, %ebp
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x19e3f
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x43a0
testb %bpl, %bpl
je 0x19ebe
leaq 0x20(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x1766d(%rip), %rsi     # 0x314c0
leaq 0x17673(%rip), %rdx     # 0x314cd
callq 0x19074
movq %rsp, %rdi
leaq 0x20(%rsp), %rdx
movq %rbx, %rsi
callq 0x1f8b2
movq (%rsp), %r14
leaq 0x320(%rsp), %rdi
movl $0x100, %edx            # imm = 0x100
movq %r14, %rsi
callq 0x4200
leaq 0x10(%rsp), %rax
cmpq %rax, %r14
je 0x19ea2
movq 0x10(%rsp), %rsi
incq %rsi
movq %r14, %rdi
callq 0x43a0
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x19eb9
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x43a0
leaq 0x10(%rsp), %r14
movq %rsp, %rdi
movq %r14, (%rdi)
leaq 0x17628(%rip), %rsi     # 0x314f3
leaq 0x1762d(%rip), %rdx     # 0x314ff
callq 0x19074
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x1f83e
movl %eax, %ebp
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x19efa
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x43a0
testb %bpl, %bpl
je 0x19f74
leaq 0x20(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x175e5(%rip), %rsi     # 0x314f3
leaq 0x175ea(%rip), %rdx     # 0x314ff
callq 0x19074
movq %rsp, %rdi
leaq 0x20(%rsp), %rdx
movq %rbx, %rsi
callq 0x1f8b2
movq (%rsp), %r14
leaq 0x220(%rsp), %rdi
movl $0x100, %edx            # imm = 0x100
movq %r14, %rsi
callq 0x4200
leaq 0x10(%rsp), %rax
cmpq %rax, %r14
je 0x19f5d
movq 0x10(%rsp), %rsi
incq %rsi
movq %r14, %rdi
callq 0x43a0
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x19f74
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x43a0
leaq 0x1765a(%rip), %rdi     # 0x315d5
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
xorl %eax, %eax
callq 0x4070
movl $0xb0, %edi
callq 0x4390
movq %rax, %r13
leaq 0x90(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x120(%rsp), %r14
movq %r14, %rdi
callq 0x41b0
leaq (%rsp,%rax), %rdx
addq $0x120, %rdx            # imm = 0x120
leaq 0x80(%rsp), %rdi
movq %r14, %rsi
callq 0x19074
leaq 0x70(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x320(%rsp), %r14
movq %r14, %rdi
callq 0x41b0
leaq (%rsp,%rax), %rdx
addq $0x320, %rdx            # imm = 0x320
leaq 0x60(%rsp), %rdi
movq %r14, %rsi
callq 0x19074
leaq 0xb0(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x520(%rsp), %r14
movq %r14, %rdi
callq 0x41b0
leaq (%rsp,%rax), %rdx
addq $0x520, %rdx            # imm = 0x520
leaq 0xa0(%rsp), %rbp
movq %rbp, %rdi
movq %r14, %rsi
callq 0x19074
leaq 0x110(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x420(%rsp), %r15
movq %r15, %rdi
callq 0x41b0
leaq (%rsp,%rax), %rdx
addq $0x420, %rdx            # imm = 0x420
leaq 0x100(%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x19074
movzbl 0x48(%rsp), %edx
movzwl 0x50(%rsp), %ecx
leaq 0x80(%rsp), %rsi
leaq 0x60(%rsp), %r8
movq %r13, %rdi
movq 0x40(%rsp), %r9
pushq %r14
pushq %rbp
callq 0x235e4
addq $0x10, %rsp
movq 0x100(%rsp), %rdi
cmpq %r12, %rdi
leaq 0x90(%rsp), %r14
leaq 0x70(%rsp), %r15
je 0x1a0cb
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x43a0
movq 0xa0(%rsp), %rdi
leaq 0xb0(%rsp), %rax
cmpq %rax, %rdi
je 0x1a0f0
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x43a0
movq 0x60(%rsp), %rdi
cmpq %r15, %rdi
je 0x1a107
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x43a0
movq 0x80(%rsp), %rdi
cmpq %r14, %rdi
je 0x1a124
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x43a0
leaq 0xf0(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x120(%rsp), %r14
movq %r14, %rdi
callq 0x41b0
leaq (%rsp,%rax), %rdx
addq $0x120, %rdx            # imm = 0x120
leaq 0xe0(%rsp), %rdi
movq %r14, %rsi
callq 0x19074
leaq 0xd0(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x220(%rsp), %r14
movq %r14, %rdi
callq 0x41b0
leaq (%rsp,%rax), %rdx
addq $0x220, %rdx            # imm = 0x220
leaq 0xc0(%rsp), %rdi
movq %r14, %rsi
callq 0x19074
leaq 0xe0(%rsp), %rsi
leaq 0xc0(%rsp), %rdx
movq %r13, %rdi
callq 0x28014
movq 0xc0(%rsp), %rdi
cmpq %r12, %rdi
je 0x1a1c8
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x43a0
movq 0xe0(%rsp), %rdi
cmpq %r15, %rdi
je 0x1a1e5
movq 0xf0(%rsp), %rsi
incq %rsi
callq 0x43a0
leaq 0x1741a(%rip), %rdi     # 0x31606
xorl %ebp, %ebp
leaq 0x520(%rsp), %rsi
leaq 0x420(%rsp), %rdx
xorl %eax, %eax
callq 0x4070
movq %r13, %rdi
callq 0x25784
movl $0xb0, %esi
movq %r13, %rdi
callq 0x43a0
movq %rbx, %rdi
callq 0x1f700
movl $0x158, %esi            # imm = 0x158
movq %rbx, %rdi
callq 0x43a0
movl %ebp, %eax
addq $0x628, %rsp            # imm = 0x628
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rsp, %r14
movq %rbx, %rdi
movl %eax, %esi
movq %r14, %rdx
callq 0x58b3
movl (%r14), %ebp
jmp 0x1a21a
callq 0x593a
jmp 0x1a26b
callq 0x595c
jmp 0x1a26b
callq 0x597e
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0x1a21a
leaq 0x173c1(%rip), %rdi     # 0x3163a
callq 0x4250
leaq 0x173b5(%rip), %rdi     # 0x3163a
callq 0x4580
leaq 0x173a9(%rip), %rdi     # 0x3163a
callq 0x4250
leaq 0x1739d(%rip), %rdi     # 0x3163a
callq 0x4580
leaq 0x17391(%rip), %rdi     # 0x3163a
callq 0x4250
leaq 0x17385(%rip), %rdi     # 0x3163a
callq 0x4580
leaq 0x17379(%rip), %rdi     # 0x3163a
callq 0x4250
leaq 0x1736d(%rip), %rdi     # 0x3163a
callq 0x4580
jmp 0x1a519
jmp 0x1a54a
jmp 0x1a519
jmp 0x1a54a
movq %rax, %rbx
jmp 0x1a439
jmp 0x1a54a
movq %rax, %rbx
jmp 0x1a484
jmp 0x1a54a
movq %rax, %rbx
jmp 0x1a4ca
jmp 0x1a54a
jmp 0x1a519
jmp 0x1a54a
movq %rax, %rbx
movq 0xc0(%rsp), %rdi
cmpq %r12, %rdi
je 0x1a33c
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x43a0
jmp 0x1a33c
movq %rax, %rbx
movq 0xe0(%rsp), %rdi
cmpq %r15, %rdi
je 0x1a54d
movq 0xf0(%rsp), %rsi
jmp 0x1a540
movq %rax, %rbx
movq 0x100(%rsp), %rdi
cmpq %r12, %rdi
je 0x1a37f
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x43a0
jmp 0x1a37f
movq %rax, %rbx
movq 0xa0(%rsp), %rdi
leaq 0xb0(%rsp), %rax
cmpq %rax, %rdi
je 0x1a3a9
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x43a0
jmp 0x1a3a9
movq %rax, %rbx
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x1a3ca
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x43a0
jmp 0x1a3ca
movq %rax, %rbx
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x1a3f4
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x43a0
jmp 0x1a3f4
movq %rax, %rbx
movl $0xb0, %esi
movq %r13, %rdi
jmp 0x1a543
jmp 0x1a52f
jmp 0x1a54a
jmp 0x1a52f
movq %rax, %rbx
cmpl $0x0, (%r13)
jne 0x1a41e
movl %r12d, (%r13)
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x1a439
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x43a0
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
jne 0x1a526
jmp 0x1a54d
jmp 0x1a54a
jmp 0x1a52f
movq %rax, %rbx
cmpl $0x0, (%r13)
jne 0x1a469
movl %r15d, (%r13)
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x1a484
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x43a0
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
jne 0x1a526
jmp 0x1a54d
jmp 0x1a54a
jmp 0x1a52f
movq %rax, %rbx
cmpl $0x0, (%r12)
jne 0x1a4af
movl %ebp, (%r12)
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x1a4ca
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x43a0
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
jne 0x1a526
jmp 0x1a54d
jmp 0x1a54a
jmp 0x1a52f
movq %rax, %rbx
cmpl $0x0, (%r15)
jne 0x1a4e6
movl %ebp, (%r15)
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x1a51c
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x43a0
jmp 0x1a51c
jmp 0x1a54a
jmp 0x1a52f
jmp 0x1a54a
jmp 0x1a519
jmp 0x1a54a
jmp 0x1a52f
jmp 0x1a54a
jmp 0x1a519
jmp 0x1a54a
jmp 0x1a52f
jmp 0x1a54a
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x1a54d
movq 0x30(%rsp), %rsi
jmp 0x1a540
jmp 0x1a54a
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x1a54d
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x43a0
jmp 0x1a54d
movq %rax, %rbx
movq %rbx, %rdi
callq 0x4700
nopl (%rax)