LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: 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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
movl -0xc(%rbp), %eax
imulq $0x30, %rax, %rax
addq %rax, %rsi
callq 0x1b8730
xorps %xmm0, %xmm0
movsd %xmm0, -0x28(%rbp)
movl $0x1, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x10(%rbp), %eax
cmpl -0xc(%rbp), %eax
ja 0x203ae7
movl -0x10(%rbp), %eax
cmpl -0xc(%rbp), %eax
je 0x203a84
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0x18(%rax), %eax
movq -0x8(%rbp), %rcx
movl -0x14(%rbp), %edx
imulq $0x30, %rdx, %rdx
addq %rdx, %rcx
cmpl 0x18(%rcx), %eax
je 0x203ad7
movl -0x14(%rbp), %eax
movl %eax, -0x18(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x20(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x10(%rbp), %eax
jae 0x203ac2
movq -0x8(%rbp), %rax
movl -0x18(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movsd 0x20(%rax), %xmm0
addsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x20(%rbp)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x203a92
movsd -0x20(%rbp), %xmm0
addsd -0x28(%rbp), %xmm0
movsd %xmm0, -0x28(%rbp)
movl -0x10(%rbp), %eax
movl %eax, -0x14(%rbp)
jmp 0x203ad9
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x203a4c
movsd -0x28(%rbp), %xmm0
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: chhylp123[P]hifiasm/hic.cpp
// Function: print_kv_weight(kv_u_trans_t*, signed char*)
void print_kv_weight(kv_u_trans_t *ta, int8_t *s)
{
    uint32_t i;
    // u_trans_t *e = NULL;
    fprintf(stderr, "\n[M::%s]\n", __func__);
    fprintf(stderr, "*********ta->n: %u\n", (uint32_t)ta->n);
    for (i = 0; i < ta->n; i++)
    {
        fprintf(stderr, "+s-utg%.6ul(s:%d)\td-utg%.6ul(s:%d)\tw-%f\n", 
                        ta->a[i].qn+1, s[ta->a[i].qn], ta->a[i].tn+1, s[ta->a[i].tn], ta->a[i].nw);
        /**
        get_u_trans_spec(ta, ta->a[i].tn, ta->a[i].qn, &e, NULL);
        if(e)
        {
            fprintf(stderr, "-d-utg%.6ul->s-utg%.6ul: %f\n", e->qn+1, e->tn+1, e->nw);
        }
        else
        {
            fprintf(stderr, "ERROR");
        }
        **/
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq 0x1bff99(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
leaq 0x1890db(%rip), %rsi    # 0x38d12c
leaq 0x1890de(%rip), %rdx    # 0x38d136
movb $0x0, %al
callq 0x22a0
movq 0x1bff7a(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl %eax, %edx
leaq 0x1890cd(%rip), %rsi    # 0x38d146
movb $0x0, %al
callq 0x22a0
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x204142
movq 0x1bff42(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x14(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %edx
addl $0x1, %edx
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x10(%rcx), %rcx
movl -0x14(%rbp), %esi
imulq $0x30, %rsi, %rsi
addq %rsi, %rcx
movl 0x8(%rcx), %ecx
movsbl (%rax,%rcx), %ecx
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x14(%rbp), %esi
imulq $0x30, %rsi, %rsi
addq %rsi, %rax
movl 0x14(%rax), %r8d
addl $0x1, %r8d
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rsi
movq 0x10(%rsi), %rsi
movl -0x14(%rbp), %r9d
imulq $0x30, %r9, %r9
addq %r9, %rsi
movl 0x14(%rsi), %esi
movsbl (%rax,%rsi), %r9d
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x14(%rbp), %esi
imulq $0x30, %rsi, %rsi
addq %rsi, %rax
movsd 0x20(%rax), %xmm0
leaq 0x18902d(%rip), %rsi    # 0x38d15a
movb $0x1, %al
callq 0x22a0
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x204087
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: chhylp123[P]hifiasm/hic.cpp
// Function: print_kv_u_trans(kv_u_trans_t*, hc_links*, signed char*)
void print_kv_u_trans(kv_u_trans_t *ta, hc_links* lk, int8_t *s)
{
    uint32_t i;
    u_trans_t *p = NULL;
    hc_edge *e = NULL;

    for (i = 0; i < ta->n; i++)
    {
        p = &(ta->a[i]);
        e = get_hc_edge(lk, p->qn, p->tn, 0);
        fprintf(stderr, "s-utg%.6ul\tS(%d)\td-utg%.6ul\tS(%d)\trev(%u)\td(%lld)\ttw(%f)\n", 
        p->qn+1, s[p->qn], p->tn+1, s[p->tn], p->rev, 
        (e == NULL || e->dis == (uint64_t)-1)? -1 : (long long)(e->dis>>3), p->nw);
    }
    
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq $0x0, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x204879
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x1c(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, %esi
movq -0x28(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, %edx
xorl %eax, %eax
movl %eax, %ecx
callq 0x1d09c0
movq %rax, -0x30(%rbp)
movq 0x1bf835(%rip), %rax    # 0x3c3fe0
movq (%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x28(%rbp), %rax
movl 0x8(%rax), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
movq -0x18(%rbp), %rax
movq -0x28(%rbp), %rcx
movl 0x8(%rcx), %ecx
movsbl (%rax,%rcx), %eax
movl %eax, -0x40(%rbp)
movq -0x28(%rbp), %rax
movl 0x14(%rax), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
movq -0x18(%rbp), %rax
movq -0x28(%rbp), %rcx
movl 0x14(%rcx), %ecx
movsbl (%rax,%rcx), %eax
movl %eax, -0x38(%rbp)
movq -0x28(%rbp), %rax
movb 0x28(%rax), %al
shrb $0x6, %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x34(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x204814
movq -0x30(%rbp), %rax
cmpq $-0x1, 0x10(%rax)
jne 0x204821
movq $-0x1, %rax
movq %rax, -0x58(%rbp)
jmp 0x204831
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
shrq $0x3, %rax
movq %rax, -0x58(%rbp)
movl -0x34(%rbp), %r10d
movl -0x38(%rbp), %r9d
movl -0x3c(%rbp), %r8d
movl -0x40(%rbp), %ecx
movl -0x44(%rbp), %edx
movq -0x50(%rbp), %rdi
movq -0x58(%rbp), %rax
movq -0x28(%rbp), %rsi
movsd 0x20(%rsi), %xmm0
leaq 0x18898c(%rip), %rsi    # 0x38d1e7
movl %r10d, (%rsp)
movq %rax, 0x8(%rsp)
movb $0x1, %al
callq 0x22a0
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x20475b
addq $0x70, %rsp
popq %rbp
retq
nop
// File: 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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movl $0x1, %edi
movl $0x18, %esi
callq 0x2140
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x2140
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: chhylp123[P]hifiasm/hic.cpp
// Function: verbose_het_stat(bubble_type*)
void verbose_het_stat(bubble_type *bub)
{
    uint64_t i, hetBase = 0, homBase = 0;
    for (i = 0; i < bub->ug->g->n_seq; i++)
    {
        if(IF_HOM(i, *bub)) homBase += bub->ug->g->seq[i].len;
        else hetBase += bub->ug->g->seq[i].len;
    }

    fprintf(stderr, "[M::stat] # heterozygous bases: %lu; # homozygous bases: %lu\n", hetBase, homBase);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq $0x0, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x10(%rcx), %rcx
movq 0x18(%rcx), %rcx
movl 0x14(%rcx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movl %ecx, %ecx
cmpq %rcx, %rax
jae 0x20502b
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movq -0x8(%rbp), %rcx
movq 0x80(%rcx), %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
jbe 0x204ff2
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x18(%rax), %rax
movq 0x20(%rax), %rax
movq -0x10(%rbp), %rcx
movl (%rax,%rcx,8), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x205018
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x18(%rax), %rax
movq 0x20(%rax), %rax
movq -0x10(%rbp), %rcx
movl (%rax,%rcx,8), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x20501a
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x204f84
movq 0x1befae(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
leaq 0x1881dd(%rip), %rsi    # 0x38d221
movb $0x0, %al
callq 0x22a0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: chhylp123[P]hifiasm/hic.cpp
// Function: print_kv_u_trans_t(kv_u_trans_t*, ma_ug_t*)
void print_kv_u_trans_t(kv_u_trans_t *ta, ma_ug_t* ug)
{
    uint32_t i;
    u_trans_t *p = NULL;
    for (i = 0; i < ta->n; i++)
    {
        p = &(ta->a[i]);
        fprintf(stderr, "q-utg%.6ul\tql(%u)\tqs(%u)\tqe(%u)\tt-utg%.6ul\ttl(%u)\tts(%u)\tte(%u)\trev(%u)\tw(%f)\tf(%u)\n", 
        p->qn+1, ug->u.a[p->qn].len, p->qs, p->qe, p->tn+1, ug->u.a[p->tn].len, p->ts, p->te, p->rev, p->nw, p->f);
    }
    fprintf(stderr, "[M::%s::] \n", __func__);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x58, %rsp
movq %rdi, -0x20(%rbp)
movq %rsi, -0x28(%rbp)
movq $0x0, -0x38(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x205dd2
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x2c(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq 0x1be2df(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq -0x38(%rbp), %rax
movl 0x8(%rax), %edx
addl $0x1, %edx
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x38(%rbp), %rcx
movl 0x8(%rcx), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movq -0x38(%rbp), %rax
movl (%rax), %r8d
movq -0x38(%rbp), %rax
movl 0x4(%rax), %r9d
movq -0x38(%rbp), %rax
movl 0x14(%rax), %r15d
addl $0x1, %r15d
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x38(%rbp), %rsi
movl 0x14(%rsi), %esi
imulq $0x28, %rsi, %rsi
addq %rsi, %rax
movl (%rax), %r14d
andl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
movq -0x38(%rbp), %rax
movl 0xc(%rax), %ebx
movq -0x38(%rbp), %rax
movl 0x10(%rax), %r11d
movq -0x38(%rbp), %rax
movb 0x28(%rax), %al
shrb $0x6, %al
andb $0x1, %al
movzbl %al, %r10d
movq -0x38(%rbp), %rax
movsd 0x20(%rax), %xmm0
movq -0x38(%rbp), %rax
movb 0x28(%rax), %al
andb $0x3f, %al
movzbl %al, %eax
leaq 0x187516(%rip), %rsi    # 0x38d2b8
movl %r15d, (%rsp)
movl %r14d, 0x8(%rsp)
movl %ebx, 0x10(%rsp)
movl %r11d, 0x18(%rsp)
movl %r10d, 0x20(%rsp)
movl %eax, 0x28(%rsp)
movb $0x1, %al
callq 0x22a0
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x205cd4
movq 0x1be207(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
leaq 0x18752a(%rip), %rsi    # 0x38d30d
leaq 0x18752f(%rip), %rdx    # 0x38d319
movb $0x0, %al
callq 0x22a0
addq $0x58, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x20a0
movq %rax, %rdi
addq $0x19, %rdi
movl $0x1, %esi
callq 0x2140
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rdx
leaq 0x1874ef(%rip), %rsi    # 0x38d32c
movb $0x0, %al
callq 0x2050
movq -0x18(%rbp), %rdi
leaq 0x193583(%rip), %rsi    # 0x3993d2
callq 0x2200
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
movq -0x20(%rbp), %rcx
movl $0x8, %esi
movl $0x1, %edx
callq 0x2400
movq -0x8(%rbp), %rdi
addq $0x10, %rdi
movq -0x20(%rbp), %rcx
movl $0x8, %esi
movl $0x1, %edx
callq 0x2400
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdx
movq -0x20(%rbp), %rcx
movl $0x1, %esi
callq 0x2400
movq -0x20(%rbp), %rdi
callq 0x21a0
movq -0x18(%rbp), %rdi
callq 0x2210
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x20a0
movq %rax, %rdi
addq $0x19, %rdi
movl $0x1, %esi
callq 0x2140
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq 0x187417(%rip), %rsi    # 0x38d32c
movb $0x0, %al
callq 0x2050
movq $0x0, -0x30(%rbp)
movq -0x28(%rbp), %rdi
leaq 0x18a4a7(%rip), %rsi    # 0x3903d6
callq 0x2200
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x205f4b
movl $0x0, -0x4(%rbp)
jmp 0x206015
movl $0x1, %edi
movl $0x18, %esi
callq 0x2140
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
addq $0x8, %rdi
movq -0x30(%rbp), %rcx
movl $0x8, %esi
movl $0x1, %edx
callq 0x22e0
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
addq $0x10, %rdi
movq -0x30(%rbp), %rcx
movl $0x8, %esi
movl $0x1, %edx
callq 0x22e0
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rdi
shlq $0x0, %rdi
callq 0x2270
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rdx
movq -0x30(%rbp), %rcx
movl $0x1, %esi
callq 0x22e0
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x30(%rbp), %rdi
callq 0x21a0
movq -0x28(%rbp), %rdi
callq 0x2210
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: chhylp123[P]hifiasm/hic.cpp
// Function: check_ovlp(f_chain_t*, unsigned long, unsigned long, unsigned long)
uint64_t check_ovlp(f_chain_t *o, uint64_t on, uint64_t qs, uint64_t qe)
{
    uint64_t i, ovlp;
    for (i = 0; i < on; i++)
    {
        ovlp = ((MIN(o[i].e, qe) > MAX(o[i].s, qs))?
                                        (MIN(o[i].e, qe) - MAX(o[i].s, qs)):0);
        if(ovlp) return 1;
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x206d64
movq -0x10(%rbp), %rax
movq -0x30(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
cmpq -0x28(%rbp), %rax
ja 0x206c4c
movq -0x10(%rbp), %rax
movq -0x30(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, -0x40(%rbp)
jmp 0x206c54
movq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rax
movq -0x30(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
cmpq -0x20(%rbp), %rax
jb 0x206c8c
movq -0x10(%rbp), %rax
movq -0x30(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, -0x50(%rbp)
jmp 0x206c94
movq -0x20(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rax
movq -0x50(%rbp), %rcx
cmpq %rcx, %rax
jbe 0x206d30
movq -0x10(%rbp), %rax
movq -0x30(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
cmpq -0x28(%rbp), %rax
ja 0x206cd7
movq -0x10(%rbp), %rax
movq -0x30(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, -0x58(%rbp)
jmp 0x206cdf
movq -0x28(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x10(%rbp), %rax
movq -0x30(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
cmpq -0x20(%rbp), %rax
jb 0x206d17
movq -0x10(%rbp), %rax
movq -0x30(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, -0x68(%rbp)
jmp 0x206d1f
movq -0x20(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x60(%rbp), %rax
movq -0x68(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x70(%rbp)
jmp 0x206d38
xorl %eax, %eax
movq %rax, -0x70(%rbp)
jmp 0x206d38
movq -0x70(%rbp), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0x206d51
movq $0x1, -0x8(%rbp)
jmp 0x206d6c
jmp 0x206d53
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x206c0c
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq $-0x1, (%rax,%rcx,8)
jne 0x20770f
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movq $0x0, (%rax,%rcx,8)
movq -0x18(%rbp), %rdx
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
addq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rcx
imulq $0x18, -0x10(%rbp), %rdx
addq %rdx, %rcx
movl 0xc(%rcx), %ecx
cmpq %rcx, %rax
jae 0x2077e1
movq -0x28(%rbp), %rax
imulq $0x18, -0x10(%rbp), %rcx
addq %rcx, %rax
movq (%rax), %rax
imulq $0x28, -0x30(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
cmpb $0x0, 0x20(%rax)
jne 0x20776e
jmp 0x2077d0
movq -0x40(%rbp), %rax
movl 0xc(%rax), %eax
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rax
movq -0x40(%rbp), %rcx
movq (%rcx), %rcx
movl %ecx, %ecx
cmpq %rcx, %rax
jb 0x2077ce
movq -0x20(%rbp), %rax
movq -0x40(%rbp), %rcx
movl 0x8(%rcx), %ecx
cmpq %rcx, %rax
jae 0x2077ce
movq -0x8(%rbp), %rax
movq -0x38(%rbp), %rcx
cmpq $-0x1, (%rax,%rcx,8)
jne 0x2077ba
movq -0x8(%rbp), %rax
movq -0x38(%rbp), %rcx
movq $0x0, (%rax,%rcx,8)
movq -0x18(%rbp), %rdx
movq -0x8(%rbp), %rax
movq -0x38(%rbp), %rcx
addq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
jmp 0x2077d0
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x20772b
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq $0x1, 0x18(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movl %eax, %ecx
movl $0x1, %eax
shll %cl, %eax
cltq
movq -0x10(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x207ed8
jmp 0x207ec6
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x18(%rax)
jmp 0x207ea8
movq -0x8(%rbp), %rax
movl $0x40, %ecx
subq 0x18(%rax), %rcx
subq $0x1, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x8(%rbp), %rax
movl $0x40, %ecx
subq 0x18(%rax), %rcx
movq $-0x1, %rax
shlq %cl, %rax
movq %rax, %rcx
shrq %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x8(%rbp), %rax
movl $0x40, %ecx
subq 0x28(%rax), %rcx
movq $-0x1, %rax
shrq %cl, %rax
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x8(%rbp), %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
movq %rcx, 0x38(%rax)
popq %rbp
retq
nopl (%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movq -0x18(%rbp), %rcx
movl $0x40, %eax
subq 0x18(%rcx), %rax
movq %rax, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x28(%rcx), %rcx
movl -0x4(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x4(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x34(%rbp)
movl $0x0, -0x38(%rbp)
movl -0x38(%rbp), %eax
cmpl -0x34(%rbp), %eax
jae 0x208022
movq -0x30(%rbp), %rax
movl -0x38(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movq (%rax), %rax
shlq %rax
movq -0x20(%rbp), %rcx
shrq %cl, %rax
movl -0x4(%rbp), %ecx
cmpq %rcx, %rax
jne 0x208015
movq -0x30(%rbp), %rax
movl -0x38(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
shlq %rax
movq -0x20(%rbp), %rcx
shrq %cl, %rax
movl -0x8(%rbp), %ecx
cmpq %rcx, %rax
jne 0x208015
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x208017
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x207fba
movq -0x28(%rbp), %rax
popq %rbp
retq
nopl (%rax,%rax)
// File: chhylp123[P]hifiasm/hic.cpp
// Function: round_test(ps_t*, unsigned long, bubble_type*, kv_u_trans_t*, hc_links*, sldat_t*, ha_ug_index*, unsigned long, unsigned long)
void 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 test_block_flip, uint64_t n_perturb)
{
    s->xs = seed; memset(s->s, 0, s->n);
    bub->round_id = 0; asm_opt.n_perturb = n_perturb;

    fprintf(stderr, "[M::%s] ----> test_block_flip: %lu, n_perturb: %lu\n", 
    __func__, test_block_flip, n_perturb);
    renew_kv_u_trans(k_trans, link, &sl->hits, &(idx->t_ch->k_trans), idx, bub, s->s, NULL, 0);    
    mc_solve(NULL, NULL, k_trans, idx->ug, idx->read_g, 0.8, R_INF.trio_flag, 
        (bub->round_id == 0? 1 : 0), s->s, 1, NULL, test_block_flip?&(idx->t_ch->k_trans):0, 0, 0);

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq 0x20(%rbp), %rax
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdx
xorl %esi, %esi
callq 0x2100
movq -0x18(%rbp), %rax
movl $0x0, 0x8(%rax)
movq 0x20(%rbp), %rax
movl %eax, %ecx
leaq 0x1bc16f(%rip), %rax    # 0x3c47f8
movl %ecx, 0x1d0(%rax)
movq 0x1bb94a(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq 0x18(%rbp), %rcx
movq 0x20(%rbp), %r8
leaq 0x184dce(%rip), %rsi    # 0x38d476
leaq 0x184dfb(%rip), %rdx    # 0x38d4aa
movb $0x0, %al
callq 0x22a0
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rdx
addq $0x38, %rdx
movq 0x10(%rbp), %rax
movq 0x10(%rax), %rcx
addq $0x138, %rcx            # imm = 0x138
movq 0x10(%rbp), %r8
movq -0x18(%rbp), %r9
movq -0x8(%rbp), %rax
movq (%rax), %rax
xorl %r10d, %r10d
xorl %r10d, %r10d
movq %rax, (%rsp)
movq $0x0, 0x8(%rsp)
movl $0x0, 0x10(%rsp)
callq 0x2043f0
movq -0x20(%rbp), %rax
movq %rax, -0x60(%rbp)
movq 0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x58(%rbp)
movq 0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x50(%rbp)
leaq 0x1bcba6(%rip), %rax    # 0x3c52d0
movq 0x28(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rax
movl 0x8(%rax), %edx
xorl %eax, %eax
movl $0x1, %ecx
cmpl $0x0, %edx
cmovel %ecx, %eax
movl %eax, -0x3c(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, 0x18(%rbp)
je 0x20876f
movq 0x10(%rbp), %rax
movq 0x10(%rax), %rax
addq $0x138, %rax            # imm = 0x138
movq %rax, -0x68(%rbp)
jmp 0x208777
xorl %eax, %eax
movq %rax, -0x68(%rbp)
jmp 0x208777
movq -0x38(%rbp), %r10
movl -0x3c(%rbp), %r11d
movq -0x48(%rbp), %r9
movq -0x50(%rbp), %r8
movq -0x58(%rbp), %rcx
movq -0x60(%rbp), %rdx
movq -0x68(%rbp), %rax
xorl %esi, %esi
movsd 0x179a93(%rip), %xmm0   # 0x382230
xorl %edi, %edi
movq %rsi, %rdi
movl %r11d, (%rsp)
movq %r10, 0x8(%rsp)
movl $0x1, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
movq %rax, 0x20(%rsp)
movl $0x0, 0x28(%rsp)
movl $0x0, 0x30(%rsp)
callq 0x227770
addq $0xa0, %rsp
popq %rbp
retq
nop
// File: 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
movq %rsp, %rbp
subq $0x50, %rsp
movq 0x20(%rbp), %rax
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq 0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq 0x20(%rbp), %rax
ja 0x2088bc
movq 0x1bb7b7(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
leaq 0x17e1f5(%rip), %rsi    # 0x386a28
movb $0x0, %al
callq 0x22a0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
movq -0x30(%rbp), %r9
movq 0x10(%rbp), %r10
movq -0x38(%rbp), %rax
xorl %r11d, %r11d
movq %r10, (%rsp)
movq $0x0, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0x208620
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
movq -0x30(%rbp), %r9
movq 0x10(%rbp), %r10
movq -0x38(%rbp), %rax
movq %r10, (%rsp)
movq $0x1, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0x208620
movq 0x18(%rbp), %rax
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0x208814
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: chhylp123[P]hifiasm/hic.cpp
// Function: prt_utg_trans(kv_u_trans_t*, ma_ug_t*, _IO_FILE*)
void prt_utg_trans(kv_u_trans_t *ta, ma_ug_t* ug, FILE *fn)
{
    uint32_t i;
    u_trans_t *p = NULL;
    for (i = 0; i < ta->n; i++) {
        p = &(ta->a[i]);
        fprintf(fn, "utg%.6u%c\t%u\t%u\t%u\t%c\tutg%.6u%c\t%u\t%u\t%u\tw(%f)\tf(%u)\n", 
        p->qn+1, "lc"[ug->u.a[p->qn].circ], ug->u.a[p->qn].len, p->qs, p->qe, "+-"[p->rev],
        p->tn+1, "lc"[ug->u.a[p->tn].circ], ug->u.a[p->tn].len, p->ts, p->te, p->nw, p->f);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, -0x30(%rbp)
movq %rsi, -0x38(%rbp)
movq %rdx, -0x40(%rbp)
movq $0x0, -0x50(%rbp)
movl $0x0, -0x44(%rbp)
movl -0x44(%rbp), %eax
movq -0x30(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x208c71
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x44(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movq -0x40(%rbp), %rdi
movq -0x50(%rbp), %rax
movl 0x8(%rax), %edx
addl $0x1, %edx
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x50(%rbp), %rcx
movl 0x8(%rcx), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
shrl $0x1f, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x17c79d(%rip), %rax    # 0x385303
movsbl (%rax,%rcx), %ecx
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x50(%rbp), %rsi
movl 0x8(%rsi), %esi
imulq $0x28, %rsi, %rsi
addq %rsi, %rax
movl (%rax), %r8d
andl $0x7fffffff, %r8d       # imm = 0x7FFFFFFF
movq -0x50(%rbp), %rax
movl (%rax), %r9d
movq -0x50(%rbp), %rax
movl 0x4(%rax), %r13d
movq -0x50(%rbp), %rax
movb 0x28(%rax), %al
shrb $0x6, %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, %esi
leaq 0x17a2ea(%rip), %rax    # 0x382e9b
movsbl (%rax,%rsi), %r12d
movq -0x50(%rbp), %rax
movl 0x14(%rax), %r15d
addl $0x1, %r15d
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x50(%rbp), %rsi
movl 0x14(%rsi), %esi
imulq $0x28, %rsi, %rsi
addq %rsi, %rax
movl (%rax), %eax
shrl $0x1f, %eax
movl %eax, %eax
movl %eax, %esi
leaq 0x17c71b(%rip), %rax    # 0x385303
movsbl (%rax,%rsi), %r14d
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x50(%rbp), %rsi
movl 0x14(%rsi), %esi
imulq $0x28, %rsi, %rsi
addq %rsi, %rax
movl (%rax), %ebx
andl $0x7fffffff, %ebx       # imm = 0x7FFFFFFF
movq -0x50(%rbp), %rax
movl 0xc(%rax), %r11d
movq -0x50(%rbp), %rax
movl 0x10(%rax), %r10d
movq -0x50(%rbp), %rax
movsd 0x20(%rax), %xmm0
movq -0x50(%rbp), %rax
movb 0x28(%rax), %al
andb $0x3f, %al
movzbl %al, %eax
leaq 0x17eaae(%rip), %rsi    # 0x3876e5
movl %r13d, (%rsp)
movl %r12d, 0x8(%rsp)
movl %r15d, 0x10(%rsp)
movl %r14d, 0x18(%rsp)
movl %ebx, 0x20(%rsp)
movl %r11d, 0x28(%rsp)
movl %r10d, 0x30(%rsp)
movl %eax, 0x38(%rsp)
movb $0x1, %al
callq 0x22a0
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x208b0c
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: chhylp123[P]hifiasm/hic.cpp
// Function: prt_kv_u_trans(kv_u_trans_t*, hc_links*, signed char*, _IO_FILE*)
void prt_kv_u_trans(kv_u_trans_t *ta, hc_links* lk, int8_t *s, FILE *fn)
{
    uint32_t i;
    u_trans_t *p = NULL;
    hc_edge *e = NULL;

    for (i = 0; i < ta->n; i++) {
        p = &(ta->a[i]);
        e = get_hc_edge(lk, p->qn, p->tn, 0);
        fprintf(fn, "s-utg%.6ul\tS(%d)\td-utg%.6ul\tS(%d)\trev(%u)\td(%lld)\ttw(%f)\n", 
        p->qn+1, s[p->qn], p->tn+1, s[p->tn], p->rev, 
        (e == NULL || e->dis == (uint64_t)-1)? -1 : (long long)(e->dis>>3), p->nw);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq $0x0, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x208dc7
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x24(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, %esi
movq -0x30(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, %edx
xorl %eax, %eax
movl %eax, %ecx
callq 0x1d09c0
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x30(%rbp), %rax
movl 0x8(%rax), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
movq -0x18(%rbp), %rax
movq -0x30(%rbp), %rcx
movl 0x8(%rcx), %ecx
movsbl (%rax,%rcx), %eax
movl %eax, -0x48(%rbp)
movq -0x30(%rbp), %rax
movl 0x14(%rax), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
movq -0x18(%rbp), %rax
movq -0x30(%rbp), %rcx
movl 0x14(%rcx), %ecx
movsbl (%rax,%rcx), %eax
movl %eax, -0x40(%rbp)
movq -0x30(%rbp), %rax
movb 0x28(%rax), %al
shrb $0x6, %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x3c(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0x208d62
movq -0x38(%rbp), %rax
cmpq $-0x1, 0x10(%rax)
jne 0x208d6f
movq $-0x1, %rax
movq %rax, -0x60(%rbp)
jmp 0x208d7f
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
shrq $0x3, %rax
movq %rax, -0x60(%rbp)
movl -0x3c(%rbp), %r10d
movl -0x40(%rbp), %r9d
movl -0x44(%rbp), %r8d
movl -0x48(%rbp), %ecx
movl -0x4c(%rbp), %edx
movq -0x58(%rbp), %rdi
movq -0x60(%rbp), %rax
movq -0x30(%rbp), %rsi
movsd 0x20(%rsi), %xmm0
leaq 0x18443e(%rip), %rsi    # 0x38d1e7
movl %r10d, (%rsp)
movq %rax, 0x8(%rsp)
movb $0x1, %al
callq 0x22a0
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x208caf
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)
// File: chhylp123[P]hifiasm/hic.cpp
// Function: load_psg_t(psg_t**, char const*)
int load_psg_t(psg_t **sg, 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(*sg, 1);
    flag += fread(&((*sg)->xs), sizeof((*sg)->xs), 1, fp);
    flag += fread(&((*sg)->sg.n), sizeof((*sg)->sg.n), 1, fp);
    (*sg)->sg.m = (*sg)->sg.n;
    MALLOC((*sg)->sg.a, (*sg)->sg.n);
    flag += fread((*sg)->sg.a, sizeof(mc_gg_status), (*sg)->sg.n, fp);

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x20a0
movq %rax, %rdi
addq $0x19, %rdi
movl $0x1, %esi
callq 0x2140
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq 0x182517(%rip), %rsi    # 0x38d32c
movb $0x0, %al
callq 0x2050
movq $0x0, -0x30(%rbp)
movq -0x28(%rbp), %rdi
leaq 0x1855a7(%rip), %rsi    # 0x3903d6
callq 0x2200
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x20ae4b
movl $0x0, -0x4(%rbp)
jmp 0x20af2b
movl $0x1, %edi
movl $0x20, %esi
callq 0x2140
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
addq $0x18, %rdi
movq -0x30(%rbp), %rcx
movl $0x8, %esi
movl $0x1, %edx
callq 0x22e0
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
addq $0x8, %rdi
movq -0x30(%rbp), %rcx
movl $0x8, %esi
movl $0x1, %edx
callq 0x22e0
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rcx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rdi
shlq $0x5, %rdi
callq 0x2270
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rdx
movq -0x30(%rbp), %rcx
movl $0x20, %esi
callq 0x22e0
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x30(%rbp), %rdi
callq 0x21a0
movq -0x28(%rbp), %rdi
callq 0x2210
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: chhylp123[P]hifiasm/hic.cpp
// Function: write_psg_t(psg_t*, char const*)
void write_psg_t(psg_t *sg, const char *fn)
{
    char *buf = (char*)calloc(strlen(fn) + 25, 1);
    sprintf(buf, "%s.hic.pst.bin", fn);
    FILE* fp = fopen(buf, "w");

    fwrite(&(sg->xs), sizeof(sg->xs), 1, fp);
    fwrite(&(sg->sg.n), sizeof(sg->sg.n), 1, fp);
    fwrite(sg->sg.a, sizeof(mc_gg_status), sg->sg.n, fp);

    fclose(fp);
    free(buf);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x20a0
movq %rax, %rdi
addq $0x19, %rdi
movl $0x1, %esi
callq 0x2140
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rdx
leaq 0x1823af(%rip), %rsi    # 0x38d32c
movb $0x0, %al
callq 0x2050
movq -0x18(%rbp), %rdi
leaq 0x18e443(%rip), %rsi    # 0x3993d2
callq 0x2200
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
addq $0x18, %rdi
movq -0x20(%rbp), %rcx
movl $0x8, %esi
movl $0x1, %edx
callq 0x2400
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
movq -0x20(%rbp), %rcx
movl $0x8, %esi
movl $0x1, %edx
callq 0x2400
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdx
movq -0x20(%rbp), %rcx
movl $0x20, %esi
callq 0x2400
movq -0x20(%rbp), %rdi
callq 0x21a0
movq -0x18(%rbp), %rdi
callq 0x2210
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: chhylp123[P]hifiasm/hic.cpp
// Function: init_psg_t(unsigned long, ma_ug_t*, asg_t*, ug_opt_t*)
psg_t* init_psg_t(uint64_t seed, ma_ug_t* ug, asg_t* rg, ug_opt_t *opt)
{
    psg_t *s = NULL; CALLOC(s, 1);
    s->xs = seed;
    
    kv_gg_status *sa = init_mc_gg_status(ug, rg, opt->coverage_cut, opt->sources, opt->ruIndex, 
    asm_opt.hom_global_coverage_set?asm_opt.hom_global_coverage:((double)asm_opt.hom_global_coverage)/((double)HOM_PEAK_RATE), 
    asm_opt.polyploidy);

    s->sg = *sa;
    free(sa);
    return s;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movl $0x1, %edi
movl $0x20, %esi
callq 0x2140
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x38(%rbp)
leaq 0x1b976f(%rip), %rax    # 0x3c47f8
cmpl $0x0, 0x148(%rax)
je 0x20b0a8
leaq 0x1b975f(%rip), %rax    # 0x3c47f8
cvtsi2sdl 0x144(%rax), %xmm0
movsd %xmm0, -0x60(%rbp)
jmp 0x20b0c8
leaq 0x1b9749(%rip), %rax    # 0x3c47f8
cvtsi2sdl 0x144(%rax), %xmm0
movsd 0x17b781(%rip), %xmm1   # 0x386840
divsd %xmm1, %xmm0
movsd %xmm0, -0x60(%rbp)
movq -0x38(%rbp), %r8
movq -0x40(%rbp), %rcx
movq -0x48(%rbp), %rdx
movq -0x50(%rbp), %rsi
movq -0x58(%rbp), %rdi
movsd -0x60(%rbp), %xmm0
movsd 0x176f0f(%rip), %xmm2   # 0x381ff8
movaps %xmm0, %xmm1
subsd %xmm2, %xmm1
cvttsd2si %xmm1, %rax
cvttsd2si %xmm0, %r9
movq %r9, %r10
sarq $0x3f, %r10
andq %r10, %rax
orq %rax, %r9
leaq 0x1b96ea(%rip), %rax    # 0x3c47f8
movl 0x1bc(%rax), %eax
movzwl %ax, %eax
movl %eax, (%rsp)
callq 0x227e70
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rcx
movq -0x28(%rbp), %rax
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rax)
movq -0x30(%rbp), %rdi
callq 0x2210
movq -0x28(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: chhylp123[P]hifiasm/hic.cpp
// Function: gen_mmhap_bub(ma_ug_t*, unsigned char*, kv_u_trans_t*, mmhap_t*)
bubble_type *gen_mmhap_bub(ma_ug_t* ug, uint8_t *r_het_flag, kv_u_trans_t *ref, mmhap_t *hh)
{
    uint64_t k;
    bubble_type *p; CALLOC(p, 1); p->n_round = asm_opt.n_weight; p->round_id = 0;
    identify_bubbles(ug, p, r_het_flag, ref);
    for (k = 0; k < ug->g->n_seq; k++) {
        if(IF_BUB(k, (*p))) continue;
        if(IF_HOM(k, (*p))) {
            if(hh->h.a[k].n < hh->h.a[k].m) p->index[k] = p->num.n;
        } else if(IF_HET(k, (*p))) {
            if(hh->h.a[k].n >= hh->h.a[k].m) p->index[k] = (uint32_t)-1;
        }
    }
    return p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl $0x1, %edi
movl $0x110, %esi            # imm = 0x110
callq 0x2140
movq %rax, -0x30(%rbp)
leaq 0x1b8d16(%rip), %rax    # 0x3c47f8
movl 0x1e0(%rax), %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x30(%rbp), %rax
movl $0x0, 0x8(%rax)
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rcx
callq 0x1c5bb0
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
movl 0x14(%rcx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movl %ecx, %ecx
cmpq %rcx, %rax
jae 0x20bc33
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq -0x28(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movq -0x30(%rbp), %rcx
movq 0x80(%rcx), %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
jae 0x20bb5e
jmp 0x20bc22
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq -0x28(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movq -0x30(%rbp), %rcx
movq 0x80(%rcx), %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
jbe 0x20bbc1
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
imulq $0xc, -0x28(%rbp), %rcx
addq %rcx, %rax
movl (%rax), %eax
movq -0x20(%rbp), %rcx
movq 0x10(%rcx), %rcx
imulq $0xc, -0x28(%rbp), %rdx
addq %rdx, %rcx
cmpl 0x4(%rcx), %eax
jae 0x20bbbf
movq -0x30(%rbp), %rax
movq 0x30(%rax), %rax
movl %eax, %edx
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq -0x28(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
jmp 0x20bc20
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq -0x28(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movq -0x30(%rbp), %rcx
movq 0x80(%rcx), %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
jne 0x20bc1e
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
imulq $0xc, -0x28(%rbp), %rcx
addq %rcx, %rax
movl (%rax), %eax
movq -0x20(%rbp), %rcx
movq 0x10(%rcx), %rcx
imulq $0xc, -0x28(%rbp), %rdx
addq %rdx, %rcx
cmpl 0x4(%rcx), %eax
jb 0x20bc1c
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq -0x28(%rbp), %rcx
movl $0xffffffff, (%rax,%rcx,4) # imm = 0xFFFFFFFF
jmp 0x20bc1e
jmp 0x20bc20
jmp 0x20bc22
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x20bb17
movq -0x30(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: chhylp123[P]hifiasm/hic.cpp
// Function: exchange_kv_u_trans_t(kv_u_trans_t*, kv_u_trans_t*)
void exchange_kv_u_trans_t(kv_u_trans_t *a, kv_u_trans_t *b)
{
    uint64_t k, *ua; u_trans_t *u;
    k = a->n; a->n = b->n; b->n = k;
    k = a->m; a->m = b->m; b->m = k;
    u = a->a; a->a = b->a; b->a = u;

    k = a->idx.n; a->idx.n = b->idx.n; b->idx.n = k;
    k = a->idx.m; a->idx.m = b->idx.m; b->idx.m = k;
    ua = a->idx.a; a->idx.a = b->idx.a; b->idx.a = ua;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x28(%rax)
popq %rbp
retq
nopw (%rax,%rax)
// File: chhylp123[P]hifiasm/hic.cpp
// Function: cal_ave_ovlp(u_trans_t*, unsigned long, double)
uint64_t cal_ave_ovlp(u_trans_t *a, uint64_t an, double top)
{
    if(!an) return 0;
    uint64_t k, len, cut, occ, tot;
    for (k = len = 0; k < an; k++) {
        len += a[k].qe - a[k].qs;
    }
    cut = len - (len*top);
    for (k = occ = tot = 0; k < an; k++) {
        if(a[k].qe - a[k].qs < cut) continue;
        occ++; tot += a[k].qe - a[k].qs;
    }
    if(!occ) {
        occ = an; tot = len;
    }
    return tot/occ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movsd %xmm0, -0x20(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x20c145
movq $0x0, -0x8(%rbp)
jmp 0x20c2a6
movq $0x0, -0x30(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x20c194
movq -0x10(%rbp), %rax
imulq $0x30, -0x28(%rbp), %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movq -0x10(%rbp), %rcx
imulq $0x30, -0x28(%rbp), %rdx
addq %rdx, %rcx
subl (%rcx), %eax
movl %eax, %eax
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x20c155
movaps 0x175e75(%rip), %xmm1   # 0x382010
movq -0x30(%rbp), %xmm0
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x175e74(%rip), %xmm1   # 0x382020
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd -0x20(%rbp), %xmm2
movaps %xmm0, %xmm1
mulsd %xmm2, %xmm1
subsd %xmm1, %xmm0
movaps %xmm0, %xmm1
cvttsd2si %xmm1, %rax
movq %rax, %rdx
sarq $0x3f, %rdx
movsd 0x175e16(%rip), %xmm1   # 0x381ff8
subsd %xmm1, %xmm0
cvttsd2si %xmm0, %rcx
andq %rdx, %rcx
orq %rcx, %rax
movq %rax, -0x38(%rbp)
movq $0x0, -0x48(%rbp)
movq $0x0, -0x40(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x20c27f
movq -0x10(%rbp), %rax
imulq $0x30, -0x28(%rbp), %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movq -0x10(%rbp), %rcx
imulq $0x30, -0x28(%rbp), %rdx
addq %rdx, %rcx
subl (%rcx), %eax
movl %eax, %eax
cmpq -0x38(%rbp), %rax
jae 0x20c23e
jmp 0x20c271
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
imulq $0x30, -0x28(%rbp), %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movq -0x10(%rbp), %rcx
imulq $0x30, -0x28(%rbp), %rdx
addq %rdx, %rcx
subl (%rcx), %eax
movl %eax, %eax
addq -0x48(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x20c20d
cmpq $0x0, -0x40(%rbp)
jne 0x20c296
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
xorl %ecx, %ecx
movl %ecx, %edx
divq -0x40(%rbp)
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax)