#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 /*<<< orphan*/ speed_t;

/* Variables and functions */
int /*<<< orphan*/ B0;
int /*<<< orphan*/ B1000000;
int /*<<< orphan*/ B115200;
int /*<<< orphan*/ B1152000;
int /*<<< orphan*/ B1200;
int /*<<< orphan*/ B1500000;
int /*<<< orphan*/ B19200;
int /*<<< orphan*/ B2000000;
int /*<<< orphan*/ B230400;
int /*<<< orphan*/ B2400;
int /*<<< orphan*/ B2500000;
int /*<<< orphan*/ B300;
int /*<<< orphan*/ B3000000;
int /*<<< orphan*/ B3500000;
int /*<<< orphan*/ B38400;
int /*<<< orphan*/ B4000000;
int /*<<< orphan*/ B460800;
int /*<<< orphan*/ B4800;
int /*<<< orphan*/ B500000;
int /*<<< orphan*/ B57600;
int /*<<< orphan*/ B576000;
int /*<<< orphan*/ B921600;
int /*<<< orphan*/ B9600;
int atoi(char *);
speed_t parse_baud_rate(char *str) {
  switch (atoi(str)) {
  case 300:
    return B300;
  case 1200:
    return B1200;
  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;
  case 460800:
    return B460800;
  case 500000:
    return B500000;
  case 576000:
    return B576000;
  case 921600:
    return B921600;
  case 1000000:
    return B1000000;
  case 1152000:
    return B1152000;
  case 1500000:
    return B1500000;
  case 2000000:
    return B2000000;
  case 2500000:
    return B2500000;
  case 3000000:
    return B3000000;
  case 3500000:
    return B3500000;
  case 4000000:
    return B4000000;
  default:
    return B0;
  }
}


x86 assembly (clang, -O0):
<parse_baud_rate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <atoi@plt>
mov    %eax,%ecx
mov    %ecx,-0x14(%rbp)
sub    $0x12c,%eax
je     12c9 <parse_baud_rate+0x1b9>
jmp    113a <parse_baud_rate+0x2a>
mov    -0x14(%rbp),%eax
sub    $0x4b0,%eax
je     12da <parse_baud_rate+0x1ca>
jmp    114d <parse_baud_rate+0x3d>
mov    -0x14(%rbp),%eax
sub    $0x960,%eax
je     12eb <parse_baud_rate+0x1db>
jmp    1160 <parse_baud_rate+0x50>
mov    -0x14(%rbp),%eax
sub    $0x12c0,%eax
je     12fc <parse_baud_rate+0x1ec>
jmp    1173 <parse_baud_rate+0x63>
mov    -0x14(%rbp),%eax
sub    $0x2580,%eax
je     130d <parse_baud_rate+0x1fd>
jmp    1186 <parse_baud_rate+0x76>
mov    -0x14(%rbp),%eax
sub    $0x4b00,%eax
je     131e <parse_baud_rate+0x20e>
jmp    1199 <parse_baud_rate+0x89>
mov    -0x14(%rbp),%eax
sub    $0x9600,%eax
je     132f <parse_baud_rate+0x21f>
jmp    11ac <parse_baud_rate+0x9c>
mov    -0x14(%rbp),%eax
sub    $0xe100,%eax
je     1340 <parse_baud_rate+0x230>
jmp    11bf <parse_baud_rate+0xaf>
mov    -0x14(%rbp),%eax
sub    $0x1c200,%eax
je     1351 <parse_baud_rate+0x241>
jmp    11d2 <parse_baud_rate+0xc2>
mov    -0x14(%rbp),%eax
sub    $0x38400,%eax
je     1362 <parse_baud_rate+0x252>
jmp    11e5 <parse_baud_rate+0xd5>
mov    -0x14(%rbp),%eax
sub    $0x70800,%eax
je     1373 <parse_baud_rate+0x263>
jmp    11f8 <parse_baud_rate+0xe8>
mov    -0x14(%rbp),%eax
sub    $0x7a120,%eax
je     1384 <parse_baud_rate+0x274>
jmp    120b <parse_baud_rate+0xfb>
mov    -0x14(%rbp),%eax
sub    $0x8ca00,%eax
je     1395 <parse_baud_rate+0x285>
jmp    121e <parse_baud_rate+0x10e>
mov    -0x14(%rbp),%eax
sub    $0xe1000,%eax
je     13a6 <parse_baud_rate+0x296>
jmp    1231 <parse_baud_rate+0x121>
mov    -0x14(%rbp),%eax
sub    $0xf4240,%eax
je     13b7 <parse_baud_rate+0x2a7>
jmp    1244 <parse_baud_rate+0x134>
mov    -0x14(%rbp),%eax
sub    $0x119400,%eax
je     13c8 <parse_baud_rate+0x2b8>
jmp    1257 <parse_baud_rate+0x147>
mov    -0x14(%rbp),%eax
sub    $0x16e360,%eax
je     13d9 <parse_baud_rate+0x2c9>
jmp    126a <parse_baud_rate+0x15a>
mov    -0x14(%rbp),%eax
sub    $0x1e8480,%eax
je     13ea <parse_baud_rate+0x2da>
jmp    127d <parse_baud_rate+0x16d>
mov    -0x14(%rbp),%eax
sub    $0x2625a0,%eax
je     13fb <parse_baud_rate+0x2eb>
jmp    1290 <parse_baud_rate+0x180>
mov    -0x14(%rbp),%eax
sub    $0x2dc6c0,%eax
je     140c <parse_baud_rate+0x2fc>
jmp    12a3 <parse_baud_rate+0x193>
mov    -0x14(%rbp),%eax
sub    $0x3567e0,%eax
je     141d <parse_baud_rate+0x30d>
jmp    12b6 <parse_baud_rate+0x1a6>
mov    -0x14(%rbp),%eax
sub    $0x3d0900,%eax
je     142e <parse_baud_rate+0x31e>
jmp    143f <parse_baud_rate+0x32f>
mov    0x2ce8(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    144b <parse_baud_rate+0x33b>
mov    0x2c77(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    144b <parse_baud_rate+0x33b>
mov    0x2c7e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    144b <parse_baud_rate+0x33b>
mov    0x2cc5(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    144b <parse_baud_rate+0x33b>
mov    0x2cac(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    144b <parse_baud_rate+0x33b>
mov    0x2ccb(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    144b <parse_baud_rate+0x33b>
mov    0x2bf2(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    144b <parse_baud_rate+0x33b>
mov    0x2c51(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    144b <parse_baud_rate+0x33b>
mov    0x2bf8(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    144b <parse_baud_rate+0x33b>
mov    0x2bc7(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    144b <parse_baud_rate+0x33b>
mov    0x2be6(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    144b <parse_baud_rate+0x33b>
mov    0x2bbd(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    144b <parse_baud_rate+0x33b>
mov    0x2c34(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    144b <parse_baud_rate+0x33b>
mov    0x2c2b(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    144b <parse_baud_rate+0x33b>
mov    0x2bea(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    144b <parse_baud_rate+0x33b>
mov    0x2b99(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    144b <parse_baud_rate+0x33b>
mov    0x2b60(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    144b <parse_baud_rate+0x33b>
mov    0x2baf(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    144b <parse_baud_rate+0x33b>
mov    0x2bae(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    144b <parse_baud_rate+0x33b>
mov    0x2b75(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    144b <parse_baud_rate+0x33b>
mov    0x2bbc(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    144b <parse_baud_rate+0x33b>
mov    0x2b5b(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    144b <parse_baud_rate+0x33b>
mov    0x2b32(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_baud_rate>:
push   %rax
call   1030 <atoi@plt>
cmp    $0x7a11f,%eax
jg     115c <parse_baud_rate+0x4c>
cmp    $0x4aff,%eax
jle    119b <parse_baud_rate+0x8b>
cmp    $0x1c1ff,%eax
jg     120b <parse_baud_rate+0xfb>
cmp    $0x4b00,%eax
je     12a9 <parse_baud_rate+0x199>
cmp    $0x9600,%eax
je     12b2 <parse_baud_rate+0x1a2>
cmp    $0xe100,%eax
jne    1327 <parse_baud_rate+0x217>
mov    0x2e41(%rip),%rax
jmp    132e <parse_baud_rate+0x21e>
cmp    $0x16e35f,%eax
jle    11d3 <parse_baud_rate+0xc3>
cmp    $0x2dc6bf,%eax
jg     1238 <parse_baud_rate+0x128>
cmp    $0x16e360,%eax
je     12bb <parse_baud_rate+0x1ab>
cmp    $0x1e8480,%eax
je     12c4 <parse_baud_rate+0x1b4>
cmp    $0x2625a0,%eax
jne    1327 <parse_baud_rate+0x217>
mov    0x2e1a(%rip),%rax
jmp    132e <parse_baud_rate+0x21e>
cmp    $0x95f,%eax
jle    1265 <parse_baud_rate+0x155>
cmp    $0x960,%eax
je     12cd <parse_baud_rate+0x1bd>
cmp    $0x12c0,%eax
je     12d6 <parse_baud_rate+0x1c6>
cmp    $0x2580,%eax
jne    1327 <parse_baud_rate+0x217>
mov    0x2df2(%rip),%rax
jmp    132e <parse_baud_rate+0x21e>
cmp    $0xe0fff,%eax
jle    1287 <parse_baud_rate+0x177>
cmp    $0xe1000,%eax
je     12df <parse_baud_rate+0x1cf>
cmp    $0xf4240,%eax
je     12e8 <parse_baud_rate+0x1d8>
cmp    $0x119400,%eax
jne    1327 <parse_baud_rate+0x217>
mov    0x2d62(%rip),%rax
jmp    132e <parse_baud_rate+0x21e>
cmp    $0x1c200,%eax
je     12f1 <parse_baud_rate+0x1e1>
cmp    $0x38400,%eax
je     12fa <parse_baud_rate+0x1ea>
cmp    $0x70800,%eax
jne    1327 <parse_baud_rate+0x217>
mov    0x2d2d(%rip),%rax
jmp    132e <parse_baud_rate+0x21e>
cmp    $0x2dc6c0,%eax
je     1303 <parse_baud_rate+0x1f3>
cmp    $0x3567e0,%eax
je     130c <parse_baud_rate+0x1fc>
cmp    $0x3d0900,%eax
jne    1327 <parse_baud_rate+0x217>
mov    0x2d30(%rip),%rax
jmp    132e <parse_baud_rate+0x21e>
cmp    $0x12c,%eax
je     1315 <parse_baud_rate+0x205>
cmp    $0x4b0,%eax
jne    1327 <parse_baud_rate+0x217>
mov    0x2cd6(%rip),%rax
jmp    132e <parse_baud_rate+0x21e>
cmp    $0x7a120,%eax
je     131e <parse_baud_rate+0x20e>
cmp    $0x8ca00,%eax
jne    1327 <parse_baud_rate+0x217>
mov    0x2d2c(%rip),%rax
jmp    132e <parse_baud_rate+0x21e>
mov    0x2d40(%rip),%rax
jmp    132e <parse_baud_rate+0x21e>
mov    0x2c6f(%rip),%rax
jmp    132e <parse_baud_rate+0x21e>
mov    0x2c7e(%rip),%rax
jmp    132e <parse_baud_rate+0x21e>
mov    0x2cd5(%rip),%rax
jmp    132e <parse_baud_rate+0x21e>
mov    0x2c9c(%rip),%rax
jmp    132e <parse_baud_rate+0x21e>
mov    0x2ceb(%rip),%rax
jmp    132e <parse_baud_rate+0x21e>
mov    0x2cf2(%rip),%rax
jmp    132e <parse_baud_rate+0x21e>
mov    0x2cb9(%rip),%rax
jmp    132e <parse_baud_rate+0x21e>
mov    0x2c58(%rip),%rax
jmp    132e <parse_baud_rate+0x21e>
mov    0x2c2f(%rip),%rax
jmp    132e <parse_baud_rate+0x21e>
mov    0x2c7e(%rip),%rax
jmp    132e <parse_baud_rate+0x21e>
mov    0x2ccd(%rip),%rax
jmp    132e <parse_baud_rate+0x21e>
mov    0x2c9c(%rip),%rax
jmp    132e <parse_baud_rate+0x21e>
mov    0x2c23(%rip),%rax
jmp    132e <parse_baud_rate+0x21e>
mov    0x2c4a(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@B300 = global i32 0
@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
@B0 = global i32 0
define i32 @parse_baud_rate(i8* nocapture %0) {
%2 = tail call i32 @atoi(i8* %0)
switch i32 %2, label %24 [
i32 300, label %25
i32 1200, label %3
i32 2400, label %4
i32 4800, label %5
i32 9600, label %6
i32 19200, label %7
i32 38400, label %8
i32 57600, label %9
i32 115200, label %10
i32 230400, label %11
i32 460800, label %12
i32 500000, label %13
i32 576000, label %14
i32 921600, label %15
i32 1000000, label %16
i32 1152000, label %17
i32 1500000, label %18
i32 2000000, label %19
i32 2500000, label %20
i32 3000000, label %21
i32 3500000, label %22
i32 4000000, label %23
]
3: ; preds = %1
br label %25
4: ; preds = %1
br label %25
5: ; preds = %1
br label %25
6: ; preds = %1
br label %25
7: ; preds = %1
br label %25
8: ; preds = %1
br label %25
9: ; preds = %1
br label %25
10: ; preds = %1
br label %25
11: ; preds = %1
br label %25
12: ; preds = %1
br label %25
13: ; preds = %1
br label %25
14: ; preds = %1
br label %25
15: ; preds = %1
br label %25
16: ; preds = %1
br label %25
17: ; preds = %1
br label %25
18: ; preds = %1
br label %25
19: ; preds = %1
br label %25
20: ; preds = %1
br label %25
21: ; preds = %1
br label %25
22: ; preds = %1
br label %25
23: ; preds = %1
br label %25
24: ; preds = %1
br label %25
25: ; preds = %1, %24, %23, %22, %21, %20, %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5, %4, %3
%26 = phi i32* [ @B0, %24 ], [ @B4000000, %23 ], [ @B3500000, %22 ], [ @B3000000, %21 ], [ @B2500000, %20 ], [ @B2000000, %19 ], [ @B1500000, %18 ], [ @B1152000, %17 ], [ @B1000000, %16 ], [ @B921600, %15 ], [ @B576000, %14 ], [ @B500000, %13 ], [ @B460800, %12 ], [ @B230400, %11 ], [ @B115200, %10 ], [ @B57600, %9 ], [ @B38400, %8 ], [ @B19200, %7 ], [ @B9600, %6 ], [ @B4800, %5 ], [ @B2400, %4 ], [ @B1200, %3 ], [ @B300, %1 ]
%27 = load i32, i32* %26
ret i32 %27
}