#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_un {
  char *sun_path;
  int /*<<< orphan*/ sun_family;
};
struct sockaddr {
  int dummy;
};
typedef int /*<<< orphan*/ fd_set;

/* Variables and functions */
int /*<<< orphan*/ AF_UNIX;
scalar_t__ FD_ISSET(int, int /*<<< orphan*/ *);
int /*<<< orphan*/ FD_SET(int, int /*<<< orphan*/ *);
int /*<<< orphan*/ FD_ZERO(int /*<<< orphan*/ *);
int /*<<< orphan*/ SOCK_STREAM;
int /*<<< orphan*/ close(int);
int connect(int, struct sockaddr *, int);
int /*<<< orphan*/ exit(int);
scalar_t__ feof(int /*<<< orphan*/);
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int fileno(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *, ...);
int recv(int, char *, int, int /*<<< orphan*/);
int select(int, int /*<<< orphan*/ *, int /*<<< orphan*/ *,
           int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int send(int, char *, int, int /*<<< orphan*/);
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
int main(void) {
  int s, t, len;
  struct sockaddr_un remote;
  char str[150];
  fd_set fds, tfds;
  FD_ZERO(&fds);
  if ((s = socket(AF_UNIX, SOCK_STREAM, 0)) == -1) {
    perror("socket");
    exit(1);
  }
  remote.sun_family = AF_UNIX;
  strcpy(remote.sun_path, "./socket");
  len = strlen(remote.sun_path) + sizeof(remote.sun_family);
  if (connect(s, (struct sockaddr *)&remote, len) == -1) {
    perror("connect");
    exit(1);
  }
  FD_SET(fileno(stdin), &fds);
  FD_SET(s, &fds);
  for (;;) {
    tfds = fds;
    printf("What are you doing right now?\n");
    if (select(s + 1, &tfds, NULL, NULL, NULL) == -1) {
      perror("select");
      exit(1);
    }
    if (FD_ISSET(s, &tfds)) {
      if ((t = recv(s, str, 150, 0)) > 0) {
        str[t] = '\0';
        printf("%s", str);
      } else {
        if (t < 0)
          perror("recv");
        else
          printf("Server closed connection\n");
        exit(1);
      }
    }
    if (FD_ISSET(fileno(stdin), &tfds)) {
      if (feof(stdin))
        exit(0);
      fgets(str, 150, stdin);
      if (send(s, str, strlen(str), 0) == -1) {
        perror("send");
        exit(1);
      }
    }
  }
  close(s);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0xc4(%rbp),%rdi
call   10c0 <FD_ZERO@plt>
mov    0x2dc3(%rip),%rax
mov    (%rax),%edi
mov    0x2da2(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1120 <socket@plt>
mov    %eax,-0x8(%rbp)
cmp    $0xffffffff,%eax
jne    1259 <main+0x59>
lea    0xdb8(%rip),%rdi
call   10e0 <perror@plt>
mov    $0x1,%edi
call   10f0 <exit@plt>
mov    0x2d88(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x18(%rbp)
mov    -0x20(%rbp),%rdi
lea    0xd90(%rip),%rsi
call   1040 <strcpy@plt>
mov    -0x20(%rbp),%rdi
call   1060 <strlen@plt>
cltq
add    $0x4,%rax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
lea    -0x20(%rbp),%rsi
mov    -0x10(%rbp),%edx
call   1100 <connect@plt>
cmp    $0xffffffff,%eax
jne    12b5 <main+0xb5>
lea    0xd63(%rip),%rdi
call   10e0 <perror@plt>
mov    $0x1,%edi
call   10f0 <exit@plt>
mov    0x2d24(%rip),%rax
mov    (%rax),%edi
call   10b0 <fileno@plt>
mov    %eax,%edi
lea    -0xc4(%rbp),%rsi
call   1110 <FD_SET@plt>
mov    -0x8(%rbp),%edi
lea    -0xc4(%rbp),%rsi
call   1110 <FD_SET@plt>
mov    -0xc4(%rbp),%eax
mov    %eax,-0xc8(%rbp)
lea    0xd1e(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
mov    -0x8(%rbp),%edi
add    $0x1,%edi
lea    -0xc8(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%r8d
mov    %r8,%rdx
mov    %r8,%rcx
call   10d0 <select@plt>
cmp    $0xffffffff,%eax
jne    1336 <main+0x136>
lea    0xd09(%rip),%rdi
call   10e0 <perror@plt>
mov    $0x1,%edi
call   10f0 <exit@plt>
mov    -0x8(%rbp),%edi
lea    -0xc8(%rbp),%rsi
call   1050 <FD_ISSET@plt>
cmp    $0x0,%rax
je     13cf <main+0x1cf>
mov    -0x8(%rbp),%edi
lea    -0xc0(%rbp),%rsi
mov    $0x96,%edx
xor    %ecx,%ecx
call   1030 <recv@plt>
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
jle    1397 <main+0x197>
movslq -0xc(%rbp),%rax
movb   $0x0,-0xc0(%rbp,%rax,1)
lea    -0xc0(%rbp),%rsi
lea    0xcac(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
jmp    13ca <main+0x1ca>
cmpl   $0x0,-0xc(%rbp)
jge    13b2 <main+0x1b2>
lea    0xc92(%rip),%rdi
call   10e0 <perror@plt>
jmp    13c0 <main+0x1c0>
lea    0xc86(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
mov    $0x1,%edi
call   10f0 <exit@plt>
jmp    13cf <main+0x1cf>
mov    0x2c0a(%rip),%rax
mov    (%rax),%edi
call   10b0 <fileno@plt>
mov    %eax,%edi
lea    -0xc8(%rbp),%rsi
call   1050 <FD_ISSET@plt>
cmp    $0x0,%rax
je     148b <main+0x28b>
mov    0x2be4(%rip),%rax
mov    (%rax),%edi
call   10a0 <feof@plt>
cmp    $0x0,%rax
je     1414 <main+0x214>
xor    %edi,%edi
call   10f0 <exit@plt>
lea    -0xc0(%rbp),%rdi
mov    0x2bbe(%rip),%rax
mov    (%rax),%edx
mov    $0x96,%esi
call   1090 <fgets@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0xd4(%rbp)
lea    -0xc0(%rbp),%rax
mov    %rax,-0xd0(%rbp)
lea    -0xc0(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0xd4(%rbp),%edi
mov    -0xd0(%rbp),%rsi
mov    %eax,%edx
xor    %ecx,%ecx
call   1070 <send@plt>
cmp    $0xffffffff,%eax
jne    1486 <main+0x286>
lea    0xbe2(%rip),%rdi
call   10e0 <perror@plt>
mov    $0x1,%edi
call   10f0 <exit@plt>
jmp    148b <main+0x28b>
jmp    12e0 <main+0xe0>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xb8,%rsp
lea    0xc(%rsp),%rdi
call   10d0 <FD_ZERO@plt>
mov    0x2db6(%rip),%rbx
mov    (%rbx),%edi
mov    0x2d95(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1130 <socket@plt>
cmp    $0xffffffff,%eax
jne    1255 <main+0x45>
lea    0xdb2(%rip),%rdi
jmp    12f2 <main+0xe2>
mov    %eax,%r12d
mov    (%rbx),%eax
mov    %eax,0x18(%rsp)
lea    0xd9b(%rip),%rsi
call   1040 <strcpy@plt>
call   1070 <strlen@plt>
lea    0x4(%rax),%edx
lea    0x10(%rsp),%rsi
mov    %r12d,%edi
call   1110 <connect@plt>
cmp    $0xffffffff,%eax
jne    128d <main+0x7d>
lea    0xd7e(%rip),%rdi
jmp    12f2 <main+0xe2>
mov    0x2d4c(%rip),%r13
mov    0x0(%r13),%edi
call   10c0 <fileno@plt>
lea    0xc(%rsp),%rbx
mov    %eax,%edi
mov    %rbx,%rsi
call   1120 <FD_SET@plt>
mov    %r12d,%edi
mov    %rbx,%rsi
call   1120 <FD_SET@plt>
mov    0xc(%rsp),%eax
mov    %eax,0x8(%rsp)
lea    0xd5f(%rip),%rdi
call   1050 <puts@plt>
mov    %r12d,%r14d
add    $0x1,%r14d
lea    0x8(%rsp),%rsi
mov    %r14d,%edi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   10e0 <select@plt>
cmp    $0xffffffff,%eax
jne    1301 <main+0xf1>
lea    0xd1f(%rip),%rdi
call   10f0 <perror@plt>
mov    $0x1,%edi
call   1100 <exit@plt>
lea    0x8(%rsp),%rbp
lea    0xd18(%rip),%r15
lea    0x20(%rsp),%rbx
jmp    1347 <main+0x137>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    0xc(%rsp),%eax
mov    %eax,0x8(%rsp)
mov    %r15,%rdi
call   1050 <puts@plt>
mov    %r14d,%edi
mov    %rbp,%rsi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   10e0 <select@plt>
cmp    $0xffffffff,%eax
je     12eb <main+0xdb>
mov    %r12d,%edi
mov    %rbp,%rsi
call   1060 <FD_ISSET@plt>
test   %rax,%rax
je     1385 <main+0x175>
mov    %r12d,%edi
mov    %rbx,%rsi
mov    $0x96,%edx
xor    %ecx,%ecx
call   1030 <recv@plt>
test   %eax,%eax
jle    13e8 <main+0x1d8>
mov    %eax,%eax
movb   $0x0,0x20(%rsp,%rax,1)
lea    0xc9d(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1090 <printf@plt>
mov    0x0(%r13),%edi
call   10c0 <fileno@plt>
mov    %eax,%edi
mov    %rbp,%rsi
call   1060 <FD_ISSET@plt>
test   %rax,%rax
je     1320 <main+0x110>
mov    0x0(%r13),%edi
call   10b0 <feof@plt>
test   %rax,%rax
jne    13f6 <main+0x1e6>
mov    0x0(%r13),%edx
mov    %rbx,%rdi
mov    $0x96,%esi
call   10a0 <fgets@plt>
mov    %rbx,%rdi
call   1070 <strlen@plt>
mov    %r12d,%edi
mov    %rbx,%rsi
mov    %eax,%edx
xor    %ecx,%ecx
call   1080 <send@plt>
cmp    $0xffffffff,%eax
jne    1320 <main+0x110>
lea    0xc3d(%rip),%rdi
jmp    12f2 <main+0xe2>
jns    13fd <main+0x1ed>
lea    0xc2a(%rip),%rdi
jmp    12f2 <main+0xe2>
xor    %edi,%edi
call   1100 <exit@plt>
lea    0xc3f(%rip),%rdi
call   1050 <puts@plt>
mov    $0x1,%edi
call   1100 <exit@plt>

LLVM IR (-O0):
%struct.sockaddr_un = type { i8*, i32 }
%struct.sockaddr = type { i32 }
@AF_UNIX = global i32 0
@SOCK_STREAM = global i32 0
@.str = [7 x i8] c"socket\00"
@.str.1 = [9 x i8] c"./socket\00"
@.str.2 = [8 x i8] c"connect\00"
@stdin = global i32 0
@.str.3 = [31 x i8] c"What are you doing right now?\0A\00"
@.str.4 = [7 x i8] c"select\00"
@.str.5 = [3 x i8] c"%s\00"
@.str.6 = [5 x i8] c"recv\00"
@.str.7 = [26 x i8] c"Server closed connection\0A\00"
@.str.8 = [5 x i8] c"send\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca %struct.sockaddr_un
%6 = alloca [150 x i8]
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %1
%9 = call i32 @FD_ZERO(i32* %7)
%10 = load i32, i32* @AF_UNIX
%11 = load i32, i32* @SOCK_STREAM
%12 = call i32 @socket(i32 %10, i32 %11, i32 0)
store i32 %12, i32* %2
%13 = icmp eq i32 %12, -1
br i1 %13, label %14, label %17
14: ; preds = %0
%15 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%16 = call i32 @exit(i32 1)
unreachable
17: ; preds = %0
%18 = load i32, i32* @AF_UNIX
%19 = getelementptr inbounds %struct.sockaddr_un, %struct.sockaddr_un* %5, i32 0, i32 1
store i32 %18, i32* %19
%20 = getelementptr inbounds %struct.sockaddr_un, %struct.sockaddr_un* %5, i32 0, i32 0
%21 = load i8*, i8** %20
%22 = call i32 @strcpy(i8* %21, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%23 = getelementptr inbounds %struct.sockaddr_un, %struct.sockaddr_un* %5, i32 0, i32 0
%24 = load i8*, i8** %23
%25 = call i32 @strlen(i8* %24)
%26 = sext i32 %25 to i64
%27 = add i64 %26, 4
%28 = trunc i64 %27 to i32
store i32 %28, i32* %4
%29 = load i32, i32* %2
%30 = bitcast %struct.sockaddr_un* %5 to %struct.sockaddr*
%31 = load i32, i32* %4
%32 = call i32 @connect(i32 %29, %struct.sockaddr* %30, i32 %31)
%33 = icmp eq i32 %32, -1
br i1 %33, label %34, label %37
34: ; preds = %17
%35 = call i32 @perror(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%36 = call i32 @exit(i32 1)
unreachable
37: ; preds = %17
%38 = load i32, i32* @stdin
%39 = call i32 @fileno(i32 %38)
%40 = call i32 @FD_SET(i32 %39, i32* %7)
%41 = load i32, i32* %2
%42 = call i32 @FD_SET(i32 %41, i32* %7)
br label %43
43: ; preds = %103, %37
%44 = load i32, i32* %7
store i32 %44, i32* %8
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0))
%46 = load i32, i32* %2
%47 = add nsw i32 %46, 1
%48 = call i32 @select(i32 %47, i32* %8, i32* null, i32* null, i32* null)
%49 = icmp eq i32 %48, -1
br i1 %49, label %50, label %53
50: ; preds = %43
%51 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%52 = call i32 @exit(i32 1)
unreachable
53: ; preds = %43
%54 = load i32, i32* %2
%55 = call i64 @FD_ISSET(i32 %54, i32* %8)
%56 = icmp ne i64 %55, 0
br i1 %56, label %57, label %78
57: ; preds = %53
%58 = load i32, i32* %2
%59 = getelementptr inbounds [150 x i8], [150 x i8]* %6, i64 0, i64 0
%60 = call i32 @recv(i32 %58, i8* %59, i32 150, i32 0)
store i32 %60, i32* %3
%61 = icmp sgt i32 %60, 0
br i1 %61, label %62, label %68
62: ; preds = %57
%63 = load i32, i32* %3
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds [150 x i8], [150 x i8]* %6, i64 0, i64 %64
store i8 0, i8* %65
%66 = getelementptr inbounds [150 x i8], [150 x i8]* %6, i64 0, i64 0
%67 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* %66)
br label %77
68: ; preds = %57
%69 = load i32, i32* %3
%70 = icmp slt i32 %69, 0
br i1 %70, label %71, label %73
71: ; preds = %68
%72 = call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
br label %75
73: ; preds = %68
%74 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.7, i64 0, i64 0))
br label %75
75: ; preds = %73, %71
%76 = call i32 @exit(i32 1)
unreachable
77: ; preds = %62
br label %78
78: ; preds = %77, %53
%79 = load i32, i32* @stdin
%80 = call i32 @fileno(i32 %79)
%81 = call i64 @FD_ISSET(i32 %80, i32* %8)
%82 = icmp ne i64 %81, 0
br i1 %82, label %83, label %103
83: ; preds = %78
%84 = load i32, i32* @stdin
%85 = call i64 @feof(i32 %84)
%86 = icmp ne i64 %85, 0
br i1 %86, label %87, label %89
87: ; preds = %83
%88 = call i32 @exit(i32 0)
unreachable
89: ; preds = %83
%90 = getelementptr inbounds [150 x i8], [150 x i8]* %6, i64 0, i64 0
%91 = load i32, i32* @stdin
%92 = call i32 @fgets(i8* %90, i32 150, i32 %91)
%93 = load i32, i32* %2
%94 = getelementptr inbounds [150 x i8], [150 x i8]* %6, i64 0, i64 0
%95 = getelementptr inbounds [150 x i8], [150 x i8]* %6, i64 0, i64 0
%96 = call i32 @strlen(i8* %95)
%97 = call i32 @send(i32 %93, i8* %94, i32 %96, i32 0)
%98 = icmp eq i32 %97, -1
br i1 %98, label %99, label %102
99: ; preds = %89
%100 = call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0))
%101 = call i32 @exit(i32 1)
unreachable
102: ; preds = %89
br label %103
103: ; preds = %102, %78
br label %43
}

LLVM IR (-O2):
%struct.sockaddr_un = type { i8*, i32 }
%struct.sockaddr = type { i32 }
@AF_UNIX = global i32 0
@SOCK_STREAM = global i32 0
@.str = [7 x i8] c"socket\00"
@.str.1 = [9 x i8] c"./socket\00"
@.str.2 = [8 x i8] c"connect\00"
@stdin = global i32 0
@.str.4 = [7 x i8] c"select\00"
@.str.5 = [3 x i8] c"%s\00"
@.str.6 = [5 x i8] c"recv\00"
@.str.8 = [5 x i8] c"send\00"
@str = [30 x i8] c"What are you doing right now?\00"
@str.9 = [25 x i8] c"Server closed connection\00"
define i32 @main() {
%1 = alloca %struct.sockaddr_un
%2 = alloca [150 x i8]
%3 = alloca i32
%4 = alloca i32
%5 = bitcast %struct.sockaddr_un* %1 to i8*
%6 = getelementptr inbounds [150 x i8], [150 x i8]* %2, i64 0, i64 0
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = call i32 @FD_ZERO(i32* %3)
%10 = load i32, i32* @AF_UNIX
%11 = load i32, i32* @SOCK_STREAM
%12 = call i32 @socket(i32 %10, i32 %11, i32 0)
%13 = icmp eq i32 %12, -1
br i1 %13, label %14, label %17
14: ; preds = %0
%15 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%16 = call i32 @exit(i32 1)
unreachable
17: ; preds = %0
%18 = load i32, i32* @AF_UNIX
%19 = getelementptr inbounds %struct.sockaddr_un, %struct.sockaddr_un* %1, i64 0, i32 1
store i32 %18, i32* %19
%20 = call i32 @strcpy(i8* undef, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%21 = call i32 @strlen(i8* undef)
%22 = add i32 %21, 4
%23 = bitcast %struct.sockaddr_un* %1 to %struct.sockaddr*
%24 = call i32 @connect(i32 %12, %struct.sockaddr* %23, i32 %22)
%25 = icmp eq i32 %24, -1
br i1 %25, label %26, label %29
26: ; preds = %17
%27 = call i32 @perror(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%28 = call i32 @exit(i32 1)
unreachable
29: ; preds = %17
%30 = load i32, i32* @stdin
%31 = call i32 @fileno(i32 %30)
%32 = call i32 @FD_SET(i32 %31, i32* %3)
%33 = call i32 @FD_SET(i32 %12, i32* %3)
%34 = load i32, i32* %3
store i32 %34, i32* %4
%35 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
%36 = add nuw nsw i32 %12, 1
%37 = call i32 @select(i32 %36, i32* %4, i32* null, i32* null, i32* null)
%38 = icmp eq i32 %37, -1
br i1 %38, label %39, label %42
39: ; preds = %80, %29
%40 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%41 = call i32 @exit(i32 1)
unreachable
42: ; preds = %29, %80
%43 = call i64 @FD_ISSET(i32 %12, i32* %4)
%44 = icmp eq i64 %43, 0
br i1 %44, label %60, label %45
45: ; preds = %42
%46 = call i32 @recv(i32 %12, i8* %6, i32 150, i32 0)
%47 = icmp sgt i32 %46, 0
br i1 %47, label %48, label %52
48: ; preds = %45
%49 = zext i32 %46 to i64
%50 = getelementptr inbounds [150 x i8], [150 x i8]* %2, i64 0, i64 %49
store i8 0, i8* %50
%51 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* %6)
br label %60
52: ; preds = %45
%53 = icmp slt i32 %46, 0
br i1 %53, label %54, label %56
54: ; preds = %52
%55 = call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
br label %58
56: ; preds = %52
%57 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.9, i64 0, i64 0))
br label %58
58: ; preds = %56, %54
%59 = call i32 @exit(i32 1)
unreachable
60: ; preds = %48, %42
%61 = load i32, i32* @stdin
%62 = call i32 @fileno(i32 %61)
%63 = call i64 @FD_ISSET(i32 %62, i32* %4)
%64 = icmp eq i64 %63, 0
br i1 %64, label %80, label %65
65: ; preds = %60
%66 = load i32, i32* @stdin
%67 = call i64 @feof(i32 %66)
%68 = icmp eq i64 %67, 0
br i1 %68, label %71, label %69
69: ; preds = %65
%70 = call i32 @exit(i32 0)
unreachable
71: ; preds = %65
%72 = load i32, i32* @stdin
%73 = call i32 @fgets(i8* %6, i32 150, i32 %72)
%74 = call i32 @strlen(i8* %6)
%75 = call i32 @send(i32 %12, i8* %6, i32 %74, i32 0)
%76 = icmp eq i32 %75, -1
br i1 %76, label %77, label %80
77: ; preds = %71
%78 = call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0))
%79 = call i32 @exit(i32 1)
unreachable
80: ; preds = %71, %60
%81 = load i32, i32* %3
store i32 %81, i32* %4
%82 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
%83 = call i32 @select(i32 %36, i32* %4, i32* null, i32* null, i32* null)
%84 = icmp eq i32 %83, -1
br i1 %84, label %39, label %42
}