#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 */
float exp(double);
double mixratio(float, float);
float pow(double, double);
float thetaE(float pres, float temp) {
  float thta, te;
  thta = temp * pow((1012.5 / pres), .286);
  te = thta * exp(2.6518986 * mixratio(temp, pres) / temp);
  return te;
}


x86 assembly (clang, -O0):
<thetaE>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xeb3(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  0xe9f(%rip),%xmm1
call   1050 <pow@plt>
movaps %xmm0,%xmm1
movss  -0x18(%rbp),%xmm0
mulss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x8(%rbp),%xmm0
movss  -0x4(%rbp),%xmm1
call   1030 <mixratio@plt>
movaps %xmm0,%xmm1
movsd  0xe5d(%rip),%xmm0
mulsd  %xmm1,%xmm0
movss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
divsd  %xmm1,%xmm0
call   1040 <exp@plt>
movaps %xmm0,%xmm1
movss  -0x14(%rbp),%xmm0
mulss  %xmm1,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<thetaE>:
sub    $0x18,%rsp
movss  %xmm1,0xc(%rsp)
movss  %xmm0,0x10(%rsp)
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
movsd  0xeb1(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  0xead(%rip),%xmm1
call   1050 <pow@plt>
movapd %xmm0,%xmm1
movss  0xc(%rsp),%xmm0
mulss  %xmm0,%xmm1
movss  %xmm1,0x14(%rsp)
movss  0x10(%rsp),%xmm1
call   1030 <mixratio@plt>
mulsd  0xe89(%rip),%xmm0
movss  0xc(%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
divsd  %xmm1,%xmm0
call   1040 <exp@plt>
mulss  0x14(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define float @thetaE(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %3
store float %1, float* %4
%7 = load float, float* %4
%8 = load float, float* %3
%9 = fpext float %8 to double
%10 = fdiv double 1.012500e+03, %9
%11 = call float @pow(double %10, double 2.860000e-01)
%12 = fmul float %7, %11
store float %12, float* %5
%13 = load float, float* %5
%14 = load float, float* %4
%15 = load float, float* %3
%16 = call double @mixratio(float %14, float %15)
%17 = fmul double 0x400537169CFA772A, %16
%18 = load float, float* %4
%19 = fpext float %18 to double
%20 = fdiv double %17, %19
%21 = call float @exp(double %20)
%22 = fmul float %13, %21
store float %22, float* %6
%23 = load float, float* %6
ret float %23
}

LLVM IR (-O2):
define float @thetaE(float %0, float %1) {
%3 = fpext float %0 to double
%4 = fdiv double 1.012500e+03, %3
%5 = tail call float @pow(double %4, double 2.860000e-01)
%6 = fmul float %5, %1
%7 = tail call double @mixratio(float %1, float %0)
%8 = fmul double %7, 0x400537169CFA772A
%9 = fpext float %1 to double
%10 = fdiv double %8, %9
%11 = tail call float @exp(double %10)
%12 = fmul float %6, %11
ret float %12
}