#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_addr;
  int /*<<< orphan*/ sin_port;
  int /*<<< orphan*/ sin_family;
};
struct sockaddr {
  int dummy;
};
typedef int /*<<< orphan*/ servaddr;

/* Variables and functions */
int /*<<< orphan*/ AF_INET;
scalar_t__ EOF;
int EXIT_FAILURE;
int /*<<< orphan*/ SOCK_STREAM;
int /*<<< orphan*/ bzero(struct sockaddr_in *, int);
scalar_t__ connect(int, struct sockaddr *, int);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ *fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
scalar_t__ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ htons(int);
scalar_t__ inet_pton(int /*<<< orphan*/, char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ perror(char *);
scalar_t__ read(int, char *, int);
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ strlen(char *);
int /*<<< orphan*/ write(int, char *, int /*<<< orphan*/);
int main(int argc, char **argv) {
  int i, sockfd[5];
  char buffer[4096 + 1];
  struct sockaddr_in servaddr;
  if (argc != 2) {
    fprintf(stderr, "usage: %s <Server IP address>\neg. $ ./%s 127.0.0.1\n",
            argv[0], argv[0]);
    exit(EXIT_FAILURE);
  }
  for (i = 0; i < 5; i++) {
    if ((sockfd[i] = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
      fprintf(stderr, "socket() error");
      exit(EXIT_FAILURE);
    }
    bzero(&servaddr, sizeof(servaddr));
    servaddr.sin_family = AF_INET;
    servaddr.sin_port = htons(9669);
    if (inet_pton(AF_INET, argv[1], &servaddr.sin_addr) <= 0) {
      fprintf(stderr, "inet_pton(%s) error", argv[1]);
      exit(EXIT_FAILURE);
    }
    if (connect(sockfd[i], (struct sockaddr *)&servaddr, sizeof(servaddr)) <
        0) {
      perror("connect() error");
      exit(EXIT_FAILURE);
    }
  }
  while ((fgets(buffer, 4096, stdin) != NULL)) {
    write(sockfd[0], buffer, strlen(buffer));
    if (read(sockfd[0], buffer, 4096) == 0) {
      perror("failed to read data from server");
      exit(EXIT_FAILURE);
    }
    if (fputs(buffer, stdout) == EOF) {
      fprintf(stderr, "fputs() error.\n");
      exit(1);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1060,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     1226 <main+0x56>
mov    0x2dce(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
mov    -0x10(%rbp),%rax
mov    (%rax),%rcx
lea    0xdef(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    0x2d99(%rip),%rax
mov    (%rax),%edi
call   10d0 <exit@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0x5,-0x14(%rbp)
jge    135a <main+0x18a>
mov    0x2daa(%rip),%rax
mov    (%rax),%edi
mov    0x2d79(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   10f0 <socket@plt>
movslq -0x14(%rbp),%rcx
mov    %eax,-0x30(%rbp,%rcx,4)
cmp    $0x0,%eax
jge    1286 <main+0xb6>
mov    0x2d60(%rip),%rax
mov    (%rax),%edi
lea    0xdc3(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    0x2d39(%rip),%rax
mov    (%rax),%edi
call   10d0 <exit@plt>
lea    -0x1050(%rbp),%rdi
mov    $0xc,%esi
call   10c0 <bzero@plt>
mov    0x2d4a(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x1048(%rbp)
mov    $0x25c5,%edi
call   1050 <htons@plt>
mov    %eax,-0x104c(%rbp)
mov    0x2d2b(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    -0x1050(%rbp),%rdx
call   10a0 <inet_pton@plt>
cmp    $0x0,%rax
jg     130a <main+0x13a>
mov    0x2ce4(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0xd4e(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    0x2cb5(%rip),%rax
mov    (%rax),%edi
call   10d0 <exit@plt>
movslq -0x14(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%edi
lea    -0x1050(%rbp),%rsi
mov    $0xc,%edx
call   10e0 <connect@plt>
cmp    $0x0,%rax
jge    1347 <main+0x177>
lea    0xd23(%rip),%rdi
call   10b0 <perror@plt>
mov    0x2c78(%rip),%rax
mov    (%rax),%edi
call   10d0 <exit@plt>
jmp    134c <main+0x17c>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    122d <main+0x5d>
jmp    135f <main+0x18f>
lea    -0x1040(%rbp),%rdi
mov    0x2c73(%rip),%rax
mov    (%rax),%edx
mov    $0x1000,%esi
call   1080 <fgets@plt>
cmp    $0x0,%rax
je     143d <main+0x26d>
mov    -0x30(%rbp),%eax
mov    %eax,-0x105c(%rbp)
lea    -0x1040(%rbp),%rax
mov    %rax,-0x1058(%rbp)
lea    -0x1040(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x105c(%rbp),%edi
mov    -0x1058(%rbp),%rsi
mov    %eax,%edx
call   1030 <write@plt>
mov    -0x30(%rbp),%edi
lea    -0x1040(%rbp),%rsi
mov    $0x1000,%edx
call   1070 <read@plt>
cmp    $0x0,%rax
jne    13f2 <main+0x222>
lea    0xc88(%rip),%rdi
call   10b0 <perror@plt>
mov    0x2bcd(%rip),%rax
mov    (%rax),%edi
call   10d0 <exit@plt>
lea    -0x1040(%rbp),%rdi
mov    0x2bb0(%rip),%rax
mov    (%rax),%esi
call   1060 <fputs@plt>
mov    0x2bca(%rip),%rcx
cmp    (%rcx),%rax
jne    1438 <main+0x268>
mov    0x2baa(%rip),%rax
mov    (%rax),%edi
lea    0xc60(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    $0x1,%edi
call   10d0 <exit@plt>
jmp    135f <main+0x18f>
xor    %eax,%eax
add    $0x1060,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1038,%rsp
mov    %rsi,%r14
cmp    $0x2,%edi
jne    1380 <main+0x1b0>
xor    %ebx,%ebx
mov    0x2df2(%rip),%r12
mov    0x2dc3(%rip),%r13
mov    %rsp,%r15
mov    (%r12),%edi
mov    0x0(%r13),%esi
xor    %edx,%edx
call   10f0 <socket@plt>
mov    %eax,0x10(%rsp,%rbx,4)
test   %eax,%eax
js     1327 <main+0x157>
mov    %eax,%ebp
mov    %r15,%rdi
mov    $0xc,%esi
call   10c0 <bzero@plt>
mov    (%r12),%eax
mov    %eax,0x8(%rsp)
mov    $0x25c5,%edi
call   1050 <htons@plt>
mov    %eax,0x4(%rsp)
mov    (%r12),%edi
mov    0x8(%r14),%rsi
mov    %r15,%rdx
call   10a0 <inet_pton@plt>
test   %rax,%rax
jle    1340 <main+0x170>
mov    %ebp,%edi
mov    %r15,%rsi
mov    $0xc,%edx
call   10e0 <connect@plt>
test   %rax,%rax
js     135d <main+0x18d>
add    $0x1,%rbx
cmp    $0x5,%rbx
jne    1200 <main+0x30>
mov    0x10(%rsp),%ebp
mov    0x2d5a(%rip),%r14
lea    0x30(%rsp),%rbx
mov    0x2d1e(%rip),%r15
mov    0x2d3f(%rip),%r12
nopl   0x0(%rax)
mov    (%r14),%edx
mov    %rbx,%rdi
mov    $0x1000,%esi
call   1080 <fgets@plt>
test   %rax,%rax
je     1313 <main+0x143>
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <write@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    $0x1000,%edx
call   1070 <read@plt>
test   %rax,%rax
je     1366 <main+0x196>
mov    (%r15),%esi
mov    %rbx,%rdi
call   1060 <fputs@plt>
cmp    (%r12),%rax
jne    12a0 <main+0xd0>
mov    0x2ccf(%rip),%rax
mov    (%rax),%edi
lea    0xd85(%rip),%rsi
xor    %eax,%eax
call   1090 <fprintf@plt>
mov    $0x1,%edi
call   10d0 <exit@plt>
xor    %eax,%eax
add    $0x1038,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2c9a(%rip),%rax
mov    (%rax),%edi
lea    0xcfd(%rip),%rsi
xor    %eax,%eax
call   1090 <fprintf@plt>
jmp    1372 <main+0x1a2>
mov    0x2c81(%rip),%rax
mov    (%rax),%edi
mov    0x8(%r14),%rdx
lea    0xcef(%rip),%rsi
xor    %eax,%eax
call   1090 <fprintf@plt>
jmp    1372 <main+0x1a2>
lea    0xcf3(%rip),%rdi
jmp    136d <main+0x19d>
lea    0xcfa(%rip),%rdi
call   10b0 <perror@plt>
mov    0x2c3f(%rip),%rax
mov    (%rax),%edi
call   10d0 <exit@plt>
mov    0x2c41(%rip),%rax
mov    (%rax),%edi
mov    (%r14),%rcx
lea    0xc6d(%rip),%rsi
mov    %rcx,%rdx
xor    %eax,%eax
call   1090 <fprintf@plt>
jmp    1372 <main+0x1a2>

LLVM IR (-O0):
%struct.sockaddr_in = type { i32, i32, i32 }
%struct.sockaddr = type { i32 }
@stderr = global i32 0
@.str = [52 x i8] c"usage: %s <Server IP address>\0Aeg. $ ./%s 127.0.0.1\0A\00"
@EXIT_FAILURE = global i32 0
@AF_INET = global i32 0
@SOCK_STREAM = global i32 0
@.str.1 = [15 x i8] c"socket() error\00"
@.str.2 = [20 x i8] c"inet_pton(%s) error\00"
@.str.3 = [16 x i8] c"connect() error\00"
@stdin = global i32 0
@.str.4 = [32 x i8] c"failed to read data from server\00"
@stdout = global i32 0
@EOF = global i64 0
@.str.5 = [16 x i8] c"fputs() error.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca [5 x i32]
%8 = alloca [4097 x i8]
%9 = alloca %struct.sockaddr_in
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%10 = load i32, i32* %4
%11 = icmp ne i32 %10, 2
br i1 %11, label %12, label %23
12: ; preds = %2
%13 = load i32, i32* @stderr
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 0
%16 = load i8*, i8** %15
%17 = load i8**, i8*** %5
%18 = getelementptr inbounds i8*, i8** %17, i64 0
%19 = load i8*, i8** %18
%20 = call i32 (i32, i8*, ...) @fprintf(i32 %13, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i8* %16, i8* %19)
%21 = load i32, i32* @EXIT_FAILURE
%22 = call i32 @exit(i32 %21)
unreachable
23: ; preds = %2
store i32 0, i32* %6
br label %24
24: ; preds = %74, %23
%25 = load i32, i32* %6
%26 = icmp slt i32 %25, 5
br i1 %26, label %27, label %77
27: ; preds = %24
%28 = load i32, i32* @AF_INET
%29 = load i32, i32* @SOCK_STREAM
%30 = call i32 @socket(i32 %28, i32 %29, i32 0)
%31 = load i32, i32* %6
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds [5 x i32], [5 x i32]* %7, i64 0, i64 %32
store i32 %30, i32* %33
%34 = icmp slt i32 %30, 0
br i1 %34, label %35, label %40
35: ; preds = %27
%36 = load i32, i32* @stderr
%37 = call i32 (i32, i8*, ...) @fprintf(i32 %36, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%38 = load i32, i32* @EXIT_FAILURE
%39 = call i32 @exit(i32 %38)
unreachable
40: ; preds = %27
%41 = call i32 @bzero(%struct.sockaddr_in* %9, i32 12)
%42 = load i32, i32* @AF_INET
%43 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %9, i32 0, i32 2
store i32 %42, i32* %43
%44 = call i32 @htons(i32 9669)
%45 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %9, i32 0, i32 1
store i32 %44, i32* %45
%46 = load i32, i32* @AF_INET
%47 = load i8**, i8*** %5
%48 = getelementptr inbounds i8*, i8** %47, i64 1
%49 = load i8*, i8** %48
%50 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %9, i32 0, i32 0
%51 = call i64 @inet_pton(i32 %46, i8* %49, i32* %50)
%52 = icmp sle i64 %51, 0
br i1 %52, label %53, label %61
53: ; preds = %40
%54 = load i32, i32* @stderr
%55 = load i8**, i8*** %5
%56 = getelementptr inbounds i8*, i8** %55, i64 1
%57 = load i8*, i8** %56
%58 = call i32 (i32, i8*, ...) @fprintf(i32 %54, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i8* %57)
%59 = load i32, i32* @EXIT_FAILURE
%60 = call i32 @exit(i32 %59)
unreachable
61: ; preds = %40
%62 = load i32, i32* %6
%63 = sext i32 %62 to i64
%64 = getelementptr inbounds [5 x i32], [5 x i32]* %7, i64 0, i64 %63
%65 = load i32, i32* %64
%66 = bitcast %struct.sockaddr_in* %9 to %struct.sockaddr*
%67 = call i64 @connect(i32 %65, %struct.sockaddr* %66, i32 12)
%68 = icmp slt i64 %67, 0
br i1 %68, label %69, label %73
69: ; preds = %61
%70 = call i32 @perror(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0))
%71 = load i32, i32* @EXIT_FAILURE
%72 = call i32 @exit(i32 %71)
unreachable
73: ; preds = %61
br label %74
74: ; preds = %73
%75 = load i32, i32* %6
%76 = add nsw i32 %75, 1
store i32 %76, i32* %6
br label %24
77: ; preds = %24
br label %78
78: ; preds = %109, %77
%79 = getelementptr inbounds [4097 x i8], [4097 x i8]* %8, i64 0, i64 0
%80 = load i32, i32* @stdin
%81 = call i32* @fgets(i8* %79, i32 4096, i32 %80)
%82 = icmp ne i32* %81, null
br i1 %82, label %83, label %110
83: ; preds = %78
%84 = getelementptr inbounds [5 x i32], [5 x i32]* %7, i64 0, i64 0
%85 = load i32, i32* %84
%86 = getelementptr inbounds [4097 x i8], [4097 x i8]* %8, i64 0, i64 0
%87 = getelementptr inbounds [4097 x i8], [4097 x i8]* %8, i64 0, i64 0
%88 = call i32 @strlen(i8* %87)
%89 = call i32 @write(i32 %85, i8* %86, i32 %88)
%90 = getelementptr inbounds [5 x i32], [5 x i32]* %7, i64 0, i64 0
%91 = load i32, i32* %90
%92 = getelementptr inbounds [4097 x i8], [4097 x i8]* %8, i64 0, i64 0
%93 = call i64 @read(i32 %91, i8* %92, i32 4096)
%94 = icmp eq i64 %93, 0
br i1 %94, label %95, label %99
95: ; preds = %83
%96 = call i32 @perror(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.4, i64 0, i64 0))
%97 = load i32, i32* @EXIT_FAILURE
%98 = call i32 @exit(i32 %97)
unreachable
99: ; preds = %83
%100 = getelementptr inbounds [4097 x i8], [4097 x i8]* %8, i64 0, i64 0
%101 = load i32, i32* @stdout
%102 = call i64 @fputs(i8* %100, i32 %101)
%103 = load i64, i64* @EOF
%104 = icmp eq i64 %102, %103
br i1 %104, label %105, label %109
105: ; preds = %99
%106 = load i32, i32* @stderr
%107 = call i32 (i32, i8*, ...) @fprintf(i32 %106, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0))
%108 = call i32 @exit(i32 1)
unreachable
109: ; preds = %99
br label %78
110: ; preds = %78
ret i32 0
}

LLVM IR (-O2):
%struct.sockaddr_in = type { i32, i32, i32 }
%struct.sockaddr = type { i32 }
@stderr = global i32 0
@.str = [52 x i8] c"usage: %s <Server IP address>\0Aeg. $ ./%s 127.0.0.1\0A\00"
@EXIT_FAILURE = global i32 0
@AF_INET = global i32 0
@SOCK_STREAM = global i32 0
@.str.1 = [15 x i8] c"socket() error\00"
@.str.2 = [20 x i8] c"inet_pton(%s) error\00"
@.str.3 = [16 x i8] c"connect() error\00"
@stdin = global i32 0
@.str.4 = [32 x i8] c"failed to read data from server\00"
@stdout = global i32 0
@EOF = global i64 0
@.str.5 = [16 x i8] c"fputs() error.\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [5 x i32]
%4 = alloca [4097 x i8]
%5 = alloca %struct.sockaddr_in
%6 = bitcast [5 x i32]* %3 to i8*
%7 = getelementptr inbounds [4097 x i8], [4097 x i8]* %4, i64 0, i64 0
%8 = bitcast %struct.sockaddr_in* %5 to i8*
%9 = icmp eq i32 %0, 2
br i1 %9, label %10, label %16
10: ; preds = %2
%11 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %5, i64 0, i32 2
%12 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %5, i64 0, i32 1
%13 = getelementptr inbounds i8*, i8** %1, i64 1
%14 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %5, i64 0, i32 0
%15 = bitcast %struct.sockaddr_in* %5 to %struct.sockaddr*
br label %28
16: ; preds = %2
%17 = load i32, i32* @stderr
%18 = load i8*, i8** %1
%19 = tail call i32 (i32, i8*, ...) @fprintf(i32 %17, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i8* %18, i8* %18)
%20 = load i32, i32* @EXIT_FAILURE
%21 = tail call i32 @exit(i32 %20)
unreachable
22: ; preds = %54
%23 = add nuw nsw i64 %29, 1
%24 = icmp eq i64 %23, 5
br i1 %24, label %25, label %28
25: ; preds = %22
%26 = getelementptr inbounds [5 x i32], [5 x i32]* %3, i64 0, i64 0
%27 = load i32, i32* %26
br label %61
28: ; preds = %10, %22
%29 = phi i64 [ 0, %10 ], [ %23, %22 ]
%30 = load i32, i32* @AF_INET
%31 = load i32, i32* @SOCK_STREAM
%32 = call i32 @socket(i32 %30, i32 %31, i32 0)
%33 = getelementptr inbounds [5 x i32], [5 x i32]* %3, i64 0, i64 %29
store i32 %32, i32* %33
%34 = icmp slt i32 %32, 0
br i1 %34, label %35, label %40
35: ; preds = %28
%36 = load i32, i32* @stderr
%37 = call i32 (i32, i8*, ...) @fprintf(i32 %36, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%38 = load i32, i32* @EXIT_FAILURE
%39 = call i32 @exit(i32 %38)
unreachable
40: ; preds = %28
%41 = call i32 @bzero(%struct.sockaddr_in* %5, i32 12)
%42 = load i32, i32* @AF_INET
store i32 %42, i32* %11
%43 = call i32 @htons(i32 9669)
store i32 %43, i32* %12
%44 = load i32, i32* @AF_INET
%45 = load i8*, i8** %13
%46 = call i64 @inet_pton(i32 %44, i8* %45, i32* %14)
%47 = icmp slt i64 %46, 1
br i1 %47, label %48, label %54
48: ; preds = %40
%49 = load i32, i32* @stderr
%50 = load i8*, i8** %13
%51 = call i32 (i32, i8*, ...) @fprintf(i32 %49, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i8* %50)
%52 = load i32, i32* @EXIT_FAILURE
%53 = call i32 @exit(i32 %52)
unreachable
54: ; preds = %40
%55 = call i64 @connect(i32 %32, %struct.sockaddr* %15, i32 12)
%56 = icmp slt i64 %55, 0
br i1 %56, label %57, label %22
57: ; preds = %54
%58 = call i32 @perror(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0))
%59 = load i32, i32* @EXIT_FAILURE
%60 = call i32 @exit(i32 %59)
unreachable
61: ; preds = %25, %74
%62 = load i32, i32* @stdin
%63 = call i32* @fgets(i8* %7, i32 4096, i32 %62)
%64 = icmp eq i32* %63, null
br i1 %64, label %83, label %65
65: ; preds = %61
%66 = call i32 @strlen(i8* %7)
%67 = call i32 @write(i32 %27, i8* %7, i32 %66)
%68 = call i64 @read(i32 %27, i8* %7, i32 4096)
%69 = icmp eq i64 %68, 0
br i1 %69, label %70, label %74
70: ; preds = %65
%71 = call i32 @perror(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.4, i64 0, i64 0))
%72 = load i32, i32* @EXIT_FAILURE
%73 = call i32 @exit(i32 %72)
unreachable
74: ; preds = %65
%75 = load i32, i32* @stdout
%76 = call i64 @fputs(i8* %7, i32 %75)
%77 = load i64, i64* @EOF
%78 = icmp eq i64 %76, %77
br i1 %78, label %79, label %61
79: ; preds = %74
%80 = load i32, i32* @stderr
%81 = call i32 (i32, i8*, ...) @fprintf(i32 %80, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0))
%82 = call i32 @exit(i32 1)
unreachable
83: ; preds = %61
ret i32 0
}