// File: /workspace/github_c_makefile_star2_O0/lh3[P]minimap2/ksw2_ll_sse.c
// Function: ksw_ll_i16
int ksw_ll_i16(void *q_, int tlen, const uint8_t *target, int _gapo, int _gape, int *qe, int *te)
{
	kswq_t *q = (kswq_t*)q_;
	int slen, i, gmax = 0, qlen8;
	__m128i zero, gapoe, gape, *H0, *H1, *E, *Hmax;
	uint16_t *H8;

#define __max_8(ret, xx) do { \
		(xx) = _mm_max_epi16((xx), _mm_srli_si128((xx), 8)); \
		(xx) = _mm_max_epi16((xx), _mm_srli_si128((xx), 4)); \
		(xx) = _mm_max_epi16((xx), _mm_srli_si128((xx), 2)); \
		(ret) = _mm_extract_epi16((xx), 0); \
	} while (0)

	// initialization
	*qe = *te = -1;
	zero = _mm_set1_epi32(0);
	gapoe = _mm_set1_epi16(_gapo + _gape);
	gape = _mm_set1_epi16(_gape);
	H0 = q->H0; H1 = q->H1; E = q->E; Hmax = q->Hmax;
	slen = q->slen, qlen8 = slen * 8;
	memset(E,    0, slen * sizeof(__m128i));
	memset(H0,   0, slen * sizeof(__m128i));
	memset(Hmax, 0, slen * sizeof(__m128i));
	// the core loop
	for (i = 0; i < tlen; ++i) {
		int j, k, 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, 2);
		for (j = 0; LIKELY(j < slen); ++j) {
			h = _mm_adds_epi16(h, *S++);
			e = _mm_load_si128(E + j);
			h = _mm_max_epi16(h, e);
			h = _mm_max_epi16(h, f);
			max = _mm_max_epi16(max, h);
			_mm_store_si128(H1 + j, h);
			h = _mm_subs_epu16(h, gapoe);
			e = _mm_subs_epu16(e, gape);
			e = _mm_max_epi16(e, h);
			_mm_store_si128(E + j, e);
			f = _mm_subs_epu16(f, gape);
			f = _mm_max_epi16(f, h);
			h = _mm_load_si128(H0 + j);
		}
		for (k = 0; LIKELY(k < 8); ++k) {
			f = _mm_slli_si128(f, 2);
			for (j = 0; LIKELY(j < slen); ++j) {
				h = _mm_load_si128(H1 + j);
				h = _mm_max_epi16(h, f);
				_mm_store_si128(H1 + j, h);
				h = _mm_subs_epu16(h, gapoe);
				f = _mm_subs_epu16(f, gape);
				if(UNLIKELY(!_mm_movemask_epi8(_mm_cmpgt_epi16(f, h)))) goto end_loop_i16;
			}
		}
end_loop_i16:
		__max_8(imax, max);
		if (imax >= gmax) {
			gmax = imax; *te = i;
			memcpy(Hmax, H1, slen * sizeof(__m128i));
		}
		S = H1; H1 = H0; H0 = S;
	}
	for (i = 0, H8 = (uint16_t*)Hmax; i < qlen8; ++i)
		if ((int)H8[i] == gmax) *qe = i / 8 + i % 8 * slen;
	return gmax;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x400, %rsp            # imm = 0x400
movq 0x10(%rbp), %rax
movq %rdi, -0x300(%rbp)
movl %esi, -0x304(%rbp)
movq %rdx, -0x310(%rbp)
movl %ecx, -0x314(%rbp)
movl %r8d, -0x318(%rbp)
movq %r9, -0x320(%rbp)
movq -0x300(%rbp), %rax
movq %rax, -0x328(%rbp)
movl $0x0, -0x334(%rbp)
movq 0x10(%rbp), %rax
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movq -0x320(%rbp), %rax
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movl $0x0, -0x2f8(%rbp)
movl -0x2f8(%rbp), %eax
movl %eax, -0x44(%rbp)
movl %eax, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
movl %eax, -0x50(%rbp)
movd -0x44(%rbp), %xmm0
movd -0x48(%rbp), %xmm1
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movd -0x4c(%rbp), %xmm2
movd -0x50(%rbp), %xmm0
punpckldq %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
movaps %xmm0, -0x60(%rbp)
movaps -0x60(%rbp), %xmm0
movaps %xmm0, -0x350(%rbp)
movl -0x314(%rbp), %eax
movl -0x318(%rbp), %ecx
addl %ecx, %eax
movw %ax, -0x2f2(%rbp)
movw -0x2f2(%rbp), %ax
movw %ax, -0x3fc(%rbp)
movw %ax, -0x22(%rbp)
movw %ax, -0x24(%rbp)
movw %ax, -0x26(%rbp)
movw %ax, -0x28(%rbp)
movw %ax, -0x2a(%rbp)
movw %ax, -0x2c(%rbp)
movw %ax, -0x2e(%rbp)
movw %ax, -0x30(%rbp)
movzwl -0x22(%rbp), %eax
movd %eax, %xmm1
movzwl -0x24(%rbp), %eax
movd %eax, %xmm0
punpcklwd %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
movzwl -0x26(%rbp), %eax
movd %eax, %xmm2
movzwl -0x28(%rbp), %eax
movd %eax, %xmm1
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]
movzwl -0x2a(%rbp), %eax
movd %eax, %xmm0
movzwl -0x2c(%rbp), %eax
movd %eax, %xmm2
punpcklwd %xmm0, %xmm2    # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1],xmm2[2],xmm0[2],xmm2[3],xmm0[3]
movzwl -0x2e(%rbp), %eax
movd %eax, %xmm3
movzwl -0x30(%rbp), %eax
movd %eax, %xmm0
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, -0x40(%rbp)
movaps -0x40(%rbp), %xmm0
movaps %xmm0, -0x360(%rbp)
movw -0x318(%rbp), %ax
movw %ax, -0x2f4(%rbp)
movw -0x2f4(%rbp), %ax
movw %ax, -0x3fa(%rbp)
movw %ax, -0x2(%rbp)
movw %ax, -0x4(%rbp)
movw %ax, -0x6(%rbp)
movw %ax, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movw %ax, -0xc(%rbp)
movw %ax, -0xe(%rbp)
movw %ax, -0x10(%rbp)
movzwl -0x2(%rbp), %eax
movd %eax, %xmm1
movzwl -0x4(%rbp), %eax
movd %eax, %xmm0
punpcklwd %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
movzwl -0x6(%rbp), %eax
movd %eax, %xmm2
movzwl -0x8(%rbp), %eax
movd %eax, %xmm1
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]
movzwl -0xa(%rbp), %eax
movd %eax, %xmm0
movzwl -0xc(%rbp), %eax
movd %eax, %xmm2
punpcklwd %xmm0, %xmm2    # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1],xmm2[2],xmm0[2],xmm2[3],xmm0[3]
movzwl -0xe(%rbp), %eax
movd %eax, %xmm3
movzwl -0x10(%rbp), %eax
movd %eax, %xmm0
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, -0x20(%rbp)
movdqa -0x20(%rbp), %xmm0
movdqa %xmm0, -0x370(%rbp)
movq -0x328(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x378(%rbp)
movq -0x328(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x380(%rbp)
movq -0x328(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x388(%rbp)
movq -0x328(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x390(%rbp)
movq -0x328(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x32c(%rbp)
movl -0x32c(%rbp), %eax
shll $0x3, %eax
movl %eax, -0x338(%rbp)
movq -0x388(%rbp), %rdi
movslq -0x32c(%rbp), %rdx
shlq $0x4, %rdx
xorl %esi, %esi
callq 0x21b0
movq -0x378(%rbp), %rdi
movslq -0x32c(%rbp), %rdx
shlq $0x4, %rdx
xorl %esi, %esi
callq 0x21b0
movq -0x390(%rbp), %rdi
movslq -0x32c(%rbp), %rdx
shlq $0x4, %rdx
xorl %esi, %esi
callq 0x21b0
movl $0x0, -0x330(%rbp)
movl -0x330(%rbp), %eax
cmpl -0x304(%rbp), %eax
jge 0x2f66e
movaps -0x350(%rbp), %xmm0
movaps %xmm0, -0x3e0(%rbp)
movaps -0x350(%rbp), %xmm0
movaps %xmm0, -0x3f0(%rbp)
movq -0x328(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x310(%rbp), %rcx
movslq -0x330(%rbp), %rdx
movzbl (%rcx,%rdx), %ecx
movl -0x32c(%rbp), %edx
imull %edx, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x3f8(%rbp)
movq -0x378(%rbp), %rax
movslq -0x32c(%rbp), %rcx
shlq $0x4, %rcx
leaq -0x10(%rax,%rcx), %rax
movq %rax, -0x2d8(%rbp)
movq -0x2d8(%rbp), %rax
movaps (%rax), %xmm0
movaps %xmm0, -0x3d0(%rbp)
movaps -0x3d0(%rbp), %xmm0
pslldq $0x2, %xmm0             # xmm0 = zero,zero,xmm0[0,1,2,3,4,5,6,7,8,9,10,11,12,13]
movdqa %xmm0, -0x3d0(%rbp)
movl $0x0, -0x39c(%rbp)
movl -0x39c(%rbp), %eax
cmpl -0x32c(%rbp), %eax
setl %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x2f354
movdqa -0x3d0(%rbp), %xmm1
movq -0x3f8(%rbp), %rax
movq %rax, %rcx
addq $0x10, %rcx
movq %rcx, -0x3f8(%rbp)
movdqa (%rax), %xmm0
movdqa %xmm1, -0x2c0(%rbp)
movdqa %xmm0, -0x2d0(%rbp)
movdqa -0x2c0(%rbp), %xmm0
movdqa -0x2d0(%rbp), %xmm1
paddsw %xmm1, %xmm0
movdqa %xmm0, -0x3d0(%rbp)
movq -0x388(%rbp), %rax
movslq -0x39c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x2e0(%rbp)
movq -0x2e0(%rbp), %rax
movdqa (%rax), %xmm0
movdqa %xmm0, -0x3c0(%rbp)
movdqa -0x3d0(%rbp), %xmm1
movdqa -0x3c0(%rbp), %xmm0
movdqa %xmm1, -0x1a0(%rbp)
movdqa %xmm0, -0x1b0(%rbp)
movdqa -0x1a0(%rbp), %xmm0
movdqa -0x1b0(%rbp), %xmm1
pmaxsw %xmm1, %xmm0
movdqa %xmm0, -0x3d0(%rbp)
movdqa -0x3d0(%rbp), %xmm1
movdqa -0x3e0(%rbp), %xmm0
movdqa %xmm1, -0x1c0(%rbp)
movdqa %xmm0, -0x1d0(%rbp)
movdqa -0x1c0(%rbp), %xmm0
movdqa -0x1d0(%rbp), %xmm1
pmaxsw %xmm1, %xmm0
movdqa %xmm0, -0x3d0(%rbp)
movdqa -0x3f0(%rbp), %xmm1
movdqa -0x3d0(%rbp), %xmm0
movdqa %xmm1, -0x1e0(%rbp)
movdqa %xmm0, -0x1f0(%rbp)
movdqa -0x1e0(%rbp), %xmm0
movdqa -0x1f0(%rbp), %xmm1
pmaxsw %xmm1, %xmm0
movdqa %xmm0, -0x3f0(%rbp)
movq -0x380(%rbp), %rax
movslq -0x39c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movdqa -0x3d0(%rbp), %xmm0
movq %rax, -0x138(%rbp)
movdqa %xmm0, -0x150(%rbp)
movdqa -0x150(%rbp), %xmm0
movq -0x138(%rbp), %rax
movdqa %xmm0, (%rax)
movdqa -0x3d0(%rbp), %xmm1
movdqa -0x360(%rbp), %xmm0
movdqa %xmm1, -0xa0(%rbp)
movdqa %xmm0, -0xb0(%rbp)
movdqa -0xa0(%rbp), %xmm0
movdqa -0xb0(%rbp), %xmm1
psubusw %xmm1, %xmm0
movdqa %xmm0, -0x3d0(%rbp)
movdqa -0x3c0(%rbp), %xmm1
movdqa -0x370(%rbp), %xmm0
movdqa %xmm1, -0xc0(%rbp)
movdqa %xmm0, -0xd0(%rbp)
movdqa -0xc0(%rbp), %xmm0
movdqa -0xd0(%rbp), %xmm1
psubusw %xmm1, %xmm0
movdqa %xmm0, -0x3c0(%rbp)
movdqa -0x3c0(%rbp), %xmm1
movdqa -0x3d0(%rbp), %xmm0
movdqa %xmm1, -0x200(%rbp)
movdqa %xmm0, -0x210(%rbp)
movdqa -0x200(%rbp), %xmm0
movdqa -0x210(%rbp), %xmm1
pmaxsw %xmm1, %xmm0
movdqa %xmm0, -0x3c0(%rbp)
movq -0x388(%rbp), %rax
movslq -0x39c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movdqa -0x3c0(%rbp), %xmm0
movq %rax, -0x158(%rbp)
movdqa %xmm0, -0x170(%rbp)
movdqa -0x170(%rbp), %xmm0
movq -0x158(%rbp), %rax
movdqa %xmm0, (%rax)
movdqa -0x3e0(%rbp), %xmm1
movdqa -0x370(%rbp), %xmm0
movdqa %xmm1, -0xe0(%rbp)
movdqa %xmm0, -0xf0(%rbp)
movdqa -0xe0(%rbp), %xmm0
movdqa -0xf0(%rbp), %xmm1
psubusw %xmm1, %xmm0
movdqa %xmm0, -0x3e0(%rbp)
movdqa -0x3e0(%rbp), %xmm1
movdqa -0x3d0(%rbp), %xmm0
movdqa %xmm1, -0x220(%rbp)
movdqa %xmm0, -0x230(%rbp)
movdqa -0x220(%rbp), %xmm0
movdqa -0x230(%rbp), %xmm1
pmaxsw %xmm1, %xmm0
movdqa %xmm0, -0x3e0(%rbp)
movq -0x378(%rbp), %rax
movslq -0x39c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x2e8(%rbp)
movq -0x2e8(%rbp), %rax
movdqa (%rax), %xmm0
movdqa %xmm0, -0x3d0(%rbp)
movl -0x39c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x39c(%rbp)
jmp 0x2f017
movl $0x0, -0x3a0(%rbp)
cmpl $0x8, -0x3a0(%rbp)
setl %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x2f537
movaps -0x3e0(%rbp), %xmm0
pslldq $0x2, %xmm0             # xmm0 = zero,zero,xmm0[0,1,2,3,4,5,6,7,8,9,10,11,12,13]
movdqa %xmm0, -0x3e0(%rbp)
movl $0x0, -0x39c(%rbp)
movl -0x39c(%rbp), %eax
cmpl -0x32c(%rbp), %eax
setl %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x2f521
movq -0x380(%rbp), %rax
movslq -0x39c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x2f0(%rbp)
movq -0x2f0(%rbp), %rax
movaps (%rax), %xmm0
movaps %xmm0, -0x3d0(%rbp)
movaps -0x3d0(%rbp), %xmm1
movaps -0x3e0(%rbp), %xmm0
movaps %xmm1, -0x240(%rbp)
movaps %xmm0, -0x250(%rbp)
movaps -0x240(%rbp), %xmm0
movaps -0x250(%rbp), %xmm1
pmaxsw %xmm1, %xmm0
movaps %xmm0, -0x3d0(%rbp)
movq -0x380(%rbp), %rax
movslq -0x39c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movaps -0x3d0(%rbp), %xmm0
movq %rax, -0x178(%rbp)
movaps %xmm0, -0x190(%rbp)
movaps -0x190(%rbp), %xmm0
movq -0x178(%rbp), %rax
movaps %xmm0, (%rax)
movaps -0x3d0(%rbp), %xmm1
movaps -0x360(%rbp), %xmm0
movaps %xmm1, -0x100(%rbp)
movaps %xmm0, -0x110(%rbp)
movaps -0x100(%rbp), %xmm0
movaps -0x110(%rbp), %xmm1
psubusw %xmm1, %xmm0
movaps %xmm0, -0x3d0(%rbp)
movaps -0x3e0(%rbp), %xmm1
movaps -0x370(%rbp), %xmm0
movaps %xmm1, -0x120(%rbp)
movaps %xmm0, -0x130(%rbp)
movaps -0x120(%rbp), %xmm0
movaps -0x130(%rbp), %xmm1
psubusw %xmm1, %xmm0
movaps %xmm0, -0x3e0(%rbp)
movaps -0x3e0(%rbp), %xmm1
movaps -0x3d0(%rbp), %xmm0
movaps %xmm1, -0x70(%rbp)
movaps %xmm0, -0x80(%rbp)
movaps -0x70(%rbp), %xmm0
movaps -0x80(%rbp), %xmm1
pcmpgtw %xmm1, %xmm0
movdqa %xmm0, -0x90(%rbp)
movdqa -0x90(%rbp), %xmm0
pmovmskb %xmm0, %eax
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x2f50b
jmp 0x2f539
jmp 0x2f50d
movl -0x39c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x39c(%rbp)
jmp 0x2f397
jmp 0x2f523
movl -0x3a0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3a0(%rbp)
jmp 0x2f35e
jmp 0x2f539
jmp 0x2f53b
movaps -0x3f0(%rbp), %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, -0x260(%rbp)
movaps %xmm0, -0x270(%rbp)
movaps -0x260(%rbp), %xmm0
movaps -0x270(%rbp), %xmm1
pmaxsw %xmm1, %xmm0
movaps %xmm0, -0x3f0(%rbp)
movaps -0x3f0(%rbp), %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, -0x280(%rbp)
movaps %xmm0, -0x290(%rbp)
movaps -0x280(%rbp), %xmm0
movaps -0x290(%rbp), %xmm1
pmaxsw %xmm1, %xmm0
movaps %xmm0, -0x3f0(%rbp)
movaps -0x3f0(%rbp), %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, -0x2a0(%rbp)
movaps %xmm0, -0x2b0(%rbp)
movaps -0x2a0(%rbp), %xmm0
movaps -0x2b0(%rbp), %xmm1
pmaxsw %xmm1, %xmm0
movaps %xmm0, -0x3f0(%rbp)
movl -0x3f0(%rbp), %eax
movzwl %ax, %eax
movl %eax, -0x3a4(%rbp)
movl -0x3a4(%rbp), %eax
cmpl -0x334(%rbp), %eax
jl 0x2f630
movl -0x3a4(%rbp), %eax
movl %eax, -0x334(%rbp)
movl -0x330(%rbp), %ecx
movq 0x10(%rbp), %rax
movl %ecx, (%rax)
movq -0x390(%rbp), %rdi
movq -0x380(%rbp), %rsi
movslq -0x32c(%rbp), %rdx
shlq $0x4, %rdx
callq 0x2290
movq -0x380(%rbp), %rax
movq %rax, -0x3f8(%rbp)
movq -0x378(%rbp), %rax
movq %rax, -0x380(%rbp)
movq -0x3f8(%rbp), %rax
movq %rax, -0x378(%rbp)
movl -0x330(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x330(%rbp)
jmp 0x2ef65
movl $0x0, -0x330(%rbp)
movq -0x390(%rbp), %rax
movq %rax, -0x398(%rbp)
movl -0x330(%rbp), %eax
cmpl -0x338(%rbp), %eax
jge 0x2f6f1
movq -0x398(%rbp), %rax
movslq -0x330(%rbp), %rcx
movzwl (%rax,%rcx,2), %eax
cmpl -0x334(%rbp), %eax
jne 0x2f6de
movl -0x330(%rbp), %eax
movl $0x8, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x330(%rbp), %eax
movl $0x8, %esi
cltd
idivl %esi
imull -0x32c(%rbp), %edx
addl %edx, %ecx
movq -0x320(%rbp), %rax
movl %ecx, (%rax)
jmp 0x2f6e0
movl -0x330(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x330(%rbp)
jmp 0x2f686
movl -0x334(%rbp), %eax
addq $0x400, %rsp            # imm = 0x400
popq %rbp
retq