#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*/ printf(char *, int);
int /*<<< orphan*/ puts(char *);
int testAuto(int);
int testStat(int);
int main() {
  puts("Test static");
  printf("%d\n", testStat(5));
  printf("%d\n", testStat(10));
  printf("%d\n", testStat(15));
  printf("%d\n", testStat(20));
  printf("%d\n", testStat(25));
  puts("");
  puts("Test auto");
  printf("%d\n", testAuto(5));
  printf("%d\n", testAuto(10));
  printf("%d\n", testAuto(15));
  printf("%d\n", testAuto(20));
  printf("%d\n", testAuto(25));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
call   1030 <puts@plt>
mov    $0x5,%edi
call   1050 <testStat@plt>
mov    %eax,%esi
lea    0xe9e(%rip),%rdi
call   1040 <printf@plt>
mov    $0xa,%edi
call   1050 <testStat@plt>
mov    %eax,%esi
lea    0xe86(%rip),%rdi
call   1040 <printf@plt>
mov    $0xf,%edi
call   1050 <testStat@plt>
mov    %eax,%esi
lea    0xe6e(%rip),%rdi
call   1040 <printf@plt>
mov    $0x14,%edi
call   1050 <testStat@plt>
mov    %eax,%esi
lea    0xe56(%rip),%rdi
call   1040 <printf@plt>
mov    $0x19,%edi
call   1050 <testStat@plt>
mov    %eax,%esi
lea    0xe3e(%rip),%rdi
call   1040 <printf@plt>
lea    0xe35(%rip),%rdi
call   1030 <puts@plt>
lea    0xe2a(%rip),%rdi
call   1030 <puts@plt>
mov    $0x5,%edi
call   1060 <testAuto@plt>
mov    %eax,%esi
lea    0xe0e(%rip),%rdi
call   1040 <printf@plt>
mov    $0xa,%edi
call   1060 <testAuto@plt>
mov    %eax,%esi
lea    0xdf6(%rip),%rdi
call   1040 <printf@plt>
mov    $0xf,%edi
call   1060 <testAuto@plt>
mov    %eax,%esi
lea    0xdde(%rip),%rdi
call   1040 <printf@plt>
mov    $0x14,%edi
call   1060 <testAuto@plt>
mov    %eax,%esi
lea    0xdc6(%rip),%rdi
call   1040 <printf@plt>
mov    $0x19,%edi
call   1060 <testAuto@plt>
mov    %eax,%esi
lea    0xdae(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xea8(%rip),%rdi
call   1040 <puts@plt>
mov    $0x5,%edi
call   1060 <testStat@plt>
lea    0xe9e(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
call   1050 <printf@plt>
mov    $0xa,%edi
call   1060 <testStat@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1050 <printf@plt>
mov    $0xf,%edi
call   1060 <testStat@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1050 <printf@plt>
mov    $0x14,%edi
call   1060 <testStat@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1050 <printf@plt>
mov    $0x19,%edi
call   1060 <testStat@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xe37(%rip),%rdi
call   1040 <puts@plt>
mov    $0x5,%edi
call   1070 <testAuto@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1050 <printf@plt>
mov    $0xa,%edi
call   1070 <testAuto@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1050 <printf@plt>
mov    $0xf,%edi
call   1070 <testAuto@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1050 <printf@plt>
mov    $0x14,%edi
call   1070 <testAuto@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1050 <printf@plt>
mov    $0x19,%edi
call   1070 <testAuto@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1050 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"Test static\00"
@.str.1 = [4 x i8] c"%d\0A\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [10 x i8] c"Test auto\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @puts(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @testStat(i32 5)
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = call i32 @testStat(i32 10)
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%7 = call i32 @testStat(i32 15)
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %7)
%9 = call i32 @testStat(i32 20)
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %9)
%11 = call i32 @testStat(i32 25)
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %11)
%13 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0))
%14 = call i32 @puts(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
%15 = call i32 @testAuto(i32 5)
%16 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %15)
%17 = call i32 @testAuto(i32 10)
%18 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %17)
%19 = call i32 @testAuto(i32 15)
%20 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %19)
%21 = call i32 @testAuto(i32 20)
%22 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %21)
%23 = call i32 @testAuto(i32 25)
%24 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %23)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"Test static\00"
@.str.1 = [4 x i8] c"%d\0A\00"
@.str.3 = [10 x i8] c"Test auto\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @testStat(i32 5)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %2)
%4 = tail call i32 @testStat(i32 10)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%6 = tail call i32 @testStat(i32 15)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %6)
%8 = tail call i32 @testStat(i32 20)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %8)
%10 = tail call i32 @testStat(i32 25)
%11 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %10)
%12 = tail call i32 @putchar(i32 10)
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
%14 = tail call i32 @testAuto(i32 5)
%15 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %14)
%16 = tail call i32 @testAuto(i32 10)
%17 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %16)
%18 = tail call i32 @testAuto(i32 15)
%19 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %18)
%20 = tail call i32 @testAuto(i32 20)
%21 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %20)
%22 = tail call i32 @testAuto(i32 25)
%23 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %22)
ret i32 0
}