void calc_sht11(float *p_humidity, float *p_temprature) {
  const float C1 = -0.40;
  const float C2 = 0.0405;
  const float C3 = -0.0000028;
  const float T1 = 0.01;
  const float T2 = 0.00008;
  float rh = *p_humidity;
  float t = *p_temprature;
  float rh_lin;
  float rh_true;
  float t_C;
  t_C = t * 0.01 - 40;
  rh_lin = C3 * rh * rh + C2 * rh + C1;
  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_temprature = t_C;
  *p_humidity = rh_true;
}


x86 assembly (clang, -O0):
<calc_sht11>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movss  0xefc(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  0xef3(%rip),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  0xeea(%rip),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  0xecd(%rip),%xmm0
movss  %xmm0,-0x20(%rbp)
movss  0xebc(%rip),%xmm0
movss  %xmm0,-0x24(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x28(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x2c(%rbp)
movss  -0x2c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xea8(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xea4(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x38(%rbp)
movss  0xe7f(%rip),%xmm0
mulss  -0x28(%rbp),%xmm0
movss  -0x28(%rbp),%xmm2
movss  0xe69(%rip),%xmm1
mulss  -0x28(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  0xe50(%rip),%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0x30(%rbp)
movss  -0x38(%rbp),%xmm0
movss  0xe36(%rip),%xmm1
subss  %xmm1,%xmm0
movss  -0x28(%rbp),%xmm2
movss  0xe1d(%rip),%xmm1
mulss  %xmm1,%xmm2
movss  0xe15(%rip),%xmm1
addss  %xmm1,%xmm2
movss  -0x30(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x34(%rbp)
movss  -0x34(%rbp),%xmm0
movss  0xdea(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    122c <calc_sht11+0x12c>
movss  0xdd9(%rip),%xmm0
movss  %xmm0,-0x34(%rbp)
movss  -0x34(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xdf3(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1254 <calc_sht11+0x154>
movss  0xdcd(%rip),%xmm0
movss  %xmm0,-0x34(%rbp)
movss  -0x38(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,(%rax)
movss  -0x34(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<calc_sht11>:
movss  (%rdi),%xmm1
movss  (%rsi),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  0xeec(%rip),%xmm0
addsd  0xeec(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  0xef0(%rip),%xmm2
mulss  %xmm1,%xmm2
movss  0xee8(%rip),%xmm3
mulss  %xmm1,%xmm3
mulss  %xmm1,%xmm2
addss  %xmm3,%xmm2
addss  0xed8(%rip),%xmm2
movss  0xed4(%rip),%xmm3
addss  %xmm0,%xmm3
mulss  0xecc(%rip),%xmm1
addss  0xec8(%rip),%xmm1
mulss  %xmm3,%xmm1
addss  %xmm2,%xmm1
movss  0xebc(%rip),%xmm2
minss  %xmm1,%xmm2
xorps  %xmm1,%xmm1
cvtss2sd %xmm2,%xmm1
movsd  0xe89(%rip),%xmm3
ucomisd %xmm1,%xmm3
jbe    1195 <calc_sht11+0x95>
movss  0xe9f(%rip),%xmm2
movss  %xmm0,(%rsi)
movss  %xmm2,(%rdi)
ret

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

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