#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 B0;
int B110;
int B115200;
int B1200;
int B134;
int B150;
int B1800;
int B19200;
int B200;
int B230400;
int B2400;
int B300;
int B38400;
int B4800;
int B50;
int B57600;
int B600;
int B75;
int B9600;
unsigned baud_to_constant(unsigned baudRate) {
  switch (baudRate) {
  case 50:
    return B50;
  case 75:
    return B75;
  case 110:
    return B110;
  case 134:
    return B134;
  case 150:
    return B150;
  case 200:
    return B200;
  case 300:
    return B300;
  case 600:
    return B600;
  case 1200:
    return B1200;
  case 1800:
    return B1800;
  case 2400:
    return B2400;
  case 4800:
    return B4800;
  case 9600:
    return B9600;
  case 19200:
    return B19200;
  case 38400:
    return B38400;
  case 57600:
    return B57600;
  case 115200:
    return B115200;
  case 230400:
    return B230400;
  }
  return B0;
}


x86 assembly (clang, -O0):
<baud_to_constant>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x32,%eax
je     125a <baud_to_constant+0x15a>
jmp    111b <baud_to_constant+0x1b>
mov    -0xc(%rbp),%eax
sub    $0x4b,%eax
je     126b <baud_to_constant+0x16b>
jmp    112c <baud_to_constant+0x2c>
mov    -0xc(%rbp),%eax
sub    $0x6e,%eax
je     127c <baud_to_constant+0x17c>
jmp    113d <baud_to_constant+0x3d>
mov    -0xc(%rbp),%eax
sub    $0x86,%eax
je     128d <baud_to_constant+0x18d>
jmp    1150 <baud_to_constant+0x50>
mov    -0xc(%rbp),%eax
sub    $0x96,%eax
je     129e <baud_to_constant+0x19e>
jmp    1163 <baud_to_constant+0x63>
mov    -0xc(%rbp),%eax
sub    $0xc8,%eax
je     12af <baud_to_constant+0x1af>
jmp    1176 <baud_to_constant+0x76>
mov    -0xc(%rbp),%eax
sub    $0x12c,%eax
je     12c0 <baud_to_constant+0x1c0>
jmp    1189 <baud_to_constant+0x89>
mov    -0xc(%rbp),%eax
sub    $0x258,%eax
je     12d1 <baud_to_constant+0x1d1>
jmp    119c <baud_to_constant+0x9c>
mov    -0xc(%rbp),%eax
sub    $0x4b0,%eax
je     12e2 <baud_to_constant+0x1e2>
jmp    11af <baud_to_constant+0xaf>
mov    -0xc(%rbp),%eax
sub    $0x708,%eax
je     12f3 <baud_to_constant+0x1f3>
jmp    11c2 <baud_to_constant+0xc2>
mov    -0xc(%rbp),%eax
sub    $0x960,%eax
je     1304 <baud_to_constant+0x204>
jmp    11d5 <baud_to_constant+0xd5>
mov    -0xc(%rbp),%eax
sub    $0x12c0,%eax
je     1315 <baud_to_constant+0x215>
jmp    11e8 <baud_to_constant+0xe8>
mov    -0xc(%rbp),%eax
sub    $0x2580,%eax
je     1326 <baud_to_constant+0x226>
jmp    11fb <baud_to_constant+0xfb>
mov    -0xc(%rbp),%eax
sub    $0x4b00,%eax
je     1337 <baud_to_constant+0x237>
jmp    120e <baud_to_constant+0x10e>
mov    -0xc(%rbp),%eax
sub    $0x9600,%eax
je     1348 <baud_to_constant+0x248>
jmp    1221 <baud_to_constant+0x121>
mov    -0xc(%rbp),%eax
sub    $0xe100,%eax
je     1359 <baud_to_constant+0x259>
jmp    1234 <baud_to_constant+0x134>
mov    -0xc(%rbp),%eax
sub    $0x1c200,%eax
je     136a <baud_to_constant+0x26a>
jmp    1247 <baud_to_constant+0x147>
mov    -0xc(%rbp),%eax
sub    $0x38400,%eax
je     137b <baud_to_constant+0x27b>
jmp    138c <baud_to_constant+0x28c>
mov    0x2d47(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1398 <baud_to_constant+0x298>
mov    0x2d66(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1398 <baud_to_constant+0x298>
mov    0x2d5d(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1398 <baud_to_constant+0x298>
mov    0x2d34(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1398 <baud_to_constant+0x298>
mov    0x2ccb(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1398 <baud_to_constant+0x298>
mov    0x2cea(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1398 <baud_to_constant+0x298>
mov    0x2ce9(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1398 <baud_to_constant+0x298>
mov    0x2cf8(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1398 <baud_to_constant+0x298>
mov    0x2c7f(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1398 <baud_to_constant+0x298>
mov    0x2c86(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1398 <baud_to_constant+0x298>
mov    0x2c6d(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1398 <baud_to_constant+0x298>
mov    0x2ca4(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1398 <baud_to_constant+0x298>
mov    0x2c8b(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1398 <baud_to_constant+0x298>
mov    0x2cb2(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1398 <baud_to_constant+0x298>
mov    0x2bf9(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1398 <baud_to_constant+0x298>
mov    0x2c38(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1398 <baud_to_constant+0x298>
mov    0x2bef(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1398 <baud_to_constant+0x298>
mov    0x2bce(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1398 <baud_to_constant+0x298>
mov    0x2bf5(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<baud_to_constant>:
cmp    $0x707,%edi
jg     114a <baud_to_constant+0x4a>
cmp    $0x95,%edi
jle    118c <baud_to_constant+0x8c>
cmp    $0x12b,%edi
jle    11df <baud_to_constant+0xdf>
cmp    $0x12c,%edi
je     125c <baud_to_constant+0x15c>
cmp    $0x258,%edi
je     1266 <baud_to_constant+0x166>
cmp    $0x4b0,%edi
jne    12c0 <baud_to_constant+0x1c0>
mov    0x2e21(%rip),%rax
mov    (%rax),%eax
ret
cmp    $0x4aff,%edi
jle    11b1 <baud_to_constant+0xb1>
cmp    $0xe0ff,%edi
jle    1201 <baud_to_constant+0x101>
cmp    $0xe100,%edi
je     1270 <baud_to_constant+0x170>
cmp    $0x1c200,%edi
je     127a <baud_to_constant+0x17a>
cmp    $0x38400,%edi
jne    12c0 <baud_to_constant+0x1c0>
mov    0x2dc7(%rip),%rax
mov    (%rax),%eax
ret
cmp    $0x6d,%edi
jg     1223 <baud_to_constant+0x123>
cmp    $0x32,%edi
je     1284 <baud_to_constant+0x184>
cmp    $0x4b,%edi
jne    12c0 <baud_to_constant+0x1c0>
mov    0x2e2a(%rip),%rax
mov    (%rax),%eax
ret
cmp    $0x12bf,%edi
jg     1242 <baud_to_constant+0x142>
cmp    $0x708,%edi
je     128e <baud_to_constant+0x18e>
cmp    $0x960,%edi
jne    12c0 <baud_to_constant+0x1c0>
mov    0x2d9c(%rip),%rax
mov    (%rax),%eax
ret
cmp    $0x96,%edi
je     1298 <baud_to_constant+0x198>
cmp    $0xc8,%edi
jne    12c0 <baud_to_constant+0x1c0>
mov    0x2da2(%rip),%rax
mov    (%rax),%eax
ret
cmp    $0x4b00,%edi
je     12a2 <baud_to_constant+0x1a2>
cmp    $0x9600,%edi
jne    12c0 <baud_to_constant+0x1c0>
mov    0x2d28(%rip),%rax
mov    (%rax),%eax
ret
cmp    $0x6e,%edi
je     12ac <baud_to_constant+0x1ac>
cmp    $0x86,%edi
jne    12c0 <baud_to_constant+0x1c0>
mov    0x2d89(%rip),%rax
mov    (%rax),%eax
ret
cmp    $0x12c0,%edi
je     12b6 <baud_to_constant+0x1b6>
cmp    $0x2580,%edi
jne    12c0 <baud_to_constant+0x1c0>
mov    0x2d5f(%rip),%rax
mov    (%rax),%eax
ret
mov    0x2d4d(%rip),%rax
mov    (%rax),%eax
ret
mov    0x2d63(%rip),%rax
mov    (%rax),%eax
ret
mov    0x2d21(%rip),%rax
mov    (%rax),%eax
ret
mov    0x2cdf(%rip),%rax
mov    (%rax),%eax
ret
mov    0x2d1d(%rip),%rax
mov    (%rax),%eax
ret
mov    0x2ceb(%rip),%rax
mov    (%rax),%eax
ret
mov    0x2cd1(%rip),%rax
mov    (%rax),%eax
ret
mov    0x2d47(%rip),%rax
mov    (%rax),%eax
ret
mov    0x2d2d(%rip),%rax
mov    (%rax),%eax
ret
mov    0x2d03(%rip),%rax
mov    (%rax),%eax
ret
mov    0x2cc1(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@B50 = global i32 0
@B75 = global i32 0
@B110 = global i32 0
@B134 = global i32 0
@B150 = global i32 0
@B200 = global i32 0
@B300 = global i32 0
@B600 = global i32 0
@B1200 = global i32 0
@B1800 = 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
@B0 = global i32 0
define i32 @baud_to_constant(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %41 [
i32 50, label %5
i32 75, label %7
i32 110, label %9
i32 134, label %11
i32 150, label %13
i32 200, label %15
i32 300, label %17
i32 600, label %19
i32 1200, label %21
i32 1800, label %23
i32 2400, label %25
i32 4800, label %27
i32 9600, label %29
i32 19200, label %31
i32 38400, label %33
i32 57600, label %35
i32 115200, label %37
i32 230400, label %39
]
5: ; preds = %1
%6 = load i32, i32* @B50
store i32 %6, i32* %2
br label %43
7: ; preds = %1
%8 = load i32, i32* @B75
store i32 %8, i32* %2
br label %43
9: ; preds = %1
%10 = load i32, i32* @B110
store i32 %10, i32* %2
br label %43
11: ; preds = %1
%12 = load i32, i32* @B134
store i32 %12, i32* %2
br label %43
13: ; preds = %1
%14 = load i32, i32* @B150
store i32 %14, i32* %2
br label %43
15: ; preds = %1
%16 = load i32, i32* @B200
store i32 %16, i32* %2
br label %43
17: ; preds = %1
%18 = load i32, i32* @B300
store i32 %18, i32* %2
br label %43
19: ; preds = %1
%20 = load i32, i32* @B600
store i32 %20, i32* %2
br label %43
21: ; preds = %1
%22 = load i32, i32* @B1200
store i32 %22, i32* %2
br label %43
23: ; preds = %1
%24 = load i32, i32* @B1800
store i32 %24, i32* %2
br label %43
25: ; preds = %1
%26 = load i32, i32* @B2400
store i32 %26, i32* %2
br label %43
27: ; preds = %1
%28 = load i32, i32* @B4800
store i32 %28, i32* %2
br label %43
29: ; preds = %1
%30 = load i32, i32* @B9600
store i32 %30, i32* %2
br label %43
31: ; preds = %1
%32 = load i32, i32* @B19200
store i32 %32, i32* %2
br label %43
33: ; preds = %1
%34 = load i32, i32* @B38400
store i32 %34, i32* %2
br label %43
35: ; preds = %1
%36 = load i32, i32* @B57600
store i32 %36, i32* %2
br label %43
37: ; preds = %1
%38 = load i32, i32* @B115200
store i32 %38, i32* %2
br label %43
39: ; preds = %1
%40 = load i32, i32* @B230400
store i32 %40, i32* %2
br label %43
41: ; preds = %1
%42 = load i32, i32* @B0
store i32 %42, i32* %2
br label %43
43: ; preds = %41, %39, %37, %35, %33, %31, %29, %27, %25, %23, %21, %19, %17, %15, %13, %11, %9, %7, %5
%44 = load i32, i32* %2
ret i32 %44
}

LLVM IR (-O2):
@B50 = global i32 0
@B75 = global i32 0
@B110 = global i32 0
@B134 = global i32 0
@B150 = global i32 0
@B200 = global i32 0
@B300 = global i32 0
@B600 = global i32 0
@B1200 = global i32 0
@B1800 = 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
@B0 = global i32 0
define i32 @baud_to_constant(i32 %0) {
switch i32 %0, label %19 [
i32 50, label %20
i32 75, label %2
i32 110, label %3
i32 134, label %4
i32 150, label %5
i32 200, label %6
i32 300, label %7
i32 600, label %8
i32 1200, label %9
i32 1800, label %10
i32 2400, label %11
i32 4800, label %12
i32 9600, label %13
i32 19200, label %14
i32 38400, label %15
i32 57600, label %16
i32 115200, label %17
i32 230400, label %18
]
2: ; preds = %1
br label %20
3: ; preds = %1
br label %20
4: ; preds = %1
br label %20
5: ; preds = %1
br label %20
6: ; preds = %1
br label %20
7: ; preds = %1
br label %20
8: ; preds = %1
br label %20
9: ; preds = %1
br label %20
10: ; preds = %1
br label %20
11: ; preds = %1
br label %20
12: ; preds = %1
br label %20
13: ; preds = %1
br label %20
14: ; preds = %1
br label %20
15: ; preds = %1
br label %20
16: ; preds = %1
br label %20
17: ; preds = %1
br label %20
18: ; preds = %1
br label %20
19: ; preds = %1
br label %20
20: ; preds = %1, %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5, %4, %3, %2
%21 = phi i32* [ @B0, %19 ], [ @B230400, %18 ], [ @B115200, %17 ], [ @B57600, %16 ], [ @B38400, %15 ], [ @B19200, %14 ], [ @B9600, %13 ], [ @B4800, %12 ], [ @B2400, %11 ], [ @B1800, %10 ], [ @B1200, %9 ], [ @B600, %8 ], [ @B300, %7 ], [ @B200, %6 ], [ @B150, %5 ], [ @B134, %4 ], [ @B110, %3 ], [ @B75, %2 ], [ @B50, %1 ]
%22 = load i32, i32* %21
ret i32 %22
}