LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/hic.cpp
// Function: get_specific_weight_by_chain(unsigned long*, unsigned long, unsigned long, unsigned long, hc_links*, unsigned char*, unsigned char)
double get_specific_weight_by_chain(uint64_t* ids, uint64_t beg_idx, uint64_t end_idx, uint64_t p_id,
hc_links* link, uint8_t* vis, uint8_t flag)
{
    uint64_t x, k;
    uint32_t uid;
    double w;
    for (x = beg_idx, w = 0; x <= end_idx; x++)
    {
        uid = (uint32_t)((uint32_t)ids[x])>>1;
        for (k = 0; k < link->a.a[uid].e.n; k++)
        {
            if(link->a.a[uid].e.a[k].del) continue;
            if(vis[link->a.a[uid].e.a[k].uID] != flag) continue;
            w += link->a.a[uid].e.a[k].weight;
        }
    }

    return w;
}

// Assembly:
xorpd %xmm0, %xmm0
cmpq %rdx, %rsi
ja 0x150b0b
movb 0x8(%rsp), %al
movq 0x10(%r8), %rcx
movl (%rdi,%rsi,8), %r8d
shrl %r8d
leaq (%r8,%r8,2), %r10
shlq $0x4, %r10
movq (%rcx,%r10), %r8
testq %r8, %r8
je 0x150b03
addq %rcx, %r10
movq 0x10(%r10), %r10
cmpb $0x0, 0x18(%r10)
js 0x150afa
movl 0x8(%r10), %r11d
cmpb %al, (%r9,%r11)
jne 0x150afa
addsd (%r10), %xmm0
addq $0x28, %r10
decq %r8
jne 0x150ae4
incq %rsi
cmpq %rdx, %rsi
jbe 0x150ac5
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/hic.cpp
// Function: get_max_hap_g(bub_sort_vec*, unsigned int*)
uint32_t get_max_hap_g(bub_sort_vec* w_stack, uint32_t* require_iso)
{
    uint32_t k, max_idx = (uint32_t)-1;
    double max_w;
    for (k = require_iso? (*require_iso)+1 : 0, max_idx = (uint32_t)-1; k < w_stack->n; k++)
    {
        if(w_stack->a[k].used) continue;
        if(!require_iso)
        {
            if(w_stack->a[k].p_id == (uint32_t)-1) continue;
            if((max_idx == (uint32_t)-1) || (max_idx != (uint32_t)-1 && max_w < w_stack->a[k].weight))
            {
                max_w = w_stack->a[k].weight;
                max_idx = k;
            }
        }
        else
        {
            if(w_stack->a[k].p_id != (uint32_t)-1) continue;
            return k;
        }
    }

    if(require_iso && (*require_iso) != 0)
    {
        for (k = 0; k < w_stack->n; k++)
        {
            if(w_stack->a[k].used) continue;
            if(w_stack->a[k].p_id != (uint32_t)-1) continue;
            return k;
        }
    }

    return max_idx;
}

// Assembly:
testq %rsi, %rsi
je 0x150b31
movl (%rsi), %eax
incl %eax
jmp 0x150b33
xorl %eax, %eax
movq 0x8(%rdi), %rcx
movl %eax, %r10d
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
cmpq %r10, %rcx
jbe 0x150b93
movq (%rdi), %r8
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
leaq (%r10,%r10,4), %r10
cmpb $0x0, 0x20(%r8,%r10,8)
jne 0x150b89
leaq (%r8,%r10,8), %r10
movq 0x8(%r10), %r11
testq %rsi, %rsi
je 0x150b6d
cmpq %r9, %r11
jne 0x150b89
jmp 0x150bd3
cmpq %r9, %r11
je 0x150b89
cmpl $-0x1, %edx
je 0x150b82
movsd (%r10), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x150b89
movsd (%r10), %xmm0
movl %eax, %edx
incl %eax
movq %rax, %r10
cmpq %rax, %rcx
ja 0x150b4d
testq %rsi, %rsi
je 0x150bd1
cmpl $0x0, (%rsi)
sete %al
testq %rcx, %rcx
sete %sil
orb %al, %sil
jne 0x150bd1
movq (%rdi), %rsi
xorl %eax, %eax
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
leaq (%rax,%rax,4), %r8
cmpb $0x0, 0x20(%rsi,%r8,8)
jne 0x150bca
leaq (%rsi,%r8,8), %r8
cmpq %rdi, 0x8(%r8)
je 0x150bd3
incl %eax
cmpq %rax, %rcx
ja 0x150bb4
movl %edx, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/hic.cpp
// Function: update_bub_sort_vec(unsigned long*, bub_sort_vec*, unsigned int, hc_links*, unsigned int*)
void update_bub_sort_vec(uint64_t* ids, bub_sort_vec* w_stack, uint32_t max_idx, hc_links* link,
uint32_t* set_hap)
{
    w_stack->a[max_idx].used = 1;
    uint64_t i, k;
    uint32_t uid, pid_idx;
    for (i = w_stack->a[max_idx].beg_idx; i <= w_stack->a[max_idx].end_idx; i++)
    {
        uid = (uint32_t)((uint32_t)ids[i])>>1;
        for (k = 0; k < link->a.a[uid].e.n; k++)
        {
            if(link->a.a[uid].e.a[k].del) continue;
            pid_idx = set_hap[link->a.a[uid].e.a[k].uID];
            if(pid_idx == (uint32_t)-1) continue;
            if(w_stack->a[pid_idx].used) continue;
            w_stack->a[pid_idx].weight += link->a.a[uid].e.a[k].weight;
        }
    }
}

// Assembly:
pushq %rbx
movq (%rsi), %rax
movl %edx, %edx
leaq (%rdx,%rdx,4), %rsi
movb $0x1, 0x20(%rax,%rsi,8)
movq 0x10(%rax,%rsi,8), %rdx
movq 0x18(%rax,%rsi,8), %rsi
cmpq %rsi, %rdx
ja 0x150c5c
movq 0x10(%rcx), %rcx
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
movl (%rdi,%rdx,8), %r10d
shrl %r10d
leaq (%r10,%r10,2), %r11
shlq $0x4, %r11
movq (%rcx,%r11), %r10
testq %r10, %r10
je 0x150c54
addq %rcx, %r11
movq 0x10(%r11), %r11
cmpb $0x0, 0x18(%r11)
js 0x150c4b
movl 0x8(%r11), %ebx
movl (%r8,%rbx,4), %ebx
cmpq %r9, %rbx
je 0x150c4b
leaq (%rbx,%rbx,4), %rbx
cmpb $0x0, 0x20(%rax,%rbx,8)
jne 0x150c4b
leaq (%rax,%rbx,8), %rbx
movsd (%r11), %xmm0
addsd (%rbx), %xmm0
movsd %xmm0, (%rbx)
addq $0x28, %r11
decq %r10
jne 0x150c1b
incq %rdx
cmpq %rsi, %rdx
jbe 0x150bfc
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/hic.cpp
// Function: get_path_phasing_weight(unsigned int, unsigned int, unsigned int, bub_p_t_warp*, kv_u_trans_t*)
double get_path_phasing_weight(uint32_t query, uint32_t v0, uint32_t root, bub_p_t_warp *b, kv_u_trans_t *ta)
{
    if(v0 == root) return 0;
    uint32_t v, u;
    u_trans_t *p = NULL;
    double nw = 0;
    v = v0;
    do {
        u = b->a[v].p; // u->v
        get_u_trans_spec(ta, query>>1, v>>1, &p, NULL);
        if(p && (!p->del)) nw += p->nw;
        v = u;
    } while (v != root);

    return nw;
}

// Assembly:
xorpd %xmm0, %xmm0
cmpl %edx, %esi
je 0x15120f
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %rbx
movq %rcx, %r14
movl %edx, %ebp
movl %esi, %r12d
movl %edi, %r15d
leaq 0x10(%rsp), %r13
movq $0x0, (%r13)
shrl %r15d
xorpd %xmm0, %xmm0
movsd %xmm0, 0x8(%rsp)
movl %r12d, %edx
movq (%r14), %rax
movl %r12d, %ecx
imulq $0x38, %rcx, %rcx
movl (%rax,%rcx), %r12d
shrl %edx
movq %rbx, %rdi
movl %r15d, %esi
movq %r13, %rcx
xorl %r8d, %r8d
callq 0xca79c
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x1511f6
cmpb $0x0, 0x28(%rax)
movsd 0x8(%rsp), %xmm0
js 0x1511fc
addsd 0x20(%rax), %xmm0
jmp 0x1511fc
movsd 0x8(%rsp), %xmm0
cmpl %ebp, %r12d
jne 0x1511af
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/hic.cpp
// Function: get_related_phasing_weight(unsigned int, kv_u_trans_t*, double*, double*, signed char*)
void get_related_phasing_weight(uint32_t x, kv_u_trans_t *ta, double* w0, double* w1, int8_t *s)
{
    (*w0) = (*w1) = 0;
    if(x >= ta->idx.n) return;
    uint32_t e_n, k;
    u_trans_t* e = u_trans_a(*ta, x);
    e_n = u_trans_n(*ta, x);
    for (k = 0; k < e_n; k++)
    {
        if(e[k].del) continue;
        if(s[e[k].tn] > 0) (*w0) += e[k].nw;
        else if(s[e[k].tn] < 0) (*w1) += e[k].nw;
    }
}

// Assembly:
xorl %eax, %eax
movq %rax, (%rcx)
movq %rax, (%rdx)
movl %edi, %eax
cmpq %rax, 0x18(%rsi)
jbe 0x151288
movq 0x28(%rsi), %rdi
movq (%rdi,%rax,8), %rax
testl %eax, %eax
je 0x151288
movq 0x10(%rsi), %rsi
movq %rax, %rdi
shrq $0x20, %rdi
movl %eax, %r9d
leaq (%rdi,%rdi,2), %rax
shlq $0x4, %rax
addq %rsi, %rax
addq $0x28, %rax
shlq $0x4, %r9
leaq (%r9,%r9,2), %rsi
xorl %edi, %edi
cmpb $0x0, (%rax,%rdi)
js 0x15127f
movl -0x14(%rax,%rdi), %r9d
cmpb $0x0, (%r8,%r9)
movq %rdx, %r9
jle 0x15127a
movsd -0x8(%rax,%rdi), %xmm0
addsd (%r9), %xmm0
movsd %xmm0, (%r9)
jmp 0x15127f
movq %rcx, %r9
js 0x151268
addq $0x30, %rdi
cmpq %rdi, %rsi
jne 0x151253
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/hic.cpp
// Function: set_phase_path(bub_p_t_warp*, unsigned int, kv_u_trans_t*, ps_t*)
void set_phase_path(bub_p_t_warp *b, uint32_t root, kv_u_trans_t *ta, ps_t *s)
{
    int8_t f;
    uint32_t v, u;
    double z[2], cur_w[2];
    z[0] = z[1] = 0;

    v = b->S.a[0];
    do {
        u = b->a[v].p; // u->v
        if(v != b->S.a[0]) 
        {
            get_related_phasing_weight(v>>1, ta, &cur_w[0], &cur_w[1], s->s);
            z[0] += cur_w[0]; z[1] += cur_w[1];
        }
        v = u;
    } while (v != root);

    if(z[0] - z[1] < 0)
    {
        f = 1;
    }
    else if(z[0] - z[1] > 0)
    {
        f = -1;
    }
    else
    {
        s->xs = kr_splitmix64(s->xs);
        f = s->xs&1? 1 : -1;
    }

    v = b->S.a[0];
    do {
        u = b->a[v].p; // u->v
        if(v != b->S.a[0]) s->s[v>>1] = f;
        v = u;
    } while (v != root);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r15
movq %rdx, 0x10(%rsp)
movl %esi, %ebp
movq %rdi, %r14
movq (%rdi), %r13
movq 0x18(%rdi), %rax
movl (%rax), %r12d
xorpd %xmm0, %xmm0
movl %r12d, %edi
xorpd %xmm1, %xmm1
movl %edi, %eax
imulq $0x38, %rax, %rax
movl (%r13,%rax), %ebx
cmpl %r12d, %edi
je 0x151303
shrl %edi
movq (%r15), %r8
movq 0x10(%rsp), %rsi
movq %rsp, %rdx
leaq 0x8(%rsp), %rcx
movsd %xmm1, 0x20(%rsp)
movsd %xmm0, 0x18(%rsp)
callq 0x151210
movsd 0x18(%rsp), %xmm0
movsd 0x20(%rsp), %xmm1
addsd (%rsp), %xmm1
addsd 0x8(%rsp), %xmm0
movl %ebx, %edi
cmpl %ebp, %ebx
jne 0x1512b9
subsd %xmm0, %xmm1
movb $0x1, %al
xorpd %xmm0, %xmm0
ucomisd %xmm1, %xmm0
ja 0x15137a
movb $-0x1, %al
ucomisd %xmm0, %xmm1
ja 0x15137a
movabsq $-0x61c8864680b583eb, %rax # imm = 0x9E3779B97F4A7C15
addq 0x8(%r15), %rax
movq %rax, %rdx
shrq $0x1e, %rdx
xorq %rax, %rdx
movabsq $-0x40a7b892e31b1a47, %rax # imm = 0xBF58476D1CE4E5B9
imulq %rdx, %rax
movq %rax, %rdx
shrq $0x1b, %rdx
xorq %rax, %rdx
movabsq $-0x6b2fb644ecceee15, %rax # imm = 0x94D049BB133111EB
imulq %rdx, %rax
movq %rax, %rdx
shrq $0x1f, %rdx
xorq %rax, %rdx
movq %rdx, 0x8(%r15)
andl $0x1, %edx
xorl %eax, %eax
cmpq $0x1, %rdx
sbbl %eax, %eax
orb $0x1, %al
movl %r12d, %edx
imulq $0x38, %rdx, %rdi
movq (%r14), %rdx
movq 0x18(%r14), %rsi
movl (%rdx,%rdi), %edi
cmpl (%rsi), %r12d
je 0x15139a
movq (%r15), %rdx
shrl %r12d
movb %al, (%rdx,%r12)
movl %edi, %r12d
cmpl %ebp, %edi
jne 0x15137a
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/hic.cpp
// Function: delete_sg_e_by_ug(asg_t*, ma_ug_t*, unsigned int, unsigned int)
void delete_sg_e_by_ug(asg_t* rg, ma_ug_t* ug, uint32_t v, uint32_t w)
{
    uint32_t vx, wx;
    vx = (v&1?((ug->u.a[v>>1].a[0]>>32)^1):(ug->u.a[v>>1].a[ug->u.a[v>>1].n-1]>>32));
    wx = (w&1?((ug->u.a[w>>1].a[ug->u.a[w>>1].n-1]>>32)^1):(ug->u.a[w>>1].a[0]>>32));
    asg_arc_del(rg, vx, wx, 1); asg_arc_del(rg, wx^1, vx^1, 1);
}

// Assembly:
movl %edx, %r8d
shrl %r8d
movq 0x10(%rsi), %rax
testb $0x1, %dl
jne 0x1534e9
leaq (%r8,%r8,4), %rdx
movq 0x18(%rax,%rdx,8), %r8
movl 0x10(%rax,%rdx,8), %eax
decl %eax
movl 0x4(%r8,%rax,8), %eax
jmp 0x1534f9
leaq (%r8,%r8,4), %rdx
movq 0x18(%rax,%rdx,8), %rax
movl 0x4(%rax), %eax
xorq $0x1, %rax
movl %ecx, %r8d
shrl %r8d
movq 0x10(%rsi), %rdx
testb $0x1, %cl
jne 0x153516
leaq (%r8,%r8,4), %rcx
movq 0x18(%rdx,%rcx,8), %rcx
movl 0x4(%rcx), %ecx
jmp 0x15352d
leaq (%r8,%r8,4), %rcx
movq 0x18(%rdx,%rcx,8), %rsi
movl 0x10(%rdx,%rcx,8), %ecx
decl %ecx
movl 0x4(%rsi,%rcx,8), %ecx
xorq $0x1, %rcx
movq 0x28(%rdi), %rdx
movq (%rdx,%rax,8), %r8
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq %r8, %rsi
andq %rdx, %rsi
je 0x153577
movq 0x8(%rdi), %r9
shrq $0x20, %r8
shlq $0x3, %rsi
leaq (%rsi,%rsi,2), %rsi
leaq (%r8,%r8,2), %r8
leaq (%r9,%r8,8), %r8
addq $0xc, %r8
xorl %r9d, %r9d
cmpl %ecx, -0x4(%r8,%r9)
jne 0x15356e
orb $-0x80, 0x3(%r8,%r9)
addq $0x18, %r9
cmpq %r9, %rsi
jne 0x153561
movq 0x28(%rdi), %rsi
xorq $0x1, %rcx
movq (%rsi,%rcx,8), %rsi
andq %rsi, %rdx
je 0x1535bf
movq 0x8(%rdi), %rdi
shrq $0x20, %rsi
shlq $0x3, %rdx
leaq (%rdx,%rdx,2), %rcx
leaq (%rsi,%rsi,2), %rdx
leaq (%rdi,%rdx,8), %rdx
addq $0xc, %rdx
xorl %esi, %esi
movl -0x4(%rdx,%rsi), %edi
xorl %eax, %edi
cmpl $0x1, %edi
jne 0x1535b6
orb $-0x80, 0x3(%rdx,%rsi)
addq $0x18, %rsi
cmpq %rsi, %rcx
jne 0x1535a6
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/hic.cpp
// Function: get_specific_hic_weight_by_chain(unsigned int, kv_u_trans_t*, unsigned char*, unsigned char)
double get_specific_hic_weight_by_chain(uint32_t uid, kv_u_trans_t *ta, uint8_t* vis, uint8_t flag)
{
    u_trans_t *e = u_trans_a(*ta, uid);
    uint64_t k, e_n = u_trans_n(*ta, uid);
    double w = 0;
    
    for (k = 0; k < e_n; k++)
    {
        if(e[k].del) continue;
        if(vis[e[k].tn] != flag) continue;
        w += (e[k].nw>=0?e[k].nw:-e[k].nw);
    }
    return w;
}

// Assembly:
movq 0x28(%rsi), %rax
movl %edi, %edi
movq (%rax,%rdi,8), %rdi
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
andq %rdi, %rax
je 0x155025
movq 0x10(%rsi), %rsi
shrq $0x20, %rdi
shlq $0x4, %rax
leaq (%rax,%rax,2), %rax
leaq (%rdi,%rdi,2), %rdi
shlq $0x4, %rdi
addq %rdi, %rsi
addq $0x28, %rsi
xorpd %xmm0, %xmm0
xorl %edi, %edi
movapd 0xd9fdd(%rip), %xmm1    # 0x22efc0
cmpb $0x0, (%rsi,%rdi)
js 0x15501b
movl -0x14(%rsi,%rdi), %r8d
cmpb %cl, (%rdx,%r8)
jne 0x15501b
movsd -0x8(%rsi,%rdi), %xmm2
movapd %xmm2, %xmm3
xorpd %xmm1, %xmm3
movapd %xmm3, %xmm4
cmpnlesd %xmm2, %xmm4
andpd %xmm4, %xmm3
andnpd %xmm2, %xmm4
orpd %xmm3, %xmm4
addsd %xmm4, %xmm0
addq $0x30, %rdi
cmpq %rdi, %rax
jne 0x154fe3
retq
xorps %xmm0, %xmm0
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/hic.cpp
// Function: update_bubble_weight(bub_sort_vec*, unsigned int, kv_u_trans_t*, unsigned char*, unsigned int)
void update_bubble_weight(bub_sort_vec* w_stack, uint32_t idx, kv_u_trans_t *ta, uint8_t* vis, uint32_t flag_cur)
{
    w_stack->a[idx].used = 1;
    uint32_t k, m, uid = w_stack->a[idx].p_id>>1;
    u_trans_t *e = u_trans_a(*ta, uid);
    uint32_t e_n = u_trans_n(*ta, uid);
    for (k = 0; k < e_n; k++)
    {
        if(e[k].del) continue;
        if(vis[e[k].tn] != flag_cur) continue;
        for (m = 0; m < w_stack->n; m++)
        {
            if(e[k].tn == (w_stack->a[m].p_id>>1)) break;
        }
        if(m >= w_stack->n) continue;
        if(w_stack->a[m].used) continue;
        w_stack->a[m].weight += (e[k].nw>=0?e[k].nw:-e[k].nw);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq (%rdi), %rax
movl %esi, %esi
leaq (%rsi,%rsi,4), %rsi
movb $0x1, 0x20(%rax,%rsi,8)
movq 0x28(%rdx), %r9
movabsq $0x1fffffffe, %r10      # imm = 0x1FFFFFFFE
andq 0x8(%rax,%rsi,8), %r10
movq (%r9,%r10,4), %r9
testl %r9d, %r9d
je 0x15513a
movq %r9, %rsi
shrq $0x20, %rsi
leaq (%rsi,%rsi,2), %rsi
shlq $0x4, %rsi
addq 0x10(%rdx), %rsi
movl %r9d, %edx
xorl %r9d, %r9d
movapd 0xd9f40(%rip), %xmm0    # 0x22efc0
leaq (%r9,%r9,2), %r10
shlq $0x4, %r10
cmpb $0x0, 0x28(%rsi,%r10)
js 0x15512e
addq %rsi, %r10
movl 0x14(%r10), %r11d
movzbl (%rcx,%r11), %ebx
cmpl %r8d, %ebx
jne 0x15512e
movq 0x8(%rdi), %rbx
testq %rbx, %rbx
setne %bpl
je 0x15512e
movq 0x8(%rax), %r14
shrq %r14
cmpq %r11, %r14
jne 0x1550c7
xorl %r14d, %r14d
jmp 0x1550ee
movl $0x1, %r15d
movl %r15d, %r14d
cmpq %r14, %rbx
seta %bpl
jbe 0x15512e
leaq (%r14,%r14,4), %r15
movq 0x8(%rax,%r15,8), %r12
shrq %r12
leal 0x1(%r14), %r15d
cmpq %r11, %r12
jne 0x1550cd
testb %bpl, %bpl
je 0x15512e
leaq (%r14,%r14,4), %r11
cmpb $0x0, 0x20(%rax,%r11,8)
jne 0x15512e
movsd 0x20(%r10), %xmm1
movapd %xmm1, %xmm2
xorpd %xmm0, %xmm2
movapd %xmm2, %xmm3
cmpnlesd %xmm1, %xmm3
andpd %xmm3, %xmm2
andnpd %xmm1, %xmm3
orpd %xmm2, %xmm3
addsd (%rax,%r11,8), %xmm3
movsd %xmm3, (%rax,%r11,8)
incq %r9
cmpq %rdx, %r9
jne 0x155080
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/hic.cpp
// Function: reorder_bubbles(bubble_type*, kv_u_trans_t*, unsigned int)
void reorder_bubbles(bubble_type* bub, kv_u_trans_t *ta, uint32_t n_utg)
{
    // double index_time = yak_realtime();
    uint8_t* vis = NULL; MALLOC(vis, n_utg);
    bub_sort_vec w_stack; kv_init(w_stack);
    uint32_t i;

    for (i = 0; i < bub->chain_weight.n; i++)
    {
        if(bub->chain_weight.a[i].del) continue;
        reorder_bubbble_chain(ta, bub, &w_stack, vis, n_utg, bub->chain_weight.a[i].id);
    }

    free(vis); kv_destroy(w_stack);
    // fprintf(stderr, "[M::%s::%.3f]\n", __func__, yak_realtime()-index_time);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
movl %edx, %edi
callq 0x2280
movq %rax, %r12
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
cmpq $0x0, 0xc8(%r15)
je 0x1554e5
movl $0x1, %ebp
xorl %eax, %eax
movq %rsp, %r13
movq 0xd8(%r15), %rcx
shlq $0x5, %rax
cmpb $0x0, 0x18(%rcx,%rax)
jne 0x1554d8
addq %rax, %rcx
movl 0x10(%rcx), %r9d
movq %r14, %rdi
movq %r15, %rsi
movq %r13, %rdx
movq %r12, %rcx
movl %ebx, %r8d
callq 0x155143
movl %ebp, %eax
incl %ebp
cmpq %rax, 0xc8(%r15)
ja 0x1554ab
movq %r12, %rdi
callq 0x2220
movq (%rsp), %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2220
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/hic.cpp
// Function: destory_contig_partition(H_partition*)
void destory_contig_partition(H_partition* hap)
{
    free(hap->lock);
    free(hap->hap);
    destory_G_partition(&(hap->g_p));
    destory_G_partition(&(hap->group_g_p));
    kv_destroy(hap->label_buffer);
    kv_destroy(hap->b.vis);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0x2220
movq 0x10(%rbx), %rdi
callq 0x2220
leaq 0x38(%rbx), %rdi
callq 0x142f71
leaq 0x58(%rbx), %rdi
callq 0x142f71
movq 0x88(%rbx), %rdi
callq 0x2220
movq 0xa0(%rbx), %rdi
popq %rbx
jmp 0x2220
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/hic.cpp
// Function: label_unitigs_sm(signed char*, mc_gg_status*, ma_ug_t*)
void label_unitigs_sm(int8_t *s, mc_gg_status *sa, ma_ug_t* ug)
{
    memset(R_INF.trio_flag, AMBIGU, R_INF.total_reads * sizeof(uint8_t));
    uint32_t i, k, flag = AMBIGU;
    ma_utg_t *u = NULL;

    for (i = 0; i < ug->g->n_seq; i++)
    {
        if(ug->g->seq[i].del) continue;
        flag = 0;
        if(s)
        {
            if(s[i] == 0) continue;
            flag = (s[i] > 0? FATHER:MOTHER);
        }

        if(sa)
        {
            if(sa[i].s != 1 && sa[i].s != 2) continue;
            flag = sa[i].s;
        }
        
        u = &ug->u.a[i];
        if(u->m == 0) continue;
        for (k = 0; k < u->n; k++)
        {
            R_INF.trio_flag[u->a[k]>>33] = flag;
        }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x1355c4(%rip), %r12    # 0x28b230
movq 0x28(%r12), %rdi
movq 0x50(%r12), %rdx
xorl %esi, %esi
callq 0x20e0
movq 0x18(%rbx), %rcx
testl $0x7fffffff, 0x14(%rcx) # imm = 0x7FFFFFFF
je 0x155d1e
xorl %eax, %eax
movq 0x20(%rcx), %rcx
cmpl $0x0, (%rcx,%rax,8)
js 0x155d05
testq %r15, %r15
je 0x155cb0
cmpb $0x0, (%r15,%rax)
je 0x155d05
setle %cl
movzbl %cl, %ecx
incl %ecx
jmp 0x155cb2
xorl %ecx, %ecx
testq %r14, %r14
je 0x155cca
movq %rax, %rcx
shlq $0x5, %rcx
movl (%r14,%rcx), %ecx
leal -0x1(%rcx), %edx
cmpl $0x1, %edx
ja 0x155d05
movq 0x10(%rbx), %rdx
leaq (%rax,%rax,4), %rsi
cmpl $0x0, 0xc(%rdx,%rsi,8)
je 0x155d05
leaq (%rdx,%rsi,8), %rdx
cmpl $0x0, 0x10(%rdx)
je 0x155d05
xorl %esi, %esi
movq 0x28(%r12), %rdi
movq 0x18(%rdx), %r8
movq (%r8,%rsi,8), %r8
shrq $0x21, %r8
movb %cl, (%rdi,%r8)
incq %rsi
movl 0x10(%rdx), %edi
cmpq %rdi, %rsi
jb 0x155ce5
incq %rax
movq 0x18(%rbx), %rcx
movl 0x14(%rcx), %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
cmpq %rdx, %rax
jb 0x155c90
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/hic.cpp
// Function: print_debug_bubble_graph(bubble_type*, ma_ug_t*, char const*)
void print_debug_bubble_graph(bubble_type* bub, ma_ug_t* ug, const char *fn)
{
    char *buf = (char*)calloc(strlen(fn) + 25, 1);
    sprintf(buf, "%s.bub.gfa", fn);
    FILE* fp = fopen(buf, "w");

    print_bubble_utg(bub, ug, "btg", fp);

    fclose(fp);
    free(buf);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movq %rdx, %rdi
callq 0x2090
leaq 0x19(%rax), %rdi
movl $0x1, %esi
callq 0x2120
movq %rax, %r12
leaq 0xd9c40(%rip), %rsi     # 0x230210
movq %rax, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x2050
leaq 0xe5e1a(%rip), %rsi     # 0x23c3fe
movq %r12, %rdi
callq 0x2210
movq %rax, %r15
leaq 0xd9c25(%rip), %rdx     # 0x23021b
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rcx
callq 0x156166
movq %r15, %rdi
callq 0x2190
movq %r12, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2220
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/hic.cpp
// Function: print_bubble_chain(bubble_type*)
void print_bubble_chain(bubble_type* bub)
{
    uint32_t m, i, k;
    uint32_t beg, sink, *a = NULL, n;
    uint64_t bid;
    ma_utg_t *u = NULL; 
    for (m = 0; m < bub->chain_weight.n; m++)
    {
        if(bub->chain_weight.a[m].del) continue;
        u = &(bub->b_ug->u.a[bub->chain_weight.a[m].id]);
        fprintf(stderr, "\nChain_id=%lu\n", bub->chain_weight.a[m].id);
        for (i = 0; i < u->n; i++)
        {
            bid = u->a[i]>>33;
            get_bubbles(bub, bid, &beg, &sink, &a, &n, NULL);
            fprintf(stderr, "btg%.6lu%c, beg-utg%.6ul, sink-utg%.6ul\n", 
                        bid, "fb"[bid<bub->f_bub?0:1], (beg>>1)+1, (sink>>1)+1);
            for (k = 0; k < n; k++)
            {
                if(k != 0 && (k%5)==0) fprintf(stderr, "\n");
                fprintf(stderr, "m-utg%.6ul\t", (a[k]>>1)+1);
            }
            fprintf(stderr, "\n");
            
        }
    }
}

// Assembly:
cmpq $0x0, 0xc8(%rdi)
je 0x156768
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0x13399b(%rip), %r13    # 0x289fe0
xorl %eax, %eax
xorl %r14d, %r14d
movq 0xd8(%rbx), %rcx
shlq $0x5, %rax
cmpb $0x0, 0x18(%rcx,%rax)
je 0x156670
incl %r14d
movq %r14, %rax
cmpq %r14, 0xc8(%rbx)
ja 0x15664a
jmp 0x15675a
addq %rax, %rcx
movq 0xc0(%rbx), %rax
movq 0x10(%rax), %r15
movq 0x10(%rcx), %rdx
leaq (%rdx,%rdx,4), %r12
movq (%r13), %rdi
leaq 0xd9b8e(%rip), %rsi     # 0x23021f
xorl %eax, %eax
callq 0x22b0
cmpl $0x0, 0x10(%r15,%r12,8)
je 0x15665c
leaq (%r15,%r12,8), %rax
xorl %r15d, %r15d
movq %rax, 0x10(%rsp)
movq 0x18(%rax), %rax
movq (%rax,%r15,8), %rdx
shrq $0x21, %rdx
movq 0x28(%rbx), %rcx
movq 0x40(%rbx), %rax
movq %r13, %r12
movl (%rax,%rdx,4), %r13d
movl 0x4(%rax,%rdx,4), %ebp
subl %r13d, %ebp
movl (%rcx,%r13,4), %r8d
leal 0x1(%r13), %eax
movq %rcx, 0x8(%rsp)
movl (%rcx,%rax,4), %r9d
movq (%r12), %rdi
cmpq 0x80(%rbx), %rdx
leaq 0xd9091(%rip), %rax     # 0x22f782
sbbq $-0x1, %rax
movsbl (%rax), %ecx
shrl %r8d
incl %r8d
shrl %r9d
incl %r9d
leaq 0xd9b23(%rip), %rsi     # 0x23022e
xorl %eax, %eax
callq 0x22b0
addl $-0x2, %ebp
jne 0x156744
movq (%r12), %rsi
movl $0xa, %edi
callq 0x2270
incq %r15
movq 0x10(%rsp), %rcx
movl 0x10(%rcx), %eax
cmpq %rax, %r15
movq %r12, %r13
movq %rcx, %rax
jb 0x1566ac
jmp 0x15665c
movq 0x8(%rsp), %rax
leaq (%rax,%r13,4), %rsi
addq $0x8, %rsi
movl %ebp, %edi
callq 0x1d98e
jmp 0x156717
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/hic.cpp
// Function: reset_H_partition(H_partition*, unsigned int)
void reset_H_partition(H_partition* hap, uint32_t is_init)
{
    if(!is_init)
    {
        hap->n = 0;
        free(hap->lock);
        free(hap->hap);
        hap->m[0] = hap->m[1] = hap->m[2] = (uint32_t)-1;
        hap->label = hap->label_add = hap->label_shift = (uint32_t)-1;
        destory_G_partition(&(hap->g_p)); memset(&(hap->g_p), 0, sizeof(G_partition));
        destory_G_partition(&(hap->group_g_p)); memset(&(hap->group_g_p), 0, sizeof(G_partition));
        kv_destroy(hap->label_buffer); kv_init(hap->label_buffer);
        kv_destroy(hap->b.vis); kv_init(hap->b.vis); memset(&(hap->b), 0, sizeof(block_phase_type));
    }

    memset(hap, 0, sizeof(H_partition));
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testl %esi, %esi
jne 0x156ca5
xorl %r14d, %r14d
movq %r14, (%rbx)
movq 0x8(%rbx), %rdi
callq 0x2220
movq 0x10(%rbx), %rdi
callq 0x2220
leaq 0x38(%rbx), %rdi
pcmpeqd %xmm0, %xmm0
movdqu %xmm0, 0x18(%rbx)
movq $-0x1, 0x28(%rbx)
callq 0x142f71
pxor %xmm0, %xmm0
movdqu %xmm0, 0x48(%rbx)
movdqu %xmm0, 0x38(%rbx)
leaq 0x58(%rbx), %rdi
callq 0x142f71
pxor %xmm0, %xmm0
movdqu %xmm0, 0x68(%rbx)
movdqu %xmm0, 0x58(%rbx)
movq 0x88(%rbx), %rdi
callq 0x2220
movq %r14, 0x88(%rbx)
pxor %xmm0, %xmm0
movdqu %xmm0, 0x78(%rbx)
movq 0xa0(%rbx), %rdi
callq 0x2220
movq %r14, 0xc0(%rbx)
pxor %xmm0, %xmm0
movdqu %xmm0, 0xb0(%rbx)
movdqu %xmm0, 0xa0(%rbx)
movdqu %xmm0, 0x90(%rbx)
movl $0xc8, %edx
movq %rbx, %rdi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x20e0
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/hic.cpp
// Function: alignment_worker_pipeline(sldat_t*, enzyme const*, enzyme const*)
int alignment_worker_pipeline(sldat_t* sl, const enzyme *fn1, const enzyme *fn2)
{
    double index_time = yak_realtime();
    int i;
    for (i = 0; i < fn1->n && i < fn2->n; i++)
    {
        gzFile fp1, fp2;
        if ((fp1 = gzopen(fn1->a[i], "r")) == 0) return 0;
        if ((fp2 = gzopen(fn2->a[i], "r")) == 0) return 0;
        sl->ks1 = kseq_init(fp1);
        sl->ks2 = kseq_init(fp2);

        kt_pipeline(3, worker_pipeline, sl, 3);
        
        kseq_destroy(sl->ks1);
        kseq_destroy(sl->ks2);
        gzclose(fp1);
        gzclose(fp2);
    }
    fprintf(stderr, "[M::%s::%.3f] ==> Qualification\n", __func__, yak_realtime()-index_time);

    dedup_hits(&(sl->hits), 1);    
    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r13
movq %rsi, %r12
movq %rdi, (%rsp)
callq 0x1303c7
movsd %xmm0, 0x8(%rsp)
cmpl $0x0, 0x8(%r12)
jle 0x156db9
xorl %r14d, %r14d
leaq 0xdc8b3(%rip), %r15     # 0x2335a7
movq %r12, 0x10(%rsp)
movslq 0x8(%r13), %rax
cmpq %rax, %r14
jge 0x156db9
movq 0x10(%r12), %rax
movq (%rax,%r14,8), %rdi
movq %r15, %rsi
callq 0x22d0
xorl %r12d, %r12d
testq %rax, %rax
je 0x156dce
movq %rax, %rbp
movq %r15, %rsi
movq %r13, %rbx
movq 0x10(%r13), %rax
movq (%rax,%r14,8), %rdi
callq 0x22d0
testq %rax, %rax
je 0x156dce
movq %rax, %r13
movq %rbp, %rdi
callq 0x137aa0
movq (%rsp), %r12
movq %rax, 0x8(%r12)
movq %r13, %rdi
callq 0x137aa0
movq %rax, 0x10(%r12)
movl $0x3, %edi
leaq 0x71(%rip), %rsi        # 0x156de0
movq %r12, %rdx
movl $0x3, %ecx
callq 0x104984
movq 0x8(%r12), %rdi
callq 0x137e71
movq 0x10(%r12), %rdi
callq 0x137e71
movq %rbp, %rdi
callq 0x2390
movq %r13, %rdi
callq 0x2390
incq %r14
movq 0x10(%rsp), %r12
movslq 0x8(%r12), %rax
cmpq %rax, %r14
movq %rbx, %r13
jl 0x156cf9
movsd 0x8(%rsp), %xmm0
movq (%rsp), %rdi
callq 0x1da02
movl $0x1, %r12d
movl %r12d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/hic.cpp
// Function: debug_gfa_space(ha_ug_index*, ma_ug_t*, trans_chain*, kv_u_trans_t*)
void debug_gfa_space(ha_ug_index* idx, ma_ug_t* ug, trans_chain* t_ch, kv_u_trans_t *ref)
{
    bubble_type bub; 
    memset(&bub, 0, sizeof(bubble_type));
    bub.round_id = 0; bub.n_round = 2;

    identify_bubbles(ug, &bub, t_ch->ir_het, ref);

    hc_links link;
    init_hc_links(&link, ug->g->n_seq, t_ch);

    measure_distance(idx, ug, NULL, &link, &bub, &(t_ch->k_trans));

    // uint32_t i, k;
    // for (i = 0; i < link.a.n; ++i) 
    // {
    //     for (k = 0; k < link.a.a[i].e.n; k++)
    //     {
    //         if(link.a.a[i].e.a[k].del || link.a.a[i].e.a[k].dis == (uint64_t)-1) continue;
    //         fprintf(stderr, "s-utg%.6dl\td-utg%.6dl\t%lu\n", 
    //             (int)(i+1), (int)(link.a.a[i].e.a[k].uID+1), 
    //             link.a.a[i].e.a[k].dis == (uint64_t)-1? (uint64_t)-1 : link.a.a[i].e.a[k].dis>>3);
    //     }
    // }



    destory_bubbles(&bub);
    destory_hc_links(&link);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x148, %rsp            # imm = 0x148
movq %rcx, %r12
movq %rdx, %r14
movq %rsi, %r15
leaq 0x38(%rsp), %rbx
movl $0x110, %edx            # imm = 0x110
movq %rbx, %rdi
xorl %esi, %esi
callq 0x20e0
movl $0x2, 0xc(%rbx)
movq 0x10(%r14), %rdx
movq %r15, %rdi
movq %rbx, %rsi
movq %r12, %rcx
callq 0x138ab3
movq 0x18(%r15), %rax
movl 0x14(%rax), %esi
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r14, %rdx
callq 0xbe7d2
addq $0x138, %r14            # imm = 0x138
movq %r15, %rsi
xorl %edx, %edx
movq %r12, %rcx
movq %rbx, %r8
movq %r14, %r9
callq 0x13fa9b
movq %rbx, %rdi
callq 0x1380d4
movq %r12, %rdi
callq 0xbe8f4
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/hic.cpp
// Function: get_u_trans_spec_idx(kv_u_trans_t*, unsigned int, unsigned int, u_trans_t**, unsigned int*, unsigned int*)
uint32_t get_u_trans_spec_idx(kv_u_trans_t *ta, uint32_t qn, uint32_t tn, u_trans_t **r_a, uint32_t *occ, uint32_t *idx)
{
    if(r_a) (*r_a) = NULL; 
    if(occ) (*occ) = 0;
    if(idx) (*idx) = (uint32_t)-1;
    u_trans_t *a = NULL;
    uint32_t n, st, i;
    a = u_trans_a(*ta, qn);
    n = u_trans_n(*ta, qn);
    for (st = 0, i = 1; i <= n; ++i)
    {
        if (i == n || a[i].tn != a[st].tn)
        {
            if(a[st].tn == tn)
            {
                if(r_a) (*r_a) = a + st;
                if(occ) (*occ) = i - st;
                if(idx) (*idx) = st + ((*ta).idx.a[(qn)]>>32);
                return 1;
            }
            st = i;
        }
    }
    return 0;
}

// Assembly:
testq %rcx, %rcx
je 0x15716e
movq $0x0, (%rcx)
testq %r8, %r8
je 0x15717a
movl $0x0, (%r8)
testq %r9, %r9
je 0x157186
movl $0xffffffff, (%r9)      # imm = 0xFFFFFFFF
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
movq 0x28(%rdi), %rax
movl %esi, %esi
movq (%rax,%rsi,8), %rbx
testl %ebx, %ebx
je 0x1571fa
movq %rbx, %rax
shrq $0x20, %rax
leaq (%rax,%rax,2), %r11
shlq $0x4, %r11
addq 0x10(%rdi), %r11
xorl %r10d, %r10d
movl $0x1, %eax
movl %r10d, %r14d
cmpl %eax, %ebx
je 0x1571e0
movl %eax, %r15d
leaq (%r15,%r15,2), %r15
shlq $0x4, %r15
movl 0x14(%r11,%r15), %ebp
leaq (%r14,%r14,2), %r15
shlq $0x4, %r15
cmpl 0x14(%r11,%r15), %ebp
jne 0x1571e0
movl %r10d, %ebp
jmp 0x1571f1
leaq (%r14,%r14,2), %r14
shlq $0x4, %r14
movl %eax, %ebp
cmpl %edx, 0x14(%r11,%r14)
je 0x157203
incl %eax
movl %ebp, %r10d
cmpl %ebx, %eax
jbe 0x1571b5
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
testq %rcx, %rcx
je 0x15720e
addq %r14, %r11
movq %r11, (%rcx)
testq %r8, %r8
je 0x157219
subl %r10d, %eax
movl %eax, (%r8)
movl $0x1, %eax
testq %r9, %r9
je 0x1571fc
movq 0x28(%rdi), %rcx
addl 0x4(%rcx,%rsi,8), %r10d
movl %r10d, (%r9)
jmp 0x1571fc
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/hic.cpp
// Function: hic_sc_type(ha_ug_index*, kvec_pe_hit*, unsigned long)
int hic_sc_type(ha_ug_index* idx, kvec_pe_hit* hits, uint64_t k)
{
    uint32_t s_uid, s_beg, s_end, e_uid, e_beg, e_end, slen, elen, x = 0;

    interpr_hit(idx, hits->a.a[k].s, hits->a.a[k].len>>32, &s_uid, &s_beg, &s_end); 
    s_beg = (s_beg+s_end)>>1; slen = idx->ug->u.a[s_uid].len;
    if(s_beg >= (slen>>1)) x+=1;

    interpr_hit(idx, hits->a.a[k].e, (uint32_t)hits->a.a[k].len, &e_uid, &e_beg, &e_end); 
    e_beg = (e_beg+e_end)>>1; elen = idx->ug->u.a[e_uid].len;
    if(e_beg >= (elen>>1)) x+=2;
    return x;
}

// Assembly:
pushq %r14
pushq %rbx
movq 0x10(%rsi), %rax
shlq $0x5, %rdx
movq 0x18(%rax,%rdx), %rsi
movq %rsi, %r8
shrq $0x20, %r8
movq (%rax,%rdx), %r11
movq 0x8(%rax,%rdx), %rdx
leaq (%r11,%r11), %r9
xorl %eax, %eax
movb 0x18(%rdi), %r10b
xorl %ecx, %ecx
subb %r10b, %cl
shrq %cl, %r9
movq (%rdi), %r10
movq 0x30(%rdi), %rdi
movq %rdi, %rbx
andq %r11, %rbx
movq %rbx, %r14
subq %r8, %r14
decq %r8
incq %r14
testq %r11, %r11
cmovsq %rax, %r8
cmovnsq %rbx, %r14
addq %rbx, %r8
testq %r8, %r8
cmovleq %rax, %r8
testq %r14, %r14
cmovleq %rax, %r14
leal (%r8,%r14), %r11d
incl %r11d
shrl %r11d
movq 0x10(%r10), %r8
movl %r9d, %r9d
leaq (%r9,%r9,4), %r9
movl (%r8,%r9,8), %ebx
shrl %ebx
movl $0x3fffffff, %r10d      # imm = 0x3FFFFFFF
andl %r10d, %ebx
xorl %r9d, %r9d
cmpl %ebx, %r11d
setae %r9b
leaq (%rdx,%rdx), %r11
shrq %cl, %r11
movl %esi, %ecx
andq %rdx, %rdi
movq %rdi, %rsi
subq %rcx, %rsi
decq %rcx
incq %rsi
testq %rdx, %rdx
cmovsq %rax, %rcx
cmovnsq %rdi, %rsi
addq %rdi, %rcx
testq %rcx, %rcx
cmovleq %rax, %rcx
testq %rsi, %rsi
cmovleq %rax, %rsi
addl %esi, %ecx
incl %ecx
shrl %ecx
movl %r11d, %eax
leaq (%rax,%rax,4), %rax
movl (%r8,%rax,8), %edx
shrl %edx
andl %r10d, %edx
leal 0x2(%r9), %eax
cmpl %edx, %ecx
cmovbl %r9d, %eax
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/hic.cpp
// Function: interpr_hit(ha_ug_index*, unsigned long, unsigned int, unsigned int*, unsigned int*, unsigned int*)
void interpr_hit(ha_ug_index* idx, uint64_t x, uint32_t rLen, uint32_t *uid, uint32_t *beg, uint32_t *end)
{
    if(uid) (*uid) = ((x<<1)>>(64 - idx->uID_bits)); 
    uint32_t rev = (x>>63);
    long long ref_p = x & idx->pos_mode;
    long long p_beg, p_end;

    if(rev)
    {
        p_end = ref_p;
        p_beg = p_end + 1 - rLen;
    }
    else
    {
        p_beg = ref_p; 
        p_end = p_beg + rLen - 1;
    }
    if(p_beg < 0) p_beg = 0;
    if(p_end < 0) p_end = 0;
    if(beg) (*beg) = p_beg; 
    if(end) (*end) = p_end + 1;
}

// Assembly:
testq %rcx, %rcx
je 0x157335
movq %rcx, %rax
leaq (%rsi,%rsi), %r10
xorl %ecx, %ecx
subb 0x18(%rdi), %cl
shrq %cl, %r10
movl %r10d, (%rax)
movq 0x30(%rdi), %rcx
andq %rsi, %rcx
movl %edx, %edx
leaq -0x1(%rdx), %rax
xorl %edi, %edi
testq %rsi, %rsi
cmovsq %rdi, %rax
addq %rcx, %rax
testq %rax, %rax
cmovleq %rdi, %rax
testq %r8, %r8
je 0x157375
negq %rdx
testq %rsi, %rsi
leaq 0x1(%rcx,%rdx), %rdx
cmovnsq %rcx, %rdx
xorl %ecx, %ecx
testq %rdx, %rdx
cmovgq %rdx, %rcx
movl %ecx, (%r8)
testq %r9, %r9
je 0x15737f
incl %eax
movl %eax, (%r9)
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/hic.cpp
// Function: merge_u_trans_list(u_trans_t*, unsigned int)
double merge_u_trans_list(u_trans_t* a, uint32_t a_n)
{
    radix_sort_u_trans_occ(a, a + a_n);
    uint32_t k, l, i;
    double weight, w = 0;
    for (k = 1, l = 0; k <= a_n; ++k) 
    {   
        if (k == a_n || a[k].occ != a[l].occ) 
        {
            for (i = l, weight = 0; i < k; i++)
            {
                weight += a[i].nw;
            }
            
            /*******************************for debug************************************/
            // w += (weight/(double)(a[l].occ));
            w += weight;
            /*******************************for debug************************************/
            l = k;
        }
    }
    return w;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
movl %esi, %r14d
leaq (%r14,%r14,2), %rsi
shlq $0x4, %rsi
addq %rdi, %rsi
callq 0x130ba5
testl %ebp, %ebp
je 0x158fe4
incl %ebp
cmpl $0x3, %ebp
movl $0x2, %eax
cmovael %ebp, %eax
xorl %esi, %esi
xorpd %xmm0, %xmm0
movl $0x1, %ecx
movq $-0x30, %rdx
movl %esi, %edi
cmpq %r14, %rcx
je 0x158fad
leaq (%rcx,%rcx,2), %r8
shlq $0x4, %r8
movl 0x18(%rbx,%r8), %r8d
leaq (%rdi,%rdi,2), %r9
shlq $0x4, %r9
cmpl 0x18(%rbx,%r9), %r8d
je 0x158fd6
xorpd %xmm1, %xmm1
cmpq %rdi, %rcx
jbe 0x158fd0
shlq $0x4, %rdi
leaq (%rdi,%rdi,2), %rsi
addsd 0x20(%rbx,%rsi), %xmm1
addq $0x30, %rsi
movq %rdx, %rdi
addq %rsi, %rdi
jne 0x158fbe
addsd %xmm1, %xmm0
movl %ecx, %esi
incq %rcx
addq $-0x30, %rdx
cmpq %rax, %rcx
jne 0x158f8a
jmp 0x158fe8
xorpd %xmm0, %xmm0
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/hic.cpp
// Function: init_ps_t(unsigned long, unsigned long)
ps_t* init_ps_t(uint64_t seed, uint64_t n)
{
    ps_t *s = NULL; CALLOC(s, 1);
    s->xs = seed;
    CALLOC(s->s, n);
    s->n = n;
    return s;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl $0x1, %edi
movl $0x18, %esi
callq 0x2120
movq %rax, %r15
movq %r14, 0x8(%rax)
movl $0x1, %esi
movq %rbx, %rdi
callq 0x2120
movq %rax, (%r15)
movq %rbx, 0x10(%r15)
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/hic.cpp
// Function: is_hom_map(unsigned long, unsigned int, mc_interval_t*, unsigned int*, ha_ug_index*)
uint32_t is_hom_map(uint64_t x, uint32_t len, mc_interval_t *p, uint32_t *p_idx, ha_ug_index* idx)
{
    mc_interval_t *a = NULL;
    uint32_t uid, qs, qe, as, ae, occ, k;
    uint64_t oLen;
    interpr_hit(idx, x, len, &uid, &qs, &qe);

    a = p + p_idx[uid]; 
    occ = p_idx[uid+1] - p_idx[uid];
    for (k = 0; k < occ; k++)
    {
        as = a[k].bS;
        ae = a[k].bE;
        oLen = ((MIN(qe, ae) >= MAX(qs, as))? MIN(qe, ae) - MAX(qs, as) + 1 : 0);
        if(oLen == 0) continue;
        if(oLen > len*0.2) return 1;
    }
    return 0;
}

// Assembly:
movq %rcx, %r9
leaq (%rdi,%rdi), %r10
xorl %eax, %eax
movb 0x18(%r8), %r11b
xorl %ecx, %ecx
subb %r11b, %cl
shrq %cl, %r10
movq 0x30(%r8), %r11
andq %rdi, %r11
movl %esi, %r8d
movq %r11, %rcx
subq %r8, %rcx
leaq -0x1(%r8), %rsi
incq %rcx
testq %rdi, %rdi
cmovsq %rax, %rsi
cmovnsq %r11, %rcx
addq %r11, %rsi
testq %rsi, %rsi
cmovleq %rax, %rsi
testq %rcx, %rcx
cmovleq %rax, %rcx
movl %r10d, %edi
movl (%r9,%rdi,4), %r11d
incl %r10d
movl (%r9,%r10,4), %edi
subl %r11d, %edi
je 0x1590fe
incl %esi
cvtsi2sd %r8, %xmm0
mulsd 0xcc3c1(%rip), %xmm0    # 0x225480
leaq (%r11,%r11,2), %r8
leaq (%rdx,%r8,8), %rdx
addq $0x4, %rdx
movl -0x4(%rdx), %r9d
movl (%rdx), %r8d
cmpl %r8d, %esi
cmovbl %esi, %r8d
cmpl %r9d, %ecx
cmoval %ecx, %r9d
subl %r9d, %r8d
jb 0x1590f6
incl %r8d
xorps %xmm1, %xmm1
cvtsi2sd %r8, %xmm1
ucomisd %xmm0, %xmm1
ja 0x1590ff
addq $0x18, %rdx
decl %edi
jne 0x1590cb
retq
movl $0x1, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/hic.cpp
// Function: write_ps_t(ps_t*, char const*)
void write_ps_t(ps_t *s, const char *fn)
{
    char *buf = (char*)calloc(strlen(fn) + 25, 1);
    sprintf(buf, "%s.hic.pst.bin", fn);
    FILE* fp = fopen(buf, "w");

    fwrite(&(s->xs), sizeof(s->xs), 1, fp);
    fwrite(&(s->n), sizeof(s->n), 1, fp);
    fwrite(s->s, sizeof(int8_t), s->n, fp);

    fclose(fp);
    free(buf);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x2090
leaq 0x19(%rax), %rdi
movl $0x1, %esi
callq 0x2120
movq %rax, %r14
leaq 0xd68dd(%rip), %rsi     # 0x2304bf
movq %rax, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x2050
leaq 0xe2808(%rip), %rsi     # 0x23c3fe
movq %r14, %rdi
callq 0x2210
movq %rax, %r15
leaq 0x8(%rbx), %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %rax, %rcx
callq 0x2410
leaq 0x10(%rbx), %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %r15, %rcx
callq 0x2410
movq (%rbx), %rdi
movq 0x10(%rbx), %rdx
movl $0x1, %esi
movq %r15, %rcx
callq 0x2410
movq %r15, %rdi
callq 0x2190
movq %r14, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2220
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/hic.cpp
// Function: load_ps_t(ps_t**, char const*)
int load_ps_t(ps_t **s, const char *fn)
{
    uint64_t flag = 0;
    char *buf = (char*)calloc(strlen(fn) + 25, 1);
    sprintf(buf, "%s.hic.pst.bin", fn);
    FILE* fp = NULL; 
    fp = fopen(buf, "r"); 
    if(!fp) return 0;
    CALLOC(*s, 1);
    flag += fread(&((*s)->xs), sizeof((*s)->xs), 1, fp);
    flag += fread(&((*s)->n), sizeof((*s)->n), 1, fp);
    MALLOC((*s)->s, (*s)->n);
    flag += fread((*s)->s, sizeof(int8_t), (*s)->n, fp);

    fclose(fp);
    free(buf);
    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r15
movq %rdi, %r14
movq %rsi, %rdi
callq 0x2090
leaq 0x19(%rax), %rdi
movl $0x1, %esi
callq 0x2120
movq %rax, %rbx
leaq 0xd683b(%rip), %rsi     # 0x2304bf
xorl %ebp, %ebp
movq %rax, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x2050
leaq 0xd990d(%rip), %rsi     # 0x2335a7
movq %rbx, %rdi
callq 0x2210
testq %rax, %rax
je 0x159d2c
movq %rax, %r15
movl $0x1, %edi
movl $0x18, %esi
callq 0x2120
movq %rax, (%r14)
leaq 0x8(%rax), %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %r15, %rcx
callq 0x22f0
movq (%r14), %rdi
addq $0x10, %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %r15, %rcx
callq 0x22f0
movq (%r14), %r12
movq 0x10(%r12), %rdi
callq 0x2280
movq %rax, (%r12)
movq (%r14), %rax
movq (%rax), %rdi
movq 0x10(%rax), %rdx
movl $0x1, %esi
movq %r15, %rcx
callq 0x22f0
movq %r15, %rdi
callq 0x2190
movq %rbx, %rdi
callq 0x2220
movl $0x1, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/hic.cpp
// Function: get_MAPQ(u_trans_t*, unsigned int, unsigned int, double)
uint32_t get_MAPQ(u_trans_t *a, uint32_t a_n, uint32_t idx, double secondRate)
{
    uint32_t i;
    u_trans_t *p = &(a[idx]);
    uint64_t ovlp = 0;
    double aw = 0;
    for (i = 0; i < a_n; i++)
    {
        if(i == idx) continue;
        ovlp = ((MIN(a[i].qe, p->qe) > MAX(a[i].qs, p->qs))?
                                        (MIN(a[i].qe, p->qe) - MAX(a[i].qs, p->qs)):0);
        // if(p->qn == 447 && p->tn == 5495)
        // {
        //     fprintf(stderr, "ovlp: %lu, secondRate: %f, len: %u\n", ovlp, secondRate, MIN(a[i].qe - a[i].qs, p->qe - p->qs));
        // }
        if(ovlp == 0) continue;
        if(ovlp <= (secondRate*MIN(a[i].qe - a[i].qs, p->qe - p->qs))) continue;
        
        aw += a[i].nw;
    }
    // if(p->qn == 447 && p->tn == 5495) fprintf(stderr, "aw: %f\n", aw);
    aw = aw/p->nw;
    // if(p->qn == 447 && p->tn == 5495) fprintf(stderr, "aw: %f\n", aw);
    if(aw >= 1) return 16;
    if(aw >= 0.75) return 8;
    if(aw >= 0.5) return 4;
    if(aw >= 0.25) return 2;
    return 1;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ecx
leaq (%rcx,%rcx,2), %rax
shlq $0x4, %rax
addq %rdi, %rax
testl %esi, %esi
je 0x15a0a6
movl %esi, %edx
shlq $0x4, %rcx
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rdx
leaq (%rdx,%rdx,2), %rdx
xorpd %xmm1, %xmm1
xorl %esi, %esi
xorl %r8d, %r8d
cmpq %r8, %rcx
je 0x15a09b
movl (%rdi,%r8), %r11d
movl 0x4(%rdi,%r8), %r9d
movl (%rax), %ebx
movl 0x4(%rax), %r10d
cmpl %r10d, %r9d
movl %r10d, %r14d
cmovbl %r9d, %r14d
cmpl %ebx, %r11d
movl %ebx, %ebp
cmoval %r11d, %ebp
subl %ebp, %r14d
jbe 0x15a09b
cmovbl %esi, %r14d
xorps %xmm2, %xmm2
cvtsi2sd %r14, %xmm2
subl %r11d, %r9d
subl %ebx, %r10d
cmpl %r10d, %r9d
cmovbl %r9d, %r10d
xorps %xmm3, %xmm3
cvtsi2sd %r10, %xmm3
mulsd %xmm0, %xmm3
ucomisd %xmm2, %xmm3
jae 0x15a09b
addsd 0x20(%rdi,%r8), %xmm1
addq $0x30, %r8
cmpq %r8, %rdx
jne 0x15a03d
jmp 0x15a0aa
xorpd %xmm1, %xmm1
divsd 0x20(%rax), %xmm1
movl $0x10, %eax
ucomisd 0xcb1b4(%rip), %xmm1    # 0x225270
jae 0x15a0ec
movl $0x8, %eax
ucomisd 0xcb465(%rip), %xmm1    # 0x225530
jae 0x15a0ec
movl $0x4, %eax
ucomisd 0xcb416(%rip), %xmm1    # 0x2254f0
jae 0x15a0ec
ucomisd 0xcb3ec(%rip), %xmm1    # 0x2254d0
movl $0x2, %eax
sbbl $0x0, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/hic.cpp
// Function: set_tag_pre_read(unsigned long*, unsigned long, unsigned long, unsigned long, ma_hit_t_alloc*)
void set_tag_pre_read(uint64_t *r_tag, uint64_t id, uint64_t off, uint64_t pos, ma_hit_t_alloc* sources)
{
    uint64_t i, tn;
    ma_hit_t *h = NULL;
    if(r_tag[id] == (uint64_t)-1) r_tag[id] = 0;
    r_tag[id] += off;
    // if(id == 2531247) fprintf(stderr, "***id: %lu, off: %lu, pos: %lu\n", id, off, pos);
    for (i = 0; i < (uint64_t)(sources[id].length); i++)
    {
        h = &(sources[id].buffer[i]);
        if(!h->el) continue;
        tn = Get_tn((*h));
        if(pos >= Get_qs((*h)) && pos < Get_qe((*h)))
        {
            // if(tn == 2531247) fprintf(stderr, "###id: %lu, off: %lu, tn: %lu, pos: %lu\n", id, off, tn, pos);
            if(r_tag[tn] == (uint64_t)-1) r_tag[tn] = 0;
            r_tag[tn] += off;
        }
        
    }
}

// Assembly:
cmpq $-0x1, (%rdi,%rsi,8)
jne 0x15a24b
movq $0x0, (%rdi,%rsi,8)
addq %rdx, (%rdi,%rsi,8)
leaq (%rsi,%rsi,2), %rax
movl 0xc(%r8,%rax,8), %esi
testq %rsi, %rsi
je 0x15a2ab
leaq (%r8,%rax,8), %rax
movq (%rax), %rax
shlq $0x3, %rsi
leaq (%rsi,%rsi,4), %rsi
xorl %r8d, %r8d
cmpb $0x0, 0x20(%rax,%r8)
je 0x15a2a2
movl (%rax,%r8), %r9d
cmpq %rcx, %r9
ja 0x15a2a2
movl 0x8(%rax,%r8), %r9d
cmpq %rcx, %r9
jbe 0x15a2a2
movl 0xc(%rax,%r8), %r9d
cmpq $-0x1, (%rdi,%r9,8)
jne 0x15a29e
movq $0x0, (%rdi,%r9,8)
addq %rdx, (%rdi,%r9,8)
addq $0x28, %r8
cmpq %r8, %rsi
jne 0x15a26f
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/hic.cpp
// Function: renew_idx_para(ha_ug_index*, ma_ug_t*)
void renew_idx_para(ha_ug_index* idx, ma_ug_t* ug)
{
    for (idx->uID_bits=1; (uint64_t)(1<<idx->uID_bits)<(uint64_t)ug->u.n; idx->uID_bits++);
    idx->pos_bits = 64 - idx->uID_bits - 1;
    idx->uID_mode = (((uint64_t)-1) << (64-idx->uID_bits))>>1;
    idx->pos_mode = ((uint64_t)-1) >> (64-idx->pos_bits);
    idx->rev_mode = ((uint64_t)1) << 63;
}

// Assembly:
movq (%rsi), %rsi
movl $0x1, %eax
movl $0x3f, %edx
movl $0x1, %r8d
movl %eax, %ecx
shll %cl, %r8d
movslq %r8d, %rcx
incq %rax
decq %rdx
cmpq %rcx, %rsi
ja 0x15a2b9
leaq -0x1(%rax), %rcx
movq %rcx, 0x18(%rdi)
movq %rdx, 0x28(%rdi)
incb %dl
movq $-0x1, %rsi
movq $-0x1, %r8
movl %edx, %ecx
shlq %cl, %r8
shrq %r8
movl %eax, %ecx
shrq %cl, %rsi
movq %r8, 0x20(%rdi)
movq %rsi, 0x30(%rdi)
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rax, 0x38(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/hic.cpp
// Function: get_oe_occ(unsigned int, unsigned int, kvec_pe_hit*, ha_ug_index*)
uint32_t get_oe_occ(uint32_t qn, uint32_t tn, kvec_pe_hit* hits, ha_ug_index* idx)
{
    uint64_t shif = 64 - idx->uID_bits, occ = 0;
    pe_hit *h_a = hits->a.a + (hits->idx.a[qn]>>32);
    uint32_t h_occ = (uint32_t)(hits->idx.a[qn]), i;
    for (i = 0; i < h_occ; i++) {
        if(((h_a[i].s<<1)>>shif)==qn && ((h_a[i].e<<1)>>shif)==tn) occ++;
    }
    return occ;
}

// Assembly:
movq %rcx, %rax
movq 0x28(%rdx), %rcx
movl %edi, %edi
movq (%rcx,%rdi,8), %r8
testl %r8d, %r8d
je 0x15a383
movl $0x40, %ecx
subq 0x18(%rax), %rcx
movq 0x10(%rdx), %rax
movq %r8, %r9
shrq $0x20, %r9
movl %esi, %edx
movl %r8d, %esi
shlq $0x5, %r9
leaq (%r9,%rax), %r8
addq $0x8, %r8
shlq $0x5, %rsi
xorl %r9d, %r9d
xorl %eax, %eax
movq -0x8(%r8,%r9), %r10
addq %r10, %r10
shrq %cl, %r10
cmpq %rdi, %r10
jne 0x15a379
movq (%r8,%r9), %r10
addq %r10, %r10
shrq %cl, %r10
xorl %r11d, %r11d
cmpq %rdx, %r10
sete %r11b
addq %r11, %rax
addq $0x20, %r9
cmpq %r9, %rsi
jne 0x15a352
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/hic.cpp
// Function: debug_round_test(ps_t*, unsigned long, bubble_type*, kv_u_trans_t*, hc_links*, sldat_t*, ha_ug_index*, unsigned long, unsigned long)
void debug_round_test(ps_t *s, uint64_t seed, bubble_type *bub, kv_u_trans_t *k_trans, hc_links *link, sldat_t *sl, 
ha_ug_index* idx, uint64_t step, uint64_t total)
{
    uint64_t i;
    for (i = step; i <= total; i += step) {
        fprintf(stderr, "\n");
        round_test(s, seed, bub, k_trans, link, sl, idx, 0, i);
        round_test(s, seed, bub, k_trans, link, sl, idx, 1, i);
    }
    
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, 0x10(%rsp)
movq 0x60(%rsp), %rax
movq 0x58(%rsp), %rbx
cmpq %rax, %rbx
ja 0x15a8ca
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbp
movq %rdi, 0x8(%rsp)
movq 0x12f7aa(%rip), %rax    # 0x289fe0
movq (%rax), %rsi
movl $0xa, %edi
callq 0x2270
subq $0x8, %rsp
movq %rbp, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %r15, %rcx
movq %r14, %r8
movq %r13, %rbp
movq %r12, %r13
movq %r15, %r12
movq %r14, %r15
movq 0x18(%rsp), %r14
movq %r14, %r9
pushq %rbx
pushq $0x0
movq 0x68(%rsp), %rax
pushq %rax
callq 0x1b695
addq $0x18, %rsp
movq 0x10(%rsp), %rdi
movq %rbp, %rsi
movq %r13, %rdx
movq %r12, %rcx
movq %r15, %r8
movq %r14, %r9
movq %r15, %r14
movq %r12, %r15
movq %r13, %r12
movq %rbp, %r13
movq 0x10(%rsp), %rbp
pushq %rbx
pushq $0x1
pushq 0x68(%rsp)
callq 0x1b695
movq 0x78(%rsp), %rcx
movq 0x80(%rsp), %rax
addq $0x20, %rsp
addq %rcx, %rbx
cmpq %rax, %rbx
jbe 0x15a82f
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq