#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 abs(int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, int *, int *);
int main() {
  int a, b, c;
  scanf("%i %i %i", &a, &b, &c);
  int max = ((a + b) + abs(a - b)) / 2;
  int max2 = ((b + c) + abs(b - c)) / 2;
  max = ((max + max2) + abs(max - max2)) / 2;
  printf("%i eh o maior\n", max);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1050 <scanf@plt>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x8(%rbp),%edi
sub    -0xc(%rbp),%edi
call   1030 <abs@plt>
mov    %eax,%ecx
mov    -0x24(%rbp),%eax
add    %ecx,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0xc(%rbp),%edi
sub    -0x10(%rbp),%edi
call   1030 <abs@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%eax
add    %ecx,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
add    -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x14(%rbp),%edi
sub    -0x18(%rbp),%edi
call   1030 <abs@plt>
mov    %eax,%ecx
mov    -0x1c(%rbp),%eax
add    %ecx,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xe36(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%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),%eax
mov    0x10(%rsp),%ecx
lea    (%rcx,%rax,1),%edx
sub    %ecx,%eax
mov    %eax,%esi
neg    %esi
cmovs  %eax,%esi
add    %edx,%esi
mov    %esi,%eax
shr    $0x1f,%eax
add    %esi,%eax
sar    %eax
mov    0xc(%rsp),%edx
lea    (%rdx,%rcx,1),%esi
sub    %edx,%ecx
mov    %ecx,%edx
neg    %edx
cmovs  %ecx,%edx
add    %esi,%edx
mov    %edx,%ecx
shr    $0x1f,%ecx
add    %edx,%ecx
sar    %ecx
lea    (%rcx,%rax,1),%edx
sub    %ecx,%eax
mov    %eax,%ecx
neg    %ecx
cmovs  %eax,%ecx
add    %edx,%ecx
mov    %ecx,%esi
shr    $0x1f,%esi
add    %ecx,%esi
sar    %esi
lea    0xe72(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [9 x i8] c"%i %i %i\00"
@.str.1 = [15 x i8] c"%i eh o maior\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
%7 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3, i32* %4)
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = add nsw i32 %8, %9
%11 = load i32, i32* %2
%12 = load i32, i32* %3
%13 = sub nsw i32 %11, %12
%14 = call i32 @abs(i32 %13)
%15 = add nsw i32 %10, %14
%16 = sdiv i32 %15, 2
store i32 %16, i32* %5
%17 = load i32, i32* %3
%18 = load i32, i32* %4
%19 = add nsw i32 %17, %18
%20 = load i32, i32* %3
%21 = load i32, i32* %4
%22 = sub nsw i32 %20, %21
%23 = call i32 @abs(i32 %22)
%24 = add nsw i32 %19, %23
%25 = sdiv i32 %24, 2
store i32 %25, i32* %6
%26 = load i32, i32* %5
%27 = load i32, i32* %6
%28 = add nsw i32 %26, %27
%29 = load i32, i32* %5
%30 = load i32, i32* %6
%31 = sub nsw i32 %29, %30
%32 = call i32 @abs(i32 %31)
%33 = add nsw i32 %28, %32
%34 = sdiv i32 %33, 2
store i32 %34, i32* %5
%35 = load i32, i32* %5
%36 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %35)
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"%i %i %i\00"
@.str.1 = [15 x i8] c"%i eh o maior\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 ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, i32* %3)
%8 = load i32, i32* %1
%9 = load i32, i32* %2
%10 = add nsw i32 %9, %8
%11 = sub nsw i32 %8, %9
%12 = call i32 @llvm.abs.i32(i32 %11, i1 true)
%13 = add nsw i32 %10, %12
%14 = sdiv i32 %13, 2
%15 = load i32, i32* %3
%16 = add nsw i32 %15, %9
%17 = sub nsw i32 %9, %15
%18 = call i32 @llvm.abs.i32(i32 %17, i1 true)
%19 = add nsw i32 %16, %18
%20 = sdiv i32 %19, 2
%21 = add nsw i32 %20, %14
%22 = sub nsw i32 %14, %20
%23 = call i32 @llvm.abs.i32(i32 %22, i1 true)
%24 = add nsw i32 %21, %23
%25 = sdiv i32 %24, 2
%26 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %25)
ret i32 0
}