// File: /workspace/github_c_makefile_star2_O2/lh3[P]minimap2/align.c
// Function: mm_align1
static void mm_align1(void *km, const mm_mapopt_t *opt, const mm_idx_t *mi, int qlen, uint8_t *qseq0[2], mm_reg1_t *r, mm_reg1_t *r2, int n_a, mm128_t *a, ksw_extz_t *ez, int splice_flag)
{
	int is_sr = !!(opt->flag & MM_F_SR), is_splice = !!(opt->flag & MM_F_SPLICE), is_sr_rna = (!!(opt->flag & MM_F_SR_RNA) && is_splice);
	int32_t rid = a[r->as].x<<1>>33, rev = a[r->as].x>>63, as1, cnt1;
	uint8_t *tseq, *qseq, *junc, *tseq2 = 0, *junc2 = 0;
	int32_t i, l, bw, bw_long, dropped = 0, ksw_flag = 0, rs0, re0, qs0, qe0;
	int32_t rs, re, qs, qe;
	int32_t rs1, qs1, re1, qe1;
	int8_t mat[25];

	if (is_sr) assert(!(mi->flag & MM_I_HPC)); // HPC won't work with SR because with HPC we can't easily tell if there is a gap

	r2->cnt = 0;
	if (r->cnt == 0) return;
	ksw_gen_ts_mat(5, mat, opt->a, opt->b, opt->transition, opt->sc_ambi);
	bw = (int)(opt->bw * 1.5 + 1.);
	bw_long = (int)(opt->bw_long * 1.5 + 1.);
	if (bw_long < bw) bw_long = bw;

	if (is_sr && !(mi->flag & MM_I_HPC)) {
		mm_max_stretch(r, a, &as1, &cnt1);
		rs = (int32_t)a[as1].x + 1 - (int32_t)(a[as1].y>>32&0xff);
		qs = (int32_t)a[as1].y + 1 - (int32_t)(a[as1].y>>32&0xff);
		re = (int32_t)a[as1+cnt1-1].x + 1;
		qe = (int32_t)a[as1+cnt1-1].y + 1;
	} else {
		if (!(opt->flag & MM_F_NO_END_FLT)) {
			if (is_splice)
				mm_fix_bad_ends_splice(km, opt, mi, r, mat, qlen, qseq0, a, &as1, &cnt1);
			else
				mm_fix_bad_ends(r, a, opt->bw, opt->min_chain_score * 2, &as1, &cnt1);
		} else as1 = r->as, cnt1 = r->cnt;
		mm_filter_bad_seeds(km, as1, cnt1, a, 10, 40, opt->max_gap>>1, 10);
		mm_filter_bad_seeds_alt(km, as1, cnt1, a, 30, opt->max_gap>>1);
		mm_adjust_minier(mi, qseq0, &a[as1], &rs, &qs);
		mm_adjust_minier(mi, qseq0, &a[as1 + cnt1 - 1], &re, &qe);
	}
	assert(cnt1 > 0);

	if (is_splice) {
		if (splice_flag & MM_F_SPLICE_FOR) ksw_flag |= rev? KSW_EZ_SPLICE_REV : KSW_EZ_SPLICE_FOR;
		if (splice_flag & MM_F_SPLICE_REV) ksw_flag |= rev? KSW_EZ_SPLICE_FOR : KSW_EZ_SPLICE_REV;
		if (opt->flag & MM_F_SPLICE_FLANK) ksw_flag |= KSW_EZ_SPLICE_FLANK;
		if (mi->spsc) ksw_flag |= KSW_EZ_SPLICE_SCORE;
	}

	/* Look for the start and end of regions to perform DP. This sounds easy
	 * but is in fact tricky. Excessively small regions lead to unnecessary
	 * clippings and lose alignable sequences. Excessively large regions
	 * occasionally lead to large overlaps between two chains and may cause
	 * loss of alignments in corner cases. */
	if (is_sr) {
		qs0 = 0, qe0 = qlen;
		l = qs;
		l += l * opt->a + opt->end_bonus > opt->q? (l * opt->a + opt->end_bonus - opt->q) / opt->e : 0;
		rs0 = rs - l > 0? rs - l : 0;
		l = qlen - qe;
		l += l * opt->a + opt->end_bonus > opt->q? (l * opt->a + opt->end_bonus - opt->q) / opt->e : 0;
		re0 = re + l < (int32_t)mi->seq[rid].len? re + l : mi->seq[rid].len;
	} else {
		// compute rs0 and qs0
		rs0 = (int32_t)a[r->as].x + 1 - (int32_t)(a[r->as].y>>32&0xff);
		qs0 = (int32_t)a[r->as].y + 1 - (int32_t)(a[r->as].y>>32&0xff);
		if (rs0 < 0) rs0 = 0; // this may happen when HPC is in use
		assert(qs0 >= 0); // this should never happen, or it is logic error
		rs1 = qs1 = 0;
		for (i = r->as - 1, l = 0; i >= 0 && a[i].x>>32 == a[r->as].x>>32; --i) { // inspect nearby seeds
			int32_t x = (int32_t)a[i].x + 1 - (int32_t)(a[i].y>>32&0xff);
			int32_t y = (int32_t)a[i].y + 1 - (int32_t)(a[i].y>>32&0xff);
			if (x < rs0 && y < qs0) {
				if (++l > opt->min_cnt) {
					l = rs0 - x > qs0 - y? rs0 - x : qs0 - y;
					rs1 = rs0 - l, qs1 = qs0 - l;
					if (rs1 < 0) rs1 = 0; // not strictly necessary; better have this guard for explicit
					break;
				}
			}
		}
		if (qs > 0 && rs > 0) {
			l = qs < opt->max_gap? qs : opt->max_gap;
			qs1 = qs1 > qs - l? qs1 : qs - l;
			qs0 = qs0 < qs1? qs0 : qs1; // at least include qs0
			l += l * opt->a > opt->q? (l * opt->a - opt->q) / opt->e : 0;
			l = l < opt->max_gap? l : opt->max_gap;
			l = l < rs? l : rs;
			rs1 = rs1 > rs - l? rs1 : rs - l;
			rs0 = rs0 < rs1? rs0 : rs1;
			rs0 = rs0 < rs? rs0 : rs;
		} else rs0 = rs, qs0 = qs;
		// compute re0 and qe0
		re0 = (int32_t)a[r->as + r->cnt - 1].x + 1;
		qe0 = (int32_t)a[r->as + r->cnt - 1].y + 1;
		re1 = mi->seq[rid].len, qe1 = qlen;
		for (i = r->as + r->cnt, l = 0; i < n_a && a[i].x>>32 == a[r->as].x>>32; ++i) { // inspect nearby seeds
			int32_t x = (int32_t)a[i].x + 1;
			int32_t y = (int32_t)a[i].y + 1;
			if (x > re0 && y > qe0) {
				if (++l > opt->min_cnt) {
					l = x - re0 > y - qe0? x - re0 : y - qe0;
					re1 = re0 + l, qe1 = qe0 + l;
					break;
				}
			}
		}
		if (qe < qlen && re < (int32_t)mi->seq[rid].len) {
			l = qlen - qe < opt->max_gap? qlen - qe : opt->max_gap;
			qe1 = qe1 < qe + l? qe1 : qe + l;
			qe0 = qe0 > qe1? qe0 : qe1; // at least include qe0
			l += l * opt->a > opt->q? (l * opt->a - opt->q) / opt->e : 0;
			l = l < opt->max_gap? l : opt->max_gap;
			l = l < (int32_t)mi->seq[rid].len - re? l : mi->seq[rid].len - re;
			re1 = re1 < re + l? re1 : re + l;
			re0 = re0 > re1? re0 : re1;
		} else re0 = re, qe0 = qe;
	}
	if (a[r->as].y & MM_SEED_SELF) {
		int max_ext = r->qs > r->rs? r->qs - r->rs : r->rs - r->qs;
		if (r->rs - rs0 > max_ext) rs0 = r->rs - max_ext;
		if (r->qs - qs0 > max_ext) qs0 = r->qs - max_ext;
		max_ext = r->qe > r->re? r->qe - r->re : r->re - r->qe;
		if (re0 - r->re > max_ext) re0 = r->re + max_ext;
		if (qe0 - r->qe > max_ext) qe0 = r->qe + max_ext;
	}

	assert(re0 > rs0);
	tseq = (uint8_t*)kmalloc(km, re0 - rs0);
	junc = (uint8_t*)kmalloc(km, re0 - rs0);

	if (is_sr_rna) {
		int32_t max_tlen2 = MM_MAX_QLEN_FLANK * 2 + opt->q2 * 2;
		tseq2 = Kmalloc(km, uint8_t, max_tlen2 * 2);
		junc2 = tseq2 + max_tlen2;
	}

	if (qs > 0 && rs > 0) { // left extension; probably the condition can be changed to "qs > qs0 && rs > rs0"
		if (opt->flag & MM_F_QSTRAND) {
			qseq = &qseq0[0][qs0];
			mm_idx_getseq2(mi, rev, rid, rs0, rs, tseq);
		} else {
			qseq = &qseq0[rev][qs0];
			mm_idx_getseq(mi, rid, rs0, rs, tseq);
		}
		mm_get_junc(mi, rid, rs0, rs, !!(ksw_flag&KSW_EZ_SPLICE_REV), junc);
		mm_seq_rev(qs - qs0, qseq);
		mm_seq_rev(rs - rs0, tseq);
		mm_seq_rev(rs - rs0, junc);
		mm_align_pair(km, opt, qs - qs0, qseq, rs - rs0, tseq, junc, mat, bw, opt->end_bonus, r->split_inv? opt->zdrop_inv : opt->zdrop, ksw_flag|KSW_EZ_EXTZ_ONLY|KSW_EZ_RIGHT|KSW_EZ_REV_CIGAR, ez);
		if (ez->n_cigar > 0) {
			mm_append_cigar(r, ez->n_cigar, ez->cigar);
			r->p->dp_score += ez->max;
		}
		rs1 = rs - (ez->reach_end? ez->mqe_t + 1 : ez->max_t + 1);
		qs1 = qs - (ez->reach_end? qs - qs0 : ez->max_q + 1);
		mm_seq_rev(qs - qs0, qseq);
	} else rs1 = rs, qs1 = qs;
	re1 = rs, qe1 = qs;
	assert(qs1 >= 0 && rs1 >= 0);

	for (i = is_sr? cnt1 - 1 : 1; i < cnt1; ++i) { // gap filling; for short genomic reads, fill from the first seed to the last
		if ((a[as1+i].y & (MM_SEED_IGNORE|MM_SEED_TANDEM)) && i != cnt1 - 1) continue;
		if (is_sr && !(mi->flag & MM_I_HPC)) {
			re = (int32_t)a[as1 + i].x + 1;
			qe = (int32_t)a[as1 + i].y + 1;
		} else mm_adjust_minier(mi, qseq0, &a[as1 + i], &re, &qe);
		re1 = re, qe1 = qe;
		if (i == cnt1 - 1 || (a[as1+i].y&MM_SEED_LONG_JOIN) || (qe - qs >= opt->min_ksw_len && re - rs >= opt->min_ksw_len)) { // gap filling
			int j, bw1 = bw_long, zdrop_code;
			if (a[as1+i].y & MM_SEED_LONG_JOIN)
				bw1 = qe - qs > re - rs? qe - qs : re - rs;
			// perform alignment
			if (opt->flag & MM_F_QSTRAND) {
				qseq = &qseq0[0][qs];
				mm_idx_getseq2(mi, rev, rid, rs, re, tseq);
			} else {
				qseq = &qseq0[rev][qs];
				mm_idx_getseq(mi, rid, rs, re, tseq);
			}
			mm_get_junc(mi, rid, rs, re, !!(ksw_flag&KSW_EZ_SPLICE_REV), junc);
			if (is_sr || (is_sr_rna && qe - qs == re - rs)) { // perform ungapped alignment
				int32_t max_gapped_score = (qe - qs - 2) * opt->a - 2 * (opt->q + opt->e);
				assert(qe - qs == re - rs);
				ksw_reset_extz(ez);
				for (j = 0, ez->score = 0; j < qe - qs; ++j) {
					if (qseq[j] >= 4 || tseq[j] >= 4) ez->score += opt->sc_ambi > 0? -opt->sc_ambi : opt->sc_ambi;
					else ez->score += qseq[j] == tseq[j]? opt->a : -opt->b;
				}
				if (ez->score > max_gapped_score)
					ez->cigar = ksw_push_cigar(km, &ez->n_cigar, &ez->m_cigar, ez->cigar, MM_CIGAR_MATCH, qe - qs);
				else
					mm_align_pair(km, opt, qe - qs, qseq, re - rs, tseq, junc, mat, bw1, -1, opt->zdrop, ksw_flag|KSW_EZ_APPROX_MAX, ez);
			} else { // perform normal gapped alignment
				int32_t skip_full = 0;
				if (is_sr_rna)
					skip_full = mm_align_sr_rna(km, opt, qe - qs, qseq, re - rs, tseq, junc, tseq2, junc2, mat, bw1, -1, opt->zdrop, ksw_flag|KSW_EZ_APPROX_MAX, ez);
				if (!skip_full)
					mm_align_pair(km, opt, qe - qs, qseq, re - rs, tseq, junc, mat, bw1, -1, opt->zdrop, ksw_flag|KSW_EZ_APPROX_MAX, ez); // first pass: with approximate Z-drop
			}
			// test Z-drop and inversion Z-drop
			if ((zdrop_code = mm_test_zdrop(km, opt, qseq, tseq, ez->n_cigar, ez->cigar, mat)) != 0)
				mm_align_pair(km, opt, qe - qs, qseq, re - rs, tseq, junc, mat, bw1, -1, zdrop_code == 2? opt->zdrop_inv : opt->zdrop, ksw_flag, ez); // second pass: lift approximate
			// update CIGAR
			if (ez->n_cigar > 0)
				mm_append_cigar(r, ez->n_cigar, ez->cigar);
			if (ez->zdropped) { // truncated by Z-drop; TODO: sometimes Z-drop kicks in because the next seed placement is wrong. This can be fixed in principle.
				if (!r->p) {
					assert(ez->n_cigar == 0);
					uint32_t capacity = sizeof(mm_extra_t)/4;
					kroundup32(capacity);
					r->p = (mm_extra_t*)calloc(capacity, 4);
					r->p->capacity = capacity;
				}
				for (j = i - 1; j >= 0; --j)
					if ((int32_t)a[as1 + j].x <= rs + ez->max_t)
						break;
				dropped = 1;
				if (j < 0) j = 0;
				r->p->dp_score += ez->max;
				re1 = rs + (ez->max_t + 1);
				qe1 = qs + (ez->max_q + 1);
				if (cnt1 - (j + 1) >= opt->min_cnt) {
					mm_split_reg(r, r2, as1 + j + 1 - r->as, qlen, a, !!(opt->flag&MM_F_QSTRAND));
					if (zdrop_code == 2) r2->split_inv = 1;
				}
				break;
			} else r->p->dp_score += ez->score;
			rs = re, qs = qe;
		}
	}

	if (!dropped && qe < qe0 && re < re0) { // right extension
		if (opt->flag & MM_F_QSTRAND) {
			qseq = &qseq0[0][qe];
			mm_idx_getseq2(mi, rev, rid, re, re0, tseq);
		} else {
			qseq = &qseq0[rev][qe];
			mm_idx_getseq(mi, rid, re, re0, tseq);
		}
		mm_get_junc(mi, rid, re, re0, !!(ksw_flag&KSW_EZ_SPLICE_REV), junc);
		mm_align_pair(km, opt, qe0 - qe, qseq, re0 - re, tseq, junc, mat, bw, opt->end_bonus, opt->zdrop, ksw_flag|KSW_EZ_EXTZ_ONLY, ez);
		if (ez->n_cigar > 0) {
			mm_append_cigar(r, ez->n_cigar, ez->cigar);
			r->p->dp_score += ez->max;
		}
		re1 = re + (ez->reach_end? ez->mqe_t + 1 : ez->max_t + 1);
		qe1 = qe + (ez->reach_end? qe0 - qe : ez->max_q + 1);
	}
	assert(qe1 <= qlen);

	r->rs = rs1, r->re = re1;
	if (!rev || (opt->flag & MM_F_QSTRAND)) r->qs = qs1, r->qe = qe1;
	else r->qs = qlen - qe1, r->qe = qlen - qs1;

	assert(re1 - rs1 <= re0 - rs0);
	if (r->p) {
		if (opt->flag & MM_F_QSTRAND) {
			mm_idx_getseq2(mi, r->rev, rid, rs1, re1, tseq);
			qseq = &qseq0[0][qs1];
		} else {
			mm_idx_getseq(mi, rid, rs1, re1, tseq);
			qseq = &qseq0[r->rev][qs1];
		}
		mm_update_extra(r, qseq, tseq, mat, opt->q, opt->e, opt->flag & MM_F_EQX, !(is_sr || is_sr_rna));
		if (rev && r->p->trans_strand)
			r->p->trans_strand ^= 3; // flip to the read strand
	}

	if (tseq2) kfree(km, tseq2);
	kfree(km, tseq);
	kfree(km, junc);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
movq %r9, %r15
movq %r8, %rbp
movl %ecx, 0x24(%rsp)
movq %rdx, 0x60(%rsp)
movq 0x1f0(%rsp), %rcx
movq %rsi, (%rsp)
movq (%rsi), %rax
movl 0x28(%r9), %esi
movq %rsi, 0x38(%rsp)
movslq %esi, %rbx
movq %rbx, %r14
shlq $0x4, %r14
movq (%rcx,%r14), %r12
movq %rax, 0x98(%rsp)
btl $0xc, %eax
jae 0x15b19
movq 0x60(%rsp), %rax
testb $0x1, 0xc(%rax)
jne 0x17ec4
movq 0x1e0(%rsp), %rax
andl $0x0, 0x4(%rax)
movl 0x4(%r15), %eax
testl %eax, %eax
je 0x17de1
movq %rax, 0x30(%rsp)
movq %rdi, 0x10(%rsp)
movq (%rsp), %r13
movsbl 0x64(%r13), %esi
movsbl 0x68(%r13), %edx
movsbl 0x7c(%r13), %ecx
movsbl 0x80(%r13), %r8d
leaq 0x130(%rsp), %rdi
callq 0x17ff9
movl 0x14(%r13), %eax
cvtsi2sd %eax, %xmm0
movsd 0x13a35(%rip), %xmm1    # 0x295a8
mulsd %xmm1, %xmm0
movsd 0x10491(%rip), %xmm2    # 0x26010
addsd %xmm2, %xmm0
cvttsd2si %xmm0, %ecx
cvtsi2sdl 0x18(%r13), %xmm0
mulsd %xmm1, %xmm0
addsd %xmm2, %xmm0
cvttsd2si %xmm0, %edx
cmpl %ecx, %edx
movq %rcx, 0x158(%rsp)
cmovlel %ecx, %edx
movl %edx, 0x104(%rsp)
btl $0xc, 0x98(%rsp)
movq %r15, 0x50(%rsp)
movq %r12, 0x110(%rsp)
movq %rbp, 0x90(%rsp)
movq 0x60(%rsp), %r13
jae 0x15c04
testb $0x1, 0xc(%r13)
jne 0x15c04
movq 0x30(%rsp), %rbp
cmpl $0x2, %ebp
jge 0x15e3b
movq %r12, %rdx
movq 0x98(%rsp), %r8
movq 0x1f0(%rsp), %rsi
movq 0x38(%rsp), %rdi
jmp 0x15f1d
movq 0x98(%rsp), %rcx
btl $0x1c, %ecx
jb 0x15dfc
testb %cl, %cl
js 0x15e17
movq 0x30(%rsp), %rdx
cmpl $0x3, %edx
jl 0x15e25
movq %rdx, %r8
movq (%rsp), %rcx
movl 0x34(%rcx), %ecx
addl %ecx, %ecx
movq 0x1f0(%rsp), %rdx
leaq (%r14,%rdx), %rsi
addq $0x18, %rsi
cmpl %eax, %ecx
cmovlel %eax, %ecx
movzbl -0xc(%rsi), %edi
addl %eax, %eax
movq 0x38(%rsp), %r9
leal (%r9,%r8), %edx
decl %edx
movslq %edx, %r8
incq %rbx
movq %r12, %r14
movl %r9d, %edx
movl %edi, %r9d
cmpq %r8, %rbx
jge 0x15cfc
movq (%rsi), %r11
movabsq $0x10000000000, %r10    # imm = 0x10000000000
testq %r10, %r11
jne 0x15cfc
movq %r11, %r15
shrq $0x20, %r15
movq -0x8(%rsi), %r10
movl %r10d, %ebp
subl %r14d, %ebp
subl -0x10(%rsi), %r11d
cmpl %r11d, %ebp
movslq %r11d, %r14
cmovll %ebp, %r11d
movzbl %r15b, %r15d
movslq %ebp, %r12
subq %r14, %r12
movq %r12, %r14
negq %r14
cmovsq %r12, %r14
leal (%r11,%r9), %ebp
sarl %r9d
cmpl %r9d, %r14d
cmovgl %ebx, %edx
cmpl %r15d, %r11d
cmovgel %r15d, %r11d
cmpl %eax, %ebp
jge 0x15cfc
addl %r11d, %edi
cmpl %ecx, %edi
jge 0x15cfc
movq 0x50(%rsp), %r9
movl 0x2c(%r9), %r11d
sarl %r11d
addq $0x10, %rsi
incq %rbx
movq %r10, %r14
movl %ebp, %r9d
cmpl %r11d, %edi
jl 0x15c6d
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %r8
leal (%rsi,%r8), %edi
addl $-0x2, %edi
leal (%rsi,%r8), %r11d
movslq %r11d, %rsi
subl %edx, %r11d
shlq $0x4, %rsi
movq 0x1f0(%rsp), %rbx
movzbl -0x4(%rbx,%rsi), %esi
movslq %edi, %rdi
movslq %edx, %r8
movq %rdi, %r9
shlq $0x4, %r9
addq %rbx, %r9
addq $0x18, %r9
leal -0x1(%r11), %r10d
movl %r11d, %r13d
movl %esi, %r11d
movq (%rsp), %r14
cmpq %r8, %rdi
jle 0x15deb
movq (%r9), %rbx
movabsq $0x10000000000, %r15    # imm = 0x10000000000
testq %r15, %rbx
jne 0x1610e
movq %rbx, %r14
shrq $0x20, %r14
movl -0x8(%r9), %ebp
subl -0x18(%r9), %ebp
subl -0x10(%r9), %ebx
cmpl %ebx, %ebp
movslq %ebx, %r15
cmovll %ebp, %ebx
movzbl %r14b, %r14d
movslq %ebp, %r12
subq %r15, %r12
movq %r12, %r15
negq %r15
cmovsq %r12, %r15
leal (%rbx,%r11), %ebp
sarl %r11d
cmpl %r11d, %r15d
cmovgl %r10d, %r13d
cmpl %r14d, %ebx
cmovgel %r14d, %ebx
cmpl %eax, %ebp
jge 0x16126
addl %ebx, %esi
cmpl %ecx, %esi
movq (%rsp), %r14
jge 0x1610e
movq 0x50(%rsp), %r11
movl 0x2c(%r11), %ebx
sarl %ebx
decq %rdi
addq $-0x10, %r9
decl %r10d
movl %ebp, %r11d
cmpl %ebx, %esi
movq 0x1f0(%rsp), %rbx
jl 0x15d4a
movl %edx, %eax
movq %rax, 0x38(%rsp)
movq 0x10(%rsp), %rdi
jmp 0x1613e
movq 0x10(%rsp), %rdi
movq (%rsp), %r14
movq 0x1f0(%rsp), %rbx
movq 0x30(%rsp), %rdx
jmp 0x16141
movq 0x30(%rsp), %rdx
cmpl $0x3, %edx
jge 0x15f71
movq 0x10(%rsp), %rdi
movq (%rsp), %r14
movq 0x1f0(%rsp), %rbx
jmp 0x16141
pushq $-0x1
popq %rax
movq 0x1f0(%rsp), %rcx
movzbl 0xc(%rcx,%r14), %r10d
addl 0x38(%rsp), %ebp
movq %rbp, 0x30(%rsp)
movslq %ebp, %rdx
leaq 0x18(%rcx), %rsi
xorl %ecx, %ecx
pushq $0x1
popq %r11
movq %r12, %r9
movl %eax, %r8d
movq %rbx, %r14
shlq $0x4, %r14
addq %rsi, %r14
incq %rbx
movq %r9, %r15
movl %r11d, %edi
movl %r10d, %ebp
cmpq %rdx, %rbx
jge 0x15ed7
movq -0x8(%r14), %r9
movq (%r14), %r13
movq %r13, %r10
shrq $0x20, %r10
movzbl %r10b, %r10d
movl %r9d, %r12d
subl %r15d, %r12d
subl -0x10(%r14), %r13d
cmpl %r12d, %r13d
jne 0x15ebd
cmpl %r10d, %r12d
cmovll %r12d, %r10d
addl %r10d, %ebp
incl %r11d
addq $0x10, %r14
incq %rbx
movq %r9, %r15
jmp 0x15e7e
movl %ebx, %r14d
subl %r11d, %r14d
cmpl %r8d, %ebp
cmovgl %r14d, %eax
cmovgl %r11d, %ecx
cmovgl %ebp, %r8d
movl %edi, %r11d
jmp 0x15e68
movq 0x30(%rsp), %rdi
subl %r11d, %edi
cmpl %r8d, %ebp
cmovgl %edi, %eax
cmovgl %r11d, %ecx
movslq %eax, %rbx
movq %rbx, %rdx
shlq $0x4, %rdx
movq 0x1f0(%rsp), %rsi
movq (%rsi,%rdx), %rdx
movl %eax, %edi
movl %ecx, %ebp
movq 0x50(%rsp), %r15
movq 0x110(%rsp), %r12
movq 0x98(%rsp), %r8
movq 0x60(%rsp), %r13
shlq $0x4, %rbx
movq 0x8(%rsi,%rbx), %rax
movq %rax, %rcx
shrq $0x20, %rcx
movzbl %cl, %ecx
subl %ecx, %edx
incl %edx
movl %edx, 0xe0(%rsp)
subl %ecx, %eax
incl %eax
movl %eax, 0xdc(%rsp)
movq %rdi, 0x38(%rsp)
leal (%rdi,%rbp), %eax
cltq
shlq $0x4, %rax
movl -0x10(%rsi,%rax), %ecx
incl %ecx
movl %ecx, 0x74(%rsp)
movl -0x8(%rsi,%rax), %eax
incl %eax
movl %eax, 0x70(%rsp)
movq (%rsp), %r14
jmp 0x1657f
movq 0x1f0(%rsp), %rbx
addq %rbx, %r14
movl 0x10(%r14), %eax
subl %r12d, %eax
cvtsi2sd %eax, %xmm0
callq 0x21e0
movslq 0x28(%r15), %rax
shlq $0x4, %rax
movzbl 0xc(%rbx,%rax), %ecx
cvtsi2sd %ecx, %xmm1
movq (%rsp), %r14
cvtsi2sdl 0xa8(%r14), %xmm2
addsd %xmm0, %xmm2
ucomisd %xmm1, %xmm2
jbe 0x1603f
addq %rbx, %rax
subq $0x8, %rsp
leaq 0x138(%rsp), %rbx
movq 0x18(%rsp), %rdi
movq %r14, %rsi
movq %r13, %rdx
movq %rbx, %rcx
movl 0x2c(%rsp), %r8d
movq 0x98(%rsp), %r12
movq %r12, %r9
pushq %rax
movsd %xmm0, 0x18(%rsp)
callq 0x18fb7
addq $0x10, %rsp
cvtsi2sd %eax, %xmm0
movsbl (%rbx), %eax
cvtsi2sd %eax, %xmm1
cvtsi2sdl 0xa8(%r14), %xmm2
divsd %xmm1, %xmm0
movsd 0x8(%rsp), %xmm1
addsd %xmm2, %xmm1
ucomisd %xmm0, %xmm1
jbe 0x16035
movq 0x38(%rsp), %rax
incl %eax
movq %rax, 0x38(%rsp)
movq 0x30(%rsp), %rax
decl %eax
movq %rax, 0x30(%rsp)
movq 0x1f0(%rsp), %rbx
jmp 0x16047
movq 0x90(%rsp), %r12
movslq 0x28(%r15), %rax
movslq 0x4(%r15), %rcx
addq %rax, %rcx
shlq $0x4, %rcx
movl -0x10(%rbx,%rcx), %eax
subl -0x20(%rbx,%rcx), %eax
cvtsi2sd %eax, %xmm0
callq 0x21e0
movslq 0x28(%r15), %rcx
movslq 0x4(%r15), %rax
addq %rcx, %rax
shlq $0x4, %rax
movzbl -0x4(%rbx,%rax), %ecx
cvtsi2sd %ecx, %xmm1
cvtsi2sdl 0xa8(%r14), %xmm2
addsd %xmm0, %xmm2
ucomisd %xmm1, %xmm2
jbe 0x16104
addq %rbx, %rax
addq $-0x10, %rax
subq $0x8, %rsp
leaq 0x138(%rsp), %rbx
movq 0x18(%rsp), %rdi
movq %r14, %rsi
movq %r13, %rdx
movq %rbx, %rcx
movl 0x2c(%rsp), %r8d
movq %r12, %r9
pushq %rax
movsd %xmm0, 0x18(%rsp)
callq 0x18fb7
addq $0x10, %rsp
cvtsi2sd %eax, %xmm0
movsbl (%rbx), %eax
cvtsi2sd %eax, %xmm1
cvtsi2sdl 0xa8(%r14), %xmm2
divsd %xmm1, %xmm0
movsd 0x8(%rsp), %xmm1
addsd %xmm2, %xmm1
ucomisd %xmm0, %xmm1
jbe 0x1611c
movq 0x30(%rsp), %rdx
decl %edx
movq 0x10(%rsp), %rdi
jmp 0x15e2e
movq 0x10(%rsp), %rdi
jmp 0x15e0d
movl %edx, %eax
movq %rax, 0x38(%rsp)
movq 0x10(%rsp), %rdi
jmp 0x16136
movq 0x10(%rsp), %rdi
jmp 0x15e05
movl %edx, %eax
movq %rax, 0x38(%rsp)
movq 0x10(%rsp), %rdi
movq (%rsp), %r14
movq 0x1f0(%rsp), %rbx
movq %r13, %rdx
movl 0x1c(%r14), %ebp
pushq $0xa
popq %r8
leaq 0x4c(%rsp), %r9
movq 0x38(%rsp), %r12
movl %r12d, %esi
movq %rdx, 0x30(%rsp)
movq %rbx, %rcx
movq %rbx, %r15
movq %rdi, %rbx
callq 0x19156
movslq %r12d, %rcx
movq %rcx, 0x8(%rsp)
testq %rax, %rax
je 0x16366
sarl %ebp
movl 0x4c(%rsp), %ecx
leaq 0x8(%r15), %rdx
movq %rdx, 0x120(%rsp)
pushq $-0x1
popq %r14
pushq $0x1
popq %r9
xorl %r10d, %r10d
xorl %r11d, %r11d
movl %r14d, %esi
movl %r14d, %edi
movq %r15, %rbx
movabsq $0x20000000000, %r8     # imm = 0x20000000000
cmpq %rcx, %r10
je 0x161ba
movslq %esi, %rdx
cmpq %rdx, %r10
jl 0x16202
testl %esi, %esi
jle 0x161f0
movslq %edi, %rdx
movslq (%rax,%rdx,4), %rdx
movl %esi, %esi
movslq (%rax,%rsi,4), %rsi
movq 0x8(%rsp), %rdi
addq %rdx, %rdi
shlq $0x4, %rdi
addq 0x120(%rsp), %rdi
cmpq %rsi, %rdx
jge 0x161f0
orq %r8, (%rdi)
incq %rdx
addq $0x10, %rdi
jmp 0x161df
xorl %r11d, %r11d
movl %r14d, %esi
movl %r14d, %edi
cmpq %rcx, %r10
je 0x1634f
movl %edi, 0xf0(%rsp)
movl %r11d, 0xa0(%rsp)
movl %esi, 0x40(%rsp)
movslq (%rax,%r10,4), %rdx
addq 0x8(%rsp), %rdx
shlq $0x4, %rdx
movl 0x8(%rbx,%rdx), %edi
movl -0x10(%rbx,%rdx), %r12d
movl -0x8(%rbx,%rdx), %r13d
subl %r13d, %edi
movl %r12d, %esi
subl (%rbx,%rdx), %esi
addl %edi, %esi
movl %esi, %r8d
negl %r8d
xorl %edx, %edx
testl %esi, %esi
cmovlel %edx, %esi
cmovgl %edx, %r8d
movq %r10, 0x28(%rsp)
leaq 0xa(%r10), %r15
movq %r9, 0x18(%rsp)
movq %r9, %rdi
cmpl %edi, %ecx
jle 0x162fc
leaq -0x1(%rdi), %r9
cmpq %r15, %r9
jae 0x162fc
movslq (%rax,%rdi,4), %r11
addq 0x8(%rsp), %r11
shlq $0x4, %r11
movl 0x8(%rbx,%r11), %r10d
movl %r10d, %r9d
subl %r13d, %r9d
cmpl %ebp, %r9d
jg 0x162fc
addq %rbx, %r11
movq (%r11), %r9
movl %r9d, %ebx
subl %r12d, %ebx
cmpl %ebp, %ebx
movq 0x1f0(%rsp), %rbx
jg 0x162fc
subl -0x8(%r11), %r10d
movl -0x10(%r11), %r11d
subl %r9d, %r11d
addl %r10d, %r11d
testl %r11d, %r11d
movl $0x0, %r9d
cmovgl %r11d, %r9d
movl $0x0, %r10d
cmovnsl %r10d, %r11d
addl %r9d, %esi
subl %r11d, %r8d
leal (%rsi,%r8), %r9d
movl %esi, %r10d
subl %r8d, %r10d
movl %r10d, %r11d
negl %r11d
cmovnsl %r10d, %r11d
addl %r9d, %r11d
cmpl %r11d, %edx
cmovlel %r11d, %edx
cmovll %edi, %r14d
incq %rdi
jmp 0x1625d
cmpl $0x29, %edx
setge %sil
movl 0xa0(%rsp), %r11d
cmpl %r11d, %edx
setg %dil
testb %dil, %sil
cmovnel %edx, %r11d
movl 0x40(%rsp), %esi
cmovnel %r14d, %esi
movq 0x28(%rsp), %r10
movl 0xf0(%rsp), %edi
cmovnel %r10d, %edi
incq %r10
movq 0x18(%rsp), %r9
incq %r9
movabsq $0x20000000000, %r8     # imm = 0x20000000000
pushq $-0x1
popq %r14
jmp 0x161ad
movq %rbx, %r15
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x10a07
movq (%rsp), %r14
movl 0x1c(%r14), %ebp
pushq $0x1e
popq %r8
leaq 0x4c(%rsp), %r9
movq %rbx, %rdi
movq 0x38(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq %r15, %rcx
callq 0x19156
testq %rax, %rax
movq %r15, %rbx
je 0x16504
sarl %ebp
movl 0x4c(%rsp), %ecx
movl %ecx, 0x40(%rsp)
movslq %ecx, %rcx
movq %rcx, 0x18(%rsp)
leaq 0x8(%rbx), %rcx
movq %rcx, 0xa0(%rsp)
xorl %edi, %edi
cmpl 0x40(%rsp), %edi
jge 0x164f7
movslq %edi, %r10
movslq (%rax,%r10,4), %r8
movq 0x8(%rsp), %rcx
leaq (%r8,%rcx), %r9
shlq $0x4, %r9
movl (%rbx,%r9), %r12d
movl 0x8(%rbx,%r9), %r15d
movl -0x8(%rbx,%r9), %ecx
addl %r12d, %ecx
movl %r15d, %esi
subl %ecx, %esi
addl -0x10(%rbx,%r9), %esi
movl %esi, %r14d
negl %r14d
cmovsl %esi, %r14d
leal 0x1(%rdi), %ecx
movl %ecx, 0x28(%rsp)
incq %r10
cmpq 0x18(%rsp), %r10
jge 0x16499
movslq (%rax,%r10,4), %r11
addq 0x8(%rsp), %r11
shlq $0x4, %r11
movl 0x8(%rbx,%r11), %r13d
movl %r13d, %ecx
subl %r15d, %ecx
cmpl %ebp, %ecx
jg 0x16495
addq %rbx, %r11
movq (%r11), %rsi
movl %esi, %ecx
subl %r12d, %ecx
cmpl %ebp, %ecx
jg 0x16495
movq -0x8(%r11), %rcx
movl %r13d, %ebx
subl %ecx, %ebx
movl -0x10(%r11), %r11d
movl %r11d, %edx
subl %esi, %edx
addl %ebx, %edx
movq %rcx, %rbx
shrq $0x20, %rbx
movzbl %bl, %ebx
subl %r12d, %r11d
addl %ebx, %r11d
subl %r15d, %ecx
addl %ebx, %ecx
movq 0x1f0(%rsp), %rbx
cmpl %ecx, %r11d
cmovll %r11d, %ecx
movl %edx, %r11d
negl %r11d
cmovsl %edx, %r11d
addl %r11d, %r14d
incl %edi
incq %r10
movl %r13d, %r15d
movl %esi, %r12d
cmpl %r14d, %ecx
movl %r11d, %r14d
jle 0x16401
jmp 0x1649f
incl %edi
jmp 0x1649f
movl 0x40(%rsp), %ecx
movl %ecx, %edi
cmpl 0x28(%rsp), %edi
movq (%rsp), %r14
movabsq $0x20000000000, %rdx    # imm = 0x20000000000
jle 0x163b4
movslq %edi, %rcx
movslq -0x4(%rax,%rcx,4), %rcx
addq 0xa0(%rsp), %r9
cmpq %rcx, %r8
jge 0x164d8
orq %rdx, (%r9)
incq %r8
addq $0x10, %r9
jmp 0x164c7
addl 0x38(%rsp), %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
movabsq $0x10000000000, %rdx    # imm = 0x10000000000
orq %rdx, 0x8(%rbx,%rcx)
jmp 0x163b4
movq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x10a07
movq 0x8(%rsp), %rdx
shlq $0x4, %rdx
addq %rbx, %rdx
leaq 0xe0(%rsp), %rcx
leaq 0xdc(%rsp), %r8
movq 0x60(%rsp), %r13
movq %r13, %rdi
movq %rbx, %r15
movq 0x90(%rsp), %rbx
movq %rbx, %rsi
callq 0x18098
movq 0x30(%rsp), %rbp
movq 0x38(%rsp), %rax
addl %ebp, %eax
cltq
shlq $0x4, %rax
leaq (%r15,%rax), %rdx
addq $-0x10, %rdx
leaq 0x74(%rsp), %rcx
leaq 0x70(%rsp), %r8
movq %r13, %rdi
movq %rbx, %rsi
callq 0x18098
movq 0x50(%rsp), %r15
movq 0x110(%rsp), %r12
movq 0x98(%rsp), %r8
testl %ebp, %ebp
jle 0x17e29
movq %rbp, 0x30(%rsp)
movq %r12, %rax
shrq $0x3f, %rax
movq %rax, 0xc8(%rsp)
movq $0x0, 0xc0(%rsp)
testb %r8b, %r8b
movq 0x1f0(%rsp), %r10
jns 0x16612
movl 0x200(%rsp), %ecx
xorl %eax, %eax
testq %r12, %r12
setns %al
movq 0xc8(%rsp), %rdx
shll $0x8, %edx
movl $0x100, %esi            # imm = 0x100
addl %esi, %edx
xorl %edi, %edi
btl $0x8, %ecx
cmovael %edi, %edx
shll $0x8, %eax
addl %esi, %eax
btl $0x9, %ecx
cmovael %edi, %eax
orl %edx, %eax
movl (%r14), %ecx
shrl $0x8, %ecx
andl $0x400, %ecx            # imm = 0x400
cmpq $0x0, 0x40(%r13)
leal (%rax,%rcx), %edx
leal 0x1000(%rax,%rcx), %eax
cmovel %edx, %eax
movq %rax, 0xc0(%rsp)
shrq $0x20, %r12
movq %r12, 0x80(%rsp)
btl $0xc, %r8d
jb 0x16704
movslq 0x28(%r15), %rsi
movq %rsi, %rax
shlq $0x4, %rax
movq (%r10,%rax), %rdi
movq 0x8(%r10,%rax), %rax
movq %rax, %rcx
shrq $0x20, %rcx
movzbl %cl, %ecx
movl %edi, %r9d
subl %ecx, %r9d
incl %r9d
subl %ecx, %eax
xorl %ecx, %ecx
testl %r9d, %r9d
cmovlel %ecx, %r9d
incl %eax
js 0x17ee3
movl 0x1e8(%rsp), %r8d
movl %esi, %edx
leaq -0x8(%r10), %r11
leal 0x1(%rdx), %ebx
movq %rdx, %r14
shlq $0x4, %r14
addq %r11, %r14
decl %ebx
xorl %r10d, %r10d
testl %ebx, %ebx
jle 0x167ba
movq -0x8(%r14), %r12
movq %r12, %r15
xorq %rdi, %r15
shrq $0x20, %r15
movl $0x0, %r15d
jne 0x167bd
decq %rdx
movq (%r14), %r15
addq $-0x10, %r14
movq %r15, %r10
shrq $0x20, %r10
movzbl %r10b, %ebp
subl %ebp, %r12d
incl %r12d
movl %r9d, %r10d
subl %r12d, %r10d
jle 0x1667e
subl %ebp, %r15d
incl %r15d
movl %eax, %ebp
subl %r15d, %ebp
jle 0x1667e
leal 0x1(%rcx), %ebx
movq (%rsp), %r14
cmpl 0x30(%r14), %ecx
movl %ebx, %ecx
jl 0x16671
cmpl %ebp, %r10d
cmovgl %r10d, %ebp
movl %r9d, %ecx
subl %ebp, %ecx
movl %eax, %r15d
subl %ebp, %r15d
xorl %r10d, %r10d
testl %ecx, %ecx
cmovgl %ecx, %r10d
jmp 0x167bd
movl 0xdc(%rsp), %eax
movl 0x64(%r14), %ecx
movl 0x6c(%r14), %esi
movl %ecx, %edx
movq %rax, 0x58(%rsp)
imull %eax, %edx
movl 0x98(%r14), %edi
addl %edi, %edx
xorl %ebp, %ebp
movl $0x0, %eax
subl %esi, %edx
jle 0x16738
movl %edx, %eax
cltd
idivl 0x70(%r14)
movl 0xe0(%rsp), %r11d
addl 0x58(%rsp), %eax
movl %r11d, %r9d
subl %eax, %r9d
testl %r9d, %r9d
cmovlel %ebp, %r9d
movl 0x70(%rsp), %edx
movl 0x24(%rsp), %r8d
movq %rdx, 0x78(%rsp)
subl %edx, %r8d
imull %r8d, %ecx
addl %edi, %ecx
subl %esi, %ecx
jle 0x16775
movl %ecx, %eax
cltd
idivl 0x70(%r14)
movl %eax, %ebp
movl 0x74(%rsp), %eax
movq %rax, 0xa8(%rsp)
addl %eax, %ebp
addl %r8d, %ebp
movq 0x20(%r13), %rax
movq 0x80(%rsp), %rcx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
imulq $0x18, %rcx, %rcx
movl 0x10(%rax,%rcx), %eax
cmpl %eax, %ebp
cmovgel %eax, %ebp
movslq 0x28(%r15), %rsi
movl $0x0, 0x8(%rsp)
movl 0x24(%rsp), %ebx
jmp 0x169ad
xorl %r15d, %r15d
movl 0xdc(%rsp), %ebx
testl %ebx, %ebx
setg %cl
movl 0xe0(%rsp), %r11d
testl %r11d, %r11d
setg %dl
andb %cl, %dl
movq %r11, 0x88(%rsp)
movl %r11d, 0x18(%rsp)
movq %rbx, 0x58(%rsp)
movl %ebx, 0x8(%rsp)
cmpb $0x1, %dl
jne 0x16863
movq (%rsp), %r14
movl 0x1c(%r14), %r11d
movq 0x58(%rsp), %rcx
cmpl %r11d, %ecx
movl %r11d, %ebx
cmovll %ecx, %ebx
subl %ebx, %ecx
cmpl %ecx, %r15d
cmovgl %r15d, %ecx
cmpl %ecx, %eax
cmovll %eax, %ecx
movl %ecx, 0x8(%rsp)
movl 0x64(%r14), %ecx
imull %ebx, %ecx
xorl %eax, %eax
subl 0x6c(%r14), %ecx
jle 0x16832
movl %ecx, %eax
cltd
idivl 0x70(%r14)
addl %ebx, %eax
cmpl %r11d, %eax
cmovgel %r11d, %eax
movq 0x88(%rsp), %rcx
cmpl %ecx, %eax
cmovgel %ecx, %eax
movl %ecx, %edx
subl %eax, %edx
cmpl %edx, %r10d
cmovgl %r10d, %edx
cmpl %edx, %r9d
cmovll %r9d, %edx
cmpl %ecx, %edx
cmovgel %ecx, %edx
movl %edx, 0x18(%rsp)
movq 0x50(%rsp), %rax
movslq 0x4(%rax), %rdx
addq %rsi, %rdx
movq %rdx, %rax
shlq $0x4, %rax
movq 0x1f0(%rsp), %rcx
leaq (%rax,%rcx), %r10
addq $0x8, %r10
movl -0x18(%r10), %r11d
movl -0x10(%r10), %r14d
leal 0x1(%r11), %ebx
leal 0x1(%r14), %eax
movq 0x60(%rsp), %rcx
movq 0x20(%rcx), %r9
movq 0x80(%rsp), %r15
andl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
imulq $0x18, %r15, %r15
movl 0x10(%r9,%r15), %r9d
movslq %r8d, %r8
xorl %r15d, %r15d
movq (%rsp), %rcx
cmpq %r8, %rdx
jge 0x168f9
movq -0x8(%r10), %r13
movq %r13, %r12
xorq %rdi, %r12
shrq $0x20, %r12
jne 0x168f9
subl %r11d, %r13d
jle 0x168f0
movl (%r10), %r12d
subl %r14d, %r12d
jle 0x168f0
cmpl 0x30(%rcx), %r15d
jge 0x17df3
incl %r15d
incq %rdx
addq $0x10, %r10
jmp 0x168c1
movl %r9d, %edi
movl 0x24(%rsp), %ecx
movl %ecx, %r12d
movl 0x70(%rsp), %edx
movl %ecx, %r8d
movl 0x74(%rsp), %r10d
movq %rdx, 0x78(%rsp)
subl %edx, %r8d
movq (%rsp), %r14
movq 0x88(%rsp), %r11
movq %r10, 0xa8(%rsp)
jle 0x1699e
subl %r10d, %r9d
jle 0x16992
movq %rbx, %r15
movl 0x1c(%r14), %r10d
cmpl %r10d, %r8d
cmovgel %r10d, %r8d
movq 0x78(%rsp), %rcx
leal (%r8,%rcx), %ebx
cmpl %ebx, %r12d
cmovll %r12d, %ebx
cmpl %ebx, %eax
cmovgl %eax, %ebx
movl 0x64(%r14), %eax
imull %r8d, %eax
xorl %ebp, %ebp
subl 0x6c(%r14), %eax
jle 0x1696c
cltd
idivl 0x70(%r14)
movl %eax, %ebp
addl %r8d, %ebp
cmpl %r10d, %ebp
cmovgel %r10d, %ebp
cmpl %r9d, %ebp
cmovgel %r9d, %ebp
addl 0xa8(%rsp), %ebp
cmpl %ebp, %edi
cmovll %edi, %ebp
cmpl %ebp, %r15d
cmovgl %r15d, %ebp
jmp 0x169a8
movq 0xa8(%rsp), %rax
movl %eax, %ebp
jmp 0x169a1
movl %r10d, %ebp
movq 0x78(%rsp), %rax
movl %eax, %ebx
movl 0x18(%rsp), %r9d
shlq $0x4, %rsi
movq 0x1f0(%rsp), %rax
testb $0x8, 0xd(%rax,%rsi)
je 0x16a1d
movq 0x50(%rsp), %rdi
movl 0x18(%rdi), %eax
movl 0x10(%rdi), %ecx
movl %ecx, %edx
subl %eax, %edx
movl %edx, %esi
negl %esi
cmovsl %edx, %esi
movl %eax, %edx
subl %r9d, %edx
subl %esi, %eax
cmpl %esi, %edx
cmovgl %eax, %r9d
movl %ecx, %eax
movl 0x8(%rsp), %edx
subl %edx, %eax
subl %esi, %ecx
cmpl %esi, %eax
cmovgl %ecx, %edx
movl %edx, 0x8(%rsp)
movl 0x14(%rdi), %eax
movl 0x1c(%rdi), %ecx
movl %eax, %edx
subl %ecx, %edx
movl %edx, %esi
negl %esi
cmovsl %edx, %esi
movl %ebp, %edx
subl %ecx, %edx
addl %esi, %ecx
cmpl %esi, %edx
cmovgl %ecx, %ebp
movl %ebx, %ecx
subl %eax, %ecx
addl %esi, %eax
cmpl %esi, %ecx
cmovgl %eax, %ebx
movq 0x10(%rsp), %r15
movl %ebx, 0xd4(%rsp)
movq %r11, 0x88(%rsp)
movl %ebp, 0xd0(%rsp)
movl %ebp, %eax
subl %r9d, %eax
jle 0x17e48
movl %r9d, %r13d
movabsq $0x8000000080, %rbx     # imm = 0x8000000080
movq 0x98(%rsp), %rbp
andq %rbx, %rbp
movl %eax, 0x12c(%rsp)
movslq %eax, %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x10afc
movq %rax, 0x28(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x10afc
movq %rax, 0xb8(%rsp)
movq %rbp, 0x160(%rsp)
cmpq %rbx, %rbp
je 0x16aa5
xorl %edx, %edx
movq $0x0, 0x108(%rsp)
jmp 0x16ad6
movslq 0x74(%r14), %rax
leaq 0xc8(,%rax,2), %r14
addq %rax, %rax
leaq 0x190(,%rax,2), %rsi
movq %r15, %rdi
callq 0x10afc
movslq %r14d, %rdx
movq (%rsp), %r14
movq %rax, 0x108(%rsp)
addq %rax, %rdx
pushq $0x1
popq %rsi
movq 0x88(%rsp), %r10
movq 0x78(%rsp), %rdi
movq 0xa8(%rsp), %r8
movq %rdx, 0x178(%rsp)
movq 0x80(%rsp), %rax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movq %rax, 0x80(%rsp)
movq 0x58(%rsp), %r15
testl %r15d, %r15d
setg %al
testl %r10d, %r10d
setg %cl
andb %al, %cl
movl %r10d, %ebp
movl %r15d, %ebx
cmpb $0x1, %cl
jne 0x16d35
movslq 0x8(%rsp), %rdx
movabsq $0x100000000, %rax      # imm = 0x100000000
testq %rax, (%r14)
jne 0x16b85
movq 0x90(%rsp), %rax
movq 0xc8(%rsp), %rcx
addq (%rax,%rcx,8), %rdx
movq %rdx, 0x18(%rsp)
movq 0x60(%rsp), %r15
movq %r15, %rdi
movq 0x80(%rsp), %r12
movl %r12d, %esi
movl %r13d, %ebx
movl %r13d, %edx
movl %r10d, %ecx
movq 0x28(%rsp), %r8
movq %r10, %r13
callq 0x612e
jmp 0x16bc6
movq 0x90(%rsp), %rax
addq (%rax), %rdx
movq %rdx, 0x18(%rsp)
movq 0x60(%rsp), %r15
movq %r15, %rdi
movq 0xc8(%rsp), %rsi
movq 0x80(%rsp), %r12
movl %r12d, %edx
movl %r13d, %ebx
movl %r13d, %ecx
movl %r10d, %r8d
movq 0x28(%rsp), %r9
movq %r10, %r13
callq 0x6237
movq 0xc0(%rsp), %rbp
movl %ebp, %r8d
shrl $0x9, %r8d
andl $0x1, %r8d
movq %r15, %rdi
movl %r12d, %esi
movl %ebx, %edx
movl %r13d, %ecx
movq 0xb8(%rsp), %r15
movq %r15, %r9
callq 0x18188
movq 0x58(%rsp), %rax
movl %eax, %ebp
subl 0x8(%rsp), %ebp
movl %ebp, %edi
movq %r13, %r12
movq 0x18(%rsp), %r13
movq %r13, %rsi
callq 0x181b8
subl %ebx, %r12d
movl %r12d, %edi
movq 0x28(%rsp), %rbx
movq %rbx, %rsi
callq 0x181b8
movl %r12d, %edi
movq %r15, %rsi
callq 0x181b8
movl 0x98(%r14), %eax
movq 0x50(%rsp), %rcx
movl 0x3c(%rcx), %ecx
shrl $0x16, %ecx
andl $0x4, %ecx
movl 0x90(%r14,%rcx), %r10d
movq 0xc0(%rsp), %r11
orl $0xc2, %r11d
subq $0x8, %rsp
movq 0x18(%rsp), %rdi
movq %r14, %rsi
movl %ebp, 0x48(%rsp)
movl %ebp, %edx
movq %r13, 0x20(%rsp)
movq %r13, %rcx
movl %r12d, %r8d
movq %rbx, %r9
movq 0x200(%rsp), %r12
pushq %r12
pushq %r11
pushq %r10
pushq %rax
pushq 0x180(%rsp)
leaq 0x160(%rsp), %rax
pushq %rax
pushq %r15
callq 0x181df
movq %r12, %rdx
addq $0x40, %rsp
movl 0x24(%r12), %esi
testl %esi, %esi
jle 0x16cd8
movq 0x30(%rdx), %rdx
movq 0x50(%rsp), %rbx
movq %rbx, %rdi
callq 0x185b3
movq 0x1f8(%rsp), %rdx
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
andl (%rdx), %eax
movq 0x48(%rbx), %rcx
addl %eax, 0x4(%rcx)
movl 0x28(%rdx), %eax
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
movl 0x8(%rdx,%rcx,8), %ebp
notl %ebp
je 0x16cf8
movq 0x58(%rsp), %r15
movl 0x8(%rsp), %ebx
subl %r15d, %ebx
jmp 0x16d02
movl 0x4(%rdx), %ebx
notl %ebx
movq 0x58(%rsp), %r15
movq 0x88(%rsp), %rax
movq 0x18(%rsp), %rsi
movl 0x40(%rsp), %edi
addl %eax, %ebp
addl %r15d, %ebx
callq 0x181b8
movq 0x88(%rsp), %r10
pushq $0x1
popq %rsi
movq 0x78(%rsp), %rdi
movq 0xa8(%rsp), %r8
movl %ebx, 0xd8(%rsp)
testl %ebx, %ebx
movq 0x30(%rsp), %rcx
js 0x17e67
testl %ebp, %ebp
js 0x17e67
movl %ebp, 0xfc(%rsp)
leal -0x1(%rcx), %eax
movq 0xc0(%rsp), %rdx
movl %edx, %r9d
shrl $0x9, %r9d
andl $0x1, %r9d
movl %r9d, 0x100(%rsp)
orl $0x8, %edx
movq %rdx, 0x168(%rsp)
btl $0xc, 0x98(%rsp)
cltq
movq %rax, 0x170(%rsp)
cmovbq %rax, %rsi
movl %ecx, %eax
movq %rax, 0x190(%rsp)
movslq 0x38(%rsp), %rcx
movq %rsi, %rax
shlq $0x4, %rax
movq %rcx, 0x188(%rsp)
shlq $0x4, %rcx
addq %rax, %rcx
movq 0x1f0(%rsp), %rax
leaq (%rax,%rcx), %r13
addq $-0x10, %r13
movabsq $0x60000000000, %rcx    # imm = 0x60000000000
movl %r10d, %ebx
movq %r15, 0x58(%rsp)
movq 0x90(%rsp), %r12
movq 0x60(%rsp), %rbp
cmpq 0x190(%rsp), %rsi
jge 0x17979
movq 0x188(%rsp), %rax
leaq (%rsi,%rax), %rdx
shlq $0x4, %rdx
movq 0x1f0(%rsp), %rax
movq 0x8(%rax,%rdx), %r14
testq %rcx, %r14
je 0x16e2f
cmpq 0x170(%rsp), %rsi
je 0x16e2f
movq (%rsp), %r14
jmp 0x176ca
btl $0xc, 0x98(%rsp)
movq %r10, 0x88(%rsp)
jae 0x16e5e
testb $0x1, 0xc(%rbp)
jne 0x16e5e
movl (%rax,%rdx), %r8d
incl %r8d
movl %r8d, 0x74(%rsp)
leal 0x1(%r14), %edi
movl %edi, 0x70(%rsp)
jmp 0x16e92
addq 0x1f0(%rsp), %rdx
movq %rbp, %rdi
movq %rsi, %rbx
movq %r12, %rsi
leaq 0x74(%rsp), %rcx
leaq 0x70(%rsp), %r8
callq 0x18098
movq 0x88(%rsp), %r10
movq %rbx, %rsi
movl 0x74(%rsp), %r8d
movl 0x70(%rsp), %edi
movq 0x80(%rsp), %r15
cmpq 0x170(%rsp), %rsi
je 0x16eef
movq %r14, %rax
movabsq $0x10000000000, %rcx    # imm = 0x10000000000
andq %rcx, %rax
jne 0x16eef
movl %edi, %ecx
subl 0x58(%rsp), %ecx
movq (%rsp), %r14
movl 0xa0(%r14), %eax
cmpl %eax, %ecx
jl 0x16ee4
movl %r8d, %ecx
subl %r10d, %ecx
movl 0x104(%rsp), %edx
movq %rdx, 0xe8(%rsp)
cmpl %eax, %ecx
jge 0x16f2a
movl %r8d, %ebx
movl %edi, %r15d
jmp 0x176c0
movl 0x104(%rsp), %eax
movq %rax, 0xe8(%rsp)
movabsq $0x10000000000, %rax    # imm = 0x10000000000
testq %rax, %r14
movq (%rsp), %r14
je 0x16f2a
movl %edi, %eax
subl 0x58(%rsp), %eax
movl %r8d, %ecx
subl %r10d, %ecx
cmpl %ecx, %eax
cmovgl %eax, %ecx
movq %rcx, 0xe8(%rsp)
movq %r13, 0x180(%rsp)
movq %rdi, 0x78(%rsp)
movq %rsi, 0x118(%rsp)
movabsq $0x100000000, %rax      # imm = 0x100000000
testq %rax, (%r14)
jne 0x16f78
movq 0xc8(%rsp), %rax
movq (%r12,%rax,8), %rbx
movq %rbp, %rdi
movl %r15d, %esi
movl %r10d, %edx
movl %r8d, %ecx
movq %r8, %r13
movq 0x28(%rsp), %r8
movq %r10, %r12
callq 0x612e
jmp 0x16f9d
movq (%r12), %rbx
movq %rbp, %rdi
movq 0xc8(%rsp), %rsi
movl %r15d, %edx
movl %r10d, %ecx
movq %r8, %r13
movq 0x28(%rsp), %r9
movq %r10, %r12
callq 0x6237
movq 0x58(%rsp), %rax
movslq %eax, %rcx
addq %rbx, %rcx
movq %rcx, 0x18(%rsp)
movq %rbp, %rdi
movq %rax, %rbx
movl %r15d, %esi
movl %r12d, %edx
movl %r13d, %ecx
movl 0x100(%rsp), %r8d
movq 0xb8(%rsp), %r15
movq %r15, %r9
callq 0x18188
movq 0x78(%rsp), %r9
movl %r9d, %ecx
subl %ebx, %ecx
movq %r13, 0xa8(%rsp)
movl %r13d, %edx
subl %r12d, %edx
btl $0xc, 0x98(%rsp)
movq 0x28(%rsp), %r13
movl %edx, 0xb4(%rsp)
movq %rcx, 0x68(%rsp)
jb 0x17094
movabsq $0x8000000080, %rax     # imm = 0x8000000080
cmpq %rax, 0x160(%rsp)
je 0x17078
movl 0x90(%r14), %eax
subq $0x8, %rsp
movq 0x18(%rsp), %rdi
movq %r14, %rsi
movl %edx, %r8d
movq 0x70(%rsp), %rdx
movq 0x20(%rsp), %rcx
movq %r13, %r9
movq 0x200(%rsp), %r12
pushq %r12
pushq 0x178(%rsp)
pushq %rax
pushq $-0x1
pushq 0x110(%rsp)
leaq 0x160(%rsp), %rax
pushq %rax
pushq 0xf0(%rsp)
callq 0x181df
jmp 0x171ec
movq %r12, %r8
movl %edx, %r12d
movq 0x68(%rsp), %rcx
subl %ecx, %r12d
movq 0xb8(%rsp), %r15
jne 0x171f5
cmpl %ecx, %edx
jne 0x17e0a
leal -0x2(%rcx), %ebx
imull 0x64(%r14), %ebx
movl 0x70(%r14), %eax
addl 0x6c(%r14), %eax
addl %eax, %eax
subl %eax, %ebx
movq 0x1f8(%rsp), %r12
movq %r12, %rdi
movq %rcx, %rbp
callq 0x1863e
andl $0x0, 0x1c(%r12)
xorl %eax, %eax
testl %ebp, %ebp
movl $0x0, %ecx
cmovgl %ebp, %ecx
xorl %edx, %edx
pushq $0x4
popq %r8
cmpq %rdx, %rcx
je 0x17129
movq 0x18(%rsp), %rsi
movb (%rsi,%rdx), %sil
cmpb $0x3, %sil
ja 0x170fa
movb (%r13,%rdx), %dil
cmpb $0x4, %dil
jb 0x1710c
movl 0x80(%r14), %esi
movl %esi, %edi
negl %edi
cmovnsl %esi, %edi
addl %edi, %eax
jmp 0x1711f
cmpb %dil, %sil
jne 0x17117
movl 0x64(%r14), %esi
jmp 0x1711d
xorl %esi, %esi
subl 0x68(%r14), %esi
addl %esi, %eax
movl %eax, 0x1c(%r12)
incq %rdx
jmp 0x170db
cmpl %ebx, %eax
jle 0x17199
movq 0x30(%r12), %rax
movslq 0x24(%r12), %rcx
testq %rcx, %rcx
je 0x17149
movl -0x4(%rax,%rcx,4), %edx
testb $0xf, %dl
je 0x17272
cmpl 0x20(%r12), %ecx
jne 0x1717e
leal (%rcx,%rcx), %edx
testl %ecx, %ecx
cmovel %r8d, %edx
movl %edx, 0x20(%r12)
shll $0x2, %edx
movslq %edx, %rdx
movq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x10c04
movq 0x1f8(%rsp), %r12
movl 0x24(%r12), %ecx
movq 0x68(%rsp), %rdx
shll $0x4, %edx
leal 0x1(%rcx), %esi
movl %esi, 0x24(%r12)
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
jmp 0x17280
movl 0x90(%r14), %eax
subq $0x8, %rsp
movq 0x18(%rsp), %rdi
movq %r14, %rsi
movq 0x70(%rsp), %rdx
movq 0x20(%rsp), %rcx
movl %edx, %r8d
movq %r13, %r9
pushq 0x200(%rsp)
pushq 0x178(%rsp)
pushq %rax
pushq $-0x1
pushq 0x110(%rsp)
leaq 0x160(%rsp), %rax
pushq %rax
pushq %r15
callq 0x181df
movq 0x238(%rsp), %r12
addq $0x40, %rsp
jmp 0x17285
testb $-0x80, (%r14)
je 0x17020
cmpl $0x64, 0x68(%rsp)
jg 0x17020
movslq 0x74(%r14), %rbp
movq 0x68(%rsp), %rax
leal (%rax,%rbp), %ebx
addl %ebx, %ebx
movl %edx, %r10d
subl %ebx, %r10d
jl 0x17020
movl 0x90(%r14), %r11d
addq %rbp, %rbp
xorl %edx, %edx
movq 0x68(%rsp), %rcx
testl %ecx, %ecx
movl $0x0, %eax
cmovgl %ecx, %eax
xorl %ecx, %ecx
cmpq %rdx, %rax
je 0x176d6
movq 0x18(%rsp), %rsi
movb (%rsi,%rdx), %sil
cmpb (%r13,%rdx), %sil
sete %dil
cmpb $0x4, %sil
setb %sil
andb %dil, %sil
movzbl %sil, %esi
addl %esi, %ecx
incq %rdx
jmp 0x17241
movq 0x68(%rsp), %rsi
shll $0x4, %esi
addl %esi, %edx
movl %edx, -0x4(%rax,%rcx,4)
movq %rax, 0x30(%r12)
movl 0x24(%r12), %eax
movq 0x30(%r12), %rcx
movq %rcx, 0xf0(%rsp)
movq %rax, %r12
orl $-0x1, 0x4c(%rsp)
orl $-0x1, 0xe4(%rsp)
xorl %r9d, %r9d
movl $0x80000000, %esi       # imm = 0x80000000
pushq $-0x1
popq %rcx
movl %ecx, %eax
xorl %r13d, %r13d
movl %ecx, %edx
movl %ecx, %r14d
movl %ecx, 0x8(%rsp)
movl $0x0, 0x40(%rsp)
xorl %r10d, %r10d
xorl %r8d, %r8d
movq %r12, 0x198(%rsp)
cmpq %r12, %r9
je 0x174bb
movq 0xf0(%rsp), %rcx
movl (%rcx,%r9,4), %edi
movl %edi, %ecx
shrl $0x4, %ecx
andl $0xf, %edi
je 0x1738b
cmpl $0x3, %edi
ja 0x17474
movq %r9, 0xa0(%rsp)
movl %r10d, %r11d
movq (%rsp), %r10
movl 0x70(%r10), %r15d
movl %r15d, %r9d
imull %ecx, %r9d
addl 0x6c(%r10), %r9d
subl %r9d, %r8d
cmpl $0x1, %edi
movl $0x0, %edi
cmovel %ecx, %edi
movl $0x0, %r9d
cmovel %r9d, %ecx
addl 0x40(%rsp), %edi
addl %r11d, %ecx
movl %esi, %r11d
subl %r8d, %r11d
jle 0x1747d
movl %ecx, %r9d
subl %eax, %r9d
movl 0x4c(%rsp), %r10d
movl %edi, %ebx
subl %r10d, %ebx
movl %r9d, %ebp
subl %ebx, %ebp
negl %ebp
subl %ebx, %r9d
cmovgl %ebp, %r9d
imull %r15d, %r9d
addl %r11d, %r9d
movl %ecx, %r11d
movl %eax, %ebx
leaq 0xe4(%rsp), %r15
cmpl %r13d, %r9d
jg 0x17494
jmp 0x174a4
movq %r9, 0xa0(%rsp)
movl %r10d, %edi
movq %rcx, %r10
movl %edi, 0x120(%rsp)
movl 0x40(%rsp), %r12d
subq $0x1, %r10
jb 0x17456
movl %edi, %r9d
movq 0x28(%rsp), %r11
movzbl (%r11,%r9), %r9d
leaq (%r9,%r9,4), %r9
movl %r12d, %r11d
movq 0x18(%rsp), %rbx
movzbl (%rbx,%r11), %r11d
addq %rsp, %r9
addq $0x130, %r9             # imm = 0x130
movsbl (%r11,%r9), %r9d
addl %r9d, %r8d
movl %esi, %ebx
subl %r8d, %ebx
jle 0x17425
movl %edi, %r15d
subl %eax, %r15d
movl 0x4c(%rsp), %r9d
movl %r12d, %r11d
subl %r9d, %r11d
movl %r15d, %ebp
subl %r11d, %ebp
negl %ebp
subl %r11d, %r15d
cmovgl %ebp, %r15d
movq (%rsp), %r11
imull 0x70(%r11), %r15d
addl %ebx, %r15d
movl %edi, %ebx
movl %eax, %ebp
leaq 0xe4(%rsp), %r11
cmpl %r13d, %r15d
jg 0x1743c
jmp 0x1744c
movl %r8d, %esi
movl %edi, %eax
movl %r13d, %r15d
movl %edx, %r9d
movl %r14d, %ebx
movl 0x8(%rsp), %ebp
leaq 0x4c(%rsp), %r11
movl %r12d, (%r11)
movl %r15d, %r13d
movl %r9d, %edx
movl %ebx, %r14d
movl %ebp, 0x8(%rsp)
incl %r12d
incl %edi
jmp 0x173a5
movl 0x120(%rsp), %r9d
addl %ecx, %r9d
movl 0x40(%rsp), %edi
addl %ecx, %edi
movl %r9d, %ecx
movq 0x198(%rsp), %r12
jmp 0x174a4
movl 0x40(%rsp), %edi
movl %r10d, %ecx
jmp 0x174ac
movl %r8d, %esi
movl %ecx, %eax
movl %r13d, %r9d
movl %edx, %r10d
movl %r14d, %r11d
movl 0x8(%rsp), %ebx
leaq 0x4c(%rsp), %r15
movl %edi, (%r15)
movl %r9d, %r13d
movl %r10d, %edx
movl %r11d, %r14d
movl %ebx, 0x8(%rsp)
movq 0xa0(%rsp), %r9
incq %r9
movl %edi, 0x40(%rsp)
movl %ecx, %r10d
jmp 0x172d6
movq (%rsp), %rcx
testl $0x301080, (%rcx)       # imm = 0x301080
jne 0x175eb
cmpl 0x94(%rcx), %r13d
jle 0x175eb
movl 0xe4(%rsp), %ebx
movl %ebx, %r8d
subl %edx, %r8d
movl 0x1c(%rcx), %eax
cmpl %eax, %r8d
jge 0x175eb
subl 0x8(%rsp), %r14d
movl %r14d, 0x40(%rsp)
cmpl %eax, %r14d
jge 0x175eb
movslq %r8d, %rsi
movq 0x10(%rsp), %rdi
movl %r8d, %r14d
callq 0x10afc
movl %r14d, %r8d
movq %rax, %r12
testl %r14d, %r14d
movl $0x0, %eax
cmovgl %r14d, %eax
decl %ebx
xorl %ecx, %ecx
pushq $0x4
popq %rdi
cmpq %rcx, %rax
je 0x17558
movslq %ebx, %rbx
movq 0x18(%rsp), %rdx
movb (%rdx,%rbx), %dl
movb $0x3, %sil
subb %dl, %sil
cmpb $0x4, %dl
movzbl %sil, %edx
cmovael %edi, %edx
movb %dl, (%r12,%rcx)
incq %rcx
decl %ebx
jmp 0x1752d
movq 0x10(%rsp), %r15
movq %r15, %rdi
pushq $0x2
popq %rsi
movl %r8d, %edx
movq %r12, %rcx
pushq $0x5
popq %r8
leaq 0x130(%rsp), %r9
callq 0x1bce4
movq %rax, %rbp
movslq 0x8(%rsp), %rdx
addq 0x28(%rsp), %rdx
movq (%rsp), %r14
movl 0x6c(%r14), %ecx
movl 0x70(%r14), %r8d
subq $0x8, %rsp
movq %rax, %rdi
movl 0x48(%rsp), %esi
leaq 0x1ac(%rsp), %r9
leaq 0x1a8(%rsp), %rax
pushq %rax
callq 0x1bec3
popq %rcx
popq %rdx
movl %eax, %ebx
movq %r15, %rdi
movq %r12, %rsi
callq 0x10a07
movq %r15, %rdi
movq %rbp, %rsi
callq 0x10a07
movl 0x64(%r14), %eax
imull 0x34(%r14), %eax
cmpl %eax, %ebx
jl 0x175e8
cmpl 0x9c(%r14), %ebx
jge 0x17909
movq %r14, %rcx
movl 0x90(%rcx), %eax
xorl %ebp, %ebp
cmpl %eax, %r13d
movq %rcx, %r14
movq 0x28(%rsp), %r9
movq 0x1f8(%rsp), %rbx
jle 0x17651
subq $0x8, %rsp
movq 0x18(%rsp), %rdi
movq %r14, %rsi
movq 0x70(%rsp), %rdx
movq 0x20(%rsp), %rcx
movl 0xbc(%rsp), %r8d
pushq %rbx
pushq 0xd0(%rsp)
pushq %rax
pushq $-0x1
pushq 0x110(%rsp)
leaq 0x160(%rsp), %rax
pushq %rax
pushq 0xf0(%rsp)
callq 0x181df
addq $0x40, %rsp
movl 0x24(%rbx), %esi
testl %esi, %esi
movq 0x180(%rsp), %r13
jle 0x17676
movq 0x30(%rbx), %rdx
movq 0x50(%rsp), %rdi
callq 0x185b3
movq 0x1f8(%rsp), %rbx
cmpl $0x0, (%rbx)
js 0x17a09
movl 0x1c(%rbx), %eax
movq 0x50(%rsp), %rcx
movq 0x48(%rcx), %rcx
addl %eax, 0x4(%rcx)
movq 0xa8(%rsp), %r8
movl %r8d, %r10d
movq 0x78(%rsp), %rdi
movl %edi, %eax
movq %rax, 0x58(%rsp)
movl %r8d, %ebx
movl %edi, %r15d
movq 0x90(%rsp), %r12
movq 0x60(%rsp), %rbp
movq 0x118(%rsp), %rsi
movabsq $0x60000000000, %rcx    # imm = 0x60000000000
incq %rsi
addq $0x10, %r13
jmp 0x16dec
movl %r8d, %edx
notl %edx
addl 0xa8(%rsp), %edx
movq 0x58(%rsp), %rsi
notl %esi
addl %r9d, %esi
xorl %edi, %edi
subq $0x1, %rax
jb 0x17724
movslq %esi, %rsi
movq 0x18(%rsp), %r8
movb (%r8,%rsi), %r8b
movslq %edx, %rdx
cmpb (%r13,%rdx), %r8b
sete %r9b
cmpb $0x4, %r8b
setb %r8b
andb %r9b, %r8b
movzbl %r8b, %r8d
addl %r8d, %edi
decl %edx
decl %esi
jmp 0x176ee
addl %edi, %ecx
movq 0x68(%rsp), %rax
subl %ecx, %eax
cmpl $0x9, %eax
movl 0xb4(%rsp), %edx
jg 0x17020
movl %ebx, 0xa0(%rsp)
movq %r11, 0x40(%rsp)
movl %r10d, 0x8(%rsp)
movslq 0x68(%rsp), %rbx
movq 0x108(%rsp), %r15
movq %r15, %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x22a0
leaq (%r15,%rbx), %rdi
pushq $0x4
popq %rsi
movq %rbp, %rdx
callq 0x21b0
movq %rbp, 0xf0(%rsp)
movq 0x68(%rsp), %rax
addl %ebp, %eax
cltq
leaq (%r15,%rax), %rdi
movq %rax, %r15
movslq %r12d, %rax
leaq (%rax,%r13), %rsi
movq %rax, %r13
movq %rbx, %rdx
callq 0x22a0
movq 0xb8(%rsp), %r12
testq %r12, %r12
movq 0x178(%rsp), %rbp
je 0x177ec
movq %rbp, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x22a0
leaq (%rbx,%rbp), %rdi
xorl %esi, %esi
movq 0xf0(%rsp), %rdx
callq 0x21b0
addq %rbp, %r15
addq %r12, %r13
movq %r15, %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x22a0
xorl %ebx, %ebx
btq $0x23, (%r14)
setae %bl
shll $0xb, %ebx
orl 0xc0(%rsp), %ebx
orl $0x8, %ebx
movsbl 0x6c(%r14), %eax
movsbl 0x70(%r14), %r10d
movsbl 0x74(%r14), %r11d
movq (%rsp), %rcx
movsbl 0x84(%rcx), %r14d
movq (%rsp), %rcx
movsbl 0x88(%rcx), %r12d
movq (%rsp), %rcx
movsbl 0x8c(%rcx), %r13d
movq 0x10(%rsp), %rdi
movq 0x68(%rsp), %rsi
movq 0x18(%rsp), %rdx
movl 0xa0(%rsp), %ecx
movq 0x108(%rsp), %r8
pushq $0x5
popq %r9
movq 0x1f8(%rsp), %r15
pushq %r15
pushq %rbp
pushq %rbx
pushq %r13
pushq %r12
pushq $-0x1
pushq 0x70(%rsp)
pushq %r14
movq 0x40(%rsp), %r14
pushq %r11
pushq %r10
pushq %rax
leaq 0x188(%rsp), %rax
pushq %rax
callq 0x1c41a
addq $0x60, %rsp
cmpl $0x0, (%r15)
movq 0x28(%rsp), %r13
movl 0xb4(%rsp), %edx
movl 0x8(%rsp), %r10d
js 0x17020
movq 0x1f8(%rsp), %rax
movq 0x30(%rax), %rax
testb $0xf, (%rax)
jne 0x17020
movq 0x1f8(%rsp), %rcx
movslq 0x24(%rcx), %rcx
testb $0xf, -0x4(%rax,%rcx,4)
jne 0x17020
xorl %edx, %edx
testl %ecx, %ecx
movl $0x0, %esi
cmovgl %ecx, %esi
xorl %r8d, %r8d
xorl %edi, %edi
cmpq %rdx, %rsi
je 0x17925
movl (%rax,%rdx,4), %r9d
andl $0xf, %r9d
cmpl $0x1, %r9d
je 0x17902
cmpl $0x3, %r9d
jne 0x17904
incl %r8d
jmp 0x17904
incl %edi
incq %rdx
jmp 0x178e4
movl 0x94(%r14), %eax
movb $0x1, %bpl
movq 0x28(%rsp), %r9
movq 0x1f8(%rsp), %rbx
jmp 0x17608
cmpl $0x1, %r8d
setne %dl
testl %edi, %edi
setg %sil
orb %dl, %sil
movl 0xb4(%rsp), %edx
jne 0x17020
shll $0x4, %r10d
xorl %edx, %edx
movq 0x1f8(%rsp), %r12
movslq %ecx, %rsi
cmpq %rsi, %rdx
jge 0x17285
movl (%rax,%rdx,4), %esi
movl %esi, %edi
andl $0xf, %edi
cmpl $0x3, %edi
jne 0x17974
addl %r10d, %esi
movl %esi, (%rax,%rdx,4)
movl 0x24(%r12), %ecx
incq %rdx
jmp 0x17950
movl 0xd4(%rsp), %eax
subl %edi, %eax
jle 0x17c35
movl 0xd0(%rsp), %ebp
subl %r8d, %ebp
movq 0x28(%rsp), %r9
jle 0x17c35
movl %eax, 0xd4(%rsp)
movq %rdi, 0x78(%rsp)
movslq %edi, %rcx
movq %rcx, 0x8(%rsp)
movabsq $0x100000000, %rcx      # imm = 0x100000000
testq %rcx, (%r14)
jne 0x17b13
movq 0x90(%rsp), %rax
movq 0xc8(%rsp), %rcx
movq (%rax,%rcx,8), %rbx
movq 0x60(%rsp), %r15
movq %r15, %rdi
movq 0x80(%rsp), %r12
movl %r12d, %esi
movl %r8d, %edx
movl 0xd0(%rsp), %r13d
movl %r13d, %ecx
movq %r8, %r14
movq %r9, %r8
callq 0x612e
jmp 0x17b4f
movq 0x50(%rsp), %rax
movq 0x48(%rax), %rax
testq %rax, %rax
movq 0x118(%rsp), %rcx
jne 0x17a53
movq 0x1f8(%rsp), %rax
cmpl $0x0, 0x24(%rax)
jne 0x17f02
pushq $0x8
popq %rdi
pushq $0x4
popq %rsi
callq 0x2230
movq 0x50(%rsp), %rcx
movq %rax, 0x48(%rcx)
movl $0x8, (%rax)
movq 0x118(%rsp), %rcx
movq 0x88(%rsp), %r8
movq %rcx, %rdx
testq %rcx, %rcx
jle 0x17a85
movq 0x1f8(%rsp), %rcx
movl 0x8(%rcx), %ecx
addl %r8d, %ecx
leaq -0x10(%r13), %rsi
leaq -0x1(%rdx), %rdi
cmpl (%r13), %ecx
movq %rsi, %r13
movq %rdi, %rcx
jl 0x17a5b
decl %edx
xorl %ecx, %ecx
testl %edx, %edx
cmovgl %edx, %ecx
movl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
movq 0x1f8(%rsp), %rsi
andl (%rsi), %edx
addl %edx, 0x4(%rax)
movl 0x4(%rsi), %eax
movl 0x8(%rsi), %edx
leal (%r8,%rdx), %ebx
incl %ebx
movq 0x58(%rsp), %rdx
leal 0x1(%rdx,%rax), %r15d
movl %ecx, %eax
notl %eax
movq 0x30(%rsp), %rdx
addl %eax, %edx
cmpl 0x30(%r14), %edx
jl 0x17c35
movq 0x38(%rsp), %rdx
addl %ecx, %edx
movq 0x50(%rsp), %rdi
subl 0x28(%rdi), %edx
incl %edx
movl 0x4(%r14), %r9d
andl $0x1, %r9d
movq 0x1e0(%rsp), %r14
movq %r14, %rsi
movl 0x24(%rsp), %ecx
movq 0x1f0(%rsp), %r8
callq 0x195b8
testb %bpl, %bpl
je 0x17c35
orb $0x1, 0x3f(%r14)
jmp 0x17c35
movq 0x90(%rsp), %rax
movq (%rax), %rbx
movq 0x60(%rsp), %r15
movq %r15, %rdi
movq 0xc8(%rsp), %rsi
movq 0x80(%rsp), %r12
movl %r12d, %edx
movl %r8d, %ecx
movq %r8, %r14
movl 0xd0(%rsp), %r13d
movl %r13d, %r8d
callq 0x6237
addq 0x8(%rsp), %rbx
movq %r15, %rdi
movl %r12d, %esi
movq %r14, %r15
movl %r14d, %edx
movl %r13d, %ecx
movl 0x100(%rsp), %r8d
movq 0xb8(%rsp), %r14
movq %r14, %r9
callq 0x18188
movq (%rsp), %rsi
movl 0x90(%rsi), %eax
movl 0x98(%rsi), %r10d
movq 0xc0(%rsp), %r11
orl $0x40, %r11d
subq $0x8, %rsp
movq 0x18(%rsp), %rdi
movl 0xdc(%rsp), %r12d
movl %r12d, %edx
movq %rbx, %rcx
movl %ebp, %r8d
movq 0x30(%rsp), %r9
movq 0x200(%rsp), %rbx
pushq %rbx
pushq %r11
pushq %rax
pushq %r10
pushq 0x180(%rsp)
leaq 0x160(%rsp), %rax
pushq %rax
pushq %r14
callq 0x181df
movq %rbx, %rdx
addq $0x40, %rsp
movl 0x24(%rbx), %esi
testl %esi, %esi
movq 0x50(%rsp), %rbx
jle 0x17c11
movq 0x30(%rdx), %rdx
movq %rbx, %rdi
callq 0x185b3
movq 0x1f8(%rsp), %rdx
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
andl (%rdx), %eax
movq 0x48(%rbx), %rcx
addl %eax, 0x4(%rcx)
xorl %eax, %eax
cmpl $0x0, 0x28(%rdx)
setne %al
movl 0x8(%rdx,%rax,8), %eax
jne 0x17c27
movl 0x4(%rdx), %r12d
incl %r12d
leal (%r15,%rax), %ebx
incl %ebx
addl 0x78(%rsp), %r12d
movl %r12d, %r15d
movl 0x24(%rsp), %eax
subl %r15d, %eax
jl 0x17e86
movq 0x50(%rsp), %r14
movl 0xfc(%rsp), %ecx
movl %ecx, 0x18(%r14)
movl %ebx, 0x1c(%r14)
movq 0x110(%rsp), %r12
testq %r12, %r12
movq 0x90(%rsp), %r13
movq 0x98(%rsp), %rbp
jns 0x17c99
movq (%rsp), %rcx
movabsq $0x100000000, %rdx      # imm = 0x100000000
testq %rdx, (%rcx)
jne 0x17c99
movl %eax, 0x10(%r14)
movl 0x24(%rsp), %r15d
subl 0xd8(%rsp), %r15d
jmp 0x17ca4
movl 0xd8(%rsp), %eax
movl %eax, 0x10(%r14)
movl %r15d, 0x14(%r14)
movl %ebx, %eax
movl 0xfc(%rsp), %r8d
subl %r8d, %eax
cmpl 0x12c(%rsp), %eax
jg 0x17ea5
cmpq $0x0, 0x48(%r14)
movq 0x80(%rsp), %rdx
je 0x17daa
movq (%rsp), %rax
movabsq $0x100000000, %rcx      # imm = 0x100000000
testq %rcx, (%rax)
jne 0x17d10
movq 0x60(%rsp), %rdi
movl %edx, %esi
movl %r8d, %edx
movl %ebx, %ecx
movq 0x28(%rsp), %rbx
movq %rbx, %r8
callq 0x612e
movl 0x3c(%r14), %eax
shrl $0x7, %eax
andl $0x8, %eax
addq %rax, %r13
jmp 0x17d32
movl 0x3c(%r14), %esi
shrl $0xa, %esi
andl $0x1, %esi
movq 0x60(%rsp), %rdi
movl %r8d, %ecx
movl %ebx, %r8d
movq 0x28(%rsp), %rbx
movq %rbx, %r9
callq 0x6237
movabsq $0x8000000080, %rax     # imm = 0x8000000080
cmpq %rax, 0x160(%rsp)
setne %al
btl $0xc, %ebp
setae %cl
movl 0xd8(%rsp), %esi
addq (%r13), %rsi
movq (%rsp), %rdx
movsbl 0x6c(%rdx), %r8d
movsbl 0x70(%rdx), %r9d
movl $0x4000000, %r10d       # imm = 0x4000000
andl (%rdx), %r10d
andb %al, %cl
movzbl %cl, %eax
leaq 0x130(%rsp), %rcx
movq %r14, %rdi
movq %rbx, %rdx
pushq %rax
pushq %r10
callq 0x18659
popq %rax
popq %rcx
testq %r12, %r12
jns 0x17daa
movq 0x48(%r14), %rax
movl 0x14(%rax), %ecx
cmpl $0x40000000, %ecx       # imm = 0x40000000
jb 0x17daa
xorl $0xc0000000, %ecx       # imm = 0xC0000000
movl %ecx, 0x14(%rax)
movq 0x108(%rsp), %rsi
testq %rsi, %rsi
movq 0x10(%rsp), %rbx
je 0x17dc4
movq %rbx, %rdi
callq 0x10a07
movq %rbx, %rdi
movq 0x28(%rsp), %rsi
callq 0x10a07
movq %rbx, %rdi
movq 0xb8(%rsp), %rsi
callq 0x10a07
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl %r12d, %r13d
cmovgl %r13d, %r12d
leal (%r12,%rbx), %edi
addl %eax, %r12d
movl 0x24(%rsp), %ecx
jmp 0x16903
leaq 0x118cb(%rip), %rdi     # 0x296dc
leaq 0x117ff(%rip), %rsi     # 0x29617
leaq 0x11800(%rip), %rcx     # 0x2961f
movl $0x339, %edx            # imm = 0x339
callq 0x21a0
leaq 0x1187b(%rip), %rdi     # 0x296ab
leaq 0x117e0(%rip), %rsi     # 0x29617
leaq 0x117e1(%rip), %rcx     # 0x2961f
movl $0x2aa, %edx            # imm = 0x2AA
callq 0x21a0
leaq 0x1186e(%rip), %rdi     # 0x296bd
leaq 0x117c1(%rip), %rsi     # 0x29617
leaq 0x117c2(%rip), %rcx     # 0x2961f
movl $0x301, %edx            # imm = 0x301
callq 0x21a0
leaq 0x11859(%rip), %rdi     # 0x296c7
leaq 0x117a2(%rip), %rsi     # 0x29617
leaq 0x117a3(%rip), %rcx     # 0x2961f
movl $0x321, %edx            # imm = 0x321
callq 0x21a0
leaq 0x11873(%rip), %rdi     # 0x29700
leaq 0x11783(%rip), %rsi     # 0x29617
leaq 0x11784(%rip), %rcx     # 0x2961f
movl $0x37b, %edx            # imm = 0x37B
callq 0x21a0
leaq 0x11860(%rip), %rdi     # 0x2970c
leaq 0x11764(%rip), %rsi     # 0x29617
leaq 0x11765(%rip), %rcx     # 0x2961f
movl $0x381, %edx            # imm = 0x381
callq 0x21a0
leaq 0x11735(%rip), %rdi     # 0x29600
leaq 0x11745(%rip), %rsi     # 0x29617
leaq 0x11746(%rip), %rcx     # 0x2961f
movl $0x28f, %edx            # imm = 0x28F
callq 0x21a0
leaq 0x117ca(%rip), %rdi     # 0x296b4
leaq 0x11726(%rip), %rsi     # 0x29617
leaq 0x11727(%rip), %rcx     # 0x2961f
movl $0x2c5, %edx            # imm = 0x2C5
callq 0x21a0
leaq 0x117e6(%rip), %rdi     # 0x296ef
leaq 0x11707(%rip), %rsi     # 0x29617
leaq 0x11708(%rip), %rcx     # 0x2961f
movl $0x352, %edx            # imm = 0x352
callq 0x21a0