LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/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 %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
cmpb $0x2d, (%rdi)
jne 0x56df
cmpb $0x0, 0x1(%rbx)
je 0x5769
movq %rbx, %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x2290
testl %eax, %eax
js 0x5780
movl %eax, %r15d
movl %eax, %edi
xorl %esi, %esi
movl $0x2, %edx
callq 0x2130
cmpq $0x4, %rax
jl 0x5761
movl %r15d, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2130
leaq 0x4(%rsp), %rsi
movl $0x4, %edx
movl %r15d, %edi
callq 0x2190
cmpq $0x4, %rax
jne 0x5761
movzwl 0x4(%rsp), %eax
xorl $0x504d, %eax           # imm = 0x504D
movzbl 0x6(%rsp), %ecx
xorl $0x49, %ecx
orw %ax, %cx
jne 0x5761
movl 0x4(%rsp), %eax
bswapl %eax
xorl %ecx, %ecx
cmpl $0x4d504904, %eax       # imm = 0x4D504904
setae %cl
cmpl $0x4d504903, %eax       # imm = 0x4D504903
sbbl $0x0, %ecx
testl %ecx, %ecx
jle 0x578d
movl %r15d, %edi
callq 0x2170
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x5022
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl %r15d, %edi
callq 0x2170
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x5553
// File: /workspace/github_c_makefile_star2_O3/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 0x57fa
movq %rdi, %rax
movl 0x6c(%rdx), %r8d
testl %ecx, %ecx
jne 0x57c3
addl $0xa, %r8d
movl %r8d, 0x6c(%rdx)
addl $0xa, 0x74(%rdx)
leal 0x1(%r8), %ecx
shrl $0x1f, %ecx
addl %r8d, %ecx
incl %ecx
sarl %ecx
subl 0x64(%rdx), %r8d
decl %ecx
cmpl %r8d, %ecx
cmovll %ecx, %r8d
movl 0x84(%rdx), %ecx
cmpl %ecx, %r8d
cmovgel %ecx, %r8d
movq 0x18(%rsi), %rdi
movq %rax, %rsi
movl %r8d, %edx
jmp 0xd076
retq
nop
// File: /workspace/github_c_makefile_star2_O3/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
movl $0x1, %esi
movl $0x10, %edx
xorl %edi, %edi
callq 0x8344
movq %rax, %rbx
leaq 0x13f68(%rip), %rax     # 0x19780
testb $0x1, (%rax)
jne 0x5825
callq 0x8387
movq %rax, (%rbx)
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xda3c
movq %rax, 0x18(%rsp)
testq %rax, %rax
je 0x66fd
movq %rbx, 0x10(%rsp)
cmpl $0x2, %ebp
movl $0x1, %eax
cmovgel %ebp, %eax
movq %r14, 0x20(%rsp)
movl %eax, (%rsp)
testb $0x8, (%rbx)
je 0x66cb
leaq 0xe0a4(%rip), %rdi      # 0x1476a
callq 0x2090
leaq 0x39(%rip), %rsi        # 0x670b
movq %rsp, %rbx
movl $0x2, %edi
movq %rbx, %rdx
movl $0x3, %ecx
callq 0x8928
movq 0x38(%rbx), %rdi
callq 0x2050
movq 0x18(%rbx), %rdi
callq 0xdaa5
xorl %eax, %eax
jmp 0x6702
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x12cae(%rip), %rax     # 0x19780
addq 0x10(%rdi), %r15
testb $0x2, (%rax)
jne 0x6b1c
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 0x5845
movq 0x20(%r14), %rcx
movq %rax, (%rcx,%rbx,8)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x124cd(%rip), %rax     # 0x18ff0
movq (%rax), %rdi
movq 0x8(%r15), %rdx
movl (%r15), %ecx
leaq 0xdc96(%rip), %rsi      # 0x147ca
movl %ebp, %r8d
xorl %eax, %eax
callq 0x21d0
jmp 0x6adb
// File: /workspace/github_c_makefile_star2_O3/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 %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %r15
movq 0x50(%rdx), %rax
movslq %esi, %r12
movzbl 0x58(%rax), %esi
movq %rcx, %rdi
movq %r12, %rdx
callq 0x2160
testl %r12d, %r12d
jle 0xbbcc
movl %ebp, %eax
xorl %ecx, %ecx
xorl %edi, %edi
xorl %edx, %edx
movq 0x48(%r14), %rsi
movzbl (%r15,%rcx), %r8d
movzbl (%rsi,%r8), %r9d
movl $0x0, %r8d
movl $0x0, %esi
cmpq $0x3, %r9
ja 0xbbbf
andl $0xf, %edi
leaq (%r9,%rdi,4), %rsi
leal 0x1(%rdx), %r8d
cmpl $0x2, %edx
jl 0xbbbf
movq 0x58(%r14), %rdx
movb (%rdx,%rsi), %dl
movb %dl, (%rbx,%rcx)
incq %rcx
movl %esi, %edi
movl %r8d, %edx
cmpq %rcx, %rax
jne 0xbb86
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/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 0xc5bc
movq (%r14), %r15
movq 0x18(%r14), %rsi
movq %r15, %rdi
callq 0x83df
movq 0x10(%r14), %rsi
movq %r15, %rdi
callq 0x83df
movq %r15, %rdi
movq %r14, %rsi
callq 0x83df
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0xc5ca
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_O3/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:
movq $-0x1, %rax
testl %esi, %esi
js 0xc6ce
cmpl %esi, (%rdi)
jle 0xc6ce
movq 0x28(%rdi), %rax
movl %esi, %esi
leaq (%rsi,%rsi,2), %rsi
movq 0x8(%rax,%rsi,8), %r10
cmpq %rcx, %r10
movq %rcx, %r11
cmovlq %r10, %r11
testq %rcx, %rcx
cmovsq %r10, %r11
movq (%rax,%rsi,8), %rax
leaq (%rax,%rdx), %rsi
leaq (%rax,%r11), %r10
testl %r8d, %r8d
je 0xc68a
cmpq %rdx, %r11
jle 0xc6cf
addl %eax, %r11d
shlb $0x2, %r11b
addb $-0x4, %r11b
xorl %eax, %eax
decq %r10
movq 0x20(%rdi), %rcx
movq %r10, %rdx
sarq %rdx
movb (%rcx,%rdx), %dl
movl %r11d, %ecx
andb $0x4, %cl
shrb %cl, %dl
andb $0xf, %dl
movb $0x3, %cl
subb %dl, %cl
movzbl %dl, %edx
movzbl %cl, %ecx
cmovbl %edx, %ecx
movb %cl, (%r9,%rax)
incq %rax
addb $-0x4, %r11b
cmpq %rsi, %r10
jg 0xc650
jmp 0xc6ce
cmpq %rdx, %r11
jle 0xc6cf
leal (,%rsi,4), %edx
xorl %r8d, %r8d
leaq (%rsi,%r8), %rax
movq 0x20(%rdi), %rcx
sarq %rax
movb (%rcx,%rax), %r11b
movl %edx, %ecx
andb $0x4, %cl
shrb %cl, %r11b
andb $0xf, %r11b
leaq 0x1(%r8), %rax
movb %r11b, (%r9,%r8)
leaq (%rsi,%r8), %rcx
incq %rcx
addb $0x4, %dl
movq %rax, %r8
cmpq %r10, %rcx
jl 0xc699
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/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
leaq (%r10,%r10,2), %r10
movq 0x8(%rax,%r10,8), %rax
movq %rcx, %r10
orq %rdx, %r10
setns %r11b
movq %rax, %r10
subq %rdx, %r10
setg %bl
andb %r11b, %bl
cmpb $0x1, %bl
jne 0xc728
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 0xc5f2
movq $-0x1, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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
movq $-0x1, %r15
testl %esi, %esi
js 0xc85b
movl %esi, %r13d
movq %rdi, %rbp
cmpl %esi, (%rdi)
jle 0xc85b
cmpq $0x0, 0x40(%rbp)
je 0xc85b
movq %rdx, %r14
movq 0x28(%rbp), %rax
movl %r13d, %edx
leaq (%rdx,%rdx,2), %rsi
movq 0x8(%rax,%rsi,8), %rsi
cmpq %rcx, %rsi
movq %rcx, %r12
cmovlq %rsi, %r12
testq %rcx, %rcx
cmovsq %rsi, %r12
testl %r8d, %r8d
je 0xc7a5
leaq (%rdx,%rdx,2), %rcx
movq 0x8(%rax,%rcx,8), %rax
movq %rax, %rcx
subq %r12, %rcx
subq %r14, %rax
movq %rax, %r12
movq %rcx, %r14
xorl %ebx, %ebx
testl %r8d, %r8d
setne %bl
movq %r12, %r15
subq %r14, %r15
movq %r9, (%rsp)
movq %r9, %rdi
movl $0xff, %esi
movq %r15, %rdx
callq 0x2160
movq 0x40(%rbp), %rbp
leal (%rbx,%r13,2), %eax
cltq
shlq $0x4, %rax
movl (%rbp,%rax), %edi
testl %edi, %edi
je 0xc85b
addq %rax, %rbp
movq 0x8(%rbp), %rsi
movq %r14, %rdx
callq 0xc88c
movl %eax, %r13d
movl (%rbp), %edi
movq 0x8(%rbp), %rsi
movq %r12, %rdx
callq 0xc88c
cmpl %eax, %r13d
jge 0xc85b
movslq %r13d, %rcx
cltq
movl $0xff, %edx
movq (%rsp), %r11
movq 0x8(%rbp), %rsi
movq 0x8(%rsi,%rcx,8), %rsi
movq %rsi, %r8
shrq $0x8, %r8
movq %r8, %rdi
subq %r14, %rdi
cmpq %r15, %rdi
jg 0xc86d
cmpq %r12, %r8
je 0xc853
movzbl (%r11,%rdi), %r8d
cmpl %edx, %r8d
setne %r9b
movl %esi, %r10d
andl %edx, %r10d
cmpl %r8d, %r10d
setbe %r8b
testb %r8b, %r9b
jne 0xc853
movb %sil, (%r11,%rdi)
incq %rcx
cmpq %rcx, %rax
jne 0xc811
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x857e(%rip), %rdi      # 0x14df2
leaq 0x8584(%rip), %rsi      # 0x14dff
leaq 0x8585(%rip), %rcx      # 0x14e07
movl $0x93, %edx
callq 0x2150
// File: /workspace/github_c_makefile_star2_O3/lh3[P]miniprot/ntseq.c
// Function: mp_ntseq_spsc_get_by_v
int64_t mp_ntseq_spsc_get_by_v(const mp_ntdb_t *nt, int32_t vid, int64_t st, int64_t en, uint8_t *ss)
{
	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_spsc_get(nt, vid>>1, vid&1? ctg_len - en : st, vid&1? ctg_len - st : en, vid&1, ss);
}

// Assembly:
pushq %rbx
movq %r8, %r9
movl %esi, %r8d
movq 0x28(%rdi), %rax
sarl %esi
movslq %esi, %r10
leaq (%r10,%r10,2), %r10
movq 0x8(%rax,%r10,8), %rax
movq %rcx, %r10
orq %rdx, %r10
setns %r11b
movq %rax, %r10
subq %rdx, %r10
setg %bl
andb %r11b, %bl
cmpb $0x1, %bl
jne 0xc965
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 0xc731
movq $-0x1, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %rax
movq %rdi, %r14
movl $0x1, %esi
movl $0x48, %edx
xorl %edi, %edi
callq 0x8344
movq %rax, %rbx
movq %rsp, %r15
movl $0x4, %esi
movl $0x2, %edx
movq %r15, %rdi
movq %r14, %rcx
callq 0x20a0
leaq 0x10(%rbx), %rdi
movl $0x8, %r12d
movl $0x8, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x20a0
movq (%r15), %rax
movl %eax, (%rbx)
movq %rax, 0x4(%rbx)
movq 0x10(%rbx), %r15
movq %r15, 0x18(%rbx)
incq %r15
sarq %r15
movslq %eax, %rsi
movl $0x18, %edx
xorl %edi, %edi
callq 0x8344
movq %rax, 0x28(%rbx)
cmpl $0x0, (%rbx)
jle 0xcaf0
movq %rax, %rdi
xorl %r13d, %r13d
xorl %ebp, %ebp
addq %r12, %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x20a0
movq 0x28(%rbx), %rdi
movq %rbp, -0x8(%rdi,%r12)
addq (%rdi,%r12), %rbp
incq %r13
movslq (%rbx), %rax
addq $0x18, %r12
cmpq %rax, %r13
jl 0xcabf
xorl %edi, %edi
movq %r15, %rsi
callq 0x84a5
movq %rax, 0x20(%rbx)
movslq 0x8(%rbx), %rsi
xorl %edi, %edi
callq 0x84a5
movq %rax, 0x30(%rbx)
movq 0x20(%rbx), %rdi
movl $0x1, %esi
movq %r15, %rdx
movq %r14, %rcx
callq 0x20a0
movq 0x30(%rbx), %rdi
movslq 0x8(%rbx), %rdx
movl $0x1, %esi
movq %r14, %rcx
callq 0x20a0
movslq (%rbx), %rax
testq %rax, %rax
jle 0xcb6d
movq 0x28(%rbx), %r15
movq 0x30(%rbx), %r14
shlq $0x3, %rax
leaq (%rax,%rax,2), %r12
xorl %r13d, %r13d
movq %r14, 0x10(%r15,%r13)
movq %r14, %rdi
callq 0x2100
addq %rax, %r14
incq %r14
addq $0x18, %r13
cmpq %r13, %r12
jne 0xcb51
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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:
movq 0x38(%rdi), %r8
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testq %r8, %r8
je 0xd05b
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movb (%rsi), %dl
testb %dl, %dl
je 0xcfe1
leaq 0x1(%rsi), %rcx
movl $0x811c9dce, %r9d       # imm = 0x811C9DCE
movzbl %dl, %edi
xorl %r9d, %edi
imull $0x1000193, %edi, %r9d  # imm = 0x1000193
movb (%rcx), %dl
incq %rcx
testb %dl, %dl
jne 0xcfc3
imull $0xca549e3b, %edi, %ebx # imm = 0xCA549E3B
jmp 0xcfe6
movl $0xdf8667de, %ebx       # imm = 0xDF8667DE
movq 0x18(%r8), %rcx
movq %rcx, 0x8(%rsp)
testq %rcx, %rcx
je 0xd04d
movb 0x8(%r8), %cl
movl $0x1, %eax
shll %cl, %eax
negb %cl
shrl %cl, %ebx
movq %rax, 0x10(%rsp)
leal -0x1(%rax), %r13d
movq 0x10(%r8), %r12
movl %ebx, %ebp
movl %ebp, %eax
shrl $0x5, %eax
movl (%r12,%rax,4), %eax
btl %ebp, %eax
jae 0xd048
movl %ebp, %r14d
leaq (%r14,%r14,2), %rax
movq 0x8(%rsp), %rcx
movq (%rcx,%rax,4), %rdi
movq %rsi, %r15
callq 0x21b0
testl %eax, %eax
je 0xd05c
incl %ebp
andl %r13d, %ebp
cmpl %ebx, %ebp
movq %r15, %rsi
jne 0xd012
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl 0x10(%rsp), %ebp
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
je 0xd04d
leaq (%r14,%r14,2), %rax
movq 0x8(%rsp), %rcx
movl 0x8(%rcx,%rax,4), %eax
jmp 0xd04d
// File: /workspace/github_c_makefile_star2_O3/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 $0x28, %rsp
movl %ecx, %r10d
leal (,%r10,4), %ecx
movl $0xffffffff, %r11d      # imm = 0xFFFFFFFF
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
shll %cl, %r12d
movl %r8d, %ecx
shll %cl, %r11d
movl $0x0, (%r9)
testl %edx, %edx
jle 0xd55d
notl %r12d
notl %r11d
movl %edx, %ebp
xorl %edx, %edx
leaq 0xc1ae(%rip), %rcx      # 0x19600
xorl %ebx, %ebx
xorl %r14d, %r14d
xorl %r13d, %r13d
movq %r9, 0x20(%rsp)
movl %r8d, 0x4(%rsp)
movq %r10, 0x18(%rsp)
movl %r11d, (%rsp)
movq %rsi, 0x10(%rsp)
movq %rdi, 0x8(%rsp)
movzbl (%rsi,%rbx), %eax
movzbl (%rcx,%rax), %eax
cmpl $0xd, %eax
ja 0xd54b
shll $0x4, %r13d
orl %eax, %r13d
andl %r12d, %r13d
incl %r14d
cmpl %r10d, %r14d
jl 0xd551
movl %r13d, %eax
shll $0xf, %eax
notl %eax
addl %r13d, %eax
andl %r12d, %eax
movl %eax, %ecx
shrl $0xa, %ecx
xorl %eax, %ecx
leal (%rcx,%rcx,8), %eax
andl %r12d, %eax
movl %eax, %ecx
shrl $0x6, %ecx
xorl %eax, %ecx
movl %ecx, %eax
shll $0xb, %eax
notl %eax
addl %ecx, %eax
andl %r12d, %eax
movl %eax, %r15d
shrl $0x10, %r15d
xorl %eax, %r15d
testl %r11d, %r15d
jne 0xd542
movq 0x8(%r9), %rax
cmpl 0x4(%r9), %edx
jne 0xd529
leal (%rdx,%rdx), %ecx
testl %edx, %edx
movl $0x2, %edx
cmovel %edx, %ecx
movl %ecx, 0x4(%r9)
movslq %ecx, %rdx
shlq $0x3, %rdx
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x85ad
movq 0x10(%rsp), %rsi
movl (%rsp), %r11d
movq 0x18(%rsp), %r10
movl 0x4(%rsp), %r8d
movq 0x20(%rsp), %r9
movq %rax, 0x8(%r9)
movl (%r9), %edx
movl %r8d, %ecx
shrl %cl, %r15d
shlq $0x20, %r15
addq %rbx, %r15
movslq %edx, %rcx
incl %edx
movl %edx, (%r9)
movq %r15, (%rax,%rcx,8)
leaq 0xc0b7(%rip), %rcx      # 0x19600
jmp 0xd551
xorl %r13d, %r13d
xorl %r14d, %r14d
incq %rbx
cmpq %rbx, %rbp
jne 0xd477
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xda5e
cmpb $0x2d, (%rdi)
jne 0xda50
cmpb $0x0, 0x1(%rdi)
je 0xda5e
leaq 0x5989(%rip), %rsi      # 0x133e0
callq 0x2260
jmp 0xda6c
leaq 0x597b(%rip), %rsi      # 0x133e0
xorl %edi, %edi
callq 0x20d0
movq %rax, %rbx
testq %rax, %rax
je 0xda97
movl $0x1, %edi
movl $0x30, %esi
callq 0x21a0
movq %rax, %r14
movq %rbx, (%rax)
movq %rbx, %rdi
callq 0xbeee
movq %rax, 0x8(%r14)
jmp 0xda9a
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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:
cmpl $0x2, %edi
jl 0xe975
movl %edi, %ecx
movl $0x1, %edi
movl %edx, %eax
movq -0x8(%rsi,%rdi,8), %r10
movq (%rsi,%rdi,8), %r9
movl %r9d, %r8d
subl %r10d, %r8d
shrq $0x20, %r9
shrq $0x20, %r10
subl %r10d, %r9d
movslq %r9d, %r10
imulq $0x55555556, %r10, %r10 # imm = 0x55555556
movq %r10, %r11
shrq $0x3f, %r11
shrq $0x20, %r10
addl %r11d, %r10d
cmpl %r10d, %r8d
jl 0xe958
leal (%r10,%r10,2), %r11d
negl %r11d
negl %r9d
cmpl %r9d, %r11d
je 0xe958
decl %eax
jmp 0xe96c
cmpl %r10d, %r8d
cmovll %r8d, %r10d
cmpl %edx, %r10d
cmovgel %edx, %r10d
addl %eax, %r10d
movl %r10d, %eax
incq %rdi
cmpq %rdi, %rcx
jne 0xe90e
retq
movl %edx, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/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:
testl %esi, %esi
jle 0xed5f
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movl %esi, %ebp
movl %esi, %r12d
imulq $0x68, %r12, %rax
xorl %ecx, %ecx
xorl %esi, %esi
movslq 0x4(%r14,%rcx), %rdx
addq %rdx, %rsi
addq $0x68, %rcx
cmpq %rcx, %rax
jne 0xecde
shlq $0x3, %rsi
movq %rdi, (%rsp)
callq 0x84a5
movq %rax, %r15
testl %ebp, %ebp
jle 0xed4d
imulq $0x68, %r12, %r13
xorl %ebp, %ebp
xorl %ebx, %ebx
movl %ebx, (%r14,%rbp)
leaq (%r15,%rbx,8), %r12
movq 0x50(%r14,%rbp), %rsi
movslq 0x4(%r14,%rbp), %rdx
shlq $0x3, %rdx
movq %r12, %rdi
callq 0x21e0
movq 0x50(%r14,%rbp), %rsi
movq (%rsp), %rdi
callq 0x83df
movq %r12, 0x50(%r14,%rbp)
movslq 0x4(%r14,%rbp), %rax
addq %rax, %rbx
addq $0x68, %rbp
cmpq %rbp, %r13
jne 0xed0b
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %esi, %esi
jmp 0x84a5
// File: /workspace/github_c_makefile_star2_O3/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 $0x28, %rsp
movslq (%rsi), %rbp
cmpq $0x2, %rbp
jge 0xed8c
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rdx, %r14
movq %rdi, %rbx
movq %rsi, 0x18(%rsp)
movl %ebp, %esi
shll $0x4, %esi
callq 0x84a5
movq %rax, (%rsp)
imulq $0x68, %rbp, %rsi
movq %rbx, 0x20(%rsp)
movq %rbx, %rdi
callq 0x84a5
movq %rax, 0x8(%rsp)
movq %r14, 0x10(%rsp)
addq $0x60, %r14
xorl %ebx, %ebx
movl $0x1, %esi
xorl %r13d, %r13d
xorl %r15d, %r15d
xorl %r12d, %r12d
cmpl $0x0, -0x5c(%r14)
movq (%r14), %rdi
jle 0xee1e
leaq 0x4(%rdi), %rax
leaq -0x3c(%r14), %rcx
testq %rdi, %rdi
cmovnel %esi, %r12d
cmovel %esi, %r15d
cmoveq %rcx, %rax
movl (%rax), %eax
shlq $0x20, %rax
movl -0x34(%r14), %ecx
orq %rax, %rcx
movslq %r13d, %r13
movq %r13, %rax
shlq $0x4, %rax
movq (%rsp), %rdx
movq %rcx, (%rdx,%rax)
incl %r13d
movq %rbx, 0x8(%rdx,%rax)
jmp 0xee3d
testq %rdi, %rdi
je 0xee3d
callq 0x2050
movq -0x8(%r14), %rdi
callq 0x2050
movl $0x1, %esi
movq $0x0, (%r14)
incq %rbx
addq $0x68, %r14
cmpq %rbx, %rbp
jne 0xedd4
addl %r12d, %r15d
cmpl $0x1, %r15d
jne 0xef03
movslq %r13d, %rbx
movq %rbx, %r14
shlq $0x4, %r14
movq (%rsp), %rdi
leaq (%rdi,%r14), %rsi
callq 0x4ca8
testl %ebx, %ebx
movq 0x10(%rsp), %r9
movq 0x8(%rsp), %r15
jle 0xeec3
leal -0x1(%rbx), %eax
leaq 0x1(%rbx), %rdx
imulq $0x68, %rax, %rax
imulq $0x68, %rbx, %rcx
subq %rcx, %rax
addq %r15, %rax
addq $0x68, %rax
movq (%rsp), %rcx
leaq (%rcx,%r14), %r8
addq $-0x8, %r8
imulq $0x68, (%r8), %rsi
addq %r9, %rsi
movl $0xd, %ecx
movq %rax, %rdi
rep  movsq (%rsi), %es:(%rdi)
decq %rdx
addq $0x68, %rax
addq $-0x10, %r8
cmpq $0x1, %rdx
jg 0xeea0
imulq $0x68, %rbx, %rdx
movq %r9, %rdi
movq %r15, %rsi
callq 0x21e0
movq 0x18(%rsp), %rax
movl %ebx, (%rax)
movq 0x20(%rsp), %rbx
movq %rbx, %rdi
movq (%rsp), %rsi
callq 0x83df
movq %rbx, %rdi
movq %r15, %rsi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x83df
leaq 0x6362(%rip), %rdi      # 0x1526c
leaq 0x62d8(%rip), %rsi      # 0x151e9
leaq 0x636e(%rip), %rcx      # 0x15286
movl $0x76, %edx
callq 0x2150
// File: /workspace/github_c_makefile_star2_O3/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 0xf3f6
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
movl %esi, %r13d
imulq $0x68, %r13, %rax
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
movl %ebp, %edx
movl 0x8(%rbx,%rcx), %ebp
cmpl %ebp, %edx
cmovgl %edx, %ebp
addq $0x68, %rcx
cmpq %rcx, %rax
jne 0xf349
leal 0x1(%rbp), %r12d
shlq $0x2, %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0x84a5
movq %rax, %r15
testl %ebp, %ebp
js 0xf387
movq %r15, %rdi
movl $0xff, %esi
movq %r12, %rdx
callq 0x2160
leaq 0x8(%rbx), %rax
xorl %ecx, %ecx
movslq (%rax), %rdx
testq %rdx, %rdx
js 0xf399
movl %ecx, (%r15,%rdx,4)
incq %rcx
addq $0x68, %rax
cmpq %rcx, %r13
jne 0xf38d
addq $0xc, %rbx
xorl %eax, %eax
movl $0xfffffffe, %ecx       # imm = 0xFFFFFFFE
movl %eax, -0x4(%rbx)
movl (%rbx), %edx
cmpq %rcx, %rdx
jne 0xf3be
movl %eax, %edx
jmp 0xf3cf
testl %edx, %edx
js 0xf3ca
movl (%r15,%rdx,4), %edx
testl %edx, %edx
jns 0xf3cf
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl %edx, (%rbx)
incq %rax
addq $0x68, %rbx
cmpq %rax, %r13
jne 0xf3b0
movq %r14, %rdi
movq %r15, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x83df
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xf6ad
movq %rsi, %rax
cmpl $0x1, 0x20(%rsi)
jne 0xf6ad
movl %edi, %ecx
leaq 0x68(%rax), %r8
decq %rcx
cmpl $0x1, 0x20(%r8)
jg 0xf6ae
addq $0x68, %r8
decq %rcx
jne 0xf69d
retq
testl %ecx, %ecx
je 0xf6ad
movq 0x60(%rax), %rcx
testq %rcx, %rcx
je 0xf6ad
movq 0x60(%r8), %rsi
testq %rsi, %rsi
je 0xf6ad
addl 0x4(%rsi), %edx
cmpl %edx, 0x4(%rcx)
jge 0xf6ad
leaq -0x68(%rsp), %rdx
movl $0xd, %ecx
movq %rdx, %rdi
movq %rax, %rsi
rep  movsq (%rsi), %es:(%rdi)
movl $0xd, %ecx
movq %rax, %rdi
movq %r8, %rsi
rep  movsq (%rsi), %es:(%rdi)
movl $0xd, %ecx
movq %r8, %rdi
movq %rdx, %rsi
rep  movsq (%rsi), %es:(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O3/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, %rbx
cmpl $0x3, %edi
jne 0x1745
movq 0x8(%rbx), %rdi
callq 0x1764
testq %rax, %rax
je 0x1741
movq %rax, %r14
movq 0x10(%rbx), %rdi
callq 0x1c14
movq %rax, 0x18(%rsp)
testq %rax, %rax
je 0x174d
movq %r14, %rdi
callq 0x1942
movq %r14, %rdi
callq 0x19e3
movl %eax, %ebp
movq %r14, %rdi
callq 0x1a15
movl %eax, %r15d
leaq 0xa29(%rip), %rdi       # 0x208c
movl %ebp, %esi
movl %ebp, 0x10(%rsp)
movl %ebp, %edx
xorl %eax, %eax
callq 0x1090
leaq 0xa24(%rip), %rdi       # 0x209d
movl %r15d, %esi
movl %r15d, 0xc(%rsp)
movl %r15d, %edx
xorl %eax, %eax
callq 0x1090
cmpw $0x0, (%r14)
je 0x1739
leaq 0x20(%rsp), %rbp
movzwl 0x10(%rsp), %eax
movl %eax, 0x14(%rsp)
movzwl 0xc(%rsp), %r12d
xorl %r15d, %r15d
movq %rbp, %rdi
leaq 0x9f8(%rip), %rsi       # 0x20af
leaq 0xa05(%rip), %rdx       # 0x20c3
movl %r15d, %ecx
xorl %eax, %eax
callq 0x1190
movq %rbx, %r13
movq 0x8(%rbx), %rdi
leaq 0x9f3(%rip), %rsi       # 0x20c9
callq 0x11c0
xorl %r9d, %r9d
testq %rax, %rax
sete %r9b
movq %r14, %rdi
movl %r15d, %esi
movl 0x14(%rsp), %edx
movl %r12d, %ecx
movq 0x18(%rsp), %r8
callq 0x1a47
testq %rax, %rax
je 0x1726
movq %rax, %rbx
movq %rbp, %rdi
movl 0x10(%rsp), %esi
movl 0xc(%rsp), %edx
movq %rax, %rcx
leaq 0x9b9(%rip), %r8        # 0x20d2
callq 0x13d6
movq %rbx, %rdi
callq 0x1040
incl %r15d
movzwl (%r14), %eax
cmpl %eax, %r15d
movq %r13, %rbx
jb 0x16ad
movq %r14, %rdi
callq 0x1913
xorl %eax, %eax
jmp 0x1752
movq %rbx, %rdi
callq 0x125e
movl $0x1, %eax
addq $0x1028, %rsp           # imm = 0x1028
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/w4kfu[P]HommI/Icn/icn.c
// Function: openicn
struct icn *openicn(char *filename)
{
	struct icn *newicn = NULL;
	FILE *fin = NULL;

	if (!filename)
		return NULL;

	if (!(fin = fopen(filename, "rb")))
	{
		perror("fopen()");
		return NULL;
	}
	if (!(newicn = malloc(sizeof (struct icn))))
	{
		perror("malloc()");
		fclose(fin);
		return NULL;
	}
	fseek(fin, 0, SEEK_END);
        newicn->filesize = ftell(fin);
        fseek(fin, 0, SEEK_SET);
	if (!(newicn->data = malloc(sizeof (char) * newicn->filesize)))
	{
		perror("malloc()");
		fclose(fin);
		free(newicn);
		return NULL;
	}
	if (fread(newicn->data, 1, newicn->filesize, fin) != newicn->filesize)
	{
		perror("fread()");
		fclose(fin);
		free(newicn);
		free(newicn->data);
		return NULL;
	}
	if (((*(unsigned int*)newicn->data + 2) != newicn->filesize) && !icnfillentry(newicn))
	{
		fclose(fin);
		free(newicn);
		free(newicn->data);
		return NULL;
	}
	fclose(fin);
	return newicn;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0x1879
leaq 0x959(%rip), %rsi       # 0x20d6
callq 0x1160
testq %rax, %rax
je 0x1839
movq %rax, %r14
movl $0x20, %edi
callq 0x1130
testq %rax, %rax
je 0x1847
movq %rax, %rbx
movq %r14, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x1140
movq %r14, %rdi
callq 0x10f0
movq %rax, %r15
movl %r15d, 0x18(%rbx)
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1140
movl %r15d, %r12d
movq %r12, %rdi
callq 0x1130
movq %rax, 0x10(%rbx)
testq %rax, %rax
je 0x185d
movq %rax, %r13
movl $0x1, %esi
movq %rax, %rdi
movq %r12, %rdx
movq %r14, %rcx
callq 0x1050
cmpq %r12, %rax
jne 0x1888
movl (%r13), %eax
addl $0x2, %eax
cmpl %r15d, %eax
je 0x1819
movq %rbx, %rdi
callq 0x189c
testl %eax, %eax
je 0x1823
movq %r14, %rdi
callq 0x1070
jmp 0x187b
movq %r14, %rdi
callq 0x1070
movq %rbx, %rdi
callq 0x1040
movq 0x10(%rbx), %rdi
jmp 0x1874
leaq 0x7c7(%rip), %rdi       # 0x2007
callq 0x1170
jmp 0x1879
leaq 0x88b(%rip), %rdi       # 0x20d9
callq 0x1170
movq %r14, %rdi
callq 0x1070
jmp 0x1879
leaq 0x875(%rip), %rdi       # 0x20d9
callq 0x1170
movq %r14, %rdi
callq 0x1070
movq %rbx, %rdi
callq 0x1040
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rbx, %rdx
addq $0x10, %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x127c
jmp 0x1879
// File: /workspace/github_c_makefile_star2_O3/w4kfu[P]HommI/Icn/icn.c
// Function: icnfillentry
int icnfillentry(struct icn *icn)
{
	unsigned int i;

	if (!icn)
		return 0;

	icn->numentry = *(unsigned short*)icn->data;
	if (!(icn->entry = malloc(sizeof (struct icn) * icn->numentry)))
	{
		perror("malloc()");
		return 0;
	}
	for (i = 0; i < icn->numentry; i++)
	{
		memcpy(&icn->entry[i], icn->data + 2 + 4 + i * sizeof (struct icnentry), sizeof (struct icnentry));
	}
	return 1;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
xorl %ebx, %ebx
testq %rdi, %rdi
je 0x18fe
movq %rdi, %r14
movq 0x10(%rdi), %rax
movzwl (%rax), %ebp
movw %bp, (%rdi)
movl %ebp, %edi
shll $0x5, %edi
callq 0x1130
movq %rax, 0x8(%r14)
testq %rax, %rax
je 0x1905
movl $0x1, %ebx
testw %bp, %bp
je 0x18fe
xorl %eax, %eax
xorl %ecx, %ecx
movq 0x8(%r14), %rdx
movq 0x10(%r14), %rsi
movl 0xe(%rsi,%rax), %edi
movl %edi, 0x8(%rdx,%rax)
movq 0x6(%rsi,%rax), %rsi
movq %rsi, (%rdx,%rax)
incq %rcx
movzwl (%r14), %edx
addq $0xc, %rax
cmpq %rdx, %rcx
jb 0x18d5
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x7cd(%rip), %rdi       # 0x20d9
callq 0x1170
jmp 0x18fe
// File: /workspace/github_c_makefile_star2_O3/w4kfu[P]HommI/Icn/icn.c
// Function: closeicn
void closeicn(struct icn *icn)
{
	if (icn)
	{
		if (icn->entry)
			free(icn->entry);
		if (icn->data)
			free(icn->data);
		free(icn);
	}
}

// Assembly:
testq %rdi, %rdi
je 0x1941
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0x192a
callq 0x1040
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x1938
callq 0x1040
movq %rbx, %rdi
popq %rbx
jmp 0x1040
retq
// File: /workspace/github_c_makefile_star2_O3/w4kfu[P]HommI/Icn/icn.c
// Function: printicninfo
void printicninfo(struct icn *icn)
{
	unsigned int i;

	if (!icn)
		return;

	printf("NumEntry = %X\n", icn->numentry);
	for (i = 0; i < icn->numentry; i++)
	{
		printf("Width = %X\n", icn->entry[i].width);
		printf("Height = %X\n", icn->entry[i].height);
		printf("Offset = %X\n", icn->entry[i].offset);
	}
}

// Assembly:
testq %rdi, %rdi
je 0x19e2
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movzwl (%rdi), %esi
leaq 0x787(%rip), %rdi       # 0x20ea
xorl %eax, %eax
callq 0x1090
cmpw $0x0, (%rbx)
je 0x19d4
leaq 0x782(%rip), %r14       # 0x20f9
leaq 0x787(%rip), %r15       # 0x2105
leaq 0x78d(%rip), %r12       # 0x2112
xorl %r13d, %r13d
xorl %ebp, %ebp
movq 0x8(%rbx), %rax
movzwl 0x4(%rax,%r13), %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x1090
movq 0x8(%rbx), %rax
movzwl 0x6(%rax,%r13), %esi
movq %r15, %rdi
xorl %eax, %eax
callq 0x1090
movq 0x8(%rbx), %rax
movl 0x8(%rax,%r13), %esi
movq %r12, %rdi
xorl %eax, %eax
callq 0x1090
incq %rbp
movzwl (%rbx), %eax
addq $0xc, %r13
cmpq %rax, %rbp
jb 0x198a
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/w4kfu[P]HommI/Icn/icn.c
// Function: icngetmaxwidth
int icngetmaxwidth(struct icn *icn)
{
	unsigned int width = 0;
	unsigned int i;

	if (!icn)
		return width;

	for (i = 0; i < icn->numentry; i++)
	{
		if (icn->entry[i].width > width)
			width = icn->entry[i].width;
	}
	return width;
}

// Assembly:
xorl %eax, %eax
testq %rdi, %rdi
je 0x1a14
movzwl (%rdi), %edx
testq %rdx, %rdx
je 0x1a14
movq 0x8(%rdi), %rcx
shll $0x2, %edx
leaq (%rdx,%rdx,2), %rdx
xorl %esi, %esi
xorl %eax, %eax
movzwl 0x4(%rcx,%rsi), %edi
cmpl %edi, %eax
cmovbel %edi, %eax
addq $0xc, %rsi
cmpq %rsi, %rdx
jne 0x1a01
retq
// File: /workspace/github_c_makefile_star2_O3/w4kfu[P]HommI/Icn/icn.c
// Function: icngetmaxheight
int icngetmaxheight(struct icn *icn)
{
	unsigned int height = 0;
	unsigned int i;

	if (!icn)
		return height;

	for (i = 0; i < icn->numentry; i++)
	{
		if (icn->entry[i].height > height)
			height = icn->entry[i].height;
	}
	return height;
}

// Assembly:
xorl %eax, %eax
testq %rdi, %rdi
je 0x1a46
movzwl (%rdi), %edx
testq %rdx, %rdx
je 0x1a46
movq 0x8(%rdi), %rcx
shll $0x2, %edx
leaq (%rdx,%rdx,2), %rdx
xorl %esi, %esi
xorl %eax, %eax
movzwl 0x6(%rcx,%rsi), %edi
cmpl %edi, %eax
cmovbel %edi, %eax
addq $0xc, %rsi
cmpq %rsi, %rdx
jne 0x1a33
retq
// File: /workspace/github_c_makefile_star2_O3/cirocosta[P]stress/src/epoll-tcp-server.c
// Function: make_socket_non_blocking
static void
make_socket_non_blocking(int sfd)
{
	int flags;
	int s;

	_STRESS_MUST_P((flags = fcntl(sfd, F_GETFL, 0)) != -1,
	               "fcntl",
	               "Couldn't retrieve flags from socket file descriptor");

	flags |= O_NONBLOCK;
	_STRESS_MUST_P(
	  (s = fcntl(sfd, F_SETFL, flags)) != -1,
	  "fcntl",
	  "Couldn't set nonblocking flags on socket file descriptor");
}

// Assembly:
pushq %rbx
movl %edi, %ebx
movl $0x3, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x1070
cmpl $-0x1, %eax
je 0x232c
orl $0x800, %eax            # imm = 0x800
movl %ebx, %edi
movl $0x4, %esi
movl %eax, %edx
xorl %eax, %eax
callq 0x1070
cmpl $-0x1, %eax
je 0x2331
popq %rbx
retq
callq 0x1579
callq 0x147c
// File: /workspace/github_c_makefile_star2_O3/fmadio[P]pcap_flow/fProfile.c
// Function: fProfile_Dump
void fProfile_Dump(u32 Index)
{
	double oot = 1.0 / g_ProfileTotal[Index];
	for (int i=0; i < 16; i++)
	{
		fprintf(stderr, "    [%2i] %016llx %20lli : (%.4f) : %s\n", 
				i,
				g_ProfileTotal[i],
				g_ProfileTotal[i],
				g_ProfileTotal[i] * oot,
				g_ProfileDesc[i]);
	}
	fProfile_Reset();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edi, %eax
leaq 0xd0a7(%rip), %r15      # 0xefb0
movsd (%r15,%rax,8), %xmm0
unpcklps 0x710a(%rip), %xmm0     # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x7112(%rip), %xmm0     # 0x9030
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movsd 0x77c6(%rip), %xmm0     # 0x96f8
divsd %xmm1, %xmm0
movsd %xmm0, (%rsp)
xorl %r12d, %r12d
movq 0xb0b3(%rip), %r13      # 0xcff8
leaq 0xd164(%rip), %rbp      # 0xf0b0
leaq 0x8bcc(%rip), %rbx      # 0xab1f
xorl %r14d, %r14d
movq (%r13), %rdi
movq (%r12,%r15), %rcx
movq %rcx, %xmm1
punpckldq 0x70b5(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x70bd(%rip), %xmm1     # 0x9030
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
mulsd (%rsp), %xmm0
movq (%r12,%rbp), %r9
movq %rbx, %rsi
movl %r14d, %edx
movq %rcx, %r8
movb $0x1, %al
callq 0x1170
incq %r14
addq $0x8, %r12
cmpq $0x10, %r14
jne 0x1f56
xorpd %xmm0, %xmm0
movapd %xmm0, 0xce6f(%rip)     # 0xee20
movapd %xmm0, 0xce57(%rip)     # 0xee10
movapd %xmm0, 0xce3f(%rip)     # 0xee00
movapd %xmm0, 0xce27(%rip)     # 0xedf0
movapd %xmm0, 0xce0f(%rip)     # 0xede0
movapd %xmm0, 0xcdf7(%rip)     # 0xedd0
movapd %xmm0, 0xcddf(%rip)     # 0xedc0
movapd %xmm0, 0xcdc7(%rip)     # 0xedb0
movapd %xmm0, 0xcebf(%rip)     # 0xeeb0
movapd %xmm0, 0xcec7(%rip)     # 0xeec0
movapd %xmm0, 0xcecf(%rip)     # 0xeed0
movapd %xmm0, 0xced7(%rip)     # 0xeee0
movapd %xmm0, 0xcedf(%rip)     # 0xeef0
movapd %xmm0, 0xcee7(%rip)     # 0xef00
movapd %xmm0, 0xceef(%rip)     # 0xef10
movapd %xmm0, 0xcef7(%rip)     # 0xef20
movapd %xmm0, 0xcf7f(%rip)     # 0xefb0
movapd %xmm0, 0xcf87(%rip)     # 0xefc0
movapd %xmm0, 0xcf8f(%rip)     # 0xefd0
movapd %xmm0, 0xcf97(%rip)     # 0xefe0
movapd %xmm0, 0xcf9f(%rip)     # 0xeff0
movapd %xmm0, 0xcfa7(%rip)     # 0xf000
movapd %xmm0, 0xcfaf(%rip)     # 0xf010
movapd %xmm0, 0xcfb7(%rip)     # 0xf020
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O3/fmadio[P]pcap_flow/tcpstream.c
// Function: fTCPStream_OutputHeader
void fTCPStream_OutputHeader(TCPStream_t* S, TCPOutputHeader_t* Header) 
{
	// ensure file is open
	fTCPStream_Open(S);	

	fProfile_Start(13, "TCP PktAdd OutputHeader");

	//int wlen = write(S->fd, &Header, sizeof(Header));
	//int wlen = fwrite(&Header, sizeof(Header), 1, S->File);
	fFile_Write(S->File, Header, sizeof(TCPOutputHeader_t), false);

	S->WritePos += sizeof(TCPOutputHeader_t);

	S->LastTSC = rdtsc();

	fProfile_Stop(13);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
callq 0x23a2
rdtsc
shlq $0x20, %rdx
movl %eax, %eax
orq %rdx, %rax
leaq 0xca75(%rip), %r15      # 0xedb0
movq %rax, 0x68(%r15)
leaq 0x6db0(%rip), %rax      # 0x90f6
leaq 0xcd63(%rip), %rcx      # 0xf0b0
movq %rax, 0x68(%rcx)
movq 0x8(%rbx), %rdi
movq %r14, %rsi
movl $0x20, %edx
xorl %ecx, %ecx
callq 0x836e
addq $0x20, 0x2440(%rbx)
rdtsc
shlq $0x20, %rdx
movl %eax, %eax
orq %rdx, %rax
movq %rax, 0x2428(%rbx)
rdtsc
shlq $0x20, %rdx
movl %eax, %eax
leaq 0xcc23(%rip), %rcx      # 0xefb0
subq 0x68(%r15), %rax
addq 0x68(%rcx), %rax
addq %rdx, %rax
movq %rax, 0x68(%rcx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/fmadio[P]pcap_flow/tcpstream.c
// Function: fTCPStream_Open
static void fTCPStream_Open(TCPStream_t* S)
{
	fProfile_Start(10, "TCP PktAdd Open");

	if (S->File == NULL)
	{
		fProfile_Start(15, "TCP IO Open");

		//S->File = fopen64(S->Path, "w+"); 
		S->File = fFile_Open(S->Path, NULL); 
		fProfile_Stop(15);

		if (S->File == NULL) 
		{
			fprintf(stderr, "failed to create output file [%s] errno:%i (%s)\n", S->Path, errno, strerror(errno));
			exit(-1);
		}
	}
	fProfile_Stop(10);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
rdtsc
shlq $0x20, %rdx
movl %eax, %eax
orq %rdx, %rax
leaq 0xc9f7(%rip), %r15      # 0xedb0
movq %rax, 0x50(%r15)
leaq 0x7136(%rip), %rax      # 0x94fa
leaq 0xcce5(%rip), %rcx      # 0xf0b0
movq %rax, 0x50(%rcx)
cmpq $0x0, 0x8(%rdi)
jne 0x242d
movq %rdi, %rbx
rdtsc
shlq $0x20, %rdx
movl %eax, %eax
orq %rdx, %rax
movq %rax, 0x78(%r15)
leaq 0x711b(%rip), %rax      # 0x950a
movq %rax, 0x78(%rcx)
leaq 0x2028(%rdi), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x82e4
movq %rax, 0x8(%rbx)
rdtsc
shlq $0x20, %rdx
movl %eax, %eax
leaq 0xcb99(%rip), %rcx      # 0xefb0
subq 0x78(%r15), %rax
addq 0x78(%rcx), %rax
addq %rdx, %rax
movq %rax, 0x78(%rcx)
cmpq $0x0, 0x8(%rbx)
je 0x2451
rdtsc
shlq $0x20, %rdx
movl %eax, %eax
leaq 0xcb74(%rip), %rcx      # 0xefb0
subq 0x50(%r15), %rax
addq 0x50(%rcx), %rax
addq %rdx, %rax
movq %rax, 0x50(%rcx)
popq %rbx
popq %r14
popq %r15
retq
movq %r14, %rdi
callq 0x1549
// File: /workspace/github_c_makefile_star2_O3/fmadio[P]pcap_flow/tcpstream.c
// Function: fTCPStream_OutputPayload
void fTCPStream_OutputPayload(TCPStream_t* S, u64 TS, u32 Length, u8* Payload, u32 Flag, u32 SeqNo, u32 AckNo, u32 WindowSize)
{

	// ensure file is open 
	fTCPStream_Open(S);	

	fProfile_Start(12, "TCP PktAdd OutputPayload");
	S->SeqNo += Length;

	int rlen;
	if (g_EnableTCPHeader)
	{
		TCPOutputHeader_t Header;
		Header.TS 		= TS;
		Header.Length 	= Length;
		Header.StreamID	= S->FlowID;
		Header.SeqNo	= SeqNo; 
		Header.AckNo	= AckNo; 
		Header.Window	= WindowSize; 
		Header.Flag		= Flag; 
		Header.CRC		= 0;
		Header.CRC		+= Header.TS;
		Header.CRC		+= Header.Length;
		Header.CRC		+= Header.StreamID;
		Header.CRC		+= Header.SeqNo;
		Header.CRC		+= Header.AckNo;
		Header.CRC		+= Header.Window;
		Header.CRC		+= Header.Flag;

		//rlen = write(S->fd, &Header, sizeof(Header));
		//rlen = fwrite(&Header, sizeof(Header), 1, S->File);
		fFile_Write(S->File, &Header, sizeof(TCPOutputHeader_t), false);

		S->WritePos += sizeof(TCPOutputHeader_t);
	}

	/*
	if (S->IsTrace)
	{
		for (int i=0; i < Length; i++)
		{
			if (i % 16 == 0) printf("\n");
			printf("%02x ", Payload[i]);
		}
		printf("\n");
	}
	*/


	//rlen = write(S->fd, Payload, Length);
	//rlen = fwrite(Payload, Length, 1, S->File);
	fFile_Write(S->File, Payload, Length, true);

	S->WritePos += Length; 

	S->LastTSC = rdtsc();

	// total TCP bytes output
	s_TotalByte += Length;
	s_TotalPkt	+= 1;

	fProfile_Stop(12);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r9d, %r12d
movl %r8d, %r15d
movq %rcx, %r14
movl %edx, %ebp
movq %rsi, %r13
movq %rdi, %rbx
callq 0x23a2
rdtsc
shlq $0x20, %rdx
movl %eax, %eax
orq %rdx, %rax
leaq 0xc921(%rip), %rcx      # 0xedb0
movq %rax, 0x60(%rcx)
leaq 0x6c74(%rip), %rax      # 0x910e
leaq 0xcc0f(%rip), %rcx      # 0xf0b0
movq %rax, 0x60(%rcx)
addl %ebp, 0x18(%rbx)
leaq 0xbd4d(%rip), %rax      # 0xe1fc
cmpl $0x0, (%rax)
je 0x250b
movl 0x68(%rsp), %eax
movl 0x60(%rsp), %ecx
leaq 0x8(%rsp), %rsi
movq %r13, (%rsi)
movw %bp, 0x8(%rsi)
movl 0x10(%rbx), %edx
movw %dx, 0xa(%rsi)
movl %r12d, 0xc(%rsi)
movl %ecx, 0x10(%rsi)
movl %eax, 0x14(%rsi)
movw %r15w, 0x18(%rsi)
addl %ebp, %r13d
addl %r12d, %r15d
addl %r13d, %r15d
addl %ecx, %r15d
addl %edx, %eax
addl %r15d, %eax
movw %ax, 0x1a(%rsi)
movq 0x8(%rbx), %rdi
movl $0x20, %edx
xorl %ecx, %ecx
callq 0x836e
addq $0x20, 0x2440(%rbx)
movq 0x8(%rbx), %rdi
movq %r14, %rsi
movl %ebp, %edx
movl $0x1, %ecx
callq 0x836e
movl %ebp, %ecx
addq %rcx, 0x2440(%rbx)
rdtsc
shlq $0x20, %rdx
movl %eax, %eax
orq %rdx, %rax
movq %rax, 0x2428(%rbx)
addq %rcx, 0xac50(%rip)      # 0xd190
incq 0xac51(%rip)            # 0xd198
rdtsc
shlq $0x20, %rdx
movl %eax, %eax
leaq 0xca5a(%rip), %rcx      # 0xefb0
leaq 0xc853(%rip), %rsi      # 0xedb0
subq 0x60(%rsi), %rax
addq 0x60(%rcx), %rax
addq %rdx, %rax
movq %rax, 0x60(%rcx)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq