#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*/ myarray;
typedef int /*<<< orphan*/ last_name;
typedef int /*<<< orphan*/ height;
typedef int /*<<< orphan*/ first_name;
typedef int /*<<< orphan*/ array_of_strings;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char *argv[]) {
  int age = 22;
  double height = 1.8;
  float power = 2.345f;
  char initial = 'G';
  char first_name[] = "Jonas";
  char last_name[] = "Libbrecht";
  int myarray[4] = {1, 2, 3, 4};
  char *array_of_strings[3] = {"foobar", "bar", "jonaslibbrecht"};
  printf("I am %d years old.\n", age);
  printf("I am %f meter tall.\n", height);
  printf("I have an initial %c \n", initial);
  printf("I have a firstname %s \n", first_name);
  printf("I have a lastname %s \n", last_name);
  printf("I have %f amount of power \n", power);
  printf("My whole name is %s %c. %s \n", first_name, initial, last_name);
  printf("Amount of arguments %d \n", argc);
  int i;
  for (i = 0; i < argc; i++) {
    printf("Argument %d: %s \n", i, argv[i]);
  }
  printf("Size of array `myarray` %lo\n", sizeof(myarray) / sizeof(myarray[0]));
  int j;
  for (j = 0; j < sizeof(myarray) / sizeof(myarray[0]); j++) {
    printf("array item %d value %d\n", j, myarray[j]);
  }
  printf("an integer is %lo bytes large\n", sizeof(myarray[0]));
  printf("a double is %lo bytes large\n", sizeof(height));
  printf("this char is %lo bytes large\n", sizeof(first_name));
  printf("this char is %lo bytes large\n", sizeof(last_name));
  printf("this char type is %lo bytes large\n", sizeof(char));
  int x;
  printf("amount of strings in `array_of_strings` %lo\n",
         sizeof(array_of_strings) / sizeof(array_of_strings[0]));
  for (x = 0; x < sizeof(array_of_strings) / sizeof(array_of_strings[0]); x++) {
    printf("item %d with value %s\n", x, array_of_strings[x]);
  }
  int y = 5;
  int z = 0;
  while (z < y) {
    printf("while number %d\n", z);
    z++;
    if (z == 4) {
      printf("my happy number %d\n", z);
    } else {
      printf("my sad number %d\n", z);
    }
  }
  char letter = 'B';
  switch (letter) {
  case 'A':
    printf("He chose the letter A!\n");
  case 'B':
    printf("He chose the letter B!\n");
  default:
    printf("He chose poorly, he chose nothing\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x16,-0x14(%rbp)
movsd  0xed0(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movss  0xebb(%rip),%xmm0
movss  %xmm0,-0x24(%rbp)
movb   $0x47,-0x25(%rbp)
mov    0xebc(%rip),%eax
mov    %eax,-0x2b(%rbp)
mov    0xeb6(%rip),%ax
mov    %ax,-0x27(%rbp)
mov    0xead(%rip),%rax
mov    %rax,-0x35(%rbp)
mov    0xeaa(%rip),%ax
mov    %ax,-0x2d(%rbp)
mov    0x1111(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    0x110e(%rip),%rax
mov    %rax,-0x48(%rbp)
mov    0x2c6b(%rip),%rax
mov    %rax,-0x70(%rbp)
mov    0x2c68(%rip),%rax
mov    %rax,-0x68(%rbp)
mov    0x2c65(%rip),%rax
mov    %rax,-0x60(%rbp)
mov    -0x14(%rbp),%esi
lea    0xe7d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsd  -0x20(%rbp),%xmm0
lea    0xe7e(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsbl -0x25(%rbp),%esi
lea    0xe81(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x2b(%rbp),%rsi
lea    0xe86(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x35(%rbp),%rsi
lea    0xe8c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x24(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe8c(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    -0x2b(%rbp),%rsi
movsbl -0x25(%rbp),%edx
lea    -0x35(%rbp),%rcx
lea    0xe8e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
lea    0xe9a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x74(%rbp)
mov    -0x74(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1289 <main+0x179>
mov    -0x74(%rbp),%esi
mov    -0x10(%rbp),%rax
movslq -0x74(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xe83(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    1252 <main+0x142>
lea    0xe79(%rip),%rdi
mov    $0x4,%esi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x78(%rbp)
movslq -0x78(%rbp),%rax
cmp    $0x4,%rax
jae    12d8 <main+0x1c8>
mov    -0x78(%rbp),%esi
movslq -0x78(%rbp),%rax
mov    -0x50(%rbp,%rax,4),%edx
lea    0xe63(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x78(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x78(%rbp)
jmp    12a3 <main+0x193>
lea    0xe5f(%rip),%rdi
mov    $0x4,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe6b(%rip),%rdi
mov    $0x8,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe75(%rip),%rdi
mov    $0x6,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe62(%rip),%rdi
mov    $0xa,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe6d(%rip),%rdi
mov    $0x1,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe7d(%rip),%rdi
mov    $0x3,%esi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x7c(%rbp)
movslq -0x7c(%rbp),%rax
cmp    $0x3,%rax
jae    1387 <main+0x277>
mov    -0x7c(%rbp),%esi
movslq -0x7c(%rbp),%rax
mov    -0x70(%rbp,%rax,8),%rdx
lea    0xe76(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x7c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7c(%rbp)
jmp    1351 <main+0x241>
movl   $0x5,-0x80(%rbp)
movl   $0x0,-0x84(%rbp)
mov    -0x84(%rbp),%eax
cmp    -0x80(%rbp),%eax
jge    1409 <main+0x2f9>
mov    -0x84(%rbp),%esi
lea    0xe4b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x84(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x84(%rbp)
cmpl   $0x4,-0x84(%rbp)
jne    13f0 <main+0x2e0>
mov    -0x84(%rbp),%esi
lea    0xe2c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1404 <main+0x2f4>
mov    -0x84(%rbp),%esi
lea    0xe27(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1398 <main+0x288>
movb   $0x42,-0x85(%rbp)
movsbl -0x85(%rbp),%eax
mov    %eax,-0x8c(%rbp)
sub    $0x41,%eax
je     143f <main+0x32f>
jmp    142b <main+0x31b>
mov    -0x8c(%rbp),%eax
sub    $0x42,%eax
je     144d <main+0x33d>
jmp    145b <main+0x34b>
lea    0xdf0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xdfa(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe04(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%r14
mov    %edi,%ebp
movw   $0x73,0x4(%rsp)
movl   $0x616e6f4a,(%rsp)
movabs $0x686365726262694c,%rax
65 63 68
mov    %rax,0x8(%rsp)
movw   $0x74,0x10(%rsp)
lea    0xedc(%rip),%rdi
mov    $0x16,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xedd(%rip),%rdi
movsd  0xe8b(%rip),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xedc(%rip),%rdi
mov    $0x47,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xee0(%rip),%rdi
mov    %rsp,%r15
mov    %r15,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xee4(%rip),%rdi
lea    0x8(%rsp),%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xee5(%rip),%rdi
movsd  0xe40(%rip),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xeeb(%rip),%rdi
mov    %r15,%rsi
mov    $0x47,%edx
mov    %rbx,%rcx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeef(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
test   %ebp,%ebp
jle    1229 <main+0x109>
mov    %ebp,%ebp
lea    0xef2(%rip),%r15
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdx
mov    %r15,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1210 <main+0xf0>
lea    0xed9(%rip),%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xee3(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x1,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x2,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
mov    $0x3,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
mov    $0x4,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xea7(%rip),%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeb3(%rip),%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xebd(%rip),%rbx
mov    $0x6,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeb6(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xec6(%rip),%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xee0(%rip),%rbx
lea    0xd11(%rip),%rdx
mov    %rbx,%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xd01(%rip),%rdx
mov    %rbx,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xcef(%rip),%rdx
mov    %rbx,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeb1(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xec3(%rip),%rbp
mov    %rbp,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe4e(%rip),%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe43(%rip),%rdi
call   1030 <puts@plt>
lea    0xe4e(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@__const.main.first_name = [6 x i8] c"Jonas\00"
@__const.main.last_name = [10 x i8] c"Libbrecht\00"
@__const.main.myarray = [4 x i32] [i32 1, i32 2, i32 3, i32 4]
@.str = [7 x i8] c"foobar\00"
@.str.1 = [4 x i8] c"bar\00"
@.str.2 = [15 x i8] c"jonaslibbrecht\00"
@__const.main.array_of_strings = [3 x i8*] [i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i32 0, i32 0)]
@.str.3 = [20 x i8] c"I am %d years old.\0A\00"
@.str.4 = [21 x i8] c"I am %f meter tall.\0A\00"
@.str.5 = [23 x i8] c"I have an initial %c \0A\00"
@.str.6 = [24 x i8] c"I have a firstname %s \0A\00"
@.str.7 = [23 x i8] c"I have a lastname %s \0A\00"
@.str.8 = [28 x i8] c"I have %f amount of power \0A\00"
@.str.9 = [29 x i8] c"My whole name is %s %c. %s \0A\00"
@.str.10 = [25 x i8] c"Amount of arguments %d \0A\00"
@.str.11 = [18 x i8] c"Argument %d: %s \0A\00"
@.str.12 = [29 x i8] c"Size of array `myarray` %lo\0A\00"
@.str.13 = [24 x i8] c"array item %d value %d\0A\00"
@.str.14 = [31 x i8] c"an integer is %lo bytes large\0A\00"
@.str.15 = [29 x i8] c"a double is %lo bytes large\0A\00"
@.str.16 = [30 x i8] c"this char is %lo bytes large\0A\00"
@.str.17 = [35 x i8] c"this char type is %lo bytes large\0A\00"
@.str.18 = [45 x i8] c"amount of strings in `array_of_strings` %lo\0A\00"
@.str.19 = [23 x i8] c"item %d with value %s\0A\00"
@.str.20 = [17 x i8] c"while number %d\0A\00"
@.str.21 = [20 x i8] c"my happy number %d\0A\00"
@.str.22 = [18 x i8] c"my sad number %d\0A\00"
@.str.23 = [24 x i8] c"He chose the letter A!\0A\00"
@.str.24 = [24 x i8] c"He chose the letter B!\0A\00"
@.str.25 = [35 x i8] c"He chose poorly, he chose nothing\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca double
%8 = alloca float
%9 = alloca i8
%10 = alloca [6 x i8]
%11 = alloca [10 x i8]
%12 = alloca [4 x i32]
%13 = alloca [3 x i8*]
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i8
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 22, i32* %6
store double 1.800000e+00, double* %7
store float 0x4002C28F60000000, float* %8
store i8 71, i8* %9
%20 = bitcast [6 x i8]* %10 to i8*
%21 = bitcast [10 x i8]* %11 to i8*
%22 = bitcast [4 x i32]* %12 to i8*
%23 = bitcast [3 x i8*]* %13 to i8*
%24 = load i32, i32* %6
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), i32 %24)
%26 = load double, double* %7
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), double %26)
%28 = load i8, i8* %9
%29 = sext i8 %28 to i32
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i32 %29)
%31 = getelementptr inbounds [6 x i8], [6 x i8]* %10, i64 0, i64 0
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0), i8* %31)
%33 = getelementptr inbounds [10 x i8], [10 x i8]* %11, i64 0, i64 0
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.7, i64 0, i64 0), i8* %33)
%35 = load float, float* %8
%36 = fpext float %35 to double
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.8, i64 0, i64 0), double %36)
%38 = getelementptr inbounds [6 x i8], [6 x i8]* %10, i64 0, i64 0
%39 = load i8, i8* %9
%40 = sext i8 %39 to i32
%41 = getelementptr inbounds [10 x i8], [10 x i8]* %11, i64 0, i64 0
%42 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.9, i64 0, i64 0), i8* %38, i32 %40, i8* %41)
%43 = load i32, i32* %4
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.10, i64 0, i64 0), i32 %43)
store i32 0, i32* %14
br label %45
45: ; preds = %57, %2
%46 = load i32, i32* %14
%47 = load i32, i32* %4
%48 = icmp slt i32 %46, %47
br i1 %48, label %49, label %60
49: ; preds = %45
%50 = load i32, i32* %14
%51 = load i8**, i8*** %5
%52 = load i32, i32* %14
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds i8*, i8** %51, i64 %53
%55 = load i8*, i8** %54
%56 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.11, i64 0, i64 0), i32 %50, i8* %55)
br label %57
57: ; preds = %49
%58 = load i32, i32* %14
%59 = add nsw i32 %58, 1
store i32 %59, i32* %14
br label %45
60: ; preds = %45
%61 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.12, i64 0, i64 0), i64 4)
store i32 0, i32* %15
br label %62
62: ; preds = %73, %60
%63 = load i32, i32* %15
%64 = sext i32 %63 to i64
%65 = icmp ult i64 %64, 4
br i1 %65, label %66, label %76
66: ; preds = %62
%67 = load i32, i32* %15
%68 = load i32, i32* %15
%69 = sext i32 %68 to i64
%70 = getelementptr inbounds [4 x i32], [4 x i32]* %12, i64 0, i64 %69
%71 = load i32, i32* %70
%72 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.13, i64 0, i64 0), i32 %67, i32 %71)
br label %73
73: ; preds = %66
%74 = load i32, i32* %15
%75 = add nsw i32 %74, 1
store i32 %75, i32* %15
br label %62
76: ; preds = %62
%77 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.14, i64 0, i64 0), i64 4)
%78 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.15, i64 0, i64 0), i64 8)
%79 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.16, i64 0, i64 0), i64 6)
%80 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.16, i64 0, i64 0), i64 10)
%81 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.17, i64 0, i64 0), i64 1)
%82 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.18, i64 0, i64 0), i64 3)
store i32 0, i32* %16
br label %83
83: ; preds = %94, %76
%84 = load i32, i32* %16
%85 = sext i32 %84 to i64
%86 = icmp ult i64 %85, 3
br i1 %86, label %87, label %97
87: ; preds = %83
%88 = load i32, i32* %16
%89 = load i32, i32* %16
%90 = sext i32 %89 to i64
%91 = getelementptr inbounds [3 x i8*], [3 x i8*]* %13, i64 0, i64 %90
%92 = load i8*, i8** %91
%93 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.19, i64 0, i64 0), i32 %88, i8* %92)
br label %94
94: ; preds = %87
%95 = load i32, i32* %16
%96 = add nsw i32 %95, 1
store i32 %96, i32* %16
br label %83
97: ; preds = %83
store i32 5, i32* %17
store i32 0, i32* %18
br label %98
98: ; preds = %115, %97
%99 = load i32, i32* %18
%100 = load i32, i32* %17
%101 = icmp slt i32 %99, %100
br i1 %101, label %102, label %116
102: ; preds = %98
%103 = load i32, i32* %18
%104 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.20, i64 0, i64 0), i32 %103)
%105 = load i32, i32* %18
%106 = add nsw i32 %105, 1
store i32 %106, i32* %18
%107 = load i32, i32* %18
%108 = icmp eq i32 %107, 4
br i1 %108, label %109, label %112
109: ; preds = %102
%110 = load i32, i32* %18
%111 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.21, i64 0, i64 0), i32 %110)
br label %115
112: ; preds = %102
%113 = load i32, i32* %18
%114 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.22, i64 0, i64 0), i32 %113)
br label %115
115: ; preds = %112, %109
br label %98
116: ; preds = %98
store i8 66, i8* %19
%117 = load i8, i8* %19
%118 = sext i8 %117 to i32
switch i32 %118, label %123 [
i32 65, label %119
i32 66, label %121
]
119: ; preds = %116
%120 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.23, i64 0, i64 0))
br label %121
121: ; preds = %116, %119
%122 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.24, i64 0, i64 0))
br label %123
123: ; preds = %116, %121
%124 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.25, i64 0, i64 0))
br label %125
125: ; preds = %123
ret i32 0
}

LLVM IR (-O2):
@__const.main.first_name = [6 x i8] c"Jonas\00"
@__const.main.last_name = [10 x i8] c"Libbrecht\00"
@.str = [7 x i8] c"foobar\00"
@.str.1 = [4 x i8] c"bar\00"
@.str.2 = [15 x i8] c"jonaslibbrecht\00"
@.str.3 = [20 x i8] c"I am %d years old.\0A\00"
@.str.4 = [21 x i8] c"I am %f meter tall.\0A\00"
@.str.5 = [23 x i8] c"I have an initial %c \0A\00"
@.str.6 = [24 x i8] c"I have a firstname %s \0A\00"
@.str.7 = [23 x i8] c"I have a lastname %s \0A\00"
@.str.8 = [28 x i8] c"I have %f amount of power \0A\00"
@.str.9 = [29 x i8] c"My whole name is %s %c. %s \0A\00"
@.str.10 = [25 x i8] c"Amount of arguments %d \0A\00"
@.str.11 = [18 x i8] c"Argument %d: %s \0A\00"
@.str.12 = [29 x i8] c"Size of array `myarray` %lo\0A\00"
@.str.13 = [24 x i8] c"array item %d value %d\0A\00"
@.str.14 = [31 x i8] c"an integer is %lo bytes large\0A\00"
@.str.15 = [29 x i8] c"a double is %lo bytes large\0A\00"
@.str.16 = [30 x i8] c"this char is %lo bytes large\0A\00"
@.str.17 = [35 x i8] c"this char type is %lo bytes large\0A\00"
@.str.18 = [45 x i8] c"amount of strings in `array_of_strings` %lo\0A\00"
@.str.19 = [23 x i8] c"item %d with value %s\0A\00"
@.str.20 = [17 x i8] c"while number %d\0A\00"
@.str.21 = [20 x i8] c"my happy number %d\0A\00"
@.str.22 = [18 x i8] c"my sad number %d\0A\00"
@str = [23 x i8] c"He chose the letter B!\00"
@str.26 = [34 x i8] c"He chose poorly, he chose nothing\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [6 x i8]
%4 = alloca [10 x i8]
%5 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 0
%6 = getelementptr inbounds [10 x i8], [10 x i8]* %4, i64 0, i64 0
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), i32 22)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), double 1.800000e+00)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i32 71)
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0), i8* %5)
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.7, i64 0, i64 0), i8* %6)
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.8, i64 0, i64 0), double 0x4002C28F60000000)
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.9, i64 0, i64 0), i8* %5, i32 71, i8* %6)
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.10, i64 0, i64 0), i32 %0)
%15 = icmp sgt i32 %0, 0
br i1 %15, label %16, label %26
16: ; preds = %2
%17 = zext i32 %0 to i64
br label %18
18: ; preds = %16, %18
%19 = phi i64 [ 0, %16 ], [ %24, %18 ]
%20 = getelementptr inbounds i8*, i8** %1, i64 %19
%21 = load i8*, i8** %20
%22 = trunc i64 %19 to i32
%23 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.11, i64 0, i64 0), i32 %22, i8* %21)
%24 = add nuw nsw i64 %19, 1
%25 = icmp eq i64 %24, %17
br i1 %25, label %26, label %18
26: ; preds = %18, %2
%27 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.12, i64 0, i64 0), i64 4)
%28 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.13, i64 0, i64 0), i32 0, i32 1)
%29 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.13, i64 0, i64 0), i32 1, i32 2)
%30 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.13, i64 0, i64 0), i32 2, i32 3)
%31 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.13, i64 0, i64 0), i32 3, i32 4)
%32 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.14, i64 0, i64 0), i64 4)
%33 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.15, i64 0, i64 0), i64 8)
%34 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.16, i64 0, i64 0), i64 6)
%35 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.16, i64 0, i64 0), i64 10)
%36 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.17, i64 0, i64 0), i64 1)
%37 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str.18, i64 0, i64 0), i64 3)
%38 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.19, i64 0, i64 0), i32 0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%39 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.19, i64 0, i64 0), i32 1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%40 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.19, i64 0, i64 0), i32 2, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
%41 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.20, i64 0, i64 0), i32 0)
%42 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.22, i64 0, i64 0), i32 1)
%43 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.20, i64 0, i64 0), i32 1)
%44 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.22, i64 0, i64 0), i32 2)
%45 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.20, i64 0, i64 0), i32 2)
%46 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.22, i64 0, i64 0), i32 3)
%47 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.20, i64 0, i64 0), i32 3)
%48 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.21, i64 0, i64 0), i32 4)
%49 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.20, i64 0, i64 0), i32 4)
%50 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.22, i64 0, i64 0), i32 5)
%51 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
%52 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.26, i64 0, i64 0))
ret i32 0
}