#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 uint32_t;

/* Variables and functions */
uint32_t GetT55xxClockBit(uint32_t clock) {
  switch (clock) {
  case 128:
    return 0x001C0000;
  case 100:
    return 0x00180000;
  case 64:
    return 0x00140000;
  case 50:
    return 0x00100000;
  case 40:
    return 0x000C0000;
  case 32:
    return 0x00080000;
  case 16:
    return 0x00040000;
  case 8:
    return 0;
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<GetT55xxClockBit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x8,%eax
je     11e8 <GetT55xxClockBit+0xe8>
jmp    111b <GetT55xxClockBit+0x1b>
mov    -0xc(%rbp),%eax
sub    $0x10,%eax
je     11dc <GetT55xxClockBit+0xdc>
jmp    112c <GetT55xxClockBit+0x2c>
mov    -0xc(%rbp),%eax
sub    $0x20,%eax
je     11d0 <GetT55xxClockBit+0xd0>
jmp    113d <GetT55xxClockBit+0x3d>
mov    -0xc(%rbp),%eax
sub    $0x28,%eax
je     11c4 <GetT55xxClockBit+0xc4>
jmp    114e <GetT55xxClockBit+0x4e>
mov    -0xc(%rbp),%eax
sub    $0x32,%eax
je     11b8 <GetT55xxClockBit+0xb8>
jmp    115f <GetT55xxClockBit+0x5f>
mov    -0xc(%rbp),%eax
sub    $0x40,%eax
je     11ac <GetT55xxClockBit+0xac>
jmp    1170 <GetT55xxClockBit+0x70>
mov    -0xc(%rbp),%eax
sub    $0x64,%eax
je     11a0 <GetT55xxClockBit+0xa0>
jmp    1181 <GetT55xxClockBit+0x81>
mov    -0xc(%rbp),%eax
sub    $0x80,%eax
jne    11f4 <GetT55xxClockBit+0xf4>
jmp    1194 <GetT55xxClockBit+0x94>
movl   $0x1c0000,-0x4(%rbp)
jmp    11fb <GetT55xxClockBit+0xfb>
movl   $0x180000,-0x4(%rbp)
jmp    11fb <GetT55xxClockBit+0xfb>
movl   $0x140000,-0x4(%rbp)
jmp    11fb <GetT55xxClockBit+0xfb>
movl   $0x100000,-0x4(%rbp)
jmp    11fb <GetT55xxClockBit+0xfb>
movl   $0xc0000,-0x4(%rbp)
jmp    11fb <GetT55xxClockBit+0xfb>
movl   $0x80000,-0x4(%rbp)
jmp    11fb <GetT55xxClockBit+0xfb>
movl   $0x40000,-0x4(%rbp)
jmp    11fb <GetT55xxClockBit+0xfb>
movl   $0x0,-0x4(%rbp)
jmp    11fb <GetT55xxClockBit+0xfb>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetT55xxClockBit>:
lea    -0x8(%rdi),%eax
cmp    $0x38,%eax
ja     111e <GetT55xxClockBit+0x1e>
lea    0xef1(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0x40000,%eax
ret
cmp    $0x80,%edi
je     114c <GetT55xxClockBit+0x4c>
cmp    $0x64,%edi
jne    1131 <GetT55xxClockBit+0x31>
mov    $0x180000,%eax
ret
xor    %eax,%eax
ret
mov    $0x80000,%eax
ret
mov    $0xc0000,%eax
ret
mov    $0x100000,%eax
ret
mov    $0x140000,%eax
ret
mov    $0x1c0000,%eax
ret

LLVM IR (-O0):
define i32 @GetT55xxClockBit(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %13 [
i32 128, label %5
i32 100, label %6
i32 64, label %7
i32 50, label %8
i32 40, label %9
i32 32, label %10
i32 16, label %11
i32 8, label %12
]
5: ; preds = %1
store i32 1835008, i32* %2
br label %14
6: ; preds = %1
store i32 1572864, i32* %2
br label %14
7: ; preds = %1
store i32 1310720, i32* %2
br label %14
8: ; preds = %1
store i32 1048576, i32* %2
br label %14
9: ; preds = %1
store i32 786432, i32* %2
br label %14
10: ; preds = %1
store i32 524288, i32* %2
br label %14
11: ; preds = %1
store i32 262144, i32* %2
br label %14
12: ; preds = %1
store i32 0, i32* %2
br label %14
13: ; preds = %1
store i32 0, i32* %2
br label %14
14: ; preds = %13, %12, %11, %10, %9, %8, %7, %6, %5
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @GetT55xxClockBit(i32 %0) {
switch i32 %0, label %9 [
i32 128, label %10
i32 100, label %2
i32 64, label %3
i32 50, label %4
i32 40, label %5
i32 32, label %6
i32 16, label %7
i32 8, label %8
]
2: ; preds = %1
br label %10
3: ; preds = %1
br label %10
4: ; preds = %1
br label %10
5: ; preds = %1
br label %10
6: ; preds = %1
br label %10
7: ; preds = %1
br label %10
8: ; preds = %1
br label %10
9: ; preds = %1
br label %10
10: ; preds = %1, %9, %8, %7, %6, %5, %4, %3, %2
%11 = phi i32 [ 0, %9 ], [ 0, %8 ], [ 262144, %7 ], [ 524288, %6 ], [ 786432, %5 ], [ 1048576, %4 ], [ 1310720, %3 ], [ 1572864, %2 ], [ 1835008, %1 ]
ret i32 %11
}