LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/lh3[P]miniprot/index.c
// Function: mp_idx_print_stat
void mp_idx_print_stat(const mp_idx_t *mi, int32_t max_occ)
{
	int64_t tot = 0, sum_large = 0;
	uint32_t i, n, n_occupied = 0, n_large = 0;
	n = mp_n_bucket(&mi->opt);
	for (i = 0; i < n - 1; ++i) {
		int64_t c = mi->ki[i+1] - mi->ki[i];
		if (c > 0) ++n_occupied;
		if (c > max_occ) ++n_large, sum_large += c;
		else tot += c;
	}
	fprintf(stderr, "[M::%s] %d distinct k-mers; mean occ of infrequent k-mers: %.2f; %d frequent k-mers accounting for %ld occurrences\n", __func__,
			n_occupied, (double)tot / (n_occupied - n_large), n_large, (long)sum_large);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl 0x8(%rdi), %ecx
shll $0x2, %ecx
subl 0xc(%rdi), %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
shll %cl, %eax
notl %eax
movslq %esi, %rdx
xorl %esi, %esi
xorl %r11d, %r11d
xorl %r9d, %r9d
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r10d, %r10d
cmpq %r11, %rax
je 0x450a
movq 0x28(%rdi), %rbx
movq 0x8(%rbx,%r11,8), %r14
subq (%rbx,%r11,8), %r14
incq %r11
xorl %ebx, %ebx
testq %r14, %r14
setg %bl
addl %ebx, %ecx
xorl %ebx, %ebx
cmpq %rdx, %r14
setg %bl
movl $0x0, %r15d
cmovgq %r14, %r15
cmovgq %rsi, %r14
addq %r15, %r9
addl %ebx, %r8d
addq %r14, %r10
jmp 0x44ca
movq 0x13adf(%rip), %rax     # 0x17ff0
cvtsi2sd %r10, %xmm0
movl %ecx, %edx
subl %r8d, %edx
cvtsi2sd %rdx, %xmm1
movq (%rax), %rdi
divsd %xmm1, %xmm0
leaq 0xe112(%rip), %rsi      # 0x12640
leaq 0xe17f(%rip), %rdx      # 0x126b4
movb $0x1, %al
popq %rbx
popq %r14
popq %r15
jmp 0x21e0
// File: /workspace/github_c_makefile_star2_O2/lh3[P]miniprot/index.c
// Function: mp_idx_destroy
void mp_idx_destroy(mp_idx_t *mi)
{
	if (mi == 0) return;
	mp_ntseq_destroy(mi->nt);
	free(mi->ki); free(mi->bo); free(mi->kb);
	free(mi);
}

// Assembly:
testq %rdi, %rdi
je 0x4577
pushq %rbx
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
callq 0xad7f
movq 0x28(%rbx), %rdi
callq 0x2050
movq 0x30(%rbx), %rdi
callq 0x2050
movq 0x38(%rbx), %rdi
callq 0x2050
movq %rbx, %rdi
popq %rbx
jmp 0x2050
retq
// File: /workspace/github_c_makefile_star2_O2/lh3[P]miniprot/index.c
// Function: mp_idx_dump
int mp_idx_dump(const char *fn, const mp_idx_t *mi)
{
	FILE *fp;
	fp = strcmp(fn, "-") == 0? stdout : fopen(fn, "wb");
	if (fp == 0) return -1;
	fwrite(MP_IDX_MAGIC, 1, 4, fp);
	fwrite(&mi->opt, sizeof(mi->opt), 1, fp);
	fwrite(&mi->n_kb, 8, 1, fp);
	mp_ntseq_dump(fp, mi->nt);
	fwrite(mi->ki, 8, mp_n_bucket(&mi->opt), fp);
	fwrite(mi->kb, 4, mi->n_kb, fp);
	if (fp != stdout) fclose(fp);
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
cmpb $0x2d, (%rdi)
jne 0x4593
cmpb $0x0, 0x1(%rdi)
je 0x4652
leaq 0xe12c(%rip), %rsi      # 0x126c6
callq 0x22c0
movq %rax, %r14
testq %r14, %r14
je 0x4643
leaq 0xe117(%rip), %rdi      # 0x126c9
pushq $0x1
popq %r12
pushq $0x4
popq %r15
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x2300
pushq $0x14
popq %rsi
movq %rbx, %rdi
movq %r12, %rdx
movq %r14, %rcx
callq 0x2300
leaq 0x20(%rbx), %rdi
pushq $0x8
popq %r13
movq %r13, %rsi
movq %r12, %rdx
movq %r14, %rcx
callq 0x2300
movq 0x18(%rbx), %rsi
movq %r14, %rdi
callq 0xb145
movq 0x28(%rbx), %rdi
movl 0x8(%rbx), %ecx
shll $0x2, %ecx
subl 0xc(%rbx), %ecx
pushq $0x1
popq %rdx
shll %cl, %edx
movq %r13, %rsi
movq %r14, %rcx
callq 0x2300
movq 0x20(%rbx), %rdx
movq 0x38(%rbx), %rdi
movq %r15, %rsi
movq %r14, %rcx
callq 0x2300
movq 0x1398e(%rip), %rax     # 0x17fc0
xorl %ebx, %ebx
cmpq (%rax), %r14
je 0x4646
movq %r14, %rdi
callq 0x20f0
jmp 0x4646
pushq $-0x1
popq %rbx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0x13967(%rip), %rax     # 0x17fc0
movq (%rax), %r14
jmp 0x45a2
// File: /workspace/github_c_makefile_star2_O2/lh3[P]miniprot/index.c
// Function: mp_idx_restore
mp_idx_t *mp_idx_restore(const char *fn)
{
	FILE *fp;
	char magic[4];
	mp_idx_t *mi;

	fp = strcmp(fn, "-") == 0? stdin : fopen(fn, "rb");
	if (fp == 0) return 0;
	fread(magic, 1, 4, fp);
	if (strncmp(magic, MP_IDX_MAGIC, 4) != 0)
		return 0;
	mi = Kcalloc(0, mp_idx_t, 1);
	fread(&mi->opt, sizeof(mi->opt), 1, fp);
	ns_make_tables(mi->opt.trans_code);
	fread(&mi->n_kb, 8, 1, fp);
	mi->nt = mp_ntseq_restore(fp);
	mi->ki = Kmalloc(0, int64_t, mp_n_bucket(&mi->opt));
	mi->kb = Kmalloc(0, uint32_t, mi->n_kb);
	fread(mi->ki, 8, mp_n_bucket(&mi->opt), fp);
	fread(mi->kb, 4, mi->n_kb, fp);
	if (fp != stdin) fclose(fp);
	mi->bo = mp_idx_boff(mi->nt, mi->opt.bbit, &mi->n_block);
	if (mp_verbose >= 3)
		fprintf(stderr, "[M::%s@%.3f*%.2f] loaded the index\n", __func__, mp_realtime(), mp_percent_cpu());
	return mi;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
cmpb $0x2d, (%rdi)
jne 0x467b
cmpb $0x0, 0x1(%rdi)
je 0x47ad
leaq 0xe04c(%rip), %rsi      # 0x126ce
callq 0x22c0
movq %rax, %r14
testq %r14, %r14
je 0x46ad
leaq 0x14(%rsp), %rbx
pushq $0x1
popq %rsi
pushq $0x4
popq %rdx
movq %rbx, %rdi
movq %r14, %rcx
callq 0x20a0
cmpl $0x349504d, (%rbx)      # imm = 0x349504D
je 0x46b4
xorl %ebx, %ebx
jmp 0x479e
pushq $0x1
popq %r12
pushq $0x40
popq %rdx
xorl %edi, %edi
movq %r12, %rsi
callq 0x72e4
movq %rax, %rbx
pushq $0x14
popq %rsi
movq %rax, %rdi
movq %r12, %rdx
movq %r14, %rcx
callq 0x20a0
movl 0x10(%rbx), %edi
callq 0x350c
leaq 0x20(%rbx), %rdi
pushq $0x8
popq %r15
movq %r15, %rsi
movq %r12, %rdx
movq %r14, %rcx
callq 0x20a0
movq %r14, %rdi
callq 0xb206
movq %rax, 0x18(%rbx)
movl 0x8(%rbx), %ecx
shll $0x2, %ecx
subl 0xc(%rbx), %ecx
pushq $0x1
popq %r12
movl %r12d, %esi
shll %cl, %esi
shlq $0x3, %rsi
xorl %edi, %edi
callq 0x7460
movq %rax, 0x28(%rbx)
movq 0x20(%rbx), %rsi
shlq $0x2, %rsi
xorl %edi, %edi
callq 0x7460
movq %rax, 0x38(%rbx)
movq 0x28(%rbx), %rdi
movl 0x8(%rbx), %ecx
shll $0x2, %ecx
subl 0xc(%rbx), %ecx
shll %cl, %r12d
movq %r15, %rsi
movq %r12, %rdx
movq %r14, %rcx
callq 0x20a0
movq 0x20(%rbx), %rdx
movq 0x38(%rbx), %rdi
pushq $0x4
popq %rsi
movq %r14, %rcx
callq 0x20a0
movq 0x13859(%rip), %rax     # 0x17fc8
cmpq (%rax), %r14
je 0x477c
movq %r14, %rdi
callq 0x20f0
movq 0x18(%rbx), %rdi
movl (%rbx), %esi
movq %rbx, %rdx
addq $0x14, %rdx
callq 0x3f0c
movq %rax, 0x30(%rbx)
leaq 0x13c57(%rip), %rax     # 0x183f0
cmpl $0x3, (%rax)
jge 0x47bc
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x13814(%rip), %rax     # 0x17fc8
movq (%rax), %r14
jmp 0x468a
movq 0x1382d(%rip), %rax     # 0x17ff0
movq (%rax), %r14
callq 0x3801
movsd %xmm0, 0x8(%rsp)
callq 0x3852
movaps %xmm0, %xmm1
leaq 0xdef1(%rip), %rsi      # 0x126d1
leaq 0xdf0e(%rip), %rdx      # 0x126f5
movq %r14, %rdi
movsd 0x8(%rsp), %xmm0
movb $0x2, %al
callq 0x21e0
jmp 0x479e
// File: /workspace/github_c_makefile_star2_O2/lh3[P]miniprot/index.c
// Function: mp_idx_load
mp_idx_t *mp_idx_load(const char *fn, const mp_idxopt_t *io, int32_t n_threads)
{
	int64_t is_idx;
	is_idx = mp_idx_is_idx(fn);
	if (is_idx < 0) return 0;
	return is_idx? mp_idx_restore(fn) : mp_idx_build(fn, io, n_threads);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
cmpb $0x2d, (%rdi)
jne 0x4819
cmpb $0x0, 0x1(%r15)
je 0x487c
movq %r15, %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x22b0
testl %eax, %eax
js 0x4895
movl %eax, %ebp
pushq $0x2
popq %rdx
movl %eax, %edi
xorl %esi, %esi
callq 0x2130
cmpq $0x4, %rax
jl 0x4875
movl %ebp, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2130
leaq 0xc(%rsp), %rsi
pushq $0x4
popq %rdx
movl %ebp, %edi
callq 0x2190
cmpq $0x4, %rax
jne 0x4875
leaq 0xde65(%rip), %rsi      # 0x126c9
leaq 0xc(%rsp), %rdi
pushq $0x3
popq %rdx
callq 0x2240
testl %eax, %eax
je 0x48a4
movl %ebp, %edi
callq 0x2170
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x401c
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0xde1e(%rip), %rsi      # 0x126c9
leaq 0xc(%rsp), %rdi
pushq $0x4
popq %rdx
callq 0x21a0
movl %eax, %r12d
movl %ebp, %edi
callq 0x2170
testl %r12d, %r12d
jg 0x487c
movq %r15, %rdi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x4661
// File: /workspace/github_c_makefile_star2_O2/lh3[P]miniprot/index.c
// Function: mp_set_spsc
void mp_set_spsc(const char *fn, mp_idx_t *mi, mp_mapopt_t *mo, int32_t keep_io)
{
	int32_t max_sc;
	if (fn == 0) return;
	if (!keep_io) mo->io += 10, mo->io_end += 10;
	max_sc = (mo->io + 1) / 2 - 1;
	if (max_sc > mo->io - mo->go) max_sc = mo->io - mo->go;
	if (max_sc > mo->sp_max_bonus) max_sc = mo->sp_max_bonus;
	mp_ntseq_read_spsc(mi->nt, fn, max_sc);
}

// Assembly:
testq %rdi, %rdi
je 0x492f
movq %rdx, %r8
movq %rdi, %r10
movl 0x6c(%rdx), %r9d
testl %ecx, %ecx
jne 0x48fb
addl $0xa, %r9d
movl %r9d, 0x6c(%r8)
addl $0xa, 0x74(%r8)
leal 0x1(%r9), %eax
pushq $0x2
popq %rcx
cltd
idivl %ecx
subl 0x64(%r8), %r9d
decl %eax
cmpl %r9d, %eax
cmovll %eax, %r9d
movl 0x84(%r8), %eax
cmpl %eax, %r9d
cmovgel %eax, %r9d
movq 0x18(%rsi), %rdi
movq %r10, %rsi
movl %r9d, %edx
jmp 0xb804
retq
// File: /workspace/github_c_makefile_star2_O2/lh3[P]miniprot/map.c
// Function: mp_tbuf_init
mp_tbuf_t *mp_tbuf_init(void)
{
	mp_tbuf_t *b;
	b = Kcalloc(0, mp_tbuf_t, 1);
	if (!(mp_dbg_flag & MP_DBG_NO_KALLOC))
		b->km = km_init();
	return b;
}

// Assembly:
pushq %rbx
pushq $0x1
popq %rsi
pushq $0x10
popq %rdx
xorl %edi, %edi
callq 0x72e4
movq %rax, %rbx
leaq 0x13e48(%rip), %rax     # 0x18790
testb $0x1, (%rax)
jne 0x4955
callq 0x7327
movq %rax, (%rbx)
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/lh3[P]miniprot/map.c
// Function: mp_map_file
int32_t mp_map_file(const mp_idx_t *idx, const char *fn, const mp_mapopt_t *opt, int n_threads)
{
	pipeline_t pl;
	memset(&pl, 0, sizeof(pipeline_t));
	pl.fp = mp_bseq_open(fn);
	if (pl.fp == 0) return -1;
	pl.opt = opt, pl.mi = idx;
	pl.n_threads = n_threads > 1? n_threads : 1;
	if (opt->flag & MP_F_GFF) puts("##gff-version 3");
	kt_pipeline(2, worker_pipeline, &pl, 3);
	free(pl.str.s);
	mp_bseq_close(pl.fp);
	return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movl %ecx, %ebp
movq %rdx, %rbx
movq %rdi, %r14
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
movq %rsi, %rdi
callq 0xc12c
movq %rax, 0x18(%rsp)
testq %rax, %rax
je 0x57f0
movq %rbx, 0x10(%rsp)
cmpl $0x2, %ebp
pushq $0x1
popq %rax
cmovgel %ebp, %eax
movq %r14, 0x20(%rsp)
movl %eax, (%rsp)
testb $0x8, (%rbx)
je 0x57c2
leaq 0xcfad(%rip), %rdi      # 0x1276a
callq 0x2090
leaq 0x33(%rip), %rsi        # 0x57fc
pushq $0x2
popq %rdi
movq %rsp, %rbx
pushq $0x3
popq %rcx
movq %rbx, %rdx
callq 0x7915
movq 0x38(%rbx), %rdi
callq 0x2050
movq 0x18(%rbx), %rdi
callq 0xc191
xorl %eax, %eax
jmp 0x57f3
pushq $-0x1
popq %rax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/lh3[P]miniprot/map.c
// Function: worker_for
static void worker_for(void *_data, long i, int tid) // kt_for() callback
{
    step_t *s = (step_t*)_data;
	mp_bseq1_t *seq = &s->seq[i];
	if (mp_dbg_flag & MP_DBG_QNAME)
		fprintf(stderr, "QR\t%s\t%d\t%d\n", s->seq[i].name, s->seq[i].l_seq, tid);
	s->reg[i] = mp_map(s->p->mi, seq->l_seq, seq->seq, &s->n_reg[i], s->buf[tid], s->p->opt, seq->name);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %r15
shlq $0x5, %r15
leaq 0x12be0(%rip), %rax     # 0x18790
addq 0x10(%rdi), %r15
testb $0x2, (%rax)
jne 0x5bfa
movq (%r14), %rax
movq 0x28(%r14), %r8
movq 0x10(%rax), %r9
movq 0x20(%rax), %rdi
movl (%r15), %esi
movq 0x10(%r15), %rdx
leaq (,%rbx,4), %rcx
addq 0x18(%r14), %rcx
movslq %ebp, %rax
movq (%r8,%rax,8), %r8
callq 0x4975
movq 0x20(%r14), %rcx
movq %rax, (%rcx,%rbx,8)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x123ef(%rip), %rax     # 0x17ff0
movq (%rax), %rdi
movq 0x8(%r15), %rdx
movl (%r15), %ecx
leaq 0xcbb8(%rip), %rsi      # 0x127ca
movl %ebp, %r8d
xorl %eax, %eax
callq 0x21e0
jmp 0x5bb9
nop
// File: /workspace/github_c_makefile_star2_O2/lh3[P]miniprot/align.c
// Function: mp_align_seq
static int32_t mp_align_seq(void *km, const mp_mapopt_t *opt, const ns_opt_t *ns_opt0, int32_t nlen, const uint8_t *nseq, int32_t alen, const char *aseq, const uint8_t *ss, mp_cigar_t *cigar)
{
	int32_t i;
	if (nlen == alen * 3 && alen <= opt->kmer2) {
		cigar->c = ns_push_cigar(km, &cigar->n, &cigar->m, cigar->c, NS_CIGAR_M, alen);
		return mp_score_ungapped(alen, nseq, aseq, opt->asize, opt->mat);
	} else {
		ns_opt_t ns_opt = *ns_opt0;
		ns_rst_t rst;
		ns_opt.flag |= NS_F_CIGAR;
		ns_rst_init(&rst);
		ns_global_gs16b(km, (const char*)nseq, nlen, aseq, alen, &ns_opt, ss, &rst);
		//printf("%d\t%d\t%d\t%d\n", nlen, alen, rst.score, rst.n_cigar);
		for (i = 0; i < rst.n_cigar; ++i)
			cigar->c = ns_push_cigar(km, &cigar->n, &cigar->m, cigar->c, rst.cigar[i]&0xf, rst.cigar[i]>>4);
		kfree(km, rst.cigar);
		return rst.score;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %r8, %rbx
movl %ecx, %eax
movq %rdi, %r13
movq 0xd0(%rsp), %r12
movq 0xc0(%rsp), %r14
leal (%r9,%r9,2), %ecx
cmpl %eax, %ecx
jne 0x70ca
movq %rsi, %r15
cmpl %r9d, 0x60(%rsi)
jge 0x7179
movq 0xc8(%rsp), %r10
pushq $0xc
popq %rcx
leaq 0x28(%rsp), %r15
movq %r15, %rdi
movq %rdx, %rsi
rep  movsq (%rsi), %es:(%rdi)
orb $0x1, (%r15)
xorps %xmm0, %xmm0
movq %rsp, %r11
movaps %xmm0, (%r11)
movaps %xmm0, 0x10(%r11)
movq %r13, %rdi
movq %rbx, %rsi
movl %eax, %edx
movq %r14, %rcx
movl %r9d, %r8d
movq %r15, %r9
pushq %r11
pushq %r10
callq 0x7b40
addq $0x10, %rsp
leaq 0x4(%r12), %rbx
xorl %r14d, %r14d
movslq (%rsp), %rax
cmpq %rax, %r14
jge 0x7156
movq 0x8(%r12), %rcx
movq 0x18(%rsp), %rax
movl (%rax,%r14,4), %r9d
movl %r9d, %r8d
andl $0xf, %r8d
shrl $0x4, %r9d
movq %r13, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x722a
movq %rax, 0x8(%r12)
incq %r14
jmp 0x711c
movq 0x18(%rsp), %rsi
movq %r13, %rdi
callq 0x736b
movl 0x10(%rsp), %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4(%r12), %rdx
movq 0x8(%r12), %rcx
xorl %ebp, %ebp
movq %r13, %rdi
movq %r12, %rsi
xorl %r8d, %r8d
movq %r9, %r13
callq 0x722a
movq %rax, 0x8(%r12)
movslq 0x94(%r15), %rcx
movslq %r13d, %rdx
leaq 0x11564(%rip), %rsi     # 0x18710
leaq 0x1135d(%rip), %rdi     # 0x18510
leaq 0x58(%rdi), %r8
xorl %eax, %eax
cmpq %rdx, %rbp
jge 0x7167
movb (%rbx,%rbp), %r9b
movb 0x1(%rbx,%rbp), %r10b
movl %r9d, %r11d
shlb $0x4, %r11b
leal (,%r10,4), %r12d
orb %r11b, %r12b
movb 0x2(%rbx,%rbp), %r11b
orb %r11b, %r12b
movzbl %r12b, %r12d
addq %rsi, %r12
cmpb $0x4, %r11b
cmovaeq %r8, %r12
cmpb $0x4, %r10b
cmovaeq %r8, %r12
cmpb $0x4, %r9b
cmovaeq %r8, %r12
movzbl (%r12), %r9d
imulq %rcx, %r9
movzbl (%r14), %r10d
movzbl (%rdi,%r10), %r10d
addq %r9, %r10
movsbl 0xa8(%r15,%r10), %r9d
addl %r9d, %eax
addq $0x3, %rbp
incq %r14
jmp 0x71b9
// File: /workspace/github_c_makefile_star2_O2/lh3[P]miniprot/./nasw.h
// Function: ns_push_cigar
static inline uint32_t *ns_push_cigar(void *km, int32_t *n_cigar, int32_t *m_cigar, uint32_t *cigar, uint32_t op, int32_t len)
{
	if (*n_cigar == 0 || op != (cigar[(*n_cigar) - 1]&0xf) || op == NS_CIGAR_F || op == NS_CIGAR_G) {
		if (*n_cigar == *m_cigar) {
			(*m_cigar) += ((*m_cigar)>>1) + 8;
			cigar = Krealloc(km, uint32_t, cigar, *m_cigar);
		}
		cigar[(*n_cigar)++] = len<<4 | op;
	} else cigar[(*n_cigar)-1] += len<<4;
	return cigar;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %r9d, %ebx
movl %r8d, %ebp
movq %rcx, %rax
movq %rsi, %r14
movslq (%rsi), %rcx
testq %rcx, %rcx
je 0x7267
movl %ebp, %esi
andl $-0x2, %esi
cmpl $0xa, %esi
je 0x7267
movl -0x4(%rax,%rcx,4), %esi
movl %esi, %r8d
andl $0xf, %r8d
cmpl %ebp, %r8d
jne 0x7267
shll $0x4, %ebx
addl %ebx, %esi
movl %esi, -0x4(%rax,%rcx,4)
jmp 0x7299
cmpl (%rdx), %ecx
jne 0x7288
movl %ecx, %esi
sarl %esi
addl %esi, %ecx
addl $0x8, %ecx
movl %ecx, (%rdx)
movslq %ecx, %rdx
shlq $0x2, %rdx
movq %rax, %rsi
callq 0x7568
movl (%r14), %ecx
shll $0x4, %ebx
orl %ebp, %ebx
leal 0x1(%rcx), %edx
movl %edx, (%r14)
movslq %ecx, %rcx
movl %ebx, (%rax,%rcx,4)
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/lh3[P]miniprot/nasw-sse.c
// Function: ns_prep_nas
static void ns_prep_nas(const char *ns, int32_t nl, const ns_opt_t *opt, uint8_t *nas)
{
	int32_t i, l;
	uint8_t codon;
	memset(nas, opt->aa20['X'], nl);
	for (i = l = 0, codon = 0; i < nl; ++i) { // generate the real nas[]
		uint8_t c = opt->nt4[(uint8_t)ns[i]];
		if (c < 4) {
			codon = (codon << 2 | c) & 0x3f;
			if (++l >= 3)
				nas[i] = opt->codon[codon];
		} else codon = 0, l = 0;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rdi, %r15
movq 0x50(%rdx), %rax
movslq %esi, %r12
movzbl 0x58(%rax), %esi
movq %rcx, %rdi
movq %r12, %rdx
callq 0x2160
xorl %eax, %eax
testl %r12d, %r12d
cmovlel %eax, %r12d
xorl %ecx, %ecx
xorl %esi, %esi
cmpq %rax, %r12
je 0xa495
movq 0x48(%r14), %rdx
movzbl (%r15,%rax), %edi
movzbl (%rdx,%rdi), %r8d
xorl %edi, %edi
movl $0x0, %edx
cmpq $0x3, %r8
ja 0xa48c
andl $0xf, %esi
leaq (%r8,%rsi,4), %rdx
leal 0x1(%rcx), %edi
cmpl $0x2, %ecx
jl 0xa48c
movq 0x58(%r14), %rcx
movb (%rcx,%rdx), %cl
movb %cl, (%rbx,%rax)
incq %rax
movl %edi, %ecx
movl %edx, %esi
jmp 0xa453
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/lh3[P]miniprot/ntseq.c
// Function: mp_ntseq_destroy
void mp_ntseq_destroy(mp_ntdb_t *db)
{
	mp_strmap_t *h = (mp_strmap_t*)db->h;
	if (db == 0) return;
	if (h) mp_strmap_destroy(h);
	if (db->spsc) free(db->spsc);
	free(db->ctg); free(db->seq); free(db->name);
	free(db);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x38(%rdi), %r14
testq %r14, %r14
je 0xadb6
movq (%r14), %r15
movq 0x18(%r14), %rsi
movq %r15, %rdi
callq 0x736b
movq 0x10(%r14), %rsi
movq %r15, %rdi
callq 0x736b
movq %r15, %rdi
movq %r14, %rsi
callq 0x736b
movq 0x40(%rbx), %rdi
callq 0x2050
movq 0x28(%rbx), %rdi
callq 0x2050
movq 0x20(%rbx), %rdi
callq 0x2050
movq 0x30(%rbx), %rdi
callq 0x2050
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2050
// File: /workspace/github_c_makefile_star2_O2/lh3[P]miniprot/ntseq.c
// Function: mp_ntseq_get
int64_t mp_ntseq_get(const mp_ntdb_t *db, int32_t cid, int64_t st, int64_t en, int32_t rev, uint8_t *seq)
{
	int64_t i, s, e, k;
	if (cid >= db->n_ctg || cid < 0) return -1;
	if (en < 0 || en > db->ctg[cid].len) en = db->ctg[cid].len;
	s = db->ctg[cid].off + st;
	e = db->ctg[cid].off + en;
	if (!rev) {
		for (i = s, k = 0; i < e; ++i)
			seq[k++] = db->seq[i>>1] >> ((i&1) * 4) & 0xf;
	} else {
		for (i = e - 1, k = 0; i >= s; --i) {
			uint8_t c = db->seq[i>>1] >> ((i&1) * 4) & 0xf;
			seq[k++] = c >= 4? c : 3 - c;
		}
	}
	return k;
}

// Assembly:
pushq $-0x1
popq %rax
testl %esi, %esi
js 0xaeaf
cmpl %esi, (%rdi)
jle 0xaeaf
movq 0x28(%rdi), %rax
movl %esi, %esi
imulq $0x18, %rsi, %rsi
movq 0x8(%rax,%rsi), %r11
cmpq %rcx, %r11
movq %rcx, %r10
cmovlq %r11, %r10
testq %rcx, %rcx
cmovsq %r11, %r10
movq (%rax,%rsi), %rax
addq %rax, %rdx
leaq (%rax,%r10), %rsi
testl %r8d, %r8d
je 0xae77
addl %eax, %r10d
shlb $0x2, %r10b
addb $-0x4, %r10b
xorl %eax, %eax
cmpq %rdx, %rsi
jle 0xaeaf
decq %rsi
movq 0x20(%rdi), %rcx
movq %rsi, %r8
sarq %r8
movb (%rcx,%r8), %r8b
movl %r10d, %ecx
andb $0x4, %cl
shrb %cl, %r8b
andb $0xf, %r8b
movb $0x3, %cl
subb %r8b, %cl
movzbl %r8b, %r8d
movzbl %cl, %ecx
cmovbl %r8d, %ecx
movb %cl, (%r9,%rax)
incq %rax
addb $-0x4, %r10b
jmp 0xae37
leal (,%rdx,4), %r8d
xorl %eax, %eax
leaq (%rdx,%rax), %rcx
cmpq %rsi, %rcx
jge 0xaeaf
movq 0x20(%rdi), %r10
sarq %rcx
movb (%r10,%rcx), %r10b
movl %r8d, %ecx
andb $0x4, %cl
shrb %cl, %r10b
andb $0xf, %r10b
movb %r10b, (%r9,%rax)
incq %rax
addb $0x4, %r8b
jmp 0xae81
retq
// File: /workspace/github_c_makefile_star2_O2/lh3[P]miniprot/ntseq.c
// Function: mp_ntseq_get_by_v
int64_t mp_ntseq_get_by_v(const mp_ntdb_t *nt, int32_t vid, int64_t st, int64_t en, uint8_t *seq)
{
	int64_t ctg_len = nt->ctg[vid>>1].len;
	if (st < 0 || en < 0 || st >= ctg_len) return -1;
	en = en <= ctg_len? en : ctg_len;
	return mp_ntseq_get(nt, vid>>1, vid&1? ctg_len - en : st, vid&1? ctg_len - st : en, vid&1, seq);
}

// Assembly:
pushq %rbx
movq %r8, %r9
movl %esi, %r8d
movq 0x28(%rdi), %rax
sarl %esi
movslq %esi, %r10
imulq $0x18, %r10, %r10
movq 0x8(%rax,%r10), %rax
movq %rcx, %r10
orq %rdx, %r10
setns %r11b
movq %rax, %r10
subq %rdx, %r10
setg %bl
andb %r11b, %bl
cmpb $0x1, %bl
jne 0xaf06
cmpq %rcx, %rax
cmovlq %rax, %rcx
subq %rcx, %rax
andl $0x1, %r8d
cmoveq %rdx, %rax
cmoveq %rcx, %r10
movq %rax, %rdx
movq %r10, %rcx
popq %rbx
jmp 0xade7
movabsq $-0x1, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/lh3[P]miniprot/ntseq.c
// Function: mp_ntseq_spsc_get
int64_t mp_ntseq_spsc_get(const mp_ntdb_t *db, int32_t cid, int64_t st0, int64_t en0, int32_t rev, uint8_t *sc)
{
	int64_t st, en;
	const mp_spsc_t *s;
	if (cid >= db->n_ctg || cid < 0 || db->spsc == 0) return -1;
	if (en0 < 0 || en0 > db->ctg[cid].len) en0 = db->ctg[cid].len;
	if (!rev) st = st0, en = en0;
	else st = db->ctg[cid].len - en0, en = db->ctg[cid].len - st0;
	memset(sc, 0xff, en - st);
	s = &db->spsc[cid << 1 | (!!rev)];
	if (s->n > 0) {
		int32_t j, l, r;
		l = mp_ntseq_find_intv(s->n, s->a, st);
		r = mp_ntseq_find_intv(s->n, s->a, en);
		for (j = l + 1; j <= r; ++j) {
			int64_t x = (s->a[j]>>8) - st;
			uint8_t score = s->a[j] & 0xff;
			assert(x <= en - st);
			if (x == en - st) continue;
			if (sc[x] == 0xff || sc[x] < score) sc[x] = score;
		}
	}
	return en - st;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
pushq $-0x1
popq %r15
testl %esi, %esi
js 0xb038
movl %esi, %r13d
movq %rdi, %rbp
cmpl %esi, (%rdi)
jle 0xb038
cmpq $0x0, 0x40(%rbp)
je 0xb038
movq %r9, %rbx
movq %rdx, %r14
movq 0x28(%rbp), %rax
movl %r13d, %edx
imulq $0x18, %rdx, %rsi
movq 0x8(%rax,%rsi), %rsi
cmpq %rcx, %rsi
movq %rcx, %r12
cmovlq %rsi, %r12
testq %rcx, %rcx
cmovsq %rsi, %r12
testl %r8d, %r8d
je 0xaf86
imulq $0x18, %rdx, %rcx
movq 0x8(%rax,%rcx), %rax
movq %rax, %rcx
subq %r12, %rcx
subq %r14, %rax
movq %rax, %r12
movq %rcx, %r14
xorl %eax, %eax
testl %r8d, %r8d
setne %al
movq %rax, (%rsp)
movq %r12, %r15
subq %r14, %r15
movq %rbx, %rdi
movl $0xff, %esi
movq %r15, %rdx
callq 0x2160
movq 0x40(%rbp), %rbp
movq (%rsp), %rax
leal (%rax,%r13,2), %eax
cltq
shlq $0x4, %rax
movl (%rbp,%rax), %edi
testl %edi, %edi
je 0xb038
addq %rax, %rbp
movq 0x8(%rbp), %rsi
movq %r14, %rdx
callq 0xb069
movl %eax, %r13d
movl (%rbp), %edi
movq 0x8(%rbp), %rsi
movq %r12, %rdx
callq 0xb069
movslq %r13d, %rcx
cltq
movl $0xff, %r10d
cmpq %rax, %rcx
jge 0xb038
movq 0x8(%rbp), %rdx
movq 0x8(%rdx,%rcx,8), %rdx
movq %rdx, %rdi
shrq $0x8, %rdi
movq %rdi, %rsi
subq %r14, %rsi
cmpq %r15, %rsi
jg 0xb04a
cmpq %r12, %rdi
je 0xb033
movzbl (%rbx,%rsi), %edi
cmpl %r10d, %edi
setne %r8b
movl %edx, %r9d
andl %r10d, %r9d
cmpl %edi, %r9d
setbe %dil
testb %dil, %r8b
jne 0xb033
movb %dl, (%rbx,%rsi)
incq %rcx
jmp 0xafee
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x7da1(%rip), %rdi      # 0x12df2
leaq 0x7da7(%rip), %rsi      # 0x12dff
leaq 0x7da8(%rip), %rcx      # 0x12e07
movl $0x93, %edx
callq 0x2150
// File: /workspace/github_c_makefile_star2_O2/lh3[P]miniprot/ntseq.c
// Function: mp_ntseq_dump
void mp_ntseq_dump(FILE *fp, const mp_ntdb_t *nt)
{
	int32_t i, x[2];
	int64_t l = (nt->l_seq + 1) >> 1;
	x[0] = nt->n_ctg, x[1] = nt->l_name;
	fwrite(x, 4, 2, fp);
	fwrite(&nt->l_seq, 8, 1, fp);
	for (i = 0; i < nt->n_ctg; ++i)
		fwrite(&nt->ctg[i].len, 8, 1, fp);
	fwrite(nt->seq, 1, l, fp);
	fwrite(nt->name, 1, nt->l_name, fp);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rsi), %rbp
movq 0x10(%rsi), %rax
movq %rax, 0x8(%rsp)
movl (%rsi), %eax
leaq 0x10(%rsp), %rdi
movl %eax, (%rdi)
movl 0x8(%rsi), %eax
movl %eax, 0x4(%rdi)
pushq $0x4
popq %rsi
pushq $0x2
popq %rdx
movq %rbx, %rcx
callq 0x2300
pushq $0x8
popq %r15
pushq $0x1
popq %r13
movq %rbp, %rdi
movq %r15, %rsi
movq %r13, %rdx
movq %rbx, %rcx
callq 0x2300
xorl %ebp, %ebp
movq %r15, %r12
movslq (%r14), %rax
cmpq %rax, %rbp
jge 0xb1c7
movq 0x28(%r14), %rdi
addq %r12, %rdi
movq %r15, %rsi
movq %r13, %rdx
movq %rbx, %rcx
callq 0x2300
incq %rbp
addq $0x18, %r12
jmp 0xb1a1
movq 0x8(%rsp), %rdx
incq %rdx
sarq %rdx
movq 0x20(%r14), %rdi
pushq $0x1
popq %r12
movq %r12, %rsi
movq %rbx, %rcx
callq 0x2300
movq 0x30(%r14), %rdi
movslq 0x8(%r14), %rdx
movq %r12, %rsi
movq %rbx, %rcx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2300
// File: /workspace/github_c_makefile_star2_O2/lh3[P]miniprot/ntseq.c
// Function: mp_ntseq_restore
mp_ntdb_t *mp_ntseq_restore(FILE *fp)
{
	int32_t i, x[2];
	int64_t off = 0, l;
	mp_ntdb_t *nt;
	char *p;

	nt = Kcalloc(0, mp_ntdb_t, 1);
	fread(x, 4, 2, fp);
	fread(&nt->l_seq, 8, 1, fp);
	nt->n_ctg = nt->m_ctg = x[0];
	nt->l_name = x[1];
	nt->m_seq = nt->l_seq;
	l = (nt->l_seq + 1) >> 1;
	nt->ctg = Kcalloc(0, mp_ctg_t, nt->n_ctg);
	for (i = 0; i < nt->n_ctg; ++i) {
		fread(&nt->ctg[i].len, 8, 1, fp);
		nt->ctg[i].off = off;
		off += nt->ctg[i].len;
	}
	nt->seq = Kmalloc(0, uint8_t, l);
	nt->name = Kmalloc(0, char, nt->l_name);
	fread(nt->seq, 1, l, fp);
	fread(nt->name, 1, nt->l_name, fp);
	for (i = 0, p = nt->name; i < nt->n_ctg; ++i) {
		nt->ctg[i].name = p;
		p += strlen(p) + 1;
	}
	return nt;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r14
xorl %ebp, %ebp
pushq $0x1
popq %r15
pushq $0x48
popq %rdx
xorl %edi, %edi
movq %r15, %rsi
callq 0x72e4
movq %rax, %rbx
leaq 0x10(%rsp), %r13
pushq $0x4
popq %rsi
pushq $0x2
popq %rdx
movq %r13, %rdi
movq %r14, %rcx
callq 0x20a0
leaq 0x10(%rbx), %rdi
pushq $0x8
popq %r12
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x20a0
movq (%r13), %rax
movl %eax, (%rbx)
movq %rax, 0x4(%rbx)
movq 0x10(%rbx), %rcx
movq %rcx, 0x18(%rbx)
incq %rcx
movq %rcx, 0x8(%rsp)
movslq %eax, %rsi
pushq $0x18
popq %rdx
xorl %edi, %edi
callq 0x72e4
movq %rax, %rdi
movq %rax, 0x28(%rbx)
movq %r12, %r13
xorl %r15d, %r15d
movslq (%rbx), %rax
cmpq %rax, %rbp
jge 0xb2bc
addq %r13, %rdi
movq %r12, %rsi
pushq $0x1
popq %rdx
movq %r14, %rcx
callq 0x20a0
movq 0x28(%rbx), %rdi
movq %r15, -0x8(%rdi,%r13)
addq (%rdi,%r13), %r15
incq %rbp
addq $0x18, %r13
jmp 0xb28d
movq 0x8(%rsp), %r12
sarq %r12
xorl %r13d, %r13d
xorl %edi, %edi
movq %r12, %rsi
callq 0x7460
movq %rax, 0x20(%rbx)
movslq 0x8(%rbx), %rsi
xorl %edi, %edi
callq 0x7460
movq %rax, 0x30(%rbx)
movq 0x20(%rbx), %rdi
pushq $0x1
popq %r15
movq %r15, %rsi
movq %r12, %rdx
movq %r14, %rcx
callq 0x20a0
movq 0x30(%rbx), %rdi
movslq 0x8(%rbx), %rdx
movq %r15, %rsi
movq %r14, %rcx
callq 0x20a0
movq 0x30(%rbx), %r14
movslq (%rbx), %r15
pushq $0x10
popq %r12
cmpq %r15, %r13
jge 0xb33c
movq 0x28(%rbx), %rax
movq %r14, (%rax,%r12)
movq %r14, %rdi
callq 0x2100
addq %rax, %r14
incq %r14
incq %r13
addq $0x18, %r12
jmp 0xb318
movq %rbx, %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]miniprot/ntseq.c
// Function: mp_ntseq_name2id
int32_t mp_ntseq_name2id(const mp_ntdb_t *nt, const char *name)
{
	const mp_strmap_t *h = (const mp_strmap_t*)nt->h;
	khint_t k;
	if (h == 0) return -1;
	k = mp_strmap_get(h, name);
	return k == kh_end(h)? -1 : kh_val(h, k);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq 0x38(%rdi), %r12
pushq $-0x1
popq %rbx
testq %r12, %r12
je 0xb7db
movq %rsi, %r14
movq %rsi, %rdi
callq 0xbb35
movq 0x18(%r12), %rcx
movq %rcx, 0x8(%rsp)
testq %rcx, %rcx
je 0xb7db
movb 0x8(%r12), %cl
pushq $0x1
popq %rdx
shll %cl, %edx
imull $0x9e3779b9, %eax, %ebx # imm = 0x9E3779B9
negb %cl
shrl %cl, %ebx
movq %rdx, 0x10(%rsp)
leal -0x1(%rdx), %r13d
movq 0x10(%r12), %r12
movl %ebx, %ebp
movl %ebp, %eax
shrl $0x5, %eax
movl (%r12,%rax,4), %eax
btl %ebp, %eax
jae 0xb7d8
movl %ebp, %r15d
imulq $0xc, %r15, %rax
movq 0x8(%rsp), %rcx
movq (%rcx,%rax), %rdi
movq %r14, %rsi
callq 0x21c0
testl %eax, %eax
je 0xb7ec
incl %ebp
andl %r13d, %ebp
cmpl %ebx, %ebp
jne 0xb7a5
pushq $-0x1
popq %rbx
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl 0x10(%rsp), %ebp
pushq $-0x1
popq %rbx
je 0xb7db
imulq $0xc, %r15, %rax
movq 0x8(%rsp), %rcx
movl 0x8(%rcx,%rax), %ebx
jmp 0xb7db
// File: /workspace/github_c_makefile_star2_O2/lh3[P]miniprot/sketch.c
// Function: mp_sketch_prot
void mp_sketch_prot(void *km, const char *seq, int32_t len, int32_t kmer, int32_t mod_bit, mp64_v *a)
{
	int32_t i, l = 0;
	uint32_t x = 0, y, mask_k = (1U<<kmer*MP_BITS_PER_AA) - 1, mask_mod = (1U<<mod_bit) - 1;
	a->n = 0;
	for (i = 0; i < len; ++i) {
		int32_t c = ns_tab_aa13[(uint8_t)seq[i]];
		if (c < 14) {
			#if MP_BITS_PER_AA == 4
			x = (x<<MP_BITS_PER_AA | c) & mask_k;
			#else
			x = (x<<MP_BITS_PER_AA | c>>1) & mask_k;
			#endif
			if (++l >= kmer) {
				y = mp_hash32_mask(x, mask_k);
				if ((y&mask_mod) == 0)
					kv_push(uint64_t, km, *a, (uint64_t)(y>>mod_bit)<<32 | i);
			}
		} else x = 0, l = 0;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %ecx, %r10d
leal (,%r10,4), %ecx
pushq $-0x1
popq %rax
movl %eax, %r11d
shll %cl, %r11d
movq %rdi, 0x30(%rsp)
notl %r11d
movl %r8d, 0x18(%rsp)
movl %r8d, %ecx
shll %cl, %eax
notl %eax
movl %eax, 0x1c(%rsp)
andl $0x0, (%r9)
xorl %ecx, %ecx
testl %edx, %edx
movl $0x0, %eax
movq %rax, 0x20(%rsp)
cmovlel %ecx, %edx
leaq 0xca6a(%rip), %rdi      # 0x18610
xorl %r14d, %r14d
xorl %eax, %eax
xorl %r12d, %r12d
movq %rdx, 0x28(%rsp)
movq %r10, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
cmpq %r14, %rdx
je 0xbca6
movzbl (%rsi,%r14), %ecx
movzbl (%rdi,%rcx), %ecx
xorl %ebp, %ebp
cmpl $0xd, %ecx
ja 0xbc1c
shll $0x4, %eax
orl %ecx, %eax
movl %eax, %ebp
andl %r11d, %ebp
incl %r12d
cmpl %r10d, %r12d
jl 0xbc1f
movq %r9, %r13
movl %ebp, %edi
movl %r11d, %r15d
movl %r11d, %esi
callq 0xbcb5
testl %eax, 0x1c(%rsp)
je 0xbc26
movq %r13, %r9
movq 0x10(%rsp), %r10
movq 0x28(%rsp), %rdx
movl %r15d, %r11d
movq 0x8(%rsp), %rsi
leaq 0xc9f6(%rip), %rdi      # 0x18610
jmp 0xbc1f
xorl %r12d, %r12d
incq %r14
movl %ebp, %eax
jmp 0xbbbd
movl %eax, %ebx
movq %r13, %r9
movq 0x8(%r13), %rax
movq 0x20(%rsp), %rdx
cmpl 0x4(%r13), %edx
jne 0xbc68
leal (%rdx,%rdx), %ecx
testl %edx, %edx
pushq $0x2
popq %rdx
cmovel %edx, %ecx
movl %ecx, 0x4(%r9)
movslq %ecx, %rdx
shlq $0x3, %rdx
movq 0x30(%rsp), %rdi
movq %rax, %rsi
callq 0x7568
movq %r13, %r9
movq %rax, 0x8(%r13)
movl (%r13), %edx
movq 0x10(%rsp), %r10
movl %r15d, %r11d
movq 0x8(%rsp), %rsi
leaq 0xc994(%rip), %rdi      # 0x18610
movl 0x18(%rsp), %ecx
shrl %cl, %ebx
shlq $0x20, %rbx
addq %r14, %rbx
movslq %edx, %rcx
incl %edx
movl %edx, (%r9)
movq %rbx, (%rax,%rcx,8)
movl %edx, %eax
movq %rax, 0x20(%rsp)
movq 0x28(%rsp), %rdx
jmp 0xbc1f
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]miniprot/sketch.c
// Function: mp_hash32_mask
static inline uint32_t mp_hash32_mask(uint32_t key, uint32_t mask)
{
	key  = (key + ~(key << 15)) & mask;
	key ^=  (key >> 10);
	key  =  (key + (key <<  3)) & mask;
	key ^=  (key >> 6);
	key  = (key + ~(key << 11)) & mask;
	key ^=  (key >> 16);
	return key;
}

// Assembly:
movl %edi, %eax
shll $0xf, %eax
notl %eax
addl %edi, %eax
andl %esi, %eax
movl %eax, %ecx
shrl $0xa, %ecx
xorl %eax, %ecx
leal (%rcx,%rcx,8), %eax
andl %esi, %eax
movl %eax, %ecx
shrl $0x6, %ecx
xorl %eax, %ecx
movl %ecx, %edx
shll $0xb, %edx
notl %edx
addl %ecx, %edx
andl %esi, %edx
movl %edx, %eax
shrl $0x10, %eax
xorl %edx, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/lh3[P]miniprot/sketch.c
// Function: mp_sketch_clean_orf
void mp_sketch_clean_orf(void *km, const uint8_t *seq, int64_t st, int64_t en, int32_t kmer, int32_t mod_bit, int32_t bbit, int64_t boff, mp64_v *a)
{
	int64_t i;
	int32_t l;
	uint32_t x, y, mask_k = (1U<<kmer*MP_BITS_PER_AA) - 1, mask_mod = (1U<<mod_bit) - 1;
	for (i = st, l = 0, x = 0; i < en; i += 3) {
		uint8_t codon = seq[i]<<4 | seq[i+1]<<2 | seq[i+2];
		assert(seq[i] < 4 && seq[i+1] < 4 && seq[i+2] < 4);
		#if MP_BITS_PER_AA == 4
		x = (x<<MP_BITS_PER_AA | ns_tab_codon13[codon]) & mask_k;
		#else
		x = (x<<MP_BITS_PER_AA | ns_tab_codon13[codon]>>1) & mask_k;
		#endif
		if (++l >= kmer) {
			y = mp_hash32_mask(x, mask_k);
			assert(y <= mask_k);
			if ((y&mask_mod) == 0)
				kv_push(uint64_t, km, *a, (uint64_t)(y>>mod_bit)<<32 | (((i+2)>>bbit) + boff));
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, 0x20(%rsp)
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, 0x10(%rsp)
movq %r8, 0x18(%rsp)
leal (,%r8,4), %ecx
pushq $-0x1
popq %rax
movl %eax, %ebp
shll %cl, %ebp
notl %ebp
movl %r9d, 0x8(%rsp)
movl %r9d, %ecx
shll %cl, %eax
notl %eax
movl %eax, 0xc(%rsp)
xorl %ebx, %ebx
pushq $0x1
popq %r15
cmpq 0x20(%rsp), %r12
jge 0xbe1c
movb (%r13,%r12), %al
cmpb $0x3, %al
ja 0xbe2b
movb 0x1(%r13,%r12), %cl
cmpb $0x3, %cl
ja 0xbe2b
movb 0x2(%r13,%r12), %dl
cmpb $0x4, %dl
jae 0xbe2b
shlb $0x4, %al
shlb $0x2, %cl
orb %al, %cl
orb %dl, %cl
shll $0x4, %ebx
movzbl %cl, %eax
leaq 0xc9d5(%rip), %rcx      # 0x18750
movzbl (%rcx,%rax), %eax
orl %eax, %ebx
andl %ebp, %ebx
cmpl 0x18(%rsp), %r15d
jl 0xbe10
movl %ebx, %edi
movl %ebp, %esi
callq 0xbcb5
cmpl %ebp, %eax
ja 0xbe44
movl %eax, %r14d
testl %eax, 0xc(%rsp)
jne 0xbe10
movq 0x70(%rsp), %rdi
movl (%rdi), %edx
movq 0x8(%rdi), %rax
cmpl 0x4(%rdi), %edx
jne 0xbde5
leal (%rdx,%rdx), %ecx
testl %edx, %edx
pushq $0x2
popq %rdx
cmovel %edx, %ecx
movl %ecx, 0x4(%rdi)
movslq %ecx, %rdx
shlq $0x3, %rdx
movq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x7568
movq 0x70(%rsp), %rdi
movq %rax, 0x8(%rdi)
movl (%rdi), %edx
leaq 0x2(%r12), %rsi
movl 0x8(%rsp), %ecx
shrl %cl, %r14d
movl 0x60(%rsp), %ecx
sarq %cl, %rsi
shlq $0x20, %r14
addq 0x68(%rsp), %rsi
orq %r14, %rsi
leal 0x1(%rdx), %ecx
movl %ecx, (%rdi)
movslq %edx, %rcx
movq %rsi, (%rax,%rcx,8)
addq $0x3, %r12
incl %r15d
jmp 0xbd30
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x70c3(%rip), %rdi      # 0x12ef5
leaq 0x70e7(%rip), %rsi      # 0x12f20
leaq 0x70e9(%rip), %rcx      # 0x12f29
pushq $0x2f
jmp 0xbe5b
leaq 0x7150(%rip), %rdi      # 0x12f9b
leaq 0x70ce(%rip), %rsi      # 0x12f20
leaq 0x70d0(%rip), %rcx      # 0x12f29
pushq $0x37
popq %rdx
callq 0x2150
// File: /workspace/github_c_makefile_star2_O2/lh3[P]miniprot/bseq.c
// Function: mp_bseq_open
mp_bseq_file_t *mp_bseq_open(const char *fn)
{
	mp_bseq_file_t *fp;
	gzFile f;
	f = fn && strcmp(fn, "-")? gzopen(fn, "r") : gzdopen(0, "r");
	if (f == 0) return 0;
	fp = (mp_bseq_file_t*)calloc(1, sizeof(mp_bseq_file_t));
	fp->fp = f;
	fp->ks = kseq_init(fp->fp);
	return fp;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0xc14e
cmpb $0x2d, (%rdi)
jne 0xc140
cmpb $0x0, 0x1(%rdi)
je 0xc14e
leaq 0x5299(%rip), %rsi      # 0x113e0
callq 0x2280
jmp 0xc15c
leaq 0x528b(%rip), %rsi      # 0x113e0
xorl %edi, %edi
callq 0x20d0
movq %rax, %rbx
testq %rax, %rax
je 0xc183
pushq $0x1
popq %rdi
pushq $0x30
popq %rsi
callq 0x21b0
movq %rax, %r14
movq %rbx, (%rax)
movq %rbx, %rdi
callq 0xa814
movq %rax, 0x8(%r14)
jmp 0xc186
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/lh3[P]miniprot/hit.c
// Function: mp_cal_chn_sc_ungap
int32_t mp_cal_chn_sc_ungap(int32_t n_a, const uint64_t *a, int32_t kmer)
{
	int32_t i, x = kmer;
	for (i = 1; i < n_a; ++i) {
		const uint64_t a0 = a[i - 1], a1 = a[i];
		int32_t dq = (int32_t)a1 - (int32_t)a0, dr3 = (a1>>32) - (a0>>32);
		int32_t dr = dr3 / 3, q = dr3 - dr * 3, dg;
		dg = dq < dr? dq : dr;
		if (dq >= dr && q != 0) --x;
		else x += dg < kmer? dg : kmer;
	}
	return x;
}

// Assembly:
pushq %rbx
movl %edx, %ecx
movslq %edi, %r9
movabsq $0x1, %r10
movl $0x3, %r11d
movl %edx, %edi
cmpq %r9, %r10
jge 0xcf3f
movq -0x8(%rsi,%r10,8), %rax
movq (%rsi,%r10,8), %r8
movl %r8d, %ebx
subl %eax, %ebx
shrq $0x20, %r8
shrq $0x20, %rax
subl %eax, %r8d
movl %r8d, %eax
cltd
idivl %r11d
cmpl %eax, %ebx
jl 0xcf2c
imull $-0x3, %eax, %edx
negl %r8d
cmpl %r8d, %edx
je 0xcf2c
decl %edi
jmp 0xcf3a
cmpl %eax, %ebx
cmovll %ebx, %eax
cmpl %ecx, %eax
cmovgel %ecx, %eax
addl %edi, %eax
movl %eax, %edi
incq %r10
jmp 0xcef4
movl %edi, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/lh3[P]miniprot/hit.c
// Function: mp_collate_a
uint64_t *mp_collate_a(void *km, int32_t n_reg, mp_reg1_t *reg)
{
	uint64_t *a;
	int64_t n_a;
	int32_t i;
	for (i = 0, n_a = 0; i < n_reg; ++i)
		n_a += reg[i].cnt;
	a = Kmalloc(km, uint64_t, n_a);
	for (i = 0, n_a = 0; i < n_reg; ++i) {
		mp_reg1_t *r = &reg[i];
		r->off = n_a;
		memcpy(&a[n_a], r->a, r->cnt * sizeof(uint64_t));
		kfree(km, r->a);
		r->a = &a[n_a];
		n_a += r->cnt;
	}
	return a;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, (%rsp)
xorl %eax, %eax
testl %esi, %esi
cmovlel %eax, %esi
imulq $0x68, %rsi, %r13
xorl %esi, %esi
cmpq %rax, %r13
je 0xd22b
movslq 0x4(%rbx,%rax), %rcx
addq %rcx, %rsi
addq $0x68, %rax
jmp 0xd218
shlq $0x3, %rsi
movq (%rsp), %rdi
callq 0x7460
movq %rax, %r15
xorl %ebp, %ebp
xorl %r14d, %r14d
cmpq %rbp, %r13
je 0xd284
movl %r14d, (%rbx,%rbp)
leaq (%r15,%r14,8), %r12
movq 0x50(%rbx,%rbp), %rsi
movslq 0x4(%rbx,%rbp), %rdx
shlq $0x3, %rdx
movq %r12, %rdi
callq 0x21f0
movq 0x50(%rbx,%rbp), %rsi
movq (%rsp), %rdi
callq 0x736b
movq %r12, 0x50(%rbx,%rbp)
movslq 0x4(%rbx,%rbp), %rax
addq %rax, %r14
addq $0x68, %rbp
jmp 0xd240
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_O2/lh3[P]miniprot/hit.c
// Function: mp_sort_reg
void mp_sort_reg(void *km, int *n_regs, mp_reg1_t *r)
{
	int32_t i, n_aux, n = *n_regs, has_cigar = 0, no_cigar = 0;
	mp128_t *aux;
	mp_reg1_t *t;

	if (n <= 1) return;
	aux = (mp128_t*)kmalloc(km, n * 16);
	t = (mp_reg1_t*)kmalloc(km, n * sizeof(mp_reg1_t));
	for (i = n_aux = 0; i < n; ++i) {
		if (r[i].cnt > 0) { // squeeze out elements with cnt==0 (soft deleted)
			int score;
			if (r[i].p) score = r[i].p->dp_max, has_cigar = 1;
			else score = r[i].chn_sc, no_cigar = 1;
			aux[n_aux].x = (uint64_t)score << 32 | r[i].hash;
			aux[n_aux++].y = i;
		} else if (r[i].p) {
			free(r[i].p); free(r[i].feat);
			r[i].p = 0;
		}
	}
	assert(has_cigar + no_cigar == 1);
	radix_sort_mp128x(aux, aux + n_aux);
	for (i = n_aux - 1; i >= 0; --i)
		t[n_aux - 1 - i] = r[aux[i].y];
	memcpy(r, t, sizeof(mp_reg1_t) * n_aux);
	*n_regs = n_aux;
	kfree(km, aux);
	kfree(km, t);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movslq (%rsi), %rax
cmpq $0x2, %rax
jge 0xd2bc
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rdx, %r14
movq %rdi, %rbx
movq %rsi, 0x28(%rsp)
movl %eax, %esi
shll $0x4, %esi
movq %rax, 0x8(%rsp)
callq 0x7460
movq %rax, 0x10(%rsp)
imulq $0x68, 0x8(%rsp), %rsi
movq %rbx, 0x30(%rsp)
movq %rbx, %rdi
callq 0x7460
movq 0x8(%rsp), %rsi
movq %rax, 0x18(%rsp)
movq %r14, 0x20(%rsp)
addq $0x60, %r14
xorl %ebx, %ebx
pushq $0x1
popq %r8
xorl %r15d, %r15d
xorl %r12d, %r12d
xorl %ebp, %ebp
movslq %ebp, %r13
cmpq %rbx, %rsi
je 0xd38d
cmpl $0x0, -0x5c(%r14)
movq (%r14), %rdi
jle 0xd362
leaq 0x4(%rdi), %rax
leaq -0x3c(%r14), %rcx
testq %rdi, %rdi
cmovnel %r8d, %r15d
cmovel %r8d, %r12d
cmoveq %rcx, %rax
movl (%rax), %eax
shlq $0x20, %rax
movl -0x34(%r14), %ecx
orq %rax, %rcx
movq %r13, %rax
shlq $0x4, %rax
movq 0x10(%rsp), %rdx
movq %rcx, (%rdx,%rax)
incl %r13d
movq %rbx, 0x8(%rdx,%rax)
movl %r13d, %ebp
jmp 0xd384
testq %rdi, %rdi
je 0xd384
movl %r8d, %r13d
callq 0x2050
movq -0x8(%r14), %rdi
callq 0x2050
movl %r13d, %r8d
movq 0x8(%rsp), %rsi
andq $0x0, (%r14)
incq %rbx
addq $0x68, %r14
jmp 0xd30f
addl %r15d, %r12d
cmpl $0x1, %r12d
jne 0xd43b
movq %r13, %rsi
shlq $0x4, %rsi
movq 0x10(%rsp), %rbx
addq %rbx, %rsi
movq %rbx, %rdi
callq 0x3cab
leal -0x1(%r13), %eax
movslq %eax, %r8
movq %r8, %rax
shlq $0x4, %rax
leaq (%rbx,%rax), %r9
addq $0x8, %r9
pushq $0xd
popq %rax
movq 0x18(%rsp), %r14
movq %r14, %rdx
movq 0x30(%rsp), %rbx
movq 0x20(%rsp), %r10
testq %r8, %r8
js 0xd3fe
imulq $0x68, (%r9), %rsi
addq %r10, %rsi
movq %rax, %rcx
movq %rdx, %rdi
rep  movsq (%rsi), %es:(%rdi)
decq %r8
addq $0x68, %rdx
addq $-0x10, %r9
jmp 0xd3dc
imulq $0x68, %r13, %rdx
movq %r10, %rdi
movq %r14, %rsi
callq 0x21f0
movq 0x28(%rsp), %rax
movl %r13d, (%rax)
movq %rbx, %rdi
movq 0x10(%rsp), %rsi
callq 0x736b
movq %rbx, %rdi
movq %r14, %rsi
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x736b
leaq 0x5df5(%rip), %rdi      # 0x13237
leaq 0x5d6b(%rip), %rsi      # 0x131b4
leaq 0x5e01(%rip), %rcx      # 0x13251
pushq $0x76
popq %rdx
callq 0x2150
// File: /workspace/github_c_makefile_star2_O2/lh3[P]miniprot/hit.c
// Function: mp_sync_regs
void mp_sync_regs(void *km, int n_regs, mp_reg1_t *regs) // keep mp_reg1_t::{id,parent} in sync; also reset id
{
	int *tmp, i, max_id = -1, n_tmp;
	if (n_regs <= 0) return;
	for (i = 0; i < n_regs; ++i) // NB: doesn't work if mp_reg1_t::id is negative
		max_id = max_id > regs[i].id? max_id : regs[i].id;
	n_tmp = max_id + 1;
	tmp = (int*)kmalloc(km, n_tmp * sizeof(int));
	for (i = 0; i < n_tmp; ++i) tmp[i] = -1;
	for (i = 0; i < n_regs; ++i)
		if (regs[i].id >= 0) tmp[regs[i].id] = i;
	for (i = 0; i < n_regs; ++i) {
		mp_reg1_t *r = &regs[i];
		r->id = i;
		if (r->parent == MP_PARENT_TMP_PRI)
			r->parent = i;
		else if (r->parent >= 0 && tmp[r->parent] >= 0)
			r->parent = tmp[r->parent];
		else r->parent = MP_PARENT_UNSET;
	}
	kfree(km, tmp);
}

// Assembly:
testl %esi, %esi
jle 0xd872
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
movl %esi, %r15d
imulq $0x68, %r15, %rax
pushq $-0x1
popq %r12
xorl %ecx, %ecx
cmpq %rcx, %rax
je 0xd7e0
movl 0x8(%rbx,%rcx), %edx
cmpl %edx, %r12d
cmovlel %edx, %r12d
addq $0x68, %rcx
jmp 0xd7ca
leal 0x1(%r12), %esi
shlq $0x2, %rsi
movq %r14, %rdi
callq 0x7460
movslq %r12d, %rcx
xorl %edx, %edx
cmpq %rcx, %rdx
jg 0xd804
orl $-0x1, (%rax,%rdx,4)
incq %rdx
jmp 0xd7f6
leaq 0x8(%rbx), %rcx
xorl %edx, %edx
cmpq %rdx, %r15
je 0xd823
movslq (%rcx), %rsi
testq %rsi, %rsi
js 0xd81a
movl %edx, (%rax,%rsi,4)
incq %rdx
addq $0x68, %rcx
jmp 0xd80a
addq $0xc, %rbx
xorl %ecx, %ecx
movl $0xfffffffe, %edx       # imm = 0xFFFFFFFE
pushq $-0x1
popq %rsi
cmpq %rcx, %r15
je 0xd85c
movl %ecx, -0x4(%rbx)
movl (%rbx), %edi
cmpq %rdx, %rdi
jne 0xd844
movl %ecx, %edi
jmp 0xd851
testl %edi, %edi
js 0xd84f
movl (%rax,%rdi,4), %edi
testl %edi, %edi
jns 0xd851
movl %esi, %edi
movl %edi, (%rbx)
incq %rcx
addq $0x68, %rbx
jmp 0xd831
movq %r14, %rdi
movq %rax, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x736b
retq
// File: /workspace/github_c_makefile_star2_O2/lh3[P]miniprot/hit.c
// Function: mp_select_multi_exon
void mp_select_multi_exon(int32_t n, mp_reg1_t *r, int32_t single_penalty)
{
	int32_t i;
	mp_reg1_t t;
	if (n < 2 || r[0].n_exon != 1) return;
	for (i = 1; i < n; ++i)
		if (r[i].n_exon >= 2)
			break;
	if (i == n) return;
	if (r[0].p == 0 || r[i].p == 0) return;
	if (r[0].p->dp_max < r[i].p->dp_max + single_penalty)
		t = r[0], r[0] = r[i], r[i] = t;
}

// Assembly:
cmpl $0x2, %edi
jl 0xdb66
movq %rsi, %rax
cmpl $0x1, 0x20(%rsi)
jne 0xdb66
movl %edi, %ecx
leaq 0x68(%rax), %r8
decq %rcx
movq %rcx, %rsi
subq $0x1, %rsi
jb 0xdb66
cmpl $0x1, 0x20(%r8)
jg 0xdb15
addq $0x68, %r8
movq %rsi, %rcx
jmp 0xdaff
testl %ecx, %ecx
je 0xdb66
movq 0x60(%rax), %rcx
testq %rcx, %rcx
je 0xdb66
movq 0x60(%r8), %rsi
testq %rsi, %rsi
je 0xdb66
addl 0x4(%rsi), %edx
cmpl %edx, 0x4(%rcx)
jge 0xdb66
movabsq $0xd, %rdx
leaq -0x68(%rsp), %r9
movq %rdx, %rcx
movq %r9, %rdi
movq %rax, %rsi
rep  movsq (%rsi), %es:(%rdi)
movq %rdx, %rcx
movq %rax, %rdi
movq %r8, %rsi
rep  movsq (%rsi), %es:(%rdi)
movq %rdx, %rcx
movq %r8, %rdi
movq %r9, %rsi
rep  movsq (%rsi), %es:(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/w4kfu[P]HommI/Icn/main.c
// Function: main
int main(int argc, char *argv[])
{
	struct icn *icn = NULL;
	unsigned int width;
	unsigned int height;
	unsigned char *dataimg = NULL;
	unsigned char *pal = NULL;
	char outputname[4096];
	unsigned int i;

	if (argc != 3)
	{
		fprintf(stderr, "%s <*.icn> <*.pal>\n", argv[0]);
		return EXIT_FAILURE;
	}
	if ((icn = openicn(argv[1])))
	{
		if (!(pal = open_palette(argv[2])))
			return EXIT_FAILURE;
		printicninfo(icn);
		width = icngetmaxwidth(icn);
		height = icngetmaxheight(icn);
		printf("Width = %X (%d)\n", width, width);
		printf("Height = %X (%d)\n", height, height);
		for (i = 0; i < icn->numentry; i++)
		{
			sprintf(outputname, "./extract/%s_%d.png", "TESTO", i);
			if (strstr(argv[1], "font.icn"))
				dataimg = icnmakeimg(icn, i, width, height, pal, 0);
			else
				dataimg = icnmakeimg(icn, i, width, height, pal, 1);
			if (dataimg)
			{
				writeImage(outputname, width, height, dataimg, "LOL");
				free(dataimg);
			}
		}
		closeicn(icn);
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1028, %rsp           # imm = 0x1028
movq %rsi, %r15
cmpl $0x3, %edi
jne 0x1666
movq 0x8(%r15), %rdi
callq 0x1698
testq %rax, %rax
je 0x1662
movq %rax, %r14
movq 0x10(%r15), %rdi
callq 0x1ab0
movq %rax, 0x18(%rsp)
testq %rax, %rax
je 0x1681
movq %r14, %rdi
callq 0x1856
movq %r14, %rdi
callq 0x18f3
movl %eax, %ebx
movq %r14, %rdi
callq 0x191f
movl %eax, %r12d
leaq 0xaf9(%rip), %rdi       # 0x208c
movl %ebx, %esi
movl %ebx, %edx
xorl %eax, %eax
callq 0x1090
leaq 0xaf8(%rip), %rdi       # 0x209d
movl %r12d, %esi
movl %r12d, %edx
xorl %eax, %eax
callq 0x1090
leaq 0x20(%rsp), %rbp
movl %ebx, 0x10(%rsp)
movzwl %bx, %eax
movl %eax, 0x14(%rsp)
movl %r12d, 0xc(%rsp)
movzwl %r12w, %r12d
xorl %ebx, %ebx
movzwl (%r14), %eax
cmpl %eax, %ebx
jae 0x165a
movq %rbp, %rdi
leaq 0xacc(%rip), %rsi       # 0x20af
leaq 0xad9(%rip), %rdx       # 0x20c3
movl %ebx, %ecx
xorl %eax, %eax
callq 0x1190
movq %r15, %r13
movq 0x8(%r15), %rdi
leaq 0xac8(%rip), %rsi       # 0x20c9
callq 0x11c0
xorl %r9d, %r9d
testq %rax, %rax
sete %r9b
movq %r14, %rdi
movl %ebx, %esi
movl 0x14(%rsp), %edx
movl %r12d, %ecx
movq 0x18(%rsp), %r8
callq 0x194b
testq %rax, %rax
je 0x1650
movq %rax, %r15
movq %rbp, %rdi
movl 0x10(%rsp), %esi
movl 0xc(%rsp), %edx
movq %rax, %rcx
leaq 0xa8f(%rip), %r8        # 0x20d2
callq 0x12d6
movq %r15, %rdi
callq 0x1040
incl %ebx
movq %r13, %r15
jmp 0x15cd
movq %r14, %rdi
callq 0x1831
xorl %eax, %eax
jmp 0x1684
movq 0x298b(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
movq (%r15), %rdx
leaq 0x9fe(%rip), %rsi       # 0x2078
xorl %eax, %eax
callq 0x10e0
pushq $0x1
popq %rax
addq $0x1028, %rsp           # imm = 0x1028
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop