#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 *);
int main(int argc, const char *argv[]) {
  printf("Enter X: ");
  float x = 0;
  scanf("%f", &x);
  printf("Enter Y: ");
  float y = 0;
  scanf("%f", &y);
  printf("Enter Z: ");
  float z = 0;
  scanf("%f", &z);
  if (x >= y && y >= z) {
    x *= 2;
    y *= 2;
    z *= 2;
  } else {
    x *= -1;
    y *= -1;
    z *= -1;
  }
  printf("X: %f\nY: %f\nZ: %f", x, y, z);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xecb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
lea    0xee2(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xeaf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x18(%rbp)
lea    0xebc(%rip),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xe93(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x1c(%rbp)
lea    0xe96(%rip),%rdi
lea    -0x1c(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x14(%rbp),%xmm0
ucomiss -0x18(%rbp),%xmm0
jb     1201 <main+0xe1>
movss  -0x18(%rbp),%xmm0
ucomiss -0x1c(%rbp),%xmm0
jb     1201 <main+0xe1>
movss  0xe36(%rip),%xmm0
mulss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  0xe24(%rip),%xmm0
mulss  -0x18(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  0xe12(%rip),%xmm0
mulss  -0x1c(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
jmp    1237 <main+0x117>
movss  0xdf7(%rip),%xmm0
mulss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  0xde5(%rip),%xmm0
mulss  -0x18(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  0xdd3(%rip),%xmm0
mulss  -0x1c(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x18(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  -0x1c(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
lea    0xdcd(%rip),%rdi
mov    $0x3,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xee4(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
movl   $0x0,0x4(%rsp)
lea    0xefb(%rip),%rbx
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0xec4(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
movl   $0x0,0xc(%rsp)
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0xeab(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
movl   $0x0,0x8(%rsp)
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movss  0x4(%rsp),%xmm2
movss  0xc(%rsp),%xmm1
ucomiss %xmm1,%xmm2
movss  0x8(%rsp),%xmm0
jb     11c3 <main+0xa3>
ucomiss %xmm0,%xmm1
jb     11c3 <main+0xa3>
unpcklps %xmm0,%xmm2
addps  %xmm2,%xmm2
movss  %xmm2,0x4(%rsp)
addss  %xmm1,%xmm1
jmp    11d9 <main+0xb9>
unpcklps %xmm0,%xmm2
movaps 0xe33(%rip),%xmm0
xorps  %xmm0,%xmm2
movss  %xmm2,0x4(%rsp)
xorps  %xmm0,%xmm1
movss  %xmm1,0xc(%rsp)
xorps  %xmm0,%xmm0
cvtss2sd %xmm2,%xmm0
shufps $0x55,%xmm2,%xmm2
movss  %xmm2,0x8(%rsp)
cvtss2sd %xmm1,%xmm1
cvtss2sd %xmm2,%xmm2
lea    0xe2f(%rip),%rdi
mov    $0x3,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"Enter X: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [10 x i8] c"Enter Y: \00"
@.str.3 = [10 x i8] c"Enter Z: \00"
@.str.4 = [18 x i8] c"X: %f\0AY: %f\0AZ: %f\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca float
%7 = alloca float
%8 = alloca float
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
store float 0.000000e+00, float* %6
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %6)
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
store float 0.000000e+00, float* %7
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %7)
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
store float 0.000000e+00, float* %8
%14 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %8)
%15 = load float, float* %6
%16 = load float, float* %7
%17 = fcmp oge float %15, %16
br i1 %17, label %18, label %29
18: ; preds = %2
%19 = load float, float* %7
%20 = load float, float* %8
%21 = fcmp oge float %19, %20
br i1 %21, label %22, label %29
22: ; preds = %18
%23 = load float, float* %6
%24 = fmul float %23, 2.000000e+00
store float %24, float* %6
%25 = load float, float* %7
%26 = fmul float %25, 2.000000e+00
store float %26, float* %7
%27 = load float, float* %8
%28 = fmul float %27, 2.000000e+00
store float %28, float* %8
br label %36
29: ; preds = %18, %2
%30 = load float, float* %6
%31 = fmul float %30, -1.000000e+00
store float %31, float* %6
%32 = load float, float* %7
%33 = fmul float %32, -1.000000e+00
store float %33, float* %7
%34 = load float, float* %8
%35 = fmul float %34, -1.000000e+00
store float %35, float* %8
br label %36
36: ; preds = %29, %22
%37 = load float, float* %6
%38 = fpext float %37 to double
%39 = load float, float* %7
%40 = fpext float %39 to double
%41 = load float, float* %8
%42 = fpext float %41 to double
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0), double %38, double %40, double %42)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"Enter X: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [10 x i8] c"Enter Y: \00"
@.str.3 = [10 x i8] c"Enter Z: \00"
@.str.4 = [18 x i8] c"X: %f\0AY: %f\0AZ: %f\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%7 = bitcast float* %3 to i8*
store float 0.000000e+00, float* %3
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %3)
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%10 = bitcast float* %4 to i8*
store float 0.000000e+00, float* %4
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %4)
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
%13 = bitcast float* %5 to i8*
store float 0.000000e+00, float* %5
%14 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %5)
%15 = load float, float* %3
%16 = load float, float* %4
%17 = fcmp ult float %15, %16
%18 = load float, float* %5
%19 = fcmp ult float %16, %18
%20 = select i1 %17, i1 true, i1 %19
br i1 %20, label %27, label %21
21: ; preds = %2
%22 = insertelement <2 x float> poison, float %15, i64 0
%23 = insertelement <2 x float> %22, float %18, i64 1
%24 = fmul <2 x float> %23, <float 2.000000e+00, float 2.000000e+00>
%25 = extractelement <2 x float> %24, i64 0
store float %25, float* %3
%26 = fmul float %16, 2.000000e+00
br label %33
27: ; preds = %2
%28 = insertelement <2 x float> poison, float %15, i64 0
%29 = insertelement <2 x float> %28, float %18, i64 1
%30 = fneg <2 x float> %29
%31 = extractelement <2 x float> %30, i64 0
store float %31, float* %3
%32 = fneg float %16
br label %33
33: ; preds = %27, %21
%34 = phi float [ %26, %21 ], [ %32, %27 ]
%35 = phi <2 x float> [ %24, %21 ], [ %30, %27 ]
store float %34, float* %4
%36 = extractelement <2 x float> %35, i64 1
store float %36, float* %5
%37 = extractelement <2 x float> %35, i64 0
%38 = fpext float %37 to double
%39 = fpext float %34 to double
%40 = fpext float %36 to double
%41 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0), double %38, double %39, double %40)
ret i32 0
}