#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 uint32_t;

/* Variables and functions */
int /*<<< orphan*/ MessageExpansion512(int *, int *, int *);
int /*<<< orphan*/ roundAESkeyfirst(int *, int *, int *);
void E512(uint32_t pt[16], uint32_t ct[16], uint32_t message[32],
          uint32_t salt[16], uint32_t counter[4]) {
  uint32_t state[16], i, j;
  uint32_t input[4], output[4], temp;
  uint32_t rk[(14 * 4 * (4) * 3)];
  for (i = 0; i < 16; i++)
    state[i] = pt[i];
  for (i = 0; i < 32; i++)
    rk[i] = message[i];
  MessageExpansion512(rk, salt, counter);
  for (i = 0; i < 14; i++) {
    for (j = 0; j < 4; j++)
      input[j] = state[4 + j];
    roundAESkeyfirst(input, output, rk + 32 * i);
    for (j = 0; j < 4; j++)
      input[j] = output[j];
    roundAESkeyfirst(input, output, rk + 32 * i + 4);
    for (j = 0; j < 4; j++)
      input[j] = output[j];
    roundAESkeyfirst(input, output, rk + 32 * i + 8);
    for (j = 0; j < 4; j++)
      input[j] = output[j];
    roundAESkeyfirst(input, output, rk + 32 * i + 12);
    for (j = 0; j < 4; j++)
      state[j] ^= output[j];
    for (j = 0; j < 4; j++)
      input[j] = state[12 + j];
    roundAESkeyfirst(input, output, rk + 32 * i + 16);
    for (j = 0; j < 4; j++)
      input[j] = output[j];
    roundAESkeyfirst(input, output, rk + 32 * i + 20);
    for (j = 0; j < 4; j++)
      input[j] = output[j];
    roundAESkeyfirst(input, output, rk + 32 * i + 24);
    for (j = 0; j < 4; j++)
      input[j] = output[j];
    roundAESkeyfirst(input, output, rk + 32 * i + 28);
    for (j = 0; j < 4; j++)
      state[8 + j] ^= output[j];
    for (j = 0; j < 4; j++) {
      temp = state[j];
      state[j] = state[j + 4];
      state[j + 4] = state[j + 8];
      state[j + 8] = state[j + 12];
      state[j + 12] = temp;
    }
  }
  for (i = 0; i < 16; i++)
    ct[i] = state[i];
  return;
}


x86 assembly (clang, -O0):
<E512>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
movl   $0x0,-0x74(%rbp)
cmpl   $0x10,-0x74(%rbp)
jge    1171 <E512+0x51>
mov    -0x8(%rbp),%rax
movslq -0x74(%rbp),%rcx
mov    (%rax,%rcx,4),%ecx
movslq -0x74(%rbp),%rax
mov    %ecx,-0x70(%rbp,%rax,4)
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    1146 <E512+0x26>
movl   $0x0,-0x74(%rbp)
cmpl   $0x20,-0x74(%rbp)
jge    11a6 <E512+0x86>
mov    -0x18(%rbp),%rax
movslq -0x74(%rbp),%rcx
mov    (%rax,%rcx,4),%ecx
movslq -0x74(%rbp),%rax
mov    %ecx,-0xb30(%rbp,%rax,4)
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    1178 <E512+0x58>
lea    -0xb30(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
call   1030 <MessageExpansion512@plt>
movl   $0x0,-0x74(%rbp)
cmpl   $0xe,-0x74(%rbp)
jge    15df <E512+0x4bf>
movl   $0x0,-0x78(%rbp)
cmpl   $0x4,-0x78(%rbp)
jge    1201 <E512+0xe1>
mov    -0x78(%rbp),%eax
add    $0x4,%eax
cltq
mov    -0x70(%rbp,%rax,4),%ecx
movslq -0x78(%rbp),%rax
mov    %ecx,-0x90(%rbp,%rax,4)
mov    -0x78(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x78(%rbp)
jmp    11d2 <E512+0xb2>
lea    -0x90(%rbp),%rdi
lea    -0xa0(%rbp),%rsi
lea    -0xb30(%rbp),%rdx
mov    -0x74(%rbp),%eax
shl    $0x5,%eax
cltq
shl    $0x2,%rax
add    %rax,%rdx
call   1040 <roundAESkeyfirst@plt>
movl   $0x0,-0x78(%rbp)
cmpl   $0x4,-0x78(%rbp)
jge    125f <E512+0x13f>
movslq -0x78(%rbp),%rax
mov    -0xa0(%rbp,%rax,4),%ecx
movslq -0x78(%rbp),%rax
mov    %ecx,-0x90(%rbp,%rax,4)
mov    -0x78(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x78(%rbp)
jmp    1231 <E512+0x111>
lea    -0x90(%rbp),%rdi
lea    -0xa0(%rbp),%rsi
lea    -0xb30(%rbp),%rdx
mov    -0x74(%rbp),%eax
shl    $0x5,%eax
cltq
shl    $0x2,%rax
add    %rax,%rdx
add    $0x10,%rdx
call   1040 <roundAESkeyfirst@plt>
movl   $0x0,-0x78(%rbp)
cmpl   $0x4,-0x78(%rbp)
jge    12c1 <E512+0x1a1>
movslq -0x78(%rbp),%rax
mov    -0xa0(%rbp,%rax,4),%ecx
movslq -0x78(%rbp),%rax
mov    %ecx,-0x90(%rbp,%rax,4)
mov    -0x78(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x78(%rbp)
jmp    1293 <E512+0x173>
lea    -0x90(%rbp),%rdi
lea    -0xa0(%rbp),%rsi
lea    -0xb30(%rbp),%rdx
mov    -0x74(%rbp),%eax
shl    $0x5,%eax
cltq
shl    $0x2,%rax
add    %rax,%rdx
add    $0x20,%rdx
call   1040 <roundAESkeyfirst@plt>
movl   $0x0,-0x78(%rbp)
cmpl   $0x4,-0x78(%rbp)
jge    1323 <E512+0x203>
movslq -0x78(%rbp),%rax
mov    -0xa0(%rbp,%rax,4),%ecx
movslq -0x78(%rbp),%rax
mov    %ecx,-0x90(%rbp,%rax,4)
mov    -0x78(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x78(%rbp)
jmp    12f5 <E512+0x1d5>
lea    -0x90(%rbp),%rdi
lea    -0xa0(%rbp),%rsi
lea    -0xb30(%rbp),%rdx
mov    -0x74(%rbp),%eax
shl    $0x5,%eax
cltq
shl    $0x2,%rax
add    %rax,%rdx
add    $0x30,%rdx
call   1040 <roundAESkeyfirst@plt>
movl   $0x0,-0x78(%rbp)
cmpl   $0x4,-0x78(%rbp)
jge    1386 <E512+0x266>
movslq -0x78(%rbp),%rax
mov    -0xa0(%rbp,%rax,4),%ecx
movslq -0x78(%rbp),%rax
xor    -0x70(%rbp,%rax,4),%ecx
mov    %ecx,-0x70(%rbp,%rax,4)
mov    -0x78(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x78(%rbp)
jmp    1357 <E512+0x237>
movl   $0x0,-0x78(%rbp)
cmpl   $0x4,-0x78(%rbp)
jge    13bc <E512+0x29c>
mov    -0x78(%rbp),%eax
add    $0xc,%eax
cltq
mov    -0x70(%rbp,%rax,4),%ecx
movslq -0x78(%rbp),%rax
mov    %ecx,-0x90(%rbp,%rax,4)
mov    -0x78(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x78(%rbp)
jmp    138d <E512+0x26d>
lea    -0x90(%rbp),%rdi
lea    -0xa0(%rbp),%rsi
lea    -0xb30(%rbp),%rdx
mov    -0x74(%rbp),%eax
shl    $0x5,%eax
cltq
shl    $0x2,%rax
add    %rax,%rdx
add    $0x40,%rdx
call   1040 <roundAESkeyfirst@plt>
movl   $0x0,-0x78(%rbp)
cmpl   $0x4,-0x78(%rbp)
jge    141e <E512+0x2fe>
movslq -0x78(%rbp),%rax
mov    -0xa0(%rbp,%rax,4),%ecx
movslq -0x78(%rbp),%rax
mov    %ecx,-0x90(%rbp,%rax,4)
mov    -0x78(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x78(%rbp)
jmp    13f0 <E512+0x2d0>
lea    -0x90(%rbp),%rdi
lea    -0xa0(%rbp),%rsi
lea    -0xb30(%rbp),%rdx
mov    -0x74(%rbp),%eax
shl    $0x5,%eax
cltq
shl    $0x2,%rax
add    %rax,%rdx
add    $0x50,%rdx
call   1040 <roundAESkeyfirst@plt>
movl   $0x0,-0x78(%rbp)
cmpl   $0x4,-0x78(%rbp)
jge    1480 <E512+0x360>
movslq -0x78(%rbp),%rax
mov    -0xa0(%rbp,%rax,4),%ecx
movslq -0x78(%rbp),%rax
mov    %ecx,-0x90(%rbp,%rax,4)
mov    -0x78(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x78(%rbp)
jmp    1452 <E512+0x332>
lea    -0x90(%rbp),%rdi
lea    -0xa0(%rbp),%rsi
lea    -0xb30(%rbp),%rdx
mov    -0x74(%rbp),%eax
shl    $0x5,%eax
cltq
shl    $0x2,%rax
add    %rax,%rdx
add    $0x60,%rdx
call   1040 <roundAESkeyfirst@plt>
movl   $0x0,-0x78(%rbp)
cmpl   $0x4,-0x78(%rbp)
jge    14e2 <E512+0x3c2>
movslq -0x78(%rbp),%rax
mov    -0xa0(%rbp,%rax,4),%ecx
movslq -0x78(%rbp),%rax
mov    %ecx,-0x90(%rbp,%rax,4)
mov    -0x78(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x78(%rbp)
jmp    14b4 <E512+0x394>
lea    -0x90(%rbp),%rdi
lea    -0xa0(%rbp),%rsi
lea    -0xb30(%rbp),%rdx
mov    -0x74(%rbp),%eax
shl    $0x5,%eax
cltq
shl    $0x2,%rax
add    %rax,%rdx
add    $0x70,%rdx
call   1040 <roundAESkeyfirst@plt>
movl   $0x0,-0x78(%rbp)
cmpl   $0x4,-0x78(%rbp)
jge    1549 <E512+0x429>
movslq -0x78(%rbp),%rax
mov    -0xa0(%rbp,%rax,4),%ecx
mov    -0x78(%rbp),%eax
add    $0x8,%eax
cltq
xor    -0x70(%rbp,%rax,4),%ecx
mov    %ecx,-0x70(%rbp,%rax,4)
mov    -0x78(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x78(%rbp)
jmp    1516 <E512+0x3f6>
movl   $0x0,-0x78(%rbp)
cmpl   $0x4,-0x78(%rbp)
jge    15cc <E512+0x4ac>
movslq -0x78(%rbp),%rax
mov    -0x70(%rbp,%rax,4),%eax
mov    %eax,-0xa4(%rbp)
mov    -0x78(%rbp),%eax
add    $0x4,%eax
cltq
mov    -0x70(%rbp,%rax,4),%ecx
movslq -0x78(%rbp),%rax
mov    %ecx,-0x70(%rbp,%rax,4)
mov    -0x78(%rbp),%eax
add    $0x8,%eax
cltq
mov    -0x70(%rbp,%rax,4),%ecx
mov    -0x78(%rbp),%eax
add    $0x4,%eax
cltq
mov    %ecx,-0x70(%rbp,%rax,4)
mov    -0x78(%rbp),%eax
add    $0xc,%eax
cltq
mov    -0x70(%rbp,%rax,4),%ecx
mov    -0x78(%rbp),%eax
add    $0x8,%eax
cltq
mov    %ecx,-0x70(%rbp,%rax,4)
mov    -0xa4(%rbp),%ecx
mov    -0x78(%rbp),%eax
add    $0xc,%eax
cltq
mov    %ecx,-0x70(%rbp,%rax,4)
mov    -0x78(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x78(%rbp)
jmp    1550 <E512+0x430>
jmp    15d1 <E512+0x4b1>
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    11c1 <E512+0xa1>
movl   $0x0,-0x74(%rbp)
cmpl   $0x10,-0x74(%rbp)
jge    1611 <E512+0x4f1>
movslq -0x74(%rbp),%rax
mov    -0x70(%rbp,%rax,4),%edx
mov    -0x10(%rbp),%rax
movslq -0x74(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    15e6 <E512+0x4c6>
add    $0xb30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<E512>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0xaf8,%rsp
mov    %rsi,%r14
movups (%rdi),%xmm0
movaps %xmm0,0x40(%rsp)
movups 0x10(%rdi),%xmm0
movaps %xmm0,0x20(%rsp)
movups 0x20(%rdi),%xmm0
movaps %xmm0,0x50(%rsp)
movups 0x30(%rdi),%xmm0
movaps %xmm0,0x30(%rsp)
movups 0x70(%rdx),%xmm0
movaps %xmm0,0xe0(%rsp)
movups 0x60(%rdx),%xmm0
movaps %xmm0,0xd0(%rsp)
movups 0x50(%rdx),%xmm0
movaps %xmm0,0xc0(%rsp)
movups 0x40(%rdx),%xmm0
movaps %xmm0,0xb0(%rsp)
movups (%rdx),%xmm0
movups 0x10(%rdx),%xmm1
movups 0x20(%rdx),%xmm2
movups 0x30(%rdx),%xmm3
movaps %xmm3,0xa0(%rsp)
movaps %xmm2,0x90(%rsp)
movaps %xmm1,0x80(%rsp)
movaps %xmm0,0x70(%rsp)
lea    0x70(%rsp),%rdi
mov    %rcx,%rsi
mov    %r8,%rdx
call   1030 <MessageExpansion512@plt>
movaps 0x20(%rsp),%xmm2
xor    %ebx,%ebx
lea    0x10(%rsp),%r15
mov    %rsp,%r12
nop
movaps %xmm2,0x60(%rsp)
movaps 0x30(%rsp),%xmm1
movaps %xmm1,0x20(%rsp)
movaps %xmm2,0x10(%rsp)
lea    (%rsp,%rbx,1),%rdx
add    $0x70,%rdx
mov    %r15,%rdi
mov    %r12,%rsi
call   1040 <roundAESkeyfirst@plt>
movaps (%rsp),%xmm0
movaps %xmm0,0x10(%rsp)
lea    (%rsp,%rbx,1),%rdx
add    $0x80,%rdx
mov    %r15,%rdi
mov    %r12,%rsi
call   1040 <roundAESkeyfirst@plt>
movaps (%rsp),%xmm0
movaps %xmm0,0x10(%rsp)
lea    (%rsp,%rbx,1),%rdx
add    $0x90,%rdx
mov    %r15,%rdi
mov    %r12,%rsi
call   1040 <roundAESkeyfirst@plt>
movaps (%rsp),%xmm0
movaps %xmm0,0x10(%rsp)
lea    (%rsp,%rbx,1),%rdx
add    $0xa0,%rdx
mov    %r15,%rdi
mov    %r12,%rsi
call   1040 <roundAESkeyfirst@plt>
movaps 0x40(%rsp),%xmm0
xorps  (%rsp),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0x20(%rsp),%xmm0
movaps %xmm0,0x10(%rsp)
lea    (%rsp,%rbx,1),%rdx
add    $0xb0,%rdx
mov    %r15,%rdi
mov    %r12,%rsi
call   1040 <roundAESkeyfirst@plt>
movaps (%rsp),%xmm0
movaps %xmm0,0x10(%rsp)
lea    (%rsp,%rbx,1),%rdx
add    $0xc0,%rdx
mov    %r15,%rdi
mov    %r12,%rsi
call   1040 <roundAESkeyfirst@plt>
movaps (%rsp),%xmm0
movaps %xmm0,0x10(%rsp)
lea    (%rsp,%rbx,1),%rdx
add    $0xd0,%rdx
mov    %r15,%rdi
mov    %r12,%rsi
call   1040 <roundAESkeyfirst@plt>
movaps (%rsp),%xmm0
movaps %xmm0,0x10(%rsp)
lea    (%rsp,%rbx,1),%rdx
add    $0xe0,%rdx
mov    %r15,%rdi
mov    %r12,%rsi
call   1040 <roundAESkeyfirst@plt>
movaps 0x60(%rsp),%xmm1
movaps 0x20(%rsp),%xmm0
movaps 0x50(%rsp),%xmm2
xorps  (%rsp),%xmm2
sub    $0xffffffffffffff80,%rbx
movaps %xmm0,0x50(%rsp)
movaps %xmm1,0x40(%rsp)
cmp    $0x700,%rbx
jne    11d0 <E512+0xb0>
movups %xmm1,(%r14)
movups %xmm2,0x10(%r14)
movups %xmm0,0x20(%r14)
movaps 0x30(%rsp),%xmm0
movups %xmm0,0x30(%r14)
add    $0xaf8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @E512(i32* %0, i32* %1, i32* %2, i32* %3, i32* %4) {
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i32*
%11 = alloca [16 x i32]
%12 = alloca i32
%13 = alloca i32
%14 = alloca [4 x i32]
%15 = alloca [4 x i32]
%16 = alloca i32
%17 = alloca [672 x i32]
store i32* %0, i32** %6
store i32* %1, i32** %7
store i32* %2, i32** %8
store i32* %3, i32** %9
store i32* %4, i32** %10
store i32 0, i32* %12
br label %18
18: ; preds = %30, %5
%19 = load i32, i32* %12
%20 = icmp slt i32 %19, 16
br i1 %20, label %21, label %33
21: ; preds = %18
%22 = load i32*, i32** %6
%23 = load i32, i32* %12
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds i32, i32* %22, i64 %24
%26 = load i32, i32* %25
%27 = load i32, i32* %12
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds [16 x i32], [16 x i32]* %11, i64 0, i64 %28
store i32 %26, i32* %29
br label %30
30: ; preds = %21
%31 = load i32, i32* %12
%32 = add nsw i32 %31, 1
store i32 %32, i32* %12
br label %18
33: ; preds = %18
store i32 0, i32* %12
br label %34
34: ; preds = %46, %33
%35 = load i32, i32* %12
%36 = icmp slt i32 %35, 32
br i1 %36, label %37, label %49
37: ; preds = %34
%38 = load i32*, i32** %8
%39 = load i32, i32* %12
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds i32, i32* %38, i64 %40
%42 = load i32, i32* %41
%43 = load i32, i32* %12
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds [672 x i32], [672 x i32]* %17, i64 0, i64 %44
store i32 %42, i32* %45
br label %46
46: ; preds = %37
%47 = load i32, i32* %12
%48 = add nsw i32 %47, 1
store i32 %48, i32* %12
br label %34
49: ; preds = %34
%50 = getelementptr inbounds [672 x i32], [672 x i32]* %17, i64 0, i64 0
%51 = load i32*, i32** %9
%52 = load i32*, i32** %10
%53 = call i32 @MessageExpansion512(i32* %50, i32* %51, i32* %52)
store i32 0, i32* %12
br label %54
54: ; preds = %329, %49
%55 = load i32, i32* %12
%56 = icmp slt i32 %55, 14
br i1 %56, label %57, label %332
57: ; preds = %54
store i32 0, i32* %13
br label %58
58: ; preds = %70, %57
%59 = load i32, i32* %13
%60 = icmp slt i32 %59, 4
br i1 %60, label %61, label %73
61: ; preds = %58
%62 = load i32, i32* %13
%63 = add nsw i32 4, %62
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds [16 x i32], [16 x i32]* %11, i64 0, i64 %64
%66 = load i32, i32* %65
%67 = load i32, i32* %13
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds [4 x i32], [4 x i32]* %14, i64 0, i64 %68
store i32 %66, i32* %69
br label %70
70: ; preds = %61
%71 = load i32, i32* %13
%72 = add nsw i32 %71, 1
store i32 %72, i32* %13
br label %58
73: ; preds = %58
%74 = getelementptr inbounds [4 x i32], [4 x i32]* %14, i64 0, i64 0
%75 = getelementptr inbounds [4 x i32], [4 x i32]* %15, i64 0, i64 0
%76 = getelementptr inbounds [672 x i32], [672 x i32]* %17, i64 0, i64 0
%77 = load i32, i32* %12
%78 = mul nsw i32 32, %77
%79 = sext i32 %78 to i64
%80 = getelementptr inbounds i32, i32* %76, i64 %79
%81 = call i32 @roundAESkeyfirst(i32* %74, i32* %75, i32* %80)
store i32 0, i32* %13
br label %82
82: ; preds = %93, %73
%83 = load i32, i32* %13
%84 = icmp slt i32 %83, 4
br i1 %84, label %85, label %96
85: ; preds = %82
%86 = load i32, i32* %13
%87 = sext i32 %86 to i64
%88 = getelementptr inbounds [4 x i32], [4 x i32]* %15, i64 0, i64 %87
%89 = load i32, i32* %88
%90 = load i32, i32* %13
%91 = sext i32 %90 to i64
%92 = getelementptr inbounds [4 x i32], [4 x i32]* %14, i64 0, i64 %91
store i32 %89, i32* %92
br label %93
93: ; preds = %85
%94 = load i32, i32* %13
%95 = add nsw i32 %94, 1
store i32 %95, i32* %13
br label %82
96: ; preds = %82
%97 = getelementptr inbounds [4 x i32], [4 x i32]* %14, i64 0, i64 0
%98 = getelementptr inbounds [4 x i32], [4 x i32]* %15, i64 0, i64 0
%99 = getelementptr inbounds [672 x i32], [672 x i32]* %17, i64 0, i64 0
%100 = load i32, i32* %12
%101 = mul nsw i32 32, %100
%102 = sext i32 %101 to i64
%103 = getelementptr inbounds i32, i32* %99, i64 %102
%104 = getelementptr inbounds i32, i32* %103, i64 4
%105 = call i32 @roundAESkeyfirst(i32* %97, i32* %98, i32* %104)
store i32 0, i32* %13
br label %106
106: ; preds = %117, %96
%107 = load i32, i32* %13
%108 = icmp slt i32 %107, 4
br i1 %108, label %109, label %120
109: ; preds = %106
%110 = load i32, i32* %13
%111 = sext i32 %110 to i64
%112 = getelementptr inbounds [4 x i32], [4 x i32]* %15, i64 0, i64 %111
%113 = load i32, i32* %112
%114 = load i32, i32* %13
%115 = sext i32 %114 to i64
%116 = getelementptr inbounds [4 x i32], [4 x i32]* %14, i64 0, i64 %115
store i32 %113, i32* %116
br label %117
117: ; preds = %109
%118 = load i32, i32* %13
%119 = add nsw i32 %118, 1
store i32 %119, i32* %13
br label %106
120: ; preds = %106
%121 = getelementptr inbounds [4 x i32], [4 x i32]* %14, i64 0, i64 0
%122 = getelementptr inbounds [4 x i32], [4 x i32]* %15, i64 0, i64 0
%123 = getelementptr inbounds [672 x i32], [672 x i32]* %17, i64 0, i64 0
%124 = load i32, i32* %12
%125 = mul nsw i32 32, %124
%126 = sext i32 %125 to i64
%127 = getelementptr inbounds i32, i32* %123, i64 %126
%128 = getelementptr inbounds i32, i32* %127, i64 8
%129 = call i32 @roundAESkeyfirst(i32* %121, i32* %122, i32* %128)
store i32 0, i32* %13
br label %130
130: ; preds = %141, %120
%131 = load i32, i32* %13
%132 = icmp slt i32 %131, 4
br i1 %132, label %133, label %144
133: ; preds = %130
%134 = load i32, i32* %13
%135 = sext i32 %134 to i64
%136 = getelementptr inbounds [4 x i32], [4 x i32]* %15, i64 0, i64 %135
%137 = load i32, i32* %136
%138 = load i32, i32* %13
%139 = sext i32 %138 to i64
%140 = getelementptr inbounds [4 x i32], [4 x i32]* %14, i64 0, i64 %139
store i32 %137, i32* %140
br label %141
141: ; preds = %133
%142 = load i32, i32* %13
%143 = add nsw i32 %142, 1
store i32 %143, i32* %13
br label %130
144: ; preds = %130
%145 = getelementptr inbounds [4 x i32], [4 x i32]* %14, i64 0, i64 0
%146 = getelementptr inbounds [4 x i32], [4 x i32]* %15, i64 0, i64 0
%147 = getelementptr inbounds [672 x i32], [672 x i32]* %17, i64 0, i64 0
%148 = load i32, i32* %12
%149 = mul nsw i32 32, %148
%150 = sext i32 %149 to i64
%151 = getelementptr inbounds i32, i32* %147, i64 %150
%152 = getelementptr inbounds i32, i32* %151, i64 12
%153 = call i32 @roundAESkeyfirst(i32* %145, i32* %146, i32* %152)
store i32 0, i32* %13
br label %154
154: ; preds = %167, %144
%155 = load i32, i32* %13
%156 = icmp slt i32 %155, 4
br i1 %156, label %157, label %170
157: ; preds = %154
%158 = load i32, i32* %13
%159 = sext i32 %158 to i64
%160 = getelementptr inbounds [4 x i32], [4 x i32]* %15, i64 0, i64 %159
%161 = load i32, i32* %160
%162 = load i32, i32* %13
%163 = sext i32 %162 to i64
%164 = getelementptr inbounds [16 x i32], [16 x i32]* %11, i64 0, i64 %163
%165 = load i32, i32* %164
%166 = xor i32 %165, %161
store i32 %166, i32* %164
br label %167
167: ; preds = %157
%168 = load i32, i32* %13
%169 = add nsw i32 %168, 1
store i32 %169, i32* %13
br label %154
170: ; preds = %154
store i32 0, i32* %13
br label %171
171: ; preds = %183, %170
%172 = load i32, i32* %13
%173 = icmp slt i32 %172, 4
br i1 %173, label %174, label %186
174: ; preds = %171
%175 = load i32, i32* %13
%176 = add nsw i32 12, %175
%177 = sext i32 %176 to i64
%178 = getelementptr inbounds [16 x i32], [16 x i32]* %11, i64 0, i64 %177
%179 = load i32, i32* %178
%180 = load i32, i32* %13
%181 = sext i32 %180 to i64
%182 = getelementptr inbounds [4 x i32], [4 x i32]* %14, i64 0, i64 %181
store i32 %179, i32* %182
br label %183
183: ; preds = %174
%184 = load i32, i32* %13
%185 = add nsw i32 %184, 1
store i32 %185, i32* %13
br label %171
186: ; preds = %171
%187 = getelementptr inbounds [4 x i32], [4 x i32]* %14, i64 0, i64 0
%188 = getelementptr inbounds [4 x i32], [4 x i32]* %15, i64 0, i64 0
%189 = getelementptr inbounds [672 x i32], [672 x i32]* %17, i64 0, i64 0
%190 = load i32, i32* %12
%191 = mul nsw i32 32, %190
%192 = sext i32 %191 to i64
%193 = getelementptr inbounds i32, i32* %189, i64 %192
%194 = getelementptr inbounds i32, i32* %193, i64 16
%195 = call i32 @roundAESkeyfirst(i32* %187, i32* %188, i32* %194)
store i32 0, i32* %13
br label %196
196: ; preds = %207, %186
%197 = load i32, i32* %13
%198 = icmp slt i32 %197, 4
br i1 %198, label %199, label %210
199: ; preds = %196
%200 = load i32, i32* %13
%201 = sext i32 %200 to i64
%202 = getelementptr inbounds [4 x i32], [4 x i32]* %15, i64 0, i64 %201
%203 = load i32, i32* %202
%204 = load i32, i32* %13
%205 = sext i32 %204 to i64
%206 = getelementptr inbounds [4 x i32], [4 x i32]* %14, i64 0, i64 %205
store i32 %203, i32* %206
br label %207
207: ; preds = %199
%208 = load i32, i32* %13
%209 = add nsw i32 %208, 1
store i32 %209, i32* %13
br label %196
210: ; preds = %196
%211 = getelementptr inbounds [4 x i32], [4 x i32]* %14, i64 0, i64 0
%212 = getelementptr inbounds [4 x i32], [4 x i32]* %15, i64 0, i64 0
%213 = getelementptr inbounds [672 x i32], [672 x i32]* %17, i64 0, i64 0
%214 = load i32, i32* %12
%215 = mul nsw i32 32, %214
%216 = sext i32 %215 to i64
%217 = getelementptr inbounds i32, i32* %213, i64 %216
%218 = getelementptr inbounds i32, i32* %217, i64 20
%219 = call i32 @roundAESkeyfirst(i32* %211, i32* %212, i32* %218)
store i32 0, i32* %13
br label %220
220: ; preds = %231, %210
%221 = load i32, i32* %13
%222 = icmp slt i32 %221, 4
br i1 %222, label %223, label %234
223: ; preds = %220
%224 = load i32, i32* %13
%225 = sext i32 %224 to i64
%226 = getelementptr inbounds [4 x i32], [4 x i32]* %15, i64 0, i64 %225
%227 = load i32, i32* %226
%228 = load i32, i32* %13
%229 = sext i32 %228 to i64
%230 = getelementptr inbounds [4 x i32], [4 x i32]* %14, i64 0, i64 %229
store i32 %227, i32* %230
br label %231
231: ; preds = %223
%232 = load i32, i32* %13
%233 = add nsw i32 %232, 1
store i32 %233, i32* %13
br label %220
234: ; preds = %220
%235 = getelementptr inbounds [4 x i32], [4 x i32]* %14, i64 0, i64 0
%236 = getelementptr inbounds [4 x i32], [4 x i32]* %15, i64 0, i64 0
%237 = getelementptr inbounds [672 x i32], [672 x i32]* %17, i64 0, i64 0
%238 = load i32, i32* %12
%239 = mul nsw i32 32, %238
%240 = sext i32 %239 to i64
%241 = getelementptr inbounds i32, i32* %237, i64 %240
%242 = getelementptr inbounds i32, i32* %241, i64 24
%243 = call i32 @roundAESkeyfirst(i32* %235, i32* %236, i32* %242)
store i32 0, i32* %13
br label %244
244: ; preds = %255, %234
%245 = load i32, i32* %13
%246 = icmp slt i32 %245, 4
br i1 %246, label %247, label %258
247: ; preds = %244
%248 = load i32, i32* %13
%249 = sext i32 %248 to i64
%250 = getelementptr inbounds [4 x i32], [4 x i32]* %15, i64 0, i64 %249
%251 = load i32, i32* %250
%252 = load i32, i32* %13
%253 = sext i32 %252 to i64
%254 = getelementptr inbounds [4 x i32], [4 x i32]* %14, i64 0, i64 %253
store i32 %251, i32* %254
br label %255
255: ; preds = %247
%256 = load i32, i32* %13
%257 = add nsw i32 %256, 1
store i32 %257, i32* %13
br label %244
258: ; preds = %244
%259 = getelementptr inbounds [4 x i32], [4 x i32]* %14, i64 0, i64 0
%260 = getelementptr inbounds [4 x i32], [4 x i32]* %15, i64 0, i64 0
%261 = getelementptr inbounds [672 x i32], [672 x i32]* %17, i64 0, i64 0
%262 = load i32, i32* %12
%263 = mul nsw i32 32, %262
%264 = sext i32 %263 to i64
%265 = getelementptr inbounds i32, i32* %261, i64 %264
%266 = getelementptr inbounds i32, i32* %265, i64 28
%267 = call i32 @roundAESkeyfirst(i32* %259, i32* %260, i32* %266)
store i32 0, i32* %13
br label %268
268: ; preds = %282, %258
%269 = load i32, i32* %13
%270 = icmp slt i32 %269, 4
br i1 %270, label %271, label %285
271: ; preds = %268
%272 = load i32, i32* %13
%273 = sext i32 %272 to i64
%274 = getelementptr inbounds [4 x i32], [4 x i32]* %15, i64 0, i64 %273
%275 = load i32, i32* %274
%276 = load i32, i32* %13
%277 = add nsw i32 8, %276
%278 = sext i32 %277 to i64
%279 = getelementptr inbounds [16 x i32], [16 x i32]* %11, i64 0, i64 %278
%280 = load i32, i32* %279
%281 = xor i32 %280, %275
store i32 %281, i32* %279
br label %282
282: ; preds = %271
%283 = load i32, i32* %13
%284 = add nsw i32 %283, 1
store i32 %284, i32* %13
br label %268
285: ; preds = %268
store i32 0, i32* %13
br label %286
286: ; preds = %325, %285
%287 = load i32, i32* %13
%288 = icmp slt i32 %287, 4
br i1 %288, label %289, label %328
289: ; preds = %286
%290 = load i32, i32* %13
%291 = sext i32 %290 to i64
%292 = getelementptr inbounds [16 x i32], [16 x i32]* %11, i64 0, i64 %291
%293 = load i32, i32* %292
store i32 %293, i32* %16
%294 = load i32, i32* %13
%295 = add nsw i32 %294, 4
%296 = sext i32 %295 to i64
%297 = getelementptr inbounds [16 x i32], [16 x i32]* %11, i64 0, i64 %296
%298 = load i32, i32* %297
%299 = load i32, i32* %13
%300 = sext i32 %299 to i64
%301 = getelementptr inbounds [16 x i32], [16 x i32]* %11, i64 0, i64 %300
store i32 %298, i32* %301
%302 = load i32, i32* %13
%303 = add nsw i32 %302, 8
%304 = sext i32 %303 to i64
%305 = getelementptr inbounds [16 x i32], [16 x i32]* %11, i64 0, i64 %304
%306 = load i32, i32* %305
%307 = load i32, i32* %13
%308 = add nsw i32 %307, 4
%309 = sext i32 %308 to i64
%310 = getelementptr inbounds [16 x i32], [16 x i32]* %11, i64 0, i64 %309
store i32 %306, i32* %310
%311 = load i32, i32* %13
%312 = add nsw i32 %311, 12
%313 = sext i32 %312 to i64
%314 = getelementptr inbounds [16 x i32], [16 x i32]* %11, i64 0, i64 %313
%315 = load i32, i32* %314
%316 = load i32, i32* %13
%317 = add nsw i32 %316, 8
%318 = sext i32 %317 to i64
%319 = getelementptr inbounds [16 x i32], [16 x i32]* %11, i64 0, i64 %318
store i32 %315, i32* %319
%320 = load i32, i32* %16
%321 = load i32, i32* %13
%322 = add nsw i32 %321, 12
%323 = sext i32 %322 to i64
%324 = getelementptr inbounds [16 x i32], [16 x i32]* %11, i64 0, i64 %323
store i32 %320, i32* %324
br label %325
325: ; preds = %289
%326 = load i32, i32* %13
%327 = add nsw i32 %326, 1
store i32 %327, i32* %13
br label %286
328: ; preds = %286
br label %329
329: ; preds = %328
%330 = load i32, i32* %12
%331 = add nsw i32 %330, 1
store i32 %331, i32* %12
br label %54
332: ; preds = %54
store i32 0, i32* %12
br label %333
333: ; preds = %345, %332
%334 = load i32, i32* %12
%335 = icmp slt i32 %334, 16
br i1 %335, label %336, label %348
336: ; preds = %333
%337 = load i32, i32* %12
%338 = sext i32 %337 to i64
%339 = getelementptr inbounds [16 x i32], [16 x i32]* %11, i64 0, i64 %338
%340 = load i32, i32* %339
%341 = load i32*, i32** %7
%342 = load i32, i32* %12
%343 = sext i32 %342 to i64
%344 = getelementptr inbounds i32, i32* %341, i64 %343
store i32 %340, i32* %344
br label %345
345: ; preds = %336
%346 = load i32, i32* %12
%347 = add nsw i32 %346, 1
store i32 %347, i32* %12
br label %333
348: ; preds = %333
ret void
}

LLVM IR (-O2):
define void @E512(i32* nocapture %0, i32* nocapture writeonly %1, i32* nocapture %2, i32* %3, i32* %4) {
%6 = bitcast i32* %2 to i8*
%7 = alloca <4 x i32>
%8 = bitcast <4 x i32>* %7 to i8*
%9 = alloca <4 x i32>
%10 = bitcast <4 x i32>* %9 to i8*
%11 = alloca [672 x i32]
%12 = bitcast [672 x i32]* %11 to i8*
%13 = bitcast i32* %0 to <4 x i32>*
%14 = load <4 x i32>, <4 x i32>* %13
%15 = getelementptr inbounds i32, i32* %0, i64 4
%16 = bitcast i32* %15 to <4 x i32>*
%17 = load <4 x i32>, <4 x i32>* %16
%18 = getelementptr inbounds i32, i32* %0, i64 8
%19 = bitcast i32* %18 to <4 x i32>*
%20 = load <4 x i32>, <4 x i32>* %19
%21 = getelementptr inbounds i32, i32* %0, i64 12
%22 = bitcast i32* %21 to <4 x i32>*
%23 = load <4 x i32>, <4 x i32>* %22
%24 = getelementptr inbounds [672 x i32], [672 x i32]* %11, i64 0, i64 0
%25 = call i32 @MessageExpansion512(i32* %24, i32* %3, i32* %4)
%26 = getelementptr inbounds <4 x i32>, <4 x i32>* %7, i64 0, i64 0
%27 = getelementptr inbounds <4 x i32>, <4 x i32>* %9, i64 0, i64 0
br label %28
28: ; preds = %5, %28
%29 = phi i64 [ 0, %5 ], [ %55, %28 ]
%30 = phi <4 x i32> [ %20, %5 ], [ %31, %28 ]
%31 = phi <4 x i32> [ %23, %5 ], [ %44, %28 ]
%32 = phi <4 x i32> [ %14, %5 ], [ %33, %28 ]
%33 = phi <4 x i32> [ %17, %5 ], [ %54, %28 ]
store <4 x i32> %33, <4 x i32>* %7
%34 = shl nsw i64 %29, 5
%35 = getelementptr inbounds [672 x i32], [672 x i32]* %11, i64 0, i64 %34
%36 = call i32 @roundAESkeyfirst(i32* %26, i32* %27, i32* %35)
%37 = getelementptr inbounds i32, i32* %35, i64 4
%38 = call i32 @roundAESkeyfirst(i32* %26, i32* %27, i32* %37)
%39 = getelementptr inbounds i32, i32* %35, i64 8
%40 = call i32 @roundAESkeyfirst(i32* %26, i32* %27, i32* %39)
%41 = getelementptr inbounds i32, i32* %35, i64 12
%42 = call i32 @roundAESkeyfirst(i32* %26, i32* %27, i32* %41)
%43 = load <4 x i32>, <4 x i32>* %9
%44 = xor <4 x i32> %32, %43
store <4 x i32> %31, <4 x i32>* %7
%45 = getelementptr inbounds i32, i32* %35, i64 16
%46 = call i32 @roundAESkeyfirst(i32* %26, i32* %27, i32* %45)
%47 = getelementptr inbounds i32, i32* %35, i64 20
%48 = call i32 @roundAESkeyfirst(i32* %26, i32* %27, i32* %47)
%49 = getelementptr inbounds i32, i32* %35, i64 24
%50 = call i32 @roundAESkeyfirst(i32* %26, i32* %27, i32* %49)
%51 = getelementptr inbounds i32, i32* %35, i64 28
%52 = call i32 @roundAESkeyfirst(i32* %26, i32* %27, i32* %51)
%53 = load <4 x i32>, <4 x i32>* %9
%54 = xor <4 x i32> %30, %53
%55 = add nuw nsw i64 %29, 1
%56 = icmp eq i64 %55, 14
br i1 %56, label %57, label %28
57: ; preds = %28
%58 = bitcast i32* %1 to <4 x i32>*
store <4 x i32> %33, <4 x i32>* %58
%59 = getelementptr inbounds i32, i32* %1, i64 4
%60 = bitcast i32* %59 to <4 x i32>*
store <4 x i32> %54, <4 x i32>* %60
%61 = getelementptr inbounds i32, i32* %1, i64 8
%62 = bitcast i32* %61 to <4 x i32>*
store <4 x i32> %31, <4 x i32>* %62
%63 = getelementptr inbounds i32, i32* %1, i64 12
%64 = bitcast i32* %63 to <4 x i32>*
store <4 x i32> %44, <4 x i32>* %64
ret void
}