#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_cc;
  int /*<<< orphan*/ c_iflag;
};

/* Variables and functions */
int CS7;
int CS8;
int CSIZE;
int CSTOPB;
int /*<<< orphan*/ INPCK;
int PARENB;
int PARODD;
int /*<<< orphan*/ TCIFLUSH;
int /*<<< orphan*/ TCSANOW;
size_t VMIN;
size_t VTIME;
int /*<<< orphan*/ tcflush(int, int /*<<< orphan*/);
scalar_t__ tcgetattr(int, struct termios *);
scalar_t__ tcsetattr(int, int /*<<< orphan*/, struct termios *);
int serial_set_parity(int fd, int parity, int databits, int stopbits) {
  struct termios options;
  if (tcgetattr(fd, &options) != 0) {
    return -1;
  }
  options.c_cflag &= ~CSIZE;
  switch (databits) {
  case 7:
    options.c_cflag |= CS7;
    break;
  case 8:
    options.c_cflag |= CS8;
    break;
  default:
    return -1;
  }
  switch (parity) {
  case 'n':
  case 'N':
    options.c_cflag &= ~PARENB;
    options.c_iflag &= ~INPCK;
    break;
  case 'o':
  case 'O':
    options.c_cflag |= (PARODD | PARENB);
    options.c_iflag |= INPCK;
    break;
  case 'e':
  case 'E':
    options.c_cflag |= PARENB;
    options.c_cflag &= ~PARODD;
    options.c_iflag |= INPCK;
    break;
  case 'S':
  case 's':
    options.c_cflag &= ~PARENB;
    options.c_cflag &= ~CSTOPB;
    break;
  default:
    return -1;
  }
  switch (stopbits) {
  case 1:
    options.c_cflag &= ~CSTOPB;
    break;
  case 2:
    options.c_cflag |= CSTOPB;
    break;
  default:
    return -1;
  }
  if (parity != 'n' || parity != 'N')
    options.c_iflag |= INPCK;
  tcflush(fd, TCIFLUSH);
  options.c_cc[VTIME] = 150;
  options.c_cc[VMIN] = 0;
  if (tcsetattr(fd, TCSANOW, &options) != 0) {
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<serial_set_parity>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x8(%rbp),%edi
lea    -0x30(%rbp),%rsi
call   1040 <tcgetattr@plt>
cmp    $0x0,%rax
je     1166 <serial_set_parity+0x36>
movl   $0xffffffff,-0x4(%rbp)
jmp    13a6 <serial_set_parity+0x276>
mov    0x2e53(%rip),%rax
mov    (%rax),%ecx
not    %ecx
mov    -0x30(%rbp),%eax
and    %ecx,%eax
mov    %eax,-0x30(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x34(%rbp)
sub    $0x7,%eax
je     119e <serial_set_parity+0x6e>
jmp    118d <serial_set_parity+0x5d>
mov    -0x34(%rbp),%eax
sub    $0x8,%eax
je     11b2 <serial_set_parity+0x82>
jmp    11c6 <serial_set_parity+0x96>
mov    0x2de3(%rip),%rax
mov    (%rax),%eax
or     -0x30(%rbp),%eax
mov    %eax,-0x30(%rbp)
jmp    11d2 <serial_set_parity+0xa2>
mov    0x2e17(%rip),%rax
mov    (%rax),%eax
or     -0x30(%rbp),%eax
mov    %eax,-0x30(%rbp)
jmp    11d2 <serial_set_parity+0xa2>
movl   $0xffffffff,-0x4(%rbp)
jmp    13a6 <serial_set_parity+0x276>
mov    -0xc(%rbp),%eax
add    $0xffffffbb,%eax
mov    %eax,%ecx
mov    %rcx,-0x40(%rbp)
sub    $0x2e,%eax
ja     12ae <serial_set_parity+0x17e>
mov    -0x40(%rbp),%rax
lea    0xe0e(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    0x2de6(%rip),%rax
mov    (%rax),%eax
xor    $0xffffffff,%eax
and    -0x30(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    0x2d94(%rip),%rax
mov    (%rax),%eax
xor    $0xffffffff,%eax
and    -0x20(%rbp),%eax
mov    %eax,-0x20(%rbp)
jmp    12ba <serial_set_parity+0x18a>
mov    0x2dad(%rip),%rax
mov    (%rax),%eax
mov    0x2db4(%rip),%rcx
or     (%rcx),%eax
or     -0x30(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    0x2d65(%rip),%rax
mov    (%rax),%eax
or     -0x20(%rbp),%eax
mov    %eax,-0x20(%rbp)
jmp    12ba <serial_set_parity+0x18a>
mov    0x2d91(%rip),%rax
mov    (%rax),%eax
or     -0x30(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    0x2d72(%rip),%rax
mov    (%rax),%eax
xor    $0xffffffff,%eax
and    -0x30(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    0x2d30(%rip),%rax
mov    (%rax),%eax
or     -0x20(%rbp),%eax
mov    %eax,-0x20(%rbp)
jmp    12ba <serial_set_parity+0x18a>
mov    0x2d5c(%rip),%rax
mov    (%rax),%eax
xor    $0xffffffff,%eax
and    -0x30(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    0x2cf2(%rip),%rax
mov    (%rax),%eax
xor    $0xffffffff,%eax
and    -0x30(%rbp),%eax
mov    %eax,-0x30(%rbp)
jmp    12ba <serial_set_parity+0x18a>
movl   $0xffffffff,-0x4(%rbp)
jmp    13a6 <serial_set_parity+0x276>
mov    -0x14(%rbp),%eax
mov    %eax,-0x44(%rbp)
sub    $0x1,%eax
je     12df <serial_set_parity+0x1af>
jmp    12ce <serial_set_parity+0x19e>
mov    -0x44(%rbp),%eax
sub    $0x2,%eax
je     12f6 <serial_set_parity+0x1c6>
jmp    130a <serial_set_parity+0x1da>
mov    0x2caa(%rip),%rax
mov    (%rax),%eax
xor    $0xffffffff,%eax
and    -0x30(%rbp),%eax
mov    %eax,-0x30(%rbp)
jmp    1316 <serial_set_parity+0x1e6>
mov    0x2c93(%rip),%rax
mov    (%rax),%eax
or     -0x30(%rbp),%eax
mov    %eax,-0x30(%rbp)
jmp    1316 <serial_set_parity+0x1e6>
movl   $0xffffffff,-0x4(%rbp)
jmp    13a6 <serial_set_parity+0x276>
cmpl   $0x6e,-0xc(%rbp)
jne    132a <serial_set_parity+0x1fa>
cmpl   $0x4e,-0xc(%rbp)
je     1339 <serial_set_parity+0x209>
mov    0x2c77(%rip),%rax
mov    (%rax),%eax
or     -0x20(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x8(%rbp),%edi
mov    0x2c6d(%rip),%rax
mov    (%rax),%esi
call   1030 <tcflush@plt>
mov    -0x28(%rbp),%rax
mov    0x2c4b(%rip),%rcx
mov    (%rcx),%rcx
movl   $0x96,(%rax,%rcx,4)
mov    -0x28(%rbp),%rax
mov    0x2c5e(%rip),%rcx
mov    (%rcx),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x8(%rbp),%edi
mov    0x2c62(%rip),%rax
mov    (%rax),%esi
lea    -0x30(%rbp),%rdx
call   1050 <tcsetattr@plt>
cmp    $0x0,%rax
je     139f <serial_set_parity+0x26f>
movl   $0xffffffff,-0x4(%rbp)
jmp    13a6 <serial_set_parity+0x276>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<serial_set_parity>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %ecx,%r14d
mov    %edx,%ebx
mov    %esi,%ebp
mov    %edi,%r15d
mov    %rsp,%rsi
call   1040 <tcgetattr@plt>
mov    %rax,%rcx
mov    $0xffffffff,%eax
test   %rcx,%rcx
je     1164 <serial_set_parity+0x34>
add    $0x18,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2e55(%rip),%rcx
mov    (%rcx),%ecx
not    %ecx
and    (%rsp),%ecx
cmp    $0x7,%ebx
je     1185 <serial_set_parity+0x55>
cmp    $0x8,%ebx
jne    1159 <serial_set_parity+0x29>
mov    0x2e4d(%rip),%rdx
jmp    118c <serial_set_parity+0x5c>
mov    0x2dfc(%rip),%rdx
add    $0xffffffbb,%ebp
cmp    $0x2e,%ebp
ja     1159 <serial_set_parity+0x29>
or     (%rdx),%ecx
lea    0xe63(%rip),%rdx
movslq (%rdx,%rbp,4),%rsi
add    %rdx,%rsi
jmp    *%rsi
mov    0x2e3b(%rip),%rdx
or     (%rdx),%ecx
mov    0x2e22(%rip),%rdx
mov    (%rdx),%edx
not    %edx
and    %edx,%ecx
jmp    11f4 <serial_set_parity+0xc4>
mov    0x2e23(%rip),%rdx
mov    (%rdx),%edx
not    %edx
and    %edx,%ecx
mov    0x2dd6(%rip),%rdx
mov    (%rdx),%edx
not    %edx
and    %edx,0x10(%rsp)
cmp    $0x2,%r14d
jne    1207 <serial_set_parity+0xd7>
jmp    123c <serial_set_parity+0x10c>
mov    0x2def(%rip),%rdx
or     (%rdx),%ecx
mov    0x2df6(%rip),%rdx
or     (%rdx),%ecx
mov    0x2dad(%rip),%rdx
mov    (%rdx),%edx
or     %edx,0x10(%rsp)
cmp    $0x2,%r14d
je     123c <serial_set_parity+0x10c>
cmp    $0x1,%r14d
jne    1159 <serial_set_parity+0x29>
mov    0x2d78(%rip),%rax
mov    (%rax),%eax
not    %eax
and    %eax,%ecx
jmp    1245 <serial_set_parity+0x115>
mov    0x2dc1(%rip),%rdx
mov    (%rdx),%edx
mov    0x2d60(%rip),%rsi
or     (%rsi),%edx
not    %edx
and    %edx,%ecx
cmp    $0x2,%r14d
jne    1207 <serial_set_parity+0xd7>
mov    0x2d4d(%rip),%rax
or     (%rax),%ecx
mov    %ecx,(%rsp)
mov    0x2d59(%rip),%rax
mov    (%rax),%eax
or     %eax,0x10(%rsp)
mov    0x2d54(%rip),%rax
mov    (%rax),%esi
mov    %r15d,%edi
call   1030 <tcflush@plt>
mov    0x8(%rsp),%rax
mov    0x2d2e(%rip),%rcx
mov    (%rcx),%rcx
movl   $0x96,(%rax,%rcx,4)
mov    0x2d45(%rip),%rcx
mov    (%rcx),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    0x2d4c(%rip),%rax
mov    (%rax),%esi
mov    %rsp,%rdx
mov    %r15d,%edi
call   1050 <tcsetattr@plt>
neg    %rax
sbb    %eax,%eax
jmp    1159 <serial_set_parity+0x29>

LLVM IR (-O0):
%struct.termios = type { i32, i32*, i32 }
@CSIZE = global i32 0
@CS7 = global i32 0
@CS8 = global i32 0
@PARENB = global i32 0
@INPCK = global i32 0
@PARODD = global i32 0
@CSTOPB = global i32 0
@TCIFLUSH = global i32 0
@VTIME = global i64 0
@VMIN = global i64 0
@TCSANOW = global i32 0
define i32 @serial_set_parity(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca %struct.termios
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
%11 = load i32, i32* %6
%12 = call i64 @tcgetattr(i32 %11, %struct.termios* %10)
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %15
14: ; preds = %4
store i32 -1, i32* %5
br label %126
15: ; preds = %4
%16 = load i32, i32* @CSIZE
%17 = xor i32 %16, -1
%18 = getelementptr inbounds %struct.termios, %struct.termios* %10, i32 0, i32 0
%19 = load i32, i32* %18
%20 = and i32 %19, %17
store i32 %20, i32* %18
%21 = load i32, i32* %8
switch i32 %21, label %32 [
i32 7, label %22
i32 8, label %27
]
22: ; preds = %15
%23 = load i32, i32* @CS7
%24 = getelementptr inbounds %struct.termios, %struct.termios* %10, i32 0, i32 0
%25 = load i32, i32* %24
%26 = or i32 %25, %23
store i32 %26, i32* %24
br label %33
27: ; preds = %15
%28 = load i32, i32* @CS8
%29 = getelementptr inbounds %struct.termios, %struct.termios* %10, i32 0, i32 0
%30 = load i32, i32* %29
%31 = or i32 %30, %28
store i32 %31, i32* %29
br label %33
32: ; preds = %15
store i32 -1, i32* %5
br label %126
33: ; preds = %27, %22
%34 = load i32, i32* %7
switch i32 %34, label %82 [
i32 110, label %35
i32 78, label %35
i32 111, label %46
i32 79, label %46
i32 101, label %57
i32 69, label %57
i32 83, label %71
i32 115, label %71
]
35: ; preds = %33, %33
%36 = load i32, i32* @PARENB
%37 = xor i32 %36, -1
%38 = getelementptr inbounds %struct.termios, %struct.termios* %10, i32 0, i32 0
%39 = load i32, i32* %38
%40 = and i32 %39, %37
store i32 %40, i32* %38
%41 = load i32, i32* @INPCK
%42 = xor i32 %41, -1
%43 = getelementptr inbounds %struct.termios, %struct.termios* %10, i32 0, i32 2
%44 = load i32, i32* %43
%45 = and i32 %44, %42
store i32 %45, i32* %43
br label %83
46: ; preds = %33, %33
%47 = load i32, i32* @PARODD
%48 = load i32, i32* @PARENB
%49 = or i32 %47, %48
%50 = getelementptr inbounds %struct.termios, %struct.termios* %10, i32 0, i32 0
%51 = load i32, i32* %50
%52 = or i32 %51, %49
store i32 %52, i32* %50
%53 = load i32, i32* @INPCK
%54 = getelementptr inbounds %struct.termios, %struct.termios* %10, i32 0, i32 2
%55 = load i32, i32* %54
%56 = or i32 %55, %53
store i32 %56, i32* %54
br label %83
57: ; preds = %33, %33
%58 = load i32, i32* @PARENB
%59 = getelementptr inbounds %struct.termios, %struct.termios* %10, i32 0, i32 0
%60 = load i32, i32* %59
%61 = or i32 %60, %58
store i32 %61, i32* %59
%62 = load i32, i32* @PARODD
%63 = xor i32 %62, -1
%64 = getelementptr inbounds %struct.termios, %struct.termios* %10, i32 0, i32 0
%65 = load i32, i32* %64
%66 = and i32 %65, %63
store i32 %66, i32* %64
%67 = load i32, i32* @INPCK
%68 = getelementptr inbounds %struct.termios, %struct.termios* %10, i32 0, i32 2
%69 = load i32, i32* %68
%70 = or i32 %69, %67
store i32 %70, i32* %68
br label %83
71: ; preds = %33, %33
%72 = load i32, i32* @PARENB
%73 = xor i32 %72, -1
%74 = getelementptr inbounds %struct.termios, %struct.termios* %10, i32 0, i32 0
%75 = load i32, i32* %74
%76 = and i32 %75, %73
store i32 %76, i32* %74
%77 = load i32, i32* @CSTOPB
%78 = xor i32 %77, -1
%79 = getelementptr inbounds %struct.termios, %struct.termios* %10, i32 0, i32 0
%80 = load i32, i32* %79
%81 = and i32 %80, %78
store i32 %81, i32* %79
br label %83
82: ; preds = %33
store i32 -1, i32* %5
br label %126
83: ; preds = %71, %57, %46, %35
%84 = load i32, i32* %9
switch i32 %84, label %96 [
i32 1, label %85
i32 2, label %91
]
85: ; preds = %83
%86 = load i32, i32* @CSTOPB
%87 = xor i32 %86, -1
%88 = getelementptr inbounds %struct.termios, %struct.termios* %10, i32 0, i32 0
%89 = load i32, i32* %88
%90 = and i32 %89, %87
store i32 %90, i32* %88
br label %97
91: ; preds = %83
%92 = load i32, i32* @CSTOPB
%93 = getelementptr inbounds %struct.termios, %struct.termios* %10, i32 0, i32 0
%94 = load i32, i32* %93
%95 = or i32 %94, %92
store i32 %95, i32* %93
br label %97
96: ; preds = %83
store i32 -1, i32* %5
br label %126
97: ; preds = %91, %85
%98 = load i32, i32* %7
%99 = icmp ne i32 %98, 110
br i1 %99, label %103, label %100
100: ; preds = %97
%101 = load i32, i32* %7
%102 = icmp ne i32 %101, 78
br i1 %102, label %103, label %108
103: ; preds = %100, %97
%104 = load i32, i32* @INPCK
%105 = getelementptr inbounds %struct.termios, %struct.termios* %10, i32 0, i32 2
%106 = load i32, i32* %105
%107 = or i32 %106, %104
store i32 %107, i32* %105
br label %108
108: ; preds = %103, %100
%109 = load i32, i32* %6
%110 = load i32, i32* @TCIFLUSH
%111 = call i32 @tcflush(i32 %109, i32 %110)
%112 = getelementptr inbounds %struct.termios, %struct.termios* %10, i32 0, i32 1
%113 = load i32*, i32** %112
%114 = load i64, i64* @VTIME
%115 = getelementptr inbounds i32, i32* %113, i64 %114
store i32 150, i32* %115
%116 = getelementptr inbounds %struct.termios, %struct.termios* %10, i32 0, i32 1
%117 = load i32*, i32** %116
%118 = load i64, i64* @VMIN
%119 = getelementptr inbounds i32, i32* %117, i64 %118
store i32 0, i32* %119
%120 = load i32, i32* %6
%121 = load i32, i32* @TCSANOW
%122 = call i64 @tcsetattr(i32 %120, i32 %121, %struct.termios* %10)
%123 = icmp ne i64 %122, 0
br i1 %123, label %124, label %125
124: ; preds = %108
store i32 -1, i32* %5
br label %126
125: ; preds = %108
store i32 0, i32* %5
br label %126
126: ; preds = %125, %124, %96, %82, %32, %14
%127 = load i32, i32* %5
ret i32 %127
}

LLVM IR (-O2):
%struct.termios = type { i32, i32*, i32 }
@CSIZE = global i32 0
@CS7 = global i32 0
@CS8 = global i32 0
@PARENB = global i32 0
@INPCK = global i32 0
@PARODD = global i32 0
@CSTOPB = global i32 0
@TCIFLUSH = global i32 0
@VTIME = global i64 0
@VMIN = global i64 0
@TCSANOW = global i32 0
define i32 @serial_set_parity(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca %struct.termios
%6 = bitcast %struct.termios* %5 to i8*
%7 = call i64 @tcgetattr(i32 %0, %struct.termios* %5)
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %81
9: ; preds = %4
%10 = load i32, i32* @CSIZE
%11 = xor i32 %10, -1
%12 = getelementptr inbounds %struct.termios, %struct.termios* %5, i64 0, i32 0
%13 = load i32, i32* %12
%14 = and i32 %13, %11
switch i32 %2, label %81 [
i32 7, label %16
i32 8, label %15
]
15: ; preds = %9
br label %16
16: ; preds = %9, %15
%17 = phi i32* [ @CS8, %15 ], [ @CS7, %9 ]
%18 = load i32, i32* %17
%19 = or i32 %18, %14
switch i32 %1, label %81 [
i32 110, label %20
i32 78, label %20
i32 111, label %29
i32 79, label %29
i32 101, label %38
i32 69, label %38
i32 83, label %48
i32 115, label %48
]
20: ; preds = %16, %16
%21 = load i32, i32* @PARENB
%22 = xor i32 %21, -1
%23 = and i32 %19, %22
%24 = load i32, i32* @INPCK
%25 = xor i32 %24, -1
%26 = getelementptr inbounds %struct.termios, %struct.termios* %5, i64 0, i32 2
%27 = load i32, i32* %26
%28 = and i32 %27, %25
store i32 %28, i32* %26
br label %54
29: ; preds = %16, %16
%30 = load i32, i32* @PARODD
%31 = load i32, i32* @PARENB
%32 = or i32 %30, %19
%33 = or i32 %32, %31
%34 = load i32, i32* @INPCK
%35 = getelementptr inbounds %struct.termios, %struct.termios* %5, i64 0, i32 2
%36 = load i32, i32* %35
%37 = or i32 %36, %34
store i32 %37, i32* %35
br label %54
38: ; preds = %16, %16
%39 = load i32, i32* @PARENB
%40 = or i32 %39, %19
%41 = load i32, i32* @PARODD
%42 = xor i32 %41, -1
%43 = and i32 %40, %42
%44 = load i32, i32* @INPCK
%45 = getelementptr inbounds %struct.termios, %struct.termios* %5, i64 0, i32 2
%46 = load i32, i32* %45
%47 = or i32 %46, %44
store i32 %47, i32* %45
br label %54
48: ; preds = %16, %16
%49 = load i32, i32* @PARENB
%50 = load i32, i32* @CSTOPB
%51 = or i32 %49, %50
%52 = xor i32 %51, -1
%53 = and i32 %19, %52
br label %54
54: ; preds = %48, %38, %29, %20
%55 = phi i32 [ %53, %48 ], [ %43, %38 ], [ %33, %29 ], [ %23, %20 ]
switch i32 %3, label %81 [
i32 1, label %56
i32 2, label %60
]
56: ; preds = %54
%57 = load i32, i32* @CSTOPB
%58 = xor i32 %57, -1
%59 = and i32 %55, %58
br label %63
60: ; preds = %54
%61 = load i32, i32* @CSTOPB
%62 = or i32 %55, %61
br label %63
63: ; preds = %60, %56
%64 = phi i32 [ %62, %60 ], [ %59, %56 ]
store i32 %64, i32* %12
%65 = load i32, i32* @INPCK
%66 = getelementptr inbounds %struct.termios, %struct.termios* %5, i64 0, i32 2
%67 = load i32, i32* %66
%68 = or i32 %67, %65
store i32 %68, i32* %66
%69 = load i32, i32* @TCIFLUSH
%70 = call i32 @tcflush(i32 %0, i32 %69)
%71 = getelementptr inbounds %struct.termios, %struct.termios* %5, i64 0, i32 1
%72 = load i32*, i32** %71
%73 = load i64, i64* @VTIME
%74 = getelementptr inbounds i32, i32* %72, i64 %73
store i32 150, i32* %74
%75 = load i64, i64* @VMIN
%76 = getelementptr inbounds i32, i32* %72, i64 %75
store i32 0, i32* %76
%77 = load i32, i32* @TCSANOW
%78 = call i64 @tcsetattr(i32 %0, i32 %77, %struct.termios* %5)
%79 = icmp ne i64 %78, 0
%80 = sext i1 %79 to i32
br label %81
81: ; preds = %63, %54, %16, %9, %4
%82 = phi i32 [ -1, %4 ], [ -1, %9 ], [ -1, %16 ], [ -1, %54 ], [ %80, %63 ]
ret i32 %82
}