#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 *, double *, double *, double *, double *,
                         double *);
int main() {
  double a, b, c, d, e, max = 0;
  printf("Enter a, b, c, d and e, seperated by space: ");
  scanf("%lf %lf %lf %lf %lf", &a, &b, &c, &d, &e);
  if (a > max) {
    max = a;
  }
  if (b > max) {
    max = b;
  }
  if (c > max) {
    max = c;
  }
  if (d > max) {
    max = d;
  }
  if (e > max) {
    max = e;
  }
  printf("Max: %.2lf\n", max);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
lea    0xec2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee1(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
lea    -0x20(%rbp),%rcx
lea    -0x28(%rbp),%r8
lea    -0x30(%rbp),%r9
call   1040 <scanf@plt>
movsd  -0x10(%rbp),%xmm0
ucomisd -0x38(%rbp),%xmm0
jbe    117f <main+0x5f>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x18(%rbp),%xmm0
ucomisd -0x38(%rbp),%xmm0
jbe    1199 <main+0x79>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x20(%rbp),%xmm0
ucomisd -0x38(%rbp),%xmm0
jbe    11b3 <main+0x93>
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x28(%rbp),%xmm0
ucomisd -0x38(%rbp),%xmm0
jbe    11cd <main+0xad>
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x30(%rbp),%xmm0
ucomisd -0x38(%rbp),%xmm0
jbe    11e7 <main+0xc7>
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
lea    0xe4e(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xef4(%rip),%rdi
lea    0x20(%rsp),%rsi
lea    0x18(%rsp),%rdx
lea    0x10(%rsp),%rcx
lea    0x8(%rsp),%r8
mov    %rsp,%r9
call   1040 <scanf@plt>
movsd  0x20(%rsp),%xmm0
xorpd  %xmm1,%xmm1
maxsd  %xmm1,%xmm0
movsd  0x18(%rsp),%xmm1
maxsd  %xmm0,%xmm1
movsd  0x10(%rsp),%xmm0
maxsd  %xmm1,%xmm0
movsd  0x8(%rsp),%xmm1
maxsd  %xmm0,%xmm1
movsd  (%rsp),%xmm0
maxsd  %xmm1,%xmm0
lea    0xeb0(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@.str = [45 x i8] c"Enter a, b, c, d and e, seperated by space: \00"
@.str.1 = [20 x i8] c"%lf %lf %lf %lf %lf\00"
@.str.2 = [12 x i8] c"Max: %.2lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
store i32 0, i32* %1
store double 0.000000e+00, double* %7
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
%9 = 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)
%10 = load double, double* %2
%11 = load double, double* %7
%12 = fcmp ogt double %10, %11
br i1 %12, label %13, label %15
13: ; preds = %0
%14 = load double, double* %2
store double %14, double* %7
br label %15
15: ; preds = %13, %0
%16 = load double, double* %3
%17 = load double, double* %7
%18 = fcmp ogt double %16, %17
br i1 %18, label %19, label %21
19: ; preds = %15
%20 = load double, double* %3
store double %20, double* %7
br label %21
21: ; preds = %19, %15
%22 = load double, double* %4
%23 = load double, double* %7
%24 = fcmp ogt double %22, %23
br i1 %24, label %25, label %27
25: ; preds = %21
%26 = load double, double* %4
store double %26, double* %7
br label %27
27: ; preds = %25, %21
%28 = load double, double* %5
%29 = load double, double* %7
%30 = fcmp ogt double %28, %29
br i1 %30, label %31, label %33
31: ; preds = %27
%32 = load double, double* %5
store double %32, double* %7
br label %33
33: ; preds = %31, %27
%34 = load double, double* %6
%35 = load double, double* %7
%36 = fcmp ogt double %34, %35
br i1 %36, label %37, label %39
37: ; preds = %33
%38 = load double, double* %6
store double %38, double* %7
br label %39
39: ; preds = %37, %33
%40 = load double, double* %7
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), double %40)
ret i32 0
}

LLVM IR (-O2):
@.str = [45 x i8] c"Enter a, b, c, d and e, seperated by space: \00"
@.str.1 = [20 x i8] c"%lf %lf %lf %lf %lf\00"
@.str.2 = [12 x i8] c"Max: %.2lf\0A\00"
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 ([45 x i8], [45 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 = load double, double* %1
%14 = fcmp ogt double %13, 0.000000e+00
%15 = select i1 %14, double %13, double 0.000000e+00
%16 = load double, double* %2
%17 = fcmp ogt double %16, %15
%18 = select i1 %17, double %16, double %15
%19 = load double, double* %3
%20 = fcmp ogt double %19, %18
%21 = select i1 %20, double %19, double %18
%22 = load double, double* %4
%23 = fcmp ogt double %22, %21
%24 = select i1 %23, double %22, double %21
%25 = load double, double* %5
%26 = fcmp ogt double %25, %24
%27 = select i1 %26, double %25, double %24
%28 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), double %27)
ret i32 0
}