LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/rcut.cpp
// Function: dump_rid(All_reads*, _IO_FILE*)
void dump_rid(All_reads *rdb, FILE *fp)
{
	fwrite(&(rdb->total_reads), sizeof(rdb->total_reads), 1, fp);
	fwrite(&(rdb->name_index_size), sizeof(rdb->name_index_size), 1, fp);
	fwrite(rdb->name_index, sizeof((*(rdb->name_index))), rdb->name_index_size, fp);

	fwrite(&(rdb->total_name_length), sizeof(rdb->total_name_length), 1, fp);
	fwrite(rdb->name, sizeof((*(rdb->name))), rdb->total_name_length, fp);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
addq $0x50, %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x2410
leaq 0x48(%r14), %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x2410
movq 0x40(%r14), %rdi
movq 0x48(%r14), %rdx
movl $0x8, %esi
movq %rbx, %rcx
callq 0x2410
leaq 0x60(%r14), %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x2410
movq 0x8(%r14), %rdi
movq 0x60(%r14), %rdx
movl $0x1, %esi
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2410
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/rcut.cpp
// Function: load_rid(All_reads*, _IO_FILE*)
void load_rid(All_reads *rdb, FILE *fp)
{
	fread(&(rdb->total_reads), sizeof(rdb->total_reads), 1, fp);
	fread(&(rdb->name_index_size), sizeof(rdb->name_index_size), 1, fp);
	MALLOC(rdb->name_index, rdb->name_index_size);
	fread(rdb->name_index, sizeof((*(rdb->name_index))), rdb->name_index_size, fp);

	fread(&(rdb->total_name_length), sizeof(rdb->total_name_length), 1, fp);
	MALLOC(rdb->name, rdb->total_name_length);
	fread(rdb->name, sizeof((*(rdb->name))), rdb->total_name_length, fp);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
addq $0x50, %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x22f0
leaq 0x48(%r14), %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x22f0
movq 0x48(%r14), %r15
leaq (,%r15,8), %rdi
callq 0x2280
movq %rax, 0x40(%r14)
movl $0x8, %esi
movq %rax, %rdi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x22f0
leaq 0x60(%r14), %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x22f0
movq 0x60(%r14), %r15
movq %r15, %rdi
callq 0x2280
movq %rax, 0x8(%r14)
movl $0x1, %esi
movq %rax, %rdi
movq %r15, %rdx
movq %rbx, %rcx
popq %rbx
popq %r14
popq %r15
jmp 0x22f0
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/rcut.cpp
// Function: load_kv_u_trans_t(kv_u_trans_t*, _IO_FILE*)
void load_kv_u_trans_t(kv_u_trans_t *z, FILE *fp)
{
	fread(&(z->n), sizeof(z->n), 1, fp); 
	z->m = z->n; MALLOC(z->a, z->n);
    fread(z->a, sizeof((*(z->a))), z->n, fp);

    fread(&z->idx.n, sizeof(z->idx.n), 1, fp);
	z->idx.m = z->idx.n; MALLOC(z->idx.a, z->idx.n);
    fread(z->idx.a, sizeof((*(z->idx.a))), z->idx.n, fp);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl $0x8, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x22f0
movq (%r14), %r15
movq %r15, 0x8(%r14)
movq %r15, %rax
shlq $0x4, %rax
leaq (%rax,%rax,2), %rdi
callq 0x2280
movq %rax, 0x10(%r14)
movl $0x30, %esi
movq %rax, %rdi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x22f0
leaq 0x18(%r14), %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x22f0
movq 0x18(%r14), %r15
movq %r15, 0x20(%r14)
leaq (,%r15,8), %rdi
callq 0x2280
movq %rax, 0x28(%r14)
movl $0x8, %esi
movq %rax, %rdi
movq %r15, %rdx
movq %rbx, %rcx
popq %rbx
popq %r14
popq %r15
jmp 0x22f0
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/rcut.cpp
// Function: load_asg_t(asg_t*, _IO_FILE*)
void load_asg_t(asg_t *g, FILE *fp)
{
	uint32_t tmp, Len;
    fread(&tmp, sizeof(tmp), 1, fp);
	g->n_arc = g->m_arc = tmp;

    fread(&tmp, sizeof(tmp), 1, fp);
	g->is_srt = tmp;

    fread(&tmp, sizeof(tmp), 1, fp);
	g->n_seq = g->m_seq = tmp;
    
    fread(&tmp, sizeof(tmp), 1, fp);
	g->is_symm = tmp;

    fread(&tmp, sizeof(tmp), 1, fp);
	g->r_seq = tmp;

    // Len = g->n_seq*2;
    // fwrite(g->seq_vis, sizeof((*(g->seq_vis))), Len, fp);

    Len = g->n_seq*2;
	CALLOC(g->idx, Len); fread(g->idx, sizeof((*(g->idx))), Len, fp);
	CALLOC(g->arc, g->n_arc); fread(g->arc, sizeof((*(g->arc))), g->n_arc, fp);
	CALLOC(g->seq, g->n_seq); fread(g->seq, sizeof((*(g->seq))), g->n_seq, fp);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xc(%rsp), %r15
movl $0x4, %esi
movl $0x1, %edx
movq %r15, %rdi
movq %rbx, %rcx
callq 0x22f0
movl (%r15), %eax
movl %eax, (%r14)
movl $0x7fffffff, %ebp       # imm = 0x7FFFFFFF
andl %ebp, %eax
movl $0x80000000, %r12d      # imm = 0x80000000
movl 0x4(%r14), %ecx
andl %r12d, %ecx
orl %eax, %ecx
movl %ecx, 0x4(%r14)
movl $0x4, %esi
movl $0x1, %edx
movq %r15, %rdi
movq %rbx, %rcx
callq 0x22f0
movl (%r15), %eax
shll $0x1f, %eax
movl 0x4(%r14), %ecx
andl %ebp, %ecx
orl %eax, %ecx
movl %ecx, 0x4(%r14)
movl $0x4, %esi
movl $0x1, %edx
movq %r15, %rdi
movq %rbx, %rcx
callq 0x22f0
movl (%r15), %eax
movl %eax, 0x10(%r14)
andl %ebp, %eax
andl 0x14(%r14), %r12d
orl %eax, %r12d
movl %r12d, 0x14(%r14)
movl $0x4, %esi
movl $0x1, %edx
movq %r15, %rdi
movq %rbx, %rcx
callq 0x22f0
movl (%r15), %eax
shll $0x1f, %eax
andl 0x14(%r14), %ebp
orl %eax, %ebp
movl %ebp, 0x14(%r14)
movl $0x4, %esi
movl $0x1, %edx
movq %r15, %rdi
movq %rbx, %rcx
callq 0x22f0
movl (%r15), %eax
movl %eax, 0x18(%r14)
movl 0x14(%r14), %r15d
addl %r15d, %r15d
movl $0x8, %esi
movq %r15, %rdi
callq 0x2120
movq %rax, 0x28(%r14)
movl $0x8, %esi
movq %rax, %rdi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x22f0
movl 0x4(%r14), %r15d
movl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
andq %r12, %r15
movl $0x18, %esi
movq %r15, %rdi
callq 0x2120
movq %rax, 0x8(%r14)
movl $0x18, %esi
movq %rax, %rdi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x22f0
movl 0x14(%r14), %r15d
andq %r12, %r15
movl $0x8, %esi
movq %r15, %rdi
callq 0x2120
movq %rax, 0x20(%r14)
movl $0x8, %esi
movq %rax, %rdi
movq %r15, %rdx
movq %rbx, %rcx
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x22f0
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/rcut.cpp
// Function: load_ma_ug_t(ma_ug_t*, _IO_FILE*)
void load_ma_ug_t(ma_ug_t *ug, FILE *fp)
{
	ma_utg_t *u = NULL; uint32_t t, i;
    fread(&(ug->u.n), sizeof(ug->u.n), 1, fp);
	ug->u.m = ug->u.n; CALLOC(ug->u.a, ug->u.n);
    for (i = 0; i < ug->u.n; i++) {
        u = &(ug->u.a[i]);
		fread(&t, sizeof(t), 1, fp); u->len = t;
        fread(&t, sizeof(t), 1, fp); u->circ = t;
        fread(&(u->start), sizeof(u->start), 1, fp);
        fread(&(u->end), sizeof(u->end), 1, fp);
        fread(&(u->n), sizeof(u->n), 1, fp);
		u->m = u->n; MALLOC(u->a, u->n);
        fread(u->a, sizeof((*(u->a))), u->n, fp);
    }
	CALLOC(ug->g, 1);
	load_asg_t(ug->g, fp);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r12
movq %rdi, %rbx
movl $0x8, %esi
movl $0x1, %edx
movq %r12, %rcx
callq 0x22f0
movq (%rbx), %r15
movq %r15, 0x8(%rbx)
movl $0x28, %esi
movq %r15, %rdi
callq 0x2120
movq %rax, 0x10(%rbx)
testq %r15, %r15
je 0x16b66b
movl $0x1, %ebp
xorl %eax, %eax
movq 0x10(%rbx), %r13
leaq (%rax,%rax,4), %r15
movl $0x4, %esi
movl $0x1, %edx
leaq 0x4(%rsp), %rdi
movq %r12, %rcx
callq 0x22f0
movl 0x4(%rsp), %eax
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
andl %ecx, %eax
movq %r12, %r14
leaq 0x4(,%r15,8), %r12
addq %r13, %r12
movl -0x4(%r12), %ecx
movl $0x80000000, %edx       # imm = 0x80000000
andl %edx, %ecx
orl %eax, %ecx
movl %ecx, -0x4(%r12)
movl $0x4, %esi
movl $0x1, %edx
leaq 0x4(%rsp), %rdi
movq %r14, %rcx
callq 0x22f0
movl 0x4(%rsp), %eax
shll $0x1f, %eax
movl -0x4(%r12), %ecx
movl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
andl %edx, %ecx
orl %eax, %ecx
movl %ecx, -0x4(%r12)
movl $0x4, %esi
movl $0x1, %edx
movq %r12, %rdi
movq %r14, %rcx
callq 0x22f0
leaq 0x8(,%r15,8), %rdi
addq %r13, %rdi
movl $0x4, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x22f0
leaq 0x10(,%r15,8), %r12
addq %r13, %r12
movl $0x4, %esi
movl $0x1, %edx
movq %r12, %rdi
movq %r14, %rcx
callq 0x22f0
movl (%r12), %r13d
movl %r13d, -0x4(%r12)
leaq (,%r13,8), %rdi
callq 0x2280
movq %rax, 0x8(%r12)
movq %r14, %r12
movl $0x8, %esi
movq %rax, %rdi
movq %r13, %rdx
movq %r14, %rcx
callq 0x22f0
movl %ebp, %eax
incl %ebp
cmpq %rax, (%rbx)
ja 0x16b55f
movl $0x1, %edi
movl $0x48, %esi
callq 0x2120
movq %rax, 0x18(%rbx)
movq %rax, %rdi
movq %r12, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x16b3a4
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/rcut.cpp
// Function: load_bubble_type(bubble_type*, _IO_FILE*)
void load_bubble_type(bubble_type* bub, FILE *fp)
{
	fread(&(bub->chain_weight.n), sizeof(bub->chain_weight.n), 1, fp);
	bub->chain_weight.m = bub->chain_weight.n; CALLOC(bub->chain_weight.a, bub->chain_weight.n);
	fread(bub->chain_weight.a, sizeof((*(bub->chain_weight.a))), bub->chain_weight.n, fp);

	fread(&(bub->list.n), sizeof(bub->list.n), 1, fp);
	bub->list.m = bub->list.n; CALLOC(bub->list.a, bub->list.n);
	fread(bub->list.a, sizeof((*(bub->list.a))), bub->list.n, fp);

	fread(&(bub->num.n), sizeof(bub->num.n), 1, fp);
	bub->num.m = bub->num.n; CALLOC(bub->num.a, bub->num.n);
	fread(bub->num.a, sizeof((*(bub->num.a))), bub->num.n, fp);

	fread(&(bub->pathLen.n), sizeof(bub->pathLen.n), 1, fp);
	bub->pathLen.m = bub->pathLen.n; CALLOC(bub->pathLen.a, bub->pathLen.n);
	fread(bub->pathLen.a, sizeof((*(bub->pathLen.a))), bub->pathLen.n, fp);

	CALLOC(bub->b_ug, 1); load_ma_ug_t(bub->b_ug, fp);
	CALLOC(bub->b_g, 1); load_asg_t(bub->b_g, fp);
	CALLOC(bub->ug, 1); load_ma_ug_t(bub->ug, fp);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
addq $0xc8, %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x22f0
movq 0xc8(%r14), %r15
movq %r15, 0xd0(%r14)
movl $0x20, %esi
movq %r15, %rdi
callq 0x2120
movq %rax, 0xd8(%r14)
movl $0x20, %esi
movq %rax, %rdi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x22f0
leaq 0x18(%r14), %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x22f0
movq 0x18(%r14), %r15
movq %r15, 0x20(%r14)
movl $0x4, %esi
movq %r15, %rdi
callq 0x2120
movq %rax, 0x28(%r14)
movl $0x4, %esi
movq %rax, %rdi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x22f0
leaq 0x30(%r14), %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x22f0
movq 0x30(%r14), %r15
movq %r15, 0x38(%r14)
movl $0x4, %esi
movq %r15, %rdi
callq 0x2120
movq %rax, 0x40(%r14)
movl $0x4, %esi
movq %rax, %rdi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x22f0
leaq 0x48(%r14), %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x22f0
movq 0x48(%r14), %r15
movq %r15, 0x50(%r14)
movl $0x8, %esi
movq %r15, %rdi
callq 0x2120
movq %rax, 0x58(%r14)
movl $0x8, %esi
movq %rax, %rdi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x22f0
movl $0x1, %edi
movl $0x38, %esi
callq 0x2120
movq %rax, 0xc0(%r14)
movq %rax, %rdi
movq %rbx, %rsi
callq 0x16b514
movl $0x1, %edi
movl $0x48, %esi
callq 0x2120
movq %rax, 0xb8(%r14)
movq %rax, %rdi
movq %rbx, %rsi
callq 0x16b3a4
movl $0x1, %edi
movl $0x38, %esi
callq 0x2120
movq %rax, 0x10(%r14)
movq %rax, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x16b514
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/rcut.cpp
// Function: prt_rcut_res(char const*, signed char*, ma_ug_t*, asg_t*)
void prt_rcut_res(const char* fn, int8_t *s, ma_ug_t *ug, asg_t *sg)
{
	uint32_t i, k, flag = AMBIGU; 
	char *buf = (char*)calloc(strlen(fn) + 50, 1);
    sprintf(buf, "%s.rcut.res.log", fn);
    FILE *fp = fopen(buf, "w");
	uint8_t *rs = NULL; MALLOC(rs, sg->n_seq);
	memset(rs, AMBIGU, sg->n_seq*sizeof((*rs)));

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

	for (i = 0; i < sg->n_seq; i++) {
		if(rs[i] == AMBIGU) continue;
		fprintf(fp, "%.*s\t%u\n", (int)Get_NAME_LENGTH(R_INF, i), Get_NAME(R_INF, i), rs[i]);
	}

	fclose(fp); free(rs);
    free(buf);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r13
movq %rsi, %rbp
movq %rdi, %r15
callq 0x2090
leaq 0x32(%rax), %rdi
movl $0x1, %esi
callq 0x2120
movq %rax, %r14
leaq 0xc5a53(%rip), %rsi     # 0x2312a2
movq %rax, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x2050
leaq 0xd0b9b(%rip), %rsi     # 0x23c3fe
movq %r14, (%rsp)
movq %r14, %rdi
callq 0x2210
movq %rax, %r15
movl 0x14(%rbx), %r14d
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
andq %rax, %r14
movq %r14, %rdi
callq 0x2280
movq %rax, %r12
movq %rax, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x20e0
movq 0x18(%r13), %rcx
movl 0x14(%rcx), %eax
movl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
andq %rdx, %rax
je 0x16b900
movq 0x20(%rcx), %rcx
xorl %edx, %edx
cmpl $0x0, (%rcx,%rdx,8)
js 0x16b8f8
movb (%rbp,%rdx), %dil
testb %dil, %dil
je 0x16b8f8
movq 0x10(%r13), %r8
leaq (%rdx,%rdx,4), %r9
movl 0x10(%r8,%r9,8), %esi
testq %rsi, %rsi
je 0x16b8f8
leaq (%r8,%r9,8), %r8
testb %dil, %dil
setle %dil
incb %dil
movq 0x18(%r8), %r8
xorl %r9d, %r9d
movq (%r8,%r9,8), %r10
shrq $0x21, %r10
movb %dil, (%r12,%r10)
incq %r9
cmpq %r9, %rsi
jne 0x16b8e4
incq %rdx
cmpq %rax, %rdx
jne 0x16b8ad
testl $0x7fffffff, 0x14(%rbx) # imm = 0x7FFFFFFF
je 0x16b952
leaq 0x11f920(%rip), %r14    # 0x28b230
leaq 0xb93d6(%rip), %r13     # 0x224ced
xorl %ebp, %ebp
movzbl (%r12,%rbp), %r8d
testl %r8d, %r8d
je 0x16b942
movq 0x40(%r14), %rax
movl 0x8(%rax,%rbp,8), %edx
movq (%rax,%rbp,8), %rcx
subl %ecx, %edx
addq 0x8(%r14), %rcx
movq %r15, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x22b0
incq %rbp
movl 0x14(%rbx), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
cmpq %rax, %rbp
jb 0x16b919
movq %r15, %rdi
callq 0x2190
movq %r12, %rdi
callq 0x2220
movq (%rsp), %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2220
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/rcut.cpp
// Function: quick_debug_phasing(char const*)
void quick_debug_phasing(const char* fn)
{
	kv_u_trans_t *ta; ma_ug_t *ug; asg_t *read_g; double f_rate;
	uint32_t renew_s; int8_t *s; uint32_t is_sys; bubble_type *bub; kv_u_trans_t *ref;
	load_debug_phasing(fn, &ta, &ug, &read_g, &f_rate, &renew_s, &s, &is_sys, &bub, &ref);



	mc_solve(NULL, NULL, ta, ug, read_g, f_rate, NULL, renew_s, s, is_sys, bub, ref, 0, 0);
	// mc_solve_core_adv(const mc_opt_t *opt, mc_g_t *mg, bubble_type* bub, kv_u_trans_t *ref)

	// for (k = 0; k < ug->g->n_seq; k++) {
	// 	fprintf(stderr, "utg%.6dl(len::%u), s[k]::%d\n", (int32_t)(k)+1, ug->g->seq[k].len, s[k]);
	// }
	prt_rcut_res(fn, s, ug, read_g);
	
	exit(1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %r10
leaq 0x10(%rsp), %rax
leaq 0x4(%rsp), %r11
leaq 0x18(%rsp), %r14
leaq 0x20(%rsp), %rsi
leaq 0x40(%rsp), %r15
leaq 0x38(%rsp), %r12
leaq 0x30(%rsp), %r13
leaq 0x2c(%rsp), %rbp
movq %r15, %rdx
movq %r12, %rcx
movq %r13, %r8
movq %rbp, %r9
pushq %r10
pushq %rax
pushq %r11
pushq %r14
callq 0x1fbb1
addq $0x20, %rsp
leaq 0x20(%rsp), %rax
movq (%rax), %rdx
movq (%r15), %r14
movq (%r12), %r15
movsd (%r13), %xmm0
movl (%rbp), %eax
leaq 0x18(%rsp), %rcx
movq (%rcx), %r12
leaq 0x4(%rsp), %rcx
movl (%rcx), %r10d
subq $0x8, %rsp
xorl %r11d, %r11d
xorl %edi, %edi
xorl %esi, %esi
movq %r14, %rcx
movq %r15, %r8
xorl %r9d, %r9d
pushq %r11
pushq %r11
leaq 0x20(%rsp), %r11
pushq (%r11)
leaq 0x30(%rsp), %r11
pushq (%r11)
pushq %r10
pushq %r12
pushq %rax
callq 0x1edea
addq $0x40, %rsp
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %r15, %rcx
callq 0x16b81b
movl $0x1, %edi
callq 0x2250
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/rcut.cpp
// Function: ks_shuffle_uint32_t(unsigned long, unsigned int*, unsigned long*)
static void ks_shuffle_uint32_t(size_t n, uint32_t a[], uint64_t *x)
{
	size_t i, j;
	for (i = n; i > 1; --i) {
		uint32_t tmp;
		j = (size_t)(kr_drand_r(x) * i);
		tmp = a[j]; a[j] = a[i-1]; a[i-1] = tmp;
	}
}

// Assembly:
cmpq $0x2, %rdi
jb 0x16bb17
pushq %r14
pushq %rbx
movq (%rdx), %r10
movabsq $-0x61c8864680b583eb, %rax # imm = 0x9E3779B97F4A7C15
movabsq $-0x40a7b892e31b1a47, %rcx # imm = 0xBF58476D1CE4E5B9
movabsq $-0x6b2fb644ecceee15, %r8 # imm = 0x94D049BB133111EB
movabsq $0x3ff0000000000000, %r9 # imm = 0x3FF0000000000000
movsd 0xb9aac(%rip), %xmm0    # 0x225538
movsd 0xb97d4(%rip), %xmm1    # 0x225268
addq %rax, %r10
movq %r10, %r11
shrq $0x1e, %r11
xorq %r10, %r11
imulq %rcx, %r11
movq %r11, %rbx
shrq $0x1b, %rbx
xorq %r11, %rbx
imulq %r8, %rbx
movq %rbx, %r10
shrq $0x1f, %r10
xorq %rbx, %r10
movq %r10, %r11
shrq $0xc, %r11
orq %r9, %r11
movq %r11, %xmm2
addsd %xmm0, %xmm2
xorps %xmm3, %xmm3
cvtsi2sd %rdi, %xmm3
mulsd %xmm2, %xmm3
cvttsd2si %xmm3, %r11
movq %r11, %rbx
sarq $0x3f, %rbx
subsd %xmm1, %xmm3
cvttsd2si %xmm3, %r14
andq %rbx, %r14
orq %r11, %r14
movl (%rsi,%r14,4), %r11d
movl -0x4(%rsi,%rdi,4), %ebx
movl %ebx, (%rsi,%r14,4)
movl %r11d, -0x4(%rsi,%rdi,4)
decq %rdi
cmpq $0x1, %rdi
ja 0x16ba94
movq %r10, (%rdx)
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/rcut.cpp
// Function: mcgg_set_spin(mc_match_t const*, mcgg_svaux_t*, unsigned int, unsigned int, char const*)
static void mcgg_set_spin(const mc_match_t *ma, mcgg_svaux_t *b, uint32_t k, mcg_node_t s, const char* cmd)
{
	uint32_t o, j, n;
	mcg_node_t s0 = b->s[k].s;
	/*******************************for debug************************************/
	// mcg_node_t t = s;
	// o = 0;
	// while (t) {
	// 	o += (t&1); t>>=1;
	// }
	// if(o != b->s[k].h[0] && o != b->s[k].h[1]) fprintf(stderr, "cmd-%s, ERROR-mcgg-1\n", cmd);
	// if(s0 == s) fprintf(stderr, "cmd-%s, ERROR-mcgg-2\n", cmd);
	/*******************************for debug************************************/
	if (s0 == s) return;
	o = ma->idx.a[k] >> 32;
	n = (uint32_t)ma->idx.a[k];
	for (j = 0; j < n; ++j) {
		const mc_edge_t *e = &ma->ma.a[o + j];
		uint32_t t = ma_y(*e);///1->z[0]; (-1)->z[1];
		mcp_de(*(b->z), t, s0) -= e->w; 
		mcp_de(*(b->z), t, s) += e->w; 
	}
	b->s[k].s = s;
}

// Assembly:
movl %ecx, %eax
movq 0x50(%rsi), %r8
movl %edx, %ecx
movq %rcx, %r9
shlq $0x5, %r9
movl (%r8,%r9), %edx
cmpl %eax, %edx
je 0x16bd2f
pushq %r14
pushq %rbx
addq %r9, %r8
movq 0x10(%rdi), %r9
movq (%r9,%rcx,8), %r10
testl %r10d, %r10d
je 0x16bd29
movq %r10, %r9
shrq $0x20, %r9
movq 0x28(%rdi), %rdi
movq 0x40(%rsi), %rcx
movq (%rcx), %rsi
movl 0x8(%rcx), %ecx
movl %r10d, %r10d
movl %r9d, %r11d
shlq $0x4, %r11
movl (%rdi,%r11), %ebx
shll %cl, %ebx
leal (%rbx,%rdx), %r14d
movsd (%rsi,%r14,8), %xmm0
subsd 0x8(%rdi,%r11), %xmm0
movsd %xmm0, (%rsi,%r14,8)
movsd 0x8(%rdi,%r11), %xmm0
addl %eax, %ebx
addsd (%rsi,%rbx,8), %xmm0
movsd %xmm0, (%rsi,%rbx,8)
incq %r9
decq %r10
jne 0x16bcea
movl %eax, (%r8)
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %r15
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r13
movl $0x1, %edi
movl $0x98, %esi
callq 0x2120
movq %rax, %r14
movq %r13, %rdi
callq 0xc815c
movq %rax, (%r14)
movq %r15, 0x90(%r14)
movq 0x50(%r12), %rax
movq %rax, 0x58(%r14)
movq %rax, 0x50(%r14)
movq 0x8(%r12), %r15
movq %r15, (%r12)
movq %r15, 0x10(%r14)
movq %r15, 0x8(%r14)
shlq $0x5, %r15
movq %r15, %rdi
callq 0x2280
movq %rax, 0x18(%r14)
movq 0x10(%r12), %rsi
movq %rax, %rdi
movq %r15, %rdx
callq 0x2160
movq (%rbx), %rax
movq %rax, 0x68(%r14)
movq %rax, 0x60(%r14)
shlq $0x4, %rax
leaq (%rax,%rax,2), %r15
movq %r15, %rdi
callq 0x2280
movq %rax, 0x70(%r14)
movq 0x10(%rbx), %rsi
movq %rax, %rdi
movq %r15, %rdx
callq 0x2160
movq 0x18(%rbx), %r15
movq %r15, 0x80(%r14)
movq %r15, 0x78(%r14)
shlq $0x3, %r15
movq %r15, %rdi
callq 0x2280
movq %rax, 0x88(%r14)
movq 0x28(%rbx), %rsi
movq %rax, %rdi
movq %r15, %rdx
callq 0x2160
movq %r14, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbx
movq %rdi, %rbx
movq (%rdi), %rax
movq (%rax), %rdi
callq 0xa0004
movq (%rbx), %rax
movq 0x18(%rax), %rdi
callq 0x2220
movq (%rbx), %rax
movq 0x30(%rax), %rdi
callq 0x2220
movq (%rbx), %rax
movq 0x48(%rax), %rdi
callq 0x2220
movq (%rbx), %rax
movq 0x70(%rax), %rdi
callq 0x2220
movq (%rbx), %rax
movq 0x88(%rax), %rdi
callq 0x2220
movq (%rbx), %rdi
popq %rbx
jmp 0x2220
// File: /workspace/github_cpp_makefile_star2_O1/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:
movq (%rsi), %r8
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq 0x38(%rdi), %r8
jae 0x16de03
pushq %rbx
movq 0x10(%rcx), %rcx
movq 0x48(%rdi), %r9
movl (%r9,%r8,4), %r10d
shrl %r10d
leaq (%r10,%r10,4), %r11
movq (%rdx), %r10
movl 0x10(%rcx,%r11,8), %ebx
cmpq %rbx, %r10
jb 0x16ddee
incq %r8
movq %r8, (%rsi)
movq $0x0, (%rdx)
movq (%rsi), %r8
cmpq 0x38(%rdi), %r8
jb 0x16ddbe
jmp 0x16de02
leaq (%rcx,%r11,8), %rax
movq 0x18(%rax), %rax
leaq 0x1(%r10), %rcx
movq %rcx, (%rdx)
movl 0x4(%rax,%r10,8), %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movl $0x1, %edi
movl $0x10, %esi
callq 0x2120
movq %rax, %r12
movq %rbx, (%rax)
movq %r15, %rdi
movq %r14, %rsi
callq 0xbe3b4
movq %rax, 0x8(%r12)
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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:
movq %rcx, %rax
testq %r8, %r8
je 0x16ea9e
leaq (%rdi,%rdi), %r10
negb %dl
movl %edx, %ecx
shrq %cl, %r10
movq %r10, (%r8)
movq 0x8(%rsp), %rcx
andq %rdi, %rax
movl %esi, %esi
leaq -0x1(%rsi), %rdx
xorl %r8d, %r8d
testq %rdi, %rdi
cmovsq %r8, %rdx
addq %rax, %rdx
testq %rdx, %rdx
cmovleq %r8, %rdx
testq %r9, %r9
je 0x16eae0
negq %rsi
testq %rdi, %rdi
leaq 0x1(%rax,%rsi), %rsi
cmovnsq %rax, %rsi
xorl %eax, %eax
testq %rsi, %rsi
cmovgq %rsi, %rax
movq %rax, (%r9)
testq %rcx, %rcx
je 0x16eaeb
incq %rdx
movq %rdx, (%rcx)
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/horder.cpp
// Function: idx_hits(kvec_pe_hit*, unsigned long)
void idx_hits(kvec_pe_hit* hits, uint64_t n)
{
    uint64_t k, l;
    kv_resize(uint64_t, hits->idx, n);
    hits->idx.n = n;
    memset(hits->idx.a, 0, hits->idx.n*sizeof(uint64_t));

    radix_sort_pe_hit_idx_hn1(hits->a.a, hits->a.a + hits->a.n);
    for (k = 1, l = 0; k <= hits->a.n; ++k) {   
        if (k == hits->a.n || (get_hit_suid(*hits, k) != get_hit_suid(*hits, l))) {
            if (k - l > 1) radix_sort_pe_hit_idx_hn2(hits->a.a + l, hits->a.a + k);
            hits->idx.a[get_hit_suid(*hits, l)] = (uint64_t)l << 32 | (k - l);            
            l = k;
        }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
cmpq %rsi, 0x20(%rdi)
jae 0x16eb53
leaq -0x1(%r14), %rax
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x10, %rcx
orq %rax, %rcx
leaq 0x1(%rcx), %rax
movq %rax, 0x20(%rbx)
movq 0x28(%rbx), %rdi
leaq 0x8(,%rcx,8), %rsi
callq 0x2370
movq %rax, 0x28(%rbx)
movq %r14, 0x18(%rbx)
movq 0x28(%rbx), %rdi
shlq $0x3, %r14
xorl %esi, %esi
movq %r14, %rdx
callq 0x20e0
movq (%rbx), %rsi
movq 0x10(%rbx), %rdi
shlq $0x5, %rsi
addq %rdi, %rsi
callq 0x16bfb8
movq (%rbx), %rax
testq %rax, %rax
je 0x16ec2e
movl $0x1, %r14d
movl $0x20, %r15d
xorl %r12d, %r12d
cmpq %rax, %r14
je 0x16ebc9
movq 0x10(%rbx), %rax
movq (%rax,%r15), %rdx
addq %rdx, %rdx
movb 0x48(%rbx), %sil
xorl %ecx, %ecx
subb %sil, %cl
shrq %cl, %rdx
movq %r12, %rsi
shlq $0x5, %rsi
movq (%rax,%rsi), %rax
addq %rax, %rax
shrq %cl, %rax
cmpq %rax, %rdx
je 0x16ec1b
movq %r14, %r13
subq %r12, %r13
cmpq $0x2, %r13
jb 0x16ebeb
movq 0x10(%rbx), %rsi
movq %r12, %rdi
shlq $0x5, %rdi
addq %rsi, %rdi
addq %r15, %rsi
callq 0x16c24b
movq %r12, %rax
shlq $0x20, %rax
movq 0x10(%rbx), %rcx
shlq $0x5, %r12
movq (%rcx,%r12), %rdx
addq %rdx, %rdx
movb 0x48(%rbx), %sil
xorl %ecx, %ecx
subb %sil, %cl
shrq %cl, %rdx
orq %r13, %rax
movq 0x28(%rbx), %rcx
movq %rax, (%rcx,%rdx,8)
movq %r14, %r12
incq %r14
movq (%rbx), %rax
addq $0x20, %r15
cmpq %rax, %r14
jbe 0x16eb97
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r15
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r12
movaps %xmm0, (%r12)
xorl %eax, %eax
movq %rax, 0x10(%r12)
leaq 0x8(%rsp), %r14
movq %rax, (%r14)
callq 0xb0285
movq %rax, (%r14)
movq (%rbx), %r9
movq 0x8(%rbx), %rcx
movq 0x10(%rbx), %r8
movss 0x20(%rbx), %xmm1
movss 0x38(%rbx), %xmm2
movss 0x3c(%rbx), %xmm3
movl 0x40(%rbx), %eax
movl 0x44(%rbx), %r10d
movl 0x50(%rbx), %r11d
movss 0xb9dcc(%rip), %xmm0    # 0x229bbc
movq %r14, %rdi
movq %r15, %rsi
movl %ebp, %edx
pushq 0x60(%rbx)
pushq %r12
pushq %r11
pushq %r10
pushq %rax
pushq 0x30(%rbx)
pushq 0x28(%rbx)
pushq 0x18(%rbx)
callq 0xd5bde
addq $0x40, %rsp
movq 0x10(%r12), %rdi
callq 0x2220
movq (%r14), %rax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/horder.cpp
// Function: get_hic_breakpoint(unsigned long*, unsigned long, long, h_covs*, long, long, unsigned long*, unsigned long*)
void get_hic_breakpoint(uint64_t *b, uint64_t b_n, int64_t cutoff, h_covs *res, 
int64_t cov_s_pos, int64_t cov_e_pos, uint64_t *s, uint64_t *e)
{
    uint64_t i;
    (*s) = (*e) = (uint64_t)-1;
    res->n = 0;
    get_hic_cov_interval(b, b_n, cutoff, &cov_s_pos, &cov_e_pos, res);
    if(res->n == 0) return;///res keeps all intervals with >= cutoff coverage
    int64_t max = -1, max_cur = 0;
    int64_t max_s_idx, max_e_idx, cur_s_idx;
    for (i = 0; i < res->n; i++)//all intervals have cov >= cutoff
    {
        if(i > 0 && (res->a[i].s - res->a[i-1].e) > 0)//cov < cutoff
        {
            max_cur += (res->a[i].s - res->a[i-1].e);//at least positive
            if(max < max_cur)
            {
                max_s_idx = (max < 0? res->a[i-1].e:cur_s_idx);
                max_e_idx = res->a[i].s;
                max = max_cur;
                cur_s_idx = max_s_idx;
            }
        }

        //cov >= cutoff
        max_cur -= (res->a[i].e - res->a[i].s);
        if(max_cur < 0)
        {
            max_cur = 0;
            cur_s_idx = res->a[i].e;
        }
    }

    if(max > 0)
    {
        (*s) = max_s_idx;
        (*e) = max_e_idx;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
movq 0x58(%rsp), %rax
movq 0x50(%rsp), %r15
leaq 0x10(%rsp), %rcx
movq %r8, (%rcx)
leaq 0x8(%rsp), %r8
movq %r9, (%r8)
movq $-0x1, %r12
movq %r12, (%rax)
movq %r12, (%r15)
movq $0x0, 0x8(%rbx)
movq %rbx, %r9
callq 0x170357
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x1705d0
movq (%rbx), %rcx
xorl %edx, %edx
xorl %esi, %esi
xorl %r11d, %r11d
xorl %r10d, %r10d
testq %r10, %r10
je 0x17057b
movq (%rbx), %r13
movq -0x10(%r13,%rsi), %r14
movq (%r13,%rsi), %rbp
movq %rbp, %r13
subq %r14, %r13
jne 0x1705a6
movq %r11, %r13
movq (%rcx,%rsi), %r11
movq 0x8(%rcx,%rsi), %r14
subq %r14, %r11
addq %r13, %r11
testq %r11, %r11
cmovleq %rdx, %r11
cmovsq %r14, %rdi
incq %r10
addq $0x18, %rsi
cmpq %r10, %rax
jne 0x170561
jmp 0x1705c0
addq %r11, %r13
cmpq %r13, %r12
jge 0x17057e
testq %r12, %r12
cmovsq %r14, %rdi
movq %r13, %r12
movq %rdi, %r9
movq %rbp, %r8
jmp 0x17057e
testq %r12, %r12
movq 0x58(%rsp), %rax
jle 0x1705d0
movq %r9, (%r15)
movq %r8, (%rax)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/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:
movq 0x8(%rdx), %rcx
testq %rcx, %rcx
je 0x1709da
movq (%rdx), %rdx
addq $0x8, %rdx
xorl %eax, %eax
xorl %r8d, %r8d
movq -0x8(%rdx), %r9
testb $0x1, %r9b
jne 0x17099b
movq %r9, %r10
shrq %r10
movq (%rdx), %r11
jmp 0x1709a4
movq (%rdx), %r10
movq %r9, %r11
shrq %r11
cmpq %rdi, %r10
ja 0x1709d0
cmpq %rsi, %r11
jb 0x1709d0
andl $0x1, %r9d
movq %r9, %r10
negq %r10
orq $0x1, %r10
addq %r8, %r10
cmpq %r8, %rax
cmovgq %rax, %r8
testq %r9, %r9
cmovneq %r8, %rax
movq %r10, %r8
addq $0x18, %rdx
decq %rcx
jne 0x170986
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/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:
movq (%rdi), %rcx
testq %rcx, %rcx
je 0x1710c5
movq 0x10(%rdi), %rdx
xorl %eax, %eax
cmpq $0x0, 0x18(%rdx)
je 0x1710bb
movl (%rdx), %esi
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
addq %rsi, %rax
addq $0x28, %rdx
decq %rcx
jne 0x1710a9
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/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:
movl 0x10(%rdi), %eax
testq %rax, %rax
je 0x1717c3
addq $0x8, %rdx
xorl %esi, %esi
movl $0x64, %r8d
xorl %r9d, %r9d
testq %rcx, %rcx
je 0x1717a5
movq %rdx, %r10
movq %rcx, %r11
cmpq %r9, -0x8(%r10)
jne 0x17179c
movq %rsi, -0x8(%r10)
addq %rsi, (%r10)
cmpq $0x1, %r11
je 0x1717c3
addq $0x18, %r10
decq %r11
jne 0x171789
movq 0x18(%rdi), %r10
movq (%r10,%r9,8), %r10
cmpq $-0x1, %r10
movl %r10d, %r10d
cmoveq %r8, %r10
addq %r10, %rsi
incq %r9
cmpq %rax, %r9
jne 0x17177e
retq
// File: /workspace/github_cpp_makefile_star2_O1/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:
movq 0x28(%rdi), %r8
movq (%r8,%rsi,8), %rax
movl %eax, %r9d
shrq $0x20, %rax
leaq (%rax,%rax,2), %rax
shlq $0x3, %rax
addq 0x8(%rdi), %rax
testq %rcx, %rcx
je 0x171e84
movq $-0x1, (%rcx)
testq %r9, %r9
je 0x171ea9
negq %r9
xorl %edi, %edi
cmpl $0x0, 0xc(%rax)
js 0x171e9d
movl 0x8(%rax), %r10d
cmpq %rdx, %r10
je 0x171eac
decq %rdi
addq $0x18, %rax
cmpq %rdi, %r9
jne 0x171e8e
xorl %eax, %eax
retq
testq %rcx, %rcx
je 0x171eab
movl 0x4(%r8,%rsi,8), %edx
subq %rdi, %rdx
movq %rdx, (%rcx)
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/horder.cpp
// Function: update_unitig_ends(asg_t*, asg_arc_t*, unsigned long, unsigned long, unsigned long)
void update_unitig_ends(asg_t *g, asg_arc_t *arc, uint64_t puid, uint64_t nuid_0, uint64_t nuid_1)
{
    uint64_t nv, k, v, idx, ridx;
    

    v = puid<<1;
    idx = g->idx[v]>>32; nv = asg_arc_n(g, v);
    for (k = 0; k < nv; k++)
    {
        arc[idx+k].ul = ((uint32_t)arc[idx+k].ul) + (nuid_0<<32);
        get_r_edge(g, g->arc[idx+k].v^1, v^1, &ridx);
        arc[ridx].v = nuid_0^1;
    }


    v = (puid<<1)+1;
    idx = g->idx[v]>>32; nv = asg_arc_n(g, v);
    for (k = 0; k < nv; k++)
    {
        arc[idx+k].ul = ((uint32_t)arc[idx+k].ul) + (nuid_1<<32);
        get_r_edge(g, g->arc[idx+k].v^1, v^1, &ridx);
        arc[ridx].v = nuid_1^1;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, 0x28(%rsp)
movq %rsi, %r15
leaq (%rdx,%rdx), %rax
movq %rax, 0x10(%rsp)
movq 0x28(%rdi), %rax
shlq $0x4, %rdx
movq %rax, 0x20(%rsp)
movq (%rax,%rdx), %rax
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq %rax, %rsi
andq %rdx, %rsi
movq %rdi, %r14
je 0x171f8e
shrq $0x20, %rax
movq %rcx, %rdx
shlq $0x20, %rdx
movq %rdx, (%rsp)
movq 0x8(%rdi), %rdx
movq 0x10(%rsp), %rdi
orq $0x1, %rdi
movq %rdi, 0x30(%rsp)
xorl $0x1, %ecx
movq %rcx, 0x8(%rsp)
shlq $0x3, %rsi
leaq (%rsi,%rsi,2), %rbx
shlq $0x3, %rax
leaq (%rax,%rax,2), %r12
leaq (%rdx,%r12), %rbp
addq $0x8, %rbp
addq %r15, %r12
xorl %r13d, %r13d
movl (%r12,%r13), %eax
orq (%rsp), %rax
movq %rax, (%r12,%r13)
movl (%rbp,%r13), %esi
xorq $0x1, %rsi
movq %r14, %rdi
movq 0x30(%rsp), %rdx
leaq 0x18(%rsp), %rcx
callq 0x171e5d
movq %r14, %rdi
movq 0x18(%rsp), %rax
leaq (%rax,%rax,2), %rax
movq 0x8(%rsp), %rcx
movl %ecx, 0x8(%r15,%rax,8)
addq $0x18, %r13
cmpq %r13, %rbx
jne 0x171f48
movq 0x10(%rsp), %rax
movq 0x20(%rsp), %rcx
movq 0x8(%rcx,%rax,8), %rax
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
andq %rax, %rdx
movq 0x28(%rsp), %r8
je 0x172036
shrq $0x20, %rax
movq %r8, %rcx
shlq $0x20, %rcx
movq %rcx, 0x8(%rsp)
movq 0x8(%rdi), %rcx
xorl $0x1, %r8d
shlq $0x3, %rdx
leaq (%rdx,%rdx,2), %rdx
movq %rdx, (%rsp)
shlq $0x3, %rax
leaq (%rax,%rax,2), %rbp
leaq (%rcx,%rbp), %r13
addq $0x8, %r13
addq %r15, %rbp
xorl %ebx, %ebx
movl (%rbp,%rbx), %eax
orq 0x8(%rsp), %rax
movq %rax, (%rbp,%rbx)
movl (%r13,%rbx), %esi
xorq $0x1, %rsi
movq %r14, %rdi
movq 0x10(%rsp), %rdx
leaq 0x18(%rsp), %rcx
movq %r15, %r12
movq %r8, %r15
callq 0x171e5d
movq %r15, %r8
movq %r12, %r15
movq 0x18(%rsp), %rax
leaq (%rax,%rax,2), %rax
movl %r8d, 0x8(%r12,%rax,8)
addq $0x18, %rbx
cmpq %rbx, (%rsp)
jne 0x171fe9
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/horder.cpp
// Function: get_switch_ovlp_hits(unsigned long*, unsigned long, unsigned long, unsigned long, u_trans_hit_t*, h_covs*, unsigned long*)
int get_switch_ovlp_hits(uint64_t *i, uint64_t pid, uint64_t ls, uint64_t le, u_trans_hit_t *hit, 
h_covs *join, uint64_t *idx)
{
    uint64_t os, oe;
    hit->qSpre = hit->qEpre = hit->qScur = hit->qEcur = hit->qn = (uint32_t)-1;
    hit->tSpre = hit->tEpre = hit->tScur = hit->tEcur = hit->tn = (uint32_t)-1;

    while ((*i) < ((uint32_t)idx[pid]))
    {
        os = join->a[(idx[pid]>>32)+(*i)].s;
        oe = join->a[(idx[pid]>>32)+(*i)].e;
        if(OVL(os, oe, ls, le) == 0)
        {
            (*i)++;
            continue;
        }
        
        hit->qn = (uint32_t)(join->a[(idx[pid]>>32)+(*i)].dp);
        hit->qScur = MAX(os, ls); hit->qEcur = MIN(oe, le);
        hit->qSpre = hit->qScur - os; hit->qEpre = hit->qEcur - os;
        (*i)++;
        return 1;
    }

    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x28(%rsp), %r11
pcmpeqd %xmm0, %xmm0
movdqu %xmm0, 0x10(%r8)
movdqu %xmm0, (%r8)
movq $-0x1, 0x20(%r8)
movq (%rdi), %r10
movq (%r11,%rsi,8), %rbx
movl %ebx, %r14d
xorl %eax, %eax
cmpq %r14, %r10
jae 0x1720f0
movq (%r9), %r9
leaq (%r10,%r10,2), %r14
leaq (%r9,%r14,8), %r9
addq $0x10, %r9
shrq $0x20, %rbx
leaq (%rbx,%rbx,2), %r12
movq -0x10(%r9,%r12,8), %rbx
movq -0x8(%r9,%r12,8), %r14
cmpq %rcx, %r14
cmovaeq %rcx, %r14
cmpq %rdx, %rbx
movq %rdx, %r15
cmovaq %rbx, %r15
cmpq %r15, %r14
ja 0x1720c8
incq %r10
movq %r10, (%rdi)
movq (%r11,%rsi,8), %rbx
movl %ebx, %r14d
addq $0x18, %r9
cmpq %r14, %r10
jb 0x172088
jmp 0x1720f0
movl (%r9,%r12,8), %eax
movl %eax, 0x10(%r8)
movl %r15d, 0x8(%r8)
movl %r14d, 0xc(%r8)
subl %ebx, %r15d
movl %r15d, (%r8)
subl %ebx, %r14d
movl %r14d, 0x4(%r8)
incq %r10
movq %r10, (%rdi)
movl $0x1, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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:
movq $0x0, 0x8(%rsi)
cmpl $0x0, 0x10(%rdi)
je 0x173df3
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
xorl %r15d, %r15d
movl $0x2, %r12d
movl $0x64, %r13d
xorl %ebp, %ebp
movq 0x18(%r14), %rax
cmpq $-0x1, (%rax,%rbp,8)
jne 0x173dc4
movq 0x10(%rbx), %rax
cmpq %rax, 0x8(%rbx)
jne 0x173d9f
leaq (%rax,%rax), %rcx
testq %rax, %rax
cmoveq %r12, %rcx
movq %rcx, 0x10(%rbx)
movq (%rbx), %rdi
shlq $0x3, %rcx
leaq (%rcx,%rcx,2), %rsi
callq 0x2370
movq %rax, (%rbx)
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x8(%rbx)
leaq (%rcx,%rcx,2), %rcx
movq %r15, (%rax,%rcx,8)
leaq 0x64(%r15), %rdx
movq %rdx, 0x8(%rax,%rcx,8)
movq %rbp, 0x10(%rax,%rcx,8)
movq 0x18(%r14), %rax
movq (%rax,%rbp,8), %rax
cmpq $-0x1, %rax
movl %eax, %eax
cmoveq %r13, %rax
addq %rax, %r15
incq %rbp
movl 0x10(%r14), %eax
cmpq %rax, %rbp
jb 0x173d68
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/horder.cpp
// Function: get_sub_cov(kvec_pe_hit*, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, int)
uint64_t get_sub_cov(kvec_pe_hit *hits, uint64_t sidx, uint64_t eidx, uint64_t ulen, 
uint64_t rs, uint64_t re, uint64_t limit_s, uint64_t limit_e, int unique_only)
{
    uint64_t i, p0s, p0e, p1s, p1e, span_s, span_e, cnt = 0;


    for (i = sidx; i < eidx; i++)///keep all hic hits that contain interval we want
    {
        if(get_hit_suid(*hits, i) != get_hit_euid(*hits, i)) continue;
        if(unique_only && hits->a.a[i].id == 0) continue;
        p0s = get_hit_spos(*hits, i);
        p0e = get_hit_spos_e(*hits, i);
        p1s = get_hit_epos(*hits, i);
        p1e = get_hit_epos_e(*hits, i);

        span_s = MIN(MIN(p0s, p0e), MIN(p1s, p1e));
        span_s = MIN(span_s, ulen-1);
        span_e = MAX(MAX(p0s, p0e), MAX(p1s, p1e));
        span_e = MIN(span_e, ulen-1) + 1;

        //if(span_e - span_s <= ulen*BREAK_CUTOFF)//need it or not?
        if(span_s <= rs && span_e >= re)
        {
            if(span_s >= limit_s && span_e <= limit_e) cnt++;
        } 
    }

    return cnt;
}

// Assembly:
subq %rsi, %rdx
jbe 0x173f39
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %r10
movl 0x48(%rsp), %r11d
movq 0x38(%rsp), %r14
movq 0x10(%rdi), %rax
movl $0x40, %ecx
subq 0x48(%rdi), %rcx
decq %r10
shlq $0x5, %rsi
addq %rax, %rsi
addq $0x18, %rsi
xorl %eax, %eax
movq -0x18(%rsi), %r12
leaq (%r12,%r12), %r15
shrq %cl, %r15
movq -0x10(%rsi), %rbp
leaq (,%rbp,2), %r13
shrq %cl, %r13
cmpq %r13, %r15
jne 0x173f21
testl %r11d, %r11d
je 0x173e64
cmpq $0x0, -0x8(%rsi)
je 0x173f21
movq 0x50(%rdi), %r13
movq %r13, %r15
andq %r12, %r15
testq %r12, %r12
js 0x173e7f
movl 0x4(%rsi), %ebx
leaq (%r15,%rbx), %r12
decq %r12
jmp 0x173e94
leaq 0x1(%r15), %rbx
movl 0x4(%rsi), %r12d
subq %r12, %rbx
movl $0x0, %r12d
cmovaeq %rbx, %r12
andq %rbp, %r13
testq %rbp, %rbp
js 0x173ea7
movl (%rsi), %ebx
leaq (%rbx,%r13), %rbp
decq %rbp
jmp 0x173eb9
leaq 0x1(%r13), %rbx
movl (%rsi), %ebp
subq %rbp, %rbx
movl $0x0, %ebp
cmovaeq %rbx, %rbp
cmpq %rbp, %r13
movq %rbp, %rbx
cmovbq %r13, %rbx
cmovaq %r13, %rbp
cmpq %r12, %r15
movq %r12, %r13
cmovbq %r15, %r13
cmovaq %r15, %r12
cmpq %rbx, %r13
cmovaeq %rbx, %r13
cmpq %r10, %r13
jb 0x173ee4
movq %r10, %r13
cmpq %rbp, %r12
cmovaq %r12, %rbp
cmpq %r10, %rbp
jb 0x173ef3
movq %r10, %rbp
incq %rbp
cmpq %r8, %r13
setbe %bl
cmpq %r9, %rbp
setae %r15b
cmpq %r14, %r13
setae %r12b
andb %bl, %r12b
andb %r15b, %r12b
cmpq 0x40(%rsp), %rbp
setbe %bl
andb %r12b, %bl
movzbl %bl, %ebx
addq %rbx, %rax
addq $0x20, %rsi
decq %rdx
jne 0x173e31
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0xd0(%rdi), %rdi
movl $0x1, %esi
movq %r14, %rdx
callq 0x16fd8b
movq %rax, %r15
movq 0xd0(%rbx), %rdi
movl $0x2, %esi
movq %r14, %rdx
callq 0x16fd8b
movq %rax, %r14
movq %r15, 0xc8(%rbx)
cmpq $0x0, (%rax)
je 0x174bc2
xorl %r15d, %r15d
movl $0x2, %r12d
xorps %xmm2, %xmm2
xorl %r13d, %r13d
movq 0xc8(%rbx), %rax
movq 0x8(%rax), %rcx
cmpq %rcx, (%rax)
jne 0x174b6d
leaq (%rcx,%rcx), %rdx
testq %rcx, %rcx
cmoveq %r12, %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%rax), %rdi
shlq $0x3, %rdx
leaq (%rdx,%rdx,4), %rsi
callq 0x2370
xorps %xmm2, %xmm2
movq 0xc8(%rbx), %rcx
movq %rax, 0x10(%rcx)
movq 0xc8(%rbx), %rax
movq (%rax), %rcx
movq 0x10(%rax), %rdx
leaq 0x1(%rcx), %rsi
movq %rsi, (%rax)
leaq (%rcx,%rcx,4), %rax
movq 0x10(%r14), %rcx
movups (%rcx,%r15), %xmm0
movups 0x10(%rcx,%r15), %xmm1
movups %xmm0, (%rdx,%rax,8)
movups %xmm1, 0x10(%rdx,%rax,8)
movq 0x20(%rcx,%r15), %rcx
movq %rcx, 0x20(%rdx,%rax,8)
movq 0x10(%r14), %rax
incq %r13
movups %xmm2, 0x18(%rax,%r15)
addq $0x28, %r15
cmpq (%r14), %r13
jb 0x174b2f
movq %r14, %rdi
callq 0xa0004
movq 0xc8(%rbx), %rax
movq 0x18(%rax), %rdi
callq 0x9fcdb
movq 0xc8(%rbx), %rax
movq $0x0, 0x18(%rax)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r14
pushq %rbx
movl %edx, %ebp
movl %esi, %ebx
movq %rdi, %r14
cmpl %esi, 0x10(%rdi)
jg 0x174c7d
movl %ebx, %eax
shrl %eax
orl %ebx, %eax
movl %eax, %ecx
shrl $0x2, %ecx
orl %eax, %ecx
movl %ecx, %eax
shrl $0x4, %eax
orl %ecx, %eax
movl %eax, %ecx
shrl $0x8, %ecx
orl %eax, %ecx
movl %ecx, %eax
shrl $0x10, %eax
orl %ecx, %eax
incl %eax
movl %eax, 0x10(%r14)
movq 0x18(%r14), %rdi
shlq $0x3, %rax
leaq (%rax,%rax,4), %rsi
callq 0x2370
movq %rax, 0x18(%r14)
movl 0x14(%r14), %eax
movl %eax, %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpl %ebx, %ecx
jg 0x174ca1
leal 0x1(%rbx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
andl $0x80000000, %eax       # imm = 0x80000000
orl %ecx, %eax
movl %eax, 0x14(%r14)
testl %ebp, %ebp
movq 0x18(%r14), %rax
movslq %ebx, %rcx
leaq (%rcx,%rcx,4), %rcx
setne 0x20(%rax,%rcx,8)
popq %rbx
popq %r14
popq %rbp
retq