#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 */
int pow(double, int);
double E_t(double P, double Rho, double U, double V, double W, double gamma) {
  return -P / (Rho * (1 - gamma)) + pow(U, 2) / 2 + pow(V, 2) / 2 +
         pow(W, 2) / 2;
}


x86 assembly (clang, -O0):
<E_t>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%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
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  0xea1(%rip),%xmm2
subsd  -0x30(%rbp),%xmm2
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x18(%rbp),%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
movsd  -0x48(%rbp),%xmm0
mov    $0x2,%ecx
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x20(%rbp),%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
movsd  -0x40(%rbp),%xmm0
mov    $0x2,%ecx
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x28(%rbp),%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
movsd  -0x38(%rbp),%xmm0
mov    $0x2,%ecx
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm1
addsd  %xmm1,%xmm0
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<E_t>:
sub    $0x28,%rsp
movsd  %xmm4,0x20(%rsp)
movsd  %xmm3,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
movsd  0xed2(%rip),%xmm0
subsd  %xmm5,%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,0x18(%rsp)
movaps %xmm2,%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
sar    %ecx
xorps  %xmm1,%xmm1
cvtsi2sd %ecx,%xmm1
movsd  0x8(%rsp),%xmm0
divsd  0x18(%rsp),%xmm0
subsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
sar    %ecx
xorps  %xmm0,%xmm0
cvtsi2sd %ecx,%xmm0
addsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0x20(%rsp),%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
sar    %ecx
xorps  %xmm0,%xmm0
cvtsi2sd %ecx,%xmm0
addsd  0x10(%rsp),%xmm0
add    $0x28,%rsp
ret

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

LLVM IR (-O2):
define double @E_t(double %0, double %1, double %2, double %3, double %4, double %5) {
%7 = fsub double 1.000000e+00, %5
%8 = fmul double %7, %1
%9 = tail call i32 @pow(double %2, i32 2)
%10 = sdiv i32 %9, 2
%11 = sitofp i32 %10 to double
%12 = fdiv double %0, %8
%13 = fsub double %11, %12
%14 = tail call i32 @pow(double %3, i32 2)
%15 = sdiv i32 %14, 2
%16 = sitofp i32 %15 to double
%17 = fadd double %13, %16
%18 = tail call i32 @pow(double %4, i32 2)
%19 = sdiv i32 %18, 2
%20 = sitofp i32 %19 to double
%21 = fadd double %17, %20
ret double %21
}