unsigned long long pgm_get_volume(unsigned int _modulation) {
  switch (_modulation) {
  case 1:
    return (1ULL << 1);
    break;
  case 2:
    return (1ULL << 1);
    break;
  case 3:
    return (1ULL << 1);
    break;
  case 4:
    return (1ULL << 2);
    break;
  case 5:
    return (1ULL << 3);
    break;
  case 6:
    return (1ULL << 4);
    break;
  case 7:
    return (1ULL << 5);
    break;
  case 8:
    return (1ULL << 6);
    break;
  case 9:
    return (1ULL << 8);
    break;
  case 10:
    return (1ULL << 10);
    break;
  case 11:
    return (1ULL << 12);
    break;
  case 12:
    return (1ULL << 4);
    break;
  case 13:
    return (1ULL << 5);
    break;
  case 14:
    return (1ULL << 6);
    break;
  case 15:
    return (1ULL << 8);
    break;
  case 16:
    return (1ULL << 10);
    break;
  case 17:
    return (1ULL << 12);
    break;
  default:
    __pgp_switch_default(__func__,
                         "/scratch/repos/new/home/jordi_armengol_estape/"
                         "c-scraper/outputs/2022-01-22/02-19-57/repos/pfactum/"
                         "pegasus/refs/heads/master/pegasus_modulation.c",
                         340);
    return 0;
    break;
  }
}


x86 assembly (clang, -O0):
<pgm_get_volume>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x10,%eax
ja     1221 <pgm_get_volume+0x111>
mov    -0x18(%rbp),%rax
lea    0xec5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movq   $0x2,-0x8(%rbp)
jmp    1243 <pgm_get_volume+0x133>
movq   $0x2,-0x8(%rbp)
jmp    1243 <pgm_get_volume+0x133>
movq   $0x2,-0x8(%rbp)
jmp    1243 <pgm_get_volume+0x133>
movq   $0x4,-0x8(%rbp)
jmp    1243 <pgm_get_volume+0x133>
movq   $0x8,-0x8(%rbp)
jmp    1243 <pgm_get_volume+0x133>
movq   $0x10,-0x8(%rbp)
jmp    1243 <pgm_get_volume+0x133>
movq   $0x20,-0x8(%rbp)
jmp    1243 <pgm_get_volume+0x133>
movq   $0x40,-0x8(%rbp)
jmp    1243 <pgm_get_volume+0x133>
movq   $0x100,-0x8(%rbp)
jmp    1243 <pgm_get_volume+0x133>
movq   $0x400,-0x8(%rbp)
jmp    1243 <pgm_get_volume+0x133>
movq   $0x1000,-0x8(%rbp)
jmp    1243 <pgm_get_volume+0x133>
movq   $0x10,-0x8(%rbp)
jmp    1243 <pgm_get_volume+0x133>
movq   $0x20,-0x8(%rbp)
jmp    1243 <pgm_get_volume+0x133>
movq   $0x40,-0x8(%rbp)
jmp    1243 <pgm_get_volume+0x133>
movq   $0x100,-0x8(%rbp)
jmp    1243 <pgm_get_volume+0x133>
movq   $0x400,-0x8(%rbp)
jmp    1243 <pgm_get_volume+0x133>
movq   $0x1000,-0x8(%rbp)
jmp    1243 <pgm_get_volume+0x133>
lea    0xe1c(%rip),%rdi
lea    0xe24(%rip),%rsi
mov    $0x154,%edx
mov    $0x0,%al
call   1030 <__pgp_switch_default@plt>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pgm_get_volume>:
push   %rbx
add    $0xffffffff,%edi
cmp    $0x11,%edi
jae    1129 <pgm_get_volume+0x19>
movslq %edi,%rax
lea    0xf7d(%rip),%rcx
mov    (%rcx,%rax,8),%rbx
jmp    1145 <pgm_get_volume+0x35>
lea    0xed0(%rip),%rdi
lea    0xed8(%rip),%rsi
xor    %ebx,%ebx
mov    $0x154,%edx
xor    %eax,%eax
call   1030 <__pgp_switch_default@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@__func__.pgm_get_volume = [15 x i8] c"pgm_get_volume\00"
@.str = [145 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/pfactum/pegasus/refs/heads/master/pegasus_modulation.c\00"
define i64 @pgm_get_volume(i32 %0) {
%2 = alloca i64
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %22 [
i32 1, label %5
i32 2, label %6
i32 3, label %7
i32 4, label %8
i32 5, label %9
i32 6, label %10
i32 7, label %11
i32 8, label %12
i32 9, label %13
i32 10, label %14
i32 11, label %15
i32 12, label %16
i32 13, label %17
i32 14, label %18
i32 15, label %19
i32 16, label %20
i32 17, label %21
]
5: ; preds = %1
store i64 2, i64* %2
br label %24
6: ; preds = %1
store i64 2, i64* %2
br label %24
7: ; preds = %1
store i64 2, i64* %2
br label %24
8: ; preds = %1
store i64 4, i64* %2
br label %24
9: ; preds = %1
store i64 8, i64* %2
br label %24
10: ; preds = %1
store i64 16, i64* %2
br label %24
11: ; preds = %1
store i64 32, i64* %2
br label %24
12: ; preds = %1
store i64 64, i64* %2
br label %24
13: ; preds = %1
store i64 256, i64* %2
br label %24
14: ; preds = %1
store i64 1024, i64* %2
br label %24
15: ; preds = %1
store i64 4096, i64* %2
br label %24
16: ; preds = %1
store i64 16, i64* %2
br label %24
17: ; preds = %1
store i64 32, i64* %2
br label %24
18: ; preds = %1
store i64 64, i64* %2
br label %24
19: ; preds = %1
store i64 256, i64* %2
br label %24
20: ; preds = %1
store i64 1024, i64* %2
br label %24
21: ; preds = %1
store i64 4096, i64* %2
br label %24
22: ; preds = %1
%23 = call i32 (i8*, i8*, i32, ...) bitcast (i32 (...)* @__pgp_switch_default to i32 (i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__func__.pgm_get_volume, i64 0, i64 0), i8* getelementptr inbounds ([145 x i8], [145 x i8]* @.str, i64 0, i64 0), i32 340)
store i64 0, i64* %2
br label %24
24: ; preds = %22, %21, %20, %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5
%25 = load i64, i64* %2
ret i64 %25
}

LLVM IR (-O2):
@__func__.pgm_get_volume = [15 x i8] c"pgm_get_volume\00"
@.str = [145 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/pfactum/pegasus/refs/heads/master/pegasus_modulation.c\00"
@switch.table.pgm_get_volume = [17 x i64] [i64 2, i64 2, i64 2, i64 4, i64 8, i64 16, i64 32, i64 64, i64 256, i64 1024, i64 4096, i64 16, i64 32, i64 64, i64 256, i64 1024, i64 4096]
define i64 @pgm_get_volume(i32 %0) {
%2 = add i32 %0, -1
%3 = icmp ult i32 %2, 17
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 (i8*, i8*, i32, ...) bitcast (i32 (...)* @__pgp_switch_default to i32 (i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__func__.pgm_get_volume, i64 0, i64 0), i8* getelementptr inbounds ([145 x i8], [145 x i8]* @.str, i64 0, i64 0), i32 340)
br label %10
6: ; preds = %1
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds [17 x i64], [17 x i64]* @switch.table.pgm_get_volume, i64 0, i64 %7
%9 = load i64, i64* %8
br label %10
10: ; preds = %6, %4
%11 = phi i64 [ 0, %4 ], [ %9, %6 ]
ret i64 %11
}