#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_cflag;
  int c_iflag;
  int *c_cc;
  scalar_t__ c_oflag;
  scalar_t__ c_lflag;
};

/* Variables and functions */
unsigned int B115200;
int CLOCAL;
int CREAD;
int CRTSCTS;
int CS8;
int CSIZE;
int CSTOPB;
int IGNBRK;
int IXANY;
int IXOFF;
int IXON;
int /*<<< orphan*/ O_ASYNC;
int /*<<< orphan*/ O_RDWR;
int PARENB;
int PARODD;
int /*<<< orphan*/ TCSANOW;
int /*<<< orphan*/ TIOCMGET;
int /*<<< orphan*/ TIOCMSET;
int TIOCM_RTS;
size_t VMIN;
size_t VTIME;
int /*<<< orphan*/ cfsetispeed(struct termios *, unsigned int);
int /*<<< orphan*/ cfsetospeed(struct termios *, unsigned int);
int /*<<< orphan*/ ioctl(int, int /*<<< orphan*/, int *);
int open(char const *, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
scalar_t__ tcgetattr(int, struct termios *);
scalar_t__ tcsetattr(int, int /*<<< orphan*/, struct termios *);
int openIMU(const char *devName) {
  int fd = open(devName, O_RDWR, O_ASYNC);
  if (fd == -1)
    return -1;
  struct termios newtio;
  if (tcgetattr(fd, &newtio) != 0)
    printf("\nFirst stuff failed\n");
  unsigned int _baud = B115200;
  cfsetospeed(&newtio, _baud);
  cfsetispeed(&newtio, _baud);
  newtio.c_cflag = (newtio.c_cflag & ~CSIZE) | CS8;
  newtio.c_cflag |= CLOCAL | CREAD;
  newtio.c_cflag &= ~(PARENB | PARODD);
  newtio.c_cflag &= ~CRTSCTS;
  newtio.c_cflag &= ~CSTOPB;
  newtio.c_iflag = IGNBRK;
  newtio.c_iflag &= ~(IXON | IXOFF | IXANY);
  newtio.c_lflag = 0;
  newtio.c_oflag = 0;
  newtio.c_cc[VTIME] = 1;
  newtio.c_cc[VMIN] = 60;
  if (tcsetattr(fd, TCSANOW, &newtio) != 0)
    printf("tsetaddr1 failed!\n");
  int mcs = 0;
  ioctl(fd, TIOCMGET, &mcs);
  mcs |= TIOCM_RTS;
  ioctl(fd, TIOCMSET, &mcs);
  if (tcgetattr(fd, &newtio) != 0)
    printf("tcgetattr() 4 failed\n");
  newtio.c_cflag &= ~CRTSCTS;
  if (tcsetattr(fd, TCSANOW, &newtio) != 0)
    printf("tcsetattr() 2 failed\n");
  return fd;
}


x86 assembly (clang, -O0):
<openIMU>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    0x2e61(%rip),%rax
mov    (%rax),%esi
mov    0x2dc8(%rip),%rax
mov    (%rax),%edx
call   1080 <open@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xffffffff,-0x14(%rbp)
jne    11b0 <openIMU+0x40>
movl   $0xffffffff,-0x4(%rbp)
jmp    13a4 <openIMU+0x234>
mov    -0x14(%rbp),%edi
lea    -0x38(%rbp),%rsi
call   1060 <tcgetattr@plt>
cmp    $0x0,%rax
je     11d2 <openIMU+0x62>
lea    0xe33(%rip),%rdi
call   1040 <printf@plt>
mov    0x2d8f(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x3c(%rbp),%esi
lea    -0x38(%rbp),%rdi
call   1030 <cfsetospeed@plt>
mov    -0x3c(%rbp),%esi
lea    -0x38(%rbp),%rdi
call   1090 <cfsetispeed@plt>
mov    -0x38(%rbp),%eax
mov    0x2d90(%rip),%rcx
mov    (%rcx),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    0x2d92(%rip),%rcx
or     (%rcx),%eax
mov    %eax,-0x38(%rbp)
mov    0x2d1e(%rip),%rax
mov    (%rax),%eax
mov    0x2d85(%rip),%rcx
or     (%rcx),%eax
or     -0x38(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    0x2d96(%rip),%rax
mov    (%rax),%eax
mov    0x2d75(%rip),%rcx
or     (%rcx),%eax
xor    $0xffffffff,%eax
and    -0x38(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    0x2cfb(%rip),%rax
mov    (%rax),%eax
xor    $0xffffffff,%eax
and    -0x38(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    0x2ce1(%rip),%rax
mov    (%rax),%eax
xor    $0xffffffff,%eax
and    -0x38(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    0x2cff(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x34(%rbp)
mov    0x2d53(%rip),%rax
mov    (%rax),%eax
mov    0x2d5a(%rip),%rcx
or     (%rcx),%eax
mov    0x2ce9(%rip),%rcx
or     (%rcx),%eax
xor    $0xffffffff,%eax
and    -0x34(%rbp),%eax
mov    %eax,-0x34(%rbp)
movq   $0x0,-0x20(%rbp)
movq   $0x0,-0x28(%rbp)
mov    -0x30(%rbp),%rax
mov    0x2cab(%rip),%rcx
mov    (%rcx),%rcx
movl   $0x1,(%rax,%rcx,4)
mov    -0x30(%rbp),%rax
mov    0x2cce(%rip),%rcx
mov    (%rcx),%rcx
movl   $0x3c,(%rax,%rcx,4)
mov    -0x14(%rbp),%edi
mov    0x2ce2(%rip),%rax
mov    (%rax),%esi
lea    -0x38(%rbp),%rdx
call   1070 <tcsetattr@plt>
cmp    $0x0,%rax
je     12ff <openIMU+0x18f>
lea    0xd1b(%rip),%rdi
call   1040 <printf@plt>
movl   $0x0,-0x40(%rbp)
mov    -0x14(%rbp),%edi
mov    0x2c78(%rip),%rax
mov    (%rax),%esi
lea    -0x40(%rbp),%rdx
call   1050 <ioctl@plt>
mov    0x2c96(%rip),%rax
mov    (%rax),%eax
or     -0x40(%rbp),%eax
mov    %eax,-0x40(%rbp)
mov    -0x14(%rbp),%edi
mov    0x2ca4(%rip),%rax
mov    (%rax),%esi
lea    -0x40(%rbp),%rdx
call   1050 <ioctl@plt>
mov    -0x14(%rbp),%edi
lea    -0x38(%rbp),%rsi
call   1060 <tcgetattr@plt>
cmp    $0x0,%rax
je     1361 <openIMU+0x1f1>
lea    0xccc(%rip),%rdi
call   1040 <printf@plt>
mov    0x2be0(%rip),%rax
mov    (%rax),%eax
xor    $0xffffffff,%eax
and    -0x38(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    -0x14(%rbp),%edi
mov    0x2c43(%rip),%rax
mov    (%rax),%esi
lea    -0x38(%rbp),%rdx
call   1070 <tcsetattr@plt>
cmp    $0x0,%rax
je     139e <openIMU+0x22e>
lea    0xca5(%rip),%rdi
call   1040 <printf@plt>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<openIMU>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x30,%rsp
mov    0x2e65(%rip),%rax
mov    (%rax),%esi
mov    0x2dcc(%rip),%rax
mov    (%rax),%edx
call   1080 <open@plt>
mov    %eax,%ebx
cmp    $0xffffffff,%eax
je     133a <openIMU+0x1ca>
lea    0x10(%rsp),%rsi
mov    %ebx,%edi
call   1060 <tcgetattr@plt>
test   %rax,%rax
je     11bb <openIMU+0x4b>
lea    0xe86(%rip),%rdi
call   1030 <puts@plt>
mov    0x2da6(%rip),%rax
mov    (%rax),%ebp
lea    0x10(%rsp),%r14
mov    %r14,%rdi
mov    %ebp,%esi
call   1040 <cfsetospeed@plt>
mov    %r14,%rdi
mov    %ebp,%esi
call   1090 <cfsetispeed@plt>
mov    0x2dac(%rip),%rax
mov    (%rax),%eax
not    %eax
and    0x10(%rsp),%eax
mov    0x2dad(%rip),%rcx
or     (%rcx),%eax
mov    0x2d3c(%rip),%rcx
or     (%rcx),%eax
mov    0x2da3(%rip),%rcx
or     (%rcx),%eax
mov    0x2dba(%rip),%rcx
mov    0x2d9b(%rip),%rdx
mov    (%rdx),%edx
or     (%rcx),%edx
mov    0x2d28(%rip),%r15
or     (%r15),%edx
mov    0x2d16(%rip),%rcx
or     (%rcx),%edx
not    %edx
and    %eax,%edx
mov    0x2d99(%rip),%rax
mov    0x2da2(%rip),%rcx
mov    (%rcx),%ecx
or     (%rax),%ecx
mov    %edx,0x10(%rsp)
mov    0x2d2b(%rip),%rax
or     (%rax),%ecx
mov    0x2d1a(%rip),%rax
not    %ecx
and    (%rax),%ecx
mov    %ecx,0x14(%rsp)
xorps  %xmm0,%xmm0
movups %xmm0,0x20(%rsp)
mov    0x18(%rsp),%rax
mov    0x2cee(%rip),%rcx
mov    (%rcx),%rcx
movl   $0x1,(%rax,%rcx,4)
mov    0x2d15(%rip),%rcx
mov    (%rcx),%rcx
movl   $0x3c,(%rax,%rcx,4)
mov    0x2d2c(%rip),%r12
mov    (%r12),%esi
mov    %ebx,%edi
mov    %r14,%rdx
call   1070 <tcsetattr@plt>
test   %rax,%rax
je     12b3 <openIMU+0x143>
lea    0xd7c(%rip),%rdi
call   1030 <puts@plt>
movl   $0x0,0xc(%rsp)
mov    0x2cc6(%rip),%rax
mov    (%rax),%esi
lea    0xc(%rsp),%rbp
mov    %ebx,%edi
mov    %rbp,%rdx
call   1050 <ioctl@plt>
mov    0x2cde(%rip),%rax
mov    (%rax),%eax
or     %eax,0xc(%rsp)
mov    0x2cf1(%rip),%rax
mov    (%rax),%esi
mov    %ebx,%edi
mov    %rbp,%rdx
call   1050 <ioctl@plt>
lea    0x10(%rsp),%rsi
mov    %ebx,%edi
call   1060 <tcgetattr@plt>
test   %rax,%rax
je     1310 <openIMU+0x1a0>
lea    0xd0a(%rip),%rdi
call   1030 <puts@plt>
mov    (%r15),%eax
not    %eax
and    %eax,0x10(%rsp)
mov    (%r12),%esi
lea    0x10(%rsp),%rdx
mov    %ebx,%edi
call   1070 <tcsetattr@plt>
test   %rax,%rax
je     133a <openIMU+0x1ca>
lea    0xccb(%rip),%rdi
call   1030 <puts@plt>
mov    %ebx,%eax
add    $0x30,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.termios = type { i32, i32, i32*, i64, i64 }
@O_RDWR = global i32 0
@O_ASYNC = global i32 0
@.str = [21 x i8] c"\0AFirst stuff failed\0A\00"
@B115200 = global i32 0
@CSIZE = global i32 0
@CS8 = global i32 0
@CLOCAL = global i32 0
@CREAD = global i32 0
@PARENB = global i32 0
@PARODD = global i32 0
@CRTSCTS = global i32 0
@CSTOPB = global i32 0
@IGNBRK = global i32 0
@IXON = global i32 0
@IXOFF = global i32 0
@IXANY = global i32 0
@VTIME = global i64 0
@VMIN = global i64 0
@TCSANOW = global i32 0
@.str.1 = [19 x i8] c"tsetaddr1 failed!\0A\00"
@TIOCMGET = global i32 0
@TIOCM_RTS = global i32 0
@TIOCMSET = global i32 0
@.str.2 = [22 x i8] c"tcgetattr() 4 failed\0A\00"
@.str.3 = [22 x i8] c"tcsetattr() 2 failed\0A\00"
define i32 @openIMU(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
%5 = alloca %struct.termios
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %3
%8 = load i8*, i8** %3
%9 = load i32, i32* @O_RDWR
%10 = load i32, i32* @O_ASYNC
%11 = call i32 @open(i8* %8, i32 %9, i32 %10)
store i32 %11, i32* %4
%12 = load i32, i32* %4
%13 = icmp eq i32 %12, -1
br i1 %13, label %14, label %15
14: ; preds = %1
store i32 -1, i32* %2
br label %114
15: ; preds = %1
%16 = load i32, i32* %4
%17 = call i64 @tcgetattr(i32 %16, %struct.termios* %5)
%18 = icmp ne i64 %17, 0
br i1 %18, label %19, label %21
19: ; preds = %15
%20 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
br label %21
21: ; preds = %19, %15
%22 = load i32, i32* @B115200
store i32 %22, i32* %6
%23 = load i32, i32* %6
%24 = call i32 @cfsetospeed(%struct.termios* %5, i32 %23)
%25 = load i32, i32* %6
%26 = call i32 @cfsetispeed(%struct.termios* %5, i32 %25)
%27 = getelementptr inbounds %struct.termios, %struct.termios* %5, i32 0, i32 0
%28 = load i32, i32* %27
%29 = load i32, i32* @CSIZE
%30 = xor i32 %29, -1
%31 = and i32 %28, %30
%32 = load i32, i32* @CS8
%33 = or i32 %31, %32
%34 = getelementptr inbounds %struct.termios, %struct.termios* %5, i32 0, i32 0
store i32 %33, i32* %34
%35 = load i32, i32* @CLOCAL
%36 = load i32, i32* @CREAD
%37 = or i32 %35, %36
%38 = getelementptr inbounds %struct.termios, %struct.termios* %5, i32 0, i32 0
%39 = load i32, i32* %38
%40 = or i32 %39, %37
store i32 %40, i32* %38
%41 = load i32, i32* @PARENB
%42 = load i32, i32* @PARODD
%43 = or i32 %41, %42
%44 = xor i32 %43, -1
%45 = getelementptr inbounds %struct.termios, %struct.termios* %5, i32 0, i32 0
%46 = load i32, i32* %45
%47 = and i32 %46, %44
store i32 %47, i32* %45
%48 = load i32, i32* @CRTSCTS
%49 = xor i32 %48, -1
%50 = getelementptr inbounds %struct.termios, %struct.termios* %5, i32 0, i32 0
%51 = load i32, i32* %50
%52 = and i32 %51, %49
store i32 %52, i32* %50
%53 = load i32, i32* @CSTOPB
%54 = xor i32 %53, -1
%55 = getelementptr inbounds %struct.termios, %struct.termios* %5, i32 0, i32 0
%56 = load i32, i32* %55
%57 = and i32 %56, %54
store i32 %57, i32* %55
%58 = load i32, i32* @IGNBRK
%59 = getelementptr inbounds %struct.termios, %struct.termios* %5, i32 0, i32 1
store i32 %58, i32* %59
%60 = load i32, i32* @IXON
%61 = load i32, i32* @IXOFF
%62 = or i32 %60, %61
%63 = load i32, i32* @IXANY
%64 = or i32 %62, %63
%65 = xor i32 %64, -1
%66 = getelementptr inbounds %struct.termios, %struct.termios* %5, i32 0, i32 1
%67 = load i32, i32* %66
%68 = and i32 %67, %65
store i32 %68, i32* %66
%69 = getelementptr inbounds %struct.termios, %struct.termios* %5, i32 0, i32 4
store i64 0, i64* %69
%70 = getelementptr inbounds %struct.termios, %struct.termios* %5, i32 0, i32 3
store i64 0, i64* %70
%71 = getelementptr inbounds %struct.termios, %struct.termios* %5, i32 0, i32 2
%72 = load i32*, i32** %71
%73 = load i64, i64* @VTIME
%74 = getelementptr inbounds i32, i32* %72, i64 %73
store i32 1, i32* %74
%75 = getelementptr inbounds %struct.termios, %struct.termios* %5, i32 0, i32 2
%76 = load i32*, i32** %75
%77 = load i64, i64* @VMIN
%78 = getelementptr inbounds i32, i32* %76, i64 %77
store i32 60, i32* %78
%79 = load i32, i32* %4
%80 = load i32, i32* @TCSANOW
%81 = call i64 @tcsetattr(i32 %79, i32 %80, %struct.termios* %5)
%82 = icmp ne i64 %81, 0
br i1 %82, label %83, label %85
83: ; preds = %21
%84 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
br label %85
85: ; preds = %83, %21
store i32 0, i32* %7
%86 = load i32, i32* %4
%87 = load i32, i32* @TIOCMGET
%88 = call i32 @ioctl(i32 %86, i32 %87, i32* %7)
%89 = load i32, i32* @TIOCM_RTS
%90 = load i32, i32* %7
%91 = or i32 %90, %89
store i32 %91, i32* %7
%92 = load i32, i32* %4
%93 = load i32, i32* @TIOCMSET
%94 = call i32 @ioctl(i32 %92, i32 %93, i32* %7)
%95 = load i32, i32* %4
%96 = call i64 @tcgetattr(i32 %95, %struct.termios* %5)
%97 = icmp ne i64 %96, 0
br i1 %97, label %98, label %100
98: ; preds = %85
%99 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
br label %100
100: ; preds = %98, %85
%101 = load i32, i32* @CRTSCTS
%102 = xor i32 %101, -1
%103 = getelementptr inbounds %struct.termios, %struct.termios* %5, i32 0, i32 0
%104 = load i32, i32* %103
%105 = and i32 %104, %102
store i32 %105, i32* %103
%106 = load i32, i32* %4
%107 = load i32, i32* @TCSANOW
%108 = call i64 @tcsetattr(i32 %106, i32 %107, %struct.termios* %5)
%109 = icmp ne i64 %108, 0
br i1 %109, label %110, label %112
110: ; preds = %100
%111 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0))
br label %112
112: ; preds = %110, %100
%113 = load i32, i32* %4
store i32 %113, i32* %2
br label %114
114: ; preds = %112, %14
%115 = load i32, i32* %2
ret i32 %115
}

LLVM IR (-O2):
%struct.termios = type { i32, i32, i32*, i64, i64 }
@O_RDWR = global i32 0
@O_ASYNC = global i32 0
@B115200 = global i32 0
@CSIZE = global i32 0
@CS8 = global i32 0
@CLOCAL = global i32 0
@CREAD = global i32 0
@PARENB = global i32 0
@PARODD = global i32 0
@CRTSCTS = global i32 0
@CSTOPB = global i32 0
@IGNBRK = global i32 0
@IXON = global i32 0
@IXOFF = global i32 0
@IXANY = global i32 0
@VTIME = global i64 0
@VMIN = global i64 0
@TCSANOW = global i32 0
@TIOCMGET = global i32 0
@TIOCM_RTS = global i32 0
@TIOCMSET = global i32 0
@str = [21 x i8] c"tcsetattr() 2 failed\00"
@str.4 = [21 x i8] c"tcgetattr() 4 failed\00"
@str.5 = [18 x i8] c"tsetaddr1 failed!\00"
@str.6 = [20 x i8] c"\0AFirst stuff failed\00"
define i32 @openIMU(i8* nocapture %0) {
%2 = alloca %struct.termios
%3 = alloca i32
%4 = load i32, i32* @O_RDWR
%5 = load i32, i32* @O_ASYNC
%6 = tail call i32 @open(i8* %0, i32 %4, i32 %5)
%7 = icmp eq i32 %6, -1
br i1 %7, label %84, label %8
8: ; preds = %1
%9 = bitcast %struct.termios* %2 to i8*
%10 = call i64 @tcgetattr(i32 %6, %struct.termios* %2)
%11 = icmp eq i64 %10, 0
br i1 %11, label %14, label %12
12: ; preds = %8
%13 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.6, i64 0, i64 0))
br label %14
14: ; preds = %12, %8
%15 = load i32, i32* @B115200
%16 = call i32 @cfsetospeed(%struct.termios* %2, i32 %15)
%17 = call i32 @cfsetispeed(%struct.termios* %2, i32 %15)
%18 = getelementptr inbounds %struct.termios, %struct.termios* %2, i64 0, i32 0
%19 = load i32, i32* %18
%20 = load i32, i32* @CSIZE
%21 = xor i32 %20, -1
%22 = and i32 %19, %21
%23 = load i32, i32* @CS8
%24 = or i32 %22, %23
%25 = load i32, i32* @CLOCAL
%26 = load i32, i32* @CREAD
%27 = or i32 %25, %24
%28 = or i32 %27, %26
%29 = load i32, i32* @PARENB
%30 = load i32, i32* @PARODD
%31 = or i32 %30, %29
%32 = load i32, i32* @CRTSCTS
%33 = or i32 %31, %32
%34 = load i32, i32* @CSTOPB
%35 = or i32 %33, %34
%36 = xor i32 %35, -1
%37 = and i32 %28, %36
store i32 %37, i32* %18
%38 = load i32, i32* @IGNBRK
%39 = getelementptr inbounds %struct.termios, %struct.termios* %2, i64 0, i32 1
%40 = load i32, i32* @IXON
%41 = load i32, i32* @IXOFF
%42 = or i32 %41, %40
%43 = load i32, i32* @IXANY
%44 = or i32 %42, %43
%45 = xor i32 %44, -1
%46 = and i32 %38, %45
store i32 %46, i32* %39
%47 = getelementptr inbounds %struct.termios, %struct.termios* %2, i64 0, i32 3
%48 = getelementptr inbounds %struct.termios, %struct.termios* %2, i64 0, i32 2
%49 = bitcast i64* %47 to i8*
%50 = load i32*, i32** %48
%51 = load i64, i64* @VTIME
%52 = getelementptr inbounds i32, i32* %50, i64 %51
store i32 1, i32* %52
%53 = load i64, i64* @VMIN
%54 = getelementptr inbounds i32, i32* %50, i64 %53
store i32 60, i32* %54
%55 = load i32, i32* @TCSANOW
%56 = call i64 @tcsetattr(i32 %6, i32 %55, %struct.termios* %2)
%57 = icmp eq i64 %56, 0
br i1 %57, label %60, label %58
58: ; preds = %14
%59 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.5, i64 0, i64 0))
br label %60
60: ; preds = %58, %14
%61 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%62 = load i32, i32* @TIOCMGET
%63 = call i32 @ioctl(i32 %6, i32 %62, i32* %3)
%64 = load i32, i32* @TIOCM_RTS
%65 = load i32, i32* %3
%66 = or i32 %65, %64
store i32 %66, i32* %3
%67 = load i32, i32* @TIOCMSET
%68 = call i32 @ioctl(i32 %6, i32 %67, i32* %3)
%69 = call i64 @tcgetattr(i32 %6, %struct.termios* %2)
%70 = icmp eq i64 %69, 0
br i1 %70, label %73, label %71
71: ; preds = %60
%72 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.4, i64 0, i64 0))
br label %73
73: ; preds = %71, %60
%74 = load i32, i32* @CRTSCTS
%75 = xor i32 %74, -1
%76 = load i32, i32* %18
%77 = and i32 %76, %75
store i32 %77, i32* %18
%78 = load i32, i32* @TCSANOW
%79 = call i64 @tcsetattr(i32 %6, i32 %78, %struct.termios* %2)
%80 = icmp eq i64 %79, 0
br i1 %80, label %83, label %81
81: ; preds = %73
%82 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
br label %83
83: ; preds = %81, %73
br label %84
84: ; preds = %1, %83
ret i32 %6
}