LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/lh3[P]minimap2/index.c
// Function: mm_idx_add
static void mm_idx_add(mm_idx_t *mi, int n, const mm128_t *a)
{
	int i, mask = (1<<mi->b) - 1;
	for (i = 0; i < n; ++i) {
		mm128_v *p = &mi->B[a[i].x>>8&mask].a;
		kv_push(mm128_t, 0, *p, a[i]);
	}
}

// Assembly:
testl %esi, %esi
jle 0x7d96
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
movb (%rdi), %cl
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
shll %cl, %r15d
notl %r15d
movl %esi, %r12d
shlq $0x4, %r12
xorl %r13d, %r13d
movq 0x30(%r14), %rcx
movl 0x1(%rbx,%r13), %eax
andl %r15d, %eax
leaq (%rax,%rax,2), %rdx
shlq $0x4, %rdx
leaq (%rcx,%rdx), %rbp
movq 0x8(%rcx,%rdx), %rax
cmpq %rax, (%rcx,%rdx)
jne 0x7d60
leaq (%rax,%rax), %rdx
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %rdx
movq %rdx, 0x8(%rbp)
movq 0x10(%rbp), %rsi
shlq $0x4, %rdx
xorl %edi, %edi
callq 0x127ec
movq %rax, 0x10(%rbp)
leaq (%rbx,%r13), %rax
movq (%rbp), %rcx
movq 0x10(%rbp), %rdx
leaq 0x1(%rcx), %rsi
movq %rsi, (%rbp)
shlq $0x4, %rcx
movups (%rax), %xmm0
movups %xmm0, (%rdx,%rcx)
addq $0x10, %r13
cmpq %r13, %r12
jne 0x7d16
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/lh3[P]minimap2/index.c
// Function: mm_idx_reader_open
mm_idx_reader_t *mm_idx_reader_open(const char *fn, const mm_idxopt_t *opt, const char *fn_out)
{
	int64_t is_idx;
	mm_idx_reader_t *r;
	is_idx = mm_idx_is_idx(fn);
	if (is_idx < 0) return 0; // failed to open the index
	r = (mm_idx_reader_t*)calloc(1, sizeof(mm_idx_reader_t));
	r->is_idx = is_idx;
	if (opt) r->opt = *opt;
	else mm_idxopt_init(&r->opt);
	if (r->is_idx) {
		r->fp.idx = fopen(fn, "rb");
		r->idx_size = is_idx;
	} else r->fp.seq = mm_bseq_open(fn);
	if (fn_out) r->fp_out = fopen(fn_out, "wb");
	return r;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r13
movq %rdi, %r15
callq 0x86eb
testq %rax, %rax
js 0x87d5
movq %rax, %r12
movl $0x1, %edi
movl $0x38, %esi
callq 0x2230
movq %rax, %r14
movl %r12d, (%rax)
movq %rax, %rdi
addq $0x10, %rdi
testq %r13, %r13
je 0x87da
movq 0x10(%r13), %rax
movq %rax, 0x10(%rdi)
movups (%r13), %xmm0
movups %xmm0, (%rdi)
jmp 0x87df
xorl %r14d, %r14d
jmp 0x8822
callq 0x606c
cmpl $0x0, (%r14)
je 0x87fe
leaq 0x23b20(%rip), %rsi     # 0x2c30c
movq %r15, %rdi
callq 0x2390
movq %rax, 0x30(%r14)
movq %r12, 0x8(%r14)
jmp 0x880a
movq %r15, %rdi
callq 0x13084
movq %rax, 0x30(%r14)
testq %rbx, %rbx
je 0x8822
leaq 0x21b97(%rip), %rsi     # 0x2a3ad
movq %rbx, %rdi
callq 0x2390
movq %rax, 0x28(%r14)
movq %r14, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/lh3[P]minimap2/index.c
// Function: mm_idx_reader_close
void mm_idx_reader_close(mm_idx_reader_t *r)
{
	if (r->is_idx) fclose(r->fp.idx);
	else mm_bseq_close(r->fp.seq);
	if (r->fp_out) fclose(r->fp_out);
	free(r);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpl $0x0, (%rdi)
movq 0x30(%rdi), %rdi
je 0x8843
callq 0x2120
jmp 0x8848
callq 0x130f8
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x8856
callq 0x2120
movq %rbx, %rdi
popq %rbx
jmp 0x2040
// File: /workspace/github_c_makefile_star2_O1/lh3[P]minimap2/index.c
// Function: mm_idx_reader_read
mm_idx_t *mm_idx_reader_read(mm_idx_reader_t *r, int n_threads)
{
	mm_idx_t *mi;
	if (r->is_idx) {
		mi = mm_idx_load(r->fp.idx);
		if (mi && mm_verbose >= 2 && (mi->k != r->opt.k || mi->w != r->opt.w || (mi->flag&MM_I_HPC) != (r->opt.flag&MM_I_HPC)))
			fprintf(stderr, "[WARNING]\033[1;31m Indexing parameters (-k, -w or -H) overridden by parameters used in the prebuilt index.\033[0m\n");
	} else
		mi = mm_idx_gen(r->fp.seq, r->opt.w, r->opt.k, r->opt.bucket_bits, r->opt.flag, r->opt.mini_batch_size, n_threads, r->opt.batch_size);
	if (mi) {
		if (r->fp_out) mm_idx_dump(r->fp_out, mi);
		mi->index = r->n_parts++;
	}
	return mi;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, (%rdi)
movq 0x30(%rdi), %rdi
je 0x88b5
callq 0x7fd9
movq %rax, %r14
testq %rax, %rax
je 0x88dc
leaq 0x2ce7d(%rip), %rax     # 0x35700
cmpl $0x2, (%rax)
jl 0x88dc
movswl 0x10(%rbx), %eax
cmpl %eax, 0x8(%r14)
jne 0x88ae
movswl 0x12(%rbx), %eax
cmpl %eax, 0x4(%r14)
jne 0x88ae
movl 0xc(%r14), %eax
andl $0x1, %eax
movzwl 0x14(%rbx), %ecx
andl $0x1, %ecx
cmpl %ecx, %eax
je 0x88dc
callq 0x2ea5
jmp 0x88dc
movl %esi, %eax
movswl 0x12(%rbx), %esi
movswl 0x10(%rbx), %edx
movswl 0x16(%rbx), %ecx
movswl 0x14(%rbx), %r8d
movl 0x18(%rbx), %r9d
pushq 0x20(%rbx)
pushq %rax
callq 0x74e0
addq $0x10, %rsp
movq %rax, %r14
testq %r14, %r14
je 0x88ff
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x88f2
movq %r14, %rsi
callq 0x7d97
movl 0x4(%rbx), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x4(%rbx)
movl %eax, 0x14(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/lh3[P]minimap2/index.c
// Function: mm_idx_alt_read
int mm_idx_alt_read(mm_idx_t *mi, const char *fn)
{
	int n_alt = 0;
	gzFile fp;
	kstream_t *ks;
	kstring_t str = {0,0,0};
	fp = fn && strcmp(fn, "-")? gzopen(fn, "r") : gzdopen(fileno(stdin), "r");
	if (fp == 0) return -1;
	ks = ks_init(fp);
	if (mi->h == 0) mm_idx_index_name(mi);
	while (ks_getuntil(ks, KS_SEP_LINE, &str, 0) >= 0) {
		char *p;
		int id;
		for (p = str.s; *p && !isspace(*p); ++p) { }
		*p = 0;
		id = mm_idx_name2id(mi, str.s);
		if (id >= 0) mi->seq[id].is_alt = 1, ++n_alt;
	}
	mi->n_alt = n_alt;
	if (mm_verbose >= 3)
		fprintf(stderr, "[M::%s] found %d ALT contigs\n", __func__, n_alt);
	return n_alt;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
testq %rsi, %rsi
je 0x8991
movq %rsi, %r14
leaq 0x23e16(%rip), %rsi     # 0x2c78a
movq %r14, %rdi
callq 0x2240
testl %eax, %eax
je 0x8991
leaq 0x232d4(%rip), %rsi     # 0x2bc5b
movq %r14, %rdi
callq 0x2350
jmp 0x89ae
movq 0x2c640(%rip), %rax     # 0x34fd8
movq (%rax), %rdi
callq 0x22b0
leaq 0x232b4(%rip), %rsi     # 0x2bc5b
movl %eax, %edi
callq 0x20f0
testq %rax, %rax
je 0x8a98
movq %rax, %rdi
callq 0x129a4
movq %rax, %r15
cmpq $0x0, 0x58(%rbx)
jne 0x89d1
movq %rbx, %rdi
callq 0x6e63
xorl %r14d, %r14d
movq %rsp, %rdx
movq %r15, %rdi
movl $0x2, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x12a05
testl %eax, %eax
js 0x8a64
xorl %r14d, %r14d
movq %rsp, %r12
movq 0x10(%rsp), %r13
movb (%r13), %bpl
testb %bpl, %bpl
je 0x8a20
callq 0x2460
movq (%rax), %rax
movsbq %bpl, %rcx
testb $0x20, 0x1(%rax,%rcx,2)
jne 0x8a20
movb 0x1(%r13), %bpl
incq %r13
testb %bpl, %bpl
jne 0x8a09
movb $0x0, (%r13)
movq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x7108
testl %eax, %eax
js 0x8a4b
movq 0x20(%rbx), %rcx
movl %eax, %eax
leaq (%rax,%rax,2), %rax
movl $0x1, 0x14(%rcx,%rax,8)
incl %r14d
movq %r15, %rdi
movl $0x2, %esi
movq %r12, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x12a05
testl %eax, %eax
jns 0x89f3
movl %r14d, 0x18(%rbx)
leaq 0x2cc91(%rip), %rax     # 0x35700
cmpl $0x3, (%rax)
jl 0x8a9e
movq 0x2c57d(%rip), %rax     # 0x34ff8
movq (%rax), %rdi
leaq 0x238f8(%rip), %rsi     # 0x2c37d
leaq 0x2390f(%rip), %rdx     # 0x2c39b
movl %r14d, %ecx
xorl %eax, %eax
callq 0x2260
jmp 0x8a9e
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/lh3[P]minimap2/index.c
// Function: mm_idx_bed_junc
int mm_idx_bed_junc(const mm_idx_t *mi, int32_t ctg, int32_t st, int32_t en, uint8_t *s)
{
	int32_t i, left, right;
	mm_idx_intv_t *r;
	memset(s, 0, en - st);
	if (mi->I == 0 || ctg < 0 || ctg >= mi->n_seq) return -1;
	r = &mi->I[ctg];
	left = 0, right = r->n;
	while (right > left) {
		int32_t mid = left + ((right - left) >> 1);
		if (r->a[mid].st >= st) right = mid;
		else left = mid + 1;
	}
	for (i = left; i < r->n; ++i) {
		if (st <= r->a[i].st && en >= r->a[i].en && r->a[i].strand != 0) {
			if (r->a[i].strand > 0) {
				s[r->a[i].st - st] |= 1, s[r->a[i].en - 1 - st] |= 2;
			} else {
				s[r->a[i].st - st] |= 8, s[r->a[i].en - 1 - st] |= 4;
			}
		}
	}
	return left;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %r8, %rbx
movl %ecx, %ebp
movl %edx, %r14d
movl %esi, %r15d
movq %rdi, %r12
movl %ecx, %eax
subl %edx, %eax
movslq %eax, %rdx
movq %r8, %rdi
xorl %esi, %esi
callq 0x21b0
movq 0x38(%r12), %rdx
testq %rdx, %rdx
sete %al
testl %r15d, %r15d
sets %cl
orb %al, %cl
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jne 0x9765
cmpl %r15d, 0x10(%r12)
jbe 0x9765
movl %r15d, %eax
shlq $0x4, %rax
leaq (%rdx,%rax), %rcx
movl (%rdx,%rax), %edx
testl %edx, %edx
jle 0x96ed
movq 0x8(%rcx), %rsi
xorl %eax, %eax
movl %edx, %edi
subl %eax, %edi
sarl %edi
leal (%rdi,%rax), %r8d
movslq %r8d, %r9
shlq $0x4, %r9
cmpl %r14d, (%rsi,%r9)
jl 0x96e3
movl %r8d, %edx
jmp 0x96e7
addl %edi, %eax
incl %eax
cmpl %eax, %edx
jg 0x96c7
jmp 0x96ef
xorl %eax, %eax
cmpl (%rcx), %eax
jge 0x9765
movslq %eax, %rdx
movl %r14d, %esi
notl %esi
movq %rdx, %rdi
shlq $0x4, %rdi
movl $0x1, %r8d
movq 0x8(%rcx), %r10
movl (%r10,%rdi), %r9d
subl %r14d, %r9d
jl 0x9756
cmpl %ebp, 0x4(%r10,%rdi)
jg 0x9756
cmpl $0x40000000, 0xc(%r10,%rdi) # imm = 0x40000000
jb 0x9756
setl %r10b
movslq %r9d, %r9
movl $0x8, %r11d
cmovgel %r8d, %r11d
addb %r10b, %r10b
orb %r11b, (%rbx,%r9)
addb $0x2, %r10b
movq 0x8(%rcx), %r9
movl 0x4(%r9,%rdi), %r9d
addl %esi, %r9d
movslq %r9d, %r9
orb %r10b, (%rbx,%r9)
incq %rdx
movslq (%rcx), %r9
addq $0x10, %rdi
cmpq %r9, %rdx
jl 0x9708
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/lh3[P]minimap2/index.c
// Function: sort_jjump
static void sort_jjump(mm_idx_jjump_t *jj2)
{
	int32_t j0, j, k;
	if (jj2 == 0 || jj2->n == 0) return;
	radix_sort_jj(jj2->a, jj2->a + jj2->n);
	for (j0 = 0, j = 1; j <= jj2->n; ++j) {
		if (j == jj2->n || jj2->a[j0].off != jj2->a[j].off) {
			radix_sort_jj2(jj2->a + j0, jj2->a + j);
			j0 = j;
		}
	}
	// the actual merge
	for (j0 = 0, j = 1, k = 0; j <= jj2->n; ++j) {
		if (j == jj2->n || jj2->a[j0].off != jj2->a[j].off || jj2->a[j0].off2 != jj2->a[j].off2) {
			int32_t t, cnt = 0;
			uint16_t flag = 0;
			for (t = j0; t < j; ++t) cnt += jj2->a[t].cnt, flag |= jj2->a[t].flag;
			jj2->a[k] = jj2->a[j0];
			jj2->a[k].cnt = cnt;
			jj2->a[k++].flag = flag;
			j0 = j;
		}
	}
	jj2->n = k;
	jj2->a = REALLOC(mm_idx_jjump1_t, jj2->a, k);
}

// Assembly:
testq %rdi, %rdi
je 0xadd8
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movslq (%rdi), %rsi
testq %rsi, %rsi
je 0xadd3
movq 0x8(%rbx), %rdi
shlq $0x4, %rsi
addq %rdi, %rsi
callq 0x99f2
movl (%rbx), %ecx
testl %ecx, %ecx
jle 0xacfa
xorl %eax, %eax
movl $0x1, %r15d
movl $0x10, %r14d
movl %ecx, %ecx
movslq %eax, %rdi
cmpq %rcx, %r15
je 0xacd1
movq 0x8(%rbx), %rcx
movq %rdi, %rdx
shlq $0x4, %rdx
movl (%rcx,%rdx), %edx
cmpl (%rcx,%r14), %edx
je 0xace7
movq 0x8(%rbx), %rsi
shlq $0x4, %rdi
addq %rsi, %rdi
addq %r14, %rsi
callq 0x9c69
movl %r15d, %eax
leaq 0x1(%r15), %rdx
movslq (%rbx), %rcx
addq $0x10, %r14
cmpq %rcx, %r15
movq %rdx, %r15
jl 0xacb3
movl (%rbx), %edx
xorl %eax, %eax
testl %edx, %edx
jle 0xadbd
movl $0x1, %ecx
xorl %esi, %esi
movl %edx, %edi
movslq %esi, %rdx
cmpq %rdi, %rcx
je 0xad42
movq 0x8(%rbx), %r8
movq %rdx, %rdi
shlq $0x4, %rdi
movl (%r8,%rdi), %r10d
movq %rcx, %r9
shlq $0x4, %r9
cmpl (%r8,%r9), %r10d
jne 0xad42
addq %r8, %rdi
addq %r8, %r9
movl 0x4(%rdi), %edi
cmpl 0x4(%r9), %edi
je 0xadaa
xorl %edi, %edi
movl $0x0, %esi
cmpq %rdx, %rcx
jle 0xad7c
movq 0x8(%rbx), %rsi
movq %rdx, %rdi
shlq $0x4, %rdi
leaq (%rsi,%rdi), %r8
addq $0xe, %r8
xorl %esi, %esi
movq %rdx, %r9
xorl %edi, %edi
addl -0x6(%r8), %edi
orw (%r8), %si
incq %r9
addq $0x10, %r8
cmpq %r9, %rcx
jne 0xad68
movq 0x8(%rbx), %r8
cltq
movq %rax, %r9
shlq $0x4, %r9
shlq $0x4, %rdx
movups (%r8,%rdx), %xmm0
movups %xmm0, (%r8,%r9)
movq 0x8(%rbx), %rdx
movl %edi, 0x8(%rdx,%r9)
incl %eax
movw %si, 0xe(%rdx,%r9)
movl %ecx, %esi
leaq 0x1(%rcx), %rdi
movslq (%rbx), %rdx
cmpq %rdx, %rcx
movq %rdi, %rcx
jl 0xad0d
movl %eax, (%rbx)
movq 0x8(%rbx), %rdi
movslq %eax, %rsi
shlq $0x4, %rsi
callq 0x2320
movq %rax, 0x8(%rbx)
popq %rbx
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/lh3[P]minimap2/index.c
// Function: mm_idx_jump_get
const mm_idx_jjump1_t *mm_idx_jump_get(const mm_idx_t *db, int32_t cid, int32_t st, int32_t en, int32_t *n)
{
	mm_idx_jjump_t *s;
	int32_t l, r;
	*n = 0;
	if (cid >= db->n_seq || cid < 0 || db->J == 0) return 0;
	if (en < 0 || en > db->seq[cid].len) en = db->seq[cid].len;
	s = &db->J[cid];
	if (s->n == 0) return 0;
	l = mm_idx_jump_get_core(s->n, s->a, st);
	r = mm_idx_jump_get_core(s->n, s->a, en);
	*n = r - l;
	return &s->a[l + 1];
}

// Assembly:
movl $0x0, (%r8)
xorl %eax, %eax
testl %esi, %esi
js 0xa032
cmpl %esi, 0x10(%rdi)
jbe 0xa032
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq 0x48(%rdi), %r15
testq %r15, %r15
je 0xa026
movq %r8, %rbx
movl %ecx, %ebp
movl %esi, %eax
testl %ecx, %ecx
js 0x9fd8
movq 0x20(%rdi), %rcx
leaq (%rax,%rax,2), %rsi
cmpl %ebp, 0x10(%rcx,%rsi,8)
jae 0x9fe4
movq 0x20(%rdi), %rcx
leaq (%rax,%rax,2), %rsi
movl 0x10(%rcx,%rsi,8), %ebp
shlq $0x4, %rax
movl (%r15,%rax), %edi
testl %edi, %edi
je 0xa026
addq %rax, %r15
movq 0x8(%r15), %rsi
callq 0xa033
movl %eax, %r14d
movl (%r15), %edi
movq 0x8(%r15), %rsi
movl %ebp, %edx
callq 0xa033
subl %r14d, %eax
movl %eax, (%rbx)
movq 0x8(%r15), %rax
movslq %r14d, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
addq $0x10, %rax
jmp 0xa028
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/lh3[P]minimap2/index.c
// Function: mm_idx_jump_get_core
static int32_t mm_idx_jump_get_core(int32_t n, const mm_idx_jjump1_t *a, int32_t x) // similar to mm_idx_find_intv()
{
	int32_t s = 0, e = n;
	if (n == 0) return -1;
	if (x < a[0].off) return -1;
	while (s < e) {
		int32_t mid = s + (e - s) / 2;
		if (x >= a[mid].off && (mid + 1 >= n || x < a[mid+1].off)) return mid;
		else if (x < a[mid].off) e = mid;
		else s = mid + 1;
	}
	assert(0);
}

// Assembly:
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %edi, %edi
je 0xa040
cmpl %edx, (%rsi)
jle 0xa041
retq
xorl %ecx, %ecx
movl %edi, %r8d
movl %r8d, %r10d
subl %ecx, %r10d
jle 0xa0af
movl %r10d, %r9d
shrl $0x1f, %r9d
addl %r10d, %r9d
sarl %r9d
addl %ecx, %r9d
movslq %r9d, %r10
shlq $0x4, %r10
movl (%rsi,%r10), %r11d
movl %r9d, %r10d
cmpl %edx, %r11d
jle 0xa081
cmpl %edx, %r11d
jg 0xa07c
incl %r9d
movl %r9d, %ecx
movb $0x1, %r11b
jmp 0xa0a0
leal 0x1(%r9), %r10d
cmpl %edi, %r10d
jge 0xa097
movslq %r10d, %r10
shlq $0x4, %r10
cmpl %edx, (%rsi,%r10)
jle 0xa0aa
xorl %r11d, %r11d
movl %r8d, %r10d
movl %r9d, %eax
movl %r10d, %r8d
testb %r11b, %r11b
jne 0xa046
jmp 0xa040
movl %r8d, %r10d
jmp 0xa071
pushq %rax
leaq 0x229ea(%rip), %rdi     # 0x2caa1
leaq 0x221d7(%rip), %rsi     # 0x2c295
leaq 0x22609(%rip), %rcx     # 0x2c6ce
movl $0x3af, %edx            # imm = 0x3AF
callq 0x21a0
// File: /workspace/github_c_makefile_star2_O1/lh3[P]minimap2/index.c
// Function: mm_idx_spsc_get
int64_t mm_idx_spsc_get(const mm_idx_t *db, int32_t cid, int64_t st, int64_t en, int32_t rev, uint8_t *sc)
{
	const mm_idx_spsc_t *s;
	if (cid >= db->n_seq || cid < 0 || db->spsc == 0) return -1;
	if (en < 0 || en > db->seq[cid].len) en = db->seq[cid].len;
	memset(sc, 0xff, en - st);
	s = &db->spsc[cid << 1 | (!!rev)];
	if (s->n > 0) {
		int32_t j, l, r;
		l = mm_idx_find_intv(s->n, s->a, st);
		r = mm_idx_find_intv(s->n, s->a, en);
		for (j = l + 1; j <= r; ++j) {
			int64_t x = (s->a[j]>>8) - st;
			uint8_t score = s->a[j] & 0xff;
			assert(x <= en - st);
			if (x == en - st) continue;
			if (sc[x] == 0xff || sc[x] < score) sc[x] = score;
		}
	}
	return en - st;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq $-0x1, %r12
testl %esi, %esi
js 0xa5f9
movl %esi, %r13d
movq %rdi, %rbp
cmpl %esi, 0x10(%rdi)
jbe 0xa5f9
cmpq $0x0, 0x40(%rbp)
je 0xa5f9
movq %r9, %rbx
movq %rcx, %r15
movq %rdx, %r14
movl %r8d, 0x4(%rsp)
movl %r13d, %eax
testq %rcx, %rcx
js 0xa53c
movq 0x20(%rbp), %rcx
leaq (%rax,%rax,2), %rdx
movl 0x10(%rcx,%rdx,8), %ecx
cmpq %r15, %rcx
jge 0xa549
movq 0x20(%rbp), %rcx
leaq (%rax,%rax,2), %rax
movl 0x10(%rcx,%rax,8), %r15d
movq %r15, %r12
subq %r14, %r12
movq %rbx, %rdi
movl $0xff, %esi
movq %r12, %rdx
callq 0x21b0
movq 0x40(%rbp), %rbp
xorl %eax, %eax
cmpl $0x0, 0x4(%rsp)
setne %al
leal (%rax,%r13,2), %eax
cltq
shlq $0x4, %rax
movl (%rbp,%rax), %edi
testl %edi, %edi
je 0xa5f9
addq %rax, %rbp
movq 0x8(%rbp), %rsi
movq %r14, %rdx
callq 0xa62a
movl %eax, %r13d
movl (%rbp), %edi
movq 0x8(%rbp), %rsi
movq %r15, %rdx
callq 0xa62a
cmpl %eax, %r13d
jge 0xa5f9
movslq %r13d, %rcx
cltq
movl $0xff, %edx
movq 0x8(%rbp), %rsi
movq 0x8(%rsi,%rcx,8), %rsi
movq %rsi, %r8
shrq $0x8, %r8
movq %r8, %rdi
subq %r14, %rdi
cmpq %r12, %rdi
jg 0xa60b
cmpq %r15, %r8
je 0xa5f1
movzbl (%rbx,%rdi), %r8d
cmpl %edx, %r8d
setne %r9b
movl %esi, %r10d
andl %edx, %r10d
cmpl %r8d, %r10d
setbe %r8b
testb %r8b, %r9b
jne 0xa5f1
movb %sil, (%rbx,%rdi)
incq %rcx
cmpq %rcx, %rax
jne 0xa5af
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x21f24(%rip), %rdi     # 0x2c536
leaq 0x21c7c(%rip), %rsi     # 0x2c295
leaq 0x21f23(%rip), %rcx     # 0x2c543
movl $0x42c, %edx            # imm = 0x42C
callq 0x21a0
// File: /workspace/github_c_makefile_star2_O1/lh3[P]minimap2/index.c
// Function: mm_idx_find_intv
static int32_t mm_idx_find_intv(int32_t n, const uint64_t *a, int64_t x)
{
	int32_t s = 0, e = n;
	if (n == 0) return -1;
	if (x < a[0]>>8) return -1;
	while (s < e) {
		int32_t mid = s + (e - s) / 2;
		if (x >= a[mid]>>8 && (mid + 1 >= n || x < a[mid+1]>>8)) return mid;
		else if (x < a[mid]>>8) e = mid;
		else s = mid + 1;
	}
	assert(0);
}

// Assembly:
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %edi, %edi
je 0xa63f
movq (%rsi), %rcx
shrq $0x8, %rcx
cmpq %rdx, %rcx
jbe 0xa640
retq
xorl %ecx, %ecx
movl %edi, %r8d
movl %r8d, %r10d
subl %ecx, %r10d
jle 0xa6b1
movl %r10d, %r9d
shrl $0x1f, %r9d
addl %r10d, %r9d
sarl %r9d
addl %ecx, %r9d
movslq %r9d, %r10
movq (%rsi,%r10,8), %r11
shrq $0x8, %r11
movl %r9d, %r10d
cmpq %rdx, %r11
jbe 0xa680
cmpq %rdx, %r11
ja 0xa67b
incl %r9d
movl %r9d, %ecx
movb $0x1, %r11b
jmp 0xa6a2
leal 0x1(%r9), %r10d
cmpl %edi, %r10d
jge 0xa699
movslq %r10d, %r10
movq (%rsi,%r10,8), %r10
shrq $0x8, %r10
cmpq %rdx, %r10
jbe 0xa6ac
xorl %r11d, %r11d
movl %r8d, %r10d
movl %r9d, %eax
movl %r10d, %r8d
testb %r11b, %r11b
jne 0xa645
jmp 0xa63f
movl %r8d, %r10d
jmp 0xa670
pushq %rax
leaq 0x223e8(%rip), %rdi     # 0x2caa1
leaq 0x21bd5(%rip), %rsi     # 0x2c295
leaq 0x2204f(%rip), %rcx     # 0x2c716
movl $0x41b, %edx            # imm = 0x41B
callq 0x21a0
// File: /workspace/github_c_makefile_star2_O1/lh3[P]minimap2/map.c
// Function: ks_heapdown_heap
static inline int skip_seed(int flag, uint64_t r, const mm_seed_t *q, const char *qname, int qlen, const mm_idx_t *mi, int *is_self)
{
	*is_self = 0;
	if (qname && (flag & (MM_F_NO_DIAG|MM_F_NO_DUAL))) {
		const mm_idx_seq_t *s = &mi->seq[r>>32];
		int cmp;
		cmp = strcmp(qname, s->name);
		if ((flag&MM_F_NO_DIAG) && cmp == 0 && (int)s->len == qlen) {
			if ((uint32_t)r>>1 == (q->q_pos>>1)) return 1; // avoid the diagnonal anchors
			if ((r&1) == (q->q_pos&1)) *is_self = 1; // this flag is used to avoid spurious extension on self chain
		}
		if ((flag&MM_F_NO_DUAL) && cmp > 0) // all-vs-all mode: map once
			return 1;
	}
	if (flag & (MM_F_FOR_ONLY|MM_F_REV_ONLY)) {
		if ((r&1) == (q->q_pos&1)) { // forward strand
			if (flag & MM_F_REV_ONLY) return 1;
		} else {
			if (flag & MM_F_FOR_ONLY) return 1;
		}
	}
	return 0;
}

// Assembly:
movq %rdi, %rcx
shlq $0x4, %rcx
movq (%rdx,%rcx), %rax
movq 0x8(%rdx,%rcx), %rcx
leaq 0x1(,%rdi,2), %r9
cmpq %rsi, %r9
jae 0xaeab
pushq %rbx
leaq (%rdi,%rdi), %r10
leaq -0x2(%rsi), %r8
cmpq %r8, %r10
jne 0xae57
movq %r9, %r11
jmp 0xae79
movq %r9, %r11
shlq $0x4, %r11
movq (%rdx,%r11), %r11
addq $0x2, %r10
movq %r10, %rbx
shlq $0x4, %rbx
cmpq (%rdx,%rbx), %r11
ja 0xae76
movq %r9, %r10
movq %r10, %r11
movq %r11, %r9
shlq $0x4, %r9
cmpq %rax, (%rdx,%r9)
ja 0xaeb0
addq %rdx, %r9
shlq $0x4, %rdi
movups (%r9), %xmm0
movups %xmm0, (%rdx,%rdi)
leaq (%r11,%r11), %r10
leaq 0x1(,%r11,2), %r9
movq %r11, %rdi
cmpq %rsi, %r9
jb 0xae4d
jmp 0xaeb3
movq %rdi, %r11
jmp 0xaeb4
movq %rdi, %r11
popq %rbx
shlq $0x4, %r11
movq %rax, (%rdx,%r11)
movq %rcx, 0x8(%rdx,%r11)
retq
// File: /workspace/github_c_makefile_star2_O1/lh3[P]minimap2/map.c
// Function: align_regs
static mm_reg1_t *align_regs(const mm_mapopt_t *opt, const mm_idx_t *mi, void *km, int qlen, const char *seq, int *n_regs, mm_reg1_t *regs, mm128_t *a)
{
	if (!(opt->flag & MM_F_CIGAR)) return regs;
	regs = mm_align_skeleton(km, opt, mi, qlen, seq, n_regs, regs, a); // this calls mm_filter_regs()
	if (!(opt->flag & MM_F_ALL_CHAINS)) { // don't choose primary mapping(s)
		mm_set_parent(km, opt->mask_level, opt->mask_len, *n_regs, regs, opt->a * 2 + opt->b, opt->flag&MM_F_HARD_MLEVEL, opt->alt_drop);
		mm_select_sub(km, opt->pri_ratio, mi->k*2, opt->best_n, 0, opt->max_gap * 0.8, n_regs, regs);
		mm_set_sam_pri(*n_regs, regs);
	}
	return regs;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq 0x30(%rsp), %rbx
testb $0x4, (%rdi)
je 0xcaa4
movq %r9, %r14
movq %rdx, %r15
movq %rsi, %r13
movq %rdi, %r12
movq %rdx, %rdi
movq %r12, %rsi
movq %r13, %rdx
pushq 0x38(%rsp)
pushq %rbx
callq 0x174a8
addq $0x10, %rsp
movq %rax, %rbx
movq (%r12), %r9
btl $0x17, %r9d
jb 0xcaa4
movss 0x50(%r12), %xmm0
movl 0x54(%r12), %esi
movl (%r14), %edx
movl 0x64(%r12), %r8d
addl %r8d, %r8d
addl 0x68(%r12), %r8d
andl $0x20000000, %r9d       # imm = 0x20000000
movss 0x60(%r12), %xmm1
movq %r15, %rdi
movq %rbx, %rcx
callq 0x1c006
movss 0x58(%r12), %xmm0
movl 0x8(%r13), %esi
addl %esi, %esi
movl 0x5c(%r12), %edx
xorps %xmm1, %xmm1
cvtsi2sdl 0x1c(%r12), %xmm1
mulsd 0x1fce2(%rip), %xmm1    # 0x2c760
cvttsd2si %xmm1, %r8d
subq $0x8, %rsp
movq %r15, %rdi
xorl %ecx, %ecx
movq %r14, %r9
pushq %rbx
callq 0x1c812
addq $0x10, %rsp
movl (%r14), %edi
movq %rbx, %rsi
callq 0x1c6c1
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/lh3[P]minimap2/map.c
// Function: mm_map_frag
void mm_map_frag(const mm_idx_t *mi, int n_segs, const int *qlens, const char **seqs, int *n_regs, mm_reg1_t **regs, mm_tbuf_t *b, const mm_mapopt_t *opt, const char *qname)
{
	if ((opt->flag & MM_F_WEAK_PAIRING) && n_segs == 2 && opt->pe_ori >= 0 && (opt->flag&MM_F_CIGAR)) {
		int i;
		for (i = 0; i < n_segs; ++i)
			mm_map_frag_core(mi, 1, &qlens[i], &seqs[i], &n_regs[i], &regs[i], b, opt, qname);
		mm_pair(b->km, opt->max_gap_ref, opt->pe_bonus, opt->a * 2 + opt->b, opt->a, qlens, n_regs, regs);
	} else {
		mm_map_frag_core(mi, n_segs, qlens, seqs, n_regs, regs, b, opt, qname);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, %r10
movq %rcx, %r12
movq %rdx, %r15
movq %rdi, %rbx
movq 0x68(%rsp), %r14
movq (%r14), %rax
btq $0x26, %rax
setae %cl
cmpl $0x2, %esi
setne %dl
orb %cl, %dl
jne 0xcba9
testb $0x4, %al
je 0xcba9
cmpl $0x0, 0xb8(%r14)
js 0xcba9
movq 0x70(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x8(%rsp)
xorl %r13d, %r13d
movq %r9, 0x10(%rsp)
movq %r9, %rbp
movq %r14, 0x20(%rsp)
leaq (%r15,%r13), %rdx
leaq (%r10,%r13), %r8
subq $0x8, %rsp
movq %rbx, %rdi
movl $0x1, %esi
movq %r12, %rcx
movq %rbp, %r9
pushq 0x20(%rsp)
pushq %r14
pushq 0x20(%rsp)
movq %r10, %r14
callq 0xb038
movq %r14, %r10
movq 0x40(%rsp), %r14
addq $0x20, %rsp
addq $0x4, %r13
addq $0x8, %rbp
addq $0x8, %r12
cmpq $0x4, %r13
je 0xcb23
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movl 0xbc(%r14), %edx
movl 0x20(%r14), %esi
movl 0x64(%r14), %r8d
leal (%r8,%r8), %ecx
addl 0x68(%r14), %ecx
movq %r15, %r9
pushq 0x10(%rsp)
pushq %r10
callq 0x113db
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
movq %r15, %rdx
movq %r12, %rcx
movq %r10, %r8
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xb038
// File: /workspace/github_c_makefile_star2_O1/lh3[P]minimap2/map.c
// Function: mm_map_file_frag
int mm_map_file_frag(const mm_idx_t *idx, int n_segs, const char **fn, const mm_mapopt_t *opt, int n_threads)
{
	int i, pl_threads;
	pipeline_t pl;
	if (n_segs < 1) return -1;
	memset(&pl, 0, sizeof(pipeline_t));
	pl.n_fp = n_segs;
	pl.fp = open_bseqs(pl.n_fp, fn);
	if (pl.fp == 0) return -1;
	pl.opt = opt, pl.mi = idx;
	pl.n_threads = n_threads > 1? n_threads : 1;
	pl.mini_batch_size = opt->mini_batch_size;
	if (opt->split_prefix)
		pl.fp_split = mm_split_init(opt->split_prefix, idx);
	pl_threads = n_threads == 1? 1 : (opt->flag&MM_F_2_IO_THREADS)? 3 : 2;
	kt_pipeline(pl_threads, worker_pipeline, &pl, 3);

	free(pl.str.s);
	if (pl.fp_split) fclose(pl.fp_split);
	for (i = 0; i < pl.n_fp; ++i)
		mm_bseq_close(pl.fp[i]);
	free(pl.fp);
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x68, %rsp
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
testl %esi, %esi
jle 0xcd38
movl %r8d, %ebp
movq %rcx, %rbx
movq %rdi, %r14
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x60(%rsp)
movl %esi, 0x8(%rsp)
movl %esi, %edi
movq %rdx, %rsi
callq 0xcd46
movq %rax, 0x20(%rsp)
testq %rax, %rax
je 0xcd38
movq %rbx, 0x18(%rsp)
movq %r14, 0x28(%rsp)
cmpl $0x2, %ebp
movl $0x1, %r15d
movl $0x1, %eax
cmovgel %ebp, %eax
movl %eax, 0x4(%rsp)
movq 0xe8(%rbx), %rax
movq %rax, 0x10(%rsp)
movq 0x100(%rbx), %rdi
testq %rdi, %rdi
je 0xccc0
movq %r14, %rsi
callq 0x11d78
movq %rax, 0x58(%rsp)
cmpl $0x1, %ebp
je 0xccd6
movb 0x1(%rbx), %al
andb $-0x80, %al
cmpb $0x1, %al
movl $0x3, %r15d
sbbl $0x0, %r15d
leaq 0xf4(%rip), %rsi        # 0xcdd1
movq %rsp, %rbx
movl %r15d, %edi
movq %rbx, %rdx
movl $0x3, %ecx
callq 0x12308
movq 0x40(%rbx), %rdi
callq 0x2040
movq 0x58(%rbx), %rdi
testq %rdi, %rdi
je 0xcd07
callq 0x2120
cmpl $0x0, 0x8(%rsp)
jle 0xcd2b
xorl %ebx, %ebx
movq 0x20(%rsp), %rax
movq (%rax,%rbx,8), %rdi
callq 0x130f8
incq %rbx
movslq 0x8(%rsp), %rax
cmpq %rax, %rbx
jl 0xcd10
movq 0x20(%rsp), %rdi
callq 0x2040
xorl %r15d, %r15d
movl %r15d, %eax
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/lh3[P]minimap2/map.c
// Function: open_bseqs
static mm_bseq_file_t **open_bseqs(int n, const char **fn)
{
	mm_bseq_file_t **fp;
	int i, j;
	fp = (mm_bseq_file_t**)calloc(n, sizeof(mm_bseq_file_t*));
	for (i = 0; i < n; ++i) {
		if ((fp[i] = mm_bseq_open(fn[i])) == 0) {
			if (mm_verbose >= 1)
				fprintf(stderr, "ERROR: failed to open file '%s': %s\n", fn[i], strerror(errno));
			for (j = 0; j < i; ++j)
				mm_bseq_close(fp[j]);
			free(fp);
			return 0;
		}
	}
	return fp;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r15
movl %edi, %ebp
movl %edi, %r12d
movl $0x8, %esi
movq %r12, %rdi
callq 0x2230
movq %rax, %rbx
testl %ebp, %ebp
jle 0xcdb8
xorl %r14d, %r14d
movq (%r15,%r14,8), %rdi
callq 0x13084
movq %rax, (%rbx,%r14,8)
testq %rax, %rax
je 0xcd89
incq %r14
cmpq %r14, %r12
jne 0xcd6d
jmp 0xcdb8
leaq 0x28970(%rip), %rax     # 0x35700
cmpl $0x0, (%rax)
jg 0xcdc4
testq %r14, %r14
je 0xcdae
xorl %r15d, %r15d
movq (%rbx,%r15,8), %rdi
callq 0x130f8
incq %r15
cmpq %r15, %r14
jne 0xcd9d
movq %rbx, %rdi
callq 0x2040
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rdi
movq %r14, %rsi
callq 0x2f8d
jmp 0xcd95
// File: /workspace/github_c_makefile_star2_O1/lh3[P]minimap2/format.c
// Function: mm_gen_cs_or_MD
int mm_gen_cs_or_MD(void *km, char **buf, int *max_len, const mm_idx_t *mi, const mm_reg1_t *r, const char *seq, int is_MD, int no_iden, int is_qstrand)
{
	mm_bseq1_t t;
	kstring_t str;
	str.s = *buf, str.l = 0, str.m = *max_len;
	t.l_seq = strlen(seq);
	t.seq = (char*)seq;
	write_cs_ds_or_MD(km, &str, mi, &t, r, no_iden, is_MD, 0, 0, is_qstrand);
	*max_len = str.m;
	*buf = str.s;
	return str.l;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r9, %r12
movq %r8, (%rsp)
movq %rcx, %rbp
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r13
movq (%rsi), %rax
leaq 0x8(%rsp), %r15
movq %rax, 0x10(%r15)
movq $0x0, (%r15)
movslq (%rdx), %rax
movq %rax, 0x8(%r15)
movq %r9, %rdi
callq 0x2130
leaq 0x20(%rsp), %rcx
movl %eax, (%rcx)
movq %r12, 0x10(%rcx)
xorl %eax, %eax
movq %r13, %rdi
movq %r15, %rsi
movq %rbp, %rdx
movq (%rsp), %r8
movl 0x88(%rsp), %r9d
movl 0x90(%rsp), %r10d
pushq %r10
pushq %rax
pushq %rax
movl 0x98(%rsp), %eax
pushq %rax
callq 0xef18
addq $0x20, %rsp
movl 0x8(%r15), %eax
movl %eax, (%r14)
movq 0x10(%r15), %rax
movq %rax, (%rbx)
movl (%r15), %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/lh3[P]minimap2/format.c
// Function: sam_write_sq
static void sam_write_sq(kstring_t *s, char *seq, int l, int rev, int comp)
{
	extern unsigned char seq_comp_table[256];
	if (rev) {
		int i;
		str_enlarge(s, l);
		for (i = 0; i < l; ++i) {
			int c = seq[l - 1 - i];
			s->s[s->l + i] = c < 128 && comp? seq_comp_table[c] : c;
		}
		s->l += l;
	} else str_copy(s, seq, seq + l);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %r12d
movq %rsi, %r15
movq %rdi, %rbx
movq 0x8(%rdi), %rax
testl %ecx, %ecx
je 0x10bb5
movl %r8d, %ebp
movq (%rbx), %rcx
movslq %r12d, %r14
leaq (%rcx,%r14), %rdx
incq %rdx
cmpq %rax, %rdx
jbe 0x10b72
addq %r14, %rcx
movq %rcx, %rax
shrq %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x2, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x4, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x8, %rcx
orq %rax, %rcx
movq %rcx, %rsi
shrq $0x10, %rsi
orq %rcx, %rsi
incq %rsi
movq %rsi, 0x8(%rbx)
movq 0x10(%rbx), %rdi
callq 0x2320
movq %rax, 0x10(%rbx)
testl %r12d, %r12d
jle 0x10c21
movl %r12d, %eax
leaq (%rax,%r15), %rcx
decq %rcx
xorl %edx, %edx
leaq 0x24b82(%rip), %rsi     # 0x35710
movb (%rcx), %dil
testl %ebp, %ebp
je 0x10b9d
movsbq %dil, %rdi
movb (%rsi,%rdi), %dil
movq 0x10(%rbx), %r8
addq (%rbx), %r8
movb %dil, (%rdx,%r8)
incq %rdx
decq %rcx
cmpq %rdx, %rax
jne 0x10b8e
jmp 0x10c21
movslq %r12d, %r14
movq (%rbx), %rcx
leaq (%rcx,%r14), %rdx
incq %rdx
cmpq %rax, %rdx
jbe 0x10c0f
addq %r14, %rcx
movq %rcx, %rax
shrq %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x2, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x4, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x8, %rcx
orq %rax, %rcx
movq %rcx, %rsi
shrq $0x10, %rsi
orq %rcx, %rsi
incq %rsi
movq %rsi, 0x8(%rbx)
movq 0x10(%rbx), %rdi
callq 0x2320
movq %rax, 0x10(%rbx)
movq 0x10(%rbx), %rdi
addq (%rbx), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x22a0
addq %r14, (%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/lh3[P]minimap2/format.c
// Function: write_indel_ds
static void write_indel_ds(kstring_t *str, int64_t len, const uint8_t *seq, int64_t ll, int64_t lr) // write an indel to ds; adapted from minigraph
{
	int64_t i;
	if (ll + lr >= len) {
		mm_sprintf_lite(str, "[");
		for (i = 0; i < len; ++i)
			mm_sprintf_lite(str, "%c", "acgtn"[seq[i]]);
		mm_sprintf_lite(str, "]");
	} else {
		int64_t k = 0;
		if (ll > 0) {
			mm_sprintf_lite(str, "[");
			for (i = 0; i < ll; ++i)
				mm_sprintf_lite(str, "%c", "acgtn"[seq[k+i]]);
			mm_sprintf_lite(str, "]");
			k += ll;
		}
		for (i = 0; i < len - lr - ll; ++i)
			mm_sprintf_lite(str, "%c", "acgtn"[seq[k+i]]);
		k += len - lr - ll;
		if (lr > 0) {
			mm_sprintf_lite(str, "[");
			for (i = 0; i < lr; ++i)
				mm_sprintf_lite(str, "%c", "acgtn"[seq[k+i]]);
			mm_sprintf_lite(str, "]");
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r14
movq %rdi, %rbx
leaq (%r8,%rcx), %rax
movq %rsi, %r12
subq %rax, %r12
jle 0x10d4c
movq %rcx, %rbp
testq %rcx, %rcx
movq %r8, 0x10(%rsp)
jle 0x10d9d
movq %r12, 0x8(%rsp)
leaq 0x1c113(%rip), %rsi     # 0x2ce09
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe671
leaq 0x1c0e6(%rip), %r15     # 0x2cded
leaq 0x1bd67(%rip), %r13     # 0x2ca75
xorl %r12d, %r12d
movzbl (%r14,%r12), %eax
movsbl (%rax,%r15), %edx
movq %rbx, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0xe671
incq %r12
cmpq %r12, %rbp
jne 0x10d11
movq %rbp, (%rsp)
leaq 0x1c0d0(%rip), %rsi     # 0x2ce0b
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe671
movq 0x8(%rsp), %r12
jmp 0x10da5
movq %rsi, %r13
leaq 0x1c0b3(%rip), %rsi     # 0x2ce09
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe671
testq %r13, %r13
jle 0x10e32
leaq 0x1c07d(%rip), %r12     # 0x2cded
leaq 0x1bcfe(%rip), %r15     # 0x2ca75
xorl %ebp, %ebp
movzbl (%r14,%rbp), %eax
movsbl (%rax,%r12), %edx
movq %rbx, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0xe671
incq %rbp
cmpq %rbp, %r13
jne 0x10d79
jmp 0x10e32
movq $0x0, (%rsp)
testq %r12, %r12
jle 0x10de0
movq (%rsp), %rax
leaq (%r14,%rax), %r15
leaq 0x1bcbc(%rip), %r13     # 0x2ca75
xorl %ebp, %ebp
movzbl (%r15,%rbp), %eax
leaq 0x1c026(%rip), %rdx     # 0x2cded
movsbl (%rax,%rdx), %edx
movq %rbx, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0xe671
incq %rbp
cmpq %rbp, %r12
jne 0x10dbb
movq 0x10(%rsp), %rbp
testq %rbp, %rbp
jle 0x10e51
leaq 0x1c018(%rip), %rsi     # 0x2ce09
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe671
addq (%rsp), %r14
addq %r12, %r14
leaq 0x1bfe4(%rip), %r15     # 0x2cded
leaq 0x1bc65(%rip), %r12     # 0x2ca75
xorl %r13d, %r13d
movzbl (%r14,%r13), %eax
movsbl (%rax,%r15), %edx
movq %rbx, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0xe671
incq %r13
cmpq %r13, %rbp
jne 0x10e13
leaq 0x1bfd2(%rip), %rsi     # 0x2ce0b
movq %rbx, %rdi
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xe671
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/lh3[P]minimap2/pe.c
// Function: mm_set_pe_thru
void mm_set_pe_thru(const int *qlens, int *n_regs, mm_reg1_t **regs)
{
	int s, i, n_pri[2], pri[2];
	n_pri[0] = n_pri[1] = 0;
	pri[0] = pri[1] = -1;
	for (s = 0; s < 2; ++s)
		for (i = 0; i < n_regs[s]; ++i)
			if (regs[s][i].id == regs[s][i].parent)
				++n_pri[s], pri[s] = i;
	if (n_pri[0] == 1 && n_pri[1] == 1) {
		mm_reg1_t *p = &regs[0][pri[0]];
		mm_reg1_t *q = &regs[1][pri[1]];
		if (p->rid == q->rid && p->rev == q->rev && abs(p->rs - q->rs) < 3 && abs(p->re - q->re) < 3
			&& ((p->qs == 0 && qlens[1] - q->qe == 0) || (q->qs == 0 && qlens[0] - p->qe == 0)))
		{
			p->pe_thru = q->pe_thru = 1;
		}
	}
}

// Assembly:
movq $0x0, -0x8(%rsp)
movq $-0x1, -0x10(%rsp)
xorl %eax, %eax
movslq (%rsi,%rax,4), %rcx
testq %rcx, %rcx
jle 0x110a8
movq (%rdx,%rax,8), %r8
addq $0x20, %r8
xorl %r9d, %r9d
movl -0x20(%r8), %r10d
cmpl (%r8), %r10d
jne 0x1109c
incl -0x8(%rsp,%rax,4)
movl %r9d, -0x10(%rsp,%rax,4)
incq %r9
addq $0x50, %r8
cmpq %r9, %rcx
jne 0x1108a
leaq 0x1(%rax), %rcx
testq %rax, %rax
movq %rcx, %rax
je 0x11076
cmpl $0x1, -0x8(%rsp)
jne 0x1115f
cmpl $0x1, -0x4(%rsp)
jne 0x1115f
movslq -0x10(%rsp), %rax
leaq (%rax,%rax,4), %rsi
shlq $0x4, %rsi
movq (%rdx), %rax
movq 0x8(%rdx), %rcx
movslq -0xc(%rsp), %rdx
leaq (%rdx,%rdx,4), %rdx
shlq $0x4, %rdx
movl 0x8(%rax,%rsi), %r8d
cmpl 0x8(%rcx,%rdx), %r8d
jne 0x1115f
addq %rsi, %rax
addq %rdx, %rcx
movl 0x3c(%rcx), %edx
movl 0x3c(%rax), %esi
xorl %edx, %esi
btl $0xa, %esi
jb 0x1115f
movl 0x18(%rax), %esi
subl 0x18(%rcx), %esi
movl %esi, %r8d
negl %r8d
cmovsl %esi, %r8d
cmpl $0x2, %r8d
ja 0x1115f
movl 0x1c(%rax), %esi
subl 0x1c(%rcx), %esi
movl %esi, %r8d
negl %r8d
cmovsl %esi, %r8d
cmpl $0x2, %r8d
ja 0x1115f
cmpl $0x0, 0x10(%rax)
jne 0x11145
movl 0x4(%rdi), %esi
cmpl 0x14(%rcx), %esi
je 0x11152
cmpl $0x0, 0x10(%rcx)
jne 0x1115f
movl (%rdi), %esi
cmpl 0x14(%rax), %esi
jne 0x1115f
orl $0x4000, %edx           # imm = 0x4000
movl %edx, 0x3c(%rcx)
orb $0x40, 0x3d(%rax)
retq
// File: /workspace/github_c_makefile_star2_O1/lh3[P]minimap2/splitidx.c
// Function: mm_split_init
FILE *mm_split_init(const char *prefix, const mm_idx_t *mi)
{
	char *fn;
	FILE *fp;
	uint32_t i, k = mi->k;
	fn = (char*)calloc(strlen(prefix) + 10, 1);
	sprintf(fn, "%s.%.4d.tmp", prefix, mi->index);
	if ((fp = fopen(fn, "wb")) == NULL) {
		if (mm_verbose >= 1)
			fprintf(stderr, "[ERROR]\033[1;31m failed to write to temporary file '%s'\033[0m: %s\n", fn, strerror(errno));
		exit(1);
	}
	mm_err_fwrite(&k, 4, 1, fp);
	mm_err_fwrite(&mi->n_seq, 4, 1, fp);
	for (i = 0; i < mi->n_seq; ++i) {
		uint32_t l;
		l = strlen(mi->seq[i].name);
		mm_err_fwrite(&l, 1, 4, fp);
		mm_err_fwrite(mi->seq[i].name, 1, l, fp);
		mm_err_fwrite(&mi->seq[i].len, 4, 1, fp);
	}
	free(fn);
	return fp;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r15
movl 0x8(%rsi), %eax
movl %eax, 0x4(%rsp)
callq 0x2130
leaq 0xa(%rax), %rdi
movl $0x1, %esi
callq 0x2230
movq %rax, %r14
movl 0x14(%rbx), %ecx
leaq 0x1b22f(%rip), %rsi     # 0x2cfdf
movq %rax, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x23d0
leaq 0x185e9(%rip), %rsi     # 0x2a3ad
movq %r14, %rdi
callq 0x2390
testq %rax, %rax
je 0x11e97
movq %rax, %r15
leaq 0x4(%rsp), %rdi
movl $0x4, %esi
movl $0x1, %edx
movq %rax, %rcx
callq 0x58ae
leaq 0x10(%rbx), %rdi
movl $0x4, %esi
movl $0x1, %edx
movq %r15, %rcx
callq 0x58ae
cmpl $0x0, 0x10(%rbx)
je 0x11e7d
movl $0x10, %r13d
xorl %ebp, %ebp
movq %rsp, %r12
movq 0x20(%rbx), %rax
movq -0x10(%rax,%r13), %rdi
callq 0x2130
movl %eax, (%rsp)
movl $0x1, %esi
movl $0x4, %edx
movq %r12, %rdi
movq %r15, %rcx
callq 0x58ae
movq 0x20(%rbx), %rax
movq -0x10(%rax,%r13), %rdi
movl (%rsp), %edx
movl $0x1, %esi
movq %r15, %rcx
callq 0x58ae
movq 0x20(%rbx), %rdi
addq %r13, %rdi
movl $0x4, %esi
movl $0x1, %edx
movq %r15, %rcx
callq 0x58ae
incq %rbp
movl 0x10(%rbx), %eax
addq $0x18, %r13
cmpq %rax, %rbp
jb 0x11e16
movq %r14, %rdi
callq 0x2040
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x23862(%rip), %rax     # 0x35700
cmpl $0x0, (%rax)
jle 0x11eab
movq %r14, %rdi
callq 0x30c9
movl $0x1, %edi
callq 0x23e0
// File: /workspace/github_c_makefile_star2_O1/lh3[P]minimap2/splitidx.c
// Function: mm_split_rm_tmp
void mm_split_rm_tmp(const char *prefix, int n_splits)
{
	int i;
	char *fn;
	fn = CALLOC(char, strlen(prefix) + 10);
	for (i = 0; i < n_splits; ++i) {
		sprintf(fn, "%s.%.4d.tmp", prefix, i);
		remove(fn);
	}
	free(fn);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
callq 0x2130
leaq 0xa(%rax), %rdi
movl $0x1, %esi
callq 0x2230
movq %rax, %r15
testl %ebx, %ebx
jle 0x12128
leaq 0x1aed9(%rip), %r12     # 0x2cfdf
xorl %ebp, %ebp
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
movl %ebp, %ecx
xorl %eax, %eax
callq 0x23d0
movq %r15, %rdi
callq 0x2070
incl %ebp
cmpl %ebp, %ebx
jne 0x12108
movq %r15, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2040
// File: /workspace/github_c_makefile_star2_O1/lh3[P]minimap2/bseq.c
// Function: mm_bseq_open
mm_bseq_file_t *mm_bseq_open(const char *fn)
{
	mm_bseq_file_t *fp;
	gzFile f;
	f = fn && strcmp(fn, "-")? gzopen(fn, "r") : gzdopen(0, "r");
	if (f == 0) return 0;
	fp = (mm_bseq_file_t*)calloc(1, sizeof(mm_bseq_file_t));
	fp->fp = f;
	fp->ks = kseq_init(fp->fp);
	return fp;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x130b1
movq %rdi, %rbx
leaq 0x196f3(%rip), %rsi     # 0x2c78a
callq 0x2240
testl %eax, %eax
je 0x130b1
leaq 0x18bb4(%rip), %rsi     # 0x2bc5b
movq %rbx, %rdi
callq 0x2350
jmp 0x130bf
leaq 0x18ba3(%rip), %rsi     # 0x2bc5b
xorl %edi, %edi
callq 0x20f0
movq %rax, %rbx
testq %rax, %rax
je 0x130ea
movl $0x1, %edi
movl $0x38, %esi
callq 0x2230
movq %rax, %r14
movq %rbx, (%rax)
movq %rbx, %rdi
callq 0x12cab
movq %rax, 0x8(%r14)
jmp 0x130ed
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/lh3[P]minimap2/bseq.c
// Function: mm_bseq_read_frag2
mm_bseq1_t *mm_bseq_read_frag2(int n_fp, mm_bseq_file_t **fp, int64_t chunk_size, int with_qual, int with_comment, int *n_)
{
	int i;
	int64_t size = 0;
	kvec_t(mm_bseq1_t) a = {0,0,0};
	*n_ = 0;
	if (n_fp < 1) return 0;
	while (1) {
		int n_read = 0;
		for (i = 0; i < n_fp; ++i)
			if (kseq_read(fp[i]->ks) >= 0)
				++n_read;
		if (n_read < n_fp) {
			if (n_read > 0)
				fprintf(stderr, "[W::%s]\033[1;31m query files have different number of records; extra records skipped.\033[0m\n", __func__);
			break; // some file reaches the end
		}
		if (a.m == 0) kv_resize(mm_bseq1_t, 0, a, 256);
		for (i = 0; i < n_fp; ++i) {
			mm_bseq1_t *s;
			kv_pushp(mm_bseq1_t, 0, a, &s);
			kseq2bseq(fp[i]->ks, s, with_qual, with_comment);
			size += s->l_seq;
		}
		if (size >= chunk_size) break;
	}
	*n_ = a.n;
	return a.a;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %r8d, 0x1c(%rsp)
movl %ecx, 0x18(%rsp)
movq %rdx, 0x30(%rsp)
movq %rsi, 0x20(%rsp)
movl $0x0, (%r9)
testl %edi, %edi
jle 0x1372b
movq %r9, 0x28(%rsp)
movl %edi, 0x14(%rsp)
movl %edi, %ecx
xorl %r13d, %r13d
movq $0x0, 0x8(%rsp)
xorl %r15d, %r15d
xorl %esi, %esi
movq %rsi, (%rsp)
xorl %r12d, %r12d
xorl %ebp, %ebp
movq 0x20(%rsp), %rax
movq (%rax,%r12,8), %rax
movq 0x8(%rax), %rdi
movq %rcx, %rbx
callq 0x12d45
movq %rbx, %rcx
notl %eax
shrl $0x1f, %eax
addl %eax, %ebp
incq %r12
cmpq %r12, %rbx
jne 0x1360e
cmpl 0x14(%rsp), %ebp
jge 0x1364e
testl %ebp, %ebp
jne 0x13710
xorl %eax, %eax
movq (%rsp), %rsi
jmp 0x13706
testq %r15, %r15
je 0x13659
movq (%rsp), %rsi
jmp 0x13672
movl $0x2800, %edx           # imm = 0x2800
xorl %edi, %edi
movq (%rsp), %rsi
callq 0x127ec
movq %rax, %rsi
movl $0x100, %r15d           # imm = 0x100
movq 0x8(%rsp), %rax
leaq (,%rax,8), %rax
leaq (%rax,%rax,4), %r12
xorl %ebp, %ebp
movq 0x8(%rsp), %rax
addq %rbp, %rax
cmpq %r15, %rax
jne 0x136ba
leaq (%r15,%r15), %r14
testq %r15, %r15
movl $0x2, %eax
cmoveq %rax, %r14
leaq (,%r14,8), %rax
leaq (%rax,%rax,4), %rdx
xorl %edi, %edi
callq 0x127ec
movq %rax, %rsi
jmp 0x136bd
movq %r15, %r14
movq %rsi, %r15
addq %r12, %rsi
movq 0x20(%rsp), %rax
movq (%rax,%rbp,8), %rax
movq 0x8(%rax), %rdi
movl 0x18(%rsp), %edx
movl 0x1c(%rsp), %ecx
callq 0x13482
movq %r15, %rsi
movslq (%r15,%r12), %rax
addq %rax, %r13
incq %rbp
addq $0x28, %r12
cmpq %rbp, %rbx
movq %r14, %r15
jne 0x13685
movq %rbx, %rcx
cmpq 0x30(%rsp), %r13
setl %al
addq %rbp, 0x8(%rsp)
testb %al, %al
jne 0x13605
jmp 0x1371d
callq 0x324e
movq %rbx, %rcx
jmp 0x13643
movq 0x28(%rsp), %rax
movq 0x8(%rsp), %rcx
movl %ecx, (%rax)
jmp 0x1372d
xorl %esi, %esi
movq %rsi, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/lh3[P]minimap2/sdust.c
// Function: sdust_buf_init
sdust_buf_t *sdust_buf_init(void *km)
{
	sdust_buf_t *buf;
	buf = (sdust_buf_t*)kcalloc(km, 1, sizeof(sdust_buf_t));
	buf->km = km;
	buf->w = kdq_init(int, buf->km);
	kdq_resize(int, buf->w, 8);
	return buf;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
movl $0x40, %edx
callq 0x1257c
movq %rax, %r14
movq %rbx, 0x38(%rax)
movl $0x1, %esi
movl $0x28, %edx
movq %rbx, %rdi
callq 0x1257c
movq %rax, %r15
movabsq $0x3ffffffffffffff, %rax # imm = 0x3FFFFFFFFFFFFFF
andq (%r15), %rax
btsq $0x3b, %rax
movq %rax, (%r15)
movq $0x3, 0x10(%r15)
movl $0x10, %esi
movq %rbx, %rdi
callq 0x126e9
movq %rax, 0x18(%r15)
movq %rbx, 0x20(%r15)
movq %r15, (%r14)
movq %r15, %rdi
movl $0x8, %esi
callq 0x1411a
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/lh3[P]minimap2/sdust.c
// Function: sdust
uint64_t *sdust(void *km, const uint8_t *seq, int l_seq, int T, int W, int *n)
{
	uint64_t *ret;
	sdust_buf_t *buf;
	buf = sdust_buf_init(km);
	ret = (uint64_t*)sdust_core(seq, l_seq, T, W, n, buf);
	buf->res.a = 0;
	sdust_buf_destroy(buf);
	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbx
movl %r8d, %ebp
movl %ecx, %r14d
movl %edx, %r15d
movq %rsi, %r12
callq 0x1409c
movq %rax, %r13
movq %r12, %rdi
movl %r15d, %esi
movl %r14d, %edx
movl %ebp, %ecx
movq %rbx, %r8
movq %rax, %r9
callq 0x142b4
movq %rax, %rbx
movq $0x0, 0x30(%r13)
movq %r13, %rdi
callq 0x14259
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/lh3[P]minimap2/align.c
// Function: mm_enlarge_cigar
void mm_enlarge_cigar(mm_reg1_t *r, uint32_t n_cigar) // TODO: this calls the libc realloc()
{
	if (n_cigar == 0) return;
	if (r->p == 0) {
		uint32_t capacity = n_cigar + sizeof(mm_extra_t)/4;
		kroundup32(capacity);
		r->p = (mm_extra_t*)calloc(capacity, 4);
		r->p->capacity = capacity;
	} else if (r->p->n_cigar + n_cigar + sizeof(mm_extra_t)/4 > r->p->capacity) {
		r->p->capacity = r->p->n_cigar + n_cigar + sizeof(mm_extra_t)/4;
		kroundup32(r->p->capacity);
		r->p = (mm_extra_t*)realloc(r->p, r->p->capacity * 4);
	}
}

// Assembly:
testl %esi, %esi
je 0x171b7
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x48(%rdi), %rdi
testq %rdi, %rdi
je 0x17171
addl 0x18(%rdi), %esi
addq $0x7, %rsi
movl (%rdi), %eax
cmpq %rax, %rsi
jbe 0x171b0
decl %esi
movl %esi, %eax
shrl %eax
orl %esi, %eax
movl %eax, %ecx
shrl $0x2, %ecx
orl %eax, %ecx
movl %ecx, %eax
shrl $0x4, %eax
orl %ecx, %eax
movl %eax, %ecx
shrl $0x8, %ecx
orl %eax, %ecx
movl %ecx, %eax
shrl $0x10, %eax
orl %ecx, %eax
leal 0x1(%rax), %ecx
movl %ecx, (%rdi)
leal 0x4(,%rax,4), %esi
callq 0x2320
movq %rax, 0x48(%rbx)
jmp 0x171b0
addl $0x6, %esi
movl %esi, %eax
shrl %eax
orl %esi, %eax
movl %eax, %ecx
shrl $0x2, %ecx
orl %eax, %ecx
movl %ecx, %eax
shrl $0x4, %eax
orl %ecx, %eax
movl %eax, %ecx
shrl $0x8, %ecx
orl %eax, %ecx
movl %ecx, %r14d
shrl $0x10, %r14d
orl %ecx, %r14d
incl %r14d
movl $0x4, %esi
movq %r14, %rdi
callq 0x2230
movq %rax, 0x48(%rbx)
movl %r14d, (%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/lh3[P]minimap2/align.c
// Function: mm_event_identity
double mm_event_identity(const mm_reg1_t *r)
{
	int32_t n_gap, n_gapo;
	if (r->p == 0) return -1.0f;
	mm_count_gaps(r, &n_gap, &n_gapo);
	return (double)r->mlen / (r->blen + r->p->n_ambi - n_gap + n_gapo);
}

// Assembly:
movq 0x48(%rdi), %rax
testq %rax, %rax
je 0x17201
movl 0x18(%rax), %edx
testq %rdx, %rdx
je 0x1720a
xorl %esi, %esi
xorl %r9d, %r9d
xorl %ecx, %ecx
xorl %r8d, %r8d
movl 0x1c(%rax,%r9,4), %r10d
movl %r10d, %r11d
andl $0xf, %r11d
decl %r11d
shrl $0x4, %r10d
cmpl $0x2, %r11d
cmovael %esi, %r10d
adcl $0x0, %ecx
addl %r10d, %r8d
incq %r9
cmpq %r9, %rdx
jne 0x171d3
subl %r8d, %ecx
jmp 0x1720c
movsd 0x1636f(%rip), %xmm0    # 0x2d578
retq
xorl %ecx, %ecx
cvtsi2sdl 0x2c(%rdi), %xmm0
movl $0x3fffffff, %edx       # imm = 0x3FFFFFFF
andl 0x14(%rax), %edx
addl 0x30(%rdi), %ecx
addl %edx, %ecx
cvtsi2sd %ecx, %xmm1
divsd %xmm1, %xmm0
retq
// File: /workspace/github_c_makefile_star2_O1/lh3[P]minimap2/align.c
// Function: ksw_gen_ts_mat
static void ksw_gen_simple_mat(int m, int8_t *mat, int8_t a, int8_t b, int8_t sc_ambi)
{
	int i, j;
	a = a < 0? -a : a;
	b = b > 0? -b : b;
	sc_ambi = sc_ambi > 0? -sc_ambi : sc_ambi;
	for (i = 0; i < m - 1; ++i) {
		for (j = 0; j < m - 1; ++j)
			mat[i * m + j] = i == j? a : b;
		mat[i * m + m - 1] = sc_ambi;
	}
	for (j = 0; j < m; ++j)
		mat[(m - 1) * m + j] = sc_ambi;
}

// Assembly:
pushq %rbp
pushq %rbx
movl %esi, %eax
sarb $0x7, %al
xorb %al, %sil
subb %al, %sil
movl %edx, %r9d
sarb $0x7, %r9b
movl %edx, %eax
xorb %r9b, %al
subb %al, %r9b
movl %r8d, %eax
sarb $0x7, %al
xorb %al, %r8b
subb %r8b, %al
xorl %r8d, %r8d
movzbl %sil, %esi
movzbl %r9b, %r9d
movq %rdi, %r10
leaq (%r8,%r8,4), %r11
xorl %ebx, %ebx
cmpq %rbx, %r8
movl %r9d, %ebp
cmovel %esi, %ebp
movb %bpl, (%r10,%rbx)
incq %rbx
cmpq $0x4, %rbx
jne 0x1a979
movb %al, 0x4(%rdi,%r11)
incq %r8
addq $0x5, %r10
cmpq $0x4, %r8
jne 0x1a973
movzbl %al, %eax
imull $0x1010101, %eax, %eax  # imm = 0x1010101
movl %eax, 0x14(%rdi)
movb %al, 0x18(%rdi)
testb %cl, %cl
sete %al
cmpb %dl, %cl
sete %dl
orb %al, %dl
jne 0x1a9d3
movl %ecx, %eax
sarb $0x7, %al
xorb %al, %cl
subb %cl, %al
movb %al, 0x2(%rdi)
movb %al, 0x8(%rdi)
movb %al, 0xa(%rdi)
movb %al, 0x10(%rdi)
popq %rbx
popq %rbp
retq