#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 *, float *, float *, float *);
int main() {
  float a, b, c;
  printf("Enter three numbers: ");
  scanf("%f %f %f", &a, &b, &c);
  if (a >= b && a >= c)
    printf("Largest number = %.2f", a);
  else if (b >= a && b >= c)
    printf("Largest number = %.2f", b);
  else
    printf("Largest number = %.2f", c);
  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    0xed2(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
jb     118f <main+0x6f>
movss  -0x8(%rbp),%xmm0
ucomiss -0x10(%rbp),%xmm0
jb     118f <main+0x6f>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe9c(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    11e5 <main+0xc5>
movss  -0xc(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
jb     11c9 <main+0xa9>
movss  -0xc(%rbp),%xmm0
ucomiss -0x10(%rbp),%xmm0
jb     11c9 <main+0xa9>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe62(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    11e0 <main+0xc0>
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe46(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    11e5 <main+0xc5>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xedd(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1040 <scanf@plt>
movss  0x14(%rsp),%xmm2
movss  0x10(%rsp),%xmm0
movss  0xc(%rsp),%xmm1
movaps %xmm1,%xmm3
cmpnless %xmm0,%xmm3
movaps %xmm3,%xmm4
andps  %xmm1,%xmm4
andnps %xmm0,%xmm3
orps   %xmm4,%xmm3
movaps %xmm2,%xmm4
cmpnless %xmm0,%xmm4
movaps %xmm4,%xmm5
andnps %xmm3,%xmm5
andps  %xmm1,%xmm4
orps   %xmm5,%xmm4
cmpnless %xmm2,%xmm0
movaps %xmm0,%xmm3
andps  %xmm4,%xmm3
cmpnless %xmm2,%xmm1
andps  %xmm1,%xmm4
andnps %xmm2,%xmm1
orps   %xmm4,%xmm1
andnps %xmm1,%xmm0
orps   %xmm3,%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe6e(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [22 x i8] c"Enter three numbers: \00"
@.str.1 = [9 x i8] c"%f %f %f\00"
@.str.2 = [22 x i8] c"Largest number = %.2f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
store i32 0, i32* %1
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 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), float* %2, float* %3, float* %4)
%7 = load float, float* %2
%8 = load float, float* %3
%9 = fcmp oge float %7, %8
br i1 %9, label %10, label %18
10: ; preds = %0
%11 = load float, float* %2
%12 = load float, float* %4
%13 = fcmp oge float %11, %12
br i1 %13, label %14, label %18
14: ; preds = %10
%15 = load float, float* %2
%16 = fpext float %15 to double
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), double %16)
br label %35
18: ; preds = %10, %0
%19 = load float, float* %3
%20 = load float, float* %2
%21 = fcmp oge float %19, %20
br i1 %21, label %22, label %30
22: ; preds = %18
%23 = load float, float* %3
%24 = load float, float* %4
%25 = fcmp oge float %23, %24
br i1 %25, label %26, label %30
26: ; preds = %22
%27 = load float, float* %3
%28 = fpext float %27 to double
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), double %28)
br label %34
30: ; preds = %22, %18
%31 = load float, float* %4
%32 = fpext float %31 to double
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), double %32)
br label %34
34: ; preds = %30, %26
br label %35
35: ; preds = %34, %14
ret i32 0
}

LLVM IR (-O2):
@.str = [22 x i8] c"Enter three numbers: \00"
@.str.1 = [9 x i8] c"%f %f %f\00"
@.str.2 = [22 x i8] c"Largest number = %.2f\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = alloca float
%4 = bitcast float* %1 to i8*
%5 = bitcast float* %2 to i8*
%6 = bitcast float* %3 to i8*
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 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), float* %1, float* %2, float* %3)
%9 = load float, float* %1
%10 = load float, float* %2
%11 = fcmp ult float %9, %10
%12 = load float, float* %3
%13 = fcmp ult float %9, %12
%14 = select i1 %11, i1 true, i1 %13
%15 = fcmp ult float %10, %9
%16 = fcmp ult float %10, %12
%17 = select i1 %15, i1 true, i1 %16
%18 = select i1 %17, float %12, float %10
%19 = select i1 %14, float %18, float %9
%20 = fpext float %19 to double
%21 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), double %20)
ret i32 0
}