#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 uint8_t;
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int *rijndael_key_schedule(int *, int);
int main() {
  uint8_t key[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
  uint8_t *key_schedule = rijndael_key_schedule(key, 128);
  for (int x = 0; x < 240; x++) {
    if (x % 4 == 0)
      printf("%08x ", *(uint32_t *)&key_schedule[x]);
    if ((x + 1) % 16 == 0 && x != 0)
      printf("\n");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x90(%rbp),%rdi
xor    %esi,%esi
mov    $0x80,%edx
call   1040 <memset@plt>
lea    -0x90(%rbp),%rdi
mov    $0x80,%esi
call   1050 <rijndael_key_schedule@plt>
mov    %rax,-0x98(%rbp)
movl   $0x0,-0x9c(%rbp)
cmpl   $0xf0,-0x9c(%rbp)
jge    120b <main+0xdb>
mov    -0x9c(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11bd <main+0x8d>
mov    -0x98(%rbp),%rax
movslq -0x9c(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xe4a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x9c(%rbp),%eax
add    $0x1,%eax
mov    $0x10,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11f2 <main+0xc2>
cmpl   $0x0,-0x9c(%rbp)
je     11f2 <main+0xc2>
lea    0xe1b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11f7 <main+0xc7>
mov    -0x9c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9c(%rbp)
jmp    1177 <main+0x47>
mov    -0x4(%rbp),%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x88,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x80,%esi
call   1050 <rijndael_key_schedule@plt>
mov    %rax,%r15
lea    0xe81(%rip),%r14
xor    %r12d,%r12d
jmp    1199 <main+0x69>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
cmp    $0xf0,%r12
je     11cf <main+0x9f>
mov    %r12,%rbx
test   $0x3,%bl
jne    11af <main+0x7f>
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x1(%rbx),%r12
test   %rbx,%rbx
je     1190 <main+0x60>
mov    %r12d,%eax
and    $0xf,%eax
test   %rax,%rax
jne    1190 <main+0x60>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    1190 <main+0x60>
xor    %eax,%eax
add    $0x88,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%08x \00"
@.str.1 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [32 x i32]
%3 = alloca i32*
%4 = alloca i32
store i32 0, i32* %1
%5 = bitcast [32 x i32]* %2 to i8*
%6 = getelementptr inbounds [32 x i32], [32 x i32]* %2, i64 0, i64 0
%7 = call i32* @rijndael_key_schedule(i32* %6, i32 128)
store i32* %7, i32** %3
store i32 0, i32* %4
br label %8
8: ; preds = %33, %0
%9 = load i32, i32* %4
%10 = icmp slt i32 %9, 240
br i1 %10, label %11, label %36
11: ; preds = %8
%12 = load i32, i32* %4
%13 = srem i32 %12, 4
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %22
15: ; preds = %11
%16 = load i32*, i32** %3
%17 = load i32, i32* %4
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i32, i32* %16, i64 %18
%20 = load i32, i32* %19
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %20)
br label %22
22: ; preds = %15, %11
%23 = load i32, i32* %4
%24 = add nsw i32 %23, 1
%25 = srem i32 %24, 16
%26 = icmp eq i32 %25, 0
br i1 %26, label %27, label %32
27: ; preds = %22
%28 = load i32, i32* %4
%29 = icmp ne i32 %28, 0
br i1 %29, label %30, label %32
30: ; preds = %27
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %32
32: ; preds = %30, %27, %22
br label %33
33: ; preds = %32
%34 = load i32, i32* %4
%35 = add nsw i32 %34, 1
store i32 %35, i32* %4
br label %8
36: ; preds = %8
%37 = load i32, i32* %1
ret i32 %37
}

LLVM IR (-O2):
@.str = [6 x i8] c"%08x \00"
define i32 @main() {
%1 = alloca [32 x i32]
%2 = bitcast [32 x i32]* %1 to i8*
%3 = getelementptr inbounds [32 x i32], [32 x i32]* %1, i64 0, i64 0
%4 = call i32* @rijndael_key_schedule(i32* %3, i32 128)
br label %6
5: ; preds = %22
ret i32 0
6: ; preds = %0, %22
%7 = phi i64 [ 0, %0 ], [ %15, %22 ]
%8 = and i64 %7, 3
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %14
10: ; preds = %6
%11 = getelementptr inbounds i32, i32* %4, i64 %7
%12 = load i32, i32* %11
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %12)
br label %14
14: ; preds = %10, %6
%15 = add nuw nsw i64 %7, 1
%16 = and i64 %15, 15
%17 = icmp eq i64 %16, 0
%18 = icmp ne i64 %7, 0
%19 = and i1 %18, %17
br i1 %19, label %20, label %22
20: ; preds = %14
%21 = call i32 @putchar(i32 10)
br label %22
22: ; preds = %14, %20
%23 = icmp eq i64 %15, 240
br i1 %23, label %5, label %6
}