// File: /workspace/github_c_makefile_star2_O3/lh3[P]minigraph/ggsimple.c
// Function: mg_ggsimple
void mg_ggsimple(void *km, const mg_ggopt_t *opt, gfa_t *g, int32_t n_seq, const mg_bseq1_t *seq, mg_gchains_t *const* gcs)
{
	int32_t t, i, j, *soff, *qoff, max_acnt, *sc, m_ovlp = 0, *ovlp = 0, n_ins, m_ins, n_inv;
	int32_t l_pseq, m_pseq;
	uint64_t *meta;
	mg_intv_t *sintv, *qintv;
	double a_dens;
	gfa_ins_t *ins;
	char *pseq;

	max_acnt = mg_gc_index(km, opt->min_mapq, opt->min_map_len, opt->min_depth_len, g, n_seq, gcs, &a_dens, &soff, &qoff, &sintv, &qintv);
	if (max_acnt == 0) return;

	// extract poorly regions
	m_pseq = l_pseq = 0, pseq = 0;
	m_ins = n_ins = 0, ins = 0;
	n_inv = 0;
	KMALLOC(km, sc, max_acnt);
	KMALLOC(km, meta, max_acnt);
	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 off_a, off_l, n_ss, far_q;
			mg_msseg_t *ss;
			if (gc->id != gc->parent) continue;
			if (gc->blen < opt->min_map_len || gc->mapq < opt->min_mapq) continue;
			assert(gc->cnt > 0);

			// fill sc[]. This part achieves a similar goal to the one in mg_gchain_extra(). It makes more assumptions, but is logically simpler.
			off_l = gc->off;
			off_a = gt->lc[off_l].off + 1;
			far_q = 0;
			for (j = 1; j < gc->n_anchor; ++j, ++off_a) {
				const mg128_t *q = &gt->a[off_a - 1], *p = &gt->a[off_a];
				const mg_llchain_t *lc = &gt->lc[off_l];
				int32_t s, ed = -1, off_l0 = off_l, pd, qd = (int32_t)p->y - (int32_t)q->y, c = (int32_t)(p->x>>32) - (int32_t)(q->x>>32) - 1;
				if ((int32_t)q->y > far_q) far_q = (int32_t)q->y; // far_q keeps the rightmost query position seen so far
				if (off_a == lc->off + lc->cnt) { // we are at the end of the current lchain
					pd = g->seg[lc->v>>1].len - (int32_t)q->x - 1;
					for (++off_l; off_l < gc->off + gc->cnt && gt->lc[off_l].cnt == 0; ++off_l)
						pd += g->seg[gt->lc[off_l].v>>1].len;
					assert(off_l < gc->off + gc->cnt);
					if (gt->lc[off_l].ed >= 0) ed = gt->lc[off_l].ed;
					pd += (int32_t)p->x + 1;
				} else pd = (int32_t)p->x - (int32_t)q->x;
				if ((opt->flag&MG_G_NO_QOVLP) && (int32_t)p->y < far_q) s = 1; // query overlap
				else if (pd == qd && c == 0) s = -opt->match_pen;
				else if (ed >= 0) {
					int32_t min_d = pd < qd? pd : qd;
					double t = 1. / (1.01 - opt->ggs_max_iden);
					if (t > 10.) t = 10.;
					s = (int32_t)(ed * t - min_d);
				} else if (pd > qd) {
					double x = qd * a_dens;
					x = x > c? x : c;
					s = (int32_t)(x + (pd - qd) * a_dens + .499);
				} else {
					s = (int32_t)(qd * a_dens + .499);
					s = s > c? s : c;
				}
				sc[j - 1] = s;
				meta[j-1] = (uint64_t)pd<<32 | off_l0;
			}

			// get regions to insert
			ss = mg_mss_all(0, gc->n_anchor - 1, sc, 10, 0, &n_ss);
			off_a = gt->lc[gc->off].off;
			for (j = 0; j < n_ss; ++j) {
				const mg128_t *p, *q;
				int32_t st, en, ls, le, span, pd, k, n_ovlp, min_len, is_inv = 0;
				gfa_ins_t I;

				// find the initial positions
				min_len = opt->ggs_min_end_cnt > 0? opt->ggs_min_end_cnt : 0;
				if (min_len < ss[j].sc * opt->ggs_min_end_frac) min_len = ss[j].sc * opt->ggs_min_end_frac;
				if (ss[j].st <= min_len || ss[j].en >= gc->n_anchor - 1 - min_len) continue; // too close to ends
				st = ss[j].st, en = ss[j].en;
				q = &gt->a[off_a + st];
				p = &gt->a[off_a + en];
				span = p->y>>32&0xff;
				I.ctg = t;
				ls = (int32_t)meta[st], le = (int32_t)meta[en]; // first and last lchain; CLOSED interval
				assert(ls <= le);
				I.v[0] = gt->lc[ls].v;
				I.v[1] = gt->lc[le].v;
				I.voff[0] = (int32_t)q->x + 1 - span;
				I.voff[1] = (int32_t)p->x + 1;
				I.coff[0] = (int32_t)q->y + 1 - span;
				I.coff[1] = (int32_t)p->y + 1;
				assert(I.voff[0] <= g->seg[I.v[0]>>1].len);
				assert(I.voff[1] <= g->seg[I.v[1]>>1].len);
				for (k = st, pd = span; k < en; ++k)
					pd += meta[k]>>32;

				if (I.coff[0] > I.coff[1]) {
					if (mg_verbose >= 2 && pd + (I.coff[0] - I.coff[1]) >= opt->min_var_len)
						fprintf(stderr, "[W::%s] query overlap on gchain %d: [%c%s:%d,%c%s:%d|%d] <=> %s:[%d,%d|%d]\n", __func__, t, "><"[I.v[0]&1], g->seg[I.v[0]>>1].name, I.voff[0], "><"[I.v[1]&1], g->seg[I.v[1]>>1].name, I.voff[1], pd, seq[t].name, I.coff[0], I.coff[1], I.coff[1] - I.coff[0]);
					continue; // such overlap can't be properly resolved
				}
				pd -= gfa_ins_adj(g, opt->ggs_shrink_pen, &I, seq[t].seq);

				min_len = pd > I.coff[1] - I.coff[0]? pd : I.coff[1] - I.coff[0];
				if (I.coff[0] <= min_len || I.coff[1] >= seq[t].l_seq - min_len) continue; // test if the event is close to ends again

				// filtering
				if (I.coff[1] - I.coff[0] < opt->min_var_len && pd < opt->min_var_len)
					continue;
				for (k = I.coff[0]; k < I.coff[1]; ++k) { // test ambiguous bases
					int c = seq[t].seq[k];
					if (c == 'n' || c == 'N') break;
				}
				if (k != I.coff[1]) continue; // no ambiguous bases on the insert
				n_ovlp = mg_intv_overlap(km, qoff[t+1] - qoff[t], &qintv[qoff[t]], I.coff[0], I.coff[1], &ovlp, &m_ovlp); // test overlapping on the query
				if (n_ovlp == 0) fprintf(stderr, "[W::%s] query interval %s:%d-%d is not covered\n", __func__, seq[t].name, I.coff[0], I.coff[1]);
				if (n_ovlp != 1) continue;
				for (k = ls; k <= le; ++k) { // find other mappings overlapping with the insert on the graph
					uint32_t v = gt->lc[k].v, len = g->seg[v>>1].len;
					int32_t s = 0, e = len, tmp;
					if (k == ls) s = (int32_t)gt->a[off_a+st].x + 1 - (int32_t)(gt->a[off_a+st].y>>32&0xff);
					if (k == le) e = (int32_t)gt->a[off_a+en].x + 1;
					if (v&1) tmp = s, s = len - e, e = len - tmp;
					n_ovlp = mg_intv_overlap(km, soff[(v>>1)+1] - soff[v>>1], &sintv[soff[v>>1]], s, e, &ovlp, &m_ovlp);
					if (n_ovlp == 0) fprintf(stderr, "[W::%s] graph interval %s:%d-%d is not covered by %s:%d-%d\n", __func__, g->seg[v>>1].name, s, e, seq[t].name, I.coff[0], I.coff[1]); // this should be an assert()
					if (n_ovlp != 1) break;
				}
				if (k <= le) continue;
				if (pd - (I.coff[1] - I.coff[0]) < opt->min_var_len && (I.coff[1] - I.coff[0]) - pd < opt->min_var_len) { // if length difference > min_var_len, just insert
					int32_t qd = I.coff[1] - I.coff[0], mlen, blen, score;
					l_pseq = mg_path2seq(km, g, gt, ls, le, I.voff, &pseq, &m_pseq);
					score = mg_wfa_cmp(km, l_pseq, pseq, qd, &seq[t].seq[I.coff[0]], 5000, &mlen, &blen);
					if (score > 0) {
						if (mlen > blen * opt->ggs_max_iden) continue; // make sure k-mer identity is small enough
						if (blen - mlen < opt->min_var_len * opt->ggs_max_iden) continue;
					} else if (!(opt->flag & MG_G_NO_INV)) {
						mg_revcomp_seq(l_pseq, pseq);
						score = mg_wfa_cmp(km, l_pseq, pseq, qd, &seq[t].seq[I.coff[0]], 5000, &mlen, &blen);
						if (score > 0 && mlen > blen * opt->ggs_min_inv_iden) is_inv = 1;
					}
				}
				if (mg_dbg_flag & MG_DBG_INSERT) {
					int32_t mlen, blen, score, qd = I.coff[1] - I.coff[0];
					l_pseq = mg_path2seq(km, g, gt, ls, le, I.voff, &pseq, &m_pseq);
					fprintf(stderr, "IN\t[%c%s:%d,%c%s:%d|%d] <=> %s:[%d,%d|%d] inv:%d\n", "><"[I.v[0]&1], g->seg[I.v[0]>>1].name, I.voff[0], "><"[I.v[1]&1], g->seg[I.v[1]>>1].name, I.voff[1], pd, seq[t].name, I.coff[0], I.coff[1], I.coff[1] - I.coff[0], is_inv);
					fprintf(stderr, "IP\t%s\nIQ\t", pseq);
					fwrite(&seq[t].seq[I.coff[0]], 1, qd, stderr);
					if (pd - qd < opt->min_var_len && qd - pd < opt->min_var_len) {
						score = mg_wfa_cmp(km, l_pseq, pseq, qd, &seq[t].seq[I.coff[0]], 5000, &mlen, &blen);
					} else score = -1, mlen = 0, blen = pd > qd? pd : qd;
					fprintf(stderr, "\nIS\t%d==%d\tnwcmp:%d\tmlen:%d\tblen:%d\n", pd, l_pseq, score, mlen, blen);
				}
				if (is_inv) { // turn one inversion to two events
					gfa_ins_t I_inv[2];
					I_inv[0].ctg = I_inv[1].ctg = I.ctg;
					// the first event
					I_inv[0].coff[0] = I_inv[0].coff[1] = I.coff[0];
					I_inv[0].v[0] = I.v[0];
					I_inv[0].voff[0] = I.voff[0];
					I_inv[0].v[1] = I.v[1]^1;
					I_inv[0].voff[1] = g->seg[I.v[1]>>1].len - I.voff[1];
					// the second event
					I_inv[1].coff[0] = I_inv[1].coff[1] = I.coff[1];
					I_inv[1].v[0] = I.v[0]^1;
					I_inv[1].voff[0] = g->seg[I.v[0]>>1].len - I.voff[0];
					I_inv[1].v[1] = I.v[1];
					I_inv[1].voff[1] = I.voff[1];
					// insert
					if (n_ins == m_ins) KEXPAND(km, ins, m_ins);
					ins[n_ins++] = I_inv[0];
					if (n_ins == m_ins) KEXPAND(km, ins, m_ins);
					ins[n_ins++] = I_inv[1];
					++n_inv;
				} else {
					if (n_ins == m_ins) KEXPAND(km, ins, m_ins);
					ins[n_ins++] = I;
				}
			}
			kfree(0, ss);
		}
	}
	kfree(km, pseq);
	kfree(km, ovlp);
	kfree(km, sc);
	kfree(km, meta);
	kfree(km, soff); kfree(km, qoff);
	kfree(km, sintv); kfree(km, qintv);

	if (n_ins > 0) {
		char **names, **seqs;
		KMALLOC(km, names, n_seq);
		KMALLOC(km, seqs, n_seq);
		for (i = 0; i < n_seq; ++i)
			names[i] = seq[i].name, seqs[i] = seq[i].seq;
		n_ins = gfa_ins_filter(g, n_ins, ins);
		gfa_augment(g, n_ins, ins, n_seq, (const char*const*)names, (const char*const*)seqs);
		kfree(km, ins);
		kfree(km, names);
		kfree(km, seqs);
	}
	if (mg_verbose >= 3)
		fprintf(stderr, "[M::%s::%.3f*%.2f] inserted %d events, including %d inversions\n", __func__,
				realtime() - mg_realtime0, cputime() / (realtime() - mg_realtime0), n_ins, n_inv);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x158, %rsp            # imm = 0x158
movq %r9, %r15
movq %r8, 0xf8(%rsp)
movl %ecx, %ebp
movq %rdx, %r8
movq %rsi, %r13
movq %rdi, %r14
movl $0x0, 0xd4(%rsp)
movq $0x0, 0xf0(%rsp)
movl 0xc(%rsi), %esi
movl 0x14(%r13), %ecx
leaq 0x108(%rsp), %rax
leaq 0x110(%rsp), %rdx
leaq 0x118(%rsp), %r10
leaq 0x120(%rsp), %r11
leaq 0x150(%rsp), %rbx
movq %r8, 0x88(%rsp)
movl %ebp, %r9d
pushq %rax
pushq %rdx
pushq %r10
pushq %r11
pushq %rbx
movq %r15, 0x150(%rsp)
pushq %r15
callq 0x21984
addq $0x30, %rsp
testl %eax, %eax
je 0x2324c
movl $0x0, 0xd0(%rsp)
movq $0x0, 0xa0(%rsp)
movl %eax, %ebx
leaq (,%rbx,4), %rsi
movq %r14, %rdi
callq 0x30e5
movq %rax, 0xe8(%rsp)
shlq $0x3, %rbx
movq %r14, 0x58(%rsp)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x30e5
movq %rax, 0x8(%rsp)
movl %ebp, %eax
movq %rax, 0x100(%rsp)
testl %ebp, %ebp
movl %ebp, 0xc8(%rsp)
jle 0x230da
xorl %ebx, %ebx
movsd 0x8056(%rip), %xmm4     # 0x2a0e8
movsd 0x7076(%rip), %xmm5     # 0x29110
movsd 0x804e(%rip), %xmm6     # 0x2a0f0
xorl %ecx, %ecx
movq $0x0, 0x98(%rsp)
movl $0x0, 0x2c(%rsp)
movl $0x0, 0xb4(%rsp)
movq $0x0, 0x90(%rsp)
movq %r13, 0x48(%rsp)
movq 0x128(%rsp), %rax
movq (%rax,%rcx,8), %rbp
movl 0x8(%rbp), %eax
testl %eax, %eax
movq %rcx, 0xd8(%rsp)
jle 0x230af
leaq (%rcx,%rcx,4), %rcx
movq 0xf8(%rsp), %rdx
leaq (%rdx,%rcx,8), %rcx
movq %rcx, 0xa8(%rsp)
xorl %esi, %esi
movq %rbp, 0x40(%rsp)
movq 0x18(%rbp), %r12
imulq $0x68, %rsi, %rcx
movl (%r12,%rcx), %edx
cmpl 0x4(%r12,%rcx), %edx
jne 0x230a0
addq %rcx, %r12
movl 0x2c(%r12), %ecx
cmpl 0x10(%r13), %ecx
jl 0x230a0
movzbl 0x44(%r12), %ecx
cmpl 0xc(%r13), %ecx
jl 0x230a0
movq %rsi, 0x148(%rsp)
cmpl $0x0, 0xc(%r12)
jle 0x232eb
movl 0x10(%r12), %esi
cmpl $0x2, %esi
movq %r12, 0x20(%rsp)
jl 0x223c0
movq 0x20(%rbp), %rsi
movslq 0x8(%r12), %rcx
leaq (%rcx,%rcx,4), %rax
movslq (%rsi,%rax,4), %rdi
movq 0x28(%rbp), %rdx
movsd 0x150(%rsp), %xmm0
movq %rsi, 0x10(%rsp)
leaq 0x8(%rsi), %rax
movq %rax, 0x80(%rsp)
xorl %r9d, %r9d
movl $0x1, %r10d
movq %rdi, %r8
incq %rdi
shlq $0x4, %r8
movq %rdi, %rbx
shlq $0x4, %rbx
movslq %ecx, %rax
movq %rax, 0x50(%rsp)
leaq (%rax,%rax,4), %rax
movl 0x8(%rdx,%rbx), %r11d
movl 0x8(%rdx,%r8), %ebp
movq (%rdx,%rbx), %r14
movq (%rdx,%r8), %rbx
cmpl %ebp, %r9d
cmovlel %ebp, %r9d
movq 0x10(%rsp), %rsi
movl 0x4(%rsi,%rax,4), %r8d
addl (%rsi,%rax,4), %r8d
cmpl %edi, %r8d
jne 0x2227a
movl 0xc(%r12), %r15d
addl 0x8(%r12), %r15d
incl %ecx
cmpl %r15d, %ecx
jge 0x2326f
movq 0x10(%rsp), %rsi
leaq (%rsi,%rax,4), %rax
movq 0x88(%rsp), %rsi
movq 0x10(%rsi), %r12
movl 0x8(%rax), %eax
shrl %eax
shlq $0x6, %rax
movl %ebx, %r13d
notl %r13d
addl (%r12,%rax), %r13d
movslq %ecx, %r8
leaq (%r8,%r8,4), %rax
shlq $0x20, %r8
movq 0x80(%rsp), %rsi
leaq (%rsi,%rax,4), %rax
cmpl $0x0, -0x4(%rax)
jne 0x22288
movl (%rax), %esi
shrl %esi
shlq $0x6, %rsi
addl (%r12,%rsi), %r13d
movabsq $0x100000000, %rsi      # imm = 0x100000000
addq %rsi, %r8
incl %ecx
addq $0x14, %rax
cmpl %ecx, %r15d
jne 0x2224b
jmp 0x2326f
movl %r14d, %r15d
subl %ebx, %r15d
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
jmp 0x222b2
sarq $0x20, %r8
leaq (%r8,%r8,4), %rax
movq 0x10(%rsp), %rsi
movl 0x10(%rsi,%rax,4), %r12d
testl %r12d, %r12d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmovsl %eax, %r12d
leal (%r14,%r13), %r15d
incl %r15d
movq 0x48(%rsp), %r13
testb $0x1, (%r13)
movq 0x8(%rsp), %r8
je 0x222cc
movl $0x1, %eax
cmpl %r11d, %r9d
jg 0x22388
subl %ebp, %r11d
shrq $0x20, %r14
shrq $0x20, %rbx
notl %ebx
addl %r14d, %ebx
cmpl %r11d, %r15d
jne 0x222f0
testl %ebx, %ebx
jne 0x222f0
xorl %eax, %eax
subl 0x1c(%r13), %eax
jmp 0x22388
testl %r12d, %r12d
js 0x2233b
cmpl %r11d, %r15d
cmovll %r15d, %r11d
xorps %xmm1, %xmm1
cvtss2sd 0x2c(%r13), %xmm1
movapd %xmm4, %xmm2
subsd %xmm1, %xmm2
movapd %xmm5, %xmm1
divsd %xmm2, %xmm1
movapd %xmm6, %xmm2
minsd %xmm1, %xmm2
xorps %xmm1, %xmm1
cvtsi2sd %r12d, %xmm1
xorps %xmm3, %xmm3
cvtsi2sd %r11d, %xmm3
mulsd %xmm2, %xmm1
subsd %xmm3, %xmm1
cvttsd2si %xmm1, %eax
jmp 0x22388
movl %r15d, %eax
xorps %xmm1, %xmm1
cvtsi2sd %r11d, %xmm1
mulsd %xmm0, %xmm1
subl %r11d, %eax
jle 0x22377
xorps %xmm2, %xmm2
cvtsi2sd %ebx, %xmm2
maxsd %xmm2, %xmm1
xorps %xmm2, %xmm2
cvtsi2sd %eax, %xmm2
mulsd %xmm0, %xmm2
addsd %xmm1, %xmm2
addsd 0x713f(%rip), %xmm2     # 0x294b0
cvttsd2si %xmm2, %eax
jmp 0x22388
addsd 0x7131(%rip), %xmm1     # 0x294b0
cvttsd2si %xmm1, %eax
cmpl %eax, %ebx
cmovgl %ebx, %eax
movq 0xe8(%rsp), %rsi
movl %eax, -0x4(%rsi,%r10,4)
shlq $0x20, %r15
orq 0x50(%rsp), %r15
movq %r15, -0x8(%r8,%r10,8)
incq %r10
movq 0x20(%rsp), %r12
movslq 0x10(%r12), %rsi
cmpq %rsi, %r10
jl 0x221aa
xorl %ebx, %ebx
movq 0x40(%rsp), %rbp
decl %esi
xorl %edi, %edi
movq 0xe8(%rsp), %rdx
movl $0xa, %ecx
xorl %r8d, %r8d
leaq 0xcc(%rsp), %r9
callq 0x3794
movq %rax, %r14
cmpl $0x0, 0xcc(%rsp)
jle 0x23073
movq 0x20(%rbp), %rax
movslq 0x8(%r12), %rcx
leaq (%rcx,%rcx,4), %rcx
movl (%rax,%rcx,4), %r15d
xorl %r9d, %r9d
movq 0x8(%rsp), %r8
movq %r14, 0x18(%rsp)
movq %r15, 0x38(%rsp)
movl 0x24(%r13), %eax
testl %eax, %eax
cmovlel %ebx, %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
leaq (%r9,%r9,2), %rcx
xorps %xmm1, %xmm1
cvtsi2ssl 0x8(%r14,%rcx,4), %xmm1
mulss 0x28(%r13), %xmm1
ucomiss %xmm0, %xmm1
cvttss2si %xmm1, %edx
cmovbel %eax, %edx
movslq (%r14,%rcx,4), %rax
cmpl %edx, %eax
jle 0x22748
leaq (%r14,%rcx,4), %rcx
movslq 0x4(%rcx), %rcx
notl %edx
addl 0x10(%r12), %edx
cmpl %edx, %ecx
jge 0x22748
movq 0x28(%rbp), %rdi
leal (%rcx,%r15), %edx
movslq %edx, %rbx
shlq $0x4, %rbx
movq 0x8(%rdi,%rbx), %r13
movq 0xd8(%rsp), %rdx
movl %edx, 0x7c(%rsp)
movq (%r8,%rax,8), %r10
movq (%r8,%rcx,8), %r11
cmpl %r11d, %r10d
jg 0x2328e
movq %r9, 0x10(%rsp)
leal (%rax,%r15), %edx
movslq %edx, %r12
leaq (%rdi,%rbx), %r8
movq %r13, %rdx
shrq $0x20, %rdx
movzbl %dl, %r14d
shlq $0x4, %r12
movq 0x20(%rbp), %rsi
movq %r10, 0xc0(%rsp)
movslq %r10d, %rdx
leaq (%rdx,%rdx,4), %rdx
movl 0x8(%rsi,%rdx,4), %edx
movl %edx, 0x64(%rsp)
movq %r11, 0xb8(%rsp)
movslq %r11d, %r9
leaq (%r9,%r9,4), %r9
movl 0x8(%rsi,%r9,4), %esi
movl %esi, 0x68(%rsp)
movl (%rdi,%r12), %r11d
subl %r14d, %r11d
incl %r11d
movl %r11d, 0x6c(%rsp)
movl (%r8), %r8d
leal 0x1(%r8), %r9d
movq %r9, 0xe0(%rsp)
movl %r9d, 0x70(%rsp)
movl 0x8(%rdi,%r12), %r10d
subl %r14d, %r10d
leal 0x1(%r10), %r15d
movl %r15d, 0x74(%rsp)
movq %r13, 0x50(%rsp)
leal 0x1(%r13), %ebp
movl %ebp, 0x78(%rsp)
movq 0x88(%rsp), %rdi
movq 0x10(%rdi), %r13
movl %edx, %r9d
shrl %r9d
shlq $0x6, %r9
cmpl (%r13,%r9), %r11d
jg 0x232ad
movq %rbx, 0x80(%rsp)
movl %esi, %ebx
shrl %ebx
shlq $0x6, %rbx
cmpl %r8d, (%r13,%rbx)
jle 0x232cc
cmpl %ecx, %eax
movq 0x8(%rsp), %r8
jge 0x2257c
addl 0x4(%r8,%rax,8), %r14d
incq %rax
cmpq %rax, %rcx
jne 0x2256f
cmpl %ebp, %r15d
jle 0x225be
leaq 0xfe78(%rip), %rax      # 0x32400
cmpl $0x2, (%rax)
movq 0x20(%rsp), %r12
jl 0x225ad
movl %r10d, %eax
movq 0x50(%rsp), %rdi
subl %edi, %eax
addl %r14d, %eax
movq 0x48(%rsp), %rcx
cmpl 0x18(%rcx), %eax
jge 0x229c1
movq 0x48(%rsp), %r13
xorl %ebx, %ebx
movq 0x40(%rsp), %rbp
jmp 0x2266a
movq 0x48(%rsp), %r13
movl 0x20(%r13), %esi
movq 0xa8(%rsp), %rbx
movq 0x10(%rbx), %rcx
movq 0x88(%rsp), %rdi
leaq 0x64(%rsp), %rdx
callq 0x9eaa
subl %eax, %r14d
movl 0x74(%rsp), %ecx
movl 0x78(%rsp), %r8d
movl %r8d, %eax
subl %ecx, %eax
cmpl %eax, %r14d
movl %eax, %edx
cmovgl %r14d, %edx
cmpl %edx, %ecx
jle 0x22659
movl (%rbx), %esi
subl %edx, %esi
cmpl %esi, %r8d
movq 0x40(%rsp), %rbp
movq 0x38(%rsp), %r15
movq 0x10(%rsp), %r9
jge 0x22737
movl 0x18(%r13), %edx
cmpl %edx, %eax
jge 0x22630
cmpl %edx, %r14d
jl 0x22737
movl %ecx, %eax
cmpl %ecx, %r8d
jle 0x2267e
movslq %ecx, %rdx
addq 0x10(%rbx), %rdx
movl %ecx, %eax
movb (%rdx), %sil
andb $-0x21, %sil
cmpb $0x4e, %sil
je 0x2267e
incl %eax
incq %rdx
cmpl %eax, %r8d
jne 0x22640
jmp 0x22687
movq 0x8(%rsp), %r8
xorl %ebx, %ebx
movq 0x40(%rsp), %rbp
movq 0x20(%rsp), %r12
movq 0x18(%rsp), %r14
movq 0x38(%rsp), %r15
movq 0x10(%rsp), %r9
jmp 0x22748
cmpl %r8d, %eax
jne 0x22737
movq 0x118(%rsp), %rax
movq 0xd8(%rsp), %rdx
movl 0x4(%rax,%rdx,4), %esi
movslq (%rax,%rdx,4), %rdx
subl %edx, %esi
shlq $0x4, %rdx
addq 0x108(%rsp), %rdx
subq $0x8, %rsp
movq 0x60(%rsp), %rdi
leaq 0xf8(%rsp), %r9
leaq 0xdc(%rsp), %rax
pushq %rax
callq 0x3e98
addq $0x10, %rsp
cmpl $0x1, %eax
je 0x22761
testl %eax, %eax
movq 0x8(%rsp), %r8
movl $0x0, %ebx
movq 0x20(%rsp), %r12
movq 0x18(%rsp), %r14
movq 0x10(%rsp), %r9
jne 0x22748
movq 0xf8fb(%rip), %rax      # 0x31ff8
movq (%rax), %rdi
movq 0xa8(%rsp), %rax
movq 0x8(%rax), %rcx
movl 0x74(%rsp), %r8d
movl 0x78(%rsp), %r9d
leaq 0x7c23(%rip), %rsi      # 0x2a340
leaq 0x7c10(%rip), %rdx      # 0x2a334
xorl %eax, %eax
callq 0x2210
movq 0x10(%rsp), %r9
movq 0x8(%rsp), %r8
jmp 0x22748
movq 0x8(%rsp), %r8
xorl %ebx, %ebx
movq 0x20(%rsp), %r12
movq 0x18(%rsp), %r14
incq %r9
movslq 0xcc(%rsp), %rax
cmpq %rax, %r9
jl 0x22415
jmp 0x23073
movq 0x120(%rsp), %rax
movq %rax, 0xe0(%rsp)
movq 0x110(%rsp), %rax
movq %rax, 0x140(%rsp)
movq 0xc0(%rsp), %rcx
movslq %ecx, %rax
movq 0xb8(%rsp), %rdx
movslq %edx, %rsi
subq %rax, %rsi
movq %rsi, 0x138(%rsp)
shlq $0x2, %rax
leaq (%rax,%rax,4), %rsi
subl %ecx, %edx
incl %edx
movq %rdx, 0x130(%rsp)
xorl %r15d, %r15d
xorl %eax, %eax
testq %r15, %r15
jne 0x227d2
movq 0x28(%rbp), %rcx
movl (%rcx,%r12), %eax
movzbl 0xc(%rcx,%r12), %ecx
subl %ecx, %eax
incl %eax
movq 0x20(%rbp), %rcx
movq %rsi, 0x50(%rsp)
movl 0x8(%rcx,%rsi), %edx
movq 0x88(%rsp), %rcx
movq 0x10(%rcx), %rsi
movl %edx, %ecx
shrl %ecx
movq %rcx, %rbp
shlq $0x6, %rbp
movl (%rsi,%rbp), %ebx
movl %ebx, %esi
cmpq %r15, 0x138(%rsp)
jne 0x2281b
movq 0x40(%rsp), %rsi
movq 0x28(%rsi), %rsi
movq 0x80(%rsp), %rdi
movl (%rsi,%rdi), %esi
incl %esi
movl %ebx, %r13d
subl %esi, %r13d
subl %eax, %ebx
testb $0x1, %dl
cmovel %eax, %r13d
cmovel %esi, %ebx
movl %ecx, %eax
movq 0xe0(%rsp), %rdx
movl 0x4(%rdx,%rax,4), %esi
movslq (%rdx,%rcx,4), %rdx
subl %edx, %esi
shlq $0x4, %rdx
addq 0x140(%rsp), %rdx
subq $0x8, %rsp
movq 0x60(%rsp), %rdi
movl %r13d, %ecx
movl %ebx, %r8d
leaq 0xf8(%rsp), %r9
leaq 0xdc(%rsp), %rax
pushq %rax
callq 0x3e98
addq $0x10, %rsp
cmpl $0x1, %eax
jne 0x22a50
incq %r15
movq 0x50(%rsp), %rsi
addq $0x14, %rsi
cmpl %r15d, 0x130(%rsp)
movq 0x48(%rsp), %r13
movq 0x40(%rsp), %rbp
jne 0x227b9
movl 0x78(%rsp), %edx
subl 0x74(%rsp), %edx
movl %r14d, %ecx
subl %edx, %ecx
movl 0x18(%r13), %eax
xorl %r12d, %r12d
cmpl %eax, %ecx
movq 0x8(%rsp), %r8
movq 0x10(%rsp), %r9
jge 0x22a82
movl %edx, %ecx
subl %r14d, %ecx
cmpl %eax, %ecx
movq 0x38(%rsp), %r15
jge 0x22b6d
movl %edx, 0x50(%rsp)
movq 0x58(%rsp), %rbx
movq %rbx, %rdi
movq 0x88(%rsp), %rsi
movq %rbp, %rdx
movq 0xc0(%rsp), %rcx
movq 0xb8(%rsp), %r8
leaq 0x6c(%rsp), %r9
leaq 0xd0(%rsp), %rax
pushq %rax
leaq 0xa8(%rsp), %rax
pushq %rax
callq 0x24ca6
addq $0x10, %rsp
movl %eax, %r12d
movq 0xa0(%rsp), %rdx
movslq 0x74(%rsp), %r8
movq 0xa8(%rsp), %rax
addq 0x10(%rax), %r8
movq %rbx, %rdi
movl 0x50(%rsp), %ebx
movl %r12d, %esi
movl %ebx, %ecx
movl $0x1388, %r9d           # imm = 0x1388
leaq 0x30(%rsp), %rax
pushq %rax
leaq 0x3c(%rsp), %rax
pushq %rax
callq 0x4157
addq $0x10, %rsp
testl %eax, %eax
jle 0x22a8c
movl 0x34(%rsp), %eax
cvtsi2ss %eax, %xmm1
movl 0x30(%rsp), %ecx
cvtsi2ss %ecx, %xmm2
movss 0x2c(%r13), %xmm0
mulss %xmm0, %xmm2
ucomiss %xmm2, %xmm1
movq 0x8(%rsp), %r8
movq 0x10(%rsp), %r9
ja 0x2273c
subl %eax, %ecx
xorps %xmm1, %xmm1
cvtsi2ss %ecx, %xmm1
xorps %xmm2, %xmm2
cvtsi2ssl 0x18(%r13), %xmm2
mulss %xmm2, %xmm0
xorl %r12d, %r12d
ucomiss %xmm1, %xmm0
ja 0x2273c
jmp 0x22b6d
movq 0xf630(%rip), %rax      # 0x31ff8
movq %rdi, %r12
movq (%rax), %rdi
andl $0x1, %edx
leaq 0x5cd2(%rip), %rax      # 0x286aa
movsbl (%rdx,%rax), %r8d
movq 0x18(%r13,%r9), %r9
andl $0x1, %esi
movsbl (%rsi,%rax), %eax
movq %rax, 0x80(%rsp)
subl %r10d, %r12d
subq $0x8, %rsp
leaq 0x78e9(%rip), %rsi      # 0x2a2e8
leaq 0x792e(%rip), %rdx      # 0x2a334
movq 0xe0(%rsp), %rcx
xorl %eax, %eax
pushq %r12
pushq %rbp
pushq %r15
movq 0xc8(%rsp), %r10
pushq 0x8(%r10)
pushq %r14
pushq 0x110(%rsp)
pushq 0x18(%r13,%rbx)
pushq 0xc0(%rsp)
movq 0x68(%rsp), %r12
pushq %r11
callq 0x2210
movq 0x58(%rsp), %r8
addq $0x50, %rsp
jmp 0x225ad
testl %eax, %eax
movq 0x8(%rsp), %r8
movq 0x10(%rsp), %r9
je 0x22e27
movq 0x48(%rsp), %r13
xorl %ebx, %ebx
movq 0x40(%rsp), %rbp
movq 0x20(%rsp), %r12
movq 0x18(%rsp), %r14
movq 0x38(%rsp), %r15
jmp 0x22748
movq 0x38(%rsp), %r15
jmp 0x22b6d
movq %r12, %r11
xorl %r12d, %r12d
testb $0x4, (%r13)
jne 0x22b63
movq 0xa0(%rsp), %rax
movl %r11d, %ecx
sarl %ecx
testl %ecx, %ecx
leaq 0xf74d(%rip), %r10      # 0x32200
jle 0x22ae4
movl %ecx, %edx
leal -0x1(%r11), %esi
xorl %edi, %edi
movslq %esi, %rsi
movsbq (%rax,%rsi), %r8
movzbl (%rax,%rdi), %r9d
movb (%r10,%r9), %r9b
movb %r9b, (%rax,%rsi)
movb (%r10,%r8), %r8b
movb %r8b, (%rax,%rdi)
incq %rdi
decl %esi
cmpq %rdi, %rdx
jne 0x22abd
testb $0x1, %r11b
je 0x22af8
movslq %ecx, %rcx
movzbl (%rax,%rcx), %edx
movb (%r10,%rdx), %dl
movb %dl, (%rax,%rcx)
movq 0xa0(%rsp), %rdx
movslq 0x74(%rsp), %r8
movq 0xa8(%rsp), %rax
addq 0x10(%rax), %r8
movq 0x58(%rsp), %rdi
movl %r11d, %esi
movl %ebx, %ecx
movl $0x1388, %r9d           # imm = 0x1388
leaq 0x30(%rsp), %rax
pushq %rax
leaq 0x3c(%rsp), %rax
pushq %rax
callq 0x4157
addq $0x10, %rsp
testl %eax, %eax
jle 0x22b63
cvtsi2ssl 0x34(%rsp), %xmm0
cvtsi2ssl 0x30(%rsp), %xmm1
mulss 0x30(%r13), %xmm1
ucomiss %xmm1, %xmm0
movq 0x8(%rsp), %r8
movq 0x10(%rsp), %r9
jbe 0x22b6d
movl $0x1, %r12d
jmp 0x22b6d
movq 0x8(%rsp), %r8
movq 0x10(%rsp), %r9
leaq 0xfb04(%rip), %rax      # 0x32678
testb $0x10, (%rax)
movq 0x58(%rsp), %rdi
jne 0x22e8e
testl %r12d, %r12d
je 0x22c59
movl 0x7c(%rsp), %edi
movl 0x74(%rsp), %r8d
movl 0x64(%rsp), %r14d
movl 0x68(%rsp), %r10d
movl 0x6c(%rsp), %r12d
movq 0x88(%rsp), %rax
movq 0x10(%rax), %rax
movl %r10d, %ecx
shrl %ecx
shlq $0x6, %rcx
movl (%rax,%rcx), %r13d
movl 0x70(%rsp), %r11d
movl 0x78(%rsp), %ecx
movl %ecx, 0x50(%rsp)
movl %r14d, %ecx
shrl %ecx
shlq $0x6, %rcx
movl (%rax,%rcx), %eax
movl %eax, 0xc0(%rsp)
movq 0x98(%rsp), %rcx
cmpl 0x2c(%rsp), %ecx
movl %edi, 0x80(%rsp)
jne 0x22cb7
movl %ecx, %ebp
sarl %ebp
addl %ecx, %ebp
cmpl $0x4, %ecx
movl $0x10, %eax
cmovll %eax, %ebp
movslq %ebp, %rax
leaq (%rax,%rax,8), %rcx
leaq (%rcx,%rcx,2), %rdx
addq %rax, %rdx
movq 0x58(%rsp), %rdi
movq 0x90(%rsp), %rsi
movl %r10d, %r15d
movl %r12d, 0xb8(%rsp)
movl %r11d, %r12d
movl %r8d, %ebx
callq 0x31ed
movl %ebx, %r8d
movl %r12d, %r11d
movl 0xb8(%rsp), %r12d
movl %r15d, %r10d
movl 0x80(%rsp), %edi
movq 0x98(%rsp), %rcx
jmp 0x22cc3
movq 0x98(%rsp), %rcx
cmpl 0x2c(%rsp), %ecx
jne 0x22ddb
movl %ecx, %edx
sarl %edx
addl %ecx, %edx
cmpl $0x4, %ecx
movl $0x10, %eax
cmovll %eax, %edx
movl %edx, 0x2c(%rsp)
movslq %edx, %rax
leaq (%rax,%rax,8), %rcx
leaq (%rcx,%rcx,2), %rdx
addq %rax, %rdx
movq 0x58(%rsp), %rdi
movq 0x90(%rsp), %rsi
callq 0x31ed
movq 0x10(%rsp), %r9
movq 0x8(%rsp), %r8
movq 0x98(%rsp), %rcx
jmp 0x22de3
movq 0x90(%rsp), %rax
movl 0x2c(%rsp), %ebp
movl %r10d, %esi
xorl $0x1, %esi
subl %r11d, %r13d
leal 0x1(%rcx), %ebx
movslq %ecx, %rcx
leaq (%rcx,%rcx,8), %rdx
leaq (%rdx,%rdx,2), %rdx
addq %rcx, %rdx
movl %r14d, (%rax,%rdx)
movl %esi, 0x4(%rax,%rdx)
movl %r12d, 0x8(%rax,%rdx)
movl %r13d, 0xc(%rax,%rdx)
movl %r8d, 0x10(%rax,%rdx)
movl %r8d, 0x14(%rax,%rdx)
movl %edi, 0x18(%rax,%rdx)
cmpl %ebp, %ebx
jne 0x22d54
movl %ebp, %r15d
sarl %r15d
addl %ebp, %r15d
cmpl $0x4, %ebp
movl $0x10, %ecx
cmovll %ecx, %r15d
movq %rax, %rsi
movslq %r15d, %rax
leaq (%rax,%rax,8), %rcx
leaq (%rcx,%rcx,2), %rdx
addq %rax, %rdx
movq 0x58(%rsp), %rdi
movl %r10d, %r13d
movl %r12d, %ebp
movl %r11d, %r12d
callq 0x31ed
movl %r12d, %r11d
movl %ebp, %r12d
movl %r13d, %r10d
movl 0x80(%rsp), %edi
movq %rax, %rdx
movl %r15d, 0x2c(%rsp)
jmp 0x22d5b
movl %ebp, 0x2c(%rsp)
movq %rax, %rdx
movq 0x48(%rsp), %r13
movq 0x8(%rsp), %r8
movq 0x38(%rsp), %r15
movq 0x10(%rsp), %r9
xorl $0x1, %r14d
movl 0xc0(%rsp), %esi
subl %r12d, %esi
movq 0x98(%rsp), %rax
addl $0x2, %eax
movq %rax, 0x98(%rsp)
movslq %ebx, %rax
leaq (%rax,%rax,8), %rcx
leaq (%rcx,%rcx,2), %rcx
addq %rax, %rcx
movl %r14d, (%rdx,%rcx)
movl %r10d, 0x4(%rdx,%rcx)
movl %esi, 0x8(%rdx,%rcx)
movl %r11d, 0xc(%rdx,%rcx)
movl 0x50(%rsp), %eax
movl %eax, 0x10(%rdx,%rcx)
movl %eax, 0x14(%rdx,%rcx)
movq %rdx, 0x90(%rsp)
movl %edi, 0x18(%rdx,%rcx)
incl 0xb4(%rsp)
xorl %ebx, %ebx
movq 0x40(%rsp), %rbp
jmp 0x2273e
movq 0x90(%rsp), %rax
xorl %ebx, %ebx
movq 0x20(%rsp), %r12
movq 0x18(%rsp), %r14
movslq %ecx, %rdx
incl %ecx
movq %rcx, 0x98(%rsp)
leaq (%rdx,%rdx,8), %rcx
leaq (%rcx,%rcx,2), %rcx
addq %rdx, %rcx
movups 0x64(%rsp), %xmm0
movups 0x70(%rsp), %xmm1
movups %xmm1, 0xc(%rax,%rcx)
movq %rax, 0x90(%rsp)
movups %xmm0, (%rax,%rcx)
jmp 0x22748
movq 0xf1ca(%rip), %rax      # 0x31ff8
movq (%rax), %rdi
movq 0x88(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x18(%rax,%rbp), %rcx
movl 0x74(%rsp), %r10d
movl 0x78(%rsp), %r11d
subq $0x8, %rsp
leaq 0x7519(%rip), %rsi      # 0x2a370
leaq 0x74d6(%rip), %rdx      # 0x2a334
movl %r13d, %r8d
movl %ebx, %r9d
xorl %eax, %eax
pushq %r11
pushq %r10
movq 0xc0(%rsp), %r10
pushq 0x8(%r10)
callq 0x2210
movq 0x30(%rsp), %r9
movq 0x28(%rsp), %r8
addq $0x20, %rsp
jmp 0x22a62
movslq 0x78(%rsp), %r15
movslq 0x74(%rsp), %rax
subq %rax, %r15
movq 0x88(%rsp), %rbx
movq %rbx, %rsi
movq %rbp, %rdx
movq 0xc0(%rsp), %rcx
movq 0xb8(%rsp), %r8
leaq 0x6c(%rsp), %r9
leaq 0xd0(%rsp), %rax
pushq %rax
leaq 0xa8(%rsp), %rax
pushq %rax
callq 0x24ca6
addq $0x10, %rsp
movl %eax, 0x50(%rsp)
movq 0xf114(%rip), %rax      # 0x31ff8
movq (%rax), %rdi
movl 0x64(%rsp), %eax
movl 0x68(%rsp), %r10d
movl %eax, %ecx
andl $0x1, %ecx
leaq 0x57ae(%rip), %rsi      # 0x286aa
movsbl (%rcx,%rsi), %edx
movq 0x10(%rbx), %r11
shrl %eax
shlq $0x6, %rax
movq 0x18(%r11,%rax), %rcx
movl 0x6c(%rsp), %r8d
movl %r10d, %eax
andl $0x1, %eax
movsbl (%rax,%rsi), %r9d
shrl %r10d
shlq $0x6, %r10
movl 0x70(%rsp), %eax
movq %rax, 0x80(%rsp)
movl 0x74(%rsp), %r13d
movl 0x78(%rsp), %ebx
movl %ebx, %ebp
subl %r13d, %ebp
leaq 0x7465(%rip), %rsi      # 0x2a3ac
xorl %eax, %eax
pushq %r12
pushq %rbp
pushq %rbx
pushq %r13
movq 0x68(%rsp), %r13
movq 0xc8(%rsp), %rbx
pushq 0x8(%rbx)
pushq %r14
pushq 0xb0(%rsp)
pushq 0x18(%r11,%r10)
callq 0x2210
addq $0x40, %rsp
movq 0xf07b(%rip), %rbp      # 0x31ff8
movq (%rbp), %rdi
movq 0xa0(%rsp), %rdx
leaq 0x744e(%rip), %rsi      # 0x2a3de
xorl %eax, %eax
callq 0x2210
movslq 0x74(%rsp), %rdi
addq 0x10(%rbx), %rdi
movq (%rbp), %rcx
movl $0x1, %esi
movq %r15, %rdx
callq 0x2340
movl %r14d, %ecx
subl %r15d, %ecx
movl 0x18(%r13), %eax
cmpl %eax, %ecx
jge 0x23012
movl %r15d, %ecx
subl %r14d, %ecx
cmpl %eax, %ecx
jge 0x23012
movq 0xa0(%rsp), %rdx
movslq 0x74(%rsp), %r8
addq 0x10(%rbx), %r8
movq 0x58(%rsp), %rdi
movl 0x50(%rsp), %ebx
movl %ebx, %esi
movl %r15d, %ecx
movl $0x1388, %r9d           # imm = 0x1388
leaq 0x30(%rsp), %rax
pushq %rax
leaq 0x3c(%rsp), %rax
pushq %rax
callq 0x4157
addq $0x10, %rsp
movl %eax, %r8d
movl 0x34(%rsp), %r9d
movl 0x30(%rsp), %r15d
jmp 0x23033
cmpl %r15d, %r14d
cmovgl %r14d, %r15d
movl $0x0, 0x34(%rsp)
movl %r15d, 0x30(%rsp)
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
xorl %r9d, %r9d
movl 0x50(%rsp), %ebx
movq 0xefbe(%rip), %rax      # 0x31ff8
movq (%rax), %rdi
subq $0x8, %rsp
leaq 0x73a0(%rip), %rsi      # 0x2a3e8
movl %r14d, %edx
movl %ebx, %ecx
xorl %eax, %eax
pushq %r15
callq 0x2210
addq $0x10, %rsp
movq 0x8(%rsp), %r8
movq 0x40(%rsp), %rbp
movq 0x38(%rsp), %r15
movq 0x10(%rsp), %r9
jmp 0x22b82
xorl %edi, %edi
movq %r14, %rsi
callq 0x301f
movl 0x8(%rbp), %eax
movsd 0x7060(%rip), %xmm4     # 0x2a0e8
movsd 0x6080(%rip), %xmm5     # 0x29110
movsd 0x7058(%rip), %xmm6     # 0x2a0f0
movq 0x148(%rsp), %rsi
incq %rsi
movslq %eax, %rcx
cmpq %rcx, %rsi
jl 0x22112
movq 0xd8(%rsp), %rcx
incq %rcx
cmpq 0x100(%rsp), %rcx
jne 0x220d4
movq 0xa0(%rsp), %rsi
movq 0x98(%rsp), %rbx
jmp 0x230f5
xorl %esi, %esi
movq $0x0, 0x90(%rsp)
movl $0x0, 0xb4(%rsp)
xorl %ebx, %ebx
movq 0x58(%rsp), %r15
movq %r15, %rdi
callq 0x301f
movq 0xf0(%rsp), %rsi
movq %r15, %rdi
callq 0x301f
movq %r15, %rdi
movq 0xe8(%rsp), %rsi
callq 0x301f
movq %r15, %rdi
movq 0x8(%rsp), %rsi
callq 0x301f
movq 0x120(%rsp), %rsi
movq %r15, %rdi
callq 0x301f
movq 0x118(%rsp), %rsi
movq %r15, %rdi
callq 0x301f
movq 0x110(%rsp), %rsi
movq %r15, %rdi
callq 0x301f
movq 0x108(%rsp), %rsi
movq %r15, %rdi
callq 0x301f
movq %rbx, %r12
testl %ebx, %ebx
jle 0x23240
movl 0xc8(%rsp), %ebp
movslq %ebp, %r14
shlq $0x3, %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0x30e5
movq %rax, %rbx
movq %r15, %rdi
movq %r14, %rsi
callq 0x30e5
movq %rax, %r14
testl %ebp, %ebp
movq 0xf8(%rsp), %rcx
movq 0x100(%rsp), %rsi
jle 0x231df
addq $0x10, %rcx
xorl %eax, %eax
movq %rcx, %rdx
movq -0x8(%rcx), %rcx
movq %rcx, (%rbx,%rax,8)
movq (%rdx), %rcx
movq %rcx, (%r14,%rax,8)
movq %rdx, %rcx
incq %rax
addq $0x28, %rcx
cmpq %rax, %rsi
jne 0x231be
movq 0x88(%rsp), %r15
movq %r15, %rdi
movl %r12d, %esi
movq 0x90(%rsp), %r13
movq %r13, %rdx
callq 0xa103
movq %r15, %rdi
movq %rax, %r12
movl %eax, %esi
movq %r13, %rdx
movl 0xc8(%rsp), %ecx
movq %rbx, %r8
movq %r14, %r9
callq 0x9307
movq 0x58(%rsp), %r15
movq %r15, %rdi
movq %r13, %rsi
callq 0x301f
movq %r15, %rdi
movq %rbx, %rsi
callq 0x301f
movq %r15, %rdi
movq %r14, %rsi
callq 0x301f
leaq 0xf1b9(%rip), %rax      # 0x32400
cmpl $0x3, (%rax)
jge 0x2325e
addq $0x158, %rsp            # imm = 0x158
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %r12d, %edi
movl 0xb4(%rsp), %esi
callq 0x28b0
jmp 0x2324c
leaq 0x7009(%rip), %rdi      # 0x2a27f
leaq 0x6eb7(%rip), %rsi      # 0x2a134
leaq 0x6f91(%rip), %rcx      # 0x2a215
movl $0x95, %edx
callq 0x2160
leaq 0x7004(%rip), %rdi      # 0x2a299
leaq 0x6e98(%rip), %rsi      # 0x2a134
leaq 0x6f72(%rip), %rcx      # 0x2a215
movl $0xbe, %edx
callq 0x2160
leaq 0x6fee(%rip), %rdi      # 0x2a2a2
leaq 0x6e79(%rip), %rsi      # 0x2a134
leaq 0x6f53(%rip), %rcx      # 0x2a215
movl $0xc5, %edx
callq 0x2160
leaq 0x6ff2(%rip), %rdi      # 0x2a2c5
leaq 0x6e5a(%rip), %rsi      # 0x2a134
leaq 0x6f34(%rip), %rcx      # 0x2a215
movl $0xc6, %edx
callq 0x2160
leaq 0x686e(%rip), %rdi      # 0x29b60
leaq 0x6e3b(%rip), %rsi      # 0x2a134
leaq 0x6f15(%rip), %rcx      # 0x2a215
movl $0x86, %edx
callq 0x2160