#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 */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int /*<<< orphan*/ s_addr;
};
struct sockaddr_in {
  int /*<<< orphan*/ sin_port;
  TYPE_1__ sin_addr;
  int /*<<< orphan*/ sin_family;
};
struct sockaddr {
  int dummy;
};
typedef int socklen_t;
typedef int /*<<< orphan*/ server_addr;
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
int /*<<< orphan*/ AF_INET;
int /*<<< orphan*/ SOCK_STREAM;
int accept(int, struct sockaddr *, int *);
int bind(int, struct sockaddr *, int);
int /*<<< orphan*/ bzero(struct sockaddr_in *, int);
int close(int);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ htons(int);
int /*<<< orphan*/ inet_addr(char *);
int /*<<< orphan*/ listen(int, int);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ puts(char *);
int recv(int, char *, int, int /*<<< orphan*/);
int send(int, char *, int /*<<< orphan*/, int /*<<< orphan*/);
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ strlen(char *);
int main(int argc, char *argv[]) {
  struct sockaddr_in server_addr, client_addr;
  int listenfd, connfd;
  socklen_t client_addr_len = sizeof(struct sockaddr);
  char buf[1024 + 1];
  int n;
  listenfd = socket(AF_INET, SOCK_STREAM, 0);
  if (listenfd == -1) {
    perror("****Create TCP socket");
    exit(1);
  }
  bzero(&server_addr, sizeof(server_addr));
  server_addr.sin_family = AF_INET;
  server_addr.sin_addr.s_addr = inet_addr("0.0.0.0");
  server_addr.sin_port = htons(8880);
  if (bind(listenfd, (struct sockaddr *)&server_addr, sizeof(server_addr)) ==
      -1) {
    perror("Bind the IP and PORT");
    exit(1);
  }
  listen(listenfd, 20);
  connfd = accept(listenfd, (struct sockaddr *)&client_addr, &client_addr_len);
  if (connfd < 0) {
    perror("Accept the connection");
    exit(1);
  }
  while (1) {
    memset(buf, 0, 1024 + 1);
    n = recv(connfd, buf, 1024, 0);
    if (n == -1) {
      perror("Receive ");
      exit(1);
    }
    if (strcmp(buf, "exit\n") == 0) {
      break;
    } else {
      buf[n] = '\0';
      printf("Client says : %s\n", buf);
      printf("You would say :");
      fgets(buf, sizeof(buf), stdin);
      n = send(connfd, buf, strlen(buf), 0);
      if (n == -1) {
        perror("Reply sent");
        exit(1);
      }
    }
  }
  if (close(listenfd) == -1) {
    perror("Close");
    exit(1);
  }
  puts("TCP Server has been closed");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x460,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x4,-0x3c(%rbp)
mov    0x2da1(%rip),%rax
mov    (%rax),%edi
mov    0x2d80(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1140 <socket@plt>
mov    %eax,-0x34(%rbp)
cmpl   $0xffffffff,-0x34(%rbp)
jne    127c <main+0x5c>
lea    0xd93(%rip),%rdi
call   1100 <perror@plt>
mov    $0x1,%edi
call   1130 <exit@plt>
lea    -0x20(%rbp),%rdi
mov    $0xc,%esi
call   1110 <bzero@plt>
mov    0x2d57(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x18(%rbp)
lea    0xd79(%rip),%rdi
call   10c0 <inet_addr@plt>
mov    %eax,-0x1c(%rbp)
mov    $0x22b0,%edi
call   1060 <htons@plt>
mov    %eax,-0x20(%rbp)
mov    -0x34(%rbp),%edi
lea    -0x20(%rbp),%rsi
mov    $0xc,%edx
call   10f0 <bind@plt>
cmp    $0xffffffff,%eax
jne    12e2 <main+0xc2>
lea    0xd4b(%rip),%rdi
call   1100 <perror@plt>
mov    $0x1,%edi
call   1130 <exit@plt>
mov    -0x34(%rbp),%edi
mov    $0x14,%esi
call   10e0 <listen@plt>
mov    -0x34(%rbp),%edi
lea    -0x30(%rbp),%rsi
lea    -0x3c(%rbp),%rdx
call   1120 <accept@plt>
mov    %eax,-0x38(%rbp)
cmpl   $0x0,-0x38(%rbp)
jge    1322 <main+0x102>
lea    0xd20(%rip),%rdi
call   1100 <perror@plt>
mov    $0x1,%edi
call   1130 <exit@plt>
jmp    1327 <main+0x107>
lea    -0x440(%rbp),%rdi
xor    %esi,%esi
mov    $0x401,%edx
call   1090 <memset@plt>
mov    -0x38(%rbp),%edi
lea    -0x440(%rbp),%rsi
mov    $0x400,%edx
xor    %ecx,%ecx
call   1030 <recv@plt>
mov    %eax,-0x444(%rbp)
cmpl   $0xffffffff,-0x444(%rbp)
jne    1379 <main+0x159>
lea    0xcdf(%rip),%rdi
call   1100 <perror@plt>
mov    $0x1,%edi
call   1130 <exit@plt>
lea    -0x440(%rbp),%rdi
lea    0xccb(%rip),%rsi
call   10d0 <strcmp@plt>
cmp    $0x0,%rax
jne    139b <main+0x17b>
jmp    1453 <main+0x233>
movslq -0x444(%rbp),%rax
movb   $0x0,-0x440(%rbp,%rax,1)
lea    -0x440(%rbp),%rsi
lea    0xca0(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
lea    0xca4(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
lea    -0x440(%rbp),%rdi
mov    0x2c05(%rip),%rax
mov    (%rax),%edx
mov    $0x401,%esi
call   10b0 <fgets@plt>
mov    -0x38(%rbp),%eax
mov    %eax,-0x454(%rbp)
lea    -0x440(%rbp),%rax
mov    %rax,-0x450(%rbp)
lea    -0x440(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x454(%rbp),%edi
mov    -0x450(%rbp),%rsi
mov    %eax,%edx
xor    %ecx,%ecx
call   1070 <send@plt>
mov    %eax,-0x444(%rbp)
cmpl   $0xffffffff,-0x444(%rbp)
jne    1449 <main+0x229>
lea    0xc40(%rip),%rdi
call   1100 <perror@plt>
mov    $0x1,%edi
call   1130 <exit@plt>
jmp    144e <main+0x22e>
jmp    1327 <main+0x107>
mov    -0x34(%rbp),%edi
call   10a0 <close@plt>
cmp    $0xffffffff,%eax
jne    147a <main+0x25a>
lea    0xc1a(%rip),%rdi
call   1100 <perror@plt>
mov    $0x1,%edi
call   1130 <exit@plt>
lea    0xc0a(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x460,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x438,%rsp
movl   $0x4,0xc(%rsp)
mov    0x2da8(%rip),%r14
mov    (%r14),%edi
mov    0x2d86(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1140 <socket@plt>
cmp    $0xffffffff,%eax
je     13dc <main+0x1bc>
mov    %eax,%ebp
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
mov    $0xc,%esi
call   1110 <bzero@plt>
mov    (%r14),%eax
mov    %eax,0x18(%rsp)
lea    0xd98(%rip),%rdi
call   10c0 <inet_addr@plt>
mov    %eax,0x14(%rsp)
mov    $0x22b0,%edi
call   1060 <htons@plt>
mov    %eax,0x10(%rsp)
mov    %ebp,%edi
mov    %rbx,%rsi
mov    $0xc,%edx
call   10f0 <bind@plt>
cmp    $0xffffffff,%eax
je     13e5 <main+0x1c5>
mov    %ebp,%edi
mov    $0x14,%esi
call   10e0 <listen@plt>
lea    0x20(%rsp),%rsi
lea    0xc(%rsp),%rdx
mov    %ebp,0x8(%rsp)
mov    %ebp,%edi
call   1120 <accept@plt>
test   %eax,%eax
js     13ee <main+0x1ce>
mov    %eax,%ebp
lea    0x30(%rsp),%rbx
lea    0xd6e(%rip),%r15
lea    0xd7f(%rip),%r13
mov    0x2cee(%rip),%r12
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x401,%edx
call   1090 <memset@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    $0x400,%edx
xor    %ecx,%ecx
call   1030 <recv@plt>
cmp    $0xffffffff,%eax
je     13c6 <main+0x1a6>
mov    %eax,%r14d
mov    %rbx,%rdi
mov    %r15,%rsi
call   10d0 <strcmp@plt>
test   %rax,%rax
je     1398 <main+0x178>
movslq %r14d,%rax
movb   $0x0,0x30(%rsp,%rax,1)
lea    0xd0d(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1080 <printf@plt>
mov    %r13,%rdi
xor    %eax,%eax
call   1080 <printf@plt>
mov    (%r12),%edx
mov    %rbx,%rdi
mov    $0x401,%esi
call   10b0 <fgets@plt>
mov    %rbx,%rdi
call   1050 <strlen@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %eax,%edx
xor    %ecx,%ecx
call   1070 <send@plt>
cmp    $0xffffffff,%eax
jne    1300 <main+0xe0>
lea    0xce4(%rip),%rdi
jmp    13cd <main+0x1ad>
mov    0x8(%rsp),%edi
call   10a0 <close@plt>
cmp    $0xffffffff,%eax
je     13f7 <main+0x1d7>
lea    0xcde(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x438,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xc7c(%rip),%rdi
call   1100 <perror@plt>
mov    $0x1,%edi
call   1130 <exit@plt>
lea    0xc1d(%rip),%rdi
jmp    13cd <main+0x1ad>
lea    0xc32(%rip),%rdi
jmp    13cd <main+0x1ad>
lea    0xc3e(%rip),%rdi
jmp    13cd <main+0x1ad>
lea    0xc87(%rip),%rdi
jmp    13cd <main+0x1ad>

LLVM IR (-O0):
%struct.sockaddr_in = type { i32, %struct.TYPE_2__, i32 }
%struct.TYPE_2__ = type { i32 }
%struct.sockaddr = type { i32 }
@AF_INET = global i32 0
@SOCK_STREAM = global i32 0
@.str = [22 x i8] c"****Create TCP socket\00"
@.str.1 = [8 x i8] c"0.0.0.0\00"
@.str.2 = [21 x i8] c"Bind the IP and PORT\00"
@.str.3 = [22 x i8] c"Accept the connection\00"
@.str.4 = [9 x i8] c"Receive \00"
@.str.5 = [6 x i8] c"exit\0A\00"
@.str.6 = [18 x i8] c"Client says : %s\0A\00"
@.str.7 = [16 x i8] c"You would say :\00"
@stdin = global i32 0
@.str.8 = [11 x i8] c"Reply sent\00"
@.str.9 = [6 x i8] c"Close\00"
@.str.10 = [27 x i8] c"TCP Server has been closed\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca %struct.sockaddr_in
%7 = alloca %struct.sockaddr_in
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca [1025 x i8]
%12 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 4, i32* %10
%13 = load i32, i32* @AF_INET
%14 = load i32, i32* @SOCK_STREAM
%15 = call i32 @socket(i32 %13, i32 %14, i32 0)
store i32 %15, i32* %8
%16 = load i32, i32* %8
%17 = icmp eq i32 %16, -1
br i1 %17, label %18, label %21
18: ; preds = %2
%19 = call i32 @perror(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%20 = call i32 @exit(i32 1)
unreachable
21: ; preds = %2
%22 = call i32 @bzero(%struct.sockaddr_in* %6, i32 12)
%23 = load i32, i32* @AF_INET
%24 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %6, i32 0, i32 2
store i32 %23, i32* %24
%25 = call i32 @inet_addr(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%26 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %6, i32 0, i32 1
%27 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %26, i32 0, i32 0
store i32 %25, i32* %27
%28 = call i32 @htons(i32 8880)
%29 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %6, i32 0, i32 0
store i32 %28, i32* %29
%30 = load i32, i32* %8
%31 = bitcast %struct.sockaddr_in* %6 to %struct.sockaddr*
%32 = call i32 @bind(i32 %30, %struct.sockaddr* %31, i32 12)
%33 = icmp eq i32 %32, -1
br i1 %33, label %34, label %37
34: ; preds = %21
%35 = call i32 @perror(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
%36 = call i32 @exit(i32 1)
unreachable
37: ; preds = %21
%38 = load i32, i32* %8
%39 = call i32 @listen(i32 %38, i32 20)
%40 = load i32, i32* %8
%41 = bitcast %struct.sockaddr_in* %7 to %struct.sockaddr*
%42 = call i32 @accept(i32 %40, %struct.sockaddr* %41, i32* %10)
store i32 %42, i32* %9
%43 = load i32, i32* %9
%44 = icmp slt i32 %43, 0
br i1 %44, label %45, label %48
45: ; preds = %37
%46 = call i32 @perror(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0))
%47 = call i32 @exit(i32 1)
unreachable
48: ; preds = %37
br label %49
49: ; preds = %48, %86
%50 = getelementptr inbounds [1025 x i8], [1025 x i8]* %11, i64 0, i64 0
%51 = call i32 @memset(i8* %50, i32 0, i32 1025)
%52 = load i32, i32* %9
%53 = getelementptr inbounds [1025 x i8], [1025 x i8]* %11, i64 0, i64 0
%54 = call i32 @recv(i32 %52, i8* %53, i32 1024, i32 0)
store i32 %54, i32* %12
%55 = load i32, i32* %12
%56 = icmp eq i32 %55, -1
br i1 %56, label %57, label %60
57: ; preds = %49
%58 = call i32 @perror(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
%59 = call i32 @exit(i32 1)
unreachable
60: ; preds = %49
%61 = getelementptr inbounds [1025 x i8], [1025 x i8]* %11, i64 0, i64 0
%62 = call i64 @strcmp(i8* %61, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
%63 = icmp eq i64 %62, 0
br i1 %63, label %64, label %65
64: ; preds = %60
br label %87
65: ; preds = %60
%66 = load i32, i32* %12
%67 = sext i32 %66 to i64
%68 = getelementptr inbounds [1025 x i8], [1025 x i8]* %11, i64 0, i64 %67
store i8 0, i8* %68
%69 = getelementptr inbounds [1025 x i8], [1025 x i8]* %11, i64 0, i64 0
%70 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.6, i64 0, i64 0), i8* %69)
%71 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0))
%72 = getelementptr inbounds [1025 x i8], [1025 x i8]* %11, i64 0, i64 0
%73 = load i32, i32* @stdin
%74 = call i32 @fgets(i8* %72, i32 1025, i32 %73)
%75 = load i32, i32* %9
%76 = getelementptr inbounds [1025 x i8], [1025 x i8]* %11, i64 0, i64 0
%77 = getelementptr inbounds [1025 x i8], [1025 x i8]* %11, i64 0, i64 0
%78 = call i32 @strlen(i8* %77)
%79 = call i32 @send(i32 %75, i8* %76, i32 %78, i32 0)
store i32 %79, i32* %12
%80 = load i32, i32* %12
%81 = icmp eq i32 %80, -1
br i1 %81, label %82, label %85
82: ; preds = %65
%83 = call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.8, i64 0, i64 0))
%84 = call i32 @exit(i32 1)
unreachable
85: ; preds = %65
br label %86
86: ; preds = %85
br label %49
87: ; preds = %64
%88 = load i32, i32* %8
%89 = call i32 @close(i32 %88)
%90 = icmp eq i32 %89, -1
br i1 %90, label %91, label %94
91: ; preds = %87
%92 = call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0))
%93 = call i32 @exit(i32 1)
unreachable
94: ; preds = %87
%95 = call i32 @puts(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.10, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
%struct.sockaddr_in = type { i32, %struct.TYPE_2__, i32 }
%struct.TYPE_2__ = type { i32 }
%struct.sockaddr = type { i32 }
@AF_INET = global i32 0
@SOCK_STREAM = global i32 0
@.str = [22 x i8] c"****Create TCP socket\00"
@.str.1 = [8 x i8] c"0.0.0.0\00"
@.str.2 = [21 x i8] c"Bind the IP and PORT\00"
@.str.3 = [22 x i8] c"Accept the connection\00"
@.str.4 = [9 x i8] c"Receive \00"
@.str.5 = [6 x i8] c"exit\0A\00"
@.str.6 = [18 x i8] c"Client says : %s\0A\00"
@.str.7 = [16 x i8] c"You would say :\00"
@stdin = global i32 0
@.str.8 = [11 x i8] c"Reply sent\00"
@.str.9 = [6 x i8] c"Close\00"
@.str.10 = [27 x i8] c"TCP Server has been closed\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca %struct.sockaddr_in
%4 = alloca %struct.sockaddr_in
%5 = alloca i32
%6 = alloca [1025 x i8]
%7 = bitcast %struct.sockaddr_in* %3 to i8*
%8 = bitcast %struct.sockaddr_in* %4 to i8*
%9 = bitcast i32* %5 to i8*
store i32 4, i32* %5
%10 = getelementptr inbounds [1025 x i8], [1025 x i8]* %6, i64 0, i64 0
%11 = load i32, i32* @AF_INET
%12 = load i32, i32* @SOCK_STREAM
%13 = tail call i32 @socket(i32 %11, i32 %12, i32 0)
%14 = icmp eq i32 %13, -1
br i1 %14, label %15, label %18
15: ; preds = %2
%16 = tail call i32 @perror(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%17 = tail call i32 @exit(i32 1)
unreachable
18: ; preds = %2
%19 = call i32 @bzero(%struct.sockaddr_in* %3, i32 12)
%20 = load i32, i32* @AF_INET
%21 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %3, i64 0, i32 2
store i32 %20, i32* %21
%22 = tail call i32 @inet_addr(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%23 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %3, i64 0, i32 1, i32 0
store i32 %22, i32* %23
%24 = tail call i32 @htons(i32 8880)
%25 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %3, i64 0, i32 0
store i32 %24, i32* %25
%26 = bitcast %struct.sockaddr_in* %3 to %struct.sockaddr*
%27 = call i32 @bind(i32 %13, %struct.sockaddr* %26, i32 12)
%28 = icmp eq i32 %27, -1
br i1 %28, label %29, label %32
29: ; preds = %18
%30 = call i32 @perror(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
%31 = call i32 @exit(i32 1)
unreachable
32: ; preds = %18
%33 = call i32 @listen(i32 %13, i32 20)
%34 = bitcast %struct.sockaddr_in* %4 to %struct.sockaddr*
%35 = call i32 @accept(i32 %13, %struct.sockaddr* %34, i32* %5)
%36 = icmp slt i32 %35, 0
br i1 %36, label %37, label %40
37: ; preds = %32
%38 = call i32 @perror(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0))
%39 = call i32 @exit(i32 1)
unreachable
40: ; preds = %32, %50
%41 = call i32 @memset(i8* %10, i32 0, i32 1025)
%42 = call i32 @recv(i32 %35, i8* %10, i32 1024, i32 0)
%43 = icmp eq i32 %42, -1
br i1 %43, label %44, label %47
44: ; preds = %40
%45 = call i32 @perror(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
%46 = call i32 @exit(i32 1)
unreachable
47: ; preds = %40
%48 = call i64 @strcmp(i8* %10, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
%49 = icmp eq i64 %48, 0
br i1 %49, label %63, label %50
50: ; preds = %47
%51 = sext i32 %42 to i64
%52 = getelementptr inbounds [1025 x i8], [1025 x i8]* %6, i64 0, i64 %51
store i8 0, i8* %52
%53 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.6, i64 0, i64 0), i8* %10)
%54 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0))
%55 = load i32, i32* @stdin
%56 = call i32 @fgets(i8* %10, i32 1025, i32 %55)
%57 = call i32 @strlen(i8* %10)
%58 = call i32 @send(i32 %35, i8* %10, i32 %57, i32 0)
%59 = icmp eq i32 %58, -1
br i1 %59, label %60, label %40
60: ; preds = %50
%61 = call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.8, i64 0, i64 0))
%62 = call i32 @exit(i32 1)
unreachable
63: ; preds = %47
%64 = call i32 @close(i32 %13)
%65 = icmp eq i32 %64, -1
br i1 %65, label %66, label %69
66: ; preds = %63
%67 = call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0))
%68 = call i32 @exit(i32 1)
unreachable
69: ; preds = %63
%70 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.10, i64 0, i64 0))
ret i32 0
}