LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/lh3[P]fermi2/diff.c
// Function: collect_tips
static void collect_tips(const rld_t *e, int min_k, int min_occ, uint64_t *sub, const rldintv_t *_ik, rldintv_v *stack)
{
	stack->n = 0;
	kv_push(rldintv_t, *stack, *_ik);
	while (stack->n) {
		uint64_t k, *p, x;
		rldintv_t ik, ok[6];
		int c;
		ik = kv_pop(*stack);
		if (ik.info <= min_k && ik.x[2] < min_occ) continue;
		rld_extend(e, &ik, ok, 1);
		if (ok[0].x[2] && ik.info >= min_k) {
			for (k = 0; k < ok[0].x[2]; ++k) {
				x = k + ok[0].x[0];
				p = sub + (x>>6);
				x = 1ULL<<(x&0x3f);
				__sync_or_and_fetch(p, x);
			}
		}
		for (c = 1; c <= 4; ++c)
			if (ok[c].x[2]) {
				ok[c].info = ik.info + 1;
				kv_push(rldintv_t, *stack, ok[c]);
			}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %r9, %rbx
movq %r8, %r12
movq %rcx, %r14
movl %edx, %ebp
andq $0x0, (%r9)
movl %esi, %r13d
movq %rdi, 0x10(%rsp)
cmpq $0x0, 0x8(%r9)
je 0x44ec
movq 0x10(%rbx), %rax
xorl %ecx, %ecx
jmp 0x4507
movq $0x2, 0x8(%rbx)
movq 0x10(%rbx), %rdi
pushq $0x40
popq %rsi
callq 0x2260
movq %rax, 0x10(%rbx)
movq (%rbx), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, (%rbx)
shlq $0x5, %rcx
movups (%r12), %xmm0
movups 0x10(%r12), %xmm1
movups %xmm1, 0x10(%rax,%rcx)
movups %xmm0, (%rax,%rcx)
movslq %r13d, %rax
movq %rax, 0x8(%rsp)
movslq %ebp, %rax
movq %rax, 0x18(%rsp)
leaq 0x78(%rsp), %rbp
pushq $0x2
popq %r15
pushq $0x1
popq %r13
movq (%rbx), %rax
testq %rax, %rax
je 0x465d
movq 0x10(%rbx), %rcx
decq %rax
movq %rax, (%rbx)
shlq $0x5, %rax
movups (%rcx,%rax), %xmm0
movups 0x10(%rcx,%rax), %xmm1
movaps %xmm1, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movq 0x8(%rsp), %rax
cmpq %rax, 0x38(%rsp)
ja 0x4588
movq 0x18(%rsp), %rax
cmpq %rax, 0x30(%rsp)
jb 0x4543
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rsi
leaq 0x40(%rsp), %rdx
pushq $0x1
popq %rcx
callq 0x39db
movq 0x50(%rsp), %rcx
testq %rcx, %rcx
je 0x45e0
movq 0x8(%rsp), %rax
cmpq %rax, 0x38(%rsp)
jb 0x45e0
xorl %eax, %eax
cmpq %rcx, %rax
jae 0x45e0
movq 0x40(%rsp), %rcx
addq %rax, %rcx
movq %rcx, %rdx
movq %r13, %rsi
shlq %cl, %rsi
shrq $0x6, %rdx
lock
orq %rsi, (%r14,%rdx,8)
incq %rax
movq 0x50(%rsp), %rcx
jmp 0x45b7
xorl %r12d, %r12d
cmpq $0x80, %r12
je 0x4543
cmpq $0x0, 0x70(%rsp,%r12)
je 0x4657
movq 0x38(%rsp), %rax
incq %rax
movq %rax, 0x78(%rsp,%r12)
movq (%rbx), %rcx
movq 0x10(%rbx), %rax
cmpq 0x8(%rbx), %rcx
jne 0x4634
leaq (%rcx,%rcx), %rsi
testq %rcx, %rcx
cmoveq %r15, %rsi
movq %rsi, 0x8(%rbx)
shlq $0x5, %rsi
movq %rax, %rdi
callq 0x2260
movq %rax, 0x10(%rbx)
movq (%rbx), %rcx
leaq (%r12,%rbp), %rdx
addq $-0x18, %rdx
leaq 0x1(%rcx), %rsi
movq %rsi, (%rbx)
shlq $0x5, %rcx
movups (%rdx), %xmm0
movups 0x10(%rdx), %xmm1
movups %xmm1, 0x10(%rax,%rcx)
movups %xmm0, (%rax,%rcx)
addq $0x20, %r12
jmp 0x45e3
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/lh3[P]fermi2/sub.c
// Function: worker
static void worker(void *data, long i, int tid)
{
	shared_t *d = (shared_t*)data;
	int64_t x;
	x = set_bits(d->e, d->sub, d->bits, i, d->n_threads, d->is_both);
	__sync_fetch_and_add(&d->n_ss, x);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq (%rdi), %r14
movq 0x8(%rdi), %r13
movq 0x10(%rdi), %r15
movslq 0x20(%rdi), %rbp
movq %rdi, 0x10(%rsp)
movl 0x24(%rdi), %ebx
movslq %esi, %r12
movq $0x0, 0x8(%rsp)
movq 0x28(%r14), %rax
cmpq 0x8(%rax), %r12
jae 0x4a1c
movq %r12, %rax
shrq $0x6, %rax
movq (%r13,%rax,8), %rax
btq %r12, %rax
jae 0x4a17
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x4bcc
testl %ebx, %ebx
je 0x4a17
movq %rax, %rcx
shrq $0x6, %rcx
movq (%r13,%rcx,8), %rcx
btq %rax, %rcx
jb 0x4a17
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x4bcc
incq 0x8(%rsp)
addq %rbp, %r12
jmp 0x49c4
movq 0x10(%rsp), %rax
movq 0x8(%rsp), %rcx
lock
addq %rcx, 0x18(%rax)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/lh3[P]fermi2/sub.c
// Function: main_sub
int main_sub(int argc, char *argv[])
{
	int c, is_comp = 0, is_both = 1, n_threads = 1;
	rld_t *e;
	uint64_t n_seqs, *sub;
	FILE *fp;

	while ((c = getopt(argc, argv, "sct:")) >= 0) {
		if (c == 'c') is_comp = 1;
		else if (c == 's') is_both = 0;
		else if (c == 't') n_threads = atoi(optarg);
	}
	if (optind + 2 > argc) {
		fprintf(stderr, "Usage: fermi2 sub [-cs] [-t nThreads=1] <reads.rld> <bits.bin>\n");
		return 1;
	}
	e = rld_restore(argv[optind]);
	fp = fopen(argv[optind+1], "rb");
	fread(&n_seqs, 8, 1, fp);
	if (n_seqs != e->mcnt[1]) {
		fprintf(stderr, "[E::%s] unmatched index and the bit array\n", __func__);
		rld_destroy(e);
		return 1;
	}
	sub = malloc((n_seqs + 63) / 64 * 8);
	fread(sub, 8, (n_seqs + 63) / 64, fp);
	fclose(fp);
	e = fm_sub(e, sub, n_threads, is_comp, is_both);
	free(sub);
	rld_dump(e, "-");
	rld_destroy(e);
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r15
movl %edi, %r12d
movl $0x0, 0xc(%rsp)
pushq $0x1
popq %rbx
leaq 0x1488b(%rip), %r13     # 0x192eb
movl %ebx, %ebp
movl %ebx, %r14d
movl %r12d, %edi
movq %r15, %rsi
movq %r13, %rdx
callq 0x22f0
testl %eax, %eax
js 0x4aa4
cmpl $0x63, %eax
je 0x4a8a
cmpl $0x74, %eax
je 0x4a90
cmpl $0x73, %eax
jne 0x4a65
xorl %ebp, %ebp
jmp 0x4a65
movl %ebx, 0xc(%rsp)
jmp 0x4a65
movq 0x1d541(%rip), %rax     # 0x21fd8
movq (%rax), %rdi
callq 0x2300
movl %eax, %r14d
jmp 0x4a65
movq 0x1d525(%rip), %rbx     # 0x21fd0
movslq (%rbx), %rax
leal 0x2(%rax), %ecx
cmpl %r12d, %ecx
jg 0x4b82
movq (%r15,%rax,8), %rdi
callq 0x2f1e
movq %rax, %r12
movslq (%rbx), %rax
movq 0x8(%r15,%rax,8), %rdi
leaq 0x1458c(%rip), %rsi     # 0x19061
callq 0x22d0
movq %rax, %r15
leaq 0x10(%rsp), %r13
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
movq %r13, %rdi
movq %rax, %rcx
callq 0x2090
movq (%r13), %r13
movq 0x28(%r12), %rax
cmpq 0x8(%rax), %r13
jne 0x4ba0
addq $0x3f, %r13
movq %r13, %rdi
shrq $0x3, %rdi
andq $-0x8, %rdi
callq 0x2220
movq %rax, %rbx
shrq $0x6, %r13
pushq $0x8
popq %rsi
movq %rax, %rdi
movq %r13, %rdx
movq %r15, %rcx
callq 0x2090
movq %r15, %rdi
callq 0x20d0
movq %r12, %rdi
movq %rbx, %rsi
movl %r14d, %edx
movl 0xc(%rsp), %ecx
movl %ebp, %r8d
callq 0x4670
movq %rax, %r14
movq %rbx, %rdi
callq 0x2040
leaq 0x150f4(%rip), %rsi     # 0x19c55
movq %r14, %rdi
callq 0x2da8
movq %r14, %rdi
callq 0x26e6
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x1d46f(%rip), %rax     # 0x21ff8
movq (%rax), %rcx
leaq 0x1475d(%rip), %rdi     # 0x192f0
pushq $0x3f
popq %rsi
pushq $0x1
popq %rdx
callq 0x2310
jmp 0x4bc7
movq 0x1d451(%rip), %rax     # 0x21ff8
movq (%rax), %rdi
leaq 0x1477f(%rip), %rsi     # 0x19330
leaq 0x147a3(%rip), %rdx     # 0x1935b
xorl %eax, %eax
callq 0x21c0
movq %r12, %rdi
callq 0x26e6
pushq $0x1
popq %rax
jmp 0x4b73
// File: /workspace/github_c_makefile_star2_O2/lh3[P]fermi2/sub.c
// Function: set_bits_aux
static inline int64_t set_bits_aux(const rld_t *e, uint64_t *bits, uint64_t k)
{
	int c;
	uint64_t *ok;
	ok = alloca(8 * e->asize);
	do {
		set_bit(bits, k);
		c = rld_rank1a(e, k + 1, ok);
		k = e->cnt[c] + ok[c] - 1;
		if (c == 0) break;
	} while (c);
	return k;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rcx
movq %rsi, %rbx
movq %rdi, %r14
movzbl (%rdi), %eax
leal 0xf(,%rax,8), %eax
andl $-0x10, %eax
movq %rsp, %r15
subq %rax, %r15
movq %r15, %rsp
pushq $0x1
popq %r12
movq %rcx, %rax
shrq $0x6, %rax
movq %r12, %rdx
shlq %cl, %rdx
lock
orq %rdx, (%rbx,%rax,8)
incq %rcx
movq %r14, %rdi
movq %rcx, %rsi
movq %r15, %rdx
callq 0x346c
movq 0x20(%r14), %rcx
cltq
movq (%rcx,%rax,8), %rcx
movq (%r15,%rax,8), %rdx
addq %rdx, %rcx
decq %rcx
testl %eax, %eax
jne 0x4bfa
movq %rcx, %rax
leaq -0x20(%rbp), %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/lh3[P]fermi2/./rld0.h
// Function: rld_dec0
static inline int64_t rld_dec0(const rld_t *e, rlditr_t *itr, int *c)
{
	int w;
	uint64_t x;
	int64_t l, y = 0;
	x = itr->p[0] << (64 - itr->r) | (itr->p != itr->stail && itr->r != 64? itr->p[1] >> itr->r : 0);
	if (x>>63 == 0) {
		if ((w = 0x333333335555779bll>>(x>>59<<2)&0xf) == 0xb && x>>58 == 0) return 0;
		l = (x >> (64 - w)) - 1;
		y = x << w >> (64 - l) | 1u << l;
		w += l;
	} else w = y = 1;
	*c = x << w >> (64 - e->abits);
	w += e->abits;
	if (itr->r > w) itr->r -= w;
	else ++itr->p, itr->r = 64 + itr->r - w;
	return y;
}

// Assembly:
movq 0x10(%rsi), %r10
movq (%r10), %rax
movl (%rsi), %r8d
movl %r8d, %ecx
negb %cl
shlq %cl, %rax
cmpq 0x20(%rsi), %r10
sete %cl
cmpl $0x40, %r8d
sete %r9b
orb %cl, %r9b
je 0x4c70
xorl %r11d, %r11d
jmp 0x4c7a
movl %r8d, %ecx
movq 0x8(%r10), %r11
shrq %cl, %r11
orq %rax, %r11
js 0x4cad
movq %r11, %rcx
shrq $0x39, %rcx
andb $0x3c, %cl
movabsq $0x333333335555779b, %r8 # imm = 0x333333335555779B
shrq %cl, %r8
movl %r8d, %ecx
andl $0xf, %ecx
movq %r11, %rax
shrq $0x3a, %rax
jne 0x4cbf
cmpl $0xb, %ecx
jne 0x4cbf
xorl %eax, %eax
retq
movabsq $0x1, %rax
movl $0x1, %r8d
jmp 0x4cf1
pushq %rbx
negb %cl
movq %r11, %rax
shrq %cl, %rax
andl $0xf, %r8d
movq %r11, %rbx
movl %r8d, %ecx
shlq %cl, %rbx
leaq -0x1(%rax), %r9
movb $0x41, %cl
subb %al, %cl
shrq %cl, %rbx
movl $0x1, %eax
movl %r9d, %ecx
shll %cl, %eax
orq %rbx, %rax
addl %r9d, %r8d
popq %rbx
movl %r8d, %ecx
shlq %cl, %r11
movsbl 0x2(%rdi), %edi
movl %edi, %ecx
negb %cl
shrq %cl, %r11
addl %edi, %r8d
movl %r11d, (%rdx)
movl (%rsi), %ecx
cmpl %r8d, %ecx
jg 0x4d1a
addq $0x8, %r10
movq %r10, 0x10(%rsi)
addl $0x40, %ecx
subl %r8d, %ecx
movl %ecx, (%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/lh3[P]fermi2/unpack.c
// Function: fm_retrieve
int64_t fm_retrieve(const rld_t *e, uint64_t x, kstring_t *s)
{
	uint64_t k = x, *ok;
	ok = alloca(8 * e->asize);
	s->l = 0;
	while (1) {
		int c = rld_rank1a(e, k + 1, ok);
		k = e->cnt[c] + ok[c] - 1;
		if (c == 0) return k;
		kputc(c, s);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movzbl (%rdi), %eax
leal 0xf(,%rax,8), %eax
andl $-0x10, %eax
movq %rsp, %r12
subq %rax, %r12
movq %r12, %rsp
andl $0x0, (%rdx)
incq %r15
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x346c
movl %eax, %r13d
movq 0x20(%r14), %rax
movslq %r13d, %rcx
movq (%r12,%rcx,8), %r15
addq (%rax,%rcx,8), %r15
testl %r13d, %r13d
je 0x4dd8
movl (%rbx), %ecx
leal 0x1(%rcx), %edx
cmpl 0x4(%rbx), %edx
jae 0x4d88
movq 0x8(%rbx), %rax
jmp 0x4dc1
movl %edx, %eax
shrl %eax
orl %edx, %eax
movl %eax, %ecx
shrl $0x2, %ecx
orl %eax, %ecx
movl %ecx, %eax
shrl $0x4, %eax
orl %ecx, %eax
movl %eax, %ecx
shrl $0x8, %ecx
orl %eax, %ecx
movl %ecx, %esi
shrl $0x10, %esi
orl %ecx, %esi
incl %esi
movl %esi, 0x4(%rbx)
movq 0x8(%rbx), %rdi
callq 0x2260
movq %rax, 0x8(%rbx)
movl (%rbx), %ecx
leal 0x1(%rcx), %edx
movl %edx, (%rbx)
movl %ecx, %ecx
movb %r13b, (%rax,%rcx)
movq 0x8(%rbx), %rax
movl (%rbx), %ecx
movb $0x0, (%rax,%rcx)
jmp 0x4d53
decq %r15
movq %r15, %rax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/lh3[P]fermi2/unpack.c
// Function: main_unpack
int main_unpack(int argc, char *argv[])
{
	int64_t i, n;
	int c;
	rld_t *e;
	kstring_t str = {0,0,0};

	while ((c = getopt(argc, argv, "")) >= 0);
	if (optind == argc) {
		fprintf(stderr, "Usage: fermi2 unpack <reads.rld> [list|file]\n");
		return 1;
	}
	e = rld_restore(argv[optind]);
	if (optind + 1 < argc) {
		char *p, **list;
		list = hts_readlines(argv[optind+1], &n);
		if (list == 0) return 1;
		for (i = 0; i < n; ++i) {
			if (isdigit(list[i][0])) {
				int64_t x = strtol(list[i], &p, 10);
				if (x < e->mcnt[1]) print1(e, x, &str);
			}
			free(list[i]);
		}
		free(list);
	} else for (i = 0; i < e->mcnt[1]; ++i) print1(e, i, &str);
	free(str.s);
	rld_destroy(e);
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movl %edi, %ebp
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
leaq 0x146b7(%rip), %rbx     # 0x196b5
movl %ebp, %edi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x22f0
testl %eax, %eax
jns 0x4ffe
movq 0x1cfba(%rip), %r15     # 0x21fd0
movslq (%r15), %rax
cmpl %ebp, %eax
je 0x50f5
movq (%r14,%rax,8), %rdi
callq 0x2f1e
movq %rax, %rbx
movslq (%r15), %rax
leal 0x1(%rax), %ecx
cmpl %ebp, %ecx
jge 0x50b4
movq 0x8(%r14,%rax,8), %rdi
leaq 0x18(%rsp), %rsi
callq 0x4ded
testq %rax, %rax
je 0x5111
movq %rax, %r14
movq 0x18(%rsp), %r12
xorl %r15d, %r15d
testq %r12, %r12
cmovleq %r15, %r12
pushq $0xa
popq %rbp
cmpq %r15, %r12
je 0x50d7
callq 0x2360
movq (%rax), %rax
movq (%r14,%r15,8), %r13
movsbq (%r13), %rcx
testb $0x8, 0x1(%rax,%rcx,2)
je 0x50a7
movq %r13, %rdi
leaq 0x20(%rsp), %rsi
movl %ebp, %edx
callq 0x21e0
movq 0x28(%rbx), %rcx
cmpq 0x8(%rcx), %rax
jae 0x50a7
movq %rbx, %rdi
movl %eax, %esi
movq %rsp, %rdx
callq 0x5123
movq %r13, %rdi
callq 0x2040
incq %r15
jmp 0x5064
xorl %r14d, %r14d
movq %rsp, %r15
movq 0x28(%rbx), %rax
cmpq 0x8(%rax), %r14
jae 0x50df
movq %rbx, %rdi
movl %r14d, %esi
movq %r15, %rdx
callq 0x5123
incq %r14
jmp 0x50ba
movq %r14, %rdi
callq 0x2040
movq 0x8(%rsp), %rdi
callq 0x2040
movq %rbx, %rdi
callq 0x26e6
xorl %eax, %eax
jmp 0x5114
movq 0x1cefc(%rip), %rax     # 0x21ff8
movq (%rax), %rcx
leaq 0x142a0(%rip), %rdi     # 0x193a6
pushq $0x2d
popq %rsi
pushq $0x1
popq %rdx
callq 0x2310
pushq $0x1
popq %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/lh3[P]fermi2/unpack.c
// Function: print1
static void print1(const rld_t *e, int i, kstring_t *s)
{
	int64_t k;
	int j, tmp;
	k = fm_retrieve(e, i, s);
	for (j = 0; j < s->l; ++j)
		s->s[j] = "$ACGTN"[(int)s->s[j]];
	for (j = 0; j < s->l>>1; ++j) // reverse
		tmp = s->s[j], s->s[j] = s->s[s->l-1-j], s->s[s->l-1-j] = tmp;
	fwrite(s->s, 1, s->l, stdout);
	printf("\t%ld\n", (long)k);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movslq %esi, %rsi
callq 0x4d20
movq %rax, %rbx
xorl %eax, %eax
leaq 0x14296(%rip), %rcx     # 0x193d4
movl (%r14), %edx
cmpq %rdx, %rax
jae 0x515c
movq 0x8(%r14), %rdx
movsbq (%rdx,%rax), %rsi
movb (%rsi,%rcx), %sil
movb %sil, (%rdx,%rax)
incq %rax
jmp 0x513e
pushq $-0x1
popq %rax
xorl %ecx, %ecx
movl %edx, %esi
shrl %esi
movq 0x8(%r14), %rdi
cmpq %rsi, %rcx
jae 0x5191
movb (%rdi,%rcx), %sil
addl %eax, %edx
movb (%rdi,%rdx), %dl
movb %dl, (%rdi,%rcx)
movq 0x8(%r14), %rdx
movl (%r14), %edi
addl %eax, %edi
movb %sil, (%rdx,%rdi)
incq %rcx
movl (%r14), %edx
decl %eax
jmp 0x5161
movl %edx, %edx
movq 0x1ce26(%rip), %rax     # 0x21fc0
movq (%rax), %rcx
pushq $0x1
popq %rsi
callq 0x2310
leaq 0x14ddd(%rip), %rdi     # 0x19f89
movq %rbx, %rsi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2100
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/lh3[P]fermi2/correct.c
// Function: kf_lgamma
double kf_lgamma(double z) // log(gamma(z))
{
	double x = 0;
	x += 0.1659470187408462e-06 / (z+7);
	x += 0.9934937113930748e-05 / (z+6);
	x -= 0.1385710331296526     / (z+5);
	x += 12.50734324009056      / (z+4);
	x -= 176.6150291498386      / (z+3);
	x += 771.3234287757674      / (z+2);
	x -= 1259.139216722289      / (z+1);
	x += 676.5203681218835      / z;
	x += 0.9999999999995183;
	return log(x) - 5.58106146679532777 - z + (z-0.5) * log(z+6.5);
}

// Assembly:
subq $0x28, %rsp
movapd %xmm0, %xmm4
movapd %xmm0, %xmm1
unpcklpd %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0]
movapd 0x141d4(%rip), %xmm0    # 0x19410
addpd %xmm1, %xmm0
movapd 0x141d8(%rip), %xmm2    # 0x19420
divpd %xmm0, %xmm2
movapd %xmm2, %xmm3
unpckhpd %xmm2, %xmm3            # xmm3 = xmm3[1],xmm2[1]
xorpd %xmm0, %xmm0
addsd %xmm3, %xmm0
addsd %xmm2, %xmm0
movapd 0x141c8(%rip), %xmm2    # 0x19430
addpd %xmm1, %xmm2
movapd 0x141cc(%rip), %xmm3    # 0x19440
divpd %xmm2, %xmm3
movapd %xmm3, %xmm2
unpckhpd %xmm3, %xmm2            # xmm2 = xmm2[1],xmm3[1]
subsd %xmm2, %xmm0
addsd %xmm3, %xmm0
addpd 0x141c0(%rip), %xmm1    # 0x19450
movapd 0x141c8(%rip), %xmm2    # 0x19460
divpd %xmm1, %xmm2
movapd %xmm2, %xmm1
unpckhpd %xmm2, %xmm1            # xmm1 = xmm1[1],xmm2[1]
subsd %xmm1, %xmm0
addsd %xmm2, %xmm0
movsd 0x1426c(%rip), %xmm1    # 0x19520
movapd %xmm4, 0x10(%rsp)
addsd %xmm4, %xmm1
unpcklpd %xmm1, %xmm4            # xmm4 = xmm4[0],xmm1[0]
movapd 0x141a6(%rip), %xmm1    # 0x19470
divpd %xmm4, %xmm1
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
subsd %xmm2, %xmm0
addsd %xmm1, %xmm0
addsd 0x14242(%rip), %xmm0    # 0x19528
callq 0x2160
addsd 0x1423d(%rip), %xmm0    # 0x19530
movapd 0x10(%rsp), %xmm1
subsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x1422d(%rip), %xmm0    # 0x19538
addsd %xmm1, %xmm0
movsd %xmm0, (%rsp)
addsd 0x14224(%rip), %xmm1    # 0x19540
movapd %xmm1, %xmm0
callq 0x2160
mulsd (%rsp), %xmm0
addsd 0x8(%rsp), %xmm0
addq $0x28, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/lh3[P]fermi2/correct.c
// Function: fmc_beta_binomial
double fmc_beta_binomial(int n, int k, double a, double b) // beta-binomial density
{
	double x, y, z;
	x = lgamma(n + 1) - (lgamma(k + 1) + lgamma(n - k + 1));
	y = lgamma(k + a) + lgamma(n - k + b) - lgamma(n + a + b);
	z = lgamma(a + b) - (lgamma(a) + lgamma(b));
	return exp(x + y + z);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movsd %xmm1, 0x18(%rsp)
movsd %xmm0, 0x8(%rsp)
movl %esi, %r14d
movl %edi, %ebx
leal 0x1(%rbx), %eax
cvtsi2sd %eax, %xmm0
callq 0x21d0
movsd %xmm0, 0x10(%rsp)
leal 0x1(%r14), %eax
cvtsi2sd %eax, %xmm0
callq 0x21d0
movsd %xmm0, (%rsp)
movl %ebx, %r15d
subl %r14d, %r15d
leal 0x1(%r15), %eax
cvtsi2sd %eax, %xmm0
callq 0x21d0
addsd (%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
subsd %xmm0, %xmm1
movsd %xmm1, 0x10(%rsp)
cvtsi2sd %r14d, %xmm0
addsd 0x8(%rsp), %xmm0
callq 0x21d0
movsd %xmm0, (%rsp)
cvtsi2sd %r15d, %xmm0
addsd 0x18(%rsp), %xmm0
callq 0x21d0
addsd (%rsp), %xmm0
movsd %xmm0, (%rsp)
cvtsi2sd %ebx, %xmm0
addsd 0x8(%rsp), %xmm0
addsd 0x18(%rsp), %xmm0
callq 0x21d0
movsd (%rsp), %xmm1
subsd %xmm0, %xmm1
addsd 0x10(%rsp), %xmm1
movsd %xmm1, (%rsp)
movsd 0x8(%rsp), %xmm0
addsd 0x18(%rsp), %xmm0
callq 0x21d0
movsd %xmm0, 0x10(%rsp)
movsd 0x8(%rsp), %xmm0
callq 0x21d0
movsd %xmm0, 0x8(%rsp)
movsd 0x18(%rsp), %xmm0
callq 0x21d0
addsd 0x8(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
subsd %xmm0, %xmm1
addsd (%rsp), %xmm1
movapd %xmm1, %xmm0
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x2350
// File: /workspace/github_c_makefile_star2_O2/lh3[P]fermi2/correct.c
// Function: fmc_precal_qtab
uint8_t *fmc_precal_qtab(int max, double e1, double e2, double a1, double a2, double prior1)
{ // precalculate a lookup table q(n,k), the consensus quality given n bases with k differences
	int n, k;
	uint8_t *qtab;
	double b1 = a1 * (1 - e1) / e1, b2 = a2 * (1 - e2) / e2;

	assert(FMC_Q_MAX>>1 < FMC_Q_1);
	qtab = calloc(max * max, 1);
	for (n = 1; n < max; ++n) {
		uint8_t *qn = &qtab[n*max];
		//fprintf(stderr, "=> %d <=", n);
		for (k = 0; k < n; ++k) {
			double p1, p2;
			int q;
			p1 = fmc_beta_binomial(n, k, a1, b1);
			p2 = fmc_beta_binomial(n, k, a2, b2);
			q = (int)(-4.343 * log(1. - p1 * prior1 / (p1 * prior1 + p2 * (1-prior1))) + .499);
			qn[k] = (q < FMC_Q_MAX? q : FMC_Q_MAX) >> 1;
			//if (q) fprintf(stderr, "\t%d:%d", k, q);
		}
		//fprintf(stderr, "\n");
	}
	return qtab;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movsd %xmm4, (%rsp)
movl %edi, %ebp
movsd 0x140b6(%rip), %xmm5    # 0x19520
movapd %xmm5, %xmm4
subsd %xmm0, %xmm4
movsd %xmm2, 0x20(%rsp)
mulsd %xmm2, %xmm4
divsd %xmm0, %xmm4
movsd %xmm4, 0x18(%rsp)
movapd %xmm5, %xmm0
subsd %xmm1, %xmm0
movsd %xmm3, 0x28(%rsp)
mulsd %xmm3, %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, 0x10(%rsp)
imull %edi, %edi
pushq $0x1
popq %rbx
movq %rbx, %rsi
callq 0x2190
movq %rax, %r14
movsd 0x14065(%rip), %xmm0    # 0x19520
subsd (%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movslq %ebp, %r12
movq %rax, %r13
addq %r12, %r13
pushq $0x29
popq %rbp
cmpq %r12, %rbx
jge 0x5577
xorl %r15d, %r15d
cmpq %r15, %rbx
je 0x556c
movl %ebx, %edi
movl %r15d, %esi
movsd 0x20(%rsp), %xmm0
movsd 0x18(%rsp), %xmm1
callq 0x5335
movsd %xmm0, 0x30(%rsp)
movl %ebx, %edi
movl %r15d, %esi
movsd 0x28(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
callq 0x5335
movsd 0x30(%rsp), %xmm1
mulsd (%rsp), %xmm1
mulsd 0x8(%rsp), %xmm0
addsd %xmm1, %xmm0
divsd %xmm0, %xmm1
movsd 0x13fe6(%rip), %xmm0    # 0x19520
subsd %xmm1, %xmm0
callq 0x2160
mulsd 0x13ffd(%rip), %xmm0    # 0x19548
addsd 0x13ffd(%rip), %xmm0    # 0x19550
cvttsd2si %xmm0, %eax
cmpl $0x29, %eax
cmovgel %ebp, %eax
shrl %eax
movb %al, (%r13,%r15)
incq %r15
jmp 0x54de
incq %rbx
addq %r12, %r13
jmp 0x54d2
movq %r14, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/lh3[P]fermi2/correct.c
// Function: fmc_traverse
rldintv_t *fmc_traverse(const rld_t *e, int depth) // traverse FM-index up to $depth
{
	rldintv_v stack = {0,0,0};
	rldintv_t *p, *ret;
	uint64_t x;

	ret = calloc(1<<depth*2, sizeof(rldintv_t));
	kv_pushp(rldintv_t, stack, &p);
	p->x[0] = p->x[1] = 0, p->x[2] = e->mcnt[0], p->info = 0;
	x = 0;
	while (stack.n) {
		rldintv_t top = kv_pop(stack);
		if (top.info>>2 > 0) {
			int shift = ((top.info>>2) - 1) << 1;
			x = (x & ~(3ULL<<shift)) | (uint64_t)(top.info&3)<<shift;
		}
		if (top.info>>2 != depth) {
			int c;
			rldintv_t t[6];
			rld_extend(e, &top, t, 1);
			for (c = 1; c < 5; ++c) {
				if (t[c].x[2] == 0) continue;
				t[c].info = ((top.info>>2) + 1) << 2 | (c - 1);
				kv_push(rldintv_t, stack, t[c]);
			}
		} else ret[x] = top, ret[x].info = x;
	}
	free(stack.a);
	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movl %esi, %r12d
movq %rdi, %rbx
leal (%r12,%r12), %ecx
pushq $0x1
popq %rax
movl %eax, %edi
shll %cl, %edi
pushq $0x20
popq %rsi
callq 0x2190
movq %rax, (%rsp)
pushq $0x40
popq %rdi
callq 0x2220
movq %rax, %r15
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq %rbx, 0x10(%rsp)
movq 0x28(%rbx), %rax
movq (%rax), %rax
movq %rax, 0x10(%r15)
andq $0x0, 0x18(%r15)
movslq %r12d, %rdi
pushq $0x1
popq %r13
pushq $0x2
popq %rbx
xorl %r8d, %r8d
movq %rdi, 0x8(%rsp)
testq %r13, %r13
je 0x5718
decq %r13
movq %r13, %rax
shlq $0x5, %rax
movups (%r15,%rax), %xmm0
movups 0x10(%r15,%rax), %xmm1
movaps %xmm1, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movq 0x38(%rsp), %rdx
cmpq $0x4, %rdx
jb 0x5643
movl %edx, %ecx
shrl %ecx
addb $-0x2, %cl
andb $-0x2, %cl
pushq $0x3
popq %rsi
shlq %cl, %rsi
notq %rsi
andq %rsi, %r8
movl %edx, %esi
andl $0x3, %esi
shlq %cl, %rsi
orq %rsi, %r8
shrq $0x2, %rdx
cmpq %rdi, %rdx
jne 0x5674
addq %r15, %rax
movq %r8, %rcx
shlq $0x5, %rcx
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movq (%rsp), %rax
movups %xmm1, 0x10(%rax,%rcx)
movups %xmm0, (%rax,%rcx)
movq %r8, 0x18(%rax,%rcx)
jmp 0x55ef
movq %r8, 0x18(%rsp)
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rsi
leaq 0x40(%rsp), %rdx
pushq $0x1
popq %rcx
callq 0x39db
leaq 0x78(%rsp), %r14
xorl %ebp, %ebp
cmpq $0x4, %rbp
je 0x5709
cmpq $0x0, -0x8(%r14)
je 0x5700
movq 0x38(%rsp), %rax
andq $-0x4, %rax
addq $0x4, %rax
orq %rbp, %rax
movq %rax, (%r14)
cmpq %rbx, %r13
jne 0x56df
leaq (%rbx,%rbx), %r12
testq %rbx, %rbx
pushq $0x2
popq %rax
cmoveq %rax, %r12
movq %r12, %rsi
shlq $0x5, %rsi
movq %r15, %rdi
callq 0x2260
movq %rax, %r15
movq %r12, %rbx
leaq -0x18(%r14), %rax
leaq 0x1(%r13), %rcx
shlq $0x5, %r13
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movups %xmm1, 0x10(%r15,%r13)
movups %xmm0, (%r15,%r13)
movq %rcx, %r13
incq %rbp
addq $0x20, %r14
jmp 0x5697
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %r8
jmp 0x55ef
movq %r15, %rdi
callq 0x2040
movq (%rsp), %rax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/lh3[P]fermi2/correct.c
// Function: fmc_kmer_stat
void fmc_kmer_stat(int suf_len, const fmc64_v *a)
{
	int i, n_suf = 1<<suf_len*2;
	int64_t tot = 0;
	for (i = 0; i < n_suf; ++i)
		tot += a[i].n<<1;
	fprintf(stderr, "[M::%s] %ld k-mers\n", __func__, (long)tot);
}

// Assembly:
movl %edi, %ecx
addl %edi, %ecx
xorl %edx, %edx
xorl %eax, %eax
movl %edx, %edi
shrl %cl, %edi
testl %edi, %edi
jne 0x5be7
movq (%rsi), %rdi
leaq (%rax,%rdi,2), %rax
addq $0x18, %rsi
incl %edx
jmp 0x5bd0
movq 0x1c40a(%rip), %rcx     # 0x21ff8
movq (%rcx), %rdi
leaq 0x139e8(%rip), %rsi     # 0x195e0
leaq 0x139f5(%rip), %rdx     # 0x195f4
movq %rax, %rcx
xorl %eax, %eax
jmp 0x21c0
// File: /workspace/github_c_makefile_star2_O2/lh3[P]fermi2/correct.c
// Function: fmc_kmer_write
void fmc_kmer_write(FILE *fp, const fmc_opt_t *opt, const fmc64_v *a)
{
	int i, n = 1<<opt->c.suf_len*2;
	fwrite(FMC_KMER_MAGIC, 1, 4, fp);
	fwrite(&opt->c, sizeof(fmc_collect_opt_t), 1, fp);
	for (i = 0; i < n; ++i) {
		fwrite(&a[i].n, sizeof(size_t), 1, fp);
		fwrite(a[i].a, 8, a[i].n, fp);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r13
movq %rdi, %r14
movslq (%rsi), %r15
shrq $0xf, %r15
andl $-0x2, %r15d
leaq 0x13823(%rip), %rdi     # 0x196b1
pushq $0x1
popq %r12
pushq $0x4
popq %rdx
movq %r12, %rsi
movq %r14, %rcx
callq 0x2310
pushq $0x30
popq %rsi
movq %r13, %rdi
movq %r12, %rdx
movq %r14, %rcx
callq 0x2310
xorl %ebp, %ebp
pushq $0x8
popq %r13
movl %ebp, %eax
movl %r15d, %ecx
shrl %cl, %eax
testl %eax, %eax
jne 0x5eed
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %r14, %rcx
callq 0x2310
movq (%rbx), %rdx
movq 0x10(%rbx), %rdi
movq %r13, %rsi
movq %r14, %rcx
callq 0x2310
addq $0x18, %rbx
incl %ebp
jmp 0x5eb7
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/lh3[P]fermi2/correct.c
// Function: fmc_kmer_read
fmc64_v *fmc_kmer_read(FILE *fp, fmc_opt_t *opt)
{
	int i, n;
	char magic[4];
	fmc64_v *a;
	fread(magic, 1, 4, fp);
	if (strncmp(magic, FMC_KMER_MAGIC, 4) != 0) {
		fprintf(stderr, "[E::%s] invalid file magic\n", __func__);
		return 0;
	}
	fread(&opt->c, sizeof(fmc_collect_opt_t), 1, fp);
	n = 1<<opt->c.suf_len*2;
	a = malloc(sizeof(fmc64_v) * n);
	for (i = 0; i < n; ++i) {
		fread(&a[i].n, sizeof(size_t), 1, fp);
		a[i].m = a[i].n;
		a[i].a = malloc(8 * a[i].n);
		fread(a[i].a, 8, a[i].n, fp);
	}
	return a;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x14(%rsp), %r14
pushq $0x1
popq %rsi
pushq $0x4
popq %rdx
movq %r14, %rdi
movq %rbx, %rcx
callq 0x2090
cmpl $0x24b4346, (%r14)      # imm = 0x24B4346
jne 0x5fd3
pushq $0x30
popq %rsi
pushq $0x1
popq %rdx
movq %r15, %rdi
movq %rbx, %rcx
callq 0x2090
movslq (%r15), %rcx
sarq $0xf, %rcx
movl %ecx, %ebp
andl $-0x2, %ebp
andb $-0x2, %cl
pushq $0x18
popq %rdi
shlq %cl, %rdi
callq 0x2220
movq %rax, %r13
xorl %r14d, %r14d
pushq $0x8
popq %r12
movq %rax, 0x8(%rsp)
movl %r14d, %eax
movl %ebp, %ecx
shrl %cl, %eax
testl %eax, %eax
jne 0x5fbc
movq %r13, %rdi
movq %r12, %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
callq 0x2090
movq (%r13), %r15
movq %r15, 0x8(%r13)
leaq (,%r15,8), %rdi
callq 0x2220
movq %rax, 0x10(%r13)
movq %rax, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x2090
addq $0x18, %r13
incl %r14d
jmp 0x5f6d
movq 0x8(%rsp), %rbx
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x1c01e(%rip), %rax     # 0x21ff8
movq (%rax), %rdi
leaq 0x136d2(%rip), %rsi     # 0x196b6
leaq 0x136e7(%rip), %rdx     # 0x196d2
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x21c0
jmp 0x5fc1
// File: /workspace/github_c_makefile_star2_O2/lh3[P]fermi2/correct.c
// Function: fmc_batch_read
fmc_batch_t *fmc_batch_read(kseq_t *ks, int64_t batch_size)
{
	int64_t l = 0;
	fmc_batch_t *b;
	b = calloc(1, sizeof(fmc_batch_t));
	while (l < batch_size && kseq_read(ks) >= 0) {
		if (b->n >= b->m) {
			b->m = b->n + 1;
			kroundup32(b->m);
			b->s = realloc(b->s, b->m * sizeof(void*));
			b->q = realloc(b->q, b->m * sizeof(void*));
			b->name = realloc(b->name, b->m * sizeof(void*));
		}
		b->s[b->n] = strdup(ks->seq.s);
		b->q[b->n] = ks->qual.l? strdup(ks->qual.s) : 0;
		b->name[b->n++] = strdup(ks->name.s);
		l += ks->seq.l;
	}
	if (l == 0) {
		free(b);
		return 0;
	} else return b;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %r15
pushq $0x1
popq %rdi
pushq $0x20
popq %rsi
callq 0x2190
movq %rax, %rbx
xorl %r12d, %r12d
movq $0x0, 0x8(%rsp)
xorl %ebp, %ebp
movq $0x0, 0x18(%rsp)
movl $0x0, 0x14(%rsp)
xorl %eax, %eax
movq %r14, 0x20(%rsp)
cmpq %r14, %rax
jge 0x65fa
movq %r15, %rdi
movq %rax, %r13
callq 0xc2d8
testl %eax, %eax
movq %r13, %rax
js 0x65fa
cmpl 0x14(%rsp), %r12d
jge 0x6523
movq 0x8(%rsp), %rbp
jmp 0x659b
movl %r12d, %eax
shrl %eax
orl %r12d, %eax
movl %eax, %ecx
shrl $0x2, %ecx
orl %eax, %ecx
movl %ecx, %eax
shrl $0x4, %eax
orl %ecx, %eax
movl %eax, %ecx
shrl $0x8, %ecx
orl %eax, %ecx
movl %ecx, %eax
shrl $0x10, %eax
orl %ecx, %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x14(%rsp)
movl %ecx, 0x4(%rbx)
cltq
leaq 0x8(,%rax,8), %r14
movq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x2260
movq %rbp, 0x8(%rsp)
movq %rax, %rbp
movq %rax, 0x8(%rbx)
movq 0x18(%rsp), %rdi
movq %r14, %rsi
callq 0x2260
movq %rax, 0x10(%rbx)
movq 0x8(%rsp), %rdi
movq %r14, %rsi
movq 0x20(%rsp), %r14
callq 0x2260
movq %rax, 0x18(%rbx)
movq 0x28(%r15), %rdi
callq 0x2340
movq %rax, (%rbp,%r12,8)
cmpl $0x0, 0x30(%r15)
movq %rbp, 0x8(%rsp)
je 0x65c0
movq 0x38(%r15), %rdi
callq 0x2340
jmp 0x65c2
xorl %eax, %eax
movq 0x10(%rbx), %rdx
movq %rdx, 0x18(%rsp)
movq %rax, (%rdx,%r12,8)
movq 0x8(%r15), %rdi
callq 0x2340
movq 0x18(%rbx), %rbp
leaq 0x1(%r12), %rcx
movl %ecx, (%rbx)
movq %rax, (%rbp,%r12,8)
movl 0x20(%r15), %eax
addq %rax, %r13
movq %r13, %rax
movq %rcx, %r12
jmp 0x64f6
testq %rax, %rax
jne 0x6609
movq %rbx, %rdi
callq 0x2040
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/lh3[P]fermi2/correct.c
// Function: fmc_batch_destroy
void fmc_batch_destroy(fmc_batch_t *b)
{
	int i;
	for (i = 0; i < b->n; ++i) {
		free(b->name[i]); free(b->s[i]); free(b->q[i]);
	}
	free(b->name); free(b->s); free(b->q); free(b);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
movslq (%rbx), %rax
movq 0x18(%rbx), %rdi
cmpq %rax, %r14
jge 0x6659
movq (%rdi,%r14,8), %rdi
callq 0x2040
movq 0x8(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x2040
movq 0x10(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x2040
incq %r14
jmp 0x6625
callq 0x2040
movq 0x8(%rbx), %rdi
callq 0x2040
movq 0x10(%rbx), %rdi
callq 0x2040
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2040
// File: /workspace/github_c_makefile_star2_O2/lh3[P]fermi2/correct.c
// Function: fmc_seq_conv
int fmc_seq_conv(const char *s, const char *q, int defQ, ecseq_t *seq)
{
	int i, l;
	l = strlen(s);
	kv_resize(ecbase_t, *seq, l);
	seq->n = l;
	for (i = 0; i < l; ++i) {
		ecbase_t *c = &seq->a[i];
		c->b = c->ob = seq_nt6_table[(int)s[i]] - 1;
		c->q = q? q[i] - 33 : defQ;
		c->q = c->oq = c->q < FMC_Q_MAX? c->q : FMC_Q_MAX;
		c->q = c->q > 5? c->q : 5;
		c->state = STATE_N;
		c->i = i;
		c->f = 0;
		c->min_diff = 0xff;
	}
	return l;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r15
callq 0x20e0
movq %rax, (%rsp)
movslq %eax, %r13
cmpq %r13, 0x8(%rbx)
jae 0x66f4
leaq -0x1(%r13), %rax
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x10, %rcx
orq %rax, %rcx
incq %rcx
movq %rcx, 0x8(%rbx)
movq 0x10(%rbx), %rdi
imulq $0xc, %rcx, %rsi
callq 0x2260
movq %rax, 0x10(%rbx)
movq %r13, (%rbx)
xorl %eax, %eax
testl %r13d, %r13d
movl $0x0, %ecx
cmovgl (%rsp), %ecx
leaq 0x1bad4(%rip), %rdx     # 0x221e0
movl $0xfffff0f0, %esi       # imm = 0xFFFFF0F0
pushq $0x29
popq %rdi
pushq $0x5
popq %r8
xorl %r9d, %r9d
cmpq %r9, %rcx
je 0x67a7
movq 0x10(%rbx), %r10
movsbq (%r15,%r9), %r11
movb (%rdx,%r11), %r11b
decb %r11b
andb $0xf, %r11b
movzbl %r11b, %r12d
movl %r12d, %r13d
shll $0x8, %r13d
movl (%r10,%rax), %r11d
andl %esi, %r11d
orl %r13d, %r11d
orl %r12d, %r11d
movw %r11w, (%r10,%rax)
movl %ebp, %r13d
testq %r14, %r14
je 0x6766
movzbl (%r14,%r9), %r13d
addl $-0x21, %r13d
movzbl %r13b, %r12d
cmpl $0x29, %r12d
cmovael %edi, %r13d
movb %r13b, 0x3(%r10,%rax)
cmpb $0x6, %r13b
cmovbl %r8d, %r13d
movb %r13b, 0x2(%r10,%rax)
movl %r9d, 0x8(%r10,%rax)
andl $0xf0f, %r11d           # imm = 0xF0F
movw %r11w, (%r10,%rax)
movb $-0x1, 0x4(%r10,%rax)
incq %r9
addq $0xc, %rax
jmp 0x671b
movq (%rsp), %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/lh3[P]fermi2/correct.c
// Function: fmc_seq_cpy_no_del
void fmc_seq_cpy_no_del(ecseq_t *dst, const ecseq_t *src)
{
	int i;
	kv_resize(ecbase_t, *dst, src->n);
	dst->n = 0;
	memcpy(dst->a, src->a, src->n * sizeof(ecbase_t));
	for (i = 0; i < src->n; ++i)
		if (src->a[i].state != STATE_D)
			dst->a[dst->n++] = src->a[i];
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %rax
cmpq %rax, 0x8(%rdi)
jae 0x681e
decq %rax
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x10, %rcx
orq %rax, %rcx
incq %rcx
movq %rcx, 0x8(%r14)
movq 0x10(%r14), %rdi
imulq $0xc, %rcx, %rsi
callq 0x2260
movq %rax, %rdi
movq %rax, 0x10(%r14)
jmp 0x6822
movq 0x10(%r14), %rdi
andq $0x0, (%r14)
movq 0x10(%rbx), %rsi
imulq $0xc, (%rbx), %rdx
callq 0x21f0
xorl %eax, %eax
xorl %ecx, %ecx
cmpq %rcx, (%rbx)
jbe 0x687e
movq 0x10(%rbx), %rdx
movzwl (%rdx,%rax), %esi
andl $0xf0, %esi
cmpw $0x30, %si
je 0x6875
addq %rax, %rdx
movq (%r14), %rsi
movq 0x10(%r14), %rdi
leaq 0x1(%rsi), %r8
movq %r8, (%r14)
imulq $0xc, %rsi, %rsi
movl 0x8(%rdx), %r8d
movl %r8d, 0x8(%rdi,%rsi)
movq (%rdx), %rdx
movq %rdx, (%rdi,%rsi)
incq %rcx
addq $0xc, %rax
jmp 0x6837
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/lh3[P]fermi2/correct.c
// Function: fmc_aux_init
fmc_aux_t *fmc_aux_init()
{
	fmc_aux_t *a;
	a = calloc(1, sizeof(fmc_aux_t));
	a->cache = kh_init(kache);
	return a;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
pushq $0x1
popq %rbx
movl $0xb0, %esi
movq %rbx, %rdi
callq 0x2190
movq %rax, %r14
pushq $0x28
popq %rsi
movq %rbx, %rdi
callq 0x2190
movq %rax, 0xa8(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/lh3[P]fermi2/correct.c
// Function: fmc_cns_ungap
int fmc_cns_ungap(ecseq_t *s1, const ecseq_t *s2)
{
	int i, n = 0;
	assert(s1->n == s2->n);
	for (i = 0; i < s1->n; ++i) {
		ecbase_t *b1 = &s1->a[i];
		const ecbase_t *b2 = &s2->a[i];
		if (b2->state == STATE_N) continue;
		if (b1->state == STATE_N) {
			*b1 = *b2;
		} else if (b1->b == b2->b) { // same correction in both directions
			b1->f = b1->f > b2->f? b1->f : b2->f;
			b1->min_diff = b1->min_diff > b2->min_diff? b1->min_diff : b2->min_diff;
		} else { // conflicting correction; don't make a correction
			b1->f = 0; b1->min_diff = 0;
			b1->b = b1->ob; b1->q = b1->oq;
			++n;
		}
	}
	return n;
}

// Assembly:
pushq %rbx
movq (%rdi), %r8
cmpq (%rsi), %r8
jne 0x78e5
xorl %ecx, %ecx
xorl %edx, %edx
xorl %eax, %eax
cmpq %rdx, %r8
jbe 0x78e3
movq 0x10(%rsi), %r9
movzwl (%r9,%rcx), %r11d
testb $-0x10, %r11b
je 0x78d4
movq 0x10(%rdi), %r8
leaq (%r8,%rcx), %rbx
movzwl (%rbx), %r10d
testb $-0x10, %r10b
je 0x7881
movl %r10d, %ebx
xorl %r11d, %ebx
testb $0xf, %bl
je 0x7894
movb $0x0, 0x4(%r8,%rcx)
movl %r10d, %r9d
shrl $0x8, %r9d
andl $0xf, %r9d
andl $0xff0, %r10d           # imm = 0xFF0
orl %r9d, %r10d
movw %r10w, (%r8,%rcx)
movb 0x3(%r8,%rcx), %r9b
movb %r9b, 0x2(%r8,%rcx)
incl %eax
jmp 0x78d4
addq %rcx, %r9
movl 0x8(%r9), %r8d
movl %r8d, 0x8(%rbx)
movq (%r9), %r8
movq %r8, (%rbx)
jmp 0x78d4
movzwl %r10w, %ebx
shrl $0xc, %ebx
movzwl %r11w, %r11d
shrl $0xc, %r11d
cmpw %r11w, %bx
cmoval %ebx, %r11d
shll $0xc, %r11d
andl $0xfff, %r10d           # imm = 0xFFF
orl %r11d, %r10d
movw %r10w, (%r8,%rcx)
movl 0x4(%r8,%rcx), %r10d
movl 0x4(%r9,%rcx), %r9d
cmpb %r9b, %r10b
cmoval %r10d, %r9d
movb %r9b, 0x4(%r8,%rcx)
incq %rdx
movq (%rdi), %r8
addq $0xc, %rcx
jmp 0x781a
popq %rbx
retq
leaq 0x11e8b(%rip), %rdi     # 0x19777
leaq 0x11d28(%rip), %rsi     # 0x1961b
leaq 0x11e8c(%rip), %rcx     # 0x19786
movl $0x354, %edx            # imm = 0x354
callq 0x2120
// File: /workspace/github_c_makefile_star2_O2/lh3[P]fermi2/correct.c
// Function: correct_func
static void correct_func(void *data, long i, int tid)
{
	for_correct_t *f = (for_correct_t*)data;
	if (fmc_verbose >= 5)
		fprintf(stderr, ">%s tid:%d heap:%ld stack:%ld kmercache:%d\n",
				f->name[i], tid, f->a[tid]->heap.m, f->a[tid]->stack.m, kh_n_buckets(f->a[tid]->cache));
	fmc_correct1(f->opt, f->h, &f->s[i], &f->q[i], f->a[tid], &f->ecs[i]);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edx, %ecx
movq %rsi, %r14
movq %rdi, %rbx
cmpl $0x4, 0x1950f(%rip)     # 0x221d0
jg 0x8cfe
movslq %ecx, %r15
movq (%rbx), %rdi
leaq (,%r14,8), %rcx
movq 0x18(%rbx), %rdx
addq %rcx, %rdx
addq 0x20(%rbx), %rcx
movq 0x8(%rbx), %rsi
movq 0x30(%rbx), %rax
movq (%rax,%r15,8), %r8
imulq $0x28, %r14, %r9
addq 0x28(%rbx), %r9
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x7904
movq 0x192f3(%rip), %rax     # 0x21ff8
movq (%rax), %rdi
movq 0x10(%rbx), %rax
movq 0x30(%rbx), %rsi
movq (%rax,%r14,8), %rdx
movslq %ecx, %r15
movq (%rsi,%r15,8), %rax
movq 0x80(%rax), %r8
movq 0x98(%rax), %r9
movq 0xa8(%rax), %rax
movl (%rax), %eax
movl %eax, (%rsp)
leaq 0x10fb2(%rip), %rsi     # 0x19cee
xorl %eax, %eax
callq 0x21c0
jmp 0x8cc6
// File: /workspace/github_c_makefile_star2_O2/lh3[P]fermi2/correct.c
// Function: hash_64
static inline uint64_t hash_64(uint64_t key)
{
	key += ~(key << 32);
	key ^= (key >> 22);
	key += ~(key << 13);
	key ^= (key >> 8);
	key += (key << 3);
	key ^= (key >> 15);
	key += ~(key << 27);
	key ^= (key >> 31);
	return key;
}

// Assembly:
movq %rdi, %rax
shlq $0x20, %rax
notq %rax
addq %rdi, %rax
movq %rax, %rcx
shrq $0x16, %rcx
xorq %rax, %rcx
movq %rcx, %rax
shlq $0xd, %rax
notq %rax
addq %rcx, %rax
movq %rax, %rcx
shrq $0x8, %rcx
xorq %rax, %rcx
leaq (%rcx,%rcx,8), %rax
movq %rax, %rcx
shrq $0xf, %rcx
xorq %rax, %rcx
movq %rcx, %rdx
shlq $0x1b, %rdx
notq %rdx
addq %rcx, %rdx
movq %rdx, %rax
shrq $0x1f, %rax
xorq %rdx, %rax
retq
// File: /workspace/github_c_makefile_star2_O2/lh3[P]fermi2/dfs.c
// Function: fm_dfs
void fm_dfs(int n, rld_t *const*e, int is_half, int max_k, int n_threads, fmdfs_f func, fmdfs2_f func2, void *data)
{
	extern void kt_for(int n_threads, void (*func)(void*,long,int), void *data, long n);
	shared_t d;
	int n_suf;
	d.n = n, d.e = e, d.data = data, d.func = func, d.func2 = func2, d.max_k = max_k; d.is_half = is_half;
	d.suf_len = max_k>>1 < DFS_SUF_LEN? max_k>>1 : DFS_SUF_LEN;
	n_suf = 1<<d.suf_len*2;
	n_threads = n_threads < n_suf? n_threads : n_suf;
	kt_for(n_threads, dfs_worker, &d, n_suf);
}

// Assembly:
subq $0x38, %rsp
movl %edx, %eax
movq 0x40(%rsp), %r10
movq 0x48(%rsp), %r11
leaq 0x8(%rsp), %rdx
movl %edi, (%rdx)
movq %rsi, 0x10(%rdx)
movq %r11, 0x18(%rdx)
movq %r9, 0x20(%rdx)
movq %r10, 0x28(%rdx)
movl %ecx, 0x4(%rdx)
sarl %ecx
cmpl $0x5, %ecx
pushq $0x5
popq %rsi
cmovgel %esi, %ecx
movl %eax, 0xc(%rdx)
movl %ecx, 0x8(%rdx)
addl %ecx, %ecx
pushq $0x1
popq %rax
shll %cl, %eax
movl %r8d, %edi
cmpl %r8d, %eax
cmovll %eax, %edi
leaq 0xd(%rip), %rsi         # 0xac73
movq %rax, %rcx
callq 0x247c
addq $0x38, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/lh3[P]fermi2/dfs.c
// Function: dfs_count
static void dfs_count(void *data, int tid, int k, char *path, const fmint6_t *size, int *cont)
{
	dfs_count_t *d = (dfs_count_t*)data;
	int c;
	uint64_t sum = 0;
	for (c = 0; c < 6; ++c) {
		if (size->c[c] < d->min_occ) *cont &= ~(1<<c);
		sum += size->c[c];
	}
	if (k < d->len) return;
	printf("%s\t%ld\n", path, (long)sum);
}

// Assembly:
pushq %rbx
movq %rcx, %rsi
movl %edx, %eax
xorl %ecx, %ecx
movl $0xfffffffe, %r10d      # imm = 0xFFFFFFFE
xorl %edx, %edx
cmpq $0x6, %rcx
je 0xb193
movq (%r8,%rcx,8), %r11
movslq 0xc(%rdi), %rbx
cmpq %rbx, %r11
jae 0xb18b
movl %r10d, %ebx
roll %cl, %ebx
andl %ebx, (%r9)
addq %r11, %rdx
incq %rcx
jmp 0xb170
cmpl %eax, 0x8(%rdi)
jle 0xb19a
popq %rbx
retq
leaq 0xede6(%rip), %rdi      # 0x19f87
xorl %eax, %eax
popq %rbx
jmp 0x2100
// File: /workspace/github_c_makefile_star2_O2/lh3[P]fermi2/seq.c
// Function: write_seq
static void write_seq(const kseq_t *seq, kstring_t *out)
{
	kputc(seq->qual.l? '@' : '>', out);
	kputsn(seq->name.s, seq->name.l, out);
	if (seq->comment.l) {
		kputc(' ', out);
		kputsn(seq->comment.s, seq->comment.l, out);
	}
	kputc('\n', out);
	kputsn(seq->seq.s, seq->seq.l, out);
	if (seq->qual.l) {
		kputsn("\n+\n", 3, out);
		kputsn(seq->qual.s, seq->qual.l, out);
	}
	kputc('\n', out);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
xorl %eax, %eax
cmpl $0x0, 0x30(%rdi)
setne %al
leal 0x3e(,%rax,2), %edi
callq 0xc907
movq 0x8(%r14), %rdi
movl (%r14), %esi
movq %rbx, %rdx
callq 0xc7e5
cmpl $0x0, 0x10(%r14)
je 0xc8b4
pushq $0x20
popq %rdi
movq %rbx, %rsi
callq 0xc907
movq 0x18(%r14), %rdi
movl 0x10(%r14), %esi
movq %rbx, %rdx
callq 0xc7e5
pushq $0xa
popq %rdi
movq %rbx, %rsi
callq 0xc907
movq 0x28(%r14), %rdi
movl 0x20(%r14), %esi
movq %rbx, %rdx
callq 0xc7e5
cmpl $0x0, 0x30(%r14)
je 0xc8f8
leaq 0xd702(%rip), %rdi      # 0x19fdf
pushq $0x3
popq %rsi
movq %rbx, %rdx
callq 0xc7e5
movq 0x38(%r14), %rdi
movl 0x30(%r14), %esi
movq %rbx, %rdx
callq 0xc7e5
pushq $0xa
popq %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xc907
// File: /workspace/github_c_makefile_star2_O2/lh3[P]fermi2/mag.c
// Function: mag_g_merge
void mag_g_merge(mag_t *g, int rmdup, int min_merge_len)
{
	int i;
	uint64_t n = 0;
	double t;
	t = cputime();
	for (i = 0; i < g->v.n; ++i) { // remove multiedges; FIXME: should we do that?
		if (rmdup) {
			v128_rmdup(&g->v.a[i].nei[0]);
			v128_rmdup(&g->v.a[i].nei[1]);
		} else {
			v128_clean(&g->v.a[i].nei[0]);
			v128_clean(&g->v.a[i].nei[1]);
		}
	}
	for (i = 0; i < g->v.n; ++i) {
		magv_t *p = &g->v.a[i];
		if (p->len < 0) continue;
		while (mag_vh_merge_try(g, p, min_merge_len) == 0) ++n;
		mag_v_flip(g, p);
		while (mag_vh_merge_try(g, p, min_merge_len) == 0) ++n;
	}
	if (fm_verbose >= 3)
		fprintf(stderr, "[M::%s] unambiguously merged %ld pairs of vertices in %.3f sec\n", __func__, (long)n, cputime() - t);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
pushq $0x38
popq %r15
xorl %r12d, %r12d
callq 0x3b2e
movsd %xmm0, (%rsp)
movq (%r14), %rax
cmpq %r12, %rax
jbe 0xfb48
movq 0x10(%r14), %rax
leaq (%rax,%r15), %rdi
addq $-0x18, %rdi
testl %ebp, %ebp
je 0xfb2e
callq 0xec3a
movq 0x10(%r14), %rdi
addq %r15, %rdi
callq 0xec3a
jmp 0xfb3f
callq 0xe99b
movq 0x10(%r14), %rdi
addq %r15, %rdi
callq 0xe99b
incq %r12
addq $0x68, %r15
jmp 0xfb03
xorl %r13d, %r13d
xorl %r15d, %r15d
cmpq %r13, %rax
jbe 0xfbaa
movq 0x10(%r14), %r12
imulq $0x68, %r13, %rcx
cmpl $0x0, (%r12,%rcx)
js 0xfba5
addq %rcx, %r12
decq %r15
movq %r15, %rcx
movq %rcx, %r15
movq %r14, %rdi
movq %r12, %rsi
movl %ebx, %edx
callq 0x101f5
leaq 0x1(%r15), %rcx
testl %eax, %eax
je 0xfb6b
movq %r14, %rdi
movq %r12, %rsi
callq 0x1010e
movq %r14, %rdi
movq %r12, %rsi
movl %ebx, %edx
callq 0x101f5
incq %r15
testl %eax, %eax
je 0xfb8e
movq (%r14), %rax
incq %r13
jmp 0xfb4e
leaq 0x126af(%rip), %rax     # 0x22260
cmpl $0x3, (%rax)
jge 0xfbc5
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x1242c(%rip), %rax     # 0x21ff8
movq (%rax), %rbx
callq 0x3b2e
subsd (%rsp), %xmm0
leaq 0xa6ff(%rip), %rsi      # 0x1a2df
leaq 0xa738(%rip), %rdx      # 0x1a31f
movq %rbx, %rdi
movq %r15, %rcx
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x21c0
// File: /workspace/github_c_makefile_star2_O2/lh3[P]fermi2/mag.c
// Function: mag_g_rm_vext
int mag_g_rm_vext(mag_t *g, int min_len, int min_nsr)
{
	int i;
	kvec_t(magv_p) a = {0,0,0};
	double t;

	t = cputime();
	for (i = 0; i < g->v.n; ++i) {
		magv_t *p = &g->v.a[i];
		if (p->len < 0 || (p->nei[0].n > 0 && p->nei[1].n > 0)) continue;
		if (p->len >= min_len || p->nsr >= min_nsr) continue;
		kv_push(magv_p, a, p);
	}
	ks_introsort(vlt1, a.n, a.a);
	for (i = 0; i < a.n; ++i) mag_v_del(g, a.a[i]);
	free(a.a);
	if (fm_verbose >= 3)
		fprintf(stderr, "[M::%s] removed %ld tips in %.3f sec (min_len=%d, min_nsr=%d)\n", __func__, a.n, cputime() - t, min_len, min_nsr);
	return a.n;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, %r12d
movl %esi, %ebx
movq %rdi, %r15
xorl %r13d, %r13d
callq 0x3b2e
movl %ebx, %edx
movsd %xmm0, 0x10(%rsp)
xorl %ebx, %ebx
xorl %esi, %esi
xorl %r8d, %r8d
xorl %r14d, %r14d
movl %edx, 0x8(%rsp)
movl %r12d, 0xc(%rsp)
cmpq %rbx, (%r15)
jbe 0x11777
movq 0x10(%r15), %rbp
movl (%rbp,%r13), %ecx
testl %ecx, %ecx
js 0x1176e
cmpq $0x0, 0x20(%rbp,%r13)
je 0x11722
cmpl %edx, %ecx
jge 0x1176e
cmpq $0x0, 0x38(%rbp,%r13)
je 0x11726
jmp 0x1176e
cmpl %edx, %ecx
jge 0x1176e
cmpl %r12d, 0x4(%rbp,%r13)
jge 0x1176e
cmpq %rsi, %r14
jne 0x1175e
leaq (%rsi,%rsi), %r12
testq %rsi, %rsi
pushq $0x2
popq %rax
cmoveq %rax, %r12
leaq (,%r12,8), %rsi
movq %r8, %rdi
callq 0x2260
movl 0x8(%rsp), %edx
movq %r12, %rsi
movl 0xc(%rsp), %r12d
jmp 0x11761
movq %r8, %rax
addq %r13, %rbp
movq %rax, %r8
movq %rbp, (%rax,%r14,8)
incq %r14
incq %rbx
addq $0x68, %r13
jmp 0x116fa
movq %r14, %rdi
movq %r8, %r13
movq %r8, %rsi
callq 0x10989
xorl %ebx, %ebx
cmpq %rbx, %r14
je 0x1179e
movq (%r13,%rbx,8), %rsi
movq %r15, %rdi
callq 0xff2b
incq %rbx
jmp 0x11787
movq %r13, %rdi
callq 0x2040
leaq 0x10ab3(%rip), %rax     # 0x22260
cmpl $0x3, (%rax)
jge 0x117c4
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x1082d(%rip), %rax     # 0x21ff8
movq (%rax), %r15
callq 0x3b2e
subsd 0x10(%rsp), %xmm0
leaq 0x8b4b(%rip), %rsi      # 0x1a32b
leaq 0x8b83(%rip), %rdx      # 0x1a36a
movq %r15, %rdi
movq %r14, %rcx
movl 0x8(%rsp), %r8d
movl %r12d, %r9d
movb $0x1, %al
callq 0x21c0
jmp 0x117b2
// File: /workspace/github_c_makefile_star2_O2/lh3[P]fermi2/mag.c
// Function: mag_g_rm_vint
int mag_g_rm_vint(mag_t *g, int min_len, int min_nsr, int min_ovlp)
{
	int i;
	kvec_t(magv_p) a = {0,0,0};
	double t;

	t = cputime();
	for (i = 0; i < g->v.n; ++i) {
		magv_t *p = &g->v.a[i];
		if (p->len >= 0 && p->len < min_len && p->nsr < min_nsr)
			kv_push(magv_p, a, p);
	}
	ks_introsort(vlt1, a.n, a.a);
	for (i = 0; i < a.n; ++i) mag_v_transdel(g, a.a[i], min_ovlp);
	free(a.a);
	if (fm_verbose >= 3)
		fprintf(stderr, "[M::%s] removed %ld internal vertices in %.3f sec (min_len=%d, min_nsr=%d)\n", __func__, a.n, cputime() - t, min_len, min_nsr);
	return a.n;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, 0x8(%rsp)
movl %edx, %r13d
movl %esi, 0x4(%rsp)
movq %rdi, %r12
xorl %ebx, %ebx
callq 0x3b2e
movsd %xmm0, 0x10(%rsp)
xorl %ebp, %ebp
xorl %esi, %esi
xorl %eax, %eax
xorl %r14d, %r14d
movl %r13d, 0xc(%rsp)
cmpq %rbp, (%r12)
jbe 0x11899
movq 0x10(%r12), %r15
movl (%r15,%rbx), %ecx
testl %ecx, %ecx
sets %dl
cmpl 0x4(%rsp), %ecx
setge %cl
orb %dl, %cl
jne 0x11890
cmpl %r13d, 0x4(%r15,%rbx)
jge 0x11890
cmpq %rsi, %r14
jne 0x11886
leaq (%rsi,%rsi), %r13
testq %rsi, %rsi
pushq $0x2
popq %rcx
cmoveq %rcx, %r13
leaq (,%r13,8), %rsi
movq %rax, %rdi
callq 0x2260
movq %r13, %rsi
movl 0xc(%rsp), %r13d
addq %rbx, %r15
movq %r15, (%rax,%r14,8)
incq %r14
incq %rbp
addq $0x68, %rbx
jmp 0x11835
movq %r14, %rdi
movq %rax, %r15
movq %rax, %rsi
callq 0x10989
xorl %ebx, %ebx
movl 0x8(%rsp), %ebp
cmpq %rbx, %r14
je 0x118c5
movq (%r15,%rbx,8), %rsi
movq %r12, %rdi
movl %ebp, %edx
callq 0xffe8
incq %rbx
jmp 0x118ad
movq %r15, %rdi
callq 0x2040
leaq 0x1098c(%rip), %rax     # 0x22260
cmpl $0x3, (%rax)
jge 0x118eb
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10706(%rip), %rax     # 0x21ff8
movq (%rax), %r15
callq 0x3b2e
subsd 0x10(%rsp), %xmm0
leaq 0x8a71(%rip), %rsi      # 0x1a378
leaq 0x8ab6(%rip), %rdx      # 0x1a3c4
movq %r15, %rdi
movq %r14, %rcx
movl 0x4(%rsp), %r8d
movl %r13d, %r9d
movb $0x1, %al
callq 0x21c0
jmp 0x118d9