#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 bar(unsigned int);
int /*<<< orphan*/ call_mikey_func();
int dum(unsigned int);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int foo(unsigned int);
int more_arguments(int, int, int, int, int, int, int, int, int, int);
int /*<<< orphan*/ no_argument();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stdout;
int main(int argc, char *argv[]) {
  int retf, retb, retd;
  unsigned i = 0;
  for (i = 0; i < 0x10000000; i += 0x1000000) {
    retf = foo(i);
    retb = bar(i);
    retd = dum(i);
    printf("%#x %d %d %d\n", i, retf, retb, retd);
    fflush(stdout);
  }
  call_mikey_func();
  no_argument();
  printf("more arguments is %d\n",
         more_arguments(1, 2, 3, 4, 5, 6, 7, 8, 9, 10));
  printf("(Test Application Successfull)\n");
  fflush(stdout);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x20(%rbp)
movl   $0x0,-0x20(%rbp)
cmpl   $0x10000000,-0x20(%rbp)
jae    120b <main+0x8b>
mov    -0x20(%rbp),%edi
call   1090 <foo@plt>
mov    %eax,-0x14(%rbp)
mov    -0x20(%rbp),%edi
call   1030 <bar@plt>
mov    %eax,-0x18(%rbp)
mov    -0x20(%rbp),%edi
call   1040 <dum@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x20(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0x1c(%rbp),%r8d
lea    0xe1a(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    0x2dec(%rip),%rax
mov    (%rax),%edi
call   1080 <fflush@plt>
mov    -0x20(%rbp),%eax
add    $0x1000000,%eax
mov    %eax,-0x20(%rbp)
jmp    11a4 <main+0x24>
mov    $0x0,%al
call   1070 <call_mikey_func@plt>
mov    $0x0,%al
call   1050 <no_argument@plt>
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
mov    $0x4,%ecx
mov    $0x5,%r8d
mov    $0x6,%r9d
movl   $0x7,(%rsp)
movl   $0x8,0x8(%rsp)
movl   $0x9,0x10(%rsp)
movl   $0xa,0x18(%rsp)
call   10a0 <more_arguments@plt>
mov    %eax,%esi
lea    0xda8(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xdb0(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    0x2d5e(%rip),%rax
mov    (%rax),%edi
call   1080 <fflush@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    $0xff000000,%ebx
lea    0xe5c(%rip),%r14
mov    0x2e35(%rip),%r12
nopl   0x0(%rax,%rax,1)
add    $0x1000000,%ebx
mov    %ebx,%edi
call   10a0 <foo@plt>
mov    %eax,%r15d
mov    %ebx,%edi
call   1040 <bar@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1050 <dum@plt>
mov    %r14,%rdi
mov    %ebx,%esi
mov    %r15d,%edx
mov    %ebp,%ecx
mov    %eax,%r8d
xor    %eax,%eax
call   1070 <printf@plt>
mov    (%r12),%edi
call   1090 <fflush@plt>
cmp    $0xf000000,%ebx
jb     11b0 <main+0x20>
xor    %eax,%eax
call   1080 <call_mikey_func@plt>
xor    %eax,%eax
call   1060 <no_argument@plt>
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
mov    $0x4,%ecx
mov    $0x5,%r8d
mov    $0x6,%r9d
push   $0xa
push   $0x9
push   $0x8
push   $0x7
call   10b0 <more_arguments@plt>
add    $0x20,%rsp
lea    0xdd3(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xdd9(%rip),%rdi
call   1030 <puts@plt>
mov    (%r12),%edi
call   1090 <fflush@plt>
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [14 x i8] c"%#x %d %d %d\0A\00"
@stdout = global i32 0
@.str.1 = [22 x i8] c"more arguments is %d\0A\00"
@.str.2 = [32 x i8] c"(Test Application Successfull)\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %9
store i32 0, i32* %9
br label %10
10: ; preds = %27, %2
%11 = load i32, i32* %9
%12 = icmp ult i32 %11, 268435456
br i1 %12, label %13, label %30
13: ; preds = %10
%14 = load i32, i32* %9
%15 = call i32 @foo(i32 %14)
store i32 %15, i32* %6
%16 = load i32, i32* %9
%17 = call i32 @bar(i32 %16)
store i32 %17, i32* %7
%18 = load i32, i32* %9
%19 = call i32 @dum(i32 %18)
store i32 %19, i32* %8
%20 = load i32, i32* %9
%21 = load i32, i32* %6
%22 = load i32, i32* %7
%23 = load i32, i32* %8
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %20, i32 %21, i32 %22, i32 %23)
%25 = load i32, i32* @stdout
%26 = call i32 @fflush(i32 %25)
br label %27
27: ; preds = %13
%28 = load i32, i32* %9
%29 = add i32 %28, 16777216
store i32 %29, i32* %9
br label %10
30: ; preds = %10
%31 = call i32 (...) @call_mikey_func()
%32 = call i32 (...) @no_argument()
%33 = call i32 @more_arguments(i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10)
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %33)
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0))
%36 = load i32, i32* @stdout
%37 = call i32 @fflush(i32 %36)
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"%#x %d %d %d\0A\00"
@stdout = global i32 0
@.str.1 = [22 x i8] c"more arguments is %d\0A\00"
@str = [31 x i8] c"(Test Application Successfull)\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %3
3: ; preds = %2, %3
%4 = phi i32 [ 0, %2 ], [ %11, %3 ]
%5 = tail call i32 @foo(i32 %4)
%6 = tail call i32 @bar(i32 %4)
%7 = tail call i32 @dum(i32 %4)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %5, i32 %6, i32 %7)
%9 = load i32, i32* @stdout
%10 = tail call i32 @fflush(i32 %9)
%11 = add nuw nsw i32 %4, 16777216
%12 = icmp ult i32 %4, 251658240
br i1 %12, label %3, label %13
13: ; preds = %3
%14 = tail call i32 (...) @call_mikey_func()
%15 = tail call i32 (...) @no_argument()
%16 = tail call i32 @more_arguments(i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10)
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %16)
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
%19 = load i32, i32* @stdout
%20 = tail call i32 @fflush(i32 %19)
ret i32 0
}