#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);
int /*<<< orphan*/ scanf(char *, int *, int *, int *);
int main() {
  int A, B, C, tmp;
  scanf("%d%d%d", &A, &B, &C);
  if (A < B) {
    tmp = A;
    A = B;
    B = tmp;
  }
  if (B < C) {
    tmp = B;
    B = C;
    C = tmp;
  }
  if (A < B) {
    tmp = A;
    A = B;
    B = tmp;
  }
  printf("%d\n", B);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%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
jge    1165 <main+0x45>
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1183 <main+0x63>
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    11a1 <main+0x81>
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xe5c(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0xc(%rsp),%rdx
lea    0x14(%rsp),%rcx
call   1040 <scanf@plt>
mov    0x10(%rsp),%eax
mov    0xc(%rsp),%ecx
cmp    %ecx,%eax
jge    1157 <main+0x37>
mov    %ecx,0x10(%rsp)
mov    %eax,0xc(%rsp)
mov    %ecx,%esi
jmp    115b <main+0x3b>
mov    %eax,%esi
mov    %ecx,%eax
mov    0x14(%rsp),%ecx
cmp    %ecx,%eax
jge    1173 <main+0x53>
mov    %ecx,0xc(%rsp)
mov    %eax,0x14(%rsp)
cmp    %ecx,%esi
jl     1179 <main+0x59>
mov    %ecx,%esi
jmp    1181 <main+0x61>
mov    %eax,%ecx
cmp    %ecx,%esi
jge    116f <main+0x4f>
mov    %ecx,0x10(%rsp)
mov    %esi,0xc(%rsp)
lea    0xe7f(%rip),%rdi
call   1030 <printf@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"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
%6 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3, i32* %4)
%7 = load i32, i32* %2
%8 = load i32, i32* %3
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %14
10: ; preds = %0
%11 = load i32, i32* %2
store i32 %11, i32* %5
%12 = load i32, i32* %3
store i32 %12, i32* %2
%13 = load i32, i32* %5
store i32 %13, i32* %3
br label %14
14: ; preds = %10, %0
%15 = load i32, i32* %3
%16 = load i32, i32* %4
%17 = icmp slt i32 %15, %16
br i1 %17, label %18, label %22
18: ; preds = %14
%19 = load i32, i32* %3
store i32 %19, i32* %5
%20 = load i32, i32* %4
store i32 %20, i32* %3
%21 = load i32, i32* %5
store i32 %21, i32* %4
br label %22
22: ; preds = %18, %14
%23 = load i32, i32* %2
%24 = load i32, i32* %3
%25 = icmp slt i32 %23, %24
br i1 %25, label %26, label %30
26: ; preds = %22
%27 = load i32, i32* %2
store i32 %27, i32* %5
%28 = load i32, i32* %3
store i32 %28, i32* %2
%29 = load i32, i32* %5
store i32 %29, i32* %3
br label %30
30: ; preds = %26, %22
%31 = load i32, i32* %3
%32 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %31)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"%d%d%d\00"
@.str.1 = [4 x i8] c"%d\0A\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 slt i32 %8, %9
br i1 %10, label %11, label %12
11: ; preds = %0
store i32 %9, i32* %1
store i32 %8, i32* %2
br label %12
12: ; preds = %11, %0
%13 = phi i32 [ %9, %11 ], [ %8, %0 ]
%14 = phi i32 [ %8, %11 ], [ %9, %0 ]
%15 = load i32, i32* %3
%16 = icmp slt i32 %14, %15
br i1 %16, label %17, label %18
17: ; preds = %12
store i32 %15, i32* %2
store i32 %14, i32* %3
br label %18
18: ; preds = %17, %12
%19 = phi i32 [ %15, %17 ], [ %14, %12 ]
%20 = icmp slt i32 %13, %19
br i1 %20, label %21, label %22
21: ; preds = %18
store i32 %19, i32* %1
store i32 %13, i32* %2
br label %22
22: ; preds = %21, %18
%23 = phi i32 [ %13, %21 ], [ %19, %18 ]
%24 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %23)
ret i32 0
}