int GetSRIndex(unsigned int sampleRate) {
  if (92017 <= sampleRate)
    return 0;
  if (75132 <= sampleRate)
    return 1;
  if (55426 <= sampleRate)
    return 2;
  if (46009 <= sampleRate)
    return 3;
  if (37566 <= sampleRate)
    return 4;
  if (27713 <= sampleRate)
    return 5;
  if (23004 <= sampleRate)
    return 6;
  if (18783 <= sampleRate)
    return 7;
  if (13856 <= sampleRate)
    return 8;
  if (11502 <= sampleRate)
    return 9;
  if (9391 <= sampleRate)
    return 10;
  return 11;
}


x86 assembly (clang, -O0):
<GetSRIndex>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    $0x16771,%eax
cmp    -0x8(%rbp),%eax
ja     1121 <GetSRIndex+0x21>
movl   $0x0,-0x4(%rbp)
jmp    122c <GetSRIndex+0x12c>
mov    $0x1257c,%eax
cmp    -0x8(%rbp),%eax
ja     113b <GetSRIndex+0x3b>
movl   $0x1,-0x4(%rbp)
jmp    122c <GetSRIndex+0x12c>
mov    $0xd882,%eax
cmp    -0x8(%rbp),%eax
ja     1155 <GetSRIndex+0x55>
movl   $0x2,-0x4(%rbp)
jmp    122c <GetSRIndex+0x12c>
mov    $0xb3b9,%eax
cmp    -0x8(%rbp),%eax
ja     116f <GetSRIndex+0x6f>
movl   $0x3,-0x4(%rbp)
jmp    122c <GetSRIndex+0x12c>
mov    $0x92be,%eax
cmp    -0x8(%rbp),%eax
ja     1189 <GetSRIndex+0x89>
movl   $0x4,-0x4(%rbp)
jmp    122c <GetSRIndex+0x12c>
mov    $0x6c41,%eax
cmp    -0x8(%rbp),%eax
ja     11a3 <GetSRIndex+0xa3>
movl   $0x5,-0x4(%rbp)
jmp    122c <GetSRIndex+0x12c>
mov    $0x59dc,%eax
cmp    -0x8(%rbp),%eax
ja     11bd <GetSRIndex+0xbd>
movl   $0x6,-0x4(%rbp)
jmp    122c <GetSRIndex+0x12c>
mov    $0x495f,%eax
cmp    -0x8(%rbp),%eax
ja     11d7 <GetSRIndex+0xd7>
movl   $0x7,-0x4(%rbp)
jmp    122c <GetSRIndex+0x12c>
mov    $0x3620,%eax
cmp    -0x8(%rbp),%eax
ja     11f1 <GetSRIndex+0xf1>
movl   $0x8,-0x4(%rbp)
jmp    122c <GetSRIndex+0x12c>
mov    $0x2cee,%eax
cmp    -0x8(%rbp),%eax
ja     120b <GetSRIndex+0x10b>
movl   $0x9,-0x4(%rbp)
jmp    122c <GetSRIndex+0x12c>
mov    $0x24af,%eax
cmp    -0x8(%rbp),%eax
ja     1225 <GetSRIndex+0x125>
movl   $0xa,-0x4(%rbp)
jmp    122c <GetSRIndex+0x12c>
movl   $0xb,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetSRIndex>:
xor    %eax,%eax
cmp    $0x16770,%edi
ja     1191 <GetSRIndex+0x91>
mov    $0x1,%eax
cmp    $0x1257b,%edi
ja     1191 <GetSRIndex+0x91>
mov    $0x2,%eax
cmp    $0xd881,%edi
ja     1191 <GetSRIndex+0x91>
mov    $0x3,%eax
cmp    $0xb3b8,%edi
ja     1191 <GetSRIndex+0x91>
mov    $0x4,%eax
cmp    $0x92bd,%edi
ja     1191 <GetSRIndex+0x91>
mov    $0x5,%eax
cmp    $0x6c40,%edi
ja     1191 <GetSRIndex+0x91>
mov    $0x6,%eax
cmp    $0x59db,%edi
ja     1191 <GetSRIndex+0x91>
mov    $0x7,%eax
cmp    $0x495e,%edi
ja     1191 <GetSRIndex+0x91>
mov    $0x8,%eax
cmp    $0x361f,%edi
ja     1191 <GetSRIndex+0x91>
mov    $0x9,%eax
cmp    $0x2ced,%edi
ja     1191 <GetSRIndex+0x91>
cmp    $0x24af,%edi
mov    $0xb,%eax
adc    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @GetSRIndex(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp ule i32 92017, %4
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 0, i32* %2
br label %48
7: ; preds = %1
%8 = load i32, i32* %3
%9 = icmp ule i32 75132, %8
br i1 %9, label %10, label %11
10: ; preds = %7
store i32 1, i32* %2
br label %48
11: ; preds = %7
%12 = load i32, i32* %3
%13 = icmp ule i32 55426, %12
br i1 %13, label %14, label %15
14: ; preds = %11
store i32 2, i32* %2
br label %48
15: ; preds = %11
%16 = load i32, i32* %3
%17 = icmp ule i32 46009, %16
br i1 %17, label %18, label %19
18: ; preds = %15
store i32 3, i32* %2
br label %48
19: ; preds = %15
%20 = load i32, i32* %3
%21 = icmp ule i32 37566, %20
br i1 %21, label %22, label %23
22: ; preds = %19
store i32 4, i32* %2
br label %48
23: ; preds = %19
%24 = load i32, i32* %3
%25 = icmp ule i32 27713, %24
br i1 %25, label %26, label %27
26: ; preds = %23
store i32 5, i32* %2
br label %48
27: ; preds = %23
%28 = load i32, i32* %3
%29 = icmp ule i32 23004, %28
br i1 %29, label %30, label %31
30: ; preds = %27
store i32 6, i32* %2
br label %48
31: ; preds = %27
%32 = load i32, i32* %3
%33 = icmp ule i32 18783, %32
br i1 %33, label %34, label %35
34: ; preds = %31
store i32 7, i32* %2
br label %48
35: ; preds = %31
%36 = load i32, i32* %3
%37 = icmp ule i32 13856, %36
br i1 %37, label %38, label %39
38: ; preds = %35
store i32 8, i32* %2
br label %48
39: ; preds = %35
%40 = load i32, i32* %3
%41 = icmp ule i32 11502, %40
br i1 %41, label %42, label %43
42: ; preds = %39
store i32 9, i32* %2
br label %48
43: ; preds = %39
%44 = load i32, i32* %3
%45 = icmp ule i32 9391, %44
br i1 %45, label %46, label %47
46: ; preds = %43
store i32 10, i32* %2
br label %48
47: ; preds = %43
store i32 11, i32* %2
br label %48
48: ; preds = %47, %46, %42, %38, %34, %30, %26, %22, %18, %14, %10, %6
%49 = load i32, i32* %2
ret i32 %49
}

LLVM IR (-O2):
define i32 @GetSRIndex(i32 %0) {
%2 = icmp ugt i32 %0, 92016
br i1 %2, label %24, label %3
3: ; preds = %1
%4 = icmp ugt i32 %0, 75131
br i1 %4, label %24, label %5
5: ; preds = %3
%6 = icmp ugt i32 %0, 55425
br i1 %6, label %24, label %7
7: ; preds = %5
%8 = icmp ugt i32 %0, 46008
br i1 %8, label %24, label %9
9: ; preds = %7
%10 = icmp ugt i32 %0, 37565
br i1 %10, label %24, label %11
11: ; preds = %9
%12 = icmp ugt i32 %0, 27712
br i1 %12, label %24, label %13
13: ; preds = %11
%14 = icmp ugt i32 %0, 23003
br i1 %14, label %24, label %15
15: ; preds = %13
%16 = icmp ugt i32 %0, 18782
br i1 %16, label %24, label %17
17: ; preds = %15
%18 = icmp ugt i32 %0, 13855
br i1 %18, label %24, label %19
19: ; preds = %17
%20 = icmp ugt i32 %0, 11501
br i1 %20, label %24, label %21
21: ; preds = %19
%22 = icmp ugt i32 %0, 9390
%23 = select i1 %22, i32 10, i32 11
br label %24
24: ; preds = %21, %19, %17, %15, %13, %11, %9, %7, %5, %3, %1
%25 = phi i32 [ 0, %1 ], [ 1, %3 ], [ 2, %5 ], [ 3, %7 ], [ 4, %9 ], [ 5, %11 ], [ 6, %13 ], [ 7, %15 ], [ 8, %17 ], [ 9, %19 ], [ %23, %21 ]
ret i32 %25
}