#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 count();
int count2();
int count3();
int non_count();
int /*<<< orphan*/ printf(char *, int, int, int, int, int);
int main(int argc, char **argv) {
  int i;
  for (i = 0; i < 10; i++) {
    printf("i=%2d count=%d count2=%d count3=%d non_count=%d\n", i, count(),
           count2(), count3(), non_count());
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0xa,-0x14(%rbp)
jge    11cc <main+0x7c>
mov    -0x14(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    $0x0,%al
call   1030 <count@plt>
mov    %eax,-0x20(%rbp)
mov    $0x0,%al
call   1060 <count2@plt>
mov    %eax,-0x1c(%rbp)
mov    $0x0,%al
call   1040 <count3@plt>
mov    %eax,-0x18(%rbp)
mov    $0x0,%al
call   1070 <non_count@plt>
mov    -0x24(%rbp),%esi
mov    -0x20(%rbp),%edx
mov    -0x1c(%rbp),%ecx
mov    -0x18(%rbp),%r8d
mov    %eax,%r9d
lea    0xe47(%rip),%rdi
call   1050 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    116d <main+0x1d>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1030 <count@plt>
mov    %eax,%r15d
xor    %eax,%eax
call   1060 <count2@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <count3@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1070 <non_count@plt>
lea    0xe7f(%rip),%r14
mov    %r14,%rdi
xor    %esi,%esi
mov    %r15d,%edx
mov    %ebx,%ecx
mov    %ebp,%r8d
mov    %eax,%r9d
call   1050 <printf@plt>
xor    %eax,%eax
call   1030 <count@plt>
mov    %eax,%r15d
xor    %eax,%eax
call   1060 <count2@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1040 <count3@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1070 <non_count@plt>
mov    %r14,%rdi
mov    $0x1,%esi
mov    %r15d,%edx
mov    %ebp,%ecx
mov    %ebx,%r8d
mov    %eax,%r9d
call   1050 <printf@plt>
xor    %eax,%eax
call   1030 <count@plt>
mov    %eax,%r15d
xor    %eax,%eax
call   1060 <count2@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1040 <count3@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1070 <non_count@plt>
mov    %r14,%rdi
mov    $0x2,%esi
mov    %r15d,%edx
mov    %ebp,%ecx
mov    %ebx,%r8d
mov    %eax,%r9d
call   1050 <printf@plt>
xor    %eax,%eax
call   1030 <count@plt>
mov    %eax,%r15d
xor    %eax,%eax
call   1060 <count2@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1040 <count3@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1070 <non_count@plt>
mov    %r14,%rdi
mov    $0x3,%esi
mov    %r15d,%edx
mov    %ebp,%ecx
mov    %ebx,%r8d
mov    %eax,%r9d
call   1050 <printf@plt>
xor    %eax,%eax
call   1030 <count@plt>
mov    %eax,%r15d
xor    %eax,%eax
call   1060 <count2@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1040 <count3@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1070 <non_count@plt>
mov    %r14,%rdi
mov    $0x4,%esi
mov    %r15d,%edx
mov    %ebp,%ecx
mov    %ebx,%r8d
mov    %eax,%r9d
call   1050 <printf@plt>
xor    %eax,%eax
call   1030 <count@plt>
mov    %eax,%r15d
xor    %eax,%eax
call   1060 <count2@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1040 <count3@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1070 <non_count@plt>
mov    %r14,%rdi
mov    $0x5,%esi
mov    %r15d,%edx
mov    %ebp,%ecx
mov    %ebx,%r8d
mov    %eax,%r9d
call   1050 <printf@plt>
xor    %eax,%eax
call   1030 <count@plt>
mov    %eax,%r15d
xor    %eax,%eax
call   1060 <count2@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1040 <count3@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1070 <non_count@plt>
mov    %r14,%rdi
mov    $0x6,%esi
mov    %r15d,%edx
mov    %ebp,%ecx
mov    %ebx,%r8d
mov    %eax,%r9d
call   1050 <printf@plt>
xor    %eax,%eax
call   1030 <count@plt>
mov    %eax,%r15d
xor    %eax,%eax
call   1060 <count2@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1040 <count3@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1070 <non_count@plt>
mov    %r14,%rdi
mov    $0x7,%esi
mov    %r15d,%edx
mov    %ebp,%ecx
mov    %ebx,%r8d
mov    %eax,%r9d
call   1050 <printf@plt>
xor    %eax,%eax
call   1030 <count@plt>
mov    %eax,%r15d
xor    %eax,%eax
call   1060 <count2@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1040 <count3@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1070 <non_count@plt>
mov    %r14,%rdi
mov    $0x8,%esi
mov    %r15d,%edx
mov    %ebp,%ecx
mov    %ebx,%r8d
mov    %eax,%r9d
call   1050 <printf@plt>
xor    %eax,%eax
call   1030 <count@plt>
mov    %eax,%r15d
xor    %eax,%eax
call   1060 <count2@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1040 <count3@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1070 <non_count@plt>
mov    %r14,%rdi
mov    $0x9,%esi
mov    %r15d,%edx
mov    %ebp,%ecx
mov    %ebx,%r8d
mov    %eax,%r9d
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [49 x i8] c"i=%2d count=%d count2=%d count3=%d non_count=%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
br label %7
7: ; preds = %17, %2
%8 = load i32, i32* %6
%9 = icmp slt i32 %8, 10
br i1 %9, label %10, label %20
10: ; preds = %7
%11 = load i32, i32* %6
%12 = call i32 (...) @count()
%13 = call i32 (...) @count2()
%14 = call i32 (...) @count3()
%15 = call i32 (...) @non_count()
%16 = call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i32 %11, i32 %12, i32 %13, i32 %14, i32 %15)
br label %17
17: ; preds = %10
%18 = load i32, i32* %6
%19 = add nsw i32 %18, 1
store i32 %19, i32* %6
br label %7
20: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
@.str = [49 x i8] c"i=%2d count=%d count2=%d count3=%d non_count=%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @count()
%4 = tail call i32 (...) @count2()
%5 = tail call i32 (...) @count3()
%6 = tail call i32 (...) @non_count()
%7 = tail call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i32 0, i32 %3, i32 %4, i32 %5, i32 %6)
%8 = tail call i32 (...) @count()
%9 = tail call i32 (...) @count2()
%10 = tail call i32 (...) @count3()
%11 = tail call i32 (...) @non_count()
%12 = tail call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i32 1, i32 %8, i32 %9, i32 %10, i32 %11)
%13 = tail call i32 (...) @count()
%14 = tail call i32 (...) @count2()
%15 = tail call i32 (...) @count3()
%16 = tail call i32 (...) @non_count()
%17 = tail call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i32 2, i32 %13, i32 %14, i32 %15, i32 %16)
%18 = tail call i32 (...) @count()
%19 = tail call i32 (...) @count2()
%20 = tail call i32 (...) @count3()
%21 = tail call i32 (...) @non_count()
%22 = tail call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i32 3, i32 %18, i32 %19, i32 %20, i32 %21)
%23 = tail call i32 (...) @count()
%24 = tail call i32 (...) @count2()
%25 = tail call i32 (...) @count3()
%26 = tail call i32 (...) @non_count()
%27 = tail call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i32 4, i32 %23, i32 %24, i32 %25, i32 %26)
%28 = tail call i32 (...) @count()
%29 = tail call i32 (...) @count2()
%30 = tail call i32 (...) @count3()
%31 = tail call i32 (...) @non_count()
%32 = tail call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i32 5, i32 %28, i32 %29, i32 %30, i32 %31)
%33 = tail call i32 (...) @count()
%34 = tail call i32 (...) @count2()
%35 = tail call i32 (...) @count3()
%36 = tail call i32 (...) @non_count()
%37 = tail call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i32 6, i32 %33, i32 %34, i32 %35, i32 %36)
%38 = tail call i32 (...) @count()
%39 = tail call i32 (...) @count2()
%40 = tail call i32 (...) @count3()
%41 = tail call i32 (...) @non_count()
%42 = tail call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i32 7, i32 %38, i32 %39, i32 %40, i32 %41)
%43 = tail call i32 (...) @count()
%44 = tail call i32 (...) @count2()
%45 = tail call i32 (...) @count3()
%46 = tail call i32 (...) @non_count()
%47 = tail call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i32 8, i32 %43, i32 %44, i32 %45, i32 %46)
%48 = tail call i32 (...) @count()
%49 = tail call i32 (...) @count2()
%50 = tail call i32 (...) @count3()
%51 = tail call i32 (...) @non_count()
%52 = tail call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i32 9, i32 %48, i32 %49, i32 %50, i32 %51)
ret i32 0
}