#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 */
unsigned int B110;
unsigned int B115200;
unsigned int B1200;
unsigned int B134;
unsigned int B150;
unsigned int B1800;
unsigned int B19200;
unsigned int B200;
unsigned int B2400;
unsigned int B300;
unsigned int B38400;
unsigned int B4800;
unsigned int B50;
unsigned int B57600;
unsigned int B600;
unsigned int B75;
unsigned int B9600;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, unsigned int);
unsigned num2baud(unsigned baud_rate) {
  unsigned BAUD;
  switch (baud_rate) {
  default:
    printf("%% baud rate %d not supported\n", baud_rate);
    exit(1);
  case 115200:
    BAUD = B115200;
    break;
  case 57600:
    BAUD = B57600;
    break;
  case 38400:
    BAUD = B38400;
    break;
  case 19200:
    BAUD = B19200;
    break;
  case 9600:
    BAUD = B9600;
    break;
  case 4800:
    BAUD = B4800;
    break;
  case 2400:
    BAUD = B2400;
    break;
  case 1800:
    BAUD = B1800;
    break;
  case 1200:
    BAUD = B1200;
    break;
  case 600:
    BAUD = B600;
    break;
  case 300:
    BAUD = B300;
    break;
  case 200:
    BAUD = B200;
    break;
  case 150:
    BAUD = B150;
    break;
  case 134:
    BAUD = B134;
    break;
  case 110:
    BAUD = B110;
    break;
  case 75:
    BAUD = B75;
    break;
  case 50:
    BAUD = B50;
    break;
  }
  return BAUD;
}


x86 assembly (clang, -O0):
<num2baud>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x32,%eax
je     1394 <num2baud+0x274>
jmp    113f <num2baud+0x1f>
mov    -0xc(%rbp),%eax
sub    $0x4b,%eax
je     1383 <num2baud+0x263>
jmp    1150 <num2baud+0x30>
mov    -0xc(%rbp),%eax
sub    $0x6e,%eax
je     1372 <num2baud+0x252>
jmp    1161 <num2baud+0x41>
mov    -0xc(%rbp),%eax
sub    $0x86,%eax
je     1361 <num2baud+0x241>
jmp    1174 <num2baud+0x54>
mov    -0xc(%rbp),%eax
sub    $0x96,%eax
je     1350 <num2baud+0x230>
jmp    1187 <num2baud+0x67>
mov    -0xc(%rbp),%eax
sub    $0xc8,%eax
je     133f <num2baud+0x21f>
jmp    119a <num2baud+0x7a>
mov    -0xc(%rbp),%eax
sub    $0x12c,%eax
je     132e <num2baud+0x20e>
jmp    11ad <num2baud+0x8d>
mov    -0xc(%rbp),%eax
sub    $0x258,%eax
je     131d <num2baud+0x1fd>
jmp    11c0 <num2baud+0xa0>
mov    -0xc(%rbp),%eax
sub    $0x4b0,%eax
je     130c <num2baud+0x1ec>
jmp    11d3 <num2baud+0xb3>
mov    -0xc(%rbp),%eax
sub    $0x708,%eax
je     12fb <num2baud+0x1db>
jmp    11e6 <num2baud+0xc6>
mov    -0xc(%rbp),%eax
sub    $0x960,%eax
je     12ea <num2baud+0x1ca>
jmp    11f9 <num2baud+0xd9>
mov    -0xc(%rbp),%eax
sub    $0x12c0,%eax
je     12d9 <num2baud+0x1b9>
jmp    120c <num2baud+0xec>
mov    -0xc(%rbp),%eax
sub    $0x2580,%eax
je     12c8 <num2baud+0x1a8>
jmp    121f <num2baud+0xff>
mov    -0xc(%rbp),%eax
sub    $0x4b00,%eax
je     12b7 <num2baud+0x197>
jmp    1232 <num2baud+0x112>
mov    -0xc(%rbp),%eax
sub    $0x9600,%eax
je     12a6 <num2baud+0x186>
jmp    1245 <num2baud+0x125>
mov    -0xc(%rbp),%eax
sub    $0xe100,%eax
je     1295 <num2baud+0x175>
jmp    1258 <num2baud+0x138>
mov    -0xc(%rbp),%eax
sub    $0x1c200,%eax
je     1284 <num2baud+0x164>
jmp    126b <num2baud+0x14b>
mov    -0x4(%rbp),%esi
lea    0xd8b(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
mov    0x2cdd(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
jmp    13a0 <num2baud+0x280>
mov    0x2cfc(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
jmp    13a0 <num2baud+0x280>
mov    0x2cab(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
jmp    13a0 <num2baud+0x280>
mov    0x2d32(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
jmp    13a0 <num2baud+0x280>
mov    0x2ce9(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
jmp    13a0 <num2baud+0x280>
mov    0x2ce0(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
jmp    13a0 <num2baud+0x280>
mov    0x2c8f(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
jmp    13a0 <num2baud+0x280>
mov    0x2c86(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
jmp    13a0 <num2baud+0x280>
mov    0x2c5d(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
jmp    13a0 <num2baud+0x280>
mov    0x2cac(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
jmp    13a0 <num2baud+0x280>
mov    0x2c7b(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
jmp    13a0 <num2baud+0x280>
mov    0x2c5a(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
jmp    13a0 <num2baud+0x280>
mov    0x2c21(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
jmp    13a0 <num2baud+0x280>
mov    0x2c60(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
jmp    13a0 <num2baud+0x280>
mov    0x2c67(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
jmp    13a0 <num2baud+0x280>
mov    0x2c4e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
jmp    13a0 <num2baud+0x280>
mov    0x2c0d(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<num2baud>:
push   %rax
mov    %edi,%esi
cmp    $0x4af,%edi
jle    1173 <num2baud+0x53>
cmp    $0x257f,%esi
jle    11ca <num2baud+0xaa>
cmp    $0x95ff,%esi
jle    123f <num2baud+0x11f>
cmp    $0x9600,%esi
je     1271 <num2baud+0x151>
cmp    $0xe100,%esi
je     127a <num2baud+0x15a>
cmp    $0x1c200,%esi
jne    12c4 <num2baud+0x1a4>
mov    0x2dfa(%rip),%rax
jmp    12c0 <num2baud+0x1a0>
cmp    $0x95,%esi
jg     119e <num2baud+0x7e>
cmp    $0x6d,%esi
jg     11fa <num2baud+0xda>
cmp    $0x32,%esi
je     1283 <num2baud+0x163>
cmp    $0x4b,%esi
jne    12c4 <num2baud+0x1a4>
mov    0x2e3f(%rip),%rax
jmp    12c0 <num2baud+0x1a0>
cmp    $0x12b,%esi
jg     121b <num2baud+0xfb>
cmp    $0x96,%esi
je     128c <num2baud+0x16c>
cmp    $0xc8,%esi
jne    12c4 <num2baud+0x1a4>
mov    0x2ddb(%rip),%rax
jmp    12c0 <num2baud+0x1a0>
cmp    $0x95f,%esi
jg     1258 <num2baud+0x138>
cmp    $0x4b0,%esi
je     1295 <num2baud+0x175>
cmp    $0x708,%esi
jne    12c4 <num2baud+0x1a4>
mov    0x2d93(%rip),%rax
jmp    12c0 <num2baud+0x1a0>
cmp    $0x6e,%esi
je     129e <num2baud+0x17e>
cmp    $0x86,%esi
jne    12c4 <num2baud+0x1a4>
mov    0x2db2(%rip),%rax
jmp    12c0 <num2baud+0x1a0>
cmp    $0x12c,%esi
je     12a7 <num2baud+0x187>
cmp    $0x258,%esi
jne    12c4 <num2baud+0x1a4>
mov    0x2d96(%rip),%rax
jmp    12c0 <num2baud+0x1a0>
cmp    $0x2580,%esi
je     12b0 <num2baud+0x190>
cmp    $0x4b00,%esi
jne    12c4 <num2baud+0x1a4>
mov    0x2d9a(%rip),%rax
jmp    12c0 <num2baud+0x1a0>
cmp    $0x960,%esi
je     12b9 <num2baud+0x199>
cmp    $0x12c0,%esi
jne    12c4 <num2baud+0x1a4>
mov    0x2d51(%rip),%rax
jmp    12c0 <num2baud+0x1a0>
mov    0x2ce0(%rip),%rax
jmp    12c0 <num2baud+0x1a0>
mov    0x2d17(%rip),%rax
jmp    12c0 <num2baud+0x1a0>
mov    0x2d1e(%rip),%rax
jmp    12c0 <num2baud+0x1a0>
mov    0x2ce5(%rip),%rax
jmp    12c0 <num2baud+0x1a0>
mov    0x2cd4(%rip),%rax
jmp    12c0 <num2baud+0x1a0>
mov    0x2d3b(%rip),%rax
jmp    12c0 <num2baud+0x1a0>
mov    0x2d02(%rip),%rax
jmp    12c0 <num2baud+0x1a0>
mov    0x2d01(%rip),%rax
jmp    12c0 <num2baud+0x1a0>
mov    0x2cc0(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret
lea    0xd35(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [31 x i8] c"%% baud rate %d not supported\0A\00"
@B115200 = global i32 0
@B57600 = global i32 0
@B38400 = global i32 0
@B19200 = global i32 0
@B9600 = global i32 0
@B4800 = global i32 0
@B2400 = global i32 0
@B1800 = global i32 0
@B1200 = global i32 0
@B600 = global i32 0
@B300 = global i32 0
@B200 = global i32 0
@B150 = global i32 0
@B134 = global i32 0
@B110 = global i32 0
@B75 = global i32 0
@B50 = global i32 0
define i32 @num2baud(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
switch i32 %4, label %5 [
i32 115200, label %9
i32 57600, label %11
i32 38400, label %13
i32 19200, label %15
i32 9600, label %17
i32 4800, label %19
i32 2400, label %21
i32 1800, label %23
i32 1200, label %25
i32 600, label %27
i32 300, label %29
i32 200, label %31
i32 150, label %33
i32 134, label %35
i32 110, label %37
i32 75, label %39
i32 50, label %41
]
5: ; preds = %1
%6 = load i32, i32* %2
%7 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = call i32 @exit(i32 1)
unreachable
9: ; preds = %1
%10 = load i32, i32* @B115200
store i32 %10, i32* %3
br label %43
11: ; preds = %1
%12 = load i32, i32* @B57600
store i32 %12, i32* %3
br label %43
13: ; preds = %1
%14 = load i32, i32* @B38400
store i32 %14, i32* %3
br label %43
15: ; preds = %1
%16 = load i32, i32* @B19200
store i32 %16, i32* %3
br label %43
17: ; preds = %1
%18 = load i32, i32* @B9600
store i32 %18, i32* %3
br label %43
19: ; preds = %1
%20 = load i32, i32* @B4800
store i32 %20, i32* %3
br label %43
21: ; preds = %1
%22 = load i32, i32* @B2400
store i32 %22, i32* %3
br label %43
23: ; preds = %1
%24 = load i32, i32* @B1800
store i32 %24, i32* %3
br label %43
25: ; preds = %1
%26 = load i32, i32* @B1200
store i32 %26, i32* %3
br label %43
27: ; preds = %1
%28 = load i32, i32* @B600
store i32 %28, i32* %3
br label %43
29: ; preds = %1
%30 = load i32, i32* @B300
store i32 %30, i32* %3
br label %43
31: ; preds = %1
%32 = load i32, i32* @B200
store i32 %32, i32* %3
br label %43
33: ; preds = %1
%34 = load i32, i32* @B150
store i32 %34, i32* %3
br label %43
35: ; preds = %1
%36 = load i32, i32* @B134
store i32 %36, i32* %3
br label %43
37: ; preds = %1
%38 = load i32, i32* @B110
store i32 %38, i32* %3
br label %43
39: ; preds = %1
%40 = load i32, i32* @B75
store i32 %40, i32* %3
br label %43
41: ; preds = %1
%42 = load i32, i32* @B50
store i32 %42, i32* %3
br label %43
43: ; preds = %41, %39, %37, %35, %33, %31, %29, %27, %25, %23, %21, %19, %17, %15, %13, %11, %9
%44 = load i32, i32* %3
ret i32 %44
}

LLVM IR (-O2):
@.str = [31 x i8] c"%% baud rate %d not supported\0A\00"
@B115200 = global i32 0
@B57600 = global i32 0
@B38400 = global i32 0
@B19200 = global i32 0
@B9600 = global i32 0
@B4800 = global i32 0
@B2400 = global i32 0
@B1800 = global i32 0
@B1200 = global i32 0
@B600 = global i32 0
@B300 = global i32 0
@B200 = global i32 0
@B150 = global i32 0
@B134 = global i32 0
@B110 = global i32 0
@B75 = global i32 0
@B50 = global i32 0
define i32 @num2baud(i32 %0) {
switch i32 %0, label %2 [
i32 115200, label %21
i32 57600, label %5
i32 38400, label %6
i32 19200, label %7
i32 9600, label %8
i32 4800, label %9
i32 2400, label %10
i32 1800, label %11
i32 1200, label %12
i32 600, label %13
i32 300, label %14
i32 200, label %15
i32 150, label %16
i32 134, label %17
i32 110, label %18
i32 75, label %19
i32 50, label %20
]
2: ; preds = %1
%3 = tail call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %0)
%4 = tail call i32 @exit(i32 1)
unreachable
5: ; preds = %1
br label %21
6: ; preds = %1
br label %21
7: ; preds = %1
br label %21
8: ; preds = %1
br label %21
9: ; preds = %1
br label %21
10: ; preds = %1
br label %21
11: ; preds = %1
br label %21
12: ; preds = %1
br label %21
13: ; preds = %1
br label %21
14: ; preds = %1
br label %21
15: ; preds = %1
br label %21
16: ; preds = %1
br label %21
17: ; preds = %1
br label %21
18: ; preds = %1
br label %21
19: ; preds = %1
br label %21
20: ; preds = %1
br label %21
21: ; preds = %1, %20, %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5
%22 = phi i32* [ @B50, %20 ], [ @B75, %19 ], [ @B110, %18 ], [ @B134, %17 ], [ @B150, %16 ], [ @B200, %15 ], [ @B300, %14 ], [ @B600, %13 ], [ @B1200, %12 ], [ @B1800, %11 ], [ @B2400, %10 ], [ @B4800, %9 ], [ @B9600, %8 ], [ @B19200, %7 ], [ @B38400, %6 ], [ @B57600, %5 ], [ @B115200, %1 ]
%23 = load i32, i32* %22
ret i32 %23
}