LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq 0x110(%rax), %rax
movq %rax, -0x40(%rbp)
movl -0x14(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x54(%rbp)
cmpl $0x0, -0x54(%rbp)
jl 0x147c3
movq -0x20(%rbp), %rax
movslq -0x54(%rbp), %rcx
movb (%rax,%rcx), %al
movb %al, -0x55(%rbp)
movzbl -0x55(%rbp), %eax
cmpl $0x3, %eax
jle 0x14758
movl $0x0, -0x4(%rbp)
jmp 0x14809
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
subq $0x1, %rsi
movq -0x40(%rbp), %rdx
leaq -0x48(%rbp), %r8
leaq -0x50(%rbp), %r9
movzbl -0x55(%rbp), %ecx
callq 0x14340
movq -0x10(%rbp), %rax
movzbl -0x55(%rbp), %ecx
movq 0x8(%rax,%rcx,8), %rax
addq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movzbl -0x55(%rbp), %ecx
movq 0x8(%rax,%rcx,8), %rax
addq -0x50(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x40(%rbp), %rax
jbe 0x147b3
jmp 0x147c3
jmp 0x147b5
movl -0x54(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x1472b
movq -0x38(%rbp), %rax
cmpq -0x40(%rbp), %rax
jbe 0x147d6
movl $0x0, -0x4(%rbp)
jmp 0x14809
cmpq $0x0, -0x28(%rbp)
je 0x147e8
movq -0x38(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
cmpq $0x0, -0x30(%rbp)
je 0x147fa
movq -0x40(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x40(%rbp), %rax
subq -0x38(%rbp), %rax
addq $0x1, %rax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x48(%rbp)
movl -0x14(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
jl 0x148f9
movq -0x20(%rbp), %rax
movslq -0x34(%rbp), %rcx
movb (%rax,%rcx), %al
movb %al, -0x59(%rbp)
movzbl -0x59(%rbp), %eax
cmpl $0x3, %eax
jle 0x14887
movl $0x0, -0x4(%rbp)
jmp 0x1491e
movq -0x10(%rbp), %rdi
movq -0x40(%rbp), %rsi
subq $0x1, %rsi
movq -0x48(%rbp), %rdx
leaq -0x50(%rbp), %r8
leaq -0x58(%rbp), %r9
movzbl -0x59(%rbp), %ecx
callq 0x14340
movq -0x10(%rbp), %rax
movzbl -0x59(%rbp), %ecx
movq 0x8(%rax,%rcx,8), %rax
addq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movzbl -0x59(%rbp), %ecx
movq 0x8(%rax,%rcx,8), %rax
addq -0x58(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rax
cmpq -0x48(%rbp), %rax
jbe 0x148e9
movl $0x0, -0x4(%rbp)
jmp 0x1491e
jmp 0x148eb
movl -0x34(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x1485a
movq -0x40(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movq -0x48(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x48(%rbp), %rax
subq -0x40(%rbp), %rax
addq $0x1, %rax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x1, (%rax)
jbe 0x157b8
movl $0x0, -0xc(%rbp)
movslq -0xc(%rbp), %rax
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
shrq %rcx
cmpq %rcx, %rax
jae 0x157b6
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
subq $0x1, %rcx
movslq -0xc(%rbp), %rdx
subq %rdx, %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq (%rax), %rcx
movq %rcx, -0x30(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0x28(%rbp)
movq 0x10(%rax), %rcx
movq %rcx, -0x20(%rbp)
movq 0x18(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
subq $0x1, %rcx
movslq -0xc(%rbp), %rdx
subq %rdx, %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq -0x8(%rbp), %rcx
movq 0x10(%rcx), %rcx
movslq -0xc(%rbp), %rdx
shlq $0x5, %rdx
addq %rdx, %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%rcx), %rdx
movq %rdx, 0x10(%rax)
movq 0x18(%rcx), %rcx
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0xc(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq -0x30(%rbp), %rcx
movq %rcx, (%rax)
movq -0x28(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rcx
movq %rcx, 0x18(%rax)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x156cd
jmp 0x157b8
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rsi
leaq 0x245fb(%rip), %rdi     # 0x3a056
leaq 0x23d7a(%rip), %rdx     # 0x397dc
callq 0x12740
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rcx
movl $0x8, %esi
movl $0x1, %edx
callq 0x12c10
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
addq $0x8, %rdi
movq -0x18(%rbp), %rcx
movl $0x8, %esi
movl $0x20, %edx
callq 0x12c10
movq -0x10(%rbp), %rax
movq 0x120(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x118(%rax), %rdx
movq -0x18(%rbp), %rcx
movl $0x4, %esi
callq 0x12c10
movq -0x18(%rbp), %rdi
callq 0x130e0
movq -0x18(%rbp), %rdi
callq 0x131b0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rsi
leaq 0x24568(%rip), %rdi     # 0x3a063
leaq 0x23cda(%rip), %rdx     # 0x397dc
callq 0x12740
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rcx
movl $0x8, %esi
movl $0x1, %edx
callq 0x12c10
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
addq $0x8, %rdi
movq -0x18(%rbp), %rcx
movl $0x8, %esi
movl $0x20, %edx
callq 0x12c10
movq -0x10(%rbp), %rdi
addq $0x128, %rdi            # imm = 0x128
movq -0x18(%rbp), %rcx
movl $0x8, %esi
movl $0x1, %edx
callq 0x12c10
movq -0x10(%rbp), %rdi
addq $0x110, %rdi            # imm = 0x110
movq -0x18(%rbp), %rcx
movl $0x8, %esi
movl $0x1, %edx
callq 0x12c10
movq -0x10(%rbp), %rax
movq 0x138(%rax), %rdi
addq $0x8, %rdi
movq -0x10(%rbp), %rax
movq 0x130(%rax), %rdx
subq $0x1, %rdx
movq -0x18(%rbp), %rcx
movl $0x8, %esi
callq 0x12c10
movq -0x18(%rbp), %rdi
callq 0x130e0
movq -0x18(%rbp), %rdi
callq 0x131b0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x120, %rsp            # imm = 0x120
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rsi
leaq 0x24481(%rip), %rdi     # 0x3a06f
leaq 0x24c9b(%rip), %rdx     # 0x3a890
callq 0x12740
movq %rax, -0x118(%rbp)
movq -0x118(%rbp), %rcx
leaq -0x120(%rbp), %rdi
movl $0x8, %esi
movl $0x1, %edx
callq 0x12c70
movq -0x120(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq (%rcx), %rax
sete %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x15c4c
leaq 0x2442f(%rip), %rdi     # 0x3a06f
leaq 0x24437(%rip), %rsi     # 0x3a07e
callq 0x12bd0
leaq -0x110(%rbp), %rdi
movq -0x118(%rbp), %rcx
movl $0x8, %esi
movl $0x20, %edx
callq 0x12c70
movq -0x10(%rbp), %rdi
addq $0x128, %rdi            # imm = 0x128
movq -0x118(%rbp), %rcx
movl $0x8, %esi
movl $0x1, %edx
callq 0x12c70
movq -0x118(%rbp), %rcx
leaq -0x120(%rbp), %rdi
movl $0x8, %esi
movl $0x1, %edx
callq 0x12c70
movq -0x120(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x110(%rcx), %rax
sete %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x15cd9
leaq 0x243a2(%rip), %rdi     # 0x3a06f
leaq 0x243d9(%rip), %rsi     # 0x3a0ad
callq 0x12bd0
movq -0x10(%rbp), %rax
movq 0x110(%rax), %rax
movq -0x10(%rbp), %rcx
movslq 0x128(%rcx), %rcx
addq %rcx, %rax
movq -0x10(%rbp), %rcx
movslq 0x128(%rcx), %rcx
xorl %edx, %edx
divq %rcx
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x130(%rax)
movq -0x10(%rbp), %rax
movq 0x130(%rax), %rdi
movl $0x8, %esi
leaq 0x2431e(%rip), %rdx     # 0x3a045
movl $0x1ea, %ecx            # imm = 0x1EA
leaq 0x2433c(%rip), %r8      # 0x3a06f
callq 0x31bf0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x138(%rax)
movq -0x10(%rbp), %rax
movq 0x138(%rax), %rax
movq $-0x1, (%rax)
movq -0x118(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x130(%rax), %rsi
subq $0x1, %rsi
shlq $0x3, %rsi
movq -0x10(%rbp), %rax
movq 0x138(%rax), %rdx
addq $0x8, %rdx
callq 0x15da0
movq -0x118(%rbp), %rdi
callq 0x131b0
addq $0x120, %rsp            # imm = 0x120
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x1000000, -0x1c(%rbp) # imm = 0x1000000
movq $0x0, -0x28(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x15e30
movl $0x1000000, %eax        # imm = 0x1000000
cmpq -0x10(%rbp), %rax
jae 0x15de0
movl $0x1000000, %eax        # imm = 0x1000000
movq %rax, -0x38(%rbp)
jmp 0x15de8
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movl %eax, -0x2c(%rbp)
movq -0x18(%rbp), %rdi
addq -0x28(%rbp), %rdi
movslq -0x2c(%rbp), %rdx
movq -0x8(%rbp), %rcx
movl $0x1, %esi
callq 0x12c70
movl %eax, -0x2c(%rbp)
cmpl $0x0, %eax
jne 0x15e13
jmp 0x15e30
movslq -0x2c(%rbp), %rcx
movq -0x10(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x10(%rbp)
movslq -0x2c(%rbp), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x15dc3
movq -0x28(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl $0x1, %edi
movl $0x140, %esi            # imm = 0x140
leaq 0x241e8(%rip), %rdx     # 0x3a045
movl $0x1f5, %ecx            # imm = 0x1F5
leaq 0x24273(%rip), %r8      # 0x3a0dc
callq 0x31bf0
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rsi
leaq 0x2425f(%rip), %rdi     # 0x3a0dc
leaq 0x24a0c(%rip), %rdx     # 0x3a890
callq 0x12740
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x2, %edx
callq 0x12d90
movq -0x18(%rbp), %rdi
callq 0x12df0
movq %rax, %rcx
subq $0x108, %rcx            # imm = 0x108
shrq $0x2, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x118(%rax)
movq -0x10(%rbp), %rax
movq 0x118(%rax), %rdi
movl $0x4, %esi
leaq 0x2416d(%rip), %rdx     # 0x3a045
movl $0x1fb, %ecx            # imm = 0x1FB
leaq 0x241f8(%rip), %r8      # 0x3a0dc
callq 0x31bf0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x120(%rax)
movq -0x18(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x12d90
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rcx
movl $0x8, %esi
movl $0x1, %edx
callq 0x12c70
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
addq $0x8, %rdi
movq -0x18(%rbp), %rcx
movl $0x8, %esi
movl $0x20, %edx
callq 0x12c70
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x118(%rax), %rsi
shlq $0x2, %rsi
movq -0x10(%rbp), %rax
movq 0x120(%rax), %rdx
callq 0x15da0
movq -0x10(%rbp), %rax
movq 0x108(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x110(%rax)
movq -0x18(%rbp), %rdi
callq 0x131b0
movq -0x10(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x170f8
jmp 0x17189
movq -0x8(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x17110
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x131b0
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x3380
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x17173
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0xc(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rdi
callq 0x3380
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0xc(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x20(%rax), %rdi
callq 0x3380
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x17124
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x3380
movq -0x8(%rbp), %rdi
callq 0x3380
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
leaq 0x23447(%rip), %rdx     # 0x3ad1b
callq 0x3090
movl %eax, -0x14(%rbp)
cmpl $0x0, %eax
jl 0x178f4
movl -0x14(%rbp), %eax
subl $0x66, %eax
jne 0x178f2
jmp 0x178eb
movl $0x1, -0x18(%rbp)
jmp 0x178c6
movl -0x8(%rbp), %eax
movq 0x286e2(%rip), %rcx     # 0x3ffe0
cmpl (%rcx), %eax
jne 0x17926
movq 0x286cf(%rip), %rax     # 0x3ffd8
movq (%rax), %rdi
leaq 0x228d3(%rip), %rsi     # 0x3a1e6
movb $0x0, %al
callq 0x34e0
movl $0x1, -0x4(%rbp)
jmp 0x179bb
movq -0x10(%rbp), %rax
movq 0x286af(%rip), %rcx     # 0x3ffe0
movslq (%rcx), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x228d9(%rip), %rdi     # 0x3a218
leaq 0x213bc(%rip), %rdx     # 0x38d02
callq 0x12990
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq 0x28682(%rip), %rax     # 0x3ffe0
movl (%rax), %eax
addl $0x1, %eax
cmpl -0x8(%rbp), %eax
jge 0x17985
movq -0x10(%rbp), %rax
movq 0x2866d(%rip), %rcx     # 0x3ffe0
movl (%rcx), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x30(%rbp)
jmp 0x1799b
movq -0x10(%rbp), %rax
movq 0x28650(%rip), %rcx     # 0x3ffe0
movslq (%rcx), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
movl -0x18(%rbp), %edx
callq 0x17520
movq -0x20(%rbp), %rdi
callq 0x13200
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq (%rcx), %rax
jl 0x179f5
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x17a8b
movl $0x0, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x24(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x17a85
movl -0x1c(%rbp), %eax
addl -0x24(%rbp), %eax
sarl %eax
movl %eax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rcx
movslq -0x20(%rbp), %rdx
imulq $0x28, %rdx, %rdx
addq %rdx, %rcx
cmpq (%rcx), %rax
jl 0x17a7d
movl -0x20(%rbp), %eax
movq -0x10(%rbp), %rcx
movl 0x8(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jne 0x17a4f
jmp 0x17a85
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rcx
movl -0x20(%rbp), %edx
addl $0x1, %edx
movslq %edx, %rdx
imulq $0x28, %rdx, %rdx
addq %rdx, %rcx
cmpq (%rcx), %rax
jge 0x17a72
jmp 0x17a85
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x17a83
movl -0x20(%rbp), %eax
movl %eax, -0x24(%rbp)
jmp 0x17a0d
movl -0x20(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq (%rcx), %rax
jge 0x17aca
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq (%rcx), %rax
jle 0x17aca
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x17b81
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jg 0x17ad6
jmp 0x17af5
leaq 0x22746(%rip), %rdi     # 0x3a223
leaq 0x22654(%rip), %rsi     # 0x3a138
movl $0x1b3, %edx            # imm = 0x1B3
leaq 0x2273c(%rip), %rcx     # 0x3a22c
callq 0x3190
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
leaq -0x24(%rbp), %rdx
callq 0x17b90
movq -0x38(%rbp), %rdi
movq %rax, %rsi
callq 0x179d0
movl %eax, -0x28(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jge 0x17b55
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
subq $0x1, %rsi
leaq -0x24(%rbp), %rdx
callq 0x17b90
movq -0x48(%rbp), %rdi
movq %rax, %rsi
callq 0x179d0
movl %eax, -0x3c(%rbp)
jmp 0x17b5b
movl -0x28(%rbp), %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jne 0x17b71
movl -0x28(%rbp), %eax
movl %eax, -0x4c(%rbp)
jmp 0x17b7b
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0x4c(%rbp)
jmp 0x17b7b
movl -0x4c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x18(%rbp), %rax
jge 0x17e72
movq -0x18(%rbp), %rax
xorq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
xorq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
xorq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
shlq %rcx
cmpq %rcx, %rax
jle 0x17e8d
movq -0x8(%rbp), %rax
shlq %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x18(%rbp)
jge 0x17e9c
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x8(%rbp), %rax
jge 0x17eb4
movq -0x20(%rbp), %rax
cmpq -0x8(%rbp), %rax
jg 0x17fb1
movq $0x0, -0x40(%rbp)
movq -0x20(%rbp), %rcx
subq -0x18(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rdi
subq -0x18(%rbp), %rdi
leaq 0x2225e(%rip), %rsi     # 0x3a138
movl $0x1d9, %edx            # imm = 0x1D9
leaq 0x2237b(%rip), %rcx     # 0x3a261
callq 0x31ca0
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x8(%rbp), %rax
jl 0x17f6c
movq -0x8(%rbp), %rax
shlq %rax
subq $0x1, %rax
subq -0x20(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rax
shlq %rax
subq $0x1, %rax
subq -0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x48(%rbp), %rax
jle 0x17f6a
movq -0x10(%rbp), %rax
movq -0x38(%rbp), %rcx
movzbl (%rax,%rcx), %ecx
movl $0x15, %eax
subl %ecx, %eax
movb %al, %dl
movq -0x30(%rbp), %rax
movq -0x40(%rbp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, -0x40(%rbp)
movb %dl, (%rax,%rcx)
movq -0x38(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x17f27
jmp 0x17faf
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x20(%rbp), %rax
jge 0x17fad
movq -0x10(%rbp), %rax
movq -0x38(%rbp), %rcx
movb (%rax,%rcx), %dl
movq -0x30(%rbp), %rax
movq -0x40(%rbp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, -0x40(%rbp)
movb %dl, (%rax,%rcx)
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x17f74
jmp 0x17faf
jmp 0x17fbc
movq -0x28(%rbp), %rax
movq $0x0, (%rax)
movq -0x30(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x21946(%rip), %rsi     # 0x3a3c5
movl $0x23, %edx
leaq 0x21ba2(%rip), %rcx     # 0x3a62d
callq 0x31df0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x18acc
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdi
leaq 0x21910(%rip), %rsi     # 0x3a3c5
movl $0x24, %edx
leaq 0x21b6c(%rip), %rcx     # 0x3a62d
callq 0x31df0
movq %rax, -0x18(%rbp)
jmp 0x18ad4
xorl %eax, %eax
movq %rax, -0x18(%rbp)
jmp 0x18ad4
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rdi
leaq 0x218d6(%rip), %rsi     # 0x3a3c5
movl $0x25, %edx
leaq 0x21b32(%rip), %rcx     # 0x3a62d
callq 0x31df0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x48(%rax)
je 0x18b3c
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rdi
leaq 0x218a0(%rip), %rsi     # 0x3a3c5
movl $0x26, %edx
leaq 0x21afc(%rip), %rcx     # 0x3a62d
callq 0x31df0
movq %rax, -0x20(%rbp)
jmp 0x18b44
xorl %eax, %eax
movq %rax, -0x20(%rbp)
jmp 0x18b44
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x30f0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movl $0x0, -0x1c(%rbp)
movl $0x0, -0x14(%rbp)
cmpl $0x15, -0x14(%rbp)
jge 0x18f2d
movl $0x0, -0x18(%rbp)
cmpl $0x15, -0x18(%rbp)
jge 0x18f0c
movl -0x14(%rbp), %eax
cmpl -0x18(%rbp), %eax
jne 0x18edf
movl -0x4(%rbp), %eax
movl %eax, -0x20(%rbp)
jmp 0x18ee7
xorl %eax, %eax
subl -0x8(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
movb %al, %dl
movq -0x10(%rbp), %rax
movl -0x1c(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x1c(%rbp)
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x18ec9
movq -0x10(%rbp), %rax
movl -0x1c(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x1c(%rbp)
movslq %ecx, %rcx
movb $-0x1, (%rax,%rcx)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x18ebc
movl $0x0, -0x18(%rbp)
cmpl $0x16, -0x18(%rbp)
jge 0x18f5b
movq -0x10(%rbp), %rax
movl -0x1c(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x1c(%rbp)
movslq %ecx, %rcx
movb $-0x1, (%rax,%rcx)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x18f34
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x30f0
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
addl $0x3, %eax
addl $0x4, %eax
addl $0x1, %eax
movslq %eax, %rdi
leaq 0x20747(%rip), %rsi     # 0x3a3c5
movl $0xe1, %edx
leaq 0x207cf(%rip), %rcx     # 0x3a459
callq 0x31ca0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x32b0
movq -0x18(%rbp), %rdi
movslq -0x1c(%rbp), %rax
addq %rax, %rdi
leaq 0x1d759(%rip), %rsi     # 0x3740b
callq 0x32b0
movq -0x18(%rbp), %rdi
leaq 0x20bce(%rip), %rsi     # 0x3a890
callq 0x3370
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
jne 0x19ce4
movq -0x18(%rbp), %rdi
callq 0x3380
movq $0x0, -0x8(%rbp)
jmp 0x19d01
movq -0x28(%rbp), %rdi
callq 0x32e0
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x19c50
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x19d57
leaq 0x20735(%rip), %rdi     # 0x3a46c
movl $0x1, %esi
leaq 0x20738(%rip), %rdx     # 0x3a47b
movb $0x0, %al
callq 0x12510
movq $0x0, -0x8(%rbp)
jmp 0x19df4
movq -0x20(%rbp), %rdi
callq 0x30f0
movq %rax, %rdi
addq $0x5, %rdi
movl $0x1, %esi
leaq 0x20652(%rip), %rdx     # 0x3a3c5
movl $0xf7, %ecx
leaq 0x206ed(%rip), %r8      # 0x3a46c
callq 0x31bf0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x32b0
movq %rax, %rdi
leaq 0x1d66c(%rip), %rsi     # 0x3740b
callq 0x3690
movq -0x18(%rbp), %rdi
callq 0x15e40
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x32b0
movq %rax, %rdi
leaq 0x1d64a(%rip), %rsi     # 0x37412
callq 0x3690
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x15bd0
movq -0x18(%rbp), %rdi
callq 0x3380
movq -0x20(%rbp), %rdi
callq 0x3380
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x1a068
jmp 0x1a107
movq -0x8(%rbp), %rax
cmpq $0x0, 0x28(%rax)
jne 0x1a0bb
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0x1a089
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x15f90
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x1a0a1
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x170e0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x1a0b9
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x3380
jmp 0x1a0fe
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x3380
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rdi
callq 0x3380
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x3380
movq -0x8(%rbp), %rax
cmpl $0x0, 0x18(%rax)
jne 0x1a0fc
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x3380
jmp 0x1a0fe
movq -0x8(%rbp), %rdi
callq 0x3380
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x0, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x1a944
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
leaq 0x1fc15(%rip), %rsi     # 0x3a51a
callq 0x3080
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x1a942
movq -0x28(%rbp), %rax
cmpq -0x10(%rbp), %rax
je 0x1a92b
movq -0x28(%rbp), %rax
movsbl -0x1(%rax), %eax
cmpl $0xa, %eax
jne 0x1a934
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
movq -0x28(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x28(%rbp)
jmp 0x1a8fa
jmp 0x1a944
cmpl $0x0, -0x20(%rbp)
jne 0x1a9a9
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x1a9a7
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x1c(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rdx
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x1c(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %ecx
leaq 0x1fb8a(%rip), %rsi     # 0x3a51f
movb $0x0, %al
callq 0x12f20
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x1a951
jmp 0x1a9ea
movl -0x20(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x8(%rcx), %eax
je 0x1a9e8
cmpl $0x2, 0x26474(%rip)     # 0x40e30
jl 0x1a9e8
movq 0x25613(%rip), %rax     # 0x3ffd8
movq (%rax), %rdi
movl -0x20(%rbp), %ecx
movq -0x8(%rbp), %rax
movl 0x8(%rax), %r8d
leaq 0x1fb56(%rip), %rsi     # 0x3a530
leaq 0x1fba3(%rip), %rdx     # 0x3a584
movb $0x0, %al
callq 0x34e0
jmp 0x1a9ea
cmpq $0x0, -0x10(%rbp)
je 0x1aa07
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rdx
leaq 0x1e5b6(%rip), %rsi     # 0x38fb6
movb $0x0, %al
callq 0x12f20
cmpq $0x0, 0x26451(%rip)     # 0x40e60
je 0x1aa2a
movq -0x18(%rbp), %rdi
movq 0x26444(%rip), %rdx     # 0x40e60
leaq 0x1e593(%rip), %rsi     # 0x38fb6
movb $0x0, %al
callq 0x12f20
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpb $0x0, (%rax)
je 0x1ad0d
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x5c, %eax
jne 0x1ace3
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x74, %eax
jne 0x1ac7d
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movb $0x9, (%rax)
jmp 0x1ace1
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x6e, %eax
jne 0x1ac9d
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movb $0xa, (%rax)
jmp 0x1acdf
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x72, %eax
jne 0x1acbd
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movb $0xd, (%rax)
jmp 0x1acdd
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x5c, %eax
jne 0x1acdb
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movb $0x5c, (%rax)
jmp 0x1acdd
jmp 0x1acdf
jmp 0x1ace1
jmp 0x1acfa
movq -0x10(%rbp), %rax
movb (%rax), %cl
movq -0x18(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x18(%rbp)
movb %cl, (%rax)
jmp 0x1acfc
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x1ac34
movq -0x18(%rbp), %rax
movb $0x0, (%rax)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x1ad4a
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x40, %eax
je 0x1ad57
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x1ae12
cmpq $0x0, -0x18(%rbp)
je 0x1adda
movq -0x18(%rbp), %rdi
callq 0x30f0
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movslq -0x1c(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
callq 0x30f0
movq -0x30(%rbp), %rsi
movq -0x28(%rbp), %rdi
addq %rax, %rsi
addq $0x2, %rsi
leaq 0x1f62c(%rip), %rdx     # 0x3a3c5
movl $0x1c7, %ecx            # imm = 0x1C7
leaq 0x1f876(%rip), %r8      # 0x3a61b
callq 0x31d40
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl -0x1c(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x1c(%rbp)
movslq %ecx, %rcx
movb $0xa, (%rax,%rcx)
movq -0x18(%rbp), %rdi
movslq -0x1c(%rbp), %rax
addq %rax, %rdi
movq -0x10(%rbp), %rsi
callq 0x32b0
jmp 0x1adfa
movq -0x10(%rbp), %rdi
leaq 0x1f5e0(%rip), %rsi     # 0x3a3c5
movl $0x1ca, %edx            # imm = 0x1CA
leaq 0x1f82a(%rip), %rcx     # 0x3a61b
callq 0x31df0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movslq -0x1c(%rbp), %rax
addq %rax, %rdi
callq 0x1ac20
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/ToniWestbrook[P]paladin/bwamem.c
// Function: getAlignmentType
int getAlignmentType(worker_t * passWorker, int passEntry, int passAlignment) {
	mem_alnreg_t * currentAlignment;

	currentAlignment = passWorker->regs[passEntry].a + passAlignment;

	if (currentAlignment->secondary < 0) {
		// Primary scores below threshold are not aligned
		if (currentAlignment->score < passWorker->opt->T) return MEM_ALIGN_NONE_PRIMARY;

		return MEM_ALIGN_PRIMARY;
	}
	else {
		// Secondary scores below threshold are not aligned
		if (currentAlignment->score < passWorker->opt->T) return MEM_ALIGN_NONE_SECONDARY;

		// Secondary alignments must also pass score ratio requirements
		if (currentAlignment->is_alt) return MEM_ALIGN_NONE_SECONDARY;
		if (currentAlignment->secondary < INT_MAX &&
			currentAlignment->score < passWorker->regs[passEntry].a[currentAlignment->secondary].score * passWorker->opt->drop_ratio) return MEM_ALIGN_NONE_SECONDARY;

		return MEM_ALIGN_SECONDARY;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movslq -0x14(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
movslq -0x18(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpl $0x0, 0x3c(%rax)
jge 0x1b289
movq -0x20(%rbp), %rax
movl 0x1c(%rax), %eax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
cmpl 0x44(%rcx), %eax
jge 0x1b27d
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1b322
movl $0x0, -0x4(%rbp)
jmp 0x1b322
movq -0x20(%rbp), %rax
movl 0x1c(%rax), %eax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
cmpl 0x44(%rcx), %eax
jge 0x1b2a5
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x1b322
movq -0x20(%rbp), %rax
movl 0x48(%rax), %eax
sarl $0x1e, %eax
cmpl $0x0, %eax
je 0x1b2bd
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x1b322
movq -0x20(%rbp), %rax
cmpl $0x7fffffff, 0x3c(%rax) # imm = 0x7FFFFFFF
jge 0x1b31b
movq -0x20(%rbp), %rax
cvtsi2ssl 0x1c(%rax), %xmm1
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movslq -0x14(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
movq -0x20(%rbp), %rcx
movslq 0x3c(%rcx), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
cvtsi2ssl 0x1c(%rax), %xmm0
movq -0x10(%rbp), %rax
movq (%rax), %rax
mulss 0xa0(%rax), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x1b31b
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x1b322
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ToniWestbrook[P]paladin/bwamem.c
// Function: smem_aux_destroy
static void smem_aux_destroy(smem_aux_t *a)
{	
	free(a->tmpv[0]->a); free(a->tmpv[0]);
	free(a->tmpv[1]->a); free(a->tmpv[1]);
	free(a->mem.a); free(a->mem1.a);
	free(a);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq 0x10(%rax), %rdi
callq 0x3380
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x3380
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x10(%rax), %rdi
callq 0x3380
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x3380
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x3380
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x3380
movq -0x8(%rbp), %rdi
callq 0x3380
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ToniWestbrook[P]paladin/./utils.h
// Function: hash_64
static inline uint64_t hash_64(uint64_t key)
{
	key += ~(key << 32);
	key ^= (key >> 22);
	key += ~(key << 13);
	key ^= (key >> 8);
	key += (key << 3);
	key ^= (key >> 15);
	key += ~(key << 27);
	key ^= (key >> 31);
	return key;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
shlq $0x20, %rax
xorq $-0x1, %rax
addq -0x8(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
shrq $0x16, %rax
xorq -0x8(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
shlq $0xd, %rax
xorq $-0x1, %rax
addq -0x8(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
shrq $0x8, %rax
xorq -0x8(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
shlq $0x3, %rax
addq -0x8(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
shrq $0xf, %rax
xorq -0x8(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
shlq $0x1b, %rax
xorq $-0x1, %rax
addq -0x8(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
shrq $0x1f, %rax
xorq -0x8(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ToniWestbrook[P]paladin/bwamem.c
// Function: cal_max_gap
static inline int cal_max_gap(const mem_opt_t *opt, int qlen)
{
	int l_del = (int)((double)(qlen * opt->a - opt->o_del) / opt->e_del + 1.);
	int l_ins = (int)((double)(qlen * opt->a - opt->o_ins) / opt->e_ins + 1.);
	int l = l_del > l_ins? l_del : l_ins;
	l = l > 1? l : 1;
	return l < opt->w<<1? l : opt->w<<1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
imull (%rcx), %eax
movq -0x8(%rbp), %rcx
subl 0x8(%rcx), %eax
cvtsi2sd %eax, %xmm0
movq -0x8(%rbp), %rax
cvtsi2sdl 0xc(%rax), %xmm1
divsd %xmm1, %xmm0
movsd 0x10ff3(%rip), %xmm1    # 0x3a388
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0x10(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
imull (%rcx), %eax
movq -0x8(%rbp), %rcx
subl 0x10(%rcx), %eax
cvtsi2sd %eax, %xmm0
movq -0x8(%rbp), %rax
cvtsi2sdl 0x14(%rax), %xmm1
divsd %xmm1, %xmm0
movsd 0x10fbe(%rip), %xmm1    # 0x3a388
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0x14(%rbp)
movl -0x10(%rbp), %eax
cmpl -0x14(%rbp), %eax
jle 0x293e5
movl -0x10(%rbp), %eax
movl %eax, -0x1c(%rbp)
jmp 0x293eb
movl -0x14(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x18(%rbp)
cmpl $0x1, -0x18(%rbp)
jle 0x293ff
movl -0x18(%rbp), %eax
movl %eax, -0x20(%rbp)
jmp 0x29409
movl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x29409
movl -0x20(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
movq -0x8(%rbp), %rcx
movl 0x24(%rcx), %ecx
shll %ecx
cmpl %ecx, %eax
jge 0x29427
movl -0x18(%rbp), %eax
movl %eax, -0x24(%rbp)
jmp 0x29433
movq -0x8(%rbp), %rax
movl 0x24(%rax), %eax
shll %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ToniWestbrook[P]paladin/bwamem.c
// Function: get_rlen
static inline int get_rlen(int n_cigar, const uint32_t *cigar)
{
	int k, l;
	for (k = l = 0; k < n_cigar; ++k) {
		int op = cigar[k]&0xf;
		if (op == 0 || op == 2)
			l += cigar[k]>>4;
	}
	return l;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x18(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x2ad7f
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movl (%rax,%rcx,4), %eax
andl $0xf, %eax
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x2ad5e
cmpl $0x2, -0x1c(%rbp)
jne 0x2ad72
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movl (%rax,%rcx,4), %eax
shrl $0x4, %eax
addl -0x18(%rbp), %eax
movl %eax, -0x18(%rbp)
jmp 0x2ad74
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x2ad39
movl -0x18(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ToniWestbrook[P]paladin/bwamem.c
// Function: infer_bw
static inline int infer_bw(int l1, int l2, int score, int a, int q, int r)
{
	int w;
	if (l1 == l2 && l1 * a - score < (q + r - a)<<1) return 0; // to get equal alignment length, we need at least two gaps
	w = ((double)((l1 < l2? l1 : l2) * a - score - q) / r + 2.);
	if (w < abs(l1 - l2)) w = abs(l1 - l2);
	return w;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movl %r8d, -0x18(%rbp)
movl %r9d, -0x1c(%rbp)
movl -0x8(%rbp), %eax
cmpl -0xc(%rbp), %eax
jne 0x2c202
movl -0x8(%rbp), %eax
imull -0x14(%rbp), %eax
subl -0x10(%rbp), %eax
movl -0x18(%rbp), %ecx
addl -0x1c(%rbp), %ecx
subl -0x14(%rbp), %ecx
shll %ecx
cmpl %ecx, %eax
jge 0x2c202
movl $0x0, -0x4(%rbp)
jmp 0x2c26f
movl -0x8(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x2c212
movl -0x8(%rbp), %eax
movl %eax, -0x24(%rbp)
jmp 0x2c218
movl -0xc(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
imull -0x14(%rbp), %eax
subl -0x10(%rbp), %eax
subl -0x18(%rbp), %eax
cvtsi2sd %eax, %xmm0
cvtsi2sdl -0x1c(%rbp), %xmm1
divsd %xmm1, %xmm0
movsd 0xe476(%rip), %xmm1     # 0x3a6b0
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
movl -0x8(%rbp), %ecx
subl -0xc(%rbp), %ecx
movl %ecx, %edx
negl %edx
cmovnsl %edx, %ecx
cmpl %ecx, %eax
jge 0x2c269
movl -0x8(%rbp), %eax
subl -0xc(%rbp), %eax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)