#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(void) {
  int alturaDoPuloDoSapo, quantidadeDeCanos, diferenca, canos[128], i;
  scanf("%d %d", &alturaDoPuloDoSapo, &quantidadeDeCanos);
  for (i = 0; i < quantidadeDeCanos; i++) {
    scanf("%d", &canos[i]);
  }
  for (i = 1; i < quantidadeDeCanos; i++) {
    diferenca = canos[i] - canos[i - 1];
    if (((diferenca) < 0 ? -(diferenca) : (diferenca)) > alturaDoPuloDoSapo) {
      printf("GAME OVER\n");
      return 0;
    }
  }
  printf("YOU WIN\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x220,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xec7(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
mov    $0x0,%al
call   1040 <scanf@plt>
movl   $0x0,-0x214(%rbp)
mov    -0x214(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1198 <main+0x78>
movslq -0x214(%rbp),%rax
lea    -0x210(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe86(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x214(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x214(%rbp)
jmp    1152 <main+0x32>
movl   $0x1,-0x214(%rbp)
mov    -0x214(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1238 <main+0x118>
movslq -0x214(%rbp),%rax
mov    -0x210(%rbp,%rax,4),%eax
mov    -0x214(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
sub    -0x210(%rbp,%rcx,4),%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jge    11ef <main+0xcf>
xor    %eax,%eax
sub    -0x10(%rbp),%eax
mov    %eax,-0x218(%rbp)
jmp    11f8 <main+0xd8>
mov    -0x10(%rbp),%eax
mov    %eax,-0x218(%rbp)
mov    -0x218(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    121f <main+0xff>
lea    0xdf8(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    124b <main+0x12b>
jmp    1224 <main+0x104>
mov    -0x214(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x214(%rbp)
jmp    11a2 <main+0x82>
lea    0xdd2(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x220,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x218,%rsp
lea    0xecb(%rip),%rdi
lea    0xc(%rsp),%rsi
lea    0x8(%rsp),%rdx
xor    %eax,%eax
call   1040 <scanf@plt>
lea    0xeb9(%rip),%r14
cmpl   $0x0,0x8(%rsp)
jle    11d3 <main+0xb3>
lea    0x10(%rsp),%r12
lea    0xea3(%rip),%r15
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r15,%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
add    $0x1,%rbx
movslq 0x8(%rsp),%rax
add    $0x4,%r12
cmp    %rax,%rbx
jl     1170 <main+0x50>
mov    %eax,%eax
cmp    $0x2,%eax
jl     11d3 <main+0xb3>
mov    0xc(%rsp),%ecx
mov    $0x1,%edx
mov    0x10(%rsp),%ebx
lea    0xe64(%rip),%r8
nopw   0x0(%rax,%rax,1)
mov    %ebx,%esi
mov    0x10(%rsp,%rdx,4),%ebx
mov    %ebx,%edi
sub    %esi,%edi
mov    %edi,%esi
neg    %esi
cmovs  %edi,%esi
cmp    %ecx,%esi
jg     11d0 <main+0xb0>
add    $0x1,%rdx
cmp    %rdx,%rax
jne    11b0 <main+0x90>
jmp    11d3 <main+0xb3>
mov    %r8,%r14
mov    %r14,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x218,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [11 x i8] c"GAME OVER\0A\00"
@.str.3 = [9 x i8] c"YOU WIN\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca [128 x i32]
%6 = alloca i32
store i32 0, i32* %1
%7 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3)
store i32 0, i32* %6
br label %8
8: ; preds = %17, %0
%9 = load i32, i32* %6
%10 = load i32, i32* %3
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %20
12: ; preds = %8
%13 = load i32, i32* %6
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds [128 x i32], [128 x i32]* %5, i64 0, i64 %14
%16 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %15)
br label %17
17: ; preds = %12
%18 = load i32, i32* %6
%19 = add nsw i32 %18, 1
store i32 %19, i32* %6
br label %8
20: ; preds = %8
store i32 1, i32* %6
br label %21
21: ; preds = %50, %20
%22 = load i32, i32* %6
%23 = load i32, i32* %3
%24 = icmp slt i32 %22, %23
br i1 %24, label %25, label %53
25: ; preds = %21
%26 = load i32, i32* %6
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds [128 x i32], [128 x i32]* %5, i64 0, i64 %27
%29 = load i32, i32* %28
%30 = load i32, i32* %6
%31 = sub nsw i32 %30, 1
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds [128 x i32], [128 x i32]* %5, i64 0, i64 %32
%34 = load i32, i32* %33
%35 = sub nsw i32 %29, %34
store i32 %35, i32* %4
%36 = load i32, i32* %4
%37 = icmp slt i32 %36, 0
br i1 %37, label %38, label %41
38: ; preds = %25
%39 = load i32, i32* %4
%40 = sub nsw i32 0, %39
br label %43
41: ; preds = %25
%42 = load i32, i32* %4
br label %43
43: ; preds = %41, %38
%44 = phi i32 [ %40, %38 ], [ %42, %41 ]
%45 = load i32, i32* %2
%46 = icmp sgt i32 %44, %45
br i1 %46, label %47, label %49
47: ; preds = %43
%48 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %1
br label %55
49: ; preds = %43
br label %50
50: ; preds = %49
%51 = load i32, i32* %6
%52 = add nsw i32 %51, 1
store i32 %52, i32* %6
br label %21
53: ; preds = %21
%54 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
store i32 0, i32* %1
br label %55
55: ; preds = %53, %47
%56 = load i32, i32* %1
ret i32 %56
}

LLVM IR (-O2):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [3 x i8] c"%d\00"
@str = [8 x i8] c"YOU WIN\00"
@str.4 = [10 x i8] c"GAME OVER\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [128 x i32]
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast [128 x i32]* %3 to i8*
%7 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%8 = load i32, i32* %2
%9 = icmp sgt i32 %8, 0
br i1 %9, label %17, label %36
10: ; preds = %17
%11 = icmp sgt i32 %22, 1
br i1 %11, label %12, label %36
12: ; preds = %10
%13 = load i32, i32* %1
%14 = zext i32 %22 to i64
%15 = getelementptr inbounds [128 x i32], [128 x i32]* %3, i64 0, i64 0
%16 = load i32, i32* %15
br label %27
17: ; preds = %0, %17
%18 = phi i64 [ %21, %17 ], [ 0, %0 ]
%19 = getelementptr inbounds [128 x i32], [128 x i32]* %3, i64 0, i64 %18
%20 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %19)
%21 = add nuw nsw i64 %18, 1
%22 = load i32, i32* %2
%23 = sext i32 %22 to i64
%24 = icmp slt i64 %21, %23
br i1 %24, label %17, label %10
25: ; preds = %27
%26 = icmp eq i64 %35, %14
br i1 %26, label %36, label %27
27: ; preds = %12, %25
%28 = phi i32 [ %16, %12 ], [ %31, %25 ]
%29 = phi i64 [ 1, %12 ], [ %35, %25 ]
%30 = getelementptr inbounds [128 x i32], [128 x i32]* %3, i64 0, i64 %29
%31 = load i32, i32* %30
%32 = sub nsw i32 %31, %28
%33 = call i32 @llvm.abs.i32(i32 %32, i1 true)
%34 = icmp sgt i32 %33, %13
%35 = add nuw nsw i64 %29, 1
br i1 %34, label %36, label %25
36: ; preds = %25, %27, %10, %0
%37 = phi i8* [ getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0), %0 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0), %10 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @str.4, i64 0, i64 0), %27 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0), %25 ]
%38 = call i32 @puts(i8* dereferenceable(1) %37)
ret i32 0
}