#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*/ _printtst(char *, int /*<<< orphan*/);
int /*<<< orphan*/ _testhalt();
int /*<<< orphan*/ fac(int);
int /*<<< orphan*/ fib(int);
void bootentry() {
  _printtst("5!=", fac(5));
  _printtst("7!=", fac(7));
  _printtst("fib(8)=", fib(8));
  _printtst("fib(A)=", fib(0xA));
  _testhalt();
}


x86 assembly (clang, -O0):
<bootentry>:
push   %rbp
mov    %rsp,%rbp
mov    $0x5,%edi
call   1040 <fac@plt>
mov    %eax,%esi
lea    0xea9(%rip),%rdi
call   1030 <_printtst@plt>
mov    $0x7,%edi
call   1040 <fac@plt>
mov    %eax,%esi
lea    0xe95(%rip),%rdi
call   1030 <_printtst@plt>
mov    $0x8,%edi
call   1060 <fib@plt>
mov    %eax,%esi
lea    0xe81(%rip),%rdi
call   1030 <_printtst@plt>
mov    $0xa,%edi
call   1060 <fib@plt>
mov    %eax,%esi
lea    0xe71(%rip),%rdi
call   1030 <_printtst@plt>
mov    $0x0,%al
call   1050 <_testhalt@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<bootentry>:
push   %rax
mov    $0x5,%edi
call   1040 <fac@plt>
lea    0xeae(%rip),%rdi
mov    %eax,%esi
call   1030 <_printtst@plt>
mov    $0x7,%edi
call   1040 <fac@plt>
lea    0xe9a(%rip),%rdi
mov    %eax,%esi
call   1030 <_printtst@plt>
mov    $0x8,%edi
call   1060 <fib@plt>
lea    0xe86(%rip),%rdi
mov    %eax,%esi
call   1030 <_printtst@plt>
mov    $0xa,%edi
call   1060 <fib@plt>
lea    0xe76(%rip),%rdi
mov    %eax,%esi
call   1030 <_printtst@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <_testhalt@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"5!=\00"
@.str.1 = [4 x i8] c"7!=\00"
@.str.2 = [8 x i8] c"fib(8)=\00"
@.str.3 = [8 x i8] c"fib(A)=\00"
define void @bootentry() {
%1 = call i32 @fac(i32 5)
%2 = call i32 @_printtst(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = call i32 @fac(i32 7)
%4 = call i32 @_printtst(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = call i32 @fib(i32 8)
%6 = call i32 @_printtst(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 %5)
%7 = call i32 @fib(i32 10)
%8 = call i32 @_printtst(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i32 %7)
%9 = call i32 (...) @_testhalt()
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"5!=\00"
@.str.1 = [4 x i8] c"7!=\00"
@.str.2 = [8 x i8] c"fib(8)=\00"
@.str.3 = [8 x i8] c"fib(A)=\00"
define void @bootentry() {
%1 = tail call i32 @fac(i32 5)
%2 = tail call i32 @_printtst(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @fac(i32 7)
%4 = tail call i32 @_printtst(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = tail call i32 @fib(i32 8)
%6 = tail call i32 @_printtst(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 %5)
%7 = tail call i32 @fib(i32 10)
%8 = tail call i32 @_printtst(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i32 %7)
%9 = tail call i32 (...) @_testhalt()
ret void
}