// File: /workspace/github_c_makefile_star2_O0/c-zhou[P]yahs/juicer.c
// Function: main_pre
static int main_pre(int argc, char *argv[])
{
    FILE *fo;
    char *fai, *agp, *agp1, *link_file, *out, *out1, *annot, *lift, *ext1, *ext2;
    int mq, asm_mode;;
    enum fileTypes f_type;

    liftrlimit();
    jc_realtime0 = realtime();

    const char *opt_str = "q:ao:Vh";
    ketopt_t opt = KETOPT_INIT;
    int c, ret;
    FILE *fp_help = stderr;
    fai = agp = agp1 = link_file = out = out1 = annot = lift = 0;
    mq = 10;
    asm_mode = 0;
    f_type = NOSET;

    while ((c = ketopt(&opt, argc, argv, 1, opt_str, long_options)) >= 0) {
        if (c == 'o') {
            out = opt.arg;
        } else if (c == 'q') {
            mq = atoi(opt.arg);
        } else if (c == 'a') {
            asm_mode = 1;
        } else if (c == 301) {
            if (strcasecmp(opt.arg, "BED") == 0)
                f_type = BED;
            else if (strcasecmp(opt.arg, "BAM") == 0)
                f_type = BAM;
            else if (strcasecmp(opt.arg, "BIN") == 0)
                f_type = BIN;
            else if (strcasecmp(opt.arg, "PA5") == 0)
                f_type = PA5;
            else {
                fprintf(stderr, "[E::%s] unknown file type: \"%s\"\n", __func__, opt.arg);
                return 1;
            }
        } else if (c == 'h') {
            fp_help = stdout;   
        } else if (c == 'V') {
            puts(JUICER_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 (fp_help == stdout) {
        print_help_pre(stdout);
        return 0;
    }

    if (asm_mode && !out) {
        fprintf(stderr, "[E::%s] missing input: -o option is required for assembly mode (-a)\n", __func__);
        return 1;
    }

    if (argc - opt.ind < 3) {
        fprintf(stderr, "[E::%s] missing input: three positional options required\n", __func__);
        print_help_pre(stderr);
        return 1;
    }
    
    if (mq < 0 || mq > 255) {
        fprintf(stderr, "[E::%s] invalid mapping quality threshold: %d\n", __func__, mq);
        return 1;
    }

    uint8_t mq8;
    mq8 = (uint8_t) mq;

    link_file = argv[opt.ind];
    agp = argv[opt.ind + 1];
    fai = argv[opt.ind + 2];

    if (f_type == NOSET) {
        ext1 = strlen(link_file) >= 4? (link_file + strlen(link_file) - 4) : NULL;
        ext2 = strlen(link_file) >= 7? (link_file + strlen(link_file) - 7) : NULL;
        if (ext1 && !strcasecmp(ext1, ".bam")) f_type = BAM;
        else if (ext1 && !strcasecmp(ext1, ".bin")) f_type = BIN;
        else if ((ext1 && !strcasecmp(ext1, ".bed")) || (ext2 && !strcasecmp(ext2, ".bed.gz"))) f_type = BED;
        else if ((ext1 && !strcasecmp(ext1, ".pa5")) || (ext2 && !strcasecmp(ext2, ".pa5.gz"))) f_type = PA5;
        else {
            fprintf(stderr, "[E::%s] unknown link file format. File extension .bam, .bed, .pa5 or .bin or --file-type is expected\n", __func__);
            exit(EXIT_FAILURE);
        }
    }
    
    if (f_type == BIN && (strcmp(link_file, "-") == 0 || *link_file == '<')) {
        fprintf(stderr, "[E::%s] BIN file format from STDIN is not supported\n", __func__);
        exit(EXIT_FAILURE);
    }

    if (out) {
        out1 = (char *) malloc(strlen(out) + 35);
        sprintf(out1, "%s.txt", out);
    }

    fo = out1 == 0? stdout : fopen(out1, "w");
    if (fo == 0) {
        fprintf(stderr, "[E::%s] cannot open file %s for writing\n", __func__, out);
        exit(EXIT_FAILURE);
    }
    ret = 0;
    
    sdict_t *sdict;
    asm_dict_t *dict;
    int scale;
    uint64_t max_s, scaled_s;
    
    sdict = make_sdict_from_index(fai, 0);
    scale = 0;
    max_s = scaled_s = 0;
    agp1 = (char *) malloc(MAX(strlen(agp), out? strlen(out) : 0) + 35);
    if (asm_mode) {
        annot = (char *) malloc(strlen(out) + 35);
        lift = (char *) malloc(strlen(out) + 35);
        sprintf(agp1, "%s.assembly.agp", out);
        sprintf(annot, "%s.assembly", out);
        sprintf(lift, "%s.liftover.agp", out);
        scaled_s = assembly_annotation(agp, sdict, agp1, annot, lift, &scale, (uint64_t) INT_MAX, &max_s);
        dict = make_asm_dict_from_agp(sdict, agp1, 1);
    } else {
        sprintf(agp1, "%s", agp);
        dict = make_asm_dict_from_agp(sdict, agp1, 1);
        scaled_s = assembly_scale_max_seq(dict, &scale, (uint64_t) INT_MAX, &max_s);
    }

    if (f_type == BAM) {
        fprintf(stderr, "[I::%s] make juicer pre input from BAM file %s\n", __func__, link_file);
        ret = make_juicer_pre_file_from_bam(link_file, agp1, fai, mq8, scale, !asm_mode, fo);
    } else if (f_type == BED) {
        fprintf(stderr, "[I::%s] make juicer pre input from BED file %s\n", __func__, link_file);
        ret = make_juicer_pre_file_from_bed(link_file, agp1, fai, mq8, scale, !asm_mode, fo);
    } else if (f_type == PA5) {
        fprintf(stderr, "[I::%s] make juicer pre input from PA5 file %s\n", __func__, link_file);
        ret = make_juicer_pre_file_from_pa5(link_file, agp1, fai, mq8, scale, !asm_mode, fo);
    } else if (f_type == BIN) {
        fprintf(stderr, "[I::%s] make juicer pre input from BIN file %s\n", __func__, link_file);
        ret = make_juicer_pre_file_from_bin(link_file, agp1, fai, mq8, scale, !asm_mode, fo);
    }

    if (asm_mode) {
        fprintf(stderr, "[I::%s] genome size: %lu\n", __func__, max_s);
        fprintf(stderr, "[I::%s] scale factor: %d\n", __func__, 1 << scale);
        fprintf(stderr, "[I::%s] chromosome sizes for juicer_tools pre -\n", __func__);
        fprintf(stderr, "PRE_C_SIZE: assembly %lu\n", scaled_s);
        fprintf(stderr, "[I::%s] JUICER_PRE CMD: java -Xmx36G -jar ${juicer_tools} pre %s %s.hic <(echo \"assembly %lu\")\n", 
                __func__, out1, out, scaled_s);
    } else {
        if (scale) {
            fprintf(stderr, "[W::%s] maximum scaffold length exceeds %d (=%lu)\n", __func__, INT_MAX, max_s);
            fprintf(stderr, "[W::%s] using scale factor: %d\n", __func__, 1 << scale);
        }
        fprintf(stderr, "[I::%s] chromosome sizes for juicer_tools pre -\n", __func__);
        uint32_t i;
        sd_aseq_t seq;
        for (i = 0; i < dict->n; ++i) {
            seq = dict->s[i];
            fprintf(stderr, "PRE_C_SIZE: %s %lu\n", seq.name, (seq.len + seq.gap) >> scale);
        }
    }

    asm_destroy(dict);
    sd_destroy(sdict);

    if (out != 0)
        fclose(fo);
    
    if (out1)
        free(out1);

    if (agp1)
        free(agp1);

    if (annot)
        free(annot);

    if (lift)
        free(lift);

    fprintf(stderr, "[I::%s] Version: %s\n", __func__, JUICER_VERSION);
    fprintf(stderr, "[I::%s] CMD: juicer", __func__);
    int i;
    for (i = 0; i < argc; ++i)
        fprintf(stderr, " %s", argv[i]);
    fprintf(stderr, "\n[I::%s] Real time: %.3f sec; CPU: %.3f sec; Peak RSS: %.3f GB\n", __func__, 
            realtime() - jc_realtime0, cputime(), peakrss() / 1024.0 / 1024.0 / 1024.0);

    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1c0, %rsp            # imm = 0x1C0
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb $0x0, %al
callq 0x2600
callq 0x2670
movsd %xmm0, 0xb612(%rip)     # 0x18428
leaq 0x71a5(%rip), %rax      # 0x13fc2
movq %rax, -0x80(%rbp)
movq 0xb558(%rip), %rax      # 0x18380
movq %rax, -0xa0(%rbp)
movq 0xb552(%rip), %rax      # 0x18388
movq %rax, -0x98(%rbp)
movq 0xb54c(%rip), %rax      # 0x18390
movq %rax, -0x90(%rbp)
movq 0xb546(%rip), %rax      # 0x18398
movq %rax, -0x88(%rbp)
movq 0xb198(%rip), %rax      # 0x17ff8
movq (%rax), %rax
movq %rax, -0xb0(%rbp)
movq $0x0, -0x58(%rbp)
movq $0x0, -0x50(%rbp)
movq $0x0, -0x48(%rbp)
movq $0x0, -0x40(%rbp)
movq $0x0, -0x38(%rbp)
movq $0x0, -0x30(%rbp)
movq $0x0, -0x28(%rbp)
movq $0x0, -0x20(%rbp)
movl $0xa, -0x6c(%rbp)
movl $0x0, -0x70(%rbp)
movl $0x0, -0x74(%rbp)
movl -0x8(%rbp), %esi
movq -0x10(%rbp), %rdx
movq -0x80(%rbp), %r8
leaq -0xa0(%rbp), %rdi
movl $0x1, %ecx
leaq 0xb4c3(%rip), %r9       # 0x183a0
callq 0xe310
movl %eax, -0xa4(%rbp)
cmpl $0x0, %eax
jl 0xd0f3
cmpl $0x6f, -0xa4(%rbp)
jne 0xcf0a
movq -0x98(%rbp), %rax
movq %rax, -0x40(%rbp)
jmp 0xd0ee
cmpl $0x71, -0xa4(%rbp)
jne 0xcf27
movq -0x98(%rbp), %rdi
callq 0x23c0
movl %eax, -0x6c(%rbp)
jmp 0xd0ec
cmpl $0x61, -0xa4(%rbp)
jne 0xcf3c
movl $0x1, -0x70(%rbp)
jmp 0xd0ea
cmpl $0x12d, -0xa4(%rbp)     # imm = 0x12D
jne 0xd010
movq -0x98(%rbp), %rdi
leaq 0x7070(%rip), %rsi      # 0x13fca
callq 0x2b30
cmpl $0x0, %eax
jne 0xcf70
movl $0x1, -0x74(%rbp)
jmp 0xd00b
movq -0x98(%rbp), %rdi
leaq 0x7050(%rip), %rsi      # 0x13fce
callq 0x2b30
cmpl $0x0, %eax
jne 0xcf91
movl $0x2, -0x74(%rbp)
jmp 0xd009
movq -0x98(%rbp), %rdi
leaq 0x7033(%rip), %rsi      # 0x13fd2
callq 0x2b30
cmpl $0x0, %eax
jne 0xcfb2
movl $0x3, -0x74(%rbp)
jmp 0xd007
movq -0x98(%rbp), %rdi
leaq 0x7016(%rip), %rsi      # 0x13fd6
callq 0x2b30
cmpl $0x0, %eax
jne 0xcfd3
movl $0x4, -0x74(%rbp)
jmp 0xd005
movq 0xb01e(%rip), %rax      # 0x17ff8
movq (%rax), %rdi
movq -0x98(%rbp), %rcx
leaq 0x6fef(%rip), %rsi      # 0x13fda
leaq 0x7009(%rip), %rdx      # 0x13ffb
movb $0x0, %al
callq 0x2230
movl $0x1, -0x4(%rbp)
jmp 0xdc01
jmp 0xd007
jmp 0xd009
jmp 0xd00b
jmp 0xd0e8
cmpl $0x68, -0xa4(%rbp)
jne 0xd02f
movq 0xafb0(%rip), %rax      # 0x17fd0
movq (%rax), %rax
movq %rax, -0xb0(%rbp)
jmp 0xd0e6
cmpl $0x56, -0xa4(%rbp)
jne 0xd050
leaq 0x6e90(%rip), %rdi      # 0x13ecf
callq 0x20c0
movl $0x0, -0x4(%rbp)
jmp 0xdc01
cmpl $0x3f, -0xa4(%rbp)
jne 0xd098
movq 0xaf98(%rip), %rax      # 0x17ff8
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movl -0x8c(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rcx
leaq 0x6f86(%rip), %rsi      # 0x14004
leaq 0x6f76(%rip), %rdx      # 0x13ffb
movb $0x0, %al
callq 0x2230
movl $0x1, -0x4(%rbp)
jmp 0xdc01
cmpl $0x3a, -0xa4(%rbp)
jne 0xd0e0
movq 0xaf50(%rip), %rax      # 0x17ff8
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movl -0x8c(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rcx
leaq 0x6f5c(%rip), %rsi      # 0x14022
leaq 0x6f2e(%rip), %rdx      # 0x13ffb
movb $0x0, %al
callq 0x2230
movl $0x1, -0x4(%rbp)
jmp 0xdc01
jmp 0xd0e2
jmp 0xd0e4
jmp 0xd0e6
jmp 0xd0e8
jmp 0xd0ea
jmp 0xd0ec
jmp 0xd0ee
jmp 0xcebf
movq -0xb0(%rbp), %rax
movq 0xaecf(%rip), %rcx      # 0x17fd0
cmpq (%rcx), %rax
jne 0xd121
movq 0xaec3(%rip), %rax      # 0x17fd0
movq (%rax), %rdi
callq 0xe940
movl $0x0, -0x4(%rbp)
jmp 0xdc01
cmpl $0x0, -0x70(%rbp)
je 0xd159
cmpq $0x0, -0x40(%rbp)
jne 0xd159
movq 0xaec3(%rip), %rax      # 0x17ff8
movq (%rax), %rdi
leaq 0x6f01(%rip), %rsi      # 0x14040
leaq 0x6eb5(%rip), %rdx      # 0x13ffb
movb $0x0, %al
callq 0x2230
movl $0x1, -0x4(%rbp)
jmp 0xdc01
movl -0x8(%rbp), %eax
subl -0xa0(%rbp), %eax
cmpl $0x3, %eax
jge 0xd1a1
movq 0xae8a(%rip), %rax      # 0x17ff8
movq (%rax), %rdi
leaq 0x6f0d(%rip), %rsi      # 0x14085
leaq 0x6e7c(%rip), %rdx      # 0x13ffb
movb $0x0, %al
callq 0x2230
movq 0xae6b(%rip), %rax      # 0x17ff8
movq (%rax), %rdi
callq 0xe940
movl $0x1, -0x4(%rbp)
jmp 0xdc01
cmpl $0x0, -0x6c(%rbp)
jl 0xd1b0
cmpl $0xff, -0x6c(%rbp)
jle 0xd1de
movq 0xae41(%rip), %rax      # 0x17ff8
movq (%rax), %rdi
movl -0x6c(%rbp), %ecx
leaq 0x6efb(%rip), %rsi      # 0x140bf
leaq 0x6e30(%rip), %rdx      # 0x13ffb
movb $0x0, %al
callq 0x2230
movl $0x1, -0x4(%rbp)
jmp 0xdc01
movl -0x6c(%rbp), %eax
movb %al, -0xb1(%rbp)
movq -0x10(%rbp), %rax
movslq -0xa0(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movl -0xa0(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movl -0xa0(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
cmpl $0x0, -0x74(%rbp)
jne 0xd3dd
movq -0x38(%rbp), %rdi
callq 0x2130
cmpq $0x4, %rax
jb 0xd271
movq -0x38(%rbp), %rax
movq %rax, -0x158(%rbp)
movq -0x38(%rbp), %rdi
callq 0x2130
movq %rax, %rcx
movq -0x158(%rbp), %rax
addq %rcx, %rax
addq $-0x4, %rax
movq %rax, -0x150(%rbp)
jmp 0xd27c
xorl %eax, %eax
movq %rax, -0x150(%rbp)
jmp 0xd27c
movq -0x150(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x38(%rbp), %rdi
callq 0x2130
cmpq $0x7, %rax
jb 0xd2c4
movq -0x38(%rbp), %rax
movq %rax, -0x168(%rbp)
movq -0x38(%rbp), %rdi
callq 0x2130
movq %rax, %rcx
movq -0x168(%rbp), %rax
addq %rcx, %rax
addq $-0x7, %rax
movq %rax, -0x160(%rbp)
jmp 0xd2cf
xorl %eax, %eax
movq %rax, -0x160(%rbp)
jmp 0xd2cf
movq -0x160(%rbp), %rax
movq %rax, -0x68(%rbp)
cmpq $0x0, -0x60(%rbp)
je 0xd302
movq -0x60(%rbp), %rdi
leaq 0x6e02(%rip), %rsi      # 0x140ee
callq 0x2b30
cmpl $0x0, %eax
jne 0xd302
movl $0x2, -0x74(%rbp)
jmp 0xd3db
cmpq $0x0, -0x60(%rbp)
je 0xd32a
movq -0x60(%rbp), %rdi
leaq 0x6ddf(%rip), %rsi      # 0x140f3
callq 0x2b30
cmpl $0x0, %eax
jne 0xd32a
movl $0x3, -0x74(%rbp)
jmp 0xd3d9
cmpq $0x0, -0x60(%rbp)
je 0xd346
movq -0x60(%rbp), %rdi
leaq 0x6dbc(%rip), %rsi      # 0x140f8
callq 0x2b30
cmpl $0x0, %eax
je 0xd362
cmpq $0x0, -0x68(%rbp)
je 0xd36b
movq -0x68(%rbp), %rdi
leaq 0x6da5(%rip), %rsi      # 0x140fd
callq 0x2b30
cmpl $0x0, %eax
jne 0xd36b
movl $0x1, -0x74(%rbp)
jmp 0xd3d7
cmpq $0x0, -0x60(%rbp)
je 0xd387
movq -0x60(%rbp), %rdi
leaq 0x6d88(%rip), %rsi      # 0x14105
callq 0x2b30
cmpl $0x0, %eax
je 0xd3a3
cmpq $0x0, -0x68(%rbp)
je 0xd3ac
movq -0x68(%rbp), %rdi
leaq 0x6d71(%rip), %rsi      # 0x1410a
callq 0x2b30
cmpl $0x0, %eax
jne 0xd3ac
movl $0x4, -0x74(%rbp)
jmp 0xd3d5
movq 0xac45(%rip), %rax      # 0x17ff8
movq (%rax), %rdi
leaq 0x6d55(%rip), %rsi      # 0x14112
leaq 0x6c37(%rip), %rdx      # 0x13ffb
movb $0x0, %al
callq 0x2230
movl $0x1, %edi
callq 0x23e0
jmp 0xd3d7
jmp 0xd3d9
jmp 0xd3db
jmp 0xd3dd
cmpl $0x3, -0x74(%rbp)
jne 0xd42d
movq -0x38(%rbp), %rdi
leaq 0x5d3c(%rip), %rsi      # 0x1312a
callq 0x2210
cmpl $0x0, %eax
je 0xd404
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3c, %eax
jne 0xd42d
movq 0xabed(%rip), %rax      # 0x17ff8
movq (%rax), %rdi
leaq 0x6d63(%rip), %rsi      # 0x14178
leaq 0x6bdf(%rip), %rdx      # 0x13ffb
movb $0x0, %al
callq 0x2230
movl $0x1, %edi
callq 0x23e0
cmpq $0x0, -0x40(%rbp)
je 0xd463
movq -0x40(%rbp), %rdi
callq 0x2130
movq %rax, %rdi
addq $0x23, %rdi
callq 0x22a0
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %rdx
leaq 0x6d51(%rip), %rsi      # 0x141ad
movb $0x0, %al
callq 0x23d0
cmpq $0x0, -0x48(%rbp)
jne 0xd47d
movq 0xab5f(%rip), %rax      # 0x17fd0
movq (%rax), %rax
movq %rax, -0x170(%rbp)
jmp 0xd494
movq -0x48(%rbp), %rdi
leaq 0x5b88(%rip), %rsi      # 0x13010
callq 0x2340
movq %rax, -0x170(%rbp)
movq -0x170(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0xd4d3
movq 0xab4b(%rip), %rax      # 0x17ff8
movq (%rax), %rdi
movq -0x40(%rbp), %rcx
leaq 0x6cf9(%rip), %rsi      # 0x141b4
leaq 0x6b39(%rip), %rdx      # 0x13ffb
movb $0x0, %al
callq 0x2230
movl $0x1, %edi
callq 0x23e0
movl $0x0, -0xa8(%rbp)
movq -0x20(%rbp), %rdi
xorl %esi, %esi
callq 0x72b0
movq %rax, -0xc0(%rbp)
movl $0x0, -0xcc(%rbp)
movq $0x0, -0xe0(%rbp)
movq $0x0, -0xd8(%rbp)
movq -0x28(%rbp), %rdi
callq 0x2130
movq %rax, -0x178(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0xd538
movq -0x40(%rbp), %rdi
callq 0x2130
movq %rax, -0x180(%rbp)
jmp 0xd543
xorl %eax, %eax
movq %rax, -0x180(%rbp)
jmp 0xd543
movq -0x178(%rbp), %rax
movq -0x180(%rbp), %rcx
cmpq %rcx, %rax
jbe 0xd568
movq -0x28(%rbp), %rdi
callq 0x2130
movq %rax, -0x188(%rbp)
jmp 0xd59a
cmpq $0x0, -0x40(%rbp)
je 0xd581
movq -0x40(%rbp), %rdi
callq 0x2130
movq %rax, -0x190(%rbp)
jmp 0xd58c
xorl %eax, %eax
movq %rax, -0x190(%rbp)
jmp 0xd58c
movq -0x190(%rbp), %rax
movq %rax, -0x188(%rbp)
movq -0x188(%rbp), %rdi
addq $0x23, %rdi
callq 0x22a0
movq %rax, -0x30(%rbp)
cmpl $0x0, -0x70(%rbp)
je 0xd688
movq -0x40(%rbp), %rdi
callq 0x2130
movq %rax, %rdi
addq $0x23, %rdi
callq 0x22a0
movq %rax, -0x50(%rbp)
movq -0x40(%rbp), %rdi
callq 0x2130
movq %rax, %rdi
addq $0x23, %rdi
callq 0x22a0
movq %rax, -0x58(%rbp)
movq -0x30(%rbp), %rdi
movq -0x40(%rbp), %rdx
leaq 0x6be4(%rip), %rsi      # 0x141dd
movb $0x0, %al
callq 0x23d0
movq -0x50(%rbp), %rdi
movq -0x40(%rbp), %rdx
leaq 0x6bde(%rip), %rsi      # 0x141ed
movb $0x0, %al
callq 0x23d0
movq -0x58(%rbp), %rdi
movq -0x40(%rbp), %rdx
leaq 0x6bd4(%rip), %rsi      # 0x141f9
movb $0x0, %al
callq 0x23d0
movq -0x28(%rbp), %rdi
movq -0xc0(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq -0x50(%rbp), %rcx
movq -0x58(%rbp), %r8
leaq -0xcc(%rbp), %r9
leaq -0xd8(%rbp), %rax
movq $0x7fffffff, (%rsp)     # imm = 0x7FFFFFFF
movq %rax, 0x8(%rsp)
callq 0xe9d0
movq %rax, -0xe0(%rbp)
movq -0xc0(%rbp), %rdi
movq -0x30(%rbp), %rsi
movl $0x1, %edx
callq 0x81b0
movq %rax, -0xc8(%rbp)
jmp 0xd6e0
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rdx
leaq 0x5aa8(%rip), %rsi      # 0x1313f
movb $0x0, %al
callq 0x23d0
movq -0xc0(%rbp), %rdi
movq -0x30(%rbp), %rsi
movl $0x1, %edx
callq 0x81b0
movq %rax, -0xc8(%rbp)
movq -0xc8(%rbp), %rdi
leaq -0xcc(%rbp), %rsi
movl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
leaq -0xd8(%rbp), %rcx
callq 0xcb30
movq %rax, -0xe0(%rbp)
cmpl $0x2, -0x74(%rbp)
jne 0xd74c
movq 0xa90b(%rip), %rax      # 0x17ff8
movq (%rax), %rdi
movq -0x38(%rbp), %rcx
leaq 0x6b0e(%rip), %rsi      # 0x14209
leaq 0x68f9(%rip), %rdx      # 0x13ffb
movb $0x0, %al
callq 0x2230
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x20(%rbp), %rdx
movb -0xb1(%rbp), %cl
movl -0xcc(%rbp), %r8d
cmpl $0x0, -0x70(%rbp)
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %r9d
movq -0x18(%rbp), %rax
movzbl %cl, %ecx
movq %rax, (%rsp)
callq 0xee30
movl %eax, -0xa8(%rbp)
jmp 0xd88e
cmpl $0x1, -0x74(%rbp)
jne 0xd7b8
movq 0xa89f(%rip), %rax      # 0x17ff8
movq (%rax), %rdi
movq -0x38(%rbp), %rcx
leaq 0x6ad2(%rip), %rsi      # 0x14239
leaq 0x688d(%rip), %rdx      # 0x13ffb
movb $0x0, %al
callq 0x2230
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x20(%rbp), %rdx
movb -0xb1(%rbp), %cl
movl -0xcc(%rbp), %r8d
cmpl $0x0, -0x70(%rbp)
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %r9d
movq -0x18(%rbp), %rax
movzbl %cl, %ecx
movq %rax, (%rsp)
callq 0xfb40
movl %eax, -0xa8(%rbp)
jmp 0xd88c
cmpl $0x4, -0x74(%rbp)
jne 0xd821
movq 0xa833(%rip), %rax      # 0x17ff8
movq (%rax), %rdi
movq -0x38(%rbp), %rcx
leaq 0x6a96(%rip), %rsi      # 0x14269
leaq 0x6821(%rip), %rdx      # 0x13ffb
movb $0x0, %al
callq 0x2230
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x20(%rbp), %rdx
movb -0xb1(%rbp), %cl
movl -0xcc(%rbp), %r8d
cmpl $0x0, -0x70(%rbp)
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %r9d
movq -0x18(%rbp), %rax
movsbl %cl, %ecx
movq %rax, (%rsp)
callq 0x10420
movl %eax, -0xa8(%rbp)
jmp 0xd88a
cmpl $0x3, -0x74(%rbp)
jne 0xd888
movq 0xa7ca(%rip), %rax      # 0x17ff8
movq (%rax), %rdi
movq -0x38(%rbp), %rcx
leaq 0x6a5d(%rip), %rsi      # 0x14299
leaq 0x67b8(%rip), %rdx      # 0x13ffb
movb $0x0, %al
callq 0x2230
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x20(%rbp), %rdx
movb -0xb1(%rbp), %cl
movl -0xcc(%rbp), %r8d
cmpl $0x0, -0x70(%rbp)
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %r9d
movq -0x18(%rbp), %rax
movzbl %cl, %ecx
movq %rax, (%rsp)
callq 0x10a60
movl %eax, -0xa8(%rbp)
jmp 0xd88a
jmp 0xd88c
jmp 0xd88e
cmpl $0x0, -0x70(%rbp)
je 0xd95d
movq 0xa759(%rip), %rax      # 0x17ff8
movq (%rax), %rdi
movq -0xd8(%rbp), %rcx
leaq 0x6a19(%rip), %rsi      # 0x142c9
leaq 0x6744(%rip), %rdx      # 0x13ffb
movb $0x0, %al
callq 0x2230
movq 0xa733(%rip), %rax      # 0x17ff8
movq (%rax), %rdi
movl -0xcc(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, %ecx
leaq 0x6a05(%rip), %rsi      # 0x142e3
leaq 0x6716(%rip), %rdx      # 0x13ffb
movb $0x0, %al
callq 0x2230
movq 0xa705(%rip), %rax      # 0x17ff8
movq (%rax), %rdi
leaq 0x6a00(%rip), %rsi      # 0x142fd
leaq 0x66f7(%rip), %rdx      # 0x13ffb
movb $0x0, %al
callq 0x2230
movq 0xa6e6(%rip), %rax      # 0x17ff8
movq (%rax), %rdi
movq -0xe0(%rbp), %rdx
leaq 0x6a0b(%rip), %rsi      # 0x1432e
movb $0x0, %al
callq 0x2230
movq 0xa6c7(%rip), %rax      # 0x17ff8
movq (%rax), %rdi
movq -0x48(%rbp), %rcx
movq -0x40(%rbp), %r8
movq -0xe0(%rbp), %r9
leaq 0x69fe(%rip), %rsi      # 0x14348
leaq 0x66aa(%rip), %rdx      # 0x13ffb
movb $0x0, %al
callq 0x2230
jmp 0xda71
cmpl $0x0, -0xcc(%rbp)
je 0xd9bf
movq 0xa68b(%rip), %rax      # 0x17ff8
movq (%rax), %rdi
movq -0xd8(%rbp), %r8
leaq 0x6a2a(%rip), %rsi      # 0x143a8
leaq 0x6676(%rip), %rdx      # 0x13ffb
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movb $0x0, %al
callq 0x2230
movq 0xa660(%rip), %rax      # 0x17ff8
movq (%rax), %rdi
movl -0xcc(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, %ecx
leaq 0x6a2a(%rip), %rsi      # 0x143db
leaq 0x6643(%rip), %rdx      # 0x13ffb
movb $0x0, %al
callq 0x2230
movq 0xa632(%rip), %rax      # 0x17ff8
movq (%rax), %rdi
leaq 0x692d(%rip), %rsi      # 0x142fd
leaq 0x6624(%rip), %rdx      # 0x13ffb
movb $0x0, %al
callq 0x2230
movl $0x0, -0xe4(%rbp)
movl -0xe4(%rbp), %eax
movq -0xc8(%rbp), %rcx
cmpl (%rcx), %eax
jae 0xda6f
movq -0xc8(%rbp), %rax
movq 0x8(%rax), %rsi
movl -0xe4(%rbp), %eax
imulq $0x58, %rax, %rax
addq %rax, %rsi
leaq -0x140(%rbp), %rdi
movl $0x58, %edx
callq 0x2250
movq 0xa5cf(%rip), %rax      # 0x17ff8
movq (%rax), %rdi
movq -0x140(%rbp), %rdx
movq -0x138(%rbp), %rax
addq -0x130(%rbp), %rax
movl -0xcc(%rbp), %ecx
shrq %cl, %rax
movq %rax, %rcx
leaq 0x69a7(%rip), %rsi      # 0x143fb
movb $0x0, %al
callq 0x2230
movl -0xe4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xe4(%rbp)
jmp 0xd9e8
jmp 0xda71
movq -0xc8(%rbp), %rdi
callq 0x63d0
movq -0xc0(%rbp), %rdi
callq 0x62a0
cmpq $0x0, -0x40(%rbp)
je 0xda99
movq -0x18(%rbp), %rdi
callq 0x2120
cmpq $0x0, -0x48(%rbp)
je 0xdaa9
movq -0x48(%rbp), %rdi
callq 0x2050
cmpq $0x0, -0x30(%rbp)
je 0xdab9
movq -0x30(%rbp), %rdi
callq 0x2050
cmpq $0x0, -0x50(%rbp)
je 0xdac9
movq -0x50(%rbp), %rdi
callq 0x2050
cmpq $0x0, -0x58(%rbp)
je 0xdad9
movq -0x58(%rbp), %rdi
callq 0x2050
movq 0xa518(%rip), %rax      # 0x17ff8
movq (%rax), %rdi
leaq 0x6925(%rip), %rsi      # 0x1440f
leaq 0x650a(%rip), %rdx      # 0x13ffb
leaq 0x63d7(%rip), %rcx      # 0x13ecf
movb $0x0, %al
callq 0x2230
movq 0xa4f2(%rip), %rax      # 0x17ff8
movq (%rax), %rdi
leaq 0x6914(%rip), %rsi      # 0x14424
leaq 0x64e4(%rip), %rdx      # 0x13ffb
movb $0x0, %al
callq 0x2230
movl $0x0, -0x144(%rbp)
movl -0x144(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0xdb6b
movq 0xa4be(%rip), %rax      # 0x17ff8
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movslq -0x144(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
leaq 0x55eb(%rip), %rsi      # 0x1313e
movb $0x0, %al
callq 0x2230
movl -0x144(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x144(%rbp)
jmp 0xdb28
movq 0xa486(%rip), %rax      # 0x17ff8
movq (%rax), %rax
movq %rax, -0x1a8(%rbp)
callq 0x2670
subsd 0xa89f(%rip), %xmm0     # 0x18428
movsd %xmm0, -0x1a0(%rbp)
callq 0x25a0
movsd %xmm0, -0x198(%rbp)
callq 0x2640
movq -0x1a8(%rbp), %rdi
movsd -0x1a0(%rbp), %xmm0
movsd -0x198(%rbp), %xmm1
cvtsi2sd %rax, %xmm2
movsd 0x6231(%rip), %xmm3     # 0x13df8
divsd %xmm3, %xmm2
movsd 0x6225(%rip), %xmm3     # 0x13df8
divsd %xmm3, %xmm2
movsd 0x6219(%rip), %xmm3     # 0x13df8
divsd %xmm3, %xmm2
leaq 0x684e(%rip), %rsi      # 0x14438
leaq 0x640a(%rip), %rdx      # 0x13ffb
movb $0x3, %al
callq 0x2230
movl -0xa8(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x1c0, %rsp            # imm = 0x1C0
popq %rbp
retq
nopl (%rax)