float max_star0(float delta1, float delta2) {
  register float diff;
  diff = delta2 - delta1;
  if (diff > 2.50681740420944)
    return (delta2);
  else if (diff < -2.50681740420944)
    return (delta1);
  else if (diff > 0)
    return (delta2 + -0.24904163195436 * (diff - 2.50681740420944));
  else
    return (delta1 - -0.24904163195436 * (diff + 2.50681740420944));
}


x86 assembly (clang, -O0):
<max_star0>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
subss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xed2(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1147 <max_star0+0x47>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    11f5 <max_star0+0xf5>
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xeb0(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1171 <max_star0+0x71>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    11f5 <max_star0+0xf5>
movss  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    11be <max_star0+0xbe>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe64(%rip),%xmm2
subsd  %xmm2,%xmm0
movsd  0xe70(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    11f5 <max_star0+0xf5>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe28(%rip),%xmm2
addsd  %xmm2,%xmm0
movsd  0xe2c(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<max_star0>:
movaps %xmm1,%xmm3
subss  %xmm0,%xmm3
cvtss2sd %xmm3,%xmm2
ucomisd 0xeed(%rip),%xmm2
ja     1165 <max_star0+0x65>
movsd  0xeeb(%rip),%xmm4
ucomisd %xmm2,%xmm4
jbe    1124 <max_star0+0x24>
ret
xorpd  %xmm4,%xmm4
ucomiss %xmm4,%xmm3
jbe    1146 <max_star0+0x46>
addsd  0xed3(%rip),%xmm2
mulsd  0xedb(%rip),%xmm2
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
jmp    115a <max_star0+0x5a>
addsd  0xeb2(%rip),%xmm2
mulsd  0xeba(%rip),%xmm2
cvtss2sd %xmm0,%xmm0
addsd  %xmm0,%xmm2
xorps  %xmm1,%xmm1
cvtsd2ss %xmm2,%xmm1
movaps %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @max_star0(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
%7 = load float, float* %5
%8 = load float, float* %4
%9 = fsub float %7, %8
store float %9, float* %6
%10 = load float, float* %6
%11 = fpext float %10 to double
%12 = fcmp ogt double %11, 0x40040DF64880FC3A
br i1 %12, label %13, label %15
13: ; preds = %2
%14 = load float, float* %5
store float %14, float* %3
br label %40
15: ; preds = %2
%16 = load float, float* %6
%17 = fpext float %16 to double
%18 = fcmp olt double %17, 0xC0040DF64880FC3A
br i1 %18, label %19, label %21
19: ; preds = %15
%20 = load float, float* %4
store float %20, float* %3
br label %40
21: ; preds = %15
%22 = load float, float* %6
%23 = fcmp ogt float %22, 0.000000e+00
br i1 %23, label %24, label %32
24: ; preds = %21
%25 = load float, float* %5
%26 = fpext float %25 to double
%27 = load float, float* %6
%28 = fpext float %27 to double
%29 = fsub double %28, 0x40040DF64880FC3A
%30 = call double @llvm.fmuladd.f64(double 0xBFCFE098A04B109F, double %29, double %26)
%31 = fptrunc double %30 to float
store float %31, float* %3
br label %40
32: ; preds = %21
%33 = load float, float* %4
%34 = fpext float %33 to double
%35 = load float, float* %6
%36 = fpext float %35 to double
%37 = fadd double %36, 0x40040DF64880FC3A
%38 = call double @llvm.fmuladd.f64(double 0x3FCFE098A04B109F, double %37, double %34)
%39 = fptrunc double %38 to float
store float %39, float* %3
br label %40
40: ; preds = %32, %24, %19, %13
%41 = load float, float* %3
ret float %41
}

LLVM IR (-O2):
define float @max_star0(float %0, float %1) {
%3 = fsub float %1, %0
%4 = fpext float %3 to double
%5 = fcmp ogt double %4, 0x40040DF64880FC3A
br i1 %5, label %20, label %6
6: ; preds = %2
%7 = fcmp olt double %4, 0xC0040DF64880FC3A
br i1 %7, label %20, label %8
8: ; preds = %6
%9 = fcmp ogt float %3, 0.000000e+00
br i1 %9, label %10, label %15
10: ; preds = %8
%11 = fpext float %1 to double
%12 = fadd double %4, 0xC0040DF64880FC3A
%13 = tail call double @llvm.fmuladd.f64(double %12, double 0xBFCFE098A04B109F, double %11)
%14 = fptrunc double %13 to float
br label %20
15: ; preds = %8
%16 = fpext float %0 to double
%17 = fadd double %4, 0x40040DF64880FC3A
%18 = tail call double @llvm.fmuladd.f64(double %17, double 0x3FCFE098A04B109F, double %16)
%19 = fptrunc double %18 to float
br label %20
20: ; preds = %6, %2, %15, %10
%21 = phi float [ %14, %10 ], [ %19, %15 ], [ %1, %2 ], [ %0, %6 ]
ret float %21
}