#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*/ printf(char *, long long, long long);
int /*<<< orphan*/ scanf(char *, long long *);
int main() {
  long long int t, i, j, a[55], n;
  a[1] = 2;
  a[2] = 3;
  for (i = 3; i < 55; i++) {
    a[i] = a[i - 1] + a[i - 2];
  }
  scanf("%lld", &t);
  for (i = 1; i <= t; i++) {
    scanf("%lld", &n);
    printf("Scenario #%lld:\n%lld\n\n", i, a[n]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1f0,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x2,-0x1d8(%rbp)
movq   $0x3,-0x1d0(%rbp)
movq   $0x3,-0x18(%rbp)
cmpq   $0x37,-0x18(%rbp)
jge    1198 <main+0x78>
mov    -0x18(%rbp),%rax
sub    $0x1,%rax
mov    -0x1e0(%rbp,%rax,8),%rcx
ff
mov    -0x18(%rbp),%rax
sub    $0x2,%rax
add    -0x1e0(%rbp,%rax,8),%rcx
ff
mov    -0x18(%rbp),%rax
mov    %rcx,-0x1e0(%rbp,%rax,8)
ff
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1150 <main+0x30>
lea    0xe61(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
movq   $0x1,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jg     1201 <main+0xe1>
lea    0xe3b(%rip),%rdi
lea    -0x1e8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x18(%rbp),%rsi
mov    -0x1e8(%rbp),%rax
mov    -0x1e0(%rbp,%rax,8),%rdx
ff
lea    0xe1a(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    11b0 <main+0x90>
xor    %eax,%eax
add    $0x1f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x1c8,%rsp
movaps 0xecb(%rip),%xmm0
movups %xmm0,0x18(%rsp)
movq   $0x5,0x28(%rsp)
mov    $0x5,%eax
mov    $0x6,%ecx
nopl   (%rax)
add    -0x10(%rsp,%rcx,8),%rax
mov    %rax,(%rsp,%rcx,8)
mov    -0x8(%rsp,%rcx,8),%rdx
add    %rax,%rdx
mov    %rdx,0x8(%rsp,%rcx,8)
add    %rdx,%rax
mov    %rax,0x10(%rsp,%rcx,8)
add    $0x3,%rcx
cmp    $0x39,%rcx
jne    1150 <main+0x30>
lea    0xe91(%rip),%rdi
mov    %rsp,%rsi
call   1040 <scanf@plt>
cmpq   $0x0,(%rsp)
jle    11da <main+0xba>
xor    %ebx,%ebx
lea    0xe79(%rip),%r14
lea    0x8(%rsp),%r15
lea    0xe72(%rip),%r12
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%rbx
mov    %r14,%rdi
mov    %r15,%rsi
call   1040 <scanf@plt>
mov    0x8(%rsp),%rax
mov    0x10(%rsp,%rax,8),%rdx
mov    %r12,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
cmp    (%rsp),%rbx
jl     11b0 <main+0x90>
xor    %eax,%eax
add    $0x1c8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%lld\00"
@.str.1 = [23 x i8] c"Scenario #%lld:\0A%lld\0A\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
%5 = alloca [55 x i64]
%6 = alloca i64
store i32 0, i32* %1
%7 = getelementptr inbounds [55 x i64], [55 x i64]* %5, i64 0, i64 1
store i64 2, i64* %7
%8 = getelementptr inbounds [55 x i64], [55 x i64]* %5, i64 0, i64 2
store i64 3, i64* %8
store i64 3, i64* %3
br label %9
9: ; preds = %24, %0
%10 = load i64, i64* %3
%11 = icmp slt i64 %10, 55
br i1 %11, label %12, label %27
12: ; preds = %9
%13 = load i64, i64* %3
%14 = sub nsw i64 %13, 1
%15 = getelementptr inbounds [55 x i64], [55 x i64]* %5, i64 0, i64 %14
%16 = load i64, i64* %15
%17 = load i64, i64* %3
%18 = sub nsw i64 %17, 2
%19 = getelementptr inbounds [55 x i64], [55 x i64]* %5, i64 0, i64 %18
%20 = load i64, i64* %19
%21 = add nsw i64 %16, %20
%22 = load i64, i64* %3
%23 = getelementptr inbounds [55 x i64], [55 x i64]* %5, i64 0, i64 %22
store i64 %21, i64* %23
br label %24
24: ; preds = %12
%25 = load i64, i64* %3
%26 = add nsw i64 %25, 1
store i64 %26, i64* %3
br label %9
27: ; preds = %9
%28 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %2)
store i64 1, i64* %3
br label %29
29: ; preds = %40, %27
%30 = load i64, i64* %3
%31 = load i64, i64* %2
%32 = icmp sle i64 %30, %31
br i1 %32, label %33, label %43
33: ; preds = %29
%34 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %6)
%35 = load i64, i64* %3
%36 = load i64, i64* %6
%37 = getelementptr inbounds [55 x i64], [55 x i64]* %5, i64 0, i64 %36
%38 = load i64, i64* %37
%39 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i64 %35, i64 %38)
br label %40
40: ; preds = %33
%41 = load i64, i64* %3
%42 = add nsw i64 %41, 1
store i64 %42, i64* %3
br label %29
43: ; preds = %29
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%lld\00"
@.str.1 = [23 x i8] c"Scenario #%lld:\0A%lld\0A\0A\00"
define i32 @main() {
%1 = alloca i64
%2 = alloca [55 x i64]
%3 = alloca i64
%4 = bitcast i64* %1 to i8*
%5 = bitcast [55 x i64]* %2 to i8*
%6 = bitcast i64* %3 to i8*
%7 = getelementptr inbounds [55 x i64], [55 x i64]* %2, i64 0, i64 1
%8 = bitcast i64* %7 to <2 x i64>*
store <2 x i64> <i64 2, i64 3>, <2 x i64>* %8
%9 = getelementptr inbounds [55 x i64], [55 x i64]* %2, i64 0, i64 3
store i64 5, i64* %9
br label %10
10: ; preds = %10, %0
%11 = phi i64 [ 4, %0 ], [ %30, %10 ]
%12 = phi i64 [ 5, %0 ], [ %28, %10 ]
%13 = phi i64 [ 3, %0 ], [ %25, %10 ]
%14 = add nsw i64 %13, -1
%15 = getelementptr inbounds [55 x i64], [55 x i64]* %2, i64 0, i64 %14
%16 = load i64, i64* %15
%17 = add nsw i64 %16, %12
%18 = getelementptr inbounds [55 x i64], [55 x i64]* %2, i64 0, i64 %11
store i64 %17, i64* %18
%19 = add nuw nsw i64 %11, 1
%20 = add nsw i64 %11, -1
%21 = getelementptr inbounds [55 x i64], [55 x i64]* %2, i64 0, i64 %20
%22 = load i64, i64* %21
%23 = add nsw i64 %22, %17
%24 = getelementptr inbounds [55 x i64], [55 x i64]* %2, i64 0, i64 %19
store i64 %23, i64* %24
%25 = add nuw nsw i64 %11, 2
%26 = getelementptr inbounds [55 x i64], [55 x i64]* %2, i64 0, i64 %11
%27 = load i64, i64* %26
%28 = add nsw i64 %27, %23
%29 = getelementptr inbounds [55 x i64], [55 x i64]* %2, i64 0, i64 %25
store i64 %28, i64* %29
%30 = add nuw nsw i64 %11, 3
%31 = icmp eq i64 %30, 55
br i1 %31, label %32, label %10
32: ; preds = %10
%33 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %1)
%34 = load i64, i64* %1
%35 = icmp slt i64 %34, 1
br i1 %35, label %46, label %36
36: ; preds = %32, %36
%37 = phi i64 [ %43, %36 ], [ 1, %32 ]
%38 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %3)
%39 = load i64, i64* %3
%40 = getelementptr inbounds [55 x i64], [55 x i64]* %2, i64 0, i64 %39
%41 = load i64, i64* %40
%42 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i64 %37, i64 %41)
%43 = add nuw nsw i64 %37, 1
%44 = load i64, i64* %1
%45 = icmp slt i64 %37, %44
br i1 %45, label %36, label %46
46: ; preds = %36, %32
ret i32 0
}