// File: /workspace/github_c_makefile_star2_O0/c-zhou[P]yahs/link.c
// Function: dump_links_from_pa5_file
void dump_links_from_pa5_file(const char *f, const char *fai, uint32_t ml, uint8_t mq, uint32_t rl, double q_drop, const char *out)
{
    FILE *fo;
    iostream_t *fp;
    char *line;
    char cname0[4096], cname1[4096];
    uint32_t s0, s1, e0, e1, i0, i1, p0, p1;
    uint8_t q, q0, q1;
    uint64_t rec_c, pair_c, inter_c, intra_c, sd_l, n, m, max_m;
    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 = iostream_open(f);
    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);

    rl >>= 1;
    rec_c = pair_c = inter_c = intra_c = 0;
    cov = cov_init(dict->n);
    n = 0;
    max_m = 0x7FFFFFFULL; // 128MB - ~1GB mem for covs

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

    while ((line = iostream_getline(fp)) != NULL) {
        if (is_empty_line(line))
            continue;

        cname0[0] = cname1[0] = '\0';
        p0 = p1 = UINT32_MAX;
        q0 = q1 = 255;
        sscanf(line, "%*s %s %u %s %u %hhu %hhu", cname0, &p0, cname1, &p1, &q0, &q1);

        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(p0 - MIN(p0, rl), 0, dict->s[i0].len - 1);
            e0 = MIN_MAX(p0 + rl, 0, dict->s[i0].len - 1);
            s1 = MIN_MAX(p1 - MIN(p1, rl), 0, dict->s[i1].len - 1);
            e1 = MIN_MAX(p1 + rl, 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;
            }

            p0 = MIN(p0, dict->s[i0].len - 1);
            p1 = MIN(p1, dict->s[i1].len - 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;
        }

        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);

    iostream_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 = bed_cstats(f, dict);
    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 $0x21a0, %rsp           # imm = 0x21A0
movb %cl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movb %al, -0x15(%rbp)
movl %r8d, -0x1c(%rbp)
movsd %xmm0, -0x28(%rbp)
movq %r9, -0x30(%rbp)
callq 0x13630
movq %rax, -0x20c8(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x17660
movq %rax, -0x20d8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x2d80
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0x14e38
movq 0x241e6(%rip), %rax     # 0x38ff8
movq (%rax), %rdi
movq -0x8(%rbp), %rcx
leaq 0x1c3b0(%rip), %rsi     # 0x311d0
leaq 0x1cced(%rip), %rdx     # 0x31b14
movb $0x0, %al
callq 0x22c0
movl $0x1, %edi
callq 0x24c0
movq -0x30(%rbp), %rdi
leaq 0x1c1cd(%rip), %rsi     # 0x31010
callq 0x23f0
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x14e80
movq 0x2419e(%rip), %rax     # 0x38ff8
movq (%rax), %rdi
movq -0x30(%rbp), %rcx
leaq 0x1cade(%rip), %rsi     # 0x31946
leaq 0x1cca5(%rip), %rdx     # 0x31b14
movb $0x0, %al
callq 0x22c0
movl $0x1, %edi
callq 0x24c0
movq -0x38(%rbp), %rdi
callq 0x2b70
movq -0x38(%rbp), %rdi
movq -0x20d8(%rbp), %rsi
callq 0x1b950
movq %rax, -0x20a0(%rbp)
movl -0x1c(%rbp), %eax
shrl %eax
movl %eax, -0x1c(%rbp)
movq $0x0, -0x2098(%rbp)
movq $0x0, -0x2090(%rbp)
movq $0x0, -0x2088(%rbp)
movq $0x0, -0x2080(%rbp)
movq -0x20d8(%rbp), %rax
movl (%rax), %edi
callq 0x1cee0
movq %rax, -0x20c0(%rbp)
movq $0x0, -0x20a8(%rbp)
movq $0x7ffffff, -0x20b8(%rbp) # imm = 0x7FFFFFF
movq -0x38(%rbp), %rcx
leaq -0x2088(%rbp), %rdi
movl $0x8, %esi
movl $0x1, %edx
callq 0x24e0
movq -0x40(%rbp), %rdi
callq 0x3000
movq %rax, -0x48(%rbp)
cmpq $0x0, %rax
je 0x15e8b
movq -0x48(%rbp), %rdi
callq 0x2d20
cmpl $0x0, %eax
je 0x14f40
jmp 0x14f19
movb $0x0, -0x2050(%rbp)
movb $0x0, -0x1050(%rbp)
movl $0xffffffff, -0x2070(%rbp) # imm = 0xFFFFFFFF
movl $0xffffffff, -0x206c(%rbp) # imm = 0xFFFFFFFF
movb $-0x1, -0x2073(%rbp)
movb $-0x1, -0x2072(%rbp)
movq -0x48(%rbp), %rdi
leaq -0x1050(%rbp), %rdx
leaq -0x2050(%rbp), %r8
leaq 0x1cba4(%rip), %rsi     # 0x31b2d
leaq -0x206c(%rbp), %rcx
leaq -0x2070(%rbp), %r9
leaq -0x2072(%rbp), %r10
leaq -0x2073(%rbp), %rax
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
movb $0x0, %al
callq 0x2360
movq -0x20d8(%rbp), %rdi
leaq -0x1050(%rbp), %rsi
callq 0x16e10
movl %eax, -0x2064(%rbp)
movq -0x20d8(%rbp), %rdi
leaq -0x2050(%rbp), %rsi
callq 0x16e10
movl %eax, -0x2068(%rbp)
movzbl -0x2072(%rbp), %eax
movzbl -0x2073(%rbp), %ecx
cmpl %ecx, %eax
jge 0x15008
movzbl -0x2072(%rbp), %eax
movl %eax, -0x20ec(%rbp)
jmp 0x15015
movzbl -0x2073(%rbp), %eax
movl %eax, -0x20ec(%rbp)
movl -0x20ec(%rbp), %eax
movb %al, -0x2071(%rbp)
cmpl $-0x1, -0x2064(%rbp)
jne 0x150a2
movq -0x20c8(%rbp), %rdi
leaq -0x1050(%rbp), %rsi
leaq -0x20d0(%rbp), %rdx
callq 0x13720
movl %eax, -0x20cc(%rbp)
cmpl $0x0, -0x20d0(%rbp)
je 0x1509d
leaq -0x1050(%rbp), %rdi
callq 0x2520
movq %rax, %rdx
movq -0x20c8(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x20cc(%rbp), %ecx
movq %rdx, (%rax,%rcx,8)
movq 0x23f7a(%rip), %rax     # 0x38ff8
movq (%rax), %rdi
leaq -0x1050(%rbp), %rcx
leaq 0x1c8e0(%rip), %rsi     # 0x3196f
leaq 0x1ca7e(%rip), %rdx     # 0x31b14
movb $0x0, %al
callq 0x22c0
jmp 0x15e2a
cmpl $-0x1, -0x2068(%rbp)
jne 0x15123
movq -0x20c8(%rbp), %rdi
leaq -0x2050(%rbp), %rsi
leaq -0x20d0(%rbp), %rdx
callq 0x13720
movl %eax, -0x20cc(%rbp)
cmpl $0x0, -0x20d0(%rbp)
je 0x1511e
leaq -0x2050(%rbp), %rdi
callq 0x2520
movq %rax, %rdx
movq -0x20c8(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x20cc(%rbp), %ecx
movq %rdx, (%rax,%rcx,8)
movq 0x23ef9(%rip), %rax     # 0x38ff8
movq (%rax), %rdi
leaq -0x2050(%rbp), %rcx
leaq 0x1c85f(%rip), %rsi     # 0x3196f
leaq 0x1c9fd(%rip), %rdx     # 0x31b14
movb $0x0, %al
callq 0x22c0
jmp 0x15e28
movzbl -0x2071(%rbp), %eax
movzbl -0x15(%rbp), %ecx
cmpl %ecx, %eax
jl 0x15e26
movl -0x206c(%rbp), %eax
movl %eax, -0x20f0(%rbp)
movl -0x206c(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jae 0x1515b
movl -0x206c(%rbp), %eax
movl %eax, -0x20f4(%rbp)
jmp 0x15164
movl -0x1c(%rbp), %eax
movl %eax, -0x20f4(%rbp)
movl -0x20f0(%rbp), %eax
movl -0x20f4(%rbp), %ecx
subl %ecx, %eax
cmpl $0x0, %eax
jbe 0x151bb
movl -0x206c(%rbp), %eax
movl %eax, -0x20f8(%rbp)
movl -0x206c(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jae 0x1519c
movl -0x206c(%rbp), %eax
movl %eax, -0x20fc(%rbp)
jmp 0x151a5
movl -0x1c(%rbp), %eax
movl %eax, -0x20fc(%rbp)
movl -0x20f8(%rbp), %eax
movl -0x20fc(%rbp), %ecx
subl %ecx, %eax
movl %eax, -0x2100(%rbp)
jmp 0x151c5
xorl %eax, %eax
movl %eax, -0x2100(%rbp)
jmp 0x151c5
movl -0x2100(%rbp), %eax
movq -0x20d8(%rbp), %rcx
movq 0x8(%rcx), %rcx
movl -0x2064(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movl 0x10(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jae 0x1528e
movl -0x206c(%rbp), %eax
movl %eax, -0x2104(%rbp)
movl -0x206c(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jae 0x15216
movl -0x206c(%rbp), %eax
movl %eax, -0x2108(%rbp)
jmp 0x1521f
movl -0x1c(%rbp), %eax
movl %eax, -0x2108(%rbp)
movl -0x2104(%rbp), %eax
movl -0x2108(%rbp), %ecx
subl %ecx, %eax
cmpl $0x0, %eax
jbe 0x15276
movl -0x206c(%rbp), %eax
movl %eax, -0x210c(%rbp)
movl -0x206c(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jae 0x15257
movl -0x206c(%rbp), %eax
movl %eax, -0x2110(%rbp)
jmp 0x15260
movl -0x1c(%rbp), %eax
movl %eax, -0x2110(%rbp)
movl -0x210c(%rbp), %eax
movl -0x2110(%rbp), %ecx
subl %ecx, %eax
movl %eax, -0x2114(%rbp)
jmp 0x15280
xorl %eax, %eax
movl %eax, -0x2114(%rbp)
jmp 0x15280
movl -0x2114(%rbp), %eax
movl %eax, -0x2118(%rbp)
jmp 0x152b2
movq -0x20d8(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x2064(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
subl $0x1, %eax
movl %eax, -0x2118(%rbp)
movl -0x2118(%rbp), %eax
movl %eax, -0x2054(%rbp)
movl -0x206c(%rbp), %eax
addl -0x1c(%rbp), %eax
cmpl $0x0, %eax
jbe 0x152dd
movl -0x206c(%rbp), %eax
addl -0x1c(%rbp), %eax
movl %eax, -0x211c(%rbp)
jmp 0x152e7
xorl %eax, %eax
movl %eax, -0x211c(%rbp)
jmp 0x152e7
movl -0x211c(%rbp), %eax
movq -0x20d8(%rbp), %rcx
movq 0x8(%rcx), %rcx
movl -0x2064(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movl 0x10(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jae 0x15346
movl -0x206c(%rbp), %eax
addl -0x1c(%rbp), %eax
cmpl $0x0, %eax
jbe 0x1532e
movl -0x206c(%rbp), %eax
addl -0x1c(%rbp), %eax
movl %eax, -0x2120(%rbp)
jmp 0x15338
xorl %eax, %eax
movl %eax, -0x2120(%rbp)
jmp 0x15338
movl -0x2120(%rbp), %eax
movl %eax, -0x2124(%rbp)
jmp 0x1536a
movq -0x20d8(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x2064(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
subl $0x1, %eax
movl %eax, -0x2124(%rbp)
movl -0x2124(%rbp), %eax
movl %eax, -0x205c(%rbp)
movl -0x2070(%rbp), %eax
movl %eax, -0x2128(%rbp)
movl -0x2070(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jae 0x1539b
movl -0x2070(%rbp), %eax
movl %eax, -0x212c(%rbp)
jmp 0x153a4
movl -0x1c(%rbp), %eax
movl %eax, -0x212c(%rbp)
movl -0x2128(%rbp), %eax
movl -0x212c(%rbp), %ecx
subl %ecx, %eax
cmpl $0x0, %eax
jbe 0x153fb
movl -0x2070(%rbp), %eax
movl %eax, -0x2130(%rbp)
movl -0x2070(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jae 0x153dc
movl -0x2070(%rbp), %eax
movl %eax, -0x2134(%rbp)
jmp 0x153e5
movl -0x1c(%rbp), %eax
movl %eax, -0x2134(%rbp)
movl -0x2130(%rbp), %eax
movl -0x2134(%rbp), %ecx
subl %ecx, %eax
movl %eax, -0x2138(%rbp)
jmp 0x15405
xorl %eax, %eax
movl %eax, -0x2138(%rbp)
jmp 0x15405
movl -0x2138(%rbp), %eax
movq -0x20d8(%rbp), %rcx
movq 0x8(%rcx), %rcx
movl -0x2068(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movl 0x10(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jae 0x154ce
movl -0x2070(%rbp), %eax
movl %eax, -0x213c(%rbp)
movl -0x2070(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jae 0x15456
movl -0x2070(%rbp), %eax
movl %eax, -0x2140(%rbp)
jmp 0x1545f
movl -0x1c(%rbp), %eax
movl %eax, -0x2140(%rbp)
movl -0x213c(%rbp), %eax
movl -0x2140(%rbp), %ecx
subl %ecx, %eax
cmpl $0x0, %eax
jbe 0x154b6
movl -0x2070(%rbp), %eax
movl %eax, -0x2144(%rbp)
movl -0x2070(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jae 0x15497
movl -0x2070(%rbp), %eax
movl %eax, -0x2148(%rbp)
jmp 0x154a0
movl -0x1c(%rbp), %eax
movl %eax, -0x2148(%rbp)
movl -0x2144(%rbp), %eax
movl -0x2148(%rbp), %ecx
subl %ecx, %eax
movl %eax, -0x214c(%rbp)
jmp 0x154c0
xorl %eax, %eax
movl %eax, -0x214c(%rbp)
jmp 0x154c0
movl -0x214c(%rbp), %eax
movl %eax, -0x2150(%rbp)
jmp 0x154f2
movq -0x20d8(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x2068(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
subl $0x1, %eax
movl %eax, -0x2150(%rbp)
movl -0x2150(%rbp), %eax
movl %eax, -0x2058(%rbp)
movl -0x2070(%rbp), %eax
addl -0x1c(%rbp), %eax
cmpl $0x0, %eax
jbe 0x1551d
movl -0x2070(%rbp), %eax
addl -0x1c(%rbp), %eax
movl %eax, -0x2154(%rbp)
jmp 0x15527
xorl %eax, %eax
movl %eax, -0x2154(%rbp)
jmp 0x15527
movl -0x2154(%rbp), %eax
movq -0x20d8(%rbp), %rcx
movq 0x8(%rcx), %rcx
movl -0x2068(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movl 0x10(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jae 0x15586
movl -0x2070(%rbp), %eax
addl -0x1c(%rbp), %eax
cmpl $0x0, %eax
jbe 0x1556e
movl -0x2070(%rbp), %eax
addl -0x1c(%rbp), %eax
movl %eax, -0x2158(%rbp)
jmp 0x15578
xorl %eax, %eax
movl %eax, -0x2158(%rbp)
jmp 0x15578
movl -0x2158(%rbp), %eax
movl %eax, -0x215c(%rbp)
jmp 0x155aa
movq -0x20d8(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x2068(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
subl $0x1, %eax
movl %eax, -0x215c(%rbp)
movl -0x215c(%rbp), %eax
movl %eax, -0x2060(%rbp)
movq -0x20c0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x2064(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq -0x20c0(%rbp), %rcx
movq 0x8(%rcx), %rcx
movl -0x2064(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
cmpq 0x8(%rcx), %rax
jne 0x156cb
movq -0x20c0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x2064(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x8(%rax)
je 0x1563a
movq -0x20c0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x2064(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
shlq %rax
movq %rax, -0x2168(%rbp)
jmp 0x15648
movl $0x2, %eax
movq %rax, -0x2168(%rbp)
jmp 0x15648
movq -0x2168(%rbp), %rcx
movq -0x20c0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x2064(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movq -0x20c0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x2064(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rdi
movq -0x20c0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x2064(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rsi
shlq $0x3, %rsi
callq 0x23a0
movq %rax, %rcx
movq -0x20c0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x2064(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x10(%rax)
movl -0x2054(%rbp), %eax
movl %eax, %edx
shlq $0x20, %rdx
orq $0x1, %rdx
movq -0x20c0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x2064(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movq -0x20c0(%rbp), %rcx
movq 0x8(%rcx), %rsi
movl -0x2064(%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 0x15722
movq -0x20c0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x2064(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq -0x20c0(%rbp), %rcx
movq 0x8(%rcx), %rcx
movl -0x2064(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
cmpq 0x8(%rcx), %rax
jne 0x15837
movq -0x20c0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x2064(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x8(%rax)
je 0x157a6
movq -0x20c0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x2064(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
shlq %rax
movq %rax, -0x2170(%rbp)
jmp 0x157b4
movl $0x2, %eax
movq %rax, -0x2170(%rbp)
jmp 0x157b4
movq -0x2170(%rbp), %rcx
movq -0x20c0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x2064(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movq -0x20c0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x2064(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rdi
movq -0x20c0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x2064(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rsi
shlq $0x3, %rsi
callq 0x23a0
movq %rax, %rcx
movq -0x20c0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x2064(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x10(%rax)
movl -0x205c(%rbp), %eax
movl %eax, %edx
shlq $0x20, %rdx
movabsq $0xffffffff, %rax       # imm = 0xFFFFFFFF
orq %rax, %rdx
movq -0x20c0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x2064(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movq -0x20c0(%rbp), %rcx
movq 0x8(%rcx), %rsi
movl -0x2064(%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 0x15897
movq -0x20c0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x2068(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq -0x20c0(%rbp), %rcx
movq 0x8(%rcx), %rcx
movl -0x2068(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
cmpq 0x8(%rcx), %rax
jne 0x159ac
movq -0x20c0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x2068(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x8(%rax)
je 0x1591b
movq -0x20c0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x2068(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
shlq %rax
movq %rax, -0x2178(%rbp)
jmp 0x15929
movl $0x2, %eax
movq %rax, -0x2178(%rbp)
jmp 0x15929
movq -0x2178(%rbp), %rcx
movq -0x20c0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x2068(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movq -0x20c0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x2068(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rdi
movq -0x20c0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x2068(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rsi
shlq $0x3, %rsi
callq 0x23a0
movq %rax, %rcx
movq -0x20c0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x2068(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x10(%rax)
movl -0x2058(%rbp), %eax
movl %eax, %edx
shlq $0x20, %rdx
orq $0x1, %rdx
movq -0x20c0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x2068(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movq -0x20c0(%rbp), %rcx
movq 0x8(%rcx), %rsi
movl -0x2068(%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 0x15a03
movq -0x20c0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x2068(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq -0x20c0(%rbp), %rcx
movq 0x8(%rcx), %rcx
movl -0x2068(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
cmpq 0x8(%rcx), %rax
jne 0x15b18
movq -0x20c0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x2068(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x8(%rax)
je 0x15a87
movq -0x20c0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x2068(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
shlq %rax
movq %rax, -0x2180(%rbp)
jmp 0x15a95
movl $0x2, %eax
movq %rax, -0x2180(%rbp)
jmp 0x15a95
movq -0x2180(%rbp), %rcx
movq -0x20c0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x2068(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movq -0x20c0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x2068(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rdi
movq -0x20c0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x2068(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rsi
shlq $0x3, %rsi
callq 0x23a0
movq %rax, %rcx
movq -0x20c0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x2068(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x10(%rax)
movl -0x2060(%rbp), %eax
movl %eax, %edx
shlq $0x20, %rdx
movabsq $0xffffffff, %rax       # imm = 0xFFFFFFFF
orq %rax, %rdx
movq -0x20c0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x2068(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movq -0x20c0(%rbp), %rcx
movq 0x8(%rcx), %rsi
movl -0x2068(%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 -0x20a8(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x20a8(%rbp)
movq -0x20a8(%rbp), %rax
cmpq -0x20b8(%rbp), %rax
jbe 0x15c3e
movq -0x20c0(%rbp), %rdi
callq 0x1d050
movq %rax, -0x20b0(%rbp)
movq 0x23442(%rip), %rax     # 0x38ff8
movq (%rax), %rdi
movq -0x20a8(%rbp), %rcx
movq -0x20b0(%rbp), %r8
movq -0x20b8(%rbp), %r9
leaq 0x1bdbc(%rip), %rsi     # 0x31991
leaq 0x1bf38(%rip), %rdx     # 0x31b14
movb $0x0, %al
callq 0x22c0
movq -0x20b0(%rbp), %rax
movq -0x20a8(%rbp), %rcx
shrq %rcx
cmpq %rcx, %rax
jbe 0x15c30
movq -0x20b8(%rbp), %rax
shlq %rax
movq %rax, -0x20b8(%rbp)
movq 0x233e7(%rip), %rax     # 0x38ff8
movq (%rax), %rdi
movq -0x20b8(%rbp), %rcx
leaq 0x1bdab(%rip), %rsi     # 0x319cd
leaq 0x1beeb(%rip), %rdx     # 0x31b14
movb $0x0, %al
callq 0x22c0
movq -0x20b0(%rbp), %rax
movq %rax, -0x20a8(%rbp)
movl -0x206c(%rbp), %eax
movq -0x20d8(%rbp), %rcx
movq 0x8(%rcx), %rcx
movl -0x2064(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movl 0x10(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jae 0x15c74
movl -0x206c(%rbp), %eax
movl %eax, -0x2184(%rbp)
jmp 0x15c98
movq -0x20d8(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x2064(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
subl $0x1, %eax
movl %eax, -0x2184(%rbp)
movl -0x2184(%rbp), %eax
movl %eax, -0x206c(%rbp)
movl -0x2070(%rbp), %eax
movq -0x20d8(%rbp), %rcx
movq 0x8(%rcx), %rcx
movl -0x2068(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movl 0x10(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jae 0x15cda
movl -0x2070(%rbp), %eax
movl %eax, -0x2188(%rbp)
jmp 0x15cfe
movq -0x20d8(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x2068(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
subl $0x1, %eax
movl %eax, -0x2188(%rbp)
movl -0x2188(%rbp), %eax
movl %eax, -0x2070(%rbp)
movl -0x2064(%rbp), %eax
cmpl -0x2068(%rbp), %eax
jbe 0x15d60
movl -0x2064(%rbp), %eax
movl %eax, -0x20dc(%rbp)
movl -0x2068(%rbp), %eax
movl %eax, -0x2064(%rbp)
movl -0x20dc(%rbp), %eax
movl %eax, -0x2068(%rbp)
movl -0x206c(%rbp), %eax
movl %eax, -0x20e0(%rbp)
movl -0x2070(%rbp), %eax
movl %eax, -0x206c(%rbp)
movl -0x20e0(%rbp), %eax
movl %eax, -0x2070(%rbp)
movq -0x38(%rbp), %rcx
leaq -0x2064(%rbp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x24e0
movq -0x38(%rbp), %rcx
leaq -0x206c(%rbp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x24e0
movq -0x38(%rbp), %rcx
leaq -0x2068(%rbp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x24e0
movq -0x38(%rbp), %rcx
leaq -0x2070(%rbp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x24e0
movq -0x38(%rbp), %rcx
leaq -0x2071(%rbp), %rdi
movl $0x1, %edx
movq %rdx, %rsi
callq 0x24e0
movl -0x2064(%rbp), %eax
cmpl -0x2068(%rbp), %eax
jne 0x15e02
movq -0x2098(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x2098(%rbp)
jmp 0x15e14
movq -0x2090(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x2090(%rbp)
movq -0x2088(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x2088(%rbp)
jmp 0x15e28
jmp 0x15e2a
movq -0x2080(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x2080(%rbp)
movl $0xf4240, %ecx          # imm = 0xF4240
xorl %edx, %edx
divq %rcx
cmpq $0x0, %rdx
jne 0x15e86
movq 0x231a5(%rip), %rax     # 0x38ff8
movq (%rax), %rdi
movq -0x2080(%rbp), %rax
movl $0xf4240, %ecx          # imm = 0xF4240
xorl %edx, %edx
divq %rcx
movq %rax, %rcx
movq -0x2088(%rbp), %r8
leaq 0x1bb8a(%rip), %rsi     # 0x31a02
leaq 0x1bc95(%rip), %rdx     # 0x31b14
movb $0x0, %al
callq 0x22c0
jmp 0x14f19
movq -0x20c0(%rbp), %rdi
callq 0x1d050
movq %rax, -0x20b0(%rbp)
movq 0x23153(%rip), %rax     # 0x38ff8
movq (%rax), %rdi
movq -0x20a8(%rbp), %rcx
movq -0x20b0(%rbp), %r8
movq -0x20b8(%rbp), %r9
leaq 0x1bacd(%rip), %rsi     # 0x31991
leaq 0x1bc49(%rip), %rdx     # 0x31b14
movb $0x0, %al
callq 0x22c0
movl $0x0, -0x20cc(%rbp)
movl -0x20cc(%rbp), %eax
movq -0x20c8(%rbp), %rcx
cmpl (%rcx), %eax
jae 0x15f48
movq -0x20c8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x20cc(%rbp), %ecx
shrl $0x4, %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
movl -0x20cc(%rbp), %ecx
andl $0xf, %ecx
shll %ecx
shrl %cl, %eax
andl $0x3, %eax
cmpl $0x0, %eax
jne 0x15f35
movq -0x20c8(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x20cc(%rbp), %ecx
movq (%rax,%rcx,8), %rdi
callq 0x2050
jmp 0x15f37
movl -0x20cc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20cc(%rbp)
jmp 0x15edc
movq -0x20c8(%rbp), %rdi
callq 0x13b80
movq -0x40(%rbp), %rdi
callq 0x2f20
movq -0x38(%rbp), %rdi
movq -0x20a0(%rbp), %rsi
addq $0x8, %rsi
xorl %edx, %edx
callq 0x2380
movq -0x38(%rbp), %rcx
leaq -0x2088(%rbp), %rdi
movl $0x8, %esi
movl $0x1, %edx
callq 0x24e0
movq -0x38(%rbp), %rdi
imulq $0x11, -0x2088(%rbp), %rsi
movl $0x1, %edx
callq 0x2380
movq 0x2304e(%rip), %rax     # 0x38ff8
movq (%rax), %rdi
movq -0x2088(%rbp), %rcx
movq -0x2080(%rbp), %r8
movq -0x2098(%rbp), %r9
movq -0x2090(%rbp), %rax
leaq 0x1bac6(%rip), %rsi     # 0x31a96
leaq 0x1bb3d(%rip), %rdx     # 0x31b14
movq %rax, (%rsp)
movb $0x0, %al
callq 0x22c0
movq -0x20c0(%rbp), %rdi
movq -0x20d8(%rbp), %rsi
movsd -0x28(%rbp), %xmm0
callq 0x1ea90
movq %rax, -0x20e8(%rbp)
movq -0x20e8(%rbp), %rdi
movq -0x38(%rbp), %rcx
movl $0x8, %esi
movl $0x1, %edx
callq 0x24e0
movq -0x20e8(%rbp), %rax
movq 0x10(%rax), %rax
movq (%rax), %rdi
movq -0x20e8(%rbp), %rax
movq (%rax), %rdx
movq -0x38(%rbp), %rcx
movl $0x8, %esi
callq 0x24e0
movq -0x20c0(%rbp), %rdi
callq 0x1cf90
movq -0x20e8(%rbp), %rdi
callq 0x1d000
movq -0x20d8(%rbp), %rdi
callq 0x16650
movq -0x38(%rbp), %rdi
callq 0x2150
addq $0x21a0, %rsp           # imm = 0x21A0
popq %rbp
retq
nopw (%rax,%rax)