#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 exp(double const);
double theta_c(double const, double const);
double thetali_c(const double p0, const double T, const double qt,
                 const double ql, const double qi, const double L) {
  return theta_c(p0, T) *
         exp(-L * (ql / (1.0 - qt) + qi / (1.0 - qt)) / (T * 1004.0));
}


x86 assembly (clang, -O0):
<thetali_c>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%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  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1040 <theta_c@plt>
movsd  %xmm0,-0x38(%rbp)
movsd  -0x30(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  0xe85(%rip),%xmm2
subsd  -0x18(%rbp),%xmm2
divsd  %xmm2,%xmm1
movsd  -0x28(%rbp),%xmm2
movsd  0xe6f(%rip),%xmm3
subsd  -0x18(%rbp),%xmm3
divsd  %xmm3,%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe4e(%rip),%xmm1
mulsd  -0x10(%rbp),%xmm1
divsd  %xmm1,%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x38(%rbp),%xmm0
mulsd  %xmm1,%xmm0
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<thetali_c>:
sub    $0x48,%rsp
movsd  %xmm5,0x18(%rsp)
movaps %xmm4,0x30(%rsp)
movaps %xmm3,0x20(%rsp)
movsd  %xmm2,(%rsp)
movsd  %xmm1,0x8(%rsp)
call   1040 <theta_c@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0xeae(%rip),%xmm0
subsd  (%rsp),%xmm0
movapd 0x20(%rsp),%xmm1
unpcklpd 0x30(%rsp),%xmm1
unpcklpd %xmm0,%xmm0
divpd  %xmm0,%xmm1
movapd %xmm1,%xmm0
unpckhpd %xmm1,%xmm0
addsd  %xmm1,%xmm0
mulsd  0x18(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
mulsd  0xe7d(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1030 <exp@plt>
mulsd  0x10(%rsp),%xmm0
add    $0x48,%rsp
ret

LLVM IR (-O0):
define double @thetali_c(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
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
%13 = load double, double* %7
%14 = load double, double* %8
%15 = call double @theta_c(double %13, double %14)
%16 = load double, double* %12
%17 = fneg double %16
%18 = load double, double* %10
%19 = load double, double* %9
%20 = fsub double 1.000000e+00, %19
%21 = fdiv double %18, %20
%22 = load double, double* %11
%23 = load double, double* %9
%24 = fsub double 1.000000e+00, %23
%25 = fdiv double %22, %24
%26 = fadd double %21, %25
%27 = fmul double %17, %26
%28 = load double, double* %8
%29 = fmul double %28, 1.004000e+03
%30 = fdiv double %27, %29
%31 = call double @exp(double %30)
%32 = fmul double %15, %31
ret double %32
}

LLVM IR (-O2):
define double @thetali_c(double %0, double %1, double %2, double %3, double %4, double %5) {
%7 = tail call double @theta_c(double %0, double %1)
%8 = fneg double %5
%9 = fsub double 1.000000e+00, %2
%10 = insertelement <2 x double> poison, double %3, i64 0
%11 = insertelement <2 x double> %10, double %4, i64 1
%12 = insertelement <2 x double> poison, double %9, i64 0
%13 = shufflevector <2 x double> %12, <2 x double> poison, <2 x i32> zeroinitializer
%14 = fdiv <2 x double> %11, %13
%15 = shufflevector <2 x double> %14, <2 x double> poison, <2 x i32> <i32 1, i32 undef>
%16 = fadd <2 x double> %14, %15
%17 = extractelement <2 x double> %16, i64 0
%18 = fmul double %17, %8
%19 = fmul double %1, 1.004000e+03
%20 = fdiv double %18, %19
%21 = tail call double @exp(double %20)
%22 = fmul double %7, %21
ret double %22
}