#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 (a > b) {
    if (b > c) {
      if (a - b > b - c) {
        printf(":)\n");
      } else {
        printf(":(\n");
      }
    } else {
      printf(":)\n");
    }
  } else if (a < b) {
    if (b < c) {
      if (a - b > b - c) {
        printf(":)\n");
      } else {
        printf(":(\n");
      }
    } else {
      printf(":(\n");
    }
  } else if (b < c) {
    printf(":)\n");
  } else {
    printf(":(\n");
  }
  return 0;
}


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    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    11a6 <main+0x86>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    1195 <main+0x75>
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    -0x10(%rbp),%ecx
cmp    %ecx,%eax
jle    1184 <main+0x64>
lea    0xe8d(%rip),%rdi
call   1030 <printf@plt>
jmp    1190 <main+0x70>
lea    0xe80(%rip),%rdi
call   1030 <printf@plt>
jmp    11a1 <main+0x81>
lea    0xe6b(%rip),%rdi
call   1030 <printf@plt>
jmp    1238 <main+0x118>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1205 <main+0xe5>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    11f4 <main+0xd4>
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    -0x10(%rbp),%ecx
cmp    %ecx,%eax
jle    11e3 <main+0xc3>
lea    0xe2e(%rip),%rdi
call   1030 <printf@plt>
jmp    11ef <main+0xcf>
lea    0xe21(%rip),%rdi
call   1030 <printf@plt>
jmp    1200 <main+0xe0>
lea    0xe10(%rip),%rdi
call   1030 <printf@plt>
jmp    1233 <main+0x113>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1222 <main+0x102>
lea    0xdef(%rip),%rdi
call   1030 <printf@plt>
jmp    122e <main+0x10e>
lea    0xde2(%rip),%rdi
call   1030 <printf@plt>
jmp    1233 <main+0x113>
jmp    1238 <main+0x118>
xor    %eax,%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    0x14(%rsp),%ecx
mov    0x10(%rsp),%eax
sub    %eax,%ecx
jle    115a <main+0x3a>
sub    0xc(%rsp),%eax
jg     1164 <main+0x44>
lea    0xeb2(%rip),%rdi
jmp    1197 <main+0x77>
mov    0xc(%rsp),%edx
jge    117a <main+0x5a>
sub    %edx,%eax
jge    1190 <main+0x70>
cmp    %eax,%ecx
lea    0xe9d(%rip),%rax
lea    0xe93(%rip),%rdi
cmovg  %rax,%rdi
jmp    1197 <main+0x77>
cmp    %edx,%eax
lea    0xe87(%rip),%rax
lea    0xe7d(%rip),%rdi
cmovl  %rax,%rdi
jmp    1197 <main+0x77>
lea    0xe70(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%d%d%d\00"
@.str.1 = [4 x i8] c":)\0A\00"
@.str.2 = [4 x i8] c":(\0A\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 ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3, i32* %4)
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = icmp sgt i32 %6, %7
br i1 %8, label %9, label %29
9: ; preds = %0
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = icmp sgt i32 %10, %11
br i1 %12, label %13, label %26
13: ; preds = %9
%14 = load i32, i32* %2
%15 = load i32, i32* %3
%16 = sub nsw i32 %14, %15
%17 = load i32, i32* %3
%18 = load i32, i32* %4
%19 = sub nsw i32 %17, %18
%20 = icmp sgt i32 %16, %19
br i1 %20, label %21, label %23
21: ; preds = %13
%22 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
br label %25
23: ; preds = %13
%24 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
br label %25
25: ; preds = %23, %21
br label %28
26: ; preds = %9
%27 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
br label %28
28: ; preds = %26, %25
br label %63
29: ; preds = %0
%30 = load i32, i32* %2
%31 = load i32, i32* %3
%32 = icmp slt i32 %30, %31
br i1 %32, label %33, label %53
33: ; preds = %29
%34 = load i32, i32* %3
%35 = load i32, i32* %4
%36 = icmp slt i32 %34, %35
br i1 %36, label %37, label %50
37: ; preds = %33
%38 = load i32, i32* %2
%39 = load i32, i32* %3
%40 = sub nsw i32 %38, %39
%41 = load i32, i32* %3
%42 = load i32, i32* %4
%43 = sub nsw i32 %41, %42
%44 = icmp sgt i32 %40, %43
br i1 %44, label %45, label %47
45: ; preds = %37
%46 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
br label %49
47: ; preds = %37
%48 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
br label %49
49: ; preds = %47, %45
br label %52
50: ; preds = %33
%51 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
br label %52
52: ; preds = %50, %49
br label %62
53: ; preds = %29
%54 = load i32, i32* %3
%55 = load i32, i32* %4
%56 = icmp slt i32 %54, %55
br i1 %56, label %57, label %59
57: ; preds = %53
%58 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
br label %61
59: ; preds = %53
%60 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
br label %61
61: ; preds = %59, %57
br label %62
62: ; preds = %61, %52
br label %63
63: ; preds = %62, %28
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"%d%d%d\00"
@str.8 = [3 x i8] c":(\00"
@str.9 = [3 x i8] c":)\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 ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, i32* %3)
%8 = load i32, i32* %1
%9 = load i32, i32* %2
%10 = icmp sgt i32 %8, %9
br i1 %10, label %11, label %19
11: ; preds = %0
%12 = load i32, i32* %3
%13 = icmp sgt i32 %9, %12
br i1 %13, label %14, label %31
14: ; preds = %11
%15 = sub nsw i32 %8, %9
%16 = sub nsw i32 %9, %12
%17 = icmp sgt i32 %15, %16
%18 = select i1 %17, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @str.9, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @str.8, i64 0, i64 0)
br label %31
19: ; preds = %0
%20 = icmp slt i32 %8, %9
%21 = load i32, i32* %3
%22 = icmp slt i32 %9, %21
br i1 %20, label %23, label %29
23: ; preds = %19
br i1 %22, label %24, label %31
24: ; preds = %23
%25 = sub nsw i32 %8, %9
%26 = sub nsw i32 %9, %21
%27 = icmp sgt i32 %25, %26
%28 = select i1 %27, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @str.9, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @str.8, i64 0, i64 0)
br label %31
29: ; preds = %19
%30 = select i1 %22, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @str.9, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @str.8, i64 0, i64 0)
br label %31
31: ; preds = %29, %23, %24, %11, %14
%32 = phi i8* [ %18, %14 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @str.9, i64 0, i64 0), %11 ], [ %28, %24 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @str.8, i64 0, i64 0), %23 ], [ %30, %29 ]
%33 = call i32 @puts(i8* dereferenceable(1) %32)
ret i32 0
}