#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 */
int B1000000;
int B115200;
int B1152000;
int B1200;
int B1500000;
int B19200;
int B2000000;
int B230400;
int B2400;
int B2500000;
int B3000000;
int B3500000;
int B38400;
int B4000000;
int B460800;
int B4800;
int B500000;
int B57600;
int B576000;
int B921600;
int B9600;
uint32_t librpip_uart_config_convert_l2b(uint32_t baud) {
  switch (baud) {
  case 1200:
    return B1200;
    break;
  case 2400:
    return B2400;
    break;
  case 4800:
    return B4800;
    break;
  case 9600:
    return B9600;
    break;
  case 19200:
    return B19200;
    break;
  case 38400:
    return B38400;
    break;
  case 57600:
    return B57600;
    break;
  case 115200:
    return B115200;
    break;
  case 230400:
    return B230400;
    break;
  case 460800:
    return B460800;
    break;
  case 500000:
    return B500000;
    break;
  case 576000:
    return B576000;
    break;
  case 921600:
    return B921600;
    break;
  case 1000000:
    return B1000000;
    break;
  case 1152000:
    return B1152000;
    break;
  case 1500000:
    return B1500000;
    break;
  case 2000000:
    return B2000000;
    break;
  case 2500000:
    return B2500000;
    break;
  case 3000000:
    return B3000000;
    break;
  case 3500000:
    return B3500000;
    break;
  case 4000000:
    return B4000000;
    break;
  }
  return 0;
}


x86 assembly (clang, -O0):
<librpip_uart_config_convert_l2b>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x4b0,%eax
je     1299 <librpip_uart_config_convert_l2b+0x199>
jmp    111d <librpip_uart_config_convert_l2b+0x1d>
mov    -0xc(%rbp),%eax
sub    $0x960,%eax
je     12aa <librpip_uart_config_convert_l2b+0x1aa>
jmp    1130 <librpip_uart_config_convert_l2b+0x30>
mov    -0xc(%rbp),%eax
sub    $0x12c0,%eax
je     12bb <librpip_uart_config_convert_l2b+0x1bb>
jmp    1143 <librpip_uart_config_convert_l2b+0x43>
mov    -0xc(%rbp),%eax
sub    $0x2580,%eax
je     12cc <librpip_uart_config_convert_l2b+0x1cc>
jmp    1156 <librpip_uart_config_convert_l2b+0x56>
mov    -0xc(%rbp),%eax
sub    $0x4b00,%eax
je     12dd <librpip_uart_config_convert_l2b+0x1dd>
jmp    1169 <librpip_uart_config_convert_l2b+0x69>
mov    -0xc(%rbp),%eax
sub    $0x9600,%eax
je     12ee <librpip_uart_config_convert_l2b+0x1ee>
jmp    117c <librpip_uart_config_convert_l2b+0x7c>
mov    -0xc(%rbp),%eax
sub    $0xe100,%eax
je     12ff <librpip_uart_config_convert_l2b+0x1ff>
jmp    118f <librpip_uart_config_convert_l2b+0x8f>
mov    -0xc(%rbp),%eax
sub    $0x1c200,%eax
je     1310 <librpip_uart_config_convert_l2b+0x210>
jmp    11a2 <librpip_uart_config_convert_l2b+0xa2>
mov    -0xc(%rbp),%eax
sub    $0x38400,%eax
je     1321 <librpip_uart_config_convert_l2b+0x221>
jmp    11b5 <librpip_uart_config_convert_l2b+0xb5>
mov    -0xc(%rbp),%eax
sub    $0x70800,%eax
je     1332 <librpip_uart_config_convert_l2b+0x232>
jmp    11c8 <librpip_uart_config_convert_l2b+0xc8>
mov    -0xc(%rbp),%eax
sub    $0x7a120,%eax
je     1343 <librpip_uart_config_convert_l2b+0x243>
jmp    11db <librpip_uart_config_convert_l2b+0xdb>
mov    -0xc(%rbp),%eax
sub    $0x8ca00,%eax
je     1354 <librpip_uart_config_convert_l2b+0x254>
jmp    11ee <librpip_uart_config_convert_l2b+0xee>
mov    -0xc(%rbp),%eax
sub    $0xe1000,%eax
je     1365 <librpip_uart_config_convert_l2b+0x265>
jmp    1201 <librpip_uart_config_convert_l2b+0x101>
mov    -0xc(%rbp),%eax
sub    $0xf4240,%eax
je     1376 <librpip_uart_config_convert_l2b+0x276>
jmp    1214 <librpip_uart_config_convert_l2b+0x114>
mov    -0xc(%rbp),%eax
sub    $0x119400,%eax
je     1387 <librpip_uart_config_convert_l2b+0x287>
jmp    1227 <librpip_uart_config_convert_l2b+0x127>
mov    -0xc(%rbp),%eax
sub    $0x16e360,%eax
je     1398 <librpip_uart_config_convert_l2b+0x298>
jmp    123a <librpip_uart_config_convert_l2b+0x13a>
mov    -0xc(%rbp),%eax
sub    $0x1e8480,%eax
je     13a9 <librpip_uart_config_convert_l2b+0x2a9>
jmp    124d <librpip_uart_config_convert_l2b+0x14d>
mov    -0xc(%rbp),%eax
sub    $0x2625a0,%eax
je     13ba <librpip_uart_config_convert_l2b+0x2ba>
jmp    1260 <librpip_uart_config_convert_l2b+0x160>
mov    -0xc(%rbp),%eax
sub    $0x2dc6c0,%eax
je     13cb <librpip_uart_config_convert_l2b+0x2cb>
jmp    1273 <librpip_uart_config_convert_l2b+0x173>
mov    -0xc(%rbp),%eax
sub    $0x3567e0,%eax
je     13dc <librpip_uart_config_convert_l2b+0x2dc>
jmp    1286 <librpip_uart_config_convert_l2b+0x186>
mov    -0xc(%rbp),%eax
sub    $0x3d0900,%eax
je     13ed <librpip_uart_config_convert_l2b+0x2ed>
jmp    13fe <librpip_uart_config_convert_l2b+0x2fe>
mov    0x2cc8(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1405 <librpip_uart_config_convert_l2b+0x305>
mov    0x2ccf(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1405 <librpip_uart_config_convert_l2b+0x305>
mov    0x2d06(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1405 <librpip_uart_config_convert_l2b+0x305>
mov    0x2ced(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1405 <librpip_uart_config_convert_l2b+0x305>
mov    0x2d0c(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1405 <librpip_uart_config_convert_l2b+0x305>
mov    0x2c43(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1405 <librpip_uart_config_convert_l2b+0x305>
mov    0x2c9a(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1405 <librpip_uart_config_convert_l2b+0x305>
mov    0x2c49(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1405 <librpip_uart_config_convert_l2b+0x305>
mov    0x2c18(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1405 <librpip_uart_config_convert_l2b+0x305>
mov    0x2c37(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1405 <librpip_uart_config_convert_l2b+0x305>
mov    0x2c0e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1405 <librpip_uart_config_convert_l2b+0x305>
mov    0x2c75(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1405 <librpip_uart_config_convert_l2b+0x305>
mov    0x2c6c(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1405 <librpip_uart_config_convert_l2b+0x305>
mov    0x2c33(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1405 <librpip_uart_config_convert_l2b+0x305>
mov    0x2bea(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1405 <librpip_uart_config_convert_l2b+0x305>
mov    0x2bb1(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1405 <librpip_uart_config_convert_l2b+0x305>
mov    0x2bf8(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1405 <librpip_uart_config_convert_l2b+0x305>
mov    0x2bf7(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1405 <librpip_uart_config_convert_l2b+0x305>
mov    0x2bbe(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1405 <librpip_uart_config_convert_l2b+0x305>
mov    0x2bfd(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1405 <librpip_uart_config_convert_l2b+0x305>
mov    0x2ba4(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1405 <librpip_uart_config_convert_l2b+0x305>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<librpip_uart_config_convert_l2b>:
xor    %eax,%eax
cmp    $0x7a11f,%edi
jle    1152 <librpip_uart_config_convert_l2b+0x52>
cmp    $0x16e35f,%edi
jle    1196 <librpip_uart_config_convert_l2b+0x96>
cmp    $0x2dc6bf,%edi
jg     120e <librpip_uart_config_convert_l2b+0x10e>
cmp    $0x16e360,%edi
je     129f <librpip_uart_config_convert_l2b+0x19f>
cmp    $0x1e8480,%edi
je     12a8 <librpip_uart_config_convert_l2b+0x1a8>
cmp    $0x2625a0,%edi
jne    1314 <librpip_uart_config_convert_l2b+0x214>
mov    0x2e6b(%rip),%rax
jmp    1312 <librpip_uart_config_convert_l2b+0x212>
cmp    $0x95ff,%edi
jg     11d2 <librpip_uart_config_convert_l2b+0xd2>
cmp    $0x12bf,%edi
jle    123e <librpip_uart_config_convert_l2b+0x13e>
cmp    $0x12c0,%edi
je     12b1 <librpip_uart_config_convert_l2b+0x1b1>
cmp    $0x2580,%edi
je     12ba <librpip_uart_config_convert_l2b+0x1ba>
cmp    $0x4b00,%edi
jne    1314 <librpip_uart_config_convert_l2b+0x214>
mov    0x2e5f(%rip),%rax
jmp    1312 <librpip_uart_config_convert_l2b+0x212>
cmp    $0xe0fff,%edi
jle    1262 <librpip_uart_config_convert_l2b+0x162>
cmp    $0xe1000,%edi
je     12c3 <librpip_uart_config_convert_l2b+0x1c3>
cmp    $0xf4240,%edi
je     12cc <librpip_uart_config_convert_l2b+0x1cc>
cmp    $0x119400,%edi
jne    1314 <librpip_uart_config_convert_l2b+0x214>
mov    0x2dab(%rip),%rax
jmp    1312 <librpip_uart_config_convert_l2b+0x212>
cmp    $0x1c1ff,%edi
jle    1286 <librpip_uart_config_convert_l2b+0x186>
cmp    $0x1c200,%edi
je     12d5 <librpip_uart_config_convert_l2b+0x1d5>
cmp    $0x38400,%edi
je     12de <librpip_uart_config_convert_l2b+0x1de>
cmp    $0x70800,%edi
jne    1314 <librpip_uart_config_convert_l2b+0x214>
mov    0x2d67(%rip),%rax
jmp    1312 <librpip_uart_config_convert_l2b+0x212>
cmp    $0x2dc6c0,%edi
je     12e7 <librpip_uart_config_convert_l2b+0x1e7>
cmp    $0x3567e0,%edi
je     12f0 <librpip_uart_config_convert_l2b+0x1f0>
cmp    $0x3d0900,%edi
jne    1314 <librpip_uart_config_convert_l2b+0x214>
mov    0x2d5f(%rip),%rax
jmp    1312 <librpip_uart_config_convert_l2b+0x212>
cmp    $0x4b0,%edi
je     12f9 <librpip_uart_config_convert_l2b+0x1f9>
cmp    $0x960,%edi
jne    1314 <librpip_uart_config_convert_l2b+0x214>
mov    0x2d23(%rip),%rax
jmp    1312 <librpip_uart_config_convert_l2b+0x212>
cmp    $0x7a120,%edi
je     1302 <librpip_uart_config_convert_l2b+0x202>
cmp    $0x8ca00,%edi
jne    1314 <librpip_uart_config_convert_l2b+0x214>
mov    0x2d4f(%rip),%rax
jmp    1312 <librpip_uart_config_convert_l2b+0x212>
cmp    $0x9600,%edi
je     130b <librpip_uart_config_convert_l2b+0x20b>
cmp    $0xe100,%edi
jne    1314 <librpip_uart_config_convert_l2b+0x214>
mov    0x2d03(%rip),%rax
jmp    1312 <librpip_uart_config_convert_l2b+0x212>
mov    0x2caa(%rip),%rax
jmp    1312 <librpip_uart_config_convert_l2b+0x212>
mov    0x2cf9(%rip),%rax
jmp    1312 <librpip_uart_config_convert_l2b+0x212>
mov    0x2d10(%rip),%rax
jmp    1312 <librpip_uart_config_convert_l2b+0x212>
mov    0x2cff(%rip),%rax
jmp    1312 <librpip_uart_config_convert_l2b+0x212>
mov    0x2d0e(%rip),%rax
jmp    1312 <librpip_uart_config_convert_l2b+0x212>
mov    0x2cdd(%rip),%rax
jmp    1312 <librpip_uart_config_convert_l2b+0x212>
mov    0x2c84(%rip),%rax
jmp    1312 <librpip_uart_config_convert_l2b+0x212>
mov    0x2c5b(%rip),%rax
jmp    1312 <librpip_uart_config_convert_l2b+0x212>
mov    0x2ca2(%rip),%rax
jmp    1312 <librpip_uart_config_convert_l2b+0x212>
mov    0x2ce9(%rip),%rax
jmp    1312 <librpip_uart_config_convert_l2b+0x212>
mov    0x2c68(%rip),%rax
jmp    1312 <librpip_uart_config_convert_l2b+0x212>
mov    0x2c4f(%rip),%rax
jmp    1312 <librpip_uart_config_convert_l2b+0x212>
mov    0x2c26(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@B1200 = global i32 0
@B2400 = global i32 0
@B4800 = global i32 0
@B9600 = global i32 0
@B19200 = global i32 0
@B38400 = global i32 0
@B57600 = global i32 0
@B115200 = global i32 0
@B230400 = global i32 0
@B460800 = global i32 0
@B500000 = global i32 0
@B576000 = global i32 0
@B921600 = global i32 0
@B1000000 = global i32 0
@B1152000 = global i32 0
@B1500000 = global i32 0
@B2000000 = global i32 0
@B2500000 = global i32 0
@B3000000 = global i32 0
@B3500000 = global i32 0
@B4000000 = global i32 0
define i32 @librpip_uart_config_convert_l2b(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %47 [
i32 1200, label %5
i32 2400, label %7
i32 4800, label %9
i32 9600, label %11
i32 19200, label %13
i32 38400, label %15
i32 57600, label %17
i32 115200, label %19
i32 230400, label %21
i32 460800, label %23
i32 500000, label %25
i32 576000, label %27
i32 921600, label %29
i32 1000000, label %31
i32 1152000, label %33
i32 1500000, label %35
i32 2000000, label %37
i32 2500000, label %39
i32 3000000, label %41
i32 3500000, label %43
i32 4000000, label %45
]
5: ; preds = %1
%6 = load i32, i32* @B1200
store i32 %6, i32* %2
br label %48
7: ; preds = %1
%8 = load i32, i32* @B2400
store i32 %8, i32* %2
br label %48
9: ; preds = %1
%10 = load i32, i32* @B4800
store i32 %10, i32* %2
br label %48
11: ; preds = %1
%12 = load i32, i32* @B9600
store i32 %12, i32* %2
br label %48
13: ; preds = %1
%14 = load i32, i32* @B19200
store i32 %14, i32* %2
br label %48
15: ; preds = %1
%16 = load i32, i32* @B38400
store i32 %16, i32* %2
br label %48
17: ; preds = %1
%18 = load i32, i32* @B57600
store i32 %18, i32* %2
br label %48
19: ; preds = %1
%20 = load i32, i32* @B115200
store i32 %20, i32* %2
br label %48
21: ; preds = %1
%22 = load i32, i32* @B230400
store i32 %22, i32* %2
br label %48
23: ; preds = %1
%24 = load i32, i32* @B460800
store i32 %24, i32* %2
br label %48
25: ; preds = %1
%26 = load i32, i32* @B500000
store i32 %26, i32* %2
br label %48
27: ; preds = %1
%28 = load i32, i32* @B576000
store i32 %28, i32* %2
br label %48
29: ; preds = %1
%30 = load i32, i32* @B921600
store i32 %30, i32* %2
br label %48
31: ; preds = %1
%32 = load i32, i32* @B1000000
store i32 %32, i32* %2
br label %48
33: ; preds = %1
%34 = load i32, i32* @B1152000
store i32 %34, i32* %2
br label %48
35: ; preds = %1
%36 = load i32, i32* @B1500000
store i32 %36, i32* %2
br label %48
37: ; preds = %1
%38 = load i32, i32* @B2000000
store i32 %38, i32* %2
br label %48
39: ; preds = %1
%40 = load i32, i32* @B2500000
store i32 %40, i32* %2
br label %48
41: ; preds = %1
%42 = load i32, i32* @B3000000
store i32 %42, i32* %2
br label %48
43: ; preds = %1
%44 = load i32, i32* @B3500000
store i32 %44, i32* %2
br label %48
45: ; preds = %1
%46 = load i32, i32* @B4000000
store i32 %46, i32* %2
br label %48
47: ; preds = %1
store i32 0, i32* %2
br label %48
48: ; preds = %47, %45, %43, %41, %39, %37, %35, %33, %31, %29, %27, %25, %23, %21, %19, %17, %15, %13, %11, %9, %7, %5
%49 = load i32, i32* %2
ret i32 %49
}

LLVM IR (-O2):
@B1200 = global i32 0
@B2400 = global i32 0
@B4800 = global i32 0
@B9600 = global i32 0
@B19200 = global i32 0
@B38400 = global i32 0
@B57600 = global i32 0
@B115200 = global i32 0
@B230400 = global i32 0
@B460800 = global i32 0
@B500000 = global i32 0
@B576000 = global i32 0
@B921600 = global i32 0
@B1000000 = global i32 0
@B1152000 = global i32 0
@B1500000 = global i32 0
@B2000000 = global i32 0
@B2500000 = global i32 0
@B3000000 = global i32 0
@B3500000 = global i32 0
@B4000000 = global i32 0
define i32 @librpip_uart_config_convert_l2b(i32 %0) {
switch i32 %0, label %44 [
i32 1200, label %2
i32 2400, label %4
i32 4800, label %6
i32 9600, label %8
i32 19200, label %10
i32 38400, label %12
i32 57600, label %14
i32 115200, label %16
i32 230400, label %18
i32 460800, label %20
i32 500000, label %22
i32 576000, label %24
i32 921600, label %26
i32 1000000, label %28
i32 1152000, label %30
i32 1500000, label %32
i32 2000000, label %34
i32 2500000, label %36
i32 3000000, label %38
i32 3500000, label %40
i32 4000000, label %42
]
2: ; preds = %1
%3 = load i32, i32* @B1200
br label %44
4: ; preds = %1
%5 = load i32, i32* @B2400
br label %44
6: ; preds = %1
%7 = load i32, i32* @B4800
br label %44
8: ; preds = %1
%9 = load i32, i32* @B9600
br label %44
10: ; preds = %1
%11 = load i32, i32* @B19200
br label %44
12: ; preds = %1
%13 = load i32, i32* @B38400
br label %44
14: ; preds = %1
%15 = load i32, i32* @B57600
br label %44
16: ; preds = %1
%17 = load i32, i32* @B115200
br label %44
18: ; preds = %1
%19 = load i32, i32* @B230400
br label %44
20: ; preds = %1
%21 = load i32, i32* @B460800
br label %44
22: ; preds = %1
%23 = load i32, i32* @B500000
br label %44
24: ; preds = %1
%25 = load i32, i32* @B576000
br label %44
26: ; preds = %1
%27 = load i32, i32* @B921600
br label %44
28: ; preds = %1
%29 = load i32, i32* @B1000000
br label %44
30: ; preds = %1
%31 = load i32, i32* @B1152000
br label %44
32: ; preds = %1
%33 = load i32, i32* @B1500000
br label %44
34: ; preds = %1
%35 = load i32, i32* @B2000000
br label %44
36: ; preds = %1
%37 = load i32, i32* @B2500000
br label %44
38: ; preds = %1
%39 = load i32, i32* @B3000000
br label %44
40: ; preds = %1
%41 = load i32, i32* @B3500000
br label %44
42: ; preds = %1
%43 = load i32, i32* @B4000000
br label %44
44: ; preds = %1, %42, %40, %38, %36, %34, %32, %30, %28, %26, %24, %22, %20, %18, %16, %14, %12, %10, %8, %6, %4, %2
%45 = phi i32 [ %43, %42 ], [ %41, %40 ], [ %39, %38 ], [ %37, %36 ], [ %35, %34 ], [ %33, %32 ], [ %31, %30 ], [ %29, %28 ], [ %27, %26 ], [ %25, %24 ], [ %23, %22 ], [ %21, %20 ], [ %19, %18 ], [ %17, %16 ], [ %15, %14 ], [ %13, %12 ], [ %11, %10 ], [ %9, %8 ], [ %7, %6 ], [ %5, %4 ], [ %3, %2 ], [ 0, %1 ]
ret i32 %45
}