#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 main(void) {
  int numbers[3];
  printf("Enter First Number:\n");
  scanf("%9d", &numbers[0]);
  printf("Enter Second Number:\n");
  scanf("%9d", &numbers[1]);
  printf("Enter Third Number:\n");
  scanf("%9d", &numbers[2]);
  if ((numbers[0] > numbers[1]) && (numbers[0] > numbers[2])) {
    printf("the largest number you entered is: %d\n", numbers[0]);
  } else if ((numbers[1] > numbers[0]) && (numbers[1] > numbers[2])) {
    printf("the largest number you entered is: %d\n", numbers[1]);
  } else if ((numbers[2] > numbers[0]) && (numbers[2] > numbers[1])) {
    printf("the largest number you entered is: %d\n", numbers[2]);
  } else {
    printf("some of the numbers you entered are equal\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x10(%rbp),%rsi
lea    0xecd(%rip),%rdi
call   1040 <scanf@plt>
lea    0xec5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x10(%rbp),%rsi
add    $0x4,%rsi
lea    0xeab(%rip),%rdi
call   1040 <scanf@plt>
lea    0xeb9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x10(%rbp),%rsi
add    $0x8,%rsi
lea    0xe89(%rip),%rdi
call   1040 <scanf@plt>
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    11bf <main+0x9f>
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    11bf <main+0x9f>
mov    -0x10(%rbp),%esi
lea    0xe91(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1233 <main+0x113>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    11ed <main+0xcd>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    11ed <main+0xcd>
mov    -0xc(%rbp),%esi
lea    0xe63(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    122e <main+0x10e>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    121b <main+0xfb>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    121b <main+0xfb>
mov    -0x8(%rbp),%esi
lea    0xe35(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1229 <main+0x109>
lea    0xe49(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    122e <main+0x10e>
jmp    1233 <main+0x113>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xeef(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb8(%rip),%rbx
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xee3(%rip),%rdi
call   1030 <puts@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xedf(%rip),%rdi
call   1030 <puts@plt>
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
mov    0x4(%rsp),%ecx
mov    0x8(%rsp),%eax
mov    0xc(%rsp),%esi
cmp    %eax,%ecx
jle    11a6 <main+0x76>
cmp    %esi,%ecx
jle    11a6 <main+0x76>
lea    0xe62(%rip),%rdi
mov    %ecx,%esi
jmp    11c8 <main+0x98>
cmp    %ecx,%eax
jle    11b9 <main+0x89>
cmp    %esi,%eax
jle    11b9 <main+0x89>
lea    0xe4f(%rip),%rdi
mov    %eax,%esi
jmp    11c8 <main+0x98>
cmp    %ecx,%esi
jle    11d7 <main+0xa7>
cmp    %eax,%esi
jle    11d7 <main+0xa7>
lea    0xe3c(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret
lea    0xe8a(%rip),%rdi
call   1030 <puts@plt>
jmp    11cf <main+0x9f>

LLVM IR (-O0):
@.str = [21 x i8] c"Enter First Number:\0A\00"
@.str.1 = [4 x i8] c"%9d\00"
@.str.2 = [22 x i8] c"Enter Second Number:\0A\00"
@.str.3 = [21 x i8] c"Enter Third Number:\0A\00"
@.str.4 = [39 x i8] c"the largest number you entered is: %d\0A\00"
@.str.5 = [43 x i8] c"some of the numbers you entered are equal\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [3 x i32]
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 0
%5 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
%7 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 1
%8 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32* %7)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0))
%10 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 2
%11 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32* %10)
%12 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 0
%13 = load i32, i32* %12
%14 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 1
%15 = load i32, i32* %14
%16 = icmp sgt i32 %13, %15
br i1 %16, label %17, label %27
17: ; preds = %0
%18 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 0
%19 = load i32, i32* %18
%20 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 2
%21 = load i32, i32* %20
%22 = icmp sgt i32 %19, %21
br i1 %22, label %23, label %27
23: ; preds = %17
%24 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 0
%25 = load i32, i32* %24
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.4, i64 0, i64 0), i32 %25)
br label %63
27: ; preds = %17, %0
%28 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 1
%29 = load i32, i32* %28
%30 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 0
%31 = load i32, i32* %30
%32 = icmp sgt i32 %29, %31
br i1 %32, label %33, label %43
33: ; preds = %27
%34 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 1
%35 = load i32, i32* %34
%36 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 2
%37 = load i32, i32* %36
%38 = icmp sgt i32 %35, %37
br i1 %38, label %39, label %43
39: ; preds = %33
%40 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 1
%41 = load i32, i32* %40
%42 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.4, i64 0, i64 0), i32 %41)
br label %62
43: ; preds = %33, %27
%44 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 2
%45 = load i32, i32* %44
%46 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 0
%47 = load i32, i32* %46
%48 = icmp sgt i32 %45, %47
br i1 %48, label %49, label %59
49: ; preds = %43
%50 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 2
%51 = load i32, i32* %50
%52 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 1
%53 = load i32, i32* %52
%54 = icmp sgt i32 %51, %53
br i1 %54, label %55, label %59
55: ; preds = %49
%56 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 2
%57 = load i32, i32* %56
%58 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.4, i64 0, i64 0), i32 %57)
br label %61
59: ; preds = %49, %43
%60 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.5, i64 0, i64 0))
br label %61
61: ; preds = %59, %55
br label %62
62: ; preds = %61, %39
br label %63
63: ; preds = %62, %23
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [4 x i8] c"%9d\00"
@.str.4 = [39 x i8] c"the largest number you entered is: %d\0A\00"
@str = [20 x i8] c"Enter First Number:\00"
@str.6 = [21 x i8] c"Enter Second Number:\00"
@str.7 = [20 x i8] c"Enter Third Number:\00"
@str.8 = [42 x i8] c"some of the numbers you entered are equal\00"
define i32 @main() {
%1 = alloca [3 x i32]
%2 = bitcast [3 x i32]* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
%4 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 0
%5 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%6 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.6, i64 0, i64 0))
%7 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 1
%8 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32* %7)
%9 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.7, i64 0, i64 0))
%10 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 2
%11 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32* %10)
%12 = load i32, i32* %4
%13 = load i32, i32* %7
%14 = icmp sgt i32 %12, %13
%15 = load i32, i32* %10
%16 = icmp sgt i32 %12, %15
%17 = select i1 %14, i1 %16, i1 false
br i1 %17, label %18, label %20
18: ; preds = %0
%19 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.4, i64 0, i64 0), i32 %12)
br label %34
20: ; preds = %0
%21 = icmp sgt i32 %13, %12
%22 = icmp sgt i32 %13, %15
%23 = select i1 %21, i1 %22, i1 false
br i1 %23, label %24, label %26
24: ; preds = %20
%25 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.4, i64 0, i64 0), i32 %13)
br label %34
26: ; preds = %20
%27 = icmp sgt i32 %15, %12
%28 = icmp sgt i32 %15, %13
%29 = select i1 %27, i1 %28, i1 false
br i1 %29, label %30, label %32
30: ; preds = %26
%31 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.4, i64 0, i64 0), i32 %15)
br label %34
32: ; preds = %26
%33 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str.8, i64 0, i64 0))
br label %34
34: ; preds = %24, %32, %30, %18
ret i32 0
}