#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 get_max();
int /*<<< orphan*/ insert(int);
int /*<<< orphan*/ print();
int /*<<< orphan*/ printf(char *, ...);
int main() {
  insert(3);
  insert(4);
  insert(5);
  insert(6);
  insert(7);
  insert(8);
  insert(9);
  insert(10);
  print();
  int i;
  for (i = 0; i < 9; i++) {
    printf("%d ", get_max());
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x3,%edi
call   1060 <insert@plt>
mov    $0x4,%edi
call   1060 <insert@plt>
mov    $0x5,%edi
call   1060 <insert@plt>
mov    $0x6,%edi
call   1060 <insert@plt>
mov    $0x7,%edi
call   1060 <insert@plt>
mov    $0x8,%edi
call   1060 <insert@plt>
mov    $0x9,%edi
call   1060 <insert@plt>
mov    $0xa,%edi
call   1060 <insert@plt>
mov    $0x0,%al
call   1050 <print@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x9,-0x8(%rbp)
jge    11dc <main+0x9c>
mov    $0x0,%al
call   1040 <get_max@plt>
mov    %eax,%esi
lea    0xe39(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11ad <main+0x6d>
lea    0xe21(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x3,%edi
call   1070 <insert@plt>
mov    $0x4,%edi
call   1070 <insert@plt>
mov    $0x5,%edi
call   1070 <insert@plt>
mov    $0x6,%edi
call   1070 <insert@plt>
mov    $0x7,%edi
call   1070 <insert@plt>
mov    $0x8,%edi
call   1070 <insert@plt>
mov    $0x9,%edi
call   1070 <insert@plt>
mov    $0xa,%edi
call   1070 <insert@plt>
xor    %eax,%eax
call   1060 <print@plt>
xor    %eax,%eax
call   1050 <get_max@plt>
lea    0xe4a(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <get_max@plt>
mov    %rbx,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <get_max@plt>
mov    %rbx,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <get_max@plt>
mov    %rbx,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <get_max@plt>
mov    %rbx,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <get_max@plt>
mov    %rbx,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <get_max@plt>
mov    %rbx,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <get_max@plt>
mov    %rbx,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <get_max@plt>
mov    %rbx,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rbx
ret

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

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