LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: chhylp123[P]hifiasm/rcut.cpp
// Function: back_status(mcgg_svaux_t*, unsigned int, unsigned int)
void inline back_status(mcgg_svaux_t *b, uint32_t id, uint32_t to_opt)
{
	if(to_opt)
	{
		b->s_opt[id] = b->s[id];
		memcpy(b->z_opt->z+(id<<b->z->hapN), b->z->z+(id<<b->z->hapN), (1<<b->z->hapN)*sizeof(t_w_t));
	}
	else
	{
		b->s[id] = b->s_opt[id];
		memcpy(b->z->z+(id<<b->z->hapN), b->z_opt->z+(id<<b->z->hapN), (1<<b->z->hapN)*sizeof(t_w_t));
	}
	
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
cmpl $0x0, -0x10(%rbp)
je 0x22d429
movq -0x8(%rbp), %rax
movq 0x50(%rax), %rcx
movl -0xc(%rbp), %eax
shlq $0x5, %rax
addq %rax, %rcx
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movl -0xc(%rbp), %edx
shlq $0x5, %rdx
addq %rdx, %rax
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%rcx), %rdx
movq %rdx, 0x10(%rax)
movq 0x18(%rcx), %rcx
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movq (%rax), %rdi
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
movq 0x40(%rcx), %rcx
movl 0x8(%rcx), %ecx
shll %cl, %eax
movl %eax, %eax
shlq $0x3, %rax
addq %rax, %rdi
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq (%rax), %rsi
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
movq 0x40(%rcx), %rcx
movl 0x8(%rcx), %ecx
shll %cl, %eax
movl %eax, %eax
shlq $0x3, %rax
addq %rax, %rsi
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movl 0x8(%rax), %ecx
movl $0x1, %eax
shll %cl, %eax
movslq %eax, %rdx
shlq $0x3, %rdx
callq 0x2180
jmp 0x22d4d1
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rcx
movl -0xc(%rbp), %eax
shlq $0x5, %rax
addq %rax, %rcx
movq -0x8(%rbp), %rax
movq 0x50(%rax), %rax
movl -0xc(%rbp), %edx
shlq $0x5, %rdx
addq %rdx, %rax
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%rcx), %rdx
movq %rdx, 0x10(%rax)
movq 0x18(%rcx), %rcx
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq (%rax), %rdi
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
movq 0x40(%rcx), %rcx
movl 0x8(%rcx), %ecx
shll %cl, %eax
movl %eax, %eax
shlq $0x3, %rax
addq %rax, %rdi
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movq (%rax), %rsi
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
movq 0x40(%rcx), %rcx
movl 0x8(%rcx), %ecx
shll %cl, %eax
movl %eax, %eax
shlq $0x3, %rax
addq %rax, %rsi
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movl 0x8(%rax), %ecx
movl $0x1, %eax
shll %cl, %eax
movslq %eax, %rdx
shlq $0x3, %rdx
callq 0x2180
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: chhylp123[P]hifiasm/horder.cpp
// Function: init_debug_phasing(ma_ug_t*, kvec_pe_hit*, kv_u_trans_t*, h_covs*)
debug_phasing_t *init_debug_phasing(ma_ug_t *ug, kvec_pe_hit *hits, kv_u_trans_t *k_trans, h_covs *b_points)
{
    debug_phasing_t *p = NULL; CALLOC(p, 1);
    p->ug = copy_untig_graph(ug);
    p->b_points = b_points;

    p->hits.pos_mode = hits->pos_mode; p->hits.uID_bits = hits->pos_mode;
    p->hits.a.n = p->hits.a.m = hits->a.n = hits->a.m;
    MALLOC(p->hits.a.a, p->hits.a.n); 
    memcpy(p->hits.a.a, hits->a.a, p->hits.a.n*sizeof(pe_hit));
    
    p->k_trans.n = p->k_trans.m = k_trans->n;
    MALLOC(p->k_trans.a, p->k_trans.n); 
    memcpy(p->k_trans.a, k_trans->a, p->k_trans.n*sizeof(u_trans_t));

    p->k_trans.idx.n = p->k_trans.idx.m = k_trans->idx.n;
    MALLOC(p->k_trans.idx.a, p->k_trans.idx.n); 
    memcpy(p->k_trans.idx.a, k_trans->idx.a, p->k_trans.idx.n*sizeof(uint64_t));

    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)
movq $0x0, -0x28(%rbp)
movl $0x1, %edi
movl $0x98, %esi
callq 0x2140
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
callq 0x10ba70
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x90(%rax)
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x58(%rax)
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x50(%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x28(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rdi
shlq $0x5, %rdi
callq 0x2270
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rdx
shlq $0x5, %rdx
callq 0x2180
movq -0x18(%rbp), %rax
movq (%rax), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x68(%rax)
movq -0x28(%rbp), %rax
movq %rcx, 0x60(%rax)
movq -0x28(%rbp), %rax
imulq $0x30, 0x60(%rax), %rdi
callq 0x2270
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x70(%rax)
movq -0x28(%rbp), %rax
movq 0x70(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x28(%rbp), %rax
imulq $0x30, 0x60(%rax), %rdx
callq 0x2180
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x80(%rax)
movq -0x28(%rbp), %rax
movq %rcx, 0x78(%rax)
movq -0x28(%rbp), %rax
movq 0x78(%rax), %rdi
shlq $0x3, %rdi
callq 0x2270
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x88(%rax)
movq -0x28(%rbp), %rax
movq 0x88(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rsi
movq -0x28(%rbp), %rax
movq 0x78(%rax), %rdx
shlq $0x3, %rdx
callq 0x2180
movq -0x28(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: chhylp123[P]hifiasm/horder.cpp
// Function: destory_debug_phasing_t(debug_phasing_t**)
void destory_debug_phasing_t(debug_phasing_t **x)
{
    ma_ug_destroy((*x)->ug);
    free((*x)->hits.a.a); free((*x)->hits.idx.a); free((*x)->hits.occ.a);
    free((*x)->k_trans.a); free((*x)->k_trans.idx.a);
    free(*x);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rdi
callq 0xcd6f0
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x18(%rax), %rdi
callq 0x2210
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x30(%rax), %rdi
callq 0x2210
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x48(%rax), %rdi
callq 0x2210
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x70(%rax), %rdi
callq 0x2210
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x88(%rax), %rdi
callq 0x2210
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x2210
addq $0x10, %rsp
popq %rbp
retq
// File: chhylp123[P]hifiasm/horder.cpp
// Function: iter_rid(buf_t*, unsigned long*, unsigned long*, ma_ug_t*)
uint32_t iter_rid(buf_t *b, uint64_t *ui, uint64_t *ri, ma_ug_t *ug)
{
    ma_utg_t *u = NULL;
    while ((*ui) < b->b.n)
    {
        u =  &(ug->u.a[b->b.a[(*ui)]>>1]);
        while ((*ri) < u->n) return u->a[(*ri)++]>>32;
        (*ui)++; (*ri) = 0;
    }

    return (uint32_t)-1;
}

// 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 -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x38(%rcx), %rax
jae 0x231a91
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x48(%rcx), %rcx
movq -0x18(%rbp), %rdx
movq (%rdx), %rdx
movl (%rcx,%rdx,4), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq -0x30(%rbp), %rcx
movl 0x10(%rcx), %ecx
cmpq %rcx, %rax
jae 0x231a73
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x20(%rbp), %rdx
movq (%rdx), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, (%rdx)
movq (%rax,%rcx,8), %rax
shrq $0x20, %rax
movl %eax, -0x4(%rbp)
jmp 0x231a98
movq -0x18(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
movq $0x0, (%rax)
jmp 0x2319fc
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: chhylp123[P]hifiasm/horder.cpp
// Function: print_N50(ma_ug_t*)
void print_N50(ma_ug_t* ug)
{
    kvec_t(uint64_t) b; kv_init(b);
    uint64_t i, s, len;
    for (i = s = 0; i < ug->u.n; ++i) 
    {
        kv_push(uint64_t, b, ug->u.a[i].len);
        s += ug->u.a[i].len;
    }
    len = s;
    
    radix_sort_ho64(b.a, b.a+b.n);
    fprintf(stderr, "[M::%s::] Genome Size: %lu, # Contigs: %u, Largest Contig: %lu\n", 
    __func__, len, (uint32_t)ug->u.n, b.a[b.n-1]);
    i = b.n; s = 0;
    while (i > 0)
    {
        i--;
        s += b.a[i];
        if(s >= (len>>1))
        {
            fprintf(stderr, "[M::%s::] N50: %lu\n", __func__, b.a[i]);
            break;
        }
    }
    
    kv_destroy(b);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq $0x0, -0x10(%rbp)
movq $0x0, -0x30(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x232d91
jmp 0x232ce7
movq -0x20(%rbp), %rax
cmpq -0x18(%rbp), %rax
jne 0x232d2d
cmpq $0x0, -0x18(%rbp)
je 0x232d05
movq -0x18(%rbp), %rax
shlq %rax
movq %rax, -0x40(%rbp)
jmp 0x232d10
movl $0x2, %eax
movq %rax, -0x40(%rbp)
jmp 0x232d10
movq -0x40(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
shlq $0x3, %rsi
callq 0x2360
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
imulq $0x28, -0x28(%rbp), %rcx
addq %rcx, %rax
movl (%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
movl %eax, %edx
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, -0x20(%rbp)
movq %rdx, (%rax,%rcx,8)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
imulq $0x28, -0x28(%rbp), %rcx
addq %rcx, %rax
movl (%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x232cd4
movq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rsi
callq 0x22e3a0
movq 0x191228(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq -0x38(%rbp), %rcx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl %eax, %r8d
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rdx
subq $0x1, %rdx
movq (%rax,%rdx,8), %r9
leaq 0x15b5b1(%rip), %rsi    # 0x38e391
leaq 0x15b5ea(%rip), %rdx    # 0x38e3d1
movb $0x0, %al
callq 0x22a0
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
cmpq $0x0, -0x28(%rbp)
jbe 0x232e64
movq -0x28(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rax
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq -0x38(%rbp), %rcx
shrq %rcx
cmpq %rcx, %rax
jb 0x232e62
movq 0x1911a4(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rcx
leaq 0x15b589(%rip), %rsi    # 0x38e3db
leaq 0x15b578(%rip), %rdx    # 0x38e3d1
movb $0x0, %al
callq 0x22a0
jmp 0x232e64
jmp 0x232dfe
movq -0x10(%rbp), %rdi
callq 0x2210
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: chhylp123[P]hifiasm/horder.cpp
// Function: init_trans_col(ma_ug_t*, unsigned long, kv_u_trans_t*)
trans_col_t *init_trans_col(ma_ug_t *ug, uint64_t r_num, kv_u_trans_t *ref)
{
    trans_col_t *p = NULL; 
    CALLOC(p, 1);
    p->ref = ref;
    p->idx = init_trans_chain(ug, r_num);
    return p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movl $0x1, %edi
movl $0x10, %esi
callq 0x2140
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xfc220
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: chhylp123[P]hifiasm/horder.cpp
// Function: resolve_hit(unsigned long, unsigned int, unsigned long, unsigned long, unsigned long*, unsigned long*, unsigned long*)
void resolve_hit(uint64_t x, uint32_t rLen, uint64_t uID_bits, uint64_t pos_mode, uint64_t *uid, uint64_t *beg, uint64_t *end)
{
    if(uid) (*uid) = ((x<<1)>>(64 - uID_bits)); 
    uint32_t rev = (x>>63);
    long long ref_p = x & 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:
pushq %rbp
movq %rsp, %rbp
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x2331a3
movq -0x8(%rbp), %rax
shlq %rax
movl $0x40, %ecx
subq -0x18(%rbp), %rcx
shrq %cl, %rax
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
shrq $0x3f, %rax
movl %eax, -0x34(%rbp)
movq -0x8(%rbp), %rax
andq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
cmpl $0x0, -0x34(%rbp)
je 0x2331dc
movq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
addq $0x1, %rax
movl -0xc(%rbp), %ecx
subq %rcx, %rax
movq %rax, -0x48(%rbp)
jmp 0x2331f6
movq -0x40(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movl -0xc(%rbp), %ecx
addq %rcx, %rax
subq $0x1, %rax
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x48(%rbp)
jge 0x233205
movq $0x0, -0x48(%rbp)
cmpq $0x0, -0x50(%rbp)
jge 0x233214
movq $0x0, -0x50(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x233226
movq -0x48(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
cmpq $0x0, 0x10(%rbp)
je 0x23323c
movq -0x50(%rbp), %rcx
addq $0x1, %rcx
movq 0x10(%rbp), %rax
movq %rcx, (%rax)
popq %rbp
retq
nop
// File: chhylp123[P]hifiasm/horder.cpp
// Function: get_trio_unitig_graph(asg_t*, unsigned char, ug_opt_t*)
ma_ug_t* get_trio_unitig_graph(asg_t *sg, uint8_t flag, ug_opt_t *opt)
{
    kvec_asg_arc_t_warp new_rtg_edges;
    kv_init(new_rtg_edges.a);

    ma_ug_t *ug = NULL;
    ug = ma_ug_gen(sg);

    adjust_utg_by_trio(&ug, sg, flag, TRIO_THRES, opt->sources, opt->reverse_sources, 
    opt->coverage_cut, opt->tipsLen, opt->tip_drop_ratio, opt->stops_threshold, 
    opt->ruIndex, opt->chimeric_rate, opt->drop_ratio, opt->max_hang, opt->min_ovlp,
    opt->gap_fuzz, &new_rtg_edges, opt->b_mask_t);

    kv_destroy(new_rtg_edges.a);
    return ug;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movb %sil, %al
movq %rdi, -0x30(%rbp)
movb %al, -0x31(%rbp)
movq %rdx, -0x40(%rbp)
movq $0x0, -0x58(%rbp)
movq $0x0, -0x60(%rbp)
movq $0x0, -0x50(%rbp)
movq $0x0, -0x68(%rbp)
movq -0x30(%rbp), %rdi
callq 0xe5910
movq %rax, -0x68(%rbp)
movq -0x30(%rbp), %rsi
movb -0x31(%rbp), %dl
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x40(%rbp), %rax
movq 0x10(%rax), %r8
movq -0x40(%rbp), %rax
movq (%rax), %r9
movq -0x40(%rbp), %rax
movq 0x18(%rax), %r13
movq -0x40(%rbp), %rax
movss 0x20(%rax), %xmm1
movq -0x40(%rbp), %rax
movq 0x28(%rax), %r12
movq -0x40(%rbp), %rax
movq 0x30(%rax), %r15
movq -0x40(%rbp), %rax
movss 0x38(%rax), %xmm2
movq -0x40(%rbp), %rax
movss 0x3c(%rax), %xmm3
movq -0x40(%rbp), %rax
movl 0x40(%rax), %r14d
movq -0x40(%rbp), %rax
movl 0x44(%rax), %ebx
movq -0x40(%rbp), %rax
movq 0x50(%rax), %rax
movl %eax, %r11d
movq -0x40(%rbp), %rax
movq 0x60(%rax), %rax
leaq -0x68(%rbp), %rdi
movss 0x15144e(%rip), %xmm0   # 0x38689c
leaq -0x60(%rbp), %r10
movzbl %dl, %edx
movq %r13, (%rsp)
movq %r12, 0x8(%rsp)
movq %r15, 0x10(%rsp)
movl %r14d, 0x18(%rsp)
movl %ebx, 0x20(%rsp)
movl %r11d, 0x28(%rsp)
movq %r10, 0x30(%rsp)
movq %rax, 0x38(%rsp)
callq 0x120950
movq -0x50(%rbp), %rdi
callq 0x2210
movq -0x68(%rbp), %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: chhylp123[P]hifiasm/horder.cpp
// Function: asg_arc_unique_del(asg_t*, unsigned int, unsigned int, int)
static inline void asg_arc_unique_del(asg_t *g, uint32_t v, uint32_t w, int del)
{
	uint32_t i, nv = asg_arc_n(g, v);
	asg_arc_t *av = asg_arc_a(g, v);
	for (i = 0; i < nv; ++i)
    {
        if (av[i].v == w)
        {
            av[i].del = !!del;
            break;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movl -0xc(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x28(%rcx), %rcx
movl -0xc(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jae 0x235c1f
movq -0x28(%rbp), %rax
movl -0x18(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
cmpl -0x10(%rbp), %eax
jne 0x235c12
cmpl $0x0, -0x14(%rbp)
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %edx
movq -0x28(%rbp), %rax
movl -0x18(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %ecx
andl $0x1, %edx
shll $0x1f, %edx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
orl %edx, %ecx
movl %ecx, 0xc(%rax)
jmp 0x235c1f
jmp 0x235c14
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x235bc0
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: chhylp123[P]hifiasm/horder.cpp
// Function: update_r_break(unsigned long, unsigned long, h_covs*)
int64_t update_r_break(uint64_t rs, uint64_t re, h_covs *hits)
{
    uint64_t i, hs, he;
    int64_t dp, old_dp, max_dp = 0;
    for (i = 0, dp = 0; i < hits->n; ++i) 
    {
        if(hits->a[i].s&1)
        {
            hs = hits->a[i].e;
            he = hits->a[i].s>>1;
        }
        else
        {
            hs = hits->a[i].s>>1;
            he = hits->a[i].e;
        }
        if(hs <= rs && he >= re)
        {
            old_dp = dp;
            ///if a[j] is qe
            if (hits->a[i].s&1) --dp;
            else ++dp;
            ///hits->a[i].s is qe
            if (old_dp > dp && max_dp < old_dp)
            {
                 max_dp = old_dp;
            }
        }
    }

    return max_dp;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq $0x0, -0x48(%rbp)
movq $0x0, -0x20(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jae 0x236c2b
movq -0x18(%rbp), %rax
movq (%rax), %rax
imulq $0x18, -0x20(%rbp), %rcx
addq %rcx, %rax
movq (%rax), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x236b78
movq -0x18(%rbp), %rax
movq (%rax), %rax
imulq $0x18, -0x20(%rbp), %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
imulq $0x18, -0x20(%rbp), %rcx
addq %rcx, %rax
movq (%rax), %rax
shrq %rax
movq %rax, -0x30(%rbp)
jmp 0x236ba8
movq -0x18(%rbp), %rax
movq (%rax), %rax
imulq $0x18, -0x20(%rbp), %rcx
addq %rcx, %rax
movq (%rax), %rax
shrq %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
imulq $0x18, -0x20(%rbp), %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x8(%rbp), %rax
ja 0x236c18
movq -0x30(%rbp), %rax
cmpq -0x10(%rbp), %rax
jb 0x236c18
movq -0x38(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
imulq $0x18, -0x20(%rbp), %rcx
addq %rcx, %rax
movq (%rax), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x236bee
movq -0x38(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x236bfa
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x40(%rbp), %rax
cmpq -0x38(%rbp), %rax
jle 0x236c16
movq -0x48(%rbp), %rax
cmpq -0x40(%rbp), %rax
jge 0x236c16
movq -0x40(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x236c18
jmp 0x236c1a
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x236b18
movq -0x48(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: chhylp123[P]hifiasm/horder.cpp
// Function: get_utg_len(ma_ug_t*)
uint64_t get_utg_len(ma_ug_t *ug)
{   
    uint64_t i, s;
    for (i = s = 0; i < ug->u.n; ++i) 
    {
        if(!ug->u.a[i].a) continue;
        s += ug->u.a[i].len;
    }

    return s;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x18(%rbp)
movq $0x0, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x23851d
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
imulq $0x28, -0x10(%rbp), %rcx
addq %rcx, %rax
cmpq $0x0, 0x18(%rax)
jne 0x2384ee
jmp 0x23850f
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
imulq $0x28, -0x10(%rbp), %rcx
addq %rcx, %rax
movl (%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x2384c8
movq -0x18(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: chhylp123[P]hifiasm/horder.cpp
// Function: update_nus(ma_utg_t*, ma_ug_t*, h_cov_t*, unsigned long)
void update_nus(ma_utg_t *u, ma_ug_t *ug, h_cov_t *a, uint64_t a_n)
{
    uint64_t i, k, offset;
    for (i = offset = 0; i < u->n; i++)
    {   
        for (k = 0; k < a_n; k++)
        {
            if(a[k].s == i)
            {
                a[k].s = offset; a[k].e += offset;
                if(k + 1 == a_n) return;
            } 
            
        }
        offset += (u->a[i] != (uint64_t)-1? (uint32_t)u->a[i]:GAP_LEN);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq $0x0, -0x38(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x8(%rbp), %rcx
movl 0x10(%rcx), %ecx
cmpq %rcx, %rax
jae 0x238f4c
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x238efc
movq -0x18(%rbp), %rax
imulq $0x18, -0x30(%rbp), %rcx
addq %rcx, %rax
movq (%rax), %rax
cmpq -0x28(%rbp), %rax
jne 0x238eec
movq -0x38(%rbp), %rcx
movq -0x18(%rbp), %rax
imulq $0x18, -0x30(%rbp), %rdx
addq %rdx, %rax
movq %rcx, (%rax)
movq -0x38(%rbp), %rcx
movq -0x18(%rbp), %rax
imulq $0x18, -0x30(%rbp), %rdx
addq %rdx, %rax
addq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq -0x30(%rbp), %rax
addq $0x1, %rax
cmpq -0x20(%rbp), %rax
jne 0x238eea
jmp 0x238f4c
jmp 0x238eec
jmp 0x238eee
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x238e90
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x28(%rbp), %rcx
cmpq $-0x1, (%rax,%rcx,8)
je 0x238f24
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl %eax, -0x3c(%rbp)
jmp 0x238f2e
movl $0x64, %eax
movl %eax, -0x3c(%rbp)
jmp 0x238f2e
movl -0x3c(%rbp), %eax
movl %eax, %eax
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x238e74
popq %rbp
retq
nop
// File: chhylp123[P]hifiasm/horder.cpp
// Function: get_r_edge(asg_t*, unsigned long, unsigned long, unsigned long*)
asg_arc_t *get_r_edge(asg_t *rg, uint64_t v, uint64_t w, uint64_t *id)
{
    asg_arc_t *av = asg_arc_a(rg, v);
    uint64_t nv = asg_arc_n(rg, v), k;
    if(id) (*id) = (uint64_t)-1;
    for (k = 0; k < nv; k++)
    {
        if(av[k].del) continue;
        if(av[k].v == w) 
        {
            if(id) (*id) = (rg->idx[v]>>32) + k;
            return &(av[k]);
        }
    }
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x28(%rcx), %rcx
movq -0x18(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl %eax, %eax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x239ce3
movq -0x28(%rbp), %rax
movq $-0x1, (%rax)
movq $0x0, -0x40(%rbp)
movq -0x40(%rbp), %rax
cmpq -0x38(%rbp), %rax
jae 0x239d6b
movq -0x30(%rbp), %rax
imulq $0x18, -0x40(%rbp), %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x239d0e
jmp 0x239d5d
movq -0x30(%rbp), %rax
imulq $0x18, -0x40(%rbp), %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
cmpq -0x20(%rbp), %rax
jne 0x239d5b
cmpq $0x0, -0x28(%rbp)
je 0x239d49
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rcx
shrq $0x20, %rcx
addq -0x40(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rax
imulq $0x18, -0x40(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x239d73
jmp 0x239d5d
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x239ceb
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax)
// File: chhylp123[P]hifiasm/horder.cpp
// Function: get_Ns(ma_utg_t*, h_covs*)
void get_Ns(ma_utg_t *u, h_covs *Ns)
{
    uint64_t i, offset;
    h_cov_t *p = NULL;
    Ns->n = 0;
    for (i = offset = 0; i < u->n; i++)
    {
        if(u->a[i] == (uint64_t)-1)
        {
            kv_pushp(h_cov_t, *Ns, &p);
            p->s = offset;
            p->e = offset + GAP_LEN;
            p->dp = i;
        }
        offset += (u->a[i] != (uint64_t)-1? (uint32_t)u->a[i]:GAP_LEN);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq $0x0, 0x8(%rax)
movq $0x0, -0x20(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
movl 0x10(%rcx), %ecx
cmpq %rcx, %rax
jae 0x23d441
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x18(%rbp), %rcx
cmpq $-0x1, (%rax,%rcx,8)
jne 0x23d3f1
jmp 0x23d341
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jne 0x23d3a5
movq -0x10(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x23d36f
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
shlq %rax
movq %rax, -0x30(%rbp)
jmp 0x23d37a
movl $0x2, %eax
movq %rax, -0x30(%rbp)
jmp 0x23d37a
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
imulq $0x18, 0x10(%rax), %rsi
callq 0x2360
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rdx
movq 0x8(%rdx), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, 0x8(%rdx)
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rcx
addq $0x64, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x18(%rbp), %rcx
cmpq $-0x1, (%rax,%rcx,8)
je 0x23d419
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl %eax, -0x34(%rbp)
jmp 0x23d423
movl $0x64, %eax
movl %eax, -0x34(%rbp)
jmp 0x23d423
movl -0x34(%rbp), %eax
movl %eax, %eax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x23d314
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: chhylp123[P]hifiasm/horder.cpp
// Function: generate_haplotypes(horder_t*, ug_opt_t*)
void generate_haplotypes(horder_t *h, ug_opt_t *opt)
{
    uint64_t i;
    ma_ug_t *ug_1 = NULL, *ug_2 = NULL;

    ug_1 = get_trio_unitig_graph(h->r_g, FATHER, opt);
    ug_2 = get_trio_unitig_graph(h->r_g, MOTHER, opt);
    // kv_push(uint64_t, h->occ, ug_1->u.n);
    // kv_push(uint64_t, h->occ, ug_2->u.n);

    h->ug = ug_1; 
    
    ///update unitigs
    ma_utg_t *pu = NULL;
    for (i = 0; i < ug_2->u.n; i++)
    {
        kv_pushp(ma_utg_t, h->ug->u, &pu);
        *pu = ug_2->u.a[i];
        ug_2->u.a[i].a = NULL;
        ug_2->u.a[i].s = NULL;
    }

    ug_1 = NULL;
    ma_ug_destroy(ug_2);
    asg_destroy(h->ug->g);
    h->ug->g = NULL;

    // MALLOC(h->hf.a, h->ug->u.n); h->hf.n = h->hf.m = h->ug->u.n;
    // for (i = 0; i < h->ug->u.n; i++) h->hf.a[i] = (i < h->occ.a[0]? 0 : 1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0xd0(%rax), %rdi
movq -0x10(%rbp), %rdx
movl $0x1, %esi
callq 0x235380
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0xd0(%rax), %rdi
movq -0x10(%rbp), %rdx
movl $0x2, %esi
callq 0x235380
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0xc8(%rax)
movq $0x0, -0x30(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x28(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x23f82a
jmp 0x23f6fc
movq -0x8(%rbp), %rax
movq 0xc8(%rax), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movq 0xc8(%rcx), %rcx
cmpq 0x8(%rcx), %rax
jne 0x23f799
movq -0x8(%rbp), %rax
movq 0xc8(%rax), %rax
cmpq $0x0, 0x8(%rax)
je 0x23f745
movq -0x8(%rbp), %rax
movq 0xc8(%rax), %rax
movq 0x8(%rax), %rax
shlq %rax
movq %rax, -0x38(%rbp)
jmp 0x23f750
movl $0x2, %eax
movq %rax, -0x38(%rbp)
jmp 0x23f750
movq -0x38(%rbp), %rcx
movq -0x8(%rbp), %rax
movq 0xc8(%rax), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0xc8(%rax), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0xc8(%rax), %rax
imulq $0x28, 0x8(%rax), %rsi
callq 0x2360
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq 0xc8(%rax), %rax
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rax
movq 0xc8(%rax), %rax
movq 0x10(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0xc8(%rcx), %rdx
movq (%rdx), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, (%rdx)
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rsi
imulq $0x28, -0x18(%rbp), %rax
addq %rax, %rsi
movq -0x30(%rbp), %rdi
movl $0x28, %edx
callq 0x2180
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
imulq $0x28, -0x18(%rbp), %rcx
addq %rcx, %rax
movq $0x0, 0x18(%rax)
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
imulq $0x28, -0x18(%rbp), %rcx
addq %rcx, %rax
movq $0x0, 0x20(%rax)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x23f6e9
movq $0x0, -0x20(%rbp)
movq -0x28(%rbp), %rdi
callq 0xcd6f0
movq -0x8(%rbp), %rax
movq 0xc8(%rax), %rax
movq 0x18(%rax), %rdi
callq 0xcd170
movq -0x8(%rbp), %rax
movq 0xc8(%rax), %rax
movq $0x0, 0x18(%rax)
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: chhylp123[P]hifiasm/horder.cpp
// Function: osg_seq_set(osg_t*, int, int)
void osg_seq_set(osg_t *g, int sid, int del)
{
	///just malloc size
	if (sid >= (int)g->m_seq) {
		g->m_seq = sid + 1;
		kv_roundup32(g->m_seq);
		g->seq = (osg_seq_t*)realloc(g->seq, g->m_seq * sizeof(osg_seq_t));
	}

	if (sid >= g->n_seq) g->n_seq = sid + 1;
    g->seq[sid].del = !!del;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jl 0x23f9af
movl -0xc(%rbp), %ecx
addl $0x1, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x8(%rbp), %rax
movl 0x10(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x10(%rax)
movq -0x8(%rbp), %rax
movl 0x10(%rax), %ecx
shrl %ecx
movq -0x8(%rbp), %rax
orl 0x10(%rax), %ecx
movl %ecx, 0x10(%rax)
movq -0x8(%rbp), %rax
movl 0x10(%rax), %ecx
shrl $0x2, %ecx
movq -0x8(%rbp), %rax
orl 0x10(%rax), %ecx
movl %ecx, 0x10(%rax)
movq -0x8(%rbp), %rax
movl 0x10(%rax), %ecx
shrl $0x4, %ecx
movq -0x8(%rbp), %rax
orl 0x10(%rax), %ecx
movl %ecx, 0x10(%rax)
movq -0x8(%rbp), %rax
movl 0x10(%rax), %ecx
shrl $0x8, %ecx
movq -0x8(%rbp), %rax
orl 0x10(%rax), %ecx
movl %ecx, 0x10(%rax)
movq -0x8(%rbp), %rax
movl 0x10(%rax), %ecx
shrl $0x10, %ecx
movq -0x8(%rbp), %rax
orl 0x10(%rax), %ecx
movl %ecx, 0x10(%rax)
movq -0x8(%rbp), %rax
movl 0x10(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x10(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
imulq $0x28, %rax, %rsi
callq 0x2360
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x18(%rax)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
movl 0x14(%rcx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpl %ecx, %eax
jl 0x23f9e1
movl -0xc(%rbp), %edx
addl $0x1, %edx
movq -0x8(%rbp), %rax
movl 0x14(%rax), %ecx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
andl $0x80000000, %ecx       # imm = 0x80000000
orl %edx, %ecx
movl %ecx, 0x14(%rax)
cmpl $0x0, -0x10(%rbp)
setne %cl
xorb $-0x1, %cl
xorb $-0x1, %cl
andb $0x1, %cl
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0xc(%rbp), %rdx
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movb %cl, 0x20(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: chhylp123[P]hifiasm/horder.cpp
// Function: osg_arc_rm(osg_t*)
void osg_arc_rm(osg_t *g)
{
	uint32_t e, n;
	///just clean arc requiring: 1. arc it self must be available 2. both the query and target are available
	for (e = n = 0; e < g->n_arc; ++e) {
		//u and v is the read id
		uint32_t u = g->arc[e].u, v = g->arc[e].v;
		if (!g->arc[e].del && !g->seq[u>>1].del && !g->seq[v>>1].del)
			g->arc[n++] = g->arc[e];
	}
	if (n < g->n_arc) { // arc index is out of sync
		if (g->idx) free(g->idx);
		g->idx = 0;
	}
	g->n_arc = n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0x10(%rbp)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
movl 0x4(%rcx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpl %ecx, %eax
jae 0x23fb26
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movl -0xc(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movl -0xc(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movl -0xc(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
jne 0x23fb16
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x14(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
cmpb $0x0, 0x20(%rax)
jne 0x23fb16
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x18(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
cmpb $0x0, 0x20(%rax)
jne 0x23fb16
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rcx
movl -0xc(%rbp), %eax
shlq $0x5, %rax
addq %rax, %rcx
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x10(%rbp), %edx
movl %edx, %esi
addl $0x1, %esi
movl %esi, -0x10(%rbp)
movl %edx, %edx
shlq $0x5, %rdx
addq %rdx, %rax
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%rcx), %rdx
movq %rdx, 0x10(%rax)
movq 0x18(%rcx), %rcx
movq %rcx, 0x18(%rax)
jmp 0x23fb18
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x23fa2a
movl -0x10(%rbp), %eax
movq -0x8(%rbp), %rcx
movl 0x4(%rcx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpl %ecx, %eax
jae 0x23fb5e
movq -0x8(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x23fb52
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x2210
movq -0x8(%rbp), %rax
movq $0x0, 0x20(%rax)
movl -0x10(%rbp), %edx
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
andl $0x80000000, %ecx       # imm = 0x80000000
orl %edx, %ecx
movl %ecx, 0x4(%rax)
addq $0x20, %rsp
popq %rbp
retq
nop
// File: chhylp123[P]hifiasm/horder.cpp
// Function: osg_arc_index_core(unsigned long, unsigned long, osg_arc_t const*)
uint64_t *osg_arc_index_core(size_t max_seq, size_t n, const osg_arc_t *a)
{
	size_t i, last;
	uint64_t *idx;
	idx = (uint64_t*)calloc(max_seq * 2, 8);

	for (i = 1, last = 0; i <= n; ++i)
		if (i == n || a[i-1].u != a[i].u)
			idx[a[i-1].u] = (uint64_t)last<<32 | (i - last), last = i;
	return idx;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
shlq %rdi
movl $0x8, %esi
callq 0x2140
movq %rax, -0x30(%rbp)
movq $0x1, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x10(%rbp), %rax
ja 0x23fc47
movq -0x20(%rbp), %rax
cmpq -0x10(%rbp), %rax
je 0x23fbfb
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rcx
subq $0x1, %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rdx
shlq $0x5, %rdx
addq %rdx, %rcx
cmpl 0x4(%rcx), %eax
je 0x23fc34
movq -0x28(%rbp), %rdx
shlq $0x20, %rdx
movq -0x20(%rbp), %rax
subq -0x28(%rbp), %rax
orq %rax, %rdx
movq -0x30(%rbp), %rax
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rsi
subq $0x1, %rsi
shlq $0x5, %rsi
addq %rsi, %rcx
movl 0x4(%rcx), %ecx
movq %rdx, (%rax,%rcx,8)
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x23fc36
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x23fbb9
movq -0x30(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: chhylp123[P]hifiasm/horder.cpp
// Function: osg_cleanup(osg_t*)
void osg_cleanup(osg_t *g)
{
	osg_arc_rm(g);
	if (!g->is_srt) {
        radix_sort_osg(g->arc, g->arc + g->n_arc);
		g->is_srt = 1;
	}

	if (g->idx == 0) osg_arc_index(g);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x23fa10
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
jne 0x23fd34
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
cltq
shlq $0x5, %rax
addq %rax, %rsi
callq 0x22e8e0
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
orl $0x80000000, %ecx       # imm = 0x80000000
movl %ecx, 0x4(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x20(%rax)
jne 0x23fd48
movq -0x8(%rbp), %rdi
callq 0x23fc60
addq $0x10, %rsp
popq %rbp
retq
nop
// File: chhylp123[P]hifiasm/horder.cpp
// Function: get_max_weight(unsigned int, unsigned int, osg_t*)
double get_max_weight(uint32_t u, uint32_t v, osg_t *g)
{
    double max = 0;
    uint32_t i, nv;
	osg_arc_t *av = NULL;

    nv = asg_arc_n(g, u);
    av = asg_arc_a(g, u);
    for (i = 0; i < nv; i++)
    {
        if(av[i].v == v) continue;
        max = MAX(max, av[i].w);
    }
    
    nv = asg_arc_n(g, v);
    av = asg_arc_a(g, v);
    for (i = 0; i < nv; i++)
    {
        if(av[i].v == u) continue;
        max = MAX(max, av[i].w);
    }

    return max;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x18(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x4(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x20(%rcx), %rcx
movl -0x4(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x20(%rbp), %eax
jae 0x23fe1f
movq -0x28(%rbp), %rax
movl -0x1c(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movl (%rax), %eax
cmpl -0x8(%rbp), %eax
jne 0x23fdcc
jmp 0x23fe14
movsd -0x18(%rbp), %xmm0
movq -0x28(%rbp), %rax
movl -0x1c(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
ucomisd 0x10(%rax), %xmm0
jb 0x23fdf2
movsd -0x18(%rbp), %xmm0
movsd %xmm0, -0x30(%rbp)
jmp 0x23fe0a
movq -0x28(%rbp), %rax
movl -0x1c(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movsd 0x10(%rax), %xmm0
movsd %xmm0, -0x30(%rbp)
movsd -0x30(%rbp), %xmm0
movsd %xmm0, -0x18(%rbp)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x23fdad
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x8(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x20(%rcx), %rcx
movl -0x8(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x20(%rbp), %eax
jae 0x23fed0
movq -0x28(%rbp), %rax
movl -0x1c(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movl (%rax), %eax
cmpl -0x4(%rbp), %eax
jne 0x23fe7d
jmp 0x23fec5
movsd -0x18(%rbp), %xmm0
movq -0x28(%rbp), %rax
movl -0x1c(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
ucomisd 0x10(%rax), %xmm0
jb 0x23fea3
movsd -0x18(%rbp), %xmm0
movsd %xmm0, -0x38(%rbp)
jmp 0x23febb
movq -0x28(%rbp), %rax
movl -0x1c(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movsd 0x10(%rax), %xmm0
movsd %xmm0, -0x38(%rbp)
movsd -0x38(%rbp), %xmm0
movsd %xmm0, -0x18(%rbp)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x23fe5e
movsd -0x18(%rbp), %xmm0
popq %rbp
retq
nopw (%rax,%rax)
// File: chhylp123[P]hifiasm/horder.cpp
// Function: osg_arc_pushp(osg_t*)
static inline osg_arc_t *osg_arc_pushp(osg_t *g)
{
	if (g->n_arc == g->m_arc) {
		g->m_arc = g->m_arc? g->m_arc<<1 : 16;
		g->arc = (osg_arc_t*)realloc(g->arc, g->m_arc * sizeof(osg_arc_t));
	}
	return &g->arc[g->n_arc++];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movq -0x8(%rbp), %rcx
cmpl (%rcx), %eax
jne 0x24289d
movq -0x8(%rbp), %rax
cmpl $0x0, (%rax)
je 0x242866
movq -0x8(%rbp), %rax
movl (%rax), %eax
shll %eax
movl %eax, -0xc(%rbp)
jmp 0x242870
movl $0x10, %eax
movl %eax, -0xc(%rbp)
jmp 0x242870
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x8(%rbp), %rax
movl (%rax), %eax
movl %eax, %esi
shlq $0x5, %rsi
callq 0x2360
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rdx
movl 0x4(%rdx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movl %ecx, %edi
addl $0x1, %edi
movl 0x4(%rdx), %esi
andl $0x7fffffff, %edi       # imm = 0x7FFFFFFF
andl $0x80000000, %esi       # imm = 0x80000000
orl %edi, %esi
movl %esi, 0x4(%rdx)
movl %ecx, %ecx
shlq $0x5, %rcx
addq %rcx, %rax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: chhylp123[P]hifiasm/horder.cpp
// Function: get_osg_arc(osg_t*, unsigned int, unsigned int)
osg_arc_t *get_osg_arc(osg_t *g, uint32_t u, uint32_t v)
{
    osg_arc_t *au = asg_arc_a(g, u);
    uint32_t i, nu = asg_arc_n(g, u);
    for (i = 0; i < nu; i++)
    {
        if(au[i].del) continue;
        if(au[i].v == v) return &(au[i]);
    }
    
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x20(%rcx), %rcx
movl -0x14(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x14(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x28(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x28(%rbp), %eax
jae 0x243d56
movq -0x20(%rbp), %rax
movl -0x24(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x243d20
jmp 0x243d4b
movq -0x20(%rbp), %rax
movl -0x24(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movl (%rax), %eax
cmpl -0x18(%rbp), %eax
jne 0x243d49
movq -0x20(%rbp), %rax
movl -0x24(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x243d5e
jmp 0x243d4b
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x243cfd
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: chhylp123[P]hifiasm/horder.cpp
// Function: get_vis_occ(unsigned char*, unsigned int)
uint32_t get_vis_occ(uint8_t *vis, uint32_t n)
{
    uint32_t i, occ;
    n <<= 1;
    for (i = occ = 0; i < n; i++)
    {
        if(vis[i]) occ++;
    }
    return occ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %eax
shll %eax
movl %eax, -0xc(%rbp)
movl $0x0, -0x14(%rbp)
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl -0xc(%rbp), %eax
jae 0x2444fc
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %ecx
cmpb $0x0, (%rax,%rcx)
je 0x2444ef
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x2444f1
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x2444d1
movl -0x14(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: chhylp123[P]hifiasm/horder.cpp
// Function: get_sl_occ(sc_lay_t*)
uint32_t get_sl_occ(sc_lay_t *sl)
{
    uint32_t i, occ;
    for (i = occ = 0; i < sl->n; i++)
    {
        occ += sl->a[i].n;
    }
    return occ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl $0x0, -0x10(%rbp)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jae 0x24455c
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl -0xc(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rcx
movl -0x10(%rbp), %eax
addq %rcx, %rax
movl %eax, -0x10(%rbp)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x244526
movl -0x10(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: chhylp123[P]hifiasm/horder.cpp
// Function: get_nuid(sc_lay_t*, unsigned long*)
uint64_t get_nuid(sc_lay_t *sl, uint64_t *p)
{
    uint64_t k, ouid[2];
    for (k = 0; k < sl->n; k++)
    {
        ouid[0] = sl->a[k].a[0]; 
        ouid[1] = sl->a[k].a[sl->a[k].n - 1];
        if((*p) == ouid[0])
        {
            (*p) = (k<<1);
            return 1;
        } 

        if((*p) == ouid[1])
        {
            (*p) = (k<<1)+1;
            return 1;
        }
    }

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jae 0x24503f
movq -0x10(%rbp), %rax
movq (%rax), %rax
imulq $0x18, -0x20(%rbp), %rcx
addq %rcx, %rax
movq (%rax), %rax
movl (%rax), %eax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
imulq $0x18, -0x20(%rbp), %rcx
addq %rcx, %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
imulq $0x18, -0x20(%rbp), %rdx
addq %rdx, %rcx
movq 0x8(%rcx), %rcx
subq $0x1, %rcx
movl (%rax,%rcx,4), %eax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
cmpq -0x30(%rbp), %rax
jne 0x245003
movq -0x20(%rbp), %rcx
shlq %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq $0x1, -0x8(%rbp)
jmp 0x245047
movq -0x18(%rbp), %rax
movq (%rax), %rax
cmpq -0x28(%rbp), %rax
jne 0x24502c
movq -0x20(%rbp), %rcx
shlq %rcx
addq $0x1, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq $0x1, -0x8(%rbp)
jmp 0x245047
jmp 0x24502e
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x244f84
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax)
// File: chhylp123[P]hifiasm/horder.cpp
// Function: update_avoids(horder_t*, sc_lay_t*)
void update_avoids(horder_t *h, sc_lay_t *sl)
{
    uint64_t i, m, ps, pe;
    for (i = m = 0; i < h->avoid.n; i++)
    {
        ps = h->avoid.a[i]>>32; 
        pe = (uint32_t)h->avoid.a[i];
        if(get_nuid(sl, &ps) && get_nuid(sl, &pe))
        {
            h->avoid.a[m] = (ps<<32)|pe;
            m++;
        }
    }
    h->avoid.n = m;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x20(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x245110
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
shrq $0x20, %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl %eax, %eax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x244f70
cmpq $0x0, %rax
je 0x2450fd
movq -0x10(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x244f70
cmpq $0x0, %rax
je 0x2450fd
movq -0x28(%rbp), %rdx
shlq $0x20, %rdx
orq -0x30(%rbp), %rdx
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x20(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x2450ff
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x245070
movq -0x20(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)