#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*/ EXIT_FAILURE;
int EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ printf(char *, ...);
int scanf(char *, double *, double *, double *);
int /*<<< orphan*/ stderr;
int main() {
  double first, second, third;
  printf("Enter 3 numbers: ");
  if ((scanf("%lf %lf %lf", &first, &second, &third)) != 3) {
    fprintf(stderr, "Wrong input values!");
    exit(EXIT_FAILURE);
  }
  if (first > second && first > third) {
    printf("Biggest: %.1lf", first);
  } else if (second > first && second > third) {
    printf("Biggest: %.1lf", second);
  } else {
    printf("Biggest: %.1lf", third);
  }
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeae(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
lea    -0x20(%rbp),%rcx
call   1050 <scanf@plt>
cmp    $0x3,%eax
je     11a1 <main+0x61>
mov    0x2e5b(%rip),%rax
mov    (%rax),%edi
lea    0xe90(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e3e(%rip),%rax
mov    (%rax),%edi
call   1060 <exit@plt>
movsd  -0x10(%rbp),%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    11d9 <main+0x99>
movsd  -0x10(%rbp),%xmm0
ucomisd -0x20(%rbp),%xmm0
jbe    11d9 <main+0x99>
movsd  -0x10(%rbp),%xmm0
lea    0xe65(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    1229 <main+0xe9>
movsd  -0x18(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1211 <main+0xd1>
movsd  -0x18(%rbp),%xmm0
ucomisd -0x20(%rbp),%xmm0
jbe    1211 <main+0xd1>
movsd  -0x18(%rbp),%xmm0
lea    0xe2d(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    1224 <main+0xe4>
movsd  -0x20(%rbp),%xmm0
lea    0xe15(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    1229 <main+0xe9>
mov    0x2da0(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xeb5(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeb9(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
mov    %rsp,%rcx
call   1050 <scanf@plt>
cmp    $0x3,%eax
jne    11e0 <main+0xa0>
movsd  0x10(%rsp),%xmm1
movsd  0x8(%rsp),%xmm2
movsd  (%rsp),%xmm0
movapd %xmm2,%xmm3
maxsd  %xmm0,%xmm3
movapd %xmm1,%xmm4
cmpltsd %xmm2,%xmm4
andpd  %xmm4,%xmm3
andnpd %xmm0,%xmm4
orpd   %xmm3,%xmm4
cmpltsd %xmm1,%xmm2
cmpltsd %xmm1,%xmm0
movapd %xmm0,%xmm3
andnpd %xmm4,%xmm3
andpd  %xmm1,%xmm0
orpd   %xmm3,%xmm0
andpd  %xmm2,%xmm0
andnpd %xmm4,%xmm2
orpd   %xmm2,%xmm0
lea    0xe67(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    0x2df7(%rip),%rax
mov    (%rax),%eax
add    $0x18,%rsp
ret
mov    0x2df9(%rip),%rax
mov    (%rax),%edi
lea    0xe2e(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2ddc(%rip),%rax
mov    (%rax),%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"Enter 3 numbers: \00"
@.str.1 = [12 x i8] c"%lf %lf %lf\00"
@stderr = global i32 0
@.str.2 = [20 x i8] c"Wrong input values!\00"
@EXIT_FAILURE = global i32 0
@.str.3 = [15 x i8] c"Biggest: %.1lf\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca double
store i32 0, i32* %1
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), double* %2, double* %3, double* %4)
%7 = icmp ne i32 %6, 3
br i1 %7, label %8, label %13
8: ; preds = %0
%9 = load i32, i32* @stderr
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
%11 = load i32, i32* @EXIT_FAILURE
%12 = call i32 @exit(i32 %11)
unreachable
13: ; preds = %0
%14 = load double, double* %2
%15 = load double, double* %3
%16 = fcmp ogt double %14, %15
br i1 %16, label %17, label %24
17: ; preds = %13
%18 = load double, double* %2
%19 = load double, double* %4
%20 = fcmp ogt double %18, %19
br i1 %20, label %21, label %24
21: ; preds = %17
%22 = load double, double* %2
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), double %22)
br label %39
24: ; preds = %17, %13
%25 = load double, double* %3
%26 = load double, double* %2
%27 = fcmp ogt double %25, %26
br i1 %27, label %28, label %35
28: ; preds = %24
%29 = load double, double* %3
%30 = load double, double* %4
%31 = fcmp ogt double %29, %30
br i1 %31, label %32, label %35
32: ; preds = %28
%33 = load double, double* %3
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), double %33)
br label %38
35: ; preds = %28, %24
%36 = load double, double* %4
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), double %36)
br label %38
38: ; preds = %35, %32
br label %39
39: ; preds = %38, %21
%40 = load i32, i32* @EXIT_SUCCESS
ret i32 %40
}

LLVM IR (-O2):
@.str = [18 x i8] c"Enter 3 numbers: \00"
@.str.1 = [12 x i8] c"%lf %lf %lf\00"
@stderr = global i32 0
@.str.2 = [20 x i8] c"Wrong input values!\00"
@EXIT_FAILURE = global i32 0
@.str.3 = [15 x i8] c"Biggest: %.1lf\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = alloca double
%4 = bitcast double* %1 to i8*
%5 = bitcast double* %2 to i8*
%6 = bitcast double* %3 to i8*
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), double* %1, double* %2, double* %3)
%9 = icmp eq i32 %8, 3
br i1 %9, label %15, label %10
10: ; preds = %0
%11 = load i32, i32* @stderr
%12 = call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
%13 = load i32, i32* @EXIT_FAILURE
%14 = call i32 @exit(i32 %13)
unreachable
15: ; preds = %0
%16 = load double, double* %1
%17 = load double, double* %2
%18 = fcmp ogt double %16, %17
%19 = load double, double* %3
%20 = fcmp ogt double %16, %19
%21 = select i1 %18, i1 %20, i1 false
%22 = fcmp ogt double %17, %16
%23 = fcmp ogt double %17, %19
%24 = select i1 %22, i1 %23, i1 false
%25 = select i1 %24, double %17, double %19
%26 = select i1 %21, double %16, double %25
%27 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), double %26)
%28 = load i32, i32* @EXIT_SUCCESS
ret i32 %28
}