#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);
unsigned long find_nth_fibo_using_dynamic_programming(unsigned long);
unsigned long
find_nth_fibo_using_dynamic_programming_memoization(unsigned long);
int main() {
  unsigned long num1 = 0;
  unsigned long exp_fib_num1 = 0;
  unsigned long actual_fib_num1;
  actual_fib_num1 = find_nth_fibo_using_dynamic_programming_memoization(num1);
  assert(actual_fib_num1 == exp_fib_num1);
  actual_fib_num1 = find_nth_fibo_using_dynamic_programming(num1);
  assert(actual_fib_num1 == exp_fib_num1);
  unsigned long num2 = 1;
  unsigned long exp_fib_num2 = 1;
  unsigned long actual_fib_num2;
  actual_fib_num2 = find_nth_fibo_using_dynamic_programming_memoization(num2);
  assert(actual_fib_num2 == exp_fib_num2);
  actual_fib_num2 = find_nth_fibo_using_dynamic_programming(num2);
  assert(actual_fib_num2 == exp_fib_num2);
  unsigned long num3 = 2;
  unsigned long exp_fib_num3 = 1;
  unsigned long actual_fib_num3;
  actual_fib_num3 = find_nth_fibo_using_dynamic_programming_memoization(num3);
  assert(actual_fib_num3 == exp_fib_num3);
  actual_fib_num3 = find_nth_fibo_using_dynamic_programming(num3);
  assert(actual_fib_num3 == exp_fib_num3);
  unsigned long num4 = 7;
  unsigned long exp_fib_num4 = 13;
  unsigned long actual_fib_num4;
  actual_fib_num4 = find_nth_fibo_using_dynamic_programming_memoization(num4);
  assert(actual_fib_num4 == exp_fib_num4);
  actual_fib_num4 = find_nth_fibo_using_dynamic_programming(num4);
  assert(actual_fib_num4 == exp_fib_num4);
  unsigned long num5 = 10;
  unsigned long exp_fib_num5 = 55;
  unsigned long actual_fib_num5;
  actual_fib_num5 = find_nth_fibo_using_dynamic_programming_memoization(num5);
  assert(actual_fib_num5 == exp_fib_num5);
  actual_fib_num5 = find_nth_fibo_using_dynamic_programming(num5);
  assert(actual_fib_num5 == exp_fib_num5);
  unsigned long num6 = 50;
  unsigned long exp_fib_num6 = 12586269025;
  unsigned long actual_fib_num6;
  actual_fib_num6 = find_nth_fibo_using_dynamic_programming_memoization(num6);
  assert(actual_fib_num6 == exp_fib_num6);
  actual_fib_num6 = find_nth_fibo_using_dynamic_programming(num6);
  assert(actual_fib_num6 == exp_fib_num6);
  unsigned long num7 = 100;
  unsigned long exp_fib_num7 = -1;
  unsigned long actual_fib_num7;
  actual_fib_num7 = find_nth_fibo_using_dynamic_programming_memoization(num7);
  assert(actual_fib_num7 == exp_fib_num7);
  actual_fib_num7 = find_nth_fibo_using_dynamic_programming(num7);
  assert(actual_fib_num7 == exp_fib_num7);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <find_nth_fibo_using_dynamic_programming_memoization@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x18(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x10(%rbp),%rdi
call   1030 <find_nth_fibo_using_dynamic_programming@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x18(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
movq   $0x1,-0x28(%rbp)
movq   $0x1,-0x30(%rbp)
mov    -0x28(%rbp),%rdi
call   1050 <find_nth_fibo_using_dynamic_programming_memoization@plt>
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
cmp    -0x30(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x28(%rbp),%rdi
call   1030 <find_nth_fibo_using_dynamic_programming@plt>
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
cmp    -0x30(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
movq   $0x2,-0x40(%rbp)
movq   $0x1,-0x48(%rbp)
mov    -0x40(%rbp),%rdi
call   1050 <find_nth_fibo_using_dynamic_programming_memoization@plt>
mov    %rax,-0x50(%rbp)
mov    -0x50(%rbp),%rax
cmp    -0x48(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x40(%rbp),%rdi
call   1030 <find_nth_fibo_using_dynamic_programming@plt>
mov    %rax,-0x50(%rbp)
mov    -0x50(%rbp),%rax
cmp    -0x48(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
movq   $0x7,-0x58(%rbp)
movq   $0xd,-0x60(%rbp)
mov    -0x58(%rbp),%rdi
call   1050 <find_nth_fibo_using_dynamic_programming_memoization@plt>
mov    %rax,-0x68(%rbp)
mov    -0x68(%rbp),%rax
cmp    -0x60(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x58(%rbp),%rdi
call   1030 <find_nth_fibo_using_dynamic_programming@plt>
mov    %rax,-0x68(%rbp)
mov    -0x68(%rbp),%rax
cmp    -0x60(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
movq   $0xa,-0x70(%rbp)
movq   $0x37,-0x78(%rbp)
mov    -0x70(%rbp),%rdi
call   1050 <find_nth_fibo_using_dynamic_programming_memoization@plt>
mov    %rax,-0x80(%rbp)
mov    -0x80(%rbp),%rax
cmp    -0x78(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x70(%rbp),%rdi
call   1030 <find_nth_fibo_using_dynamic_programming@plt>
mov    %rax,-0x80(%rbp)
mov    -0x80(%rbp),%rax
cmp    -0x78(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
movq   $0x32,-0x88(%rbp)
movabs $0x2ee333961,%rax
mov    %rax,-0x90(%rbp)
mov    -0x88(%rbp),%rdi
call   1050 <find_nth_fibo_using_dynamic_programming_memoization@plt>
mov    %rax,-0x98(%rbp)
mov    -0x98(%rbp),%rax
cmp    -0x90(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x88(%rbp),%rdi
call   1030 <find_nth_fibo_using_dynamic_programming@plt>
mov    %rax,-0x98(%rbp)
mov    -0x98(%rbp),%rax
cmp    -0x90(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
movq   $0x64,-0xa0(%rbp)
movq   $0xffffffffffffffff,-0xa8(%rbp)
ff ff ff ff
mov    -0xa0(%rbp),%rdi
call   1050 <find_nth_fibo_using_dynamic_programming_memoization@plt>
mov    %rax,-0xb0(%rbp)
mov    -0xb0(%rbp),%rax
cmp    -0xa8(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0xa0(%rbp),%rdi
call   1030 <find_nth_fibo_using_dynamic_programming@plt>
mov    %rax,-0xb0(%rbp)
mov    -0xb0(%rbp),%rax
cmp    -0xa8(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
xor    %eax,%eax
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %edi,%edi
call   1050 <find_nth_fibo_using_dynamic_programming_memoization@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1040 <assert@plt>
xor    %edi,%edi
call   1030 <find_nth_fibo_using_dynamic_programming@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1040 <assert@plt>
mov    $0x1,%edi
call   1050 <find_nth_fibo_using_dynamic_programming_memoization@plt>
xor    %edi,%edi
cmp    $0x1,%rax
sete   %dil
call   1040 <assert@plt>
mov    $0x1,%edi
call   1030 <find_nth_fibo_using_dynamic_programming@plt>
xor    %edi,%edi
cmp    $0x1,%rax
sete   %dil
call   1040 <assert@plt>
mov    $0x2,%edi
call   1050 <find_nth_fibo_using_dynamic_programming_memoization@plt>
xor    %edi,%edi
cmp    $0x1,%rax
sete   %dil
call   1040 <assert@plt>
mov    $0x2,%edi
call   1030 <find_nth_fibo_using_dynamic_programming@plt>
xor    %edi,%edi
cmp    $0x1,%rax
sete   %dil
call   1040 <assert@plt>
mov    $0x7,%edi
call   1050 <find_nth_fibo_using_dynamic_programming_memoization@plt>
xor    %edi,%edi
cmp    $0xd,%rax
sete   %dil
call   1040 <assert@plt>
mov    $0x7,%edi
call   1030 <find_nth_fibo_using_dynamic_programming@plt>
xor    %edi,%edi
cmp    $0xd,%rax
sete   %dil
call   1040 <assert@plt>
mov    $0xa,%edi
call   1050 <find_nth_fibo_using_dynamic_programming_memoization@plt>
xor    %edi,%edi
cmp    $0x37,%rax
sete   %dil
call   1040 <assert@plt>
mov    $0xa,%edi
call   1030 <find_nth_fibo_using_dynamic_programming@plt>
xor    %edi,%edi
cmp    $0x37,%rax
sete   %dil
call   1040 <assert@plt>
mov    $0x32,%edi
call   1050 <find_nth_fibo_using_dynamic_programming_memoization@plt>
movabs $0x2ee333961,%rbx
xor    %edi,%edi
cmp    %rbx,%rax
sete   %dil
call   1040 <assert@plt>
mov    $0x32,%edi
call   1030 <find_nth_fibo_using_dynamic_programming@plt>
xor    %edi,%edi
cmp    %rbx,%rax
sete   %dil
call   1040 <assert@plt>
mov    $0x64,%edi
call   1050 <find_nth_fibo_using_dynamic_programming_memoization@plt>
xor    %edi,%edi
cmp    $0xffffffffffffffff,%rax
sete   %dil
call   1040 <assert@plt>
mov    $0x64,%edi
call   1030 <find_nth_fibo_using_dynamic_programming@plt>
xor    %edi,%edi
cmp    $0xffffffffffffffff,%rax
sete   %dil
call   1040 <assert@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
%11 = alloca i64
%12 = alloca i64
%13 = alloca i64
%14 = alloca i64
%15 = alloca i64
%16 = alloca i64
%17 = alloca i64
%18 = alloca i64
%19 = alloca i64
%20 = alloca i64
%21 = alloca i64
%22 = alloca i64
store i32 0, i32* %1
store i64 0, i64* %2
store i64 0, i64* %3
%23 = load i64, i64* %2
%24 = call i64 @find_nth_fibo_using_dynamic_programming_memoization(i64 %23)
store i64 %24, i64* %4
%25 = load i64, i64* %4
%26 = load i64, i64* %3
%27 = icmp eq i64 %25, %26
%28 = zext i1 %27 to i32
%29 = call i32 @assert(i32 %28)
%30 = load i64, i64* %2
%31 = call i64 @find_nth_fibo_using_dynamic_programming(i64 %30)
store i64 %31, i64* %4
%32 = load i64, i64* %4
%33 = load i64, i64* %3
%34 = icmp eq i64 %32, %33
%35 = zext i1 %34 to i32
%36 = call i32 @assert(i32 %35)
store i64 1, i64* %5
store i64 1, i64* %6
%37 = load i64, i64* %5
%38 = call i64 @find_nth_fibo_using_dynamic_programming_memoization(i64 %37)
store i64 %38, i64* %7
%39 = load i64, i64* %7
%40 = load i64, i64* %6
%41 = icmp eq i64 %39, %40
%42 = zext i1 %41 to i32
%43 = call i32 @assert(i32 %42)
%44 = load i64, i64* %5
%45 = call i64 @find_nth_fibo_using_dynamic_programming(i64 %44)
store i64 %45, i64* %7
%46 = load i64, i64* %7
%47 = load i64, i64* %6
%48 = icmp eq i64 %46, %47
%49 = zext i1 %48 to i32
%50 = call i32 @assert(i32 %49)
store i64 2, i64* %8
store i64 1, i64* %9
%51 = load i64, i64* %8
%52 = call i64 @find_nth_fibo_using_dynamic_programming_memoization(i64 %51)
store i64 %52, i64* %10
%53 = load i64, i64* %10
%54 = load i64, i64* %9
%55 = icmp eq i64 %53, %54
%56 = zext i1 %55 to i32
%57 = call i32 @assert(i32 %56)
%58 = load i64, i64* %8
%59 = call i64 @find_nth_fibo_using_dynamic_programming(i64 %58)
store i64 %59, i64* %10
%60 = load i64, i64* %10
%61 = load i64, i64* %9
%62 = icmp eq i64 %60, %61
%63 = zext i1 %62 to i32
%64 = call i32 @assert(i32 %63)
store i64 7, i64* %11
store i64 13, i64* %12
%65 = load i64, i64* %11
%66 = call i64 @find_nth_fibo_using_dynamic_programming_memoization(i64 %65)
store i64 %66, i64* %13
%67 = load i64, i64* %13
%68 = load i64, i64* %12
%69 = icmp eq i64 %67, %68
%70 = zext i1 %69 to i32
%71 = call i32 @assert(i32 %70)
%72 = load i64, i64* %11
%73 = call i64 @find_nth_fibo_using_dynamic_programming(i64 %72)
store i64 %73, i64* %13
%74 = load i64, i64* %13
%75 = load i64, i64* %12
%76 = icmp eq i64 %74, %75
%77 = zext i1 %76 to i32
%78 = call i32 @assert(i32 %77)
store i64 10, i64* %14
store i64 55, i64* %15
%79 = load i64, i64* %14
%80 = call i64 @find_nth_fibo_using_dynamic_programming_memoization(i64 %79)
store i64 %80, i64* %16
%81 = load i64, i64* %16
%82 = load i64, i64* %15
%83 = icmp eq i64 %81, %82
%84 = zext i1 %83 to i32
%85 = call i32 @assert(i32 %84)
%86 = load i64, i64* %14
%87 = call i64 @find_nth_fibo_using_dynamic_programming(i64 %86)
store i64 %87, i64* %16
%88 = load i64, i64* %16
%89 = load i64, i64* %15
%90 = icmp eq i64 %88, %89
%91 = zext i1 %90 to i32
%92 = call i32 @assert(i32 %91)
store i64 50, i64* %17
store i64 12586269025, i64* %18
%93 = load i64, i64* %17
%94 = call i64 @find_nth_fibo_using_dynamic_programming_memoization(i64 %93)
store i64 %94, i64* %19
%95 = load i64, i64* %19
%96 = load i64, i64* %18
%97 = icmp eq i64 %95, %96
%98 = zext i1 %97 to i32
%99 = call i32 @assert(i32 %98)
%100 = load i64, i64* %17
%101 = call i64 @find_nth_fibo_using_dynamic_programming(i64 %100)
store i64 %101, i64* %19
%102 = load i64, i64* %19
%103 = load i64, i64* %18
%104 = icmp eq i64 %102, %103
%105 = zext i1 %104 to i32
%106 = call i32 @assert(i32 %105)
store i64 100, i64* %20
store i64 -1, i64* %21
%107 = load i64, i64* %20
%108 = call i64 @find_nth_fibo_using_dynamic_programming_memoization(i64 %107)
store i64 %108, i64* %22
%109 = load i64, i64* %22
%110 = load i64, i64* %21
%111 = icmp eq i64 %109, %110
%112 = zext i1 %111 to i32
%113 = call i32 @assert(i32 %112)
%114 = load i64, i64* %20
%115 = call i64 @find_nth_fibo_using_dynamic_programming(i64 %114)
store i64 %115, i64* %22
%116 = load i64, i64* %22
%117 = load i64, i64* %21
%118 = icmp eq i64 %116, %117
%119 = zext i1 %118 to i32
%120 = call i32 @assert(i32 %119)
ret i32 0
}

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