#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 sockaddr_in {
  int /*<<< orphan*/ sin_port;
  int /*<<< orphan*/ sin_addr;
  int /*<<< orphan*/ sin_family;
};
struct sockaddr {
  int dummy;
};
struct hostent {
  int /*<<< orphan*/ h_length;
  int /*<<< orphan*/ h_addr;
};
typedef int /*<<< orphan*/ serv_addr;
typedef int /*<<< orphan*/ fd_set;

/* Variables and functions */
int /*<<< orphan*/ AF_INET;
scalar_t__ FD_ISSET(int, int /*<<< orphan*/ *);
int /*<<< orphan*/ FD_SET(int, int /*<<< orphan*/ *);
int /*<<< orphan*/ SOCK_STREAM;
int atoi(char *);
int /*<<< orphan*/ bcopy(int /*<<< orphan*/, char *, int /*<<< orphan*/);
int /*<<< orphan*/ bzero(char *, int);
int /*<<< orphan*/ close(int);
scalar_t__ connect(int, struct sockaddr *, int);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
struct hostent *gethostbyname(char *);
int /*<<< orphan*/ htons(int);
int /*<<< orphan*/ perror(char *);
int read(int, char *, int);
int /*<<< orphan*/ select(int, int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                          int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ write(int, char *, int);
int main(int argc, char **argv) {
  int sock_fd, port;
  char buf[8192];
  int i, buflen;
  struct sockaddr_in serv_addr;
  struct hostent *hostptr;
  fd_set readfs;
  int maxfd, loop;
  if (argc < 3) {
    fprintf(stderr, "Usage: tcpfilter host port\n");
    exit(1);
  }
  if ((hostptr = gethostbyname(argv[1])) == NULL) {
    perror("Could not get hostname.");
    exit(1);
  }
  port = atoi(argv[2]);
  bzero((char *)&serv_addr, sizeof(serv_addr));
  serv_addr.sin_family = AF_INET;
  bcopy(hostptr->h_addr, (char *)&serv_addr.sin_addr, hostptr->h_length);
  serv_addr.sin_port = htons(port);
  if ((sock_fd = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
    perror("Could not open socket");
    exit(1);
  }
  if (connect(sock_fd, (struct sockaddr *)&serv_addr, sizeof(serv_addr)) < 0)
    perror("Could not connect to server");
  maxfd = sock_fd + 1;
  loop = 1;
  while (loop) {
    FD_SET(0, &readfs);
    FD_SET(sock_fd, &readfs);
    select(maxfd, &readfs, NULL, NULL, NULL);
    if (FD_ISSET(0, &readfs)) {
      buflen = read(0, buf, 8192);
      if (buflen == 0)
        loop = 0;
      else
        write(sock_fd, buf, buflen);
    }
    if (FD_ISSET(sock_fd, &readfs)) {
      buflen = read(sock_fd, buf, 8192);
      if (buflen == 0)
        loop = 0;
      else
        write(1, buf, buflen);
    }
  }
  close(sock_fd);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2050,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x3,-0x8(%rbp)
jge    1242 <main+0x42>
mov    0x2dae(%rip),%rax
mov    (%rax),%edi
lea    0xdcd(%rip),%rsi
call   1090 <fprintf@plt>
mov    $0x1,%edi
call   10f0 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1080 <gethostbyname@plt>
mov    %rax,-0x2040(%rbp)
cmp    $0x0,%rax
jne    1276 <main+0x76>
lea    0xdb5(%rip),%rdi
call   10c0 <perror@plt>
mov    $0x1,%edi
call   10f0 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   10e0 <atoi@plt>
mov    %eax,-0x18(%rbp)
lea    -0x2038(%rbp),%rdi
mov    $0xc,%esi
call   10d0 <bzero@plt>
mov    0x2d4a(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x2030(%rbp)
mov    -0x2040(%rbp),%rax
mov    0x4(%rax),%edi
lea    -0x2038(%rbp),%rsi
add    $0x4,%rsi
mov    -0x2040(%rbp),%rax
mov    (%rax),%edx
call   10b0 <bcopy@plt>
mov    -0x18(%rbp),%edi
call   1050 <htons@plt>
mov    %eax,-0x2038(%rbp)
mov    0x2d0a(%rip),%rax
mov    (%rax),%edi
mov    0x2ce9(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1120 <socket@plt>
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
jge    1312 <main+0x112>
lea    0xd31(%rip),%rdi
call   10c0 <perror@plt>
mov    $0x1,%edi
call   10f0 <exit@plt>
mov    -0x14(%rbp),%edi
lea    -0x2038(%rbp),%rsi
mov    $0xc,%edx
call   1100 <connect@plt>
cmp    $0x0,%rax
jge    133c <main+0x13c>
lea    0xd13(%rip),%rdi
call   10c0 <perror@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2048(%rbp)
movl   $0x1,-0x204c(%rbp)
cmpl   $0x0,-0x204c(%rbp)
je     1470 <main+0x270>
xor    %edi,%edi
lea    -0x2044(%rbp),%rsi
call   1110 <FD_SET@plt>
mov    -0x14(%rbp),%edi
lea    -0x2044(%rbp),%rsi
call   1110 <FD_SET@plt>
mov    -0x2048(%rbp),%edi
lea    -0x2044(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%r8d
mov    %r8,%rdx
mov    %r8,%rcx
call   10a0 <select@plt>
xor    %edi,%edi
lea    -0x2044(%rbp),%rsi
call   1040 <FD_ISSET@plt>
cmp    $0x0,%rax
je     1400 <main+0x200>
lea    -0x2020(%rbp),%rsi
xor    %edi,%edi
mov    $0x2000,%edx
call   1070 <read@plt>
mov    %eax,-0x2028(%rbp)
cmpl   $0x0,-0x2028(%rbp)
jne    13e6 <main+0x1e6>
movl   $0x0,-0x204c(%rbp)
jmp    13fb <main+0x1fb>
mov    -0x14(%rbp),%edi
lea    -0x2020(%rbp),%rsi
mov    -0x2028(%rbp),%edx
call   1030 <write@plt>
jmp    1400 <main+0x200>
mov    -0x14(%rbp),%edi
lea    -0x2044(%rbp),%rsi
call   1040 <FD_ISSET@plt>
cmp    $0x0,%rax
je     146b <main+0x26b>
mov    -0x14(%rbp),%edi
lea    -0x2020(%rbp),%rsi
mov    $0x2000,%edx
call   1070 <read@plt>
mov    %eax,-0x2028(%rbp)
cmpl   $0x0,-0x2028(%rbp)
jne    144f <main+0x24f>
movl   $0x0,-0x204c(%rbp)
jmp    1466 <main+0x266>
lea    -0x2020(%rbp),%rsi
mov    -0x2028(%rbp),%edx
mov    $0x1,%edi
call   1030 <write@plt>
jmp    146b <main+0x26b>
jmp    1352 <main+0x152>
mov    -0x14(%rbp),%edi
call   1060 <close@plt>
mov    -0x4(%rbp),%eax
add    $0x2050,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x2010,%rsp
cmp    $0x2,%edi
jle    1397 <main+0x197>
mov    %rsi,%rbp
mov    0x8(%rsi),%rdi
call   1080 <gethostbyname@plt>
test   %rax,%rax
je     13b6 <main+0x1b6>
mov    %rax,%rbx
mov    0x10(%rbp),%rdi
call   10e0 <atoi@plt>
mov    %eax,%ebp
mov    %rsp,%rdi
mov    $0xc,%esi
call   10d0 <bzero@plt>
mov    0x2d99(%rip),%r14
mov    (%r14),%eax
mov    %eax,0x8(%rsp)
mov    (%rbx),%edx
mov    0x4(%rbx),%edi
lea    0x4(%rsp),%rsi
call   10b0 <bcopy@plt>
mov    %ebp,%edi
call   1050 <htons@plt>
mov    %eax,(%rsp)
mov    (%r14),%edi
mov    0x2d57(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1120 <socket@plt>
test   %eax,%eax
js     13bf <main+0x1bf>
mov    %eax,%ebx
mov    %rsp,%rsi
mov    %eax,%edi
mov    $0xc,%edx
call   1100 <connect@plt>
test   %rax,%rax
js     1386 <main+0x186>
mov    %ebx,%r14d
add    $0x1,%r14d
lea    0xc(%rsp),%r12
lea    0x10(%rsp),%r15
jmp    12d8 <main+0xd8>
nopw   0x0(%rax,%rax,1)
mov    $0x1,%edi
mov    %r15,%rsi
mov    %eax,%edx
call   1030 <write@plt>
test   %bpl,%bpl
jne    136d <main+0x16d>
xor    %ebp,%ebp
xor    %edi,%edi
mov    %r12,%rsi
call   1110 <FD_SET@plt>
mov    %ebx,%edi
mov    %r12,%rsi
call   1110 <FD_SET@plt>
mov    %r14d,%edi
mov    %r12,%rsi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   10a0 <select@plt>
xor    %edi,%edi
mov    %r12,%rsi
call   1040 <FD_ISSET@plt>
test   %rax,%rax
je     1343 <main+0x143>
xor    %edi,%edi
mov    %r15,%rsi
mov    $0x2000,%edx
call   1070 <read@plt>
test   %eax,%eax
je     1340 <main+0x140>
mov    %ebx,%edi
mov    %r15,%rsi
mov    %eax,%edx
call   1030 <write@plt>
xor    %ebp,%ebp
jmp    1343 <main+0x143>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0x1,%bpl
mov    %ebx,%edi
mov    %r12,%rsi
call   1040 <FD_ISSET@plt>
test   %rax,%rax
je     12cf <main+0xcf>
mov    %ebx,%edi
mov    %r15,%rsi
mov    $0x2000,%edx
call   1070 <read@plt>
test   %eax,%eax
jne    12c0 <main+0xc0>
mov    %ebx,%edi
call   1060 <close@plt>
xor    %eax,%eax
add    $0x2010,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xcbd(%rip),%rdi
call   10c0 <perror@plt>
jmp    12a4 <main+0xa4>
mov    0x2c3a(%rip),%rax
mov    (%rax),%edi
lea    0xc59(%rip),%rsi
call   1090 <fprintf@plt>
mov    $0x1,%edi
call   10f0 <exit@plt>
lea    0xc5f(%rip),%rdi
jmp    13c6 <main+0x1c6>
lea    0xc6e(%rip),%rdi
call   10c0 <perror@plt>
mov    $0x1,%edi
call   10f0 <exit@plt>

LLVM IR (-O0):
%struct.sockaddr_in = type { i32, i32, i32 }
%struct.hostent = type { i32, i32 }
%struct.sockaddr = type { i32 }
@stderr = global i32 0
@.str = [28 x i8] c"Usage: tcpfilter host port\0A\00"
@.str.1 = [24 x i8] c"Could not get hostname.\00"
@AF_INET = global i32 0
@SOCK_STREAM = global i32 0
@.str.2 = [22 x i8] c"Could not open socket\00"
@.str.3 = [28 x i8] c"Could not connect to server\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 [8192 x i8]
%9 = alloca i32
%10 = alloca i32
%11 = alloca %struct.sockaddr_in
%12 = alloca %struct.hostent*
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%16 = load i32, i32* %4
%17 = icmp slt i32 %16, 3
br i1 %17, label %18, label %22
18: ; preds = %2
%19 = load i32, i32* @stderr
%20 = call i32 @fprintf(i32 %19, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%21 = call i32 @exit(i32 1)
unreachable
22: ; preds = %2
%23 = load i8**, i8*** %5
%24 = getelementptr inbounds i8*, i8** %23, i64 1
%25 = load i8*, i8** %24
%26 = call %struct.hostent* @gethostbyname(i8* %25)
store %struct.hostent* %26, %struct.hostent** %12
%27 = icmp eq %struct.hostent* %26, null
br i1 %27, label %28, label %31
28: ; preds = %22
%29 = call i32 @perror(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
%30 = call i32 @exit(i32 1)
unreachable
31: ; preds = %22
%32 = load i8**, i8*** %5
%33 = getelementptr inbounds i8*, i8** %32, i64 2
%34 = load i8*, i8** %33
%35 = call i32 @atoi(i8* %34)
store i32 %35, i32* %7
%36 = bitcast %struct.sockaddr_in* %11 to i8*
%37 = call i32 @bzero(i8* %36, i32 12)
%38 = load i32, i32* @AF_INET
%39 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %11, i32 0, i32 2
store i32 %38, i32* %39
%40 = load %struct.hostent*, %struct.hostent** %12
%41 = getelementptr inbounds %struct.hostent, %struct.hostent* %40, i32 0, i32 1
%42 = load i32, i32* %41
%43 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %11, i32 0, i32 1
%44 = bitcast i32* %43 to i8*
%45 = load %struct.hostent*, %struct.hostent** %12
%46 = getelementptr inbounds %struct.hostent, %struct.hostent* %45, i32 0, i32 0
%47 = load i32, i32* %46
%48 = call i32 @bcopy(i32 %42, i8* %44, i32 %47)
%49 = load i32, i32* %7
%50 = call i32 @htons(i32 %49)
%51 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %11, i32 0, i32 0
store i32 %50, i32* %51
%52 = load i32, i32* @AF_INET
%53 = load i32, i32* @SOCK_STREAM
%54 = call i32 @socket(i32 %52, i32 %53, i32 0)
store i32 %54, i32* %6
%55 = icmp slt i32 %54, 0
br i1 %55, label %56, label %59
56: ; preds = %31
%57 = call i32 @perror(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
%58 = call i32 @exit(i32 1)
unreachable
59: ; preds = %31
%60 = load i32, i32* %6
%61 = bitcast %struct.sockaddr_in* %11 to %struct.sockaddr*
%62 = call i64 @connect(i32 %60, %struct.sockaddr* %61, i32 12)
%63 = icmp slt i64 %62, 0
br i1 %63, label %64, label %66
64: ; preds = %59
%65 = call i32 @perror(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0))
br label %66
66: ; preds = %64, %59
%67 = load i32, i32* %6
%68 = add nsw i32 %67, 1
store i32 %68, i32* %14
store i32 1, i32* %15
br label %69
69: ; preds = %108, %66
%70 = load i32, i32* %15
%71 = icmp ne i32 %70, 0
br i1 %71, label %72, label %109
72: ; preds = %69
%73 = call i32 @FD_SET(i32 0, i32* %13)
%74 = load i32, i32* %6
%75 = call i32 @FD_SET(i32 %74, i32* %13)
%76 = load i32, i32* %14
%77 = call i32 @select(i32 %76, i32* %13, i32* null, i32* null, i32* null)
%78 = call i64 @FD_ISSET(i32 0, i32* %13)
%79 = icmp ne i64 %78, 0
br i1 %79, label %80, label %92
80: ; preds = %72
%81 = getelementptr inbounds [8192 x i8], [8192 x i8]* %8, i64 0, i64 0
%82 = call i32 @read(i32 0, i8* %81, i32 8192)
store i32 %82, i32* %10
%83 = load i32, i32* %10
%84 = icmp eq i32 %83, 0
br i1 %84, label %85, label %86
85: ; preds = %80
store i32 0, i32* %15
br label %91
86: ; preds = %80
%87 = load i32, i32* %6
%88 = getelementptr inbounds [8192 x i8], [8192 x i8]* %8, i64 0, i64 0
%89 = load i32, i32* %10
%90 = call i32 @write(i32 %87, i8* %88, i32 %89)
br label %91
91: ; preds = %86, %85
br label %92
92: ; preds = %91, %72
%93 = load i32, i32* %6
%94 = call i64 @FD_ISSET(i32 %93, i32* %13)
%95 = icmp ne i64 %94, 0
br i1 %95, label %96, label %108
96: ; preds = %92
%97 = load i32, i32* %6
%98 = getelementptr inbounds [8192 x i8], [8192 x i8]* %8, i64 0, i64 0
%99 = call i32 @read(i32 %97, i8* %98, i32 8192)
store i32 %99, i32* %10
%100 = load i32, i32* %10
%101 = icmp eq i32 %100, 0
br i1 %101, label %102, label %103
102: ; preds = %96
store i32 0, i32* %15
br label %107
103: ; preds = %96
%104 = getelementptr inbounds [8192 x i8], [8192 x i8]* %8, i64 0, i64 0
%105 = load i32, i32* %10
%106 = call i32 @write(i32 1, i8* %104, i32 %105)
br label %107
107: ; preds = %103, %102
br label %108
108: ; preds = %107, %92
br label %69
109: ; preds = %69
%110 = load i32, i32* %6
%111 = call i32 @close(i32 %110)
%112 = load i32, i32* %3
ret i32 %112
}

LLVM IR (-O2):
%struct.sockaddr_in = type { i32, i32, i32 }
%struct.hostent = type { i32, i32 }
%struct.sockaddr = type { i32 }
@stderr = global i32 0
@.str = [28 x i8] c"Usage: tcpfilter host port\0A\00"
@.str.1 = [24 x i8] c"Could not get hostname.\00"
@AF_INET = global i32 0
@SOCK_STREAM = global i32 0
@.str.2 = [22 x i8] c"Could not open socket\00"
@.str.3 = [28 x i8] c"Could not connect to server\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [8192 x i8]
%4 = alloca %struct.sockaddr_in
%5 = alloca i32
%6 = getelementptr inbounds [8192 x i8], [8192 x i8]* %3, i64 0, i64 0
%7 = bitcast %struct.sockaddr_in* %4 to i8*
%8 = bitcast i32* %5 to i8*
%9 = icmp slt i32 %0, 3
br i1 %9, label %10, label %14
10: ; preds = %2
%11 = load i32, i32* @stderr
%12 = tail call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%13 = tail call i32 @exit(i32 1)
unreachable
14: ; preds = %2
%15 = getelementptr inbounds i8*, i8** %1, i64 1
%16 = load i8*, i8** %15
%17 = tail call %struct.hostent* @gethostbyname(i8* %16)
%18 = icmp eq %struct.hostent* %17, null
br i1 %18, label %19, label %22
19: ; preds = %14
%20 = tail call i32 @perror(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
%21 = tail call i32 @exit(i32 1)
unreachable
22: ; preds = %14
%23 = getelementptr inbounds i8*, i8** %1, i64 2
%24 = load i8*, i8** %23
%25 = tail call i32 @atoi(i8* %24)
%26 = call i32 @bzero(i8* %7, i32 12)
%27 = load i32, i32* @AF_INET
%28 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %4, i64 0, i32 2
store i32 %27, i32* %28
%29 = getelementptr inbounds %struct.hostent, %struct.hostent* %17, i64 0, i32 1
%30 = load i32, i32* %29
%31 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %4, i64 0, i32 1
%32 = bitcast i32* %31 to i8*
%33 = getelementptr inbounds %struct.hostent, %struct.hostent* %17, i64 0, i32 0
%34 = load i32, i32* %33
%35 = call i32 @bcopy(i32 %30, i8* %32, i32 %34)
%36 = call i32 @htons(i32 %25)
%37 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %4, i64 0, i32 0
store i32 %36, i32* %37
%38 = load i32, i32* @AF_INET
%39 = load i32, i32* @SOCK_STREAM
%40 = call i32 @socket(i32 %38, i32 %39, i32 0)
%41 = icmp slt i32 %40, 0
br i1 %41, label %42, label %45
42: ; preds = %22
%43 = call i32 @perror(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
%44 = call i32 @exit(i32 1)
unreachable
45: ; preds = %22
%46 = bitcast %struct.sockaddr_in* %4 to %struct.sockaddr*
%47 = call i64 @connect(i32 %40, %struct.sockaddr* %46, i32 12)
%48 = icmp slt i64 %47, 0
br i1 %48, label %49, label %51
49: ; preds = %45
%50 = call i32 @perror(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0))
br label %51
51: ; preds = %49, %45
%52 = add nuw nsw i32 %40, 1
br label %53
53: ; preds = %51, %73
%54 = call i32 @FD_SET(i32 0, i32* %5)
%55 = call i32 @FD_SET(i32 %40, i32* %5)
%56 = call i32 @select(i32 %52, i32* %5, i32* null, i32* null, i32* null)
%57 = call i64 @FD_ISSET(i32 0, i32* %5)
%58 = icmp eq i64 %57, 0
br i1 %58, label %64, label %59
59: ; preds = %53
%60 = call i32 @read(i32 0, i8* %6, i32 8192)
%61 = icmp eq i32 %60, 0
br i1 %61, label %64, label %62
62: ; preds = %59
%63 = call i32 @write(i32 %40, i8* %6, i32 %60)
br label %64
64: ; preds = %59, %62, %53
%65 = phi i1 [ true, %59 ], [ false, %62 ], [ false, %53 ]
%66 = call i64 @FD_ISSET(i32 %40, i32* %5)
%67 = icmp eq i64 %66, 0
br i1 %67, label %73, label %68
68: ; preds = %64
%69 = call i32 @read(i32 %40, i8* %6, i32 8192)
%70 = icmp eq i32 %69, 0
br i1 %70, label %74, label %71
71: ; preds = %68
%72 = call i32 @write(i32 1, i8* %6, i32 %69)
br label %73
73: ; preds = %71, %64
br i1 %65, label %74, label %53
74: ; preds = %68, %73
%75 = call i32 @close(i32 %40)
ret i32 0
}