#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 */
double pow(double, double);
double maximum_unfrozen_water(double T, double max_moist, double bubble,
                              double expt) {
  double unfrozen;
  if (T < 0.) {
    unfrozen = max_moist * pow((-3.337e5 * T) / 273.16 / (9.81 * bubble / 100.),
                               -(2.0 / (expt - 3.0)));
    if (unfrozen > max_moist)
      unfrozen = max_moist;
    if (unfrozen < 0.)
      unfrozen = 0.;
  } else
    unfrozen = max_moist;
  return (unfrozen);
}


x86 assembly (clang, -O0):
<maximum_unfrozen_water>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    11f9 <maximum_unfrozen_water+0xe9>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xedc(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  0xec7(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xeb3(%rip),%xmm1
mulsd  -0x18(%rbp),%xmm1
movsd  0xe9e(%rip),%xmm2
divsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  -0x20(%rbp),%xmm2
movsd  0xe81(%rip),%xmm1
subsd  %xmm1,%xmm2
movsd  0xe6d(%rip),%xmm1
divsd  %xmm2,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    11de <maximum_unfrozen_water+0xce>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x28(%rbp),%xmm0
jbe    11f4 <maximum_unfrozen_water+0xe4>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x28(%rbp)
jmp    1203 <maximum_unfrozen_water+0xf3>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<maximum_unfrozen_water>:
xorpd  %xmm4,%xmm4
ucomisd %xmm0,%xmm4
jbe    1179 <maximum_unfrozen_water+0x69>
push   %rax
unpcklpd %xmm2,%xmm0
mulpd  0xed9(%rip),%xmm0
divpd  0xee1(%rip),%xmm0
movsd  %xmm1,(%rsp)
movapd %xmm0,%xmm1
unpckhpd %xmm0,%xmm1
divsd  %xmm1,%xmm0
addsd  0xed8(%rip),%xmm3
movsd  0xed8(%rip),%xmm1
divsd  %xmm3,%xmm1
call   1030 <pow@plt>
movsd  (%rsp),%xmm1
mulsd  %xmm1,%xmm0
minsd  %xmm0,%xmm1
xorpd  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
lea    0x8(%rsp),%rsp
jbe    1179 <maximum_unfrozen_water+0x69>
xorpd  %xmm1,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @maximum_unfrozen_water(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%10 = load double, double* %5
%11 = fcmp olt double %10, 0.000000e+00
br i1 %11, label %12, label %37
12: ; preds = %4
%13 = load double, double* %6
%14 = load double, double* %5
%15 = fmul double -3.337000e+05, %14
%16 = fdiv double %15, 2.731600e+02
%17 = load double, double* %7
%18 = fmul double 9.810000e+00, %17
%19 = fdiv double %18, 1.000000e+02
%20 = fdiv double %16, %19
%21 = load double, double* %8
%22 = fsub double %21, 3.000000e+00
%23 = fdiv double 2.000000e+00, %22
%24 = fneg double %23
%25 = call double @pow(double %20, double %24)
%26 = fmul double %13, %25
store double %26, double* %9
%27 = load double, double* %9
%28 = load double, double* %6
%29 = fcmp ogt double %27, %28
br i1 %29, label %30, label %32
30: ; preds = %12
%31 = load double, double* %6
store double %31, double* %9
br label %32
32: ; preds = %30, %12
%33 = load double, double* %9
%34 = fcmp olt double %33, 0.000000e+00
br i1 %34, label %35, label %36
35: ; preds = %32
store double 0.000000e+00, double* %9
br label %36
36: ; preds = %35, %32
br label %39
37: ; preds = %4
%38 = load double, double* %6
store double %38, double* %9
br label %39
39: ; preds = %37, %36
%40 = load double, double* %9
ret double %40
}

LLVM IR (-O2):
define double @maximum_unfrozen_water(double %0, double %1, double %2, double %3) {
%5 = fcmp olt double %0, 0.000000e+00
br i1 %5, label %6, label %22
6: ; preds = %4
%7 = insertelement <2 x double> poison, double %0, i64 0
%8 = insertelement <2 x double> %7, double %2, i64 1
%9 = fmul <2 x double> %8, <double -3.337000e+05, double 9.810000e+00>
%10 = fdiv <2 x double> %9, <double 2.731600e+02, double 1.000000e+02>
%11 = extractelement <2 x double> %10, i64 0
%12 = extractelement <2 x double> %10, i64 1
%13 = fdiv double %11, %12
%14 = fadd double %3, -3.000000e+00
%15 = fdiv double -2.000000e+00, %14
%16 = tail call double @pow(double %13, double %15)
%17 = fmul double %16, %1
%18 = fcmp ogt double %17, %1
%19 = select i1 %18, double %1, double %17
%20 = fcmp olt double %19, 0.000000e+00
br i1 %20, label %21, label %22
21: ; preds = %6
br label %22
22: ; preds = %4, %6, %21
%23 = phi double [ 0.000000e+00, %21 ], [ %19, %6 ], [ %1, %4 ]
ret double %23
}