#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(int, int);
double pt_daily_et(double alpha_pt, double delta_pt, double ghamma_pt,
                   double rnet, double g0, double tempka) {
  double result, latentHv, t_celsius;
  double roh_w = 1004.15;
  double vap_slope_ratio;
  t_celsius = tempka - 273.15;
  latentHv = 86400 / ((2.501 - 0.002361 * t_celsius) * pow(10, 6));
  vap_slope_ratio = delta_pt / (delta_pt + ghamma_pt);
  result = (alpha_pt / roh_w) * vap_slope_ratio * (rnet - g0) / latentHv;
  return result;
}


x86 assembly (clang, -O0):
<pt_daily_et>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  %xmm5,-0x30(%rbp)
movsd  0xee2(%rip),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  0xec8(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  0xea2(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe9e(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    $0xa,%edi
mov    $0x6,%esi
call   1030 <pow@plt>
movsd  -0x60(%rbp),%xmm1
mulsd  %xmm0,%xmm1
movsd  0xe65(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
addsd  -0x18(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x8(%rbp),%xmm0
divsd  -0x50(%rbp),%xmm0
mulsd  -0x58(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
subsd  -0x28(%rbp),%xmm1
mulsd  %xmm1,%xmm0
divsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pt_daily_et>:
sub    $0x58,%rsp
movsd  %xmm4,0x18(%rsp)
movsd  %xmm3,0x10(%rsp)
movaps %xmm2,0x30(%rsp)
movaps %xmm1,0x20(%rsp)
movapd %xmm0,0x40(%rsp)
addsd  0xec8(%rip),%xmm5
mulsd  0xec8(%rip),%xmm5
addsd  0xec8(%rip),%xmm5
movsd  %xmm5,0x8(%rsp)
mov    $0xa,%edi
mov    $0x6,%esi
call   1030 <pow@plt>
mulsd  0x8(%rsp),%xmm0
movsd  0xead(%rip),%xmm1
divsd  %xmm0,%xmm1
movapd 0x30(%rsp),%xmm2
movapd 0x20(%rsp),%xmm0
addsd  %xmm0,%xmm2
movapd 0x40(%rsp),%xmm3
unpcklpd %xmm0,%xmm3
movapd 0xe8f(%rip),%xmm0
unpcklpd %xmm2,%xmm0
divpd  %xmm0,%xmm3
movapd %xmm3,%xmm2
unpckhpd %xmm3,%xmm2
mulsd  %xmm3,%xmm2
movsd  0x10(%rsp),%xmm0
subsd  0x18(%rsp),%xmm0
mulsd  %xmm2,%xmm0
divsd  %xmm1,%xmm0
add    $0x58,%rsp
ret

LLVM IR (-O0):
define double @pt_daily_et(double %0, double %1, double %2, double %3, double %4, double %5) {
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
store double %0, double* %7
store double %1, double* %8
store double %2, double* %9
store double %3, double* %10
store double %4, double* %11
store double %5, double* %12
store double 1.004150e+03, double* %16
%18 = load double, double* %12
%19 = fsub double %18, 2.731500e+02
store double %19, double* %15
%20 = load double, double* %15
%21 = call double @llvm.fmuladd.f64(double -2.361000e-03, double %20, double 2.501000e+00)
%22 = call double @pow(i32 10, i32 6)
%23 = fmul double %21, %22
%24 = fdiv double 8.640000e+04, %23
store double %24, double* %14
%25 = load double, double* %8
%26 = load double, double* %8
%27 = load double, double* %9
%28 = fadd double %26, %27
%29 = fdiv double %25, %28
store double %29, double* %17
%30 = load double, double* %7
%31 = load double, double* %16
%32 = fdiv double %30, %31
%33 = load double, double* %17
%34 = fmul double %32, %33
%35 = load double, double* %10
%36 = load double, double* %11
%37 = fsub double %35, %36
%38 = fmul double %34, %37
%39 = load double, double* %14
%40 = fdiv double %38, %39
store double %40, double* %13
%41 = load double, double* %13
ret double %41
}

LLVM IR (-O2):
define double @pt_daily_et(double %0, double %1, double %2, double %3, double %4, double %5) {
%7 = fadd double %5, -2.731500e+02
%8 = tail call double @llvm.fmuladd.f64(double %7, double -2.361000e-03, double 2.501000e+00)
%9 = tail call double @pow(i32 10, i32 6)
%10 = fmul double %8, %9
%11 = fdiv double 8.640000e+04, %10
%12 = fadd double %1, %2
%13 = insertelement <2 x double> poison, double %0, i64 0
%14 = insertelement <2 x double> %13, double %1, i64 1
%15 = insertelement <2 x double> <double 1.004150e+03, double poison>, double %12, i64 1
%16 = fdiv <2 x double> %14, %15
%17 = shufflevector <2 x double> %16, <2 x double> poison, <2 x i32> <i32 1, i32 undef>
%18 = fmul <2 x double> %16, %17
%19 = extractelement <2 x double> %18, i64 0
%20 = fsub double %3, %4
%21 = fmul double %19, %20
%22 = fdiv double %21, %11
ret double %22
}