// File: /workspace/github_cpp_makefile_star2_O2/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
movq 0xfe0(%rsp), %rbx
movq 0xfd8(%rsp), %rcx
movl 0xfd0(%rsp), %r14d
movzwl 0xfe8(%rsp), %r11d
pcmpeqd %xmm0, %xmm0
movdqu %xmm0, (%rcx)
movdqu %xmm0, (%rbx)
leal (%r11,%r11), %ecx
pxor %xmm0, %xmm0
movdqa %xmm0, 0x3a0(%rsp)
movdqa %xmm0, 0x3c0(%rsp)
movdqa %xmm0, 0x400(%rsp)
movdqa %xmm0, 0x4d0(%rsp)
leaq 0x1(%rcx), %rbp
movl $0x1, %r12d
xorl %r13d, %r13d
cmpq %r13, %rbp
je 0x51a41
movzbl (%rdi,%r13), %r10d
shll $0x4, %r10d
orl %r12d, -0x70(%rsp,%r10)
movzbl (%rsi,%r13), %r10d
shll $0x4, %r10d
orl %r12d, -0x6c(%rsp,%r10)
movzbl (%rdx,%r13), %r10d
shll $0x4, %r10d
orl %r12d, -0x68(%rsp,%r10)
movzbl (%rax,%r13), %r10d
shll $0x4, %r10d
orl %r12d, -0x64(%rsp,%r10)
addl %r12d, %r12d
incq %r13
jmp 0x519fc
movups 0x3a8(%rsp), %xmm0
movaps 0x3a0(%rsp), %xmm1
movss 0x3a4(%rsp), %xmm2
unpcklps %xmm2, %xmm1            # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
movlhps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0]
movaps %xmm1, 0x410(%r15)
movups 0x3c8(%rsp), %xmm0
movaps 0x3c0(%rsp), %xmm1
movss 0x3c4(%rsp), %xmm2
unpcklps %xmm2, %xmm1            # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
movlhps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0]
movaps %xmm1, 0x430(%r15)
movups 0x408(%rsp), %xmm0
movaps 0x400(%rsp), %xmm1
movss 0x404(%rsp), %xmm2
unpcklps %xmm2, %xmm1            # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
movlhps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0]
movaps %xmm1, 0x470(%r15)
movdqu 0x4d8(%rsp), %xmm0
movdqa 0x4d0(%rsp), %xmm1
movd 0x4d4(%rsp), %xmm2
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
punpcklqdq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0]
movl $0x1, %r10d
shll %cl, %r10d
movdqa %xmm1, 0x540(%r15)
movd %r10d, %xmm3
pshufd $0x51, %xmm3, %xmm6     # xmm6 = xmm3[1,0,1,1]
pshufd $0x45, %xmm3, %xmm7     # xmm7 = xmm3[1,1,0,1]
movdqa %xmm3, %xmm8
pslldq $0xc, %xmm8             # xmm8 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm8[0,1,2,3]
leal -0x1(%r14), %ecx
leal (%r11,%r11,2), %r10d
movd %r10d, %xmm0
pshufd $0x0, %xmm0, %xmm5      # xmm5 = xmm0[0,0,0,0]
xorl %r13d, %r13d
testl %ecx, %ecx
movl $0x0, %r12d
cmovgl %ecx, %r12d
addq %rbp, %rax
addq %rbp, %rdx
addq %rbp, %rsi
addq %rbp, %rdi
pxor %xmm0, %xmm0
pxor %xmm1, %xmm1
movdqa 0x19193e(%rip), %xmm2   # 0x1e3480
pcmpeqd %xmm9, %xmm9
pxor %xmm4, %xmm4
cmpq %r13, %r12
je 0x51cb3
movzbl (%r9,%r13), %r10d
shll $0x4, %r10d
movdqa (%r15,%r10), %xmm11
por %xmm0, %xmm11
movdqa %xmm11, %xmm10
pand %xmm4, %xmm10
paddd %xmm4, %xmm10
pxor %xmm4, %xmm10
por %xmm11, %xmm10
movdqa %xmm10, %xmm11
pand %xmm2, %xmm11
psubd %xmm11, %xmm1
psubd %xmm9, %xmm1
movdqa %xmm1, %xmm11
pcmpgtd %xmm5, %xmm11
movmskps %xmm11, %r10d
cmpl $0xf, %r10d
je 0x51f19
movdqa %xmm10, %xmm11
pand %xmm4, %xmm11
por %xmm10, %xmm4
pxor %xmm9, %xmm4
por %xmm4, %xmm0
psrld $0x1, %xmm10
movdqa %xmm0, %xmm4
por %xmm10, %xmm4
pxor %xmm9, %xmm4
por %xmm11, %xmm4
pand %xmm10, %xmm0
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), %r10d
shll $0x4, %r10d
movdqa (%r15,%r10), %xmm10
por %xmm3, %xmm10
movdqa %xmm10, (%r15,%r10)
movzbl (%rsi,%r13), %r10d
shll $0x4, %r10d
movdqa (%r15,%r10), %xmm10
por %xmm6, %xmm10
movdqa %xmm10, (%r15,%r10)
movzbl (%rdx,%r13), %r10d
shll $0x4, %r10d
movdqa (%r15,%r10), %xmm10
por %xmm7, %xmm10
movdqa %xmm10, (%r15,%r10)
movzbl (%rax,%r13), %r10d
incq %r13
shll $0x4, %r10d
movdqa (%r15,%r10), %xmm10
por %xmm8, %xmm10
movdqa %xmm10, (%r15,%r10)
jmp 0x51b4b
movzbl (%r9,%r12), %eax
shll $0x4, %eax
movdqa (%r15,%rax), %xmm6
por %xmm0, %xmm6
movdqa %xmm6, %xmm3
pand %xmm4, %xmm3
paddd %xmm4, %xmm3
pxor %xmm4, %xmm3
por %xmm6, %xmm3
pcmpeqd %xmm6, %xmm6
movdqa 0x19179b(%rip), %xmm7   # 0x1e3480
pand %xmm3, %xmm7
psubd %xmm7, %xmm1
psubd %xmm6, %xmm1
movdqa %xmm1, %xmm7
pcmpgtd %xmm5, %xmm7
movmskps %xmm7, %eax
cmpl $0xf, %eax
je 0x51f19
movdqa %xmm3, %xmm5
por %xmm4, %xmm5
pxor %xmm6, %xmm5
movd %xmm1, %edx
pshufd $0x55, %xmm1, %xmm7     # xmm7 = xmm1[1,1,1,1]
movd %xmm7, %eax
pshufd $0xee, %xmm1, %xmm7     # xmm7 = xmm1[2,3,2,3]
cmpl %r11d, %edx
jg 0x51d38
cmpl (%rbx), %edx
ja 0x51d38
movq 0xfd8(%rsp), %rsi
movl %ecx, (%rsi)
movl %edx, (%rbx)
por %xmm5, %xmm0
movdqa %xmm3, %xmm5
psrld $0x1, %xmm5
pshufd $0xff, %xmm1, %xmm8     # xmm8 = xmm1[3,3,3,3]
movd %xmm7, %edx
cmpl %r11d, %eax
jg 0x51d67
cmpl 0x4(%rbx), %eax
ja 0x51d67
movq 0xfd8(%rsp), %rsi
movl %ecx, 0x4(%rsi)
movl %eax, 0x4(%rbx)
movdqa %xmm0, %xmm7
por %xmm5, %xmm7
movd %xmm8, %eax
cmpl %r11d, %edx
jg 0x51d8c
cmpl 0x8(%rbx), %edx
ja 0x51d8c
movq 0xfd8(%rsp), %rsi
movl %ecx, 0x8(%rsi)
movl %edx, 0x8(%rbx)
pand %xmm4, %xmm3
pxor %xmm6, %xmm7
cmpl %r11d, %eax
jg 0x51dac
cmpl 0xc(%rbx), %eax
ja 0x51dac
movq 0xfd8(%rsp), %rdx
movl %ecx, 0xc(%rdx)
movl %eax, 0xc(%rbx)
pand %xmm5, %xmm0
por %xmm7, %xmm3
subl %r14d, %r8d
xorl %edi, %edi
testl %r8d, %r8d
cmovlel %edi, %r8d
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %r15d
movl %ebp, %r12d
movl %ebp, %r13d
movl %r13d, -0x74(%rsp)
movl %r12d, %edx
movl %r15d, %esi
movl %ebp, %r9d
cmpl %edi, %r8d
je 0x51eb3
movd %edi, %xmm4
movdqa %xmm3, %xmm5
psrld %xmm4, %xmm5
pand %xmm2, %xmm5
paddd %xmm5, %xmm1
movdqa %xmm0, %xmm5
psrld %xmm4, %xmm5
pand %xmm2, %xmm5
psubd %xmm5, %xmm1
movd %xmm1, %ebp
cmpl %r11d, %ebp
jg 0x51e27
cmpl (%rbx), %ebp
ja 0x51e27
leal (%r14,%rdi), %r10d
movq 0xfd8(%rsp), %r15
movl %r10d, (%r15)
movl %ebp, (%rbx)
pshufd $0x55, %xmm1, %xmm4     # xmm4 = xmm1[1,1,1,1]
movd %xmm4, %r15d
cmpl %r11d, %r15d
jg 0x51e51
cmpl 0x4(%rbx), %r15d
ja 0x51e51
leal (%r14,%rdi), %r10d
movq 0xfd8(%rsp), %r12
movl %r10d, 0x4(%r12)
movl %r15d, 0x4(%rbx)
pshufd $0xee, %xmm1, %xmm4     # xmm4 = xmm1[2,3,2,3]
movd %xmm4, %r12d
cmpl %r11d, %r12d
jg 0x51e7a
cmpl 0x8(%rbx), %r12d
ja 0x51e7a
leal (%r14,%rdi), %r10d
movq 0xfd8(%rsp), %r13
movl %r10d, 0x8(%r13)
movl %r12d, 0x8(%rbx)
pshufd $0xff, %xmm1, %xmm4     # xmm4 = xmm1[3,3,3,3]
movd %xmm4, %r13d
cmpl %r11d, %r13d
jg 0x51ea3
cmpl 0xc(%rbx), %r13d
ja 0x51ea3
leal (%r14,%rdi), %r10d
movq 0xfd8(%rsp), %rax
movl %r10d, 0xc(%rax)
movl %r13d, 0xc(%rbx)
incl %edi
cmpl %edi, %r11d
jne 0x51ddc
jmp 0x51dce
cmpl %r11d, %r9d
ja 0x51ecb
cmpl (%rbx), %r9d
jne 0x51ecb
leal (%rcx,%r11), %edi
movq 0xfd8(%rsp), %rax
movl %edi, (%rax)
cmpl %r11d, %esi
movl -0x74(%rsp), %edi
ja 0x51ee8
cmpl 0x4(%rbx), %esi
jne 0x51ee8
leal (%rcx,%r11), %esi
movq 0xfd8(%rsp), %rax
movl %esi, 0x4(%rax)
cmpl %r11d, %edx
ja 0x51f01
cmpl 0x8(%rbx), %edx
jne 0x51f01
leal (%rcx,%r11), %edx
movq 0xfd8(%rsp), %rax
movl %edx, 0x8(%rax)
cmpl %r11d, %edi
ja 0x51f19
cmpl 0xc(%rbx), %edi
jne 0x51f19
addl %r11d, %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