#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*/ assert(int);
int nth_fibonacci_number(unsigned int);
int main() {
  int fibonacci_numbers[13] = {0,  1,  1,  2,   3,     5,        8,
                               13, 21, 34, 233, 75025, 102334155};
  unsigned int fibonacci_number_positions[13] = {0, 1, 2, 3,  4,  5, 6,
                                                 7, 8, 9, 13, 25, 40};
  for (int i = 0; i < 13; i++) {
    assert(fibonacci_numbers[i] ==
           nth_fibonacci_number(fibonacci_number_positions[i]));
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x40(%rbp),%rdi
lea    0xeb3(%rip),%rsi
mov    $0x34,%edx
call   1040 <memcpy@plt>
lea    -0x80(%rbp),%rdi
lea    0xede(%rip),%rsi
mov    $0x34,%edx
call   1040 <memcpy@plt>
movl   $0x0,-0x84(%rbp)
cmpl   $0xd,-0x84(%rbp)
jge    11cf <main+0x9f>
movslq -0x84(%rbp),%rax
mov    -0x40(%rbp,%rax,4),%eax
mov    %eax,-0x88(%rbp)
movslq -0x84(%rbp),%rax
mov    -0x80(%rbp,%rax,4),%edi
call   1050 <nth_fibonacci_number@plt>
mov    %eax,%ecx
mov    -0x88(%rbp),%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x84(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x84(%rbp)
jmp    1176 <main+0x46>
xor    %eax,%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1040 <nth_fibonacci_number@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1030 <assert@plt>
mov    $0x1,%edi
call   1040 <nth_fibonacci_number@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
call   1030 <assert@plt>
mov    $0x2,%edi
call   1040 <nth_fibonacci_number@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
call   1030 <assert@plt>
mov    $0x3,%edi
call   1040 <nth_fibonacci_number@plt>
xor    %edi,%edi
cmp    $0x2,%eax
sete   %dil
call   1030 <assert@plt>
mov    $0x4,%edi
call   1040 <nth_fibonacci_number@plt>
xor    %edi,%edi
cmp    $0x3,%eax
sete   %dil
call   1030 <assert@plt>
mov    $0x5,%edi
call   1040 <nth_fibonacci_number@plt>
xor    %edi,%edi
cmp    $0x5,%eax
sete   %dil
call   1030 <assert@plt>
mov    $0x6,%edi
call   1040 <nth_fibonacci_number@plt>
xor    %edi,%edi
cmp    $0x8,%eax
sete   %dil
call   1030 <assert@plt>
mov    $0x7,%edi
call   1040 <nth_fibonacci_number@plt>
xor    %edi,%edi
cmp    $0xd,%eax
sete   %dil
call   1030 <assert@plt>
mov    $0x8,%edi
call   1040 <nth_fibonacci_number@plt>
xor    %edi,%edi
cmp    $0x15,%eax
sete   %dil
call   1030 <assert@plt>
mov    $0x9,%edi
call   1040 <nth_fibonacci_number@plt>
xor    %edi,%edi
cmp    $0x22,%eax
sete   %dil
call   1030 <assert@plt>
mov    $0xd,%edi
call   1040 <nth_fibonacci_number@plt>
xor    %edi,%edi
cmp    $0xe9,%eax
sete   %dil
call   1030 <assert@plt>
mov    $0x19,%edi
call   1040 <nth_fibonacci_number@plt>
xor    %edi,%edi
cmp    $0x12511,%eax
sete   %dil
call   1030 <assert@plt>
mov    $0x28,%edi
call   1040 <nth_fibonacci_number@plt>
xor    %edi,%edi
cmp    $0x6197ecb,%eax
sete   %dil
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.main.fibonacci_numbers = [13 x i32] [i32 0, i32 1, i32 1, i32 2, i32 3, i32 5, i32 8, i32 13, i32 21, i32 34, i32 233, i32 75025, i32 102334155]
@__const.main.fibonacci_number_positions = [13 x i32] [i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 13, i32 25, i32 40]
define i32 @main() {
%1 = alloca i32
%2 = alloca [13 x i32]
%3 = alloca [13 x i32]
%4 = alloca i32
store i32 0, i32* %1
%5 = bitcast [13 x i32]* %2 to i8*
%6 = bitcast [13 x i32]* %3 to i8*
store i32 0, i32* %4
br label %7
7: ; preds = %23, %0
%8 = load i32, i32* %4
%9 = icmp slt i32 %8, 13
br i1 %9, label %10, label %26
10: ; preds = %7
%11 = load i32, i32* %4
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds [13 x i32], [13 x i32]* %2, i64 0, i64 %12
%14 = load i32, i32* %13
%15 = load i32, i32* %4
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds [13 x i32], [13 x i32]* %3, i64 0, i64 %16
%18 = load i32, i32* %17
%19 = call i32 @nth_fibonacci_number(i32 %18)
%20 = icmp eq i32 %14, %19
%21 = zext i1 %20 to i32
%22 = call i32 @assert(i32 %21)
br label %23
23: ; preds = %10
%24 = load i32, i32* %4
%25 = add nsw i32 %24, 1
store i32 %25, i32* %4
br label %7
26: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @nth_fibonacci_number(i32 0)
%2 = icmp eq i32 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = tail call i32 @nth_fibonacci_number(i32 1)
%6 = icmp eq i32 %5, 1
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
%9 = tail call i32 @nth_fibonacci_number(i32 2)
%10 = icmp eq i32 %9, 1
%11 = zext i1 %10 to i32
%12 = tail call i32 @assert(i32 %11)
%13 = tail call i32 @nth_fibonacci_number(i32 3)
%14 = icmp eq i32 %13, 2
%15 = zext i1 %14 to i32
%16 = tail call i32 @assert(i32 %15)
%17 = tail call i32 @nth_fibonacci_number(i32 4)
%18 = icmp eq i32 %17, 3
%19 = zext i1 %18 to i32
%20 = tail call i32 @assert(i32 %19)
%21 = tail call i32 @nth_fibonacci_number(i32 5)
%22 = icmp eq i32 %21, 5
%23 = zext i1 %22 to i32
%24 = tail call i32 @assert(i32 %23)
%25 = tail call i32 @nth_fibonacci_number(i32 6)
%26 = icmp eq i32 %25, 8
%27 = zext i1 %26 to i32
%28 = tail call i32 @assert(i32 %27)
%29 = tail call i32 @nth_fibonacci_number(i32 7)
%30 = icmp eq i32 %29, 13
%31 = zext i1 %30 to i32
%32 = tail call i32 @assert(i32 %31)
%33 = tail call i32 @nth_fibonacci_number(i32 8)
%34 = icmp eq i32 %33, 21
%35 = zext i1 %34 to i32
%36 = tail call i32 @assert(i32 %35)
%37 = tail call i32 @nth_fibonacci_number(i32 9)
%38 = icmp eq i32 %37, 34
%39 = zext i1 %38 to i32
%40 = tail call i32 @assert(i32 %39)
%41 = tail call i32 @nth_fibonacci_number(i32 13)
%42 = icmp eq i32 %41, 233
%43 = zext i1 %42 to i32
%44 = tail call i32 @assert(i32 %43)
%45 = tail call i32 @nth_fibonacci_number(i32 25)
%46 = icmp eq i32 %45, 75025
%47 = zext i1 %46 to i32
%48 = tail call i32 @assert(i32 %47)
%49 = tail call i32 @nth_fibonacci_number(i32 40)
%50 = icmp eq i32 %49, 102334155
%51 = zext i1 %50 to i32
%52 = tail call i32 @assert(i32 %51)
ret i32 0
}