#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 q3(double c) {
  double q3;
  if (c <= 2) {
    q3 = 1;
  } else if (c > 2 && c <= 6.9) {
    q3 = -37.1085 + 41.91277 * c - 15.7043 * pow(c, 2) + 2.417486 * pow(c, 3) -
         0.091252 * pow(c, 4);
  } else if (c > 6.9 && c <= 7.1) {
    q3 = -4.69365 - 21.4593 * c - 68.4561 * pow(c, 2) + 21.638886 * pow(c, 3) -
         1.59165 * (c, 4);
  } else if (c > 7.1 && c <= 12) {
    q3 = -7698.19 + 3262.031 * c - 499.494 * pow(c, 2) + 33.1551 * pow(c, 3) -
         0.810613 * pow(c, 4);
  } else {
    q3 = 3;
  }
  return q3;
}


x86 assembly (clang, -O0):
<q3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xedb(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
jb     1142 <q3+0x32>
movsd  0xf68(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    13a5 <q3+0x295>
movsd  -0x8(%rbp),%xmm0
movsd  0xeb1(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    120e <q3+0xfe>
movsd  0xea7(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
jb     120e <q3+0xfe>
movsd  -0x8(%rbp),%xmm0
movsd  0xf17(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xf13(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
movsd  -0x28(%rbp),%xmm1
movsd  0xede(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    $0x3,%edi
call   1030 <pow@plt>
movsd  -0x20(%rbp),%xmm1
movsd  0xead(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    $0x4,%edi
call   1030 <pow@plt>
movsd  -0x18(%rbp),%xmm1
movsd  0xe7c(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    13a0 <q3+0x290>
movsd  -0x8(%rbp),%xmm0
movsd  0xded(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    12bd <q3+0x1ad>
movsd  0xde3(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
jb     12bd <q3+0x1ad>
movsd  -0x8(%rbp),%xmm0
movsd  0xe23(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe1f(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
movsd  -0x38(%rbp),%xmm1
movsd  0xdea(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    $0x3,%edi
call   1030 <pow@plt>
movsd  -0x30(%rbp),%xmm1
movsd  0xdb9(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xda1(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    139b <q3+0x28b>
movsd  -0x8(%rbp),%xmm0
movsd  0xd46(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1389 <q3+0x279>
movsd  0xd3c(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
jb     1389 <q3+0x279>
movsd  -0x8(%rbp),%xmm0
movsd  0xd4c(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd48(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
movsd  -0x50(%rbp),%xmm1
movsd  0xd13(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    $0x3,%edi
call   1030 <pow@plt>
movsd  -0x48(%rbp),%xmm1
movsd  0xce2(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    $0x4,%edi
call   1030 <pow@plt>
movsd  -0x40(%rbp),%xmm1
movsd  0xcb1(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1396 <q3+0x286>
movsd  0xc8f(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    139b <q3+0x28b>
jmp    13a0 <q3+0x290>
jmp    13a5 <q3+0x295>
movsd  -0x10(%rbp),%xmm0
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<q3>:
sub    $0x18,%rsp
movapd %xmm0,%xmm2
movsd  0xee8(%rip),%xmm0
ucomisd %xmm2,%xmm0
jae    11cd <q3+0xbd>
ucomisd 0xed6(%rip),%xmm2
jbe    11da <q3+0xca>
movsd  0xed0(%rip),%xmm0
ucomisd %xmm2,%xmm0
jb     11da <q3+0xca>
movsd  0xf2e(%rip),%xmm0
mulsd  %xmm2,%xmm0
addsd  0xf2a(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
movapd %xmm2,%xmm0
mov    $0x2,%edi
movsd  %xmm2,0x10(%rsp)
call   1030 <pow@plt>
mulsd  0xf10(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
mov    $0x3,%edi
call   1030 <pow@plt>
mulsd  0xef4(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
mov    $0x4,%edi
call   1030 <pow@plt>
mulsd  0xed8(%rip),%xmm0
jmp    12fd <q3+0x1ed>
movsd  0xe2b(%rip),%xmm0
add    $0x18,%rsp
ret
ucomisd 0xe2e(%rip),%xmm2
jbe    125f <q3+0x14f>
movsd  0xe2c(%rip),%xmm0
ucomisd %xmm2,%xmm0
jb     125f <q3+0x14f>
movsd  0xe5e(%rip),%xmm0
mulsd  %xmm2,%xmm0
addsd  0xe5a(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
movapd %xmm2,%xmm0
mov    $0x2,%edi
movsd  %xmm2,0x10(%rsp)
call   1030 <pow@plt>
mulsd  0xe40(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
mov    $0x3,%edi
call   1030 <pow@plt>
mulsd  0xe24(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
addsd  0xe1e(%rip),%xmm0
add    $0x18,%rsp
ret
ucomisd 0xdb1(%rip),%xmm2
movsd  0xdb1(%rip),%xmm0
jbe    125a <q3+0x14a>
movsd  0xdaf(%rip),%xmm1
ucomisd %xmm2,%xmm1
jb     125a <q3+0x14a>
movsd  0xda9(%rip),%xmm0
mulsd  %xmm2,%xmm0
addsd  0xda5(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
movapd %xmm2,%xmm0
mov    $0x2,%edi
movsd  %xmm2,0x10(%rsp)
call   1030 <pow@plt>
mulsd  0xd8b(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
mov    $0x3,%edi
call   1030 <pow@plt>
mulsd  0xd6f(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
mov    $0x4,%edi
call   1030 <pow@plt>
mulsd  0xd53(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @q3(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = fcmp ole double %4, 2.000000e+00
br i1 %5, label %6, label %7
6: ; preds = %1
store double 1.000000e+00, double* %3
br label %64
7: ; preds = %1
%8 = load double, double* %2
%9 = fcmp ogt double %8, 2.000000e+00
br i1 %9, label %10, label %25
10: ; preds = %7
%11 = load double, double* %2
%12 = fcmp ole double %11, 6.900000e+00
br i1 %12, label %13, label %25
13: ; preds = %10
%14 = load double, double* %2
%15 = call double @llvm.fmuladd.f64(double 0x4044F4D5A5B9628D, double %14, double -3.710850e+01)
%16 = load double, double* %2
%17 = call double @pow(double %16, i32 2)
%18 = call double @llvm.fmuladd.f64(double -1.570430e+01, double %17, double %15)
%19 = load double, double* %2
%20 = call double @pow(double %19, i32 3)
%21 = call double @llvm.fmuladd.f64(double 0x40035702E6644D87, double %20, double %18)
%22 = load double, double* %2
%23 = call double @pow(double %22, i32 4)
%24 = call double @llvm.fmuladd.f64(double 0xBFB75C4A83B1D0C8, double %23, double %21)
store double %24, double* %3
br label %63
25: ; preds = %10, %7
%26 = load double, double* %2
%27 = fcmp ogt double %26, 6.900000e+00
br i1 %27, label %28, label %42
28: ; preds = %25
%29 = load double, double* %2
%30 = fcmp ole double %29, 7.100000e+00
br i1 %30, label %31, label %42
31: ; preds = %28
%32 = load double, double* %2
%33 = call double @llvm.fmuladd.f64(double -2.145930e+01, double %32, double -4.693650e+00)
%34 = load double, double* %2
%35 = call double @pow(double %34, i32 2)
%36 = call double @llvm.fmuladd.f64(double -6.845610e+01, double %35, double %33)
%37 = load double, double* %2
%38 = call double @pow(double %37, i32 3)
%39 = call double @llvm.fmuladd.f64(double 0x4035A38E086BDF4C, double %38, double %36)
%40 = load double, double* %2
%41 = fsub double %39, 6.366600e+00
store double %41, double* %3
br label %62
42: ; preds = %28, %25
%43 = load double, double* %2
%44 = fcmp ogt double %43, 7.100000e+00
br i1 %44, label %45, label %60
45: ; preds = %42
%46 = load double, double* %2
%47 = fcmp ole double %46, 1.200000e+01
br i1 %47, label %48, label %60
48: ; preds = %45
%49 = load double, double* %2
%50 = call double @llvm.fmuladd.f64(double 0x40A97C0FDF3B645A, double %49, double -7.698190e+03)
%51 = load double, double* %2
%52 = call double @pow(double %51, i32 2)
%53 = call double @llvm.fmuladd.f64(double -4.994940e+02, double %52, double %50)
%54 = load double, double* %2
%55 = call double @pow(double %54, i32 3)
%56 = call double @llvm.fmuladd.f64(double 3.315510e+01, double %55, double %53)
%57 = load double, double* %2
%58 = call double @pow(double %57, i32 4)
%59 = call double @llvm.fmuladd.f64(double -8.106130e-01, double %58, double %56)
store double %59, double* %3
br label %61
60: ; preds = %45, %42
store double 3.000000e+00, double* %3
br label %61
61: ; preds = %60, %48
br label %62
62: ; preds = %61, %31
br label %63
63: ; preds = %62, %13
br label %64
64: ; preds = %63, %6
%65 = load double, double* %3
ret double %65
}

LLVM IR (-O2):
define double @q3(double %0) {
%2 = fcmp ugt double %0, 2.000000e+00
br i1 %2, label %3, label %38
3: ; preds = %1
%4 = fcmp ogt double %0, 2.000000e+00
%5 = fcmp ole double %0, 6.900000e+00
%6 = and i1 %4, %5
br i1 %6, label %7, label %15
7: ; preds = %3
%8 = tail call double @llvm.fmuladd.f64(double %0, double 0x4044F4D5A5B9628D, double -3.710850e+01)
%9 = tail call double @pow(double %0, i32 2)
%10 = tail call double @llvm.fmuladd.f64(double %9, double -1.570430e+01, double %8)
%11 = tail call double @pow(double %0, i32 3)
%12 = tail call double @llvm.fmuladd.f64(double %11, double 0x40035702E6644D87, double %10)
%13 = tail call double @pow(double %0, i32 4)
%14 = tail call double @llvm.fmuladd.f64(double %13, double 0xBFB75C4A83B1D0C8, double %12)
br label %38
15: ; preds = %3
%16 = fcmp ogt double %0, 6.900000e+00
%17 = fcmp ole double %0, 7.100000e+00
%18 = and i1 %16, %17
br i1 %18, label %19, label %26
19: ; preds = %15
%20 = tail call double @llvm.fmuladd.f64(double %0, double -2.145930e+01, double -4.693650e+00)
%21 = tail call double @pow(double %0, i32 2)
%22 = tail call double @llvm.fmuladd.f64(double %21, double -6.845610e+01, double %20)
%23 = tail call double @pow(double %0, i32 3)
%24 = tail call double @llvm.fmuladd.f64(double %23, double 0x4035A38E086BDF4C, double %22)
%25 = fadd double %24, -6.366600e+00
br label %38
26: ; preds = %15
%27 = fcmp ogt double %0, 7.100000e+00
%28 = fcmp ole double %0, 1.200000e+01
%29 = and i1 %27, %28
br i1 %29, label %30, label %38
30: ; preds = %26
%31 = tail call double @llvm.fmuladd.f64(double %0, double 0x40A97C0FDF3B645A, double -7.698190e+03)
%32 = tail call double @pow(double %0, i32 2)
%33 = tail call double @llvm.fmuladd.f64(double %32, double -4.994940e+02, double %31)
%34 = tail call double @pow(double %0, i32 3)
%35 = tail call double @llvm.fmuladd.f64(double %34, double 3.315510e+01, double %33)
%36 = tail call double @pow(double %0, i32 4)
%37 = tail call double @llvm.fmuladd.f64(double %36, double -8.106130e-01, double %35)
br label %38
38: ; preds = %26, %1, %7, %30, %19
%39 = phi double [ %14, %7 ], [ %25, %19 ], [ %37, %30 ], [ 1.000000e+00, %1 ], [ 3.000000e+00, %26 ]
ret double %39
}