LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/lh3[P]minigraph/lchain.c
// Function: mg_chain_bk_end
static int64_t mg_chain_bk_end(int32_t max_drop, const mg128_t *z, const int32_t *f, const int64_t *p, int32_t *t, int64_t k)
{
	int64_t i = z[k].y, end_i = -1, max_i = i;
	int32_t max_s = 0;
	if (i < 0 || t[i] != 0) return i;
	do {
		int32_t s;
		t[i] = 2;
		end_i = i = p[i];
		s = i < 0? z[k].x : (int32_t)z[k].x - f[i];
		if (s > max_s) max_s = s, max_i = i;
		else if (max_s - s > max_drop) break;
	} while (i >= 0 && t[i] == 0);
	for (i = z[k].y; i >= 0 && i != end_i; i = p[i]) // reset modified t[]
		t[i] = 0;
	return max_i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0xc(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq -0x38(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, -0x40(%rbp)
movq $-0x1, -0x48(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
movl $0x0, -0x54(%rbp)
cmpq $0x0, -0x40(%rbp)
jl 0x2204e
movq -0x30(%rbp), %rax
movq -0x40(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
je 0x2205b
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x2217e
jmp 0x2205d
movq -0x30(%rbp), %rax
movq -0x40(%rbp), %rcx
movl $0x2, (%rax,%rcx,4)
movq -0x28(%rbp), %rax
movq -0x40(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x40(%rbp)
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x40(%rbp)
jge 0x2209f
movq -0x18(%rbp), %rax
movq -0x38(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, -0x60(%rbp)
jmp 0x220c2
movq -0x18(%rbp), %rax
movq -0x38(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq -0x20(%rbp), %rcx
movq -0x40(%rbp), %rdx
subl (%rcx,%rdx,4), %eax
cltq
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movl %eax, -0x58(%rbp)
movl -0x58(%rbp), %eax
cmpl -0x54(%rbp), %eax
jle 0x220e1
movl -0x58(%rbp), %eax
movl %eax, -0x54(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
jmp 0x220f0
movl -0x54(%rbp), %eax
subl -0x58(%rbp), %eax
cmpl -0xc(%rbp), %eax
jle 0x220ee
jmp 0x2211b
jmp 0x220f0
jmp 0x220f2
xorl %eax, %eax
cmpq $0x0, -0x40(%rbp)
movb %al, -0x61(%rbp)
jl 0x22110
movq -0x30(%rbp), %rax
movq -0x40(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
sete %al
movb %al, -0x61(%rbp)
movb -0x61(%rbp), %al
testb $0x1, %al
jne 0x2205d
movq -0x18(%rbp), %rax
movq -0x38(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, -0x40(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x40(%rbp)
movb %al, -0x62(%rbp)
jl 0x2214c
movq -0x40(%rbp), %rax
cmpq -0x48(%rbp), %rax
setne %al
movb %al, -0x62(%rbp)
movb -0x62(%rbp), %al
testb $0x1, %al
jne 0x22155
jmp 0x22176
movq -0x30(%rbp), %rax
movq -0x40(%rbp), %rcx
movl $0x0, (%rax,%rcx,4)
movq -0x28(%rbp), %rax
movq -0x40(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x40(%rbp)
jmp 0x22132
movq -0x50(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lh3[P]minigraph/lchain.c
// Function: comput_sc_simple
static inline int32_t comput_sc_simple(const mg128_t *ai, const mg128_t *aj, float chn_pen_gap, float chn_pen_skip, int32_t *exact, int32_t *width)
{
	int32_t dq = (int32_t)ai->y - (int32_t)aj->y, dr, dd, dg, q_span, sc;
	dr = (int32_t)(ai->x - aj->x);
	*width = dd = dr > dq? dr - dq : dq - dr;
	dg = dr < dq? dr : dq;
	q_span = aj->y>>32&0xff;
	sc = q_span < dg? q_span : dg;
	if (exact) *exact = (dd == 0 && dg <= q_span);
	if (dd || dq > q_span) {
		float lin_pen, log_pen;
		lin_pen = chn_pen_gap * (float)dd + chn_pen_skip * (float)dg;
		log_pen = dd >= 1? mg_log2(dd + 1) : 0.0f; // mg_log2() only works for dd>=2
		sc -= (int)(lin_pen + .5f * log_pen);
	}
	return sc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movss %xmm0, -0x14(%rbp)
movss %xmm1, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
subl %ecx, %eax
movl %eax, -0x2c(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
subq (%rcx), %rax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jle 0x2586b
movl -0x30(%rbp), %eax
subl -0x2c(%rbp), %eax
movl %eax, -0x4c(%rbp)
jmp 0x25874
movl -0x2c(%rbp), %eax
subl -0x30(%rbp), %eax
movl %eax, -0x4c(%rbp)
movl -0x4c(%rbp), %ecx
movl %ecx, -0x34(%rbp)
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movl -0x30(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jge 0x25890
movl -0x30(%rbp), %eax
movl %eax, -0x50(%rbp)
jmp 0x25896
movl -0x2c(%rbp), %eax
movl %eax, -0x50(%rbp)
movl -0x50(%rbp), %eax
movl %eax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
shrq $0x20, %rax
andq $0xff, %rax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x38(%rbp), %eax
jge 0x258c1
movl -0x3c(%rbp), %eax
movl %eax, -0x54(%rbp)
jmp 0x258c7
movl -0x38(%rbp), %eax
movl %eax, -0x54(%rbp)
movl -0x54(%rbp), %eax
movl %eax, -0x40(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x258f9
xorl %eax, %eax
cmpl $0x0, -0x34(%rbp)
movb %al, -0x55(%rbp)
jne 0x258eb
movl -0x38(%rbp), %eax
cmpl -0x3c(%rbp), %eax
setle %al
movb %al, -0x55(%rbp)
movb -0x55(%rbp), %al
andb $0x1, %al
movzbl %al, %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
cmpl $0x0, -0x34(%rbp)
jne 0x25907
movl -0x2c(%rbp), %eax
cmpl -0x3c(%rbp), %eax
jle 0x25982
movss -0x14(%rbp), %xmm0
cvtsi2ssl -0x34(%rbp), %xmm2
movss -0x18(%rbp), %xmm1
cvtsi2ssl -0x38(%rbp), %xmm3
mulss %xmm3, %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x44(%rbp)
cmpl $0x1, -0x34(%rbp)
jl 0x25948
movl -0x34(%rbp), %eax
addl $0x1, %eax
cvtsi2ss %eax, %xmm0
callq 0x25e60
movss %xmm0, -0x5c(%rbp)
jmp 0x25952
xorps %xmm0, %xmm0
movss %xmm0, -0x5c(%rbp)
jmp 0x25952
movss -0x5c(%rbp), %xmm0
movss %xmm0, -0x48(%rbp)
movss -0x44(%rbp), %xmm1
movss -0x48(%rbp), %xmm0
movss 0x1716a(%rip), %xmm2    # 0x3cad8
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
cvttss2si %xmm0, %ecx
movl -0x40(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x40(%rbp)
movl -0x40(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lh3[P]minigraph/lchain.c
// Function: mg_update_anchors
void mg_update_anchors(int32_t n_a, mg128_t *a, int32_t n, const int32_t *mini_pos)
{
	int32_t st, j, k;
	if (n_a <= 0) return;
	st = get_mini_idx(&a[0], n, mini_pos);
	assert(st >= 0);
	for (k = 0, j = st; j < n && k < n_a; ++j)
		if ((int32_t)a[k].y == mini_pos[j])
			a[k].x = (uint64_t)j << 32 | (a[k].x & 0xffffffffU), ++k;
	assert(k == n_a);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
cmpl $0x0, -0x4(%rbp)
jg 0x25cc1
jmp 0x25dc5
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0x20(%rbp), %rdx
callq 0x25dd0
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jl 0x25cdc
jmp 0x25cfb
leaq 0x17668(%rip), %rdi     # 0x3d34b
leaq 0x1748e(%rip), %rsi     # 0x3d178
movl $0x1b4, %edx            # imm = 0x1B4
leaq 0x1765d(%rip), %rcx     # 0x3d353
callq 0x2170
movl $0x0, -0x2c(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %ecx
xorl %eax, %eax
cmpl -0x14(%rbp), %ecx
movb %al, -0x2d(%rbp)
jge 0x25d21
movl -0x2c(%rbp), %eax
cmpl -0x4(%rbp), %eax
setl %al
movb %al, -0x2d(%rbp)
movb -0x2d(%rbp), %al
testb $0x1, %al
jne 0x25d2a
jmp 0x25d9c
movq -0x10(%rbp), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq -0x20(%rbp), %rcx
movslq -0x28(%rbp), %rdx
cmpl (%rcx,%rdx,4), %eax
jne 0x25d8c
movslq -0x28(%rbp), %rcx
shlq $0x20, %rcx
movq -0x10(%rbp), %rdx
movslq -0x2c(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rdx
movabsq $0xffffffff, %rax       # imm = 0xFFFFFFFF
andq (%rdx), %rax
orq %rax, %rcx
movq -0x10(%rbp), %rax
movslq -0x2c(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x25d8e
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x25d08
movl -0x2c(%rbp), %eax
cmpl -0x4(%rbp), %eax
jne 0x25da6
jmp 0x25dc5
leaq 0x175eb(%rip), %rdi     # 0x3d398
leaq 0x173c4(%rip), %rsi     # 0x3d178
movl $0x1b8, %edx            # imm = 0x1B8
leaq 0x17593(%rip), %rcx     # 0x3d353
callq 0x2170
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lh3[P]minigraph/lchain.c
// Function: get_mini_idx
static int32_t get_mini_idx(const mg128_t *a, int32_t n, const int32_t *mini_pos)
{
	int32_t x, L = 0, R = n - 1;
	x = (int32_t)a->y;
	while (L <= R) { // binary search
		int32_t m = ((uint64_t)L + R) >> 1;
		int32_t y = mini_pos[m];
		if (y < x) L = m + 1;
		else if (y > x) R = m - 1;
		else return m;
	}
	return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x14(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movl %eax, -0x24(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jg 0x25e53
movslq -0x28(%rbp), %rax
movslq -0x2c(%rbp), %rcx
addq %rcx, %rax
shrq %rax
movl %eax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movslq -0x30(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x25e34
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x25e51
movl -0x34(%rbp), %eax
cmpl -0x24(%rbp), %eax
jle 0x25e47
movl -0x30(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x25e4f
movl -0x30(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x25e5a
jmp 0x25e51
jmp 0x25dfa
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/lh3[P]minigraph/./mgpriv.h
// Function: mg_log2
static inline float mg_log2(float x) // NB: this doesn't work when x<2
{
	union { float f; uint32_t i; } z = { x };
	float log_2 = ((z.i >> 23) & 255) - 128;
	z.i &= ~(255 << 23);
	z.i += 127 << 23;
	log_2 += (-0.34484843f * z.f + 2.02466578f) * z.f - 0.67487759f;
	return log_2;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movss %xmm0, -0x4(%rbp)
movss -0x4(%rbp), %xmm0
movss %xmm0, -0x8(%rbp)
movl -0x8(%rbp), %eax
shrl $0x17, %eax
movzbl %al, %eax
addl $-0x80, %eax
cvtsi2ss %rax, %xmm0
movss %xmm0, -0xc(%rbp)
movl -0x8(%rbp), %eax
andl $0x807fffff, %eax       # imm = 0x807FFFFF
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
addl $0x3f800000, %eax       # imm = 0x3F800000
movl %eax, -0x8(%rbp)
movss -0x8(%rbp), %xmm0
movss 0x172ac(%rip), %xmm1    # 0x3d158
mulss %xmm1, %xmm0
movss 0x172a4(%rip), %xmm1    # 0x3d15c
addss %xmm1, %xmm0
movss -0x8(%rbp), %xmm1
mulss %xmm1, %xmm0
movss 0x17287(%rip), %xmm1    # 0x3d154
addss %xmm1, %xmm0
addss -0xc(%rbp), %xmm0
movss %xmm0, -0xc(%rbp)
movss -0xc(%rbp), %xmm0
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/lh3[P]minigraph/gchain1.c
// Function: find_max
static int32_t find_max(int32_t n, const gc_frag_t *gf, int32_t x)
{
	int32_t s = 0, e = n;
	if (n == 0) return -1;
	if (gf[n-1].srt < x) return n - 1;
	if (gf[0].srt >= x) return -1;
	while (e > s) { // TODO: finish this block
		int32_t m = s + (e - s) / 2;
		if (gf[m].srt >= x) e = m;
		else s = m + 1;
	}
	assert(s == e);
	return s;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x8(%rbp), %eax
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x8(%rbp)
jne 0x27641
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x276f2
movq -0x10(%rbp), %rax
movl -0x8(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,8), %eax
cmpl -0x14(%rbp), %eax
jae 0x27664
movl -0x8(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x276f2
movq -0x10(%rbp), %rax
movl (%rax), %eax
cmpl -0x14(%rbp), %eax
jb 0x27678
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x276f2
jmp 0x2767a
movl -0x1c(%rbp), %eax
cmpl -0x18(%rbp), %eax
jle 0x276c3
movl -0x18(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x1c(%rbp), %eax
subl -0x18(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x24(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movl (%rax,%rcx,8), %eax
cmpl -0x14(%rbp), %eax
jb 0x276b8
movl -0x20(%rbp), %eax
movl %eax, -0x1c(%rbp)
jmp 0x276c1
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x2767a
movl -0x18(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jne 0x276cd
jmp 0x276ec
leaq 0x16015(%rip), %rdi     # 0x3d6e9
leaq 0x15cd9(%rip), %rsi     # 0x3d3b4
movl $0x1b, %edx
leaq 0x16009(%rip), %rcx     # 0x3d6f0
callq 0x2170
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lh3[P]minigraph/gchain1.c
// Function: copy_lchain
static inline void copy_lchain(mg_llchain_t *q, const mg_lchain_t *p, int32_t *n_a, mg128_t *a_new, const mg128_t *a_old, int32_t ed)
{
	q->cnt = p->cnt, q->v = p->v, q->score = p->score, q->ed = ed;
	memcpy(&a_new[*n_a], &a_old[p->off], q->cnt * sizeof(mg128_t));
	q->off = *n_a;
	(*n_a) += q->cnt;
}

// 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 %r8, -0x28(%rbp)
movl %r9d, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %ecx
shll %ecx
sarl %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x10(%rbp), %rax
movl 0x1c(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0xc(%rax)
movl -0x2c(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rax
movslq (%rax), %rax
shlq $0x4, %rax
addq %rax, %rdi
movq -0x28(%rbp), %rsi
movq -0x10(%rbp), %rax
movslq (%rax), %rax
shlq $0x4, %rax
addq %rax, %rsi
movq -0x8(%rbp), %rax
movslq 0x4(%rax), %rdx
shlq $0x4, %rdx
callq 0x2230
movq -0x18(%rbp), %rax
movl (%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
movq -0x18(%rbp), %rax
addl (%rax), %ecx
movl %ecx, (%rax)
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/lh3[P]minigraph/gchain1.c
// Function: mg_gchain_free
void mg_gchain_free(mg_gchains_t *gs)
{
	void *km;
	int32_t i;
	if (gs == 0) return;
	km = gs->km;
	for (i = 0; i < gs->n_gc; ++i) {
		if (gs->gc[i].p) kfree(km, gs->gc[i].p);
		if (gs->gc[i].ds.ds) kfree(km, gs->gc[i].ds.ds);
		if (gs->gc[i].ds.off) kfree(km, gs->gc[i].ds.off);
	}
	kfree(km, gs->gc); kfree(km, gs->a); kfree(km, gs->lc);
	kfree(km, gs);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x28df8
jmp 0x28f18
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x28ed8
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x14(%rbp), %rcx
imulq $0x68, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x48(%rax)
je 0x28e54
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x14(%rbp), %rcx
imulq $0x68, %rcx, %rcx
addq %rcx, %rax
movq 0x48(%rax), %rsi
callq 0x2670
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x14(%rbp), %rcx
imulq $0x68, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x60(%rax)
je 0x28e8e
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x14(%rbp), %rcx
imulq $0x68, %rcx, %rcx
addq %rcx, %rax
movq 0x60(%rax), %rsi
callq 0x2670
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x14(%rbp), %rcx
imulq $0x68, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x58(%rax)
je 0x28ec8
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x14(%rbp), %rcx
imulq $0x68, %rcx, %rcx
addq %rcx, %rax
movq 0x58(%rax), %rsi
callq 0x2670
jmp 0x28eca
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x28e0a
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rsi
callq 0x2670
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rsi
callq 0x2670
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rsi
callq 0x2670
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x2670
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/lh3[P]minigraph/galign.c
// Function: append_cigar1
static void append_cigar1(void *km, mg64_v *c, int32_t op, int32_t len)
{
	if (c->n > 0 && (c->a[c->n - 1]&0xf) == op) {
		c->a[c->n - 1] += (uint64_t)len<<4;
	} else {
		if (c->n == c->m) {
			c->m += (c->m>>1) + 16;
			KREALLOC(km, c->a, c->m);
		}
		c->a[c->n++] = (uint64_t)len<<4 | op;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, (%rax)
jle 0x2a11a
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
movl (%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
andq $0xf, %rax
movslq -0x14(%rbp), %rcx
cmpq %rcx, %rax
jne 0x2a11a
movslq -0x18(%rbp), %rdx
shlq $0x4, %rdx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
movl (%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
addq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
jmp 0x2a192
movq -0x10(%rbp), %rax
movl (%rax), %eax
movq -0x10(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jne 0x2a167
movq -0x10(%rbp), %rax
movl 0x4(%rax), %ecx
sarl %ecx
addl $0x10, %ecx
movq -0x10(%rbp), %rax
addl 0x4(%rax), %ecx
movl %ecx, 0x4(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x10(%rbp), %rax
movslq 0x4(%rax), %rdx
shlq $0x3, %rdx
callq 0x2ae0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movslq -0x18(%rbp), %rdx
shlq $0x4, %rdx
movslq -0x14(%rbp), %rax
orq %rax, %rdx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rsi
movl (%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, (%rsi)
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lh3[P]minigraph/galign.c
// Function: append_cigar
static void append_cigar(void *km, mg64_v *c, int32_t n_cigar, const uint32_t *cigar)
{
	int32_t k;
	if (n_cigar == 0) return;
	append_cigar1(km, c, cigar[0]&0xf, cigar[0]>>4);
	if (c->n + n_cigar - 1 > c->m) {
		c->m = c->n + n_cigar - 1;
		kroundup32(c->m);
		KREALLOC(km, c->a, c->m);
	}
	for (k = 0; k < n_cigar - 1; ++k)
		c->a[c->n + k] = cigar[1 + k];
	c->n += n_cigar - 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x2a1c2
jmp 0x2a309
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rax
movl (%rax), %edx
andl $0xf, %edx
movq -0x20(%rbp), %rax
movl (%rax), %ecx
shrl $0x4, %ecx
callq 0x2a0b0
movq -0x10(%rbp), %rax
movl (%rax), %eax
addl -0x14(%rbp), %eax
subl $0x1, %eax
movq -0x10(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jle 0x2a2b2
movq -0x10(%rbp), %rax
movl (%rax), %ecx
addl -0x14(%rbp), %ecx
subl $0x1, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %ecx
sarl %ecx
movq -0x10(%rbp), %rax
orl 0x4(%rax), %ecx
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %ecx
sarl $0x2, %ecx
movq -0x10(%rbp), %rax
orl 0x4(%rax), %ecx
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %ecx
sarl $0x4, %ecx
movq -0x10(%rbp), %rax
orl 0x4(%rax), %ecx
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %ecx
sarl $0x8, %ecx
movq -0x10(%rbp), %rax
orl 0x4(%rax), %ecx
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %ecx
sarl $0x10, %ecx
movq -0x10(%rbp), %rax
orl 0x4(%rax), %ecx
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x4(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x10(%rbp), %rax
movslq 0x4(%rax), %rdx
shlq $0x3, %rdx
callq 0x2ae0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x2a2fb
movq -0x20(%rbp), %rax
movl -0x24(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, %edx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
movl (%rcx), %ecx
addl -0x24(%rbp), %ecx
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x2a2b9
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
movq -0x10(%rbp), %rax
addl (%rax), %ecx
movl %ecx, (%rax)
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/lh3[P]minigraph/gcmisc.c
// Function: mg_gchain_restore_offset
void mg_gchain_restore_offset(mg_gchains_t *gcs)
{
	int32_t i, j, n_a, n_lc;
	for (i = 0, n_a = n_lc = 0; i < gcs->n_gc; ++i) {
		mg_gchain_t *gc = &gcs->gc[i];
		gc->off = n_lc;
		for (j = 0, gc->n_anchor = 0; j < gc->cnt; ++j) {
			mg_llchain_t *lc = &gcs->lc[n_lc + j];
			lc->off = n_a;
			n_a += lc->cnt;
			gc->n_anchor += lc->cnt;
		}
		n_lc += gc->cnt;
	}
	assert(n_lc == gcs->n_lc && n_a == gcs->n_a);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movl $0x0, -0x18(%rbp)
movl $0x0, -0x14(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x2b459
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0xc(%rbp), %rcx
imulq $0x68, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movl -0x18(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x8(%rax)
movl $0x0, -0x10(%rbp)
movq -0x20(%rbp), %rax
movl $0x0, 0x10(%rax)
movl -0x10(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jge 0x2b43e
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x18(%rbp), %ecx
addl -0x10(%rbp), %ecx
movslq %ecx, %rcx
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movl -0x14(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movq -0x28(%rbp), %rax
movl 0x4(%rax), %eax
addl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
movq -0x28(%rbp), %rax
movl 0x4(%rax), %ecx
movq -0x20(%rbp), %rax
addl 0x10(%rax), %ecx
movl %ecx, 0x10(%rax)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x2b3e4
movq -0x20(%rbp), %rax
movl 0xc(%rax), %eax
addl -0x18(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x2b3a1
movl -0x18(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jne 0x2b473
movl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jne 0x2b473
jmp 0x2b492
leaq 0x125ec(%rip), %rdi     # 0x3da66
leaq 0x125a7(%rip), %rsi     # 0x3da28
movl $0x34, %edx
leaq 0x125fe(%rip), %rcx     # 0x3da8b
callq 0x2170
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lh3[P]minigraph/gcmisc.c
// Function: mg_gchain_sort_by_score
void mg_gchain_sort_by_score(void *km, mg_gchains_t *gcs)
{
	mg128_t *z;
	mg_gchain_t *gc;
	int32_t i;
	KMALLOC(km, z, gcs->n_gc);
	KMALLOC(km, gc, gcs->n_gc);
	for (i = 0; i < gcs->n_gc; ++i)
		z[i].x = (uint64_t)gcs->gc[i].score << 32 | gcs->gc[i].hash, z[i].y = i;
	radix_sort_128x(z, z + gcs->n_gc);
	for (i = gcs->n_gc - 1; i >= 0; --i)
		gc[gcs->n_gc - 1 - i] = gcs->gc[z[i].y];
	memcpy(gcs->gc, gc, gcs->n_gc * sizeof(mg_gchain_t));
	kfree(km, z); kfree(km, gc);
	mg_gchain_restore_order(km, gcs); // this put gcs in the proper order
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movslq 0x8(%rax), %rsi
shlq $0x4, %rsi
callq 0x2890
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movslq 0x8(%rax), %rax
imulq $0x68, %rax, %rsi
callq 0x2890
movq %rax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x2b55d
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x24(%rbp), %rcx
imulq $0x68, %rcx, %rcx
addq %rcx, %rax
movslq 0x14(%rax), %rcx
shlq $0x20, %rcx
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x24(%rbp), %rdx
imulq $0x68, %rdx, %rdx
addq %rdx, %rax
movl 0x38(%rax), %eax
orq %rax, %rcx
movq -0x18(%rbp), %rax
movslq -0x24(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
movslq -0x24(%rbp), %rcx
movq -0x18(%rbp), %rax
movslq -0x24(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x2b4e9
movq -0x18(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rax
movslq 0x8(%rax), %rax
shlq $0x4, %rax
addq %rax, %rsi
callq 0x15f50
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
subl $0x1, %eax
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jl 0x2b5da
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
subl $0x1, %eax
subl -0x24(%rbp), %eax
cltq
imulq $0x68, %rax, %rax
addq %rax, %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rsi
movq -0x18(%rbp), %rax
movslq -0x24(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
imulq $0x68, 0x8(%rax), %rax
addq %rax, %rsi
movl $0x68, %edx
callq 0x2230
movl -0x24(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x2b586
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rax
movslq 0x8(%rax), %rax
imulq $0x68, %rax, %rdx
callq 0x2230
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x2670
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x2670
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x2b130
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lh3[P]minigraph/map-algo.c
// Function: collect_minimizers
static void collect_minimizers(void *km, const mg_mapopt_t *opt, const mg_idx_t *gi, int n_segs, const int *qlens, const char **seqs, mg128_v *mv)
{
	int i, n, sum = 0;
	mv->n = 0;
	for (i = n = 0; i < n_segs; ++i) {
		size_t j;
		mg_sketch(km, seqs[i], qlens[i], gi->w, gi->k, i, mv);
		for (j = n; j < mv->n; ++j)
			mv->a[j].y += sum << 1;
		sum += qlens[i], n = mv->n;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movl $0x0, -0x3c(%rbp)
movq 0x10(%rbp), %rax
movq $0x0, (%rax)
movl $0x0, -0x38(%rbp)
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x2de39
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movq -0x28(%rbp), %rax
movslq -0x34(%rbp), %rcx
movl (%rax,%rcx,4), %edx
movq -0x18(%rbp), %rax
movl 0x14(%rax), %ecx
movq -0x18(%rbp), %rax
movl 0x18(%rax), %r8d
movl -0x34(%rbp), %r9d
movq 0x10(%rbp), %rax
movq %rax, (%rsp)
callq 0x14dc0
movslq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq 0x10(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x2de10
movl -0x3c(%rbp), %eax
shll %eax
movslq %eax, %rcx
movq 0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x48(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
addq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x2ddd2
movq -0x28(%rbp), %rax
movslq -0x34(%rbp), %rcx
movl (%rax,%rcx,4), %eax
addl -0x3c(%rbp), %eax
movl %eax, -0x3c(%rbp)
movq 0x10(%rbp), %rax
movq (%rax), %rax
movl %eax, -0x38(%rbp)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x2dd83
addq $0x50, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/lh3[P]minigraph/map-algo.c
// Function: mm_fix_bad_ends
static void mm_fix_bad_ends(const mg128_t *a, int32_t lc_max_occ, int32_t lc_max_trim, int32_t *as, int32_t *cnt)
{
	int32_t i, k, as0 = *as, cnt0 = *cnt;
	for (i = as0 + cnt0 - 1, k = 0; k < lc_max_trim && k < cnt0; ++k, --i)
		if (a[i].y>>MG_SEED_OCC_SHIFT <= lc_max_occ)
			break;
	*cnt -= k;
	for (i = as0, k = 0; k < *cnt && k < lc_max_trim; ++i, ++k)
		if (a[i].y>>MG_SEED_OCC_SHIFT <= lc_max_occ)
			break;
	*as += k, *cnt -= k;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movq %r8, -0x20(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x2c(%rbp)
movq -0x20(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x30(%rbp)
movl -0x2c(%rbp), %eax
addl -0x30(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %ecx
xorl %eax, %eax
cmpl -0x10(%rbp), %ecx
movb %al, -0x31(%rbp)
jge 0x2e6f4
movl -0x28(%rbp), %eax
cmpl -0x30(%rbp), %eax
setl %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
testb $0x1, %al
jne 0x2e6fd
jmp 0x2e735
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
shrq $0x38, %rax
movslq -0xc(%rbp), %rcx
cmpq %rcx, %rax
ja 0x2e71f
jmp 0x2e735
jmp 0x2e721
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
movl -0x24(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x2e6db
movl -0x28(%rbp), %edx
movq -0x20(%rbp), %rax
movl (%rax), %ecx
subl %edx, %ecx
movl %ecx, (%rax)
movl -0x2c(%rbp), %eax
movl %eax, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %ecx
movq -0x20(%rbp), %rdx
xorl %eax, %eax
cmpl (%rdx), %ecx
movb %al, -0x32(%rbp)
jge 0x2e76b
movl -0x28(%rbp), %eax
cmpl -0x10(%rbp), %eax
setl %al
movb %al, -0x32(%rbp)
movb -0x32(%rbp), %al
testb $0x1, %al
jne 0x2e774
jmp 0x2e7ac
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
shrq $0x38, %rax
movslq -0xc(%rbp), %rcx
cmpq %rcx, %rax
ja 0x2e796
jmp 0x2e7ac
jmp 0x2e798
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x2e74f
movl -0x28(%rbp), %ecx
movq -0x18(%rbp), %rax
addl (%rax), %ecx
movl %ecx, (%rax)
movl -0x28(%rbp), %edx
movq -0x20(%rbp), %rax
movl (%rax), %ecx
subl %edx, %ecx
movl %ecx, (%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lh3[P]minigraph/format.c
// Function: str_enlarge
static inline void str_enlarge(void *km, kstring_t *s, int l)
{
	if (s->l + l + 1 > s->m) {
		s->m = s->l + l + 1;
		kroundup32(s->m);
		s->s = Krealloc(km, char, s->s, s->m);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
addl -0x14(%rbp), %eax
addl $0x1, %eax
movq -0x10(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jbe 0x30915
movq -0x10(%rbp), %rax
movl (%rax), %ecx
addl -0x14(%rbp), %ecx
addl $0x1, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %ecx
shrl %ecx
movq -0x10(%rbp), %rax
orl 0x4(%rax), %ecx
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %ecx
shrl $0x2, %ecx
movq -0x10(%rbp), %rax
orl 0x4(%rax), %ecx
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %ecx
shrl $0x4, %ecx
movq -0x10(%rbp), %rax
orl 0x4(%rax), %ecx
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %ecx
shrl $0x8, %ecx
movq -0x10(%rbp), %rax
orl 0x4(%rax), %ecx
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %ecx
shrl $0x10, %ecx
movq -0x10(%rbp), %rax
orl 0x4(%rax), %ecx
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x4(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, %edx
shlq $0x0, %rdx
callq 0x2ae0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lh3[P]minigraph/gmap.c
// Function: mg_map_file_frag
int mg_map_file_frag(const mg_idx_t *idx, int n_segs, const char **fn, const mg_mapopt_t *opt, int n_threads, double *c_seg, double *c_link)
{
	int i, pl_threads;
	pipeline_t pl;
	if (n_segs < 1) return -1;
	memset(&pl, 0, sizeof(pipeline_t));
	pl.n_fp = n_segs;
	pl.fp = open_bseqs(pl.n_fp, fn);
	if (pl.fp == 0) return -1;
	pl.opt = opt, pl.gi = idx;
	pl.n_threads = n_threads > 1? n_threads : 1;
	pl.mini_batch_size = opt->mini_batch_size;
	pl.c_seg = c_seg, pl.c_link = c_link;
	pl_threads = n_threads == 1? 1 : (opt->flag&MG_M_2_IO_THREADS)? 3 : 2;
	kt_pipeline(pl_threads, worker_pipeline, &pl, 3);

	free(pl.str.s);
	for (i = 0; i < pl.n_fp; ++i)
		mg_bseq_close(pl.fp[i]);
	free(pl.fp);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq 0x10(%rbp), %rax
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl %r8d, -0x2c(%rbp)
movq %r9, -0x38(%rbp)
cmpl $0x1, -0x14(%rbp)
jge 0x32658
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3278d
leaq -0x90(%rbp), %rdi
xorl %esi, %esi
movl $0x50, %edx
callq 0x2190
movl -0x14(%rbp), %eax
movl %eax, -0x80(%rbp)
movl -0x80(%rbp), %edi
movq -0x20(%rbp), %rsi
callq 0x327a0
movq %rax, -0x70(%rbp)
cmpq $0x0, -0x70(%rbp)
jne 0x32694
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3278d
movq -0x28(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x68(%rbp)
cmpl $0x1, -0x2c(%rbp)
jle 0x326b5
movl -0x2c(%rbp), %eax
movl %eax, -0x94(%rbp)
jmp 0x326c2
movl $0x1, %eax
movl %eax, -0x94(%rbp)
jmp 0x326c2
movl -0x94(%rbp), %eax
movl %eax, -0x84(%rbp)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x90(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x50(%rbp)
movq 0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
cmpl $0x1, -0x2c(%rbp)
jne 0x32700
movl $0x1, %eax
movl %eax, -0x98(%rbp)
jmp 0x32725
movq -0x28(%rbp), %rax
movq (%rax), %rdx
andq $0x80000, %rdx          # imm = 0x80000
movl $0x2, %eax
movl $0x3, %ecx
cmpq $0x0, %rdx
cmovnel %ecx, %eax
movl %eax, -0x98(%rbp)
movl -0x98(%rbp), %eax
movl %eax, -0x40(%rbp)
movl -0x40(%rbp), %edi
leaq 0x158(%rip), %rsi       # 0x32890
leaq -0x90(%rbp), %rdx
movl $0x3, %ecx
callq 0x3030
movq -0x58(%rbp), %rdi
callq 0x2040
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x80(%rbp), %eax
jge 0x3277d
movq -0x70(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x16480
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x32759
movq -0x70(%rbp), %rdi
callq 0x2040
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xa0, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/lh3[P]minigraph/gmap.c
// Function: open_bseqs
static mg_bseq_file_t **open_bseqs(int n, const char **fn)
{
	mg_bseq_file_t **fp;
	int i, j;
	fp = (mg_bseq_file_t**)calloc(n, sizeof(mg_bseq_file_t*));
	for (i = 0; i < n; ++i) {
		if ((fp[i] = mg_bseq_open(fn[i])) == 0) {
			if (mg_verbose >= 1)
				fprintf(stderr, "ERROR: failed to open file '%s'\n", fn[i]);
			for (j = 0; j < i; ++j)
				mg_bseq_close(fp[j]);
			free(fp);
			return 0;
		}
	}
	return fp;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0xc(%rbp)
movq %rsi, -0x18(%rbp)
movslq -0xc(%rbp), %rdi
movl $0x8, %esi
callq 0x21e0
movq %rax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x32875
movq -0x18(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x16390
movq -0x20(%rbp), %rcx
movslq -0x24(%rbp), %rdx
movq %rax, (%rcx,%rdx,8)
cmpq $0x0, %rax
jne 0x32865
leaq 0x12bf2(%rip), %rax     # 0x453f0
cmpl $0x1, (%rax)
jl 0x32827
movq 0x127ee(%rip), %rax     # 0x44ff8
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
leaq 0xb6c2(%rip), %rsi      # 0x3dee2
movb $0x0, %al
callq 0x2210
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x32852
movq -0x20(%rbp), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x16480
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x3282e
movq -0x20(%rbp), %rdi
callq 0x2040
movq $0x0, -0x8(%rbp)
jmp 0x3287d
jmp 0x32867
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x327c8
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lh3[P]minigraph/gmap.c
// Function: mg_map_files
int mg_map_files(gfa_t *g, int n_fn, const char **fn, const mg_idxopt_t *ipt, const mg_mapopt_t *opt0, int n_threads)
{
	mg_mapopt_t opt = *opt0;
	mg_idx_t *gi;
	int i, ret = 0;
	double *cov_seg = 0, *cov_link = 0;
	if ((gi = mg_index(g, ipt, n_threads, &opt)) == 0) return -1;
	if (opt.flag & MG_M_CAL_COV) {
		KCALLOC(0, cov_seg,  g->n_seg);
		KCALLOC(0, cov_link, g->n_arc);
	}
	if (opt.flag & MG_M_FRAG_MODE) {
		ret = mg_map_file_frag(gi, n_fn, fn, &opt, n_threads, cov_seg, cov_link);
	} else {
		for (i = 0; i < n_fn; ++i) {
			ret = mg_map_file_frag(gi, 1, &fn[i], &opt, n_threads, cov_seg, cov_link);
			if (ret != 0) break;
		}
	}
	if (opt.flag & MG_M_CAL_COV) {
		gfa_aux_update_cv(g, "dc", cov_seg, cov_link);
		free(cov_seg); free(cov_link);
	}
	mg_idx_destroy(gi);
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movl %r9d, -0x34(%rbp)
movq -0x30(%rbp), %rsi
leaq -0xe0(%rbp), %rdi
movl $0xa8, %edx
callq 0x2230
movl $0x0, -0xf0(%rbp)
movq $0x0, -0xf8(%rbp)
movq $0x0, -0x100(%rbp)
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
movl -0x34(%rbp), %edx
leaq -0xe0(%rbp), %rcx
callq 0x21110
movq %rax, -0xe8(%rbp)
cmpq $0x0, %rax
jne 0x33207
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x33377
movq -0xe0(%rbp), %rax
andq $0x4000, %rax           # imm = 0x4000
cmpq $0x0, %rax
je 0x33255
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, %esi
xorl %eax, %eax
movl %eax, %edi
movl $0x8, %edx
callq 0x2540
movq %rax, -0xf8(%rbp)
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rsi
xorl %eax, %eax
movl %eax, %edi
movl $0x8, %edx
callq 0x2540
movq %rax, -0x100(%rbp)
movq -0xe0(%rbp), %rax
andq $0x40, %rax
cmpq $0x0, %rax
je 0x3329e
movq -0xe8(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0x20(%rbp), %rdx
movl -0x34(%rbp), %r8d
movq -0xf8(%rbp), %r9
movq -0x100(%rbp), %rax
leaq -0xe0(%rbp), %rcx
movq %rax, (%rsp)
callq 0x32620
movl %eax, -0xf0(%rbp)
jmp 0x33319
movl $0x0, -0xec(%rbp)
movl -0xec(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x33317
movq -0xe8(%rbp), %rdi
movq -0x20(%rbp), %rdx
movslq -0xec(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdx
movl -0x34(%rbp), %r8d
movq -0xf8(%rbp), %r9
movq -0x100(%rbp), %rax
movl $0x1, %esi
leaq -0xe0(%rbp), %rcx
movq %rax, (%rsp)
callq 0x32620
movl %eax, -0xf0(%rbp)
cmpl $0x0, -0xf0(%rbp)
je 0x33304
jmp 0x33317
jmp 0x33306
movl -0xec(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xec(%rbp)
jmp 0x332a8
jmp 0x33319
movq -0xe0(%rbp), %rax
andq $0x4000, %rax           # imm = 0x4000
cmpq $0x0, %rax
je 0x33362
movq -0x10(%rbp), %rdi
movq -0xf8(%rbp), %rdx
movq -0x100(%rbp), %rcx
leaq 0xab9a(%rip), %rsi      # 0x3dedf
callq 0x7b00
movq -0xf8(%rbp), %rdi
callq 0x2040
movq -0x100(%rbp), %rdi
callq 0x2040
movq -0xe8(%rbp), %rdi
callq 0x203d0
movl -0xf0(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lh3[P]minigraph/./bseq.h
// Function: mg_revcomp_bseq
static inline void mg_revcomp_bseq(mg_bseq1_t *s)
{
	int32_t i, t, l = s->l_seq;
	mg_revcomp_seq(s->l_seq, s->seq);
	if (s->qual)
		for (i = 0; i < l>>1; ++i)
			t = s->qual[l - i - 1], s->qual[l - i - 1] = s->qual[i], s->qual[i] = t;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %edi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0x33910
movq -0x8(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x33908
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl -0x14(%rbp), %ecx
sarl %ecx
cmpl %ecx, %eax
jge 0x33906
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x14(%rbp), %ecx
subl -0xc(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0xc(%rbp), %rcx
movb (%rax,%rcx), %dl
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x14(%rbp), %ecx
subl -0xc(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl -0x10(%rbp), %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0xc(%rbp), %rcx
movb %dl, (%rax,%rcx)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x3389a
jmp 0x33908
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/lh3[P]minigraph/./bseq.h
// Function: mg_revcomp_seq
static inline void mg_revcomp_seq(int32_t len, char *seq)
{
	int32_t i;
	for (i = 0; i < len>>1; ++i) {
		int32_t t = seq[len - i - 1];
		seq[len - i - 1] = gfa_comp_table[(uint8_t)seq[i]];
		seq[i] = gfa_comp_table[t];
	}
	if (len&1) seq[len>>1] = gfa_comp_table[(uint8_t)seq[len>>1]];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl -0x4(%rbp), %ecx
sarl %ecx
cmpl %ecx, %eax
jge 0x33994
movq -0x10(%rbp), %rax
movl -0x4(%rbp), %ecx
subl -0x14(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movl %eax, %ecx
leaq 0x11896(%rip), %rax     # 0x451f0
movb (%rax,%rcx), %dl
movq -0x10(%rbp), %rax
movl -0x4(%rbp), %ecx
subl -0x14(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movslq -0x18(%rbp), %rcx
leaq 0x11875(%rip), %rax     # 0x451f0
movb (%rax,%rcx), %dl
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movb %dl, (%rax,%rcx)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x33922
movl -0x4(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x339ca
movq -0x10(%rbp), %rax
movl -0x4(%rbp), %ecx
sarl %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, %ecx
leaq 0x11838(%rip), %rax     # 0x451f0
movb (%rax,%rcx), %dl
movq -0x10(%rbp), %rax
movl -0x4(%rbp), %ecx
sarl %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/lh3[P]minigraph/ggsimple.c
// Function: gg_score_intv
static void gg_score_intv(int32_t n_intv, ed_intv_t *intv)
{
	int32_t j;
	for (j = 0; j < n_intv; ++j) {
		int32_t s;
		if (intv[j].op == 7)
			s = intv[j].len >= 10? -intv[j].len : 0;
		else s = intv[j].len;
		intv[j].sc = s;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x37c38
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
cmpl $0x7, 0x14(%rax)
jne 0x37c00
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
cmpl $0xa, 0x10(%rax)
jl 0x37bf1
movq -0x10(%rbp), %rcx
movslq -0x14(%rbp), %rax
imulq $0x1c, %rax, %rax
addq %rax, %rcx
xorl %eax, %eax
subl 0x10(%rcx), %eax
movl %eax, -0x1c(%rbp)
jmp 0x37bf8
xorl %eax, %eax
movl %eax, -0x1c(%rbp)
jmp 0x37bf8
movl -0x1c(%rbp), %eax
movl %eax, -0x18(%rbp)
jmp 0x37c15
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %ecx
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rdx
imulq $0x1c, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x18(%rax)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x37ba2
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lh3[P]minigraph/ggsimple.c
// Function: gg_merge_seg
static void gg_merge_seg(const ed_intv_t *intv, int32_t n_ss, mg_msseg_t *ss)
{
	int32_t j0, j;
	for (j0 = 0, j = 1; j < n_ss; ++j) {
		mg_msseg_t *s0 = &ss[j0], *s1 = &ss[j];
		int32_t i, mid = 0;
		for (i = s0->en + 1; i < s1->st; ++i)
			mid += intv[i].sc;
		//fprintf(stderr, "XX\t%d\t%d\t%d\t%d\t%d\t%d\n", j, s0->sc, mid, s1->sc, s0->en+1, s1->st);
		if (-mid < s0->sc * 0.2 && -mid < s1->sc * 0.2) { // FIXME: mid is sometimes 0
			s0->en = s1->en, s0->sc += s1->sc + mid;
			s1->st = s1->en, s1->sc = 0;
		} else j0 = j;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl $0x1, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x37d6b
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movslq -0x20(%rbp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movl $0x0, -0x38(%rbp)
movq -0x28(%rbp), %rax
movl 0x4(%rax), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
movq -0x30(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x37cd1
movq -0x8(%rbp), %rax
movslq -0x34(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl 0x18(%rax), %eax
addl -0x38(%rbp), %eax
movl %eax, -0x38(%rbp)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x37ca3
xorl %eax, %eax
subl -0x38(%rbp), %eax
cvtsi2sd %eax, %xmm1
movq -0x28(%rbp), %rax
cvtsi2sdl 0x8(%rax), %xmm0
movsd 0x62b5(%rip), %xmm2     # 0x3dfa0
mulsd %xmm2, %xmm0
ucomisd %xmm1, %xmm0
jbe 0x37d55
xorl %eax, %eax
subl -0x38(%rbp), %eax
cvtsi2sd %eax, %xmm1
movq -0x30(%rbp), %rax
cvtsi2sdl 0x8(%rax), %xmm0
movsd 0x6291(%rip), %xmm2     # 0x3dfa0
mulsd %xmm2, %xmm0
ucomisd %xmm1, %xmm0
jbe 0x37d55
movq -0x30(%rbp), %rax
movl 0x4(%rax), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x30(%rbp), %rax
movl 0x8(%rax), %ecx
addl -0x38(%rbp), %ecx
movq -0x28(%rbp), %rax
addl 0x8(%rax), %ecx
movl %ecx, 0x8(%rax)
movq -0x30(%rbp), %rax
movl 0x4(%rax), %ecx
movq -0x30(%rbp), %rax
movl %ecx, (%rax)
movq -0x30(%rbp), %rax
movl $0x0, 0x8(%rax)
jmp 0x37d5b
movl -0x20(%rbp), %eax
movl %eax, -0x1c(%rbp)
jmp 0x37d5d
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x37c5d
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/lh3[P]minigraph/ggen.c
// Function: mg_ggen_aug
int mg_ggen_aug(gfa_t *g, int32_t n_fn, const char **fn, const mg_idxopt_t *ipt, const mg_mapopt_t *opt0, const mg_ggopt_t *go, int n_threads)
{
	int i;
	mg_mapopt_t opt = *opt0;
	if (g == 0) return -1;
	for (i = 0; i < n_fn; ++i) {
		mg_idx_t *gi;
		maprst_t *r;
		if ((gi = mg_index(g, ipt, n_threads, &opt)) == 0) return -1;
		r = ggen_map(gi, &opt, fn[i], n_threads);
		if (opt0->flag & MG_M_CIGAR)
			mg_ggsimple_cigar(0, go, g, r->n_seq, r->seq, r->gcs);
		else
			mg_ggsimple(0, go, g, r->n_seq, r->seq, r->gcs);
		mg_free_maprst(r);
		mg_idx_destroy(gi);
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
movl 0x10(%rbp), %eax
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movq -0x30(%rbp), %rsi
leaq -0xe8(%rbp), %rdi
movl $0xa8, %edx
callq 0x2230
cmpq $0x0, -0x10(%rbp)
jne 0x37dbd
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x37ecb
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x37ec4
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
movl 0x10(%rbp), %edx
leaq -0xe8(%rbp), %rcx
callq 0x21110
movq %rax, -0xf0(%rbp)
cmpq $0x0, %rax
jne 0x37e00
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x37ecb
movq -0xf0(%rbp), %rdi
movq -0x20(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movl 0x10(%rbp), %ecx
leaq -0xe8(%rbp), %rsi
callq 0x37ee0
movq %rax, -0xf8(%rbp)
movq -0x30(%rbp), %rax
movq (%rax), %rax
andq $0x4000000, %rax        # imm = 0x4000000
cmpq $0x0, %rax
je 0x37e6e
movq -0x38(%rbp), %rsi
movq -0x10(%rbp), %rdx
movq -0xf8(%rbp), %rax
movl (%rax), %ecx
movq -0xf8(%rbp), %rax
movq 0x8(%rax), %r8
movq -0xf8(%rbp), %rax
movq 0x10(%rax), %r9
xorl %eax, %eax
movl %eax, %edi
callq 0x36070
jmp 0x37e9e
movq -0x38(%rbp), %rsi
movq -0x10(%rbp), %rdx
movq -0xf8(%rbp), %rax
movl (%rax), %ecx
movq -0xf8(%rbp), %rax
movq 0x8(%rax), %r8
movq -0xf8(%rbp), %rax
movq 0x10(%rax), %r9
xorl %eax, %eax
movl %eax, %edi
callq 0x343f0
movq -0xf8(%rbp), %rdi
callq 0x381b0
movq -0xf0(%rbp), %rdi
callq 0x203d0
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x37dc4
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
nopw (%rax,%rax)