#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 */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ mp_msg_c(int, char *);
int cue_mode_2_sector_size(int mode) {
  switch (mode) {
  case 0:
    return 0;
  case 10:
    return 2352;
  case 30:
    return 2048;
  case 20:
    return 2352;
  case 40:
    return 2336;
  default:
    mp_msg_c(
        ((16) << 8) | (0),
        "[bincue] unknown mode for binfile. should not happen. aborting\n");
    abort();
  }
}


x86 assembly (clang, -O0):
<cue_mode_2_sector_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %rax,-0x10(%rbp)
sub    $0x28,%rax
ja     118c <cue_mode_2_sector_size+0x6c>
mov    -0x10(%rbp),%rax
lea    0xeb9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x0,-0x4(%rbp)
jmp    11a4 <cue_mode_2_sector_size+0x84>
movl   $0x930,-0x4(%rbp)
jmp    11a4 <cue_mode_2_sector_size+0x84>
movl   $0x800,-0x4(%rbp)
jmp    11a4 <cue_mode_2_sector_size+0x84>
movl   $0x930,-0x4(%rbp)
jmp    11a4 <cue_mode_2_sector_size+0x84>
movl   $0x920,-0x4(%rbp)
jmp    11a4 <cue_mode_2_sector_size+0x84>
mov    $0x1000,%edi
lea    0xf0c(%rip),%rsi
call   1040 <mp_msg_c@plt>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cue_mode_2_sector_size>:
push   %rax
cmp    $0x28,%edi
ja     114f <cue_mode_2_sector_size+0x2f>
mov    %edi,%eax
lea    0xed1(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0x930,%edi
jmp    114b <cue_mode_2_sector_size+0x2b>
mov    $0x800,%edi
jmp    114b <cue_mode_2_sector_size+0x2b>
mov    $0x920,%edi
mov    %edi,%eax
pop    %rcx
ret
lea    0xf4e(%rip),%rsi
mov    $0x1000,%edi
call   1040 <mp_msg_c@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@.str = [64 x i8] c"[bincue] unknown mode for binfile. should not happen. aborting\0A\00"
define i32 @cue_mode_2_sector_size(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %10 [
i32 0, label %5
i32 10, label %6
i32 30, label %7
i32 20, label %8
i32 40, label %9
]
5: ; preds = %1
store i32 0, i32* %2
br label %13
6: ; preds = %1
store i32 2352, i32* %2
br label %13
7: ; preds = %1
store i32 2048, i32* %2
br label %13
8: ; preds = %1
store i32 2352, i32* %2
br label %13
9: ; preds = %1
store i32 2336, i32* %2
br label %13
10: ; preds = %1
%11 = call i32 @mp_msg_c(i32 4096, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str, i64 0, i64 0))
%12 = call i32 (...) @abort()
unreachable
13: ; preds = %9, %8, %7, %6, %5
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
@.str = [64 x i8] c"[bincue] unknown mode for binfile. should not happen. aborting\0A\00"
define i32 @cue_mode_2_sector_size(i32 %0) {
switch i32 %0, label %6 [
i32 0, label %9
i32 10, label %2
i32 30, label %3
i32 20, label %4
i32 40, label %5
]
2: ; preds = %1
br label %9
3: ; preds = %1
br label %9
4: ; preds = %1
br label %9
5: ; preds = %1
br label %9
6: ; preds = %1
%7 = tail call i32 @mp_msg_c(i32 4096, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 (...) @abort()
unreachable
9: ; preds = %1, %5, %4, %3, %2
%10 = phi i32 [ 2336, %5 ], [ 2352, %4 ], [ 2048, %3 ], [ 2352, %2 ], [ %0, %1 ]
ret i32 %10
}