#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 */
struct termios {
  int c_lflag;
  int c_cflag;
  scalar_t__ *c_cc;
  scalar_t__ c_oflag;
  int /*<<< orphan*/ c_iflag;
};

/* Variables and functions */
int B1000000;
int B110;
int B115200;
int B1152000;
int B1200;
int B134;
int B150;
int B1500000;
int B1800;
int B19200;
int B200;
int B2000000;
int B230400;
int B2400;
int B2500000;
int B300;
int B3000000;
int B3500000;
int B38400;
int B4000000;
int B460800;
int B4800;
int B50;
int B500000;
int B57600;
int B576000;
int B600;
int B75;
int B921600;
int B9600;
int CLOCAL;
int CREAD;
int CRTSCTS;
int CS8;
int CSIZE;
int CSTOPB;
int ECHO;
int ECHOE;
int ICANON;
int /*<<< orphan*/ IGNPAR;
int ISIG;
int O_NDELAY;
int O_NOCTTY;
int O_RDWR;
int PARENB;
int /*<<< orphan*/ TCIFLUSH;
int /*<<< orphan*/ TCSANOW;
size_t VMIN;
size_t VTIME;
int /*<<< orphan*/ exit(int);
int open(char *, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ tcflush(int, int /*<<< orphan*/);
int /*<<< orphan*/ tcgetattr(int, struct termios *);
int /*<<< orphan*/ tcsetattr(int, int /*<<< orphan*/, struct termios *);
int open_serial_port(char *port_string, int baud) {
  struct termios options;
  int fd;
  fd = open(port_string, O_RDWR | O_NOCTTY | O_NDELAY);
  if (fd == -1) {
    printf("Could Not Open %s\n", port_string);
    return (-1);
  }
  tcgetattr(fd, &options);
  options.c_iflag = IGNPAR;
  options.c_oflag = 0;
  options.c_lflag = 0;
  options.c_cflag = CLOCAL | CREAD | CS8;
  switch (baud) {
  case 50:
    options.c_cflag |= B50;
    break;
  case 75:
    options.c_cflag |= B75;
    break;
  case 110:
    options.c_cflag |= B110;
    break;
  case 134:
    options.c_cflag |= B134;
    break;
  case 150:
    options.c_cflag |= B150;
    break;
  case 200:
    options.c_cflag |= B200;
    break;
  case 300:
    options.c_cflag |= B300;
    break;
  case 600:
    options.c_cflag |= B600;
    break;
  case 1200:
    options.c_cflag |= B1200;
    break;
  case 1800:
    options.c_cflag |= B1800;
    break;
  case 2400:
    options.c_cflag |= B2400;
    break;
  case 4800:
    options.c_cflag |= B4800;
    break;
  case 9600:
    options.c_cflag |= B9600;
    break;
  case 19200:
    options.c_cflag |= B19200;
    break;
  case 38400:
    options.c_cflag |= B38400;
    break;
  case 57600:
    options.c_cflag |= B57600;
    break;
  case 115200:
    options.c_cflag |= B115200;
    break;
  case 230400:
    options.c_cflag |= B230400;
    break;
  case 460800:
    options.c_cflag |= B460800;
    break;
  case 500000:
    options.c_cflag |= B500000;
    break;
  case 576000:
    options.c_cflag |= B576000;
    break;
  case 921600:
    options.c_cflag |= B921600;
    break;
  case 1000000:
    options.c_cflag |= B1000000;
    break;
  case 1152000:
    options.c_cflag |= B1152000;
    break;
  case 1500000:
    options.c_cflag |= B1500000;
    break;
  case 2000000:
    options.c_cflag |= B2000000;
    break;
  case 2500000:
    options.c_cflag |= B2500000;
    break;
  case 3000000:
    options.c_cflag |= B3000000;
    break;
  case 3500000:
    options.c_cflag |= B3500000;
    break;
  case 4000000:
    options.c_cflag |= B4000000;
    break;
  default:
    printf("Error: Invalid Baud Rate, %d\n", baud);
    exit(1);
  }
  tcflush(fd, TCIFLUSH);
  options.c_cflag &= ~PARENB;
  options.c_cflag &= ~CSTOPB;
  options.c_cflag &= ~CSIZE;
  options.c_cflag |= CS8;
  options.c_cflag &= ~CRTSCTS;
  options.c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG);
  options.c_cflag |= (CLOCAL | CREAD);
  options.c_cc[VMIN] = 0;
  options.c_cc[VTIME] = 0;
  tcsetattr(fd, TCSANOW, &options);
  return (fd);
}


x86 assembly (clang, -O0):
<open_serial_port>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    0x2e66(%rip),%rax
mov    (%rax),%esi
mov    0x2d65(%rip),%rax
or     (%rax),%esi
mov    0x2d3c(%rip),%rax
or     (%rax),%esi
call   2070 <open@plt>
mov    %eax,-0x3c(%rbp)
cmpl   $0xffffffff,-0x3c(%rbp)
jne    21be <open_serial_port+0x5e>
mov    -0x10(%rbp),%rsi
lea    0xe55(%rip),%rdi
mov    $0x0,%al
call   2040 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    27a5 <open_serial_port+0x645>
mov    -0x3c(%rbp),%edi
lea    -0x38(%rbp),%rsi
call   2050 <tcgetattr@plt>
mov    0x2cc7(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x20(%rbp)
movq   $0x0,-0x28(%rbp)
movl   $0x0,-0x38(%rbp)
mov    0x2c74(%rip),%rax
mov    (%rax),%eax
mov    0x2d63(%rip),%rcx
mov    (%rcx),%ecx
or     %ecx,%eax
mov    0x2d50(%rip),%rcx
mov    (%rcx),%ecx
or     %ecx,%eax
mov    %eax,-0x34(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x40(%rbp)
sub    $0x32,%eax
je     243e <open_serial_port+0x2de>
jmp    221b <open_serial_port+0xbb>
mov    -0x40(%rbp),%eax
sub    $0x4b,%eax
je     2452 <open_serial_port+0x2f2>
jmp    222c <open_serial_port+0xcc>
mov    -0x40(%rbp),%eax
sub    $0x6e,%eax
je     2466 <open_serial_port+0x306>
jmp    223d <open_serial_port+0xdd>
mov    -0x40(%rbp),%eax
sub    $0x86,%eax
je     247a <open_serial_port+0x31a>
jmp    2250 <open_serial_port+0xf0>
mov    -0x40(%rbp),%eax
sub    $0x96,%eax
je     248e <open_serial_port+0x32e>
jmp    2263 <open_serial_port+0x103>
mov    -0x40(%rbp),%eax
sub    $0xc8,%eax
je     24a2 <open_serial_port+0x342>
jmp    2276 <open_serial_port+0x116>
mov    -0x40(%rbp),%eax
sub    $0x12c,%eax
je     24b6 <open_serial_port+0x356>
jmp    2289 <open_serial_port+0x129>
mov    -0x40(%rbp),%eax
sub    $0x258,%eax
je     24ca <open_serial_port+0x36a>
jmp    229c <open_serial_port+0x13c>
mov    -0x40(%rbp),%eax
sub    $0x4b0,%eax
je     24de <open_serial_port+0x37e>
jmp    22af <open_serial_port+0x14f>
mov    -0x40(%rbp),%eax
sub    $0x708,%eax
je     24f2 <open_serial_port+0x392>
jmp    22c2 <open_serial_port+0x162>
mov    -0x40(%rbp),%eax
sub    $0x960,%eax
je     2506 <open_serial_port+0x3a6>
jmp    22d5 <open_serial_port+0x175>
mov    -0x40(%rbp),%eax
sub    $0x12c0,%eax
je     251a <open_serial_port+0x3ba>
jmp    22e8 <open_serial_port+0x188>
mov    -0x40(%rbp),%eax
sub    $0x2580,%eax
je     252e <open_serial_port+0x3ce>
jmp    22fb <open_serial_port+0x19b>
mov    -0x40(%rbp),%eax
sub    $0x4b00,%eax
je     2542 <open_serial_port+0x3e2>
jmp    230e <open_serial_port+0x1ae>
mov    -0x40(%rbp),%eax
sub    $0x9600,%eax
je     2556 <open_serial_port+0x3f6>
jmp    2321 <open_serial_port+0x1c1>
mov    -0x40(%rbp),%eax
sub    $0xe100,%eax
je     256a <open_serial_port+0x40a>
jmp    2334 <open_serial_port+0x1d4>
mov    -0x40(%rbp),%eax
sub    $0x1c200,%eax
je     257e <open_serial_port+0x41e>
jmp    2347 <open_serial_port+0x1e7>
mov    -0x40(%rbp),%eax
sub    $0x38400,%eax
je     2592 <open_serial_port+0x432>
jmp    235a <open_serial_port+0x1fa>
mov    -0x40(%rbp),%eax
sub    $0x70800,%eax
je     25a6 <open_serial_port+0x446>
jmp    236d <open_serial_port+0x20d>
mov    -0x40(%rbp),%eax
sub    $0x7a120,%eax
je     25ba <open_serial_port+0x45a>
jmp    2380 <open_serial_port+0x220>
mov    -0x40(%rbp),%eax
sub    $0x8ca00,%eax
je     25ce <open_serial_port+0x46e>
jmp    2393 <open_serial_port+0x233>
mov    -0x40(%rbp),%eax
sub    $0xe1000,%eax
je     25e2 <open_serial_port+0x482>
jmp    23a6 <open_serial_port+0x246>
mov    -0x40(%rbp),%eax
sub    $0xf4240,%eax
je     25f6 <open_serial_port+0x496>
jmp    23b9 <open_serial_port+0x259>
mov    -0x40(%rbp),%eax
sub    $0x119400,%eax
je     260a <open_serial_port+0x4aa>
jmp    23cc <open_serial_port+0x26c>
mov    -0x40(%rbp),%eax
sub    $0x16e360,%eax
je     261e <open_serial_port+0x4be>
jmp    23df <open_serial_port+0x27f>
mov    -0x40(%rbp),%eax
sub    $0x1e8480,%eax
je     2632 <open_serial_port+0x4d2>
jmp    23f2 <open_serial_port+0x292>
mov    -0x40(%rbp),%eax
sub    $0x2625a0,%eax
je     2646 <open_serial_port+0x4e6>
jmp    2405 <open_serial_port+0x2a5>
mov    -0x40(%rbp),%eax
sub    $0x2dc6c0,%eax
je     265a <open_serial_port+0x4fa>
jmp    2418 <open_serial_port+0x2b8>
mov    -0x40(%rbp),%eax
sub    $0x3567e0,%eax
je     266e <open_serial_port+0x50e>
jmp    242b <open_serial_port+0x2cb>
mov    -0x40(%rbp),%eax
sub    $0x3d0900,%eax
je     2682 <open_serial_port+0x522>
jmp    2696 <open_serial_port+0x536>
mov    0x2b1b(%rip),%rax
mov    (%rax),%eax
or     -0x34(%rbp),%eax
mov    %eax,-0x34(%rbp)
jmp    26b1 <open_serial_port+0x551>
mov    0x2b77(%rip),%rax
mov    (%rax),%eax
or     -0x34(%rbp),%eax
mov    %eax,-0x34(%rbp)
jmp    26b1 <open_serial_port+0x551>
mov    0x2b6b(%rip),%rax
mov    (%rax),%eax
or     -0x34(%rbp),%eax
mov    %eax,-0x34(%rbp)
jmp    26b1 <open_serial_port+0x551>
mov    0x2b07(%rip),%rax
mov    (%rax),%eax
or     -0x34(%rbp),%eax
mov    %eax,-0x34(%rbp)
jmp    26b1 <open_serial_port+0x551>
mov    0x2a43(%rip),%rax
mov    (%rax),%eax
or     -0x34(%rbp),%eax
mov    %eax,-0x34(%rbp)
jmp    26b1 <open_serial_port+0x551>
mov    0x2a9f(%rip),%rax
mov    (%rax),%eax
or     -0x34(%rbp),%eax
mov    %eax,-0x34(%rbp)
jmp    26b1 <open_serial_port+0x551>
mov    0x2aab(%rip),%rax
mov    (%rax),%eax
or     -0x34(%rbp),%eax
mov    %eax,-0x34(%rbp)
jmp    26b1 <open_serial_port+0x551>
mov    0x2adf(%rip),%rax
mov    (%rax),%eax
or     -0x34(%rbp),%eax
mov    %eax,-0x34(%rbp)
jmp    26b1 <open_serial_port+0x551>
mov    0x29d3(%rip),%rax
mov    (%rax),%eax
or     -0x34(%rbp),%eax
mov    %eax,-0x34(%rbp)
jmp    26b1 <open_serial_port+0x551>
mov    0x29ff(%rip),%rax
mov    (%rax),%eax
or     -0x34(%rbp),%eax
mov    %eax,-0x34(%rbp)
jmp    26b1 <open_serial_port+0x551>
mov    0x29d3(%rip),%rax
mov    (%rax),%eax
or     -0x34(%rbp),%eax
mov    %eax,-0x34(%rbp)
jmp    26b1 <open_serial_port+0x551>
mov    0x2a57(%rip),%rax
mov    (%rax),%eax
or     -0x34(%rbp),%eax
mov    %eax,-0x34(%rbp)
jmp    26b1 <open_serial_port+0x551>
mov    0x2a3b(%rip),%rax
mov    (%rax),%eax
or     -0x34(%rbp),%eax
mov    %eax,-0x34(%rbp)
jmp    26b1 <open_serial_port+0x551>
mov    0x2aa7(%rip),%rax
mov    (%rax),%eax
or     -0x34(%rbp),%eax
mov    %eax,-0x34(%rbp)
jmp    26b1 <open_serial_port+0x551>
mov    0x28fb(%rip),%rax
mov    (%rax),%eax
or     -0x34(%rbp),%eax
mov    %eax,-0x34(%rbp)
jmp    26b1 <open_serial_port+0x551>
mov    0x29a7(%rip),%rax
mov    (%rax),%eax
or     -0x34(%rbp),%eax
mov    %eax,-0x34(%rbp)
jmp    26b1 <open_serial_port+0x551>
mov    0x292b(%rip),%rax
mov    (%rax),%eax
or     -0x34(%rbp),%eax
mov    %eax,-0x34(%rbp)
jmp    26b1 <open_serial_port+0x551>
mov    0x28d7(%rip),%rax
mov    (%rax),%eax
or     -0x34(%rbp),%eax
mov    %eax,-0x34(%rbp)
jmp    26b1 <open_serial_port+0x551>
mov    0x2913(%rip),%rax
mov    (%rax),%eax
or     -0x34(%rbp),%eax
mov    %eax,-0x34(%rbp)
jmp    26b1 <open_serial_port+0x551>
mov    0x28df(%rip),%rax
mov    (%rax),%eax
or     -0x34(%rbp),%eax
mov    %eax,-0x34(%rbp)
jmp    26b1 <open_serial_port+0x551>
mov    0x29ab(%rip),%rax
mov    (%rax),%eax
or     -0x34(%rbp),%eax
mov    %eax,-0x34(%rbp)
jmp    26b1 <open_serial_port+0x551>
mov    0x29af(%rip),%rax
mov    (%rax),%eax
or     -0x34(%rbp),%eax
mov    %eax,-0x34(%rbp)
jmp    26b1 <open_serial_port+0x551>
mov    0x292b(%rip),%rax
mov    (%rax),%eax
or     -0x34(%rbp),%eax
mov    %eax,-0x34(%rbp)
jmp    26b1 <open_serial_port+0x551>
mov    0x28bf(%rip),%rax
mov    (%rax),%eax
or     -0x34(%rbp),%eax
mov    %eax,-0x34(%rbp)
jmp    26b1 <open_serial_port+0x551>
mov    0x286b(%rip),%rax
mov    (%rax),%eax
or     -0x34(%rbp),%eax
mov    %eax,-0x34(%rbp)
jmp    26b1 <open_serial_port+0x551>
mov    0x28e7(%rip),%rax
mov    (%rax),%eax
or     -0x34(%rbp),%eax
mov    %eax,-0x34(%rbp)
jmp    26b1 <open_serial_port+0x551>
mov    0x28e3(%rip),%rax
mov    (%rax),%eax
or     -0x34(%rbp),%eax
mov    %eax,-0x34(%rbp)
jmp    26b1 <open_serial_port+0x551>
mov    0x28a7(%rip),%rax
mov    (%rax),%eax
or     -0x34(%rbp),%eax
mov    %eax,-0x34(%rbp)
jmp    26b1 <open_serial_port+0x551>
mov    0x2953(%rip),%rax
mov    (%rax),%eax
or     -0x34(%rbp),%eax
mov    %eax,-0x34(%rbp)
jmp    26b1 <open_serial_port+0x551>
mov    0x2887(%rip),%rax
mov    (%rax),%eax
or     -0x34(%rbp),%eax
mov    %eax,-0x34(%rbp)
jmp    26b1 <open_serial_port+0x551>
mov    -0x14(%rbp),%esi
lea    0x973(%rip),%rdi
mov    $0x0,%al
call   2040 <printf@plt>
mov    $0x1,%edi
call   2080 <exit@plt>
mov    -0x3c(%rbp),%edi
mov    0x2835(%rip),%rax
mov    (%rax),%esi
call   2030 <tcflush@plt>
mov    0x28f7(%rip),%rax
mov    (%rax),%eax
xor    $0xffffffff,%eax
and    -0x34(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    0x278d(%rip),%rax
mov    (%rax),%eax
xor    $0xffffffff,%eax
and    -0x34(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    0x284b(%rip),%rax
mov    (%rax),%eax
xor    $0xffffffff,%eax
and    -0x34(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    0x2851(%rip),%rax
mov    (%rax),%eax
or     -0x34(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    0x276a(%rip),%rax
mov    (%rax),%eax
xor    $0xffffffff,%eax
and    -0x34(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    0x2768(%rip),%rax
mov    (%rax),%eax
mov    0x287f(%rip),%rcx
or     (%rcx),%eax
mov    0x286e(%rip),%rcx
or     (%rcx),%eax
mov    0x2855(%rip),%rcx
or     (%rcx),%eax
xor    $0xffffffff,%eax
and    -0x38(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    0x2713(%rip),%rax
mov    (%rax),%eax
mov    0x2802(%rip),%rcx
or     (%rcx),%eax
or     -0x34(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x30(%rbp),%rax
mov    0x27d7(%rip),%rcx
mov    (%rcx),%rcx
movq   $0x0,(%rax,%rcx,8)
mov    -0x30(%rbp),%rax
mov    0x2729(%rip),%rcx
mov    (%rcx),%rcx
movq   $0x0,(%rax,%rcx,8)
mov    -0x3c(%rbp),%edi
mov    0x2824(%rip),%rax
mov    (%rax),%esi
lea    -0x38(%rbp),%rdx
call   2060 <tcsetattr@plt>
mov    -0x3c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<open_serial_port>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x20,%rsp
mov    0x2e6d(%rip),%rcx
mov    0x2d6e(%rip),%rax
mov    (%rax),%eax
or     (%rcx),%eax
mov    %esi,%ebp
mov    %rdi,%rbx
mov    0x2d3e(%rip),%rcx
or     (%rcx),%eax
mov    %eax,%esi
call   2070 <open@plt>
mov    %eax,%r14d
cmp    $0xffffffff,%eax
je     2239 <open_serial_port+0xd9>
mov    %rsp,%rsi
mov    %r14d,%edi
call   2050 <tcgetattr@plt>
mov    0x2ce7(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x18(%rsp)
movq   $0x0,0x10(%rsp)
movl   $0x0,(%rsp)
mov    0x2c92(%rip),%r12
mov    0x2d83(%rip),%r15
mov    (%r15),%eax
or     (%r12),%eax
mov    0x2d6d(%rip),%rbx
or     (%rbx),%eax
mov    %eax,0x4(%rsp)
cmp    $0xe0ff,%ebp
jg     224f <open_serial_port+0xef>
cmp    $0x257,%ebp
jle    2293 <open_serial_port+0x133>
cmp    $0x12bf,%ebp
jg     230b <open_serial_port+0x1ab>
cmp    $0x707,%ebp
jg     23c2 <open_serial_port+0x262>
cmp    $0x258,%ebp
je     249a <open_serial_port+0x33a>
cmp    $0x4b0,%ebp
jne    25f3 <open_serial_port+0x493>
mov    0x2c84(%rip),%rcx
jmp    252b <open_serial_port+0x3cb>
lea    0xdc0(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   2040 <printf@plt>
jmp    25e3 <open_serial_port+0x483>
cmp    $0xf423f,%ebp
jle    22cf <open_serial_port+0x16f>
cmp    $0x26259f,%ebp
jg     233b <open_serial_port+0x1db>
cmp    $0x16e35f,%ebp
jg     23e6 <open_serial_port+0x286>
cmp    $0xf4240,%ebp
je     24a6 <open_serial_port+0x346>
cmp    $0x119400,%ebp
jne    25f3 <open_serial_port+0x493>
mov    0x2c42(%rip),%rcx
jmp    252b <open_serial_port+0x3cb>
cmp    $0x85,%ebp
jle    236b <open_serial_port+0x20b>
cmp    $0xc7,%ebp
jg     240a <open_serial_port+0x2aa>
cmp    $0x86,%ebp
je     24af <open_serial_port+0x34f>
cmp    $0x96,%ebp
jne    25f3 <open_serial_port+0x493>
mov    0x2c0e(%rip),%rcx
jmp    252b <open_serial_port+0x3cb>
cmp    $0x707ff,%ebp
jle    2392 <open_serial_port+0x232>
cmp    $0x8c9ff,%ebp
jg     242e <open_serial_port+0x2ce>
cmp    $0x70800,%ebp
je     24b8 <open_serial_port+0x358>
cmp    $0x7a120,%ebp
jne    25f3 <open_serial_port+0x493>
mov    0x2b9a(%rip),%rcx
jmp    252b <open_serial_port+0x3cb>
cmp    $0x4aff,%ebp
jg     2452 <open_serial_port+0x2f2>
cmp    $0x12c0,%ebp
je     24c1 <open_serial_port+0x361>
cmp    $0x2580,%ebp
jne    25f3 <open_serial_port+0x493>
mov    0x2c3a(%rip),%rcx
jmp    252b <open_serial_port+0x3cb>
cmp    $0x3567df,%ebp
jg     2476 <open_serial_port+0x316>
cmp    $0x2625a0,%ebp
je     24ca <open_serial_port+0x36a>
cmp    $0x2dc6c0,%ebp
jne    25f3 <open_serial_port+0x493>
mov    0x2ba2(%rip),%rcx
jmp    252b <open_serial_port+0x3cb>
cmp    $0x32,%ebp
je     24d3 <open_serial_port+0x373>
cmp    $0x4b,%ebp
je     24dc <open_serial_port+0x37c>
cmp    $0x6e,%ebp
jne    25f3 <open_serial_port+0x493>
mov    0x2c4b(%rip),%rcx
jmp    252b <open_serial_port+0x3cb>
cmp    $0xe100,%ebp
je     24e5 <open_serial_port+0x385>
cmp    $0x1c200,%ebp
je     24ee <open_serial_port+0x38e>
cmp    $0x38400,%ebp
jne    25f3 <open_serial_port+0x493>
mov    0x2ab3(%rip),%rcx
jmp    252b <open_serial_port+0x3cb>
cmp    $0x708,%ebp
je     24f7 <open_serial_port+0x397>
cmp    $0x960,%ebp
jne    25f3 <open_serial_port+0x493>
mov    0x2aff(%rip),%rcx
jmp    252b <open_serial_port+0x3cb>
cmp    $0x16e360,%ebp
je     2500 <open_serial_port+0x3a0>
cmp    $0x1e8480,%ebp
jne    25f3 <open_serial_port+0x493>
mov    0x2b1b(%rip),%rcx
jmp    252b <open_serial_port+0x3cb>
cmp    $0xc8,%ebp
je     2509 <open_serial_port+0x3a9>
cmp    $0x12c,%ebp
jne    25f3 <open_serial_port+0x493>
mov    0x2b3f(%rip),%rcx
jmp    252b <open_serial_port+0x3cb>
cmp    $0x8ca00,%ebp
je     2512 <open_serial_port+0x3b2>
cmp    $0xe1000,%ebp
jne    25f3 <open_serial_port+0x493>
mov    0x2b4b(%rip),%rcx
jmp    252b <open_serial_port+0x3cb>
cmp    $0x4b00,%ebp
je     251b <open_serial_port+0x3bb>
cmp    $0x9600,%ebp
jne    25f3 <open_serial_port+0x493>
mov    0x29e7(%rip),%rcx
jmp    252b <open_serial_port+0x3cb>
cmp    $0x3567e0,%ebp
je     2524 <open_serial_port+0x3c4>
cmp    $0x3d0900,%ebp
jne    25f3 <open_serial_port+0x493>
mov    0x2a7b(%rip),%rcx
jmp    252b <open_serial_port+0x3cb>
mov    0x2b0f(%rip),%rcx
jmp    252b <open_serial_port+0x3cb>
mov    0x2a7b(%rip),%rcx
jmp    252b <open_serial_port+0x3cb>
mov    0x2ad2(%rip),%rcx
jmp    252b <open_serial_port+0x3cb>
mov    0x2a01(%rip),%rcx
jmp    252b <open_serial_port+0x3cb>
mov    0x2ab0(%rip),%rcx
jmp    252b <open_serial_port+0x3cb>
mov    0x2a5f(%rip),%rcx
jmp    252b <open_serial_port+0x3cb>
mov    0x2a86(%rip),%rcx
jmp    252b <open_serial_port+0x3cb>
mov    0x2aed(%rip),%rcx
jmp    252b <open_serial_port+0x3cb>
mov    0x2a2c(%rip),%rcx
jmp    252b <open_serial_port+0x3cb>
mov    0x29bb(%rip),%rcx
jmp    252b <open_serial_port+0x3cb>
mov    0x29fa(%rip),%rcx
jmp    252b <open_serial_port+0x3cb>
mov    0x2989(%rip),%rcx
jmp    252b <open_serial_port+0x3cb>
mov    0x2a38(%rip),%rcx
jmp    252b <open_serial_port+0x3cb>
mov    0x2a67(%rip),%rcx
jmp    252b <open_serial_port+0x3cb>
mov    0x2ace(%rip),%rcx
jmp    252b <open_serial_port+0x3cb>
mov    0x2a9d(%rip),%rcx
or     (%rcx),%eax
mov    %eax,0x4(%rsp)
mov    0x29b8(%rip),%rax
mov    (%rax),%esi
mov    %r14d,%edi
call   2030 <tcflush@plt>
mov    0x2a77(%rip),%rax
mov    (%rax),%eax
mov    0x2916(%rip),%rcx
or     (%rcx),%eax
mov    0x29dd(%rip),%rcx
or     (%rcx),%eax
not    %eax
and    0x4(%rsp),%eax
or     (%rbx),%eax
mov    0x291c(%rip),%rcx
mov    0x2a35(%rip),%rdx
mov    (%rdx),%edx
or     (%rcx),%edx
mov    0x2a22(%rip),%rcx
or     (%rcx),%edx
mov    0x2a09(%rip),%rcx
or     (%rcx),%edx
mov    0x28e8(%rip),%rcx
mov    (%rcx),%ecx
not    %edx
and    %edx,(%rsp)
not    %ecx
and    %eax,%ecx
or     (%r12),%ecx
or     (%r15),%ecx
mov    %ecx,0x4(%rsp)
mov    0x8(%rsp),%rax
mov    0x298e(%rip),%rcx
mov    (%rcx),%rcx
movq   $0x0,(%rax,%rcx,8)
mov    0x28e4(%rip),%rcx
mov    (%rcx),%rcx
movq   $0x0,(%rax,%rcx,8)
mov    0x29e2(%rip),%rax
mov    (%rax),%esi
mov    %rsp,%rdx
mov    %r14d,%edi
call   2060 <tcsetattr@plt>
mov    %r14d,%eax
add    $0x20,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xa19(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   2040 <printf@plt>
mov    $0x1,%edi
call   2080 <exit@plt>

LLVM IR (-O0):
%struct.termios = type { i32, i32, i64*, i64, i32 }
@O_RDWR = global i32 0
@O_NOCTTY = global i32 0
@O_NDELAY = global i32 0
@.str = [19 x i8] c"Could Not Open %s\0A\00"
@IGNPAR = global i32 0
@CLOCAL = global i32 0
@CREAD = global i32 0
@CS8 = 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
@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
@.str.1 = [30 x i8] c"Error: Invalid Baud Rate, %d\0A\00"
@TCIFLUSH = global i32 0
@PARENB = global i32 0
@CSTOPB = global i32 0
@CSIZE = global i32 0
@CRTSCTS = global i32 0
@ICANON = global i32 0
@ECHO = global i32 0
@ECHOE = global i32 0
@ISIG = global i32 0
@VMIN = global i64 0
@VTIME = global i64 0
@TCSANOW = global i32 0
define i32 @open_serial_port(i8* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
%6 = alloca %struct.termios
%7 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
%8 = load i8*, i8** %4
%9 = load i32, i32* @O_RDWR
%10 = load i32, i32* @O_NOCTTY
%11 = or i32 %9, %10
%12 = load i32, i32* @O_NDELAY
%13 = or i32 %11, %12
%14 = call i32 @open(i8* %8, i32 %13)
store i32 %14, i32* %7
%15 = load i32, i32* %7
%16 = icmp eq i32 %15, -1
br i1 %16, label %17, label %20
17: ; preds = %2
%18 = load i8*, i8** %4
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %18)
store i32 -1, i32* %3
br label %245
20: ; preds = %2
%21 = load i32, i32* %7
%22 = call i32 @tcgetattr(i32 %21, %struct.termios* %6)
%23 = load i32, i32* @IGNPAR
%24 = getelementptr inbounds %struct.termios, %struct.termios* %6, i32 0, i32 4
store i32 %23, i32* %24
%25 = getelementptr inbounds %struct.termios, %struct.termios* %6, i32 0, i32 3
store i64 0, i64* %25
%26 = getelementptr inbounds %struct.termios, %struct.termios* %6, i32 0, i32 0
store i32 0, i32* %26
%27 = load i32, i32* @CLOCAL
%28 = load i32, i32* @CREAD
%29 = or i32 %27, %28
%30 = load i32, i32* @CS8
%31 = or i32 %29, %30
%32 = getelementptr inbounds %struct.termios, %struct.termios* %6, i32 0, i32 1
store i32 %31, i32* %32
%33 = load i32, i32* %5
switch i32 %33, label %184 [
i32 50, label %34
i32 75, label %39
i32 110, label %44
i32 134, label %49
i32 150, label %54
i32 200, label %59
i32 300, label %64
i32 600, label %69
i32 1200, label %74
i32 1800, label %79
i32 2400, label %84
i32 4800, label %89
i32 9600, label %94
i32 19200, label %99
i32 38400, label %104
i32 57600, label %109
i32 115200, label %114
i32 230400, label %119
i32 460800, label %124
i32 500000, label %129
i32 576000, label %134
i32 921600, label %139
i32 1000000, label %144
i32 1152000, label %149
i32 1500000, label %154
i32 2000000, label %159
i32 2500000, label %164
i32 3000000, label %169
i32 3500000, label %174
i32 4000000, label %179
]
34: ; preds = %20
%35 = load i32, i32* @B50
%36 = getelementptr inbounds %struct.termios, %struct.termios* %6, i32 0, i32 1
%37 = load i32, i32* %36
%38 = or i32 %37, %35
store i32 %38, i32* %36
br label %188
39: ; preds = %20
%40 = load i32, i32* @B75
%41 = getelementptr inbounds %struct.termios, %struct.termios* %6, i32 0, i32 1
%42 = load i32, i32* %41
%43 = or i32 %42, %40
store i32 %43, i32* %41
br label %188
44: ; preds = %20
%45 = load i32, i32* @B110
%46 = getelementptr inbounds %struct.termios, %struct.termios* %6, i32 0, i32 1
%47 = load i32, i32* %46
%48 = or i32 %47, %45
store i32 %48, i32* %46
br label %188
49: ; preds = %20
%50 = load i32, i32* @B134
%51 = getelementptr inbounds %struct.termios, %struct.termios* %6, i32 0, i32 1
%52 = load i32, i32* %51
%53 = or i32 %52, %50
store i32 %53, i32* %51
br label %188
54: ; preds = %20
%55 = load i32, i32* @B150
%56 = getelementptr inbounds %struct.termios, %struct.termios* %6, i32 0, i32 1
%57 = load i32, i32* %56
%58 = or i32 %57, %55
store i32 %58, i32* %56
br label %188
59: ; preds = %20
%60 = load i32, i32* @B200
%61 = getelementptr inbounds %struct.termios, %struct.termios* %6, i32 0, i32 1
%62 = load i32, i32* %61
%63 = or i32 %62, %60
store i32 %63, i32* %61
br label %188
64: ; preds = %20
%65 = load i32, i32* @B300
%66 = getelementptr inbounds %struct.termios, %struct.termios* %6, i32 0, i32 1
%67 = load i32, i32* %66
%68 = or i32 %67, %65
store i32 %68, i32* %66
br label %188
69: ; preds = %20
%70 = load i32, i32* @B600
%71 = getelementptr inbounds %struct.termios, %struct.termios* %6, i32 0, i32 1
%72 = load i32, i32* %71
%73 = or i32 %72, %70
store i32 %73, i32* %71
br label %188
74: ; preds = %20
%75 = load i32, i32* @B1200
%76 = getelementptr inbounds %struct.termios, %struct.termios* %6, i32 0, i32 1
%77 = load i32, i32* %76
%78 = or i32 %77, %75
store i32 %78, i32* %76
br label %188
79: ; preds = %20
%80 = load i32, i32* @B1800
%81 = getelementptr inbounds %struct.termios, %struct.termios* %6, i32 0, i32 1
%82 = load i32, i32* %81
%83 = or i32 %82, %80
store i32 %83, i32* %81
br label %188
84: ; preds = %20
%85 = load i32, i32* @B2400
%86 = getelementptr inbounds %struct.termios, %struct.termios* %6, i32 0, i32 1
%87 = load i32, i32* %86
%88 = or i32 %87, %85
store i32 %88, i32* %86
br label %188
89: ; preds = %20
%90 = load i32, i32* @B4800
%91 = getelementptr inbounds %struct.termios, %struct.termios* %6, i32 0, i32 1
%92 = load i32, i32* %91
%93 = or i32 %92, %90
store i32 %93, i32* %91
br label %188
94: ; preds = %20
%95 = load i32, i32* @B9600
%96 = getelementptr inbounds %struct.termios, %struct.termios* %6, i32 0, i32 1
%97 = load i32, i32* %96
%98 = or i32 %97, %95
store i32 %98, i32* %96
br label %188
99: ; preds = %20
%100 = load i32, i32* @B19200
%101 = getelementptr inbounds %struct.termios, %struct.termios* %6, i32 0, i32 1
%102 = load i32, i32* %101
%103 = or i32 %102, %100
store i32 %103, i32* %101
br label %188
104: ; preds = %20
%105 = load i32, i32* @B38400
%106 = getelementptr inbounds %struct.termios, %struct.termios* %6, i32 0, i32 1
%107 = load i32, i32* %106
%108 = or i32 %107, %105
store i32 %108, i32* %106
br label %188
109: ; preds = %20
%110 = load i32, i32* @B57600
%111 = getelementptr inbounds %struct.termios, %struct.termios* %6, i32 0, i32 1
%112 = load i32, i32* %111
%113 = or i32 %112, %110
store i32 %113, i32* %111
br label %188
114: ; preds = %20
%115 = load i32, i32* @B115200
%116 = getelementptr inbounds %struct.termios, %struct.termios* %6, i32 0, i32 1
%117 = load i32, i32* %116
%118 = or i32 %117, %115
store i32 %118, i32* %116
br label %188
119: ; preds = %20
%120 = load i32, i32* @B230400
%121 = getelementptr inbounds %struct.termios, %struct.termios* %6, i32 0, i32 1
%122 = load i32, i32* %121
%123 = or i32 %122, %120
store i32 %123, i32* %121
br label %188
124: ; preds = %20
%125 = load i32, i32* @B460800
%126 = getelementptr inbounds %struct.termios, %struct.termios* %6, i32 0, i32 1
%127 = load i32, i32* %126
%128 = or i32 %127, %125
store i32 %128, i32* %126
br label %188
129: ; preds = %20
%130 = load i32, i32* @B500000
%131 = getelementptr inbounds %struct.termios, %struct.termios* %6, i32 0, i32 1
%132 = load i32, i32* %131
%133 = or i32 %132, %130
store i32 %133, i32* %131
br label %188
134: ; preds = %20
%135 = load i32, i32* @B576000
%136 = getelementptr inbounds %struct.termios, %struct.termios* %6, i32 0, i32 1
%137 = load i32, i32* %136
%138 = or i32 %137, %135
store i32 %138, i32* %136
br label %188
139: ; preds = %20
%140 = load i32, i32* @B921600
%141 = getelementptr inbounds %struct.termios, %struct.termios* %6, i32 0, i32 1
%142 = load i32, i32* %141
%143 = or i32 %142, %140
store i32 %143, i32* %141
br label %188
144: ; preds = %20
%145 = load i32, i32* @B1000000
%146 = getelementptr inbounds %struct.termios, %struct.termios* %6, i32 0, i32 1
%147 = load i32, i32* %146
%148 = or i32 %147, %145
store i32 %148, i32* %146
br label %188
149: ; preds = %20
%150 = load i32, i32* @B1152000
%151 = getelementptr inbounds %struct.termios, %struct.termios* %6, i32 0, i32 1
%152 = load i32, i32* %151
%153 = or i32 %152, %150
store i32 %153, i32* %151
br label %188
154: ; preds = %20
%155 = load i32, i32* @B1500000
%156 = getelementptr inbounds %struct.termios, %struct.termios* %6, i32 0, i32 1
%157 = load i32, i32* %156
%158 = or i32 %157, %155
store i32 %158, i32* %156
br label %188
159: ; preds = %20
%160 = load i32, i32* @B2000000
%161 = getelementptr inbounds %struct.termios, %struct.termios* %6, i32 0, i32 1
%162 = load i32, i32* %161
%163 = or i32 %162, %160
store i32 %163, i32* %161
br label %188
164: ; preds = %20
%165 = load i32, i32* @B2500000
%166 = getelementptr inbounds %struct.termios, %struct.termios* %6, i32 0, i32 1
%167 = load i32, i32* %166
%168 = or i32 %167, %165
store i32 %168, i32* %166
br label %188
169: ; preds = %20
%170 = load i32, i32* @B3000000
%171 = getelementptr inbounds %struct.termios, %struct.termios* %6, i32 0, i32 1
%172 = load i32, i32* %171
%173 = or i32 %172, %170
store i32 %173, i32* %171
br label %188
174: ; preds = %20
%175 = load i32, i32* @B3500000
%176 = getelementptr inbounds %struct.termios, %struct.termios* %6, i32 0, i32 1
%177 = load i32, i32* %176
%178 = or i32 %177, %175
store i32 %178, i32* %176
br label %188
179: ; preds = %20
%180 = load i32, i32* @B4000000
%181 = getelementptr inbounds %struct.termios, %struct.termios* %6, i32 0, i32 1
%182 = load i32, i32* %181
%183 = or i32 %182, %180
store i32 %183, i32* %181
br label %188
184: ; preds = %20
%185 = load i32, i32* %5
%186 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i32 %185)
%187 = call i32 @exit(i32 1)
unreachable
188: ; preds = %179, %174, %169, %164, %159, %154, %149, %144, %139, %134, %129, %124, %119, %114, %109, %104, %99, %94, %89, %84, %79, %74, %69, %64, %59, %54, %49, %44, %39, %34
%189 = load i32, i32* %7
%190 = load i32, i32* @TCIFLUSH
%191 = call i32 @tcflush(i32 %189, i32 %190)
%192 = load i32, i32* @PARENB
%193 = xor i32 %192, -1
%194 = getelementptr inbounds %struct.termios, %struct.termios* %6, i32 0, i32 1
%195 = load i32, i32* %194
%196 = and i32 %195, %193
store i32 %196, i32* %194
%197 = load i32, i32* @CSTOPB
%198 = xor i32 %197, -1
%199 = getelementptr inbounds %struct.termios, %struct.termios* %6, i32 0, i32 1
%200 = load i32, i32* %199
%201 = and i32 %200, %198
store i32 %201, i32* %199
%202 = load i32, i32* @CSIZE
%203 = xor i32 %202, -1
%204 = getelementptr inbounds %struct.termios, %struct.termios* %6, i32 0, i32 1
%205 = load i32, i32* %204
%206 = and i32 %205, %203
store i32 %206, i32* %204
%207 = load i32, i32* @CS8
%208 = getelementptr inbounds %struct.termios, %struct.termios* %6, i32 0, i32 1
%209 = load i32, i32* %208
%210 = or i32 %209, %207
store i32 %210, i32* %208
%211 = load i32, i32* @CRTSCTS
%212 = xor i32 %211, -1
%213 = getelementptr inbounds %struct.termios, %struct.termios* %6, i32 0, i32 1
%214 = load i32, i32* %213
%215 = and i32 %214, %212
store i32 %215, i32* %213
%216 = load i32, i32* @ICANON
%217 = load i32, i32* @ECHO
%218 = or i32 %216, %217
%219 = load i32, i32* @ECHOE
%220 = or i32 %218, %219
%221 = load i32, i32* @ISIG
%222 = or i32 %220, %221
%223 = xor i32 %222, -1
%224 = getelementptr inbounds %struct.termios, %struct.termios* %6, i32 0, i32 0
%225 = load i32, i32* %224
%226 = and i32 %225, %223
store i32 %226, i32* %224
%227 = load i32, i32* @CLOCAL
%228 = load i32, i32* @CREAD
%229 = or i32 %227, %228
%230 = getelementptr inbounds %struct.termios, %struct.termios* %6, i32 0, i32 1
%231 = load i32, i32* %230
%232 = or i32 %231, %229
store i32 %232, i32* %230
%233 = getelementptr inbounds %struct.termios, %struct.termios* %6, i32 0, i32 2
%234 = load i64*, i64** %233
%235 = load i64, i64* @VMIN
%236 = getelementptr inbounds i64, i64* %234, i64 %235
store i64 0, i64* %236
%237 = getelementptr inbounds %struct.termios, %struct.termios* %6, i32 0, i32 2
%238 = load i64*, i64** %237
%239 = load i64, i64* @VTIME
%240 = getelementptr inbounds i64, i64* %238, i64 %239
store i64 0, i64* %240
%241 = load i32, i32* %7
%242 = load i32, i32* @TCSANOW
%243 = call i32 @tcsetattr(i32 %241, i32 %242, %struct.termios* %6)
%244 = load i32, i32* %7
store i32 %244, i32* %3
br label %245
245: ; preds = %188, %17
%246 = load i32, i32* %3
ret i32 %246
}

LLVM IR (-O2):
%struct.termios = type { i32, i32, i64*, i64, i32 }
@O_RDWR = global i32 0
@O_NOCTTY = global i32 0
@O_NDELAY = global i32 0
@.str = [19 x i8] c"Could Not Open %s\0A\00"
@IGNPAR = global i32 0
@CLOCAL = global i32 0
@CREAD = global i32 0
@CS8 = 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
@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
@.str.1 = [30 x i8] c"Error: Invalid Baud Rate, %d\0A\00"
@TCIFLUSH = global i32 0
@PARENB = global i32 0
@CSTOPB = global i32 0
@CSIZE = global i32 0
@CRTSCTS = global i32 0
@ICANON = global i32 0
@ECHO = global i32 0
@ECHOE = global i32 0
@ISIG = global i32 0
@VMIN = global i64 0
@VTIME = global i64 0
@TCSANOW = global i32 0
define i32 @open_serial_port(i8* %0, i32 %1) {
%3 = alloca %struct.termios
%4 = bitcast %struct.termios* %3 to i8*
%5 = load i32, i32* @O_RDWR
%6 = load i32, i32* @O_NOCTTY
%7 = or i32 %6, %5
%8 = load i32, i32* @O_NDELAY
%9 = or i32 %7, %8
%10 = tail call i32 @open(i8* %0, i32 %9)
%11 = icmp eq i32 %10, -1
br i1 %11, label %12, label %14
12: ; preds = %2
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %99
14: ; preds = %2
%15 = call i32 @tcgetattr(i32 %10, %struct.termios* %3)
%16 = load i32, i32* @IGNPAR
%17 = getelementptr inbounds %struct.termios, %struct.termios* %3, i64 0, i32 4
store i32 %16, i32* %17
%18 = getelementptr inbounds %struct.termios, %struct.termios* %3, i64 0, i32 3
store i64 0, i64* %18
%19 = getelementptr inbounds %struct.termios, %struct.termios* %3, i64 0, i32 0
store i32 0, i32* %19
%20 = load i32, i32* @CLOCAL
%21 = load i32, i32* @CREAD
%22 = or i32 %21, %20
%23 = load i32, i32* @CS8
%24 = or i32 %22, %23
%25 = getelementptr inbounds %struct.termios, %struct.termios* %3, i64 0, i32 1
store i32 %24, i32* %25
switch i32 %1, label %55 [
i32 50, label %58
i32 75, label %26
i32 110, label %27
i32 134, label %28
i32 150, label %29
i32 200, label %30
i32 300, label %31
i32 600, label %32
i32 1200, label %33
i32 1800, label %34
i32 2400, label %35
i32 4800, label %36
i32 9600, label %37
i32 19200, label %38
i32 38400, label %39
i32 57600, label %40
i32 115200, label %41
i32 230400, label %42
i32 460800, label %43
i32 500000, label %44
i32 576000, label %45
i32 921600, label %46
i32 1000000, label %47
i32 1152000, label %48
i32 1500000, label %49
i32 2000000, label %50
i32 2500000, label %51
i32 3000000, label %52
i32 3500000, label %53
i32 4000000, label %54
]
26: ; preds = %14
br label %58
27: ; preds = %14
br label %58
28: ; preds = %14
br label %58
29: ; preds = %14
br label %58
30: ; preds = %14
br label %58
31: ; preds = %14
br label %58
32: ; preds = %14
br label %58
33: ; preds = %14
br label %58
34: ; preds = %14
br label %58
35: ; preds = %14
br label %58
36: ; preds = %14
br label %58
37: ; preds = %14
br label %58
38: ; preds = %14
br label %58
39: ; preds = %14
br label %58
40: ; preds = %14
br label %58
41: ; preds = %14
br label %58
42: ; preds = %14
br label %58
43: ; preds = %14
br label %58
44: ; preds = %14
br label %58
45: ; preds = %14
br label %58
46: ; preds = %14
br label %58
47: ; preds = %14
br label %58
48: ; preds = %14
br label %58
49: ; preds = %14
br label %58
50: ; preds = %14
br label %58
51: ; preds = %14
br label %58
52: ; preds = %14
br label %58
53: ; preds = %14
br label %58
54: ; preds = %14
br label %58
55: ; preds = %14
%56 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i32 %1)
%57 = call i32 @exit(i32 1)
unreachable
58: ; preds = %14, %54, %53, %52, %51, %50, %49, %48, %47, %46, %45, %44, %43, %42, %41, %40, %39, %38, %37, %36, %35, %34, %33, %32, %31, %30, %29, %28, %27, %26
%59 = phi i32* [ @B4000000, %54 ], [ @B3500000, %53 ], [ @B3000000, %52 ], [ @B2500000, %51 ], [ @B2000000, %50 ], [ @B1500000, %49 ], [ @B1152000, %48 ], [ @B1000000, %47 ], [ @B921600, %46 ], [ @B576000, %45 ], [ @B500000, %44 ], [ @B460800, %43 ], [ @B230400, %42 ], [ @B115200, %41 ], [ @B57600, %40 ], [ @B38400, %39 ], [ @B19200, %38 ], [ @B9600, %37 ], [ @B4800, %36 ], [ @B2400, %35 ], [ @B1800, %34 ], [ @B1200, %33 ], [ @B600, %32 ], [ @B300, %31 ], [ @B200, %30 ], [ @B150, %29 ], [ @B134, %28 ], [ @B110, %27 ], [ @B75, %26 ], [ @B50, %14 ]
%60 = load i32, i32* %59
%61 = or i32 %60, %24
store i32 %61, i32* %25
%62 = load i32, i32* @TCIFLUSH
%63 = call i32 @tcflush(i32 %10, i32 %62)
%64 = load i32, i32* @PARENB
%65 = load i32, i32* %25
%66 = load i32, i32* @CSTOPB
%67 = or i32 %64, %66
%68 = load i32, i32* @CSIZE
%69 = or i32 %67, %68
%70 = xor i32 %69, -1
%71 = and i32 %65, %70
%72 = load i32, i32* @CS8
%73 = or i32 %72, %71
%74 = load i32, i32* @CRTSCTS
%75 = xor i32 %74, -1
%76 = and i32 %73, %75
%77 = load i32, i32* @ICANON
%78 = load i32, i32* @ECHO
%79 = or i32 %78, %77
%80 = load i32, i32* @ECHOE
%81 = or i32 %79, %80
%82 = load i32, i32* @ISIG
%83 = or i32 %81, %82
%84 = xor i32 %83, -1
%85 = load i32, i32* %19
%86 = and i32 %85, %84
store i32 %86, i32* %19
%87 = load i32, i32* @CLOCAL
%88 = load i32, i32* @CREAD
%89 = or i32 %87, %76
%90 = or i32 %89, %88
store i32 %90, i32* %25
%91 = getelementptr inbounds %struct.termios, %struct.termios* %3, i64 0, i32 2
%92 = load i64*, i64** %91
%93 = load i64, i64* @VMIN
%94 = getelementptr inbounds i64, i64* %92, i64 %93
store i64 0, i64* %94
%95 = load i64, i64* @VTIME
%96 = getelementptr inbounds i64, i64* %92, i64 %95
store i64 0, i64* %96
%97 = load i32, i32* @TCSANOW
%98 = call i32 @tcsetattr(i32 %10, i32 %97, %struct.termios* %3)
br label %99
99: ; preds = %58, %12
ret i32 %10
}