#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 dBToGain(double);
double taperingModel(int key, int bus) {
  double tapering = 0.0;
  switch (bus) {
  case 0:
    if (key < 12) {
      tapering = -10.0;
    } else if (key < 17) {
      tapering = -7.0;
    } else if (key < 24) {
      tapering = -3.5;
    } else if (key < 36) {
      tapering = 0.0;
    } else if (key < 48) {
      tapering = 3.5;
    } else {
      tapering = 7.0;
    }
    break;
  case 1:
    if (key < 15) {
      tapering = -3.5;
    } else if (key < 38) {
      tapering = 0.0;
    } else if (key < 50) {
      tapering = 3.5;
    } else {
      tapering = 7.0;
    }
    break;
  case 2:
    if (key < 17) {
      tapering = -7.0;
    } else if (key < 22) {
      tapering = -3.5;
    } else if (key < 37) {
      tapering = 0.0;
    } else if (key < 49) {
      tapering = 3.5;
    } else {
      tapering = 7.0;
    }
    break;
  case 3:
    if (key < 17) {
      tapering = -3.5;
    } else if (key < 39) {
      tapering = 0.0;
    } else {
      tapering = -3.5;
    }
    break;
  case 4:
    if (key < 14) {
      tapering = 7.0;
    } else if (key < 20) {
      tapering = 3.5;
    } else if (key < 40) {
      tapering = 0.0;
    } else if (key < 50) {
      tapering = -3.5;
    } else {
      tapering = -7.0;
    }
    break;
  case 5:
    if (key < 12) {
      tapering = 7.0;
    } else if (key < 15) {
      tapering = 3.5;
    } else if (key < 41) {
      tapering = 0.0;
    } else if (key < 54) {
      tapering = -3.5;
    } else {
      tapering = -7.0;
    }
    break;
  case 6:
    if (key < 14) {
      tapering = 3.5;
    } else if (key < 42) {
      tapering = 0.0;
    } else if (key < 50) {
      tapering = -3.5;
    } else {
      tapering = -7.0;
    }
    break;
  case 7:
    if (key < 43) {
      tapering = 0.0;
    } else if (key < 48) {
      tapering = -3.5;
    } else {
      tapering = -7.0;
    }
    break;
  case 8:
    if (key < 43) {
      tapering = 0.0;
    } else {
      tapering = -7.0;
    }
    break;
  }
  return dBToGain(tapering);
}


x86 assembly (clang, -O0):
<taperingModel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %rax,-0x18(%rbp)
sub    $0x8,%rax
ja     152f <taperingModel+0x41f>
mov    -0x18(%rbp),%rax
lea    0xee6(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
cmpl   $0xc,-0x4(%rbp)
jge    1167 <taperingModel+0x57>
movsd  0xec3(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    11f3 <taperingModel+0xe3>
cmpl   $0x11,-0x4(%rbp)
jge    1183 <taperingModel+0x73>
movsd  0xe87(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    11ee <taperingModel+0xde>
cmpl   $0x18,-0x4(%rbp)
jge    119f <taperingModel+0x8f>
movsd  0xe73(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    11e9 <taperingModel+0xd9>
cmpl   $0x24,-0x4(%rbp)
jge    11b6 <taperingModel+0xa6>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    11e4 <taperingModel+0xd4>
cmpl   $0x30,-0x4(%rbp)
jge    11d2 <taperingModel+0xc2>
movsd  0xe48(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    11df <taperingModel+0xcf>
movsd  0xe3e(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    11e4 <taperingModel+0xd4>
jmp    11e9 <taperingModel+0xd9>
jmp    11ee <taperingModel+0xde>
jmp    11f3 <taperingModel+0xe3>
jmp    152f <taperingModel+0x41f>
cmpl   $0xf,-0x4(%rbp)
jge    1214 <taperingModel+0x104>
movsd  0xdfe(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    125e <taperingModel+0x14e>
cmpl   $0x26,-0x4(%rbp)
jge    122b <taperingModel+0x11b>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1259 <taperingModel+0x149>
cmpl   $0x32,-0x4(%rbp)
jge    1247 <taperingModel+0x137>
movsd  0xdd3(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1254 <taperingModel+0x144>
movsd  0xdc9(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1259 <taperingModel+0x149>
jmp    125e <taperingModel+0x14e>
jmp    152f <taperingModel+0x41f>
cmpl   $0x11,-0x4(%rbp)
jge    127f <taperingModel+0x16f>
movsd  0xd8b(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    12ea <taperingModel+0x1da>
cmpl   $0x16,-0x4(%rbp)
jge    129b <taperingModel+0x18b>
movsd  0xd77(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    12e5 <taperingModel+0x1d5>
cmpl   $0x25,-0x4(%rbp)
jge    12b2 <taperingModel+0x1a2>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    12e0 <taperingModel+0x1d0>
cmpl   $0x31,-0x4(%rbp)
jge    12ce <taperingModel+0x1be>
movsd  0xd4c(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    12db <taperingModel+0x1cb>
movsd  0xd42(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    12e0 <taperingModel+0x1d0>
jmp    12e5 <taperingModel+0x1d5>
jmp    12ea <taperingModel+0x1da>
jmp    152f <taperingModel+0x41f>
cmpl   $0x11,-0x4(%rbp)
jge    130b <taperingModel+0x1fb>
movsd  0xd07(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1334 <taperingModel+0x224>
cmpl   $0x27,-0x4(%rbp)
jge    1322 <taperingModel+0x212>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    132f <taperingModel+0x21f>
movsd  0xcde(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1334 <taperingModel+0x224>
jmp    152f <taperingModel+0x41f>
cmpl   $0xe,-0x4(%rbp)
jge    1355 <taperingModel+0x245>
movsd  0xccd(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    13c0 <taperingModel+0x2b0>
cmpl   $0x14,-0x4(%rbp)
jge    1371 <taperingModel+0x261>
movsd  0xca9(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    13bb <taperingModel+0x2ab>
cmpl   $0x28,-0x4(%rbp)
jge    1388 <taperingModel+0x278>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    13b6 <taperingModel+0x2a6>
cmpl   $0x32,-0x4(%rbp)
jge    13a4 <taperingModel+0x294>
movsd  0xc6e(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    13b1 <taperingModel+0x2a1>
movsd  0xc54(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    13b6 <taperingModel+0x2a6>
jmp    13bb <taperingModel+0x2ab>
jmp    13c0 <taperingModel+0x2b0>
jmp    152f <taperingModel+0x41f>
cmpl   $0xc,-0x4(%rbp)
jge    13e1 <taperingModel+0x2d1>
movsd  0xc41(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    144c <taperingModel+0x33c>
cmpl   $0xf,-0x4(%rbp)
jge    13fd <taperingModel+0x2ed>
movsd  0xc1d(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1447 <taperingModel+0x337>
cmpl   $0x29,-0x4(%rbp)
jge    1414 <taperingModel+0x304>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1442 <taperingModel+0x332>
cmpl   $0x36,-0x4(%rbp)
jge    1430 <taperingModel+0x320>
movsd  0xbe2(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    143d <taperingModel+0x32d>
movsd  0xbc8(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1442 <taperingModel+0x332>
jmp    1447 <taperingModel+0x337>
jmp    144c <taperingModel+0x33c>
jmp    152f <taperingModel+0x41f>
cmpl   $0xe,-0x4(%rbp)
jge    146d <taperingModel+0x35d>
movsd  0xbad(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    14b7 <taperingModel+0x3a7>
cmpl   $0x2a,-0x4(%rbp)
jge    1484 <taperingModel+0x374>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    14b2 <taperingModel+0x3a2>
cmpl   $0x32,-0x4(%rbp)
jge    14a0 <taperingModel+0x390>
movsd  0xb72(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    14ad <taperingModel+0x39d>
movsd  0xb58(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    14b2 <taperingModel+0x3a2>
jmp    14b7 <taperingModel+0x3a7>
jmp    152f <taperingModel+0x41f>
cmpl   $0x2b,-0x4(%rbp)
jge    14d3 <taperingModel+0x3c3>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1501 <taperingModel+0x3f1>
cmpl   $0x30,-0x4(%rbp)
jge    14ef <taperingModel+0x3df>
movsd  0xb23(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    14fc <taperingModel+0x3ec>
movsd  0xb09(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1501 <taperingModel+0x3f1>
jmp    152f <taperingModel+0x41f>
cmpl   $0x2b,-0x4(%rbp)
jge    151d <taperingModel+0x40d>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    152a <taperingModel+0x41a>
movsd  0xadb(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    152f <taperingModel+0x41f>
movsd  -0x10(%rbp),%xmm0
call   1030 <dBToGain@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<taperingModel>:
xorps  %xmm0,%xmm0
cmp    $0x8,%esi
ja     11d4 <taperingModel+0xc4>
mov    %esi,%eax
lea    0xf23(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
cmp    $0xc,%edi
jge    1200 <taperingModel+0xf0>
movsd  0xee1(%rip),%xmm0
jmp    1030 <dBToGain@plt>
cmp    $0x11,%edi
jl     1205 <taperingModel+0xf5>
cmp    $0x16,%edi
jae    1237 <taperingModel+0x127>
movsd  0xeba(%rip),%xmm0
jmp    1030 <dBToGain@plt>
cmp    $0x11,%edi
jge    11d9 <taperingModel+0xc9>
movsd  0xea8(%rip),%xmm0
jmp    1030 <dBToGain@plt>
cmp    $0xe,%edi
jge    11ee <taperingModel+0xde>
movsd  0xe8e(%rip),%xmm0
jmp    1030 <dBToGain@plt>
cmp    $0x2b,%edi
jl     11d4 <taperingModel+0xc4>
xor    %eax,%eax
cmp    $0x30,%edi
jmp    126f <taperingModel+0x15f>
cmp    $0xf,%edi
jge    1212 <taperingModel+0x102>
movsd  0xe75(%rip),%xmm0
jmp    1030 <dBToGain@plt>
cmp    $0xc,%edi
jge    121e <taperingModel+0x10e>
movsd  0xe5b(%rip),%xmm0
jmp    1030 <dBToGain@plt>
cmp    $0xe,%edi
jge    1230 <taperingModel+0x120>
movsd  0xe41(%rip),%xmm0
jmp    1030 <dBToGain@plt>
xorps  %xmm0,%xmm0
cmp    $0x2b,%edi
jge    1205 <taperingModel+0xf5>
jmp    1030 <dBToGain@plt>
xorps  %xmm0,%xmm0
cmp    $0x27,%edi
jb     11d4 <taperingModel+0xc4>
movsd  0xe2f(%rip),%xmm0
jmp    1030 <dBToGain@plt>
cmp    $0x14,%edi
jae    1243 <taperingModel+0x133>
movsd  0xe0d(%rip),%xmm0
jmp    1030 <dBToGain@plt>
cmp    $0x11,%edi
jae    124f <taperingModel+0x13f>
movsd  0xdf3(%rip),%xmm0
jmp    1030 <dBToGain@plt>
cmp    $0x26,%edi
jb     11d4 <taperingModel+0xc4>
xor    %eax,%eax
cmp    $0x32,%edi
jmp    1291 <taperingModel+0x181>
cmp    $0xf,%edi
jae    1261 <taperingModel+0x151>
movsd  0xddd(%rip),%xmm0
jmp    1030 <dBToGain@plt>
cmp    $0x2a,%edi
jb     11d4 <taperingModel+0xc4>
jmp    1248 <taperingModel+0x138>
cmp    $0x25,%edi
jb     11d4 <taperingModel+0xc4>
xor    %eax,%eax
cmp    $0x31,%edi
jmp    1291 <taperingModel+0x181>
cmp    $0x28,%edi
jb     11d4 <taperingModel+0xc4>
xor    %eax,%eax
cmp    $0x32,%edi
jmp    126f <taperingModel+0x15f>
cmp    $0x18,%edi
jae    1283 <taperingModel+0x173>
movsd  0xdbc(%rip),%xmm0
jmp    1030 <dBToGain@plt>
cmp    $0x29,%edi
jb     11d4 <taperingModel+0xc4>
xor    %eax,%eax
cmp    $0x36,%edi
setb   %al
lea    0xdaf(%rip),%rcx
movsd  (%rcx,%rax,8),%xmm0
jmp    1030 <dBToGain@plt>
cmp    $0x24,%edi
jb     11d4 <taperingModel+0xc4>
xor    %eax,%eax
cmp    $0x30,%edi
setb   %al
lea    0xd9d(%rip),%rcx
movsd  (%rcx,%rax,8),%xmm0
jmp    1030 <dBToGain@plt>

LLVM IR (-O0):
define double @taperingModel(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca double
store i32 %0, i32* %3
store i32 %1, i32* %4
store double 0.000000e+00, double* %5
%6 = load i32, i32* %4
switch i32 %6, label %156 [
i32 0, label %7
i32 1, label %33
i32 2, label %49
i32 3, label %70
i32 4, label %81
i32 5, label %102
i32 6, label %123
i32 7, label %139
i32 8, label %150
]
7: ; preds = %2
%8 = load i32, i32* %3
%9 = icmp slt i32 %8, 12
br i1 %9, label %10, label %11
10: ; preds = %7
store double -1.000000e+01, double* %5
br label %32
11: ; preds = %7
%12 = load i32, i32* %3
%13 = icmp slt i32 %12, 17
br i1 %13, label %14, label %15
14: ; preds = %11
store double -7.000000e+00, double* %5
br label %31
15: ; preds = %11
%16 = load i32, i32* %3
%17 = icmp slt i32 %16, 24
br i1 %17, label %18, label %19
18: ; preds = %15
store double -3.500000e+00, double* %5
br label %30
19: ; preds = %15
%20 = load i32, i32* %3
%21 = icmp slt i32 %20, 36
br i1 %21, label %22, label %23
22: ; preds = %19
store double 0.000000e+00, double* %5
br label %29
23: ; preds = %19
%24 = load i32, i32* %3
%25 = icmp slt i32 %24, 48
br i1 %25, label %26, label %27
26: ; preds = %23
store double 3.500000e+00, double* %5
br label %28
27: ; preds = %23
store double 7.000000e+00, double* %5
br label %28
28: ; preds = %27, %26
br label %29
29: ; preds = %28, %22
br label %30
30: ; preds = %29, %18
br label %31
31: ; preds = %30, %14
br label %32
32: ; preds = %31, %10
br label %156
33: ; preds = %2
%34 = load i32, i32* %3
%35 = icmp slt i32 %34, 15
br i1 %35, label %36, label %37
36: ; preds = %33
store double -3.500000e+00, double* %5
br label %48
37: ; preds = %33
%38 = load i32, i32* %3
%39 = icmp slt i32 %38, 38
br i1 %39, label %40, label %41
40: ; preds = %37
store double 0.000000e+00, double* %5
br label %47
41: ; preds = %37
%42 = load i32, i32* %3
%43 = icmp slt i32 %42, 50
br i1 %43, label %44, label %45
44: ; preds = %41
store double 3.500000e+00, double* %5
br label %46
45: ; preds = %41
store double 7.000000e+00, double* %5
br label %46
46: ; preds = %45, %44
br label %47
47: ; preds = %46, %40
br label %48
48: ; preds = %47, %36
br label %156
49: ; preds = %2
%50 = load i32, i32* %3
%51 = icmp slt i32 %50, 17
br i1 %51, label %52, label %53
52: ; preds = %49
store double -7.000000e+00, double* %5
br label %69
53: ; preds = %49
%54 = load i32, i32* %3
%55 = icmp slt i32 %54, 22
br i1 %55, label %56, label %57
56: ; preds = %53
store double -3.500000e+00, double* %5
br label %68
57: ; preds = %53
%58 = load i32, i32* %3
%59 = icmp slt i32 %58, 37
br i1 %59, label %60, label %61
60: ; preds = %57
store double 0.000000e+00, double* %5
br label %67
61: ; preds = %57
%62 = load i32, i32* %3
%63 = icmp slt i32 %62, 49
br i1 %63, label %64, label %65
64: ; preds = %61
store double 3.500000e+00, double* %5
br label %66
65: ; preds = %61
store double 7.000000e+00, double* %5
br label %66
66: ; preds = %65, %64
br label %67
67: ; preds = %66, %60
br label %68
68: ; preds = %67, %56
br label %69
69: ; preds = %68, %52
br label %156
70: ; preds = %2
%71 = load i32, i32* %3
%72 = icmp slt i32 %71, 17
br i1 %72, label %73, label %74
73: ; preds = %70
store double -3.500000e+00, double* %5
br label %80
74: ; preds = %70
%75 = load i32, i32* %3
%76 = icmp slt i32 %75, 39
br i1 %76, label %77, label %78
77: ; preds = %74
store double 0.000000e+00, double* %5
br label %79
78: ; preds = %74
store double -3.500000e+00, double* %5
br label %79
79: ; preds = %78, %77
br label %80
80: ; preds = %79, %73
br label %156
81: ; preds = %2
%82 = load i32, i32* %3
%83 = icmp slt i32 %82, 14
br i1 %83, label %84, label %85
84: ; preds = %81
store double 7.000000e+00, double* %5
br label %101
85: ; preds = %81
%86 = load i32, i32* %3
%87 = icmp slt i32 %86, 20
br i1 %87, label %88, label %89
88: ; preds = %85
store double 3.500000e+00, double* %5
br label %100
89: ; preds = %85
%90 = load i32, i32* %3
%91 = icmp slt i32 %90, 40
br i1 %91, label %92, label %93
92: ; preds = %89
store double 0.000000e+00, double* %5
br label %99
93: ; preds = %89
%94 = load i32, i32* %3
%95 = icmp slt i32 %94, 50
br i1 %95, label %96, label %97
96: ; preds = %93
store double -3.500000e+00, double* %5
br label %98
97: ; preds = %93
store double -7.000000e+00, double* %5
br label %98
98: ; preds = %97, %96
br label %99
99: ; preds = %98, %92
br label %100
100: ; preds = %99, %88
br label %101
101: ; preds = %100, %84
br label %156
102: ; preds = %2
%103 = load i32, i32* %3
%104 = icmp slt i32 %103, 12
br i1 %104, label %105, label %106
105: ; preds = %102
store double 7.000000e+00, double* %5
br label %122
106: ; preds = %102
%107 = load i32, i32* %3
%108 = icmp slt i32 %107, 15
br i1 %108, label %109, label %110
109: ; preds = %106
store double 3.500000e+00, double* %5
br label %121
110: ; preds = %106
%111 = load i32, i32* %3
%112 = icmp slt i32 %111, 41
br i1 %112, label %113, label %114
113: ; preds = %110
store double 0.000000e+00, double* %5
br label %120
114: ; preds = %110
%115 = load i32, i32* %3
%116 = icmp slt i32 %115, 54
br i1 %116, label %117, label %118
117: ; preds = %114
store double -3.500000e+00, double* %5
br label %119
118: ; preds = %114
store double -7.000000e+00, double* %5
br label %119
119: ; preds = %118, %117
br label %120
120: ; preds = %119, %113
br label %121
121: ; preds = %120, %109
br label %122
122: ; preds = %121, %105
br label %156
123: ; preds = %2
%124 = load i32, i32* %3
%125 = icmp slt i32 %124, 14
br i1 %125, label %126, label %127
126: ; preds = %123
store double 3.500000e+00, double* %5
br label %138
127: ; preds = %123
%128 = load i32, i32* %3
%129 = icmp slt i32 %128, 42
br i1 %129, label %130, label %131
130: ; preds = %127
store double 0.000000e+00, double* %5
br label %137
131: ; preds = %127
%132 = load i32, i32* %3
%133 = icmp slt i32 %132, 50
br i1 %133, label %134, label %135
134: ; preds = %131
store double -3.500000e+00, double* %5
br label %136
135: ; preds = %131
store double -7.000000e+00, double* %5
br label %136
136: ; preds = %135, %134
br label %137
137: ; preds = %136, %130
br label %138
138: ; preds = %137, %126
br label %156
139: ; preds = %2
%140 = load i32, i32* %3
%141 = icmp slt i32 %140, 43
br i1 %141, label %142, label %143
142: ; preds = %139
store double 0.000000e+00, double* %5
br label %149
143: ; preds = %139
%144 = load i32, i32* %3
%145 = icmp slt i32 %144, 48
br i1 %145, label %146, label %147
146: ; preds = %143
store double -3.500000e+00, double* %5
br label %148
147: ; preds = %143
store double -7.000000e+00, double* %5
br label %148
148: ; preds = %147, %146
br label %149
149: ; preds = %148, %142
br label %156
150: ; preds = %2
%151 = load i32, i32* %3
%152 = icmp slt i32 %151, 43
br i1 %152, label %153, label %154
153: ; preds = %150
store double 0.000000e+00, double* %5
br label %155
154: ; preds = %150
store double -7.000000e+00, double* %5
br label %155
155: ; preds = %154, %153
br label %156
156: ; preds = %2, %155, %149, %138, %122, %101, %80, %69, %48, %32
%157 = load double, double* %5
%158 = call double @dBToGain(double %157)
ret double %158
}

LLVM IR (-O2):
define double @taperingModel(i32 %0, i32 %1) {
switch i32 %1, label %68 [
i32 0, label %3
i32 1, label %14
i32 2, label %21
i32 3, label %30
i32 4, label %35
i32 5, label %44
i32 6, label %53
i32 7, label %60
i32 8, label %65
]
3: ; preds = %2
%4 = icmp slt i32 %0, 12
br i1 %4, label %68, label %5
5: ; preds = %3
%6 = icmp ult i32 %0, 17
br i1 %6, label %68, label %7
7: ; preds = %5
%8 = icmp ult i32 %0, 24
br i1 %8, label %68, label %9
9: ; preds = %7
%10 = icmp ult i32 %0, 36
br i1 %10, label %68, label %11
11: ; preds = %9
%12 = icmp ult i32 %0, 48
%13 = select i1 %12, double 3.500000e+00, double 7.000000e+00
br label %68
14: ; preds = %2
%15 = icmp slt i32 %0, 15
br i1 %15, label %68, label %16
16: ; preds = %14
%17 = icmp ult i32 %0, 38
br i1 %17, label %68, label %18
18: ; preds = %16
%19 = icmp ult i32 %0, 50
%20 = select i1 %19, double 3.500000e+00, double 7.000000e+00
br label %68
21: ; preds = %2
%22 = icmp slt i32 %0, 17
br i1 %22, label %68, label %23
23: ; preds = %21
%24 = icmp ult i32 %0, 22
br i1 %24, label %68, label %25
25: ; preds = %23
%26 = icmp ult i32 %0, 37
br i1 %26, label %68, label %27
27: ; preds = %25
%28 = icmp ult i32 %0, 49
%29 = select i1 %28, double 3.500000e+00, double 7.000000e+00
br label %68
30: ; preds = %2
%31 = icmp slt i32 %0, 17
br i1 %31, label %68, label %32
32: ; preds = %30
%33 = icmp ult i32 %0, 39
%34 = select i1 %33, double 0.000000e+00, double -3.500000e+00
br label %68
35: ; preds = %2
%36 = icmp slt i32 %0, 14
br i1 %36, label %68, label %37
37: ; preds = %35
%38 = icmp ult i32 %0, 20
br i1 %38, label %68, label %39
39: ; preds = %37
%40 = icmp ult i32 %0, 40
br i1 %40, label %68, label %41
41: ; preds = %39
%42 = icmp ult i32 %0, 50
%43 = select i1 %42, double -3.500000e+00, double -7.000000e+00
br label %68
44: ; preds = %2
%45 = icmp slt i32 %0, 12
br i1 %45, label %68, label %46
46: ; preds = %44
%47 = icmp ult i32 %0, 15
br i1 %47, label %68, label %48
48: ; preds = %46
%49 = icmp ult i32 %0, 41
br i1 %49, label %68, label %50
50: ; preds = %48
%51 = icmp ult i32 %0, 54
%52 = select i1 %51, double -3.500000e+00, double -7.000000e+00
br label %68
53: ; preds = %2
%54 = icmp slt i32 %0, 14
br i1 %54, label %68, label %55
55: ; preds = %53
%56 = icmp ult i32 %0, 42
br i1 %56, label %68, label %57
57: ; preds = %55
%58 = icmp ult i32 %0, 50
%59 = select i1 %58, double -3.500000e+00, double -7.000000e+00
br label %68
60: ; preds = %2
%61 = icmp slt i32 %0, 43
br i1 %61, label %68, label %62
62: ; preds = %60
%63 = icmp ult i32 %0, 48
%64 = select i1 %63, double -3.500000e+00, double -7.000000e+00
br label %68
65: ; preds = %2
%66 = icmp slt i32 %0, 43
%67 = select i1 %66, double 0.000000e+00, double -7.000000e+00
br label %68
68: ; preds = %65, %62, %60, %57, %55, %53, %50, %48, %46, %44, %41, %39, %37, %35, %32, %30, %27, %25, %23, %21, %18, %16, %14, %11, %9, %7, %5, %3, %2
%69 = phi double [ 0.000000e+00, %2 ], [ -1.000000e+01, %3 ], [ -7.000000e+00, %5 ], [ -3.500000e+00, %7 ], [ 0.000000e+00, %9 ], [ %13, %11 ], [ -3.500000e+00, %14 ], [ 0.000000e+00, %16 ], [ %20, %18 ], [ -7.000000e+00, %21 ], [ -3.500000e+00, %23 ], [ 0.000000e+00, %25 ], [ %29, %27 ], [ -3.500000e+00, %30 ], [ %34, %32 ], [ 7.000000e+00, %35 ], [ 3.500000e+00, %37 ], [ 0.000000e+00, %39 ], [ %43, %41 ], [ 7.000000e+00, %44 ], [ 3.500000e+00, %46 ], [ 0.000000e+00, %48 ], [ %52, %50 ], [ 3.500000e+00, %53 ], [ 0.000000e+00, %55 ], [ %59, %57 ], [ 0.000000e+00, %60 ], [ %64, %62 ], [ %67, %65 ]
%70 = tail call double @dBToGain(double %69)
ret double %70
}