// File: /workspace/github_c_makefile_star2_O2/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 $0x238, %rsp            # imm = 0x238
movq %r9, 0x100(%rsp)
movl %ecx, %r13d
movq %rdx, %r15
movsbl 0x280(%rsp), %eax
movl %eax, 0x5c(%rsp)
movsbl 0x278(%rsp), %eax
movq 0x2a0(%rsp), %r10
movl 0x298(%rsp), %ecx
movl %ecx, 0xc(%rsp)
movl 0x290(%rsp), %ecx
movl %ecx, 0x54(%rsp)
movl 0x288(%rsp), %ecx
movq 0x270(%rsp), %rdx
movq %rdx, 0x108(%rsp)
movaps 0x3c4b69(%rip), %xmm0   # 0x568150
movups %xmm0, 0x10(%r10)
andl $0x0, 0x24(%r10)
movdqa 0x3c4b67(%rip), %xmm0   # 0x568160
movdqu %xmm0, (%r10)
testl %r13d, %r13d
jle 0x1a45de
movl %esi, %r12d
testl %esi, %esi
jle 0x1a45de
cmpb $0x0, 0x100(%rsp)
jle 0x1a45de
movq %rdi, %r14
movl 0x5c(%rsp), %edx
addl %eax, %edx
leaq 0x24(%r10), %r11
movzbl %al, %eax
movl %eax, 0x58(%rsp)
movd %eax, %xmm0
movq %rdx, 0x98(%rsp)
leal (%rdx,%rdx), %r9d
movd %r9d, %xmm1
movq 0x108(%rsp), %rax
movzbl (%rax), %edx
movd %edx, %xmm2
movsbl 0x1(%rax), %eax
movd %eax, %xmm3
movq 0x100(%rsp), %rdi
leal -0x1(%rdi), %esi
movzbl %sil, %esi
movd %esi, %xmm4
movq %r9, 0xe8(%rsp)
addl %r9d, %edx
movzbl %dl, %edx
cmpl %r12d, %r13d
movl %r12d, %esi
cmoval %r13d, %esi
movd %edx, %xmm5
testl %ecx, %ecx
cmovnsl %ecx, %esi
cmpl %r13d, %r12d
movl %r13d, %edx
cmovbl %r12d, %edx
movq %rsi, 0x1f8(%rsp)
leal 0x1(%rsi), %ecx
cmpl %ecx, %edx
cmovael %ecx, %edx
leal 0xf(%r13), %r9d
addl $0xf, %edx
movq %rdx, 0xf0(%rsp)
shrl $0x4, %edx
movq %rdx, 0x168(%rsp)
leal 0xf(%r12), %ecx
movl %edi, %edx
imull %edx, %edx
pushq $0x1
popq %rsi
cmpq %rsi, %rdx
je 0x1a36f0
movq 0x108(%rsp), %rdi
movsbl (%rdi,%rsi), %edi
cmpl %edi, %eax
cmovgel %edi, %eax
incq %rsi
jmp 0x1a36d5
negl %eax
cmpl %eax, 0xe8(%rsp)
jl 0x1a45de
movq %r11, 0x1d0(%rsp)
movq %r8, 0x18(%rsp)
movq %r10, 0x30(%rsp)
punpcklbw %xmm0, %xmm0    # xmm0 = xmm0[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
movdqa %xmm0, 0xa0(%rsp)
punpcklbw %xmm1, %xmm1    # xmm1 = xmm1[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
movdqa %xmm1, 0x60(%rsp)
punpcklbw %xmm2, %xmm2    # xmm2 = xmm2[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
movdqa %xmm2, 0x70(%rsp)
punpcklbw %xmm3, %xmm3    # xmm3 = xmm3[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
movdqa %xmm3, 0xd0(%rsp)
punpcklbw %xmm4, %xmm4    # xmm4 = xmm4[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
movdqa %xmm4, 0x120(%rsp)
punpcklbw %xmm5, %xmm5    # xmm5 = xmm5[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
movdqa %xmm5, 0xc0(%rsp)
shrl $0x4, %ecx
movq %r9, %rbx
movl %ebx, %ebp
shrl $0x4, %ebp
imull $0x6, %ebp, %eax
leal (%rcx,%rax), %esi
incl %esi
pushq $0x10
popq %rdx
movq %r14, %rdi
callq 0x19e66e
movq %rbx, %rdi
movq %rax, 0x1c8(%rsp)
addq $0xf, %rax
andq $-0x10, %rax
movl %edi, %r9d
andl $-0x10, %r9d
movq %rax, 0x28(%rsp)
addq %r9, %rax
movq %rax, 0xf8(%rsp)
addq %r9, %rax
movq %rax, 0x1e0(%rsp)
addq %r9, %rax
movq %rax, 0x1e8(%rsp)
addq %r9, %rax
movq %rax, 0x110(%rsp)
andl $0x7ffffff0, %edi       # imm = 0x7FFFFFF0
movl 0xc(%rsp), %eax
testb $0x8, %al
movq %r13, 0x10(%rsp)
movq %rbp, 0x48(%rsp)
jne 0x1a3843
movq %r9, 0x20(%rsp)
movq %rdi, %r13
leal (,%rdi,4), %esi
movq %r14, %rdi
callq 0x19e512
movq %rax, %rbx
movl %ebp, %eax
andl $0x7ffffff, %eax        # imm = 0x7FFFFFF
shlq $0x6, %rax
xorl %ecx, %ecx
movdqa 0xa0(%rsp), %xmm0
movdqa 0x60(%rsp), %xmm1
movdqa 0x70(%rsp), %xmm2
movdqa 0xd0(%rsp), %xmm3
movdqa 0x120(%rsp), %xmm4
movdqa 0xc0(%rsp), %xmm5
cmpq %rcx, %rax
je 0x1a3877
movl $0xc0000000, (%rbx,%rcx) # imm = 0xC0000000
addq $0x4, %rcx
jmp 0x1a3831
xorl %ebx, %ebx
movdqa 0xa0(%rsp), %xmm0
movdqa 0x60(%rsp), %xmm1
movdqa 0x70(%rsp), %xmm2
movdqa 0xd0(%rsp), %xmm3
movdqa 0x120(%rsp), %xmm4
movdqa 0xc0(%rsp), %xmm5
jmp 0x1a3888
movl 0xc(%rsp), %eax
movq %r13, %rdi
movq 0x10(%rsp), %r13
movq 0x20(%rsp), %r9
pshuflw $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0,4,5,6,7]
pshuflw $0x0, %xmm1, %xmm1      # xmm1 = xmm1[0,0,0,0,4,5,6,7]
pshuflw $0x0, %xmm2, %xmm2      # xmm2 = xmm2[0,0,0,0,4,5,6,7]
pshuflw $0x0, %xmm3, %xmm3      # xmm3 = xmm3[0,0,0,0,4,5,6,7]
pshuflw $0x0, %xmm4, %xmm4      # xmm4 = xmm4[0,0,0,0,4,5,6,7]
pshuflw $0x0, %xmm5, %xmm5      # xmm5 = xmm5[0,0,0,0,4,5,6,7]
addq 0x110(%rsp), %r9
movq 0x168(%rsp), %rcx
incl %ecx
movl %r12d, %edx
movl %r13d, %r10d
testb $0x1, %al
movq %rdx, 0x160(%rsp)
movl %ecx, 0x50(%rsp)
jne 0x1a39c3
leal (%r12,%r13), %eax
decl %eax
movl %eax, %esi
movq %r14, %rbp
movq %rax, %r14
imull %ecx, %esi
shll $0x4, %esi
addl $0x10, %esi
movq %rdi, 0xa0(%rsp)
movq %rbp, %rdi
movq %r9, 0x20(%rsp)
movq %r10, %r13
movdqa %xmm0, 0x60(%rsp)
movdqa %xmm1, 0x70(%rsp)
movdqa %xmm2, 0xd0(%rsp)
movdqa %xmm3, 0x120(%rsp)
movdqa %xmm4, 0xc0(%rsp)
movdqa %xmm5, 0xb0(%rsp)
callq 0x19e512
movq %rax, 0x140(%rsp)
addq $0xf, %rax
andq $-0x10, %rax
movq %rax, 0x88(%rsp)
shlq $0x3, %r14
movq %rbp, %rdi
movq %r14, %rsi
movq %rbp, %r14
callq 0x19e512
movdqa 0xb0(%rsp), %xmm5
movdqa 0xc0(%rsp), %xmm4
movdqa 0x120(%rsp), %xmm3
movdqa 0xd0(%rsp), %xmm2
movdqa 0x70(%rsp), %xmm1
movdqa 0x60(%rsp), %xmm0
movq %r13, %r10
movq 0x20(%rsp), %r9
movq 0x160(%rsp), %rdx
movq 0xa0(%rsp), %rdi
movq 0x10(%rsp), %r13
movq %rax, 0x38(%rsp)
leaq (%rax,%rdx,4), %rax
leaq (%rax,%r10,4), %rax
addq $-0x4, %rax
movq %rax, 0x90(%rsp)
jmp 0x1a39f0
movq $0x0, 0x88(%rsp)
movq $0x0, 0x140(%rsp)
movq $0x0, 0x90(%rsp)
movq $0x0, 0x38(%rsp)
movq 0x18(%rsp), %rsi
pshufd $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
pshufd $0x0, %xmm1, %xmm1      # xmm1 = xmm1[0,0,0,0]
pshufd $0x0, %xmm2, %xmm2      # xmm2 = xmm2[0,0,0,0]
pshufd $0x0, %xmm3, %xmm3      # xmm3 = xmm3[0,0,0,0]
pshufd $0x0, %xmm4, %xmm4      # xmm4 = xmm4[0,0,0,0]
pshufd $0x0, %xmm5, %xmm5      # xmm5 = xmm5[0,0,0,0]
leaq (%r9,%rdi), %rax
movq %rdx, %rcx
subq $0x1, %rcx
jb 0x1a3a2f
movb -0x1(%r15,%rdx), %dl
movb %dl, (%rax)
incq %rax
movq %rcx, %rdx
jmp 0x1a3a1a
movq %r14, 0x1d8(%rsp)
movq %rdi, %r14
movq %r9, %rdi
movq %r10, %rdx
movdqa %xmm0, 0x1b0(%rsp)
movdqa %xmm1, 0x1a0(%rsp)
movdqa %xmm2, 0x130(%rsp)
movdqa %xmm3, 0x190(%rsp)
movdqa %xmm4, 0x180(%rsp)
movdqa %xmm5, 0x170(%rsp)
callq 0x19e0c0
movdqa 0x170(%rsp), %xmm15
movdqa 0x180(%rsp), %xmm14
movdqa 0x190(%rsp), %xmm13
movdqa 0x130(%rsp), %xmm3
movdqa 0x1a0(%rsp), %xmm11
movdqa 0x1b0(%rsp), %xmm10
movl %r12d, %eax
decl %r12d
movl %r13d, %r8d
decl %r8d
leal (%rax,%r13), %ecx
addl $-0x2, %ecx
movq %rcx, 0x150(%rsp)
movq 0x98(%rsp), %rcx
negl %ecx
movd %ecx, %xmm0
pshufd $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
movdqa %xmm0, 0x200(%rsp)
movq %r12, 0x148(%rsp)
movslq %r12d, %rcx
addl %r13d, %eax
decl %eax
movq %rax, 0x1f0(%rsp)
movq 0x48(%rsp), %rax
imulq $0x50, %rax, %rdx
addq 0x28(%rsp), %rdx
movq %rdx, 0x158(%rsp)
addq %rcx, %r14
movq %r14, 0xa0(%rsp)
imulq $0x30, %rax, %r13
movl %eax, %r12d
shll $0x4, %r12d
movq %rax, %r14
shlq $0x5, %r14
shlq $0x6, %rax
movq %rax, 0x48(%rsp)
movq 0xf0(%rsp), %rbp
andl $-0x10, %ebp
addq $0x10, %rbp
movq %rbp, 0xf0(%rsp)
pushq $-0x1
popq %rcx
pxor %xmm9, %xmm9
movq 0x88(%rsp), %rax
movq %rax, 0x70(%rsp)
xorl %ebp, %ebp
movq $0x0, 0x40(%rsp)
xorl %r15d, %r15d
movl %ecx, 0x20(%rsp)
movl %ecx, %eax
movq 0x30(%rsp), %rdi
movq %r8, 0xb0(%rsp)
cmpq 0x1f0(%rsp), %rbp
je 0x1a4540
movl %eax, %edx
movq %rbp, %rax
subq 0x160(%rsp), %rax
leal 0x1(%rax), %ecx
testq %rax, %rax
movl $0x0, %eax
cmovsl %eax, %ecx
cmpl %ebp, %r8d
movl %ebp, %eax
cmovll %r8d, %eax
movl %ebp, %r11d
movq 0x1f8(%rsp), %rsi
subl %esi, %r11d
incl %r11d
sarl %r11d
cmpl %r11d, %ecx
movl %r11d, %r10d
cmovgl %ecx, %r10d
addl %ebp, %esi
shrl %esi
cmpl %esi, %eax
cmovll %eax, %esi
movq %rsi, 0x10(%rsp)
movl %esi, %eax
subl %r10d, %eax
jl 0x1a453c
movl %r15d, 0xc0(%rsp)
movq %r10, 0x60(%rsp)
andl $-0x10, %r10d
jle 0x1a3c42
xorl %esi, %esi
cmpl %edx, %r10d
movl 0xc(%rsp), %edi
movq 0xf8(%rsp), %r8
jle 0x1a3c56
leal -0x1(%r10), %edx
movl $0x0, %r9d
cmpl 0x20(%rsp), %edx
jg 0x1a3c59
movl %edx, %edx
movq 0x1e0(%rsp), %rsi
movsbl (%rsi,%rdx), %r9d
movb (%r8,%rdx), %sil
jmp 0x1a3c59
xorl %r9d, %r9d
testq %rbp, %rbp
movl 0x58(%rsp), %esi
cmovel %r9d, %esi
movl 0xc(%rsp), %edi
jmp 0x1a3c59
xorl %r9d, %r9d
movq 0x10(%rsp), %rdx
orl $0xf, %edx
movl %edx, 0x20(%rsp)
movslq %edx, %rdx
cmpq %rdx, %rbp
jg 0x1a3c93
movq 0x1e8(%rsp), %rdx
movb $0x0, (%rdx,%rbp)
testq %rbp, %rbp
movl 0x58(%rsp), %edx
movl $0x0, %r8d
cmovel %r8d, %edx
movq 0x28(%rsp), %r8
movb %dl, (%r8,%rbp)
movl %r9d, 0x120(%rsp)
movq %r10, 0xd0(%rsp)
movq %rbp, 0x18(%rsp)
cmpl %r11d, %ecx
movl %r11d, %r8d
cmovgl %ecx, %r8d
movslq %r8d, %rdx
movslq 0x10(%rsp), %r10
testb $0x4, %dil
jne 0x1a3d2b
movq 0x158(%rsp), %rdi
leaq (%rdi,%rdx), %r15
movq 0xa0(%rsp), %rdi
cmpq %r10, %rdx
jg 0x1a3d79
movdqu (%r15), %xmm0
movdqu (%r15,%rdi), %xmm1
movdqa %xmm0, %xmm2
pcmpeqb %xmm14, %xmm2
pcmpeqb %xmm1, %xmm0
pcmpeqb %xmm14, %xmm1
por %xmm2, %xmm1
movdqa %xmm3, %xmm2
pand %xmm0, %xmm2
pandn %xmm13, %xmm0
por %xmm2, %xmm0
pandn %xmm0, %xmm1
movq 0x110(%rsp), %r9
movdqu %xmm1, (%r9,%rdx)
addq $0x10, %rdx
addq $0x10, %r15
jmp 0x1a3cd4
movq 0x158(%rsp), %rdi
leaq (%rdi,%rdx), %r15
cmpq %r10, %rdx
jg 0x1a3d79
movzbl (%r15), %r9d
imull 0x100(%rsp), %r9d
movq 0xa0(%rsp), %rdi
movzbl (%r15,%rdi), %edi
addq %rdi, %r9
movq 0x108(%rsp), %rdi
movb (%rdi,%r9), %dil
movq 0x110(%rsp), %r9
movb %dil, (%r9,%rdx)
incq %rdx
incq %r15
jmp 0x1a3d37
movl %ecx, 0x11c(%rsp)
movq 0x60(%rsp), %rdx
shrl $0x4, %edx
movq 0x10(%rsp), %rcx
movl %ecx, %r15d
shrl $0x4, %r15d
movl %r15d, %edi
subl %edx, %edi
cmpl 0x168(%rsp), %edi
jg 0x1a4670
movd 0x120(%rsp), %xmm1
movsbl %sil, %esi
movd %esi, %xmm0
movl %r15d, %esi
movl 0xc(%rsp), %edi
testb $0x1, %dil
movl %edi, %ecx
jne 0x1a3f3e
movq 0x38(%rsp), %rdi
movq 0x18(%rsp), %r9
movq 0xd0(%rsp), %r15
movl %r15d, (%rdi,%r9,4)
movq 0x90(%rsp), %rdi
movl 0x20(%rsp), %r15d
movl %r15d, (%rdi,%r9,4)
movl %ecx, %edi
movl %edx, %r9d
shll $0x4, %r9d
testb $0x2, %dil
jne 0x1a4026
addq 0x28(%rsp), %r9
movq 0x70(%rsp), %r15
cmpq %rsi, %rdx
ja 0x1a4161
movq 0x48(%rsp), %rdi
movdqa (%r9,%rdi), %xmm5
movl %ecx, %edi
paddb %xmm11, %xmm5
movdqa (%r9,%r14), %xmm3
movdqa %xmm3, %xmm2
pslldq $0x1, %xmm3             # xmm3 = zero,xmm3[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]
por %xmm1, %xmm3
movdqa (%r9,%r12), %xmm4
movdqa %xmm4, %xmm1
pslldq $0x1, %xmm4             # xmm4 = zero,xmm4[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]
por %xmm0, %xmm4
paddb %xmm4, %xmm3
movdqa (%r9), %xmm6
movdqa (%r9,%r13), %xmm0
paddb %xmm6, %xmm0
movdqa %xmm3, %xmm7
pcmpgtb %xmm5, %xmm7
movdqa %xmm5, %xmm8
pcmpgtb %xmm9, %xmm8
pand %xmm5, %xmm8
pmaxub %xmm3, %xmm8
movdqa %xmm0, %xmm5
pcmpgtb %xmm8, %xmm5
movdqa %xmm5, %xmm9
pandn %xmm7, %xmm9
pand 0x3c42d7(%rip), %xmm5   # 0x568170
psubb %xmm9, %xmm5
pxor %xmm9, %xmm9
pmaxub %xmm0, %xmm8
pminub %xmm15, %xmm8
movdqa %xmm8, %xmm7
psubb %xmm4, %xmm7
movdqa %xmm7, (%r9)
movdqa %xmm8, %xmm4
psubb %xmm6, %xmm4
movdqa %xmm4, (%r9,%r12)
psubb %xmm10, %xmm8
psubb %xmm8, %xmm3
psubb %xmm8, %xmm0
movdqa %xmm3, %xmm4
pcmpgtb %xmm9, %xmm4
pand %xmm4, %xmm3
movdqa %xmm3, (%r9,%r14)
pand 0x3c42ac(%rip), %xmm4   # 0x5681a0
por %xmm5, %xmm4
movdqa %xmm0, %xmm3
pcmpgtb %xmm9, %xmm3
pand %xmm3, %xmm0
movdqa %xmm0, (%r9,%r13)
pand 0x3c429d(%rip), %xmm3   # 0x5681b0
por %xmm4, %xmm3
movdqa %xmm3, (%r15)
psrldq $0xf, %xmm2             # xmm2 = xmm2[15],zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero
psrldq $0xf, %xmm1             # xmm1 = xmm1[15],zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero
incq %rdx
addq $0x10, %r15
addq $0x10, %r9
movdqa %xmm1, %xmm0
movdqa %xmm2, %xmm1
jmp 0x1a3e0e
movq 0x60(%rsp), %r9
andl $-0x10, %r9d
addq 0x28(%rsp), %r9
cmpq %rsi, %rdx
ja 0x1a4161
movq 0x48(%rsp), %rdi
movdqa (%r9,%rdi), %xmm4
movl %ecx, %edi
paddb %xmm11, %xmm4
movdqa (%r9,%r14), %xmm3
movdqa %xmm3, %xmm2
psrldq $0xf, %xmm2             # xmm2 = xmm2[15],zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero
pslldq $0x1, %xmm3             # xmm3 = zero,xmm3[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]
por %xmm1, %xmm3
movdqa (%r9,%r12), %xmm5
movdqa %xmm5, %xmm1
psrldq $0xf, %xmm1             # xmm1 = xmm1[15],zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero
pslldq $0x1, %xmm5             # xmm5 = zero,xmm5[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]
por %xmm0, %xmm5
paddb %xmm5, %xmm3
movdqa (%r9), %xmm6
movdqa (%r9,%r13), %xmm0
paddb %xmm6, %xmm0
movdqa %xmm4, %xmm7
pcmpgtb %xmm9, %xmm7
pand %xmm4, %xmm7
pmaxub %xmm3, %xmm7
pmaxub %xmm0, %xmm7
pminub %xmm15, %xmm7
movdqa %xmm7, %xmm4
psubb %xmm5, %xmm4
movdqa %xmm4, (%r9)
movdqa %xmm7, %xmm4
psubb %xmm6, %xmm4
movdqa %xmm4, (%r9,%r12)
psubb %xmm10, %xmm7
psubb %xmm7, %xmm3
psubb %xmm7, %xmm0
movdqa %xmm3, %xmm4
pcmpgtb %xmm9, %xmm4
pand %xmm3, %xmm4
movdqa %xmm4, (%r9,%r14)
movdqa %xmm0, %xmm3
pcmpgtb %xmm9, %xmm3
pand %xmm0, %xmm3
movdqa %xmm3, (%r9,%r13)
incq %rdx
addq $0x10, %r9
movdqa %xmm1, %xmm0
movdqa %xmm2, %xmm1
jmp 0x1a3f4c
addq 0x28(%rsp), %r9
movq 0x70(%rsp), %r15
cmpq %rsi, %rdx
ja 0x1a4161
movq 0x48(%rsp), %rdi
movdqa (%r9,%rdi), %xmm5
movl %ecx, %edi
paddb %xmm11, %xmm5
movdqa (%r9,%r14), %xmm3
movdqa %xmm3, %xmm2
pslldq $0x1, %xmm3             # xmm3 = zero,xmm3[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]
por %xmm1, %xmm3
movdqa (%r9,%r12), %xmm4
movdqa %xmm4, %xmm1
pslldq $0x1, %xmm4             # xmm4 = zero,xmm4[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]
por %xmm0, %xmm4
paddb %xmm4, %xmm3
movdqa (%r9), %xmm6
movdqa (%r9,%r13), %xmm0
paddb %xmm6, %xmm0
movdqa %xmm5, %xmm7
pcmpgtb %xmm9, %xmm7
pand %xmm5, %xmm7
pcmpgtb %xmm3, %xmm5
pandn 0x3c42b3(%rip), %xmm5   # 0x568350
pmaxub %xmm3, %xmm7
movdqa %xmm7, %xmm8
pcmpgtb %xmm0, %xmm8
movdqa 0x3c40bc(%rip), %xmm12  # 0x568170
por %xmm12, %xmm5
pand %xmm8, %xmm5
pmaxub %xmm0, %xmm7
pminub %xmm15, %xmm7
movdqa %xmm7, %xmm8
psubb %xmm4, %xmm8
movdqa %xmm8, (%r9)
movdqa %xmm7, %xmm4
psubb %xmm6, %xmm4
movdqa %xmm4, (%r9,%r12)
psubb %xmm10, %xmm7
psubb %xmm7, %xmm3
psubb %xmm7, %xmm0
pxor %xmm4, %xmm4
pcmpgtb %xmm3, %xmm4
movdqa %xmm4, %xmm6
pandn %xmm3, %xmm6
movdqa %xmm6, (%r9,%r14)
pandn 0x3c4091(%rip), %xmm4   # 0x5681a0
por %xmm5, %xmm4
pxor %xmm3, %xmm3
pcmpgtb %xmm0, %xmm3
movdqa %xmm3, %xmm5
pandn %xmm0, %xmm5
movdqa %xmm5, (%r9,%r13)
pandn 0x3c407f(%rip), %xmm3   # 0x5681b0
por %xmm4, %xmm3
pxor %xmm12, %xmm3
movdqa %xmm3, (%r15)
psrldq $0xf, %xmm2             # xmm2 = xmm2[15],zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero
psrldq $0xf, %xmm1             # xmm1 = xmm1[15],zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero
incq %rdx
addq $0x10, %r15
addq $0x10, %r9
movdqa %xmm1, %xmm0
movdqa %xmm2, %xmm1
jmp 0x1a4030
movsbl 0x5c(%rsp), %r9d
testb $0x8, %dil
jne 0x1a4261
cmpq $0x0, 0x18(%rsp)
movq 0xf8(%rsp), %r15
je 0x1a4348
movl %r9d, %ebp
cltd
pushq $0x4
popq %rsi
idivl %esi
movq 0x10(%rsp), %rcx
movl %ecx, %r9d
leal -0x1(%rcx), %edi
movq 0x28(%rsp), %rsi
addq %r9, %rsi
testl %ecx, %ecx
cmovleq %r15, %rsi
movl $0x0, %edx
cmovlel %edx, %edi
movzbl (%rsi), %esi
addl (%rbx,%rdi,4), %esi
movq 0x60(%rsp), %rdx
leal (%rdx,%rax,4), %edi
subl 0x98(%rsp), %esi
movl %esi, (%rbx,%r9,4)
movd %esi, %xmm0
pshufd $0x0, %xmm0, %xmm1      # xmm1 = xmm0[0,0,0,0]
movd %ecx, %xmm0
pshufd $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
movl 0x11c(%rsp), %eax
cmpl %r11d, %eax
cmovgl %eax, %r11d
movslq %r11d, %rax
movslq %edi, %rcx
movdqa 0x200(%rsp), %xmm6
cmpq %rcx, %rax
jge 0x1a42db
movdqu (%rbx,%rax,4), %xmm2
paddd %xmm6, %xmm2
movd (%r15,%rax), %xmm3
punpcklbw %xmm9, %xmm3    # xmm3 = xmm3[0],xmm9[0],xmm3[1],xmm9[1],xmm3[2],xmm9[2],xmm3[3],xmm9[3],xmm3[4],xmm9[4],xmm3[5],xmm9[5],xmm3[6],xmm9[6],xmm3[7],xmm9[7]
punpcklwd %xmm9, %xmm3    # xmm3 = xmm3[0],xmm9[0],xmm3[1],xmm9[1],xmm3[2],xmm9[2],xmm3[3],xmm9[3]
paddd %xmm2, %xmm3
movdqu %xmm3, (%rbx,%rax,4)
movd %eax, %xmm2
pshufd $0x0, %xmm2, %xmm2      # xmm2 = xmm2[0,0,0,0]
movdqa %xmm3, %xmm4
pcmpgtd %xmm1, %xmm4
pand %xmm4, %xmm3
movdqa %xmm4, %xmm5
pandn %xmm1, %xmm5
por %xmm3, %xmm5
pand %xmm4, %xmm2
pandn %xmm0, %xmm4
por %xmm2, %xmm4
addq $0x4, %rax
addl $0x4, %r8d
movdqa %xmm5, %xmm1
movdqa %xmm4, %xmm0
jmp 0x1a41f7
movq 0x18(%rsp), %rbp
testq %rbp, %rbp
movq 0x30(%rsp), %rdi
movq 0xf8(%rsp), %rdx
movq 0xb0(%rsp), %r8
je 0x1a4435
movq 0x40(%rsp), %r10
cmpl 0x10(%rsp), %r10d
movdqa 0x130(%rsp), %xmm3
jg 0x1a4458
cmpl 0x60(%rsp), %r10d
jl 0x1a4458
movl %r10d, %eax
cmpl 0x10(%rsp), %r10d
jge 0x1a446f
leaq 0x1(%rax), %rcx
movzbl (%rdx,%rax), %edx
movq 0x28(%rsp), %rsi
movzbl 0x1(%rsi,%rax), %eax
cmpb %al, %dl
cmoval %r10d, %ecx
cmoval %edx, %eax
movq %rcx, 0x40(%rsp)
jmp 0x1a4472
movdqa %xmm1, 0x220(%rsp)
movdqa %xmm0, 0x210(%rsp)
xorl %edx, %edx
movq 0x10(%rsp), %rcx
movq 0x98(%rsp), %rdi
movl %ebp, %r9d
cmpq $0x4, %rdx
je 0x1a4323
movl 0x220(%rsp,%rdx,4), %r11d
cmpl %r11d, %esi
jge 0x1a431e
movl 0x210(%rsp,%rdx,4), %ecx
addl %edx, %ecx
movl %r11d, %esi
incq %rdx
jmp 0x1a42ff
cltq
cmpq %r10, %rax
jge 0x1a4357
movzbl (%r15,%rax), %edx
subl %edi, %edx
addl (%rbx,%rax,4), %edx
movl %edx, (%rbx,%rax,4)
cmpl %esi, %edx
cmovgl %edx, %esi
cmovgl %r8d, %ecx
incq %rax
incl %r8d
jmp 0x1a4325
movzbl (%r15), %esi
subl 0xe8(%rsp), %esi
movl %esi, (%rbx)
xorl %ecx, %ecx
movq 0xb0(%rsp), %rax
cmpl %eax, 0x10(%rsp)
movq 0x30(%rsp), %rdi
movq 0x18(%rsp), %rdx
movq 0x60(%rsp), %r8
jne 0x1a4388
movl (%rbx,%rax,4), %eax
cmpl 0x14(%rdi), %eax
jle 0x1a4388
movl %eax, 0x14(%rdi)
movl %edx, %eax
subl 0x20(%rsp), %eax
movl %eax, 0x18(%rdi)
movl %edx, %eax
subl %r8d, %eax
cmpl 0x148(%rsp), %eax
jne 0x1a43a8
movl %r8d, %eax
movl (%rbx,%rax,4), %eax
cmpl 0xc(%rdi), %eax
jle 0x1a43a8
movl %eax, 0xc(%rdi)
movl %r8d, 0x10(%rdi)
movl 0x54(%rsp), %r8d
callq 0x1a468f
movq 0x18(%rsp), %rbp
movq 0x30(%rsp), %rdi
testl %eax, %eax
movq 0xb0(%rsp), %r8
movdqa 0x1b0(%rsp), %xmm10
movdqa 0x1a0(%rsp), %xmm11
movdqa 0x130(%rsp), %xmm3
movdqa 0x190(%rsp), %xmm13
movdqa 0x180(%rsp), %xmm14
movdqa 0x170(%rsp), %xmm15
pxor %xmm9, %xmm9
movl 0xc0(%rsp), %eax
jne 0x1a4540
cmpq 0x150(%rsp), %rbp
jne 0x1a450f
cmpl %r8d, 0x10(%rsp)
jne 0x1a450f
movl (%rbx,%r8,4), %r15d
jmp 0x1a450b
movzbl (%rdx), %r15d
subl 0xe8(%rsp), %r15d
movq $0x0, 0x40(%rsp)
movdqa 0x130(%rsp), %xmm3
jmp 0x1a44f7
movslq %r10d, %r10
movq 0x28(%rsp), %rax
movb 0x1(%rax,%r10), %al
incq %r10
movq %r10, 0x40(%rsp)
jmp 0x1a4472
movb (%rdx,%rax), %al
movzbl %al, %r15d
subl 0x98(%rsp), %r15d
addl 0xc0(%rsp), %r15d
testb $0x10, 0xc(%rsp)
je 0x1a44f7
movl %r15d, %esi
movl %ebp, %edx
movq 0x40(%rsp), %rcx
movl 0x54(%rsp), %r8d
callq 0x1a468f
movq 0x18(%rsp), %rbp
pxor %xmm9, %xmm9
movdqa 0x170(%rsp), %xmm15
movdqa 0x180(%rsp), %xmm14
movdqa 0x190(%rsp), %xmm13
movdqa 0x130(%rsp), %xmm3
movdqa 0x1a0(%rsp), %xmm11
movdqa 0x1b0(%rsp), %xmm10
movq 0xb0(%rsp), %r8
movq 0x30(%rsp), %rdi
testl %eax, %eax
jne 0x1a4540
cmpq 0x150(%rsp), %rbp
jne 0x1a4512
movl %r15d, %eax
cmpl %r8d, 0x10(%rsp)
jne 0x1a4512
movl %r15d, 0x1c(%rdi)
movl %eax, %r15d
incq %rbp
decq 0xa0(%rsp)
movq 0x70(%rsp), %rax
addq 0xf0(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0xd0(%rsp), %rax
jmp 0x1a3b8e
orb $-0x80, 0x3(%rdi)
movq 0x1d8(%rsp), %r14
movq %r14, %rdi
movq 0x1c8(%rsp), %rsi
callq 0x19e38c
movl 0xc(%rsp), %eax
testb $0x8, %al
jne 0x1a456f
movq %r14, %rdi
movq %rbx, %rsi
callq 0x19e38c
movl 0xc(%rsp), %eax
testb $0x1, %al
movq 0x30(%rsp), %r8
movq 0x148(%rsp), %r11
movq 0x1d0(%rsp), %r15
jne 0x1a45de
movl 0xc(%rsp), %eax
movl %eax, %esi
shrl $0x7, %esi
andl $0x1, %esi
testb $0x40, %al
jne 0x1a45f0
cmpl $0x0, (%r8)
js 0x1a45f0
movl 0x50(%rsp), %r9d
shll $0x4, %r9d
leaq 0x20(%r8), %rax
addq $0x28, %r8
subq $0x8, %rsp
movq %r14, %rdi
movq 0x90(%rsp), %rdx
movq 0x40(%rsp), %rcx
movq %r8, %r10
movq 0x98(%rsp), %r8
pushq %r10
pushq %r15
pushq %rax
pushq %r11
pushq 0xd8(%rsp)
jmp 0x1a4639
addq $0x238, %rsp            # imm = 0x238
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0x8(%r8), %eax
testl %eax, %eax
js 0x1a4642
movl 0x4(%r8), %r10d
testl %r10d, %r10d
js 0x1a4642
movl 0x50(%rsp), %r9d
shll $0x4, %r9d
leaq 0x20(%r8), %r11
addq $0x28, %r8
subq $0x8, %rsp
movq %r14, %rdi
movq 0x90(%rsp), %rdx
movq 0x40(%rsp), %rcx
movq %r8, %rbx
movq 0x98(%rsp), %r8
pushq %rbx
pushq %r15
pushq %r11
pushq %r10
pushq %rax
callq 0x1a470e
addq $0x30, %rsp
movq %r14, %rdi
movq 0x140(%rsp), %rsi
callq 0x19e38c
movq %r14, %rdi
movq 0x38(%rsp), %rsi
addq $0x238, %rsp            # imm = 0x238
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x19e38c
leaq 0x3c3b69(%rip), %rdi    # 0x5681e0
leaq 0x3c3ce2(%rip), %rsi    # 0x568360
leaq 0x3c3cec(%rip), %rcx    # 0x568371
movl $0x93, %edx
callq 0x19e0a0