// File: /workspace/github_c_makefile_star2_O0/c-zhou[P]oatk/syncasm.c
// Function: scg_refine_arc_coverage
void scg_refine_arc_coverage(scg_t *g, int verbose)
{
    // update arc coverage on graph
    // the arc coverage on the input graph is the number of syncmer pair links in the read set
    // need to check if there are other pair links on the graph
    // if yes, calculate weighted arc coverage by utg coverge
    
    uint64_t i, j, n, m, p, v, w, c, nl, ld, *a;
    asmg_t *utg_g;
    asmg_arc_t *arc;
    u64_v_t *link_pairs, *pair;
    khint_t k;
    kh_u128_t *h_arc;
    int absent;

    utg_g = g->utg_asmg;
    h_arc = kh_u128_init();
    nl = asmg_max_link_id(utg_g) + 1; // number of links
    MYCALLOC(link_pairs, nl);
    // add arcs
    for (i = 0, n = utg_g->n_arc; i < n; ++i) {
        arc = &utg_g->arc[i];
        if (arc->del || arc->comp) continue;
        v = asmg_arc_head_e(utg_g, arc);
        w = asmg_arc_tail_e(utg_g, arc);
        if (v > w) {
            v ^= 1;
            w ^= 1;
            SWAP(v, w);
        }
        ld = arc->link_id;
        // add arc
        k = kh_u128_put(h_arc, (uint128_t) v << 64 | w, &absent);
        // only update if absent
        // for (v,w) with multiple link ids
        // all pack in the first link
        if (absent)
            kh_val(h_arc, k) = ld;
        else
            ld = kh_val(h_arc, k);
        kv_push(uint64_t, link_pairs[ld], arc->link_id);
        kv_push(uint64_t, link_pairs[ld], ((uint64_t) 
                    utg_g->vtx[arc->v >> 1].cov + 
                    utg_g->vtx[arc->w >> 1].cov) / 2);
    }
    // check utgs
    for (i = 0, n = utg_g->n_vtx; i < n; ++i) {
        a = utg_g->vtx[i].a;
        for (j = 1, m = utg_g->vtx[i].n; j < m; ++j) {
            v = a[j - 1];
            w = a[j];
            if (v > w) {
                v ^= 1;
                w ^= 1;
                SWAP(v, w);
            }
            k = kh_u128_get(h_arc, (uint128_t) v << 64 | w);
            if (k == kh_end(h_arc)) continue;
            ld = kh_val(h_arc, k);
            kv_push(uint64_t, link_pairs[ld], UINT64_MAX);
            kv_push(uint64_t, link_pairs[ld], utg_g->vtx[i].cov);
        } 
    }
    // update arc covs on graph
    for (i = 0, n = utg_g->n_arc; i < n; ++i) {
        arc = &utg_g->arc[i];
        if (arc->del || arc->comp) continue;
        v = asmg_arc_head_e(utg_g, arc);
        w = asmg_arc_tail_e(utg_g, arc);
        if (v > w) {
            v ^= 1;
            w ^= 1;
            SWAP(v, w);
        }
        k = kh_u128_get(h_arc, (uint128_t) v << 64 | w);
        ld = kh_val(h_arc, k);
        pair = &link_pairs[ld];
        if (pair->n == 2) {
            assert(pair->a[0] == ld);
            continue; // no need to update
        }
        // find the pair and total cov
        c = 0;
        p = UINT64_MAX;
        for (j = 1, m = pair->n; j < m; j += 2) {
            if (pair->a[j - 1] == arc->link_id)
                p = j;
            c += pair->a[j];
        }
        if (c == 0) continue;
        assert(p < m);
        c = lround((double) arc->cov / c * pair->a[p]);
        // c = MIN(c, utg_g->vtx[arc->v >> 1].cov);
        // c = MIN(c, utg_g->vtx[arc->w >> 1].cov);
        if (verbose > 2)
            fprintf(stderr, "[M::%s] arc u%lu%c -> u%lu%c coverage updated: %u -> %lu\n", 
                    __func__, arc->v>>1, "+-"[arc->v&1], arc->w>>1, "+-"[arc->w&1], arc->cov, c);
        arc->cov = c;

        // for reverse complementary arcs
        arc = asmg_comp_arc1(utg_g, arc);
        if (arc) arc->cov = c;
    }

    // fix arc coverage
    // bounded by the minimum utg cov
    asmg_arc_fix_cov(utg_g);
    
    for (i = 0; i < nl; ++i)
        free(link_pairs[i].a);
    free(link_pairs);
    kh_u128_destroy(h_arc);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x70(%rbp)
callq 0x4690
movq %rax, -0x98(%rbp)
movq -0x70(%rbp), %rdi
callq 0x1fdd0
addq $0x1, %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rdi
movl $0x18, %esi
callq 0x2250
movq %rax, -0x80(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x70(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0xd5d3
movq -0x70(%rbp), %rax
movq 0x28(%rax), %rax
imulq $0x30, -0x18(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
movl 0x20(%rax), %eax
shrl $0x1e, %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0xd2a4
movq -0x78(%rbp), %rax
movl 0x20(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0xd2a9
jmp 0xd5c2
movq -0x70(%rbp), %rdi
movq -0x78(%rbp), %rsi
callq 0xdd40
movq %rax, -0x40(%rbp)
movq -0x70(%rbp), %rdi
movq -0x78(%rbp), %rsi
callq 0xddc0
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rax
cmpq -0x48(%rbp), %rax
jbe 0xd30d
movq -0x40(%rbp), %rax
xorq $0x1, %rax
movq %rax, -0x40(%rbp)
movq -0x48(%rbp), %rax
xorq $0x1, %rax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0xa8(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0xd30d
movq -0x78(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x98(%rbp), %rdi
movq -0x40(%rbp), %rcx
movq -0x48(%rbp), %rax
movq %rcx, -0xb8(%rbp)
movq %rax, -0xc0(%rbp)
movq -0xc0(%rbp), %rsi
movq -0xb8(%rbp), %rdx
leaq -0x9c(%rbp), %rcx
callq 0xde40
movl %eax, -0x8c(%rbp)
cmpl $0x0, -0x9c(%rbp)
je 0xd381
movq -0x60(%rbp), %rcx
movq -0x98(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x8c(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x10(%rax)
jmp 0xd3a1
movq -0x98(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x8c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movq %rax, -0x60(%rbp)
jmp 0xd3a3
movq -0x80(%rbp), %rax
imulq $0x18, -0x60(%rbp), %rcx
addq %rcx, %rax
movq (%rax), %rax
movq -0x80(%rbp), %rcx
imulq $0x18, -0x60(%rbp), %rdx
addq %rdx, %rcx
cmpq 0x8(%rcx), %rax
jne 0xd458
movq -0x80(%rbp), %rax
imulq $0x18, -0x60(%rbp), %rcx
addq %rcx, %rax
cmpq $0x0, 0x8(%rax)
je 0xd3f7
movq -0x80(%rbp), %rax
imulq $0x18, -0x60(%rbp), %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
shlq %rax
movq %rax, -0x108(%rbp)
jmp 0xd405
movl $0x2, %eax
movq %rax, -0x108(%rbp)
jmp 0xd405
movq -0x108(%rbp), %rcx
movq -0x80(%rbp), %rax
imulq $0x18, -0x60(%rbp), %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movq -0x80(%rbp), %rax
imulq $0x18, -0x60(%rbp), %rcx
addq %rcx, %rax
movq 0x10(%rax), %rdi
movq -0x80(%rbp), %rax
imulq $0x18, -0x60(%rbp), %rcx
addq %rcx, %rax
movq 0x8(%rax), %rsi
shlq $0x3, %rsi
callq 0x2360
movq %rax, %rcx
movq -0x80(%rbp), %rax
imulq $0x18, -0x60(%rbp), %rdx
addq %rdx, %rax
movq %rcx, 0x10(%rax)
movq -0x78(%rbp), %rax
movq 0x28(%rax), %rdx
movq -0x80(%rbp), %rax
imulq $0x18, -0x60(%rbp), %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movq -0x80(%rbp), %rsi
imulq $0x18, -0x60(%rbp), %rcx
addq %rcx, %rsi
movq (%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, (%rsi)
movq %rdx, (%rax,%rcx,8)
jmp 0xd48f
movq -0x80(%rbp), %rax
imulq $0x18, -0x60(%rbp), %rcx
addq %rcx, %rax
movq (%rax), %rax
movq -0x80(%rbp), %rcx
imulq $0x18, -0x60(%rbp), %rdx
addq %rdx, %rcx
cmpq 0x8(%rcx), %rax
jne 0xd544
movq -0x80(%rbp), %rax
imulq $0x18, -0x60(%rbp), %rcx
addq %rcx, %rax
cmpq $0x0, 0x8(%rax)
je 0xd4e3
movq -0x80(%rbp), %rax
imulq $0x18, -0x60(%rbp), %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
shlq %rax
movq %rax, -0x110(%rbp)
jmp 0xd4f1
movl $0x2, %eax
movq %rax, -0x110(%rbp)
jmp 0xd4f1
movq -0x110(%rbp), %rcx
movq -0x80(%rbp), %rax
imulq $0x18, -0x60(%rbp), %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movq -0x80(%rbp), %rax
imulq $0x18, -0x60(%rbp), %rcx
addq %rcx, %rax
movq 0x10(%rax), %rdi
movq -0x80(%rbp), %rax
imulq $0x18, -0x60(%rbp), %rcx
addq %rcx, %rax
movq 0x8(%rax), %rsi
shlq $0x3, %rsi
callq 0x2360
movq %rax, %rcx
movq -0x80(%rbp), %rax
imulq $0x18, -0x60(%rbp), %rdx
addq %rdx, %rax
movq %rcx, 0x10(%rax)
movq -0x70(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x78(%rbp), %rcx
movq (%rcx), %rcx
shrq %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x20(%rax), %eax
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
movl %eax, %eax
movl %eax, %edx
movq -0x70(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x78(%rbp), %rcx
movq 0x8(%rcx), %rcx
shrq %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x20(%rax), %eax
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
movl %eax, %eax
addq %rax, %rdx
shrq %rdx
movq -0x80(%rbp), %rax
imulq $0x18, -0x60(%rbp), %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movq -0x80(%rbp), %rsi
imulq $0x18, -0x60(%rbp), %rcx
addq %rcx, %rsi
movq (%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, (%rsi)
movq %rdx, (%rax,%rcx,8)
jmp 0xd5c2
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0xd261
movq $0x0, -0x18(%rbp)
movq -0x70(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0xd952
movq -0x70(%rbp), %rax
movq 0x10(%rax), %rax
imulq $0x28, -0x18(%rbp), %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, -0x68(%rbp)
movq $0x1, -0x20(%rbp)
movq -0x70(%rbp), %rax
movq 0x10(%rax), %rax
imulq $0x28, -0x18(%rbp), %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x30(%rbp), %rax
jae 0xd93f
movq -0x68(%rbp), %rax
movq -0x20(%rbp), %rcx
subq $0x1, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x40(%rbp)
movq -0x68(%rbp), %rax
movq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rax
cmpq -0x48(%rbp), %rax
jbe 0xd69f
movq -0x40(%rbp), %rax
xorq $0x1, %rax
movq %rax, -0x40(%rbp)
movq -0x48(%rbp), %rax
xorq $0x1, %rax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0xc8(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0xd69f
movq -0x98(%rbp), %rdi
movq -0x40(%rbp), %rcx
movq -0x48(%rbp), %rax
movq %rcx, -0xd8(%rbp)
movq %rax, -0xe0(%rbp)
movq -0xe0(%rbp), %rsi
movq -0xd8(%rbp), %rdx
callq 0x5020
movl %eax, -0x8c(%rbp)
movl -0x8c(%rbp), %eax
movl %eax, -0x114(%rbp)
movq -0x98(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0xd707
movq -0x98(%rbp), %rax
movl (%rax), %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, -0x118(%rbp)
jmp 0xd711
xorl %eax, %eax
movl %eax, -0x118(%rbp)
jmp 0xd711
movl -0x114(%rbp), %eax
movl -0x118(%rbp), %ecx
cmpl %ecx, %eax
jne 0xd726
jmp 0xd92e
movq -0x98(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x8c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x80(%rbp), %rax
imulq $0x18, -0x60(%rbp), %rcx
addq %rcx, %rax
movq (%rax), %rax
movq -0x80(%rbp), %rcx
imulq $0x18, -0x60(%rbp), %rdx
addq %rdx, %rcx
cmpq 0x8(%rcx), %rax
jne 0xd7fb
movq -0x80(%rbp), %rax
imulq $0x18, -0x60(%rbp), %rcx
addq %rcx, %rax
cmpq $0x0, 0x8(%rax)
je 0xd79a
movq -0x80(%rbp), %rax
imulq $0x18, -0x60(%rbp), %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
shlq %rax
movq %rax, -0x120(%rbp)
jmp 0xd7a8
movl $0x2, %eax
movq %rax, -0x120(%rbp)
jmp 0xd7a8
movq -0x120(%rbp), %rcx
movq -0x80(%rbp), %rax
imulq $0x18, -0x60(%rbp), %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movq -0x80(%rbp), %rax
imulq $0x18, -0x60(%rbp), %rcx
addq %rcx, %rax
movq 0x10(%rax), %rdi
movq -0x80(%rbp), %rax
imulq $0x18, -0x60(%rbp), %rcx
addq %rcx, %rax
movq 0x8(%rax), %rsi
shlq $0x3, %rsi
callq 0x2360
movq %rax, %rcx
movq -0x80(%rbp), %rax
imulq $0x18, -0x60(%rbp), %rdx
addq %rdx, %rax
movq %rcx, 0x10(%rax)
movq -0x80(%rbp), %rax
imulq $0x18, -0x60(%rbp), %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movq -0x80(%rbp), %rdx
imulq $0x18, -0x60(%rbp), %rcx
addq %rcx, %rdx
movq (%rdx), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, (%rdx)
movq $-0x1, (%rax,%rcx,8)
jmp 0xd82e
movq -0x80(%rbp), %rax
imulq $0x18, -0x60(%rbp), %rcx
addq %rcx, %rax
movq (%rax), %rax
movq -0x80(%rbp), %rcx
imulq $0x18, -0x60(%rbp), %rdx
addq %rdx, %rcx
cmpq 0x8(%rcx), %rax
jne 0xd8e3
movq -0x80(%rbp), %rax
imulq $0x18, -0x60(%rbp), %rcx
addq %rcx, %rax
cmpq $0x0, 0x8(%rax)
je 0xd882
movq -0x80(%rbp), %rax
imulq $0x18, -0x60(%rbp), %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
shlq %rax
movq %rax, -0x128(%rbp)
jmp 0xd890
movl $0x2, %eax
movq %rax, -0x128(%rbp)
jmp 0xd890
movq -0x128(%rbp), %rcx
movq -0x80(%rbp), %rax
imulq $0x18, -0x60(%rbp), %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movq -0x80(%rbp), %rax
imulq $0x18, -0x60(%rbp), %rcx
addq %rcx, %rax
movq 0x10(%rax), %rdi
movq -0x80(%rbp), %rax
imulq $0x18, -0x60(%rbp), %rcx
addq %rcx, %rax
movq 0x8(%rax), %rsi
shlq $0x3, %rsi
callq 0x2360
movq %rax, %rcx
movq -0x80(%rbp), %rax
imulq $0x18, -0x60(%rbp), %rdx
addq %rdx, %rax
movq %rcx, 0x10(%rax)
movq -0x70(%rbp), %rax
movq 0x10(%rax), %rax
imulq $0x28, -0x18(%rbp), %rcx
addq %rcx, %rax
movl 0x20(%rax), %eax
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
movl %eax, %eax
movl %eax, %edx
movq -0x80(%rbp), %rax
imulq $0x18, -0x60(%rbp), %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movq -0x80(%rbp), %rsi
imulq $0x18, -0x60(%rbp), %rcx
addq %rcx, %rsi
movq (%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, (%rsi)
movq %rdx, (%rax,%rcx,8)
jmp 0xd92e
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0xd62b
jmp 0xd941
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0xd5e6
movq $0x0, -0x18(%rbp)
movq -0x70(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0xdcdf
movq -0x70(%rbp), %rax
movq 0x28(%rax), %rax
imulq $0x30, -0x18(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
movl 0x20(%rax), %eax
shrl $0x1e, %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0xd9a9
movq -0x78(%rbp), %rax
movl 0x20(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0xd9ae
jmp 0xdcce
movq -0x70(%rbp), %rdi
movq -0x78(%rbp), %rsi
callq 0xdd40
movq %rax, -0x40(%rbp)
movq -0x70(%rbp), %rdi
movq -0x78(%rbp), %rsi
callq 0xddc0
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rax
cmpq -0x48(%rbp), %rax
jbe 0xda12
movq -0x40(%rbp), %rax
xorq $0x1, %rax
movq %rax, -0x40(%rbp)
movq -0x48(%rbp), %rax
xorq $0x1, %rax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0xe8(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0xe8(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0xda12
movq -0x98(%rbp), %rdi
movq -0x40(%rbp), %rcx
movq -0x48(%rbp), %rax
movq %rcx, -0xf8(%rbp)
movq %rax, -0x100(%rbp)
movq -0x100(%rbp), %rsi
movq -0xf8(%rbp), %rdx
callq 0x5020
movl %eax, -0x8c(%rbp)
movq -0x98(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x8c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x80(%rbp), %rax
imulq $0x18, -0x60(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rax
cmpq $0x2, (%rax)
jne 0xdac2
movq -0x88(%rbp), %rax
movq 0x10(%rax), %rax
movq (%rax), %rax
cmpq -0x60(%rbp), %rax
jne 0xda9e
jmp 0xdabd
leaq 0x20113(%rip), %rdi     # 0x2dbb8
leaq 0x1ff07(%rip), %rsi     # 0x2d9b3
movl $0x8b3, %edx            # imm = 0x8B3
leaq 0x20111(%rip), %rcx     # 0x2dbc9
callq 0x21e0
jmp 0xdcce
movq $0x0, -0x50(%rbp)
movq $-0x1, -0x38(%rbp)
movq $0x1, -0x20(%rbp)
movq -0x88(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x30(%rbp), %rax
jae 0xdb44
movq -0x88(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x20(%rbp), %rcx
subq $0x1, %rcx
movq (%rax,%rcx,8), %rax
movq -0x78(%rbp), %rcx
cmpq 0x28(%rcx), %rax
jne 0xdb1b
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x88(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
addq -0x50(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x20(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x20(%rbp)
jmp 0xdae8
cmpq $0x0, -0x50(%rbp)
jne 0xdb50
jmp 0xdcce
movq -0x38(%rbp), %rax
cmpq -0x30(%rbp), %rax
jae 0xdb5c
jmp 0xdb7b
leaq 0x20091(%rip), %rdi     # 0x2dbf4
leaq 0x1fe49(%rip), %rsi     # 0x2d9b3
movl $0x8bf, %edx            # imm = 0x8BF
leaq 0x20053(%rip), %rcx     # 0x2dbc9
callq 0x21e0
movq -0x78(%rbp), %rax
movl 0x20(%rax), %eax
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
cvtsi2sd %eax, %xmm0
movq -0x50(%rbp), %xmm1
movaps 0x1fc29(%rip), %xmm3    # 0x2d7c0
punpckldq %xmm3, %xmm1    # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
movapd 0x1fc2d(%rip), %xmm2    # 0x2d7d0
subpd %xmm2, %xmm1
movaps %xmm1, %xmm4
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm4, %xmm1
divsd %xmm1, %xmm0
movq -0x88(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %xmm1
punpckldq %xmm3, %xmm1    # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
subpd %xmm2, %xmm1
movaps %xmm1, %xmm2
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
callq 0x2110
movq %rax, -0x50(%rbp)
cmpl $0x2, -0xc(%rbp)
jle 0xdc78
movq 0x263fd(%rip), %rax     # 0x33ff8
movq (%rax), %rdi
movq -0x78(%rbp), %rax
movq (%rax), %rcx
shrq %rcx
movq -0x78(%rbp), %rax
movq (%rax), %rdx
andq $0x1, %rdx
leaq 0x1fcfc(%rip), %rax     # 0x2d916
movsbl (%rax,%rdx), %r8d
movq -0x78(%rbp), %rax
movq 0x8(%rax), %r9
shrq %r9
movq -0x78(%rbp), %rax
movq 0x8(%rax), %rdx
andq $0x1, %rdx
leaq 0x1fcd9(%rip), %rax     # 0x2d916
movsbl (%rax,%rdx), %r11d
movq -0x78(%rbp), %rax
movl 0x20(%rax), %r10d
andl $0x3fffffff, %r10d      # imm = 0x3FFFFFFF
movq -0x50(%rbp), %rax
leaq 0x1ff9e(%rip), %rsi     # 0x2dbfa
leaq 0x1ffd1(%rip), %rdx     # 0x2dc34
movl %r11d, (%rsp)
movl %r10d, 0x8(%rsp)
movq %rax, 0x10(%rsp)
movb $0x0, %al
callq 0x2290
movq -0x50(%rbp), %rax
movl %eax, %edx
movq -0x78(%rbp), %rax
movl 0x20(%rax), %ecx
andl $0x3fffffff, %edx       # imm = 0x3FFFFFFF
andl $0xc0000000, %ecx       # imm = 0xC0000000
orl %edx, %ecx
movl %ecx, 0x20(%rax)
movq -0x70(%rbp), %rdi
movq -0x78(%rbp), %rsi
callq 0xde90
movq %rax, -0x78(%rbp)
cmpq $0x0, -0x78(%rbp)
je 0xdccc
movq -0x50(%rbp), %rax
movl %eax, %edx
movq -0x78(%rbp), %rax
movl 0x20(%rax), %ecx
andl $0x3fffffff, %edx       # imm = 0x3FFFFFFF
andl $0xc0000000, %ecx       # imm = 0xC0000000
orl %edx, %ecx
movl %ecx, 0x20(%rax)
jmp 0xdcce
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0xd966
movq -0x70(%rbp), %rdi
callq 0x20020
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x58(%rbp), %rax
jae 0xdd1d
movq -0x80(%rbp), %rax
imulq $0x18, -0x18(%rbp), %rcx
addq %rcx, %rax
movq 0x10(%rax), %rdi
callq 0x2060
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0xdcf0
movq -0x80(%rbp), %rdi
callq 0x2060
movq -0x98(%rbp), %rdi
callq 0x4740
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
nopl (%rax,%rax)