int calc_map_type(int h_sum) {
  if (h_sum < 3)
    return 0;
  else if (h_sum < 384)
    return 5;
  else if (h_sum < 416)
    return 6;
  else if (h_sum < 448)
    return 11;
  else if (h_sum < 480)
    return 12;
  else if (h_sum < 528)
    return 13;
  else if (h_sum < 560)
    return 14;
  return 15;
}


x86 assembly (clang, -O0):
<calc_map_type>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x3,-0x8(%rbp)
jge    111d <calc_map_type+0x1d>
movl   $0x0,-0x4(%rbp)
jmp    11d8 <calc_map_type+0xd8>
cmpl   $0x180,-0x8(%rbp)
jge    1136 <calc_map_type+0x36>
movl   $0x5,-0x4(%rbp)
jmp    11d8 <calc_map_type+0xd8>
cmpl   $0x1a0,-0x8(%rbp)
jge    114f <calc_map_type+0x4f>
movl   $0x6,-0x4(%rbp)
jmp    11d8 <calc_map_type+0xd8>
cmpl   $0x1c0,-0x8(%rbp)
jge    1168 <calc_map_type+0x68>
movl   $0xb,-0x4(%rbp)
jmp    11d8 <calc_map_type+0xd8>
cmpl   $0x1e0,-0x8(%rbp)
jge    1181 <calc_map_type+0x81>
movl   $0xc,-0x4(%rbp)
jmp    11d8 <calc_map_type+0xd8>
cmpl   $0x210,-0x8(%rbp)
jge    119a <calc_map_type+0x9a>
movl   $0xd,-0x4(%rbp)
jmp    11d8 <calc_map_type+0xd8>
cmpl   $0x230,-0x8(%rbp)
jge    11b3 <calc_map_type+0xb3>
movl   $0xe,-0x4(%rbp)
jmp    11d8 <calc_map_type+0xd8>
jmp    11b8 <calc_map_type+0xb8>
jmp    11bd <calc_map_type+0xbd>
jmp    11c2 <calc_map_type+0xc2>
jmp    11c7 <calc_map_type+0xc7>
jmp    11cc <calc_map_type+0xcc>
jmp    11d1 <calc_map_type+0xd1>
movl   $0xf,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<calc_map_type>:
xor    %eax,%eax
cmp    $0x3,%edi
jl     1156 <calc_map_type+0x56>
mov    $0x5,%eax
cmp    $0x180,%edi
jb     1156 <calc_map_type+0x56>
mov    $0x6,%eax
cmp    $0x1a0,%edi
jb     1156 <calc_map_type+0x56>
mov    $0xb,%eax
cmp    $0x1c0,%edi
jb     1156 <calc_map_type+0x56>
mov    $0xc,%eax
cmp    $0x1e0,%edi
jb     1156 <calc_map_type+0x56>
mov    $0xd,%eax
cmp    $0x210,%edi
jb     1156 <calc_map_type+0x56>
cmp    $0x230,%edi
mov    $0xf,%eax
sbb    $0x0,%eax
ret

LLVM IR (-O0):
define i32 @calc_map_type(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, 3
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 0, i32* %2
br label %38
7: ; preds = %1
%8 = load i32, i32* %3
%9 = icmp slt i32 %8, 384
br i1 %9, label %10, label %11
10: ; preds = %7
store i32 5, i32* %2
br label %38
11: ; preds = %7
%12 = load i32, i32* %3
%13 = icmp slt i32 %12, 416
br i1 %13, label %14, label %15
14: ; preds = %11
store i32 6, i32* %2
br label %38
15: ; preds = %11
%16 = load i32, i32* %3
%17 = icmp slt i32 %16, 448
br i1 %17, label %18, label %19
18: ; preds = %15
store i32 11, i32* %2
br label %38
19: ; preds = %15
%20 = load i32, i32* %3
%21 = icmp slt i32 %20, 480
br i1 %21, label %22, label %23
22: ; preds = %19
store i32 12, i32* %2
br label %38
23: ; preds = %19
%24 = load i32, i32* %3
%25 = icmp slt i32 %24, 528
br i1 %25, label %26, label %27
26: ; preds = %23
store i32 13, i32* %2
br label %38
27: ; preds = %23
%28 = load i32, i32* %3
%29 = icmp slt i32 %28, 560
br i1 %29, label %30, label %31
30: ; preds = %27
store i32 14, i32* %2
br label %38
31: ; preds = %27
br label %32
32: ; preds = %31
br label %33
33: ; preds = %32
br label %34
34: ; preds = %33
br label %35
35: ; preds = %34
br label %36
36: ; preds = %35
br label %37
37: ; preds = %36
store i32 15, i32* %2
br label %38
38: ; preds = %37, %30, %26, %22, %18, %14, %10, %6
%39 = load i32, i32* %2
ret i32 %39
}

LLVM IR (-O2):
define i32 @calc_map_type(i32 %0) {
%2 = icmp slt i32 %0, 3
br i1 %2, label %16, label %3
3: ; preds = %1
%4 = icmp ult i32 %0, 384
br i1 %4, label %16, label %5
5: ; preds = %3
%6 = icmp ult i32 %0, 416
br i1 %6, label %16, label %7
7: ; preds = %5
%8 = icmp ult i32 %0, 448
br i1 %8, label %16, label %9
9: ; preds = %7
%10 = icmp ult i32 %0, 480
br i1 %10, label %16, label %11
11: ; preds = %9
%12 = icmp ult i32 %0, 528
br i1 %12, label %16, label %13
13: ; preds = %11
%14 = icmp ult i32 %0, 560
%15 = select i1 %14, i32 14, i32 15
br label %16
16: ; preds = %13, %11, %9, %7, %5, %3, %1
%17 = phi i32 [ 0, %1 ], [ 5, %3 ], [ 6, %5 ], [ 11, %7 ], [ 12, %9 ], [ 13, %11 ], [ %15, %13 ]
ret i32 %17
}