#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, int);
double qDT(double DT) {
  double q6, A = 0.0003869, B = 0.1815, C = 0.01081;
  if (DT <= 5) {
    return 1;
  } else if (DT > 15) {
    return 9;
  } else {
    q6 = 1 / (A * pow(DT + B, 2) + C);
    return q6;
  }
}


x86 assembly (clang, -O0):
<qDT>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  0xef3(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xede(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xec9(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xeb4(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     1169 <qDT+0x59>
movsd  0xec9(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    11e0 <qDT+0xd0>
movsd  -0x10(%rbp),%xmm0
movsd  0xeaa(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1192 <qDT+0x82>
movsd  0xea8(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    11e0 <qDT+0xd0>
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x10(%rbp),%xmm0
addsd  -0x28(%rbp),%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
movsd  -0x38(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x30(%rbp),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0xe5b(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<qDT>:
push   %rax
movsd  0xeef(%rip),%xmm1
ucomisd %xmm0,%xmm1
jae    1133 <qDT+0x23>
ucomisd 0xef1(%rip),%xmm0
jbe    113d <qDT+0x2d>
movsd  0xedf(%rip),%xmm0
pop    %rax
ret
movsd  0xec5(%rip),%xmm0
pop    %rax
ret
addsd  0xedb(%rip),%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
movapd %xmm0,%xmm1
mulsd  0xecd(%rip),%xmm1
addsd  0xecd(%rip),%xmm1
movsd  0xe95(%rip),%xmm0
divsd  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @qDT(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
store double %0, double* %3
store double 3.869000e-04, double* %5
store double 1.815000e-01, double* %6
store double 1.081000e-02, double* %7
%8 = load double, double* %3
%9 = fcmp ole double %8, 5.000000e+00
br i1 %9, label %10, label %11
10: ; preds = %1
store double 1.000000e+00, double* %2
br label %25
11: ; preds = %1
%12 = load double, double* %3
%13 = fcmp ogt double %12, 1.500000e+01
br i1 %13, label %14, label %15
14: ; preds = %11
store double 9.000000e+00, double* %2
br label %25
15: ; preds = %11
%16 = load double, double* %5
%17 = load double, double* %3
%18 = load double, double* %6
%19 = fadd double %17, %18
%20 = call double @pow(double %19, i32 2)
%21 = load double, double* %7
%22 = call double @llvm.fmuladd.f64(double %16, double %20, double %21)
%23 = fdiv double 1.000000e+00, %22
store double %23, double* %4
%24 = load double, double* %4
store double %24, double* %2
br label %25
25: ; preds = %15, %14, %10
%26 = load double, double* %2
ret double %26
}

LLVM IR (-O2):
define double @qDT(double %0) {
%2 = fcmp ugt double %0, 5.000000e+00
br i1 %2, label %3, label %10
3: ; preds = %1
%4 = fcmp ogt double %0, 1.500000e+01
br i1 %4, label %10, label %5
5: ; preds = %3
%6 = fadd double %0, 1.815000e-01
%7 = tail call double @pow(double %6, i32 2)
%8 = tail call double @llvm.fmuladd.f64(double %7, double 3.869000e-04, double 1.081000e-02)
%9 = fdiv double 1.000000e+00, %8
br label %10
10: ; preds = %3, %1, %5
%11 = phi double [ %9, %5 ], [ 1.000000e+00, %1 ], [ 9.000000e+00, %3 ]
ret double %11
}