#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_aeskeygenassist_si128(int /*<<< orphan*/, int);
int /*<<< orphan*/ _mm_shuffle_epi32(int /*<<< orphan*/, int);
int /*<<< orphan*/ _mm_slli_si128(int /*<<< orphan*/, int);
int /*<<< orphan*/ _mm_xor_si128(int /*<<< orphan*/, int /*<<< orphan*/);
void KEY_256_ASSIST_2(__m128i *temp1, __m128i *temp3) {
  __m128i temp2, temp4;
  temp4 = _mm_aeskeygenassist_si128(*temp1, 0x0);
  temp2 = _mm_shuffle_epi32(temp4, 0xaa);
  temp4 = _mm_slli_si128(*temp3, 0x4);
  *temp3 = _mm_xor_si128(*temp3, temp4);
  temp4 = _mm_slli_si128(temp4, 0x4);
  *temp3 = _mm_xor_si128(*temp3, temp4);
  temp4 = _mm_slli_si128(temp4, 0x4);
  *temp3 = _mm_xor_si128(*temp3, temp4);
  *temp3 = _mm_xor_si128(*temp3, temp2);
}


x86 assembly (clang, -O0):
<KEY_256_ASSIST_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
xor    %esi,%esi
call   1050 <_mm_aeskeygenassist_si128@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%edi
mov    $0xaa,%esi
call   1030 <_mm_shuffle_epi32@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
mov    $0x4,%esi
call   1060 <_mm_slli_si128@plt>
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%esi
call   1040 <_mm_xor_si128@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%edi
mov    $0x4,%esi
call   1060 <_mm_slli_si128@plt>
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%esi
call   1040 <_mm_xor_si128@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%edi
mov    $0x4,%esi
call   1060 <_mm_slli_si128@plt>
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%esi
call   1040 <_mm_xor_si128@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
mov    -0x14(%rbp),%esi
call   1040 <_mm_xor_si128@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<KEY_256_ASSIST_2>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    (%rdi),%edi
xor    %esi,%esi
call   1050 <_mm_aeskeygenassist_si128@plt>
mov    %eax,%edi
mov    $0xaa,%esi
call   1030 <_mm_shuffle_epi32@plt>
mov    %eax,%r14d
mov    (%rbx),%edi
mov    $0x4,%esi
call   1060 <_mm_slli_si128@plt>
mov    %eax,%ebp
mov    (%rbx),%edi
mov    %eax,%esi
call   1040 <_mm_xor_si128@plt>
mov    %eax,(%rbx)
mov    %ebp,%edi
mov    $0x4,%esi
call   1060 <_mm_slli_si128@plt>
mov    %eax,%ebp
mov    (%rbx),%edi
mov    %eax,%esi
call   1040 <_mm_xor_si128@plt>
mov    %eax,(%rbx)
mov    %ebp,%edi
mov    $0x4,%esi
call   1060 <_mm_slli_si128@plt>
mov    (%rbx),%edi
mov    %eax,%esi
call   1040 <_mm_xor_si128@plt>
mov    %eax,(%rbx)
mov    %eax,%edi
mov    %r14d,%esi
call   1040 <_mm_xor_si128@plt>
mov    %eax,(%rbx)
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @KEY_256_ASSIST_2(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
%7 = load i32*, i32** %3
%8 = load i32, i32* %7
%9 = call i32 @_mm_aeskeygenassist_si128(i32 %8, i32 0)
store i32 %9, i32* %6
%10 = load i32, i32* %6
%11 = call i32 @_mm_shuffle_epi32(i32 %10, i32 170)
store i32 %11, i32* %5
%12 = load i32*, i32** %4
%13 = load i32, i32* %12
%14 = call i32 @_mm_slli_si128(i32 %13, i32 4)
store i32 %14, i32* %6
%15 = load i32*, i32** %4
%16 = load i32, i32* %15
%17 = load i32, i32* %6
%18 = call i32 @_mm_xor_si128(i32 %16, i32 %17)
%19 = load i32*, i32** %4
store i32 %18, i32* %19
%20 = load i32, i32* %6
%21 = call i32 @_mm_slli_si128(i32 %20, i32 4)
store i32 %21, i32* %6
%22 = load i32*, i32** %4
%23 = load i32, i32* %22
%24 = load i32, i32* %6
%25 = call i32 @_mm_xor_si128(i32 %23, i32 %24)
%26 = load i32*, i32** %4
store i32 %25, i32* %26
%27 = load i32, i32* %6
%28 = call i32 @_mm_slli_si128(i32 %27, i32 4)
store i32 %28, i32* %6
%29 = load i32*, i32** %4
%30 = load i32, i32* %29
%31 = load i32, i32* %6
%32 = call i32 @_mm_xor_si128(i32 %30, i32 %31)
%33 = load i32*, i32** %4
store i32 %32, i32* %33
%34 = load i32*, i32** %4
%35 = load i32, i32* %34
%36 = load i32, i32* %5
%37 = call i32 @_mm_xor_si128(i32 %35, i32 %36)
%38 = load i32*, i32** %4
store i32 %37, i32* %38
ret void
}

LLVM IR (-O2):
define void @KEY_256_ASSIST_2(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = tail call i32 @_mm_aeskeygenassist_si128(i32 %3, i32 0)
%5 = tail call i32 @_mm_shuffle_epi32(i32 %4, i32 170)
%6 = load i32, i32* %1
%7 = tail call i32 @_mm_slli_si128(i32 %6, i32 4)
%8 = load i32, i32* %1
%9 = tail call i32 @_mm_xor_si128(i32 %8, i32 %7)
store i32 %9, i32* %1
%10 = tail call i32 @_mm_slli_si128(i32 %7, i32 4)
%11 = load i32, i32* %1
%12 = tail call i32 @_mm_xor_si128(i32 %11, i32 %10)
store i32 %12, i32* %1
%13 = tail call i32 @_mm_slli_si128(i32 %10, i32 4)
%14 = load i32, i32* %1
%15 = tail call i32 @_mm_xor_si128(i32 %14, i32 %13)
store i32 %15, i32* %1
%16 = tail call i32 @_mm_xor_si128(i32 %15, i32 %5)
store i32 %16, i32* %1
ret void
}