#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 */

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int aes_print_key_expanded(const char key_expanded[][4 * (10 + 1)]) {
  int i;
  int j;
  printf("key_expanded is:\n");
  for (i = 0; i < 4; i++) {
    for (j = 0; j < 4 * (10 + 1); j++) {
      printf("0x%02x  ", key_expanded[i][j] & 0x000000ff);
    }
    printf("\n");
  }
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<aes_print_key_expanded>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0xc(%rbp)
cmpl   $0x4,-0xc(%rbp)
jge    11a1 <aes_print_key_expanded+0x91>
movl   $0x0,-0x10(%rbp)
cmpl   $0x2c,-0x10(%rbp)
jge    1185 <aes_print_key_expanded+0x75>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
imul   $0x2c,%rcx,%rcx
add    %rcx,%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%esi
and    $0xff,%esi
lea    0xea2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1142 <aes_print_key_expanded+0x32>
lea    0xe84(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1131 <aes_print_key_expanded+0x21>
lea    0xe68(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aes_print_key_expanded>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r15
lea    0xeca(%rip),%rdi
call   1040 <puts@plt>
lea    0xeb5(%rip),%r14
xor    %ebx,%ebx
nopl   (%rax)
movzbl (%r15,%rbx,1),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%rbx
cmp    $0x2c,%rbx
jne    1150 <aes_print_key_expanded+0x20>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0xffffffffffffffd4,%rbx
lea    0xe7f(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movzbl 0x58(%r15,%rbx,1),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
inc    %rbx
jne    1190 <aes_print_key_expanded+0x60>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0xffffffffffffffd4,%rbx
lea    0xe43(%rip),%r14
nopl   (%rax)
movzbl 0x84(%r15,%rbx,1),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
inc    %rbx
jne    11c0 <aes_print_key_expanded+0x90>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0xffffffffffffffd4,%rbx
lea    0xe10(%rip),%r14
movzbl 0xb0(%r15,%rbx,1),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
inc    %rbx
jne    11f0 <aes_print_key_expanded+0xc0>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str.1 = [9 x i8] c"0x%02x \00"
@str = [17 x i8] c"key_expanded is:\00"
define i32 @aes_print_key_expanded([44 x i8]* nocapture %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
br label %3
3: ; preds = %1, %3
%4 = phi i64 [ 0, %1 ], [ %9, %3 ]
%5 = getelementptr inbounds [44 x i8], [44 x i8]* %0, i64 0, i64 %4
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %7)
%9 = add nuw nsw i64 %4, 1
%10 = icmp eq i64 %9, 44
br i1 %10, label %11, label %3
11: ; preds = %3
%12 = tail call i32 @putchar(i32 10)
br label %13
13: ; preds = %13, %11
%14 = phi i64 [ 0, %11 ], [ %19, %13 ]
%15 = getelementptr inbounds [44 x i8], [44 x i8]* %0, i64 1, i64 %14
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %17)
%19 = add nuw nsw i64 %14, 1
%20 = icmp eq i64 %19, 44
br i1 %20, label %21, label %13
21: ; preds = %13
%22 = tail call i32 @putchar(i32 10)
br label %23
23: ; preds = %23, %21
%24 = phi i64 [ 0, %21 ], [ %29, %23 ]
%25 = getelementptr inbounds [44 x i8], [44 x i8]* %0, i64 2, i64 %24
%26 = load i8, i8* %25
%27 = zext i8 %26 to i32
%28 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %27)
%29 = add nuw nsw i64 %24, 1
%30 = icmp eq i64 %29, 44
br i1 %30, label %31, label %23
31: ; preds = %23
%32 = tail call i32 @putchar(i32 10)
br label %33
33: ; preds = %33, %31
%34 = phi i64 [ 0, %31 ], [ %39, %33 ]
%35 = getelementptr inbounds [44 x i8], [44 x i8]* %0, i64 3, i64 %34
%36 = load i8, i8* %35
%37 = zext i8 %36 to i32
%38 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %37)
%39 = add nuw nsw i64 %34, 1
%40 = icmp eq i64 %39, 44
br i1 %40, label %41, label %33
41: ; preds = %33
%42 = tail call i32 @putchar(i32 10)
%43 = tail call i32 @putchar(i32 10)
ret i32 0
}