LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/ToniWestbrook[P]paladin/bwt.c
// Function: bwt_2occ
void bwt_2occ(const bwt_t *bwt, bwtint_t k, bwtint_t l, ubyte_t c, bwtint_t *ok, bwtint_t *ol)
{
	bwtint_t _k, _l;
	_k = (k >= bwt->primary)? k-1 : k;
	_l = (l >= bwt->primary)? l-1 : l;
	if (_l/OCC_INTERVAL != _k/OCC_INTERVAL || k == (bwtint_t)(-1) || l == (bwtint_t)(-1)) {
		*ok = bwt_occ(bwt, k, c);
		*ol = bwt_occ(bwt, l, c);
	} else {
		bwtint_t m, n, i, j;
		uint32_t *p;
		if (k >= bwt->primary) --k;
		if (l >= bwt->primary) --l;
		//n = ((bwtint_t*)(p = bwt_occ_intv(bwt, k)))[c];
		n = ((bwtint_t*)(p = getOccInterval(bwt, k)))[c];
		p += sizeof(bwtint_t);
		// calculate *ok
		j = k >> 5 << 5;
		for (i = k/OCC_INTERVAL*OCC_INTERVAL; i < j; i += 32, p += 2)
			n += __occ_aux((uint64_t)p[0]<<32 | p[1], c);
		m = n;
		n += __occ_aux(((uint64_t)p[0]<<32 | p[1]) & ~((1ull<<((~k&31)<<1)) - 1), c);
		if (c == 0) n -= ~k&31; // corrected for the masked bits
		*ok = n;
		// calculate *ol
		j = l >> 5 << 5;
		for (; i < j; i += 32, p += 2)
			m += __occ_aux((uint64_t)p[0]<<32 | p[1], c);
		m += __occ_aux(((uint64_t)p[0]<<32 | p[1]) & ~((1ull<<((~l&31)<<1)) - 1), c);
		if (c == 0) m -= ~l&31; // corrected for the masked bits
		*ol = m;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %rbx
movq %r8, %r12
movq %rdx, %r15
movq %rdi, %r14
movq (%rdi), %rax
cmpq %rax, %rsi
movq %rsi, %rbp
adcq $-0x1, %rbp
cmpq %rax, %rdx
adcq $-0x1, %rdx
cmpq $-0x1, %r15
je 0xdace
cmpq $-0x1, %rsi
je 0xdace
movq %rdx, %rax
xorq %rbp, %rax
cmpq $0x80, %rax
jae 0xdace
movq %r12, 0x8(%rsp)
movq %rdx, (%rsp)
movq %rbx, 0x10(%rsp)
movl $0x80, %esi
movq %rbp, %rax
cqto
idivq %rsi
movq %rax, %rdx
shlq $0x8, %rdx
addq 0x120(%r14), %rdx
shlq $0x7, %rax
leaq (%rdx,%rax), %rsi
movzbl %cl, %r15d
movq (%rsi,%r15,8), %r14
leaq (%rax,%rdx), %rbx
addq $0x20, %rbx
movq %rbp, %r12
andq $-0x20, %r12
movq %rbp, %r13
andq $-0x80, %r13
movl (%rbx), %eax
movl 0x4(%rbx), %edi
shlq $0x20, %rax
orq %rax, %rdi
cmpq %r12, %r13
jae 0xda3f
movl %r15d, %esi
callq 0xdb01
addq %rax, %r14
addq $0x20, %r13
addq $0x8, %rbx
jmp 0xda19
notl %ebp
andl $0x1f, %ebp
movl %ebp, %ecx
addl %ebp, %ecx
shrq %cl, %rdi
shlq %cl, %rdi
movl %r15d, %esi
callq 0xdb01
xorl %ecx, %ecx
testb %r15b, %r15b
cmoveq %rbp, %rcx
movq %r14, %rdx
subq %rcx, %rdx
addq %rax, %rdx
movq 0x8(%rsp), %rax
movq %rdx, (%rax)
movq (%rsp), %r12
andq $-0x20, %r12
movl (%rbx), %eax
movl 0x4(%rbx), %edi
shlq $0x20, %rax
orq %rax, %rdi
cmpq %r12, %r13
jae 0xda9e
movl %r15d, %esi
callq 0xdb01
addq %rax, %r14
addq $0x20, %r13
addq $0x8, %rbx
jmp 0xda78
movq (%rsp), %rbx
notl %ebx
andl $0x1f, %ebx
leal (%rbx,%rbx), %ecx
shrq %cl, %rdi
shlq %cl, %rdi
movl %r15d, %esi
callq 0xdb01
xorl %ecx, %ecx
testb %r15b, %r15b
cmoveq %rbx, %rcx
subq %rcx, %r14
addq %rax, %r14
movq 0x10(%rsp), %rbx
jmp 0xdaef
movzbl %cl, %ebp
movq %r14, %rdi
movl %ebp, %edx
callq 0xd812
movq %rax, (%r12)
movq %r14, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0xd812
movq %rax, %r14
movq %r14, (%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ToniWestbrook[P]paladin/bwt.c
// Function: _occ_aux
static inline int64_t __occ_aux(uint64_t y, int c) {
	unsigned char * bytePtr;
	int64_t count, byteIdx;

	bytePtr = (unsigned char *) &y;
	count = 0;

	for (byteIdx = 0 ; byteIdx < sizeof(y) ; byteIdx++) {
		if (bytePtr[byteIdx] == c) count++;
	}

	return count;
}

// Assembly:
movq %rdi, -0x8(%rsp)
xorl %eax, %eax
xorl %ecx, %ecx
cmpq $0x8, %rcx
je 0xdb25
movzbl -0x8(%rsp,%rcx), %edx
xorl %edi, %edi
cmpl %esi, %edx
sete %dil
addq %rdi, %rax
incq %rcx
jmp 0xdb0a
retq
// File: /workspace/github_c_makefile_star2_O2/ToniWestbrook[P]paladin/bwt.c
// Function: bwt_match_exact
int bwt_match_exact(const bwt_t *bwt, int len, const ubyte_t *str, bwtint_t *sa_begin, bwtint_t *sa_end)
{
	bwtint_t k, l, ok, ol;
	int i;
	k = 0; l = bwt->seq_len;
	for (i = len - 1; i >= 0; --i) {
		ubyte_t c = str[i];
		if (c > 3) return 0; // no match
		bwt_2occ(bwt, k - 1, l, c, &ok, &ol);
		k = bwt->L2[c] + ok + 1;
		l = bwt->L2[c] + ol;
		if (k > l) break; // no match
	}
	if (k > l) return 0; // no match
	if (sa_begin) *sa_begin = k;
	if (sa_end)   *sa_end = l;
	return l - k + 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, 0x10(%rsp)
movq %rcx, 0x8(%rsp)
movq %rdx, %r15
movq %rdi, %r12
movq 0x110(%rdi), %rdx
movl %esi, %r14d
xorl %esi, %esi
leaq 0x20(%rsp), %r13
leaq 0x18(%rsp), %rbp
testl %r14d, %r14d
jle 0xdbc5
movzbl -0x1(%r15,%r14), %ebx
cmpq $0x3, %rbx
ja 0xdbca
decq %rsi
movq %r12, %rdi
movl %ebx, %ecx
movq %r13, %r8
movq %rbp, %r9
callq 0xd976
movq 0x8(%r12,%rbx,8), %rdx
movq 0x20(%rsp), %rax
leaq (%rdx,%rax), %rsi
incq %rsi
addq 0x18(%rsp), %rdx
decq %r14
cmpq %rdx, %rsi
jbe 0xdb83
cmpq %rsi, %rdx
jae 0xdbce
xorl %edx, %edx
jmp 0xdbec
movq 0x8(%rsp), %rax
testq %rax, %rax
je 0xdbdb
movq %rsi, (%rax)
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0xdbe8
movq %rdx, (%rax)
subl %esi, %edx
incl %edx
movl %edx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ToniWestbrook[P]paladin/bwt.c
// Function: bwt_match_exact_alt
int bwt_match_exact_alt(const bwt_t *bwt, int len, const ubyte_t *str, bwtint_t *k0, bwtint_t *l0)
{
	int i;
	bwtint_t k, l, ok, ol;
	k = *k0; l = *l0;
	for (i = len - 1; i >= 0; --i) {
		ubyte_t c = str[i];
		if (c > 3) return 0; // there is an N here. no match
		bwt_2occ(bwt, k - 1, l, c, &ok, &ol);
		k = bwt->L2[c] + ok + 1;
		l = bwt->L2[c] + ol;
		if (k > l) return 0; // no match
	}
	*k0 = k; *l0 = l;
	return l - k + 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r15
movl %esi, %eax
movq %rdi, %r12
movq %rcx, 0x8(%rsp)
movq (%rcx), %rsi
movq %r8, 0x10(%rsp)
movq (%r8), %rdx
movl %eax, %r13d
leaq 0x18(%rsp), %rbp
xorl %ebx, %ebx
testl %r13d, %r13d
jle 0xdc74
movzbl -0x1(%r15,%r13), %r14d
cmpq $0x3, %r14
ja 0xdc8a
decq %rsi
movq %r12, %rdi
movl %r14d, %ecx
leaq 0x20(%rsp), %r8
movq %rbp, %r9
callq 0xd976
movq 0x8(%r12,%r14,8), %rdx
movq 0x20(%rsp), %rax
leaq (%rdx,%rax), %rsi
incq %rsi
addq 0x18(%rsp), %rdx
decq %r13
cmpq %rdx, %rsi
jbe 0xdc2d
jmp 0xdc8a
movq 0x8(%rsp), %rax
movq %rsi, (%rax)
movq 0x10(%rsp), %rax
movq %rdx, (%rax)
subl %esi, %edx
incl %edx
movl %edx, %ebx
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ToniWestbrook[P]paladin/bwt.c
// Function: bwt_extend
void bwt_extend(const bwt_t *bwt, const bwtintv_t *ik, bwtintv_t ok[VALUE_DOMAIN], int is_back)
{
	bwtint_t tk[VALUE_DOMAIN], tl[VALUE_DOMAIN];
	int i, copyIdx;

	// Accumulate occurrences
	bwt_2occ4(bwt, ik->x[!is_back] - 1, ik->x[!is_back] - 1 + ik->x[2], tk, tl);
	for (i = 0; i != VALUE_DOMAIN; ++i) {
		ok[i].x[!is_back] = bwt->L2[i] + 1 + tk[i];
		ok[i].x[2] = tl[i] - tk[i];
	}

	// Copy values returned from occurrence accumulators
	ok[VALUE_DOMAIN - 1].x[is_back] = ik->x[is_back] + (ik->x[!is_back] <= bwt->primary && ik->x[!is_back] + ik->x[2] - 1 >= bwt->primary);

	for (copyIdx = VALUE_DOMAIN - 2 ; copyIdx >= 0 ; copyIdx--) {
		ok[copyIdx].x[is_back] = ok[copyIdx + 1].x[is_back] + ok[copyIdx + 1].x[2];
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movl %ecx, %ebp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
xorl %r12d, %r12d
testl %ecx, %ecx
sete %r12b
movl %r12d, %r13d
shll $0x3, %r13d
movq (%rsi,%r13), %rsi
decq %rsi
movq 0x10(%r14), %rdx
addq %rsi, %rdx
leaq 0x100(%rsp), %rcx
movq %rsp, %r8
callq 0xdb26
addq %rbx, %r13
xorl %eax, %eax
cmpq $0x100, %rax            # imm = 0x100
je 0xdd1c
movq 0x8(%r15,%rax), %rcx
movq 0x100(%rsp,%rax), %rdx
addq %rdx, %rcx
incq %rcx
movq %rcx, (%r13,%rax,4)
movq (%rsp,%rax), %rcx
subq %rdx, %rcx
movq %rcx, 0x10(%rbx,%rax,4)
addq $0x8, %rax
jmp 0xdcea
movslq %ebp, %rax
movq (%r14,%rax,8), %rcx
movq (%r14,%r12,8), %rdx
movq (%r15), %rsi
cmpq %rsi, %rdx
jbe 0xdd33
xorl %edx, %edx
jmp 0xdd45
movq 0x10(%r14), %rdi
addq %rdx, %rdi
decq %rdi
xorl %edx, %edx
cmpq %rsi, %rdi
setae %dl
addq %rcx, %rdx
movq %rdx, 0x3e0(%rbx,%rax,8)
pushq $0x1e
popq %rcx
testl %ecx, %ecx
js 0xdd73
movl %ecx, %edx
shlq $0x5, %rdx
leaq (%rbx,%rdx), %rsi
movq 0x30(%rbx,%rdx), %rdx
addq 0x20(%rsi,%rax,8), %rdx
movq %rdx, (%rsi,%rax,8)
decl %ecx
jmp 0xdd53
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ToniWestbrook[P]paladin/bwt.c
// Function: bwt_reverse_intvs
static void bwt_reverse_intvs(bwtintv_v *p)
{
	if (p->n > 1) {
		int j;
		for (j = 0; j < p->n>>1; ++j) {
			bwtintv_t tmp = p->a[p->n - 1 - j];
			p->a[p->n - 1 - j] = p->a[j];
			p->a[j] = tmp;
		}
	}
}

// Assembly:
movq (%rdi), %rdx
cmpq $0x2, %rdx
jb 0xe3eb
movabsq $-0x20, %rax
xorl %ecx, %ecx
xorl %esi, %esi
movq %rdx, %r8
shrq %r8
cmpq %rsi, %r8
jbe 0xe3eb
movq 0x10(%rdi), %r8
shlq $0x5, %rdx
addq %r8, %rdx
movups (%rax,%rdx), %xmm0
movups 0x10(%rax,%rdx), %xmm1
movaps %xmm1, -0x18(%rsp)
movaps %xmm0, -0x28(%rsp)
movups (%r8,%rcx), %xmm0
movups 0x10(%r8,%rcx), %xmm1
movups %xmm0, (%rax,%rdx)
movups %xmm1, 0x10(%rax,%rdx)
movq 0x10(%rdi), %rdx
movaps -0x28(%rsp), %xmm0
movaps -0x18(%rsp), %xmm1
movups %xmm1, 0x10(%rdx,%rcx)
movups %xmm0, (%rdx,%rcx)
incq %rsi
movq (%rdi), %rdx
addq $0x20, %rcx
addq $-0x20, %rax
jmp 0xe387
retq
// File: /workspace/github_c_makefile_star2_O2/ToniWestbrook[P]paladin/bwt.c
// Function: bwt_seed_strategy1
int bwt_seed_strategy1(const bwt_t *bwt, int len, const uint8_t *q, int x, int min_len, int max_intv, bwtintv_t *mem)
{
	int i, c;
	bwtintv_t ik, ok[VALUE_DOMAIN];

	memset(mem, 0, sizeof(bwtintv_t));
	if (q[x] >= VALUE_DEFINED) return x + 1;
	//if (q[x] > 3) return x + 1;
	bwt_set_intv(bwt, q[x], ik); // the initial interval of a single base
	for (i = x + 1; i < len; ++i) { // forward search
		if (q[i] < VALUE_DEFINED) { // an amino acid
		c = VALUE_DEFINED - 1 - q[i]; // complement of q[i]
		bwt_extend(bwt, &ik, ok, 0);
		if (ok[c].x[2] < max_intv && i - x >= min_len) {
			*mem = ok[c];
			mem->info = (uint64_t)x<<32 | (i + 1);
			return i + 1;
		}
		ik = ok[c];
		} else return i + 1;
	}
	return len;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x448, %rsp            # imm = 0x448
movq %rdi, %r15
movq 0x480(%rsp), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
movslq %ecx, %rdi
movq %rdx, 0x18(%rsp)
movzbl (%rdx,%rdi), %eax
cmpq $0x16, %rax
jb 0xe442
movl %ecx, %ebp
incl %ebp
jmp 0xe52b
movq 0x8(%r15,%rax,8), %rcx
leaq 0x1(%rcx), %rdx
leaq 0x20(%rsp), %r10
movq %rdx, (%r10)
movq 0x10(%r15,%rax,8), %rdx
subq %rcx, %rdx
movq %rdx, 0x10(%r10)
pushq $0x15
popq %rcx
subl %eax, %ecx
shll $0x3, %ecx
movq 0x8(%r15,%rcx), %rax
incq %rax
movq %rax, 0x8(%r10)
andq $0x0, 0x18(%r10)
movslq %r9d, %rbx
movl %esi, 0x4(%rsp)
movslq %esi, %r12
movslq %r8d, %rax
addq %rdi, %rax
movq %rax, 0x10(%rsp)
leal 0x2(%rdi), %ebp
movq %rdi, 0x8(%rsp)
leaq 0x1(%rdi), %r13
cmpq %r12, %r13
jge 0xe4fc
movq 0x18(%rsp), %rax
movzbl (%rax,%r13), %eax
cmpq $0x15, %rax
ja 0xe52b
pushq $0x15
popq %rcx
movl %ecx, %r14d
subl %eax, %r14d
movq %r15, %rdi
leaq 0x20(%rsp), %rsi
leaq 0x40(%rsp), %rdx
xorl %ecx, %ecx
callq 0xdc9b
shll $0x5, %r14d
leaq (%rsp,%r14), %rax
addq $0x40, %rax
cmpq %rbx, 0x10(%rax)
jae 0xe4e4
cmpq 0x10(%rsp), %r13
jge 0xe502
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movaps %xmm1, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
incl %ebp
incq %r13
jmp 0xe499
movl 0x4(%rsp), %ebp
jmp 0xe52b
movq 0x10(%rax), %rcx
movq 0x480(%rsp), %rdx
movq %rcx, 0x10(%rdx)
movups (%rax), %xmm0
movups %xmm0, (%rdx)
movq 0x8(%rsp), %rcx
shlq $0x20, %rcx
movslq %ebp, %rax
orq %rcx, %rax
movq %rax, 0x18(%rdx)
movl %ebp, %eax
addq $0x448, %rsp            # imm = 0x448
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ToniWestbrook[P]paladin/bwt.c
// Function: bwt_dump_bwt
void bwt_dump_bwt(const char *fn, const bwt_t *bwt) {
	FILE *fp;

	fp = xopen(fn, "wb");

	// Format: <primary><L2[1::]><bwt>
	// Sizes: 8, Domain * 8, BWTSize * 4
	err_fwrite(&bwt->primary, sizeof(bwtint_t), 1, fp);
	err_fwrite(bwt->L2+1, sizeof(bwtint_t), VALUE_DOMAIN, fp);
	err_fwrite(bwt->bwt, sizeof(uint32_t), bwt->bwt_size, fp);
	err_fflush(fp);
	err_fclose(fp);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rsi
leaq 0x14c4d(%rip), %rdi     # 0x2319e
leaq 0x143d4(%rip), %rdx     # 0x2292c
callq 0xc931
movq %rax, %rbx
pushq $0x8
popq %r15
pushq $0x1
popq %rdx
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rcx
callq 0xcc84
leaq 0x10(%r14), %rdi
pushq $0x20
popq %rdx
movq %r15, %rsi
movq %rbx, %rcx
callq 0xcc84
movq 0x118(%r14), %rdx
movq 0x120(%r14), %rdi
pushq $0x4
popq %rsi
movq %rbx, %rcx
callq 0xcc84
movq %rbx, %rdi
callq 0xcf7e
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0xd01b
// File: /workspace/github_c_makefile_star2_O2/ToniWestbrook[P]paladin/bwt.c
// Function: bwt_dump_sa
void bwt_dump_sa(const char *fn, const bwt_t *bwt) {
	FILE *fp;

	fp = xopen(fn, "wb");

	// Format: <primary><L2[1::]><SA Interval><Seq Length><SA[1::]>
	err_fwrite(&bwt->primary, sizeof(bwtint_t), 1, fp);
	err_fwrite(bwt->L2+1, sizeof(bwtint_t), VALUE_DOMAIN, fp);
	err_fwrite(&bwt->sa_intv, sizeof(bwtint_t), 1, fp);
	err_fwrite(&bwt->seq_len, sizeof(bwtint_t), 1, fp);
	err_fwrite(bwt->sa + 1, sizeof(bwtint_t), bwt->n_sa - 1, fp);
	err_fflush(fp);
	err_fclose(fp);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rsi
leaq 0x14be1(%rip), %rdi     # 0x231ab
leaq 0x1435b(%rip), %rdx     # 0x2292c
callq 0xc931
movq %rax, %rbx
pushq $0x8
popq %r15
pushq $0x1
popq %r12
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %rax, %rcx
callq 0xcc84
leaq 0x10(%r14), %rdi
pushq $0x20
popq %rdx
movq %r15, %rsi
movq %rbx, %rcx
callq 0xcc84
leaq 0x128(%r14), %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %rbx, %rcx
callq 0xcc84
leaq 0x110(%r14), %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %rbx, %rcx
callq 0xcc84
movq 0x130(%r14), %rdx
movq 0x138(%r14), %rdi
addq $0x8, %rdi
decq %rdx
movq %r15, %rsi
movq %rbx, %rcx
callq 0xcc84
movq %rbx, %rdi
callq 0xcf7e
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xd01b
// File: /workspace/github_c_makefile_star2_O2/ToniWestbrook[P]paladin/bwt.c
// Function: bwt_restore_sa
void bwt_restore_sa(const char *fn, bwt_t *bwt) {
	char skipped[256];
	FILE *fp;
	bwtint_t primary;

	fp = xopen(fn, "rb");

	// Format: <primary><L2[1::]><SA Interval><Seq Length><SA[1::]>
	err_fread_noeof(&primary, sizeof(bwtint_t), 1, fp);
	xassert(primary == bwt->primary, "SA-BWT inconsistency: primary is not the same.");
	err_fread_noeof(skipped, sizeof(bwtint_t), VALUE_DOMAIN, fp); // skip
	err_fread_noeof(&bwt->sa_intv, sizeof(bwtint_t), 1, fp);
	err_fread_noeof(&primary, sizeof(bwtint_t), 1, fp);
	xassert(primary == bwt->seq_len, "SA-BWT inconsistency: seq_len is not the same.");

	bwt->n_sa = (bwt->seq_len + bwt->sa_intv) / bwt->sa_intv;
	bwt->sa = (bwtint_t*)calloc(bwt->n_sa, sizeof(bwtint_t));
	bwt->sa[0] = -1;

	fread_fix(fp, sizeof(bwtint_t) * (bwt->n_sa - 1), bwt->sa + 1);
	err_fclose(fp);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x110, %rsp            # imm = 0x110
movq %rsi, %r14
movq %rdi, %rsi
leaq 0x14b31(%rip), %rdi     # 0x231b7
leaq 0x1539b(%rip), %rdx     # 0x23a28
callq 0xc931
movq %rax, %rbx
leaq 0x8(%rsp), %r15
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
movq %r15, %rdi
movq %rax, %rcx
callq 0xccb2
movq (%r15), %rax
cmpq (%r14), %rax
jne 0xe781
leaq 0x10(%rsp), %rdi
pushq $0x8
popq %r15
pushq $0x20
popq %rdx
movq %r15, %rsi
movq %rbx, %rcx
callq 0xccb2
leaq 0x128(%r14), %rdi
pushq $0x1
popq %r12
movq %r15, %rsi
movq %r12, %rdx
movq %rbx, %rcx
callq 0xccb2
leaq 0x8(%rsp), %r13
movq %r13, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %rbx, %rcx
callq 0xccb2
movq (%r13), %rax
cmpq 0x110(%r14), %rax
jne 0xe794
movslq 0x128(%r14), %rcx
addq %rcx, %rax
xorl %edx, %edx
divq %rcx
movq %rax, 0x130(%r14)
leaq 0x14a62(%rip), %rdx     # 0x2318d
leaq 0x14a85(%rip), %r8      # 0x231b7
pushq $0x8
popq %rsi
movq %rax, %rdi
movl $0x1ea, %ecx            # imm = 0x1EA
callq 0x1dfd0
movq %rax, 0x138(%r14)
orq $-0x1, (%rax)
movq 0x130(%r14), %rcx
leaq -0x8(,%rcx,8), %rsi
leaq 0x8(%rax), %rdx
movq %rbx, %rdi
callq 0xe7a7
movq %rbx, %rdi
callq 0xd01b
addq $0x110, %rsp            # imm = 0x110
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x14a2f(%rip), %rdi     # 0x231b7
leaq 0x14a37(%rip), %rsi     # 0x231c6
callq 0xcc60
leaq 0x14a1c(%rip), %rdi     # 0x231b7
leaq 0x14a53(%rip), %rsi     # 0x231f5
callq 0xcc60
// File: /workspace/github_c_makefile_star2_O2/ToniWestbrook[P]paladin/bwt.c
// Function: fread_fix
static bwtint_t fread_fix(FILE *fp, bwtint_t size, void *a)
{ // Mac/Darwin has a bug when reading data longer than 2GB. This function fixes this issue by reading data in small chunks
	const int bufsize = 0x1000000; // 16M block
	bwtint_t offset = 0;
	while (size) {
		int x = bufsize < size? bufsize : size;
		if ((x = err_fread_noeof(a + offset, 1, x, fp)) == 0) break;
		size -= x; offset += x;
	}
	return offset;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
xorl %r13d, %r13d
movl $0x1000000, %ebp        # imm = 0x1000000
pushq $0x1
popq %r12
testq %r14, %r14
je 0xe7f3
cmpq %rbp, %r14
movl $0x1000000, %edx        # imm = 0x1000000
cmovbq %r14, %rdx
leaq (%rbx,%r13), %rdi
movq %r12, %rsi
movq %r15, %rcx
callq 0xccb2
cltq
subq %rax, %r14
addq %rax, %r13
testl %eax, %eax
jne 0xe7c7
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ToniWestbrook[P]paladin/bwt.c
// Function: bwt_restore_bwt
bwt_t *bwt_restore_bwt(const char *fn) {
	bwt_t *bwt;
	FILE *fp;

	bwt = (bwt_t*)calloc(1, sizeof(bwt_t));
	fp = xopen(fn, "rb");
	err_fseek(fp, 0, SEEK_END);

	// Populate BWT Size and allocate BWT
	bwt->bwt_size = (err_ftell(fp) - sizeof(bwtint_t) * (VALUE_DOMAIN + 1)) / sizeof(uint32_t);
	bwt->bwt = (uint32_t*)calloc(bwt->bwt_size, sizeof(uint32_t));

	// Populate Primary, L2[1::], and BWT
	err_fseek(fp, 0, SEEK_SET);
	err_fread_noeof(&bwt->primary, sizeof(bwtint_t), 1, fp);
	err_fread_noeof(bwt->L2+1, sizeof(bwtint_t), VALUE_DOMAIN, fp);
	fread_fix(fp, bwt->bwt_size * sizeof(uint32_t), bwt->bwt);

	// Sequence length in end of L2 array
	bwt->seq_len = bwt->L2[VALUE_DOMAIN];

	err_fclose(fp);

	return bwt;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %r14
leaq 0x14978(%rip), %r13     # 0x2318d
leaq 0x14a08(%rip), %r12     # 0x23224
pushq $0x1
popq %r15
movl $0x140, %esi            # imm = 0x140
movq %r15, %rdi
movq %r13, %rdx
movl $0x1f5, %ecx            # imm = 0x1F5
movq %r12, %r8
callq 0x1dfd0
movq %rax, %rbx
leaq 0x151e6(%rip), %rdx     # 0x23a28
movq %r12, %rdi
movq %r14, %rsi
callq 0xc931
movq %rax, %r14
pushq $0x2
popq %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0xcd4e
movq %r14, %rdi
callq 0xcd77
leaq -0x108(%rax), %rdi
shrq $0x2, %rdi
movq %rdi, 0x118(%rbx)
pushq $0x4
popq %rsi
movq %r13, %rdx
movl $0x1fb, %ecx            # imm = 0x1FB
movq %r12, %r8
callq 0x1dfd0
movq %rax, 0x120(%rbx)
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xcd4e
pushq $0x8
popq %r12
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0xccb2
leaq 0x10(%rbx), %rdi
pushq $0x20
popq %rdx
movq %r12, %rsi
movq %r14, %rcx
callq 0xccb2
movq 0x118(%rbx), %rsi
movq 0x120(%rbx), %rdx
shlq $0x2, %rsi
movq %r14, %rdi
callq 0xe7a7
movq 0x108(%rbx), %rax
movq %rax, 0x110(%rbx)
movq %r14, %rdi
callq 0xd01b
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/ToniWestbrook[P]paladin/bntseq.c
// Function: bns_destroy
void bns_destroy(bntseq_t *bns)
{
	if (bns == 0) return;
	else {
		int i;
		if (bns->fp_pac) err_fclose(bns->fp_pac);
		free(bns->ambs);
		for (i = 0; i < bns->n_seqs; ++i) {
			free(bns->anns[i].name);
			free(bns->anns[i].anno);
		}
		free(bns->anns);
		free(bns);
	}
}

// Assembly:
testq %rdi, %rdi
je 0xf3af
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x28(%rdi), %rdi
testq %rdi, %rdi
je 0xf360
callq 0xd01b
movq 0x20(%rbx), %rdi
callq 0x3390
xorl %r14d, %r14d
xorl %r15d, %r15d
movslq 0x8(%rbx), %rax
movq 0x10(%rbx), %rdi
cmpq %rax, %r15
jge 0xf39d
movq 0x18(%rdi,%r14), %rdi
callq 0x3390
movq 0x10(%rbx), %rax
movq 0x20(%rax,%r14), %rdi
callq 0x3390
incq %r15
addq $0x28, %r14
jmp 0xf36f
callq 0x3390
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x3390
retq
// File: /workspace/github_c_makefile_star2_O2/ToniWestbrook[P]paladin/bntseq.c
// Function: bwa_fa2pac
int bwa_fa2pac(int argc, char *argv[])
{
	int c, for_only = 0;
	gzFile fp;
	while ((c = getopt(argc, argv, "f")) >= 0) {
		switch (c) {
			case 'f': for_only = 1; break;
		}
	}
	if (argc == optind) {
		fprintf(stderr, "Usage: bwa fa2pac [-f] <in.fasta> [<out.prefix>]\n");
		return 1;
	}
	fp = xzopen(argv[optind], "r");
	bns_fasta2bntseq(fp, (optind+1 < argc)? argv[optind+1] : argv[optind], for_only);
	err_gzclose(fp);
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movl %edi, %r15d
xorl %ebx, %ebx
leaq 0x1461d(%rip), %r12     # 0x23eb3
pushq $0x1
popq %rbp
movl %r15d, %edi
movq %r14, %rsi
movq %r12, %rdx
callq 0x3090
testl %eax, %eax
js 0xf8b3
cmpl $0x66, %eax
cmovel %ebp, %ebx
jmp 0xf899
movq 0x1c71e(%rip), %r13     # 0x2bfd8
movslq (%r13), %rax
cmpl %r15d, %eax
je 0xf915
movq (%r14,%rax,8), %rsi
leaq 0x13a91(%rip), %rdi     # 0x2335f
leaq 0x12549(%rip), %rdx     # 0x21e1e
callq 0xcacc
movq %rax, %r12
movl (%r13), %eax
leal 0x1(%rax), %ecx
cmpl %r15d, %ecx
cmovll %ecx, %eax
cltq
movq (%r14,%rax,8), %rsi
movq %r12, %rdi
movl %ebx, %edx
callq 0xf629
movq %r12, %rdi
callq 0xd044
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x1c6b4(%rip), %rax     # 0x2bfd0
movq (%rax), %rcx
leaq 0x13a07(%rip), %rdi     # 0x2332d
pushq $0x31
popq %rsi
pushq $0x1
popq %rdx
callq 0x3790
jmp 0xf904
// File: /workspace/github_c_makefile_star2_O2/ToniWestbrook[P]paladin/bntseq.c
// Function: bns_pos2rid
int bns_pos2rid(const bntseq_t *bns, int64_t pos_f)
{
	int left, mid, right;
	if (pos_f >= bns->l_pac) return -1;
	left = 0; mid = 0; right = bns->n_seqs;
	while (left < right) { // binary search
		mid = (left + right) >> 1;
		if (pos_f >= bns->anns[mid].offset) {
			if (mid == bns->n_seqs - 1) break;
			if (pos_f < bns->anns[mid+1].offset) break; // bracketed
			left = mid + 1;
		} else right = mid;
	}
	return mid;
}

// Assembly:
cmpq %rsi, (%rdi)
jle 0xf979
movl 0x8(%rdi), %edx
leal -0x1(%rdx), %ecx
xorl %r8d, %r8d
xorl %eax, %eax
movl %edx, %r10d
cmpl %r10d, %r8d
jge 0xf97c
movl %r10d, %edx
leal (%rdx,%r8), %eax
shrl %eax
movq 0x10(%rdi), %r9
imulq $0x28, %rax, %r11
movl %eax, %r10d
cmpq %rsi, (%r9,%r11)
jg 0xf946
cmpl %ecx, %eax
je 0xf97d
leal 0x1(%rax), %r8d
imulq $0x28, %r8, %r10
cmpq %rsi, (%r9,%r10)
jle 0xf943
jmp 0xf97c
pushq $-0x1
popq %rax
retq
movl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/ToniWestbrook[P]paladin/bntseq.c
// Function: bns_intv2rid
int bns_intv2rid(const bntseq_t *bns, int64_t rb, int64_t re)
{
	int is_rev, rid_b, rid_e;
	if (rb < bns->l_pac && re > bns->l_pac) return -2;
	assert(rb <= re);
	rid_b = bns_pos2rid(bns, bns_depos(bns, rb, &is_rev));
	rid_e = rb < re? bns_pos2rid(bns, bns_depos(bns, re - 1, &is_rev)) : rid_b;
	return rid_b == rid_e? rid_b : -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq (%rdi), %r12
cmpq %rsi, %r12
setg %al
cmpq %rdx, %r12
setl %cl
testb %cl, %al
je 0xf9a0
pushq $-0x2
popq %rax
jmp 0xf9ed
movq %rdx, %r14
movq %rsi, %r15
cmpq %rdx, %rsi
jg 0xf9f6
movq %rdi, %rbx
cmpq %r15, %r12
movq %r15, %rax
notq %rax
leaq (%rax,%r12,2), %rsi
cmovgq %r15, %rsi
callq 0xf933
movl %eax, %ebp
cmpq %r14, %r15
jge 0xf9e5
leaq (%r12,%r12), %rsi
leaq -0x1(%r14), %rax
subq %r14, %rsi
cmpq %r14, %r12
cmovgeq %rax, %rsi
movq %rbx, %rdi
callq 0xf933
cmpl %eax, %ebp
pushq $-0x1
popq %rax
cmovel %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1396d(%rip), %rdi     # 0x2336a
leaq 0x1387c(%rip), %rsi     # 0x23280
leaq 0x13968(%rip), %rcx     # 0x23373
movl $0x1b3, %edx            # imm = 0x1B3
callq 0x31a0
// File: /workspace/github_c_makefile_star2_O2/ToniWestbrook[P]paladin/bntseq.c
// Function: bns_cnt_ambi
int bns_cnt_ambi(const bntseq_t *bns, int64_t pos_f, int len, int *ref_id)
{
	int left, mid, right, nn;
	if (ref_id) *ref_id = bns_pos2rid(bns, pos_f);
	left = 0; right = bns->n_holes; nn = 0;
	while (left < right) {
		mid = (left + right) >> 1;
		if (pos_f >= bns->ambs[mid].offset + bns->ambs[mid].len) left = mid + 1;
		else if (pos_f + len <= bns->ambs[mid].offset) right = mid;
		else { // overlap
			if (pos_f >= bns->ambs[mid].offset) {
				nn += bns->ambs[mid].offset + bns->ambs[mid].len < pos_f + len?
					bns->ambs[mid].offset + bns->ambs[mid].len - pos_f : len;
			} else {
				nn += bns->ambs[mid].offset + bns->ambs[mid].len < pos_f + len?
					bns->ambs[mid].len : len - (bns->ambs[mid].offset - pos_f);
			}
			break;
		}
	}
	return nn;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
testq %rcx, %rcx
je 0xfa3c
movq %rcx, %r12
movq %r15, %rdi
movq %r14, %rsi
callq 0xf933
movl %eax, (%r12)
movl 0x18(%r15), %ecx
movslq %ebx, %rax
addq %r14, %rax
xorl %edx, %edx
cmpl %ecx, %edx
jge 0xfa82
leal (%rcx,%rdx), %r9d
shrl %r9d
movq 0x20(%r15), %rsi
movq %r9, %rdi
shlq $0x4, %rdi
movq (%rsi,%rdi), %r8
movslq 0x8(%rsi,%rdi), %rdi
leaq (%r8,%rdi), %rsi
cmpq %r14, %rsi
jle 0xfa7a
movl %r9d, %ecx
cmpq %r8, %rax
jle 0xfa48
jmp 0xfa86
incl %r9d
movl %r9d, %edx
jmp 0xfa48
xorl %ebx, %ebx
jmp 0xfaa8
cmpq %r8, %r14
jge 0xfa9d
subl %r8d, %r14d
addl %ebx, %r14d
cmpq %rax, %rsi
cmovll %edi, %r14d
movl %r14d, %ebx
jmp 0xfaa8
movl %esi, %ecx
subl %r14d, %ecx
cmpq %rax, %rsi
cmovll %ecx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/ToniWestbrook[P]paladin/bntseq.c
// Function: bns_get_seq
uint8_t *bns_get_seq(int64_t l_pac, const uint8_t *pac, int64_t beg, int64_t end, int64_t *len)
{
	uint8_t *seq = 0;
	if (end < beg) end ^= beg, beg ^= end, end ^= beg; // if end is smaller, swap
	if (end > l_pac<<1) end = l_pac<<1;
	if (beg < 0) beg = 0;
	if (beg >= l_pac || end <= l_pac) {
		int64_t k, l = 0;
		*len = end - beg;
		seq = malloc(end - beg);
		if (beg >= l_pac) { // reverse strand
			int64_t beg_f = (l_pac<<1) - 1 - end;
			int64_t end_f = (l_pac<<1) - 1 - beg;
			for (k = end_f; k > beg_f; --k)
				seq[l++] = VALUE_DEFINED - 1 - pac[k];
				//seq[l++] = 3 - _get_pac(pac, k);
		} else { // forward strand
			for (k = beg; k < end; ++k)
				seq[l++] = pac[k];
				//seq[l++] = _get_pac(pac, k);
		}
	} else *len = 0; // if bridging the forward-reverse boundary, return nothing
	return seq;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
cmpq %rdx, %rcx
movq %rdx, %r15
cmovgq %rcx, %r15
cmovlq %rcx, %rdx
leaq (%rdi,%rdi), %r12
cmpq %r12, %r15
cmovgeq %r12, %r15
xorl %r13d, %r13d
testq %rdx, %rdx
cmovgq %rdx, %r13
cmpq %rdi, %r13
setl %al
cmpq %rdi, %r15
setg %cl
testb %cl, %al
je 0xfb02
andq $0x0, (%r8)
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rsi, %rbx
movq %rdi, %r14
movq %r15, %rdi
subq %r13, %rdi
movq %rdi, (%r8)
leaq 0x13768(%rip), %rsi     # 0x23280
leaq 0x13889(%rip), %rcx     # 0x233a8
movl $0x1d9, %edx            # imm = 0x1D9
callq 0x1e045
cmpq %r14, %r13
jge 0xfb47
addq %r13, %rbx
xorl %ecx, %ecx
leaq (%rcx,%r13), %rdx
cmpq %r15, %rdx
jge 0xfaf8
movb (%rbx,%rcx), %dl
movb %dl, (%rax,%rcx)
incq %rcx
jmp 0xfb33
decq %r12
movq %r12, %rcx
subq %r15, %rcx
subq %r13, %r12
movq %rax, %rdx
cmpq %rcx, %r12
jle 0xfaf8
movb $0x15, %sil
subb (%rbx,%r12), %sil
movb %sil, (%rdx)
decq %r12
incq %rdx
jmp 0xfb56
// File: /workspace/github_c_makefile_star2_O2/ToniWestbrook[P]paladin/bwa.c
// Function: bseq_read
bseq1_t *bseq_read(int chunk_size, int *n_, void *ks1_, void *ks2_)
{
	kseq_t *ks = (kseq_t*)ks1_, *ks2 = (kseq_t*)ks2_;
	int size = 0, m, n;
	bseq1_t *seqs;
	m = n = 0; seqs = 0;
	while (kseq_read(ks) >= 0) {
		if (ks2 && kseq_read(ks2) < 0) { // the 2nd file has fewer reads
			fprintf(stderr, "[W::%s] the 2nd file has fewer sequences.\n", __func__);
			break;
		}
		if (n >= m) {
			m = m? m<<1 : 256;
			seqs = realloc(seqs, m * sizeof(bseq1_t));
		}
		trim_readno(&ks->name);
		kseq2bseq1(ks, &seqs[n]);
		seqs[n].id = n;
		size += seqs[n++].l_seq;
		if (ks2) {
			trim_readno(&ks2->name);
			kseq2bseq1(ks2, &seqs[n]);
			seqs[n].id = n;
			size += seqs[n++].l_seq;
		}
		if (size >= chunk_size && (n&1) == 0) break;
	}
	if (size == 0) { // test if the 2nd file is finished
		if (ks2 && kseq_read(ks2) >= 0)
			fprintf(stderr, "[W::%s] the 1st file has fewer sequences.\n", __func__);
	}
	*n_ = n;
	return seqs;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r12
movq %rdx, 0x18(%rsp)
movq %rsi, 0x20(%rsp)
movl %edi, 0x14(%rsp)
xorl %ebx, %ebx
xorl %r15d, %r15d
xorl %r13d, %r13d
xorl %r14d, %r14d
movq %rcx, 0x8(%rsp)
movq 0x18(%rsp), %rdi
callq 0xc2aa
testl %eax, %eax
js 0x10182
testq %r12, %r12
je 0x100a2
movq %r12, %rdi
callq 0xc2aa
testl %eax, %eax
js 0x10163
cmpl %r15d, %r13d
jl 0x100dc
leal (%r15,%r15), %ebp
testl %r15d, %r15d
movl $0x100, %eax            # imm = 0x100
cmovel %eax, %ebp
movslq %ebp, %rax
imulq $0x30, %rax, %rsi
movq %r14, %rdi
leaq 0x1343e(%rip), %rdx     # 0x23505
pushq $0x37
popq %rcx
leaq 0x1342a(%rip), %r8      # 0x234fb
callq 0x1e0b4
movq %rax, %r14
movl %ebp, %r15d
movq 0x18(%rsp), %rbp
movq %rbp, %rdi
callq 0x101d4
movslq %r13d, %rax
imulq $0x30, %rax, %r12
leaq (%r14,%r12), %rsi
movq %rbp, %rdi
callq 0x10218
leal 0x1(%r13), %ebp
addl (%r14,%r12), %ebx
movl %r13d, 0x4(%r14,%r12)
movq 0x8(%rsp), %r12
testq %r12, %r12
je 0x10145
movq %r12, %rdi
callq 0x101d4
movslq %ebp, %r12
imulq $0x30, %r12, %rbp
leaq (%r14,%rbp), %rsi
movq 0x8(%rsp), %rdi
callq 0x10218
movl %r12d, 0x4(%r14,%rbp)
movq 0x8(%rsp), %r12
addl $0x2, %r13d
addl (%r14,%rbp), %ebx
movl %r13d, %ebp
cmpl 0x14(%rsp), %ebx
setge %al
testb $0x1, %bpl
sete %cl
andb %al, %cl
movl %ebp, %r13d
cmpb $0x1, %cl
jne 0x1007b
jmp 0x10185
movq 0x1be66(%rip), %rax     # 0x2bfd0
movq (%rax), %rdi
leaq 0x1335c(%rip), %rsi     # 0x234d0
leaq 0x13380(%rip), %rdx     # 0x234fb
xorl %eax, %eax
callq 0x3500
movl %r13d, %ebp
testq %r12, %r12
je 0x1019a
testl %ebx, %ebx
jne 0x1019a
movq %r12, %rdi
callq 0xc2aa
testl %eax, %eax
jns 0x101b3
movq 0x20(%rsp), %rax
movl %ebp, (%rax)
movq %r14, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x1be16(%rip), %rax     # 0x2bfd0
movq (%rax), %rdi
leaq 0x13347(%rip), %rsi     # 0x2350b
leaq 0x13330(%rip), %rdx     # 0x234fb
xorl %eax, %eax
callq 0x3500
jmp 0x1019a
// File: /workspace/github_c_makefile_star2_O2/ToniWestbrook[P]paladin/bwa.c
// Function: kseq2bseq1
static inline void kseq2bseq1(const kseq_t *ks, bseq1_t *s)
{ // TODO: it would be better to allocate one chunk of memory, but probably it does not matter in practice
	s->name = strdup(ks->name.s);
	s->comment = ks->comment.l? strdup(ks->comment.s) : 0;
	s->seq = strdup(ks->seq.s);
	s->qual = ks->qual.l? strdup(ks->qual.s) : 0;
	s->l_seq = strlen(s->seq);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x10(%rdi), %rdi
leaq 0x132d8(%rip), %rsi     # 0x23505
leaq 0x13535(%rip), %rcx     # 0x23769
pushq $0x23
popq %rdx
callq 0x1e123
movq %rax, 0x8(%rbx)
cmpq $0x0, 0x18(%r14)
je 0x10263
movq 0x28(%r14), %rdi
leaq 0x132b3(%rip), %rsi     # 0x23505
leaq 0x13510(%rip), %rcx     # 0x23769
pushq $0x24
popq %rdx
callq 0x1e123
jmp 0x10265
xorl %eax, %eax
movq %rax, 0x10(%rbx)
movq 0x40(%r14), %rdi
leaq 0x13291(%rip), %rsi     # 0x23505
leaq 0x134ee(%rip), %rcx     # 0x23769
pushq $0x25
popq %rdx
callq 0x1e123
movq %rax, 0x18(%rbx)
cmpq $0x0, 0x48(%r14)
je 0x102b1
movq 0x58(%r14), %rdi
leaq 0x1326c(%rip), %rsi     # 0x23505
leaq 0x134c9(%rip), %rcx     # 0x23769
pushq $0x26
popq %rdx
callq 0x1e123
movq %rax, %rcx
movq 0x18(%rbx), %rax
jmp 0x102b3
xorl %ecx, %ecx
movq %rcx, 0x20(%rbx)
movq %rax, %rdi
callq 0x3100
movl %eax, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/ToniWestbrook[P]paladin/bwa.c
// Function: bwa_fill_scmat
void bwa_fill_scmat(int a, int b, int8_t mat[VALUE_SCORING])
{
	int i, j, k;
	for (i = k = 0; i < VALUE_DEFINED - 1; ++i) {
		for (j = 0; j < VALUE_DEFINED - 1; ++j)
			mat[k++] = i == j? a : -b;
		mat[k++] = -1; // ambiguous base
	}
	for (j = 0; j < VALUE_DEFINED ; ++j) mat[k++] = -1;
}

// Assembly:
negl %esi
xorl %eax, %eax
movabsq $0x100000000, %rcx      # imm = 0x100000000
xorl %r8d, %r8d
cmpl $0x15, %eax
je 0x1055b
movslq %r8d, %r9
leaq 0x1(%r9), %r8
shlq $0x20, %r9
xorl %r10d, %r10d
cmpl $0x15, %r10d
je 0x1054e
cmpl %r10d, %eax
movl %esi, %r11d
cmovel %edi, %r11d
movb %r11b, -0x1(%rdx,%r8)
incl %r10d
incq %r8
addq %rcx, %r9
jmp 0x1052e
sarq $0x20, %r9
movb $-0x1, (%rdx,%r9)
incl %eax
jmp 0x1051b
movslq %r8d, %rax
addq %rax, %rdx
xorl %eax, %eax
cmpl $0x16, %eax
je 0x10571
movb $-0x1, (%rdx,%rax)
incq %rax
jmp 0x10563
retq
// File: /workspace/github_c_makefile_star2_O2/ToniWestbrook[P]paladin/bwa.c
// Function: index_infer_prefix
char *index_infer_prefix(const char *hint)
{
	char *prefix;
	int l_hint;
	FILE *fp;

	l_hint = strlen(hint);
	prefix = malloc(l_hint + 3 + 4 + 1);
	strcpy(prefix, hint);
	strcpy(prefix + l_hint, ".bwt");
	if ((fp = fopen(prefix, "rb")) == 0) {
		free(prefix);
		return 0;
	} else {
		fclose(fp);
		prefix[l_hint] = 0;
		return prefix;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
callq 0x3100
movq %rax, %r15
addl $0x8, %eax
movslq %eax, %rdi
leaq 0x127d5(%rip), %rsi     # 0x23505
leaq 0x12862(%rip), %rcx     # 0x23599
movl $0xe1, %edx
callq 0x1e045
movq %rax, %rbx
movq %rax, %rdi
movq %r14, %rsi
callq 0x32c0
movslq %r15d, %r14
movl $0x7477622e, (%rbx,%r14) # imm = 0x7477622E
movb $0x0, 0x4(%rbx,%r14)
leaq 0x12cc1(%rip), %rsi     # 0x23a28
movq %rbx, %rdi
callq 0x3380
testq %rax, %rax
je 0x10d88
movq %rbx, %r15
addq %r14, %r15
movq %rax, %rdi
callq 0x32f0
movb $0x0, (%r15)
jmp 0x10d92
movq %rbx, %rdi
callq 0x3390
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/ToniWestbrook[P]paladin/bwa.c
// Function: index_load_bwt
bwt_t *index_load_bwt(const char *hint)
{
	char *tmp, *prefix;
	bwt_t *bwt;
	prefix = index_infer_prefix(hint);
	if (prefix == 0) {
		logMessage(__func__, LOG_LEVEL_ERROR, "Failed to locate the index files\n");
		return 0;
	}
	tmp = calloc(strlen(prefix) + 5, 1);
	strcat(strcpy(tmp, prefix), ".bwt"); // FM-index
	bwt = bwt_restore_bwt(tmp);
	strcat(strcpy(tmp, prefix), ".sa");  // partial suffix array (SA)
	bwt_restore_sa(tmp, bwt);
	free(tmp); free(prefix);
	return bwt;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
callq 0x10d13
testq %rax, %rax
je 0x10e3f
movq %rax, %rbx
movq %rax, %rdi
callq 0x3100
leaq 0x5(%rax), %rdi
leaq 0x12741(%rip), %rdx     # 0x23505
leaq 0x127e1(%rip), %r8      # 0x235ac
pushq $0x1
popq %rsi
movl $0xf7, %ecx
callq 0x1dfd0
movq %rax, %r15
movq %rax, %rdi
movq %rbx, %rsi
callq 0x32c0
movq %r15, %rdi
callq 0x3100
movl $0x7477622e, (%r15,%rax) # imm = 0x7477622E
movb $0x0, 0x4(%r15,%rax)
movq %r15, %rdi
callq 0xe802
movq %rax, %r14
movq %r15, %rdi
movq %rbx, %rsi
callq 0x32c0
movq %r15, %rdi
callq 0x3100
movl $0x61732e, (%r15,%rax)  # imm = 0x61732E
movq %r15, %rdi
movq %r14, %rsi
callq 0xe669
movq %r15, %rdi
callq 0x3390
movq %rbx, %rdi
callq 0x3390
jmp 0x10e5a
leaq 0x12766(%rip), %rdi     # 0x235ac
leaq 0x1276e(%rip), %rdx     # 0x235bb
xorl %r14d, %r14d
pushq $0x1
popq %rsi
xorl %eax, %eax
callq 0xc78e
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/ToniWestbrook[P]paladin/bwa.c
// Function: index_load_from_disk
bwaidx_t *index_load_from_disk(const char *hint, int which)
{
	bwaidx_t *idx;
	char *prefix, * proName;

	prefix = index_infer_prefix(hint);

	if (prefix == 0) {
		logMessage(__func__, LOG_LEVEL_ERROR, "Failed to locate the index files\n");
		return 0;
	}

	proName = malloc(strlen(prefix) + 5);
	sprintf(proName, "%s.pro", prefix);

	idx = calloc(1, sizeof(bwaidx_t));
	if (which & BWA_IDX_BWT) idx->bwt = index_load_bwt(hint);
	if (which & BWA_IDX_BNS) {
		int i, c;
		idx->bns = bns_restore(hint);
		for (i = c = 0; i < idx->bns->n_seqs; ++i)
			if (idx->bns->anns[i].is_alt) ++c;

		logMessage(__func__, LOG_LEVEL_MESSAGE, "Read %d ALT contigs\n", c);

		if (which & BWA_IDX_PAC) {
			idx->pac = calloc(idx->bns->l_pac+1, 1);
			err_fread_noeof(idx->pac, 1, idx->bns->l_pac+1, idx->bns->fp_pac); // concatenated 2-bit encoded sequence
			err_fclose(idx->bns->fp_pac);
			idx->bns->fp_pac = 0;
		}
	}
	free(prefix);
	free(proName);
	return idx;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %r12
callq 0x10d13
testq %rax, %rax
je 0x10f2c
movq %rax, %rbx
movq %rax, %rdi
callq 0x3100
leaq 0x5(%rax), %rdi
leaq 0x1266e(%rip), %r15     # 0x23505
leaq 0x1273f(%rip), %r13     # 0x235dd
movq %r15, %rsi
movl $0x10c, %edx            # imm = 0x10C
movq %r13, %rcx
callq 0x1e045
movq %rax, %r14
leaq 0xf543(%rip), %rsi      # 0x203fb
movq %rax, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x3070
pushq $0x1
popq %rdi
pushq $0x30
popq %rsi
movq %r15, %rdx
movl $0x10f, %ecx            # imm = 0x10F
movq %r13, %r8
callq 0x1dfd0
movq %rax, %r15
testb $0x1, %bpl
je 0x10eef
movq %r12, %rdi
callq 0x10d9b
movq %rax, (%r15)
testb $0x2, %bpl
je 0x10fc6
movq %r12, %rdi
callq 0xeead
movq %rax, 0x8(%r15)
movl 0x8(%rax), %ecx
xorl %edx, %edx
testl %ecx, %ecx
cmovlel %edx, %ecx
imulq $0x28, %rcx, %rsi
xorl %ecx, %ecx
cmpq %rdx, %rsi
je 0x10f4c
movq 0x10(%rax), %rdi
cmpl $0x1, 0x14(%rdi,%rdx)
sbbl $-0x1, %ecx
addq $0x28, %rdx
jmp 0x10f15
leaq 0x126aa(%rip), %rdi     # 0x235dd
leaq 0x12681(%rip), %rdx     # 0x235bb
xorl %r15d, %r15d
pushq $0x1
popq %rsi
xorl %eax, %eax
callq 0xc78e
jmp 0x10fd6
leaq 0x1268a(%rip), %rdi     # 0x235dd
leaq 0x12698(%rip), %rdx     # 0x235f2
pushq $0x3
popq %rsi
xorl %eax, %eax
callq 0xc78e
testb $0x4, %bpl
je 0x10fc6
movq 0x8(%r15), %rax
movq (%rax), %rdi
incq %rdi
leaq 0x1258a(%rip), %rdx     # 0x23505
leaq 0x1265b(%rip), %r8      # 0x235dd
pushq $0x1
popq %r12
movq %r12, %rsi
movl $0x11a, %ecx            # imm = 0x11A
callq 0x1dfd0
movq %rax, 0x10(%r15)
movq 0x8(%r15), %rcx
movq (%rcx), %rdx
movq 0x28(%rcx), %rcx
incq %rdx
movq %rax, %rdi
movq %r12, %rsi
callq 0xccb2
movq 0x8(%r15), %rax
movq 0x28(%rax), %rdi
callq 0xd01b
movq 0x8(%r15), %rax
andq $0x0, 0x28(%rax)
movq %rbx, %rdi
callq 0x3390
movq %r14, %rdi
callq 0x3390
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/ToniWestbrook[P]paladin/bwa.c
// Function: index_destroy
void index_destroy(bwaidx_t *idx)
{
	if (idx == 0) return;
	if (idx->mem == 0) {
		if (idx->bwt) bwt_destroy(idx->bwt);
		if (idx->bns) bns_destroy(idx->bns);
		if (idx->pac) free(idx->pac);
	} else {
		free(idx->bwt); free(idx->bns->anns); free(idx->bns);
		if (!idx->is_shm) free(idx->mem);
	}
	free(idx);
}

// Assembly:
testq %rdi, %rdi
je 0x11027
pushq %rbx
movq %rdi, %rbx
cmpq $0x0, 0x28(%rdi)
movq (%rdi), %rdi
je 0x11028
callq 0x3390
movq 0x8(%rbx), %rax
movq 0x10(%rax), %rdi
callq 0x3390
movq 0x8(%rbx), %rdi
callq 0x3390
cmpl $0x0, 0x18(%rbx)
jne 0x1104c
leaq 0x28(%rbx), %rax
jmp 0x11044
retq
testq %rdi, %rdi
je 0x11032
callq 0xe901
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x11040
callq 0xf345
leaq 0x10(%rbx), %rax
movq (%rax), %rdi
callq 0x3390
movq %rbx, %rdi
popq %rbx
jmp 0x3390
// File: /workspace/github_c_makefile_star2_O2/ToniWestbrook[P]paladin/bwa.c
// Function: bwa_print_sam_hdr
void bwa_print_sam_hdr(const bntseq_t *bns, const char *hdr_line, FILE * passStream)
{
	int i, n_SQ = 0;
	extern char *bwa_pg;
	if (hdr_line) {
		const char *p = hdr_line;
		while ((p = strstr(p, "@SQ\t")) != 0) {
			if (p == hdr_line || *(p-1) == '\n') ++n_SQ;
			p += 4;
		}
	}
	if (n_SQ == 0) {
		for (i = 0; i < bns->n_seqs; ++i)
			err_fprintf(passStream, "@SQ\tSN:%s\tLN:%d\n", bns->anns[i].name, bns->anns[i].len);
	} else if (n_SQ != bns->n_seqs && bwa_verbose >= 2)
		fprintf(stderr, "[W::%s] %d @SQ lines provided with -H; %d sequences in the index. Continue anyway.\n", __func__, n_SQ, bns->n_seqs);
	if (hdr_line) err_fprintf(passStream, "%s\n", hdr_line);
	if (bwa_pg) err_fprintf(passStream, "%s\n", bwa_pg);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
testq %rsi, %rsi
je 0x115da
xorl %ebp, %ebp
leaq 0x12104(%rip), %r12     # 0x2365a
movq %r14, %rax
movq %rax, %rdi
movq %r12, %rsi
callq 0x3080
testq %rax, %rax
je 0x1157c
cmpq %r14, %rax
je 0x11574
cmpb $0xa, -0x1(%rax)
jne 0x11576
incl %ebp
addq $0x4, %rax
jmp 0x11559
testl %ebp, %ebp
je 0x115da
movl 0x8(%r15), %r8d
cmpl %r8d, %ebp
je 0x11596
cmpl $0x2, 0x1b8b0(%rip)     # 0x2ce40
jge 0x11622
testq %r14, %r14
je 0x115af
leaq 0x10a14(%rip), %rsi     # 0x21fb6
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0xce5d
movq 0x1b8ba(%rip), %rdx     # 0x2ce70
testq %rdx, %rdx
je 0x11613
leaq 0x109f4(%rip), %rsi     # 0x21fb6
movq %rbx, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xce5d
pushq $0x18
popq %r13
leaq 0x1207a(%rip), %r12     # 0x2365f
xorl %ebp, %ebp
movslq 0x8(%r15), %rax
cmpq %rax, %rbp
jge 0x11596
movq 0x10(%r15), %rax
movq (%rax,%r13), %rdx
movl -0x10(%rax,%r13), %ecx
movq %rbx, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0xce5d
incq %rbp
addq $0x28, %r13
jmp 0x115e7
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x1a9a7(%rip), %rax     # 0x2bfd0
movq (%rax), %rdi
leaq 0x1203d(%rip), %rsi     # 0x23670
leaq 0x1208a(%rip), %rdx     # 0x236c4
movl %ebp, %ecx
xorl %eax, %eax
callq 0x3500
jmp 0x11596
// File: /workspace/github_c_makefile_star2_O2/ToniWestbrook[P]paladin/bwa.c
// Function: bwa_set_rg
char *bwa_set_rg(const char *s)
{
	char *p, *q, *r, *rg_line = 0;
	memset(bwa_rg_id, 0, 256);
	if (strstr(s, "@RG") != s) {
		logMessage(__func__, LOG_LEVEL_ERROR, "The read group line does not start with @RG\n");
		goto err_set_rg;
	}
	rg_line = strdup(s);
	bwa_escape(rg_line);
	if ((p = strstr(rg_line, "\tID:")) == 0) {
		logMessage(__func__, LOG_LEVEL_ERROR, "No ID at the read group line\n");
		goto err_set_rg;
	}
	p += 4;
	for (q = p; *q && *q != '\t' && *q != '\n'; ++q);
	if (q - p + 1 > 256) {
		logMessage(__func__, LOG_LEVEL_ERROR, "@RG:ID is longer than 255 characters\n");
		goto err_set_rg;
	}
	for (q = p, r = bwa_rg_id; *q && *q != '\t' && *q != '\n'; ++q)
		*r++ = *q;
	return rg_line;

err_set_rg:
	free(rg_line);
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r15
leaq 0x1b829(%rip), %r14     # 0x2ce80
xorl %ebx, %ebx
movl $0x100, %edx            # imm = 0x100
movq %r14, %rdi
xorl %esi, %esi
callq 0x3140
leaq 0x12072(%rip), %rdx     # 0x236e1
cmpb $0x40, (%r15)
jne 0x116da
cmpb $0x52, 0x1(%r15)
jne 0x116d8
cmpb $0x47, 0x2(%r15)
jne 0x116d8
leaq 0x11e7b(%rip), %rsi     # 0x23505
leaq 0x12045(%rip), %rcx     # 0x236d6
movq %r15, %rdi
movl $0x1ac, %edx            # imm = 0x1AC
callq 0x1e123
movq %rax, %rbx
movq %rax, %rdi
callq 0x11738
leaq 0x1205e(%rip), %rsi     # 0x2370e
movq %rbx, %rdi
callq 0x3080
testq %rax, %rax
je 0x11710
xorl %ecx, %ecx
movl $0x601, %edx            # imm = 0x601
movzbl 0x4(%rax,%rcx), %esi
cmpl $0xa, %esi
ja 0x116d3
btl %esi, %edx
jb 0x116fe
incq %rcx
jmp 0x116c4
xorl %ebx, %ebx
leaq 0x11ff5(%rip), %rdi     # 0x236d6
pushq $0x1
popq %rsi
xorl %eax, %eax
callq 0xc78e
movq %rbx, %rdi
callq 0x3390
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
cmpq $0xff, %rcx
jle 0x11719
leaq 0x12023(%rip), %rdx     # 0x23731
jmp 0x116da
leaq 0x11ffc(%rip), %rdx     # 0x23713
jmp 0x116da
xorl %ecx, %ecx
movl $0x601, %edx            # imm = 0x601
movzbl 0x4(%rax,%rcx), %esi
cmpl $0xa, %esi
ja 0x1172f
btl %esi, %edx
jb 0x116f5
movb %sil, (%rcx,%r14)
incq %rcx
jmp 0x11720
// File: /workspace/github_c_makefile_star2_O2/ToniWestbrook[P]paladin/bwa.c
// Function: bwa_escape
static char *bwa_escape(char *s)
{
	char *p, *q;
	for (p = q = s; *p; ++p) {
		if (*p == '\\') {
			++p;
			if (*p == 't') *q++ = '\t';
			else if (*p == 'n') *q++ = '\n';
			else if (*p == 'r') *q++ = '\r';
			else if (*p == '\\') *q++ = '\\';
		} else *q++ = *p;
	}
	*q = '\0';
	return s;
}

// Assembly:
movq %rdi, %rax
movq %rdi, %rdx
movq %rdi, %rcx
movzbl (%rdx), %esi
cmpl $0x5c, %esi
je 0x11758
testl %esi, %esi
je 0x11787
movb %sil, (%rcx)
incq %rcx
incq %rdx
jmp 0x11741
movzbl 0x1(%rdx), %esi
incq %rdx
cmpl $0x5c, %esi
je 0x11782
cmpl $0x74, %esi
je 0x11778
cmpl $0x72, %esi
je 0x1177d
cmpl $0x6e, %esi
jne 0x11753
movb $0xa, %sil
jmp 0x1174d
movb $0x9, %sil
jmp 0x1174d
movb $0xd, %sil
jmp 0x1174d
movb $0x5c, %sil
jmp 0x1174d
movb $0x0, (%rcx)
retq
// File: /workspace/github_c_makefile_star2_O2/ToniWestbrook[P]paladin/bwa.c
// Function: bwa_insert_header
char *bwa_insert_header(const char *s, char *hdr)
{
	int len = 0;
	if (s == 0 || s[0] != '@') return hdr;
	if (hdr) {
		len = strlen(hdr);
		hdr = realloc(hdr, len + strlen(s) + 2);
		hdr[len++] = '\n';
		strcpy(hdr + len, s);
	} else hdr = strdup(s);
	bwa_escape(hdr + len);
	return hdr;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
testq %rdi, %rdi
je 0x1182b
movq %rdi, %r14
cmpb $0x40, (%rdi)
jne 0x1182b
testq %rbx, %rbx
je 0x117ff
movq %rbx, %rdi
callq 0x3100
movslq %eax, %r15
movq %r14, %rdi
callq 0x3100
leaq (%rax,%r15), %rsi
addq $0x2, %rsi
leaq 0x11d36(%rip), %rdx     # 0x23505
leaq 0x11f81(%rip), %r8      # 0x23757
movq %rbx, %rdi
movl $0x1c7, %ecx            # imm = 0x1C7
callq 0x1e0b4
movq %rax, %rbx
movb $0xa, (%rax,%r15)
incl %r15d
movslq %r15d, %r15
leaq (%rax,%r15), %rdi
movq %r14, %rsi
callq 0x32c0
jmp 0x11820
leaq 0x11cff(%rip), %rsi     # 0x23505
leaq 0x11f4a(%rip), %rcx     # 0x23757
movq %r14, %rdi
movl $0x1ca, %edx            # imm = 0x1CA
callq 0x1e123
movq %rax, %rbx
xorl %r15d, %r15d
addq %rbx, %r15
movq %r15, %rdi
callq 0x11738
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq