// File: /workspace/github_c_makefile_star2_O3/mjosaarinen[P]brutus/crypto_aead/paeq128tnm/aesni/encrypt.cpp
// Function: GenerateNonceOpt(unsigned char*, unsigned char const*, unsigned long long, unsigned char const*, unsigned long long, unsigned char const*)
int GenerateNonceOpt(unsigned char* output, const unsigned char *m, unsigned long long mlen,
	const unsigned char *ad, unsigned long long adlen,
	const unsigned char *k)
	//Generate a nonce as a hash of the plaintext & AD by the AESQ-sponge function
{
	//Does not work for keys longer than 192 bits
	if (CRYPTO_KEYBYTES >24)
	{
		memset(output, 0, CRYPTO_NPUBBYTES);
		return -1;
	}

	__m128i State[4];  //sponge internal state
	__m128i StateOut[4];  //sponge internal state
	State[0] = State[1] = State[2] = State[3] = _mm_set_epi64x(0, 0);

	__m128i Injection[2]; //We inject into the first 32 bytes


	//Plaintext length -- 12 bytes and AD length - 12 bytes
	Injection[0] = _mm_set_epi64x(adlen << (CRYPTO_LENGTH*8-64), mlen);
	Injection[1] = _mm_set_epi64x(0, adlen >> (CRYPTO_LENGTH * 8 - 64));


	//Key and nonce length
	__m128i tmp = _mm_set_epi64x(CRYPTO_KEYBYTES + (CRYPTO_NPUBBYTES << 8), 0);
	Injection[1] = _mm_xor_si128(Injection[1], tmp);

	//Add key
	__m128i key = _mm_loadu_si128((__m128i*)k);
	Injection[1] = _mm_xor_si128(Injection[1], _mm_slli_si128(key, 2*CRYPTO_LENGTH+2-16)); //6 key bytes inserted

	//Iteration
	State[0] = _mm_xor_si128(State[0], Injection[0]);
	State[1] = _mm_xor_si128(State[1], Injection[1]);
	FPermAsm(State, StateOut);


	//Main loop
	unsigned state_index = 0;
	unsigned long long message_index = 0;
	unsigned long long ad_index = 0;
	unsigned char buf[32];

	//Remaining key bytes
	Injection[0] = _mm_srli_si128(key, CRYPTO_KEYBYTES - (2 * CRYPTO_LENGTH + 2 - 16));
	key = _mm_xor_si128(key, key);
	state_index = 2 * CRYPTO_LENGTH + 2 - 16;
	State[0] = _mm_xor_si128(StateOut[0], Injection[0]);
	State[1] = StateOut[1];
	State[2] = StateOut[2];
	State[3] = StateOut[3];

	//Injecting plaintext
	while (mlen >message_index) //we can load 32-byte chunks
	{
		if ((state_index == 0) && (mlen >= message_index + 32))
		{
			Injection[0] = _mm_loadu_si128((__m128i*)(m + message_index));
			Injection[1] = _mm_loadu_si128((__m128i*)(m + message_index+16));
			state_index = 32;
			message_index += 32;
		}
		else
		{
			memset(buf, 0, 32);
			if ((32 - state_index) <= (mlen - message_index))
			{
				memcpy(buf + state_index, m + message_index, 32 - state_index);
				message_index += 32-state_index;
				state_index = 32;

			}
			else
			{
				memcpy(buf + state_index, m + message_index, mlen - message_index);
				state_index += mlen - message_index;
				message_index = mlen;
			}
			Injection[0] = _mm_loadu_si128((__m128i*)buf);
			Injection[1] = _mm_loadu_si128((__m128i*)(buf + 16));
		}
		State[0] = _mm_xor_si128(State[0], Injection[0]);
		State[1] = _mm_xor_si128(State[1], Injection[1]);
		if (state_index == 32)
		{
			FPermAsm(State, StateOut);
			State[0] = StateOut[0];
			State[1] = StateOut[1];
			State[2] = StateOut[2];
			State[3] = StateOut[3];
			state_index = 0;
		}
	}//end of plaintext loading

	//Injecting AD
	while (adlen >ad_index) //we can load 32-byte chunks
	{
		if ((state_index == 0) && (adlen >= ad_index + 32))
		{
			Injection[0] = _mm_loadu_si128((__m128i*)(ad + ad_index));
			Injection[1] = _mm_loadu_si128((__m128i*)(ad + ad_index + 16));
			state_index = 32;
			ad_index += 32;
		}
		else
		{
			memset(buf, 0, 32);
			if ((32 - state_index) <= (adlen - ad_index))
			{
				memcpy(buf + state_index, ad + ad_index, 32 - state_index);
				ad_index += 32 - state_index;
				state_index = 32;
			}
			else
			{
				memcpy(buf + state_index, ad + ad_index, adlen - ad_index);
				state_index += adlen - ad_index;
				ad_index = adlen;
			}
			Injection[0] = _mm_loadu_si128((__m128i*)buf);
			Injection[1] = _mm_loadu_si128((__m128i*)(buf + 16));
		}
		State[0] = _mm_xor_si128(State[0], Injection[0]);
		State[1] = _mm_xor_si128(State[1], Injection[1]);
		if (state_index == 32)
		{
			FPermAsm(State, StateOut);

			State[0] = StateOut[0];
			State[1] = StateOut[1];
			State[2] = StateOut[2];
			State[3] = StateOut[3];
			state_index = 0;
		}
	}//end of AD loading

	//Injecting padding
	if (state_index < 31)
	{
		memset(buf, 0, 32);
		buf[state_index] = 1;
		buf[31] = 1;
		Injection[0] = _mm_loadu_si128((__m128i*)(buf ));
		Injection[1] = _mm_loadu_si128((__m128i*)(buf + 16)); 
		State[0] = _mm_xor_si128(State[0], Injection[0]);
		State[1] = _mm_xor_si128(State[1], Injection[1]);
		FPermAsm(State, StateOut);

		State[0] = StateOut[0];
		State[1] = StateOut[1];
		State[2] = StateOut[2];
		State[3] = StateOut[3];
	}
	else
	{
		Injection[1] = _mm_set_epi32(1 << 31, 0, 0, 0);
		State[1] = _mm_xor_si128(State[1], Injection[1]);
		FPermAsm(State, StateOut);

		State[0] = StateOut[0];
		State[1] = StateOut[1];
		State[2] = StateOut[2];
		State[3] = StateOut[3];
		State[1] = _mm_xor_si128(State[1], Injection[1]);
		FPermAsm(State, StateOut);

		State[0] = StateOut[0];
		State[1] = StateOut[1];
		State[2] = StateOut[2];
		State[3] = StateOut[3];
	}
	memcpy(output, StateOut, 32);
	return 0;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %r8, %r14
movq %rcx, 0x68(%rsp)
movq %rdx, %r13
movq %rsi, 0x70(%rsp)
movq %rdi, 0x60(%rsp)
movq %r8, %rax
shlq $0x20, %rax
vmovq %rdx, %xmm4
vmovq %rax, %xmm5
movq %r8, %rax
shrq $0x20, %rax
vmovd %eax, %xmm1
vmovupd (%r9), %xmm0
vpslldq $0xa, %xmm0, %xmm11     # xmm11 = zero,zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0,1,2,3,4,5]
vpternlogq $0x96, 0x1238(%rip), %xmm1, %xmm11 # 0x41d0
vpbroadcastq 0x1177(%rip), %xmm1 # 0x4118
vpbroadcastq 0x1166(%rip), %xmm2 # 0x4110
vpbroadcastq 0x116d(%rip), %xmm3 # 0x4120
vpunpcklqdq %xmm5, %xmm4, %xmm4 # xmm4 = xmm4[0],xmm5[0]
vpxor %xmm10, %xmm10, %xmm10
vpbroadcastq 0x1163(%rip), %xmm5 # 0x4128
xorl %eax, %eax
vpxor %xmm9, %xmm9, %xmm9
vmovdqa %xmm2, %xmm6
movb $0x1, %cl
vaesenc %xmm5, %xmm4, %xmm4
vaesenc %xmm3, %xmm11, %xmm11
vaesenc %xmm1, %xmm9, %xmm9
vaesenc %xmm6, %xmm10, %xmm10
vpaddq %xmm2, %xmm5, %xmm5
vpaddq %xmm2, %xmm3, %xmm3
vpaddq %xmm2, %xmm1, %xmm1
vpaddq %xmm2, %xmm6, %xmm6
testb $0x1, %cl
movl $0x0, %ecx
jne 0x2fd2
vpunpckhdq %xmm4, %xmm11, %xmm7 # xmm7 = xmm11[2],xmm4[2],xmm11[3],xmm4[3]
vpunpckldq %xmm4, %xmm11, %xmm4 # xmm4 = xmm11[0],xmm4[0],xmm11[1],xmm4[1]
vpunpckhdq %xmm9, %xmm10, %xmm8 # xmm8 = xmm10[2],xmm9[2],xmm10[3],xmm9[3]
vpunpckldq %xmm9, %xmm10, %xmm9 # xmm9 = xmm10[0],xmm9[0],xmm10[1],xmm9[1]
vpunpckhdq %xmm4, %xmm9, %xmm10 # xmm10 = xmm9[2],xmm4[2],xmm9[3],xmm4[3]
vpunpckldq %xmm4, %xmm9, %xmm4 # xmm4 = xmm9[0],xmm4[0],xmm9[1],xmm4[1]
vpunpckldq %xmm8, %xmm7, %xmm9 # xmm9 = xmm7[0],xmm8[0],xmm7[1],xmm8[1]
vpunpckhdq %xmm8, %xmm7, %xmm11 # xmm11 = xmm7[2],xmm8[2],xmm7[3],xmm8[3]
incl %eax
cmpl $0xa, %eax
jne 0x2fd0
vpsrldq $0x6, %xmm0, %xmm0      # xmm0 = xmm0[6,7,8,9,10,11,12,13,14,15],zero,zero,zero,zero,zero,zero
vpxor %xmm0, %xmm4, %xmm8
movl $0xa, %r15d
testq %r13, %r13
je 0x31c0
xorl %ebx, %ebx
vpbroadcastq 0x10c2(%rip), %xmm12 # 0x4110
xorl %eax, %eax
testb $0x1, %al
je 0x3061
leaq 0x20(%rbx), %rax
cmpq %r13, %rax
jbe 0x3115
vmovdqa %xmm11, 0x40(%rsp)
vmovdqa %xmm8, 0x50(%rsp)
vmovdqa %xmm9, 0x20(%rsp)
vmovdqa %xmm10, 0x30(%rsp)
vxorpd %xmm0, %xmm0, %xmm0
vmovupd %ymm0, (%rsp)
movl $0x20, %ebp
subl %r15d, %ebp
movq %r13, %r12
subq %rbx, %r12
movq 0x70(%rsp), %rax
leaq (%rax,%rbx), %rsi
movl %r15d, %eax
leaq (%rsp,%rax), %rdi
cmpq %rbp, %r12
jae 0x30d9
movq %r12, %rdx
vzeroupper
callq 0x10a0
addl %r12d, %r15d
vmovdqa 0x50(%rsp), %xmm8
vpxor (%rsp), %xmm8, %xmm8
vmovdqa 0x40(%rsp), %xmm11
vpxor 0x10(%rsp), %xmm11, %xmm11
cmpl $0x20, %r15d
jne 0x31b4
movq %r13, %rbx
jmp 0x30fe
movq %rbp, %rdx
vzeroupper
callq 0x10a0
addq %rbp, %rbx
vmovdqa 0x50(%rsp), %xmm8
vpxor (%rsp), %xmm8, %xmm8
vmovdqa 0x40(%rsp), %xmm11
vpxor 0x10(%rsp), %xmm11, %xmm11
vmovdqa 0x30(%rsp), %xmm10
vmovdqa 0x20(%rsp), %xmm9
vpbroadcastq 0xffd(%rip), %xmm12 # 0x4110
jmp 0x3128
movq 0x70(%rsp), %rcx
vpxor (%rcx,%rbx), %xmm8, %xmm8
vpxor 0x10(%rcx,%rbx), %xmm11, %xmm11
movq %rax, %rbx
xorl %eax, %eax
vpbroadcastq 0xff5(%rip), %xmm0 # 0x4128
vpbroadcastq 0xfe4(%rip), %xmm1 # 0x4120
vmovdqa %xmm12, %xmm2
vpbroadcastq 0xfcf(%rip), %xmm3 # 0x4118
movb $0x1, %cl
vaesenc %xmm0, %xmm8, %xmm8
vaesenc %xmm1, %xmm11, %xmm11
vaesenc %xmm3, %xmm9, %xmm9
vaesenc %xmm2, %xmm10, %xmm10
vpaddq %xmm0, %xmm12, %xmm0
vpaddq %xmm1, %xmm12, %xmm1
vpaddq %xmm3, %xmm12, %xmm3
vpaddq %xmm2, %xmm12, %xmm2
testb $0x1, %cl
movl $0x0, %ecx
jne 0x314b
vpunpckhdq %xmm8, %xmm11, %xmm4 # xmm4 = xmm11[2],xmm8[2],xmm11[3],xmm8[3]
vpunpckldq %xmm8, %xmm11, %xmm5 # xmm5 = xmm11[0],xmm8[0],xmm11[1],xmm8[1]
vpunpckhdq %xmm9, %xmm10, %xmm6 # xmm6 = xmm10[2],xmm9[2],xmm10[3],xmm9[3]
vpunpckldq %xmm9, %xmm10, %xmm7 # xmm7 = xmm10[0],xmm9[0],xmm10[1],xmm9[1]
vpunpckhdq %xmm5, %xmm7, %xmm10 # xmm10 = xmm7[2],xmm5[2],xmm7[3],xmm5[3]
vpunpckldq %xmm5, %xmm7, %xmm8 # xmm8 = xmm7[0],xmm5[0],xmm7[1],xmm5[1]
vpunpckldq %xmm6, %xmm4, %xmm9 # xmm9 = xmm4[0],xmm6[0],xmm4[1],xmm6[1]
vpunpckhdq %xmm6, %xmm4, %xmm11 # xmm11 = xmm4[2],xmm6[2],xmm4[3],xmm6[3]
incl %eax
cmpl $0xa, %eax
jne 0x3149
xorl %r15d, %r15d
movb $0x1, %al
cmpq %r13, %rbx
jb 0x3050
jmp 0x31c0
vmovaps 0x30(%rsp), %xmm10
vmovaps 0x20(%rsp), %xmm9
testq %r14, %r14
je 0x334f
xorl %r13d, %r13d
vpbroadcastq 0xf3b(%rip), %xmm12 # 0x4110
testl %r15d, %r15d
jne 0x31e7
leaq 0x20(%r13), %rax
cmpq %r14, %rax
jbe 0x32b0
vmovdqa %xmm11, 0x40(%rsp)
vmovdqa %xmm8, 0x50(%rsp)
vmovdqa %xmm9, 0x20(%rsp)
vmovdqa %xmm10, 0x30(%rsp)
vxorpd %xmm0, %xmm0, %xmm0
vmovupd %ymm0, (%rsp)
movl $0x20, %r12d
subl %r15d, %r12d
movq %r14, %rbx
subq %r13, %rbx
movq 0x68(%rsp), %rax
leaq (%rax,%r13), %rsi
movl %r15d, %eax
leaq (%rsp,%rax), %rdi
cmpq %r12, %rbx
jae 0x3274
movq %rbx, %rdx
vzeroupper
callq 0x10a0
addl %ebx, %r15d
vmovdqa 0x50(%rsp), %xmm8
vpxor (%rsp), %xmm8, %xmm8
vmovdqa 0x40(%rsp), %xmm11
vpxor 0x10(%rsp), %xmm11, %xmm11
movq %r14, %r13
cmpl $0x20, %r15d
vmovdqa 0x30(%rsp), %xmm10
vmovdqa 0x20(%rsp), %xmm9
vpbroadcastq 0xea3(%rip), %xmm12 # 0x4110
je 0x32c5
jmp 0x334f
movq %r12, %rdx
vzeroupper
callq 0x10a0
addq %r12, %r13
vmovdqa 0x50(%rsp), %xmm8
vpxor (%rsp), %xmm8, %xmm8
vmovdqa 0x40(%rsp), %xmm11
vpxor 0x10(%rsp), %xmm11, %xmm11
vmovdqa 0x30(%rsp), %xmm10
vmovdqa 0x20(%rsp), %xmm9
vpbroadcastq 0xe62(%rip), %xmm12 # 0x4110
jmp 0x32c5
movq 0x68(%rsp), %rcx
vpxor (%rcx,%r13), %xmm8, %xmm8
vpxor 0x10(%rcx,%r13), %xmm11, %xmm11
movq %rax, %r13
xorl %eax, %eax
vpbroadcastq 0xe58(%rip), %xmm0 # 0x4128
vpbroadcastq 0xe47(%rip), %xmm1 # 0x4120
vmovdqa %xmm12, %xmm2
vpbroadcastq 0xe32(%rip), %xmm3 # 0x4118
movb $0x1, %cl
vaesenc %xmm0, %xmm8, %xmm8
vaesenc %xmm1, %xmm11, %xmm11
vaesenc %xmm3, %xmm9, %xmm9
vaesenc %xmm2, %xmm10, %xmm10
vpaddq %xmm0, %xmm12, %xmm0
vpaddq %xmm1, %xmm12, %xmm1
vpaddq %xmm3, %xmm12, %xmm3
vpaddq %xmm2, %xmm12, %xmm2
testb $0x1, %cl
movl $0x0, %ecx
jne 0x32e8
vpunpckhdq %xmm8, %xmm11, %xmm4 # xmm4 = xmm11[2],xmm8[2],xmm11[3],xmm8[3]
vpunpckldq %xmm8, %xmm11, %xmm5 # xmm5 = xmm11[0],xmm8[0],xmm11[1],xmm8[1]
vpunpckhdq %xmm9, %xmm10, %xmm6 # xmm6 = xmm10[2],xmm9[2],xmm10[3],xmm9[3]
vpunpckldq %xmm9, %xmm10, %xmm7 # xmm7 = xmm10[0],xmm9[0],xmm10[1],xmm9[1]
vpunpckhdq %xmm5, %xmm7, %xmm10 # xmm10 = xmm7[2],xmm5[2],xmm7[3],xmm5[3]
vpunpckldq %xmm5, %xmm7, %xmm8 # xmm8 = xmm7[0],xmm5[0],xmm7[1],xmm5[1]
vpunpckldq %xmm6, %xmm4, %xmm9 # xmm9 = xmm4[0],xmm6[0],xmm4[1],xmm6[1]
vpunpckhdq %xmm6, %xmm4, %xmm11 # xmm11 = xmm4[2],xmm6[2],xmm4[3],xmm6[3]
incl %eax
cmpl $0xa, %eax
jne 0x32e6
xorl %r15d, %r15d
cmpq %r14, %r13
jb 0x31d5
jmp 0x3359
cmpl $0x1e, %r15d
ja 0x3408
vxorpd %xmm0, %xmm0, %xmm0
vmovupd %ymm0, (%rsp)
movl %r15d, %eax
movb $0x1, %cl
movb %cl, (%rsp,%rax)
movb %cl, 0x1f(%rsp)
vpxor (%rsp), %xmm8, %xmm8
vpxor 0x10(%rsp), %xmm11, %xmm0
vpbroadcastq 0xd96(%rip), %xmm1 # 0x4118
vpbroadcastq 0xd85(%rip), %xmm2 # 0x4110
vpbroadcastq 0xd8c(%rip), %xmm3 # 0x4120
vpbroadcastq 0xd8b(%rip), %xmm4 # 0x4128
xorl %eax, %eax
vmovdqa %xmm2, %xmm5
movq 0x60(%rsp), %rdx
movb $0x1, %cl
vaesenc %xmm4, %xmm8, %xmm8
vaesenc %xmm3, %xmm0, %xmm0
vaesenc %xmm1, %xmm9, %xmm9
vaesenc %xmm5, %xmm10, %xmm10
vpaddq %xmm2, %xmm4, %xmm4
vpaddq %xmm2, %xmm3, %xmm3
vpaddq %xmm2, %xmm1, %xmm1
vpaddq %xmm2, %xmm5, %xmm5
testb $0x1, %cl
movl $0x0, %ecx
jne 0x33aa
vpunpckhdq %xmm8, %xmm0, %xmm6 # xmm6 = xmm0[2],xmm8[2],xmm0[3],xmm8[3]
vpunpckldq %xmm8, %xmm0, %xmm0 # xmm0 = xmm0[0],xmm8[0],xmm0[1],xmm8[1]
vpunpckhdq %xmm9, %xmm10, %xmm7 # xmm7 = xmm10[2],xmm9[2],xmm10[3],xmm9[3]
vpunpckldq %xmm9, %xmm10, %xmm8 # xmm8 = xmm10[0],xmm9[0],xmm10[1],xmm9[1]
vpunpckhdq %xmm0, %xmm8, %xmm10 # xmm10 = xmm8[2],xmm0[2],xmm8[3],xmm0[3]
vpunpckldq %xmm0, %xmm8, %xmm8 # xmm8 = xmm8[0],xmm0[0],xmm8[1],xmm0[1]
vpunpckldq %xmm7, %xmm6, %xmm9 # xmm9 = xmm6[0],xmm7[0],xmm6[1],xmm7[1]
vpunpckhdq %xmm7, %xmm6, %xmm0 # xmm0 = xmm6[2],xmm7[2],xmm6[3],xmm7[3]
incl %eax
cmpl $0xa, %eax
jne 0x33a8
jmp 0x3527
vpxor 0xdd0(%rip), %xmm11, %xmm4 # 0x41e0
vpbroadcastq 0xcff(%rip), %xmm0 # 0x4118
vpbroadcastq 0xcee(%rip), %xmm1 # 0x4110
vpbroadcastq 0xcf5(%rip), %xmm2 # 0x4120
vpbroadcastq 0xcf4(%rip), %xmm3 # 0x4128
xorl %eax, %eax
vmovdqa %xmm1, %xmm5
movq 0x60(%rsp), %rdx
movb $0x1, %cl
vaesenc %xmm3, %xmm8, %xmm8
vaesenc %xmm2, %xmm4, %xmm4
vaesenc %xmm0, %xmm9, %xmm9
vaesenc %xmm5, %xmm10, %xmm10
vpaddq %xmm1, %xmm3, %xmm3
vpaddq %xmm1, %xmm2, %xmm2
vpaddq %xmm1, %xmm0, %xmm0
vpaddq %xmm1, %xmm5, %xmm5
testb $0x1, %cl
movl $0x0, %ecx
jne 0x3441
vpunpckhdq %xmm8, %xmm4, %xmm6 # xmm6 = xmm4[2],xmm8[2],xmm4[3],xmm8[3]
vpunpckldq %xmm8, %xmm4, %xmm4 # xmm4 = xmm4[0],xmm8[0],xmm4[1],xmm8[1]
vpunpckhdq %xmm9, %xmm10, %xmm7 # xmm7 = xmm10[2],xmm9[2],xmm10[3],xmm9[3]
vpunpckldq %xmm9, %xmm10, %xmm8 # xmm8 = xmm10[0],xmm9[0],xmm10[1],xmm9[1]
vpunpckhdq %xmm4, %xmm8, %xmm10 # xmm10 = xmm8[2],xmm4[2],xmm8[3],xmm4[3]
vpunpckldq %xmm4, %xmm8, %xmm8 # xmm8 = xmm8[0],xmm4[0],xmm8[1],xmm4[1]
vpunpckldq %xmm7, %xmm6, %xmm9 # xmm9 = xmm6[0],xmm7[0],xmm6[1],xmm7[1]
vpunpckhdq %xmm7, %xmm6, %xmm4 # xmm4 = xmm6[2],xmm7[2],xmm6[3],xmm7[3]
incl %eax
cmpl $0xa, %eax
jne 0x343f
vpxor 0xd3e(%rip), %xmm4, %xmm0 # 0x41e0
vpbroadcastq 0xc6d(%rip), %xmm1 # 0x4118
vpbroadcastq 0xc5c(%rip), %xmm2 # 0x4110
vpbroadcastq 0xc63(%rip), %xmm3 # 0x4120
vpbroadcastq 0xc62(%rip), %xmm4 # 0x4128
xorl %eax, %eax
vmovdqa %xmm2, %xmm5
movb $0x1, %cl
vaesenc %xmm4, %xmm8, %xmm8
vaesenc %xmm3, %xmm0, %xmm0
vaesenc %xmm1, %xmm9, %xmm9
vaesenc %xmm5, %xmm10, %xmm10
vpaddq %xmm2, %xmm4, %xmm4
vpaddq %xmm2, %xmm3, %xmm3
vpaddq %xmm2, %xmm1, %xmm1
vpaddq %xmm2, %xmm5, %xmm5
testb $0x1, %cl
movl $0x0, %ecx
jne 0x34ce
vpunpckhdq %xmm8, %xmm0, %xmm6 # xmm6 = xmm0[2],xmm8[2],xmm0[3],xmm8[3]
vpunpckldq %xmm8, %xmm0, %xmm0 # xmm0 = xmm0[0],xmm8[0],xmm0[1],xmm8[1]
vpunpckhdq %xmm9, %xmm10, %xmm7 # xmm7 = xmm10[2],xmm9[2],xmm10[3],xmm9[3]
vpunpckldq %xmm9, %xmm10, %xmm8 # xmm8 = xmm10[0],xmm9[0],xmm10[1],xmm9[1]
vpunpckhdq %xmm0, %xmm8, %xmm10 # xmm10 = xmm8[2],xmm0[2],xmm8[3],xmm0[3]
vpunpckldq %xmm0, %xmm8, %xmm8 # xmm8 = xmm8[0],xmm0[0],xmm8[1],xmm0[1]
vpunpckldq %xmm7, %xmm6, %xmm9 # xmm9 = xmm6[0],xmm7[0],xmm6[1],xmm7[1]
vpunpckhdq %xmm7, %xmm6, %xmm0 # xmm0 = xmm6[2],xmm7[2],xmm6[3],xmm7[3]
incl %eax
cmpl $0xa, %eax
jne 0x34cc
vmovdqu %xmm8, (%rdx)
vmovdqu %xmm0, 0x10(%rdx)
xorl %eax, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
vzeroupper
retq