// File: /workspace/github_c_makefile_star2_O0/c-zhou[P]oatk/path_to_fasta.c
// Function: main
int main(int argc, char *argv[])
{
    const char *opt_str = "p:s:l:n:o:Vv:h";
    ketopt_t opt = KETOPT_INIT;
    int c, force_linear, line_width, gap_size, ret = 0;
    asg_t *g;
    FILE *fp_help;
    char *seq_id, *path_file, *path_str;
    
    sys_init();

    fp_help = stderr;
    force_linear = 0;
    line_width = 60;
    gap_size = 100;
    seq_id = path_file = path_str = 0;

    while ((c = ketopt(&opt, argc, argv, 1, opt_str, long_options)) >=0 ) {
        if (c == 's') seq_id = opt.arg;
        else if (c == 'p') path_file = opt.arg;
        else if (c == 'l') line_width = atoi(opt.arg);
        else if (c == 'n') gap_size = atoi(opt.arg);
        else if (c == 301) force_linear = 1;
        else if (c == 'v') VERBOSE = atoi(opt.arg);
        else if (c == 'h') fp_help = stdout;
        else if (c == 'o') {
            if (strcmp(opt.arg, "-") != 0) {
                if (freopen(opt.arg, "wb", stdout) == NULL) {
                    fprintf(stderr, "[ERROR]\033[1;31m failed to write the output to file '%s'\033[0m: %s\n", opt.arg, strerror(errno));
                    return 1;
                }
            }
        }
        else if (c == 'V') {
            puts(PATHTOFASTA_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: path_to_fasta [options] <file>[.gfa[.gz]] [path_str]\n");
        fprintf(fp_help, "Options:\n");
        fprintf(fp_help, "    -p STR        two-column path file\n");
        fprintf(fp_help, "    -s STR        output sequence id\n");
        fprintf(fp_help, "    -l INT        number of residues per line; 0 for 2^31-1 [%d]\n", line_width);
        fprintf(fp_help, "    -n INT        number of 'N' put between sequences with no links [%d]\n", gap_size);
        fprintf(fp_help, "    -o FILE       output results to FILE [stdout]\n");
        fprintf(fp_help, "    -v INT        verbose level [%d]\n", VERBOSE);
        fprintf(fp_help, "    --linear      force linear output\n");
        fprintf(fp_help, "    --version     show version number\n");
        fprintf(fp_help, "\n");
        fprintf(fp_help, "Example: ./path_to_fasta asm.gfa u1+,u2-,u3-,u2+\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 (argc - opt.ind > 1) {
        path_str = argv[opt.ind + 1];
        if (path_file) {
            fprintf(stderr, "[W::%s] path file %s ignored\n", __func__, path_file);
            fprintf(stderr, "[W::%s] using path string: %s\n", __func__, path_str);
        }
    } else {
        if (!path_file) {
            fprintf(stderr, "[E::%s] need a path file (-p) or path string\n", __func__);
            return 1;
        }
    }

    if (line_width == 0) line_width = INT32_MAX;

    g = asg_read(argv[opt.ind]);
    if (g == 0) {
        fprintf(stderr, "[E::%s] failed to read the graph: %s\n", __func__, argv[opt.ind]);
        return 1;
    }

    path_v paths;
    kv_init(paths);
    if (path_str) {
        kv_push(path_t, paths, make_path_from_str(g, path_str, seq_id? seq_id : 0));
    } else {
        gzFile fp;
        kstring_t s = {0,0,0};
        kstream_t *ks;
        int dret;
        uint64_t lineno = 0;
        char *p, *q, *sid;

        fp = gzopen(path_file, "r");
        if (!fp) {
            fprintf(stderr, "[E::%s] failed to open file %s to read\n", __func__, path_file);
            return 1;
        }
        ks = ks_init(fp);
        while (ks_getuntil(ks, KS_SEP_LINE, &s, &dret) >= 0) {
            ++lineno;
            
            p = q = s.s;
            while (isspace(*q) && *q != '\0') ++q;
            p = q;
            while (!isspace(*q) && *q != '\0') ++q;
            if (p == q) continue; // empty line
            MYMALLOC(sid, q - p + 1);
            memcpy(sid, p, q - p);
            sid[q-p] = '\0';

            while (isspace(*q) && *q != '\0') ++q;
            p = q;
            while (!isspace(*q) && *q != '\0') ++q;
            if (p == q) {
                // no second column found
                fprintf(stderr, "[E::%s] invalid line at line %ld: %s\n", __func__, (long) lineno, s.s);
                return 1;
            }
            
            kv_push(path_t, paths, make_path_from_str(g, p, sid));
            free(sid);
        }

        ks_destroy(ks);
        gzclose(fp);
    }

    size_t i;
    for (i = 0; i < paths.n; ++i)
        print_seq(g, &paths.a[i], stdout, i+1, force_linear, line_width, gap_size);
    
    for (i = 0; i < paths.n; ++i)
        path_destroy(&paths.a[i]);
    kv_destroy(paths);

    if (ret) {
        fprintf(stderr, "[E::%s] failed to analysis the GFA file\n", __func__);
        exit(1);
    }

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

    asg_destroy(g);

    if (VERBOSE >= 0) {
        fprintf(stderr, "[M::%s] Version: %s\n", __func__, PATHTOFASTA_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
movq %rsp, %rbp
subq $0x1c0, %rsp            # imm = 0x1C0
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq 0x209f0(%rip), %rax     # 0x23010
movq %rax, -0x18(%rbp)
movq 0x27c65(%rip), %rax     # 0x2a290
movq %rax, -0x38(%rbp)
movq 0x27c62(%rip), %rax     # 0x2a298
movq %rax, -0x30(%rbp)
movq 0x27c5f(%rip), %rax     # 0x2a2a0
movq %rax, -0x28(%rbp)
movq 0x27c5c(%rip), %rax     # 0x2a2a8
movq %rax, -0x20(%rbp)
movl $0x0, -0x4c(%rbp)
callq 0x20a90
movq 0x27995(%rip), %rax     # 0x29ff8
movq (%rax), %rax
movq %rax, -0x60(%rbp)
movl $0x0, -0x40(%rbp)
movl $0x3c, -0x44(%rbp)
movl $0x64, -0x48(%rbp)
movq $0x0, -0x78(%rbp)
movq $0x0, -0x70(%rbp)
movq $0x0, -0x68(%rbp)
movl -0x8(%rbp), %esi
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %r8
leaq -0x38(%rbp), %rdi
movl $0x1, %ecx
leaq 0x27bfe(%rip), %r9      # 0x2a2b0
callq 0x32d0
movl %eax, -0x3c(%rbp)
cmpl $0x0, %eax
jl 0x28b3
cmpl $0x73, -0x3c(%rbp)
jne 0x26d6
movq -0x30(%rbp), %rax
movq %rax, -0x68(%rbp)
jmp 0x28ae
cmpl $0x70, -0x3c(%rbp)
jne 0x26e9
movq -0x30(%rbp), %rax
movq %rax, -0x70(%rbp)
jmp 0x28ac
cmpl $0x6c, -0x3c(%rbp)
jne 0x2700
movq -0x30(%rbp), %rdi
callq 0x2400
movl %eax, -0x44(%rbp)
jmp 0x28aa
cmpl $0x6e, -0x3c(%rbp)
jne 0x2717
movq -0x30(%rbp), %rdi
callq 0x2400
movl %eax, -0x48(%rbp)
jmp 0x28a8
cmpl $0x12d, -0x3c(%rbp)     # imm = 0x12D
jne 0x272c
movl $0x1, -0x40(%rbp)
jmp 0x28a6
cmpl $0x76, -0x3c(%rbp)
jne 0x2746
movq -0x30(%rbp), %rdi
callq 0x2400
movl %eax, 0x27c43(%rip)     # 0x2a384
jmp 0x28a4
cmpl $0x68, -0x3c(%rbp)
jne 0x275f
movq 0x27885(%rip), %rax     # 0x29fd8
movq (%rax), %rax
movq %rax, -0x60(%rbp)
jmp 0x28a2
cmpl $0x6f, -0x3c(%rbp)
jne 0x27f8
movq -0x30(%rbp), %rdi
leaq 0x21009(%rip), %rsi     # 0x2377d
callq 0x2250
cmpl $0x0, %eax
je 0x27f3
movq -0x30(%rbp), %rdi
movq 0x2784f(%rip), %rax     # 0x29fd8
movq (%rax), %rdx
leaq 0x2088c(%rip), %rsi     # 0x2301f
callq 0x21d0
cmpq $0x0, %rax
jne 0x27f1
movq 0x27853(%rip), %rax     # 0x29ff8
movq (%rax), %rax
movq %rax, -0x160(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x158(%rbp)
callq 0x2080
movl (%rax), %edi
callq 0x2480
movq -0x160(%rbp), %rdi
movq -0x158(%rbp), %rdx
movq %rax, %rcx
leaq 0x20844(%rip), %rsi     # 0x23022
movb $0x0, %al
callq 0x2290
movl $0x1, -0x4(%rbp)
jmp 0x32c4
jmp 0x27f3
jmp 0x28a0
cmpl $0x56, -0x3c(%rbp)
jne 0x2816
leaq 0x2085d(%rip), %rdi     # 0x23062
callq 0x20b0
movl $0x0, -0x4(%rbp)
jmp 0x32c4
cmpl $0x3f, -0x3c(%rbp)
jne 0x2858
movq 0x277d5(%rip), %rax     # 0x29ff8
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movl -0x24(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rcx
leaq 0x20828(%rip), %rsi     # 0x23066
leaq 0x2083f(%rip), %rdx     # 0x23084
movb $0x0, %al
callq 0x2290
movl $0x1, -0x4(%rbp)
jmp 0x32c4
cmpl $0x3a, -0x3c(%rbp)
jne 0x289a
movq 0x27793(%rip), %rax     # 0x29ff8
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movl -0x24(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rcx
leaq 0x20809(%rip), %rsi     # 0x23089
leaq 0x207fd(%rip), %rdx     # 0x23084
movb $0x0, %al
callq 0x2290
movl $0x1, -0x4(%rbp)
jmp 0x32c4
jmp 0x289c
jmp 0x289e
jmp 0x28a0
jmp 0x28a2
jmp 0x28a4
jmp 0x28a6
jmp 0x28a8
jmp 0x28aa
jmp 0x28ac
jmp 0x28ae
jmp 0x2697
movl -0x8(%rbp), %eax
cmpl -0x38(%rbp), %eax
je 0x28cf
movq -0x60(%rbp), %rax
movq 0x27712(%rip), %rcx     # 0x29fd8
cmpq (%rcx), %rax
jne 0x29e8
movq -0x60(%rbp), %rdi
leaq 0x209c6(%rip), %rsi     # 0x232a0
movb $0x0, %al
callq 0x2290
movq -0x60(%rbp), %rdi
leaq 0x207bb(%rip), %rsi     # 0x230a7
movb $0x0, %al
callq 0x2290
movq -0x60(%rbp), %rdi
leaq 0x207e6(%rip), %rsi     # 0x230e4
movb $0x0, %al
callq 0x2290
movq -0x60(%rbp), %rdi
leaq 0x207de(%rip), %rsi     # 0x230ee
movb $0x0, %al
callq 0x2290
movq -0x60(%rbp), %rdi
leaq 0x207f4(%rip), %rsi     # 0x23116
movb $0x0, %al
callq 0x2290
movq -0x60(%rbp), %rdi
movl -0x44(%rbp), %edx
leaq 0x20805(%rip), %rsi     # 0x2313c
movb $0x0, %al
callq 0x2290
movq -0x60(%rbp), %rdi
movl -0x48(%rbp), %edx
leaq 0x20832(%rip), %rsi     # 0x2317e
movb $0x0, %al
callq 0x2290
movq -0x60(%rbp), %rdi
leaq 0x2086a(%rip), %rsi     # 0x231c8
movb $0x0, %al
callq 0x2290
movq -0x60(%rbp), %rdi
movl 0x27a15(%rip), %edx     # 0x2a384
leaq 0x20885(%rip), %rsi     # 0x231fb
movb $0x0, %al
callq 0x2290
movq -0x60(%rbp), %rdi
leaq 0x20899(%rip), %rsi     # 0x23221
movb $0x0, %al
callq 0x2290
movq -0x60(%rbp), %rdi
leaq 0x208ae(%rip), %rsi     # 0x23248
movb $0x0, %al
callq 0x2290
movq -0x60(%rbp), %rdi
leaq 0x208f4(%rip), %rsi     # 0x232a0
movb $0x0, %al
callq 0x2290
movq -0x60(%rbp), %rdi
leaq 0x208b1(%rip), %rsi     # 0x2326f
movb $0x0, %al
callq 0x2290
movq -0x60(%rbp), %rdx
movq 0x27608(%rip), %rax     # 0x29fd8
movq (%rax), %rsi
movl $0x1, %eax
xorl %ecx, %ecx
cmpq %rsi, %rdx
cmovel %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x32c4
movl -0x8(%rbp), %eax
subl -0x38(%rbp), %eax
cmpl $0x1, %eax
jge 0x2a1e
movq 0x275fe(%rip), %rax     # 0x29ff8
movq (%rax), %rdi
leaq 0x2089e(%rip), %rsi     # 0x232a2
leaq 0x20679(%rip), %rdx     # 0x23084
movb $0x0, %al
callq 0x2290
movl $0x1, -0x4(%rbp)
jmp 0x32c4
movl -0x8(%rbp), %eax
subl -0x38(%rbp), %eax
cmpl $0x1, %eax
jle 0x2a8d
movq -0x10(%rbp), %rax
movl -0x38(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x78(%rbp)
cmpq $0x0, -0x70(%rbp)
je 0x2a8b
movq 0x275ac(%rip), %rax     # 0x29ff8
movq (%rax), %rdi
movq -0x70(%rbp), %rcx
leaq 0x2087c(%rip), %rsi     # 0x232d6
leaq 0x20623(%rip), %rdx     # 0x23084
movb $0x0, %al
callq 0x2290
movq 0x27589(%rip), %rax     # 0x29ff8
movq (%rax), %rdi
movq -0x78(%rbp), %rcx
leaq 0x20877(%rip), %rsi     # 0x232f4
leaq 0x20600(%rip), %rdx     # 0x23084
movb $0x0, %al
callq 0x2290
jmp 0x2ac1
cmpq $0x0, -0x70(%rbp)
jne 0x2abf
movq 0x2755d(%rip), %rax     # 0x29ff8
movq (%rax), %rdi
leaq 0x2086e(%rip), %rsi     # 0x23313
leaq 0x205d8(%rip), %rdx     # 0x23084
movb $0x0, %al
callq 0x2290
movl $0x1, -0x4(%rbp)
jmp 0x32c4
jmp 0x2ac1
cmpl $0x0, -0x44(%rbp)
jne 0x2ace
movl $0x7fffffff, -0x44(%rbp) # imm = 0x7FFFFFFF
movq -0x10(%rbp), %rax
movslq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0xc390
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x58(%rbp)
jne 0x2b21
movq 0x27507(%rip), %rax     # 0x29ff8
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movslq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rcx
leaq 0x2083a(%rip), %rsi     # 0x23341
leaq 0x20576(%rip), %rdx     # 0x23084
movb $0x0, %al
callq 0x2290
movl $0x1, -0x4(%rbp)
jmp 0x32c4
movq $0x0, -0x88(%rbp)
movq $0x0, -0x90(%rbp)
movq $0x0, -0x80(%rbp)
cmpq $0x0, -0x78(%rbp)
je 0x2c44
jmp 0x2b4c
movq -0x90(%rbp), %rax
cmpq -0x88(%rbp), %rax
jne 0x2baa
cmpq $0x0, -0x88(%rbp)
je 0x2b79
movq -0x88(%rbp), %rax
shlq %rax
movq %rax, -0x168(%rbp)
jmp 0x2b87
movl $0x2, %eax
movq %rax, -0x168(%rbp)
jmp 0x2b87
movq -0x168(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x80(%rbp), %rdi
imulq $0x30, -0x88(%rbp), %rsi
callq 0x2330
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rax
movq -0x90(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x90(%rbp)
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x180(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x178(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0x170(%rbp)
cmpq $0x0, -0x68(%rbp)
je 0x2bfb
movq -0x68(%rbp), %rax
movq %rax, -0x188(%rbp)
jmp 0x2c06
xorl %eax, %eax
movq %rax, -0x188(%rbp)
jmp 0x2c06
movq -0x170(%rbp), %rdx
movq -0x178(%rbp), %rsi
movq -0x188(%rbp), %rcx
leaq -0xc0(%rbp), %rdi
callq 0x84d0
movq -0x180(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
movl $0x30, %edx
callq 0x22c0
jmp 0x3061
leaq -0xe0(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x21c0
movq $0x0, -0xf8(%rbp)
movq -0x70(%rbp), %rdi
leaq 0x207fd(%rip), %rsi     # 0x2346a
callq 0x2350
movq %rax, -0xc8(%rbp)
cmpq $0x0, -0xc8(%rbp)
jne 0x2cb2
movq 0x2736e(%rip), %rax     # 0x29ff8
movq (%rax), %rdi
movq -0x70(%rbp), %rcx
leaq 0x206cf(%rip), %rsi     # 0x23367
leaq 0x203e5(%rip), %rdx     # 0x23084
movb $0x0, %al
callq 0x2290
movl $0x1, -0x4(%rbp)
jmp 0x32c4
movq -0xc8(%rbp), %rdi
callq 0x3830
movq %rax, -0xe8(%rbp)
movq -0xe8(%rbp), %rdi
movl $0x2, %esi
leaq -0xe0(%rbp), %rdx
leaq -0xec(%rbp), %rcx
callq 0x3890
cmpl $0x0, %eax
jl 0x3049
movq -0xf8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xf8(%rbp)
movq -0xd0(%rbp), %rax
movq %rax, -0x108(%rbp)
movq %rax, -0x100(%rbp)
callq 0x24d0
movq (%rax), %rax
movq -0x108(%rbp), %rcx
movsbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %ecx
andl $0x2000, %ecx           # imm = 0x2000
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x189(%rbp)
je 0x2d56
movq -0x108(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x189(%rbp)
movb -0x189(%rbp), %al
testb $0x1, %al
jne 0x2d62
jmp 0x2d76
movq -0x108(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x108(%rbp)
jmp 0x2d14
movq -0x108(%rbp), %rax
movq %rax, -0x100(%rbp)
callq 0x24d0
movq (%rax), %rax
movq -0x108(%rbp), %rcx
movsbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %ecx
andl $0x2000, %ecx           # imm = 0x2000
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x18a(%rbp)
jne 0x2dc6
movq -0x108(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x18a(%rbp)
movb -0x18a(%rbp), %al
testb $0x1, %al
jne 0x2dd2
jmp 0x2de6
movq -0x108(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x108(%rbp)
jmp 0x2d84
movq -0x100(%rbp), %rax
cmpq -0x108(%rbp), %rax
jne 0x2dfb
jmp 0x2cc5
movq -0x108(%rbp), %rdi
movq -0x100(%rbp), %rax
subq %rax, %rdi
addq $0x1, %rdi
shlq $0x0, %rdi
callq 0x22f0
movq %rax, -0x110(%rbp)
movq -0x110(%rbp), %rdi
movq -0x100(%rbp), %rsi
movq -0x108(%rbp), %rdx
movq -0x100(%rbp), %rax
subq %rax, %rdx
callq 0x22c0
movq -0x110(%rbp), %rax
movq -0x108(%rbp), %rcx
movq -0x100(%rbp), %rdx
subq %rdx, %rcx
movb $0x0, (%rax,%rcx)
callq 0x24d0
movq (%rax), %rax
movq -0x108(%rbp), %rcx
movsbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %ecx
andl $0x2000, %ecx           # imm = 0x2000
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x18b(%rbp)
je 0x2ea2
movq -0x108(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x18b(%rbp)
movb -0x18b(%rbp), %al
testb $0x1, %al
jne 0x2eae
jmp 0x2ec2
movq -0x108(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x108(%rbp)
jmp 0x2e60
movq -0x108(%rbp), %rax
movq %rax, -0x100(%rbp)
callq 0x24d0
movq (%rax), %rax
movq -0x108(%rbp), %rcx
movsbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %ecx
andl $0x2000, %ecx           # imm = 0x2000
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x18c(%rbp)
jne 0x2f12
movq -0x108(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x18c(%rbp)
movb -0x18c(%rbp), %al
testb $0x1, %al
jne 0x2f1e
jmp 0x2f32
movq -0x108(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x108(%rbp)
jmp 0x2ed0
movq -0x100(%rbp), %rax
cmpq -0x108(%rbp), %rax
jne 0x2f7b
movq 0x270af(%rip), %rax     # 0x29ff8
movq (%rax), %rdi
movq -0xf8(%rbp), %rcx
movq -0xd0(%rbp), %r8
leaq 0x2042e(%rip), %rsi     # 0x2338f
leaq 0x2011c(%rip), %rdx     # 0x23084
movb $0x0, %al
callq 0x2290
movl $0x1, -0x4(%rbp)
jmp 0x32c4
jmp 0x2f7d
movq -0x90(%rbp), %rax
cmpq -0x88(%rbp), %rax
jne 0x2fdb
cmpq $0x0, -0x88(%rbp)
je 0x2faa
movq -0x88(%rbp), %rax
shlq %rax
movq %rax, -0x198(%rbp)
jmp 0x2fb8
movl $0x2, %eax
movq %rax, -0x198(%rbp)
jmp 0x2fb8
movq -0x198(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x80(%rbp), %rdi
imulq $0x30, -0x88(%rbp), %rsi
callq 0x2330
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rax
movq -0x90(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x90(%rbp)
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x1a0(%rbp)
movq -0x58(%rbp), %rsi
movq -0x100(%rbp), %rdx
movq -0x110(%rbp), %rcx
leaq -0x140(%rbp), %rdi
callq 0x84d0
movq -0x1a0(%rbp), %rdi
leaq -0x140(%rbp), %rsi
movl $0x30, %edx
callq 0x22c0
movq -0x110(%rbp), %rdi
callq 0x2060
jmp 0x2cc5
movq -0xe8(%rbp), %rdi
callq 0x38d0
movq -0xc8(%rbp), %rdi
callq 0x2050
movq $0x0, -0x148(%rbp)
movq -0x148(%rbp), %rax
cmpq -0x90(%rbp), %rax
jae 0x30cd
movq -0x58(%rbp), %rdi
movq -0x80(%rbp), %rsi
imulq $0x30, -0x148(%rbp), %rax
addq %rax, %rsi
movq 0x26f42(%rip), %rax     # 0x29fd8
movq (%rax), %rdx
movq -0x148(%rbp), %rax
addq $0x1, %rax
movl %eax, %ecx
movl -0x40(%rbp), %r8d
movl -0x44(%rbp), %r9d
movl -0x48(%rbp), %eax
movl %eax, (%rsp)
callq 0xa070
movq -0x148(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x148(%rbp)
jmp 0x306c
movq $0x0, -0x148(%rbp)
movq -0x148(%rbp), %rax
cmpq -0x90(%rbp), %rax
jae 0x3110
movq -0x80(%rbp), %rdi
imulq $0x30, -0x148(%rbp), %rax
addq %rax, %rdi
callq 0x3e20
movq -0x148(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x148(%rbp)
jmp 0x30d8
movq -0x80(%rbp), %rdi
callq 0x2060
cmpl $0x0, -0x4c(%rbp)
je 0x3148
movq 0x26ed2(%rip), %rax     # 0x29ff8
movq (%rax), %rdi
leaq 0x20285(%rip), %rsi     # 0x233b5
leaq 0x1ff4d(%rip), %rdx     # 0x23084
movb $0x0, %al
callq 0x2290
movl $0x1, %edi
callq 0x2430
movq 0x26e89(%rip), %rax     # 0x29fd8
movq (%rax), %rdi
callq 0x2300
cmpl $-0x1, %eax
jne 0x3185
movq 0x26e95(%rip), %rax     # 0x29ff8
movq (%rax), %rdi
leaq 0x20271(%rip), %rsi     # 0x233de
leaq 0x1ff10(%rip), %rdx     # 0x23084
movb $0x0, %al
callq 0x2290
movl $0x1, %edi
callq 0x2430
movq -0x58(%rbp), %rdi
callq 0xb200
cmpl $0x0, 0x271ef(%rip)     # 0x2a384
jl 0x32bd
movq 0x26e56(%rip), %rax     # 0x29ff8
movq (%rax), %rdi
leaq 0x20257(%rip), %rsi     # 0x23403
leaq 0x1fed1(%rip), %rdx     # 0x23084
leaq 0x1fea8(%rip), %rcx     # 0x23062
movb $0x0, %al
callq 0x2290
movq 0x26e30(%rip), %rax     # 0x29ff8
movq (%rax), %rdi
leaq 0x20246(%rip), %rsi     # 0x23418
leaq 0x1feab(%rip), %rdx     # 0x23084
movb $0x0, %al
callq 0x2290
movl $0x0, -0x14c(%rbp)
movl -0x14c(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0x322d
movq 0x26dfc(%rip), %rax     # 0x29ff8
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movslq -0x14c(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
leaq 0x20eff(%rip), %rsi     # 0x24114
movb $0x0, %al
callq 0x2290
movl -0x14c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14c(%rbp)
jmp 0x31ea
movq 0x26dc4(%rip), %rax     # 0x29ff8
movq (%rax), %rax
movq %rax, -0x1b8(%rbp)
callq 0x20a10
leaq 0x2714e(%rip), %rax     # 0x2a398
subsd (%rax), %xmm0
movsd %xmm0, -0x1b0(%rbp)
callq 0x20980
movsd %xmm0, -0x1a8(%rbp)
callq 0x209e0
movq -0x1b8(%rbp), %rdi
movsd -0x1b0(%rbp), %xmm0
movsd -0x1a8(%rbp), %xmm1
cvtsi2sd %rax, %xmm2
movsd 0x1fd7c(%rip), %xmm3    # 0x23008
divsd %xmm3, %xmm2
movsd 0x1fd70(%rip), %xmm3    # 0x23008
divsd %xmm3, %xmm2
movsd 0x1fd64(%rip), %xmm3    # 0x23008
divsd %xmm3, %xmm2
leaq 0x20176(%rip), %rsi     # 0x23425
leaq 0x1fdce(%rip), %rdx     # 0x23084
movb $0x3, %al
callq 0x2290
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x1c0, %rsp            # imm = 0x1C0
popq %rbp
retq