LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/lh3[P]minigraph/index.c
// Function: mg_index_core
mg_idx_t *mg_index_core(gfa_t *g, int k, int w, int b, int n_threads)
{
	mg_idx_t *gi;
	mg128_v a = {0,0,0};
	int i;

	if (mg_gfa_overlap(g)) {
		if (mg_verbose >= 1)
			fprintf(stderr, "[E::%s] minigraph doesn't work with graphs containing overlapping segments\n", __func__);
		return 0;
	}
	gi = mg_idx_init(k, w, b);
	gi->g = g;

	for (i = 0; i < g->n_seg; ++i) {
		gfa_seg_t *s = &g->seg[i];
		a.n = 0;
		mg_sketch(0, s->seq, s->len, w, k, i, &a); // TODO: this can be parallelized
		mg_idx_add(gi, a.n, a.a);
	}
	free(a.a);
	kt_for(n_threads, worker_post, gi, 1<<gi->b);
	return gi;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %edx, 0x18(%rsp)
movl %esi, 0x14(%rsp)
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movq $0x0, 0x30(%rsp)
movq 0x40(%rdi), %rax
testq %rax, %rax
je 0x157fc
movq 0x48(%rbx), %rdx
addq $0x14, %rdx
cmpl $0x0, -0x4(%rdx)
jne 0x15938
cmpl $0x0, (%rdx)
jne 0x15938
addq $0x20, %rdx
decq %rax
jne 0x157e0
movl %r8d, 0x1c(%rsp)
movl 0x14(%rsp), %edi
movl 0x18(%rsp), %esi
movl %ecx, %edx
callq 0x14fe4
movq %rax, %r12
movq %rbx, (%rax)
cmpl $0x0, 0x4(%rbx)
je 0x1590a
xorl %r13d, %r13d
movq %rbx, 0x40(%rsp)
movq 0x10(%rbx), %rax
movq %r13, %rcx
shlq $0x6, %rcx
movq $0x0, 0x20(%rsp)
movq 0x20(%rax,%rcx), %rsi
movl (%rax,%rcx), %edx
leaq 0x20(%rsp), %rax
movq %rax, (%rsp)
xorl %edi, %edi
movl 0x18(%rsp), %ecx
movl 0x14(%rsp), %r8d
movl %r13d, %r9d
callq 0xe4f4
movq 0x20(%rsp), %rbp
testl %ebp, %ebp
jle 0x158f6
movb 0x10(%r12), %cl
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
shll %cl, %r14d
movq 0x30(%rsp), %r15
notl %r14d
andl $0x7fffffff, %ebp       # imm = 0x7FFFFFFF
movq 0x28(%r12), %rcx
movl 0x1(%r15), %eax
andl %r14d, %eax
leaq (%rax,%rax,2), %rdx
shlq $0x4, %rdx
leaq (%rcx,%rdx), %rbx
movq 0x8(%rcx,%rdx), %rax
cmpq %rax, (%rcx,%rdx)
jne 0x158d3
leaq (%rax,%rax), %rdx
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %rdx
movq %rdx, 0x8(%rbx)
movq 0x10(%rbx), %rsi
shlq $0x4, %rdx
xorl %edi, %edi
callq 0x32c4
movq %rax, 0x10(%rbx)
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%rbx)
shlq $0x4, %rax
movups (%r15), %xmm0
movups %xmm0, (%rcx,%rax)
addq $0x10, %r15
decq %rbp
jne 0x15889
incq %r13
movq 0x40(%rsp), %rbx
movl 0x4(%rbx), %eax
cmpq %rax, %r13
jb 0x15828
movq 0x30(%rsp), %rdi
callq 0x2040
movb 0x10(%r12), %cl
movl $0x1, %eax
shll %cl, %eax
movslq %eax, %rcx
leaq 0x36(%rip), %rsi        # 0x15960
movl 0x1c(%rsp), %edi
movq %r12, %rdx
callq 0x347c
jmp 0x15947
leaq 0x1cac1(%rip), %rax     # 0x32400
cmpl $0x0, (%rax)
jg 0x15959
xorl %r12d, %r12d
movq %r12, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x2786
jmp 0x15944
// File: /workspace/github_c_makefile_star2_O1/lh3[P]minigraph/index.c
// Function: worker_post
static void worker_post(void *g, long i, int tid)
{
	mg_idx_t *gi = (mg_idx_t*)g;
	mg_idx_bucket_t *b = &gi->B[i];
	if (b->a.n == 0) return;
	b->h = (idxhash_t*)mg_idx_a2h(0, b->a.n, b->a.a, gi->b, &b->p, &b->n);
	kfree(0, b->a.a);
	b->a.n = b->a.m = 0, b->a.a = 0;
}

// Assembly:
pushq %rbx
movq 0x28(%rdi), %rbx
leaq (%rsi,%rsi,2), %rax
shlq $0x4, %rax
movq (%rbx,%rax), %rsi
testq %rsi, %rsi
je 0x159ac
addq %rax, %rbx
movq 0x10(%rbx), %rdx
movl 0x10(%rdi), %ecx
leaq 0x20(%rbx), %r8
leaq 0x18(%rbx), %r9
xorl %edi, %edi
callq 0x153e1
movq %rax, 0x28(%rbx)
movq 0x10(%rbx), %rsi
xorl %edi, %edi
callq 0x30f6
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/lh3[P]minigraph/index.c
// Function: mg_index
mg_idx_t *mg_index(gfa_t *g, const mg_idxopt_t *io, int n_threads, mg_mapopt_t *mo)
{
	int32_t i, j;
	mg_idx_t *gi;
	for (i = 0; i < g->n_seg; ++i) { // uppercase
		gfa_seg_t *s = &g->seg[i];
		for (j = 0; j < s->len; ++j)
			if (s->seq[j] >= 'a' && s->seq[j] <= 'z')
				s->seq[j] -= 32;
	}
	gi = mg_index_core(g, io->k, io->w, io->bucket_bits, n_threads);
	if (gi == 0) return 0;
	gi->es = gfa_edseq_init(gi->g);
	gi->n_seg = g->n_seg;
	if (mg_verbose >= 3)
		fprintf(stderr, "[M::%s::%.3f*%.2f] indexed the graph\n", __func__,
				realtime() - mg_realtime0, cputime() / (realtime() - mg_realtime0));
	if (mo) mg_opt_update(gi, mo, 0);
	return gi;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rcx, %rbx
movl %edx, %r8d
movq %rdi, %r14
cmpl $0x0, 0x4(%rdi)
je 0x15a0b
xorl %eax, %eax
movq 0x10(%r14), %rcx
movq %rax, %rdx
shlq $0x6, %rdx
cmpl $0x0, (%rcx,%rdx)
jle 0x159ff
addq %rdx, %rcx
xorl %edx, %edx
movq 0x20(%rcx), %rdi
movb (%rdi,%rdx), %r9b
leal -0x61(%r9), %r10d
cmpb $0x19, %r10b
ja 0x159f4
addb $-0x20, %r9b
movb %r9b, (%rdi,%rdx)
incq %rdx
movslq (%rcx), %rdi
cmpq %rdi, %rdx
jl 0x159da
incq %rax
movl 0x4(%r14), %ecx
cmpq %rcx, %rax
jb 0x159c4
movl (%rsi), %edx
movl 0x4(%rsi), %eax
movl 0x8(%rsi), %ecx
movq %r14, %rdi
movl %eax, %esi
callq 0x157a5
testq %rax, %rax
je 0x15a59
movq %rax, %r15
movq (%rax), %rdi
callq 0xb499
movq %rax, 0x8(%r15)
movl 0x4(%r14), %eax
movl %eax, 0x20(%r15)
leaq 0x1c9c0(%rip), %rax     # 0x32400
cmpl $0x3, (%rax)
jge 0x15a65
testq %rbx, %rbx
je 0x15a5c
movq %r15, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x100a1
jmp 0x15a5c
xorl %r15d, %r15d
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
callq 0x27a5
jmp 0x15a45
// File: /workspace/github_c_makefile_star2_O1/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:
shlq $0x4, %r9
movq 0x8(%rsi,%r9), %rax
testq %rax, %rax
js 0x16043
cmpl $0x0, (%r8,%rax,4)
je 0x16044
retq
pushq %rbp
pushq %r14
pushq %rbx
addq %r9, %rsi
movl (%rsi), %r10d
xorl %r11d, %r11d
movq %rax, %r9
movl $0x2, (%r8,%rax,4)
movq (%rcx,%rax,8), %rax
movl %r10d, %ebx
testq %rax, %rax
js 0x1606e
movl %r10d, %ebx
subl (%rdx,%rax,4), %ebx
movl %r11d, %r14d
subl %ebx, %r14d
cmovlq %rax, %r9
setl %bpl
cmpl %edi, %r14d
setle %r14b
testq %rax, %rax
js 0x1609b
orb %r14b, %bpl
je 0x1609b
cmpl %r11d, %ebx
cmovgl %ebx, %r11d
cmpl $0x0, (%r8,%rax,4)
je 0x16054
movq 0x8(%rsi), %rdx
testq %rdx, %rdx
js 0x160b7
cmpq %rax, %rdx
je 0x160b7
movl $0x0, (%r8,%rdx,4)
movq (%rcx,%rdx,8), %rdx
jmp 0x1609f
movq %r9, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/lh3[P]minigraph/lchain.c
// Function: mg_lchain_gen
mg_lchain_t *mg_lchain_gen(void *km, uint32_t hash, int qlen, int n_u, uint64_t *u, mg128_t *a)
{
	mg128_t *z;
	mg_lchain_t *r;
	int i, k;

	if (n_u == 0) return 0;
	KCALLOC(km, r, n_u);

	// sort by query position
	KMALLOC(km, z, n_u);
	for (i = k = 0; i < n_u; ++i) {
		int32_t qs = (int32_t)a[k].y + 1 - (a[k].y>>32 & 0xff);
		z[i].x = (uint64_t)qs << 32 | u[i] >> 32;
		z[i].y = (uint64_t)k << 32 | (int32_t)u[i];
		k += (int32_t)u[i];
	}
	radix_sort_128x(z, z + n_u);

	// populate r[]
	for (i = 0; i < n_u; ++i) {
		mg_lchain_t *ri = &r[i];
		int32_t k = z[i].y >> 32, q_span = a[k].y >> 32 & 0xff;
		ri->off = k;
		ri->cnt = (int32_t)z[i].y;
		ri->score = (uint32_t)z[i].x;
		ri->v = a[k].x >> 32;
		ri->rs = (int32_t)a[k].x + 1 > q_span? (int32_t)a[k].x + 1 - q_span : 0; // for HPC k-mer
		ri->qs = z[i].x >> 32;
		ri->re = (int32_t)a[k + ri->cnt - 1].x + 1;
		ri->qe = (int32_t)a[k + ri->cnt - 1].y + 1;
	}
	kfree(km, z);
	return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testl %ecx, %ecx
je 0x186a4
movq %r9, %rbx
movq %r8, %r14
movl %ecx, %ebp
movq %rdi, %r12
movslq %ecx, %r13
movl $0x28, %edx
movq %r13, %rsi
callq 0x3054
movq %rax, %r15
shlq $0x4, %r13
movq %r12, (%rsp)
movq %r12, %rdi
movq %r13, %rsi
callq 0x31c1
movq %rax, %r12
movl %ebp, %r8d
testl %ebp, %ebp
jle 0x185c0
leaq (,%r8,8), %rax
xorl %ecx, %ecx
xorl %edx, %edx
movslq %edx, %rdx
movq %rdx, %rsi
shlq $0x4, %rsi
movq 0x8(%rbx,%rsi), %rsi
movq %rsi, %rdi
shrq $0x20, %rdi
movzbl %dil, %edi
subl %edi, %esi
incl %esi
movq (%r14,%rcx), %rdi
shrdq $0x20, %rsi, %rdi
movq %rdi, (%r12,%rcx,2)
movq %rdx, %rsi
shlq $0x20, %rsi
movslq (%r14,%rcx), %rdi
orq %rsi, %rdi
movq %rdi, 0x8(%r12,%rcx,2)
addl (%r14,%rcx), %edx
addq $0x8, %rcx
cmpq %rcx, %rax
jne 0x18575
movq %r8, %r14
addq %r12, %r13
movq %r12, %rdi
movq %r13, %rsi
callq 0xeec3
testl %ebp, %ebp
jle 0x18696
movq %r12, %rax
addq $0x8, %rax
shlq $0x3, %r14
leaq (%r14,%r14,4), %rcx
xorl %edx, %edx
movl $0x80000000, %esi       # imm = 0x80000000
xorl %edi, %edi
movq (%rax), %r8
movq %r8, %r9
shrq $0x20, %r9
movq %r8, %r10
sarq $0x20, %r10
shlq $0x4, %r10
movzbl 0xc(%rbx,%r10), %r11d
movl %r9d, (%r15,%rdi)
movl %r8d, %ebp
andl $0x7fffffff, %ebp       # imm = 0x7FFFFFFF
movl 0x4(%r15,%rdi), %r14d
andl %esi, %r14d
orl %ebp, %r14d
movl %r14d, 0x4(%r15,%rdi)
movq -0x8(%rax), %r14
movl %r14d, 0x1c(%r15,%rdi)
movq (%rbx,%r10), %r10
movq %r10, %r13
shrq $0x20, %r13
movl %r13d, 0x8(%r15,%rdi)
subl %r11d, %r10d
leal 0x1(%r10), %r10d
cmovll %edx, %r10d
movl %r10d, 0xc(%r15,%rdi)
shrq $0x20, %r14
movl %r14d, 0x14(%r15,%rdi)
addl %r8d, %r8d
sarl %r8d
addl %r9d, %r8d
movslq %r8d, %r8
shlq $0x4, %r8
movl -0x10(%rbx,%r8), %r9d
incl %r9d
movl %r9d, 0x10(%r15,%rdi)
movl -0x8(%rbx,%r8), %r8d
incl %r8d
movl %r8d, 0x18(%r15,%rdi)
addq $0x10, %rax
addq $0x28, %rdi
cmpq %rdi, %rcx
jne 0x185f1
movq (%rsp), %rdi
movq %r12, %rsi
callq 0x30f6
jmp 0x186a7
xorl %r15d, %r15d
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 %rbx
testl %edi, %edi
jle 0x18764
leal -0x1(%rdx), %r9d
movl 0x8(%rsi), %r8d
xorl %r10d, %r10d
cmpl %r9d, %r10d
jg 0x18704
movslq %r9d, %r11
movslq %r10d, %rbx
addq %r11, %rbx
shrq %rbx
movl (%rcx,%rbx,4), %r11d
cmpl %r8d, %r11d
jge 0x186ed
leal 0x1(%rbx), %r10d
jmp 0x186f3
jle 0x186f8
leal -0x1(%rbx), %r9d
movb $0x1, %r11b
jmp 0x186fd
xorl %r11d, %r11d
movl %ebx, %eax
testb %r11b, %r11b
jne 0x186cd
jmp 0x18709
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %eax, %eax
js 0x18766
xorl %r8d, %r8d
cmpl %edx, %eax
jge 0x1875f
movl %eax, %r9d
leaq (%rcx,%r9,4), %rcx
shlq $0x20, %r9
incl %eax
xorl %r8d, %r8d
movabsq $0x100000000, %r10      # imm = 0x100000000
movslq %r8d, %r11
shlq $0x4, %r11
movl (%rcx), %ebx
cmpl 0x8(%rsi,%r11), %ebx
jne 0x1874d
addq %rsi, %r11
movl (%r11), %ebx
addq %r9, %rbx
movq %rbx, (%r11)
incl %r8d
cmpl %edx, %eax
jge 0x1875f
addq %r10, %r9
addq $0x4, %rcx
incl %eax
cmpl %edi, %r8d
jl 0x1872e
cmpl %edi, %r8d
jne 0x18785
popq %rbx
retq
leaq 0x10c76(%rip), %rdi     # 0x293e3
leaq 0x10a9c(%rip), %rsi     # 0x29210
leaq 0x10c70(%rip), %rcx     # 0x293eb
movl $0x1b4, %edx            # imm = 0x1B4
callq 0x2160
leaq 0x10ca4(%rip), %rdi     # 0x29430
leaq 0x10a7d(%rip), %rsi     # 0x29210
leaq 0x10c51(%rip), %rcx     # 0x293eb
movl $0x1b8, %edx            # imm = 0x1B8
callq 0x2160
// File: /workspace/github_c_makefile_star2_O1/lh3[P]minigraph/gchain1.c
// Function: rs_insertsort_gc
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:
leaq 0x8(%rdi), %rcx
cmpq %rsi, %rcx
jae 0x187f9
movq %rdi, %rdx
movq %rcx, %rax
movl 0x8(%rdx), %ecx
cmpl (%rdx), %ecx
jae 0x187ed
movl 0xc(%rdx), %edx
movq %rax, %r8
cmpq %rdi, %rax
jbe 0x187e6
movq %rax, %r9
cmpl -0x8(%r9), %ecx
jae 0x187e3
leaq -0x8(%r9), %r8
movq -0x8(%r9), %r10
movq %r10, (%r9)
movq %r8, %r9
cmpq %rdi, %r8
ja 0x187c8
jmp 0x187e6
movq %r9, %r8
movl %ecx, (%r8)
movl %edx, 0x4(%r8)
leaq 0x8(%rax), %rcx
movq %rax, %rdx
cmpq %rsi, %rcx
jb 0x187b0
retq
// File: /workspace/github_c_makefile_star2_O1/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:
testq %rdi, %rdi
je 0x1ad21
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %r14
cmpl $0x0, 0x8(%rdi)
jle 0x1ace7
xorl %r15d, %r15d
xorl %r12d, %r12d
movq 0x18(%rbx), %rax
movq 0x48(%rax,%r15), %rsi
testq %rsi, %rsi
je 0x1acab
movq %r14, %rdi
callq 0x30f6
movq 0x18(%rbx), %rax
movq 0x60(%rax,%r15), %rsi
testq %rsi, %rsi
je 0x1acc1
movq %r14, %rdi
callq 0x30f6
movq 0x18(%rbx), %rax
movq 0x58(%rax,%r15), %rsi
testq %rsi, %rsi
je 0x1acd7
movq %r14, %rdi
callq 0x30f6
incq %r12
movslq 0x8(%rbx), %rax
addq $0x68, %r15
cmpq %rax, %r12
jl 0x1ac95
movq 0x18(%rbx), %rsi
movq %r14, %rdi
callq 0x30f6
movq 0x28(%rbx), %rsi
movq %r14, %rdi
callq 0x30f6
movq 0x20(%rbx), %rsi
movq %r14, %rdi
callq 0x30f6
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x30f6
retq
nop
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r14
pushq %rbx
movl %ecx, %r14d
movl %edx, %ebp
movq %rsi, %rbx
movslq (%rsi), %rax
testq %rax, %rax
jle 0x1b74e
movq 0x8(%rbx), %rcx
movq -0x8(%rcx,%rax,8), %rdx
movl %edx, %esi
andl $0xf, %esi
cmpl %ebp, %esi
jne 0x1b74e
movslq %r14d, %rsi
shlq $0x4, %rsi
addq %rsi, %rdx
movq %rdx, -0x8(%rcx,%rax,8)
jmp 0x1b791
movl 0x4(%rbx), %ecx
cmpl %ecx, %eax
jne 0x1b775
movl %ecx, %eax
sarl %eax
addl %ecx, %eax
addl $0x10, %eax
movl %eax, 0x4(%rbx)
movq 0x8(%rbx), %rsi
movslq %eax, %rdx
shlq $0x3, %rdx
callq 0x32c4
movq %rax, 0x8(%rbx)
movslq %r14d, %rax
shlq $0x4, %rax
movl %ebp, %ecx
orq %rax, %rcx
movq 0x8(%rbx), %rax
movslq (%rbx), %rdx
leal 0x1(%rdx), %esi
movl %esi, (%rbx)
movq %rcx, (%rax,%rdx,8)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/lh3[P]minigraph/gcmisc.c
// Function: mg_gchain_restore_order
void mg_gchain_restore_order(void *km, mg_gchains_t *gcs)
{
	int32_t i, n_a, n_lc;
	mg_llchain_t *lc;
	mg128_t *a;
	KMALLOC(km, lc, gcs->n_lc);
	KMALLOC(km, a, gcs->n_a);
	for (i = 0, n_a = n_lc = 0; i < gcs->n_gc; ++i) {
		mg_gchain_t *gc = &gcs->gc[i];
		assert(gc->cnt > 0);
		memcpy(&lc[n_lc], &gcs->lc[gc->off], gc->cnt * sizeof(mg_llchain_t));
		memcpy(&a[n_a], &gcs->a[gcs->lc[gc->off].off], gc->n_anchor * sizeof(mg128_t));
		n_lc += gc->cnt, n_a += gc->n_anchor;
	}
	memcpy(gcs->lc, lc, gcs->n_lc * sizeof(mg_llchain_t));
	memcpy(gcs->a, a, gcs->n_a * sizeof(mg128_t));
	kfree(km, lc); kfree(km, a);
	for (i = 0, n_lc = 0; i < gcs->n_gc; ++i) {
		mg_gchain_t *gc = &gcs->gc[i];
		gc->off = n_lc;
		n_lc += gc->cnt;
	}
	for (i = 0, n_a = 0; i < gcs->n_lc; ++i) {
		mg_llchain_t *lc = &gcs->lc[i];
		lc->off = n_a;
		n_a += lc->cnt;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movslq 0xc(%rsi), %rax
shlq $0x2, %rax
leaq (%rax,%rax,4), %rsi
callq 0x31c1
movq %rax, 0x8(%rsp)
movslq 0x10(%rbx), %rsi
shlq $0x4, %rsi
movq %r14, 0x10(%rsp)
movq %r14, %rdi
callq 0x31c1
movq %rax, (%rsp)
cmpl $0x0, 0x8(%rbx)
jle 0x1c26c
xorl %r13d, %r13d
movl $0x10, %ebp
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x18(%rbx), %r12
movslq -0x4(%r12,%rbp), %rax
testq %rax, %rax
jle 0x1c31a
movslq %r15d, %r15
leaq (%r15,%r15,4), %rcx
movq 0x8(%rsp), %rdx
leaq (%rdx,%rcx,4), %rdi
movslq -0x8(%r12,%rbp), %rcx
leaq (%rcx,%rcx,4), %rsi
shlq $0x2, %rsi
addq 0x20(%rbx), %rsi
shlq $0x2, %rax
leaq (%rax,%rax,4), %rdx
callq 0x2230
movslq %r14d, %r14
movq %r14, %rdi
shlq $0x4, %rdi
addq (%rsp), %rdi
movq 0x20(%rbx), %rax
movslq -0x8(%r12,%rbp), %rcx
leaq (%rcx,%rcx,4), %rcx
movslq (%rax,%rcx,4), %rsi
shlq $0x4, %rsi
addq 0x28(%rbx), %rsi
movslq (%r12,%rbp), %rdx
shlq $0x4, %rdx
callq 0x2230
addl -0x4(%r12,%rbp), %r15d
addl (%r12,%rbp), %r14d
incq %r13
movslq 0x8(%rbx), %rax
addq $0x68, %rbp
cmpq %rax, %r13
jl 0x1c1db
movq 0x20(%rbx), %rdi
movslq 0xc(%rbx), %rax
shlq $0x2, %rax
leaq (%rax,%rax,4), %rdx
movq 0x8(%rsp), %r15
movq %r15, %rsi
callq 0x2230
movq 0x28(%rbx), %rdi
movslq 0x10(%rbx), %rdx
shlq $0x4, %rdx
movq (%rsp), %r12
movq %r12, %rsi
callq 0x2230
movq 0x10(%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x30f6
movq %r14, %rdi
movq %r12, %rsi
callq 0x30f6
movslq 0x8(%rbx), %rcx
testq %rcx, %rcx
jle 0x1c2e2
movq 0x18(%rbx), %rax
imulq $0x68, %rcx, %rcx
xorl %edx, %edx
xorl %esi, %esi
movl %esi, 0x8(%rax,%rdx)
addl 0xc(%rax,%rdx), %esi
addq $0x68, %rdx
cmpq %rdx, %rcx
jne 0x1c2d1
movslq 0xc(%rbx), %rcx
testq %rcx, %rcx
jle 0x1c30b
movq 0x20(%rbx), %rax
shlq $0x2, %rcx
leaq (%rcx,%rcx,4), %rcx
xorl %edx, %edx
xorl %esi, %esi
movl %esi, (%rax,%rdx)
addl 0x4(%rax,%rdx), %esi
addq $0x14, %rdx
cmpq %rdx, %rcx
jne 0x1c2fb
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xd793(%rip), %rdi      # 0x29ab4
leaq 0xd798(%rip), %rsi      # 0x29ac0
leaq 0xd79a(%rip), %rcx      # 0x29ac9
movl $0x11, %edx
callq 0x2160
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movslq 0x8(%rdi), %rcx
testq %rcx, %rcx
jle 0x1c3c4
movq 0x18(%rdi), %rdx
xorl %esi, %esi
xorl %r9d, %r9d
xorl %eax, %eax
imulq $0x68, %rsi, %r10
movl %r9d, 0x8(%rdx,%r10)
movl $0x0, 0x10(%rdx,%r10)
movslq 0xc(%rdx,%r10), %r8
testq %r8, %r8
jle 0x1c3b4
addq %rdx, %r10
movq 0x20(%rdi), %rbx
movl 0x10(%r10), %r11d
movslq %r9d, %r14
leaq (%r14,%r14,4), %r14
leaq (%rbx,%r14,4), %rbx
addq $0x4, %rbx
leaq (,%r8,4), %r14
leaq (%r14,%r14,4), %r14
xorl %r15d, %r15d
movl %eax, -0x4(%rbx,%r15)
movl (%rbx,%r15), %ebp
addl %ebp, %eax
addl %ebp, %r11d
addq $0x14, %r15
cmpq %r15, %r14
jne 0x1c399
movl %r11d, 0x10(%r10)
addl %r9d, %r8d
incq %rsi
movl %r8d, %r9d
cmpq %rcx, %rsi
jne 0x1c354
jmp 0x1c3c9
xorl %eax, %eax
xorl %r8d, %r8d
cmpl 0xc(%rdi), %r8d
jne 0x1c3df
cmpl 0x10(%rdi), %eax
jne 0x1c3df
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0xd718(%rip), %rdi      # 0x29afe
leaq 0xd6d3(%rip), %rsi      # 0x29ac0
leaq 0xd72f(%rip), %rcx      # 0x29b23
movl $0x34, %edx
callq 0x2160
// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movslq 0x8(%rsi), %rsi
shlq $0x4, %rsi
callq 0x31c1
movq %rax, %r15
movslq 0x8(%rbx), %rax
imulq $0x68, %rax, %rsi
movq %r14, %rdi
callq 0x31c1
movq %rax, %r12
movslq 0x8(%rbx), %rsi
testq %rsi, %rsi
jle 0x1c46a
movq 0x18(%rbx), %rax
leaq 0x8(%r15), %rcx
addq $0x14, %rax
xorl %edx, %edx
movl (%rax), %edi
movl 0x24(%rax), %r8d
shlq $0x20, %rdi
orq %rdi, %r8
movq %r8, -0x8(%rcx)
movq %rdx, (%rcx)
incq %rdx
addq $0x10, %rcx
addq $0x68, %rax
cmpq %rdx, %rsi
jne 0x1c446
shlq $0x4, %rsi
addq %r15, %rsi
movq %r15, %rdi
callq 0xeec3
movslq 0x8(%rbx), %rcx
testq %rcx, %rcx
jle 0x1c4c4
leaq 0x1(%rcx), %rax
movl %ecx, %edx
negl %edx
shlq $0x4, %rcx
leaq (%rcx,%r15), %r8
addq $-0x8, %r8
movl 0x8(%rbx), %ecx
addl %edx, %ecx
imulq $0x68, (%r8), %rsi
movslq %ecx, %rcx
imulq $0x68, %rcx, %rdi
addq 0x18(%rbx), %rsi
addq %r12, %rdi
movl $0xd, %ecx
rep  movsq (%rsi), %es:(%rdi)
decq %rax
incl %edx
addq $-0x10, %r8
cmpq $0x1, %rax
jg 0x1c496
movq 0x18(%rbx), %rdi
movslq 0x8(%rbx), %rax
imulq $0x68, %rax, %rdx
movq %r12, %rsi
callq 0x2230
movq %r14, %rdi
movq %r15, %rsi
callq 0x30f6
movq %r14, %rdi
movq %r12, %rsi
callq 0x30f6
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1c180
// File: /workspace/github_c_makefile_star2_O1/lh3[P]minigraph/gcmisc.c
// Function: mg_gchain_flt_sub
int mg_gchain_flt_sub(float pri_ratio, int min_diff, int best_n, int n, mg_gchain_t *r)
{
	if (pri_ratio > 0.0f && n > 0) {
		int i, k, n_2nd = 0;
		for (i = k = 0; i < n; ++i) {
			int p = r[i].parent;
			if (p == i) { // primary
				r[i].flt = 0, ++k;
			} else if ((r[i].score >= r[p].score * pri_ratio || r[i].score + min_diff >= r[p].score) && n_2nd < best_n) {
				if (!(r[i].qs == r[p].qs && r[i].qe == r[p].qe && r[i].ps == r[p].ps && r[i].pe == r[p].pe)) // not identical hits; TODO: check path as well
					r[i].flt = 0, ++n_2nd, ++k;
				else r[i].flt = 1;
			} else r[i].flt = 1;
		}
		return k;
	}
	return n;
}

// Assembly:
movl %edx, %eax
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
setbe %dl
testl %eax, %eax
setle %r8b
orb %dl, %r8b
jne 0x1c8d8
pushq %rbp
pushq %r14
pushq %rbx
movl %eax, %edx
leaq 0x44(%rcx), %r8
xorl %r9d, %r9d
xorl %r10d, %r10d
xorl %eax, %eax
movl -0x40(%r8), %r11d
cmpq %r11, %r9
jne 0x1c845
andb $-0x2, 0x1(%r8)
jmp 0x1c8c2
movslq %r11d, %r11
movl -0x30(%r8), %ebx
xorps %xmm1, %xmm1
cvtsi2ss %ebx, %xmm1
imulq $0x68, %r11, %r11
movl 0x14(%rcx,%r11), %ebp
xorps %xmm2, %xmm2
cvtsi2ss %ebp, %xmm2
mulss %xmm0, %xmm2
ucomiss %xmm2, %xmm1
setae %r14b
addl %edi, %ebx
cmpl %ebp, %ebx
setge %bl
orb %r14b, %bl
cmpl %esi, %r10d
setl %bpl
andb %bl, %bpl
cmpb $0x1, %bpl
jne 0x1c8b3
addq %rcx, %r11
movl -0x2c(%r8), %ebx
cmpl 0x18(%r11), %ebx
jne 0x1c8ba
movl -0x28(%r8), %ebx
cmpl 0x1c(%r11), %ebx
jne 0x1c8ba
movl -0x20(%r8), %ebx
cmpl 0x24(%r11), %ebx
jne 0x1c8ba
movl -0x1c(%r8), %ebx
cmpl 0x28(%r11), %ebx
jne 0x1c8ba
orb $0x1, 0x1(%r8)
jmp 0x1c8c4
andb $-0x2, 0x1(%r8)
incl %r10d
incl %eax
incq %r9
addq $0x68, %r8
cmpq %r9, %rdx
jne 0x1c835
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/lh3[P]minigraph/map-algo.c
// Function: collect_long_gaps
static int *collect_long_gaps(void *km, int as1, int cnt1, mg128_t *a, int min_gap, int *n_)
{
	int i, n, *K;
	*n_ = 0;
	for (i = 1, n = 0; i < cnt1; ++i) { // count the number of gaps longer than min_gap
		int gap = ((int32_t)a[as1 + i].y - a[as1 + i - 1].y) - ((int32_t)a[as1 + i].x - a[as1 + i - 1].x);
		if (gap < -min_gap || gap > min_gap) ++n;
	}
	if (n <= 1) return 0;
	K = (int*)kmalloc(km, n * sizeof(int));
	for (i = 1, n = 0; i < cnt1; ++i) { // store the positions of long gaps
		int gap = ((int32_t)a[as1 + i].y - a[as1 + i - 1].y) - ((int32_t)a[as1 + i].x - a[as1 + i - 1].x);
		if (gap < -min_gap || gap > min_gap)
			K[n++] = i;
	}
	*n_ = n;
	return K;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbx
movl %r8d, %ebp
movq %rcx, %r14
movl %edx, %r15d
movl %esi, %r12d
movl $0x0, (%r9)
xorl %ecx, %ecx
cmpl $0x2, %edx
jl 0x1ec62
movl %ebp, %eax
negl %eax
movslq %r12d, %rdx
movl %r15d, %esi
shlq $0x4, %rdx
addq %r14, %rdx
shlq $0x4, %rsi
xorl %ecx, %ecx
movl $0x10, %r8d
movl -0x8(%rdx,%r8), %r9d
movl 0x8(%rdx,%r8), %r10d
addl (%rdx,%r8), %r9d
subl %r9d, %r10d
addl -0x10(%rdx,%r8), %r10d
cmpl %eax, %r10d
setl %r9b
cmpl %ebp, %r10d
setg %r10b
orb %r9b, %r10b
movzbl %r10b, %r9d
addl %r9d, %ecx
addq $0x10, %r8
cmpq %r8, %rsi
jne 0x1ec2b
xorl %r13d, %r13d
cmpl $0x2, %ecx
jge 0x1ec6e
xorl %eax, %eax
jmp 0x1ecda
movl %ecx, %esi
shlq $0x2, %rsi
callq 0x31c1
cmpl $0x2, %r15d
jl 0x1ecd7
movl %ebp, %ecx
negl %ecx
movslq %r12d, %rsi
movl %r15d, %edx
shlq $0x4, %rsi
addq %r14, %rsi
addq $0x18, %rsi
xorl %r13d, %r13d
movl $0x1, %edi
movl -0x10(%rsi), %r8d
movl (%rsi), %r9d
addl -0x8(%rsi), %r8d
subl %r8d, %r9d
addl -0x18(%rsi), %r9d
cmpl %ecx, %r9d
setge %r8b
cmpl %ebp, %r9d
setle %r9b
testb %r9b, %r8b
jne 0x1eccb
movslq %r13d, %r8
incl %r13d
movl %edi, (%rax,%r8,4)
incq %rdi
addq $0x10, %rsi
cmpq %rdi, %rdx
jne 0x1ec9c
movl %r13d, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
testl %esi, %esi
jle 0x20eec
movl %r8d, %ebp
movq %rdx, %r14
movq %rdi, 0x8(%rsp)
movq %r9, 0x10(%rsp)
movq %rcx, 0x18(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x20(%rsp)
movl %esi, 0x30(%rsp)
movl %esi, %r12d
movl $0x8, %esi
movq %r12, %rdi
callq 0x21e0
movq %rax, %r13
xorl %ebx, %ebx
movq (%r14,%rbx,8), %rdi
callq 0xf080
movq %rax, (%r13,%rbx,8)
testq %rax, %rax
je 0x20dfb
incq %rbx
cmpq %rbx, %r12
jne 0x20dde
jmp 0x20e30
leaq 0x115fe(%rip), %rax     # 0x32400
cmpl $0x0, (%rax)
jg 0x20efe
testq %rbx, %rbx
je 0x20e25
xorl %r14d, %r14d
movq (%r13,%r14,8), %rdi
callq 0xf13e
incq %r14
cmpq %r14, %rbx
jne 0x20e13
movq %r13, %rdi
callq 0x2040
xorl %r13d, %r13d
movq %r13, 0x40(%rsp)
testq %r13, %r13
je 0x20eec
movq 0x18(%rsp), %rcx
movq %rcx, 0x38(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x48(%rsp)
cmpl $0x2, %ebp
movl $0x1, %edi
movl $0x1, %eax
cmovgel %ebp, %eax
movl %eax, 0x2c(%rsp)
movq 0x8(%rcx), %rax
movq %rax, 0x20(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, 0x68(%rsp)
cmpl $0x1, %ebp
je 0x20e9a
movb 0x2(%rcx), %al
andb $0x8, %al
cmpb $0x1, %al
movl $0x3, %edi
sbbl $0x0, %edi
leaq 0x7e(%rip), %rsi        # 0x20f1f
leaq 0x20(%rsp), %rbx
movq %rbx, %rdx
movl $0x3, %ecx
callq 0x364c
movq 0x38(%rbx), %rdi
callq 0x2040
cmpl $0x0, 0x10(%rbx)
jle 0x20edf
xorl %ebx, %ebx
movq 0x40(%rsp), %rax
movq (%rax,%rbx,8), %rdi
callq 0xf13e
incq %rbx
movslq 0x30(%rsp), %rax
cmpq %rax, %rbx
jl 0x20ec4
movq 0x40(%rsp), %rdi
callq 0x2040
xorl %r15d, %r15d
movl %r15d, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x110f3(%rip), %rax     # 0x31ff8
movq (%rax), %rdi
movq (%r14,%rbx,8), %rdx
leaq 0x9087(%rip), %rsi      # 0x29f9a
xorl %eax, %eax
callq 0x2210
jmp 0x20e0b
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movl %r9d, %ebp
movq %rcx, %rbx
movq %rdx, %r15
movl %esi, 0x14(%rsp)
movq %rdi, %r13
leaq 0x20(%rsp), %r14
movl $0xa8, %edx
movq %r14, %rdi
movq %r8, %rsi
callq 0x2230
movq %r13, %rdi
movq %rbx, %rsi
movl %ebp, %edx
movq %r14, %rcx
callq 0x159ae
testq %rax, %rax
je 0x21598
movq %rax, %r14
testb $0x40, 0x21(%rsp)
movq %r13, 0x18(%rsp)
jne 0x215a2
xorl %r12d, %r12d
xorl %r13d, %r13d
jmp 0x215c8
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x21664
movl 0x4(%r13), %esi
movl $0x8, %edx
xorl %edi, %edi
callq 0x3054
movq %rax, %r12
movq 0x40(%r13), %rsi
movl $0x8, %edx
xorl %edi, %edi
callq 0x3054
movq %rax, %r13
movl 0x14(%rsp), %esi
testb $0x40, 0x20(%rsp)
jne 0x2160b
xorl %ebx, %ebx
testl %esi, %esi
jle 0x2162e
movl %esi, %ebx
movq %r13, (%rsp)
movq %r14, %rdi
movl $0x1, %esi
movq %r15, %rdx
leaq 0x20(%rsp), %rcx
movl %ebp, %r8d
movq %r12, %r9
callq 0x20d78
testl %eax, %eax
jne 0x21629
addq $0x8, %r15
decq %rbx
jne 0x215db
xorl %ebx, %ebx
jmp 0x2162e
movq %r13, (%rsp)
leaq 0x20(%rsp), %rcx
movq %r14, %rdi
movq %r15, %rdx
movl %ebp, %r8d
movq %r12, %r9
callq 0x20d78
movl %eax, %ebx
jmp 0x2162e
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testb $0x40, 0x21(%rsp)
je 0x2165c
leaq 0x895b(%rip), %rsi      # 0x29f97
movq 0x18(%rsp), %rdi
movq %r12, %rdx
movq %r13, %rcx
callq 0x6595
movq %r12, %rdi
callq 0x2040
movq %r13, %rdi
callq 0x2040
movq %r14, %rdi
callq 0x15049
movl %ebx, %eax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %r9, 0x8(%rsp)
movq %rcx, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movl %esi, %ebx
movq %rdi, %r13
leaq 0x30(%rsp), %rdi
movl $0xa8, %edx
movq %r8, 0x18(%rsp)
movq %r8, %rsi
callq 0x2230
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testq %r13, %r13
je 0x24997
testl %ebx, %ebx
jle 0x2498e
movl 0x110(%rsp), %r15d
movl %ebx, %eax
movq %rax, 0x10(%rsp)
xorl %ebp, %ebp
leaq 0x30(%rsp), %rbx
movq %r13, %rdi
movq 0x28(%rsp), %rsi
movl %r15d, %edx
movq %rbx, %rcx
callq 0x159ae
testq %rax, %rax
je 0x24992
movq %rax, %r12
movq 0x20(%rsp), %rax
movq (%rax,%rbp,8), %rdx
movq %r12, %rdi
movq %rbx, %rsi
movl %r15d, %r14d
movl %r15d, %ecx
callq 0x249a9
movq 0x18(%rsp), %rcx
testb $0x4, 0x3(%rcx)
movq %rax, %r15
movl (%rax), %ecx
movq 0x8(%rax), %r8
movq 0x10(%rax), %r9
jne 0x2495e
xorl %edi, %edi
movq 0x8(%rsp), %rsi
movq %r13, %rdx
callq 0x21f64
jmp 0x2496d
xorl %edi, %edi
movq 0x8(%rsp), %rsi
movq %r13, %rdx
callq 0x233b6
movq %r15, %rdi
callq 0x24b42
movq %r12, %rdi
callq 0x15049
incq %rbp
cmpq %rbp, 0x10(%rsp)
movl %r14d, %r15d
jne 0x24900
xorl %eax, %eax
jmp 0x24997
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/lh3[P]minigraph/ggen.c
// Function: ggen_map
static maprst_t *ggen_map(const mg_idx_t *gi, const mg_mapopt_t *opt, const char *fn, int n_threads)
{
	mg_bseq_file_t *fp;
	maprst_t *r;
	step_t s;
	int i;

	fp = mg_bseq_open(fn);
	if (fp == 0) return 0;

	KCALLOC(0, r, 1);
	r->seq = mg_bseq_read(fp, 1ULL<<62, 0, 0, 0, &r->n_seq);
	mg_bseq_close(fp);
	if (mg_verbose >= 3)
		fprintf(stderr, "[M::%s::%.3f*%.2f] loaded file \"%s\"\n", __func__,
				realtime() - mg_realtime0, cputime() / (realtime() - mg_realtime0), fn);
	for (i = 0; i < r->n_seq; ++i) {
		r->seq[i].rid = i;
		mg_toupper(r->seq[i].l_seq, r->seq[i].seq);
	}
	KCALLOC(0, r->gcs, r->n_seq);

	s.gi = gi, s.opt = opt, s.r = r;
	KCALLOC(0, s.buf, n_threads);
	for (i = 0; i < n_threads; ++i) s.buf[i] = mg_tbuf_init();
	kt_for(n_threads, worker_for, &s, r->n_seq);
	if (mg_verbose >= 3)
		fprintf(stderr, "[M::%s::%.3f*%.2f] mapped %d sequence(s) to the graph\n", __func__,
				realtime() - mg_realtime0, cputime() / (realtime() - mg_realtime0), r->n_seq);
	for (i = 0; i < n_threads; ++i) mg_tbuf_destroy(s.buf[i]);
	free(s.buf);
	return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %ecx, %ebp
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %r15
movq %rdx, %rdi
callq 0xf080
testq %rax, %rax
je 0x24b17
movq %rax, %r13
movl $0x1, %esi
movl $0x18, %edx
xorl %edi, %edi
callq 0x3054
movq %rax, %rbx
movabsq $0x4000000000000000, %rsi # imm = 0x4000000000000000
movq %r13, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %rax, %r9
callq 0xf1aa
movq %rax, 0x8(%rbx)
movq %r13, %rdi
callq 0xf13e
leaq 0xd9e7(%rip), %r13      # 0x32400
cmpl $0x3, (%r13)
jge 0x24b2b
movl (%rbx), %ecx
testl %ecx, %ecx
jle 0x24a77
xorl %eax, %eax
movq 0x8(%rbx), %rdx
leaq (%rax,%rax,4), %rsi
movl %eax, 0x4(%rdx,%rsi,8)
movslq (%rdx,%rsi,8), %rcx
testq %rcx, %rcx
jle 0x24a6c
movq 0x10(%rdx,%rsi,8), %rdx
xorl %esi, %esi
movzbl (%rdx,%rsi), %edi
leal -0x7b(%rdi), %r8d
leal -0x20(%rdi), %r9d
cmpb $-0x1a, %r8b
movzbl %r9b, %r8d
cmovbl %edi, %r8d
movb %r8b, (%rdx,%rsi)
incq %rsi
cmpq %rsi, %rcx
jne 0x24a48
incq %rax
movslq (%rbx), %rcx
cmpq %rcx, %rax
jl 0x24a2c
movslq %ecx, %rsi
movl $0x8, %edx
xorl %edi, %edi
callq 0x3054
movq %rax, 0x10(%rbx)
movq %r15, 0x10(%rsp)
movq %r14, 0x8(%rsp)
movq %rbx, 0x20(%rsp)
movslq %ebp, %r14
movl $0x8, %edx
xorl %edi, %edi
movq %r14, %rsi
callq 0x3054
movq %rax, 0x18(%rsp)
movl %ebp, %r15d
testl %r14d, %r14d
jle 0x24ad1
xorl %r14d, %r14d
callq 0x1cd9c
movq 0x18(%rsp), %rcx
movq %rax, (%rcx,%r14,8)
incq %r14
cmpq %r14, %r15
jne 0x24abb
movslq (%rbx), %rcx
leaq 0x5bf(%rip), %rsi       # 0x2509a
leaq 0x8(%rsp), %rdx
movl %ebp, %edi
callq 0x347c
cmpl $0x3, (%r13)
jge 0x24b38
testl %ebp, %ebp
jle 0x24b0b
xorl %r14d, %r14d
movq 0x18(%rsp), %rax
movq (%rax,%r14,8), %rdi
callq 0x1cdc8
incq %r14
cmpq %r14, %r15
jne 0x24af5
movq 0x18(%rsp), %rdi
callq 0x2040
jmp 0x24b19
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r12, %rdi
callq 0x2a72
jmp 0x24a24
movq %rbx, %rdi
callq 0x2ae6
jmp 0x24aee
// File: /workspace/github_c_makefile_star2_O1/lh3[P]minigraph/ggen.c
// Function: mg_free_maprst
static void mg_free_maprst(maprst_t *r)
{
	int i;
	for (i = 0; i < r->n_seq; ++i) {
		mg_gchain_free(r->gcs[i]);
		free(r->seq[i].seq); free(r->seq[i].name);
	}
	free(r->gcs); free(r->seq);
	free(r);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpl $0x0, (%rdi)
jle 0x24b8d
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x10(%rbx), %rax
movq (%rax,%r15,8), %rdi
callq 0x1ac72
movq 0x8(%rbx), %rax
movq 0x10(%rax,%r14), %rdi
callq 0x2040
movq 0x8(%rbx), %rax
movq 0x8(%rax,%r14), %rdi
callq 0x2040
incq %r15
movslq (%rbx), %rax
addq $0x28, %r14
cmpq %rax, %r15
jl 0x24b55
movq 0x10(%rbx), %rdi
callq 0x2040
movq 0x8(%rbx), %rdi
callq 0x2040
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2040
// File: /workspace/github_c_makefile_star2_O1/lh3[P]minigraph/ggen.c
// Function: mg_ggen_cov
int mg_ggen_cov(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)
{
	int32_t i;
	mg_mapopt_t opt = *opt0;
	mg_idx_t *gi;
	double *cov_seg, *cov_link;
	int64_t j;
	if ((gi = mg_index(g, ipt, n_threads, &opt)) == 0) return -1;
	KCALLOC(0, cov_seg,  g->n_seg);
	KCALLOC(0, cov_link, g->n_arc);
	for (i = 0; i < n_fn; ++i) {
		maprst_t *r;
		r = ggen_map(gi, &opt, fn[i], n_threads);
		mg_cov_asm(g, r->n_seq, r->gcs, go->min_mapq, go->min_map_len, cov_seg, cov_link);
		mg_free_maprst(r);
	}
	mg_idx_destroy(gi);
	for (j = 0; j < g->n_seg; ++j) cov_seg[j] /= n_fn;
	for (j = 0; j < g->n_arc; ++j) cov_link[j] /= n_fn;
	gfa_aux_update_cv(g, "cf", cov_seg, cov_link);
	free(cov_seg); free(cov_link);
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %r9, %r12
movq %rcx, %rbx
movq %rdx, 0x30(%rsp)
movl %esi, %ebp
movq %rdi, %r13
movl 0x120(%rsp), %r15d
leaq 0x40(%rsp), %r14
movl $0xa8, %edx
movq %r14, %rdi
movq %r8, %rsi
callq 0x2230
movq %r13, %rdi
movq %rbx, %rsi
movl %r15d, %ebx
movl %r15d, %edx
movq %r14, %rcx
callq 0x159ae
testq %rax, %rax
je 0x24d2e
movl 0x4(%r13), %esi
movl $0x8, %edx
movq %rax, 0x28(%rsp)
xorl %edi, %edi
callq 0x3054
movq %rax, 0x18(%rsp)
movq 0x40(%r13), %rsi
movl $0x8, %edx
xorl %edi, %edi
callq 0x3054
movq 0x30(%rsp), %rcx
movq %rax, %r15
movl %ebp, 0x14(%rsp)
testl %ebp, %ebp
movq %r13, 0x20(%rsp)
jle 0x24cab
movq %r12, %r14
movl 0x14(%rsp), %eax
movq %rax, 0x38(%rsp)
xorl %ebp, %ebp
movq (%rcx,%rbp,8), %rdx
movq 0x28(%rsp), %rdi
leaq 0x40(%rsp), %rsi
movq %rcx, %r12
movl %ebx, %ecx
callq 0x249a9
movl %ebx, %r13d
movq %rax, %rbx
movl (%rax), %esi
movq 0x10(%rax), %rdx
movl 0xc(%r14), %ecx
movl 0x10(%r14), %r8d
movq %r15, (%rsp)
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %r9
callq 0x1f1a3
movq %rbx, %rdi
movl %r13d, %ebx
callq 0x24b42
movq %r12, %rcx
incq %rbp
cmpq %rbp, 0x38(%rsp)
jne 0x24c54
movq 0x28(%rsp), %rdi
callq 0x15049
movq 0x20(%rsp), %rdi
movl 0x4(%rdi), %eax
cvtsi2sdl 0x14(%rsp), %xmm0
testq %rax, %rax
movq 0x18(%rsp), %rbx
je 0x24ce5
xorl %ecx, %ecx
movsd (%rbx,%rcx,8), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, (%rbx,%rcx,8)
incq %rcx
cmpq %rcx, %rax
jne 0x24ccf
movq 0x40(%rdi), %rax
testq %rax, %rax
je 0x24d08
xorl %ecx, %ecx
movsd (%r15,%rcx,8), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, (%r15,%rcx,8)
incq %rcx
cmpq %rcx, %rax
jne 0x24cf0
leaq 0x5894(%rip), %rsi      # 0x2a5a3
movq %rbx, %rdx
movq %r15, %rcx
callq 0x6595
movq %rbx, %rdi
callq 0x2040
movq %r15, %rdi
callq 0x2040
xorl %eax, %eax
jmp 0x24d33
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/lh3[P]minigraph/ggen.c
// Function: mg_ggen_call
int mg_ggen_call(gfa_t *g, const char *fn, const mg_idxopt_t *ipt, const mg_mapopt_t *opt0, const mg_ggopt_t *go, int n_threads)
{
	mg_mapopt_t opt = *opt0;
	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, n_threads);
	mg_call_asm(g, r->n_seq, r->seq, r->gcs, go->min_mapq, go->min_map_len);
	mg_free_maprst(r);
	mg_idx_destroy(gi);
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movl %r9d, %ebp
movq %r8, %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
movq %rsp, %r13
movl $0xa8, %edx
movq %r13, %rdi
movq %rcx, %rsi
callq 0x2230
movq %r14, %rdi
movq %r15, %rsi
movl %ebp, %edx
movq %r13, %rcx
callq 0x159ae
testq %rax, %rax
je 0x24dd1
movq %rax, %r15
movq %rsp, %rsi
movq %rax, %rdi
movq %r12, %rdx
movl %ebp, %ecx
callq 0x249a9
movq %rax, %r12
movl (%rax), %esi
movq 0x8(%rax), %rdx
movq 0x10(%rax), %rcx
movl 0xc(%rbx), %r8d
movl 0x10(%rbx), %r9d
movq %r14, %rdi
callq 0x2514c
movq %r12, %rdi
callq 0x24b42
movq %r15, %rdi
callq 0x15049
xorl %eax, %eax
jmp 0x24dd6
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/lh3[P]minigraph/ggen.c
// Function: worker_for
static void worker_for(void *_data, long i, int tid) // kt_for() callback
{
    step_t *s = (step_t*)_data;
	if (mg_dbg_flag & MG_DBG_QNAME)
		fprintf(stderr, "QR\t%s\t%d\t%d\n", s->r->seq[i].name, tid, s->r->seq[i].l_seq);
	if ((s->opt->flag & MG_M_SKIP_GCHECK) == 0 && mg_verbose >= 2) {
		if (gfa_sseq_get(s->gi->g, s->r->seq[i].name) >= 0)
			fprintf(stderr, "[W::%s] stable sequence \"%s\" already present in the graph. This will lead to inconsistent rGFA.\n",
					__func__, s->r->seq[i].name);
	}
	s->r->gcs[i] = mg_map(s->gi, s->r->seq[i].l_seq, s->r->seq[i].seq, s->buf[tid], s->opt, s->r->seq[i].name);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xd5cb(%rip), %rax      # 0x32678
testb $0x2, (%rax)
jne 0x2512a
movq (%r14), %rax
testb $0x2, 0x3(%rax)
jne 0x250e8
leaq 0xd33e(%rip), %rax      # 0x32400
cmpl $0x2, (%rax)
jl 0x250e8
movq 0x8(%r14), %rax
movq 0x18(%r14), %rcx
movq (%rax), %rdi
movq 0x8(%rcx), %rax
leaq (%rbx,%rbx,4), %rcx
movq 0x8(%rax,%rcx,8), %rsi
callq 0x516e
testl %eax, %eax
jns 0x2513c
movq (%r14), %r8
movq 0x8(%r14), %rdi
movq 0x18(%r14), %rax
movq 0x8(%rax), %rax
leaq (%rbx,%rbx,4), %r9
movl (%rax,%r9,8), %esi
movq 0x10(%rax,%r9,8), %rdx
movq 0x10(%r14), %rcx
movslq %ebp, %r10
movq (%rcx,%r10,8), %rcx
movq 0x8(%rax,%r9,8), %r9
callq 0x1e97c
movq 0x18(%r14), %rcx
movq 0x10(%rcx), %rcx
movq %rax, (%rcx,%rbx,8)
popq %rbx
popq %r14
popq %rbp
retq
movq %r14, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0x2b5a
jmp 0x250b2
leaq 0x18(%r14), %rdi
movq %rbx, %rsi
callq 0x2b8c
jmp 0x250e8
nop
// File: /workspace/github_c_makefile_star2_O1/kopytjuk[P]wasm-image-converter/src/converter.cpp
// Function: resolveImageType(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
ImageType resolveImageType(const string ext){
  if (ext == ".jpg" | ext==".jpeg"){
    return JpegImage;
  } else if (ext == ".png"){
    return PngImage;
  } else {
    return UnknownImage;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x8cfb(%rip), %rsi      # 0xe18c
callq 0x41a0
movl %eax, %r14d
leaq 0x8cf1(%rip), %rsi      # 0xe191
movq %rbx, %rdi
callq 0x41a0
movl %eax, %ecx
movl $0x1, %eax
testl %r14d, %r14d
je 0x54d2
testl %ecx, %ecx
je 0x54d2
leaq 0x8cd8(%rip), %rsi      # 0xe197
movq %rbx, %rdi
callq 0x41a0
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
setne %al
addl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/kopytjuk[P]wasm-image-converter/src/converter.cpp
// Function: convert_image(char**, int&, ImageType, char**, int&, ImageType)
void convert_image(char** inp, int& insize, ImageType intype, char** outp, 
  int& outsize, ImageType outtype){

  cout << "Decoding image..." << endl;

  cout << "First 10 bytes: ";
  utils::print_first_bytes(*inp, 10);

  rgb8_image_t imageData;

  char_array_to_image(inp, insize, imageData, intype);

  cout << "Image decoded! Encoding..." << endl;
  
  image_to_char_array(imageData, outtype, outp, outsize);

  cout << "Image encoded to desired format!" << endl;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %r9d, -0x2c(%rbp)
movq %r8, -0x38(%rbp)
movq %rcx, %r15
movl %edx, %r12d
movq %rsi, %rbx
movq %rdi, %r13
movq 0xead5(%rip), %r14      # 0x13fd8
leaq 0x8c92(%rip), %rsi      # 0xe19c
movl $0x11, %edx
movq %r14, %rdi
callq 0x45a0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x44f0
movsbl %al, %esi
movq %r14, %rdi
callq 0x4060
movq %rax, %rdi
callq 0x43b0
leaq 0x8c69(%rip), %rsi      # 0xe1ae
movl $0x10, %edx
movq %r14, %rdi
callq 0x45a0
movq (%r13), %rdi
movl $0xa, %esi
callq 0xdb0d
xorl %eax, %eax
leaq -0x80(%rbp), %rdx
movq %rax, 0x10(%rdx)
xorps %xmm0, %xmm0
movaps %xmm0, (%rdx)
movq $0x3, 0x18(%rdx)
movq %rax, 0x38(%rdx)
movaps %xmm0, 0x20(%rdx)
movl (%rbx), %esi
movq %r13, %rdi
movl %r12d, %ecx
callq 0x5658
movq 0xea44(%rip), %rbx      # 0x13fd8
leaq 0x8c24(%rip), %rsi      # 0xe1bf
movl $0x1a, %edx
movq %rbx, %rdi
callq 0x45a0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x44f0
movsbl %al, %esi
movq 0xea12(%rip), %rdi      # 0x13fd8
callq 0x4060
movq %rax, %rdi
callq 0x43b0
leaq -0x80(%rbp), %rdi
movl -0x2c(%rbp), %esi
movq %r15, %rdx
movq -0x38(%rbp), %rcx
callq 0x5786
movq 0xe9eb(%rip), %rbx      # 0x13fd8
leaq 0x8be6(%rip), %rsi      # 0xe1da
movl $0x20, %edx
movq %rbx, %rdi
callq 0x45a0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x44f0
movsbl %al, %esi
movq 0xe9b9(%rip), %rdi      # 0x13fd8
callq 0x4060
movq %rax, %rdi
callq 0x43b0
leaq -0x80(%rbp), %rdi
callq 0x5aa4
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x80(%rbp), %rdi
callq 0x5aa4
movq %rbx, %rdi
callq 0x48b0
// File: /workspace/github_c_makefile_star2_O1/kopytjuk[P]wasm-image-converter/src/converter.cpp
// Function: char_array_to_image(char**, int, boost::gil::image<boost::gil::pixel<unsigned char, boost::gil::layout<boost::mp11::mp_list<boost::gil::red_t, boost::gil::green_t, boost::gil::blue_t>, boost::mp11::mp_list<std::integral_constant<int, 0>, std::integral_constant<int, 1>, std::integral_constant<int, 2>>>>, false, std::allocator<unsigned char>>&, ImageType)
void char_array_to_image(char **arr, int arr_size, rgb8_image_t &img, ImageType type) {
  
  stringstream arr_stream(ios_base::in | ios_base::out | ios_base::binary);
  arr_stream.write(*arr, arr_size);
  arr_stream.seekg(0);

  switch (type) {
    case JpegImage:
      read_image( arr_stream, img, jpeg_tag() );
      break;
    case PngImage:
      read_image( arr_stream, img, png_tag() );
      break;
    default:
      cout << "Cannot convert input image type! Exiting." << endl;
      break;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x190, %rsp            # imm = 0x190
movl %ecx, %r14d
movq %rdx, %rbx
movl %esi, %r15d
movq %rdi, %r12
leaq -0x1b0(%rbp), %rdi
movl $0x1c, %esi
callq 0x4400
leaq -0x1a0(%rbp), %rdi
movq (%r12), %rsi
movslq %r15d, %rdx
callq 0x4600
leaq -0x1b0(%rbp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x45f0
testl %r14d, %r14d
je 0x56cc
cmpl $0x1, %r14d
jne 0x56e3
leaq -0x1b0(%rbp), %rdi
leaq -0x21(%rbp), %rdx
movq %rbx, %rsi
xorl %ecx, %ecx
callq 0x5b0c
jmp 0x5729
leaq -0x1b0(%rbp), %rdi
leaq -0x21(%rbp), %rdx
movq %rbx, %rsi
xorl %ecx, %ecx
callq 0x5c59
jmp 0x5729
movq 0xe8ee(%rip), %rbx      # 0x13fd8
leaq 0x8b0a(%rip), %rsi      # 0xe1fb
movl $0x29, %edx
movq %rbx, %rdi
callq 0x45a0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x44f0
movsbl %al, %esi
movq 0xe8bc(%rip), %rdi      # 0x13fd8
callq 0x4060
movq %rax, %rdi
callq 0x43b0
movq 0xe870(%rip), %rsi      # 0x13fa0
leaq -0x1b0(%rbp), %rdi
callq 0x43e0
leaq -0x130(%rbp), %rdi
callq 0x4210
addq $0x190, %rsp            # imm = 0x190
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x575c
jmp 0x575c
movq %rax, %rbx
movq 0xe83a(%rip), %rsi      # 0x13fa0
leaq -0x1b0(%rbp), %rdi
callq 0x43e0
leaq -0x130(%rbp), %rdi
callq 0x4210
movq %rbx, %rdi
callq 0x48b0