#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 */
scalar_t__ isFibonacci(unsigned long long);
unsigned long long pow(int, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, ...);
int main() {
  int t = 0;
  unsigned long long n = 0;
  int i = 0;
  scanf("%d", &t);
  if ((t < 1) || (t > pow(10, 5))) {
    printf("Input Constraint Violation: T == %d does not satisfy constraint (1 "
           "<= T <= 10^5).\n",
           t);
    return 0;
  }
  for (i = 0; i < t; i++) {
    scanf("%llu", &n);
    if ((n < 1) || (n > pow(10, 10))) {
      printf("Input Constraint Violation: N == %llu does not satisfy contraint "
             "(1 <= N <= 10^10).\n",
             n);
      return 0;
    }
    if (isFibonacci(n)) {
      printf("IsFibo\n");
    } else {
      printf("IsNotFibo\n");
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
lea    0xe94(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
cmpl   $0x1,-0x8(%rbp)
jl     11a8 <main+0x68>
movslq -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    $0xa,%edi
mov    $0x5,%esi
call   1060 <pow@plt>
mov    %rax,%rcx
mov    -0x20(%rbp),%rax
cmp    %rcx,%rax
jbe    11c5 <main+0x85>
mov    -0x8(%rbp),%esi
lea    0xe51(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1285 <main+0x145>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    127e <main+0x13e>
lea    0xe77(%rip),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
cmpq   $0x1,-0x10(%rbp)
jb     1219 <main+0xd9>
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    $0xa,%esi
mov    %esi,%edi
call   1060 <pow@plt>
mov    %rax,%rcx
mov    -0x28(%rbp),%rax
cmp    %rcx,%rax
jbe    1237 <main+0xf7>
mov    -0x10(%rbp),%rsi
lea    0xe37(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1285 <main+0x145>
mov    -0x10(%rbp),%rdi
call   1040 <isFibonacci@plt>
cmp    $0x0,%rax
je     125d <main+0x11d>
lea    0xe5f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    126b <main+0x12b>
lea    0xe54(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1270 <main+0x130>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11cc <main+0x8c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
movl   $0x0,0xc(%rsp)
movq   $0x0,0x10(%rsp)
lea    0xe8a(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
mov    0xc(%rsp),%ebx
test   %ebx,%ebx
jle    11a2 <main+0x52>
mov    $0xa,%edi
mov    $0x5,%esi
call   1070 <pow@plt>
cmp    %rbx,%rax
mov    0xc(%rsp),%ebx
jae    11c3 <main+0x73>
lea    0xe5a(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
test   %ebx,%ebx
jle    11b2 <main+0x62>
lea    0xe88(%rip),%r14
lea    0x10(%rsp),%r13
lea    0xed6(%rip),%r15
lea    0xed9(%rip),%r12
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r14,%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
mov    0x10(%rsp),%rbx
test   %rbx,%rbx
je     1245 <main+0xf5>
mov    $0xa,%edi
mov    $0xa,%esi
call   1070 <pow@plt>
mov    0x10(%rsp),%rsi
cmp    %rax,%rbx
ja     1247 <main+0xf7>
mov    %rsi,%rdi
call   1050 <isFibonacci@plt>
test   %rax,%rax
mov    %r12,%rdi
cmove  %r15,%rdi
call   1030 <puts@plt>
add    $0x1,%ebp
cmp    0xc(%rsp),%ebp
jl     11f0 <main+0xa0>
jmp    11b2 <main+0x62>
xor    %esi,%esi
lea    0xe0d(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    11b2 <main+0x62>

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [83 x i8] c"Input Constraint Violation: T == %d does not satisfy constraint (1 <= T <= 10^5).\0A\00"
@.str.2 = [5 x i8] c"%llu\00"
@.str.3 = [85 x i8] c"Input Constraint Violation: N == %llu does not satisfy contraint (1 <= N <= 10^10).\0A\00"
@.str.4 = [8 x i8] c"IsFibo\0A\00"
@.str.5 = [11 x i8] c"IsNotFibo\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i64
%4 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i64 0, i64* %3
store i32 0, i32* %4
%5 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 1
br i1 %7, label %13, label %8
8: ; preds = %0
%9 = load i32, i32* %2
%10 = sext i32 %9 to i64
%11 = call i64 @pow(i32 10, i32 5)
%12 = icmp ugt i64 %10, %11
br i1 %12, label %13, label %16
13: ; preds = %8, %0
%14 = load i32, i32* %2
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str.1, i64 0, i64 0), i32 %14)
store i32 0, i32* %1
br label %45
16: ; preds = %8
store i32 0, i32* %4
br label %17
17: ; preds = %41, %16
%18 = load i32, i32* %4
%19 = load i32, i32* %2
%20 = icmp slt i32 %18, %19
br i1 %20, label %21, label %44
21: ; preds = %17
%22 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i64* %3)
%23 = load i64, i64* %3
%24 = icmp ult i64 %23, 1
br i1 %24, label %29, label %25
25: ; preds = %21
%26 = load i64, i64* %3
%27 = call i64 @pow(i32 10, i32 10)
%28 = icmp ugt i64 %26, %27
br i1 %28, label %29, label %32
29: ; preds = %25, %21
%30 = load i64, i64* %3
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([85 x i8], [85 x i8]* @.str.3, i64 0, i64 0), i64 %30)
store i32 0, i32* %1
br label %45
32: ; preds = %25
%33 = load i64, i64* %3
%34 = call i64 @isFibonacci(i64 %33)
%35 = icmp ne i64 %34, 0
br i1 %35, label %36, label %38
36: ; preds = %32
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0))
br label %40
38: ; preds = %32
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0))
br label %40
40: ; preds = %38, %36
br label %41
41: ; preds = %40
%42 = load i32, i32* %4
%43 = add nsw i32 %42, 1
store i32 %43, i32* %4
br label %17
44: ; preds = %17
store i32 0, i32* %1
br label %45
45: ; preds = %44, %29, %13
%46 = load i32, i32* %1
ret i32 %46
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [83 x i8] c"Input Constraint Violation: T == %d does not satisfy constraint (1 <= T <= 10^5).\0A\00"
@.str.2 = [5 x i8] c"%llu\00"
@.str.3 = [85 x i8] c"Input Constraint Violation: N == %llu does not satisfy contraint (1 <= N <= 10^10).\0A\00"
@str = [10 x i8] c"IsNotFibo\00"
@str.6 = [7 x i8] c"IsFibo\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%4 = bitcast i64* %2 to i8*
store i64 0, i64* %2
%5 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = load i32, i32* %1
%7 = icmp slt i32 %6, 1
br i1 %7, label %15, label %8
8: ; preds = %0
%9 = zext i32 %6 to i64
%10 = call i64 @pow(i32 10, i32 5)
%11 = icmp ult i64 %10, %9
%12 = load i32, i32* %1
br i1 %11, label %15, label %13
13: ; preds = %8
%14 = icmp sgt i32 %12, 0
br i1 %14, label %18, label %38
15: ; preds = %8, %0
%16 = phi i32 [ %6, %0 ], [ %12, %8 ]
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([83 x i8], [83 x i8]* @.str.1, i64 0, i64 0), i32 %16)
br label %38
18: ; preds = %13, %30
%19 = phi i32 [ %35, %30 ], [ 0, %13 ]
%20 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i64* %2)
%21 = load i64, i64* %2
%22 = icmp eq i64 %21, 0
br i1 %22, label %27, label %23
23: ; preds = %18
%24 = call i64 @pow(i32 10, i32 10)
%25 = icmp ugt i64 %21, %24
%26 = load i64, i64* %2
br i1 %25, label %27, label %30
27: ; preds = %18, %23
%28 = phi i64 [ %26, %23 ], [ 0, %18 ]
%29 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([85 x i8], [85 x i8]* @.str.3, i64 0, i64 0), i64 %28)
br label %38
30: ; preds = %23
%31 = call i64 @isFibonacci(i64 %26)
%32 = icmp eq i64 %31, 0
%33 = select i1 %32, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @str.6, i64 0, i64 0)
%34 = call i32 @puts(i8* dereferenceable(1) %33)
%35 = add nuw nsw i32 %19, 1
%36 = load i32, i32* %1
%37 = icmp slt i32 %35, %36
br i1 %37, label %18, label %38
38: ; preds = %30, %13, %27, %15
ret i32 0
}