double ice_fraction(hydrosphere_fraction, surface_temp)
double hydrosphere_fraction, surface_temp;
{
  double temp;
  if (surface_temp > 328.0)
    surface_temp = 328.0;
  temp = pow(((328.0 - surface_temp) / 90.0), 5.0);
  if (temp > (1.5 * hydrosphere_fraction))
    temp = (1.5 * hydrosphere_fraction);
  if (temp >= 1.0)
    return (1.0);
  else
    return (temp);
}


x86 assembly (clang, -O0):
<ice_fraction>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  0xed1(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1146 <ice_fraction+0x36>
movsd  0xebf(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xeb2(%rip),%xmm0
subsd  -0x18(%rbp),%xmm0
movsd  0xebd(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xea9(%rip),%xmm1
call   1030 <pow@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  0xe8a(%rip),%xmm1
mulsd  -0x10(%rbp),%xmm1
ucomisd %xmm1,%xmm0
jbe    119f <ice_fraction+0x8f>
movsd  0xe73(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  0xe74(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     11c8 <ice_fraction+0xb8>
movsd  0xe62(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    11d2 <ice_fraction+0xc2>
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ice_fraction>:
push   %rax
movsd  %xmm0,(%rsp)
movsd  0xee2(%rip),%xmm0
movapd %xmm0,%xmm2
minsd  %xmm1,%xmm2
subsd  %xmm2,%xmm0
divsd  0xed6(%rip),%xmm0
movsd  0xed6(%rip),%xmm1
call   1030 <pow@plt>
movsd  (%rsp),%xmm1
mulsd  0xecc(%rip),%xmm1
minsd  %xmm0,%xmm1
movsd  0xec8(%rip),%xmm0
minsd  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @ice_fraction(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
%7 = load double, double* %5
%8 = fcmp ogt double %7, 3.280000e+02
br i1 %8, label %9, label %10
9: ; preds = %2
store double 3.280000e+02, double* %5
br label %10
10: ; preds = %9, %2
%11 = load double, double* %5
%12 = fsub double 3.280000e+02, %11
%13 = fdiv double %12, 9.000000e+01
%14 = call double @pow(double %13, double 5.000000e+00)
store double %14, double* %6
%15 = load double, double* %6
%16 = load double, double* %4
%17 = fmul double 1.500000e+00, %16
%18 = fcmp ogt double %15, %17
br i1 %18, label %19, label %22
19: ; preds = %10
%20 = load double, double* %4
%21 = fmul double 1.500000e+00, %20
store double %21, double* %6
br label %22
22: ; preds = %19, %10
%23 = load double, double* %6
%24 = fcmp oge double %23, 1.000000e+00
br i1 %24, label %25, label %26
25: ; preds = %22
store double 1.000000e+00, double* %3
br label %28
26: ; preds = %22
%27 = load double, double* %6
store double %27, double* %3
br label %28
28: ; preds = %26, %25
%29 = load double, double* %3
ret double %29
}

LLVM IR (-O2):
define double @ice_fraction(double %0, double %1) {
%3 = fcmp ogt double %1, 3.280000e+02
%4 = select i1 %3, double 3.280000e+02, double %1
%5 = fsub double 3.280000e+02, %4
%6 = fdiv double %5, 9.000000e+01
%7 = tail call double @pow(double %6, double 5.000000e+00)
%8 = fmul double %0, 1.500000e+00
%9 = fcmp ogt double %7, %8
%10 = select i1 %9, double %8, double %7
%11 = fcmp oge double %10, 1.000000e+00
%12 = select i1 %11, double 1.000000e+00, double %10
ret double %12
}