// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/./Levenshtein_distance.h
// Function: Reserve_Banded_BPM_4_SSE_only(char*, char*, char*, char*, int, char*, int, int*, unsigned int*, unsigned short, long long vector[2]*)
inline int Reserve_Banded_BPM_4_SSE_only(char *pattern1, char *pattern2, char *pattern3, char *pattern4, int p_length, char *text, int t_length,
	int* return_sites, unsigned int* return_sites_error, unsigned short errthold, __m128i* Peq_SSE)

{
	memset(return_sites, -1, sizeof(int)* 4);
	memset(return_sites_error, -1, sizeof(unsigned int)* 4);

	Word_32 Peq[256][4];
	int band_length = (errthold << 1) + 1;


	int i;

	Word_32 tmp_Peq_1 = 1;


	memset(Peq[(uint8_t)'A'], 0, sizeof(Word_32)* 4);
	memset(Peq[(uint8_t)'C'], 0, sizeof(Word_32)* 4);
	memset(Peq[(uint8_t)'G'], 0, sizeof(Word_32)* 4);
	memset(Peq[(uint8_t)'T'], 0, sizeof(Word_32)* 4);

	for (i = 0; i<band_length; i++)
	{
		Peq[(uint8_t)pattern1[i]][0] = Peq[(uint8_t)pattern1[i]][0] | tmp_Peq_1;
		Peq[(uint8_t)pattern2[i]][1] = Peq[(uint8_t)pattern2[i]][1] | tmp_Peq_1;
		Peq[(uint8_t)pattern3[i]][2] = Peq[(uint8_t)pattern3[i]][2] | tmp_Peq_1;
		Peq[(uint8_t)pattern4[i]][3] = Peq[(uint8_t)pattern4[i]][3] | tmp_Peq_1;

		tmp_Peq_1 = tmp_Peq_1 << 1;
	}

	Peq_SSE[(uint8_t)'A'] = _mm_set_epi32(Peq[(uint8_t)'A'][3], Peq[(uint8_t)'A'][2], Peq[(uint8_t)'A'][1], Peq[(uint8_t)'A'][0]);
	Peq_SSE[(uint8_t)'C'] = _mm_set_epi32(Peq[(uint8_t)'C'][3], Peq[(uint8_t)'C'][2], Peq[(uint8_t)'C'][1], Peq[(uint8_t)'C'][0]);
	Peq_SSE[(uint8_t)'G'] = _mm_set_epi32(Peq[(uint8_t)'G'][3], Peq[(uint8_t)'G'][2], Peq[(uint8_t)'G'][1], Peq[(uint8_t)'G'][0]);
	Peq_SSE[(uint8_t)'T'] = _mm_set_epi32(Peq[(uint8_t)'T'][3], Peq[(uint8_t)'T'][2], Peq[(uint8_t)'T'][1], Peq[(uint8_t)'T'][0]);
	///Peq_SSE[(uint8_t)'T'] = _mm_or_si128(Peq_SSE[(uint8_t)'T'], Peq_SSE[(uint8_t)'C']);

	Word_32 Mask = ((Word_32)1 << (errthold << 1));

	__m128i Mask1 = _mm_set_epi32(0, 0, 0, Mask);
	__m128i Mask2 = _mm_set_epi32(0, 0, Mask, 0);
	__m128i Mask3 = _mm_set_epi32(0, Mask, 0, 0);
	__m128i Mask4 = _mm_set_epi32(Mask, 0, 0, 0);


	__m128i VP = _mm_setzero_si128();
	__m128i VN = _mm_setzero_si128();
	__m128i X = _mm_setzero_si128();
	__m128i D0 = _mm_setzero_si128();
	__m128i HN = _mm_setzero_si128();
	__m128i HP = _mm_setzero_si128();
	__m128i tmp_process;
	__m128i tmp_process1;



	__m128i Err_4 = _mm_setzero_si128();
	__m128i err_mask = _mm_set_epi32(1, 1, 1, 1);
	///for_not li quan shi 1
	__m128i for_not = _mm_set1_epi32(-1);
	__m128i err_arry;
	__m128i cmp_result;


	int i_bd = (errthold << 1);
	int last_high = (errthold << 1);
	int t_length_1 = t_length - 1;
	int err1;
	int err2;
	int err3;
	int err4;

	__m128i pre_end = _mm_set_epi32
		(last_high + errthold, last_high + errthold, last_high + errthold, last_high + errthold);
	i = 0;

	while (i<t_length_1)
	{
		///X = Peq[text[i]] | VN;
		X = _mm_or_si128(Peq_SSE[(uint8_t)text[i]], VN);



		/*************D0 = ((VP + (X&VP)) ^ VP) | X*********************/
		///X&VP
		tmp_process1 = _mm_and_si128(X, VP);
		///(VP + (X&VP))
		tmp_process = _mm_add_epi32(tmp_process1, VP);
		///((VP + (X&VP)) ^ VP)
		tmp_process = _mm_xor_si128(tmp_process, VP);
		///((VP + (X&VP)) ^ VP) | X
		D0 = _mm_or_si128(tmp_process, X);
		/*************D0 = ((VP + (X&VP)) ^ VP) | X*********************/

		///HN = VP&D0;
		HN = _mm_and_si128(D0, VP);

		///HP = VN | ~(VP | D0);
		tmp_process = _mm_or_si128(D0, VP);
		tmp_process = _mm_andnot_si128(tmp_process, for_not);
		HP = _mm_or_si128(tmp_process, VN);

		///X = D0 >> 1;
		X = _mm_srli_epi32(D0, 1);
		///VN = X&HP;
		VN = _mm_and_si128(X, HP);
		///VP = HN | ~(X | HP);
		tmp_process = _mm_or_si128(X, HP);
		tmp_process = _mm_andnot_si128(tmp_process, for_not);
		VP = _mm_or_si128(HN, tmp_process);

		///D0&err_mask
		err_arry = _mm_and_si128(D0, err_mask);
		Err_4 = _mm_add_epi32(Err_4, err_mask);
		Err_4 = _mm_sub_epi32(Err_4, err_arry);

		/**************** */
		///shi ji shang zhe ge zhi hen xiao d
		cmp_result = _mm_cmpgt_epi32(Err_4, pre_end);

		///jian zhi
		if (_mm_extract_epi32(cmp_result, 0) && _mm_extract_epi32(cmp_result, 1)
			&& _mm_extract_epi32(cmp_result, 2) && _mm_extract_epi32(cmp_result, 3))
			return 1;
		/**************** */


		Peq_SSE[(uint8_t)'A'] = _mm_srli_epi32(Peq_SSE[(uint8_t)'A'], 1);
		Peq_SSE[(uint8_t)'T'] = _mm_srli_epi32(Peq_SSE[(uint8_t)'T'], 1);
		Peq_SSE[(uint8_t)'G'] = _mm_srli_epi32(Peq_SSE[(uint8_t)'G'], 1);
		Peq_SSE[(uint8_t)'C'] = _mm_srli_epi32(Peq_SSE[(uint8_t)'C'], 1);

		++i;
		++i_bd;

		Peq_SSE[(uint8_t)pattern1[i_bd]] = _mm_or_si128(Mask1, Peq_SSE[(uint8_t)pattern1[i_bd]]);
		Peq_SSE[(uint8_t)pattern2[i_bd]] = _mm_or_si128(Mask2, Peq_SSE[(uint8_t)pattern2[i_bd]]);
		Peq_SSE[(uint8_t)pattern3[i_bd]] = _mm_or_si128(Mask3, Peq_SSE[(uint8_t)pattern3[i_bd]]);
		Peq_SSE[(uint8_t)pattern4[i_bd]] = _mm_or_si128(Mask4, Peq_SSE[(uint8_t)pattern4[i_bd]]);
		///Peq_SSE[(uint8_t)'T'] = _mm_or_si128(Peq_SSE[(uint8_t)'T'], Peq_SSE[(uint8_t)'C']);
	}



		///X = Peq[text[i]] | VN;
	X = _mm_or_si128(Peq_SSE[(uint8_t)text[i]], VN);

	/*************D0 = ((VP + (X&VP)) ^ VP) | X*********************/
	///X&VP
	tmp_process1 = _mm_and_si128(X, VP);
	///(VP + (X&VP))
	tmp_process = _mm_add_epi32(tmp_process1, VP);
	///((VP + (X&VP)) ^ VP)
	tmp_process = _mm_xor_si128(tmp_process, VP);
	///((VP + (X&VP)) ^ VP) | X
	D0 = _mm_or_si128(tmp_process, X);
	/*************D0 = ((VP + (X&VP)) ^ VP) | X*********************/

	///HN = VP&D0;
	HN = _mm_and_si128(D0, VP);

	///HP = VN | ~(VP | D0);
	tmp_process = _mm_or_si128(D0, VP);
	tmp_process = _mm_andnot_si128(tmp_process, for_not);
	HP = _mm_or_si128(tmp_process, VN);


	///X = D0 >> 1;
	X = _mm_srli_epi32(D0, 1);
	///VN = X&HP;
	VN = _mm_and_si128(X, HP);
	///VP = HN | ~(X | HP);
	tmp_process = _mm_or_si128(X, HP);
	tmp_process = _mm_andnot_si128(tmp_process, for_not);
	VP = _mm_or_si128(HN, tmp_process);

	///D0&err_mask
	err_arry = _mm_and_si128(D0, err_mask);
	Err_4 = _mm_add_epi32(Err_4, err_mask);
	Err_4 = _mm_sub_epi32(Err_4, err_arry);

	///shi ji shang zhe ge zhi hen xiao d
	cmp_result = _mm_cmpgt_epi32(Err_4, pre_end);

	///jian zhi
	if (_mm_extract_epi32(cmp_result, 0) && _mm_extract_epi32(cmp_result, 1)
		&& _mm_extract_epi32(cmp_result, 2) && _mm_extract_epi32(cmp_result, 3))
		return 1;

	int site = t_length - 1;
	err1 = _mm_extract_epi32(Err_4, 0);
	err2 = _mm_extract_epi32(Err_4, 1);
	err3 = _mm_extract_epi32(Err_4, 2);
	err4 = _mm_extract_epi32(Err_4, 3);


	if ((err1 <= (int)errthold) && ((unsigned int)err1 <= return_sites_error[0]))
	{
		return_sites[0] = site;
		return_sites_error[0] = err1;
	}
	if ((err2 <= (int)errthold) && ((unsigned int)err2 <= return_sites_error[1]))
	{
		return_sites[1] = site;
		return_sites_error[1] = err2;
	}
	if ((err3 <= (int)errthold) && ((unsigned int)err3 <= return_sites_error[2]))
	{
		return_sites[2] = site;
		return_sites_error[2] = err3;
	}
	if ((err4 <= (int)errthold) && ((unsigned int)err4 <= return_sites_error[3]))
	{
		return_sites[3] = site;
		return_sites_error[3] = err4;
	}


	i = 0;

	/****************************may have bugs********************************/
	unsigned int ungap_error1 = (unsigned int)-1;
	unsigned int ungap_error2 = (unsigned int)-1;
	unsigned int ungap_error3 = (unsigned int)-1;
	unsigned int ungap_error4 = (unsigned int)-1;
	/****************************may have bugs********************************/


	///in most cases, p_length should be t_length + 2 * errthold
	int available_i = p_length - t_length;

	while (i < available_i)
	{
		///err = err + ((VP >> i)&(Word_32)1);
		tmp_process = _mm_srli_epi32(VP, i);
		tmp_process = _mm_and_si128(tmp_process, err_mask);
		Err_4 = _mm_add_epi32(Err_4, tmp_process);

		///err = err - ((VN >> i)&(Word_32)1);
		tmp_process1 = _mm_srli_epi32(VN, i);
		tmp_process1 = _mm_and_si128(tmp_process1, err_mask);
		Err_4 = _mm_sub_epi32(Err_4, tmp_process1);
		++i;

		err1 = _mm_extract_epi32(Err_4, 0);
		err2 = _mm_extract_epi32(Err_4, 1);
		err3 = _mm_extract_epi32(Err_4, 2);
		err4 = _mm_extract_epi32(Err_4, 3);


		if ((err1 <= (int)errthold) && ((unsigned int)err1 <= return_sites_error[0]))
		{
			return_sites[0] = site + i;
			return_sites_error[0] = err1;
		}
		if ((err2 <= (int)errthold) && ((unsigned int)err2 <= return_sites_error[1]))
		{
			return_sites[1] = site + i;
			return_sites_error[1] = err2;
		}
		if ((err3 <= (int)errthold) && ((unsigned int)err3 <= return_sites_error[2]))
		{
			return_sites[2] = site + i;
			return_sites_error[2] = err3;
		}
		if ((err4 <= (int)errthold) && ((unsigned int)err4 <= return_sites_error[3]))
		{
			return_sites[3] = site + i;
			return_sites_error[3] = err4;
		}

		/****************************may have bugs********************************/
		if(i == (int)errthold)
		{
			ungap_error1 = err1;
			ungap_error2 = err2;
			ungap_error3 = err3;
			ungap_error4 = err4;
		}
		/****************************may have bugs********************************/
	}

	/****************************may have bugs********************************/
	if((ungap_error1<=errthold) && (ungap_error1 == return_sites_error[0]))
	{
		return_sites[0] = site + errthold;
	}

	if((ungap_error2<=errthold) && (ungap_error2 == return_sites_error[1]))
	{
		return_sites[1] = site + errthold;
	}

	if((ungap_error3<=errthold) && (ungap_error3 == return_sites_error[2]))
	{
		return_sites[2] = site + errthold;
	}

	if((ungap_error4<=errthold) && (ungap_error4 == return_sites_error[3]))
	{
		return_sites[3] = site + errthold;
	}
	/****************************may have bugs********************************/

	return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf98, %rsp            # imm = 0xF98
movq %rcx, %rax
movq 0xff0(%rsp), %r15
movzwl 0xfe8(%rsp), %ecx
movq 0xfe0(%rsp), %r11
movq 0xfd8(%rsp), %r10
movl 0xfd0(%rsp), %r14d
pcmpeqd %xmm0, %xmm0
movdqu %xmm0, (%r10)
movdqu %xmm0, (%r11)
movzwl %cx, %ebx
leal (%rbx,%rbx), %ecx
pxor %xmm0, %xmm0
movdqa %xmm0, 0x3a0(%rsp)
movdqa %xmm0, 0x3c0(%rsp)
movdqa %xmm0, 0x400(%rsp)
movdqa %xmm0, 0x4d0(%rsp)
leaq 0x1(%rcx), %r12
movl $0x1, %ebp
xorl %r13d, %r13d
movzbl (%rdi,%r13), %r10d
shll $0x4, %r10d
orl %ebp, -0x70(%rsp,%r10)
movzbl (%rsi,%r13), %r10d
shll $0x4, %r10d
orl %ebp, -0x6c(%rsp,%r10)
movzbl (%rdx,%r13), %r10d
shll $0x4, %r10d
orl %ebp, -0x68(%rsp,%r10)
movzbl (%rax,%r13), %r10d
shll $0x4, %r10d
orl %ebp, -0x64(%rsp,%r10)
addl %ebp, %ebp
incq %r13
cmpq %r13, %r12
jne 0x85ac7
movss 0x3a4(%rsp), %xmm0
unpcklpd 0x3a0(%rsp), %xmm0      # xmm0 = xmm0[0],mem[0]
movss 0x3a8(%rsp), %xmm1
movss 0x3ac(%rsp), %xmm2
movlhps %xmm1, %xmm2            # xmm2 = xmm2[0],xmm1[0]
shufps $0x22, %xmm2, %xmm0     # xmm0 = xmm0[2,0],xmm2[2,0]
movaps %xmm0, 0x410(%r15)
movss 0x3c4(%rsp), %xmm0
unpcklpd 0x3c0(%rsp), %xmm0      # xmm0 = xmm0[0],mem[0]
movss 0x3c8(%rsp), %xmm1
movss 0x3cc(%rsp), %xmm2
movlhps %xmm1, %xmm2            # xmm2 = xmm2[0],xmm1[0]
shufps $0x22, %xmm2, %xmm0     # xmm0 = xmm0[2,0],xmm2[2,0]
movaps %xmm0, 0x430(%r15)
movss 0x404(%rsp), %xmm0
unpcklpd 0x400(%rsp), %xmm0      # xmm0 = xmm0[0],mem[0]
movss 0x408(%rsp), %xmm1
movss 0x40c(%rsp), %xmm2
movlhps %xmm1, %xmm2            # xmm2 = xmm2[0],xmm1[0]
shufps $0x22, %xmm2, %xmm0     # xmm0 = xmm0[2,0],xmm2[2,0]
movaps %xmm0, 0x470(%r15)
movss 0x4d4(%rsp), %xmm0
unpcklpd 0x4d0(%rsp), %xmm0      # xmm0 = xmm0[0],mem[0]
movss 0x4d8(%rsp), %xmm1
movss 0x4dc(%rsp), %xmm2
movlhps %xmm1, %xmm2            # xmm2 = xmm2[0],xmm1[0]
shufps $0x22, %xmm2, %xmm0     # xmm0 = xmm0[2,0],xmm2[2,0]
movaps %xmm0, 0x540(%r15)
movl $0x1, %ebp
shll %cl, %ebp
leal -0x1(%r14), %r10d
leal (%rbx,%rbx,2), %ecx
movd %ecx, %xmm0
pshufd $0x0, %xmm0, %xmm3      # xmm3 = xmm0[0,0,0,0]
cmpl $0x2, %r14d
movq %r10, -0x78(%rsp)
jl 0x85ddb
movd %ebp, %xmm4
pshufd $0x51, %xmm4, %xmm5     # xmm5 = xmm4[1,0,1,1]
pshufd $0x45, %xmm4, %xmm6     # xmm6 = xmm4[1,1,0,1]
movdqa %xmm4, %xmm7
pslldq $0xc, %xmm7             # xmm7 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm7[0,1,2,3]
movl %r10d, %r12d
leaq 0x1(%rax,%rbx,2), %rax
leaq 0x1(%rdx,%rbx,2), %rdx
leaq 0x1(%rsi,%rbx,2), %rsi
leaq (%rdi,%rbx,2), %rdi
incq %rdi
pxor %xmm0, %xmm0
xorps %xmm1, %xmm1
xorl %r13d, %r13d
movdqa 0x19f812(%rip), %xmm8   # 0x225450
pcmpeqd %xmm9, %xmm9
xorps %xmm2, %xmm2
movzbl (%r9,%r13), %ecx
shll $0x4, %ecx
movaps (%r15,%rcx), %xmm11
orps %xmm2, %xmm11
movaps %xmm11, %xmm10
andps %xmm1, %xmm10
paddd %xmm1, %xmm10
pxor %xmm1, %xmm10
por %xmm11, %xmm10
movdqa %xmm10, %xmm11
pand %xmm8, %xmm11
psubd %xmm11, %xmm0
psubd %xmm9, %xmm0
movdqa %xmm0, %xmm11
pcmpgtd %xmm3, %xmm11
pshufd $0xff, %xmm11, %xmm12   # xmm12 = xmm11[3,3,3,3]
movd %xmm12, %ecx
testl %ecx, %ecx
je 0x85cc3
pshufd $0xee, %xmm11, %xmm12   # xmm12 = xmm11[2,3,2,3]
movd %xmm12, %ecx
testl %ecx, %ecx
je 0x85cc3
pshufd $0x55, %xmm11, %xmm12   # xmm12 = xmm11[1,1,1,1]
pand %xmm11, %xmm12
movd %xmm12, %ecx
testb $0x1, %cl
jne 0x86066
movdqa %xmm10, %xmm11
pand %xmm1, %xmm11
por %xmm10, %xmm1
pxor %xmm9, %xmm1
movaps %xmm2, %xmm12
orps %xmm1, %xmm12
psrld $0x1, %xmm10
movaps %xmm12, %xmm1
orps %xmm10, %xmm1
xorps %xmm9, %xmm1
orps %xmm11, %xmm1
movaps %xmm10, %xmm2
andps %xmm12, %xmm2
movdqa 0x410(%r15), %xmm10
movdqa 0x430(%r15), %xmm11
movdqa 0x470(%r15), %xmm12
movdqa 0x540(%r15), %xmm13
psrld $0x1, %xmm10
movdqa %xmm10, 0x410(%r15)
psrld $0x1, %xmm13
movdqa %xmm13, 0x540(%r15)
psrld $0x1, %xmm12
movdqa %xmm12, 0x470(%r15)
psrld $0x1, %xmm11
movdqa %xmm11, 0x430(%r15)
movzbl (%rdi,%r13), %ecx
shll $0x4, %ecx
movdqa (%r15,%rcx), %xmm10
por %xmm4, %xmm10
movdqa %xmm10, (%r15,%rcx)
movzbl (%rsi,%r13), %ecx
shll $0x4, %ecx
movdqa (%r15,%rcx), %xmm10
por %xmm5, %xmm10
movdqa %xmm10, (%r15,%rcx)
movzbl (%rdx,%r13), %ecx
shll $0x4, %ecx
movdqa (%r15,%rcx), %xmm10
por %xmm6, %xmm10
movdqa %xmm10, (%r15,%rcx)
movzbl (%rax,%r13), %ecx
leaq 0x1(%r13), %r10
shll $0x4, %ecx
movdqa (%r15,%rcx), %xmm10
por %xmm7, %xmm10
movdqa %xmm10, (%r15,%rcx)
movq %r10, %r13
cmpq %r10, %r12
jne 0x85c46
pcmpeqd %xmm4, %xmm4
psubd %xmm4, %xmm0
jmp 0x85dec
xorps %xmm2, %xmm2
movdqa 0x19f66a(%rip), %xmm0   # 0x225450
xorl %r12d, %r12d
xorps %xmm1, %xmm1
movzbl (%r9,%r12), %eax
shll $0x4, %eax
movaps (%r15,%rax), %xmm4
orps %xmm2, %xmm4
movaps %xmm4, %xmm5
andps %xmm1, %xmm5
paddd %xmm1, %xmm5
pxor %xmm1, %xmm5
por %xmm4, %xmm5
movdqa 0x19f63a(%rip), %xmm4   # 0x225450
pand %xmm5, %xmm4
psubd %xmm4, %xmm0
movdqa %xmm0, %xmm4
pcmpgtd %xmm3, %xmm4
pshufd $0xff, %xmm4, %xmm3     # xmm3 = xmm4[3,3,3,3]
movd %xmm3, %eax
testl %eax, %eax
je 0x85e55
pshufd $0xee, %xmm4, %xmm3     # xmm3 = xmm4[2,3,2,3]
movd %xmm3, %eax
testl %eax, %eax
je 0x85e55
pshufd $0x55, %xmm4, %xmm3     # xmm3 = xmm4[1,1,1,1]
pand %xmm4, %xmm3
movd %xmm3, %eax
testb $0x1, %al
jne 0x86066
movd %xmm0, %ecx
pshufd $0x55, %xmm0, %xmm3     # xmm3 = xmm0[1,1,1,1]
movd %xmm3, %eax
pshufd $0xee, %xmm0, %xmm3     # xmm3 = xmm0[2,3,2,3]
cmpl %ebx, %ecx
movq 0xfd8(%rsp), %r10
movq -0x78(%rsp), %rdx
jg 0x85e83
cmpl (%r11), %ecx
ja 0x85e83
movl %edx, (%r10)
movl %ecx, (%r11)
pshufd $0xff, %xmm0, %xmm4     # xmm4 = xmm0[3,3,3,3]
movd %xmm3, %ecx
cmpl %ebx, %eax
jg 0x85e9e
cmpl 0x4(%r11), %eax
ja 0x85e9e
movl %edx, 0x4(%r10)
movl %eax, 0x4(%r11)
movd %xmm4, %eax
cmpl %ebx, %ecx
jg 0x85eb4
cmpl 0x8(%r11), %ecx
ja 0x85eb4
movl %edx, 0x8(%r10)
movl %ecx, 0x8(%r11)
cmpl %ebx, %eax
jg 0x85ec6
cmpl 0xc(%r11), %eax
ja 0x85ec6
movl %edx, 0xc(%r10)
movl %eax, 0xc(%r11)
subl %r14d, %r8d
jle 0x85ff9
movdqa %xmm5, %xmm3
por %xmm1, %xmm3
pcmpeqd %xmm6, %xmm6
pxor %xmm6, %xmm3
orps %xmm3, %xmm2
movdqa %xmm5, %xmm3
psrld $0x1, %xmm3
movaps %xmm2, %xmm4
orps %xmm3, %xmm4
pand %xmm1, %xmm5
xorps %xmm6, %xmm4
orps %xmm5, %xmm4
andps %xmm2, %xmm3
leal -0x1(%rbx), %r9d
xorl %r15d, %r15d
movl $0xffffffff, -0x7c(%rsp) # imm = 0xFFFFFFFF
movdqa 0x19f53b(%rip), %xmm1   # 0x225450
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
movd %r15d, %xmm2
movaps %xmm4, %xmm5
psrld %xmm2, %xmm5
pand %xmm1, %xmm5
paddd %xmm5, %xmm0
movaps %xmm3, %xmm5
psrld %xmm2, %xmm5
pand %xmm1, %xmm5
psubd %xmm5, %xmm0
movd %xmm0, %ebp
cmpl %ebx, %ebp
jg 0x85f5e
cmpl (%r11), %ebp
ja 0x85f5e
leal (%r14,%r15), %eax
movl %eax, (%r10)
movl %ebp, (%r11)
pshufd $0x55, %xmm0, %xmm2     # xmm2 = xmm0[1,1,1,1]
movd %xmm2, %r12d
cmpl %ebx, %r12d
jg 0x85f7f
cmpl 0x4(%r11), %r12d
ja 0x85f7f
leal (%r14,%r15), %eax
movl %eax, 0x4(%r10)
movl %r12d, 0x4(%r11)
pshufd $0xee, %xmm0, %xmm2     # xmm2 = xmm0[2,3,2,3]
movd %xmm2, %r13d
cmpl %ebx, %r13d
jg 0x85fa0
cmpl 0x8(%r11), %r13d
ja 0x85fa0
leal (%r14,%r15), %eax
movl %eax, 0x8(%r10)
movl %r13d, 0x8(%r11)
pshufd $0xff, %xmm0, %xmm2     # xmm2 = xmm0[3,3,3,3]
movd %xmm2, %eax
cmpl %ebx, %eax
jg 0x85fda
cmpl 0xc(%r11), %eax
ja 0x85fda
leal (%r14,%r15), %r10d
movq %r11, %rcx
movq %r14, %r11
movq 0xfd8(%rsp), %r14
movl %r10d, 0xc(%r14)
movq %r11, %r14
movq %rcx, %r11
movq 0xfd8(%rsp), %r10
movl %eax, 0xc(%rcx)
cmpl %r15d, %r9d
jne 0x85feb
movl %ebp, %edi
movl %r12d, %esi
movl %r13d, %edx
movl %eax, -0x7c(%rsp)
incl %r15d
cmpl %r15d, %r8d
jne 0x85f24
jmp 0x86010
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0xffffffff, -0x7c(%rsp) # imm = 0xFFFFFFFF
cmpl %ebx, %edi
movq -0x78(%rsp), %rcx
ja 0x86024
cmpl (%r11), %edi
jne 0x86024
leal (%rcx,%rbx), %eax
movl %eax, (%r10)
cmpl %ebx, %esi
ja 0x86035
cmpl 0x4(%r11), %esi
jne 0x86035
leal (%rcx,%rbx), %eax
movl %eax, 0x4(%r10)
cmpl %ebx, %edx
ja 0x86046
cmpl 0x8(%r11), %edx
jne 0x86046
leal (%rcx,%rbx), %eax
movl %eax, 0x8(%r10)
movl -0x7c(%rsp), %eax
cmpl %ebx, %eax
ja 0x86066
cmpl 0xc(%r11), %eax
jne 0x86066
movq -0x78(%rsp), %rcx
addl %ebx, %ecx
movq 0xfd8(%rsp), %rax
movl %ecx, 0xc(%rax)
movl $0x1, %eax
addq $0xf98, %rsp            # imm = 0xF98
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq