#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(void) {
  int i;
  int j;
  int tmp;
  int number[3];
  scanf("%d %d %d", &number[0], &number[1], &number[2]);
  for (i = 0; i < 2; i++) {
    for (j = i + 1; j < 3; j++) {
      if (number[i] > number[j]) {
        tmp = number[i];
        number[i] = number[j];
        number[j] = tmp;
      }
    }
  }
  printf("%d\n", number[1]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x1c(%rbp),%rsi
lea    -0x1c(%rbp),%rdx
add    $0x4,%rdx
lea    -0x1c(%rbp),%rcx
add    $0x8,%rcx
lea    0xeb6(%rip),%rdi
call   1040 <scanf@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    11d5 <main+0xb5>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x3,-0xc(%rbp)
jge    11c2 <main+0xa2>
movslq -0x8(%rbp),%rax
mov    -0x1c(%rbp,%rax,4),%eax
movslq -0xc(%rbp),%rcx
cmp    -0x1c(%rbp,%rcx,4),%eax
jle    11af <main+0x8f>
movslq -0x8(%rbp),%rax
mov    -0x1c(%rbp,%rax,4),%eax
mov    %eax,-0x10(%rbp)
movslq -0xc(%rbp),%rax
mov    -0x1c(%rbp,%rax,4),%ecx
movslq -0x8(%rbp),%rax
mov    %ecx,-0x1c(%rbp,%rax,4)
mov    -0x10(%rbp),%ecx
movslq -0xc(%rbp),%rax
mov    %ecx,-0x1c(%rbp,%rax,4)
jmp    11b4 <main+0x94>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1169 <main+0x49>
jmp    11c7 <main+0xa7>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1156 <main+0x36>
mov    -0x18(%rbp),%esi
lea    0xe2a(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0x10(%rsp),%rdx
lea    0x14(%rsp),%rcx
lea    0xecb(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
mov    0xc(%rsp),%ecx
mov    0x10(%rsp),%eax
cmp    %eax,%ecx
jle    1155 <main+0x35>
mov    %eax,0xc(%rsp)
mov    %ecx,0x10(%rsp)
jmp    1157 <main+0x37>
mov    %ecx,%eax
mov    0x14(%rsp),%ecx
cmp    %ecx,%eax
jle    1167 <main+0x47>
mov    %ecx,0xc(%rsp)
mov    %eax,0x14(%rsp)
mov    0x10(%rsp),%eax
mov    0x14(%rsp),%esi
cmp    %esi,%eax
jle    117d <main+0x5d>
mov    %esi,0x10(%rsp)
mov    %eax,0x14(%rsp)
jmp    117f <main+0x5f>
mov    %eax,%esi
lea    0xe83(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

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