#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*/ get_age();
int /*<<< orphan*/ mystatic();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ set_age(int);
int /*<<< orphan*/ test3();
int main() {
  test3();
  set_age(10);
  get_age();
  printf("-----------------------\n");
  int i;
  for (i = 0; i < 20; i++)
    mystatic();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <test3@plt>
mov    $0xa,%edi
call   1060 <set_age@plt>
mov    $0x0,%al
call   1050 <get_age@plt>
lea    0xe82(%rip),%rdi
call   1040 <printf@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x14,-0x8(%rbp)
jge    11a9 <main+0x59>
mov    $0x0,%al
call   1070 <mystatic@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    118a <main+0x3a>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <test3@plt>
mov    $0xa,%edi
call   1060 <set_age@plt>
xor    %eax,%eax
call   1050 <get_age@plt>
lea    0xe90(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1070 <mystatic@plt>
xor    %eax,%eax
call   1070 <mystatic@plt>
xor    %eax,%eax
call   1070 <mystatic@plt>
xor    %eax,%eax
call   1070 <mystatic@plt>
xor    %eax,%eax
call   1070 <mystatic@plt>
xor    %eax,%eax
call   1070 <mystatic@plt>
xor    %eax,%eax
call   1070 <mystatic@plt>
xor    %eax,%eax
call   1070 <mystatic@plt>
xor    %eax,%eax
call   1070 <mystatic@plt>
xor    %eax,%eax
call   1070 <mystatic@plt>
xor    %eax,%eax
call   1070 <mystatic@plt>
xor    %eax,%eax
call   1070 <mystatic@plt>
xor    %eax,%eax
call   1070 <mystatic@plt>
xor    %eax,%eax
call   1070 <mystatic@plt>
xor    %eax,%eax
call   1070 <mystatic@plt>
xor    %eax,%eax
call   1070 <mystatic@plt>
xor    %eax,%eax
call   1070 <mystatic@plt>
xor    %eax,%eax
call   1070 <mystatic@plt>
xor    %eax,%eax
call   1070 <mystatic@plt>
xor    %eax,%eax
call   1070 <mystatic@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [25 x i8] c"-----------------------\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (...) @test3()
%4 = call i32 @set_age(i32 10)
%5 = call i32 (...) @get_age()
%6 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %2
br label %7
7: ; preds = %12, %0
%8 = load i32, i32* %2
%9 = icmp slt i32 %8, 20
br i1 %9, label %10, label %15
10: ; preds = %7
%11 = call i32 (...) @mystatic()
br label %12
12: ; preds = %10
%13 = load i32, i32* %2
%14 = add nsw i32 %13, 1
store i32 %14, i32* %2
br label %7
15: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
@str = [24 x i8] c"-----------------------\00"
define i32 @main() {
%1 = tail call i32 (...) @test3()
%2 = tail call i32 @set_age(i32 10)
%3 = tail call i32 (...) @get_age()
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 (...) @mystatic()
%6 = tail call i32 (...) @mystatic()
%7 = tail call i32 (...) @mystatic()
%8 = tail call i32 (...) @mystatic()
%9 = tail call i32 (...) @mystatic()
%10 = tail call i32 (...) @mystatic()
%11 = tail call i32 (...) @mystatic()
%12 = tail call i32 (...) @mystatic()
%13 = tail call i32 (...) @mystatic()
%14 = tail call i32 (...) @mystatic()
%15 = tail call i32 (...) @mystatic()
%16 = tail call i32 (...) @mystatic()
%17 = tail call i32 (...) @mystatic()
%18 = tail call i32 (...) @mystatic()
%19 = tail call i32 (...) @mystatic()
%20 = tail call i32 (...) @mystatic()
%21 = tail call i32 (...) @mystatic()
%22 = tail call i32 (...) @mystatic()
%23 = tail call i32 (...) @mystatic()
%24 = tail call i32 (...) @mystatic()
ret i32 0
}