#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 */
typedef int uint8_t;

/* Variables and functions */
float sup_frame_rate_by_id(uint8_t frame_rate_id) {
  switch (frame_rate_id) {
  case 0x10:
    return 24000.0 / 1001;
  case 0x20:
    return 24.0;
  case 0x30:
    return 25.0;
  case 0x40:
    return 30000.0 / 1001;
  case 0x60:
    return 50.0;
  case 0x70:
    return 60000.0 / 1001;
  default:
    return 0.0;
  }
}


x86 assembly (clang, -O0):
<sup_frame_rate_by_id>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x10,%eax
je     1170 <sup_frame_rate_by_id+0x70>
jmp    111b <sup_frame_rate_by_id+0x1b>
mov    -0xc(%rbp),%eax
sub    $0x20,%eax
je     1182 <sup_frame_rate_by_id+0x82>
jmp    112c <sup_frame_rate_by_id+0x2c>
mov    -0xc(%rbp),%eax
sub    $0x30,%eax
je     1194 <sup_frame_rate_by_id+0x94>
jmp    113d <sup_frame_rate_by_id+0x3d>
mov    -0xc(%rbp),%eax
sub    $0x40,%eax
je     11a6 <sup_frame_rate_by_id+0xa6>
jmp    114e <sup_frame_rate_by_id+0x4e>
mov    -0xc(%rbp),%eax
sub    $0x60,%eax
je     11b8 <sup_frame_rate_by_id+0xb8>
jmp    115f <sup_frame_rate_by_id+0x5f>
mov    -0xc(%rbp),%eax
sub    $0x70,%eax
je     11ca <sup_frame_rate_by_id+0xca>
jmp    11dc <sup_frame_rate_by_id+0xdc>
movss  0xe9c(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    11e4 <sup_frame_rate_by_id+0xe4>
movss  0xe86(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    11e4 <sup_frame_rate_by_id+0xe4>
movss  0xe70(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    11e4 <sup_frame_rate_by_id+0xe4>
movss  0xe5a(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    11e4 <sup_frame_rate_by_id+0xe4>
movss  0xe44(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    11e4 <sup_frame_rate_by_id+0xe4>
movss  0xe2e(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    11e4 <sup_frame_rate_by_id+0xe4>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<sup_frame_rate_by_id>:
add    $0xfffffff0,%edi
rol    $0x1c,%edi
xorps  %xmm0,%xmm0
cmp    $0x6,%edi
ja     111d <sup_frame_rate_by_id+0x1d>
movslq %edi,%rax
lea    0xee8(%rip),%rcx
movss  (%rcx,%rax,4),%xmm0
ret

LLVM IR (-O0):
define float @sup_frame_rate_by_id(i32 %0) {
%2 = alloca float
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %11 [
i32 16, label %5
i32 32, label %6
i32 48, label %7
i32 64, label %8
i32 96, label %9
i32 112, label %10
]
5: ; preds = %1
store float 0x4037F9DCC0000000, float* %2
br label %12
6: ; preds = %1
store float 2.400000e+01, float* %2
br label %12
7: ; preds = %1
store float 2.500000e+01, float* %2
br label %12
8: ; preds = %1
store float 0x403DF853E0000000, float* %2
br label %12
9: ; preds = %1
store float 5.000000e+01, float* %2
br label %12
10: ; preds = %1
store float 0x404DF853E0000000, float* %2
br label %12
11: ; preds = %1
store float 0.000000e+00, float* %2
br label %12
12: ; preds = %11, %10, %9, %8, %7, %6, %5
%13 = load float, float* %2
ret float %13
}

LLVM IR (-O2):
@switch.table.sup_frame_rate_by_id = [7 x float] [float 0x4037F9DCC0000000, float 2.400000e+01, float 2.500000e+01, float 0x403DF853E0000000, float 0.000000e+00, float 5.000000e+01, float 0x404DF853E0000000]
define float @sup_frame_rate_by_id(i32 %0) {
%2 = add i32 %0, -16
%3 = tail call i32 @llvm.fshl.i32(i32 %2, i32 %2, i32 28)
%4 = icmp ult i32 %3, 7
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = sext i32 %3 to i64
%7 = getelementptr inbounds [7 x float], [7 x float]* @switch.table.sup_frame_rate_by_id, i64 0, i64 %6
%8 = load float, float* %7
br label %9
9: ; preds = %1, %5
%10 = phi float [ %8, %5 ], [ 0.000000e+00, %1 ]
ret float %10
}