// File: /workspace/github_c_makefile_star2_O3/nh13[P]ksw/src/ksw2/ksw2_extz2_sse.c
// Function: ksw_extz2_sse
void ksw_extz2_sse(void *km, int qlen, const uint8_t *query, int tlen, const uint8_t *target, int8_t m, const int8_t *mat, int8_t q, int8_t e, int w, int zdrop, int flag, ksw_extz_t *ez)
#endif // ~KSW_CPU_DISPATCH
{
#define __dp_code_block1 \
	z = _mm_add_epi8(_mm_load_si128(&s[t]), qe2_); \
	xt1 = _mm_load_si128(&x[t]);                     /* xt1 <- x[r-1][t..t+15] */ \
	tmp = _mm_srli_si128(xt1, 15);                   /* tmp <- x[r-1][t+15] */ \
	xt1 = _mm_or_si128(_mm_slli_si128(xt1, 1), x1_); /* xt1 <- x[r-1][t-1..t+14] */ \
	x1_ = tmp; \
	vt1 = _mm_load_si128(&v[t]);                     /* vt1 <- v[r-1][t..t+15] */ \
	tmp = _mm_srli_si128(vt1, 15);                   /* tmp <- v[r-1][t+15] */ \
	vt1 = _mm_or_si128(_mm_slli_si128(vt1, 1), v1_); /* vt1 <- v[r-1][t-1..t+14] */ \
	v1_ = tmp; \
	a = _mm_add_epi8(xt1, vt1);                      /* a <- x[r-1][t-1..t+14] + v[r-1][t-1..t+14] */ \
	ut = _mm_load_si128(&u[t]);                      /* ut <- u[t..t+15] */ \
	b = _mm_add_epi8(_mm_load_si128(&y[t]), ut);     /* b <- y[r-1][t..t+15] + u[r-1][t..t+15] */

#define __dp_code_block2 \
	z = _mm_max_epu8(z, b);                          /* z = max(z, b); this works because both are non-negative */ \
	z = _mm_min_epu8(z, max_sc_); \
	_mm_store_si128(&u[t], _mm_sub_epi8(z, vt1));    /* u[r][t..t+15] <- z - v[r-1][t-1..t+14] */ \
	_mm_store_si128(&v[t], _mm_sub_epi8(z, ut));     /* v[r][t..t+15] <- z - u[r-1][t..t+15] */ \
	z = _mm_sub_epi8(z, q_); \
	a = _mm_sub_epi8(a, z); \
	b = _mm_sub_epi8(b, z);

	int r, t, qe = q + e, n_col_, *off = 0, *off_end = 0, tlen_, qlen_, last_st, last_en, wl, wr, max_sc, min_sc;
	int with_cigar = !(flag&KSW_EZ_SCORE_ONLY), approx_max = !!(flag&KSW_EZ_APPROX_MAX);
	int32_t *H = 0, H0 = 0, last_H0_t = 0;
	uint8_t *qr, *sf, *mem, *mem2 = 0;
	__m128i q_, qe2_, zero_, flag1_, flag2_, flag8_, flag16_, sc_mch_, sc_mis_, m1_, max_sc_;
	__m128i *u, *v, *x, *y, *s, *p = 0;

	ksw_reset_extz(ez);
	if (m <= 0 || qlen <= 0 || tlen <= 0) return;

	zero_   = _mm_set1_epi8(0);
	q_      = _mm_set1_epi8(q);
	qe2_    = _mm_set1_epi8((q + e) * 2);
	flag1_  = _mm_set1_epi8(1);
	flag2_  = _mm_set1_epi8(2);
	flag8_  = _mm_set1_epi8(0x08);
	flag16_ = _mm_set1_epi8(0x10);
	sc_mch_ = _mm_set1_epi8(mat[0]);
	sc_mis_ = _mm_set1_epi8(mat[1]);
	m1_     = _mm_set1_epi8(m - 1); // wildcard
	max_sc_ = _mm_set1_epi8(mat[0] + (q + e) * 2);

	if (w < 0) w = tlen > qlen? tlen : qlen;
	wl = wr = w;
	tlen_ = (tlen + 15) / 16;
	n_col_ = qlen < tlen? qlen : tlen;
	n_col_ = ((n_col_ < w + 1? n_col_ : w + 1) + 15) / 16 + 1;
	qlen_ = (qlen + 15) / 16;
	for (t = 1, max_sc = mat[0], min_sc = mat[1]; t < m * m; ++t) {
		max_sc = max_sc > mat[t]? max_sc : mat[t];
		min_sc = min_sc < mat[t]? min_sc : mat[t];
	}
	if (-min_sc > 2 * (q + e)) return; // otherwise, we won't see any mismatches

	mem = (uint8_t*)kcalloc(km, tlen_ * 6 + qlen_ + 1, 16);
	u = (__m128i*)(((size_t)mem + 15) >> 4 << 4); // 16-byte aligned
	v = u + tlen_, x = v + tlen_, y = x + tlen_, s = y + tlen_, sf = (uint8_t*)(s + tlen_), qr = sf + tlen_ * 16;
	if (!approx_max) {
		H = (int32_t*)kmalloc(km, tlen_ * 16 * 4);
		for (t = 0; t < tlen_ * 16; ++t) H[t] = KSW_NEG_INF;
	}
	if (with_cigar) {
		mem2 = (uint8_t*)kmalloc(km, ((qlen + tlen - 1) * n_col_ + 1) * 16);
		p = (__m128i*)(((size_t)mem2 + 15) >> 4 << 4);
		off = (int*)kmalloc(km, (qlen + tlen - 1) * sizeof(int) * 2);
		off_end = off + qlen + tlen - 1;
	}

	for (t = 0; t < qlen; ++t) qr[t] = query[qlen - 1 - t];
	memcpy(sf, target, tlen);

	for (r = 0, last_st = last_en = -1; r < qlen + tlen - 1; ++r) {
		int st = 0, en = tlen - 1, st0, en0, st_, en_;
		int8_t x1, v1;
		uint8_t *qrr = qr + (qlen - 1 - r), *u8 = (uint8_t*)u, *v8 = (uint8_t*)v;
		__m128i x1_, v1_;
		// find the boundaries
		if (st < r - qlen + 1) st = r - qlen + 1;
		if (en > r) en = r;
		if (st < (r-wr+1)>>1) st = (r-wr+1)>>1; // take the ceil
		if (en > (r+wl)>>1) en = (r+wl)>>1; // take the floor
		if (st > en) {
			ez->zdropped = 1;
			break;
		}
		st0 = st, en0 = en;
		st = st / 16 * 16, en = (en + 16) / 16 * 16 - 1;
		// set boundary conditions
		if (st > 0) {
			if (st - 1 >= last_st && st - 1 <= last_en)
				x1 = ((uint8_t*)x)[st - 1], v1 = v8[st - 1]; // (r-1,s-1) calculated in the last round
			else x1 = v1 = 0; // not calculated; set to zeros
		} else x1 = 0, v1 = r? q : 0;
		if (en >= r) ((uint8_t*)y)[r] = 0, u8[r] = r? q : 0;
		// loop fission: set scores first
		if (!(flag & KSW_EZ_GENERIC_SC)) {
			for (t = st0; t <= en0; t += 16) {
				__m128i sq, st, tmp, mask;
				sq = _mm_loadu_si128((__m128i*)&sf[t]);
				st = _mm_loadu_si128((__m128i*)&qrr[t]);
				mask = _mm_or_si128(_mm_cmpeq_epi8(sq, m1_), _mm_cmpeq_epi8(st, m1_));
				tmp = _mm_cmpeq_epi8(sq, st);
#ifdef __SSE4_1__
				tmp = _mm_blendv_epi8(sc_mis_, sc_mch_, tmp);
#else
				tmp = _mm_or_si128(_mm_andnot_si128(tmp, sc_mis_), _mm_and_si128(tmp, sc_mch_));
#endif
				tmp = _mm_andnot_si128(mask, tmp);
				_mm_storeu_si128((__m128i*)((uint8_t*)s + t), tmp);
			}
		} else {
			for (t = st0; t <= en0; ++t)
				((uint8_t*)s)[t] = mat[sf[t] * m + qrr[t]];
		}
		// core loop
		x1_ = _mm_cvtsi32_si128(x1);
		v1_ = _mm_cvtsi32_si128(v1);
		st_ = st / 16, en_ = en / 16;
		assert(en_ - st_ + 1 <= n_col_);
		if (!with_cigar) { // score only
			for (t = st_; t <= en_; ++t) {
				__m128i z, a, b, xt1, vt1, ut, tmp;
				__dp_code_block1;
#ifdef __SSE4_1__
				z = _mm_max_epi8(z, a);                          // z = z > a? z : a (signed)
#else // we need to emulate SSE4.1 intrinsics _mm_max_epi8()
				z = _mm_and_si128(z, _mm_cmpgt_epi8(z, zero_));  // z = z > 0? z : 0;
				z = _mm_max_epu8(z, a);                          // z = max(z, a); this works because both are non-negative
#endif
				__dp_code_block2;
#ifdef __SSE4_1__
				_mm_store_si128(&x[t], _mm_max_epi8(a, zero_));
				_mm_store_si128(&y[t], _mm_max_epi8(b, zero_));
#else
				tmp = _mm_cmpgt_epi8(a, zero_);
				_mm_store_si128(&x[t], _mm_and_si128(a, tmp));
				tmp = _mm_cmpgt_epi8(b, zero_);
				_mm_store_si128(&y[t], _mm_and_si128(b, tmp));
#endif
			}
		} else if (!(flag&KSW_EZ_RIGHT)) { // gap left-alignment
			__m128i *pr = p + r * n_col_ - st_;
			off[r] = st, off_end[r] = en;
			for (t = st_; t <= en_; ++t) {
				__m128i d, z, a, b, xt1, vt1, ut, tmp;
				__dp_code_block1;
				d = _mm_and_si128(_mm_cmpgt_epi8(a, z), flag1_); // d = a > z? 1 : 0
#ifdef __SSE4_1__
				z = _mm_max_epi8(z, a);                          // z = z > a? z : a (signed)
				tmp = _mm_cmpgt_epi8(b, z);
				d = _mm_blendv_epi8(d, flag2_, tmp);             // d = b > z? 2 : d
#else // we need to emulate SSE4.1 intrinsics _mm_max_epi8() and _mm_blendv_epi8()
				z = _mm_and_si128(z, _mm_cmpgt_epi8(z, zero_));  // z = z > 0? z : 0;
				z = _mm_max_epu8(z, a);                          // z = max(z, a); this works because both are non-negative
				tmp = _mm_cmpgt_epi8(b, z);
				d = _mm_or_si128(_mm_andnot_si128(tmp, d), _mm_and_si128(tmp, flag2_)); // d = b > z? 2 : d; emulating blendv
#endif
				__dp_code_block2;
				tmp = _mm_cmpgt_epi8(a, zero_);
				_mm_store_si128(&x[t], _mm_and_si128(tmp, a));
				d = _mm_or_si128(d, _mm_and_si128(tmp, flag8_));  // d = a > 0? 0x08 : 0
				tmp = _mm_cmpgt_epi8(b, zero_);
				_mm_store_si128(&y[t], _mm_and_si128(tmp, b));
				d = _mm_or_si128(d, _mm_and_si128(tmp, flag16_)); // d = b > 0? 0x10 : 0
				_mm_store_si128(&pr[t], d);
			}
		} else { // gap right-alignment
			__m128i *pr = p + r * n_col_ - st_;
			off[r] = st, off_end[r] = en;
			for (t = st_; t <= en_; ++t) {
				__m128i d, z, a, b, xt1, vt1, ut, tmp;
				__dp_code_block1;
				d = _mm_andnot_si128(_mm_cmpgt_epi8(z, a), flag1_); // d = z > a? 0 : 1
#ifdef __SSE4_1__
				z = _mm_max_epi8(z, a);                          // z = z > a? z : a (signed)
				tmp = _mm_cmpgt_epi8(z, b);
				d = _mm_blendv_epi8(flag2_, d, tmp);             // d = z > b? d : 2
#else // we need to emulate SSE4.1 intrinsics _mm_max_epi8() and _mm_blendv_epi8()
				z = _mm_and_si128(z, _mm_cmpgt_epi8(z, zero_));  // z = z > 0? z : 0;
				z = _mm_max_epu8(z, a);                          // z = max(z, a); this works because both are non-negative
				tmp = _mm_cmpgt_epi8(z, b);
				d = _mm_or_si128(_mm_andnot_si128(tmp, flag2_), _mm_and_si128(tmp, d)); // d = z > b? d : 2; emulating blendv
#endif
				__dp_code_block2;
				tmp = _mm_cmpgt_epi8(zero_, a);
				_mm_store_si128(&x[t], _mm_andnot_si128(tmp, a));
				d = _mm_or_si128(d, _mm_andnot_si128(tmp, flag8_));  // d = 0 > a? 0 : 0x08
				tmp = _mm_cmpgt_epi8(zero_, b);
				_mm_store_si128(&y[t], _mm_andnot_si128(tmp, b));
				d = _mm_or_si128(d, _mm_andnot_si128(tmp, flag16_)); // d = 0 > b? 0 : 0x10
				_mm_store_si128(&pr[t], d);
			}
		}
		if (!approx_max) { // find the exact max with a 32-bit score array
			int32_t max_H, max_t;
			// compute H[], max_H and max_t
			if (r > 0) {
				int32_t HH[4], tt[4], en1 = st0 + (en0 - st0) / 4 * 4, i;
				__m128i max_H_, max_t_, qe_;
				max_H = H[en0] = en0 > 0? H[en0-1] + u8[en0] - qe : H[en0] + v8[en0] - qe; // special casing the last element
				max_t = en0;
				max_H_ = _mm_set1_epi32(max_H);
				max_t_ = _mm_set1_epi32(max_t);
				qe_    = _mm_set1_epi32(q + e);
				for (t = st0; t < en1; t += 4) { // this implements: H[t]+=v8[t]-qe; if(H[t]>max_H) max_H=H[t],max_t=t;
					__m128i H1, tmp, t_;
					H1 = _mm_loadu_si128((__m128i*)&H[t]);
					t_ = _mm_setr_epi32(v8[t], v8[t+1], v8[t+2], v8[t+3]);
					H1 = _mm_add_epi32(H1, t_);
					H1 = _mm_sub_epi32(H1, qe_);
					_mm_storeu_si128((__m128i*)&H[t], H1);
					t_ = _mm_set1_epi32(t);
					tmp = _mm_cmpgt_epi32(H1, max_H_);
#ifdef __SSE4_1__
					max_H_ = _mm_blendv_epi8(max_H_, H1, tmp);
					max_t_ = _mm_blendv_epi8(max_t_, t_, tmp);
#else
					max_H_ = _mm_or_si128(_mm_and_si128(tmp, H1), _mm_andnot_si128(tmp, max_H_));
					max_t_ = _mm_or_si128(_mm_and_si128(tmp, t_), _mm_andnot_si128(tmp, max_t_));
#endif
				}
				_mm_storeu_si128((__m128i*)HH, max_H_);
				_mm_storeu_si128((__m128i*)tt, max_t_);
				for (i = 0; i < 4; ++i)
					if (max_H < HH[i]) max_H = HH[i], max_t = tt[i] + i;
				for (; t < en0; ++t) { // for the rest of values that haven't been computed with SSE
					H[t] += (int32_t)v8[t] - qe;
					if (H[t] > max_H)
						max_H = H[t], max_t = t;
				}
			} else H[0] = v8[0] - qe - qe, max_H = H[0], max_t = 0; // special casing r==0
			// update ez
			if (en0 == tlen - 1 && H[en0] > ez->mte)
				ez->mte = H[en0], ez->mte_q = r - en;
			if (r - st0 == qlen - 1 && H[st0] > ez->mqe)
				ez->mqe = H[st0], ez->mqe_t = st0;
			if (ksw_apply_zdrop(ez, 1, max_H, r, max_t, zdrop, e)) break;
			if (r == qlen + tlen - 2 && en0 == tlen - 1)
				ez->score = H[tlen - 1];
		} else { // find approximate max; Z-drop might be inaccurate, too.
			if (r > 0) {
				if (last_H0_t >= st0 && last_H0_t <= en0 && last_H0_t + 1 >= st0 && last_H0_t + 1 <= en0) {
					int32_t d0 = v8[last_H0_t] - qe;
					int32_t d1 = u8[last_H0_t + 1] - qe;
					if (d0 > d1) H0 += d0;
					else H0 += d1, ++last_H0_t;
				} else if (last_H0_t >= st0 && last_H0_t <= en0) {
					H0 += v8[last_H0_t] - qe;
				} else {
					++last_H0_t, H0 += u8[last_H0_t] - qe;
				}
				if ((flag & KSW_EZ_APPROX_DROP) && ksw_apply_zdrop(ez, 1, H0, r, last_H0_t, zdrop, e)) break;
			} else H0 = v8[0] - qe - qe, last_H0_t = 0;
			if (r == qlen + tlen - 2 && en0 == tlen - 1)
				ez->score = H0;
		}
		last_st = st, last_en = en;
		//for (t = st0; t <= en0; ++t) printf("(%d,%d)\t(%d,%d,%d,%d)\t%d\n", r, t, ((int8_t*)u)[t], ((int8_t*)v)[t], ((int8_t*)x)[t], ((int8_t*)y)[t], H[t]); // for debugging
	}
	kfree(km, mem);
	if (!approx_max) kfree(km, H);
	if (with_cigar) { // backtrack
		int rev_cigar = !!(flag & KSW_EZ_REV_CIGAR);
		if (!ez->zdropped && !(flag&KSW_EZ_EXTZ_ONLY))
			ksw_backtrack(km, 1, rev_cigar, 0, (uint8_t*)p, off, off_end, n_col_*16, tlen-1, qlen-1, &ez->m_cigar, &ez->n_cigar, &ez->cigar);
		else if (ez->max_t >= 0 && ez->max_q >= 0)
			ksw_backtrack(km, 1, rev_cigar, 0, (uint8_t*)p, off, off_end, n_col_*16, ez->max_t, ez->max_q, &ez->m_cigar, &ez->n_cigar, &ez->cigar);
		kfree(km, mem2); kfree(km, off);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x228, %rsp            # imm = 0x228
movq %r9, 0xc8(%rsp)
movl %ecx, %r12d
movq %rdx, 0x130(%rsp)
movsbl 0x268(%rsp), %eax
movq 0x290(%rsp), %r15
movl 0x288(%rsp), %ebp
movl 0x280(%rsp), %ecx
movl %ecx, 0x1c(%rsp)
movl 0x278(%rsp), %edx
movq 0x260(%rsp), %r11
movsbl 0x270(%rsp), %ecx
movq %rcx, 0xf8(%rsp)
movaps 0x3c8d50(%rip), %xmm0   # 0x5ca150
movups %xmm0, 0x10(%r15)
movl $0x0, 0x24(%r15)
movdqa 0x3c8d4b(%rip), %xmm0   # 0x5ca160
movdqu %xmm0, (%r15)
testl %r12d, %r12d
jle 0x2025b2
testl %esi, %esi
jle 0x2025b2
cmpb $0x0, 0xc8(%rsp)
jle 0x2025b2
movq 0xf8(%rsp), %rcx
leal (%rcx,%rax), %ebx
leal (%rbx,%rbx), %ecx
movq %rcx, 0x100(%rsp)
cmpl %esi, %r12d
movl %esi, %r10d
cmoval %r12d, %r10d
movsbl 0x1(%r11), %ecx
testl %edx, %edx
cmovnsl %edx, %r10d
cmpl %r12d, %esi
movl %r12d, %r9d
cmovbl %esi, %r9d
movq %r10, 0x1c0(%rsp)
leal 0x1(%r10), %edx
cmpl %edx, %r9d
cmovael %edx, %r9d
movq %r9, %r14
movq 0xc8(%rsp), %rdx
movl %edx, %r9d
imull %edx, %r9d
movl %ecx, %edx
cmpl $0x2, %r9d
jb 0x2014ba
movl %r9d, %r10d
movl $0x1, %r9d
movl %ecx, %edx
movsbl (%r11,%r9), %r13d
cmpl %r13d, %edx
cmovgel %r13d, %edx
incq %r9
cmpq %r9, %r10
jne 0x2014a6
negl %edx
movq 0x100(%rsp), %r9
cmpl %edx, %r9d
jl 0x2025b2
movq %r8, 0x28(%rsp)
movq %rbx, 0x108(%rsp)
movq %r11, 0x1c8(%rsp)
movq %r9, %r10
movzbl (%r11), %edx
movq 0xc8(%rsp), %r8
leal -0x1(%r8), %r9d
leal (%rdx,%r10), %r8d
movzbl %al, %r11d
movzbl %r9b, %eax
movzbl %r8b, %r8d
movl %r11d, 0x78(%rsp)
movd %r11d, %xmm0
movd %r10d, %xmm1
movd %edx, %xmm2
movd %ecx, %xmm3
movd %eax, %xmm4
movd %r8d, %xmm5
punpcklbw %xmm0, %xmm0    # xmm0 = xmm0[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
movdqa %xmm0, 0xe0(%rsp)
punpcklbw %xmm1, %xmm1    # xmm1 = xmm1[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
movdqa %xmm1, 0x50(%rsp)
punpcklbw %xmm2, %xmm2    # xmm2 = xmm2[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
movdqa %xmm2, 0xa0(%rsp)
punpcklbw %xmm3, %xmm3    # xmm3 = xmm3[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
movdqa %xmm3, 0x90(%rsp)
punpcklbw %xmm4, %xmm4    # xmm4 = xmm4[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
movdqa %xmm4, 0xd0(%rsp)
punpcklbw %xmm5, %xmm5    # xmm5 = xmm5[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
movdqa %xmm5, 0x80(%rsp)
addl $0xf, %r14d
leal 0xf(%r12), %ebx
movq %r14, 0x110(%rsp)
shrl $0x4, %r14d
movq %r14, 0x178(%rsp)
movq %rsi, 0x8(%rsp)
leal 0xf(%rsi), %eax
movl %ebx, %r13d
shrl $0x4, %r13d
shrl $0x4, %eax
leal (%r13,%r13,2), %ecx
leal (%rax,%rcx,2), %esi
incl %esi
movl $0x10, %edx
movq %rdi, %r14
callq 0x1fbc89
movq %rax, 0x150(%rsp)
addq $0xf, %rax
andq $-0x10, %rax
movl %r13d, %ecx
shll $0x4, %ecx
movq %rax, 0x20(%rsp)
addq %rcx, %rax
movq %rax, 0x30(%rsp)
addq %rcx, %rax
movq %rax, 0x198(%rsp)
addq %rcx, %rax
movq %rcx, 0xc0(%rsp)
movq %rax, 0x1a8(%rsp)
addq %rcx, %rax
movq %rax, 0x120(%rsp)
andl $0x7ffffff0, %ebx       # imm = 0x7FFFFFF0
testb $0x8, %bpl
movq %r14, 0x38(%rsp)
movq %rbx, 0x10(%rsp)
jne 0x201692
leal (,%rbx,4), %esi
movq %r14, %rdi
callq 0x1fbb34
movq 0x10(%rsp), %rbx
movq %rax, 0x48(%rsp)
testq %rbx, %rbx
je 0x2016a0
xorl %eax, %eax
movdqa 0x3c8b30(%rip), %xmm0   # 0x5ca170
movq 0x8(%rsp), %rcx
movq 0x48(%rsp), %rdx
movdqa 0xe0(%rsp), %xmm1
movdqa 0x50(%rsp), %xmm2
movdqa 0xa0(%rsp), %xmm3
movdqa 0x90(%rsp), %xmm4
movdqa 0xd0(%rsp), %xmm5
movdqa 0x80(%rsp), %xmm6
movdqu %xmm0, (%rdx,%rax,4)
addq $0x4, %rax
cmpq %rax, %rbx
jne 0x20167d
movq 0x38(%rsp), %rdi
jmp 0x2016dd
movq $0x0, 0x48(%rsp)
movq %r14, %rdi
jmp 0x2016a5
movq 0x38(%rsp), %rdi
movq 0x8(%rsp), %rcx
movdqa 0xe0(%rsp), %xmm1
movdqa 0x50(%rsp), %xmm2
movdqa 0xa0(%rsp), %xmm3
movdqa 0x90(%rsp), %xmm4
movdqa 0xd0(%rsp), %xmm5
movdqa 0x80(%rsp), %xmm6
pshuflw $0x0, %xmm1, %xmm0      # xmm0 = xmm1[0,0,0,0,4,5,6,7]
pshuflw $0x0, %xmm2, %xmm1      # xmm1 = xmm2[0,0,0,0,4,5,6,7]
pshuflw $0x0, %xmm3, %xmm2      # xmm2 = xmm3[0,0,0,0,4,5,6,7]
pshuflw $0x0, %xmm4, %xmm3      # xmm3 = xmm4[0,0,0,0,4,5,6,7]
pshuflw $0x0, %xmm5, %xmm4      # xmm4 = xmm5[0,0,0,0,4,5,6,7]
pshuflw $0x0, %xmm6, %xmm5      # xmm5 = xmm6[0,0,0,0,4,5,6,7]
movq 0x120(%rsp), %rax
addq %rax, 0xc0(%rsp)
movl %r13d, %r14d
movq 0x178(%rsp), %rax
incl %eax
movl %ecx, %r8d
movl %r12d, %edx
testb $0x1, %bpl
movq %r8, 0x170(%rsp)
movl %eax, 0x74(%rsp)
movq %r14, 0x68(%rsp)
jne 0x20180f
leal (%rcx,%r12), %r13d
decl %r13d
movl %r13d, %esi
imull %eax, %esi
shll $0x4, %esi
addl $0x10, %esi
movq %rdi, %rbx
movq %rdx, %r14
movdqa %xmm0, 0xe0(%rsp)
movdqa %xmm1, 0x50(%rsp)
movdqa %xmm2, 0xa0(%rsp)
movdqa %xmm3, 0x90(%rsp)
movdqa %xmm4, 0xd0(%rsp)
movdqa %xmm5, 0x80(%rsp)
callq 0x1fbb34
movq %rax, 0xf0(%rsp)
addq $0xf, %rax
andq $-0x10, %rax
movq %rax, 0xb0(%rsp)
shlq $0x3, %r13
movq %rbx, %rdi
movq %r13, %rsi
callq 0x1fbb34
movdqa 0x80(%rsp), %xmm5
movdqa 0xd0(%rsp), %xmm4
movdqa 0x90(%rsp), %xmm3
movdqa 0xa0(%rsp), %xmm2
movdqa 0x50(%rsp), %xmm1
movdqa 0xe0(%rsp), %xmm0
movq %r14, %rdx
movq 0x170(%rsp), %r8
movq 0x10(%rsp), %rbx
movq %rax, 0x60(%rsp)
leaq (%rax,%r8,4), %rax
leaq (%rax,%r14,4), %rax
addq $-0x4, %rax
movq %rax, 0xb8(%rsp)
jmp 0x20183c
movq $0x0, 0xb0(%rsp)
movq $0x0, 0xf0(%rsp)
movq $0x0, 0xb8(%rsp)
movq $0x0, 0x60(%rsp)
movq 0x130(%rsp), %rsi
leaq 0x24(%r15), %rax
movq %rax, 0x148(%rsp)
pshufd $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
movdqa %xmm0, 0xe0(%rsp)
pshufd $0x0, %xmm1, %xmm0      # xmm0 = xmm1[0,0,0,0]
movdqa %xmm0, 0x130(%rsp)
pshufd $0x0, %xmm2, %xmm0      # xmm0 = xmm2[0,0,0,0]
movdqa %xmm0, 0x1f0(%rsp)
pshufd $0x0, %xmm3, %xmm0      # xmm0 = xmm3[0,0,0,0]
movdqa %xmm0, 0x1e0(%rsp)
pshufd $0x0, %xmm4, %xmm0      # xmm0 = xmm4[0,0,0,0]
movdqa %xmm0, 0x1d0(%rsp)
pshufd $0x0, %xmm5, %xmm0      # xmm0 = xmm5[0,0,0,0]
movdqa %xmm0, 0x180(%rsp)
movq 0xc0(%rsp), %rax
addq %rbx, %rax
movq %r8, %rcx
movb -0x1(%rsi,%rcx), %dil
movb %dil, (%rax)
incq %rax
decq %rcx
jne 0x2018b2
movq 0xc0(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x19e0c0
movq 0x8(%rsp), %rsi
movl %esi, %eax
decl %esi
movl %r12d, %ecx
decl %r12d
leal (%rcx,%rax), %edx
addl $-0x2, %edx
movq %rdx, 0x160(%rsp)
movq 0x108(%rsp), %rdx
negl %edx
movd %edx, %xmm0
pshufd $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
movq %rsi, 0x8(%rsp)
movslq %esi, %rsi
leal -0x1(%rcx,%rax), %eax
movq %rax, 0x1b0(%rsp)
movq 0x68(%rsp), %rax
movl %eax, %edx
shll $0x4, %edx
leaq (%rdx,%rdx,4), %rcx
movq 0x10(%rsp), %r13
addq %rsi, %r13
addq 0x20(%rsp), %rcx
movq %rcx, 0x1a0(%rsp)
leaq (%rcx,%r13), %rbx
leaq (%rdx,%rdx,2), %r8
movq %rax, %r9
shlq $0x5, %r9
shlq $0x6, %rax
movq %rax, 0x68(%rsp)
movq 0x110(%rsp), %rax
andl $-0x10, %eax
addq $0x10, %rax
movq %rax, 0x110(%rsp)
movl $0xffffffff, %r10d      # imm = 0xFFFFFFFF
pxor %xmm1, %xmm1
movdqa 0x3c8804(%rip), %xmm2   # 0x5ca180
movdqa 0x3c882c(%rip), %xmm3   # 0x5ca1b0
movdqa 0x3c8834(%rip), %xmm4   # 0x5ca1c0
movq 0xb0(%rsp), %rax
movq %rax, 0x90(%rsp)
xorl %r14d, %r14d
movl $0xffffffff, 0x80(%rsp) # imm = 0xFFFFFFFF
xorl %ecx, %ecx
movq $0x0, 0x158(%rsp)
movdqa 0xe0(%rsp), %xmm15
movdqa 0x130(%rsp), %xmm14
movq %r15, 0x168(%rsp)
movq %r12, 0x1b8(%rsp)
movl %ebp, 0x7c(%rsp)
movl %ecx, 0x4(%rsp)
movq %r14, %rax
subq 0x170(%rsp), %rax
leal 0x1(%rax), %ecx
testq %rax, %rax
movl $0x0, %eax
cmovsl %eax, %ecx
cmpl %r14d, %r12d
movl %r14d, %esi
cmovll %r12d, %esi
movl %r14d, %r11d
movq 0x1c0(%rsp), %rax
subl %eax, %r11d
incl %r11d
sarl %r11d
cmpl %r11d, %ecx
movl %r11d, %edi
movl %ecx, 0xd0(%rsp)
cmovgl %ecx, %edi
addl %r14d, %eax
shrl %eax
cmpl %eax, %esi
cmovll %esi, %eax
movl %eax, %esi
subl %edi, %esi
movl %esi, 0x128(%rsp)
jl 0x20250b
movl %r10d, %ecx
movl %edi, %r10d
andl $-0x10, %r10d
movq %r10, 0x50(%rsp)
jle 0x201ab8
movl $0x0, 0xa0(%rsp)
cmpl %ecx, %r10d
movq 0x30(%rsp), %rsi
movdqa 0x1f0(%rsp), %xmm9
movdqa 0x1e0(%rsp), %xmm10
movdqa 0x1d0(%rsp), %xmm11
jle 0x201aed
leal -0x1(%r10), %ecx
movl $0x0, %r10d
cmpl 0x80(%rsp), %ecx
jg 0x201af0
movl %ecx, %ecx
movq 0x198(%rsp), %r10
movsbl (%r10,%rcx), %r10d
movb (%rsi,%rcx), %cl
movl %ecx, 0xa0(%rsp)
jmp 0x201af0
xorl %r10d, %r10d
testq %r14, %r14
movl 0x78(%rsp), %ecx
cmovel %r10d, %ecx
movl %ecx, 0xa0(%rsp)
movdqa 0x1f0(%rsp), %xmm9
movdqa 0x1e0(%rsp), %xmm10
movdqa 0x1d0(%rsp), %xmm11
jmp 0x201af0
xorl %r10d, %r10d
movl %r10d, 0x12c(%rsp)
movq %r13, 0x10(%rsp)
movl %eax, %ecx
orl $0xf, %ecx
movl %ecx, 0x80(%rsp)
movslq %ecx, %rcx
cmpq %rcx, %r14
jg 0x201b36
movq 0x1a8(%rsp), %rcx
movb $0x0, (%rcx,%r14)
testq %r14, %r14
movl 0x78(%rsp), %ecx
movl $0x0, %esi
cmovel %esi, %ecx
movq 0x20(%rsp), %rsi
movb %cl, (%rsi,%r14)
movq %r14, 0x28(%rsp)
movl 0xd0(%rsp), %esi
cmpl %r11d, %esi
movl %r11d, %ecx
cmovgl %esi, %ecx
movslq %ecx, %r14
movslq %eax, %r10
testb $0x4, %bpl
movq %rbx, 0x118(%rsp)
jne 0x201bc8
movq 0x1a0(%rsp), %rsi
leaq (%rsi,%r14), %r15
movdqu (%r15), %xmm6
movq 0x10(%rsp), %rsi
movdqu (%r15,%rsi), %xmm7
movdqa %xmm6, %xmm8
pcmpeqb %xmm11, %xmm8
pcmpeqb %xmm7, %xmm6
pcmpeqb %xmm11, %xmm7
por %xmm8, %xmm7
movdqa %xmm9, %xmm8
pand %xmm6, %xmm8
pandn %xmm10, %xmm6
por %xmm8, %xmm6
pandn %xmm6, %xmm7
movq 0x120(%rsp), %rsi
movdqu %xmm7, (%rsi,%r14)
addq $0x10, %r14
addq $0x10, %r15
cmpq %r10, %r14
jle 0x201b6b
jmp 0x201c22
movq $-0x1, %r15
movq 0x120(%rsp), %r13
movq %rbx, %rbp
movq 0xc0(%rsp), %rsi
movzbl (%rsi,%r14), %r12d
imull 0xc8(%rsp), %r12d
movzbl (%rbp,%r14), %ebx
addq %rbx, %r12
movq 0x1c8(%rsp), %rbx
movb (%rbx,%r12), %bl
movb %bl, (%r13,%r14)
leaq (%r14,%r15), %rbx
incq %rbx
incq %r15
incq %rsi
incq %rbp
incq %r13
cmpq %r10, %rbx
jl 0x201be2
movl %edi, %r15d
shrl $0x4, %r15d
movl %eax, %r14d
shrl $0x4, %r14d
movl %r14d, %esi
subl %r15d, %esi
cmpl 0x178(%rsp), %esi
jg 0x202667
movd 0x12c(%rsp), %xmm7
movsbl 0xa0(%rsp), %esi
movd %esi, %xmm6
movl 0x7c(%rsp), %ebp
testb $0x1, %bpl
movq 0x1b8(%rsp), %r12
movl %edi, 0x44(%rsp)
jne 0x201e24
movq %r12, %rdi
movl %r15d, %ebx
movq 0x60(%rsp), %rsi
movq 0x28(%rsp), %r13
movq 0x50(%rsp), %r12
movl %r12d, (%rsi,%r13,4)
movq 0xb8(%rsp), %rsi
movl 0x80(%rsp), %r12d
movl %r12d, (%rsi,%r13,4)
movl %ebp, %r13d
testb $0x2, %bpl
jne 0x201f34
cmpl %r15d, %r14d
movq 0x68(%rsp), %rsi
movdqa 0x180(%rsp), %xmm5
movq %rdi, %r12
movl %r13d, %ebp
movl 0x44(%rsp), %edi
jb 0x2020a6
movl %r14d, %r15d
leaq -0x1(%rbx), %r13
shll $0x4, %ebx
addq 0x20(%rsp), %rbx
movq 0x90(%rsp), %r14
movdqa (%rbx,%rsi), %xmm11
paddb %xmm14, %xmm11
movdqa (%rbx,%r9), %xmm10
movdqa %xmm10, %xmm8
pslldq $0x1, %xmm10            # xmm10 = zero,xmm10[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]
por %xmm7, %xmm10
movdqa (%rbx,%rdx), %xmm7
movdqa %xmm7, %xmm9
pslldq $0x1, %xmm7             # xmm7 = zero,xmm7[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]
por %xmm6, %xmm7
paddb %xmm7, %xmm10
movdqa (%rbx), %xmm12
movdqa (%rbx,%r8), %xmm6
paddb %xmm12, %xmm6
movdqa %xmm10, %xmm13
pcmpgtb %xmm11, %xmm13
movdqa %xmm11, %xmm14
pcmpgtb %xmm1, %xmm14
pand %xmm11, %xmm14
pmaxub %xmm10, %xmm14
movdqa %xmm6, %xmm11
pcmpgtb %xmm14, %xmm11
movdqa %xmm11, %xmm15
pandn %xmm13, %xmm15
pand %xmm2, %xmm11
psubb %xmm15, %xmm11
movdqa 0xe0(%rsp), %xmm15
pmaxub %xmm6, %xmm14
pminub %xmm5, %xmm14
movdqa %xmm14, %xmm13
psubb %xmm7, %xmm13
movdqa %xmm13, (%rbx)
movdqa %xmm14, %xmm7
psubb %xmm12, %xmm7
movdqa %xmm7, (%rbx,%rdx)
psubb %xmm15, %xmm14
psubb %xmm14, %xmm10
psubb %xmm14, %xmm6
movdqa 0x130(%rsp), %xmm14
movdqa %xmm10, %xmm7
pcmpgtb %xmm1, %xmm7
pand %xmm7, %xmm10
movdqa %xmm10, (%rbx,%r9)
pand %xmm3, %xmm7
por %xmm11, %xmm7
movdqa %xmm6, %xmm10
pcmpgtb %xmm1, %xmm10
pand %xmm10, %xmm6
movdqa %xmm6, (%rbx,%r8)
pand %xmm4, %xmm10
por %xmm7, %xmm10
movdqa %xmm10, (%r14)
psrldq $0xf, %xmm8             # xmm8 = xmm8[15],zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero
psrldq $0xf, %xmm9             # xmm9 = xmm9[15],zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero
incq %r13
addq $0x10, %r14
addq $0x10, %rbx
movdqa %xmm8, %xmm7
movdqa %xmm9, %xmm6
cmpq %r15, %r13
jb 0x201ce4
jmp 0x2020a6
cmpl %r15d, %r14d
movq 0x68(%rsp), %rsi
movdqa 0x180(%rsp), %xmm5
jb 0x2020a6
movl %r14d, %ebx
decq %r15
movl %edi, %r14d
andl $-0x10, %r14d
addq 0x20(%rsp), %r14
movdqa (%r14,%rsi), %xmm11
paddb %xmm14, %xmm11
movdqa (%r14,%r9), %xmm10
movdqa %xmm10, %xmm8
psrldq $0xf, %xmm8             # xmm8 = xmm8[15],zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero
pslldq $0x1, %xmm10            # xmm10 = zero,xmm10[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]
por %xmm7, %xmm10
movdqa (%r14,%rdx), %xmm7
movdqa %xmm7, %xmm9
psrldq $0xf, %xmm9             # xmm9 = xmm9[15],zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero
pslldq $0x1, %xmm7             # xmm7 = zero,xmm7[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]
por %xmm6, %xmm7
paddb %xmm7, %xmm10
movdqa (%r14), %xmm12
movdqa (%r14,%r8), %xmm6
paddb %xmm12, %xmm6
movdqa %xmm11, %xmm13
pcmpgtb %xmm1, %xmm13
pand %xmm11, %xmm13
pmaxub %xmm10, %xmm13
pmaxub %xmm6, %xmm13
pminub %xmm5, %xmm13
movdqa %xmm13, %xmm11
psubb %xmm7, %xmm11
movdqa %xmm11, (%r14)
movdqa %xmm13, %xmm7
psubb %xmm12, %xmm7
movdqa %xmm7, (%r14,%rdx)
psubb %xmm15, %xmm13
psubb %xmm13, %xmm10
psubb %xmm13, %xmm6
movdqa %xmm10, %xmm7
pcmpgtb %xmm1, %xmm7
pand %xmm10, %xmm7
movdqa %xmm7, (%r14,%r9)
movdqa %xmm6, %xmm7
pcmpgtb %xmm1, %xmm7
pand %xmm6, %xmm7
movdqa %xmm7, (%r14,%r8)
incq %r15
addq $0x10, %r14
movdqa %xmm8, %xmm7
movdqa %xmm9, %xmm6
cmpq %rbx, %r15
jb 0x201e4d
jmp 0x2020a6
cmpl %r15d, %r14d
movq 0x68(%rsp), %rsi
movdqa 0x180(%rsp), %xmm5
movq %rdi, %r12
movl %r13d, %ebp
movl 0x44(%rsp), %edi
jb 0x2020a6
movl %r14d, %r15d
leaq -0x1(%rbx), %r13
shll $0x4, %ebx
addq 0x20(%rsp), %rbx
movq 0x90(%rsp), %r14
movdqa (%rbx,%rsi), %xmm11
paddb %xmm14, %xmm11
movdqa (%rbx,%r9), %xmm10
movdqa %xmm10, %xmm8
pslldq $0x1, %xmm10            # xmm10 = zero,xmm10[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]
por %xmm7, %xmm10
movdqa (%rbx,%rdx), %xmm7
movdqa %xmm7, %xmm9
pslldq $0x1, %xmm7             # xmm7 = zero,xmm7[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]
por %xmm6, %xmm7
paddb %xmm7, %xmm10
movdqa (%rbx), %xmm12
movdqa (%rbx,%r8), %xmm6
paddb %xmm12, %xmm6
movdqa %xmm11, %xmm13
pcmpgtb %xmm1, %xmm13
pand %xmm11, %xmm13
pcmpgtb %xmm10, %xmm11
pandn 0x3c838e(%rip), %xmm11  # 0x5ca360
pmaxub %xmm10, %xmm13
movdqa %xmm13, %xmm14
pcmpgtb %xmm6, %xmm14
por %xmm2, %xmm11
pand %xmm14, %xmm11
pmaxub %xmm6, %xmm13
pminub %xmm5, %xmm13
movdqa %xmm13, %xmm14
psubb %xmm7, %xmm14
movdqa %xmm14, (%rbx)
movdqa 0x130(%rsp), %xmm14
movdqa %xmm13, %xmm7
psubb %xmm12, %xmm7
movdqa %xmm7, (%rbx,%rdx)
psubb %xmm15, %xmm13
psubb %xmm13, %xmm10
psubb %xmm13, %xmm6
pxor %xmm7, %xmm7
pcmpgtb %xmm10, %xmm7
movdqa %xmm7, %xmm12
pandn %xmm10, %xmm12
movdqa %xmm12, (%rbx,%r9)
pandn %xmm3, %xmm7
por %xmm11, %xmm7
pxor %xmm10, %xmm10
pcmpgtb %xmm6, %xmm10
movdqa %xmm10, %xmm11
pandn %xmm6, %xmm11
movdqa %xmm11, (%rbx,%r8)
pandn %xmm4, %xmm10
por %xmm7, %xmm10
pxor %xmm2, %xmm10
movdqa %xmm10, (%r14)
psrldq $0xf, %xmm8             # xmm8 = xmm8[15],zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero
psrldq $0xf, %xmm9             # xmm9 = xmm9[15],zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero
incq %r13
addq $0x10, %r14
addq $0x10, %rbx
movdqa %xmm8, %xmm7
movdqa %xmm9, %xmm6
cmpq %r15, %r13
jb 0x201f6c
testb $0x8, %bpl
jne 0x2021c0
movq 0x28(%rsp), %r14
testq %r14, %r14
movq 0x168(%rsp), %r15
movq 0x48(%rsp), %r13
je 0x20222a
movl %eax, %esi
leal -0x1(%rax), %r14d
movq 0x20(%rsp), %rbx
addq %rsi, %rbx
testl %eax, %eax
cmovleq 0x30(%rsp), %rbx
movl $0x0, %ebp
cmovlel %ebp, %r14d
movzbl (%rbx), %ebx
addl (%r13,%r14,4), %ebx
movq 0x108(%rsp), %r14
subl %r14d, %ebx
movl %ebx, (%r13,%rsi,4)
movd %ebx, %xmm6
pshufd $0x0, %xmm6, %xmm7      # xmm7 = xmm6[0,0,0,0]
movd %eax, %xmm6
pshufd $0x0, %xmm6, %xmm6      # xmm6 = xmm6[0,0,0,0]
movl 0x128(%rsp), %ebp
cmpl $0x4, %ebp
jl 0x202275
andl $0x7ffffffc, %ebp       # imm = 0x7FFFFFFC
addl %edi, %ebp
movl 0xd0(%rsp), %esi
cmpl %r11d, %esi
cmovgl %esi, %r11d
movslq %r11d, %rdi
movslq %ebp, %r11
movq 0x30(%rsp), %rsi
movdqu (%r13,%rdi,4), %xmm8
paddd %xmm0, %xmm8
movd (%rsi,%rdi), %xmm10
punpcklbw %xmm1, %xmm10   # xmm10 = xmm10[0],xmm1[0],xmm10[1],xmm1[1],xmm10[2],xmm1[2],xmm10[3],xmm1[3],xmm10[4],xmm1[4],xmm10[5],xmm1[5],xmm10[6],xmm1[6],xmm10[7],xmm1[7]
punpcklwd %xmm1, %xmm10   # xmm10 = xmm10[0],xmm1[0],xmm10[1],xmm1[1],xmm10[2],xmm1[2],xmm10[3],xmm1[3]
paddd %xmm8, %xmm10
movdqu %xmm10, (%r13,%rdi,4)
movd %ecx, %xmm8
pshufd $0x0, %xmm8, %xmm11     # xmm11 = xmm8[0,0,0,0]
movdqa %xmm10, %xmm8
pcmpgtd %xmm7, %xmm8
pand %xmm8, %xmm10
movdqa %xmm8, %xmm9
pandn %xmm7, %xmm9
por %xmm10, %xmm9
pand %xmm8, %xmm11
pandn %xmm6, %xmm8
por %xmm11, %xmm8
addq $0x4, %rdi
addl $0x4, %ecx
movdqa %xmm8, %xmm6
movdqa %xmm9, %xmm7
cmpq %r11, %rdi
jl 0x202145
jmp 0x202281
movq 0x28(%rsp), %r14
testq %r14, %r14
movq 0x168(%rsp), %r15
movq 0x118(%rsp), %rbx
je 0x202249
movq 0x158(%rsp), %r13
cmpl %eax, %r13d
movq 0x108(%rsp), %r10
jg 0x202260
cmpl %edi, %r13d
jl 0x202260
movl %r13d, %ecx
cmpl %eax, %r13d
jge 0x2023fb
leaq 0x1(%rcx), %rsi
movq 0x30(%rsp), %rdi
movzbl (%rdi,%rcx), %edi
movq 0x20(%rsp), %r11
movzbl 0x1(%r11,%rcx), %ecx
cmpb %cl, %dil
cmoval %r13d, %esi
cmoval %edi, %ecx
movl %esi, %r13d
jmp 0x202403
movq 0x30(%rsp), %rcx
movzbl (%rcx), %ebx
subl 0x100(%rsp), %ebx
movl %ebx, (%r13)
xorl %edi, %edi
movq 0x8(%rsp), %r11
jmp 0x2022fd
movq 0x30(%rsp), %rcx
movzbl (%rcx), %ecx
subl 0x100(%rsp), %ecx
xorl %r13d, %r13d
jmp 0x2024a5
movslq %r13d, %r13
movq 0x20(%rsp), %rcx
movb 0x1(%rcx,%r13), %cl
incq %r13
jmp 0x202403
movdqa %xmm7, %xmm9
movdqa %xmm6, %xmm8
movl %edi, %ecx
movdqa %xmm9, 0x210(%rsp)
movdqa %xmm8, 0x200(%rsp)
xorl %esi, %esi
movl %eax, %edi
movl 0x7c(%rsp), %ebp
movl 0x210(%rsp,%rsi,4), %r11d
cmpl %r11d, %ebx
jge 0x2022b6
movl 0x200(%rsp,%rsi,4), %edi
addl %esi, %edi
movl %r11d, %ebx
incq %rsi
cmpq $0x4, %rsi
jne 0x20229d
cmpl %eax, %ecx
jge 0x2022f3
movslq %ecx, %rcx
movq 0x8(%rsp), %r11
movq 0x30(%rsp), %rsi
movzbl (%rsi,%rcx), %esi
subl %r14d, %esi
addl (%r13,%rcx,4), %esi
movl %esi, (%r13,%rcx,4)
cmpl %ebx, %esi
cmovgl %esi, %ebx
cmovgl %ecx, %edi
incq %rcx
cmpq %r10, %rcx
jl 0x2022cb
jmp 0x2022f8
movq 0x8(%rsp), %r11
movq 0x28(%rsp), %r14
cmpl %r12d, %eax
jne 0x20231f
movl (%r13,%r12,4), %ecx
cmpl 0x14(%r15), %ecx
jle 0x20231f
movl %ecx, 0x14(%r15)
movl %r14d, %ecx
subl 0x80(%rsp), %ecx
movl %ecx, 0x18(%r15)
movl %r14d, %ecx
movl 0x44(%rsp), %esi
subl %esi, %ecx
cmpl %r11d, %ecx
jne 0x202342
movl %esi, %ecx
movl (%r13,%rcx,4), %ecx
cmpl 0xc(%r15), %ecx
jle 0x202342
movl %ecx, 0xc(%r15)
movl %esi, 0x10(%r15)
movl (%r15), %ecx
movl %ecx, %r10d
andl $0x7fffffff, %r10d      # imm = 0x7FFFFFFF
subl %ebx, %r10d
jge 0x20236e
andl $0x80000000, %ecx       # imm = 0x80000000
orl %ebx, %ecx
movl %ecx, (%r15)
movl %edi, 0x8(%r15)
movl %r14d, %ecx
subl %edi, %ecx
movl %ecx, 0x4(%r15)
jmp 0x2023ae
movl 0x8(%r15), %esi
cmpl %edi, %esi
jg 0x2023ae
cmpl $0x0, 0x1c(%rsp)
js 0x2023ae
movl %r14d, %ebx
subl %edi, %ebx
movl 0x4(%r15), %r11d
cmpl %r11d, %ebx
jl 0x2023ae
addl %esi, %ebx
subl %ebx, %edi
addl %r11d, %edi
movl %edi, %esi
negl %esi
cmovsl %edi, %esi
imull 0xf8(%rsp), %esi
addl 0x1c(%rsp), %esi
cmpl %esi, %r10d
jg 0x20250e
cmpq 0x160(%rsp), %r14
jne 0x2023e5
cmpl %r12d, %eax
movq 0x10(%rsp), %r13
movq 0x118(%rsp), %rbx
movq 0x50(%rsp), %r10
movl 0x4(%rsp), %esi
jne 0x2024cc
movq 0x48(%rsp), %rax
movl (%rax,%r12,4), %ecx
jmp 0x2024c8
movl 0x4(%rsp), %ecx
movq 0x10(%rsp), %r13
movq 0x118(%rsp), %rbx
jmp 0x2024d5
movq 0x30(%rsp), %rsi
movb (%rsi,%rcx), %cl
movl 0x4(%rsp), %esi
movzbl %cl, %ecx
subl %r10d, %ecx
addl %esi, %ecx
testb $0x10, %bpl
je 0x2024a5
movl (%r15), %edi
movl %edi, %r10d
andl $0x7fffffff, %r10d      # imm = 0x7FFFFFFF
subl %ecx, %r10d
jge 0x202446
andl $0x80000000, %edi       # imm = 0x80000000
orl %ecx, %edi
movl %edi, (%r15)
movl %r13d, 0x8(%r15)
movl %r14d, %esi
subl %r13d, %esi
movl %esi, 0x4(%r15)
jmp 0x2024a5
movl 0x8(%r15), %esi
cmpl %r13d, %esi
jg 0x2024a5
cmpl $0x0, 0x1c(%rsp)
js 0x2024a5
movq %r14, %r11
movq %rbx, %r14
subl %r13d, %r11d
movl 0x4(%r15), %ebx
cmpl %ebx, %r11d
jl 0x20249d
addl %esi, %r11d
movl %r13d, %esi
subl %r11d, %esi
addl %ebx, %esi
movl %esi, %r11d
negl %r11d
cmovsl %esi, %r11d
imull 0xf8(%rsp), %r11d
addl 0x1c(%rsp), %r11d
cmpl %r11d, %r10d
movq %r14, %rbx
movq 0x28(%rsp), %r14
jle 0x2024a5
jmp 0x20264c
movq %r14, %rbx
movq 0x28(%rsp), %r14
movq %r13, 0x158(%rsp)
cmpq 0x160(%rsp), %r14
jne 0x2024d0
movl %ecx, %esi
cmpl %r12d, %eax
movq 0x10(%rsp), %r13
movq 0x50(%rsp), %r10
jne 0x2024da
movl %ecx, 0x1c(%r15)
movl %esi, %ecx
jmp 0x2024da
movq 0x10(%rsp), %r13
movq 0x50(%rsp), %r10
incq %r14
decq %rbx
decq %r13
movq 0x90(%rsp), %rax
addq 0x110(%rsp), %rax
movq %rax, 0x90(%rsp)
cmpq 0x1b0(%rsp), %r14
jne 0x2019e0
jmp 0x202517
movl (%r15), %ecx
orl $0x80000000, %ecx       # imm = 0x80000000
movl %ecx, (%r15)
movq 0x38(%rsp), %rdi
movq 0x150(%rsp), %rsi
callq 0x1fb9e0
testb $0x8, %bpl
jne 0x20253e
movq 0x38(%rsp), %rdi
movq 0x48(%rsp), %rsi
callq 0x1fb9e0
testb $0x1, %bpl
movq 0x38(%rsp), %rdi
movq 0x8(%rsp), %r10
jne 0x2025b2
movl %ebp, %esi
shrl $0x7, %esi
andl $0x1, %esi
testb $0x40, %bpl
jne 0x2025c4
cmpl $0x0, (%r15)
js 0x2025c4
movl 0x74(%rsp), %r9d
shll $0x4, %r9d
leaq 0x20(%r15), %rax
addq $0x28, %r15
subq $0x8, %rsp
movq 0xb8(%rsp), %rdx
movq 0x68(%rsp), %rcx
movq 0xc0(%rsp), %r8
pushq %r15
pushq 0x158(%rsp)
pushq %rax
pushq %r10
pushq %r12
callq 0x202686
movq 0x68(%rsp), %rdi
addq $0x30, %rsp
movq 0xf0(%rsp), %rbx
jmp 0x202623
addq $0x228, %rsp            # imm = 0x228
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0x8(%r15), %eax
testl %eax, %eax
movq 0xf0(%rsp), %rbx
js 0x202623
movl 0x4(%r15), %r10d
testl %r10d, %r10d
js 0x202623
movl 0x74(%rsp), %r9d
shll $0x4, %r9d
leaq 0x20(%r15), %r11
addq $0x28, %r15
subq $0x8, %rsp
movq 0xb8(%rsp), %rdx
movq 0x68(%rsp), %rcx
movq 0xc0(%rsp), %r8
pushq %r15
pushq 0x158(%rsp)
pushq %r11
pushq %r10
pushq %rax
callq 0x202686
movq 0x68(%rsp), %rdi
addq $0x30, %rsp
movq %rbx, %rsi
movq %rdi, %rbx
callq 0x1fb9e0
movq %rbx, %rdi
movq 0x60(%rsp), %rsi
addq $0x228, %rsp            # imm = 0x228
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1fb9e0
orl $0x80000000, %edi       # imm = 0x80000000
movl %edi, (%r15)
movq 0x150(%rsp), %rax
movq %rax, 0x48(%rsp)
jmp 0x20252f
leaq 0x3c7b82(%rip), %rdi    # 0x5ca1f0
leaq 0x3c7cfb(%rip), %rsi    # 0x5ca370
leaq 0x3c7d05(%rip), %rcx    # 0x5ca381
movl $0x93, %edx
callq 0x19e0a0