#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 *, int *);
int main() {
  int a, b, c;
  scanf("%d%d %d", &a, &b, &c);
  if ((c >= a) && (c <= b)) {
    printf("BINGO");
  } else {
    if (c < a) {
      printf("%d", a - c);
    }
    if (c > b) {
      printf("%d", c - b);
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1040 <scanf@plt>
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jl     1172 <main+0x52>
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     1172 <main+0x52>
lea    0xea2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11b7 <main+0x97>
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1192 <main+0x72>
mov    -0x8(%rbp),%esi
sub    -0x10(%rbp),%esi
lea    0xe7a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    11b2 <main+0x92>
mov    -0x10(%rbp),%esi
sub    -0xc(%rbp),%esi
lea    0xe5a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11b7 <main+0x97>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1040 <scanf@plt>
mov    0xc(%rsp),%esi
mov    0x14(%rsp),%eax
mov    0x10(%rsp),%ecx
cmp    %esi,%eax
jg     1163 <main+0x43>
cmp    %ecx,%esi
jg     1163 <main+0x43>
lea    0xeae(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
jmp    1191 <main+0x71>
sub    %esi,%eax
jle    117f <main+0x5f>
lea    0xe97(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0xc(%rsp),%esi
mov    0x10(%rsp),%ecx
sub    %ecx,%esi
jle    1191 <main+0x71>
lea    0xe7b(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

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