#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*/ my_test(int, int, int);
int main(int argc, char const *argv[]) {
  { my_test(4, 5, 1); }
  { my_test(0, 0, 2); }
  { my_test(1, 1, 3); }
  {
    int inputs[6] = {3, 5, 7, 9, 10, 12};
    int answers[6] = {3, 8, 21, 55, 89, 233};
    int i = 0;
    for (; i < 6; i++) {
      my_test(inputs[i], answers[i], 4);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x4,%edi
mov    $0x5,%esi
mov    $0x1,%edx
call   1030 <my_test@plt>
xor    %esi,%esi
mov    $0x2,%edx
mov    %esi,%edi
call   1030 <my_test@plt>
mov    $0x1,%esi
mov    $0x3,%edx
mov    %esi,%edi
call   1030 <my_test@plt>
mov    0xea0(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xe9d(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xe9a(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xe9f(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    0xe9c(%rip),%rax
mov    %rax,-0x48(%rbp)
mov    0xe99(%rip),%rax
mov    %rax,-0x40(%rbp)
movl   $0x0,-0x54(%rbp)
cmpl   $0x6,-0x54(%rbp)
jge    11d4 <main+0xc4>
movslq -0x54(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%edi
movslq -0x54(%rbp),%rax
mov    -0x50(%rbp,%rax,4),%esi
mov    $0x4,%edx
call   1030 <my_test@plt>
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    11a2 <main+0x92>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x4,%edi
mov    $0x5,%esi
mov    $0x1,%edx
call   1030 <my_test@plt>
xor    %edi,%edi
xor    %esi,%esi
mov    $0x2,%edx
call   1030 <my_test@plt>
mov    $0x1,%edi
mov    $0x1,%esi
mov    $0x3,%edx
call   1030 <my_test@plt>
mov    $0x3,%edi
mov    $0x3,%esi
mov    $0x4,%edx
call   1030 <my_test@plt>
mov    $0x5,%edi
mov    $0x8,%esi
mov    $0x4,%edx
call   1030 <my_test@plt>
mov    $0x7,%edi
mov    $0x15,%esi
mov    $0x4,%edx
call   1030 <my_test@plt>
mov    $0x9,%edi
mov    $0x37,%esi
mov    $0x4,%edx
call   1030 <my_test@plt>
mov    $0xa,%edi
mov    $0x59,%esi
mov    $0x4,%edx
call   1030 <my_test@plt>
mov    $0xc,%edi
mov    $0xe9,%esi
mov    $0x4,%edx
call   1030 <my_test@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.main.inputs = [6 x i32] [i32 3, i32 5, i32 7, i32 9, i32 10, i32 12]
@__const.main.answers = [6 x i32] [i32 3, i32 8, i32 21, i32 55, i32 89, i32 233]
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [6 x i32]
%7 = alloca [6 x i32]
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = call i32 @my_test(i32 4, i32 5, i32 1)
%10 = call i32 @my_test(i32 0, i32 0, i32 2)
%11 = call i32 @my_test(i32 1, i32 1, i32 3)
%12 = bitcast [6 x i32]* %6 to i8*
%13 = bitcast [6 x i32]* %7 to i8*
store i32 0, i32* %8
br label %14
14: ; preds = %27, %2
%15 = load i32, i32* %8
%16 = icmp slt i32 %15, 6
br i1 %16, label %17, label %30
17: ; preds = %14
%18 = load i32, i32* %8
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [6 x i32], [6 x i32]* %6, i64 0, i64 %19
%21 = load i32, i32* %20
%22 = load i32, i32* %8
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds [6 x i32], [6 x i32]* %7, i64 0, i64 %23
%25 = load i32, i32* %24
%26 = call i32 @my_test(i32 %21, i32 %25, i32 4)
br label %27
27: ; preds = %17
%28 = load i32, i32* %8
%29 = add nsw i32 %28, 1
store i32 %29, i32* %8
br label %14
30: ; preds = %14
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @my_test(i32 4, i32 5, i32 1)
%4 = tail call i32 @my_test(i32 0, i32 0, i32 2)
%5 = tail call i32 @my_test(i32 1, i32 1, i32 3)
%6 = tail call i32 @my_test(i32 3, i32 3, i32 4)
%7 = tail call i32 @my_test(i32 5, i32 8, i32 4)
%8 = tail call i32 @my_test(i32 7, i32 21, i32 4)
%9 = tail call i32 @my_test(i32 9, i32 55, i32 4)
%10 = tail call i32 @my_test(i32 10, i32 89, i32 4)
%11 = tail call i32 @my_test(i32 12, i32 233, i32 4)
ret i32 0
}