#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_aesenc_si128(int /*<<< orphan*/,
                                    int /*<<< orphan*/ const);
int /*<<< orphan*/ _mm_aesenclast_si128(int /*<<< orphan*/,
                                        int /*<<< orphan*/ const);
int /*<<< orphan*/ _mm_load_si128(int /*<<< orphan*/ const *);
int /*<<< orphan*/ _mm_set_epi8(int, int, int, int, int, int, int, int, int,
                                int, int, int, int, int, int,
                                int /*<<< orphan*/);
int /*<<< orphan*/ _mm_shuffle_epi8(int /*<<< orphan*/,
                                    int /*<<< orphan*/ const);
int /*<<< orphan*/ _mm_store_si128(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ _mm_xor_si128(int /*<<< orphan*/, int /*<<< orphan*/ const);
void aesni_encrypt6(unsigned char *out, unsigned int *n,
                    const __m128i rkeys[16]) {
  const __m128i pt =
      _mm_set_epi8(12, 13, 14, 15, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0);
  __m128i nv0 = _mm_shuffle_epi8(_mm_load_si128((const __m128i *)n), pt);
  n[3]++;
  __m128i nv1 = _mm_shuffle_epi8(_mm_load_si128((const __m128i *)n), pt);
  n[3]++;
  __m128i nv2 = _mm_shuffle_epi8(_mm_load_si128((const __m128i *)n), pt);
  n[3]++;
  __m128i nv3 = _mm_shuffle_epi8(_mm_load_si128((const __m128i *)n), pt);
  n[3]++;
  __m128i nv4 = _mm_shuffle_epi8(_mm_load_si128((const __m128i *)n), pt);
  n[3]++;
  __m128i nv5 = _mm_shuffle_epi8(_mm_load_si128((const __m128i *)n), pt);
  n[3]++;
  int i;
  __m128i temp0 = _mm_xor_si128(nv0, rkeys[0]);
  __m128i temp1 = _mm_xor_si128(nv1, rkeys[0]);
  __m128i temp2 = _mm_xor_si128(nv2, rkeys[0]);
  __m128i temp3 = _mm_xor_si128(nv3, rkeys[0]);
  __m128i temp4 = _mm_xor_si128(nv4, rkeys[0]);
  __m128i temp5 = _mm_xor_si128(nv5, rkeys[0]);
  for (i = 1; i < 14; i++) {
    temp0 = _mm_aesenc_si128(temp0, rkeys[i]);
    temp1 = _mm_aesenc_si128(temp1, rkeys[i]);
    temp2 = _mm_aesenc_si128(temp2, rkeys[i]);
    temp3 = _mm_aesenc_si128(temp3, rkeys[i]);
    temp4 = _mm_aesenc_si128(temp4, rkeys[i]);
    temp5 = _mm_aesenc_si128(temp5, rkeys[i]);
  }
  temp0 = _mm_aesenclast_si128(temp0, rkeys[14]);
  temp1 = _mm_aesenclast_si128(temp1, rkeys[14]);
  temp2 = _mm_aesenclast_si128(temp2, rkeys[14]);
  temp3 = _mm_aesenclast_si128(temp3, rkeys[14]);
  temp4 = _mm_aesenclast_si128(temp4, rkeys[14]);
  temp5 = _mm_aesenclast_si128(temp5, rkeys[14]);
  _mm_store_si128((__m128i *)(out + (0 * 16)), temp0);
  _mm_store_si128((__m128i *)(out + (1 * 16)), temp1);
  _mm_store_si128((__m128i *)(out + (2 * 16)), temp2);
  _mm_store_si128((__m128i *)(out + (3 * 16)), temp3);
  _mm_store_si128((__m128i *)(out + (4 * 16)), temp4);
  _mm_store_si128((__m128i *)(out + (5 * 16)), temp5);
}


x86 assembly (clang, -O0):
<aesni_encrypt6>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0xc,%edi
mov    $0xd,%esi
mov    $0xe,%edx
mov    $0xf,%ecx
mov    $0xb,%r8d
mov    $0xa,%r9d
xor    %eax,%eax
movl   $0x9,(%rsp)
movl   $0x8,0x8(%rsp)
movl   $0x7,0x10(%rsp)
movl   $0x6,0x18(%rsp)
movl   $0x5,0x20(%rsp)
movl   $0x4,0x28(%rsp)
movl   $0x3,0x30(%rsp)
movl   $0x2,0x38(%rsp)
movl   $0x1,0x40(%rsp)
movl   $0x0,0x48(%rsp)
call   1080 <_mm_set_epi8@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <_mm_load_si128@plt>
mov    %eax,%edi
mov    -0x1c(%rbp),%esi
call   1050 <_mm_shuffle_epi8@plt>
mov    %eax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    0xc(%rax),%ecx
add    $0x1,%ecx
mov    %ecx,0xc(%rax)
mov    -0x10(%rbp),%rdi
call   1030 <_mm_load_si128@plt>
mov    %eax,%edi
mov    -0x1c(%rbp),%esi
call   1050 <_mm_shuffle_epi8@plt>
mov    %eax,-0x24(%rbp)
mov    -0x10(%rbp),%rax
mov    0xc(%rax),%ecx
add    $0x1,%ecx
mov    %ecx,0xc(%rax)
mov    -0x10(%rbp),%rdi
call   1030 <_mm_load_si128@plt>
mov    %eax,%edi
mov    -0x1c(%rbp),%esi
call   1050 <_mm_shuffle_epi8@plt>
mov    %eax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    0xc(%rax),%ecx
add    $0x1,%ecx
mov    %ecx,0xc(%rax)
mov    -0x10(%rbp),%rdi
call   1030 <_mm_load_si128@plt>
mov    %eax,%edi
mov    -0x1c(%rbp),%esi
call   1050 <_mm_shuffle_epi8@plt>
mov    %eax,-0x2c(%rbp)
mov    -0x10(%rbp),%rax
mov    0xc(%rax),%ecx
add    $0x1,%ecx
mov    %ecx,0xc(%rax)
mov    -0x10(%rbp),%rdi
call   1030 <_mm_load_si128@plt>
mov    %eax,%edi
mov    -0x1c(%rbp),%esi
call   1050 <_mm_shuffle_epi8@plt>
mov    %eax,-0x30(%rbp)
mov    -0x10(%rbp),%rax
mov    0xc(%rax),%ecx
add    $0x1,%ecx
mov    %ecx,0xc(%rax)
mov    -0x10(%rbp),%rdi
call   1030 <_mm_load_si128@plt>
mov    %eax,%edi
mov    -0x1c(%rbp),%esi
call   1050 <_mm_shuffle_epi8@plt>
mov    %eax,-0x34(%rbp)
mov    -0x10(%rbp),%rax
mov    0xc(%rax),%ecx
add    $0x1,%ecx
mov    %ecx,0xc(%rax)
mov    -0x20(%rbp),%edi
mov    -0x18(%rbp),%rax
mov    (%rax),%esi
call   1090 <_mm_xor_si128@plt>
mov    %eax,-0x3c(%rbp)
mov    -0x24(%rbp),%edi
mov    -0x18(%rbp),%rax
mov    (%rax),%esi
call   1090 <_mm_xor_si128@plt>
mov    %eax,-0x40(%rbp)
mov    -0x28(%rbp),%edi
mov    -0x18(%rbp),%rax
mov    (%rax),%esi
call   1090 <_mm_xor_si128@plt>
mov    %eax,-0x44(%rbp)
mov    -0x2c(%rbp),%edi
mov    -0x18(%rbp),%rax
mov    (%rax),%esi
call   1090 <_mm_xor_si128@plt>
mov    %eax,-0x48(%rbp)
mov    -0x30(%rbp),%edi
mov    -0x18(%rbp),%rax
mov    (%rax),%esi
call   1090 <_mm_xor_si128@plt>
mov    %eax,-0x4c(%rbp)
mov    -0x34(%rbp),%edi
mov    -0x18(%rbp),%rax
mov    (%rax),%esi
call   1090 <_mm_xor_si128@plt>
mov    %eax,-0x50(%rbp)
movl   $0x1,-0x38(%rbp)
cmpl   $0xe,-0x38(%rbp)
jge    13db <aesni_encrypt6+0x26b>
mov    -0x3c(%rbp),%edi
mov    -0x18(%rbp),%rax
movslq -0x38(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
call   1060 <_mm_aesenc_si128@plt>
mov    %eax,-0x3c(%rbp)
mov    -0x40(%rbp),%edi
mov    -0x18(%rbp),%rax
movslq -0x38(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
call   1060 <_mm_aesenc_si128@plt>
mov    %eax,-0x40(%rbp)
mov    -0x44(%rbp),%edi
mov    -0x18(%rbp),%rax
movslq -0x38(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
call   1060 <_mm_aesenc_si128@plt>
mov    %eax,-0x44(%rbp)
mov    -0x48(%rbp),%edi
mov    -0x18(%rbp),%rax
movslq -0x38(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
call   1060 <_mm_aesenc_si128@plt>
mov    %eax,-0x48(%rbp)
mov    -0x4c(%rbp),%edi
mov    -0x18(%rbp),%rax
movslq -0x38(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
call   1060 <_mm_aesenc_si128@plt>
mov    %eax,-0x4c(%rbp)
mov    -0x50(%rbp),%edi
mov    -0x18(%rbp),%rax
movslq -0x38(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
call   1060 <_mm_aesenc_si128@plt>
mov    %eax,-0x50(%rbp)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    133f <aesni_encrypt6+0x1cf>
mov    -0x3c(%rbp),%edi
mov    -0x18(%rbp),%rax
mov    0x38(%rax),%esi
call   1040 <_mm_aesenclast_si128@plt>
mov    %eax,-0x3c(%rbp)
mov    -0x40(%rbp),%edi
mov    -0x18(%rbp),%rax
mov    0x38(%rax),%esi
call   1040 <_mm_aesenclast_si128@plt>
mov    %eax,-0x40(%rbp)
mov    -0x44(%rbp),%edi
mov    -0x18(%rbp),%rax
mov    0x38(%rax),%esi
call   1040 <_mm_aesenclast_si128@plt>
mov    %eax,-0x44(%rbp)
mov    -0x48(%rbp),%edi
mov    -0x18(%rbp),%rax
mov    0x38(%rax),%esi
call   1040 <_mm_aesenclast_si128@plt>
mov    %eax,-0x48(%rbp)
mov    -0x4c(%rbp),%edi
mov    -0x18(%rbp),%rax
mov    0x38(%rax),%esi
call   1040 <_mm_aesenclast_si128@plt>
mov    %eax,-0x4c(%rbp)
mov    -0x50(%rbp),%edi
mov    -0x18(%rbp),%rax
mov    0x38(%rax),%esi
call   1040 <_mm_aesenclast_si128@plt>
mov    %eax,-0x50(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x3c(%rbp),%esi
call   1070 <_mm_store_si128@plt>
mov    -0x8(%rbp),%rdi
add    $0x10,%rdi
mov    -0x40(%rbp),%esi
call   1070 <_mm_store_si128@plt>
mov    -0x8(%rbp),%rdi
add    $0x20,%rdi
mov    -0x44(%rbp),%esi
call   1070 <_mm_store_si128@plt>
mov    -0x8(%rbp),%rdi
add    $0x30,%rdi
mov    -0x48(%rbp),%esi
call   1070 <_mm_store_si128@plt>
mov    -0x8(%rbp),%rdi
add    $0x40,%rdi
mov    -0x4c(%rbp),%esi
call   1070 <_mm_store_si128@plt>
mov    -0x8(%rbp),%rdi
add    $0x50,%rdi
mov    -0x50(%rbp),%esi
call   1070 <_mm_store_si128@plt>
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aesni_encrypt6>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %rdx,%r12
mov    %rsi,%rbx
mov    %rdi,0x20(%rsp)
mov    $0xc,%edi
mov    $0xd,%esi
mov    $0xe,%edx
mov    $0xf,%ecx
mov    $0xb,%r8d
mov    $0xa,%r9d
push   $0x0
push   $0x1
push   $0x2
push   $0x3
push   $0x4
push   $0x5
push   $0x6
push   $0x7
push   $0x8
push   $0x9
call   1080 <_mm_set_epi8@plt>
add    $0x50,%rsp
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <_mm_load_si128@plt>
mov    %eax,%edi
mov    %ebp,%esi
call   1050 <_mm_shuffle_epi8@plt>
mov    %eax,0xc(%rsp)
addl   $0x1,0xc(%rbx)
mov    %rbx,%rdi
call   1030 <_mm_load_si128@plt>
mov    %eax,%edi
mov    %ebp,%esi
call   1050 <_mm_shuffle_epi8@plt>
mov    %eax,%r13d
addl   $0x1,0xc(%rbx)
mov    %rbx,%rdi
call   1030 <_mm_load_si128@plt>
mov    %eax,%edi
mov    %ebp,%esi
call   1050 <_mm_shuffle_epi8@plt>
mov    %eax,0x18(%rsp)
addl   $0x1,0xc(%rbx)
mov    %rbx,%rdi
call   1030 <_mm_load_si128@plt>
mov    %eax,%edi
mov    %ebp,%esi
call   1050 <_mm_shuffle_epi8@plt>
mov    %eax,0x14(%rsp)
addl   $0x1,0xc(%rbx)
mov    %rbx,%rdi
call   1030 <_mm_load_si128@plt>
mov    %eax,%edi
mov    %ebp,%esi
call   1050 <_mm_shuffle_epi8@plt>
mov    %eax,%r14d
addl   $0x1,0xc(%rbx)
mov    %rbx,%rdi
call   1030 <_mm_load_si128@plt>
mov    %eax,%edi
mov    %ebp,%esi
call   1050 <_mm_shuffle_epi8@plt>
mov    %eax,%r15d
addl   $0x1,0xc(%rbx)
mov    (%r12),%esi
mov    0xc(%rsp),%edi
call   1090 <_mm_xor_si128@plt>
mov    %eax,0xc(%rsp)
mov    (%r12),%esi
mov    %r13d,%edi
call   1090 <_mm_xor_si128@plt>
mov    %eax,0x10(%rsp)
mov    (%r12),%esi
mov    0x18(%rsp),%edi
call   1090 <_mm_xor_si128@plt>
mov    %eax,%ebp
mov    (%r12),%esi
mov    0x14(%rsp),%edi
call   1090 <_mm_xor_si128@plt>
mov    %eax,%ebx
mov    (%r12),%esi
mov    %r14d,%edi
call   1090 <_mm_xor_si128@plt>
mov    %eax,%r14d
mov    %r12,0x18(%rsp)
mov    (%r12),%esi
mov    %r15d,%edi
call   1090 <_mm_xor_si128@plt>
mov    %eax,%r15d
mov    $0x1,%r12d
mov    0x18(%rsp),%r13
nopl   0x0(%rax,%rax,1)
mov    0x0(%r13,%r12,4),%esi
mov    0xc(%rsp),%edi
call   1060 <_mm_aesenc_si128@plt>
mov    %eax,0xc(%rsp)
mov    0x0(%r13,%r12,4),%esi
mov    0x10(%rsp),%edi
call   1060 <_mm_aesenc_si128@plt>
mov    %eax,0x10(%rsp)
mov    0x0(%r13,%r12,4),%esi
mov    %ebp,%edi
call   1060 <_mm_aesenc_si128@plt>
mov    %eax,%ebp
mov    0x0(%r13,%r12,4),%esi
mov    %ebx,%edi
call   1060 <_mm_aesenc_si128@plt>
mov    %eax,%ebx
mov    0x0(%r13,%r12,4),%esi
mov    %r14d,%edi
call   1060 <_mm_aesenc_si128@plt>
mov    %eax,%r14d
mov    0x0(%r13,%r12,4),%esi
mov    %r15d,%edi
call   1060 <_mm_aesenc_si128@plt>
mov    %eax,%r15d
add    $0x1,%r12
cmp    $0xe,%r12
jne    12d0 <aesni_encrypt6+0x160>
mov    0x18(%rsp),%r12
mov    0x38(%r12),%esi
mov    0xc(%rsp),%edi
call   1040 <_mm_aesenclast_si128@plt>
mov    %eax,0xc(%rsp)
mov    0x38(%r12),%esi
mov    0x10(%rsp),%edi
call   1040 <_mm_aesenclast_si128@plt>
mov    %eax,0x10(%rsp)
mov    0x38(%r12),%esi
mov    %ebp,%edi
call   1040 <_mm_aesenclast_si128@plt>
mov    %eax,0x14(%rsp)
mov    0x38(%r12),%esi
mov    %ebx,%edi
call   1040 <_mm_aesenclast_si128@plt>
mov    %eax,%r13d
mov    0x38(%r12),%esi
mov    %r14d,%edi
call   1040 <_mm_aesenclast_si128@plt>
mov    %eax,%r14d
mov    0x38(%r12),%esi
mov    %r15d,%edi
call   1040 <_mm_aesenclast_si128@plt>
mov    %eax,%ebx
mov    0x20(%rsp),%rbp
mov    %rbp,%rdi
mov    0xc(%rsp),%esi
call   1070 <_mm_store_si128@plt>
lea    0x10(%rbp),%rdi
mov    0x10(%rsp),%esi
call   1070 <_mm_store_si128@plt>
lea    0x20(%rbp),%rdi
mov    0x14(%rsp),%esi
call   1070 <_mm_store_si128@plt>
lea    0x30(%rbp),%rdi
mov    %r13d,%esi
call   1070 <_mm_store_si128@plt>
lea    0x40(%rbp),%rdi
mov    %r14d,%esi
call   1070 <_mm_store_si128@plt>
add    $0x50,%rbp
mov    %rbp,%rdi
mov    %ebx,%esi
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1070 <_mm_store_si128@plt>

LLVM IR (-O0):
define void @aesni_encrypt6(i8* %0, i32* %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
store i8* %0, i8** %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%21 = call i32 @_mm_set_epi8(i32 12, i32 13, i32 14, i32 15, i32 11, i32 10, i32 9, i32 8, i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 1, i32 0)
store i32 %21, i32* %7
%22 = load i32*, i32** %5
%23 = call i32 @_mm_load_si128(i32* %22)
%24 = load i32, i32* %7
%25 = call i32 @_mm_shuffle_epi8(i32 %23, i32 %24)
store i32 %25, i32* %8
%26 = load i32*, i32** %5
%27 = getelementptr inbounds i32, i32* %26, i64 3
%28 = load i32, i32* %27
%29 = add i32 %28, 1
store i32 %29, i32* %27
%30 = load i32*, i32** %5
%31 = call i32 @_mm_load_si128(i32* %30)
%32 = load i32, i32* %7
%33 = call i32 @_mm_shuffle_epi8(i32 %31, i32 %32)
store i32 %33, i32* %9
%34 = load i32*, i32** %5
%35 = getelementptr inbounds i32, i32* %34, i64 3
%36 = load i32, i32* %35
%37 = add i32 %36, 1
store i32 %37, i32* %35
%38 = load i32*, i32** %5
%39 = call i32 @_mm_load_si128(i32* %38)
%40 = load i32, i32* %7
%41 = call i32 @_mm_shuffle_epi8(i32 %39, i32 %40)
store i32 %41, i32* %10
%42 = load i32*, i32** %5
%43 = getelementptr inbounds i32, i32* %42, i64 3
%44 = load i32, i32* %43
%45 = add i32 %44, 1
store i32 %45, i32* %43
%46 = load i32*, i32** %5
%47 = call i32 @_mm_load_si128(i32* %46)
%48 = load i32, i32* %7
%49 = call i32 @_mm_shuffle_epi8(i32 %47, i32 %48)
store i32 %49, i32* %11
%50 = load i32*, i32** %5
%51 = getelementptr inbounds i32, i32* %50, i64 3
%52 = load i32, i32* %51
%53 = add i32 %52, 1
store i32 %53, i32* %51
%54 = load i32*, i32** %5
%55 = call i32 @_mm_load_si128(i32* %54)
%56 = load i32, i32* %7
%57 = call i32 @_mm_shuffle_epi8(i32 %55, i32 %56)
store i32 %57, i32* %12
%58 = load i32*, i32** %5
%59 = getelementptr inbounds i32, i32* %58, i64 3
%60 = load i32, i32* %59
%61 = add i32 %60, 1
store i32 %61, i32* %59
%62 = load i32*, i32** %5
%63 = call i32 @_mm_load_si128(i32* %62)
%64 = load i32, i32* %7
%65 = call i32 @_mm_shuffle_epi8(i32 %63, i32 %64)
store i32 %65, i32* %13
%66 = load i32*, i32** %5
%67 = getelementptr inbounds i32, i32* %66, i64 3
%68 = load i32, i32* %67
%69 = add i32 %68, 1
store i32 %69, i32* %67
%70 = load i32, i32* %8
%71 = load i32*, i32** %6
%72 = getelementptr inbounds i32, i32* %71, i64 0
%73 = load i32, i32* %72
%74 = call i32 @_mm_xor_si128(i32 %70, i32 %73)
store i32 %74, i32* %15
%75 = load i32, i32* %9
%76 = load i32*, i32** %6
%77 = getelementptr inbounds i32, i32* %76, i64 0
%78 = load i32, i32* %77
%79 = call i32 @_mm_xor_si128(i32 %75, i32 %78)
store i32 %79, i32* %16
%80 = load i32, i32* %10
%81 = load i32*, i32** %6
%82 = getelementptr inbounds i32, i32* %81, i64 0
%83 = load i32, i32* %82
%84 = call i32 @_mm_xor_si128(i32 %80, i32 %83)
store i32 %84, i32* %17
%85 = load i32, i32* %11
%86 = load i32*, i32** %6
%87 = getelementptr inbounds i32, i32* %86, i64 0
%88 = load i32, i32* %87
%89 = call i32 @_mm_xor_si128(i32 %85, i32 %88)
store i32 %89, i32* %18
%90 = load i32, i32* %12
%91 = load i32*, i32** %6
%92 = getelementptr inbounds i32, i32* %91, i64 0
%93 = load i32, i32* %92
%94 = call i32 @_mm_xor_si128(i32 %90, i32 %93)
store i32 %94, i32* %19
%95 = load i32, i32* %13
%96 = load i32*, i32** %6
%97 = getelementptr inbounds i32, i32* %96, i64 0
%98 = load i32, i32* %97
%99 = call i32 @_mm_xor_si128(i32 %95, i32 %98)
store i32 %99, i32* %20
store i32 1, i32* %14
br label %100
100: ; preds = %146, %3
%101 = load i32, i32* %14
%102 = icmp slt i32 %101, 14
br i1 %102, label %103, label %149
103: ; preds = %100
%104 = load i32, i32* %15
%105 = load i32*, i32** %6
%106 = load i32, i32* %14
%107 = sext i32 %106 to i64
%108 = getelementptr inbounds i32, i32* %105, i64 %107
%109 = load i32, i32* %108
%110 = call i32 @_mm_aesenc_si128(i32 %104, i32 %109)
store i32 %110, i32* %15
%111 = load i32, i32* %16
%112 = load i32*, i32** %6
%113 = load i32, i32* %14
%114 = sext i32 %113 to i64
%115 = getelementptr inbounds i32, i32* %112, i64 %114
%116 = load i32, i32* %115
%117 = call i32 @_mm_aesenc_si128(i32 %111, i32 %116)
store i32 %117, i32* %16
%118 = load i32, i32* %17
%119 = load i32*, i32** %6
%120 = load i32, i32* %14
%121 = sext i32 %120 to i64
%122 = getelementptr inbounds i32, i32* %119, i64 %121
%123 = load i32, i32* %122
%124 = call i32 @_mm_aesenc_si128(i32 %118, i32 %123)
store i32 %124, i32* %17
%125 = load i32, i32* %18
%126 = load i32*, i32** %6
%127 = load i32, i32* %14
%128 = sext i32 %127 to i64
%129 = getelementptr inbounds i32, i32* %126, i64 %128
%130 = load i32, i32* %129
%131 = call i32 @_mm_aesenc_si128(i32 %125, i32 %130)
store i32 %131, i32* %18
%132 = load i32, i32* %19
%133 = load i32*, i32** %6
%134 = load i32, i32* %14
%135 = sext i32 %134 to i64
%136 = getelementptr inbounds i32, i32* %133, i64 %135
%137 = load i32, i32* %136
%138 = call i32 @_mm_aesenc_si128(i32 %132, i32 %137)
store i32 %138, i32* %19
%139 = load i32, i32* %20
%140 = load i32*, i32** %6
%141 = load i32, i32* %14
%142 = sext i32 %141 to i64
%143 = getelementptr inbounds i32, i32* %140, i64 %142
%144 = load i32, i32* %143
%145 = call i32 @_mm_aesenc_si128(i32 %139, i32 %144)
store i32 %145, i32* %20
br label %146
146: ; preds = %103
%147 = load i32, i32* %14
%148 = add nsw i32 %147, 1
store i32 %148, i32* %14
br label %100
149: ; preds = %100
%150 = load i32, i32* %15
%151 = load i32*, i32** %6
%152 = getelementptr inbounds i32, i32* %151, i64 14
%153 = load i32, i32* %152
%154 = call i32 @_mm_aesenclast_si128(i32 %150, i32 %153)
store i32 %154, i32* %15
%155 = load i32, i32* %16
%156 = load i32*, i32** %6
%157 = getelementptr inbounds i32, i32* %156, i64 14
%158 = load i32, i32* %157
%159 = call i32 @_mm_aesenclast_si128(i32 %155, i32 %158)
store i32 %159, i32* %16
%160 = load i32, i32* %17
%161 = load i32*, i32** %6
%162 = getelementptr inbounds i32, i32* %161, i64 14
%163 = load i32, i32* %162
%164 = call i32 @_mm_aesenclast_si128(i32 %160, i32 %163)
store i32 %164, i32* %17
%165 = load i32, i32* %18
%166 = load i32*, i32** %6
%167 = getelementptr inbounds i32, i32* %166, i64 14
%168 = load i32, i32* %167
%169 = call i32 @_mm_aesenclast_si128(i32 %165, i32 %168)
store i32 %169, i32* %18
%170 = load i32, i32* %19
%171 = load i32*, i32** %6
%172 = getelementptr inbounds i32, i32* %171, i64 14
%173 = load i32, i32* %172
%174 = call i32 @_mm_aesenclast_si128(i32 %170, i32 %173)
store i32 %174, i32* %19
%175 = load i32, i32* %20
%176 = load i32*, i32** %6
%177 = getelementptr inbounds i32, i32* %176, i64 14
%178 = load i32, i32* %177
%179 = call i32 @_mm_aesenclast_si128(i32 %175, i32 %178)
store i32 %179, i32* %20
%180 = load i8*, i8** %4
%181 = getelementptr inbounds i8, i8* %180, i64 0
%182 = bitcast i8* %181 to i32*
%183 = load i32, i32* %15
%184 = call i32 @_mm_store_si128(i32* %182, i32 %183)
%185 = load i8*, i8** %4
%186 = getelementptr inbounds i8, i8* %185, i64 16
%187 = bitcast i8* %186 to i32*
%188 = load i32, i32* %16
%189 = call i32 @_mm_store_si128(i32* %187, i32 %188)
%190 = load i8*, i8** %4
%191 = getelementptr inbounds i8, i8* %190, i64 32
%192 = bitcast i8* %191 to i32*
%193 = load i32, i32* %17
%194 = call i32 @_mm_store_si128(i32* %192, i32 %193)
%195 = load i8*, i8** %4
%196 = getelementptr inbounds i8, i8* %195, i64 48
%197 = bitcast i8* %196 to i32*
%198 = load i32, i32* %18
%199 = call i32 @_mm_store_si128(i32* %197, i32 %198)
%200 = load i8*, i8** %4
%201 = getelementptr inbounds i8, i8* %200, i64 64
%202 = bitcast i8* %201 to i32*
%203 = load i32, i32* %19
%204 = call i32 @_mm_store_si128(i32* %202, i32 %203)
%205 = load i8*, i8** %4
%206 = getelementptr inbounds i8, i8* %205, i64 80
%207 = bitcast i8* %206 to i32*
%208 = load i32, i32* %20
%209 = call i32 @_mm_store_si128(i32* %207, i32 %208)
ret void
}

LLVM IR (-O2):
define void @aesni_encrypt6(i8* %0, i32* %1, i32* nocapture %2) {
%4 = tail call i32 @_mm_set_epi8(i32 12, i32 13, i32 14, i32 15, i32 11, i32 10, i32 9, i32 8, i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 1, i32 0)
%5 = tail call i32 @_mm_load_si128(i32* %1)
%6 = tail call i32 @_mm_shuffle_epi8(i32 %5, i32 %4)
%7 = getelementptr inbounds i32, i32* %1, i64 3
%8 = load i32, i32* %7
%9 = add i32 %8, 1
store i32 %9, i32* %7
%10 = tail call i32 @_mm_load_si128(i32* %1)
%11 = tail call i32 @_mm_shuffle_epi8(i32 %10, i32 %4)
%12 = load i32, i32* %7
%13 = add i32 %12, 1
store i32 %13, i32* %7
%14 = tail call i32 @_mm_load_si128(i32* %1)
%15 = tail call i32 @_mm_shuffle_epi8(i32 %14, i32 %4)
%16 = load i32, i32* %7
%17 = add i32 %16, 1
store i32 %17, i32* %7
%18 = tail call i32 @_mm_load_si128(i32* %1)
%19 = tail call i32 @_mm_shuffle_epi8(i32 %18, i32 %4)
%20 = load i32, i32* %7
%21 = add i32 %20, 1
store i32 %21, i32* %7
%22 = tail call i32 @_mm_load_si128(i32* %1)
%23 = tail call i32 @_mm_shuffle_epi8(i32 %22, i32 %4)
%24 = load i32, i32* %7
%25 = add i32 %24, 1
store i32 %25, i32* %7
%26 = tail call i32 @_mm_load_si128(i32* %1)
%27 = tail call i32 @_mm_shuffle_epi8(i32 %26, i32 %4)
%28 = load i32, i32* %7
%29 = add i32 %28, 1
store i32 %29, i32* %7
%30 = load i32, i32* %2
%31 = tail call i32 @_mm_xor_si128(i32 %6, i32 %30)
%32 = load i32, i32* %2
%33 = tail call i32 @_mm_xor_si128(i32 %11, i32 %32)
%34 = load i32, i32* %2
%35 = tail call i32 @_mm_xor_si128(i32 %15, i32 %34)
%36 = load i32, i32* %2
%37 = tail call i32 @_mm_xor_si128(i32 %19, i32 %36)
%38 = load i32, i32* %2
%39 = tail call i32 @_mm_xor_si128(i32 %23, i32 %38)
%40 = load i32, i32* %2
%41 = tail call i32 @_mm_xor_si128(i32 %27, i32 %40)
br label %42
42: ; preds = %3, %42
%43 = phi i64 [ 1, %3 ], [ %63, %42 ]
%44 = phi i32 [ %41, %3 ], [ %62, %42 ]
%45 = phi i32 [ %39, %3 ], [ %60, %42 ]
%46 = phi i32 [ %37, %3 ], [ %58, %42 ]
%47 = phi i32 [ %35, %3 ], [ %56, %42 ]
%48 = phi i32 [ %33, %3 ], [ %54, %42 ]
%49 = phi i32 [ %31, %3 ], [ %52, %42 ]
%50 = getelementptr inbounds i32, i32* %2, i64 %43
%51 = load i32, i32* %50
%52 = tail call i32 @_mm_aesenc_si128(i32 %49, i32 %51)
%53 = load i32, i32* %50
%54 = tail call i32 @_mm_aesenc_si128(i32 %48, i32 %53)
%55 = load i32, i32* %50
%56 = tail call i32 @_mm_aesenc_si128(i32 %47, i32 %55)
%57 = load i32, i32* %50
%58 = tail call i32 @_mm_aesenc_si128(i32 %46, i32 %57)
%59 = load i32, i32* %50
%60 = tail call i32 @_mm_aesenc_si128(i32 %45, i32 %59)
%61 = load i32, i32* %50
%62 = tail call i32 @_mm_aesenc_si128(i32 %44, i32 %61)
%63 = add nuw nsw i64 %43, 1
%64 = icmp eq i64 %63, 14
br i1 %64, label %65, label %42
65: ; preds = %42
%66 = getelementptr inbounds i32, i32* %2, i64 14
%67 = load i32, i32* %66
%68 = tail call i32 @_mm_aesenclast_si128(i32 %52, i32 %67)
%69 = load i32, i32* %66
%70 = tail call i32 @_mm_aesenclast_si128(i32 %54, i32 %69)
%71 = load i32, i32* %66
%72 = tail call i32 @_mm_aesenclast_si128(i32 %56, i32 %71)
%73 = load i32, i32* %66
%74 = tail call i32 @_mm_aesenclast_si128(i32 %58, i32 %73)
%75 = load i32, i32* %66
%76 = tail call i32 @_mm_aesenclast_si128(i32 %60, i32 %75)
%77 = load i32, i32* %66
%78 = tail call i32 @_mm_aesenclast_si128(i32 %62, i32 %77)
%79 = bitcast i8* %0 to i32*
%80 = tail call i32 @_mm_store_si128(i32* %79, i32 %68)
%81 = getelementptr inbounds i8, i8* %0, i64 16
%82 = bitcast i8* %81 to i32*
%83 = tail call i32 @_mm_store_si128(i32* %82, i32 %70)
%84 = getelementptr inbounds i8, i8* %0, i64 32
%85 = bitcast i8* %84 to i32*
%86 = tail call i32 @_mm_store_si128(i32* %85, i32 %72)
%87 = getelementptr inbounds i8, i8* %0, i64 48
%88 = bitcast i8* %87 to i32*
%89 = tail call i32 @_mm_store_si128(i32* %88, i32 %74)
%90 = getelementptr inbounds i8, i8* %0, i64 64
%91 = bitcast i8* %90 to i32*
%92 = tail call i32 @_mm_store_si128(i32* %91, i32 %76)
%93 = getelementptr inbounds i8, i8* %0, i64 80
%94 = bitcast i8* %93 to i32*
%95 = tail call i32 @_mm_store_si128(i32* %94, i32 %78)
ret void
}