#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;
  scalar_t__ c_oflag;
  int /*<<< orphan*/ c_iflag;
};
typedef int /*<<< orphan*/ newtio;

/* Variables and functions */
int B4800;
int CLOCAL;
int CREAD;
int CS8;
int /*<<< orphan*/ IGNPAR;
int O_NOCTTY;
int O_RDWR;
int /*<<< orphan*/ TCIFLUSH;
int /*<<< orphan*/ TCSANOW;
size_t VDISCARD;
size_t VEOF;
size_t VEOL;
size_t VEOL2;
size_t VERASE;
size_t VINTR;
size_t VKILL;
size_t VLNEXT;
size_t VMIN;
size_t VQUIT;
size_t VREPRINT;
size_t VSTART;
size_t VSTOP;
size_t VSUSP;
size_t VSWTC;
size_t VTIME;
size_t VWERASE;
int /*<<< orphan*/ bzero(struct termios *, int);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ grantpt(int);
int open(char *, int);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *, char *);
char *ptsname(int);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ tcflush(int, int /*<<< orphan*/);
int /*<<< orphan*/ tcsetattr(int, int /*<<< orphan*/, struct termios *);
int /*<<< orphan*/ unlockpt(int);
int open_output(char *output_dev) {
  int fd;
  struct termios newtio;
  printf("opening device '%s' for output\n", output_dev);
  fd = open(output_dev, O_RDWR | O_NOCTTY);
  if (fd < 0) {
    perror(output_dev);
    exit(-1);
  }
  grantpt(fd);
  unlockpt(fd);
  if (ptsname(fd))
    fprintf(stderr, "\tslave output device: '%s'\n", ptsname(fd));
  bzero(&newtio, sizeof(newtio));
  newtio.c_cflag = B4800 | CS8 | CLOCAL | CREAD;
  newtio.c_iflag = IGNPAR;
  newtio.c_oflag = 0;
  newtio.c_cc[VINTR] = 0;
  newtio.c_cc[VQUIT] = 0;
  newtio.c_cc[VERASE] = 0;
  newtio.c_cc[VKILL] = 0;
  newtio.c_cc[VEOF] = 4;
  newtio.c_cc[VTIME] = 0;
  newtio.c_cc[VMIN] = 0;
  newtio.c_cc[VSWTC] = 0;
  newtio.c_cc[VSTART] = 0;
  newtio.c_cc[VSTOP] = 0;
  newtio.c_cc[VSUSP] = 0;
  newtio.c_cc[VEOL] = 0;
  newtio.c_cc[VREPRINT] = 0;
  newtio.c_cc[VDISCARD] = 0;
  newtio.c_cc[VWERASE] = 0;
  newtio.c_cc[VLNEXT] = 0;
  newtio.c_cc[VEOL2] = 0;
  tcflush(fd, TCIFLUSH);
  tcsetattr(fd, TCSANOW, &newtio);
  return fd;
}


x86 assembly (clang, -O0):
<open_output>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xe39(%rip),%rdi
call   1050 <printf@plt>
mov    -0x8(%rbp),%rdi
mov    0x2e11(%rip),%rax
mov    (%rax),%esi
mov    0x2d90(%rip),%rax
or     (%rax),%esi
call   1090 <open@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    1207 <open_output+0x57>
mov    -0x8(%rbp),%rdi
call   10a0 <perror@plt>
mov    $0xffffffff,%edi
call   10d0 <exit@plt>
mov    -0xc(%rbp),%edi
call   10c0 <grantpt@plt>
mov    -0xc(%rbp),%edi
call   1060 <unlockpt@plt>
mov    -0xc(%rbp),%edi
call   1030 <ptsname@plt>
cmp    $0x0,%rax
je     124f <open_output+0x9f>
mov    0x2d38(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x34(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <ptsname@plt>
mov    -0x34(%rbp),%edi
mov    %rax,%rdx
lea    0xdd6(%rip),%rsi
call   1070 <fprintf@plt>
lea    -0x30(%rbp),%rdi
mov    $0x20,%esi
call   10b0 <bzero@plt>
mov    0x2d44(%rip),%rax
mov    (%rax),%eax
mov    0x2d23(%rip),%rcx
or     (%rcx),%eax
mov    0x2c9a(%rip),%rcx
or     (%rcx),%eax
mov    0x2d19(%rip),%rcx
or     (%rcx),%eax
mov    %eax,-0x30(%rbp)
mov    0x2cb5(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x28(%rbp),%rax
mov    0x2c85(%rip),%rcx
mov    (%rcx),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x28(%rbp),%rax
mov    0x2ca0(%rip),%rcx
mov    (%rcx),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x28(%rbp),%rax
mov    0x2ceb(%rip),%rcx
mov    (%rcx),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x28(%rbp),%rax
mov    0x2cee(%rip),%rcx
mov    (%rcx),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x28(%rbp),%rax
mov    0x2c11(%rip),%rcx
mov    (%rcx),%rcx
movl   $0x4,(%rax,%rcx,4)
mov    -0x28(%rbp),%rax
mov    0x2c44(%rip),%rcx
mov    (%rcx),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x28(%rbp),%rax
mov    0x2c67(%rip),%rcx
mov    (%rcx),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x28(%rbp),%rax
mov    0x2c12(%rip),%rcx
mov    (%rcx),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x28(%rbp),%rax
mov    0x2bcd(%rip),%rcx
mov    (%rcx),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x28(%rbp),%rax
mov    0x2c68(%rip),%rcx
mov    (%rcx),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x28(%rbp),%rax
mov    0x2bbb(%rip),%rcx
mov    (%rcx),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x28(%rbp),%rax
mov    0x2b96(%rip),%rcx
mov    (%rcx),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x28(%rbp),%rax
mov    0x2c01(%rip),%rcx
mov    (%rcx),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x28(%rbp),%rax
mov    0x2c0c(%rip),%rcx
mov    (%rcx),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x28(%rbp),%rax
mov    0x2c0f(%rip),%rcx
mov    (%rcx),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x28(%rbp),%rax
mov    0x2b82(%rip),%rcx
mov    (%rcx),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x28(%rbp),%rax
mov    0x2bed(%rip),%rcx
mov    (%rcx),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0xc(%rbp),%edi
mov    0x2b71(%rip),%rax
mov    (%rax),%esi
call   1040 <tcflush@plt>
mov    -0xc(%rbp),%edi
mov    0x2b98(%rip),%rax
mov    (%rax),%esi
lea    -0x30(%rbp),%rdx
call   1080 <tcsetattr@plt>
mov    -0xc(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<open_output>:
push   %rbp
push   %r14
push   %rbx
sub    $0x20,%rsp
mov    %rdi,%rbx
lea    0xe3e(%rip),%rdi
mov    %rbx,%rsi
call   1050 <printf@plt>
mov    0x2e17(%rip),%rax
mov    0x2d98(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
mov    %rbx,%rdi
call   1090 <open@plt>
test   %eax,%eax
js     13ca <open_output+0x21a>
mov    %eax,%ebp
mov    %eax,%edi
call   10c0 <grantpt@plt>
mov    %ebp,%edi
call   1060 <unlockpt@plt>
mov    %ebp,%edi
call   1030 <ptsname@plt>
test   %rax,%rax
je     1229 <open_output+0x79>
mov    0x2d59(%rip),%rax
mov    (%rax),%ebx
mov    %ebp,%edi
call   1030 <ptsname@plt>
lea    0xe01(%rip),%rsi
mov    %ebx,%edi
mov    %rax,%rdx
call   1070 <fprintf@plt>
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0x20,%esi
call   10b0 <bzero@plt>
mov    0x2d68(%rip),%rax
mov    0x2d49(%rip),%rcx
mov    (%rcx),%ecx
or     (%rax),%ecx
mov    0x2cbe(%rip),%rax
or     (%rax),%ecx
mov    0x2d3d(%rip),%rax
or     (%rax),%ecx
mov    %ecx,(%rsp)
mov    0x2cd9(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x18(%rsp)
movq   $0x0,0x10(%rsp)
mov    0x8(%rsp),%rax
mov    0x2ca6(%rip),%rcx
mov    (%rcx),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    0x2cc5(%rip),%rcx
mov    (%rcx),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    0x2d14(%rip),%rcx
mov    (%rcx),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    0x2d1b(%rip),%rcx
mov    (%rcx),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    0x2c42(%rip),%rcx
mov    (%rcx),%rcx
movl   $0x4,(%rax,%rcx,4)
mov    0x2c79(%rip),%rcx
mov    (%rcx),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    0x2ca0(%rip),%rcx
mov    (%rcx),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    0x2c4f(%rip),%rcx
mov    (%rcx),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    0x2c0e(%rip),%rcx
mov    (%rcx),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    0x2cad(%rip),%rcx
mov    (%rcx),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    0x2c04(%rip),%rcx
mov    (%rcx),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    0x2be3(%rip),%rcx
mov    (%rcx),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    0x2c52(%rip),%rcx
mov    (%rcx),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    0x2c61(%rip),%rcx
mov    (%rcx),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    0x2c68(%rip),%rcx
mov    (%rcx),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    0x2bdf(%rip),%rcx
mov    (%rcx),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    0x2c4e(%rip),%rcx
mov    (%rcx),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    0x2bd5(%rip),%rax
mov    (%rax),%esi
mov    %ebp,%edi
call   1040 <tcflush@plt>
mov    0x2bfd(%rip),%rax
mov    (%rax),%esi
mov    %ebp,%edi
mov    %r14,%rdx
call   1080 <tcsetattr@plt>
mov    %ebp,%eax
add    $0x20,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret
mov    %rbx,%rdi
call   10a0 <perror@plt>
mov    $0xffffffff,%edi
call   10d0 <exit@plt>

LLVM IR (-O0):
%struct.termios = type { i32, i32*, i64, i32 }
@.str = [32 x i8] c"opening device '%s' for output\0A\00"
@O_RDWR = global i32 0
@O_NOCTTY = global i32 0
@stderr = global i32 0
@.str.1 = [28 x i8] c"\09slave output device: '%s'\0A\00"
@B4800 = global i32 0
@CS8 = global i32 0
@CLOCAL = global i32 0
@CREAD = global i32 0
@IGNPAR = global i32 0
@VINTR = global i64 0
@VQUIT = global i64 0
@VERASE = global i64 0
@VKILL = global i64 0
@VEOF = global i64 0
@VTIME = global i64 0
@VMIN = global i64 0
@VSWTC = global i64 0
@VSTART = global i64 0
@VSTOP = global i64 0
@VSUSP = global i64 0
@VEOL = global i64 0
@VREPRINT = global i64 0
@VDISCARD = global i64 0
@VWERASE = global i64 0
@VLNEXT = global i64 0
@VEOL2 = global i64 0
@TCIFLUSH = global i32 0
@TCSANOW = global i32 0
define i32 @open_output(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca %struct.termios
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = load i8*, i8** %2
%8 = load i32, i32* @O_RDWR
%9 = load i32, i32* @O_NOCTTY
%10 = or i32 %8, %9
%11 = call i32 @open(i8* %7, i32 %10)
store i32 %11, i32* %3
%12 = load i32, i32* %3
%13 = icmp slt i32 %12, 0
br i1 %13, label %14, label %18
14: ; preds = %1
%15 = load i8*, i8** %2
%16 = call i32 @perror(i8* %15)
%17 = call i32 @exit(i32 -1)
unreachable
18: ; preds = %1
%19 = load i32, i32* %3
%20 = call i32 @grantpt(i32 %19)
%21 = load i32, i32* %3
%22 = call i32 @unlockpt(i32 %21)
%23 = load i32, i32* %3
%24 = call i8* @ptsname(i32 %23)
%25 = icmp ne i8* %24, null
br i1 %25, label %26, label %31
26: ; preds = %18
%27 = load i32, i32* @stderr
%28 = load i32, i32* %3
%29 = call i8* @ptsname(i32 %28)
%30 = call i32 @fprintf(i32 %27, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i8* %29)
br label %31
31: ; preds = %26, %18
%32 = call i32 @bzero(%struct.termios* %4, i32 32)
%33 = load i32, i32* @B4800
%34 = load i32, i32* @CS8
%35 = or i32 %33, %34
%36 = load i32, i32* @CLOCAL
%37 = or i32 %35, %36
%38 = load i32, i32* @CREAD
%39 = or i32 %37, %38
%40 = getelementptr inbounds %struct.termios, %struct.termios* %4, i32 0, i32 0
store i32 %39, i32* %40
%41 = load i32, i32* @IGNPAR
%42 = getelementptr inbounds %struct.termios, %struct.termios* %4, i32 0, i32 3
store i32 %41, i32* %42
%43 = getelementptr inbounds %struct.termios, %struct.termios* %4, i32 0, i32 2
store i64 0, i64* %43
%44 = getelementptr inbounds %struct.termios, %struct.termios* %4, i32 0, i32 1
%45 = load i32*, i32** %44
%46 = load i64, i64* @VINTR
%47 = getelementptr inbounds i32, i32* %45, i64 %46
store i32 0, i32* %47
%48 = getelementptr inbounds %struct.termios, %struct.termios* %4, i32 0, i32 1
%49 = load i32*, i32** %48
%50 = load i64, i64* @VQUIT
%51 = getelementptr inbounds i32, i32* %49, i64 %50
store i32 0, i32* %51
%52 = getelementptr inbounds %struct.termios, %struct.termios* %4, i32 0, i32 1
%53 = load i32*, i32** %52
%54 = load i64, i64* @VERASE
%55 = getelementptr inbounds i32, i32* %53, i64 %54
store i32 0, i32* %55
%56 = getelementptr inbounds %struct.termios, %struct.termios* %4, i32 0, i32 1
%57 = load i32*, i32** %56
%58 = load i64, i64* @VKILL
%59 = getelementptr inbounds i32, i32* %57, i64 %58
store i32 0, i32* %59
%60 = getelementptr inbounds %struct.termios, %struct.termios* %4, i32 0, i32 1
%61 = load i32*, i32** %60
%62 = load i64, i64* @VEOF
%63 = getelementptr inbounds i32, i32* %61, i64 %62
store i32 4, i32* %63
%64 = getelementptr inbounds %struct.termios, %struct.termios* %4, i32 0, i32 1
%65 = load i32*, i32** %64
%66 = load i64, i64* @VTIME
%67 = getelementptr inbounds i32, i32* %65, i64 %66
store i32 0, i32* %67
%68 = getelementptr inbounds %struct.termios, %struct.termios* %4, i32 0, i32 1
%69 = load i32*, i32** %68
%70 = load i64, i64* @VMIN
%71 = getelementptr inbounds i32, i32* %69, i64 %70
store i32 0, i32* %71
%72 = getelementptr inbounds %struct.termios, %struct.termios* %4, i32 0, i32 1
%73 = load i32*, i32** %72
%74 = load i64, i64* @VSWTC
%75 = getelementptr inbounds i32, i32* %73, i64 %74
store i32 0, i32* %75
%76 = getelementptr inbounds %struct.termios, %struct.termios* %4, i32 0, i32 1
%77 = load i32*, i32** %76
%78 = load i64, i64* @VSTART
%79 = getelementptr inbounds i32, i32* %77, i64 %78
store i32 0, i32* %79
%80 = getelementptr inbounds %struct.termios, %struct.termios* %4, i32 0, i32 1
%81 = load i32*, i32** %80
%82 = load i64, i64* @VSTOP
%83 = getelementptr inbounds i32, i32* %81, i64 %82
store i32 0, i32* %83
%84 = getelementptr inbounds %struct.termios, %struct.termios* %4, i32 0, i32 1
%85 = load i32*, i32** %84
%86 = load i64, i64* @VSUSP
%87 = getelementptr inbounds i32, i32* %85, i64 %86
store i32 0, i32* %87
%88 = getelementptr inbounds %struct.termios, %struct.termios* %4, i32 0, i32 1
%89 = load i32*, i32** %88
%90 = load i64, i64* @VEOL
%91 = getelementptr inbounds i32, i32* %89, i64 %90
store i32 0, i32* %91
%92 = getelementptr inbounds %struct.termios, %struct.termios* %4, i32 0, i32 1
%93 = load i32*, i32** %92
%94 = load i64, i64* @VREPRINT
%95 = getelementptr inbounds i32, i32* %93, i64 %94
store i32 0, i32* %95
%96 = getelementptr inbounds %struct.termios, %struct.termios* %4, i32 0, i32 1
%97 = load i32*, i32** %96
%98 = load i64, i64* @VDISCARD
%99 = getelementptr inbounds i32, i32* %97, i64 %98
store i32 0, i32* %99
%100 = getelementptr inbounds %struct.termios, %struct.termios* %4, i32 0, i32 1
%101 = load i32*, i32** %100
%102 = load i64, i64* @VWERASE
%103 = getelementptr inbounds i32, i32* %101, i64 %102
store i32 0, i32* %103
%104 = getelementptr inbounds %struct.termios, %struct.termios* %4, i32 0, i32 1
%105 = load i32*, i32** %104
%106 = load i64, i64* @VLNEXT
%107 = getelementptr inbounds i32, i32* %105, i64 %106
store i32 0, i32* %107
%108 = getelementptr inbounds %struct.termios, %struct.termios* %4, i32 0, i32 1
%109 = load i32*, i32** %108
%110 = load i64, i64* @VEOL2
%111 = getelementptr inbounds i32, i32* %109, i64 %110
store i32 0, i32* %111
%112 = load i32, i32* %3
%113 = load i32, i32* @TCIFLUSH
%114 = call i32 @tcflush(i32 %112, i32 %113)
%115 = load i32, i32* %3
%116 = load i32, i32* @TCSANOW
%117 = call i32 @tcsetattr(i32 %115, i32 %116, %struct.termios* %4)
%118 = load i32, i32* %3
ret i32 %118
}

LLVM IR (-O2):
%struct.termios = type { i32, i32*, i64, i32 }
@.str = [32 x i8] c"opening device '%s' for output\0A\00"
@O_RDWR = global i32 0
@O_NOCTTY = global i32 0
@stderr = global i32 0
@.str.1 = [28 x i8] c"\09slave output device: '%s'\0A\00"
@B4800 = global i32 0
@CS8 = global i32 0
@CLOCAL = global i32 0
@CREAD = global i32 0
@IGNPAR = global i32 0
@VINTR = global i64 0
@VQUIT = global i64 0
@VERASE = global i64 0
@VKILL = global i64 0
@VEOF = global i64 0
@VTIME = global i64 0
@VMIN = global i64 0
@VSWTC = global i64 0
@VSTART = global i64 0
@VSTOP = global i64 0
@VSUSP = global i64 0
@VEOL = global i64 0
@VREPRINT = global i64 0
@VDISCARD = global i64 0
@VWERASE = global i64 0
@VLNEXT = global i64 0
@VEOL2 = global i64 0
@TCIFLUSH = global i32 0
@TCSANOW = global i32 0
define i32 @open_output(i8* %0) {
%2 = alloca %struct.termios
%3 = bitcast %struct.termios* %2 to i8*
%4 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = load i32, i32* @O_RDWR
%6 = load i32, i32* @O_NOCTTY
%7 = or i32 %6, %5
%8 = tail call i32 @open(i8* %0, i32 %7)
%9 = icmp slt i32 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %1
%11 = tail call i32 @perror(i8* %0)
%12 = tail call i32 @exit(i32 -1)
unreachable
13: ; preds = %1
%14 = tail call i32 @grantpt(i32 %8)
%15 = tail call i32 @unlockpt(i32 %8)
%16 = tail call i8* @ptsname(i32 %8)
%17 = icmp eq i8* %16, null
br i1 %17, label %22, label %18
18: ; preds = %13
%19 = load i32, i32* @stderr
%20 = tail call i8* @ptsname(i32 %8)
%21 = tail call i32 @fprintf(i32 %19, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i8* %20)
br label %22
22: ; preds = %18, %13
%23 = call i32 @bzero(%struct.termios* %2, i32 32)
%24 = load i32, i32* @B4800
%25 = load i32, i32* @CS8
%26 = or i32 %25, %24
%27 = load i32, i32* @CLOCAL
%28 = or i32 %26, %27
%29 = load i32, i32* @CREAD
%30 = or i32 %28, %29
%31 = getelementptr inbounds %struct.termios, %struct.termios* %2, i64 0, i32 0
store i32 %30, i32* %31
%32 = load i32, i32* @IGNPAR
%33 = getelementptr inbounds %struct.termios, %struct.termios* %2, i64 0, i32 3
store i32 %32, i32* %33
%34 = getelementptr inbounds %struct.termios, %struct.termios* %2, i64 0, i32 2
store i64 0, i64* %34
%35 = getelementptr inbounds %struct.termios, %struct.termios* %2, i64 0, i32 1
%36 = load i32*, i32** %35
%37 = load i64, i64* @VINTR
%38 = getelementptr inbounds i32, i32* %36, i64 %37
store i32 0, i32* %38
%39 = load i64, i64* @VQUIT
%40 = getelementptr inbounds i32, i32* %36, i64 %39
store i32 0, i32* %40
%41 = load i64, i64* @VERASE
%42 = getelementptr inbounds i32, i32* %36, i64 %41
store i32 0, i32* %42
%43 = load i64, i64* @VKILL
%44 = getelementptr inbounds i32, i32* %36, i64 %43
store i32 0, i32* %44
%45 = load i64, i64* @VEOF
%46 = getelementptr inbounds i32, i32* %36, i64 %45
store i32 4, i32* %46
%47 = load i64, i64* @VTIME
%48 = getelementptr inbounds i32, i32* %36, i64 %47
store i32 0, i32* %48
%49 = load i64, i64* @VMIN
%50 = getelementptr inbounds i32, i32* %36, i64 %49
store i32 0, i32* %50
%51 = load i64, i64* @VSWTC
%52 = getelementptr inbounds i32, i32* %36, i64 %51
store i32 0, i32* %52
%53 = load i64, i64* @VSTART
%54 = getelementptr inbounds i32, i32* %36, i64 %53
store i32 0, i32* %54
%55 = load i64, i64* @VSTOP
%56 = getelementptr inbounds i32, i32* %36, i64 %55
store i32 0, i32* %56
%57 = load i64, i64* @VSUSP
%58 = getelementptr inbounds i32, i32* %36, i64 %57
store i32 0, i32* %58
%59 = load i64, i64* @VEOL
%60 = getelementptr inbounds i32, i32* %36, i64 %59
store i32 0, i32* %60
%61 = load i64, i64* @VREPRINT
%62 = getelementptr inbounds i32, i32* %36, i64 %61
store i32 0, i32* %62
%63 = load i64, i64* @VDISCARD
%64 = getelementptr inbounds i32, i32* %36, i64 %63
store i32 0, i32* %64
%65 = load i64, i64* @VWERASE
%66 = getelementptr inbounds i32, i32* %36, i64 %65
store i32 0, i32* %66
%67 = load i64, i64* @VLNEXT
%68 = getelementptr inbounds i32, i32* %36, i64 %67
store i32 0, i32* %68
%69 = load i64, i64* @VEOL2
%70 = getelementptr inbounds i32, i32* %36, i64 %69
store i32 0, i32* %70
%71 = load i32, i32* @TCIFLUSH
%72 = tail call i32 @tcflush(i32 %8, i32 %71)
%73 = load i32, i32* @TCSANOW
%74 = call i32 @tcsetattr(i32 %8, i32 %73, %struct.termios* %2)
ret i32 %8
}