void SHT1x_Calc(float *p_humidity, float *p_temperature) {
  const float C1 = -2.0468;
  const float C2 = +0.0367;
  const float C3 = -0.0000015955;
  const float T1 = +0.01;
  const float T2 = +0.00008;
  const float D1 = -39.66;
  const float D2 = 0.01;
  float rh = *p_humidity;
  float t = *p_temperature;
  float rh_lin;
  float rh_true;
  float t_C;
  t_C = D1 + (D2 * t);
  rh_lin = C1 + (C2 * rh) + (C3 * rh * rh);
  rh_true = (t_C - 25) * (T1 + (T2 * rh)) + rh_lin;
  if (rh_true > 100)
    rh_true = 100;
  if (rh_true < 0.1)
    rh_true = 0.1;
  *p_temperature = t_C;
  *p_humidity = rh_true;
}


x86 assembly (clang, -O0):
<SHT1x_Calc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movss  0xf04(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  0xef3(%rip),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  0xee2(%rip),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  0xecd(%rip),%xmm0
movss  %xmm0,-0x20(%rbp)
movss  0xebc(%rip),%xmm0
movss  %xmm0,-0x24(%rbp)
movss  0xec7(%rip),%xmm0
movss  %xmm0,-0x28(%rbp)
movss  0xea6(%rip),%xmm0
movss  %xmm0,-0x2c(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x30(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x34(%rbp)
movss  -0x34(%rbp),%xmm0
movss  0xe7a(%rip),%xmm1
mulss  %xmm1,%xmm0
movss  0xe82(%rip),%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0x40(%rbp)
movss  -0x30(%rbp),%xmm1
movss  0xe64(%rip),%xmm0
mulss  %xmm0,%xmm1
movss  0xe5c(%rip),%xmm0
addss  %xmm0,%xmm1
movss  0xe48(%rip),%xmm0
mulss  -0x30(%rbp),%xmm0
movss  -0x30(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x38(%rbp)
movss  -0x40(%rbp),%xmm0
movss  0xe20(%rip),%xmm1
subss  %xmm1,%xmm0
movss  -0x30(%rbp),%xmm2
movss  0xe07(%rip),%xmm1
mulss  %xmm1,%xmm2
movss  0xdff(%rip),%xmm1
addss  %xmm1,%xmm2
movss  -0x38(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x3c(%rbp)
movss  -0x3c(%rbp),%xmm0
movss  0xdd4(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    1242 <SHT1x_Calc+0x142>
movss  0xdc3(%rip),%xmm0
movss  %xmm0,-0x3c(%rbp)
movss  -0x3c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xdd5(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    126a <SHT1x_Calc+0x16a>
movss  0xdbb(%rip),%xmm0
movss  %xmm0,-0x3c(%rbp)
movss  -0x40(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,(%rax)
movss  -0x3c(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<SHT1x_Calc>:
movss  (%rdi),%xmm2
movss  0xef4(%rip),%xmm1
movss  (%rsi),%xmm0
mulss  %xmm1,%xmm0
addss  0xee8(%rip),%xmm0
movss  0xee4(%rip),%xmm3
mulss  %xmm2,%xmm3
addss  0xedc(%rip),%xmm3
movss  0xed8(%rip),%xmm4
mulss  %xmm2,%xmm4
mulss  %xmm2,%xmm4
addss  %xmm3,%xmm4
movss  0xec8(%rip),%xmm3
addss  %xmm0,%xmm3
mulss  0xec0(%rip),%xmm2
addss  %xmm1,%xmm2
mulss  %xmm3,%xmm2
addss  %xmm4,%xmm2
movss  0xeb0(%rip),%xmm1
minss  %xmm2,%xmm1
xorps  %xmm2,%xmm2
cvtss2sd %xmm1,%xmm2
movsd  0xea9(%rip),%xmm3
ucomisd %xmm2,%xmm3
jbe    118d <SHT1x_Calc+0x8d>
movss  0xe93(%rip),%xmm1
movss  %xmm0,(%rsi)
movss  %xmm1,(%rdi)
ret

LLVM IR (-O0):
define void @SHT1x_Calc(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca float
%12 = alloca float
%13 = alloca float
%14 = alloca float
%15 = alloca float
%16 = alloca float
store float* %0, float** %3
store float* %1, float** %4
store float 0xC0005FD8A0000000, float* %5
store float 0x3FA2CA57A0000000, float* %6
store float 0xBEBAC49EC0000000, float* %7
store float 0x3F847AE140000000, float* %8
store float 0x3F14F8B580000000, float* %9
store float 0xC043D47AE0000000, float* %10
store float 0x3F847AE140000000, float* %11
%17 = load float*, float** %3
%18 = load float, float* %17
store float %18, float* %12
%19 = load float*, float** %4
%20 = load float, float* %19
store float %20, float* %13
%21 = load float, float* %13
%22 = call float @llvm.fmuladd.f32(float 0x3F847AE140000000, float %21, float 0xC043D47AE0000000)
store float %22, float* %16
%23 = load float, float* %12
%24 = call float @llvm.fmuladd.f32(float 0x3FA2CA57A0000000, float %23, float 0xC0005FD8A0000000)
%25 = load float, float* %12
%26 = fmul float 0xBEBAC49EC0000000, %25
%27 = load float, float* %12
%28 = call float @llvm.fmuladd.f32(float %26, float %27, float %24)
store float %28, float* %14
%29 = load float, float* %16
%30 = fsub float %29, 2.500000e+01
%31 = load float, float* %12
%32 = call float @llvm.fmuladd.f32(float 0x3F14F8B580000000, float %31, float 0x3F847AE140000000)
%33 = load float, float* %14
%34 = call float @llvm.fmuladd.f32(float %30, float %32, float %33)
store float %34, float* %15
%35 = load float, float* %15
%36 = fcmp ogt float %35, 1.000000e+02
br i1 %36, label %37, label %38
37: ; preds = %2
store float 1.000000e+02, float* %15
br label %38
38: ; preds = %37, %2
%39 = load float, float* %15
%40 = fpext float %39 to double
%41 = fcmp olt double %40, 1.000000e-01
br i1 %41, label %42, label %43
42: ; preds = %38
store float 0x3FB99999A0000000, float* %15
br label %43
43: ; preds = %42, %38
%44 = load float, float* %16
%45 = load float*, float** %4
store float %44, float* %45
%46 = load float, float* %15
%47 = load float*, float** %3
store float %46, float* %47
ret void
}

LLVM IR (-O2):
define void @SHT1x_Calc(float* nocapture %0, float* nocapture %1) {
%3 = load float, float* %0
%4 = load float, float* %1
%5 = tail call float @llvm.fmuladd.f32(float %4, float 0x3F847AE140000000, float 0xC043D47AE0000000)
%6 = tail call float @llvm.fmuladd.f32(float %3, float 0x3FA2CA57A0000000, float 0xC0005FD8A0000000)
%7 = fmul float %3, 0xBEBAC49EC0000000
%8 = tail call float @llvm.fmuladd.f32(float %7, float %3, float %6)
%9 = fadd float %5, -2.500000e+01
%10 = tail call float @llvm.fmuladd.f32(float %3, float 0x3F14F8B580000000, float 0x3F847AE140000000)
%11 = tail call float @llvm.fmuladd.f32(float %9, float %10, float %8)
%12 = fcmp ogt float %11, 1.000000e+02
%13 = select i1 %12, float 1.000000e+02, float %11
%14 = fpext float %13 to double
%15 = fcmp olt double %14, 1.000000e-01
%16 = select i1 %15, float 0x3FB99999A0000000, float %13
store float %5, float* %1
store float %16, float* %0
ret void
}