#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;
};

/* Variables and functions */
int /*<<< orphan*/ B2400;
int CRTSCTS;
int CS7;
int CSIZE;
int CSTOPB;
int /*<<< orphan*/ O_RDWR;
int PARENB;
int PARODD;
int /*<<< orphan*/ TCSAFLUSH;
int /*<<< orphan*/ cfmakeraw(struct termios *);
int /*<<< orphan*/ cfsetispeed(struct termios *, int /*<<< orphan*/);
int /*<<< orphan*/ cfsetospeed(struct termios *, int /*<<< orphan*/);
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int getargs(int, char **, char *, int *);
int open(char *, int /*<<< orphan*/);
int read(int, char *, int);
int /*<<< orphan*/ sleep(int);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ tcgetattr(int, struct termios *);
int /*<<< orphan*/ tcsetattr(int, int /*<<< orphan*/, struct termios *);
scalar_t__ ttlock(char *);
int /*<<< orphan*/ ttunlock();
int /*<<< orphan*/ write(int, char *, int);
int main(int argc, char *argv[]) {
  int count;
  int fd;
  struct termios state;
  int i, j;
  char buf[128];
  int enqack = 0;
  count = getargs(argc, argv, "eb", &enqack);
  if (count < 0 || (argc - count) < 1) {
    if (count < 0 && -count != '-')
      fprintf(stderr, "Bad flag: %c\n", -count);
    fprintf(stderr, "Usage: %s <device>\n", *argv);
    exit(1);
  }
  while (ttlock(argv[1]))
    sleep(10);
  fd = open(argv[1], O_RDWR);
  tcgetattr(fd, &state);
  cfmakeraw(&state);
  state.c_cflag &= ~(CRTSCTS | PARODD | CSIZE | CSTOPB);
  state.c_cflag |= CS7 | PARENB;
  cfsetispeed(&state, B2400);
  cfsetospeed(&state, B2400);
  tcsetattr(fd, TCSAFLUSH, &state);
  i = 0;
  write(fd, "OE;", 3);
  while ((j = read(0, buf, 1)) > 0) {
    write(fd, buf, j);
    i += j;
    if (i >= 128 && buf[0] == ';') {
      i = 0;
      write(fd, "OE;", 3);
      buf[0] = 0;
      for (j = 0; j < 2;)
        j += read(fd, buf, 1);
    }
  }
  close(fd);
  ttunlock();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0xb4(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    0xddf(%rip),%rdx
lea    -0xb4(%rbp),%rcx
call   1100 <getargs@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jl     1249 <main+0x59>
mov    -0x8(%rbp),%eax
sub    -0x14(%rbp),%eax
cmp    $0x1,%eax
jge    12a5 <main+0xb5>
cmpl   $0x0,-0x14(%rbp)
jge    127d <main+0x8d>
xor    %eax,%eax
sub    -0x14(%rbp),%eax
cmp    $0x2d,%eax
je     127d <main+0x8d>
mov    0x2d50(%rip),%rax
mov    (%rax),%edi
xor    %edx,%edx
sub    -0x14(%rbp),%edx
lea    0xd8d(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    0x2d34(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xd7d(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    $0x1,%edi
call   10f0 <exit@plt>
jmp    12aa <main+0xba>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   10c0 <ttlock@plt>
cmp    $0x0,%rax
je     12d0 <main+0xe0>
mov    $0xa,%edi
call   1110 <sleep@plt>
jmp    12aa <main+0xba>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    0x2d09(%rip),%rax
mov    (%rax),%esi
call   10b0 <open@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%edi
lea    -0x20(%rbp),%rsi
call   1090 <tcgetattr@plt>
lea    -0x20(%rbp),%rdi
call   1080 <cfmakeraw@plt>
mov    0x2c9b(%rip),%rax
mov    (%rax),%eax
mov    0x2cc2(%rip),%rcx
or     (%rcx),%eax
mov    0x2cb1(%rip),%rcx
or     (%rcx),%eax
mov    0x2c78(%rip),%rcx
or     (%rcx),%eax
xor    $0xffffffff,%eax
and    -0x20(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    0x2c5e(%rip),%rax
mov    (%rax),%eax
mov    0x2c9d(%rip),%rcx
or     (%rcx),%eax
or     -0x20(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    0x2c66(%rip),%rax
mov    (%rax),%esi
lea    -0x20(%rbp),%rdi
call   10d0 <cfsetispeed@plt>
mov    0x2c54(%rip),%rax
mov    (%rax),%esi
lea    -0x20(%rbp),%rdi
call   1040 <cfsetospeed@plt>
mov    -0x18(%rbp),%edi
mov    0x2c6f(%rip),%rax
mov    (%rax),%esi
lea    -0x20(%rbp),%rdx
call   10a0 <tcsetattr@plt>
movl   $0x0,-0x24(%rbp)
mov    -0x18(%rbp),%edi
lea    0xc98(%rip),%rsi
mov    $0x3,%edx
call   1030 <write@plt>
lea    -0xb0(%rbp),%rsi
xor    %edi,%edi
mov    $0x1,%edx
call   1060 <read@plt>
mov    %eax,-0x28(%rbp)
cmp    $0x0,%eax
jle    144a <main+0x25a>
mov    -0x18(%rbp),%edi
lea    -0xb0(%rbp),%rsi
mov    -0x28(%rbp),%edx
call   1030 <write@plt>
mov    -0x28(%rbp),%eax
add    -0x24(%rbp),%eax
mov    %eax,-0x24(%rbp)
cmpl   $0x80,-0x24(%rbp)
jl     1445 <main+0x255>
movsbl -0xb0(%rbp),%eax
cmp    $0x3b,%eax
jne    1445 <main+0x255>
movl   $0x0,-0x24(%rbp)
mov    -0x18(%rbp),%edi
lea    0xc26(%rip),%rsi
mov    $0x3,%edx
call   1030 <write@plt>
movb   $0x0,-0xb0(%rbp)
movl   $0x0,-0x28(%rbp)
cmpl   $0x2,-0x28(%rbp)
jge    1440 <main+0x250>
mov    -0x18(%rbp),%edi
lea    -0xb0(%rbp),%rsi
mov    $0x1,%edx
call   1060 <read@plt>
add    -0x28(%rbp),%eax
mov    %eax,-0x28(%rbp)
jmp    1417 <main+0x227>
jmp    1445 <main+0x255>
jmp    1397 <main+0x1a7>
mov    -0x18(%rbp),%edi
call   1050 <close@plt>
mov    $0x0,%al
call   10e0 <ttunlock@plt>
xor    %edi,%edi
call   10f0 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x90,%rsp
mov    %rsi,%rbx
mov    %edi,%ebp
movl   $0x0,0xc(%rsp)
lea    0xded(%rip),%rdx
lea    0xc(%rsp),%rcx
call   1100 <getargs@plt>
test   %eax,%eax
js     124a <main+0x5a>
cmp    %ebp,%eax
jge    124a <main+0x5a>
cs nopw 0x0(%rax,%rax,1)
nop
mov    0x8(%rbx),%rdi
call   10c0 <ttlock@plt>
test   %rax,%rax
je     1292 <main+0xa2>
mov    $0xa,%edi
call   1110 <sleep@plt>
jmp    1230 <main+0x40>
test   %eax,%eax
jns    126e <main+0x7e>
cmp    $0xffffffd3,%eax
je     126e <main+0x7e>
neg    %eax
mov    0x2d5c(%rip),%rcx
mov    (%rcx),%edi
lea    0xd9e(%rip),%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    0x2d43(%rip),%rax
mov    (%rax),%edi
mov    (%rbx),%rdx
lea    0xd90(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    $0x1,%edi
call   10f0 <exit@plt>
mov    0x8(%rbx),%rdi
mov    0x2d4b(%rip),%rax
mov    (%rax),%esi
call   10b0 <open@plt>
mov    %eax,%ebx
lea    0x8(%rsp),%r14
mov    %eax,%edi
mov    %r14,%rsi
call   1090 <tcgetattr@plt>
mov    %r14,%rdi
call   1080 <cfmakeraw@plt>
mov    0x2cdc(%rip),%rax
mov    0x2d05(%rip),%rcx
mov    (%rcx),%ecx
or     (%rax),%ecx
mov    0x2cf2(%rip),%rax
or     (%rax),%ecx
mov    0x2cb9(%rip),%rax
or     (%rax),%ecx
not    %ecx
and    0x8(%rsp),%ecx
mov    0x2ca2(%rip),%rax
mov    0x2ce3(%rip),%rdx
or     (%rax),%ecx
or     (%rdx),%ecx
mov    %ecx,0x8(%rsp)
mov    0x2cac(%rip),%rbp
mov    0x0(%rbp),%esi
mov    %r14,%rdi
call   10d0 <cfsetispeed@plt>
mov    0x0(%rbp),%esi
mov    %r14,%rdi
call   1040 <cfsetospeed@plt>
mov    0x2cbf(%rip),%rax
mov    (%rax),%esi
mov    %ebx,%edi
mov    %r14,%rdx
call   10a0 <tcsetattr@plt>
lea    0xcf1(%rip),%rsi
mov    %ebx,%edi
mov    $0x3,%edx
call   1030 <write@plt>
xor    %r12d,%r12d
lea    0x10(%rsp),%rsi
xor    %edi,%edi
mov    $0x1,%edx
call   1060 <read@plt>
test   %eax,%eax
jle    13d8 <main+0x1e8>
mov    %eax,%ebp
lea    0x10(%rsp),%r14
lea    0xcbb(%rip),%r15
jmp    1385 <main+0x195>
nopl   0x0(%rax)
xor    %edi,%edi
mov    %r14,%rsi
mov    $0x1,%edx
call   1060 <read@plt>
mov    %eax,%ebp
test   %eax,%eax
jle    13d8 <main+0x1e8>
mov    %ebx,%edi
mov    %r14,%rsi
mov    %ebp,%edx
call   1030 <write@plt>
add    %ebp,%r12d
cmp    $0x80,%r12d
jl     1370 <main+0x180>
cmpb   $0x3b,0x10(%rsp)
jne    1370 <main+0x180>
mov    %ebx,%edi
mov    %r15,%rsi
mov    $0x3,%edx
call   1030 <write@plt>
movb   $0x0,0x10(%rsp)
xor    %r12d,%r12d
xor    %ebp,%ebp
nopl   (%rax)
mov    %ebx,%edi
mov    %r14,%rsi
mov    $0x1,%edx
call   1060 <read@plt>
add    %eax,%ebp
cmp    $0x2,%ebp
jl     13c0 <main+0x1d0>
jmp    1370 <main+0x180>
mov    %ebx,%edi
call   1050 <close@plt>
xor    %eax,%eax
call   10e0 <ttunlock@plt>
xor    %edi,%edi
call   10f0 <exit@plt>

LLVM IR (-O0):
%struct.termios = type { i32 }
@.str = [3 x i8] c"eb\00"
@stderr = global i32 0
@.str.1 = [14 x i8] c"Bad flag: %c\0A\00"
@.str.2 = [20 x i8] c"Usage: %s <device>\0A\00"
@O_RDWR = global i32 0
@CRTSCTS = global i32 0
@PARODD = global i32 0
@CSIZE = global i32 0
@CSTOPB = global i32 0
@CS7 = global i32 0
@PARENB = global i32 0
@B2400 = global i32 0
@TCSAFLUSH = global i32 0
@.str.3 = [4 x i8] c"OE;\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca %struct.termios
%9 = alloca i32
%10 = alloca i32
%11 = alloca [128 x i8]
%12 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %12
%13 = load i32, i32* %4
%14 = load i8**, i8*** %5
%15 = call i32 @getargs(i32 %13, i8** %14, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %12)
store i32 %15, i32* %6
%16 = load i32, i32* %6
%17 = icmp slt i32 %16, 0
br i1 %17, label %23, label %18
18: ; preds = %2
%19 = load i32, i32* %4
%20 = load i32, i32* %6
%21 = sub nsw i32 %19, %20
%22 = icmp slt i32 %21, 1
br i1 %22, label %23, label %41
23: ; preds = %18, %2
%24 = load i32, i32* %6
%25 = icmp slt i32 %24, 0
br i1 %25, label %26, label %35
26: ; preds = %23
%27 = load i32, i32* %6
%28 = sub nsw i32 0, %27
%29 = icmp ne i32 %28, 45
br i1 %29, label %30, label %35
30: ; preds = %26
%31 = load i32, i32* @stderr
%32 = load i32, i32* %6
%33 = sub nsw i32 0, %32
%34 = call i32 (i32, i8*, ...) @fprintf(i32 %31, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %33)
br label %35
35: ; preds = %30, %26, %23
%36 = load i32, i32* @stderr
%37 = load i8**, i8*** %5
%38 = load i8*, i8** %37
%39 = call i32 (i32, i8*, ...) @fprintf(i32 %36, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i8* %38)
%40 = call i32 @exit(i32 1)
unreachable
41: ; preds = %18
br label %42
42: ; preds = %48, %41
%43 = load i8**, i8*** %5
%44 = getelementptr inbounds i8*, i8** %43, i64 1
%45 = load i8*, i8** %44
%46 = call i64 @ttlock(i8* %45)
%47 = icmp ne i64 %46, 0
br i1 %47, label %48, label %50
48: ; preds = %42
%49 = call i32 @sleep(i32 10)
br label %42
50: ; preds = %42
%51 = load i8**, i8*** %5
%52 = getelementptr inbounds i8*, i8** %51, i64 1
%53 = load i8*, i8** %52
%54 = load i32, i32* @O_RDWR
%55 = call i32 @open(i8* %53, i32 %54)
store i32 %55, i32* %7
%56 = load i32, i32* %7
%57 = call i32 @tcgetattr(i32 %56, %struct.termios* %8)
%58 = call i32 @cfmakeraw(%struct.termios* %8)
%59 = load i32, i32* @CRTSCTS
%60 = load i32, i32* @PARODD
%61 = or i32 %59, %60
%62 = load i32, i32* @CSIZE
%63 = or i32 %61, %62
%64 = load i32, i32* @CSTOPB
%65 = or i32 %63, %64
%66 = xor i32 %65, -1
%67 = getelementptr inbounds %struct.termios, %struct.termios* %8, i32 0, i32 0
%68 = load i32, i32* %67
%69 = and i32 %68, %66
store i32 %69, i32* %67
%70 = load i32, i32* @CS7
%71 = load i32, i32* @PARENB
%72 = or i32 %70, %71
%73 = getelementptr inbounds %struct.termios, %struct.termios* %8, i32 0, i32 0
%74 = load i32, i32* %73
%75 = or i32 %74, %72
store i32 %75, i32* %73
%76 = load i32, i32* @B2400
%77 = call i32 @cfsetispeed(%struct.termios* %8, i32 %76)
%78 = load i32, i32* @B2400
%79 = call i32 @cfsetospeed(%struct.termios* %8, i32 %78)
%80 = load i32, i32* %7
%81 = load i32, i32* @TCSAFLUSH
%82 = call i32 @tcsetattr(i32 %80, i32 %81, %struct.termios* %8)
store i32 0, i32* %9
%83 = load i32, i32* %7
%84 = call i32 @write(i32 %83, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 3)
br label %85
85: ; preds = %118, %50
%86 = getelementptr inbounds [128 x i8], [128 x i8]* %11, i64 0, i64 0
%87 = call i32 @read(i32 0, i8* %86, i32 1)
store i32 %87, i32* %10
%88 = icmp sgt i32 %87, 0
br i1 %88, label %89, label %119
89: ; preds = %85
%90 = load i32, i32* %7
%91 = getelementptr inbounds [128 x i8], [128 x i8]* %11, i64 0, i64 0
%92 = load i32, i32* %10
%93 = call i32 @write(i32 %90, i8* %91, i32 %92)
%94 = load i32, i32* %10
%95 = load i32, i32* %9
%96 = add nsw i32 %95, %94
store i32 %96, i32* %9
%97 = load i32, i32* %9
%98 = icmp sge i32 %97, 128
br i1 %98, label %99, label %118
99: ; preds = %89
%100 = getelementptr inbounds [128 x i8], [128 x i8]* %11, i64 0, i64 0
%101 = load i8, i8* %100
%102 = sext i8 %101 to i32
%103 = icmp eq i32 %102, 59
br i1 %103, label %104, label %118
104: ; preds = %99
store i32 0, i32* %9
%105 = load i32, i32* %7
%106 = call i32 @write(i32 %105, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 3)
%107 = getelementptr inbounds [128 x i8], [128 x i8]* %11, i64 0, i64 0
store i8 0, i8* %107
store i32 0, i32* %10
br label %108
108: ; preds = %111, %104
%109 = load i32, i32* %10
%110 = icmp slt i32 %109, 2
br i1 %110, label %111, label %117
111: ; preds = %108
%112 = load i32, i32* %7
%113 = getelementptr inbounds [128 x i8], [128 x i8]* %11, i64 0, i64 0
%114 = call i32 @read(i32 %112, i8* %113, i32 1)
%115 = load i32, i32* %10
%116 = add nsw i32 %115, %114
store i32 %116, i32* %10
br label %108
117: ; preds = %108
br label %118
118: ; preds = %117, %99, %89
br label %85
119: ; preds = %85
%120 = load i32, i32* %7
%121 = call i32 @close(i32 %120)
%122 = call i32 (...) @ttunlock()
%123 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
%struct.termios = type { i32 }
@.str = [3 x i8] c"eb\00"
@stderr = global i32 0
@.str.1 = [14 x i8] c"Bad flag: %c\0A\00"
@.str.2 = [20 x i8] c"Usage: %s <device>\0A\00"
@O_RDWR = global i32 0
@CRTSCTS = global i32 0
@PARODD = global i32 0
@CSIZE = global i32 0
@CSTOPB = global i32 0
@CS7 = global i32 0
@PARENB = global i32 0
@B2400 = global i32 0
@TCSAFLUSH = global i32 0
@.str.3 = [4 x i8] c"OE;\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca %struct.termios
%4 = alloca [128 x i8]
%5 = alloca i32
%6 = bitcast %struct.termios* %3 to i8*
%7 = getelementptr inbounds [128 x i8], [128 x i8]* %4, i64 0, i64 0
%8 = bitcast i32* %5 to i8*
store i32 0, i32* %5
%9 = call i32 @getargs(i32 %0, i8** %1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %5)
%10 = icmp sgt i32 %9, -1
%11 = icmp slt i32 %9, %0
%12 = and i1 %10, %11
br i1 %12, label %13, label %18
13: ; preds = %2
%14 = getelementptr inbounds i8*, i8** %1, i64 1
%15 = load i8*, i8** %14
%16 = call i64 @ttlock(i8* %15)
%17 = icmp eq i64 %16, 0
br i1 %17, label %35, label %30
18: ; preds = %2
%19 = icmp eq i32 %9, -45
%20 = or i1 %10, %19
br i1 %20, label %25, label %21
21: ; preds = %18
%22 = sub nsw i32 0, %9
%23 = load i32, i32* @stderr
%24 = call i32 (i32, i8*, ...) @fprintf(i32 %23, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %22)
br label %25
25: ; preds = %21, %18
%26 = load i32, i32* @stderr
%27 = load i8*, i8** %1
%28 = call i32 (i32, i8*, ...) @fprintf(i32 %26, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i8* %27)
%29 = call i32 @exit(i32 1)
unreachable
30: ; preds = %13, %30
%31 = call i32 @sleep(i32 10)
%32 = load i8*, i8** %14
%33 = call i64 @ttlock(i8* %32)
%34 = icmp eq i64 %33, 0
br i1 %34, label %35, label %30
35: ; preds = %30, %13
%36 = load i8*, i8** %14
%37 = load i32, i32* @O_RDWR
%38 = call i32 @open(i8* %36, i32 %37)
%39 = call i32 @tcgetattr(i32 %38, %struct.termios* %3)
%40 = call i32 @cfmakeraw(%struct.termios* %3)
%41 = load i32, i32* @CRTSCTS
%42 = load i32, i32* @PARODD
%43 = or i32 %42, %41
%44 = load i32, i32* @CSIZE
%45 = or i32 %43, %44
%46 = load i32, i32* @CSTOPB
%47 = or i32 %45, %46
%48 = xor i32 %47, -1
%49 = getelementptr inbounds %struct.termios, %struct.termios* %3, i64 0, i32 0
%50 = load i32, i32* %49
%51 = and i32 %50, %48
%52 = load i32, i32* @CS7
%53 = load i32, i32* @PARENB
%54 = or i32 %52, %51
%55 = or i32 %54, %53
store i32 %55, i32* %49
%56 = load i32, i32* @B2400
%57 = call i32 @cfsetispeed(%struct.termios* %3, i32 %56)
%58 = load i32, i32* @B2400
%59 = call i32 @cfsetospeed(%struct.termios* %3, i32 %58)
%60 = load i32, i32* @TCSAFLUSH
%61 = call i32 @tcsetattr(i32 %38, i32 %60, %struct.termios* %3)
%62 = call i32 @write(i32 %38, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 3)
%63 = call i32 @read(i32 0, i8* %7, i32 1)
%64 = icmp sgt i32 %63, 0
br i1 %64, label %65, label %85
65: ; preds = %35, %81
%66 = phi i32 [ %83, %81 ], [ %63, %35 ]
%67 = phi i32 [ %82, %81 ], [ 0, %35 ]
%68 = call i32 @write(i32 %38, i8* %7, i32 %66)
%69 = add nsw i32 %66, %67
%70 = icmp sgt i32 %69, 127
%71 = load i8, i8* %7
%72 = icmp eq i8 %71, 59
%73 = select i1 %70, i1 %72, i1 false
br i1 %73, label %74, label %81
74: ; preds = %65
%75 = call i32 @write(i32 %38, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 3)
store i8 0, i8* %7
br label %76
76: ; preds = %74, %76
%77 = phi i32 [ 0, %74 ], [ %79, %76 ]
%78 = call i32 @read(i32 %38, i8* %7, i32 1)
%79 = add nsw i32 %78, %77
%80 = icmp slt i32 %79, 2
br i1 %80, label %76, label %81
81: ; preds = %76, %65
%82 = phi i32 [ %69, %65 ], [ 0, %76 ]
%83 = call i32 @read(i32 0, i8* %7, i32 1)
%84 = icmp sgt i32 %83, 0
br i1 %84, label %65, label %85
85: ; preds = %81, %35
%86 = call i32 @close(i32 %38)
%87 = call i32 (...) @ttunlock()
%88 = call i32 @exit(i32 0)
unreachable
}