// File: /workspace/github_c_makefile_star2_O0/c-zhou[P]yahs/link.c
// Function: dump_links_from_bam_file
void dump_links_from_bam_file(const char *f, const char *fai, uint32_t ml, uint8_t mq, double q_drop, const char *out)
{
    bamFile fp;
    FILE *fo;
    bam_header_t *h;
    bam1_t *b;
    char *cname0, *cname1, *rname0, *rname1;
    int32_t s0, s1, e0, e1, first;
    uint32_t i0, i1, p0, p1;
    uint8_t q, q0, q1;
    int8_t buff;
    uint64_t rec_c, pair_c, inter_c, intra_c, sd_l, n, m, max_m;
    enum bam_sort_order so;
    cov_t *cov;
    
    khash_t(str) *hmseq; // for absent sequences
    khint_t k;
    int absent;
    hmseq = kh_init(str);

    sdict_t *dict = make_sdict_from_index(fai, ml);
    
    fp = bam_open(f, "r");
    if (fp == NULL) {
        fprintf(stderr, "[E::%s] cannot open file %s for reading\n", __func__, f);
        exit(EXIT_FAILURE);
    }
    
    fo = fopen(out, "w");
    if (fo == NULL) {
        fprintf(stderr, "[E::%s] cannot open file %s for writing\n", __func__, out);
        exit(EXIT_FAILURE);
    }
    write_bin_header(fo);
    sd_l = write_sequence_dictionary(fo, dict);

    h = bam_header_read(fp);
    b = bam_init1();
    so = bam_hrecs_sort_order(h);
    cname0 = cname1 = rname0 = rname1 = 0;
    s0 = s1 = e0 = e1 = 0;
    i0 = i1 = p0 = p1 = 0;
    rec_c = pair_c = inter_c = intra_c = 0;
    buff = 0;
    cov = cov_init(dict->n);
    n = 0;
    max_m = 0x7FFFFFFULL; // 128MB - ~1GB mem for covs

    fwrite(&pair_c, sizeof(uint64_t), 1, fo);

    if (so == ORDER_NAME) {
        // sorted by read names
        while (bam_read1(fp, b) >= 0 ) {

            if (buff == 0) {
                q0 = 255;
                rname0 = parse_bam_rec(b, h, &s0, &e0, &q0, &cname0);
                if (!rname0)
                    continue;
                ++buff;
            } else if (buff == 1) {
                q1 = 255;
                rname1 = parse_bam_rec(b, h, &s1, &e1, &q1, &cname1);
                if (!rname1)
                    continue;
                if (strcmp(rname0, rname1) == 0) {
                    buff = 0;

                    i0 = sd_get(dict, cname0);
                    i1 = sd_get(dict, cname1);
                    q = MIN(q0, q1);

                    if (i0 == UINT32_MAX) {
                        k = kh_put(str, hmseq, cname0, &absent);
                        if (absent) {
                            kh_key(hmseq, k) = strdup(cname0);
                            fprintf(stderr, "[W::%s] sequence \"%s\" not found \n", __func__, cname0);
                        }
                    } else if (i1 == UINT32_MAX) {
                        k = kh_put(str, hmseq, cname1, &absent);
                        if (absent) {
                            kh_key(hmseq, k) = strdup(cname1);
                            fprintf(stderr, "[W::%s] sequence \"%s\" not found \n", __func__, cname1);
                        }
                    } else if (q >= mq) {
                        // update read coverage
                        // fix bad alignments
                        s0 = MIN_MAX(s0, 0, dict->s[i0].len - 1);
                        e0 = MIN_MAX(e0, 0, dict->s[i0].len - 1);
                        s1 = MIN_MAX(s1, 0, dict->s[i1].len - 1);
                        e1 = MIN_MAX(e1, 0, dict->s[i1].len - 1);
                        kv_push(uint64_t, cov->p[i0], (uint64_t) s0 << 32 | (uint32_t) 1);
                        kv_push(uint64_t, cov->p[i0], (uint64_t) e0 << 32 | (uint32_t) -1);
                        kv_push(uint64_t, cov->p[i1], (uint64_t) s1 << 32 | (uint32_t) 1);
                        kv_push(uint64_t, cov->p[i1], (uint64_t) e1 << 32 | (uint32_t) -1);
                        n += 4;
                        if (n > max_m) {
                            m = pos_compression(cov); // m is the position size after compression
                            fprintf(stderr, "[I::%s] position compression n = %lu, m = %lu, max_m = %lu\n", __func__, n, m, max_m);
                            if (m > n>>1) {
                                max_m <<= 1; // increase m limit if compression ratio smaller than 0.5
                                fprintf(stderr, "[I::%s] position memory buffer expanded max_m = %lu\n", __func__, max_m);
                            }
                            n = m;
                        }

                        // from zero-based to one-based
                        p0 = s0 / 2 + e0 / 2 + (s0 & 1 && e0 & 1);
                        p1 = s1 / 2 + e1 / 2 + (s1 & 1 && e1 & 1);
                        if (i0 > i1) {
                            SWAP(uint32_t, i0, i1);
                            SWAP(uint32_t, p0, p1);
                        }
                        fwrite(&i0, sizeof(uint32_t), 1, fo);
                        fwrite(&p0, sizeof(uint32_t), 1, fo);
                        fwrite(&i1, sizeof(uint32_t), 1, fo);
                        fwrite(&p1, sizeof(uint32_t), 1, fo);
                        fwrite(&q, sizeof(uint8_t), 1, fo);

                        if (i0 == i1)
                            ++intra_c;
                        else
                            ++inter_c;

                        ++pair_c;
                    }
                    
                    free(rname0);
                    free(rname1);
                    rname0 = 0;
                    rname1 = 0;
                } else {
                    buff = 1;

                    cname0 = cname1;
                    s0 = s1;
                    e0 = e1;
                    q0 = q1;
                    free(rname0);
                    rname0 = rname1;
                    rname1 = 0;
                }
            }

            if (++rec_c % 1000000 == 0)
                fprintf(stderr, "[I::%s] %lu million records processed, %lu read pairs \n", __func__, rec_c / 1000000, pair_c);
        }
    } else {
        // sorted by coordinates or others
        if (mq > 0)
            fprintf(stderr, "[W::%s] BAM file is not sorted by read name. Filtering by mapping quality %hhu suppressed \n", __func__, mq);
        q = 255;

        while (bam_read1(fp, b) >= 0) {

            first = parse_bam_rec1(b, h, &cname0, &s0, &e0, &cname1, &s1);

            if (first < 0) continue; // read not paired or not primary

            i0 = sd_get(dict, cname0);
            if (i0 != UINT32_MAX) {
                // update read coverage
                // fix bad alignments
                s0 = MIN_MAX(s0, 0, dict->s[i0].len - 1);
                e0 = MIN_MAX(e0, 0, dict->s[i0].len - 1);
                kv_push(uint64_t, cov->p[i0], (uint64_t) s0 << 32 | (uint32_t) 1);
                kv_push(uint64_t, cov->p[i0], (uint64_t) e0 << 32 | (uint32_t) -1);
                n += 2;
                if (n > max_m) {
                    m = pos_compression(cov); // m is the position size after compression
                    fprintf(stderr, "[I::%s] position compression n = %lu, m = %lu, max_m = %lu\n", __func__, n, m, max_m);
                    if (m > n>>1) {
                        max_m <<= 1; // increase m limit if compression ratio smaller than 0.5
                        fprintf(stderr, "[I::%s] position memory buffer expanded max_m = %lu\n", __func__, max_m);
                    }
                    n = m;
                }
            }

            if (first == 0) { // second read only for each read pair
                // i0 = sd_get(dict, cname0);
                i1 = sd_get(dict, cname1);

                if (i0 == UINT32_MAX) {
                    k = kh_put(str, hmseq, cname0, &absent);
                    if (absent) {
                        kh_key(hmseq, k) = strdup(cname0);
                        fprintf(stderr, "[W::%s] sequence \"%s\" not found \n", __func__, cname0);
                    }
                } else if (i1 == UINT32_MAX) {
                    k = kh_put(str, hmseq, cname1, &absent);
                    if (absent) {
                        kh_key(hmseq, k) = strdup(cname1);
                        fprintf(stderr, "[W::%s] sequence \"%s\" not found \n", __func__, cname1);
                    }
                } else {
                    // fix bad alignments
                    s1 = MIN_MAX(s1, 0, dict->s[i1].len - 1);
                    if (i0 > i1) {
                        SWAP(uint32_t, i0, i1);
                        SWAP(uint32_t, s0, s1);
                    }
                    fwrite(&i0, sizeof(uint32_t), 1, fo);
                    fwrite(&s0, sizeof(uint32_t), 1, fo);
                    fwrite(&i1, sizeof(uint32_t), 1, fo);
                    fwrite(&s1, sizeof(uint32_t), 1, fo);
                    fwrite(&q, sizeof(uint8_t), 1, fo);

                    if (i0 == i1)
                        ++intra_c;
                    else
                        ++inter_c;

                    ++pair_c;
                }
            }

            if (++rec_c % 1000000 == 0)
                fprintf(stderr, "[I::%s] %lu million records processed, %lu read pairs \n", __func__, rec_c / 1000000, pair_c);
        }
    }

    m = pos_compression(cov);
    fprintf(stderr, "[I::%s] position compression n = %lu, m = %lu, max_m = %lu\n", __func__, n, m, max_m);

    for (k = 0; k < kh_end(hmseq); ++k)
        if (kh_exist(hmseq, k))
            free((char *) kh_key(hmseq, k));
    kh_destroy(str, hmseq);

    if (rname0)
        free(rname0);
    if (rname1)
        free(rname1);
    bam_destroy1(b);
    bam_header_destroy(h);
    bam_close(fp);
    // write pair number
    fseek(fo, sizeof(uint64_t) + sd_l, SEEK_SET);
    fwrite(&pair_c, sizeof(uint64_t), 1, fo);
    fseek(fo, pair_c * 17, SEEK_CUR);

    fprintf(stderr, "[I::%s] dumped %lu read pairs from %lu records: %lu intra links + %lu inter links \n", __func__, pair_c, rec_c, intra_c, inter_c);

    // cov_t *cov = bam_cstats(f, dict, 0);
    cov_norm_t *cov_norm = calc_cov_norms(cov, dict, q_drop);
    fwrite(&cov_norm->n, sizeof(uint64_t), 1, fo);
    fwrite(cov_norm->norm[0], sizeof(double), cov_norm->n, fo);
    cov_destroy(cov);
    cov_norm_destroy(cov_norm);

    sd_destroy(dict);
    fclose(fo);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1c0, %rsp            # imm = 0x1C0
movb %cl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movb %al, -0x15(%rbp)
movsd %xmm0, -0x20(%rbp)
movq %r8, -0x28(%rbp)
callq 0x13630
movq %rax, -0xe8(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x17660
movq %rax, -0xf8(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x20683(%rip), %rsi     # 0x32311
callq 0x41e0
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x11ccb
movq 0x27353(%rip), %rax     # 0x38ff8
movq (%rax), %rdi
movq -0x8(%rbp), %rcx
leaq 0x1f51d(%rip), %rsi     # 0x311d0
leaq 0x1fc73(%rip), %rdx     # 0x3192d
movb $0x0, %al
callq 0x22c0
movl $0x1, %edi
callq 0x24c0
movq -0x28(%rbp), %rdi
leaq 0x1f33a(%rip), %rsi     # 0x31010
callq 0x23f0
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x11d13
movq 0x2730b(%rip), %rax     # 0x38ff8
movq (%rax), %rdi
movq -0x28(%rbp), %rcx
leaq 0x1fc4b(%rip), %rsi     # 0x31946
leaq 0x1fc2b(%rip), %rdx     # 0x3192d
movb $0x0, %al
callq 0x22c0
movl $0x1, %edi
callq 0x24c0
movq -0x38(%rbp), %rdi
callq 0x2b70
movq -0x38(%rbp), %rdi
movq -0xf8(%rbp), %rsi
callq 0x1b950
movq %rax, -0xb8(%rbp)
movq -0x30(%rbp), %rdi
callq 0x3630
movq %rax, -0x40(%rbp)
movl $0x1, %edi
movl $0x38, %esi
callq 0x2290
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rdi
callq 0x3ec0
movl %eax, -0xd4(%rbp)
movq $0x0, -0x68(%rbp)
movq $0x0, -0x60(%rbp)
movq $0x0, -0x58(%rbp)
movq $0x0, -0x50(%rbp)
movl $0x0, -0x78(%rbp)
movl $0x0, -0x74(%rbp)
movl $0x0, -0x70(%rbp)
movl $0x0, -0x6c(%rbp)
movl $0x0, -0x8c(%rbp)
movl $0x0, -0x88(%rbp)
movl $0x0, -0x84(%rbp)
movl $0x0, -0x80(%rbp)
movq $0x0, -0xb0(%rbp)
movq $0x0, -0xa8(%rbp)
movq $0x0, -0xa0(%rbp)
movq $0x0, -0x98(%rbp)
movb $0x0, -0x90(%rbp)
movq -0xf8(%rbp), %rax
movl (%rax), %edi
callq 0x1cee0
movq %rax, -0xe0(%rbp)
movq $0x0, -0xc0(%rbp)
movq $0x7ffffff, -0xd0(%rbp) # imm = 0x7FFFFFF
movq -0x38(%rbp), %rcx
leaq -0xa0(%rbp), %rdi
movl $0x8, %esi
movl $0x1, %edx
callq 0x24e0
cmpl $0x1, -0xd4(%rbp)
jne 0x12bc3
jmp 0x11e4a
movq -0x30(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x3970
cmpl $0x0, %eax
jl 0x12bbe
movsbl -0x90(%rbp), %eax
cmpl $0x0, %eax
jne 0x11eb3
movb $-0x1, -0x8e(%rbp)
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %rsi
leaq -0x6c(%rbp), %rdx
leaq -0x74(%rbp), %rcx
leaq -0x8e(%rbp), %r8
leaq -0x50(%rbp), %r9
callq 0x13650
movq %rax, -0x60(%rbp)
cmpq $0x0, -0x60(%rbp)
jne 0x11ea0
jmp 0x11e4a
movb -0x90(%rbp), %al
addb $0x1, %al
movb %al, -0x90(%rbp)
jmp 0x12b5d
movsbl -0x90(%rbp), %eax
cmpl $0x1, %eax
jne 0x12b5b
movb $-0x1, -0x8f(%rbp)
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %rsi
leaq -0x70(%rbp), %rdx
leaq -0x78(%rbp), %rcx
leaq -0x8f(%rbp), %r8
leaq -0x58(%rbp), %r9
callq 0x13650
movq %rax, -0x68(%rbp)
cmpq $0x0, -0x68(%rbp)
jne 0x11efa
jmp 0x11e4a
movq -0x60(%rbp), %rdi
movq -0x68(%rbp), %rsi
callq 0x22a0
cmpl $0x0, %eax
jne 0x12b19
movb $0x0, -0x90(%rbp)
movq -0xf8(%rbp), %rdi
movq -0x50(%rbp), %rsi
callq 0x16e10
movl %eax, -0x80(%rbp)
movq -0xf8(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0x16e10
movl %eax, -0x84(%rbp)
movzbl -0x8e(%rbp), %eax
movzbl -0x8f(%rbp), %ecx
cmpl %ecx, %eax
jge 0x11f61
movzbl -0x8e(%rbp), %eax
movl %eax, -0x114(%rbp)
jmp 0x11f6e
movzbl -0x8f(%rbp), %eax
movl %eax, -0x114(%rbp)
movl -0x114(%rbp), %eax
movb %al, -0x8d(%rbp)
cmpl $-0x1, -0x80(%rbp)
jne 0x11fef
movq -0xe8(%rbp), %rdi
movq -0x50(%rbp), %rsi
leaq -0xf0(%rbp), %rdx
callq 0x13720
movl %eax, -0xec(%rbp)
cmpl $0x0, -0xf0(%rbp)
je 0x11fea
movq -0x50(%rbp), %rdi
callq 0x2520
movq %rax, %rdx
movq -0xe8(%rbp), %rax
movq 0x18(%rax), %rax
movl -0xec(%rbp), %ecx
movq %rdx, (%rax,%rcx,8)
movq 0x2702a(%rip), %rax     # 0x38ff8
movq (%rax), %rdi
movq -0x50(%rbp), %rcx
leaq 0x1f993(%rip), %rsi     # 0x3196f
leaq 0x1f94a(%rip), %rdx     # 0x3192d
movb $0x0, %al
callq 0x22c0
jmp 0x12af5
cmpl $-0x1, -0x84(%rbp)
jne 0x12067
movq -0xe8(%rbp), %rdi
movq -0x58(%rbp), %rsi
leaq -0xf0(%rbp), %rdx
callq 0x13720
movl %eax, -0xec(%rbp)
cmpl $0x0, -0xf0(%rbp)
je 0x12062
movq -0x58(%rbp), %rdi
callq 0x2520
movq %rax, %rdx
movq -0xe8(%rbp), %rax
movq 0x18(%rax), %rax
movl -0xec(%rbp), %ecx
movq %rdx, (%rax,%rcx,8)
movq 0x26fb2(%rip), %rax     # 0x38ff8
movq (%rax), %rdi
movq -0x58(%rbp), %rcx
leaq 0x1f91b(%rip), %rsi     # 0x3196f
leaq 0x1f8d2(%rip), %rdx     # 0x3192d
movb $0x0, %al
callq 0x22c0
jmp 0x12af3
movzbl -0x8d(%rbp), %eax
movzbl -0x15(%rbp), %ecx
cmpl %ecx, %eax
jl 0x12af1
cmpl $0x0, -0x6c(%rbp)
jle 0x1208b
movl -0x6c(%rbp), %eax
movl %eax, -0x118(%rbp)
jmp 0x12095
xorl %eax, %eax
movl %eax, -0x118(%rbp)
jmp 0x12095
movl -0x118(%rbp), %eax
movq -0xf8(%rbp), %rcx
movq 0x8(%rcx), %rcx
movl -0x80(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movl 0x10(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jae 0x120e3
cmpl $0x0, -0x6c(%rbp)
jle 0x120cb
movl -0x6c(%rbp), %eax
movl %eax, -0x11c(%rbp)
jmp 0x120d5
xorl %eax, %eax
movl %eax, -0x11c(%rbp)
jmp 0x120d5
movl -0x11c(%rbp), %eax
movl %eax, -0x120(%rbp)
jmp 0x12104
movq -0xf8(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x80(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
subl $0x1, %eax
movl %eax, -0x120(%rbp)
movl -0x120(%rbp), %eax
movl %eax, -0x6c(%rbp)
cmpl $0x0, -0x74(%rbp)
jle 0x1211e
movl -0x74(%rbp), %eax
movl %eax, -0x124(%rbp)
jmp 0x12128
xorl %eax, %eax
movl %eax, -0x124(%rbp)
jmp 0x12128
movl -0x124(%rbp), %eax
movq -0xf8(%rbp), %rcx
movq 0x8(%rcx), %rcx
movl -0x80(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movl 0x10(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jae 0x12176
cmpl $0x0, -0x74(%rbp)
jle 0x1215e
movl -0x74(%rbp), %eax
movl %eax, -0x128(%rbp)
jmp 0x12168
xorl %eax, %eax
movl %eax, -0x128(%rbp)
jmp 0x12168
movl -0x128(%rbp), %eax
movl %eax, -0x12c(%rbp)
jmp 0x12197
movq -0xf8(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x80(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
subl $0x1, %eax
movl %eax, -0x12c(%rbp)
movl -0x12c(%rbp), %eax
movl %eax, -0x74(%rbp)
cmpl $0x0, -0x70(%rbp)
jle 0x121b1
movl -0x70(%rbp), %eax
movl %eax, -0x130(%rbp)
jmp 0x121bb
xorl %eax, %eax
movl %eax, -0x130(%rbp)
jmp 0x121bb
movl -0x130(%rbp), %eax
movq -0xf8(%rbp), %rcx
movq 0x8(%rcx), %rcx
movl -0x84(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movl 0x10(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jae 0x1220c
cmpl $0x0, -0x70(%rbp)
jle 0x121f4
movl -0x70(%rbp), %eax
movl %eax, -0x134(%rbp)
jmp 0x121fe
xorl %eax, %eax
movl %eax, -0x134(%rbp)
jmp 0x121fe
movl -0x134(%rbp), %eax
movl %eax, -0x138(%rbp)
jmp 0x12230
movq -0xf8(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x84(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
subl $0x1, %eax
movl %eax, -0x138(%rbp)
movl -0x138(%rbp), %eax
movl %eax, -0x70(%rbp)
cmpl $0x0, -0x78(%rbp)
jle 0x1224a
movl -0x78(%rbp), %eax
movl %eax, -0x13c(%rbp)
jmp 0x12254
xorl %eax, %eax
movl %eax, -0x13c(%rbp)
jmp 0x12254
movl -0x13c(%rbp), %eax
movq -0xf8(%rbp), %rcx
movq 0x8(%rcx), %rcx
movl -0x84(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movl 0x10(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jae 0x122a5
cmpl $0x0, -0x78(%rbp)
jle 0x1228d
movl -0x78(%rbp), %eax
movl %eax, -0x140(%rbp)
jmp 0x12297
xorl %eax, %eax
movl %eax, -0x140(%rbp)
jmp 0x12297
movl -0x140(%rbp), %eax
movl %eax, -0x144(%rbp)
jmp 0x122c9
movq -0xf8(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x84(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
subl $0x1, %eax
movl %eax, -0x144(%rbp)
movl -0x144(%rbp), %eax
movl %eax, -0x78(%rbp)
movq -0xe0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x80(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq -0xe0(%rbp), %rcx
movq 0x8(%rcx), %rcx
movl -0x80(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
cmpq 0x8(%rcx), %rax
jne 0x123cf
movq -0xe0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x80(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x8(%rax)
je 0x1234a
movq -0xe0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x80(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
shlq %rax
movq %rax, -0x150(%rbp)
jmp 0x12358
movl $0x2, %eax
movq %rax, -0x150(%rbp)
jmp 0x12358
movq -0x150(%rbp), %rcx
movq -0xe0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x80(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movq -0xe0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x80(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rdi
movq -0xe0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x80(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rsi
shlq $0x3, %rsi
callq 0x23a0
movq %rax, %rcx
movq -0xe0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x80(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x10(%rax)
movslq -0x6c(%rbp), %rdx
shlq $0x20, %rdx
orq $0x1, %rdx
movq -0xe0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x80(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movq -0xe0(%rbp), %rcx
movq 0x8(%rcx), %rsi
movl -0x80(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rsi
movq (%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, (%rsi)
movq %rdx, (%rax,%rcx,8)
jmp 0x1241c
movq -0xe0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x80(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq -0xe0(%rbp), %rcx
movq 0x8(%rcx), %rcx
movl -0x80(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
cmpq 0x8(%rcx), %rax
jne 0x12519
movq -0xe0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x80(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x8(%rax)
je 0x12494
movq -0xe0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x80(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
shlq %rax
movq %rax, -0x158(%rbp)
jmp 0x124a2
movl $0x2, %eax
movq %rax, -0x158(%rbp)
jmp 0x124a2
movq -0x158(%rbp), %rcx
movq -0xe0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x80(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movq -0xe0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x80(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rdi
movq -0xe0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x80(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rsi
shlq $0x3, %rsi
callq 0x23a0
movq %rax, %rcx
movq -0xe0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x80(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x10(%rax)
movslq -0x74(%rbp), %rdx
shlq $0x20, %rdx
movabsq $0xffffffff, %rax       # imm = 0xFFFFFFFF
orq %rax, %rdx
movq -0xe0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x80(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movq -0xe0(%rbp), %rcx
movq 0x8(%rcx), %rsi
movl -0x80(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rsi
movq (%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, (%rsi)
movq %rdx, (%rax,%rcx,8)
jmp 0x1256f
movq -0xe0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x84(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq -0xe0(%rbp), %rcx
movq 0x8(%rcx), %rcx
movl -0x84(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
cmpq 0x8(%rcx), %rax
jne 0x12684
movq -0xe0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x84(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x8(%rax)
je 0x125f3
movq -0xe0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x84(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
shlq %rax
movq %rax, -0x160(%rbp)
jmp 0x12601
movl $0x2, %eax
movq %rax, -0x160(%rbp)
jmp 0x12601
movq -0x160(%rbp), %rcx
movq -0xe0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x84(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movq -0xe0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x84(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rdi
movq -0xe0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x84(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rsi
shlq $0x3, %rsi
callq 0x23a0
movq %rax, %rcx
movq -0xe0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x84(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x10(%rax)
movslq -0x70(%rbp), %rdx
shlq $0x20, %rdx
orq $0x1, %rdx
movq -0xe0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x84(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movq -0xe0(%rbp), %rcx
movq 0x8(%rcx), %rsi
movl -0x84(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rsi
movq (%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, (%rsi)
movq %rdx, (%rax,%rcx,8)
jmp 0x126d7
movq -0xe0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x84(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq -0xe0(%rbp), %rcx
movq 0x8(%rcx), %rcx
movl -0x84(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
cmpq 0x8(%rcx), %rax
jne 0x127ec
movq -0xe0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x84(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x8(%rax)
je 0x1275b
movq -0xe0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x84(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
shlq %rax
movq %rax, -0x168(%rbp)
jmp 0x12769
movl $0x2, %eax
movq %rax, -0x168(%rbp)
jmp 0x12769
movq -0x168(%rbp), %rcx
movq -0xe0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x84(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movq -0xe0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x84(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rdi
movq -0xe0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x84(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rsi
shlq $0x3, %rsi
callq 0x23a0
movq %rax, %rcx
movq -0xe0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x84(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x10(%rax)
movslq -0x78(%rbp), %rdx
shlq $0x20, %rdx
movabsq $0xffffffff, %rax       # imm = 0xFFFFFFFF
orq %rax, %rdx
movq -0xe0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x84(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movq -0xe0(%rbp), %rcx
movq 0x8(%rcx), %rsi
movl -0x84(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rsi
movq (%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, (%rsi)
movq %rdx, (%rax,%rcx,8)
movq -0xc0(%rbp), %rax
addq $0x4, %rax
movq %rax, -0xc0(%rbp)
movq -0xc0(%rbp), %rax
cmpq -0xd0(%rbp), %rax
jbe 0x1290e
movq -0xe0(%rbp), %rdi
callq 0x1d050
movq %rax, -0xc8(%rbp)
movq 0x26772(%rip), %rax     # 0x38ff8
movq (%rax), %rdi
movq -0xc0(%rbp), %rcx
movq -0xc8(%rbp), %r8
movq -0xd0(%rbp), %r9
leaq 0x1f0ec(%rip), %rsi     # 0x31991
leaq 0x1f081(%rip), %rdx     # 0x3192d
movb $0x0, %al
callq 0x22c0
movq -0xc8(%rbp), %rax
movq -0xc0(%rbp), %rcx
shrq %rcx
cmpq %rcx, %rax
jbe 0x12900
movq -0xd0(%rbp), %rax
shlq %rax
movq %rax, -0xd0(%rbp)
movq 0x26717(%rip), %rax     # 0x38ff8
movq (%rax), %rdi
movq -0xd0(%rbp), %rcx
leaq 0x1f0db(%rip), %rsi     # 0x319cd
leaq 0x1f034(%rip), %rdx     # 0x3192d
movb $0x0, %al
callq 0x22c0
movq -0xc8(%rbp), %rax
movq %rax, -0xc0(%rbp)
movl -0x6c(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, -0x174(%rbp)
movl -0x74(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x174(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x170(%rbp)
movl -0x6c(%rbp), %ecx
andl $0x1, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x169(%rbp)
je 0x1295f
movl -0x74(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x169(%rbp)
movl -0x170(%rbp), %eax
movb -0x169(%rbp), %cl
andb $0x1, %cl
movzbl %cl, %ecx
addl %ecx, %eax
movl %eax, -0x88(%rbp)
movl -0x70(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, -0x180(%rbp)
movl -0x78(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x180(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x17c(%rbp)
movl -0x70(%rbp), %ecx
andl $0x1, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x175(%rbp)
je 0x129ca
movl -0x78(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x175(%rbp)
movl -0x17c(%rbp), %eax
movb -0x175(%rbp), %cl
andb $0x1, %cl
movzbl %cl, %ecx
addl %ecx, %eax
movl %eax, -0x8c(%rbp)
movl -0x80(%rbp), %eax
cmpl -0x84(%rbp), %eax
jbe 0x12a31
movl -0x80(%rbp), %eax
movl %eax, -0xfc(%rbp)
movl -0x84(%rbp), %eax
movl %eax, -0x80(%rbp)
movl -0xfc(%rbp), %eax
movl %eax, -0x84(%rbp)
movl -0x88(%rbp), %eax
movl %eax, -0x100(%rbp)
movl -0x8c(%rbp), %eax
movl %eax, -0x88(%rbp)
movl -0x100(%rbp), %eax
movl %eax, -0x8c(%rbp)
movq -0x38(%rbp), %rcx
leaq -0x80(%rbp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x24e0
movq -0x38(%rbp), %rcx
leaq -0x88(%rbp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x24e0
movq -0x38(%rbp), %rcx
leaq -0x84(%rbp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x24e0
movq -0x38(%rbp), %rcx
leaq -0x8c(%rbp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x24e0
movq -0x38(%rbp), %rcx
leaq -0x8d(%rbp), %rdi
movl $0x1, %edx
movq %rdx, %rsi
callq 0x24e0
movl -0x80(%rbp), %eax
cmpl -0x84(%rbp), %eax
jne 0x12acd
movq -0xb0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xb0(%rbp)
jmp 0x12adf
movq -0xa8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xa8(%rbp)
movq -0xa0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xa0(%rbp)
jmp 0x12af3
jmp 0x12af5
movq -0x60(%rbp), %rdi
callq 0x2050
movq -0x68(%rbp), %rdi
callq 0x2050
movq $0x0, -0x60(%rbp)
movq $0x0, -0x68(%rbp)
jmp 0x12b59
movb $0x1, -0x90(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x50(%rbp)
movl -0x70(%rbp), %eax
movl %eax, -0x6c(%rbp)
movl -0x78(%rbp), %eax
movl %eax, -0x74(%rbp)
movb -0x8f(%rbp), %al
movb %al, -0x8e(%rbp)
movq -0x60(%rbp), %rdi
callq 0x2050
movq -0x68(%rbp), %rax
movq %rax, -0x60(%rbp)
movq $0x0, -0x68(%rbp)
jmp 0x12b5b
jmp 0x12b5d
movq -0x98(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x98(%rbp)
movl $0xf4240, %ecx          # imm = 0xF4240
xorl %edx, %edx
divq %rcx
cmpq $0x0, %rdx
jne 0x12bb9
movq 0x26472(%rip), %rax     # 0x38ff8
movq (%rax), %rdi
movq -0x98(%rbp), %rax
movl $0xf4240, %ecx          # imm = 0xF4240
xorl %edx, %edx
divq %rcx
movq %rax, %rcx
movq -0xa0(%rbp), %r8
leaq 0x1ee57(%rip), %rsi     # 0x31a02
leaq 0x1ed7b(%rip), %rdx     # 0x3192d
movb $0x0, %al
callq 0x22c0
jmp 0x11e4a
jmp 0x133ec
movzbl -0x15(%rbp), %eax
cmpl $0x0, %eax
jle 0x12bef
movq 0x26425(%rip), %rax     # 0x38ff8
movq (%rax), %rdi
movzbl -0x15(%rbp), %ecx
leaq 0x1ee59(%rip), %rsi     # 0x31a3a
leaq 0x1ed45(%rip), %rdx     # 0x3192d
movb $0x0, %al
callq 0x22c0
movb $-0x1, -0x8d(%rbp)
movq -0x30(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x3970
cmpl $0x0, %eax
jl 0x133ea
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %rsi
leaq -0x50(%rbp), %rdx
leaq -0x6c(%rbp), %rcx
leaq -0x74(%rbp), %r8
leaq -0x58(%rbp), %r9
leaq -0x70(%rbp), %rax
movq %rax, (%rsp)
callq 0x13a80
movl %eax, -0x7c(%rbp)
cmpl $0x0, -0x7c(%rbp)
jge 0x12c3c
jmp 0x12bf6
movq -0xf8(%rbp), %rdi
movq -0x50(%rbp), %rsi
callq 0x16e10
movl %eax, -0x80(%rbp)
cmpl $-0x1, -0x80(%rbp)
je 0x130e4
cmpl $0x0, -0x6c(%rbp)
jle 0x12c6a
movl -0x6c(%rbp), %eax
movl %eax, -0x184(%rbp)
jmp 0x12c74
xorl %eax, %eax
movl %eax, -0x184(%rbp)
jmp 0x12c74
movl -0x184(%rbp), %eax
movq -0xf8(%rbp), %rcx
movq 0x8(%rcx), %rcx
movl -0x80(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movl 0x10(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jae 0x12cc2
cmpl $0x0, -0x6c(%rbp)
jle 0x12caa
movl -0x6c(%rbp), %eax
movl %eax, -0x188(%rbp)
jmp 0x12cb4
xorl %eax, %eax
movl %eax, -0x188(%rbp)
jmp 0x12cb4
movl -0x188(%rbp), %eax
movl %eax, -0x18c(%rbp)
jmp 0x12ce3
movq -0xf8(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x80(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
subl $0x1, %eax
movl %eax, -0x18c(%rbp)
movl -0x18c(%rbp), %eax
movl %eax, -0x6c(%rbp)
cmpl $0x0, -0x74(%rbp)
jle 0x12cfd
movl -0x74(%rbp), %eax
movl %eax, -0x190(%rbp)
jmp 0x12d07
xorl %eax, %eax
movl %eax, -0x190(%rbp)
jmp 0x12d07
movl -0x190(%rbp), %eax
movq -0xf8(%rbp), %rcx
movq 0x8(%rcx), %rcx
movl -0x80(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movl 0x10(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jae 0x12d55
cmpl $0x0, -0x74(%rbp)
jle 0x12d3d
movl -0x74(%rbp), %eax
movl %eax, -0x194(%rbp)
jmp 0x12d47
xorl %eax, %eax
movl %eax, -0x194(%rbp)
jmp 0x12d47
movl -0x194(%rbp), %eax
movl %eax, -0x198(%rbp)
jmp 0x12d76
movq -0xf8(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x80(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
subl $0x1, %eax
movl %eax, -0x198(%rbp)
movl -0x198(%rbp), %eax
movl %eax, -0x74(%rbp)
movq -0xe0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x80(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq -0xe0(%rbp), %rcx
movq 0x8(%rcx), %rcx
movl -0x80(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
cmpq 0x8(%rcx), %rax
jne 0x12e7c
movq -0xe0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x80(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x8(%rax)
je 0x12df7
movq -0xe0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x80(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
shlq %rax
movq %rax, -0x1a0(%rbp)
jmp 0x12e05
movl $0x2, %eax
movq %rax, -0x1a0(%rbp)
jmp 0x12e05
movq -0x1a0(%rbp), %rcx
movq -0xe0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x80(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movq -0xe0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x80(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rdi
movq -0xe0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x80(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rsi
shlq $0x3, %rsi
callq 0x23a0
movq %rax, %rcx
movq -0xe0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x80(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x10(%rax)
movslq -0x6c(%rbp), %rdx
shlq $0x20, %rdx
orq $0x1, %rdx
movq -0xe0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x80(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movq -0xe0(%rbp), %rcx
movq 0x8(%rcx), %rsi
movl -0x80(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rsi
movq (%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, (%rsi)
movq %rdx, (%rax,%rcx,8)
jmp 0x12ec9
movq -0xe0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x80(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq -0xe0(%rbp), %rcx
movq 0x8(%rcx), %rcx
movl -0x80(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
cmpq 0x8(%rcx), %rax
jne 0x12fc6
movq -0xe0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x80(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x8(%rax)
je 0x12f41
movq -0xe0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x80(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
shlq %rax
movq %rax, -0x1a8(%rbp)
jmp 0x12f4f
movl $0x2, %eax
movq %rax, -0x1a8(%rbp)
jmp 0x12f4f
movq -0x1a8(%rbp), %rcx
movq -0xe0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x80(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movq -0xe0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x80(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rdi
movq -0xe0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x80(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rsi
shlq $0x3, %rsi
callq 0x23a0
movq %rax, %rcx
movq -0xe0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x80(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x10(%rax)
movslq -0x74(%rbp), %rdx
shlq $0x20, %rdx
movabsq $0xffffffff, %rax       # imm = 0xFFFFFFFF
orq %rax, %rdx
movq -0xe0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x80(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movq -0xe0(%rbp), %rcx
movq 0x8(%rcx), %rsi
movl -0x80(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rsi
movq (%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, (%rsi)
movq %rdx, (%rax,%rcx,8)
movq -0xc0(%rbp), %rax
addq $0x2, %rax
movq %rax, -0xc0(%rbp)
movq -0xc0(%rbp), %rax
cmpq -0xd0(%rbp), %rax
jbe 0x130e2
movq -0xe0(%rbp), %rdi
callq 0x1d050
movq %rax, -0xc8(%rbp)
movq 0x25f9e(%rip), %rax     # 0x38ff8
movq (%rax), %rdi
movq -0xc0(%rbp), %rcx
movq -0xc8(%rbp), %r8
movq -0xd0(%rbp), %r9
leaq 0x1e918(%rip), %rsi     # 0x31991
leaq 0x1e8ad(%rip), %rdx     # 0x3192d
movb $0x0, %al
callq 0x22c0
movq -0xc8(%rbp), %rax
movq -0xc0(%rbp), %rcx
shrq %rcx
cmpq %rcx, %rax
jbe 0x130d4
movq -0xd0(%rbp), %rax
shlq %rax
movq %rax, -0xd0(%rbp)
movq 0x25f43(%rip), %rax     # 0x38ff8
movq (%rax), %rdi
movq -0xd0(%rbp), %rcx
leaq 0x1e907(%rip), %rsi     # 0x319cd
leaq 0x1e860(%rip), %rdx     # 0x3192d
movb $0x0, %al
callq 0x22c0
movq -0xc8(%rbp), %rax
movq %rax, -0xc0(%rbp)
jmp 0x130e4
cmpl $0x0, -0x7c(%rbp)
jne 0x13389
movq -0xf8(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0x16e10
movl %eax, -0x84(%rbp)
cmpl $-0x1, -0x80(%rbp)
jne 0x13179
movq -0xe8(%rbp), %rdi
movq -0x50(%rbp), %rsi
leaq -0xf0(%rbp), %rdx
callq 0x13720
movl %eax, -0xec(%rbp)
cmpl $0x0, -0xf0(%rbp)
je 0x13174
movq -0x50(%rbp), %rdi
callq 0x2520
movq %rax, %rdx
movq -0xe8(%rbp), %rax
movq 0x18(%rax), %rax
movl -0xec(%rbp), %ecx
movq %rdx, (%rax,%rcx,8)
movq 0x25ea0(%rip), %rax     # 0x38ff8
movq (%rax), %rdi
movq -0x50(%rbp), %rcx
leaq 0x1e809(%rip), %rsi     # 0x3196f
leaq 0x1e7c0(%rip), %rdx     # 0x3192d
movb $0x0, %al
callq 0x22c0
jmp 0x13387
cmpl $-0x1, -0x84(%rbp)
jne 0x131f1
movq -0xe8(%rbp), %rdi
movq -0x58(%rbp), %rsi
leaq -0xf0(%rbp), %rdx
callq 0x13720
movl %eax, -0xec(%rbp)
cmpl $0x0, -0xf0(%rbp)
je 0x131ec
movq -0x58(%rbp), %rdi
callq 0x2520
movq %rax, %rdx
movq -0xe8(%rbp), %rax
movq 0x18(%rax), %rax
movl -0xec(%rbp), %ecx
movq %rdx, (%rax,%rcx,8)
movq 0x25e28(%rip), %rax     # 0x38ff8
movq (%rax), %rdi
movq -0x58(%rbp), %rcx
leaq 0x1e791(%rip), %rsi     # 0x3196f
leaq 0x1e748(%rip), %rdx     # 0x3192d
movb $0x0, %al
callq 0x22c0
jmp 0x13385
cmpl $0x0, -0x70(%rbp)
jle 0x13202
movl -0x70(%rbp), %eax
movl %eax, -0x1ac(%rbp)
jmp 0x1320c
xorl %eax, %eax
movl %eax, -0x1ac(%rbp)
jmp 0x1320c
movl -0x1ac(%rbp), %eax
movq -0xf8(%rbp), %rcx
movq 0x8(%rcx), %rcx
movl -0x84(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movl 0x10(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jae 0x1325d
cmpl $0x0, -0x70(%rbp)
jle 0x13245
movl -0x70(%rbp), %eax
movl %eax, -0x1b0(%rbp)
jmp 0x1324f
xorl %eax, %eax
movl %eax, -0x1b0(%rbp)
jmp 0x1324f
movl -0x1b0(%rbp), %eax
movl %eax, -0x1b4(%rbp)
jmp 0x13281
movq -0xf8(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x84(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
subl $0x1, %eax
movl %eax, -0x1b4(%rbp)
movl -0x1b4(%rbp), %eax
movl %eax, -0x70(%rbp)
movl -0x80(%rbp), %eax
cmpl -0x84(%rbp), %eax
jbe 0x132cb
movl -0x80(%rbp), %eax
movl %eax, -0x104(%rbp)
movl -0x84(%rbp), %eax
movl %eax, -0x80(%rbp)
movl -0x104(%rbp), %eax
movl %eax, -0x84(%rbp)
movl -0x6c(%rbp), %eax
movl %eax, -0x108(%rbp)
movl -0x70(%rbp), %eax
movl %eax, -0x6c(%rbp)
movl -0x108(%rbp), %eax
movl %eax, -0x70(%rbp)
movq -0x38(%rbp), %rcx
leaq -0x80(%rbp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x24e0
movq -0x38(%rbp), %rcx
leaq -0x6c(%rbp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x24e0
movq -0x38(%rbp), %rcx
leaq -0x84(%rbp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x24e0
movq -0x38(%rbp), %rcx
leaq -0x70(%rbp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x24e0
movq -0x38(%rbp), %rcx
leaq -0x8d(%rbp), %rdi
movl $0x1, %edx
movq %rdx, %rsi
callq 0x24e0
movl -0x80(%rbp), %eax
cmpl -0x84(%rbp), %eax
jne 0x13361
movq -0xb0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xb0(%rbp)
jmp 0x13373
movq -0xa8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xa8(%rbp)
movq -0xa0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xa0(%rbp)
jmp 0x13387
jmp 0x13389
movq -0x98(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x98(%rbp)
movl $0xf4240, %ecx          # imm = 0xF4240
xorl %edx, %edx
divq %rcx
cmpq $0x0, %rdx
jne 0x133e5
movq 0x25c46(%rip), %rax     # 0x38ff8
movq (%rax), %rdi
movq -0x98(%rbp), %rax
movl $0xf4240, %ecx          # imm = 0xF4240
xorl %edx, %edx
divq %rcx
movq %rax, %rcx
movq -0xa0(%rbp), %r8
leaq 0x1e62b(%rip), %rsi     # 0x31a02
leaq 0x1e54f(%rip), %rdx     # 0x3192d
movb $0x0, %al
callq 0x22c0
jmp 0x12bf6
jmp 0x133ec
movq -0xe0(%rbp), %rdi
callq 0x1d050
movq %rax, -0xc8(%rbp)
movq 0x25bf2(%rip), %rax     # 0x38ff8
movq (%rax), %rdi
movq -0xc0(%rbp), %rcx
movq -0xc8(%rbp), %r8
movq -0xd0(%rbp), %r9
leaq 0x1e56c(%rip), %rsi     # 0x31991
leaq 0x1e501(%rip), %rdx     # 0x3192d
movb $0x0, %al
callq 0x22c0
movl $0x0, -0xec(%rbp)
movl -0xec(%rbp), %eax
movq -0xe8(%rbp), %rcx
cmpl (%rcx), %eax
jae 0x134a9
movq -0xe8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0xec(%rbp), %ecx
shrl $0x4, %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
movl -0xec(%rbp), %ecx
andl $0xf, %ecx
shll %ecx
shrl %cl, %eax
andl $0x3, %eax
cmpl $0x0, %eax
jne 0x13496
movq -0xe8(%rbp), %rax
movq 0x18(%rax), %rax
movl -0xec(%rbp), %ecx
movq (%rax,%rcx,8), %rdi
callq 0x2050
jmp 0x13498
movl -0xec(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xec(%rbp)
jmp 0x1343d
movq -0xe8(%rbp), %rdi
callq 0x13b80
cmpq $0x0, -0x60(%rbp)
je 0x134c5
movq -0x60(%rbp), %rdi
callq 0x2050
cmpq $0x0, -0x68(%rbp)
je 0x134d5
movq -0x68(%rbp), %rdi
callq 0x2050
jmp 0x134d7
cmpq $0x0, -0x48(%rbp)
je 0x134f4
movq -0x48(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x2050
movq -0x48(%rbp), %rdi
callq 0x2050
jmp 0x134f6
movq -0x40(%rbp), %rdi
callq 0x3570
movq -0x30(%rbp), %rdi
callq 0x4350
movq -0x38(%rbp), %rdi
movq -0xb8(%rbp), %rsi
addq $0x8, %rsi
xorl %edx, %edx
callq 0x2380
movq -0x38(%rbp), %rcx
leaq -0xa0(%rbp), %rdi
movl $0x8, %esi
movl $0x1, %edx
callq 0x24e0
movq -0x38(%rbp), %rdi
imulq $0x11, -0xa0(%rbp), %rsi
movl $0x1, %edx
callq 0x2380
movq 0x25aa3(%rip), %rax     # 0x38ff8
movq (%rax), %rdi
movq -0xa0(%rbp), %rcx
movq -0x98(%rbp), %r8
movq -0xb0(%rbp), %r9
movq -0xa8(%rbp), %rax
leaq 0x1e51b(%rip), %rsi     # 0x31a96
leaq 0x1e3ab(%rip), %rdx     # 0x3192d
movq %rax, (%rsp)
movb $0x0, %al
callq 0x22c0
movq -0xe0(%rbp), %rdi
movq -0xf8(%rbp), %rsi
movsd -0x20(%rbp), %xmm0
callq 0x1ea90
movq %rax, -0x110(%rbp)
movq -0x110(%rbp), %rdi
movq -0x38(%rbp), %rcx
movl $0x8, %esi
movl $0x1, %edx
callq 0x24e0
movq -0x110(%rbp), %rax
movq 0x10(%rax), %rax
movq (%rax), %rdi
movq -0x110(%rbp), %rax
movq (%rax), %rdx
movq -0x38(%rbp), %rcx
movl $0x8, %esi
callq 0x24e0
movq -0xe0(%rbp), %rdi
callq 0x1cf90
movq -0x110(%rbp), %rdi
callq 0x1d000
movq -0xf8(%rbp), %rdi
callq 0x16650
movq -0x38(%rbp), %rdi
callq 0x2150
addq $0x1c0, %rsp            # imm = 0x1C0
popq %rbp
retq
nopw %cs:(%rax,%rax)