int main() {
  struct oz {
    char actor[18];
    int age;
    char role[16];
  };
  struct oz cast[6] = {"Judy Garland",      17, "Dorothy",
                       "Ray Bolger",        35, "Scarecrow",
                       "Bert Lahr",         44, "Cowardly Lion",
                       "Jack Haley",        40, "Tin Woodsman",
                       "Margaret Hamilton", 37, "Wicked Witch",
                       "Frank Morgan",      49, "The Wizard"};
  int line, x, y;
  struct oz temp;
  temp = cast[4];
  cast[4] = cast[5];
  cast[5] = temp;
  for (x = 0; x < 6 - 1; x++)
    for (y = x + 1; y < 6; y++)
      if (cast[x].age > cast[y].age) {
        temp = cast[y];
        cast[y] = cast[x];
        cast[x] = temp;
      };
  puts("\t\tWizard of Oz Database\n\n");
  printf("%-18s\t%3s\t%-15s\n", "Actor", "Age", "Role");
  for (line = 0; line < 40; line++)
    putchar('-');
  putchar('\n');
  for (x = 0; x < 6; x++)
    printf("%-18s\t%3d\t%-15s\n", cast[x].actor, cast[x].age, cast[x].role);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x140,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x100(%rbp),%rdi
lea    0xea0(%rip),%rsi
mov    $0xf0,%edx
call   1060 <memcpy@plt>
lea    -0x100(%rbp),%rsi
add    $0xa0,%rsi
lea    -0x138(%rbp),%rdi
mov    $0x28,%edx
call   1060 <memcpy@plt>
lea    -0x100(%rbp),%rdi
add    $0xa0,%rdi
lea    -0x100(%rbp),%rsi
add    $0xc8,%rsi
mov    $0x28,%edx
call   1060 <memcpy@plt>
lea    -0x100(%rbp),%rdi
add    $0xc8,%rdi
lea    -0x138(%rbp),%rsi
mov    $0x28,%edx
call   1060 <memcpy@plt>
movl   $0x0,-0x108(%rbp)
cmpl   $0x5,-0x108(%rbp)
jge    12e9 <main+0x1a9>
mov    -0x108(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10c(%rbp)
cmpl   $0x6,-0x10c(%rbp)
jge    12d0 <main+0x190>
movslq -0x108(%rbp),%rcx
lea    -0x100(%rbp),%rax
imul   $0x28,%rcx,%rcx
add    %rcx,%rax
mov    0x14(%rax),%eax
movslq -0x10c(%rbp),%rdx
lea    -0x100(%rbp),%rcx
imul   $0x28,%rdx,%rdx
add    %rdx,%rcx
cmp    0x14(%rcx),%eax
jle    12b7 <main+0x177>
movslq -0x10c(%rbp),%rax
lea    -0x100(%rbp),%rsi
imul   $0x28,%rax,%rax
add    %rax,%rsi
lea    -0x138(%rbp),%rdi
mov    $0x28,%edx
call   1060 <memcpy@plt>
movslq -0x10c(%rbp),%rax
lea    -0x100(%rbp),%rdi
imul   $0x28,%rax,%rax
add    %rax,%rdi
movslq -0x108(%rbp),%rax
lea    -0x100(%rbp),%rsi
imul   $0x28,%rax,%rax
add    %rax,%rsi
mov    $0x28,%edx
call   1060 <memcpy@plt>
movslq -0x108(%rbp),%rax
lea    -0x100(%rbp),%rdi
imul   $0x28,%rax,%rax
add    %rax,%rdi
lea    -0x138(%rbp),%rsi
mov    $0x28,%edx
call   1060 <memcpy@plt>
jmp    12bc <main+0x17c>
mov    -0x10c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10c(%rbp)
jmp    11f4 <main+0xb4>
jmp    12d5 <main+0x195>
mov    -0x108(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x108(%rbp)
jmp    11d8 <main+0x98>
lea    0xe00(%rip),%rdi
mov    $0x0,%al
call   1040 <puts@plt>
lea    0xe0c(%rip),%rdi
lea    0xe16(%rip),%rsi
lea    0xe15(%rip),%rdx
lea    0xe12(%rip),%rcx
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x104(%rbp)
cmpl   $0x28,-0x104(%rbp)
jge    1351 <main+0x211>
mov    $0x2d,%edi
mov    $0x0,%al
call   1030 <putchar@plt>
mov    -0x104(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x104(%rbp)
jmp    1324 <main+0x1e4>
mov    $0xa,%edi
mov    $0x0,%al
call   1030 <putchar@plt>
movl   $0x0,-0x108(%rbp)
cmpl   $0x6,-0x108(%rbp)
jge    13dc <main+0x29c>
movslq -0x108(%rbp),%rax
lea    -0x100(%rbp),%rsi
imul   $0x28,%rax,%rax
add    %rax,%rsi
movslq -0x108(%rbp),%rcx
lea    -0x100(%rbp),%rax
imul   $0x28,%rcx,%rcx
add    %rcx,%rax
mov    0x14(%rax),%edx
movslq -0x108(%rbp),%rax
lea    -0x100(%rbp),%rcx
imul   $0x28,%rax,%rax
add    %rax,%rcx
add    $0x18,%rcx
lea    0xd69(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x108(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x108(%rbp)
jmp    1367 <main+0x227>
xor    %eax,%eax
add    $0x140,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x120,%rsp
lea    0xead(%rip),%rsi
lea    0x30(%rsp),%rdi
mov    $0xf0,%edx
call   1060 <memcpy@plt>
lea    0xd0(%rsp),%r14
mov    0xf0(%rsp),%rax
mov    %rax,0x20(%rsp)
movaps 0xd0(%rsp),%xmm0
movaps 0xe0(%rsp),%xmm1
movaps %xmm1,0x10(%rsp)
movaps %xmm0,(%rsp)
movups 0x108(%rsp),%xmm2
movaps %xmm2,0xe0(%rsp)
movups 0xf8(%rsp),%xmm2
movaps %xmm2,0xd0(%rsp)
mov    0x118(%rsp),%rcx
mov    %rcx,0xf0(%rsp)
movups %xmm0,0xf8(%rsp)
movups %xmm1,0x108(%rsp)
mov    %rax,0x118(%rsp)
mov    $0x11,%eax
cmpl   $0x11,0xe4(%rsp)
11
jge    1245 <main+0x105>
mov    0x20(%r14),%rax
mov    %rax,0x20(%rsp)
movups (%r14),%xmm0
movups 0x10(%r14),%xmm1
movaps %xmm1,0x10(%rsp)
movaps %xmm0,(%rsp)
movaps 0xdf7(%rip),%xmm0
movaps %xmm0,(%r14)
movaps 0xdfc(%rip),%xmm0
movaps %xmm0,0x10(%r14)
mov    0xe00(%rip),%rax
mov    %rax,0x20(%r14)
movaps (%rsp),%xmm0
movaps 0x10(%rsp),%xmm1
movaps %xmm1,0x40(%rsp)
mov    0x20(%rsp),%rax
mov    %rax,0x50(%rsp)
movaps %xmm0,0x30(%rsp)
mov    0x44(%rsp),%eax
lea    0xf8(%rsp),%r15
cmp    0x10c(%rsp),%eax
jle    12aa <main+0x16a>
mov    0x20(%r15),%rax
mov    %rax,0x20(%rsp)
movups (%r15),%xmm0
movups 0x10(%r15),%xmm1
movaps %xmm1,0x10(%rsp)
movaps %xmm0,(%rsp)
mov    0x50(%rsp),%rax
mov    %rax,0x20(%r15)
movaps 0x30(%rsp),%xmm0
movaps 0x40(%rsp),%xmm1
movups %xmm1,0x10(%r15)
movups %xmm0,(%r15)
mov    0x20(%rsp),%rax
mov    %rax,0x50(%rsp)
movaps (%rsp),%xmm0
movaps 0x10(%rsp),%xmm1
movaps %xmm1,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
lea    0x58(%rsp),%rax
mov    $0x23,%ecx
cmpl   $0x22,0xe4(%rsp)
22
jg     130e <main+0x1ce>
mov    0x20(%r14),%rcx
mov    %rcx,0x20(%rsp)
movups (%r14),%xmm0
movups 0x10(%r14),%xmm1
movaps %xmm1,0x10(%rsp)
movaps %xmm0,(%rsp)
mov    0x20(%rax),%rcx
mov    %rcx,0x20(%r14)
movups (%rax),%xmm0
movups 0x10(%rax),%xmm1
movups %xmm1,0x10(%r14)
movups %xmm0,(%r14)
mov    0x20(%rsp),%rcx
mov    %rcx,0x20(%rax)
movaps (%rsp),%xmm0
movaps 0x10(%rsp),%xmm1
movups %xmm1,0x10(%rax)
movups %xmm0,(%rax)
mov    0x6c(%rsp),%ecx
cmp    0x10c(%rsp),%ecx
jle    1363 <main+0x223>
mov    0x20(%r15),%rcx
mov    %rcx,0x20(%rsp)
movups (%r15),%xmm0
movups 0x10(%r15),%xmm1
movaps %xmm1,0x10(%rsp)
movaps %xmm0,(%rsp)
mov    0x20(%rax),%rcx
mov    %rcx,0x20(%r15)
movups (%rax),%xmm0
movups 0x10(%rax),%xmm1
movups %xmm1,0x10(%r15)
movups %xmm0,(%r15)
mov    0x20(%rsp),%rcx
mov    %rcx,0x20(%rax)
movaps (%rsp),%xmm0
movaps 0x10(%rsp),%xmm1
movups %xmm1,0x10(%rax)
movups %xmm0,(%rax)
lea    0x80(%rsp),%rax
mov    0xc8(%rsp),%rcx
mov    %rcx,0x20(%rsp)
movups 0xb8(%rsp),%xmm0
movaps %xmm0,0x10(%rsp)
movups 0xa8(%rsp),%xmm1
movaps %xmm1,(%rsp)
movaps 0x80(%rsp),%xmm2
movaps 0x90(%rsp),%xmm3
movups %xmm2,0xa8(%rsp)
movups %xmm3,0xb8(%rsp)
mov    0xa0(%rsp),%rdx
mov    %rdx,0xc8(%rsp)
movaps %xmm0,0x90(%rsp)
movaps %xmm1,0x80(%rsp)
mov    %rcx,0xa0(%rsp)
mov    0x94(%rsp),%ecx
cmp    0xe4(%rsp),%ecx
jle    143c <main+0x2fc>
mov    0x20(%r14),%rcx
mov    %rcx,0x20(%rsp)
movups (%r14),%xmm0
movups 0x10(%r14),%xmm1
movaps %xmm1,0x10(%rsp)
movaps %xmm0,(%rsp)
mov    0x20(%rax),%rcx
mov    %rcx,0x20(%r14)
movaps (%rax),%xmm0
movaps 0x10(%rax),%xmm1
movaps %xmm1,0x10(%r14)
movaps %xmm0,(%r14)
mov    0x20(%rsp),%rcx
mov    %rcx,0x20(%rax)
movaps (%rsp),%xmm0
movaps 0x10(%rsp),%xmm1
movups %xmm1,0x10(%rax)
movups %xmm0,(%rax)
mov    0x94(%rsp),%ecx
cmp    0x10c(%rsp),%ecx
jle    1491 <main+0x351>
mov    0x20(%r15),%rcx
mov    %rcx,0x20(%rsp)
movups (%r15),%xmm0
movups 0x10(%r15),%xmm1
movaps %xmm1,0x10(%rsp)
movaps %xmm0,(%rsp)
mov    0x20(%rax),%rcx
mov    %rcx,0x20(%r15)
movups (%rax),%xmm0
movups 0x10(%rax),%xmm1
movups %xmm1,0x10(%r15)
movups %xmm0,(%r15)
mov    0x20(%rsp),%rcx
mov    %rcx,0x20(%rax)
movaps (%rsp),%xmm0
movaps 0x10(%rsp),%xmm1
movups %xmm1,0x10(%rax)
movups %xmm0,(%rax)
lea    0xa8(%rsp),%rax
mov    0xbc(%rsp),%ecx
cmp    0xe4(%rsp),%ecx
jle    14fc <main+0x3bc>
mov    0x20(%r14),%rcx
mov    %rcx,0x20(%rsp)
movups (%r14),%xmm0
movups 0x10(%r14),%xmm1
movaps %xmm1,0x10(%rsp)
movaps %xmm0,(%rsp)
mov    0x20(%rax),%rcx
mov    %rcx,0x20(%r14)
movups (%rax),%xmm0
movups 0x10(%rax),%xmm1
movups %xmm1,0x10(%r14)
movups %xmm0,(%r14)
mov    0x20(%rsp),%rcx
mov    %rcx,0x20(%rax)
movaps (%rsp),%xmm0
movaps 0x10(%rsp),%xmm1
movups %xmm1,0x10(%rax)
movups %xmm0,(%rax)
mov    0xbc(%rsp),%ecx
cmp    0x10c(%rsp),%ecx
jle    1551 <main+0x411>
mov    0x20(%r15),%rcx
mov    %rcx,0x20(%rsp)
movups (%r15),%xmm0
movups 0x10(%r15),%xmm1
movaps %xmm1,0x10(%rsp)
movaps %xmm0,(%rsp)
mov    0x20(%rax),%rcx
mov    %rcx,0x20(%r15)
movups (%rax),%xmm0
movups 0x10(%rax),%xmm1
movups %xmm1,0x10(%r15)
movups %xmm0,(%r15)
mov    0x20(%rsp),%rcx
mov    %rcx,0x20(%rax)
movaps (%rsp),%xmm0
movaps 0x10(%rsp),%xmm1
movups %xmm1,0x10(%rax)
movups %xmm0,(%rax)
mov    0xe4(%rsp),%eax
cmp    0x10c(%rsp),%eax
jle    15b1 <main+0x471>
mov    0x20(%r15),%rax
mov    %rax,0x20(%rsp)
movups (%r15),%xmm0
movups 0x10(%r15),%xmm1
movaps %xmm1,0x10(%rsp)
movaps %xmm0,(%rsp)
mov    0x20(%r14),%rax
mov    %rax,0x20(%r15)
movups (%r14),%xmm0
movups 0x10(%r14),%xmm1
movups %xmm1,0x10(%r15)
movups %xmm0,(%r15)
mov    0x20(%rsp),%rax
mov    %rax,0x20(%r14)
movaps (%rsp),%xmm0
movaps 0x10(%rsp),%xmm1
movups %xmm1,0x10(%r14)
movups %xmm0,(%r14)
lea    0xb38(%rip),%rdi
xor    %eax,%eax
call   1040 <puts@plt>
lea    0xb44(%rip),%rdi
lea    0xb4e(%rip),%rsi
lea    0xb4d(%rip),%rdx
lea    0xb4a(%rip),%rcx
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x2d,%edi
xor    %eax,%eax
call   1030 <putchar@plt>
mov    $0x2d,%edi
xor    %eax,%eax
call   1030 <putchar@plt>
mov    $0x2d,%edi
xor    %eax,%eax
call   1030 <putchar@plt>
mov    $0x2d,%edi
xor    %eax,%eax
call   1030 <putchar@plt>
mov    $0x2d,%edi
xor    %eax,%eax
call   1030 <putchar@plt>
mov    $0x2d,%edi
xor    %eax,%eax
call   1030 <putchar@plt>
mov    $0x2d,%edi
xor    %eax,%eax
call   1030 <putchar@plt>
mov    $0x2d,%edi
xor    %eax,%eax
call   1030 <putchar@plt>
mov    $0x2d,%edi
xor    %eax,%eax
call   1030 <putchar@plt>
mov    $0x2d,%edi
xor    %eax,%eax
call   1030 <putchar@plt>
mov    $0x2d,%edi
xor    %eax,%eax
call   1030 <putchar@plt>
mov    $0x2d,%edi
xor    %eax,%eax
call   1030 <putchar@plt>
mov    $0x2d,%edi
xor    %eax,%eax
call   1030 <putchar@plt>
mov    $0x2d,%edi
xor    %eax,%eax
call   1030 <putchar@plt>
mov    $0x2d,%edi
xor    %eax,%eax
call   1030 <putchar@plt>
mov    $0x2d,%edi
xor    %eax,%eax
call   1030 <putchar@plt>
mov    $0x2d,%edi
xor    %eax,%eax
call   1030 <putchar@plt>
mov    $0x2d,%edi
xor    %eax,%eax
call   1030 <putchar@plt>
mov    $0x2d,%edi
xor    %eax,%eax
call   1030 <putchar@plt>
mov    $0x2d,%edi
xor    %eax,%eax
call   1030 <putchar@plt>
mov    $0x2d,%edi
xor    %eax,%eax
call   1030 <putchar@plt>
mov    $0x2d,%edi
xor    %eax,%eax
call   1030 <putchar@plt>
mov    $0x2d,%edi
xor    %eax,%eax
call   1030 <putchar@plt>
mov    $0x2d,%edi
xor    %eax,%eax
call   1030 <putchar@plt>
mov    $0x2d,%edi
xor    %eax,%eax
call   1030 <putchar@plt>
mov    $0x2d,%edi
xor    %eax,%eax
call   1030 <putchar@plt>
mov    $0x2d,%edi
xor    %eax,%eax
call   1030 <putchar@plt>
mov    $0x2d,%edi
xor    %eax,%eax
call   1030 <putchar@plt>
mov    $0x2d,%edi
xor    %eax,%eax
call   1030 <putchar@plt>
mov    $0x2d,%edi
xor    %eax,%eax
call   1030 <putchar@plt>
mov    $0x2d,%edi
xor    %eax,%eax
call   1030 <putchar@plt>
mov    $0x2d,%edi
xor    %eax,%eax
call   1030 <putchar@plt>
mov    $0x2d,%edi
xor    %eax,%eax
call   1030 <putchar@plt>
mov    $0x2d,%edi
xor    %eax,%eax
call   1030 <putchar@plt>
mov    $0x2d,%edi
xor    %eax,%eax
call   1030 <putchar@plt>
mov    $0x2d,%edi
xor    %eax,%eax
call   1030 <putchar@plt>
mov    $0x2d,%edi
xor    %eax,%eax
call   1030 <putchar@plt>
mov    $0x2d,%edi
xor    %eax,%eax
call   1030 <putchar@plt>
mov    $0x2d,%edi
xor    %eax,%eax
call   1030 <putchar@plt>
mov    $0x2d,%edi
xor    %eax,%eax
call   1030 <putchar@plt>
mov    $0xa,%edi
xor    %eax,%eax
call   1030 <putchar@plt>
mov    0x44(%rsp),%edx
lea    0x48(%rsp),%rcx
lea    0x94c(%rip),%rbx
lea    0x30(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x58(%rsp),%rsi
mov    0x6c(%rsp),%edx
lea    0x70(%rsp),%rcx
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x80(%rsp),%rsi
mov    0x94(%rsp),%edx
lea    0x98(%rsp),%rcx
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xa8(%rsp),%rsi
mov    0xbc(%rsp),%edx
lea    0xc0(%rsp),%rcx
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0xe4(%rsp),%edx
lea    0xe8(%rsp),%rcx
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x10c(%rsp),%edx
lea    0x110(%rsp),%rcx
mov    %rbx,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x120,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.oz = type { [18 x i8], i32, [16 x i8] }
@__const.main.cast = [6 x %struct.oz] [%struct.oz { [18 x i8] c"Judy Garland\00\00\00\00\00\00", i32 17, [16 x i8] c"Dorothy\00\00\00\00\00\00\00\00\00" }, %struct.oz { [18 x i8] c"Ray Bolger\00\00\00\00\00\00\00\00", i32 35, [16 x i8] c"Scarecrow\00\00\00\00\00\00\00" }, %struct.oz { [18 x i8] c"Bert Lahr\00\00\00\00\00\00\00\00\00", i32 44, [16 x i8] c"Cowardly Lion\00\00\00" }, %struct.oz { [18 x i8] c"Jack Haley\00\00\00\00\00\00\00\00", i32 40, [16 x i8] c"Tin Woodsman\00\00\00\00" }, %struct.oz { [18 x i8] c"Margaret Hamilton\00", i32 37, [16 x i8] c"Wicked Witch\00\00\00\00" }, %struct.oz { [18 x i8] c"Frank Morgan\00\00\00\00\00\00", i32 49, [16 x i8] c"The Wizard\00\00\00\00\00\00" }]
@.str = [26 x i8] c"\09\09Wizard of Oz Database\0A\0A\00"
@.str.1 = [17 x i8] c"%-18s\09%3s\09%-15s\0A\00"
@.str.2 = [6 x i8] c"Actor\00"
@.str.3 = [4 x i8] c"Age\00"
@.str.4 = [5 x i8] c"Role\00"
@.str.5 = [17 x i8] c"%-18s\09%3d\09%-15s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [6 x %struct.oz]
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca %struct.oz
store i32 0, i32* %1
%7 = bitcast [6 x %struct.oz]* %2 to i8*
%8 = getelementptr inbounds [6 x %struct.oz], [6 x %struct.oz]* %2, i64 0, i64 4
%9 = bitcast %struct.oz* %6 to i8*
%10 = bitcast %struct.oz* %8 to i8*
%11 = getelementptr inbounds [6 x %struct.oz], [6 x %struct.oz]* %2, i64 0, i64 4
%12 = getelementptr inbounds [6 x %struct.oz], [6 x %struct.oz]* %2, i64 0, i64 5
%13 = bitcast %struct.oz* %11 to i8*
%14 = bitcast %struct.oz* %12 to i8*
%15 = getelementptr inbounds [6 x %struct.oz], [6 x %struct.oz]* %2, i64 0, i64 5
%16 = bitcast %struct.oz* %15 to i8*
%17 = bitcast %struct.oz* %6 to i8*
store i32 0, i32* %4
br label %18
18: ; preds = %63, %0
%19 = load i32, i32* %4
%20 = icmp slt i32 %19, 5
br i1 %20, label %21, label %66
21: ; preds = %18
%22 = load i32, i32* %4
%23 = add nsw i32 %22, 1
store i32 %23, i32* %5
br label %24
24: ; preds = %59, %21
%25 = load i32, i32* %5
%26 = icmp slt i32 %25, 6
br i1 %26, label %27, label %62
27: ; preds = %24
%28 = load i32, i32* %4
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds [6 x %struct.oz], [6 x %struct.oz]* %2, i64 0, i64 %29
%31 = getelementptr inbounds %struct.oz, %struct.oz* %30, i32 0, i32 1
%32 = load i32, i32* %31
%33 = load i32, i32* %5
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds [6 x %struct.oz], [6 x %struct.oz]* %2, i64 0, i64 %34
%36 = getelementptr inbounds %struct.oz, %struct.oz* %35, i32 0, i32 1
%37 = load i32, i32* %36
%38 = icmp sgt i32 %32, %37
br i1 %38, label %39, label %58
39: ; preds = %27
%40 = load i32, i32* %5
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds [6 x %struct.oz], [6 x %struct.oz]* %2, i64 0, i64 %41
%43 = bitcast %struct.oz* %6 to i8*
%44 = bitcast %struct.oz* %42 to i8*
%45 = load i32, i32* %5
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds [6 x %struct.oz], [6 x %struct.oz]* %2, i64 0, i64 %46
%48 = load i32, i32* %4
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds [6 x %struct.oz], [6 x %struct.oz]* %2, i64 0, i64 %49
%51 = bitcast %struct.oz* %47 to i8*
%52 = bitcast %struct.oz* %50 to i8*
%53 = load i32, i32* %4
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds [6 x %struct.oz], [6 x %struct.oz]* %2, i64 0, i64 %54
%56 = bitcast %struct.oz* %55 to i8*
%57 = bitcast %struct.oz* %6 to i8*
br label %58
58: ; preds = %39, %27
br label %59
59: ; preds = %58
%60 = load i32, i32* %5
%61 = add nsw i32 %60, 1
store i32 %61, i32* %5
br label %24
62: ; preds = %24
br label %63
63: ; preds = %62
%64 = load i32, i32* %4
%65 = add nsw i32 %64, 1
store i32 %65, i32* %4
br label %18
66: ; preds = %18
%67 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%68 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
store i32 0, i32* %3
br label %69
69: ; preds = %74, %66
%70 = load i32, i32* %3
%71 = icmp slt i32 %70, 40
br i1 %71, label %72, label %77
72: ; preds = %69
%73 = call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 45)
br label %74
74: ; preds = %72
%75 = load i32, i32* %3
%76 = add nsw i32 %75, 1
store i32 %76, i32* %3
br label %69
77: ; preds = %69
%78 = call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 10)
store i32 0, i32* %4
br label %79
79: ; preds = %99, %77
%80 = load i32, i32* %4
%81 = icmp slt i32 %80, 6
br i1 %81, label %82, label %102
82: ; preds = %79
%83 = load i32, i32* %4
%84 = sext i32 %83 to i64
%85 = getelementptr inbounds [6 x %struct.oz], [6 x %struct.oz]* %2, i64 0, i64 %84
%86 = getelementptr inbounds %struct.oz, %struct.oz* %85, i32 0, i32 0
%87 = getelementptr inbounds [18 x i8], [18 x i8]* %86, i64 0, i64 0
%88 = load i32, i32* %4
%89 = sext i32 %88 to i64
%90 = getelementptr inbounds [6 x %struct.oz], [6 x %struct.oz]* %2, i64 0, i64 %89
%91 = getelementptr inbounds %struct.oz, %struct.oz* %90, i32 0, i32 1
%92 = load i32, i32* %91
%93 = load i32, i32* %4
%94 = sext i32 %93 to i64
%95 = getelementptr inbounds [6 x %struct.oz], [6 x %struct.oz]* %2, i64 0, i64 %94
%96 = getelementptr inbounds %struct.oz, %struct.oz* %95, i32 0, i32 2
%97 = getelementptr inbounds [16 x i8], [16 x i8]* %96, i64 0, i64 0
%98 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0), i8* %87, i32 %92, i8* %97)
br label %99
99: ; preds = %82
%100 = load i32, i32* %4
%101 = add nsw i32 %100, 1
store i32 %101, i32* %4
br label %79
102: ; preds = %79
ret i32 0
}

LLVM IR (-O2):
%struct.oz = type { [18 x i8], i32, [16 x i8] }
@__const.main.cast = [6 x %struct.oz] [%struct.oz { [18 x i8] c"Judy Garland\00\00\00\00\00\00", i32 17, [16 x i8] c"Dorothy\00\00\00\00\00\00\00\00\00" }, %struct.oz { [18 x i8] c"Ray Bolger\00\00\00\00\00\00\00\00", i32 35, [16 x i8] c"Scarecrow\00\00\00\00\00\00\00" }, %struct.oz { [18 x i8] c"Bert Lahr\00\00\00\00\00\00\00\00\00", i32 44, [16 x i8] c"Cowardly Lion\00\00\00" }, %struct.oz { [18 x i8] c"Jack Haley\00\00\00\00\00\00\00\00", i32 40, [16 x i8] c"Tin Woodsman\00\00\00\00" }, %struct.oz { [18 x i8] c"Margaret Hamilton\00", i32 37, [16 x i8] c"Wicked Witch\00\00\00\00" }, %struct.oz { [18 x i8] c"Frank Morgan\00\00\00\00\00\00", i32 49, [16 x i8] c"The Wizard\00\00\00\00\00\00" }]
@.str = [26 x i8] c"\09\09Wizard of Oz Database\0A\0A\00"
@.str.1 = [17 x i8] c"%-18s\09%3s\09%-15s\0A\00"
@.str.2 = [6 x i8] c"Actor\00"
@.str.3 = [4 x i8] c"Age\00"
@.str.4 = [5 x i8] c"Role\00"
@.str.5 = [17 x i8] c"%-18s\09%3d\09%-15s\0A\00"
define i32 @main() {
%1 = alloca [6 x %struct.oz]
%2 = alloca %struct.oz
%3 = getelementptr inbounds [6 x %struct.oz], [6 x %struct.oz]* %1, i64 0, i64 0, i32 0, i64 0
%4 = getelementptr inbounds %struct.oz, %struct.oz* %2, i64 0, i32 0, i64 0
%5 = getelementptr inbounds [6 x %struct.oz], [6 x %struct.oz]* %1, i64 0, i64 4, i32 0, i64 0
%6 = getelementptr inbounds [6 x %struct.oz], [6 x %struct.oz]* %1, i64 0, i64 5, i32 0, i64 0
%7 = getelementptr inbounds [6 x %struct.oz], [6 x %struct.oz]* %1, i64 0, i64 4, i32 1
%8 = load i32, i32* %7
%9 = icmp slt i32 %8, 17
br i1 %9, label %133, label %136
10: ; preds = %141, %136
%11 = getelementptr inbounds [6 x %struct.oz], [6 x %struct.oz]* %1, i64 0, i64 1, i32 0, i64 0
%12 = getelementptr inbounds [6 x %struct.oz], [6 x %struct.oz]* %1, i64 0, i64 4, i32 1
%13 = load i32, i32* %12
%14 = icmp slt i32 %13, 35
br i1 %14, label %15, label %18
15: ; preds = %10
%16 = getelementptr inbounds [6 x %struct.oz], [6 x %struct.oz]* %1, i64 0, i64 1, i32 1
%17 = load i32, i32* %16
br label %18
18: ; preds = %15, %10
%19 = phi i32 [ %17, %15 ], [ 35, %10 ]
%20 = getelementptr inbounds [6 x %struct.oz], [6 x %struct.oz]* %1, i64 0, i64 5, i32 1
%21 = load i32, i32* %20
%22 = icmp sgt i32 %19, %21
br i1 %22, label %23, label %24
23: ; preds = %18
br label %24
24: ; preds = %23, %18
%25 = getelementptr inbounds [6 x %struct.oz], [6 x %struct.oz]* %1, i64 0, i64 2, i32 1
%26 = getelementptr inbounds [6 x %struct.oz], [6 x %struct.oz]* %1, i64 0, i64 2, i32 0, i64 0
%27 = getelementptr inbounds [6 x %struct.oz], [6 x %struct.oz]* %1, i64 0, i64 3, i32 0, i64 0
%28 = load i32, i32* %25
%29 = getelementptr inbounds [6 x %struct.oz], [6 x %struct.oz]* %1, i64 0, i64 4, i32 1
%30 = load i32, i32* %29
%31 = icmp sgt i32 %28, %30
br i1 %31, label %32, label %34
32: ; preds = %24
%33 = load i32, i32* %25
br label %34
34: ; preds = %32, %24
%35 = phi i32 [ %33, %32 ], [ %28, %24 ]
%36 = getelementptr inbounds [6 x %struct.oz], [6 x %struct.oz]* %1, i64 0, i64 5, i32 1
%37 = load i32, i32* %36
%38 = icmp sgt i32 %35, %37
br i1 %38, label %39, label %40
39: ; preds = %34
br label %40
40: ; preds = %39, %34
%41 = getelementptr inbounds [6 x %struct.oz], [6 x %struct.oz]* %1, i64 0, i64 3, i32 1
%42 = getelementptr inbounds [6 x %struct.oz], [6 x %struct.oz]* %1, i64 0, i64 3, i32 0, i64 0
%43 = load i32, i32* %41
%44 = getelementptr inbounds [6 x %struct.oz], [6 x %struct.oz]* %1, i64 0, i64 4, i32 1
%45 = load i32, i32* %44
%46 = icmp sgt i32 %43, %45
br i1 %46, label %47, label %49
47: ; preds = %40
%48 = load i32, i32* %41
br label %49
49: ; preds = %47, %40
%50 = phi i32 [ %48, %47 ], [ %43, %40 ]
%51 = getelementptr inbounds [6 x %struct.oz], [6 x %struct.oz]* %1, i64 0, i64 5, i32 1
%52 = load i32, i32* %51
%53 = icmp sgt i32 %50, %52
br i1 %53, label %54, label %55
54: ; preds = %49
br label %55
55: ; preds = %54, %49
%56 = getelementptr inbounds [6 x %struct.oz], [6 x %struct.oz]* %1, i64 0, i64 4, i32 1
%57 = load i32, i32* %56
%58 = getelementptr inbounds [6 x %struct.oz], [6 x %struct.oz]* %1, i64 0, i64 5, i32 1
%59 = load i32, i32* %58
%60 = icmp sgt i32 %57, %59
br i1 %60, label %61, label %62
61: ; preds = %55
br label %62
62: ; preds = %55, %61
%63 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%64 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%65 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 45)
%66 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 45)
%67 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 45)
%68 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 45)
%69 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 45)
%70 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 45)
%71 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 45)
%72 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 45)
%73 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 45)
%74 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 45)
%75 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 45)
%76 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 45)
%77 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 45)
%78 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 45)
%79 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 45)
%80 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 45)
%81 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 45)
%82 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 45)
%83 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 45)
%84 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 45)
%85 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 45)
%86 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 45)
%87 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 45)
%88 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 45)
%89 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 45)
%90 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 45)
%91 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 45)
%92 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 45)
%93 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 45)
%94 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 45)
%95 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 45)
%96 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 45)
%97 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 45)
%98 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 45)
%99 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 45)
%100 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 45)
%101 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 45)
%102 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 45)
%103 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 45)
%104 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 45)
%105 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 10)
%106 = getelementptr inbounds [6 x %struct.oz], [6 x %struct.oz]* %1, i64 0, i64 0, i32 1
%107 = load i32, i32* %106
%108 = getelementptr inbounds [6 x %struct.oz], [6 x %struct.oz]* %1, i64 0, i64 0, i32 2, i64 0
%109 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0), i8* %3, i32 %107, i8* %108)
%110 = getelementptr inbounds [6 x %struct.oz], [6 x %struct.oz]* %1, i64 0, i64 1, i32 0, i64 0
%111 = getelementptr inbounds [6 x %struct.oz], [6 x %struct.oz]* %1, i64 0, i64 1, i32 1
%112 = load i32, i32* %111
%113 = getelementptr inbounds [6 x %struct.oz], [6 x %struct.oz]* %1, i64 0, i64 1, i32 2, i64 0
%114 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0), i8* %110, i32 %112, i8* %113)
%115 = getelementptr inbounds [6 x %struct.oz], [6 x %struct.oz]* %1, i64 0, i64 2, i32 0, i64 0
%116 = getelementptr inbounds [6 x %struct.oz], [6 x %struct.oz]* %1, i64 0, i64 2, i32 1
%117 = load i32, i32* %116
%118 = getelementptr inbounds [6 x %struct.oz], [6 x %struct.oz]* %1, i64 0, i64 2, i32 2, i64 0
%119 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0), i8* %115, i32 %117, i8* %118)
%120 = getelementptr inbounds [6 x %struct.oz], [6 x %struct.oz]* %1, i64 0, i64 3, i32 0, i64 0
%121 = getelementptr inbounds [6 x %struct.oz], [6 x %struct.oz]* %1, i64 0, i64 3, i32 1
%122 = load i32, i32* %121
%123 = getelementptr inbounds [6 x %struct.oz], [6 x %struct.oz]* %1, i64 0, i64 3, i32 2, i64 0
%124 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0), i8* %120, i32 %122, i8* %123)
%125 = getelementptr inbounds [6 x %struct.oz], [6 x %struct.oz]* %1, i64 0, i64 4, i32 1
%126 = load i32, i32* %125
%127 = getelementptr inbounds [6 x %struct.oz], [6 x %struct.oz]* %1, i64 0, i64 4, i32 2, i64 0
%128 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0), i8* %5, i32 %126, i8* %127)
%129 = getelementptr inbounds [6 x %struct.oz], [6 x %struct.oz]* %1, i64 0, i64 5, i32 1
%130 = load i32, i32* %129
%131 = getelementptr inbounds [6 x %struct.oz], [6 x %struct.oz]* %1, i64 0, i64 5, i32 2, i64 0
%132 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0), i8* %6, i32 %130, i8* %131)
ret i32 0
133: ; preds = %0
%134 = getelementptr inbounds [6 x %struct.oz], [6 x %struct.oz]* %1, i64 0, i64 0, i32 1
%135 = load i32, i32* %134
br label %136
136: ; preds = %133, %0
%137 = phi i32 [ %135, %133 ], [ 17, %0 ]
%138 = getelementptr inbounds [6 x %struct.oz], [6 x %struct.oz]* %1, i64 0, i64 5, i32 1
%139 = load i32, i32* %138
%140 = icmp sgt i32 %137, %139
br i1 %140, label %141, label %10
141: ; preds = %136
br label %10
}