#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 log(double);
int pow(double, double);
double q9(double e) {
  double q5;
  if (e <= 10) {
    q5 = -5.1 * e + 100.17;
  } else if (e > 10 && e <= 60) {
    q5 = -22.853 * log(e) + 101.18;
  } else if (e > 60 && e <= 90) {
    q5 = 10000000000 * pow(e, -5.1161);
  } else if (e > 90) {
    q5 = 1;
  }
  return q5;
}


x86 assembly (clang, -O0):
<q9>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xecb(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
jb     1167 <q9+0x47>
movsd  -0x8(%rbp),%xmm0
movsd  0xeeb(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xee7(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    124b <q9+0x12b>
movsd  -0x8(%rbp),%xmm0
movsd  0xe8c(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    11bd <q9+0x9d>
movsd  0xe82(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
jb     11bd <q9+0x9d>
movsd  -0x8(%rbp),%xmm0
call   1030 <log@plt>
movsd  0xe85(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe81(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1246 <q9+0x126>
movsd  -0x8(%rbp),%xmm0
movsd  0xe3e(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1218 <q9+0xf8>
movsd  0xe34(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
jb     1218 <q9+0xf8>
movsd  -0x8(%rbp),%xmm0
movsd  0xe2c(%rip),%xmm1
call   1040 <pow@plt>
cltq
movabs $0x2540be400,%rcx
imul   %rcx,%rax
cvtsi2sd %rax,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1241 <q9+0x121>
movsd  -0x8(%rbp),%xmm0
movsd  0xdeb(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    123c <q9+0x11c>
movsd  0xde1(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1241 <q9+0x121>
jmp    1246 <q9+0x126>
jmp    124b <q9+0x12b>
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<q9>:
push   %rax
movsd  0xed7(%rip),%xmm1
ucomisd %xmm0,%xmm1
jae    115e <q9+0x3e>
ucomisd 0xec9(%rip),%xmm0
jbe    1170 <q9+0x50>
movsd  0xed7(%rip),%xmm1
ucomisd %xmm0,%xmm1
jb     1170 <q9+0x50>
call   1030 <log@plt>
mulsd  0xee4(%rip),%xmm0
addsd  0xee4(%rip),%xmm0
pop    %rax
ret
mulsd  0xea2(%rip),%xmm0
addsd  0xea2(%rip),%xmm0
pop    %rax
ret
ucomisd 0xea0(%rip),%xmm0
movsd  0xea0(%rip),%xmm1
jbe    11b5 <q9+0x95>
movsd  0xe9e(%rip),%xmm2
ucomisd %xmm0,%xmm2
jb     11b5 <q9+0x95>
movsd  0xe98(%rip),%xmm1
call   1040 <pow@plt>
cltq
movabs $0x2540be400,%rcx
imul   %rax,%rcx
xorps  %xmm1,%xmm1
cvtsi2sd %rcx,%xmm1
movapd %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @q9(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = fcmp ole double %4, 1.000000e+01
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load double, double* %2
%8 = call double @llvm.fmuladd.f64(double -5.100000e+00, double %7, double 1.001700e+02)
store double %8, double* %3
br label %38
9: ; preds = %1
%10 = load double, double* %2
%11 = fcmp ogt double %10, 1.000000e+01
br i1 %11, label %12, label %19
12: ; preds = %9
%13 = load double, double* %2
%14 = fcmp ole double %13, 6.000000e+01
br i1 %14, label %15, label %19
15: ; preds = %12
%16 = load double, double* %2
%17 = call double @log(double %16)
%18 = call double @llvm.fmuladd.f64(double -2.285300e+01, double %17, double 1.011800e+02)
store double %18, double* %3
br label %37
19: ; preds = %12, %9
%20 = load double, double* %2
%21 = fcmp ogt double %20, 6.000000e+01
br i1 %21, label %22, label %31
22: ; preds = %19
%23 = load double, double* %2
%24 = fcmp ole double %23, 9.000000e+01
br i1 %24, label %25, label %31
25: ; preds = %22
%26 = load double, double* %2
%27 = call i32 @pow(double %26, double -5.116100e+00)
%28 = sext i32 %27 to i64
%29 = mul nsw i64 10000000000, %28
%30 = sitofp i64 %29 to double
store double %30, double* %3
br label %36
31: ; preds = %22, %19
%32 = load double, double* %2
%33 = fcmp ogt double %32, 9.000000e+01
br i1 %33, label %34, label %35
34: ; preds = %31
store double 1.000000e+00, double* %3
br label %35
35: ; preds = %34, %31
br label %36
36: ; preds = %35, %25
br label %37
37: ; preds = %36, %15
br label %38
38: ; preds = %37, %6
%39 = load double, double* %3
ret double %39
}

LLVM IR (-O2):
define double @q9(double %0) {
%2 = fcmp ugt double %0, 1.000000e+01
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call double @llvm.fmuladd.f64(double %0, double -5.100000e+00, double 1.001700e+02)
br label %21
5: ; preds = %1
%6 = fcmp ogt double %0, 1.000000e+01
%7 = fcmp ole double %0, 6.000000e+01
%8 = and i1 %6, %7
br i1 %8, label %9, label %12
9: ; preds = %5
%10 = tail call double @log(double %0)
%11 = tail call double @llvm.fmuladd.f64(double %10, double -2.285300e+01, double 1.011800e+02)
br label %21
12: ; preds = %5
%13 = fcmp ogt double %0, 6.000000e+01
%14 = fcmp ole double %0, 9.000000e+01
%15 = and i1 %13, %14
br i1 %15, label %16, label %21
16: ; preds = %12
%17 = tail call i32 @pow(double %0, double -5.116100e+00)
%18 = sext i32 %17 to i64
%19 = mul nsw i64 %18, 10000000000
%20 = sitofp i64 %19 to double
br label %21
21: ; preds = %12, %9, %16, %3
%22 = phi double [ %4, %3 ], [ %11, %9 ], [ %20, %16 ], [ 1.000000e+00, %12 ]
ret double %22
}