// File: /workspace/github_c_makefile_star2_O2/c-zhou[P]oatk/path_finder.c
// Function: main
int main(int argc, char *argv[])
{
    const char *opt_str = "c:e:f:g:hl:m:N:o:p:q:s:v:V";
    ketopt_t opt = KETOPT_INIT;
    int c, out_s, out_c, max_copy, max_path, ret = 0;
    FILE *fp_help;
    char *out_pref, *mito_annot, *pltd_annot, *ec_tag, *kc_tag, *sc_tag;
    int no_trn, no_rrn, min_len, ext_p, ext_m, bubble_size, tip_size, do_graph_clean;
    double max_eval, min_score, min_cf, seq_cf, weak_cross;

    sys_init();

    out_s = -1;
    out_c = 0;
    out_pref = "oatk.asm";
    max_copy = 10;
    max_path = 1000000;
    fp_help = stderr;
    mito_annot = 0;
    pltd_annot = 0;
    ec_tag = 0;
    kc_tag = 0;
    sc_tag = 0;
    no_trn = 1;
    no_rrn = 1;
    do_graph_clean = 1;
    bubble_size = 100000;
    tip_size = 10000;
    weak_cross = 0.3;
    max_eval = 1e-6;
    min_len = 10000;
    min_score = 300;
    ext_p = 3;
    ext_m = 1;
    seq_cf = .90;
    min_cf = .20;

    while ((c = ketopt(&opt, argc, argv, 1, opt_str, long_options)) >=0 ) {
        if (c == 'm') mito_annot = opt.arg;
        else if (c == 'p') pltd_annot = opt.arg;
        else if (c == 'f') seq_cf = atof(opt.arg);
        else if (c == 's') min_score = atof(opt.arg);
        else if (c == 'c') max_copy = atoi(opt.arg);
        else if (c == 'N') max_path = atoi(opt.arg);
        else if (c == 'g') {
            char *p;
            ext_p = strtol(opt.arg, &p, 10);
            if (*p == ',') ext_m = strtol(p + 1, &p, 10);
        }
        else if (c == 'q') min_cf = atof(opt.arg);
        else if (c == 'e') max_eval = atof(opt.arg);
        else if (c == 'l') min_len = atoi(opt.arg);
        else if (c == 'o') out_pref = opt.arg;
        else if (c == 301) out_s = 0, ++out_c;
        else if (c == 302) out_s = 1, ++out_c;
        else if (c == 303) out_s = 2, ++out_c;
        else if (c == 304) ec_tag = opt.arg;
        else if (c == 305) kc_tag = opt.arg;
        else if (c == 306) sc_tag = opt.arg;
        else if (c == 307) no_trn = 0;
        else if (c == 308) no_rrn = 1;
        else if (c == 309) bubble_size = atoi(opt.arg);
        else if (c == 310) tip_size = atoi(opt.arg);
        else if (c == 311) weak_cross = atof(opt.arg);
        else if (c == 312) do_graph_clean = 0;
        else if (c == 'v') VERBOSE = atoi(opt.arg);
        else if (c == 'h') fp_help = stdout;
        else if (c == 'V') {
            puts(PATHFINDER_VERSION);
            return 0;
        }
        else if (c == '?') {
            fprintf(stderr, "[E::%s] unknown option: \"%s\"\n", __func__, argv[opt.i - 1]);
            return 1;
        }
        else if (c == ':') {
            fprintf(stderr, "[E::%s] missing option: \"%s\"\n", __func__, argv[opt.i - 1]);
            return 1;
        }
    }

    if (argc == opt.ind || fp_help == stdout) {
        fprintf(fp_help, "\n");
        fprintf(fp_help, "Usage: pathfinder [options] <file>[.gfa[.gz]]\n");
        fprintf(fp_help, "Options:\n");
        fprintf(fp_help, "  Input/Output:\n");
        fprintf(fp_help, "    -m FILE              mitochondria core gene annotation file [NULL]\n");
        fprintf(fp_help, "    -p FILE              plastid core gene annotation file [NULL]\n");
        fprintf(fp_help, "    -o FILE              prefix of output files [%s]\n", out_pref);
        fprintf(fp_help, "    -f FLOAT             prefer circular path to longest if >= FLOAT sequence covered [%.2f]\n", seq_cf);
        //fprintf(fp_help, "    --longest            output only the longest path [default]\n");
        //fprintf(fp_help, "    --circular           output only the longest circular path\n");
        //fprintf(fp_help, "    --all                output all best paths\n");
        fprintf(fp_help, "    --edge-c-tag STR     edge coverage tag in the GFA file [EC:i] \n");
        fprintf(fp_help, "    --kmer-c-tag STR     kmer coverage tag in the GFA file [KC:i] \n");
        fprintf(fp_help, "    --seq-c-tag  STR     sequence coverage tag in the GFA file [SC:f]\n");
        fprintf(fp_help, "    -v INT               verbose level [%d]\n", VERBOSE);
        fprintf(fp_help, "    --version            show version number\n");
        fprintf(fp_help, "  Classification:\n");
        fprintf(fp_help, "    -s FLOAT             minimum annotation score of a core gene [%.1f]\n", min_score);
        fprintf(fp_help, "    -e FLOAT             maximum E-value of a core gene [%.3e]\n", max_eval);
        fprintf(fp_help, "    -g INT[,INT]         minimum number of core gene gain; the second INT for mitochondria [%d,%d]\n", ext_p, ext_m);
        fprintf(fp_help, "    -l INT               minimum length of a singleton sequence to keep [%d]\n", min_len);
        fprintf(fp_help, "    --include-trn        include tRNA genes for sequence classification\n");
        fprintf(fp_help, "    --include-rrn        include rRNA genes for sequence classification\n");
        fprintf(fp_help, "  Path-finding:\n");
        fprintf(fp_help, "    -q FLOAT             minimum coverage of a sequence compared to the subgraph average [%.2f]\n", min_cf);
        fprintf(fp_help, "    -c INT               maximum copy number to consider [%d]\n", max_copy);
        fprintf(fp_help, "    -N INT               maximum number of graph paths to explore [%d]\n", max_path);
        fprintf(fp_help, "    --max-bubble INT     maximum bubble size for assembly graph clean [%d]\n", bubble_size);
        fprintf(fp_help, "    --max-tip    INT     maximum tip size for assembly graph clean [%d]\n", tip_size);
        fprintf(fp_help, "    --weak-cross FLOAT   maximum relative edge coverage for weak crosslink clean [%.2f]\n", weak_cross);
        fprintf(fp_help, "    --no-graph-clean     do not do assembly graph clean\n");
        fprintf(fp_help, "\n");
        fprintf(fp_help, "Example: ./pathfinder -m asm_annot.mito.txt -p asm_annot.pltd.txt -o oatk.asm asm.gfa\n\n");
        return fp_help == stdout? 0 : 1;
    }

    if (argc - opt.ind < 1) {
        fprintf(stderr, "[E::%s] missing input: please specify the GFA file\n", __func__);
        return 1;
    }

    if (out_c > 1) {
        fprintf(stderr, "[E::%s] options --longest, --circular and --all are mutually exclusive\n", __func__);
        return 1;
    }
    
    if (mito_annot == 0 && pltd_annot == 0) {
        fprintf(stderr, "[E::%s] provide at least one HMM profile annotation file (-m and/or -p)\n", __func__);
        return 1;
    }

    if (ec_tag != 0) {
        if(is_valid_gfa_tag(ec_tag)) {
            memcpy(TAG_ARC_COV, ec_tag, 4);
        } else {
            fprintf(stderr, "[E::%s] invalid GFA tag (Regexp: [A-Za-z][A-Za-z0-9]:[A|i|f|Z|B]): %s\n", __func__, ec_tag);
            return 1;
        }
    }

    if (kc_tag != 0) {
        if(is_valid_gfa_tag(kc_tag)) {
            memcpy(TAG_SBP_COV, kc_tag, 4);
        } else {
            fprintf(stderr, "[E::%s] invalid GFA tag (Regexp: [A-Za-z][A-Za-z0-9]:[A|i|f|Z|B]): %s\n", __func__, kc_tag);
            return 1;
        }
    }

    if (sc_tag != 0) {
        if(is_valid_gfa_tag(sc_tag)) {
            memcpy(TAG_SEQ_COV, sc_tag, 4);
        } else {
            fprintf(stderr, "[E::%s] invalid GFA tag (Regexp: [A-Za-z][A-Za-z0-9]:[A|i|f|Z|B]): %s\n", __func__, sc_tag);
            return 1;
        }
    }

    if (out_s < 0) out_s = 0;
    
    ret = pathfinder(argv[opt.ind], mito_annot, pltd_annot, min_len, ext_p, ext_m, max_copy, max_path, 
            max_eval, min_score, min_cf, seq_cf, no_trn, no_rrn, do_graph_clean, bubble_size, tip_size, weak_cross,
            out_s, out_pref, VERBOSE);
    
    if (ret) {
        fprintf(stderr, "[E::%s] failed to analysis the GFA file\n", __func__);
        exit(EXIT_FAILURE);
    }

    if (fflush(stdout) == EOF) {
        fprintf(stderr, "[E::%s] failed to write the results\n", __func__);
        exit(EXIT_FAILURE);
    }

    if (VERBOSE >= 0) {
        fprintf(stderr, "[M::%s] Version: %s\n", __func__, PATHFINDER_VERSION);
        fprintf(stderr, "[M::%s] CMD:", __func__);
        int i;
        for (i = 0; i < argc; ++i)
            fprintf(stderr, " %s", argv[i]);
        fprintf(stderr, "\n[M::%s] Real time: %.3f sec; CPU: %.3f sec; Peak RSS: %.3f GB\n", __func__, realtime() - realtime0, cputime(), peakrss() / 1024.0 / 1024.0 / 1024.0);
    }

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rsi, %rbp
movl %edi, %r14d
movabsq $0x100000000, %rbx      # imm = 0x100000000
callq 0x276d2
movq %rbx, %r9
movq 0x30b9d(%rip), %rax     # 0x36ff8
movq (%rax), %rbx
movq %r14, 0xd0(%rsp)
movslq %r14d, %r10
leal -0x1(%r10), %eax
movl %eax, 0x6c(%rsp)
movsd 0x23bef(%rip), %xmm0    # 0x2a068
movsd %xmm0, 0x98(%rsp)
movsd 0x23be6(%rip), %xmm0    # 0x2a070
movsd %xmm0, 0xa8(%rsp)
movsd 0x23bdd(%rip), %xmm0    # 0x2a078
movsd %xmm0, 0xc8(%rsp)
movsd 0x23bd4(%rip), %xmm0    # 0x2a080
movsd %xmm0, 0xb0(%rsp)
movsd 0x23bcb(%rip), %xmm0    # 0x2a088
movsd %xmm0, 0xb8(%rsp)
movl $0x186a0, %r11d         # imm = 0x186A0
pushq $0x3
popq %rax
movq %rax, 0xc0(%rsp)
movl $0x2710, 0x5c(%rsp)     # imm = 0x2710
leaq 0x23d41(%rip), %rax     # 0x2a227
movq %rax, 0xa0(%rsp)
movl $0xf4240, %r15d         # imm = 0xF4240
pushq $0xa
popq %rcx
pushq $-0x1
popq %rax
movl %eax, 0x48(%rsp)
pushq $0x1
popq %rdx
movq $0x0, 0x60(%rsp)
movq 0x30ac7(%rip), %r8      # 0x36fd8
movl $0x0, 0x40(%rsp)
movl %edx, %r12d
movl $0x0, 0x4c(%rsp)
movl %ecx, %r13d
movl $0x0, %eax
movq %rax, 0x80(%rsp)
movl $0x0, %eax
movq %rax, 0x78(%rsp)
movl $0x0, %eax
movq %rax, 0xf8(%rsp)
movl $0x0, %eax
movq %rax, 0xf0(%rsp)
movl $0x0, %eax
movq %rax, 0xe8(%rsp)
movl %edx, %edi
movl %edx, %eax
movq %rax, 0x88(%rsp)
movl $0x2710, %eax           # imm = 0x2710
movq %rax, 0x90(%rsp)
movl %edx, %eax
movq %rax, 0xe0(%rsp)
movq %r10, 0x10(%rsp)
movq %rbp, 0x38(%rsp)
movslq %r12d, %rcx
movq %rcx, %r14
shlq $0x20, %r14
leaq (,%rcx,8), %rdx
addq %rbp, %rdx
xorl %ebp, %ebp
movq %rcx, %rax
leaq (%rcx,%rbp), %rsi
cmpq %r10, %rsi
jge 0x6dce
movq (%rdx,%rbp,8), %rsi
cmpb $0x2d, (%rsi)
jne 0x65c8
cmpb $0x0, 0x1(%rsi)
jne 0x65d3
incq %rax
incq %rbp
addq %r9, %r14
jmp 0x65ac
sarq $0x1d, %r14
movq 0x38(%rsp), %rcx
movq (%rcx,%r14), %rdx
cmpb $0x2d, (%rdx)
jne 0x73b0
movq %rbx, 0x70(%rsp)
movl %r12d, %ebx
addq %rbp, %rbx
movl 0x60(%rsp), %ecx
addq %rbp, %rcx
movq %rcx, 0xd8(%rsp)
movzbl 0x1(%rdx), %ecx
cmpl $0x2d, %ecx
movq %rdi, 0x28(%rsp)
movq %r11, 0x20(%rsp)
movq %r15, 0x30(%rsp)
movq %r13, 0x8(%rsp)
movq %r12, 0x50(%rsp)
je 0x66ba
testl %ecx, %ecx
je 0x73b8
movl 0x40(%rsp), %r15d
cmpl $0x1, %r15d
adcl $0x0, %r15d
movslq %r15d, %r12
movq %rdx, %r13
movsbl (%rdx,%r12), %esi
incq %r12
leaq 0x23bb9(%rip), %rdi     # 0x2a20c
movl %esi, 0x40(%rsp)
pushq $0x1b
popq %rdx
callq 0x3250
pushq $0x3f
popq %rcx
testq %rax, %rax
je 0x6790
cmpb $0x3a, 0x1(%rax)
jne 0x678a
cmpb $0x0, (%r13,%r12)
je 0x6861
addq %r12, %r13
movq %r13, (%rsp)
movl %ebx, %r14d
movq 0x20(%rsp), %r11
movq 0x30941(%rip), %r8      # 0x36fd8
movq 0x8(%rsp), %r13
movq 0x28(%rsp), %rdi
movabsq $0x100000000, %r9       # imm = 0x100000000
movq 0x10(%rsp), %r10
movl 0x40(%rsp), %r15d
jmp 0x68a0
movb 0x2(%rdx), %cl
testb %cl, %cl
je 0x73bd
leaq 0x2(%rdx), %rax
movq %rax, 0x40(%rsp)
addq $0x3, %rdx
xorl %r14d, %r14d
testb %cl, %cl
je 0x66eb
movzbl %cl, %eax
cmpl $0x3d, %eax
je 0x66eb
movb (%rdx), %cl
incq %rdx
addq %r9, %r14
jmp 0x66d5
movb %cl, 0x1f(%rsp)
movq %rdx, (%rsp)
sarq $0x20, %r14
xorl %r15d, %r15d
leaq 0x3028f(%rip), %r13     # 0x36990
xorl %r12d, %r12d
movq (%r13), %rsi
testq %rsi, %rsi
je 0x672e
movq 0x40(%rsp), %rdi
movq %r14, %rdx
callq 0x30a0
xorl %ecx, %ecx
testl %eax, %eax
sete %cl
cmoveq %r13, %r12
addl %ecx, %r15d
addq $0x10, %r13
jmp 0x6704
cmpl $0x1, %r15d
jne 0x676d
movl 0xc(%r12), %r15d
movb 0x1f(%rsp), %al
cmpb $0x3d, %al
movabsq $0x100000000, %r9       # imm = 0x100000000
movq 0x10(%rsp), %r10
jne 0x681a
movl %ebx, %r14d
movq 0x20(%rsp), %r11
movq 0x8(%rsp), %r13
movq 0x30870(%rip), %r8      # 0x36fd8
jmp 0x689b
movq $0x0, (%rsp)
pushq $0x3f
popq %r15
movl %ebx, %r14d
movq 0x30855(%rip), %r8      # 0x36fd8
movq 0x20(%rsp), %r11
jmp 0x67b0
movl 0x40(%rsp), %eax
movl %eax, %ecx
cmpl $-0x2, %r15d
jg 0x67ce
movq $0x0, (%rsp)
movl %ecx, %r15d
movl %ebx, %r14d
movq 0x20(%rsp), %r11
movq 0x30828(%rip), %r8      # 0x36fd8
movq 0x8(%rsp), %r13
movq 0x28(%rsp), %rdi
movabsq $0x100000000, %r9       # imm = 0x100000000
movq 0x10(%rsp), %r10
jmp 0x68a0
movq 0x38(%rsp), %rax
movq (%rax,%r14), %rax
movl %r12d, %edx
cmpb $0x0, (%rax,%rdx)
movabsq $0x100000000, %r9       # imm = 0x100000000
movq 0x10(%rsp), %r10
je 0x684a
movl %r12d, 0x40(%rsp)
movl %ebx, %r12d
movq $0x0, (%rsp)
movq 0x20(%rsp), %r11
movq 0x307cd(%rip), %r8      # 0x36fd8
movq 0x8(%rsp), %r13
movq 0x28(%rsp), %rdi
jmp 0x690c
testb %al, %al
jne 0x6857
cmpl $0x1, 0x8(%r12)
jne 0x6857
cmpl %ebx, 0x6c(%rsp)
jle 0x687b
movq 0x50(%rsp), %rax
leal (%rax,%rbp), %r14d
incl %r14d
movslq %r14d, %rax
movq 0x38(%rsp), %rcx
movq (%rcx,%rax,8), %rax
movq %rax, (%rsp)
jmp 0x688a
movq $0x0, (%rsp)
movl %ecx, %r15d
jmp 0x6887
movq $0x0, (%rsp)
jmp 0x6887
cmpl %ebx, 0x6c(%rsp)
movabsq $0x100000000, %r9       # imm = 0x100000000
movq 0x10(%rsp), %r10
movl 0x40(%rsp), %r15d
jg 0x682c
movq $0x0, (%rsp)
pushq $0x3a
popq %r15
movl %ebx, %r14d
movq 0x20(%rsp), %r11
movq 0x30742(%rip), %r8      # 0x36fd8
movq 0x8(%rsp), %r13
movq 0x28(%rsp), %rdi
leal 0x1(%r14), %r12d
movl $0x0, 0x40(%rsp)
cmpl $0x0, 0xd8(%rsp)
jle 0x6909
movq %r12, 0x50(%rsp)
movq %r13, %r12
movq %r11, %r13
cmpl %r14d, %ebx
jg 0x68ed
movq 0x38(%rsp), %rdi
movl %ebx, %esi
movq 0xd8(%rsp), %rdx
callq 0x7963
movq 0x10(%rsp), %r10
movabsq $0x100000000, %r9       # imm = 0x100000000
incl %ebx
jmp 0x68c1
movl %r15d, %ecx
movq %r13, %r11
movq %r12, %r13
movq 0x28(%rsp), %rdi
movq 0x306d6(%rip), %r8      # 0x36fd8
movq 0x50(%rsp), %r12
jmp 0x690c
movl %r15d, %ecx
testl %ecx, %ecx
movq 0x30(%rsp), %r15
movq 0x70(%rsp), %rbx
js 0x6dd8
leal -0x63(%rcx), %eax
cmpl $0x13, %eax
jbe 0x6957
leal -0x12d(%rcx), %eax
cmpl $0xb, %eax
movq 0x38(%rsp), %rbp
ja 0x69a3
leaq 0x237ab(%rip), %rcx     # 0x2a0e8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
incl 0x4c(%rsp)
movl $0x0, 0x48(%rsp)
jmp 0x6dbc
leaq 0x2373a(%rip), %rcx     # 0x2a098
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
movq 0x38(%rsp), %rbp
jmpq *%rax
movq %rdi, %r14
movq (%rsp), %rdi
movq %r12, %r13
movq %r8, %r12
callq 0x34a0
movq %r14, %rdi
movq 0x10(%rsp), %r10
movabsq $0x100000000, %r9       # imm = 0x100000000
movq %r12, %r8
movq %r13, %r12
movq 0x20(%rsp), %r11
movl %eax, %r13d
jmp 0x6dbc
movq %rdi, %r13
movq %r12, 0x50(%rsp)
movq %r8, %r12
movq %r11, %r14
cmpl $0x4e, %ecx
je 0x6d8e
cmpl $0x56, %ecx
je 0x73fd
cmpl $0x3a, %ecx
je 0x740b
cmpl $0x3f, %ecx
movq %r14, %r11
movq %r12, %r8
movq 0x50(%rsp), %r12
movabsq $0x100000000, %r9       # imm = 0x100000000
movq 0x10(%rsp), %r10
movq %r13, %rdi
movq 0x8(%rsp), %r13
jne 0x6dbc
jmp 0x7428
movq %r11, %r14
movq %rdi, %rax
movq (%rsp), %rdi
movq %r12, %r13
movq %r8, %r12
movq %rax, %r15
callq 0x3100
movq %r15, %rdi
movq 0x10(%rsp), %r10
movabsq $0x100000000, %r9       # imm = 0x100000000
movq %r12, %r8
movq %r13, %r12
movq 0x8(%rsp), %r13
movq 0x30(%rsp), %r15
movq %r14, %r11
movsd %xmm0, 0xc8(%rsp)
jmp 0x6dbc
movq (%rsp), %rax
movq %rax, 0x78(%rsp)
jmp 0x6dbc
movq %r11, %r14
movq %rdi, %rax
movq (%rsp), %rdi
movq %r12, %r13
movq %r8, %r12
movq %rax, %r15
callq 0x34a0
movq %r15, %rdi
movq 0x10(%rsp), %r10
movabsq $0x100000000, %r9       # imm = 0x100000000
movq %r12, %r8
movq %r13, %r12
movq 0x8(%rsp), %r13
movq 0x30(%rsp), %r15
movq %r14, %r11
movl %eax, 0x5c(%rsp)
jmp 0x6dbc
movq %r13, %r15
movq %r12, %r13
movq %r8, %r12
movq %r11, %r14
movq (%rsp), %rdi
leaq 0x100(%rsp), %rsi
pushq $0xa
popq %rdx
callq 0x3300
movq %rax, 0xc0(%rsp)
movq 0x100(%rsp), %rdi
cmpb $0x2c, (%rdi)
jne 0x6aeb
incq %rdi
leaq 0x100(%rsp), %rsi
pushq $0xa
popq %rdx
callq 0x3300
movq %rax, 0x88(%rsp)
movq %r14, %r11
movq %r12, %r8
movq %r13, %r12
movq %r15, %r13
movq 0x30(%rsp), %r15
movabsq $0x100000000, %r9       # imm = 0x100000000
movq 0x10(%rsp), %r10
movq 0x28(%rsp), %rdi
jmp 0x6dbc
movq (%r8), %rbx
jmp 0x6dbc
movq %r11, %r14
movq %rdi, %rax
movq (%rsp), %rdi
movq %r12, %r13
movq %r8, %r12
movq %rax, %r15
callq 0x3100
movq %r15, %rdi
movq 0x10(%rsp), %r10
movabsq $0x100000000, %r9       # imm = 0x100000000
movq %r12, %r8
movq %r13, %r12
movq 0x8(%rsp), %r13
movq 0x30(%rsp), %r15
movq %r14, %r11
movsd %xmm0, 0xb8(%rsp)
jmp 0x6dbc
movq %r11, %r14
movq %rdi, %rax
movq (%rsp), %rdi
movq %r12, %r13
movq %r8, %r12
movq %rax, %r15
callq 0x3100
movq %r15, %rdi
movq 0x10(%rsp), %r10
movabsq $0x100000000, %r9       # imm = 0x100000000
movq %r12, %r8
movq %r13, %r12
movq 0x8(%rsp), %r13
movq 0x30(%rsp), %r15
movq %r14, %r11
movsd %xmm0, 0xb0(%rsp)
jmp 0x6dbc
movq %r11, %r14
movq %rdi, %rax
movq (%rsp), %rdi
movq %r12, %r13
movq %r8, %r12
movq %rax, %r15
callq 0x3100
movq %r15, %rdi
movq 0x10(%rsp), %r10
movabsq $0x100000000, %r9       # imm = 0x100000000
movq %r12, %r8
movq %r13, %r12
movq 0x8(%rsp), %r13
movq 0x30(%rsp), %r15
movq %r14, %r11
movsd %xmm0, 0xa8(%rsp)
jmp 0x6dbc
movq (%rsp), %rax
movq %rax, 0xa0(%rsp)
jmp 0x6dbc
movq (%rsp), %rax
movq %rax, 0x80(%rsp)
jmp 0x6dbc
movq %r11, %r14
movq %rdi, %rax
movq (%rsp), %rdi
movq %r12, %r13
movq %r8, %r12
movq %rax, %r15
callq 0x34a0
movq %r15, %rdi
movq 0x10(%rsp), %r10
movabsq $0x100000000, %r9       # imm = 0x100000000
movq %r12, %r8
movq %r13, %r12
movq 0x8(%rsp), %r13
movq 0x30(%rsp), %r15
movq %r14, %r11
movl %eax, 0x306a9(%rip)     # 0x3730c
jmp 0x6dbc
movq $0x0, 0xe0(%rsp)
jmp 0x6dbc
movq (%rsp), %rax
movq %rax, 0xf8(%rsp)
jmp 0x6dbc
movq %r11, %r14
movq %rdi, %rax
movq (%rsp), %rdi
movq %r12, %r13
movq %r8, %r12
movq %rax, %r15
callq 0x34a0
movq %r15, %rdi
movq 0x10(%rsp), %r10
movabsq $0x100000000, %r9       # imm = 0x100000000
movq %r12, %r8
movq %r13, %r12
movq 0x8(%rsp), %r13
movq 0x30(%rsp), %r15
movq %r14, %r11
movq %rax, 0x90(%rsp)
jmp 0x6dbc
incl 0x4c(%rsp)
pushq $0x1
jmp 0x6ce2
incl 0x4c(%rsp)
pushq $0x2
popq %rax
movl %eax, 0x48(%rsp)
jmp 0x6dbc
xorl %edi, %edi
jmp 0x6dbc
movq (%rsp), %rax
movq %rax, 0xf0(%rsp)
jmp 0x6dbc
movq (%rsp), %rax
movq %rax, 0xe8(%rsp)
jmp 0x6dbc
movq %r11, %r14
movq %rdi, %rax
movq (%rsp), %rdi
movq %r12, %r13
movq %r8, %r12
movq %rax, %r15
callq 0x3100
movq %r15, %rdi
movq 0x10(%rsp), %r10
movabsq $0x100000000, %r9       # imm = 0x100000000
movq %r12, %r8
movq %r13, %r12
movq 0x8(%rsp), %r13
movq 0x30(%rsp), %r15
movq %r14, %r11
movsd %xmm0, 0x98(%rsp)
jmp 0x6dbc
movq %rdi, %rax
movq (%rsp), %rdi
movq %r8, %r14
movq %rax, %r13
callq 0x34a0
movq %r13, %rdi
movq 0x8(%rsp), %r13
movq 0x10(%rsp), %r10
movabsq $0x100000000, %r9       # imm = 0x100000000
movq %r14, %r8
movl %eax, %r11d
jmp 0x6dbc
movq (%rsp), %rdi
callq 0x34a0
movl %eax, %r15d
movq %r14, %r11
movq %r12, %r8
movq 0x50(%rsp), %r12
movabsq $0x100000000, %r9       # imm = 0x100000000
movq 0x10(%rsp), %r10
movq %r13, %rdi
movq 0x8(%rsp), %r13
movq 0xd8(%rsp), %rax
movq %rax, 0x60(%rsp)
jmp 0x6592
cmpq %r10, %rcx
cmovgq %rcx, %r10
movl %r10d, %r12d
movq 0xd0(%rsp), %rax
movq 0x60(%rsp), %rcx
addl %ecx, %eax
movl %r12d, %ecx
subl %eax, %ecx
cmpl %ebp, %ecx
je 0x7013
cmpq (%r8), %rbx
je 0x7013
movl %r12d, %eax
movq 0x60(%rsp), %rcx
negl %ecx
addq %rax, %rcx
subq %rbp, %rcx
cmpl 0xd0(%rsp), %ecx
jge 0x72ef
cmpl $0x2, 0x4c(%rsp)
jge 0x7302
movq 0x80(%rsp), %rax
orq 0x78(%rsp), %rax
je 0x7315
movq %r13, %rax
movq %rdi, %r13
movq %rax, 0x8(%rsp)
movq %r11, %rbx
movq 0xf8(%rsp), %r14
testq %r14, %r14
je 0x6e6f
movq %r14, %rdi
callq 0x1bb61
testl %eax, %eax
je 0x72cb
movl (%r14), %eax
leaq 0x304cb(%rip), %rcx     # 0x37338
movl %eax, (%rcx)
movq 0xf0(%rsp), %r14
testq %r14, %r14
je 0x6e98
movq %r14, %rdi
callq 0x1bb61
testl %eax, %eax
je 0x72cb
movl (%r14), %eax
leaq 0x304aa(%rip), %rcx     # 0x37340
movl %eax, (%rcx)
movq 0xe8(%rsp), %r14
testq %r14, %r14
je 0x6ec1
movq %r14, %rdi
callq 0x1bb61
testl %eax, %eax
je 0x72cb
movl (%r14), %eax
leaq 0x3047d(%rip), %rcx     # 0x3733c
movl %eax, (%rcx)
xorl %eax, %eax
movl 0x48(%rsp), %ecx
testl %ecx, %ecx
cmovgl %ecx, %eax
movslq %r12d, %rcx
movslq 0x60(%rsp), %rdx
subq %rdx, %rcx
subq %rbp, %rcx
movq 0x38(%rsp), %rbp
movq (%rbp,%rcx,8), %rdi
movl 0x30421(%rip), %r10d    # 0x3730c
movq 0x80(%rsp), %rsi
movq 0x78(%rsp), %rdx
movl 0x5c(%rsp), %ecx
movq 0xc0(%rsp), %r8
movq 0x88(%rsp), %r9
movsd 0xb8(%rsp), %xmm0
movsd 0xb0(%rsp), %xmm1
movsd 0xc8(%rsp), %xmm2
movsd 0xa8(%rsp), %xmm3
movsd 0x98(%rsp), %xmm4
pushq %r10
pushq 0xa8(%rsp)
pushq %rax
pushq 0xa8(%rsp)
pushq %rbx
pushq 0x108(%rsp)
pushq $0x1
pushq %r13
pushq %r15
pushq 0x50(%rsp)
callq 0x4472
addq $0x50, %rsp
testl %eax, %eax
jne 0x744d
movq 0x30064(%rip), %rax     # 0x36fd8
movq (%rax), %rdi
callq 0x3380
cmpl $-0x1, %eax
je 0x7460
xorl %eax, %eax
cmpl $0x0, 0x3037e(%rip)     # 0x3730c
movq 0x30063(%rip), %r12     # 0x36ff8
js 0x7337
movq (%r12), %rdi
leaq 0x23b14(%rip), %rsi     # 0x2aaba
leaq 0x232a5(%rip), %rbx     # 0x2a252
leaq 0x2327c(%rip), %rcx     # 0x2a230
xorl %r14d, %r14d
movq %rbx, %rdx
xorl %eax, %eax
callq 0x32e0
movq (%r12), %rdi
leaq 0x23b03(%rip), %rsi     # 0x2aacf
movq %rbx, %rdx
xorl %eax, %eax
callq 0x32e0
movq 0xd0(%rsp), %r13
testl %r13d, %r13d
cmovlel %r14d, %r13d
leaq 0x264ae(%rip), %r14     # 0x2d49a
xorl %r15d, %r15d
movq (%r12), %rbx
cmpq %r15, %r13
je 0x7349
movq (%rbp,%r15,8), %rdx
movq %rbx, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x32e0
incq %r15
jmp 0x6fef
pushq $0xa
popq %rdi
movq %r11, 0x20(%rsp)
movq %rbx, %rsi
callq 0x3240
leaq 0x2324b(%rip), %rdi     # 0x2a275
pushq $0x2e
popq %rsi
pushq $0x1
popq %rbp
movq %rbp, %rdx
movq %rbx, %rcx
callq 0x34f0
leaq 0x23262(%rip), %rdi     # 0x2a2a4
pushq $0x9
popq %rsi
movq %rbp, %rdx
movq %rbx, %rcx
callq 0x34f0
leaq 0x23257(%rip), %rdi     # 0x2a2ae
pushq $0x10
popq %r14
movq %r14, %rsi
movq %rbp, %rdx
movq %rbx, %rcx
callq 0x34f0
leaq 0x2324f(%rip), %rdi     # 0x2a2bf
pushq $0x47
popq %rsi
movq %rbp, %rdx
movq %rbx, %rcx
callq 0x34f0
leaq 0x23282(%rip), %rdi     # 0x2a307
pushq $0x42
popq %rsi
movq %rbp, %rdx
movq %rbx, %rcx
callq 0x34f0
leaq 0x232b0(%rip), %rsi     # 0x2a34a
movq %rbx, %rdi
movq 0xa0(%rsp), %rdx
xorl %eax, %eax
callq 0x32e0
leaq 0x232cd(%rip), %rsi     # 0x2a380
movq %rbx, %rdi
movsd 0xa8(%rsp), %xmm0
movb $0x1, %al
callq 0x32e0
leaq 0x23311(%rip), %rdi     # 0x2a3de
movq %r15, %r12
pushq $0x43
popq %r15
movq %r15, %rsi
movq %rbp, %rdx
movq %rbx, %rcx
callq 0x34f0
leaq 0x23339(%rip), %rdi     # 0x2a422
movq %r15, %rsi
movq %rbp, %rdx
movq %rbx, %rcx
callq 0x34f0
leaq 0x23368(%rip), %rdi     # 0x2a466
pushq $0x46
popq %rsi
movq %rbp, %rdx
movq %rbx, %rcx
callq 0x34f0
movl 0x301fa(%rip), %edx     # 0x3730c
leaq 0x23394(%rip), %rsi     # 0x2a4ad
movq %rbx, %rdi
xorl %eax, %eax
callq 0x32e0
leaq 0x233b0(%rip), %rdi     # 0x2a4da
pushq $0x2d
popq %rsi
movq %rbp, %rdx
movq %rbx, %rcx
callq 0x34f0
leaq 0x233c9(%rip), %rdi     # 0x2a508
pushq $0x12
popq %rsi
movq %rbp, %rdx
movq %rbx, %rcx
callq 0x34f0
leaq 0x233c7(%rip), %rsi     # 0x2a51b
movq %rbx, %rdi
movsd 0xb0(%rsp), %xmm0
movb $0x1, %al
callq 0x32e0
leaq 0x233f6(%rip), %rsi     # 0x2a564
movq %rbx, %rdi
movsd 0xb8(%rsp), %xmm0
movb $0x1, %al
callq 0x32e0
leaq 0x2341c(%rip), %rsi     # 0x2a5a4
movq %rbx, %rdi
movq 0xc0(%rsp), %rdx
movq 0x88(%rsp), %rcx
xorl %eax, %eax
callq 0x32e0
leaq 0x2345f(%rip), %rsi     # 0x2a608
movq %rbx, %rdi
movl 0x5c(%rsp), %edx
xorl %eax, %eax
callq 0x32e0
leaq 0x23498(%rip), %rdi     # 0x2a656
pushq $0x48
popq %r15
movq %r15, %rsi
movq %rbp, %rdx
movq %rbx, %rcx
callq 0x34f0
leaq 0x234c8(%rip), %rdi     # 0x2a69f
movq %r15, %rsi
movq %rbp, %rdx
movq %rbx, %rcx
callq 0x34f0
leaq 0x234fc(%rip), %rdi     # 0x2a6e8
movq %r14, %rsi
movq %rbp, %rdx
movq %rbx, %rcx
callq 0x34f0
leaq 0x234f8(%rip), %rsi     # 0x2a6f9
movq %rbx, %rdi
movsd 0xc8(%rsp), %xmm0
movb $0x1, %al
callq 0x32e0
leaq 0x2353f(%rip), %rsi     # 0x2a75a
movq %rbx, %rdi
movl %r13d, %edx
xorl %eax, %eax
callq 0x32e0
leaq 0x2356a(%rip), %rsi     # 0x2a799
movq %rbx, %rdi
movl %r12d, %edx
xorl %eax, %eax
callq 0x32e0
leaq 0x2359e(%rip), %rsi     # 0x2a7e1
movq %rbx, %rdi
movq 0x20(%rsp), %rdx
xorl %eax, %eax
callq 0x32e0
leaq 0x235d4(%rip), %rsi     # 0x2a82d
movq %rbx, %rdi
movq 0x90(%rsp), %rdx
xorl %eax, %eax
callq 0x32e0
leaq 0x23604(%rip), %rsi     # 0x2a876
movq %rbx, %rdi
movsd 0x98(%rsp), %xmm0
movb $0x1, %al
callq 0x32e0
leaq 0x23643(%rip), %rdi     # 0x2a8cf
pushq $0x38
popq %rsi
movq %rbp, %rdx
movq %rbx, %rcx
callq 0x34f0
pushq $0xa
popq %rdi
movq %rbx, %rsi
callq 0x3240
leaq 0x2365c(%rip), %rdi     # 0x2a908
pushq $0x57
popq %rsi
movq %rbp, %rdx
movq %rbx, %rcx
callq 0x34f0
xorl %eax, %eax
movq 0x2fd15(%rip), %rcx     # 0x36fd8
cmpq (%rcx), %rbx
setne %al
jmp 0x7337
movq 0x2fd26(%rip), %rax     # 0x36ff8
movq (%rax), %rdi
leaq 0x23749(%rip), %rsi     # 0x2aa25
leaq 0x22f6f(%rip), %rdx     # 0x2a252
movq %r14, %rcx
xorl %eax, %eax
callq 0x32e0
jmp 0x7334
movq 0x2fd02(%rip), %rax     # 0x36ff8
movq (%rax), %rdi
leaq 0x23660(%rip), %rsi     # 0x2a960
jmp 0x7326
movq 0x2fcef(%rip), %rax     # 0x36ff8
movq (%rax), %rdi
leaq 0x23681(%rip), %rsi     # 0x2a994
jmp 0x7326
movq 0x2fcdc(%rip), %rax     # 0x36ff8
movq (%rax), %rdi
leaq 0x236b6(%rip), %rsi     # 0x2a9dc
leaq 0x22f25(%rip), %rdx     # 0x2a252
xorl %eax, %eax
callq 0x32e0
pushq $0x1
popq %rax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x27671
leaq 0x3001b(%rip), %rax     # 0x37370
subsd (%rax), %xmm0
movsd %xmm0, 0x38(%rsp)
callq 0x27608
movsd %xmm0, 0x10(%rsp)
callq 0x2764b
cvtsi2sd %rax, %xmm2
movsd 0x22d14(%rip), %xmm0    # 0x2a090
mulsd %xmm0, %xmm2
mulsd %xmm0, %xmm2
mulsd %xmm0, %xmm2
leaq 0x2374d(%rip), %rsi     # 0x2aadc
leaq 0x22ebc(%rip), %rdx     # 0x2a252
movq %rbx, %rdi
movsd 0x38(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
movb $0x3, %al
callq 0x32e0
xorl %eax, %eax
jmp 0x7337
addl %ebp, %r12d
jmp 0x6dd8
movl %eax, %r12d
jmp 0x73f3
movq 0x60(%rsp), %rax
leal (%rax,%rbp), %edx
leal (%r12,%rbp), %esi
movq %rdi, %rax
movq 0x38(%rsp), %rdi
movq %r8, %r14
movq %r13, %rbx
movq %rax, %r13
callq 0x7963
movq %r13, %rdi
movq %rbx, %r13
movq %r14, %r8
movq 0x20(%rsp), %r11
addl %ebp, %r12d
incl %r12d
movq 0x70(%rsp), %rbx
jmp 0x6dd8
leaq 0x22e2c(%rip), %rdi     # 0x2a230
callq 0x30c0
jmp 0x73ac
movq 0x2fbe6(%rip), %rax     # 0x36ff8
movq (%rax), %rdi
movslq 0x50(%rsp), %rax
movq -0x8(%rbp,%rax,8), %rcx
leaq 0x22e31(%rip), %rsi     # 0x2a257
jmp 0x7441
movq 0x2fbc9(%rip), %rax     # 0x36ff8
movq (%rax), %rdi
movslq %r12d, %rax
movq -0x8(%rbp,%rax,8), %rcx
leaq 0x22df3(%rip), %rsi     # 0x2a234
leaq 0x22e0a(%rip), %rdx     # 0x2a252
jmp 0x72e6
movq 0x2fba4(%rip), %rax     # 0x36ff8
movq (%rax), %rdi
leaq 0x2360e(%rip), %rsi     # 0x2aa6c
jmp 0x7471
movq 0x2fb91(%rip), %rax     # 0x36ff8
movq (%rax), %rdi
leaq 0x23624(%rip), %rsi     # 0x2aa95
leaq 0x22dda(%rip), %rdx     # 0x2a252
xorl %eax, %eax
callq 0x32e0
pushq $0x1
popq %rdi
callq 0x34d0