#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 B1200;
int B134;
int B150;
int B1800;
int B19200;
int B200;
int B2400;
int B300;
int B38400;
int B4800;
int B50;
int B600;
int B75;
int B9600;
int get_proper_baudrate(int baudrate) {
  switch (baudrate) {
  case 0:
    return B0;
  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;
  default:
    return -1;
  }
}


x86 assembly (clang, -O0):
<get_proper_baudrate>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
test   %eax,%eax
je     1231 <get_proper_baudrate+0x131>
jmp    111a <get_proper_baudrate+0x1a>
mov    -0xc(%rbp),%eax
sub    $0x32,%eax
je     1242 <get_proper_baudrate+0x142>
jmp    112b <get_proper_baudrate+0x2b>
mov    -0xc(%rbp),%eax
sub    $0x4b,%eax
je     1253 <get_proper_baudrate+0x153>
jmp    113c <get_proper_baudrate+0x3c>
mov    -0xc(%rbp),%eax
sub    $0x6e,%eax
je     1264 <get_proper_baudrate+0x164>
jmp    114d <get_proper_baudrate+0x4d>
mov    -0xc(%rbp),%eax
sub    $0x86,%eax
je     1275 <get_proper_baudrate+0x175>
jmp    1160 <get_proper_baudrate+0x60>
mov    -0xc(%rbp),%eax
sub    $0x96,%eax
je     1286 <get_proper_baudrate+0x186>
jmp    1173 <get_proper_baudrate+0x73>
mov    -0xc(%rbp),%eax
sub    $0xc8,%eax
je     1297 <get_proper_baudrate+0x197>
jmp    1186 <get_proper_baudrate+0x86>
mov    -0xc(%rbp),%eax
sub    $0x12c,%eax
je     12a8 <get_proper_baudrate+0x1a8>
jmp    1199 <get_proper_baudrate+0x99>
mov    -0xc(%rbp),%eax
sub    $0x258,%eax
je     12b9 <get_proper_baudrate+0x1b9>
jmp    11ac <get_proper_baudrate+0xac>
mov    -0xc(%rbp),%eax
sub    $0x4b0,%eax
je     12ca <get_proper_baudrate+0x1ca>
jmp    11bf <get_proper_baudrate+0xbf>
mov    -0xc(%rbp),%eax
sub    $0x708,%eax
je     12db <get_proper_baudrate+0x1db>
jmp    11d2 <get_proper_baudrate+0xd2>
mov    -0xc(%rbp),%eax
sub    $0x960,%eax
je     12ec <get_proper_baudrate+0x1ec>
jmp    11e5 <get_proper_baudrate+0xe5>
mov    -0xc(%rbp),%eax
sub    $0x12c0,%eax
je     12fd <get_proper_baudrate+0x1fd>
jmp    11f8 <get_proper_baudrate+0xf8>
mov    -0xc(%rbp),%eax
sub    $0x2580,%eax
je     130e <get_proper_baudrate+0x20e>
jmp    120b <get_proper_baudrate+0x10b>
mov    -0xc(%rbp),%eax
sub    $0x4b00,%eax
je     131f <get_proper_baudrate+0x21f>
jmp    121e <get_proper_baudrate+0x11e>
mov    -0xc(%rbp),%eax
sub    $0x9600,%eax
je     1330 <get_proper_baudrate+0x230>
jmp    1341 <get_proper_baudrate+0x241>
mov    0x2d58(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1348 <get_proper_baudrate+0x248>
mov    0x2d5f(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1348 <get_proper_baudrate+0x248>
mov    0x2d7e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1348 <get_proper_baudrate+0x248>
mov    0x2d75(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1348 <get_proper_baudrate+0x248>
mov    0x2d4c(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1348 <get_proper_baudrate+0x248>
mov    0x2ceb(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1348 <get_proper_baudrate+0x248>
mov    0x2d02(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1348 <get_proper_baudrate+0x248>
mov    0x2d01(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1348 <get_proper_baudrate+0x248>
mov    0x2d10(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1348 <get_proper_baudrate+0x248>
mov    0x2c9f(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1348 <get_proper_baudrate+0x248>
mov    0x2ca6(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1348 <get_proper_baudrate+0x248>
mov    0x2c8d(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1348 <get_proper_baudrate+0x248>
mov    0x2cbc(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1348 <get_proper_baudrate+0x248>
mov    0x2ca3(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1348 <get_proper_baudrate+0x248>
mov    0x2cca(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1348 <get_proper_baudrate+0x248>
mov    0x2c29(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1348 <get_proper_baudrate+0x248>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_proper_baudrate>:
mov    $0xffffffff,%eax
cmp    $0x257,%edi
jg     113b <get_proper_baudrate+0x3b>
cmp    $0x85,%edi
jg     1173 <get_proper_baudrate+0x73>
cmp    $0x4a,%edi
jg     11cf <get_proper_baudrate+0xcf>
test   %edi,%edi
je     123c <get_proper_baudrate+0x13c>
cmp    $0x32,%edi
jne    1284 <get_proper_baudrate+0x184>
mov    0x2e72(%rip),%rax
jmp    1282 <get_proper_baudrate+0x182>
cmp    $0x12bf,%edi
jg     11a3 <get_proper_baudrate+0xa3>
cmp    $0x707,%edi
jg     11ed <get_proper_baudrate+0xed>
cmp    $0x258,%edi
je     1245 <get_proper_baudrate+0x145>
cmp    $0x4b0,%edi
jne    1284 <get_proper_baudrate+0x184>
mov    0x2e02(%rip),%rax
jmp    1282 <get_proper_baudrate+0x182>
cmp    $0xc7,%edi
jg     120a <get_proper_baudrate+0x10a>
cmp    $0x86,%edi
je     124e <get_proper_baudrate+0x14e>
cmp    $0x96,%edi
jne    1284 <get_proper_baudrate+0x184>
mov    0x2dda(%rip),%rax
jmp    1282 <get_proper_baudrate+0x182>
cmp    $0x4aff,%edi
jg     1223 <get_proper_baudrate+0x123>
cmp    $0x12c0,%edi
je     1257 <get_proper_baudrate+0x157>
cmp    $0x2580,%edi
jne    1284 <get_proper_baudrate+0x184>
mov    0x2dee(%rip),%rax
jmp    1282 <get_proper_baudrate+0x182>
cmp    $0x4b,%edi
je     1260 <get_proper_baudrate+0x160>
cmp    $0x6e,%edi
jne    1284 <get_proper_baudrate+0x184>
mov    0x2df8(%rip),%rax
jmp    1282 <get_proper_baudrate+0x182>
cmp    $0x708,%edi
je     1269 <get_proper_baudrate+0x169>
cmp    $0x960,%edi
jne    1284 <get_proper_baudrate+0x184>
mov    0x2d78(%rip),%rax
jmp    1282 <get_proper_baudrate+0x182>
cmp    $0xc8,%edi
je     1272 <get_proper_baudrate+0x172>
cmp    $0x12c,%edi
jne    1284 <get_proper_baudrate+0x184>
mov    0x2d8f(%rip),%rax
jmp    1282 <get_proper_baudrate+0x182>
cmp    $0x4b00,%edi
je     127b <get_proper_baudrate+0x17b>
cmp    $0x9600,%edi
jne    1284 <get_proper_baudrate+0x184>
mov    0x2d26(%rip),%rax
jmp    1282 <get_proper_baudrate+0x182>
mov    0x2d4d(%rip),%rax
jmp    1282 <get_proper_baudrate+0x182>
mov    0x2d84(%rip),%rax
jmp    1282 <get_proper_baudrate+0x182>
mov    0x2d73(%rip),%rax
jmp    1282 <get_proper_baudrate+0x182>
mov    0x2d62(%rip),%rax
jmp    1282 <get_proper_baudrate+0x182>
mov    0x2d71(%rip),%rax
jmp    1282 <get_proper_baudrate+0x182>
mov    0x2d18(%rip),%rax
jmp    1282 <get_proper_baudrate+0x182>
mov    0x2d27(%rip),%rax
jmp    1282 <get_proper_baudrate+0x182>
mov    0x2d6e(%rip),%rax
mov    (%rax),%eax
ret

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

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