// File: readmapping[P]alfalfa/src/ksw.c
// Function: ksw_u8
kswr_t ksw_u8(kswq_t *q, int tlen, const uint8_t *target, int _gapo, int _gape, int xtra) // the first gap costs -(_o+_e)
{
	int slen, i, m_b, n_b, te = -1, gmax = 0, minsc, endsc;
	uint64_t *b;
	__m128i zero, gapoe, gape, shift, *H0, *H1, *E, *Hmax;
	kswr_t r;

#define __max_16(ret, xx) do { \
		(xx) = _mm_max_epu8((xx), _mm_srli_si128((xx), 8)); \
		(xx) = _mm_max_epu8((xx), _mm_srli_si128((xx), 4)); \
		(xx) = _mm_max_epu8((xx), _mm_srli_si128((xx), 2)); \
		(xx) = _mm_max_epu8((xx), _mm_srli_si128((xx), 1)); \
    	(ret) = _mm_extract_epi16((xx), 0) & 0x00ff; \
	} while (0)

	// initialization
	r = g_defr;
	minsc = (xtra&KSW_XSUBO)? xtra&0xffff : 0x10000;
	endsc = (xtra&KSW_XSTOP)? xtra&0xffff : 0x10000;
	m_b = n_b = 0; b = 0;
	zero = _mm_set1_epi32(0);
	gapoe = _mm_set1_epi8(_gapo + _gape);
	gape = _mm_set1_epi8(_gape);
	shift = _mm_set1_epi8(q->shift);
	H0 = q->H0; H1 = q->H1; E = q->E; Hmax = q->Hmax;
	slen = q->slen;
	for (i = 0; i < slen; ++i) {
		_mm_store_si128(E + i, zero);
		_mm_store_si128(H0 + i, zero);
		_mm_store_si128(Hmax + i, zero);
	}
	// the core loop
	for (i = 0; i < tlen; ++i) {
		int j, k, cmp, imax;
		__m128i e, h, f = zero, max = zero, *S = q->qp + target[i] * slen; // s is the 1st score vector
		h = _mm_load_si128(H0 + slen - 1); // h={2,5,8,11,14,17,-1,-1} in the above example
		h = _mm_slli_si128(h, 1); // h=H(i-1,-1); << instead of >> because x64 is little-endian
		for (j = 0; LIKELY(j < slen); ++j) {
			/* SW cells are computed in the following order:
			 *   H(i,j)   = max{H(i-1,j-1)+S(i,j), E(i,j), F(i,j)}
			 *   E(i+1,j) = max{H(i,j)-q, E(i,j)-r}
			 *   F(i,j+1) = max{H(i,j)-q, F(i,j)-r}
			 */
			// compute H'(i,j); note that at the beginning, h=H'(i-1,j-1)
			h = _mm_adds_epu8(h, _mm_load_si128(S + j));
			h = _mm_subs_epu8(h, shift); // h=H'(i-1,j-1)+S(i,j)
			e = _mm_load_si128(E + j); // e=E'(i,j)
			h = _mm_max_epu8(h, e);
			h = _mm_max_epu8(h, f); // h=H'(i,j)
			max = _mm_max_epu8(max, h); // set max
			_mm_store_si128(H1 + j, h); // save to H'(i,j)
			// now compute E'(i+1,j)
			h = _mm_subs_epu8(h, gapoe); // h=H'(i,j)-gapo
			e = _mm_subs_epu8(e, gape); // e=E'(i,j)-gape
			e = _mm_max_epu8(e, h); // e=E'(i+1,j)
			_mm_store_si128(E + j, e); // save to E'(i+1,j)
			// now compute F'(i,j+1)
			f = _mm_subs_epu8(f, gape);
			f = _mm_max_epu8(f, h);
			// get H'(i-1,j) and prepare for the next j
			h = _mm_load_si128(H0 + j); // h=H'(i-1,j)
		}
		// NB: we do not need to set E(i,j) as we disallow adjecent insertion and then deletion
		for (k = 0; LIKELY(k < 16); ++k) { // this block mimics SWPS3; NB: H(i,j) updated in the lazy-F loop cannot exceed max
			f = _mm_slli_si128(f, 1);
			for (j = 0; LIKELY(j < slen); ++j) {
				h = _mm_load_si128(H1 + j);
				h = _mm_max_epu8(h, f); // h=H'(i,j)
				_mm_store_si128(H1 + j, h);
				h = _mm_subs_epu8(h, gapoe);
				f = _mm_subs_epu8(f, gape);
				cmp = _mm_movemask_epi8(_mm_cmpeq_epi8(_mm_subs_epu8(f, h), zero));
				if (UNLIKELY(cmp == 0xffff)) goto end_loop16;
			}
		}
end_loop16:
		//int k;for (k=0;k<16;++k)printf("%d ", ((uint8_t*)&max)[k]);printf("\n");
		__max_16(imax, max); // imax is the maximum number in max
		if (imax >= minsc) { // write the b array; this condition adds branching unfornately
			if (n_b == 0 || (int32_t)b[n_b-1] + 1 != i) { // then append
				if (n_b == m_b) {
					m_b = m_b? m_b<<1 : 8;
					b = (uint64_t*)realloc(b, 8 * m_b);
				}
				b[n_b++] = (uint64_t)imax<<32 | i;
			} else if ((int)(b[n_b-1]>>32) < imax) b[n_b-1] = (uint64_t)imax<<32 | i; // modify the last
		}
		if (imax > gmax) {
			gmax = imax; te = i; // te is the end position on the target
			for (j = 0; LIKELY(j < slen); ++j) // keep the H1 vector
				_mm_store_si128(Hmax + j, _mm_load_si128(H1 + j));
			if (gmax + q->shift >= 255 || gmax >= endsc) break;
		}
		S = H1; H1 = H0; H0 = S; // swap H0 and H1
	}
	r.score = gmax + q->shift < 255? gmax : 255;
	r.te = te;
	if (r.score != 255) { // get a->qe, the end of query match; find the 2nd best score
		int max = -1, low, high, qlen = slen * 16;
		uint8_t *t = (uint8_t*)Hmax;
		for (i = 0; i < qlen; ++i, ++t)
			if ((int)*t > max) max = *t, r.qe = i / 16 + i % 16 * slen;
		//printf("%d,%d\n", max, gmax);
		if (b) {
			i = (r.score + q->max - 1) / q->max;
			low = te - i; high = te + i;
			for (i = 0; i < n_b; ++i) {
				int e = (int32_t)b[i];
				if ((e < low || e > high) && (int)(b[i]>>32) > r.score2)
					r.score2 = b[i]>>32, r.te2 = e;
			}
		}
	}
	free(b);
	return r;
}

// Assembly:
subq $0x558, %rsp            # imm = 0x558
movq %rdi, 0x18(%rsp)
movq %rdi, %rax
movq %rax, 0x20(%rsp)
movl 0x560(%rsp), %eax
movq %rsi, 0x140(%rsp)
movl %edx, 0x13c(%rsp)
movq %rcx, 0x130(%rsp)
movl %r8d, 0x12c(%rsp)
movl %r9d, 0x128(%rsp)
movl $0xffffffff, 0x114(%rsp) # imm = 0xFFFFFFFF
movl $0x0, 0x110(%rsp)
movq 0xcae5(%rip), %rax      # 0x80994
movq %rax, (%rdi)
movq 0xcae3(%rip), %rax      # 0x8099c
movq %rax, 0x8(%rdi)
movq 0xcae0(%rip), %rax      # 0x809a4
movq %rax, 0x10(%rdi)
movl 0xcade(%rip), %eax      # 0x809ac
movl %eax, 0x18(%rdi)
movl 0x560(%rsp), %eax
andl $0x40000, %eax          # imm = 0x40000
cmpl $0x0, %eax
je 0x73ef4
movl 0x560(%rsp), %eax
andl $0xffff, %eax           # imm = 0xFFFF
movl %eax, 0x14(%rsp)
jmp 0x73eff
movl $0x10000, %eax          # imm = 0x10000
movl %eax, 0x14(%rsp)
jmp 0x73eff
movl 0x14(%rsp), %eax
movl %eax, 0x10c(%rsp)
movl 0x560(%rsp), %eax
andl $0x20000, %eax          # imm = 0x20000
cmpl $0x0, %eax
je 0x73f2d
movl 0x560(%rsp), %eax
andl $0xffff, %eax           # imm = 0xFFFF
movl %eax, 0x10(%rsp)
jmp 0x73f38
movl $0x10000, %eax          # imm = 0x10000
movl %eax, 0x10(%rsp)
jmp 0x73f38
movl 0x10(%rsp), %eax
movl %eax, 0x108(%rsp)
movl $0x0, 0x118(%rsp)
movl $0x0, 0x11c(%rsp)
movq $0x0, 0x100(%rsp)
movl $0x0, 0x148(%rsp)
movl 0x148(%rsp), %eax
movl %eax, 0x4ec(%rsp)
movl %eax, 0x4e8(%rsp)
movl %eax, 0x4e4(%rsp)
movl %eax, 0x4e0(%rsp)
movd 0x4ec(%rsp), %xmm0
movd 0x4e8(%rsp), %xmm1
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movd 0x4e4(%rsp), %xmm2
movd 0x4e0(%rsp), %xmm0
punpckldq %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
movaps %xmm0, 0x4d0(%rsp)
movaps 0x4d0(%rsp), %xmm0
movaps %xmm0, 0xf0(%rsp)
movl 0x12c(%rsp), %eax
movl 0x128(%rsp), %ecx
addl %ecx, %eax
movb %al, 0x14f(%rsp)
movb 0x14f(%rsp), %al
movb %al, 0xd(%rsp)
movb %al, 0x50f(%rsp)
movb %al, 0x50e(%rsp)
movb %al, 0x50d(%rsp)
movb %al, 0x50c(%rsp)
movb %al, 0x50b(%rsp)
movb %al, 0x50a(%rsp)
movb %al, 0x509(%rsp)
movb %al, 0x508(%rsp)
movb %al, 0x507(%rsp)
movb %al, 0x506(%rsp)
movb %al, 0x505(%rsp)
movb %al, 0x504(%rsp)
movb %al, 0x503(%rsp)
movb %al, 0x502(%rsp)
movb %al, 0x501(%rsp)
movb %al, 0x500(%rsp)
movzbl 0x50f(%rsp), %eax
movd %eax, %xmm0
movzbl 0x50e(%rsp), %eax
movd %eax, %xmm1
punpcklbw %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1],xmm1[2],xmm0[2],xmm1[3],xmm0[3],xmm1[4],xmm0[4],xmm1[5],xmm0[5],xmm1[6],xmm0[6],xmm1[7],xmm0[7]
movzbl 0x50d(%rsp), %eax
movd %eax, %xmm2
movzbl 0x50c(%rsp), %eax
movd %eax, %xmm0
punpcklbw %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1],xmm0[2],xmm2[2],xmm0[3],xmm2[3],xmm0[4],xmm2[4],xmm0[5],xmm2[5],xmm0[6],xmm2[6],xmm0[7],xmm2[7]
punpcklwd %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
movzbl 0x50b(%rsp), %eax
movd %eax, %xmm1
movzbl 0x50a(%rsp), %eax
movd %eax, %xmm2
punpcklbw %xmm1, %xmm2    # xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1],xmm2[2],xmm1[2],xmm2[3],xmm1[3],xmm2[4],xmm1[4],xmm2[5],xmm1[5],xmm2[6],xmm1[6],xmm2[7],xmm1[7]
movzbl 0x509(%rsp), %eax
movd %eax, %xmm3
movzbl 0x508(%rsp), %eax
movd %eax, %xmm1
punpcklbw %xmm3, %xmm1    # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1],xmm1[2],xmm3[2],xmm1[3],xmm3[3],xmm1[4],xmm3[4],xmm1[5],xmm3[5],xmm1[6],xmm3[6],xmm1[7],xmm3[7]
punpcklwd %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1],xmm1[2],xmm2[2],xmm1[3],xmm2[3]
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movzbl 0x507(%rsp), %eax
movd %eax, %xmm2
movzbl 0x506(%rsp), %eax
movd %eax, %xmm0
punpcklbw %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1],xmm0[2],xmm2[2],xmm0[3],xmm2[3],xmm0[4],xmm2[4],xmm0[5],xmm2[5],xmm0[6],xmm2[6],xmm0[7],xmm2[7]
movzbl 0x505(%rsp), %eax
movd %eax, %xmm3
movzbl 0x504(%rsp), %eax
movd %eax, %xmm2
punpcklbw %xmm3, %xmm2    # xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1],xmm2[2],xmm3[2],xmm2[3],xmm3[3],xmm2[4],xmm3[4],xmm2[5],xmm3[5],xmm2[6],xmm3[6],xmm2[7],xmm3[7]
punpcklwd %xmm0, %xmm2    # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1],xmm2[2],xmm0[2],xmm2[3],xmm0[3]
movzbl 0x503(%rsp), %eax
movd %eax, %xmm0
movzbl 0x502(%rsp), %eax
movd %eax, %xmm3
punpcklbw %xmm0, %xmm3    # xmm3 = xmm3[0],xmm0[0],xmm3[1],xmm0[1],xmm3[2],xmm0[2],xmm3[3],xmm0[3],xmm3[4],xmm0[4],xmm3[5],xmm0[5],xmm3[6],xmm0[6],xmm3[7],xmm0[7]
movzbl 0x501(%rsp), %eax
movd %eax, %xmm4
movzbl 0x500(%rsp), %eax
movd %eax, %xmm0
punpcklbw %xmm4, %xmm0    # xmm0 = xmm0[0],xmm4[0],xmm0[1],xmm4[1],xmm0[2],xmm4[2],xmm0[3],xmm4[3],xmm0[4],xmm4[4],xmm0[5],xmm4[5],xmm0[6],xmm4[6],xmm0[7],xmm4[7]
punpcklwd %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1],xmm0[2],xmm3[2],xmm0[3],xmm3[3]
punpckldq %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
movaps %xmm0, 0x4f0(%rsp)
movaps 0x4f0(%rsp), %xmm0
movaps %xmm0, 0xe0(%rsp)
movb 0x128(%rsp), %al
movb %al, 0x14e(%rsp)
movb 0x14e(%rsp), %al
movb %al, 0xe(%rsp)
movb %al, 0x52f(%rsp)
movb %al, 0x52e(%rsp)
movb %al, 0x52d(%rsp)
movb %al, 0x52c(%rsp)
movb %al, 0x52b(%rsp)
movb %al, 0x52a(%rsp)
movb %al, 0x529(%rsp)
movb %al, 0x528(%rsp)
movb %al, 0x527(%rsp)
movb %al, 0x526(%rsp)
movb %al, 0x525(%rsp)
movb %al, 0x524(%rsp)
movb %al, 0x523(%rsp)
movb %al, 0x522(%rsp)
movb %al, 0x521(%rsp)
movb %al, 0x520(%rsp)
movzbl 0x52f(%rsp), %eax
movd %eax, %xmm0
movzbl 0x52e(%rsp), %eax
movd %eax, %xmm1
punpcklbw %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1],xmm1[2],xmm0[2],xmm1[3],xmm0[3],xmm1[4],xmm0[4],xmm1[5],xmm0[5],xmm1[6],xmm0[6],xmm1[7],xmm0[7]
movzbl 0x52d(%rsp), %eax
movd %eax, %xmm2
movzbl 0x52c(%rsp), %eax
movd %eax, %xmm0
punpcklbw %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1],xmm0[2],xmm2[2],xmm0[3],xmm2[3],xmm0[4],xmm2[4],xmm0[5],xmm2[5],xmm0[6],xmm2[6],xmm0[7],xmm2[7]
punpcklwd %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
movzbl 0x52b(%rsp), %eax
movd %eax, %xmm1
movzbl 0x52a(%rsp), %eax
movd %eax, %xmm2
punpcklbw %xmm1, %xmm2    # xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1],xmm2[2],xmm1[2],xmm2[3],xmm1[3],xmm2[4],xmm1[4],xmm2[5],xmm1[5],xmm2[6],xmm1[6],xmm2[7],xmm1[7]
movzbl 0x529(%rsp), %eax
movd %eax, %xmm3
movzbl 0x528(%rsp), %eax
movd %eax, %xmm1
punpcklbw %xmm3, %xmm1    # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1],xmm1[2],xmm3[2],xmm1[3],xmm3[3],xmm1[4],xmm3[4],xmm1[5],xmm3[5],xmm1[6],xmm3[6],xmm1[7],xmm3[7]
punpcklwd %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1],xmm1[2],xmm2[2],xmm1[3],xmm2[3]
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movzbl 0x527(%rsp), %eax
movd %eax, %xmm2
movzbl 0x526(%rsp), %eax
movd %eax, %xmm0
punpcklbw %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1],xmm0[2],xmm2[2],xmm0[3],xmm2[3],xmm0[4],xmm2[4],xmm0[5],xmm2[5],xmm0[6],xmm2[6],xmm0[7],xmm2[7]
movzbl 0x525(%rsp), %eax
movd %eax, %xmm3
movzbl 0x524(%rsp), %eax
movd %eax, %xmm2
punpcklbw %xmm3, %xmm2    # xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1],xmm2[2],xmm3[2],xmm2[3],xmm3[3],xmm2[4],xmm3[4],xmm2[5],xmm3[5],xmm2[6],xmm3[6],xmm2[7],xmm3[7]
punpcklwd %xmm0, %xmm2    # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1],xmm2[2],xmm0[2],xmm2[3],xmm0[3]
movzbl 0x523(%rsp), %eax
movd %eax, %xmm0
movzbl 0x522(%rsp), %eax
movd %eax, %xmm3
punpcklbw %xmm0, %xmm3    # xmm3 = xmm3[0],xmm0[0],xmm3[1],xmm0[1],xmm3[2],xmm0[2],xmm3[3],xmm0[3],xmm3[4],xmm0[4],xmm3[5],xmm0[5],xmm3[6],xmm0[6],xmm3[7],xmm0[7]
movzbl 0x521(%rsp), %eax
movd %eax, %xmm4
movzbl 0x520(%rsp), %eax
movd %eax, %xmm0
punpcklbw %xmm4, %xmm0    # xmm0 = xmm0[0],xmm4[0],xmm0[1],xmm4[1],xmm0[2],xmm4[2],xmm0[3],xmm4[3],xmm0[4],xmm4[4],xmm0[5],xmm4[5],xmm0[6],xmm4[6],xmm0[7],xmm4[7]
punpcklwd %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1],xmm0[2],xmm3[2],xmm0[3],xmm3[3]
punpckldq %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
movaps %xmm0, 0x510(%rsp)
movaps 0x510(%rsp), %xmm0
movaps %xmm0, 0xd0(%rsp)
movq 0x140(%rsp), %rax
movb 0x8(%rax), %al
movb %al, 0x14d(%rsp)
movb 0x14d(%rsp), %al
movb %al, 0xf(%rsp)
movb %al, 0x557(%rsp)
movb %al, 0x556(%rsp)
movb %al, 0x555(%rsp)
movb %al, 0x554(%rsp)
movb %al, 0x553(%rsp)
movb %al, 0x552(%rsp)
movb %al, 0x551(%rsp)
movb %al, 0x550(%rsp)
movb %al, 0x54f(%rsp)
movb %al, 0x54e(%rsp)
movb %al, 0x54d(%rsp)
movb %al, 0x54c(%rsp)
movb %al, 0x54b(%rsp)
movb %al, 0x54a(%rsp)
movb %al, 0x549(%rsp)
movb %al, 0x548(%rsp)
movzbl 0x557(%rsp), %eax
movd %eax, %xmm0
movzbl 0x556(%rsp), %eax
movd %eax, %xmm1
punpcklbw %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1],xmm1[2],xmm0[2],xmm1[3],xmm0[3],xmm1[4],xmm0[4],xmm1[5],xmm0[5],xmm1[6],xmm0[6],xmm1[7],xmm0[7]
movzbl 0x555(%rsp), %eax
movd %eax, %xmm2
movzbl 0x554(%rsp), %eax
movd %eax, %xmm0
punpcklbw %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1],xmm0[2],xmm2[2],xmm0[3],xmm2[3],xmm0[4],xmm2[4],xmm0[5],xmm2[5],xmm0[6],xmm2[6],xmm0[7],xmm2[7]
punpcklwd %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
movzbl 0x553(%rsp), %eax
movd %eax, %xmm1
movzbl 0x552(%rsp), %eax
movd %eax, %xmm2
punpcklbw %xmm1, %xmm2    # xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1],xmm2[2],xmm1[2],xmm2[3],xmm1[3],xmm2[4],xmm1[4],xmm2[5],xmm1[5],xmm2[6],xmm1[6],xmm2[7],xmm1[7]
movzbl 0x551(%rsp), %eax
movd %eax, %xmm3
movzbl 0x550(%rsp), %eax
movd %eax, %xmm1
punpcklbw %xmm3, %xmm1    # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1],xmm1[2],xmm3[2],xmm1[3],xmm3[3],xmm1[4],xmm3[4],xmm1[5],xmm3[5],xmm1[6],xmm3[6],xmm1[7],xmm3[7]
punpcklwd %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1],xmm1[2],xmm2[2],xmm1[3],xmm2[3]
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movzbl 0x54f(%rsp), %eax
movd %eax, %xmm2
movzbl 0x54e(%rsp), %eax
movd %eax, %xmm0
punpcklbw %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1],xmm0[2],xmm2[2],xmm0[3],xmm2[3],xmm0[4],xmm2[4],xmm0[5],xmm2[5],xmm0[6],xmm2[6],xmm0[7],xmm2[7]
movzbl 0x54d(%rsp), %eax
movd %eax, %xmm3
movzbl 0x54c(%rsp), %eax
movd %eax, %xmm2
punpcklbw %xmm3, %xmm2    # xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1],xmm2[2],xmm3[2],xmm2[3],xmm3[3],xmm2[4],xmm3[4],xmm2[5],xmm3[5],xmm2[6],xmm3[6],xmm2[7],xmm3[7]
punpcklwd %xmm0, %xmm2    # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1],xmm2[2],xmm0[2],xmm2[3],xmm0[3]
movzbl 0x54b(%rsp), %eax
movd %eax, %xmm0
movzbl 0x54a(%rsp), %eax
movd %eax, %xmm3
punpcklbw %xmm0, %xmm3    # xmm3 = xmm3[0],xmm0[0],xmm3[1],xmm0[1],xmm3[2],xmm0[2],xmm3[3],xmm0[3],xmm3[4],xmm0[4],xmm3[5],xmm0[5],xmm3[6],xmm0[6],xmm3[7],xmm0[7]
movzbl 0x549(%rsp), %eax
movd %eax, %xmm4
movzbl 0x548(%rsp), %eax
movd %eax, %xmm0
punpcklbw %xmm4, %xmm0    # xmm0 = xmm0[0],xmm4[0],xmm0[1],xmm4[1],xmm0[2],xmm4[2],xmm0[3],xmm4[3],xmm0[4],xmm4[4],xmm0[5],xmm4[5],xmm0[6],xmm4[6],xmm0[7],xmm4[7]
punpcklwd %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1],xmm0[2],xmm3[2],xmm0[3],xmm3[3]
punpckldq %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
movdqa %xmm0, 0x530(%rsp)
movdqa 0x530(%rsp), %xmm0
movdqa %xmm0, 0xc0(%rsp)
movq 0x140(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0xb8(%rsp)
movq 0x140(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, 0xb0(%rsp)
movq 0x140(%rsp), %rax
movq 0x28(%rax), %rax
movq %rax, 0xa8(%rsp)
movq 0x140(%rsp), %rax
movq 0x30(%rax), %rax
movq %rax, 0xa0(%rsp)
movq 0x140(%rsp), %rax
movl 0x4(%rax), %eax
movl %eax, 0x124(%rsp)
movl $0x0, 0x120(%rsp)
movl 0x120(%rsp), %eax
cmpl 0x124(%rsp), %eax
jge 0x7462b
movq 0xa8(%rsp), %rax
movslq 0x120(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movdqa 0xf0(%rsp), %xmm0
movq %rax, 0x228(%rsp)
movdqa %xmm0, 0x210(%rsp)
movdqa 0x210(%rsp), %xmm0
movq 0x228(%rsp), %rax
movdqa %xmm0, (%rax)
movq 0xb8(%rsp), %rax
movslq 0x120(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movdqa 0xf0(%rsp), %xmm0
movq %rax, 0x208(%rsp)
movdqa %xmm0, 0x1f0(%rsp)
movdqa 0x1f0(%rsp), %xmm0
movq 0x208(%rsp), %rax
movdqa %xmm0, (%rax)
movq 0xa0(%rsp), %rax
movslq 0x120(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movdqa 0xf0(%rsp), %xmm0
movq %rax, 0x1e8(%rsp)
movdqa %xmm0, 0x1d0(%rsp)
movdqa 0x1d0(%rsp), %xmm0
movq 0x1e8(%rsp), %rax
movdqa %xmm0, (%rax)
movl 0x120(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x120(%rsp)
jmp 0x7452f
movl $0x0, 0x120(%rsp)
movl 0x120(%rsp), %eax
cmpl 0x13c(%rsp), %eax
jge 0x75038
movaps 0xf0(%rsp), %xmm0
movaps %xmm0, 0x60(%rsp)
movaps 0xf0(%rsp), %xmm0
movaps %xmm0, 0x50(%rsp)
movq 0x140(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x130(%rsp), %rcx
movslq 0x120(%rsp), %rdx
movzbl (%rcx,%rdx), %ecx
movl 0x124(%rsp), %edx
imull %edx, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, 0x48(%rsp)
movq 0xb8(%rsp), %rax
movslq 0x124(%rsp), %rcx
shlq $0x4, %rcx
leaq -0x10(%rax,%rcx), %rax
movq %rax, 0x258(%rsp)
movq 0x258(%rsp), %rax
movaps (%rax), %xmm0
movaps %xmm0, 0x70(%rsp)
movaps 0x70(%rsp), %xmm0
pslldq $0x1, %xmm0             # xmm0 = zero,xmm0[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]
movdqa %xmm0, 0x70(%rsp)
movl $0x0, 0x9c(%rsp)
movl 0x9c(%rsp), %eax
cmpl 0x124(%rsp), %eax
setl %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x74a90
movdqa 0x70(%rsp), %xmm1
movq 0x48(%rsp), %rax
movslq 0x9c(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, 0x250(%rsp)
movq 0x250(%rsp), %rax
movdqa (%rax), %xmm0
movdqa %xmm1, 0x270(%rsp)
movdqa %xmm0, 0x260(%rsp)
movdqa 0x270(%rsp), %xmm0
movdqa 0x260(%rsp), %xmm1
paddusb %xmm1, %xmm0
movdqa %xmm0, 0x70(%rsp)
movdqa 0x70(%rsp), %xmm1
movdqa 0xc0(%rsp), %xmm0
movdqa %xmm1, 0x350(%rsp)
movdqa %xmm0, 0x340(%rsp)
movdqa 0x350(%rsp), %xmm0
movdqa 0x340(%rsp), %xmm1
psubusb %xmm1, %xmm0
movdqa %xmm0, 0x70(%rsp)
movq 0xa8(%rsp), %rax
movslq 0x9c(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, 0x248(%rsp)
movq 0x248(%rsp), %rax
movdqa (%rax), %xmm0
movdqa %xmm0, 0x80(%rsp)
movdqa 0x70(%rsp), %xmm1
movdqa 0x80(%rsp), %xmm0
movdqa %xmm1, 0x490(%rsp)
movdqa %xmm0, 0x480(%rsp)
movdqa 0x490(%rsp), %xmm0
movdqa 0x480(%rsp), %xmm1
pmaxub %xmm1, %xmm0
movdqa %xmm0, 0x70(%rsp)
movdqa 0x70(%rsp), %xmm1
movdqa 0x60(%rsp), %xmm0
movdqa %xmm1, 0x470(%rsp)
movdqa %xmm0, 0x460(%rsp)
movdqa 0x470(%rsp), %xmm0
movdqa 0x460(%rsp), %xmm1
pmaxub %xmm1, %xmm0
movdqa %xmm0, 0x70(%rsp)
movdqa 0x50(%rsp), %xmm1
movdqa 0x70(%rsp), %xmm0
movdqa %xmm1, 0x450(%rsp)
movdqa %xmm0, 0x440(%rsp)
movdqa 0x450(%rsp), %xmm0
movdqa 0x440(%rsp), %xmm1
pmaxub %xmm1, %xmm0
movdqa %xmm0, 0x50(%rsp)
movq 0xb0(%rsp), %rax
movslq 0x9c(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movdqa 0x70(%rsp), %xmm0
movq %rax, 0x1c8(%rsp)
movdqa %xmm0, 0x1b0(%rsp)
movdqa 0x1b0(%rsp), %xmm0
movq 0x1c8(%rsp), %rax
movdqa %xmm0, (%rax)
movdqa 0x70(%rsp), %xmm1
movdqa 0xe0(%rsp), %xmm0
movdqa %xmm1, 0x330(%rsp)
movdqa %xmm0, 0x320(%rsp)
movdqa 0x330(%rsp), %xmm0
movdqa 0x320(%rsp), %xmm1
psubusb %xmm1, %xmm0
movdqa %xmm0, 0x70(%rsp)
movdqa 0x80(%rsp), %xmm1
movdqa 0xd0(%rsp), %xmm0
movdqa %xmm1, 0x310(%rsp)
movdqa %xmm0, 0x300(%rsp)
movdqa 0x310(%rsp), %xmm0
movdqa 0x300(%rsp), %xmm1
psubusb %xmm1, %xmm0
movdqa %xmm0, 0x80(%rsp)
movdqa 0x80(%rsp), %xmm1
movdqa 0x70(%rsp), %xmm0
movdqa %xmm1, 0x430(%rsp)
movdqa %xmm0, 0x420(%rsp)
movdqa 0x430(%rsp), %xmm0
movdqa 0x420(%rsp), %xmm1
pmaxub %xmm1, %xmm0
movdqa %xmm0, 0x80(%rsp)
movq 0xa8(%rsp), %rax
movslq 0x9c(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movdqa 0x80(%rsp), %xmm0
movq %rax, 0x1a8(%rsp)
movdqa %xmm0, 0x190(%rsp)
movdqa 0x190(%rsp), %xmm0
movq 0x1a8(%rsp), %rax
movdqa %xmm0, (%rax)
movdqa 0x60(%rsp), %xmm1
movdqa 0xd0(%rsp), %xmm0
movdqa %xmm1, 0x2f0(%rsp)
movdqa %xmm0, 0x2e0(%rsp)
movdqa 0x2f0(%rsp), %xmm0
movdqa 0x2e0(%rsp), %xmm1
psubusb %xmm1, %xmm0
movdqa %xmm0, 0x60(%rsp)
movdqa 0x60(%rsp), %xmm1
movdqa 0x70(%rsp), %xmm0
movdqa %xmm1, 0x410(%rsp)
movdqa %xmm0, 0x400(%rsp)
movdqa 0x410(%rsp), %xmm0
movdqa 0x400(%rsp), %xmm1
pmaxub %xmm1, %xmm0
movdqa %xmm0, 0x60(%rsp)
movq 0xb8(%rsp), %rax
movslq 0x9c(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, 0x240(%rsp)
movq 0x240(%rsp), %rax
movdqa (%rax), %xmm0
movdqa %xmm0, 0x70(%rsp)
movl 0x9c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x9c(%rsp)
jmp 0x746e9
movl $0x0, 0x98(%rsp)
cmpl $0x10, 0x98(%rsp)
setl %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x74cc5
movaps 0x60(%rsp), %xmm0
pslldq $0x1, %xmm0             # xmm0 = zero,xmm0[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]
movdqa %xmm0, 0x60(%rsp)
movl $0x0, 0x9c(%rsp)
movl 0x9c(%rsp), %eax
cmpl 0x124(%rsp), %eax
setl %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x74cad
movq 0xb0(%rsp), %rax
movslq 0x9c(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, 0x238(%rsp)
movq 0x238(%rsp), %rax
movaps (%rax), %xmm0
movaps %xmm0, 0x70(%rsp)
movaps 0x70(%rsp), %xmm1
movaps 0x60(%rsp), %xmm0
movaps %xmm1, 0x3f0(%rsp)
movaps %xmm0, 0x3e0(%rsp)
movaps 0x3f0(%rsp), %xmm0
movaps 0x3e0(%rsp), %xmm1
pmaxub %xmm1, %xmm0
movaps %xmm0, 0x70(%rsp)
movq 0xb0(%rsp), %rax
movslq 0x9c(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movaps 0x70(%rsp), %xmm0
movq %rax, 0x188(%rsp)
movaps %xmm0, 0x170(%rsp)
movaps 0x170(%rsp), %xmm0
movq 0x188(%rsp), %rax
movaps %xmm0, (%rax)
movaps 0x70(%rsp), %xmm1
movaps 0xe0(%rsp), %xmm0
movaps %xmm1, 0x2d0(%rsp)
movaps %xmm0, 0x2c0(%rsp)
movaps 0x2d0(%rsp), %xmm0
movaps 0x2c0(%rsp), %xmm1
psubusb %xmm1, %xmm0
movaps %xmm0, 0x70(%rsp)
movaps 0x60(%rsp), %xmm1
movaps 0xd0(%rsp), %xmm0
movaps %xmm1, 0x2b0(%rsp)
movaps %xmm0, 0x2a0(%rsp)
movaps 0x2b0(%rsp), %xmm0
movaps 0x2a0(%rsp), %xmm1
psubusb %xmm1, %xmm0
movaps %xmm0, 0x60(%rsp)
movaps 0x60(%rsp), %xmm1
movaps 0x70(%rsp), %xmm0
movaps %xmm1, 0x290(%rsp)
movaps %xmm0, 0x280(%rsp)
movaps 0x290(%rsp), %xmm1
movaps 0x280(%rsp), %xmm0
psubusb %xmm0, %xmm1
movaps 0xf0(%rsp), %xmm0
movaps %xmm1, 0x4c0(%rsp)
movaps %xmm0, 0x4b0(%rsp)
movaps 0x4c0(%rsp), %xmm0
movaps 0x4b0(%rsp), %xmm1
pcmpeqb %xmm1, %xmm0
movdqa %xmm0, 0x4a0(%rsp)
movdqa 0x4a0(%rsp), %xmm0
pmovmskb %xmm0, %eax
movl %eax, 0x94(%rsp)
cmpl $0xffff, 0x94(%rsp) # imm = 0xFFFF
sete %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x74c95
jmp 0x74cc7
jmp 0x74c97
movl 0x9c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x9c(%rsp)
jmp 0x74ad2
jmp 0x74caf
movl 0x98(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x98(%rsp)
jmp 0x74a9b
jmp 0x74cc7
jmp 0x74cc9
movaps 0x50(%rsp), %xmm1
movaps %xmm1, %xmm0
psrldq $0x8, %xmm0             # xmm0 = xmm0[8,9,10,11,12,13,14,15],zero,zero,zero,zero,zero,zero,zero,zero
movaps %xmm1, 0x3d0(%rsp)
movaps %xmm0, 0x3c0(%rsp)
movaps 0x3d0(%rsp), %xmm0
movaps 0x3c0(%rsp), %xmm1
pmaxub %xmm1, %xmm0
movaps %xmm0, 0x50(%rsp)
movaps 0x50(%rsp), %xmm1
movaps %xmm1, %xmm0
psrldq $0x4, %xmm0             # xmm0 = xmm0[4,5,6,7,8,9,10,11,12,13,14,15],zero,zero,zero,zero
movaps %xmm1, 0x3b0(%rsp)
movaps %xmm0, 0x3a0(%rsp)
movaps 0x3b0(%rsp), %xmm0
movaps 0x3a0(%rsp), %xmm1
pmaxub %xmm1, %xmm0
movaps %xmm0, 0x50(%rsp)
movaps 0x50(%rsp), %xmm1
movaps %xmm1, %xmm0
psrldq $0x2, %xmm0             # xmm0 = xmm0[2,3,4,5,6,7,8,9,10,11,12,13,14,15],zero,zero
movaps %xmm1, 0x390(%rsp)
movaps %xmm0, 0x380(%rsp)
movaps 0x390(%rsp), %xmm0
movaps 0x380(%rsp), %xmm1
pmaxub %xmm1, %xmm0
movaps %xmm0, 0x50(%rsp)
movaps 0x50(%rsp), %xmm1
movaps %xmm1, %xmm0
psrldq $0x1, %xmm0             # xmm0 = xmm0[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15],zero
movaps %xmm1, 0x370(%rsp)
movaps %xmm0, 0x360(%rsp)
movaps 0x370(%rsp), %xmm0
movaps 0x360(%rsp), %xmm1
pmaxub %xmm1, %xmm0
movaps %xmm0, 0x50(%rsp)
movl 0x50(%rsp), %eax
movzwl %ax, %eax
andl $0xff, %eax
movl %eax, 0x90(%rsp)
movl 0x90(%rsp), %eax
cmpl 0x10c(%rsp), %eax
jl 0x74ef1
cmpl $0x0, 0x118(%rsp)
je 0x74dfb
movq 0x100(%rsp), %rax
movl 0x118(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
addl $0x1, %eax
cmpl 0x120(%rsp), %eax
je 0x74e97
movl 0x118(%rsp), %eax
cmpl 0x11c(%rsp), %eax
jne 0x74e5c
cmpl $0x0, 0x11c(%rsp)
je 0x74e24
movl 0x11c(%rsp), %eax
shll %eax
movl %eax, 0x8(%rsp)
jmp 0x74e2f
movl $0x8, %eax
movl %eax, 0x8(%rsp)
jmp 0x74e2f
movl 0x8(%rsp), %eax
movl %eax, 0x11c(%rsp)
movq 0x100(%rsp), %rdi
movl 0x11c(%rsp), %eax
shll $0x3, %eax
movslq %eax, %rsi
callq 0x86d0
movq %rax, 0x100(%rsp)
movslq 0x90(%rsp), %rdx
shlq $0x20, %rdx
movslq 0x120(%rsp), %rax
orq %rax, %rdx
movq 0x100(%rsp), %rax
movl 0x118(%rsp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, 0x118(%rsp)
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0x74eef
movq 0x100(%rsp), %rax
movl 0x118(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
shrq $0x20, %rax
cmpl 0x90(%rsp), %eax
jge 0x74eed
movslq 0x90(%rsp), %rdx
shlq $0x20, %rdx
movslq 0x120(%rsp), %rax
orq %rax, %rdx
movq 0x100(%rsp), %rax
movl 0x118(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0x74eef
jmp 0x74ef1
movl 0x90(%rsp), %eax
cmpl 0x110(%rsp), %eax
jle 0x74ff8
movl 0x90(%rsp), %eax
movl %eax, 0x110(%rsp)
movl 0x120(%rsp), %eax
movl %eax, 0x114(%rsp)
movl $0x0, 0x9c(%rsp)
movl 0x9c(%rsp), %eax
cmpl 0x124(%rsp), %eax
setl %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x74fc8
movq 0xa0(%rsp), %rax
movslq 0x9c(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0xb0(%rsp), %rcx
movslq 0x9c(%rsp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
movq %rcx, 0x230(%rsp)
movq 0x230(%rsp), %rcx
movdqa (%rcx), %xmm0
movq %rax, 0x168(%rsp)
movdqa %xmm0, 0x150(%rsp)
movdqa 0x150(%rsp), %xmm0
movq 0x168(%rsp), %rax
movdqa %xmm0, (%rax)
movl 0x9c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x9c(%rsp)
jmp 0x74f2c
movl 0x110(%rsp), %eax
movq 0x140(%rsp), %rcx
movzbl 0x8(%rcx), %ecx
addl %ecx, %eax
cmpl $0xff, %eax
jge 0x74ff4
movl 0x110(%rsp), %eax
cmpl 0x108(%rsp), %eax
jl 0x74ff6
jmp 0x75038
jmp 0x74ff8
movq 0xb0(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0xb8(%rsp), %rax
movq %rax, 0xb0(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0xb8(%rsp)
movl 0x120(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x120(%rsp)
jmp 0x74636
movl 0x110(%rsp), %eax
movq 0x140(%rsp), %rcx
movzbl 0x8(%rcx), %ecx
addl %ecx, %eax
cmpl $0xff, %eax
jge 0x75061
movl 0x110(%rsp), %eax
movl %eax, 0x4(%rsp)
jmp 0x7506c
movl $0xff, %eax
movl %eax, 0x4(%rsp)
jmp 0x7506c
movq 0x18(%rsp), %rax
movl 0x4(%rsp), %ecx
movl %ecx, (%rax)
movl 0x114(%rsp), %ecx
movl %ecx, 0x4(%rax)
cmpl $0xff, (%rax)
je 0x75248
movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF
movl 0x124(%rsp), %eax
shll $0x4, %eax
movl %eax, 0x38(%rsp)
movq 0xa0(%rsp), %rax
movq %rax, 0x30(%rsp)
movl $0x0, 0x120(%rsp)
movl 0x120(%rsp), %eax
cmpl 0x38(%rsp), %eax
jge 0x75137
movq 0x30(%rsp), %rax
movzbl (%rax), %eax
cmpl 0x44(%rsp), %eax
jle 0x75114
movq 0x30(%rsp), %rax
movzbl (%rax), %eax
movl %eax, 0x44(%rsp)
movl 0x120(%rsp), %eax
movl $0x10, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl 0x120(%rsp), %eax
movl $0x10, %esi
cltd
idivl %esi
movq 0x18(%rsp), %rax
imull 0x124(%rsp), %edx
addl %edx, %ecx
movl %ecx, 0x8(%rax)
jmp 0x75116
movl 0x120(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x120(%rsp)
movq 0x30(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
jmp 0x750bb
cmpq $0x0, 0x100(%rsp)
je 0x75246
movq 0x18(%rsp), %rax
movl (%rax), %eax
movq 0x140(%rsp), %rcx
movzbl 0xa(%rcx), %ecx
addl %ecx, %eax
subl $0x1, %eax
movq 0x140(%rsp), %rcx
movzbl 0xa(%rcx), %ecx
cltd
idivl %ecx
movl %eax, 0x120(%rsp)
movl 0x114(%rsp), %eax
subl 0x120(%rsp), %eax
movl %eax, 0x40(%rsp)
movl 0x114(%rsp), %eax
addl 0x120(%rsp), %eax
movl %eax, 0x3c(%rsp)
movl $0x0, 0x120(%rsp)
movl 0x120(%rsp), %eax
cmpl 0x118(%rsp), %eax
jge 0x75244
movq 0x100(%rsp), %rax
movslq 0x120(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movl %eax, 0x2c(%rsp)
movl 0x2c(%rsp), %eax
cmpl 0x40(%rsp), %eax
jl 0x751e3
movl 0x2c(%rsp), %eax
cmpl 0x3c(%rsp), %eax
jle 0x7522c
movq 0x18(%rsp), %rcx
movq 0x100(%rsp), %rax
movslq 0x120(%rsp), %rdx
movq (%rax,%rdx,8), %rax
shrq $0x20, %rax
cmpl 0xc(%rcx), %eax
jle 0x7522c
movq 0x18(%rsp), %rax
movq 0x100(%rsp), %rcx
movslq 0x120(%rsp), %rdx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
movl %ecx, 0xc(%rax)
movl 0x2c(%rsp), %ecx
movl %ecx, 0x10(%rax)
jmp 0x7522e
movl 0x120(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x120(%rsp)
jmp 0x751a3
jmp 0x75246
jmp 0x75248
movq 0x100(%rsp), %rdi
callq 0x8470
movq 0x20(%rsp), %rax
addq $0x558, %rsp            # imm = 0x558
retq
nopw %cs:(%rax,%rax)