#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) && (a > c))
    printf("a is largest");
  if (b > c)
    printf("b is largest");
  else
    printf("c is largest");
  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    116b <main+0x4b>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    116b <main+0x4b>
lea    0xea1(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    1188 <main+0x68>
lea    0xe96(%rip),%rdi
call   1030 <printf@plt>
jmp    1194 <main+0x74>
lea    0xe92(%rip),%rdi
call   1030 <printf@plt>
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),%edx
mov    0x10(%rsp),%eax
mov    0xc(%rsp),%ecx
cmp    %eax,%edx
jle    1167 <main+0x47>
cmp    %ecx,%edx
jle    1167 <main+0x47>
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
mov    0x10(%rsp),%eax
mov    0xc(%rsp),%ecx
cmp    %ecx,%eax
lea    0xea4(%rip),%rax
lea    0xeaa(%rip),%rdi
cmovg  %rax,%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 = [13 x i8] c"a is largest\00"
@.str.2 = [13 x i8] c"b is largest\00"
@.str.3 = [13 x i8] c"c is largest\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 %15
9: ; preds = %0
%10 = load i32, i32* %2
%11 = load i32, i32* %4
%12 = icmp sgt i32 %10, %11
br i1 %12, label %13, label %15
13: ; preds = %9
%14 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
br label %15
15: ; preds = %13, %9, %0
%16 = load i32, i32* %3
%17 = load i32, i32* %4
%18 = icmp sgt i32 %16, %17
br i1 %18, label %19, label %21
19: ; preds = %15
%20 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
br label %23
21: ; preds = %15
%22 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0))
br label %23
23: ; preds = %21, %19
ret i32 0
}

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