// File: /workspace/github_c_makefile_star2_O1/lh3[P]minigraph/asm-call.c
// Function: mg_call_asm
void mg_call_asm(const gfa_t *g, int32_t n_seq, const mg_bseq1_t *seq, mg_gchains_t *const *gcs, int32_t min_mapq, int32_t min_blen)
{
	int32_t i, j, t, max_acnt, *soff, *qoff, n_bb, m_ovlp = 0, *ovlp = 0;
	mg_intv_t *sintv, *qintv;
	double a_dens;
	gfa_bubble_t *bb;
	callaux_t *ca;
	bbaux_t *ba;
	kstring_t out = {0,0,0};

	max_acnt = mg_gc_index(0, min_mapq, min_blen>>1, min_blen, g, n_seq, gcs, &a_dens, &soff, &qoff, &sintv, &qintv);
	if (max_acnt == 0) return;

	bb = gfa_bubble(g, &n_bb);
	GFA_CALLOC(ba, n_bb);
	GFA_CALLOC(ca, g->n_seg);
	for (i = 0; i < n_bb; ++i) {
		gfa_bubble_t *b = &bb[i];
		assert(b->n_seg >= 2);
		for (j = 0; j < b->n_seg; ++j)
			ca[b->v[j]>>1].bid = i;
		ca[b->v[0]>>1].is_stem = ca[b->v[b->n_seg-1]>>1].is_stem = 1;
		ca[b->v[0]>>1].is_src = 1;
		ba[i].t = -1;
	}

	for (t = 0; t < n_seq; ++t) {
		const mg_gchains_t *gt = gcs[t];
		for (i = 0; i < gt->n_gc; ++i) {
			const mg_gchain_t *gc = &gt->gc[i];
			int32_t st = -1;
			for (j = 1; j < gc->cnt; ++j) {
				const mg_llchain_t *lc = &gt->lc[gc->off + j];
				if (!ca[lc->v>>1].is_stem && ca[(lc-1)->v>>1].is_stem) {
					st = gc->off + j;
				} else if ((ca[lc->v>>1].is_stem && !ca[(lc-1)->v>>1].is_stem && st > 0) || (ca[lc->v>>1].is_stem && ca[(lc-1)->v>>1].is_stem)) {
					int32_t n_ovlp, k, en = gc->off + j, qs, qe, span, bid, strand, glen;
					bbaux_t *p;

					// determine the source and sink nodes
					if (ca[lc->v>>1].is_stem && ca[(lc-1)->v>>1].is_stem) { // two adjacent stems: this is a deletion
						st = gc->off + j;
					} else {
						assert(en > st);
					}

					// test overlap on the query
					span = gt->a[gt->lc[st].off].y >> 32 & 0xff;
					qs = (int32_t)gt->a[gt->lc[st - 1].off + gt->lc[st - 1].cnt - 1].y + 1; // NB: it is fine even if .cnt==0
					qe = (int32_t)gt->a[gt->lc[en].off].y + 1 - span;
					n_ovlp = mg_intv_overlap(0, qoff[t+1] - qoff[t], &qintv[qoff[t]], qs, qe, &ovlp, &m_ovlp);
					if (n_ovlp > 1) continue; // overlap on the query - not orthologous

					// test overlap on the graph
					for (k = st, glen = 0; k < en; ++k) {
						const mg_llchain_t *lk = &gt->lc[k];
						int32_t seg = lk->v>>1;
						n_ovlp = mg_intv_overlap(0, soff[seg+1] - soff[seg], &sintv[soff[seg]], 0, g->seg[seg].len, &ovlp, &m_ovlp);
						glen += g->seg[seg].len;
						if (n_ovlp > 1) break; // overlap on the graph - not orthoologous
					}
					if (k < en) continue;

					// determine the bubble ID
					assert(ca[gt->lc[st-1].v>>1].is_stem && ca[gt->lc[en].v>>1].is_stem);
					if (ca[gt->lc[st-1].v>>1].bid < ca[gt->lc[en].v>>1].bid)
						strand = 1;
					else if (ca[gt->lc[st-1].v>>1].bid > ca[gt->lc[en].v>>1].bid)
						strand = -1;
					else {
						if (ca[gt->lc[st-1].v>>1].is_src + ca[gt->lc[en].v>>1].is_src != 1) {
							fprintf(stderr, "[W::%s] type-1 folded inversion alignment around %c%s <=> %s:%d-%d\n",
									__func__, "><"[gt->lc[st].v&1], g->seg[gt->lc[st].v>>1].name, seq[t].name, qs, qe);
							continue;
						}
						if (ca[gt->lc[st-1].v>>1].is_src) strand = 1;
						else strand = -1;
					}
					bid = strand > 0? ca[gt->lc[st-1].v>>1].bid : ca[gt->lc[en].v>>1].bid;

					// attach the bubble
					for (k = st; k < en; ++k) // check consistency
						if (ca[gt->lc[k].v>>1].bid != bid)
							break;
					if (k != en) { // this may happen around an inversion towards the end of an alignment chain
						fprintf(stderr, "[W::%s] type-2 folded inversion alignment around %c%s <=> %s:%d-%d\n",
								__func__, "><"[gt->lc[st].v&1], g->seg[gt->lc[st].v>>1].name, seq[t].name, qs, qe);
						continue;
					}
					p = &ba[bid];
					p->t = t, p->i = i, p->st = st, p->en = en, p->strand = strand, p->qs = qs, p->qe = qe, p->glen = glen;
				}
			}
		}
	}

	for (i = 0; i < n_bb; ++i) {
		gfa_bubble_t *b = &bb[i];
		bbaux_t *a = &ba[i];
		const mg_gchains_t *gt = gcs[a->t];
		out.l = 0;
		mg_sprintf_lite(&out, "%s\t%d\t%d\t%c%s\t%c%s\t", g->sseq[b->snid].name, b->ss, b->se, "><"[b->v[0]&1], g->seg[b->v[0]>>1].name,
						"><"[b->v[b->n_seg-1]&1], g->seg[b->v[b->n_seg-1]>>1].name);
		if (a->t >= 0) {
			assert(a->strand != 0);
			if (a->st == a->en) {
				mg_sprintf_lite(&out, "*");
			} else if (a->strand > 0) {
				for (j = a->st; j < a->en; ++j)
					mg_sprintf_lite(&out, "%c%s", "><"[gt->lc[j].v&1], g->seg[gt->lc[j].v>>1].name);
			} else {
				for (j = a->en - 1; j >= a->st; --j)
					mg_sprintf_lite(&out, "%c%s", "<>"[gt->lc[j].v&1], g->seg[gt->lc[j].v>>1].name);
			}
			mg_sprintf_lite(&out, ":%d:%c:%s:%d:%d", a->glen, a->strand > 0? '+' : '-', seq[a->t].name, a->qs, a->qe);
		} else {
			mg_sprintf_lite(&out, ".");
		}
		puts(out.s);
	}

	free(ba); free(ca);
	free(soff); free(qoff); free(sintv); free(qintv);
	for (i = 0; i < n_bb; ++i) free(bb[i].v);
	free(bb);
	free(out.s);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rcx, %r12
movq %rdx, 0x90(%rsp)
movl %esi, %ebx
movq %rdi, %r13
movl $0x0, 0x54(%rsp)
movq $0x0, 0xd0(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movl %r9d, %edx
sarl %edx
leaq 0xc0(%rsp), %rax
leaq 0xc8(%rsp), %r10
leaq 0xd8(%rsp), %r11
leaq 0xe0(%rsp), %r14
leaq 0x100(%rsp), %r15
xorl %edi, %edi
movl %r8d, %esi
movl %r9d, %ecx
movq %r13, %r8
movl %ebx, %r9d
pushq %rax
pushq %r10
pushq %r11
pushq %r14
pushq %r15
movq %r12, 0xc0(%rsp)
pushq %r12
callq 0x2197c
addq $0x30, %rsp
testl %eax, %eax
je 0x25b08
leaq 0xc(%rsp), %r14
movq %r13, %rdi
movq %r14, %rsi
callq 0xabac
movq %rax, 0x58(%rsp)
movslq (%r14), %r14
movl $0x20, %esi
movq %r14, %rdi
callq 0x21e0
movq %rax, 0x40(%rsp)
movq %r13, 0x10(%rsp)
movl 0x4(%r13), %edi
movl $0x8, %esi
callq 0x21e0
movq %rax, %r15
testq %r14, %r14
jle 0x252a4
xorl %eax, %eax
leaq (%rax,%rax,8), %rdx
movq 0x58(%rsp), %rsi
movslq 0x18(%rsi,%rdx,8), %rcx
cmpq $0x2, %rcx
jl 0x25b58
leaq (%rsi,%rdx,8), %rdx
movq 0x28(%rdx), %rsi
xorl %edi, %edi
movl (%rsi,%rdi,4), %r8d
shrl %r8d
movl %eax, (%r15,%r8,8)
incq %rdi
cmpq %rdi, %rcx
jne 0x25251
movq 0x28(%rdx), %rdx
movl -0x4(%rdx,%rcx,4), %ecx
shrl %ecx
movb 0x4(%r15,%rcx,8), %sil
andb $-0x10, %sil
incb %sil
movb %sil, 0x4(%r15,%rcx,8)
movl (%rdx), %ecx
shrl %ecx
movb $0x11, 0x4(%r15,%rcx,8)
movq %rax, %rcx
shlq $0x5, %rcx
movq 0x40(%rsp), %rdx
movl $0xffffffff, (%rdx,%rcx) # imm = 0xFFFFFFFF
incq %rax
cmpq %r14, %rax
jne 0x2522f
testl %ebx, %ebx
movq %r15, 0x70(%rsp)
jle 0x257f5
movl %ebx, %eax
movq %rax, 0xe8(%rsp)
xorl %ebx, %ebx
movq 0x98(%rsp), %rax
movq (%rax,%rbx,8), %r12
cmpl $0x0, 0x8(%r12)
jle 0x257e4
leaq (%rbx,%rbx,4), %rax
movq 0x90(%rsp), %rcx
leaq (%rcx,%rax,8), %rax
addq $0x8, %rax
movq %rax, 0xa0(%rsp)
xorl %ecx, %ecx
movq %rbx, 0xa8(%rsp)
movq 0x18(%r12), %r14
movq %rcx, 0xb0(%rsp)
imulq $0x68, %rcx, %rax
cmpl $0x2, 0xc(%r14,%rax)
jl 0x257cb
addq %rax, %r14
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
movl $0x1, %ebp
movq %r14, 0xb8(%rsp)
movq 0x20(%r12), %rax
movl 0x8(%r14), %r10d
leal (%r10,%rbp), %r8d
movslq %r8d, %rdx
movq %rdx, 0x68(%rsp)
leaq (%rdx,%rdx,4), %r11
movl -0xc(%rax,%r11,4), %edx
movl 0x8(%rax,%r11,4), %esi
shrl %esi
movb 0x4(%r15,%rsi,8), %sil
shrl %edx
movb 0x4(%r15,%rdx,8), %dil
testb $0xf, %sil
je 0x2548d
leaq (%rax,%r11,4), %rdx
testb $0xf, %dil
jne 0x25378
testl %r13d, %r13d
jg 0x25393
testb $0xf, %sil
je 0x256ff
movl -0xc(%rdx), %edi
shrl %edi
testb $0xf, 0x4(%r15,%rdi,8)
je 0x256ff
testb $0xf, %sil
je 0x253a9
movl -0xc(%rdx), %esi
shrl %esi
testb $0xf, 0x4(%r15,%rsi,8)
movl %r8d, %r9d
jne 0x253b5
movl %r13d, %r9d
cmpl %r13d, %r8d
jle 0x25b1a
movq %r11, 0xf8(%rsp)
movq %r10, 0x88(%rsp)
movl %r8d, 0x48(%rsp)
movq %rbp, 0x20(%rsp)
movq 0x28(%r12), %r8
movslq %r9d, %rbp
leaq (,%rbp,4), %rcx
addq %rbp, %rcx
movq %rcx, 0x60(%rsp)
movslq (%rax,%rcx,4), %rsi
shlq $0x4, %rsi
movzbl 0xc(%r8,%rsi), %esi
leal -0x1(%rbp), %edi
movslq %edi, %rdi
leaq (%rdi,%rdi,4), %rcx
movslq (%rax,%rcx,4), %rdi
movq %rcx, 0xf0(%rsp)
movslq 0x4(%rax,%rcx,4), %rax
addq %rdi, %rax
shlq $0x4, %rax
movl -0x8(%r8,%rax), %ecx
incl %ecx
movslq (%rdx), %rax
shlq $0x4, %rax
movl 0x8(%r8,%rax), %r8d
subl %esi, %r8d
incl %r8d
movq 0xd8(%rsp), %rax
movl 0x4(%rax,%rbx,4), %esi
movslq (%rax,%rbx,4), %rdx
subl %edx, %esi
shlq $0x4, %rdx
addq 0xc0(%rsp), %rdx
subq $0x8, %rsp
xorl %edi, %edi
movq %rcx, 0x88(%rsp)
movq %r8, 0x80(%rsp)
movl %r9d, %r13d
leaq 0xd8(%rsp), %r9
leaq 0x5c(%rsp), %rax
pushq %rax
callq 0x3fb0
addq $0x10, %rsp
cmpl $0x1, %eax
jle 0x2549d
movq 0x20(%rsp), %rbp
jmp 0x256ff
testb $0xf, %dil
cmovel %r13d, %r8d
movl %r8d, %r13d
jmp 0x256ff
cmpl 0x48(%rsp), %r13d
setl %cl
movl %r13d, 0x8(%rsp)
jge 0x2556c
movl %r13d, %r14d
movq 0x60(%rsp), %rax
leaq 0x8(,%rax,4), %r13
subl 0x88(%rsp), %r14d
incq %rbp
movl $0x0, 0x28(%rsp)
movb %cl, 0x1c(%rsp)
movq %r12, %r15
movq 0x20(%r12), %rax
movl (%rax,%r13), %r12d
shrl %r12d
movq 0xe0(%rsp), %rax
movl 0x4(%rax,%r12,4), %esi
movslq (%rax,%r12,4), %rdx
subl %edx, %esi
shlq $0x4, %rdx
addq 0xc8(%rsp), %rdx
movq 0x10(%rsp), %rbx
movq 0x10(%rbx), %rax
shlq $0x6, %r12
movl (%rax,%r12), %r8d
subq $0x8, %rsp
xorl %edi, %edi
xorl %ecx, %ecx
leaq 0xd8(%rsp), %r9
leaq 0x5c(%rsp), %rax
pushq %rax
callq 0x3fb0
addq $0x10, %rsp
movq 0x10(%rbx), %rcx
movl 0x28(%rsp), %edx
addl (%rcx,%r12), %edx
movl %edx, 0x28(%rsp)
cmpl $0x2, %eax
jge 0x25576
cmpq 0x68(%rsp), %rbp
setl %cl
addq $0x14, %r13
incl %r14d
incq %rbp
cmpl %r14d, 0x20(%rsp)
movq %r15, %r12
jne 0x254d3
jmp 0x2557d
movl $0x0, 0x28(%rsp)
jmp 0x2557d
movq %r15, %r12
movb 0x1c(%rsp), %cl
testb $0x1, %cl
je 0x255a6
movq 0x70(%rsp), %r15
movq 0xa8(%rsp), %rbx
movq 0xb8(%rsp), %r14
movq 0x20(%rsp), %rbp
movl 0x8(%rsp), %r13d
jmp 0x256ff
movq 0x20(%r12), %rax
movq 0xf0(%rsp), %rdx
movl 0x8(%rax,%rdx,4), %edi
shrl %edi
movq 0x70(%rsp), %r15
movb 0x4(%r15,%rdi,8), %sil
testb $0xf, %sil
movq 0xa8(%rsp), %rbx
movq 0xb8(%rsp), %r14
movq 0x20(%rsp), %rbp
movq 0xf8(%rsp), %r10
je 0x25b39
movl 0x8(%rax,%r10,4), %ecx
shrl %ecx
movb 0x4(%r15,%rcx,8), %r8b
testb $0xf, %r8b
je 0x25b39
leaq (%rax,%rdx,4), %rdx
addq $0x8, %rdx
movl (%r15,%rcx,8), %r9d
movl $0x1, %ecx
cmpl %r9d, (%r15,%rdi,8)
jge 0x2562b
movl 0x8(%rsp), %r13d
movl 0x48(%rsp), %r10d
movq 0x88(%rsp), %r11
jmp 0x2567a
leaq 0x8(%rax,%r10,4), %rdi
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movl 0x8(%rsp), %r13d
movl 0x48(%rsp), %r10d
movq 0x88(%rsp), %r11
jle 0x2564e
movq %rdi, %rdx
jmp 0x2567a
movl %esi, %ecx
shrb $0x4, %cl
shrb $0x4, %r8b
addb %cl, %r8b
cmpb $0x1, %r8b
jne 0x2575b
cmpb $0x10, %sil
movl $0x0, %ecx
sbbl %ecx, %ecx
cmpb $0x10, %sil
cmovbq %rdi, %rdx
orl $0x1, %ecx
movl (%rdx), %edx
shrl %edx
movslq (%r15,%rdx,8), %rdx
movl %r13d, %esi
cmpl %r10d, %r13d
jge 0x256b7
addl %ebp, %r11d
movq 0x60(%rsp), %rsi
leaq (%rax,%rsi,4), %rdi
addq $0x8, %rdi
movl %r13d, %esi
movl (%rdi), %r8d
shrl %r8d
cmpl %edx, (%r15,%r8,8)
jne 0x256b7
incl %esi
addq $0x14, %rdi
cmpl %esi, %r11d
jne 0x2569d
movl %r11d, %esi
cmpl %r10d, %esi
jne 0x25710
shlq $0x5, %rdx
movq 0x40(%rsp), %rax
movl %ebx, (%rax,%rdx)
movq 0xb0(%rsp), %rsi
movl %esi, 0x4(%rax,%rdx)
movl %r13d, 0x8(%rax,%rdx)
movl %r10d, 0xc(%rax,%rdx)
movl %ecx, 0x10(%rax,%rdx)
movq 0x80(%rsp), %rcx
movl %ecx, 0x14(%rax,%rdx)
movq 0x78(%rsp), %rcx
movl %ecx, 0x18(%rax,%rdx)
movl 0x28(%rsp), %ecx
movl %ecx, 0x1c(%rax,%rdx)
incl %ebp
cmpl 0xc(%r14), %ebp
jl 0x2532e
jmp 0x257cb
movq 0xc8e1(%rip), %rcx      # 0x31ff8
movq (%rcx), %rdi
movq 0x60(%rsp), %rcx
movl 0x8(%rax,%rcx,4), %eax
movl %eax, %ecx
andl $0x1, %ecx
leaq 0x2f7b(%rip), %rdx      # 0x286aa
movsbl (%rcx,%rdx), %ecx
movq 0x10(%rsp), %rdx
movq 0x10(%rdx), %rdx
shrl %eax
shlq $0x6, %rax
movq 0x18(%rdx,%rax), %r8
movq 0xa0(%rsp), %rax
movq (%rax), %r9
leaq 0x50f2(%rip), %rsi      # 0x2a84b
jmp 0x257a4
movq 0xc896(%rip), %rcx      # 0x31ff8
movq (%rcx), %rdi
movq 0x60(%rsp), %rcx
movl 0x8(%rax,%rcx,4), %eax
movl %eax, %ecx
andl $0x1, %ecx
leaq 0x2f30(%rip), %rdx      # 0x286aa
movsbl (%rcx,%rdx), %ecx
movq 0x10(%rsp), %rdx
movq 0x10(%rdx), %rdx
shrl %eax
shlq $0x6, %rax
movq 0x18(%rdx,%rax), %r8
movq 0xa0(%rsp), %rax
movq (%rax), %r9
leaq 0x5057(%rip), %rsi      # 0x2a7fb
leaq 0x5094(%rip), %rdx      # 0x2a83f
xorl %eax, %eax
pushq 0x78(%rsp)
pushq 0x88(%rsp)
callq 0x2210
movl 0x18(%rsp), %r13d
addq $0x10, %rsp
jmp 0x256ff
movq 0xb0(%rsp), %rcx
incq %rcx
movslq 0x8(%r12), %rax
cmpq %rax, %rcx
jl 0x252fb
incq %rbx
cmpq 0xe8(%rsp), %rbx
jne 0x252bd
cmpl $0x0, 0xc(%rsp)
movq 0x10(%rsp), %r13
jle 0x25a80
xorl %ebx, %ebx
leaq (%rbx,%rbx,8), %rax
movq %rbx, %rbp
shlq $0x5, %rbp
movq 0x40(%rsp), %rcx
movslq (%rcx,%rbp), %r12
movq 0x98(%rsp), %rcx
movq (%rcx,%r12,8), %rcx
movq %rcx, 0x68(%rsp)
movl $0x0, 0x30(%rsp)
movq 0x10(%r13), %r10
movq 0x28(%r13), %rcx
movq 0x58(%rsp), %r14
movslq (%r14,%rax,8), %rdx
leaq (%rdx,%rdx,2), %rdx
movq (%rcx,%rdx,8), %rdx
movl 0x4(%r14,%rax,8), %ecx
movl 0x8(%r14,%rax,8), %r8d
movq 0x28(%r14,%rax,8), %rsi
movl (%rsi), %r11d
movl %r11d, %edi
andl $0x1, %edi
leaq 0x2e3e(%rip), %r15      # 0x286aa
movsbl (%rdi,%r15), %r9d
shrl %r11d
shlq $0x6, %r11
movslq 0x18(%r14,%rax,8), %rax
movl -0x4(%rsi,%rax,4), %r14d
movl %r14d, %eax
andl $0x1, %eax
movsbl (%rax,%r15), %r15d
shrl %r14d
shlq $0x6, %r14
subq $0x8, %rsp
leaq 0x38(%rsp), %r13
movq %r13, %rdi
leaq 0x4fe8(%rip), %rsi      # 0x2a88f
xorl %eax, %eax
pushq 0x18(%r10,%r14)
pushq %r15
pushq 0x18(%r10,%r11)
callq 0x1fcfb
addq $0x20, %rsp
movq %r12, 0x28(%rsp)
testq %r12, %r12
js 0x25915
addq 0x40(%rsp), %rbp
movl 0x10(%rbp), %eax
testl %eax, %eax
je 0x25b77
movslq 0x8(%rbp), %rdx
movslq 0xc(%rbp), %r14
cmpl %edx, %r14d
leaq 0x30(%rsp), %rdi
movq %rbx, 0x20(%rsp)
movl %eax, 0x1c(%rsp)
movq %rbp, 0x48(%rsp)
jne 0x25930
leaq 0x4fb3(%rip), %rsi      # 0x2a8b2
xorl %eax, %eax
callq 0x1fcfb
leaq 0x30(%rsp), %rdi
movq 0x10(%rsp), %r13
jmp 0x25a13
movq %r13, %rdi
leaq 0x275b(%rip), %rsi      # 0x2807a
xorl %eax, %eax
callq 0x1fcfb
movq 0x10(%rsp), %r13
jmp 0x25a65
testl %eax, %eax
jle 0x259a3
cmpl %r14d, %edx
movq 0x10(%rsp), %r13
leaq 0x45a9(%rip), %r12      # 0x29eec
movq 0x68(%rsp), %rbx
jge 0x25a13
leaq (%rdx,%rdx,4), %rax
leaq 0x8(,%rax,4), %r15
subl %edx, %r14d
movq 0x20(%rbx), %rax
movl (%rax,%r15), %eax
movl %eax, %ecx
andl $0x1, %ecx
leaq 0x2d39(%rip), %rdx      # 0x286aa
movsbl (%rcx,%rdx), %edx
movq 0x10(%r13), %rcx
shrl %eax
shlq $0x6, %rax
movq 0x18(%rcx,%rax), %rcx
leaq 0x30(%rsp), %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x1fcfb
leaq 0x30(%rsp), %rdi
addq $0x14, %r15
decl %r14d
jne 0x2595d
jmp 0x25a13
cmpl %edx, %r14d
movq 0x10(%rsp), %r13
leaq 0x453a(%rip), %rbx      # 0x29eec
movq 0x68(%rsp), %r12
jle 0x25a13
leaq (%r14,%r14,4), %rax
leaq -0xc(,%rax,4), %r15
decq %r14
movq 0x20(%r12), %rax
movl (%rax,%r15), %eax
movl %eax, %ecx
andl $0x1, %ecx
movq %rdx, %rbp
leaq 0x4ed4(%rip), %rdx      # 0x2a8b4
movsbl (%rcx,%rdx), %edx
movq 0x10(%r13), %rcx
shrl %eax
shlq $0x6, %rax
movq 0x18(%rcx,%rax), %rcx
leaq 0x30(%rsp), %rdi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x1fcfb
movq %rbp, %rdx
leaq 0x30(%rsp), %rdi
addq $-0x14, %r15
cmpq %rbp, %r14
jg 0x259c5
movq 0x48(%rsp), %r10
movl 0x1c(%r10), %edx
xorl %eax, %eax
cmpl $0x0, 0x1c(%rsp)
setle %al
leal 0x2b(%rax,%rax), %ecx
movq 0x28(%rsp), %rax
leaq (%rax,%rax,4), %rax
movq 0x90(%rsp), %rsi
movq 0x8(%rsi,%rax,8), %r8
movl 0x14(%r10), %r9d
movl 0x18(%r10), %r10d
subq $0x8, %rsp
leaq 0x4e64(%rip), %rsi      # 0x2a8b7
xorl %eax, %eax
pushq %r10
callq 0x1fcfb
addq $0x10, %rsp
movq 0x20(%rsp), %rbx
movq 0x38(%rsp), %rdi
callq 0x2090
incq %rbx
movslq 0xc(%rsp), %rax
cmpq %rax, %rbx
jl 0x25807
movq 0x40(%rsp), %rdi
callq 0x2040
movq 0x70(%rsp), %rdi
callq 0x2040
movq 0xe0(%rsp), %rdi
callq 0x2040
movq 0xd8(%rsp), %rdi
callq 0x2040
movq 0xc8(%rsp), %rdi
callq 0x2040
movq 0xc0(%rsp), %rdi
callq 0x2040
cmpl $0x0, 0xc(%rsp)
jle 0x25af4
movq 0x58(%rsp), %rbx
addq $0x28, %rbx
xorl %r14d, %r14d
movq (%rbx), %rdi
callq 0x2040
incq %r14
movslq 0xc(%rsp), %rax
addq $0x48, %rbx
cmpq %rax, %r14
jl 0x25adb
movq 0x58(%rsp), %rdi
callq 0x2040
movq 0x38(%rsp), %rdi
callq 0x2040
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4c95(%rip), %rdi      # 0x2a7b6
leaq 0x4c1d(%rip), %rsi      # 0x2a745
leaq 0x4c21(%rip), %rcx      # 0x2a750
movl $0x40, %edx
callq 0x2160
leaq 0x4c7e(%rip), %rdi      # 0x2a7be
leaq 0x4bfe(%rip), %rsi      # 0x2a745
leaq 0x4c02(%rip), %rcx      # 0x2a750
movl $0x55, %edx
callq 0x2160
leaq 0x4bd8(%rip), %rdi      # 0x2a737
leaq 0x4bdf(%rip), %rsi      # 0x2a745
leaq 0x4be3(%rip), %rcx      # 0x2a750
movl $0x27, %edx
callq 0x2160
leaq 0x4d25(%rip), %rdi      # 0x2a8a3
leaq 0x4bc0(%rip), %rsi      # 0x2a745
leaq 0x4bc4(%rip), %rcx      # 0x2a750
movl $0x7d, %edx
callq 0x2160
nop