#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;
  printf("Enter any three numbers\n");
  scanf("%d %d %d", &a, &b, &c);
  while (a > b && a > c) {
    printf("%d is the largest number", a);
    break;
  }
  while (b > c && b > a) {
    printf("%d is the largest number", b);
    break;
  }
  while (c > a && c > b) {
    printf("%d is the largest number", c);
    break;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed5(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%ecx
xor    %eax,%eax
cmp    -0xc(%rbp),%ecx
mov    %al,-0x11(%rbp)
jle    1172 <main+0x52>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
setg   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1182 <main+0x62>
jmp    1193 <main+0x73>
mov    -0x8(%rbp),%esi
lea    0xe96(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1198 <main+0x78>
mov    -0xc(%rbp),%ecx
xor    %eax,%eax
cmp    -0x10(%rbp),%ecx
mov    %al,-0x12(%rbp)
jle    11b5 <main+0x95>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
setg   %al
mov    %al,-0x12(%rbp)
mov    -0x12(%rbp),%al
test   $0x1,%al
jne    11c5 <main+0xa5>
jmp    11d6 <main+0xb6>
mov    -0xc(%rbp),%esi
lea    0xe53(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11db <main+0xbb>
mov    -0x10(%rbp),%ecx
xor    %eax,%eax
cmp    -0x8(%rbp),%ecx
mov    %al,-0x13(%rbp)
jle    11f8 <main+0xd8>
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
setg   %al
mov    %al,-0x13(%rbp)
mov    -0x13(%rbp),%al
test   $0x1,%al
jne    1208 <main+0xe8>
jmp    1219 <main+0xf9>
mov    -0x10(%rbp),%esi
lea    0xe10(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xee7(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb9(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1050 <scanf@plt>
mov    0x14(%rsp),%ecx
mov    0x10(%rsp),%eax
mov    0xc(%rsp),%esi
cmp    %eax,%ecx
jle    118b <main+0x5b>
cmp    %esi,%ecx
jle    118b <main+0x5b>
lea    0xe93(%rip),%rdi
mov    %ecx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x10(%rsp),%eax
mov    0xc(%rsp),%esi
mov    0x14(%rsp),%ecx
cmp    %esi,%eax
jle    11af <main+0x7f>
cmp    %ecx,%eax
jle    11af <main+0x7f>
lea    0xe6f(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0xc(%rsp),%esi
mov    0x14(%rsp),%ecx
mov    0x10(%rsp),%eax
cmp    %ecx,%esi
jle    11c5 <main+0x95>
cmp    %eax,%esi
jle    11c5 <main+0x95>
lea    0xe4b(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [25 x i8] c"Enter any three numbers\0A\00"
@.str.1 = [9 x i8] c"%d %d %d\00"
@.str.2 = [25 x i8] c"%d is the largest number\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %3, i32* %4)
br label %7
7: ; preds = %0
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = icmp sgt i32 %8, %9
br i1 %10, label %11, label %15
11: ; preds = %7
%12 = load i32, i32* %2
%13 = load i32, i32* %4
%14 = icmp sgt i32 %12, %13
br label %15
15: ; preds = %11, %7
%16 = phi i1 [ false, %7 ], [ %14, %11 ]
br i1 %16, label %17, label %20
17: ; preds = %15
%18 = load i32, i32* %2
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 %18)
br label %20
20: ; preds = %17, %15
br label %21
21: ; preds = %20
%22 = load i32, i32* %3
%23 = load i32, i32* %4
%24 = icmp sgt i32 %22, %23
br i1 %24, label %25, label %29
25: ; preds = %21
%26 = load i32, i32* %3
%27 = load i32, i32* %2
%28 = icmp sgt i32 %26, %27
br label %29
29: ; preds = %25, %21
%30 = phi i1 [ false, %21 ], [ %28, %25 ]
br i1 %30, label %31, label %34
31: ; preds = %29
%32 = load i32, i32* %3
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 %32)
br label %34
34: ; preds = %31, %29
br label %35
35: ; preds = %34
%36 = load i32, i32* %4
%37 = load i32, i32* %2
%38 = icmp sgt i32 %36, %37
br i1 %38, label %39, label %43
39: ; preds = %35
%40 = load i32, i32* %4
%41 = load i32, i32* %3
%42 = icmp sgt i32 %40, %41
br label %43
43: ; preds = %39, %35
%44 = phi i1 [ false, %35 ], [ %42, %39 ]
br i1 %44, label %45, label %48
45: ; preds = %43
%46 = load i32, i32* %4
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 %46)
br label %48
48: ; preds = %45, %43
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [9 x i8] c"%d %d %d\00"
@.str.2 = [25 x i8] c"%d is the largest number\00"
@str = [24 x i8] c"Enter any three numbers\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 ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2, i32* %3)
%9 = load i32, i32* %1
%10 = load i32, i32* %2
%11 = icmp sgt i32 %9, %10
%12 = load i32, i32* %3
%13 = icmp sgt i32 %9, %12
%14 = select i1 %11, i1 %13, i1 false
br i1 %14, label %15, label %20
15: ; preds = %0
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 %9)
%17 = load i32, i32* %2
%18 = load i32, i32* %3
%19 = load i32, i32* %1
br label %20
20: ; preds = %0, %15
%21 = phi i32 [ %9, %0 ], [ %19, %15 ]
%22 = phi i32 [ %12, %0 ], [ %18, %15 ]
%23 = phi i32 [ %10, %0 ], [ %17, %15 ]
%24 = icmp sgt i32 %23, %22
%25 = icmp sgt i32 %23, %21
%26 = select i1 %24, i1 %25, i1 false
br i1 %26, label %27, label %32
27: ; preds = %20
%28 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 %23)
%29 = load i32, i32* %3
%30 = load i32, i32* %1
%31 = load i32, i32* %2
br label %32
32: ; preds = %20, %27
%33 = phi i32 [ %23, %20 ], [ %31, %27 ]
%34 = phi i32 [ %21, %20 ], [ %30, %27 ]
%35 = phi i32 [ %22, %20 ], [ %29, %27 ]
%36 = icmp sgt i32 %35, %34
%37 = icmp sgt i32 %35, %33
%38 = select i1 %36, i1 %37, i1 false
br i1 %38, label %39, label %41
39: ; preds = %32
%40 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 %35)
br label %41
41: ; preds = %39, %32
ret i32 0
}