#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*/ bob(int, double, char);
int /*<<< orphan*/ goodbye();
int /*<<< orphan*/ hello();
double mypow(int, int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ sleep(int);
int main(int argc, char **argv) {
  int i = 0;
  int looper = 0;
  hello();
  for (; i < 5; ++i) {
    printf("\ti = %d\n", i);
  }
  goodbye();
  bob(42, 2.18, 'x');
  printf("mypow: %f\n", mypow(2, 3));
  while (1) {
    printf("looper=%d\n", ++looper);
    sleep(5);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    $0x0,%al
call   1050 <hello@plt>
cmpl   $0x5,-0x14(%rbp)
jge    11b2 <main+0x52>
mov    -0x14(%rbp),%esi
lea    0xe69(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    118b <main+0x2b>
mov    $0x0,%al
call   1060 <goodbye@plt>
mov    $0x2a,%edi
movsd  0xe3a(%rip),%xmm0
mov    $0x78,%esi
call   1040 <bob@plt>
mov    $0x2,%edi
mov    $0x3,%esi
call   1070 <mypow@plt>
cvttsd2si %xmm0,%esi
lea    0xe27(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%esi
add    $0x1,%esi
mov    %esi,-0x1c(%rbp)
mov    %esi,-0x18(%rbp)
lea    0xe1a(%rip),%rdi
call   1030 <printf@plt>
mov    $0x5,%edi
call   1080 <sleep@plt>
jmp    11ef <main+0x8f>

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1050 <hello@plt>
lea    0xe96(%rip),%r14
mov    %r14,%rdi
xor    %esi,%esi
call   1030 <printf@plt>
mov    $0x1,%ebx
mov    %r14,%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
mov    %r14,%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
mov    %r14,%rdi
mov    $0x3,%esi
call   1030 <printf@plt>
mov    %r14,%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
xor    %eax,%eax
call   1060 <goodbye@plt>
movsd  0xe3c(%rip),%xmm0
mov    $0x2a,%edi
mov    $0x78,%esi
call   1040 <bob@plt>
mov    $0x2,%edi
mov    $0x3,%esi
call   1070 <mypow@plt>
cvttsd2si %xmm0,%esi
lea    0xe24(%rip),%rdi
call   1030 <printf@plt>
lea    0xe23(%rip),%r14
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
mov    $0x5,%edi
call   1080 <sleep@plt>
add    $0x1,%ebx
jmp    1200 <main+0xa0>

LLVM IR (-O0):
@.str = [9 x i8] c"\09i = %d\0A\00"
@.str.1 = [11 x i8] c"mypow: %f\0A\00"
@.str.2 = [11 x i8] c"looper=%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
store i32 0, i32* %7
%8 = call i32 (...) @hello()
br label %9
9: ; preds = %15, %2
%10 = load i32, i32* %6
%11 = icmp slt i32 %10, 5
br i1 %11, label %12, label %18
12: ; preds = %9
%13 = load i32, i32* %6
%14 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %13)
br label %15
15: ; preds = %12
%16 = load i32, i32* %6
%17 = add nsw i32 %16, 1
store i32 %17, i32* %6
br label %9
18: ; preds = %9
%19 = call i32 (...) @goodbye()
%20 = call i32 @bob(i32 42, double 2.180000e+00, i8 signext 120)
%21 = call double @mypow(i32 2, i32 3)
%22 = fptosi double %21 to i32
%23 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %22)
br label %24
24: ; preds = %18, %24
%25 = load i32, i32* %7
%26 = add nsw i32 %25, 1
store i32 %26, i32* %7
%27 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i32 %26)
%28 = call i32 @sleep(i32 5)
br label %24
}

LLVM IR (-O2):
@.str = [9 x i8] c"\09i = %d\0A\00"
@.str.1 = [11 x i8] c"mypow: %f\0A\00"
@.str.2 = [11 x i8] c"looper=%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @hello()
%4 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 0)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 1)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 2)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 3)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 4)
%9 = tail call i32 (...) @goodbye()
%10 = tail call i32 @bob(i32 42, double 2.180000e+00, i8 signext 120)
%11 = tail call double @mypow(i32 2, i32 3)
%12 = fptosi double %11 to i32
%13 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %12)
br label %14
14: ; preds = %14, %2
%15 = phi i32 [ 0, %2 ], [ %16, %14 ]
%16 = add nuw nsw i32 %15, 1
%17 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i32 %16)
%18 = tail call i32 @sleep(i32 5)
br label %14
}