#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 */
typedef float const int16_t;

/* Variables and functions */
float sht11_humid_convert_sensirion(float Tcels, int16_t SOrh) {
  const float c1 = -2.0468f;
  const float c2 = +0.0367f;
  const float c3 = -1.5955E-6f;
  const float RHlinear = c1 + c2 * SOrh + c3 * (SOrh * SOrh);
  const float t1 = 0.01f;
  const float t2 = 0.00008f;
  float RHtrue = (Tcels - 25.f) * (t1 + t2 * SOrh) + RHlinear;
  if (RHtrue > 100)
    RHtrue = 100;
  if (RHtrue < 0.1)
    RHtrue = 0.1;
  return RHtrue;
}


x86 assembly (clang, -O0):
<sht11_humid_convert_sensirion>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  0xf02(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  0xef1(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  0xee0(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x8(%rbp),%xmm1
movss  0xed2(%rip),%xmm0
mulss  %xmm0,%xmm1
movss  0xeca(%rip),%xmm0
addss  %xmm0,%xmm1
movss  -0x8(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  0xeac(%rip),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x18(%rbp)
movss  0xe8f(%rip),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  0xe7e(%rip),%xmm0
movss  %xmm0,-0x20(%rbp)
movss  -0x4(%rbp),%xmm0
movss  0xe74(%rip),%xmm1
subss  %xmm1,%xmm0
movss  -0x8(%rbp),%xmm2
movss  0xe5b(%rip),%xmm1
mulss  %xmm1,%xmm2
movss  0xe53(%rip),%xmm1
addss  %xmm1,%xmm2
movss  -0x18(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x24(%rbp)
movss  -0x24(%rbp),%xmm0
movss  0xe28(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    11ee <sht11_humid_convert_sensirion+0xee>
movss  0xe17(%rip),%xmm0
movss  %xmm0,-0x24(%rbp)
movss  -0x24(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe21(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1216 <sht11_humid_convert_sensirion+0x116>
movss  0xe0b(%rip),%xmm0
movss  %xmm0,-0x24(%rbp)
movss  -0x24(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<sht11_humid_convert_sensirion>:
movss  0xef8(%rip),%xmm2
mulss  %xmm1,%xmm2
addss  0xef0(%rip),%xmm2
movaps %xmm1,%xmm3
mulss  %xmm1,%xmm3
mulss  0xee5(%rip),%xmm3
addss  %xmm2,%xmm3
addss  0xedd(%rip),%xmm0
mulss  0xed9(%rip),%xmm1
addss  0xed5(%rip),%xmm1
mulss  %xmm0,%xmm1
addss  %xmm3,%xmm1
movss  0xec9(%rip),%xmm0
minss  %xmm1,%xmm0
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
movsd  0xebe(%rip),%xmm2
ucomisd %xmm1,%xmm2
jbe    1170 <sht11_humid_convert_sensirion+0x70>
movss  0xeac(%rip),%xmm0
ret

LLVM IR (-O0):
define float @sht11_humid_convert_sensirion(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
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
%12 = load float, float* %4
%13 = call float @llvm.fmuladd.f32(float 0x3FA2CA57A0000000, float %12, float 0xC0005FD8A0000000)
%14 = load float, float* %4
%15 = load float, float* %4
%16 = fmul float %14, %15
%17 = call float @llvm.fmuladd.f32(float 0xBEBAC49EC0000000, float %16, float %13)
store float %17, float* %8
store float 0x3F847AE140000000, float* %9
store float 0x3F14F8B580000000, float* %10
%18 = load float, float* %3
%19 = fsub float %18, 2.500000e+01
%20 = load float, float* %4
%21 = call float @llvm.fmuladd.f32(float 0x3F14F8B580000000, float %20, float 0x3F847AE140000000)
%22 = load float, float* %8
%23 = call float @llvm.fmuladd.f32(float %19, float %21, float %22)
store float %23, float* %11
%24 = load float, float* %11
%25 = fcmp ogt float %24, 1.000000e+02
br i1 %25, label %26, label %27
26: ; preds = %2
store float 1.000000e+02, float* %11
br label %27
27: ; preds = %26, %2
%28 = load float, float* %11
%29 = fpext float %28 to double
%30 = fcmp olt double %29, 1.000000e-01
br i1 %30, label %31, label %32
31: ; preds = %27
store float 0x3FB99999A0000000, float* %11
br label %32
32: ; preds = %31, %27
%33 = load float, float* %11
ret float %33
}

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