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


x86 assembly (clang, -O0):
<cook_baud>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x32,%eax
je     124e <cook_baud+0x14e>
jmp    1122 <cook_baud+0x22>
mov    -0xc(%rbp),%eax
sub    $0x4b,%eax
je     125f <cook_baud+0x15f>
jmp    1133 <cook_baud+0x33>
mov    -0xc(%rbp),%eax
sub    $0x6e,%eax
je     1270 <cook_baud+0x170>
jmp    1144 <cook_baud+0x44>
mov    -0xc(%rbp),%eax
sub    $0x86,%eax
je     1281 <cook_baud+0x181>
jmp    1157 <cook_baud+0x57>
mov    -0xc(%rbp),%eax
sub    $0x96,%eax
je     1292 <cook_baud+0x192>
jmp    116a <cook_baud+0x6a>
mov    -0xc(%rbp),%eax
sub    $0xc8,%eax
je     12a3 <cook_baud+0x1a3>
jmp    117d <cook_baud+0x7d>
mov    -0xc(%rbp),%eax
sub    $0x12c,%eax
je     12b4 <cook_baud+0x1b4>
jmp    1190 <cook_baud+0x90>
mov    -0xc(%rbp),%eax
sub    $0x258,%eax
je     12c5 <cook_baud+0x1c5>
jmp    11a3 <cook_baud+0xa3>
mov    -0xc(%rbp),%eax
sub    $0x4b0,%eax
je     12d6 <cook_baud+0x1d6>
jmp    11b6 <cook_baud+0xb6>
mov    -0xc(%rbp),%eax
sub    $0x708,%eax
je     12e7 <cook_baud+0x1e7>
jmp    11c9 <cook_baud+0xc9>
mov    -0xc(%rbp),%eax
sub    $0x960,%eax
je     12f8 <cook_baud+0x1f8>
jmp    11dc <cook_baud+0xdc>
mov    -0xc(%rbp),%eax
sub    $0x12c0,%eax
je     1309 <cook_baud+0x209>
jmp    11ef <cook_baud+0xef>
mov    -0xc(%rbp),%eax
sub    $0x2580,%eax
je     131a <cook_baud+0x21a>
jmp    1202 <cook_baud+0x102>
mov    -0xc(%rbp),%eax
sub    $0x4b00,%eax
je     132b <cook_baud+0x22b>
jmp    1215 <cook_baud+0x115>
mov    -0xc(%rbp),%eax
sub    $0x9600,%eax
je     133c <cook_baud+0x23c>
jmp    1228 <cook_baud+0x128>
mov    -0xc(%rbp),%eax
sub    $0xe100,%eax
je     134d <cook_baud+0x24d>
jmp    123b <cook_baud+0x13b>
mov    -0xc(%rbp),%eax
sub    $0x1c200,%eax
je     135e <cook_baud+0x25e>
jmp    136a <cook_baud+0x26a>
mov    0x2d53(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
jmp    136a <cook_baud+0x26a>
mov    0x2d72(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
jmp    136a <cook_baud+0x26a>
mov    0x2d69(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
jmp    136a <cook_baud+0x26a>
mov    0x2d40(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
jmp    136a <cook_baud+0x26a>
mov    0x2cdf(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
jmp    136a <cook_baud+0x26a>
mov    0x2cf6(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
jmp    136a <cook_baud+0x26a>
mov    0x2cf5(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
jmp    136a <cook_baud+0x26a>
mov    0x2d04(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
jmp    136a <cook_baud+0x26a>
mov    0x2c93(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
jmp    136a <cook_baud+0x26a>
mov    0x2c9a(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
jmp    136a <cook_baud+0x26a>
mov    0x2c81(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
jmp    136a <cook_baud+0x26a>
mov    0x2cb0(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
jmp    136a <cook_baud+0x26a>
mov    0x2c97(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
jmp    136a <cook_baud+0x26a>
mov    0x2cbe(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
jmp    136a <cook_baud+0x26a>
mov    0x2c15(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
jmp    136a <cook_baud+0x26a>
mov    0x2c44(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
jmp    136a <cook_baud+0x26a>
mov    0x2c03(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cook_baud>:
xor    %eax,%eax
cmp    $0x4af,%edi
jle    114e <cook_baud+0x4e>
cmp    $0x257f,%edi
jle    117d <cook_baud+0x7d>
cmp    $0x95ff,%edi
jle    11dd <cook_baud+0xdd>
cmp    $0x9600,%edi
je     1254 <cook_baud+0x154>
cmp    $0xe100,%edi
je     125d <cook_baud+0x15d>
cmp    $0x1c200,%edi
jne    12a5 <cook_baud+0x1a5>
mov    0x2e1f(%rip),%rax
jmp    12a3 <cook_baud+0x1a3>
cmp    $0x95,%edi
jg     11ad <cook_baud+0xad>
cmp    $0x6d,%edi
jg     1201 <cook_baud+0x101>
cmp    $0x32,%edi
je     1266 <cook_baud+0x166>
cmp    $0x4b,%edi
jne    12a5 <cook_baud+0x1a5>
mov    0x2e60(%rip),%rax
jmp    12a3 <cook_baud+0x1a3>
cmp    $0x95f,%edi
jg     1222 <cook_baud+0x122>
cmp    $0x4b0,%edi
je     126f <cook_baud+0x16f>
cmp    $0x708,%edi
jne    12a5 <cook_baud+0x1a5>
mov    0x2de0(%rip),%rax
jmp    12a3 <cook_baud+0x1a3>
cmp    $0x12b,%edi
jg     123b <cook_baud+0x13b>
cmp    $0x96,%edi
je     1278 <cook_baud+0x178>
cmp    $0xc8,%edi
jne    12a5 <cook_baud+0x1a5>
mov    0x2dc8(%rip),%rax
jmp    12a3 <cook_baud+0x1a3>
cmp    $0x2580,%edi
je     1281 <cook_baud+0x181>
cmp    $0x4b00,%edi
jne    12a5 <cook_baud+0x1a5>
mov    0x2df4(%rip),%rax
jmp    12a3 <cook_baud+0x1a3>
cmp    $0x6e,%edi
je     128a <cook_baud+0x18a>
cmp    $0x86,%edi
jne    12a5 <cook_baud+0x1a5>
mov    0x2dab(%rip),%rax
jmp    12a3 <cook_baud+0x1a3>
cmp    $0x960,%edi
je     1293 <cook_baud+0x193>
cmp    $0x12c0,%edi
jne    12a5 <cook_baud+0x1a5>
mov    0x2d87(%rip),%rax
jmp    12a3 <cook_baud+0x1a3>
cmp    $0x12c,%edi
je     129c <cook_baud+0x19c>
cmp    $0x258,%edi
jne    12a5 <cook_baud+0x1a5>
mov    0x2d7e(%rip),%rax
jmp    12a3 <cook_baud+0x1a3>
mov    0x2cfd(%rip),%rax
jmp    12a3 <cook_baud+0x1a3>
mov    0x2d34(%rip),%rax
jmp    12a3 <cook_baud+0x1a3>
mov    0x2d3b(%rip),%rax
jmp    12a3 <cook_baud+0x1a3>
mov    0x2cfa(%rip),%rax
jmp    12a3 <cook_baud+0x1a3>
mov    0x2cf9(%rip),%rax
jmp    12a3 <cook_baud+0x1a3>
mov    0x2d30(%rip),%rax
jmp    12a3 <cook_baud+0x1a3>
mov    0x2d4f(%rip),%rax
jmp    12a3 <cook_baud+0x1a3>
mov    0x2ce6(%rip),%rax
jmp    12a3 <cook_baud+0x1a3>
mov    0x2d0d(%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
define i32 @cook_baud(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
%4 = load i32, i32* %2
switch i32 %4, label %39 [
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
]
5: ; preds = %1
%6 = load i32, i32* @B50
store i32 %6, i32* %3
br label %39
7: ; preds = %1
%8 = load i32, i32* @B75
store i32 %8, i32* %3
br label %39
9: ; preds = %1
%10 = load i32, i32* @B110
store i32 %10, i32* %3
br label %39
11: ; preds = %1
%12 = load i32, i32* @B134
store i32 %12, i32* %3
br label %39
13: ; preds = %1
%14 = load i32, i32* @B150
store i32 %14, i32* %3
br label %39
15: ; preds = %1
%16 = load i32, i32* @B200
store i32 %16, i32* %3
br label %39
17: ; preds = %1
%18 = load i32, i32* @B300
store i32 %18, i32* %3
br label %39
19: ; preds = %1
%20 = load i32, i32* @B600
store i32 %20, i32* %3
br label %39
21: ; preds = %1
%22 = load i32, i32* @B1200
store i32 %22, i32* %3
br label %39
23: ; preds = %1
%24 = load i32, i32* @B1800
store i32 %24, i32* %3
br label %39
25: ; preds = %1
%26 = load i32, i32* @B2400
store i32 %26, i32* %3
br label %39
27: ; preds = %1
%28 = load i32, i32* @B4800
store i32 %28, i32* %3
br label %39
29: ; preds = %1
%30 = load i32, i32* @B9600
store i32 %30, i32* %3
br label %39
31: ; preds = %1
%32 = load i32, i32* @B19200
store i32 %32, i32* %3
br label %39
33: ; preds = %1
%34 = load i32, i32* @B38400
store i32 %34, i32* %3
br label %39
35: ; preds = %1
%36 = load i32, i32* @B57600
store i32 %36, i32* %3
br label %39
37: ; preds = %1
%38 = load i32, i32* @B115200
store i32 %38, i32* %3
br label %39
39: ; preds = %1, %37, %35, %33, %31, %29, %27, %25, %23, %21, %19, %17, %15, %13, %11, %9, %7, %5
%40 = load i32, i32* %3
ret i32 %40
}

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