#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(double, double);
double ComputeTemperature(double dVobject, double dTAmbient) {
  double Tdie2 = dTAmbient + 273.15;
  const double S0 = 6.4E-14;
  const double a1 = 1.75E-3;
  const double a2 = -1.678E-5;
  const double b0 = -2.94E-5;
  const double b1 = -5.7E-7;
  const double b2 = 4.63E-9;
  const double c2 = 13.4;
  const double Tref = 298.15;
  double S = S0 * (1 + a1 * (Tdie2 - Tref) + a2 * pow((Tdie2 - Tref), 2));
  double Vos = b0 + b1 * (Tdie2 - Tref) + b2 * pow((Tdie2 - Tref), 2);
  double fObj = (dVobject - Vos) + c2 * pow((dVobject - Vos), 2);
  double tObj = pow(pow(Tdie2, 4) + (fObj / S), .25);
  tObj = (tObj - 273.15);
  return tObj;
}


x86 assembly (clang, -O0):
<ComputeTemperature>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  0xed3(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xf09(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xf0c(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xef7(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xeda(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xec5(%rip),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  0xea8(%rip),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  0xe8b(%rip),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  0xe96(%rip),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  0xe84(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xea0(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe9c(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
movsd  0xe53(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xe37(%rip),%xmm1
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x90(%rbp),%xmm0
ff
movsd  0xe4f(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0xe37(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  0xe09(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xe05(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe01(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
movsd  0xdd8(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xdbc(%rip),%xmm1
call   1030 <pow@plt>
movsd  -0x88(%rbp),%xmm1
ff
movsd  0xdaf(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x8(%rbp),%xmm0
subsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x8(%rbp),%xmm0
subsd  -0x68(%rbp),%xmm0
movsd  0xd79(%rip),%xmm1
call   1030 <pow@plt>
movsd  -0x80(%rbp),%xmm1
movsd  0xd5f(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  0xd3d(%rip),%xmm1
call   1030 <pow@plt>
movsd  -0x70(%rbp),%xmm1
divsd  -0x60(%rbp),%xmm1
addsd  %xmm1,%xmm0
movsd  0xd1a(%rip),%xmm1
call   1030 <pow@plt>
movsd  %xmm0,-0x78(%rbp)
movsd  -0x78(%rbp),%xmm0
movsd  0xcfb(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x78(%rbp),%xmm0
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ComputeTemperature>:
push   %rax
movapd %xmm1,%xmm2
addsd  0xee3(%rip),%xmm2
movsd  0xee3(%rip),%xmm1
addsd  %xmm2,%xmm1
movsd  0xedf(%rip),%xmm3
mulsd  %xmm1,%xmm3
addsd  0xedb(%rip),%xmm3
movapd %xmm1,%xmm4
mulsd  %xmm1,%xmm4
movsd  0xed3(%rip),%xmm5
mulsd  %xmm4,%xmm5
addsd  %xmm3,%xmm5
mulsd  0xecb(%rip),%xmm5
mulsd  0xecb(%rip),%xmm1
addsd  0xecb(%rip),%xmm1
mulsd  0xecb(%rip),%xmm4
addsd  %xmm1,%xmm4
movapd %xmm0,%xmm1
subsd  %xmm4,%xmm1
movapd %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mulsd  0xeb7(%rip),%xmm0
addsd  %xmm0,%xmm1
divsd  %xmm5,%xmm1
movsd  %xmm1,(%rsp)
movsd  0xeaa(%rip),%xmm1
movapd %xmm2,%xmm0
call   1030 <pow@plt>
addsd  (%rsp),%xmm0
movsd  0xe9c(%rip),%xmm1
call   1030 <pow@plt>
addsd  0xe97(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @ComputeTemperature(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%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* %3
store double %1, double* %4
%18 = load double, double* %4
%19 = fadd double %18, 2.731500e+02
store double %19, double* %5
store double 6.400000e-14, double* %6
store double 1.750000e-03, double* %7
store double -1.678000e-05, double* %8
store double -2.940000e-05, double* %9
store double -5.700000e-07, double* %10
store double 4.630000e-09, double* %11
store double 1.340000e+01, double* %12
store double 2.981500e+02, double* %13
%20 = load double, double* %5
%21 = fsub double %20, 2.981500e+02
%22 = call double @llvm.fmuladd.f64(double 1.750000e-03, double %21, double 1.000000e+00)
%23 = load double, double* %5
%24 = fsub double %23, 2.981500e+02
%25 = call double @pow(double %24, double 2.000000e+00)
%26 = call double @llvm.fmuladd.f64(double -1.678000e-05, double %25, double %22)
%27 = fmul double 6.400000e-14, %26
store double %27, double* %14
%28 = load double, double* %5
%29 = fsub double %28, 2.981500e+02
%30 = call double @llvm.fmuladd.f64(double -5.700000e-07, double %29, double -2.940000e-05)
%31 = load double, double* %5
%32 = fsub double %31, 2.981500e+02
%33 = call double @pow(double %32, double 2.000000e+00)
%34 = call double @llvm.fmuladd.f64(double 4.630000e-09, double %33, double %30)
store double %34, double* %15
%35 = load double, double* %3
%36 = load double, double* %15
%37 = fsub double %35, %36
%38 = load double, double* %3
%39 = load double, double* %15
%40 = fsub double %38, %39
%41 = call double @pow(double %40, double 2.000000e+00)
%42 = call double @llvm.fmuladd.f64(double 1.340000e+01, double %41, double %37)
store double %42, double* %16
%43 = load double, double* %5
%44 = call double @pow(double %43, double 4.000000e+00)
%45 = load double, double* %16
%46 = load double, double* %14
%47 = fdiv double %45, %46
%48 = fadd double %44, %47
%49 = call double @pow(double %48, double 2.500000e-01)
store double %49, double* %17
%50 = load double, double* %17
%51 = fsub double %50, 2.731500e+02
store double %51, double* %17
%52 = load double, double* %17
ret double %52
}

LLVM IR (-O2):
define double @ComputeTemperature(double %0, double %1) {
%3 = fadd double %1, 2.731500e+02
%4 = fadd double %3, -2.981500e+02
%5 = tail call double @llvm.fmuladd.f64(double %4, double 1.750000e-03, double 1.000000e+00)
%6 = fmul double %4, %4
%7 = tail call double @llvm.fmuladd.f64(double %6, double -1.678000e-05, double %5)
%8 = fmul double %7, 6.400000e-14
%9 = tail call double @llvm.fmuladd.f64(double %4, double -5.700000e-07, double -2.940000e-05)
%10 = tail call double @llvm.fmuladd.f64(double %6, double 4.630000e-09, double %9)
%11 = fsub double %0, %10
%12 = fmul double %11, %11
%13 = tail call double @llvm.fmuladd.f64(double %12, double 1.340000e+01, double %11)
%14 = tail call double @pow(double %3, double 4.000000e+00)
%15 = fdiv double %13, %8
%16 = fadd double %15, %14
%17 = tail call double @pow(double %16, double 2.500000e-01)
%18 = fadd double %17, -2.731500e+02
ret double %18
}