#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*/ puts(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int a, b, c;
  puts("Finding the biggest number");
  printf("%s", "Enter 'a' value: ");
  scanf("%d", &a);
  printf("%s", "Enter 'b' value: ");
  scanf("%d", &b);
  printf("%s", "Enter 'c' value: ");
  scanf("%d", &c);
  if (a > b && a > c)
    printf("The biggest number is a: %d", a);
  else if (b > c)
    printf("The biggest number is b: %d", b);
  else
    printf("The biggest number is c: %d", c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <puts@plt>
lea    0xec9(%rip),%rdi
lea    0xec5(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf06(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
lea    0xea4(%rip),%rdi
lea    0xeb2(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xee1(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1050 <scanf@plt>
lea    0xe7f(%rip),%rdi
lea    0xe9f(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xebc(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    11e8 <main+0xb8>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    11e8 <main+0xb8>
mov    -0x8(%rbp),%esi
lea    0xe78(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1220 <main+0xf0>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    120a <main+0xda>
mov    -0xc(%rbp),%esi
lea    0xe72(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    121b <main+0xeb>
mov    -0x10(%rbp),%esi
lea    0xe78(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1220 <main+0xf0>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x18,%rsp
lea    0xec2(%rip),%rdi
call   1030 <puts@plt>
lea    0xed1(%rip),%r14
lea    0xecd(%rip),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf0b(%rip),%rbx
lea    0x14(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xeba(%rip),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xeae(%rip),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
mov    0x14(%rsp),%ecx
mov    0x10(%rsp),%esi
mov    0xc(%rsp),%eax
cmp    %esi,%ecx
jle    11ca <main+0x9a>
cmp    %eax,%ecx
jle    11ca <main+0x9a>
lea    0xe8e(%rip),%rdi
mov    %ecx,%esi
jmp    11e0 <main+0xb0>
cmp    %eax,%esi
jle    11d7 <main+0xa7>
lea    0xe9b(%rip),%rdi
jmp    11e0 <main+0xb0>
lea    0xeae(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [27 x i8] c"Finding the biggest number\00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [18 x i8] c"Enter 'a' value: \00"
@.str.3 = [3 x i8] c"%d\00"
@.str.4 = [18 x i8] c"Enter 'b' value: \00"
@.str.5 = [18 x i8] c"Enter 'c' value: \00"
@.str.6 = [28 x i8] c"The biggest number is a: %d\00"
@.str.7 = [28 x i8] c"The biggest number is b: %d\00"
@.str.8 = [28 x i8] c"The biggest number is c: %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 @puts(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %2)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0))
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %3)
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0))
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %4)
%12 = load i32, i32* %2
%13 = load i32, i32* %3
%14 = icmp sgt i32 %12, %13
br i1 %14, label %15, label %22
15: ; preds = %0
%16 = load i32, i32* %2
%17 = load i32, i32* %4
%18 = icmp sgt i32 %16, %17
br i1 %18, label %19, label %22
19: ; preds = %15
%20 = load i32, i32* %2
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.6, i64 0, i64 0), i32 %20)
br label %33
22: ; preds = %15, %0
%23 = load i32, i32* %3
%24 = load i32, i32* %4
%25 = icmp sgt i32 %23, %24
br i1 %25, label %26, label %29
26: ; preds = %22
%27 = load i32, i32* %3
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0), i32 %27)
br label %32
29: ; preds = %22
%30 = load i32, i32* %4
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.8, i64 0, i64 0), i32 %30)
br label %32
32: ; preds = %29, %26
br label %33
33: ; preds = %32, %19
ret i32 0
}

LLVM IR (-O2):
@.str = [27 x i8] c"Finding the biggest number\00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [18 x i8] c"Enter 'a' value: \00"
@.str.3 = [3 x i8] c"%d\00"
@.str.4 = [18 x i8] c"Enter 'b' value: \00"
@.str.5 = [18 x i8] c"Enter 'c' value: \00"
@.str.6 = [28 x i8] c"The biggest number is a: %d\00"
@.str.7 = [28 x i8] c"The biggest number is b: %d\00"
@.str.8 = [28 x i8] c"The biggest number is c: %d\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 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %1)
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0))
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %2)
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0))
%13 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %3)
%14 = load i32, i32* %1
%15 = load i32, i32* %2
%16 = icmp sgt i32 %14, %15
%17 = load i32, i32* %3
%18 = icmp sgt i32 %14, %17
%19 = select i1 %16, i1 %18, i1 false
br i1 %19, label %20, label %22
20: ; preds = %0
%21 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.6, i64 0, i64 0), i32 %14)
br label %28
22: ; preds = %0
%23 = icmp sgt i32 %15, %17
br i1 %23, label %24, label %26
24: ; preds = %22
%25 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0), i32 %15)
br label %28
26: ; preds = %22
%27 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.8, i64 0, i64 0), i32 %17)
br label %28
28: ; preds = %24, %26, %20
ret i32 0
}