// File: /workspace/github_c_makefile_star2_O1/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 $0x148, %rsp            # imm = 0x148
movq %r9, %r15
movq %r8, 0xd0(%rsp)
movl %ecx, %ebp
movq %rdx, %r8
movq %rsi, %r12
movq %rdi, %r14
movl $0x0, 0xcc(%rsp)
movq $0x0, 0xe8(%rsp)
movl 0xc(%rsi), %esi
movl 0x14(%r12), %ecx
leaq 0xf0(%rsp), %rax
leaq 0xf8(%rsp), %rdx
leaq 0x100(%rsp), %r10
leaq 0x108(%rsp), %r11
leaq 0x140(%rsp), %rbx
movq %r8, 0x90(%rsp)
movl %ebp, %r9d
pushq %rax
pushq %rdx
pushq %r10
pushq %r11
pushq %rbx
movq %r15, 0x140(%rsp)
pushq %r15
callq 0x2197c
addq $0x30, %rsp
testl %eax, %eax
je 0x232f6
movq %r12, 0x10(%rsp)
movl $0x0, 0xc8(%rsp)
movq $0x0, 0xa0(%rsp)
movl %eax, %ebx
leaq (,%rbx,4), %rsi
movq %r14, %rdi
callq 0x31c1
movq %rax, 0xe0(%rsp)
shlq $0x3, %rbx
movq %r14, 0x50(%rsp)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x31c1
movq %rax, %r8
movl %ebp, %r12d
testl %ebp, %ebp
movl %ebp, 0xc0(%rsp)
jle 0x23180
xorl %ebx, %ebx
movsd 0x7fe8(%rip), %xmm4     # 0x2a050
movsd 0x7050(%rip), %xmm5     # 0x290c0
movsd 0x7fe0(%rip), %xmm6     # 0x2a058
xorl %r15d, %r15d
movq $0x0, 0x40(%rsp)
movl $0x0, 0x60(%rsp)
movl $0x0, 0xb4(%rsp)
movq $0x0, 0x98(%rsp)
movq 0xd0(%rsp), %rdx
movq %r8, (%rsp)
movq %r12, 0x110(%rsp)
movq 0x118(%rsp), %rax
movq (%rax,%r15,8), %r13
cmpl $0x0, 0x8(%r13)
jle 0x2316a
leaq (%r15,%r15,4), %rax
leaq (%rdx,%rax,8), %rax
movq %rax, 0xa8(%rsp)
xorl %esi, %esi
movq 0x10(%rsp), %r12
movq %r15, 0x30(%rsp)
movq %r13, 0x18(%rsp)
movq 0x18(%r13), %rdi
imulq $0x68, %rsi, %rax
movl (%rdi,%rax), %ecx
cmpl 0x4(%rdi,%rax), %ecx
jne 0x2315a
addq %rax, %rdi
movl 0x2c(%rdi), %eax
cmpl 0x10(%r12), %eax
jl 0x2315a
movzbl 0x44(%rdi), %eax
cmpl 0xc(%r12), %eax
jl 0x2315a
movq %rsi, 0x138(%rsp)
cmpl $0x0, 0xc(%rdi)
jle 0x23397
movl 0x10(%rdi), %esi
cmpl $0x2, %esi
movq %rdi, 0x28(%rsp)
jl 0x223dc
movq 0x20(%r13), %rdx
movslq 0x8(%rdi), %r10
leaq (%r10,%r10,4), %rax
movslq (%rdx,%rax,4), %rax
movq 0x28(%r13), %r11
movsd 0x140(%rsp), %xmm0
leaq 0x18(%rdx), %rcx
movq %rcx, 0x80(%rsp)
movl $0x0, 0x8(%rsp)
movl $0x1, %r9d
movq %r11, 0x88(%rsp)
leaq 0x1(%rax), %rsi
shlq $0x4, %rax
movq %rsi, %rcx
shlq $0x4, %rcx
movslq %r10d, %rbx
movq %rbx, 0x20(%rsp)
leaq (%rbx,%rbx,4), %r15
movl 0x8(%r11,%rcx), %ebx
movl %ebx, 0x58(%rsp)
movl 0x8(%r11,%rax), %ebp
movq (%r11,%rcx), %r14
movq (%r11,%rax), %rbx
movl 0x8(%rsp), %eax
cmpl %ebp, %eax
cmovlel %ebp, %eax
movl %eax, 0x8(%rsp)
movl 0x4(%rdx,%r15,4), %eax
addl (%rdx,%r15,4), %eax
movq %rsi, 0x48(%rsp)
cmpl %esi, %eax
jne 0x22234
movl 0x8(%rdi), %esi
movl 0xc(%rdi), %eax
leal (%rax,%rsi), %r8d
leal 0x1(%r10), %r12d
cmpl %r8d, %r12d
setl %dil
jge 0x2331b
leaq (%rdx,%r15,4), %rcx
movq %rdx, %r11
movq 0x90(%rsp), %rdx
movq 0x10(%rdx), %r13
movl 0x8(%rcx), %edx
shrl %edx
shlq $0x6, %rdx
movl %ebx, %r15d
notl %r15d
movslq %r12d, %r12
leaq (%r12,%r12,4), %rcx
addl (%r13,%rdx), %r15d
movq %r11, %rdx
cmpl $0x0, 0x4(%r11,%rcx,4)
je 0x22245
movq 0x88(%rsp), %r11
jmp 0x22295
movl %r14d, %r15d
subl %ebx, %r15d
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
jmp 0x222cc
movslq %r8d, %r8
movq 0x80(%rsp), %rdi
leaq (%rdi,%rcx,4), %rdi
subl %eax, %r10d
subl %esi, %r10d
addl $0x2, %r10d
xorl %esi, %esi
movq 0x88(%rsp), %r11
cmpl %esi, %r10d
je 0x2331b
movl -0x10(%rdi), %eax
shrl %eax
shlq $0x6, %rax
decq %rsi
addl (%r13,%rax), %r15d
cmpl $0x0, (%rdi)
leaq 0x14(%rdi), %rdi
je 0x22268
subq %rsi, %r12
cmpq %r8, %r12
setl %dil
testb %dil, %dil
je 0x2331b
movslq %r12d, %rax
leaq (%rax,%rax,4), %rax
movl 0x10(%rdx,%rax,4), %r13d
testl %r13d, %r13d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmovsl %eax, %r13d
leal 0x1(%r14,%r15), %r15d
movl %r12d, %r10d
movq 0x10(%rsp), %r12
movq (%rsp), %r8
movq 0x28(%rsp), %rdi
testb $0x1, (%r12)
movl 0x58(%rsp), %ecx
je 0x222e6
movl $0x1, %eax
cmpl %ecx, 0x8(%rsp)
jg 0x223a0
subl %ebp, %ecx
shrq $0x20, %r14
shrq $0x20, %rbx
notl %ebx
addl %r14d, %ebx
cmpl %ecx, %r15d
jne 0x2230a
testl %ebx, %ebx
jne 0x2230a
xorl %eax, %eax
subl 0x1c(%r12), %eax
jmp 0x223a0
testl %r13d, %r13d
js 0x22355
cmpl %ecx, %r15d
cmovll %r15d, %ecx
xorps %xmm1, %xmm1
cvtss2sd 0x2c(%r12), %xmm1
movapd %xmm4, %xmm2
subsd %xmm1, %xmm2
movapd %xmm5, %xmm1
divsd %xmm2, %xmm1
movapd %xmm6, %xmm2
minsd %xmm1, %xmm2
xorps %xmm1, %xmm1
cvtsi2sd %r13d, %xmm1
xorps %xmm3, %xmm3
cvtsi2sd %ecx, %xmm3
mulsd %xmm2, %xmm1
subsd %xmm3, %xmm1
cvttsd2si %xmm1, %eax
jmp 0x223a0
movl %r15d, %eax
xorps %xmm1, %xmm1
cvtsi2sd %ecx, %xmm1
mulsd %xmm0, %xmm1
subl %ecx, %eax
jle 0x2238f
xorps %xmm2, %xmm2
cvtsi2sd %ebx, %xmm2
maxsd %xmm2, %xmm1
xorps %xmm2, %xmm2
cvtsi2sd %eax, %xmm2
mulsd %xmm0, %xmm2
addsd %xmm1, %xmm2
addsd 0x70b7(%rip), %xmm2     # 0x29440
cvttsd2si %xmm2, %eax
jmp 0x223a0
addsd 0x70a9(%rip), %xmm1     # 0x29440
cvttsd2si %xmm1, %eax
cmpl %eax, %ebx
cmovgl %ebx, %eax
movq 0xe0(%rsp), %rcx
movl %eax, -0x4(%rcx,%r9,4)
shlq $0x20, %r15
orq 0x20(%rsp), %r15
movq %r15, -0x8(%r8,%r9,8)
incq %r9
movslq 0x10(%rdi), %rsi
cmpq %rsi, %r9
movq 0x48(%rsp), %rax
jl 0x22186
xorl %ebx, %ebx
movq 0x30(%rsp), %r15
movq 0x18(%rsp), %r13
decl %esi
xorl %edi, %edi
movq 0xe0(%rsp), %rdx
movl $0xa, %ecx
xorl %r8d, %r8d
leaq 0xc4(%rsp), %r9
callq 0x3878
movq %rax, %r14
cmpl $0x0, 0xc4(%rsp)
jle 0x23124
movq 0x20(%r13), %rax
movq 0x28(%rsp), %rdi
movslq 0x8(%rdi), %rcx
leaq (%rcx,%rcx,4), %rcx
movl (%rax,%rcx,4), %ebp
xorl %r9d, %r9d
movq (%rsp), %r8
movq %r14, 0x20(%rsp)
movq %rbp, 0x48(%rsp)
movl 0x24(%r12), %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(%r12), %xmm1
ucomiss %xmm0, %xmm1
cvttss2si %xmm1, %edx
cmovbel %eax, %edx
movslq (%r14,%rcx,4), %rax
cmpl %edx, %eax
jle 0x227d4
leaq (%r14,%rcx,4), %rcx
movslq 0x4(%rcx), %rcx
notl %edx
addl 0x10(%rdi), %edx
cmpl %edx, %ecx
jge 0x227d4
movq 0x28(%r13), %rdi
leal (%rcx,%rbp), %edx
movslq %edx, %rsi
shlq $0x4, %rsi
movq 0x8(%rdi,%rsi), %r11
movl %r15d, 0x7c(%rsp)
movq (%r8,%rax,8), %rbx
movq (%r8,%rcx,8), %r10
cmpl %r10d, %ebx
jg 0x23378
movq %r9, 0x8(%rsp)
leal (%rax,%rbp), %edx
movslq %edx, %r15
movq %rsi, 0x58(%rsp)
leaq (%rdi,%rsi), %r8
movq %r11, %rdx
shrq $0x20, %rdx
movzbl %dl, %r14d
shlq $0x4, %r15
movq 0x20(%r13), %rsi
movslq %ebx, %rdx
leaq (%rdx,%rdx,4), %rdx
movl 0x8(%rsi,%rdx,4), %edx
movl %edx, 0x64(%rsp)
movq %r10, 0x80(%rsp)
movslq %r10d, %r9
leaq (%r9,%r9,4), %r9
movl 0x8(%rsi,%r9,4), %esi
movl %esi, 0x68(%rsp)
movq %r11, %r9
movl (%rdi,%r15), %r11d
subl %r14d, %r11d
incl %r11d
movl %r11d, 0x6c(%rsp)
movl (%r8), %r8d
leal 0x1(%r8), %r10d
movq %r10, 0xd8(%rsp)
movl %r10d, 0x70(%rsp)
movq %r15, 0x88(%rsp)
movl 0x8(%rdi,%r15), %r10d
subl %r14d, %r10d
leal 0x1(%r10), %r15d
movl %r15d, 0x74(%rsp)
movq %r9, %r12
leal 0x1(%r9), %ebp
movl %ebp, 0x78(%rsp)
movq 0x90(%rsp), %rdi
movq 0x10(%rdi), %r13
movl %edx, %r9d
shrl %r9d
shlq $0x6, %r9
cmpl (%r13,%r9), %r11d
jg 0x2333a
movq %rbx, 0xb8(%rsp)
movl %esi, %ebx
shrl %ebx
shlq $0x6, %rbx
cmpl %r8d, (%r13,%rbx)
jle 0x23359
cmpl %ecx, %eax
movq (%rsp), %r8
jge 0x22596
addl 0x4(%r8,%rax,8), %r14d
incq %rax
cmpq %rax, %rcx
jne 0x22589
cmpl %ebp, %r15d
jle 0x22659
leaq 0xfe5a(%rip), %rax      # 0x32400
cmpl $0x2, (%rax)
movq 0x28(%rsp), %rdi
jl 0x22781
movl %r10d, %eax
movq %r12, %rcx
subl %ecx, %eax
addl %r14d, %eax
movq 0x10(%rsp), %r12
cmpl 0x18(%r12), %eax
jl 0x22786
movq 0xfa22(%rip), %rax      # 0x31ff8
movq (%rax), %rdi
andl $0x1, %edx
leaq 0x60c7(%rip), %rax      # 0x286aa
movsbl (%rdx,%rax), %r8d
movq 0x18(%r13,%r9), %r9
andl $0x1, %esi
movsbl (%rsi,%rax), %r12d
subl %r10d, %ecx
subq $0x8, %rsp
leaq 0x7c4d(%rip), %rsi      # 0x2a250
leaq 0x7c92(%rip), %rdx      # 0x2a29c
movq %rcx, %r10
movq 0x38(%rsp), %rcx
xorl %eax, %eax
pushq %r10
pushq %rbp
pushq %r15
movq %rcx, %r15
movq 0xc8(%rsp), %r10
pushq 0x8(%r10)
pushq %r14
pushq 0x108(%rsp)
pushq 0x18(%r13,%rbx)
pushq %r12
movq 0x58(%rsp), %r12
pushq %r11
callq 0x2210
movq 0x78(%rsp), %rdi
movq 0x50(%rsp), %r8
addq $0x50, %rsp
xorl %ebx, %ebx
jmp 0x2278d
movq 0x10(%rsp), %rax
movl 0x20(%rax), %esi
movq 0xa8(%rsp), %rbx
movq 0x10(%rbx), %rcx
movq 0x90(%rsp), %rdi
leaq 0x64(%rsp), %rdx
callq 0x9a9f
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
movq 0x48(%rsp), %rbp
jle 0x2279e
movl (%rbx), %esi
subl %edx, %esi
cmpl %esi, %r8d
movq 0x30(%rsp), %r15
movq 0x18(%rsp), %r13
movq 0x28(%rsp), %rdi
movq 0x8(%rsp), %r9
jge 0x227c4
movq 0x10(%rsp), %rdx
movl 0x18(%rdx), %edx
cmpl %edx, %eax
jge 0x226dc
cmpl %edx, %r14d
jl 0x227c4
movl %ecx, %eax
cmpl %ecx, %r8d
jle 0x22706
movslq %ecx, %rdx
addq 0x10(%rbx), %rdx
movl %ecx, %eax
movb (%rdx), %sil
andb $-0x21, %sil
cmpb $0x4e, %sil
je 0x22706
incl %eax
incq %rdx
cmpl %eax, %r8d
jne 0x226ec
movl %r8d, %eax
cmpl %r8d, %eax
jne 0x227c4
movq 0x100(%rsp), %rax
movl 0x4(%rax,%r15,4), %esi
movslq (%rax,%r15,4), %rdx
subl %edx, %esi
shlq $0x4, %rdx
addq 0xf0(%rsp), %rdx
subq $0x8, %rsp
movq 0x58(%rsp), %rdi
leaq 0xf0(%rsp), %r9
leaq 0xd4(%rsp), %rax
pushq %rax
callq 0x3fb0
addq $0x10, %rsp
cmpl $0x1, %eax
je 0x227ed
testl %eax, %eax
movq (%rsp), %r8
movl $0x0, %ebx
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %r14
movq 0x8(%rsp), %r9
je 0x22b9d
movq 0x10(%rsp), %r12
jmp 0x227d4
movq 0x10(%rsp), %r12
xorl %ebx, %ebx
movq 0x30(%rsp), %r15
movq 0x18(%rsp), %r13
movq 0x20(%rsp), %r14
movq 0x48(%rsp), %rbp
jmp 0x227bd
movq 0x10(%rsp), %r12
movq (%rsp), %r8
xorl %ebx, %ebx
movq 0x30(%rsp), %r15
movq 0x18(%rsp), %r13
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %r14
movq 0x8(%rsp), %r9
jmp 0x227d4
movq 0x10(%rsp), %r12
movq (%rsp), %r8
xorl %ebx, %ebx
movq 0x20(%rsp), %r14
incq %r9
movslq 0xc4(%rsp), %rax
cmpq %rax, %r9
jl 0x22433
jmp 0x23124
movq 0x80(%rsp), %rax
cmpl %eax, 0xb8(%rsp)
movq (%rsp), %r8
movq 0x8(%rsp), %r9
jg 0x2294b
movq 0x108(%rsp), %rax
movq %rax, 0x128(%rsp)
movq 0xf8(%rsp), %rax
movq %rax, 0xd8(%rsp)
movq 0xb8(%rsp), %rcx
movslq %ecx, %rax
movq 0x80(%rsp), %rdx
movslq %edx, %rsi
subq %rax, %rsi
movq %rsi, 0x130(%rsp)
shlq $0x2, %rax
leaq (%rax,%rax,4), %rsi
subl %ecx, %edx
incl %edx
movq %rdx, 0x120(%rsp)
xorl %r15d, %r15d
xorl %eax, %eax
testq %r15, %r15
jne 0x22882
movq 0x28(%r13), %rcx
movq 0x88(%rsp), %rdx
movl (%rcx,%rdx), %eax
movzbl 0xc(%rcx,%rdx), %ecx
subl %ecx, %eax
incl %eax
movq 0x20(%r13), %rcx
movq %rsi, %r12
movl 0x8(%rcx,%rsi), %edx
movq 0x90(%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, 0x130(%rsp)
jne 0x228c1
movq 0x28(%r13), %rsi
movq 0x58(%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 0x128(%rsp), %rdx
movl 0x4(%rdx,%rax,4), %esi
movslq (%rdx,%rcx,4), %rdx
subl %edx, %esi
shlq $0x4, %rdx
addq 0xd8(%rsp), %rdx
subq $0x8, %rsp
movq 0x58(%rsp), %rdi
movl %r13d, %ecx
movl %ebx, %r8d
leaq 0xf0(%rsp), %r9
leaq 0xd4(%rsp), %rax
pushq %rax
callq 0x3fb0
addq $0x10, %rsp
cmpl $0x1, %eax
jne 0x22a77
incq %r15
movq %r12, %rsi
addq $0x14, %rsi
cmpl %r15d, 0x120(%rsp)
movq (%rsp), %r8
movq 0x18(%rsp), %r13
movq 0x8(%rsp), %r9
jne 0x22863
movl 0x78(%rsp), %r13d
subl 0x74(%rsp), %r13d
movl %r14d, %ecx
subl %r13d, %ecx
movq 0x10(%rsp), %r12
movl 0x18(%r12), %eax
xorl %edx, %edx
cmpl %eax, %ecx
jge 0x22aa3
movl %r13d, %ecx
subl %r14d, %ecx
cmpl %eax, %ecx
movq 0x30(%rsp), %r15
movq 0x48(%rsp), %rbp
jge 0x22bfc
movl %r13d, 0x58(%rsp)
movq 0x50(%rsp), %rbx
movq %rbx, %rdi
movq 0x90(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq 0xb8(%rsp), %rcx
movq 0x80(%rsp), %r8
leaq 0x6c(%rsp), %r9
leaq 0xc8(%rsp), %rax
pushq %rax
leaq 0xa8(%rsp), %rax
pushq %rax
callq 0x24e25
addq $0x10, %rsp
movl %eax, %r13d
movq 0xa0(%rsp), %rdx
movslq 0x74(%rsp), %r8
movq 0xa8(%rsp), %rax
addq 0x10(%rax), %r8
movq %rbx, %rdi
movl %r13d, %esi
movl 0x58(%rsp), %ecx
movl $0x1388, %r9d           # imm = 0x1388
leaq 0x38(%rsp), %rax
pushq %rax
leaq 0x44(%rsp), %rax
pushq %rax
callq 0x4267
addq $0x10, %rsp
testl %eax, %eax
jle 0x22ab2
movl 0x3c(%rsp), %eax
cvtsi2ss %eax, %xmm1
movl 0x38(%rsp), %ecx
cvtsi2ss %ecx, %xmm2
movss 0x2c(%r12), %xmm0
mulss %xmm0, %xmm2
xorl %edx, %edx
ucomiss %xmm2, %xmm1
movl $0x0, %ebx
movq (%rsp), %r8
movq 0x8(%rsp), %r9
ja 0x22bf4
subl %eax, %ecx
xorps %xmm1, %xmm1
cvtsi2ss %ecx, %xmm1
xorps %xmm2, %xmm2
cvtsi2ssl 0x18(%r12), %xmm2
mulss %xmm2, %xmm0
xorl %edx, %edx
ucomiss %xmm1, %xmm0
jbe 0x22be5
xorl %ebx, %ebx
jmp 0x22bf4
testl %eax, %eax
movq (%rsp), %r8
movq 0x28(%rsp), %rdi
movq 0x8(%rsp), %r9
je 0x230b8
movq 0x10(%rsp), %r12
xorl %ebx, %ebx
movq 0x30(%rsp), %r15
movq 0x18(%rsp), %r13
jmp 0x22e5f
movq 0x30(%rsp), %r15
movq 0x48(%rsp), %rbp
jmp 0x22bfc
movb $0x1, %bl
xorl %edx, %edx
testb $0x4, (%r12)
leaq 0xf73e(%rip), %r10      # 0x32200
jne 0x22b92
movq 0xa0(%rsp), %rax
movl %r13d, %ecx
sarl %ecx
testl %ecx, %ecx
jle 0x22b09
movl %ecx, %edx
leal -0x1(%r13), %r11d
xorl %edi, %edi
movslq %r11d, %r11
movsbq (%rax,%r11), %r8
movzbl (%rax,%rdi), %r9d
movb (%r10,%r9), %r9b
movb %r9b, (%rax,%r11)
movb (%r10,%r8), %r8b
movb %r8b, (%rax,%rdi)
incq %rdi
decl %r11d
cmpq %rdi, %rdx
jne 0x22ae1
testb $0x1, %r13b
je 0x22b1d
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 0x50(%rsp), %rdi
movl %r13d, %esi
movl 0x58(%rsp), %ecx
movl $0x1388, %r9d           # imm = 0x1388
leaq 0x38(%rsp), %rax
pushq %rax
leaq 0x44(%rsp), %rax
pushq %rax
callq 0x4267
addq $0x10, %rsp
testl %eax, %eax
jle 0x22be9
cvtsi2ssl 0x3c(%rsp), %xmm0
cvtsi2ssl 0x38(%rsp), %xmm1
mulss 0x30(%r12), %xmm1
ucomiss %xmm1, %xmm0
movq (%rsp), %r8
movq 0x8(%rsp), %r9
movl $0x0, %edx
jbe 0x22bf4
movl $0x1, %edx
jmp 0x22bf4
movq (%rsp), %r8
movq 0x8(%rsp), %r9
jmp 0x22bf4
movq 0xf454(%rip), %rax      # 0x31ff8
movq (%rax), %rdi
movq 0xa8(%rsp), %rax
movq 0x8(%rax), %rcx
movl 0x74(%rsp), %r8d
movl 0x78(%rsp), %r9d
leaq 0x76e4(%rip), %rsi      # 0x2a2a8
leaq 0x76d1(%rip), %rdx      # 0x2a29c
xorl %eax, %eax
callq 0x2210
movq 0x8(%rsp), %r9
movq 0x28(%rsp), %rdi
movq (%rsp), %r8
jmp 0x2277a
movb $0x1, %bl
jmp 0x22bf4
movq (%rsp), %r8
movq 0x8(%rsp), %r9
xorl %edx, %edx
testb %bl, %bl
je 0x22d2e
leaq 0xfa75(%rip), %rax      # 0x32678
testb $0x10, (%rax)
movq 0x50(%rsp), %rdi
jne 0x22ec1
testl %edx, %edx
je 0x22cdd
movl 0x7c(%rsp), %r10d
movl 0x74(%rsp), %r8d
movl 0x64(%rsp), %r14d
movl 0x68(%rsp), %r11d
movl 0x6c(%rsp), %r12d
movq 0x90(%rsp), %rax
movq 0x10(%rax), %rax
movl %r11d, %ecx
shrl %ecx
shlq $0x6, %rcx
movl (%rax,%rcx), %r13d
movl 0x70(%rsp), %ebp
movl 0x78(%rsp), %ecx
movl %ecx, 0x58(%rsp)
movl %r14d, %ecx
shrl %ecx
shlq $0x6, %rcx
movl (%rax,%rcx), %eax
movl %eax, 0x80(%rsp)
movl 0x60(%rsp), %edi
cmpl %edi, 0x40(%rsp)
movl %r12d, 0x88(%rsp)
jne 0x22d3f
movl %edi, %ebx
sarl %ebx
addl %edi, %ebx
cmpl $0x4, %edi
movl $0x10, %eax
cmovll %eax, %ebx
movslq %ebx, %rax
leaq (%rax,%rax,8), %rcx
leaq (%rcx,%rcx,2), %rdx
addq %rax, %rdx
movq 0x50(%rsp), %rdi
movq 0x98(%rsp), %rsi
movl %ebp, 0xb8(%rsp)
movl %r10d, %ebp
movl %r11d, %r15d
movl %r8d, %r12d
callq 0x32c4
movl %r12d, %r8d
movl %r15d, %r11d
movl %ebp, %r10d
movl 0xb8(%rsp), %ebp
movl 0x88(%rsp), %r12d
movl %ebx, %edi
jmp 0x22d47
movl 0x60(%rsp), %eax
cmpl %eax, 0x40(%rsp)
jne 0x22e6e
movl %eax, %ebx
sarl %ebx
addl %eax, %ebx
cmpl $0x4, %eax
movl $0x10, %eax
cmovll %eax, %ebx
movslq %ebx, %rax
leaq (%rax,%rax,8), %rcx
leaq (%rcx,%rcx,2), %rdx
addq %rax, %rdx
movq 0x50(%rsp), %rdi
movq 0x98(%rsp), %rsi
callq 0x32c4
movq 0x8(%rsp), %r9
movq (%rsp), %r8
movl %ebx, 0x60(%rsp)
jmp 0x22e76
xorl %ebx, %ebx
movq 0x18(%rsp), %r13
movq 0x28(%rsp), %rdi
jmp 0x227cf
movq 0x98(%rsp), %rax
movl %r11d, %esi
xorl $0x1, %esi
subl %ebp, %r13d
movq 0x40(%rsp), %rcx
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 %r10d, 0x18(%rax,%rdx)
cmpl %edi, %ebx
jne 0x22ddf
movl %edi, %r15d
sarl %r15d
addl %edi, %r15d
cmpl $0x4, %edi
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 0x50(%rsp), %rdi
movl %ebp, %r12d
movl %r10d, %ebp
movl %r11d, %r13d
callq 0x32c4
movl %r13d, %r11d
movl %ebp, %r10d
movl %r12d, %ebp
movl 0x88(%rsp), %r12d
movq %rax, %rdx
movl %r15d, 0x60(%rsp)
jmp 0x22de6
movl %edi, 0x60(%rsp)
movq %rax, %rdx
movq (%rsp), %r8
movq 0x30(%rsp), %r15
movq 0x18(%rsp), %r13
movq 0x8(%rsp), %r9
xorl $0x1, %r14d
movl 0x80(%rsp), %esi
subl %r12d, %esi
movq 0x40(%rsp), %rax
addl $0x2, %eax
movq %rax, 0x40(%rsp)
movslq %ebx, %rax
leaq (%rax,%rax,8), %rcx
leaq (%rcx,%rcx,2), %rcx
addq %rax, %rcx
movl %r14d, (%rdx,%rcx)
movl %r11d, 0x4(%rdx,%rcx)
movl %esi, 0x8(%rdx,%rcx)
movl %ebp, 0xc(%rdx,%rcx)
movl 0x58(%rsp), %eax
movl %eax, 0x10(%rdx,%rcx)
movl %eax, 0x14(%rdx,%rcx)
movq %rdx, 0x98(%rsp)
movl %r10d, 0x18(%rdx,%rcx)
incl 0xb4(%rsp)
movq 0x10(%rsp), %r12
xorl %ebx, %ebx
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %r14
movq 0x48(%rsp), %rbp
jmp 0x227d4
movq 0x98(%rsp), %rax
xorl %ebx, %ebx
movq 0x18(%rsp), %r13
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %r14
movq 0x40(%rsp), %rcx
movslq %ecx, %rdx
incl %ecx
movq %rcx, 0x40(%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, 0x98(%rsp)
movups %xmm0, (%rax,%rcx)
jmp 0x227d4
movslq 0x78(%rsp), %r15
movslq 0x74(%rsp), %rax
subq %rax, %r15
movq 0x90(%rsp), %rbx
movq %rbx, %rsi
movq %rdx, %r13
movq 0x18(%rsp), %rdx
movq 0xb8(%rsp), %rcx
movq 0x80(%rsp), %r8
leaq 0x6c(%rsp), %r9
leaq 0xc8(%rsp), %rax
pushq %rax
leaq 0xa8(%rsp), %rax
pushq %rax
callq 0x24e25
addq $0x10, %rsp
movl %eax, 0x58(%rsp)
movq 0xf0dc(%rip), %rax      # 0x31ff8
movq (%rax), %rdi
movl 0x64(%rsp), %eax
movl 0x68(%rsp), %r10d
movl %eax, %ecx
andl $0x1, %ecx
leaq 0x5776(%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), %r12d
movl 0x78(%rsp), %ebx
movl %ebx, %ebp
subl %r12d, %ebp
leaq 0x7395(%rip), %rsi      # 0x2a314
xorl %eax, %eax
movq %r13, 0x88(%rsp)
pushq %r13
pushq %rbp
pushq %rbx
pushq %r12
movq 0x30(%rsp), %r12
movq 0xc8(%rsp), %rbx
pushq 0x8(%rbx)
pushq %r14
pushq 0xb0(%rsp)
pushq 0x18(%r11,%r10)
callq 0x2210
addq $0x40, %rsp
movq 0xf03b(%rip), %r13      # 0x31ff8
movq (%r13), %rdi
movq 0xa0(%rsp), %rdx
leaq 0x7376(%rip), %rsi      # 0x2a346
xorl %eax, %eax
callq 0x2210
movslq 0x74(%rsp), %rdi
addq 0x10(%rbx), %rdi
movq (%r13), %rcx
movl $0x1, %esi
movq %r15, %rdx
callq 0x2340
movl %r14d, %ecx
subl %r15d, %ecx
movl 0x18(%r12), %eax
cmpl %eax, %ecx
jge 0x23049
movl %r15d, %ecx
subl %r14d, %ecx
cmpl %eax, %ecx
jge 0x23049
movq 0xa0(%rsp), %rdx
movslq 0x74(%rsp), %r8
addq 0x10(%rbx), %r8
movq 0x50(%rsp), %rdi
movl 0x58(%rsp), %ebx
movl %ebx, %esi
movl %r15d, %ecx
movl $0x1388, %r9d           # imm = 0x1388
leaq 0x38(%rsp), %rax
pushq %rax
leaq 0x44(%rsp), %rax
pushq %rax
callq 0x4267
addq $0x10, %rsp
movl %eax, %r8d
jmp 0x23067
movl $0x0, 0x3c(%rsp)
cmpl %r15d, %r14d
cmovgl %r14d, %r15d
movl %r15d, 0x38(%rsp)
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
movl 0x58(%rsp), %ebx
movq 0xef8a(%rip), %rax      # 0x31ff8
movq (%rax), %rdi
movl 0x3c(%rsp), %r9d
movl 0x38(%rsp), %r10d
subq $0x8, %rsp
leaq 0x72ca(%rip), %rsi      # 0x2a350
movl %r14d, %edx
movl %ebx, %ecx
xorl %eax, %eax
pushq %r10
callq 0x2210
addq $0x10, %rsp
movq (%rsp), %r8
movq 0x30(%rsp), %r15
movq 0x48(%rsp), %rbp
movq 0x8(%rsp), %r9
movq 0x88(%rsp), %rdx
jmp 0x22c11
movq 0xef39(%rip), %rax      # 0x31ff8
movq (%rax), %rdi
movq 0x90(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x18(%rax,%rbp), %rcx
movl 0x74(%rsp), %r10d
movl 0x78(%rsp), %r11d
subq $0x8, %rsp
leaq 0x71f0(%rip), %rsi      # 0x2a2d8
leaq 0x71ad(%rip), %rdx      # 0x2a29c
movl %r13d, %r8d
movl %ebx, %r9d
xorl %eax, %eax
pushq %r11
pushq %r10
movq 0xc0(%rsp), %r10
pushq 0x8(%r10)
callq 0x2210
movq 0x28(%rsp), %r9
movq 0x48(%rsp), %rdi
movq 0x20(%rsp), %r8
addq $0x20, %rsp
jmp 0x22a8d
xorl %edi, %edi
movq %r14, %rsi
callq 0x30f6
movq (%rsp), %r8
movq 0xd0(%rsp), %rdx
movsd 0x6f0e(%rip), %xmm4     # 0x2a050
movsd 0x5f76(%rip), %xmm5     # 0x290c0
movsd 0x6f06(%rip), %xmm6     # 0x2a058
movq 0x138(%rsp), %rsi
incq %rsi
movslq 0x8(%r13), %rax
cmpq %rax, %rsi
jl 0x220ef
incq %r15
movq 0x110(%rsp), %r12
cmpq %r12, %r15
jne 0x220b7
jmp 0x231a0
movq $0x0, 0x98(%rsp)
movl $0x0, 0xb4(%rsp)
movq $0x0, 0x40(%rsp)
movq 0xa0(%rsp), %rsi
movq 0x50(%rsp), %r15
movq %r15, %rdi
movq %r8, %rbx
callq 0x30f6
movq 0xe8(%rsp), %rsi
movq %r15, %rdi
callq 0x30f6
movq %r15, %rdi
movq 0xe0(%rsp), %rsi
callq 0x30f6
movq %r15, %rdi
movq %rbx, %rsi
callq 0x30f6
movq 0x108(%rsp), %rsi
movq %r15, %rdi
callq 0x30f6
movq 0x100(%rsp), %rsi
movq %r15, %rdi
callq 0x30f6
movq 0xf8(%rsp), %rsi
movq %r15, %rdi
callq 0x30f6
movq 0xf0(%rsp), %rsi
movq %r15, %rdi
callq 0x30f6
cmpl $0x0, 0x40(%rsp)
jle 0x232ea
movl 0xc0(%rsp), %ebp
movslq %ebp, %r14
shlq $0x3, %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0x31c1
movq %rax, %rbx
movq %r15, %rdi
movq %r14, %rsi
callq 0x31c1
movq %rax, %r14
testl %ebp, %ebp
movq 0xd0(%rsp), %rdx
jle 0x23285
addq $0x10, %rdx
xorl %eax, %eax
movq -0x8(%rdx), %rcx
movq %rcx, (%rbx,%rax,8)
movq (%rdx), %rcx
movq %rcx, (%r14,%rax,8)
incq %rax
addq $0x28, %rdx
cmpq %rax, %r12
jne 0x2326a
movq 0x90(%rsp), %r15
movq %r15, %rdi
movq 0x40(%rsp), %rsi
movq 0x98(%rsp), %r12
movq %r12, %rdx
callq 0x9d0c
movq %r15, %rdi
movq %rax, 0x40(%rsp)
movl %eax, %esi
movq %r12, %rdx
movl 0xc0(%rsp), %ecx
movq %rbx, %r8
movq %r14, %r9
callq 0x8f07
movq 0x50(%rsp), %r15
movq %r15, %rdi
movq %r12, %rsi
callq 0x30f6
movq %r15, %rdi
movq %rbx, %rsi
callq 0x30f6
movq %r15, %rdi
movq %r14, %rsi
callq 0x30f6
leaq 0xf10f(%rip), %rax      # 0x32400
cmpl $0x3, (%rax)
jge 0x23308
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x40(%rsp), %rdi
movl 0xb4(%rsp), %esi
callq 0x297a
jmp 0x232f6
leaq 0x6ec5(%rip), %rdi      # 0x2a1e7
leaq 0x6d73(%rip), %rsi      # 0x2a09c
leaq 0x6e4d(%rip), %rcx      # 0x2a17d
movl $0x95, %edx
callq 0x2160
leaq 0x6ec9(%rip), %rdi      # 0x2a20a
leaq 0x6d54(%rip), %rsi      # 0x2a09c
leaq 0x6e2e(%rip), %rcx      # 0x2a17d
movl $0xc5, %edx
callq 0x2160
leaq 0x6ecd(%rip), %rdi      # 0x2a22d
leaq 0x6d35(%rip), %rsi      # 0x2a09c
leaq 0x6e0f(%rip), %rcx      # 0x2a17d
movl $0xc6, %edx
callq 0x2160
leaq 0x6e82(%rip), %rdi      # 0x2a201
leaq 0x6d16(%rip), %rsi      # 0x2a09c
leaq 0x6df0(%rip), %rcx      # 0x2a17d
movl $0xbe, %edx
callq 0x2160
leaq 0x6716(%rip), %rdi      # 0x29ab4
leaq 0x6cf7(%rip), %rsi      # 0x2a09c
leaq 0x6dd1(%rip), %rcx      # 0x2a17d
movl $0x86, %edx
callq 0x2160