#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 *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int balls;
  scanf("%d", &balls);
  int order[balls + 1];
  int previous = balls + 1;
  for (int i = 1; i <= balls; i++) {
    scanf("%d", &order[i]);
    if (order[i] + 1 != previous) {
      printf("Cheater");
      return 0;
    }
    previous = order[i];
  }
  printf("Not a proof");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %rsp,%rcx
mov    %rcx,-0x10(%rbp)
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x30(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
movl   $0x1,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     11f2 <main+0xd2>
mov    -0x30(%rbp),%rsi
movslq -0x20(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe65(%rip),%rdi
call   1040 <scanf@plt>
mov    -0x30(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
add    $0x1,%eax
cmp    -0x1c(%rbp),%eax
je     11d6 <main+0xb6>
lea    0xe45(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x24(%rbp)
jmp    120c <main+0xec>
mov    -0x30(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1179 <main+0x59>
lea    0xe12(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x24(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xec8(%rip),%rdi
lea    -0x2c(%rbp),%rsi
call   1040 <scanf@plt>
mov    %rsp,%rbx
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %rsp,%r13
lea    0xf(,%rax,4),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r13
mov    %r13,%rsp
mov    -0x2c(%rbp),%eax
lea    0xea2(%rip),%rdi
test   %eax,%eax
jle    11d5 <main+0xb5>
mov    %rbx,-0x38(%rbp)
add    $0x1,%eax
add    $0x4,%r13
xor    %ebx,%ebx
lea    0xe7f(%rip),%r12
xor    %r15d,%r15d
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %eax,%r14d
lea    (%rbx,%r13,1),%rsi
mov    %r12,%rdi
call   1040 <scanf@plt>
mov    0x0(%r13,%r15,4),%eax
lea    0x1(%rax),%ecx
cmp    %r14d,%ecx
jne    11ca <main+0xaa>
movslq -0x2c(%rbp),%rcx
add    $0x1,%r15
add    $0x4,%rbx
cmp    %rcx,%r15
jl     1190 <main+0x70>
mov    -0x38(%rbp),%rbx
lea    0xe43(%rip),%rdi
jmp    11d5 <main+0xb5>
lea    0xe32(%rip),%rdi
mov    -0x38(%rbp),%rbx
call   1030 <printf@plt>
mov    %rbx,%rsp
xor    %eax,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [8 x i8] c"Cheater\00"
@.str.2 = [12 x i8] c"Not a proof\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = add nsw i32 %4, 1
%6 = zext i32 %5 to i64
%7 = call i8* @llvm.stacksave()
%8 = alloca i32, i64 %6
%9 = load i32, i32* %1
%10 = icmp slt i32 %9, 1
br i1 %10, label %26, label %11
11: ; preds = %0
%12 = add nuw nsw i32 %9, 1
br label %18
13: ; preds = %18
%14 = add nuw nsw i64 %19, 1
%15 = load i32, i32* %1
%16 = sext i32 %15 to i64
%17 = icmp slt i64 %19, %16
br i1 %17, label %18, label %26
18: ; preds = %11, %13
%19 = phi i64 [ 1, %11 ], [ %14, %13 ]
%20 = phi i32 [ %12, %11 ], [ %23, %13 ]
%21 = getelementptr inbounds i32, i32* %8, i64 %19
%22 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %21)
%23 = load i32, i32* %21
%24 = add nsw i32 %23, 1
%25 = icmp eq i32 %24, %20
br i1 %25, label %13, label %26
26: ; preds = %13, %18, %0
%27 = phi i8* [ getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), %0 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), %18 ], [ getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), %13 ]
%28 = call i32 @printf(i8* dereferenceable(1) %27)
ret i32 0
}