#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 NAN;
double log(double);
double tzirc(const double M, const double Zr) {
  double Tsat = 10108.0 / (log(496000.0 / Zr) + 1.16 * (M - 1) + 1.48) - 273.15;
  if (Zr <= 0) {
    Tsat = NAN;
  }
  return Tsat;
}


x86 assembly (clang, -O0):
<tzirc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  0xefe(%rip),%xmm0
divsd  -0x10(%rbp),%xmm0
call   1030 <log@plt>
movsd  -0x8(%rbp),%xmm1
movsd  0xedf(%rip),%xmm2
subsd  %xmm2,%xmm1
movsd  0xecb(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0xeb3(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  0xe9f(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  0xe8b(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     119c <tzirc+0x8c>
mov    0x2e65(%rip),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tzirc>:
sub    $0x28,%rsp
movapd %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
movsd  0xed8(%rip),%xmm0
divsd  %xmm1,%xmm0
call   1030 <log@plt>
movsd  0x8(%rsp),%xmm1
addsd  0xec9(%rip),%xmm1
mulsd  0xec9(%rip),%xmm1
addsd  %xmm0,%xmm1
addsd  0xec5(%rip),%xmm1
movsd  0xec5(%rip),%xmm0
divsd  %xmm1,%xmm0
addsd  0xec1(%rip),%xmm0
mov    0x2e8a(%rip),%rax
xorpd  %xmm1,%xmm1
movapd 0x10(%rsp),%xmm2
cmpnlesd %xmm1,%xmm2
andpd  %xmm2,%xmm0
movsd  (%rax),%xmm1
andnpd %xmm1,%xmm2
orpd   %xmm0,%xmm2
movapd %xmm2,%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
@NAN = global double 0.000000e+00
define double @tzirc(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
store double %1, double* %4
%6 = load double, double* %4
%7 = fdiv double 4.960000e+05, %6
%8 = call double @log(double %7)
%9 = load double, double* %3
%10 = fsub double %9, 1.000000e+00
%11 = call double @llvm.fmuladd.f64(double 1.160000e+00, double %10, double %8)
%12 = fadd double %11, 1.480000e+00
%13 = fdiv double 1.010800e+04, %12
%14 = fsub double %13, 2.731500e+02
store double %14, double* %5
%15 = load double, double* %4
%16 = fcmp ole double %15, 0.000000e+00
br i1 %16, label %17, label %19
17: ; preds = %2
%18 = load double, double* @NAN
store double %18, double* %5
br label %19
19: ; preds = %17, %2
%20 = load double, double* %5
ret double %20
}

LLVM IR (-O2):
@NAN = global double 0.000000e+00
define double @tzirc(double %0, double %1) {
%3 = fdiv double 4.960000e+05, %1
%4 = tail call double @log(double %3)
%5 = fadd double %0, -1.000000e+00
%6 = tail call double @llvm.fmuladd.f64(double %5, double 1.160000e+00, double %4)
%7 = fadd double %6, 1.480000e+00
%8 = fdiv double 1.010800e+04, %7
%9 = fadd double %8, -2.731500e+02
%10 = fcmp ugt double %1, 0.000000e+00
%11 = load double, double* @NAN
%12 = select i1 %10, double %9, double %11
ret double %12
}