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

/* Variables and functions */
int /*<<< orphan*/ B2400;
int CLOCAL;
int CREAD;
int CS8;
int IGNBRK;
int IGNPAR;
int /*<<< orphan*/ TCIOFLUSH;
int /*<<< orphan*/ TCSAFLUSH;
size_t VMIN;
size_t VTIME;
int cfsetispeed(struct termios *, int /*<<< orphan*/);
int cfsetospeed(struct termios *, int /*<<< orphan*/);
int /*<<< orphan*/ fatal_(int, char *, int, char *);
int /*<<< orphan*/ fatal_e_(int, char *, int, char *);
int tcflush(int, int /*<<< orphan*/);
int tcgetattr(int, struct termios *);
int tcsetattr(int, int /*<<< orphan*/, struct termios *);
int /*<<< orphan*/ uart_consume(int);
int /*<<< orphan*/ uart_send(int, char *, int);
int /*<<< orphan*/ uart_send_recv(int, char *, int, int);
void set_up_tty(int fd) {
  struct termios t = {
      .c_iflag = IGNBRK | IGNPAR,
      .c_oflag = 0,
      .c_cflag = CS8 | CREAD | CLOCAL,
      .c_lflag = 0,
  };
  t.c_cc[VTIME] = 255;
  t.c_cc[VMIN] = 255;
  if (-1 == cfsetispeed(&t, B2400))
    do {
      fatal_e_(1,
               "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/drkitty/pickler/refs/heads/"
               "master/pickler.c",
               408, "Can't set TTY input speed");
    } while (0);
  if (-1 == cfsetospeed(&t, B2400))
    do {
      fatal_e_(1,
               "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/drkitty/pickler/refs/heads/"
               "master/pickler.c",
               410, "Can't set TTY output speed");
    } while (0);
  if (-1 == tcsetattr(fd, TCSAFLUSH, &t))
    do {
      fatal_e_(1,
               "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/drkitty/pickler/refs/heads/"
               "master/pickler.c",
               413, "Can't set TTY attributes");
    } while (0);
  struct termios tt;
  if (-1 == tcgetattr(fd, &tt))
    do {
      fatal_e_(1,
               "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/drkitty/pickler/refs/heads/"
               "master/pickler.c",
               417, "Can't get TTY attributes");
    } while (0);
  if (-1 == tcflush(fd, TCIOFLUSH))
    do {
      fatal_e_(2,
               "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/drkitty/pickler/refs/heads/"
               "master/pickler.c",
               420, "Can't flush TTY buffers");
    } while (0);
  if (t.c_iflag != tt.c_iflag || t.c_oflag != tt.c_oflag ||
      t.c_cflag != tt.c_cflag || t.c_lflag != tt.c_lflag)
    do {
      fatal_(2,
             "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/drkitty/pickler/refs/heads/master/"
             "pickler.c",
             424, "The TTY attributes we set didn't take effect");
    } while (0);
  uart_consume(fd);
  uint8_t buf = '_';
  uart_send(fd, &buf, 1);
  uart_send(fd, &buf, 1);
  uart_send_recv(fd, &buf, 1, 4);
  uart_consume(fd);
}


x86 assembly (clang, -O0):
<set_up_tty>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1070 <memset@plt>
mov    0x2dde(%rip),%rax
mov    (%rax),%eax
mov    0x2dc5(%rip),%rcx
or     (%rcx),%eax
mov    %eax,-0x30(%rbp)
mov    0x2df1(%rip),%rax
mov    (%rax),%eax
mov    0x2df0(%rip),%rcx
or     (%rcx),%eax
mov    0x2d97(%rip),%rcx
or     (%rcx),%eax
mov    %eax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    0x2d9f(%rip),%rcx
mov    (%rcx),%rcx
movl   $0xff,(%rax,%rcx,4)
mov    -0x10(%rbp),%rax
mov    0x2db2(%rip),%rcx
mov    (%rcx),%rcx
movl   $0xff,(%rax,%rcx,4)
mov    0x2d91(%rip),%rax
mov    (%rax),%esi
lea    -0x30(%rbp),%rdi
call   10d0 <cfsetispeed@plt>
mov    %eax,%ecx
mov    $0xffffffff,%eax
cmp    %ecx,%eax
jne    1270 <set_up_tty+0xc0>
jmp    124e <set_up_tty+0x9e>
mov    $0x1,%edi
lea    0xda6(%rip),%rsi
mov    $0x198,%edx
lea    0xe20(%rip),%rcx
call   1040 <fatal_e_@plt>
jmp    1270 <set_up_tty+0xc0>
mov    0x2d49(%rip),%rax
mov    (%rax),%esi
lea    -0x30(%rbp),%rdi
call   1050 <cfsetospeed@plt>
mov    %eax,%ecx
mov    $0xffffffff,%eax
cmp    %ecx,%eax
jne    12b8 <set_up_tty+0x108>
jmp    1296 <set_up_tty+0xe6>
mov    $0x1,%edi
lea    0xd5e(%rip),%rsi
mov    $0x19a,%edx
lea    0xdf2(%rip),%rcx
call   1040 <fatal_e_@plt>
jmp    12b8 <set_up_tty+0x108>
mov    -0x4(%rbp),%edi
mov    0x2d26(%rip),%rax
mov    (%rax),%esi
lea    -0x30(%rbp),%rdx
call   10c0 <tcsetattr@plt>
mov    %eax,%ecx
mov    $0xffffffff,%eax
cmp    %ecx,%eax
jne    1303 <set_up_tty+0x153>
jmp    12e1 <set_up_tty+0x131>
mov    $0x1,%edi
lea    0xd13(%rip),%rsi
mov    $0x19d,%edx
lea    0xdc2(%rip),%rcx
call   1040 <fatal_e_@plt>
jmp    1303 <set_up_tty+0x153>
mov    -0x4(%rbp),%edi
lea    -0x58(%rbp),%rsi
call   10b0 <tcgetattr@plt>
mov    %eax,%ecx
mov    $0xffffffff,%eax
cmp    %ecx,%eax
jne    1345 <set_up_tty+0x195>
jmp    1323 <set_up_tty+0x173>
mov    $0x1,%edi
lea    0xcd1(%rip),%rsi
mov    $0x1a1,%edx
lea    0xd99(%rip),%rcx
call   1040 <fatal_e_@plt>
jmp    1345 <set_up_tty+0x195>
mov    -0x4(%rbp),%edi
mov    0x2c69(%rip),%rax
mov    (%rax),%esi
call   1060 <tcflush@plt>
mov    %eax,%ecx
mov    $0xffffffff,%eax
cmp    %ecx,%eax
jne    138c <set_up_tty+0x1dc>
jmp    136a <set_up_tty+0x1ba>
mov    $0x2,%edi
lea    0xc8a(%rip),%rsi
mov    $0x1a4,%edx
lea    0xd6b(%rip),%rcx
call   1040 <fatal_e_@plt>
jmp    138c <set_up_tty+0x1dc>
mov    -0x30(%rbp),%eax
cmp    -0x58(%rbp),%eax
jne    13c0 <set_up_tty+0x210>
mov    -0x28(%rbp),%rax
cmp    -0x50(%rbp),%rax
jne    13c0 <set_up_tty+0x210>
mov    -0x20(%rbp),%eax
cmp    -0x48(%rbp),%eax
jne    13c0 <set_up_tty+0x210>
mov    -0x18(%rbp),%rax
cmp    -0x40(%rbp),%rax
je     13e7 <set_up_tty+0x237>
jmp    13c5 <set_up_tty+0x215>
mov    $0x2,%edi
lea    0xc2f(%rip),%rsi
mov    $0x1a8,%edx
lea    0xd28(%rip),%rcx
call   1090 <fatal_@plt>
jmp    13e7 <set_up_tty+0x237>
mov    -0x4(%rbp),%edi
call   10a0 <uart_consume@plt>
movb   $0x5f,-0x59(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x59(%rbp),%rsi
mov    $0x1,%edx
call   1030 <uart_send@plt>
mov    -0x4(%rbp),%edi
lea    -0x59(%rbp),%rsi
mov    $0x1,%edx
call   1030 <uart_send@plt>
mov    -0x4(%rbp),%edi
lea    -0x59(%rbp),%rsi
mov    $0x1,%edx
mov    $0x4,%ecx
call   1080 <uart_send_recv@plt>
mov    -0x4(%rbp),%edi
call   10a0 <uart_consume@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_up_tty>:
push   %rbp
push   %rbx
sub    $0x68,%rsp
mov    0x2e0b(%rip),%rax
mov    0x2dfc(%rip),%rcx
mov    (%rcx),%ecx
or     (%rax),%ecx
mov    0x2e19(%rip),%rax
mov    0x2e1a(%rip),%rdx
mov    (%rdx),%edx
or     (%rax),%edx
mov    %edi,%ebp
mov    0x2dcd(%rip),%rax
or     (%rax),%edx
xorps  %xmm0,%xmm0
movaps %xmm0,0x10(%rsp)
movaps %xmm0,0x20(%rsp)
movq   $0x0,0x30(%rsp)
mov    %ecx,0x10(%rsp)
mov    %edx,0x20(%rsp)
mov    0x2dce(%rip),%rbx
mov    (%rbx),%esi
lea    0x10(%rsp),%rdi
call   10c0 <cfsetispeed@plt>
cmp    $0xffffffff,%eax
jne    1228 <set_up_tty+0x88>
lea    0xdee(%rip),%rsi
lea    0xe6d(%rip),%rcx
mov    $0x1,%edi
mov    $0x198,%edx
call   1040 <fatal_e_@plt>
mov    (%rbx),%esi
lea    0x10(%rsp),%rdi
call   1050 <cfsetospeed@plt>
cmp    $0xffffffff,%eax
jne    1256 <set_up_tty+0xb6>
lea    0xdc0(%rip),%rsi
lea    0xe59(%rip),%rcx
mov    $0x1,%edi
mov    $0x19a,%edx
call   1040 <fatal_e_@plt>
mov    0x2d8b(%rip),%rax
mov    (%rax),%esi
lea    0x10(%rsp),%rdx
mov    %ebp,%edi
call   10b0 <tcsetattr@plt>
cmp    $0xffffffff,%eax
jne    128d <set_up_tty+0xed>
lea    0xd89(%rip),%rsi
lea    0xe3d(%rip),%rcx
mov    $0x1,%edi
mov    $0x19d,%edx
call   1040 <fatal_e_@plt>
lea    0x40(%rsp),%rsi
mov    %ebp,%edi
call   10a0 <tcgetattr@plt>
cmp    $0xffffffff,%eax
jne    12bb <set_up_tty+0x11b>
lea    0xd5b(%rip),%rsi
lea    0xe28(%rip),%rcx
mov    $0x1,%edi
mov    $0x1a1,%edx
call   1040 <fatal_e_@plt>
mov    0x2cfe(%rip),%rax
mov    (%rax),%esi
mov    %ebp,%edi
call   1060 <tcflush@plt>
cmp    $0xffffffff,%eax
jne    12ed <set_up_tty+0x14d>
lea    0xd29(%rip),%rsi
lea    0xe0f(%rip),%rcx
mov    $0x2,%edi
mov    $0x1a4,%edx
call   1040 <fatal_e_@plt>
mov    0x10(%rsp),%eax
cmp    0x40(%rsp),%eax
jne    1319 <set_up_tty+0x179>
mov    0x18(%rsp),%rax
cmp    0x48(%rsp),%rax
jne    1319 <set_up_tty+0x179>
mov    0x20(%rsp),%eax
cmp    0x50(%rsp),%eax
jne    1319 <set_up_tty+0x179>
mov    0x28(%rsp),%rax
cmp    0x58(%rsp),%rax
je     1336 <set_up_tty+0x196>
lea    0xce0(%rip),%rsi
lea    0xdde(%rip),%rcx
mov    $0x2,%edi
mov    $0x1a8,%edx
call   1080 <fatal_@plt>
mov    %ebp,%edi
call   1090 <uart_consume@plt>
movb   $0x5f,0xf(%rsp)
lea    0xf(%rsp),%rbx
mov    %ebp,%edi
mov    %rbx,%rsi
mov    $0x1,%edx
call   1030 <uart_send@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    $0x1,%edx
call   1030 <uart_send@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    $0x1,%edx
mov    $0x4,%ecx
call   1070 <uart_send_recv@plt>
mov    %ebp,%edi
call   1090 <uart_consume@plt>
add    $0x68,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.termios = type { i32, i64, i32, i64, i32* }
@IGNBRK = global i32 0
@IGNPAR = global i32 0
@CS8 = global i32 0
@CREAD = global i32 0
@CLOCAL = global i32 0
@VTIME = global i64 0
@VMIN = global i64 0
@B2400 = global i32 0
@.str = [134 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/drkitty/pickler/refs/heads/master/pickler.c\00"
@.str.1 = [26 x i8] c"Can't set TTY input speed\00"
@.str.2 = [27 x i8] c"Can't set TTY output speed\00"
@TCSAFLUSH = global i32 0
@.str.3 = [25 x i8] c"Can't set TTY attributes\00"
@.str.4 = [25 x i8] c"Can't get TTY attributes\00"
@TCIOFLUSH = global i32 0
@.str.5 = [24 x i8] c"Can't flush TTY buffers\00"
@.str.6 = [45 x i8] c"The TTY attributes we set didn't take effect\00"
define void @set_up_tty(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.termios
%4 = alloca %struct.termios
%5 = alloca i8
store i32 %0, i32* %2
%6 = bitcast %struct.termios* %3 to i8*
%7 = getelementptr inbounds %struct.termios, %struct.termios* %3, i32 0, i32 0
%8 = load i32, i32* @IGNBRK
%9 = load i32, i32* @IGNPAR
%10 = or i32 %8, %9
store i32 %10, i32* %7
%11 = getelementptr inbounds %struct.termios, %struct.termios* %3, i32 0, i32 2
%12 = load i32, i32* @CS8
%13 = load i32, i32* @CREAD
%14 = or i32 %12, %13
%15 = load i32, i32* @CLOCAL
%16 = or i32 %14, %15
store i32 %16, i32* %11
%17 = getelementptr inbounds %struct.termios, %struct.termios* %3, i32 0, i32 4
%18 = load i32*, i32** %17
%19 = load i64, i64* @VTIME
%20 = getelementptr inbounds i32, i32* %18, i64 %19
store i32 255, i32* %20
%21 = getelementptr inbounds %struct.termios, %struct.termios* %3, i32 0, i32 4
%22 = load i32*, i32** %21
%23 = load i64, i64* @VMIN
%24 = getelementptr inbounds i32, i32* %22, i64 %23
store i32 255, i32* %24
%25 = load i32, i32* @B2400
%26 = call i32 @cfsetispeed(%struct.termios* %3, i32 %25)
%27 = icmp eq i32 -1, %26
br i1 %27, label %28, label %32
28: ; preds = %1
br label %29
29: ; preds = %28
%30 = call i32 @fatal_e_(i32 1, i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str, i64 0, i64 0), i32 408, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
br label %31
31: ; preds = %29
br label %32
32: ; preds = %31, %1
%33 = load i32, i32* @B2400
%34 = call i32 @cfsetospeed(%struct.termios* %3, i32 %33)
%35 = icmp eq i32 -1, %34
br i1 %35, label %36, label %40
36: ; preds = %32
br label %37
37: ; preds = %36
%38 = call i32 @fatal_e_(i32 1, i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str, i64 0, i64 0), i32 410, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
br label %39
39: ; preds = %37
br label %40
40: ; preds = %39, %32
%41 = load i32, i32* %2
%42 = load i32, i32* @TCSAFLUSH
%43 = call i32 @tcsetattr(i32 %41, i32 %42, %struct.termios* %3)
%44 = icmp eq i32 -1, %43
br i1 %44, label %45, label %49
45: ; preds = %40
br label %46
46: ; preds = %45
%47 = call i32 @fatal_e_(i32 1, i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str, i64 0, i64 0), i32 413, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
br label %48
48: ; preds = %46
br label %49
49: ; preds = %48, %40
%50 = load i32, i32* %2
%51 = call i32 @tcgetattr(i32 %50, %struct.termios* %4)
%52 = icmp eq i32 -1, %51
br i1 %52, label %53, label %57
53: ; preds = %49
br label %54
54: ; preds = %53
%55 = call i32 @fatal_e_(i32 1, i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str, i64 0, i64 0), i32 417, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0))
br label %56
56: ; preds = %54
br label %57
57: ; preds = %56, %49
%58 = load i32, i32* %2
%59 = load i32, i32* @TCIOFLUSH
%60 = call i32 @tcflush(i32 %58, i32 %59)
%61 = icmp eq i32 -1, %60
br i1 %61, label %62, label %66
62: ; preds = %57
br label %63
63: ; preds = %62
%64 = call i32 @fatal_e_(i32 2, i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str, i64 0, i64 0), i32 420, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0))
br label %65
65: ; preds = %63
br label %66
66: ; preds = %65, %57
%67 = getelementptr inbounds %struct.termios, %struct.termios* %3, i32 0, i32 0
%68 = load i32, i32* %67
%69 = getelementptr inbounds %struct.termios, %struct.termios* %4, i32 0, i32 0
%70 = load i32, i32* %69
%71 = icmp ne i32 %68, %70
br i1 %71, label %90, label %72
72: ; preds = %66
%73 = getelementptr inbounds %struct.termios, %struct.termios* %3, i32 0, i32 1
%74 = load i64, i64* %73
%75 = getelementptr inbounds %struct.termios, %struct.termios* %4, i32 0, i32 1
%76 = load i64, i64* %75
%77 = icmp ne i64 %74, %76
br i1 %77, label %90, label %78
78: ; preds = %72
%79 = getelementptr inbounds %struct.termios, %struct.termios* %3, i32 0, i32 2
%80 = load i32, i32* %79
%81 = getelementptr inbounds %struct.termios, %struct.termios* %4, i32 0, i32 2
%82 = load i32, i32* %81
%83 = icmp ne i32 %80, %82
br i1 %83, label %90, label %84
84: ; preds = %78
%85 = getelementptr inbounds %struct.termios, %struct.termios* %3, i32 0, i32 3
%86 = load i64, i64* %85
%87 = getelementptr inbounds %struct.termios, %struct.termios* %4, i32 0, i32 3
%88 = load i64, i64* %87
%89 = icmp ne i64 %86, %88
br i1 %89, label %90, label %94
90: ; preds = %84, %78, %72, %66
br label %91
91: ; preds = %90
%92 = call i32 @fatal_(i32 2, i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str, i64 0, i64 0), i32 424, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.6, i64 0, i64 0))
br label %93
93: ; preds = %91
br label %94
94: ; preds = %93, %84
%95 = load i32, i32* %2
%96 = call i32 @uart_consume(i32 %95)
store i8 95, i8* %5
%97 = load i32, i32* %2
%98 = call i32 @uart_send(i32 %97, i8* %5, i32 1)
%99 = load i32, i32* %2
%100 = call i32 @uart_send(i32 %99, i8* %5, i32 1)
%101 = load i32, i32* %2
%102 = call i32 @uart_send_recv(i32 %101, i8* %5, i32 1, i32 4)
%103 = load i32, i32* %2
%104 = call i32 @uart_consume(i32 %103)
ret void
}

LLVM IR (-O2):
%struct.termios = type { i32, i64, i32, i64, i32* }
@IGNBRK = global i32 0
@IGNPAR = global i32 0
@CS8 = global i32 0
@CREAD = global i32 0
@CLOCAL = global i32 0
@VTIME = global i64 0
@VMIN = global i64 0
@B2400 = global i32 0
@.str = [134 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/drkitty/pickler/refs/heads/master/pickler.c\00"
@.str.1 = [26 x i8] c"Can't set TTY input speed\00"
@.str.2 = [27 x i8] c"Can't set TTY output speed\00"
@TCSAFLUSH = global i32 0
@.str.3 = [25 x i8] c"Can't set TTY attributes\00"
@.str.4 = [25 x i8] c"Can't get TTY attributes\00"
@TCIOFLUSH = global i32 0
@.str.5 = [24 x i8] c"Can't flush TTY buffers\00"
@.str.6 = [45 x i8] c"The TTY attributes we set didn't take effect\00"
define void @set_up_tty(i32 %0) {
%2 = alloca %struct.termios
%3 = alloca %struct.termios
%4 = alloca i8
%5 = bitcast %struct.termios* %2 to i8*
%6 = getelementptr inbounds %struct.termios, %struct.termios* %2, i64 0, i32 0
%7 = load i32, i32* @IGNBRK
%8 = load i32, i32* @IGNPAR
%9 = or i32 %8, %7
store i32 %9, i32* %6
%10 = getelementptr inbounds %struct.termios, %struct.termios* %2, i64 0, i32 2
%11 = load i32, i32* @CS8
%12 = load i32, i32* @CREAD
%13 = or i32 %12, %11
%14 = load i32, i32* @CLOCAL
%15 = or i32 %13, %14
store i32 %15, i32* %10
%16 = load i64, i64* @VTIME
%17 = getelementptr inbounds i32, i32* null, i64 %16
store i32 poison, i32* %17
%18 = load i64, i64* @VMIN
%19 = getelementptr inbounds i32, i32* null, i64 %18
store i32 poison, i32* %19
%20 = load i32, i32* @B2400
%21 = call i32 @cfsetispeed(%struct.termios* %2, i32 %20)
%22 = icmp eq i32 %21, -1
br i1 %22, label %23, label %25
23: ; preds = %1
%24 = call i32 @fatal_e_(i32 1, i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str, i64 0, i64 0), i32 408, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
br label %25
25: ; preds = %23, %1
%26 = load i32, i32* @B2400
%27 = call i32 @cfsetospeed(%struct.termios* %2, i32 %26)
%28 = icmp eq i32 %27, -1
br i1 %28, label %29, label %31
29: ; preds = %25
%30 = call i32 @fatal_e_(i32 1, i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str, i64 0, i64 0), i32 410, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
br label %31
31: ; preds = %29, %25
%32 = load i32, i32* @TCSAFLUSH
%33 = call i32 @tcsetattr(i32 %0, i32 %32, %struct.termios* %2)
%34 = icmp eq i32 %33, -1
br i1 %34, label %35, label %37
35: ; preds = %31
%36 = call i32 @fatal_e_(i32 1, i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str, i64 0, i64 0), i32 413, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
br label %37
37: ; preds = %35, %31
%38 = bitcast %struct.termios* %3 to i8*
%39 = call i32 @tcgetattr(i32 %0, %struct.termios* %3)
%40 = icmp eq i32 %39, -1
br i1 %40, label %41, label %43
41: ; preds = %37
%42 = call i32 @fatal_e_(i32 1, i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str, i64 0, i64 0), i32 417, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0))
br label %43
43: ; preds = %41, %37
%44 = load i32, i32* @TCIOFLUSH
%45 = call i32 @tcflush(i32 %0, i32 %44)
%46 = icmp eq i32 %45, -1
br i1 %46, label %47, label %49
47: ; preds = %43
%48 = call i32 @fatal_e_(i32 2, i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str, i64 0, i64 0), i32 420, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0))
br label %49
49: ; preds = %47, %43
%50 = load i32, i32* %6
%51 = getelementptr inbounds %struct.termios, %struct.termios* %3, i64 0, i32 0
%52 = load i32, i32* %51
%53 = icmp eq i32 %50, %52
br i1 %53, label %54, label %71
54: ; preds = %49
%55 = getelementptr inbounds %struct.termios, %struct.termios* %2, i64 0, i32 1
%56 = load i64, i64* %55
%57 = getelementptr inbounds %struct.termios, %struct.termios* %3, i64 0, i32 1
%58 = load i64, i64* %57
%59 = icmp eq i64 %56, %58
br i1 %59, label %60, label %71
60: ; preds = %54
%61 = load i32, i32* %10
%62 = getelementptr inbounds %struct.termios, %struct.termios* %3, i64 0, i32 2
%63 = load i32, i32* %62
%64 = icmp eq i32 %61, %63
br i1 %64, label %65, label %71
65: ; preds = %60
%66 = getelementptr inbounds %struct.termios, %struct.termios* %2, i64 0, i32 3
%67 = load i64, i64* %66
%68 = getelementptr inbounds %struct.termios, %struct.termios* %3, i64 0, i32 3
%69 = load i64, i64* %68
%70 = icmp eq i64 %67, %69
br i1 %70, label %73, label %71
71: ; preds = %49, %54, %60, %65
%72 = call i32 @fatal_(i32 2, i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str, i64 0, i64 0), i32 424, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.6, i64 0, i64 0))
br label %73
73: ; preds = %71, %65
%74 = call i32 @uart_consume(i32 %0)
store i8 95, i8* %4
%75 = call i32 @uart_send(i32 %0, i8* %4, i32 1)
%76 = call i32 @uart_send(i32 %0, i8* %4, i32 1)
%77 = call i32 @uart_send_recv(i32 %0, i8* %4, i32 1, i32 4)
%78 = call i32 @uart_consume(i32 %0)
ret void
}