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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%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
lea    -0x28(%rbp),%r8
lea    -0x30(%rbp),%r9
call   1050 <scanf@plt>
cmp    $0x5,%eax
je     11a9 <main+0x69>
mov    0x2e53(%rip),%rax
mov    (%rax),%edi
lea    0xe90(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e36(%rip),%rax
mov    (%rax),%edi
call   1060 <exit@plt>
movsd  -0x10(%rbp),%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    1201 <main+0xc1>
movsd  -0x10(%rbp),%xmm0
ucomisd -0x20(%rbp),%xmm0
jbe    1201 <main+0xc1>
movsd  -0x10(%rbp),%xmm0
ucomisd -0x28(%rbp),%xmm0
jbe    1201 <main+0xc1>
movsd  -0x10(%rbp),%xmm0
ucomisd -0x30(%rbp),%xmm0
jbe    1201 <main+0xc1>
movsd  -0x10(%rbp),%xmm0
lea    0xe45(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    132b <main+0x1eb>
movsd  -0x18(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1259 <main+0x119>
movsd  -0x18(%rbp),%xmm0
ucomisd -0x20(%rbp),%xmm0
jbe    1259 <main+0x119>
movsd  -0x18(%rbp),%xmm0
ucomisd -0x28(%rbp),%xmm0
jbe    1259 <main+0x119>
movsd  -0x18(%rbp),%xmm0
ucomisd -0x30(%rbp),%xmm0
jbe    1259 <main+0x119>
movsd  -0x18(%rbp),%xmm0
lea    0xded(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    1326 <main+0x1e6>
movsd  -0x20(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    12b1 <main+0x171>
movsd  -0x20(%rbp),%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    12b1 <main+0x171>
movsd  -0x20(%rbp),%xmm0
ucomisd -0x28(%rbp),%xmm0
jbe    12b1 <main+0x171>
movsd  -0x20(%rbp),%xmm0
ucomisd -0x30(%rbp),%xmm0
jbe    12b1 <main+0x171>
movsd  -0x20(%rbp),%xmm0
lea    0xd95(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    1321 <main+0x1e1>
movsd  -0x28(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1309 <main+0x1c9>
movsd  -0x28(%rbp),%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    1309 <main+0x1c9>
movsd  -0x28(%rbp),%xmm0
ucomisd -0x20(%rbp),%xmm0
jbe    1309 <main+0x1c9>
movsd  -0x28(%rbp),%xmm0
ucomisd -0x30(%rbp),%xmm0
jbe    1309 <main+0x1c9>
movsd  -0x28(%rbp),%xmm0
lea    0xd3d(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    131c <main+0x1dc>
movsd  -0x30(%rbp),%xmm0
lea    0xd25(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    1321 <main+0x1e1>
jmp    1326 <main+0x1e6>
jmp    132b <main+0x1eb>
mov    0x2c9e(%rip),%rax
mov    (%rax),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
lea    0xeb5(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeb9(%rip),%rdi
lea    0x20(%rsp),%rsi
lea    0x18(%rsp),%rdx
lea    0x10(%rsp),%rcx
lea    0x8(%rsp),%r8
mov    %rsp,%r9
call   1050 <scanf@plt>
cmp    $0x5,%eax
jne    1246 <main+0x106>
movsd  0x20(%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
ucomisd %xmm1,%xmm0
movsd  0x10(%rsp),%xmm4
movsd  0x8(%rsp),%xmm3
movsd  (%rsp),%xmm2
jbe    11b3 <main+0x73>
ucomisd %xmm4,%xmm0
jbe    11b3 <main+0x73>
ucomisd %xmm3,%xmm0
jbe    11b3 <main+0x73>
ucomisd %xmm2,%xmm0
ja     122a <main+0xea>
ucomisd %xmm0,%xmm1
jbe    11d1 <main+0x91>
ucomisd %xmm4,%xmm1
jbe    11d1 <main+0x91>
ucomisd %xmm3,%xmm1
jbe    11d1 <main+0x91>
ucomisd %xmm2,%xmm1
jbe    11d1 <main+0x91>
movapd %xmm1,%xmm0
jmp    122a <main+0xea>
ucomisd %xmm0,%xmm4
jbe    11ef <main+0xaf>
ucomisd %xmm1,%xmm4
jbe    11ef <main+0xaf>
ucomisd %xmm3,%xmm4
jbe    11ef <main+0xaf>
ucomisd %xmm2,%xmm4
jbe    11ef <main+0xaf>
movapd %xmm4,%xmm0
jmp    122a <main+0xea>
movapd %xmm3,%xmm5
maxsd  %xmm2,%xmm5
cmpltsd %xmm3,%xmm4
andpd  %xmm4,%xmm5
andnpd %xmm2,%xmm4
orpd   %xmm5,%xmm4
cmpltsd %xmm3,%xmm1
andpd  %xmm1,%xmm4
andnpd %xmm2,%xmm1
orpd   %xmm4,%xmm1
cmpltsd %xmm3,%xmm0
andpd  %xmm0,%xmm1
andnpd %xmm2,%xmm0
orpd   %xmm1,%xmm0
lea    0xe09(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    0x2d91(%rip),%rax
mov    (%rax),%eax
add    $0x28,%rsp
ret
mov    0x2d93(%rip),%rax
mov    (%rax),%edi
lea    0xdd0(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2d76(%rip),%rax
mov    (%rax),%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"Enter 5 numbers: \00"
@.str.1 = [20 x i8] c"%lf %lf %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
%5 = alloca double
%6 = alloca double
store i32 0, i32* %1
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), double* %2, double* %3, double* %4, double* %5, double* %6)
%9 = icmp ne i32 %8, 5
br i1 %9, label %10, label %15
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* %2
%17 = load double, double* %3
%18 = fcmp ogt double %16, %17
br i1 %18, label %19, label %34
19: ; preds = %15
%20 = load double, double* %2
%21 = load double, double* %4
%22 = fcmp ogt double %20, %21
br i1 %22, label %23, label %34
23: ; preds = %19
%24 = load double, double* %2
%25 = load double, double* %5
%26 = fcmp ogt double %24, %25
br i1 %26, label %27, label %34
27: ; preds = %23
%28 = load double, double* %2
%29 = load double, double* %6
%30 = fcmp ogt double %28, %29
br i1 %30, label %31, label %34
31: ; preds = %27
%32 = load double, double* %2
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), double %32)
br label %97
34: ; preds = %27, %23, %19, %15
%35 = load double, double* %3
%36 = load double, double* %2
%37 = fcmp ogt double %35, %36
br i1 %37, label %38, label %53
38: ; preds = %34
%39 = load double, double* %3
%40 = load double, double* %4
%41 = fcmp ogt double %39, %40
br i1 %41, label %42, label %53
42: ; preds = %38
%43 = load double, double* %3
%44 = load double, double* %5
%45 = fcmp ogt double %43, %44
br i1 %45, label %46, label %53
46: ; preds = %42
%47 = load double, double* %3
%48 = load double, double* %6
%49 = fcmp ogt double %47, %48
br i1 %49, label %50, label %53
50: ; preds = %46
%51 = load double, double* %3
%52 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), double %51)
br label %96
53: ; preds = %46, %42, %38, %34
%54 = load double, double* %4
%55 = load double, double* %2
%56 = fcmp ogt double %54, %55
br i1 %56, label %57, label %72
57: ; preds = %53
%58 = load double, double* %4
%59 = load double, double* %3
%60 = fcmp ogt double %58, %59
br i1 %60, label %61, label %72
61: ; preds = %57
%62 = load double, double* %4
%63 = load double, double* %5
%64 = fcmp ogt double %62, %63
br i1 %64, label %65, label %72
65: ; preds = %61
%66 = load double, double* %4
%67 = load double, double* %6
%68 = fcmp ogt double %66, %67
br i1 %68, label %69, label %72
69: ; preds = %65
%70 = load double, double* %4
%71 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), double %70)
br label %95
72: ; preds = %65, %61, %57, %53
%73 = load double, double* %5
%74 = load double, double* %2
%75 = fcmp ogt double %73, %74
br i1 %75, label %76, label %91
76: ; preds = %72
%77 = load double, double* %5
%78 = load double, double* %3
%79 = fcmp ogt double %77, %78
br i1 %79, label %80, label %91
80: ; preds = %76
%81 = load double, double* %5
%82 = load double, double* %4
%83 = fcmp ogt double %81, %82
br i1 %83, label %84, label %91
84: ; preds = %80
%85 = load double, double* %5
%86 = load double, double* %6
%87 = fcmp ogt double %85, %86
br i1 %87, label %88, label %91
88: ; preds = %84
%89 = load double, double* %5
%90 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), double %89)
br label %94
91: ; preds = %84, %80, %76, %72
%92 = load double, double* %6
%93 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), double %92)
br label %94
94: ; preds = %91, %88
br label %95
95: ; preds = %94, %69
br label %96
96: ; preds = %95, %50
br label %97
97: ; preds = %96, %31
%98 = load i32, i32* @EXIT_SUCCESS
ret i32 %98
}

LLVM IR (-O2):
@.str = [18 x i8] c"Enter 5 numbers: \00"
@.str.1 = [20 x i8] c"%lf %lf %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 = alloca double
%5 = alloca double
%6 = bitcast double* %1 to i8*
%7 = bitcast double* %2 to i8*
%8 = bitcast double* %3 to i8*
%9 = bitcast double* %4 to i8*
%10 = bitcast double* %5 to i8*
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%12 = call i32 @scanf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), double* %1, double* %2, double* %3, double* %4, double* %5)
%13 = icmp eq i32 %12, 5
br i1 %13, label %19, label %14
14: ; preds = %0
%15 = load i32, i32* @stderr
%16 = call i32 @fprintf(i32 %15, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
%17 = load i32, i32* @EXIT_FAILURE
%18 = call i32 @exit(i32 %17)
unreachable
19: ; preds = %0
%20 = load double, double* %1
%21 = load double, double* %2
%22 = fcmp ogt double %20, %21
%23 = load double, double* %3
%24 = fcmp ogt double %20, %23
%25 = select i1 %22, i1 %24, i1 false
%26 = load double, double* %4
%27 = fcmp ogt double %20, %26
%28 = select i1 %25, i1 %27, i1 false
%29 = load double, double* %5
%30 = fcmp ogt double %20, %29
%31 = select i1 %28, i1 %30, i1 false
br i1 %31, label %57, label %32
32: ; preds = %19
%33 = fcmp ogt double %21, %20
%34 = fcmp ogt double %21, %23
%35 = select i1 %33, i1 %34, i1 false
%36 = fcmp ogt double %21, %26
%37 = select i1 %35, i1 %36, i1 false
%38 = fcmp ogt double %21, %29
%39 = select i1 %37, i1 %38, i1 false
br i1 %39, label %57, label %40
40: ; preds = %32
%41 = fcmp ogt double %23, %20
%42 = fcmp ogt double %23, %21
%43 = select i1 %41, i1 %42, i1 false
%44 = fcmp ogt double %23, %26
%45 = select i1 %43, i1 %44, i1 false
%46 = fcmp ogt double %23, %29
%47 = select i1 %45, i1 %46, i1 false
br i1 %47, label %57, label %48
48: ; preds = %40
%49 = fcmp ogt double %26, %20
%50 = fcmp ogt double %26, %21
%51 = select i1 %49, i1 %50, i1 false
%52 = fcmp ogt double %26, %23
%53 = select i1 %51, i1 %52, i1 false
%54 = fcmp ogt double %26, %29
%55 = select i1 %53, i1 %54, i1 false
%56 = select i1 %55, double %26, double %29
br label %57
57: ; preds = %48, %40, %32, %19
%58 = phi double [ %20, %19 ], [ %21, %32 ], [ %23, %40 ], [ %56, %48 ]
%59 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), double %58)
%60 = load i32, i32* @EXIT_SUCCESS
ret i32 %60
}