#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*/ serv_addr;
typedef int /*<<< orphan*/ opt;
typedef int /*<<< orphan*/ msg;
typedef int /*<<< orphan*/ cli_addr;

/* Variables and functions */
int /*<<< orphan*/ AF_INET;
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ INADDR_ANY;
int /*<<< orphan*/ SOCK_STREAM;
int /*<<< orphan*/ SOL_SOCKET;
int /*<<< orphan*/ SO_REUSEADDR;
int accept(int, struct sockaddr *, int *);
int /*<<< orphan*/ atoi(char *);
int bind(int, struct sockaddr *, int);
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ errno;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ htonl(int /*<<< orphan*/);
int /*<<< orphan*/ htons(int /*<<< orphan*/);
int listen(int, int);
int /*<<< orphan*/ memset(struct sockaddr_in *, int /*<<< orphan*/, int);
int /*<<< orphan*/ perror(char *);
int read(int, char *, int);
int /*<<< orphan*/ setsockopt(int, int /*<<< orphan*/, int /*<<< orphan*/,
                              void *, int);
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
char *strerror(int /*<<< orphan*/);
int /*<<< orphan*/ write(int, char *, int);
int main(int argc, char *argv[]) {
  int sockfd, clifd;
  struct sockaddr_in serv_addr, cli_addr;
  socklen_t cli_len;
  char msg[1024];
  int str_len;
  int opt = 1;
  if (argc != 2) {
    fprintf(stderr, "Usage: %s <port>\n", argv[0]);
    exit(EXIT_FAILURE);
  }
  if ((sockfd = socket(AF_INET, SOCK_STREAM, 0)) == -1) {
    perror("socket() failed");
    exit(EXIT_FAILURE);
  }
  setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, (void *)&opt, sizeof(opt));
  memset(&serv_addr, 0, sizeof(serv_addr));
  serv_addr.sin_family = AF_INET;
  serv_addr.sin_addr.s_addr = htonl(INADDR_ANY);
  serv_addr.sin_port = htons(atoi(argv[1]));
  if (bind(sockfd, (struct sockaddr *)&serv_addr, sizeof(serv_addr)) == -1) {
    fprintf(stderr, "bind() failed: %s\n", strerror(errno));
    exit(EXIT_FAILURE);
  }
  if (listen(sockfd, 5) == -1) {
    fprintf(stderr, "listen() failed: %s\n", strerror(errno));
    exit(EXIT_FAILURE);
  }
  cli_len = sizeof(cli_addr);
  while (1) {
    clifd = accept(sockfd, (struct sockaddr *)&cli_addr, &cli_len);
    if (clifd == -1) {
      fprintf(stderr, "accept() failed: %s\n", strerror(errno));
      exit(EXIT_FAILURE);
    }
    while ((str_len = read(clifd, msg, sizeof(msg))) > 0)
      write(clifd, msg, str_len);
    close(clifd);
  }
  close(sockfd);
  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   $0x1,-0x448(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     1257 <main+0x57>
mov    0x2d94(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xdbc(%rip),%rsi
call   10a0 <fprintf@plt>
mov    0x2d60(%rip),%rax
mov    (%rax),%edi
call   1100 <exit@plt>
mov    0x2d82(%rip),%rax
mov    (%rax),%edi
mov    0x2d59(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1120 <socket@plt>
mov    %eax,-0x14(%rbp)
cmp    $0xffffffff,%eax
jne    1296 <main+0x96>
lea    0xd8f(%rip),%rdi
call   10d0 <perror@plt>
mov    0x2d21(%rip),%rax
mov    (%rax),%edi
call   1100 <exit@plt>
mov    -0x14(%rbp),%edi
mov    0x2d48(%rip),%rax
mov    (%rax),%esi
mov    0x2cff(%rip),%rax
mov    (%rax),%edx
lea    -0x448(%rbp),%rcx
mov    $0x4,%r8d
call   1030 <setsockopt@plt>
lea    -0x28(%rbp),%rdi
xor    %esi,%esi
mov    $0xc,%edx
call   1070 <memset@plt>
mov    0x2d0c(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x20(%rbp)
mov    0x2cf8(%rip),%rax
mov    (%rax),%edi
call   1060 <htonl@plt>
mov    %eax,-0x24(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   10f0 <atoi@plt>
mov    %eax,%edi
call   1050 <htons@plt>
mov    %eax,-0x28(%rbp)
mov    -0x14(%rbp),%edi
lea    -0x28(%rbp),%rsi
mov    $0xc,%edx
call   10c0 <bind@plt>
cmp    $0xffffffff,%eax
jne    135b <main+0x15b>
mov    0x2ca6(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x44c(%rbp)
mov    0x2c87(%rip),%rax
mov    (%rax),%edi
call   1110 <strerror@plt>
mov    -0x44c(%rbp),%edi
mov    %rax,%rdx
lea    0xcda(%rip),%rsi
call   10a0 <fprintf@plt>
mov    0x2c5c(%rip),%rax
mov    (%rax),%edi
call   1100 <exit@plt>
mov    -0x14(%rbp),%edi
mov    $0x5,%esi
call   10b0 <listen@plt>
cmp    $0xffffffff,%eax
jne    13b1 <main+0x1b1>
mov    0x2c50(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x450(%rbp)
mov    0x2c31(%rip),%rax
mov    (%rax),%edi
call   1110 <strerror@plt>
mov    -0x450(%rbp),%edi
mov    %rax,%rdx
lea    0xc97(%rip),%rsi
call   10a0 <fprintf@plt>
mov    0x2c06(%rip),%rax
mov    (%rax),%edi
call   1100 <exit@plt>
movl   $0xc,-0x3c(%rbp)
mov    -0x14(%rbp),%edi
lea    -0x38(%rbp),%rsi
lea    -0x3c(%rbp),%rdx
call   10e0 <accept@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0xffffffff,-0x18(%rbp)
jne    1415 <main+0x215>
mov    0x2bec(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x454(%rbp)
mov    0x2bcd(%rip),%rax
mov    (%rax),%edi
call   1110 <strerror@plt>
mov    -0x454(%rbp),%edi
mov    %rax,%rdx
lea    0xc48(%rip),%rsi
call   10a0 <fprintf@plt>
mov    0x2ba2(%rip),%rax
mov    (%rax),%edi
call   1100 <exit@plt>
jmp    141a <main+0x21a>
mov    -0x18(%rbp),%edi
lea    -0x440(%rbp),%rsi
mov    $0x400,%edx
call   1090 <read@plt>
mov    %eax,-0x444(%rbp)
cmp    $0x0,%eax
jle    1457 <main+0x257>
mov    -0x18(%rbp),%edi
lea    -0x440(%rbp),%rsi
mov    -0x444(%rbp),%edx
call   1040 <write@plt>
jmp    141a <main+0x21a>
mov    -0x18(%rbp),%edi
call   1080 <close@plt>
jmp    13b8 <main+0x1b8>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x430,%rsp
mov    %rsi,%r14
movl   $0x1,0xc(%rsp)
cmp    $0x2,%edi
jne    124f <main+0x4f>
mov    0x2dba(%rip),%rbp
mov    0x0(%rbp),%edi
mov    0x2d90(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1120 <socket@plt>
cmp    $0xffffffff,%eax
jne    1267 <main+0x67>
lea    0xdcd(%rip),%rdi
call   10d0 <perror@plt>
jmp    13d3 <main+0x1d3>
mov    0x2d72(%rip),%rax
mov    (%rax),%edi
mov    (%r14),%rdx
lea    0xd9e(%rip),%rsi
jmp    13ce <main+0x1ce>
mov    %eax,%r15d
mov    0x2d77(%rip),%rax
mov    (%rax),%esi
mov    0x2d2e(%rip),%rax
mov    (%rax),%edx
lea    0xc(%rsp),%rcx
mov    %r15d,%edi
mov    $0x4,%r8d
call   1030 <setsockopt@plt>
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0xc,%edx
call   1070 <memset@plt>
mov    0x0(%rbp),%eax
mov    %eax,0x18(%rsp)
mov    0x2d27(%rip),%rax
mov    (%rax),%edi
call   1060 <htonl@plt>
mov    %eax,0x14(%rsp)
mov    0x8(%r14),%rdi
call   10f0 <atoi@plt>
mov    %eax,%edi
call   1050 <htons@plt>
mov    %eax,0x10(%rsp)
mov    %r15d,%edi
mov    %rbx,%rsi
mov    $0xc,%edx
call   10c0 <bind@plt>
cmp    $0xffffffff,%eax
jne    1308 <main+0x108>
mov    0x2cdc(%rip),%rax
mov    (%rax),%ebx
mov    0x2cc3(%rip),%rax
mov    (%rax),%edi
call   1110 <strerror@plt>
lea    0xd1f(%rip),%rsi
jmp    13c9 <main+0x1c9>
mov    %r15d,%edi
mov    $0x5,%esi
call   10b0 <listen@plt>
cmp    $0xffffffff,%eax
jne    133d <main+0x13d>
mov    0x2ca7(%rip),%rax
mov    (%rax),%ebx
mov    0x2c8e(%rip),%rax
mov    (%rax),%edi
call   1110 <strerror@plt>
lea    0xcfd(%rip),%rsi
jmp    13c9 <main+0x1c9>
movl   $0xc,0x8(%rsp)
lea    0x20(%rsp),%rsi
lea    0x8(%rsp),%rdx
mov    %r15d,%edi
call   10e0 <accept@plt>
cmp    $0xffffffff,%eax
je     13ab <main+0x1ab>
mov    %eax,%ebp
lea    0x30(%rsp),%rbx
lea    0x20(%rsp),%r14
lea    0x8(%rsp),%r12
jmp    137c <main+0x17c>
nop
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1040 <write@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    $0x400,%edx
call   1090 <read@plt>
test   %eax,%eax
jg     1370 <main+0x170>
mov    %ebp,%edi
call   1080 <close@plt>
mov    %r15d,%edi
mov    %r14,%rsi
mov    %r12,%rdx
call   10e0 <accept@plt>
mov    %eax,%ebp
cmp    $0xffffffff,%eax
jne    137c <main+0x17c>
mov    0x2c16(%rip),%rax
mov    (%rax),%ebx
mov    0x2bfd(%rip),%rax
mov    (%rax),%edi
call   1110 <strerror@plt>
lea    0xc81(%rip),%rsi
mov    %ebx,%edi
mov    %rax,%rdx
call   10a0 <fprintf@plt>
mov    0x2bd6(%rip),%rax
mov    (%rax),%edi
call   1100 <exit@plt>

LLVM IR (-O0):
%struct.sockaddr_in = type { i32, %struct.TYPE_2__, i32 }
%struct.TYPE_2__ = type { i32 }
%struct.sockaddr = type { i32 }
@stderr = global i32 0
@.str = [18 x i8] c"Usage: %s <port>\0A\00"
@EXIT_FAILURE = global i32 0
@AF_INET = global i32 0
@SOCK_STREAM = global i32 0
@.str.1 = [16 x i8] c"socket() failed\00"
@SOL_SOCKET = global i32 0
@SO_REUSEADDR = global i32 0
@INADDR_ANY = global i32 0
@.str.2 = [19 x i8] c"bind() failed: %s\0A\00"
@errno = global i32 0
@.str.3 = [21 x i8] c"listen() failed: %s\0A\00"
@.str.4 = [21 x i8] c"accept() failed: %s\0A\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.sockaddr_in
%9 = alloca %struct.sockaddr_in
%10 = alloca i32
%11 = alloca [1024 x i8]
%12 = alloca i32
%13 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 1, i32* %13
%14 = load i32, i32* %4
%15 = icmp ne i32 %14, 2
br i1 %15, label %16, label %24
16: ; preds = %2
%17 = load i32, i32* @stderr
%18 = load i8**, i8*** %5
%19 = getelementptr inbounds i8*, i8** %18, i64 0
%20 = load i8*, i8** %19
%21 = call i32 @fprintf(i32 %17, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %20)
%22 = load i32, i32* @EXIT_FAILURE
%23 = call i32 @exit(i32 %22)
unreachable
24: ; preds = %2
%25 = load i32, i32* @AF_INET
%26 = load i32, i32* @SOCK_STREAM
%27 = call i32 @socket(i32 %25, i32 %26, i32 0)
store i32 %27, i32* %6
%28 = icmp eq i32 %27, -1
br i1 %28, label %29, label %33
29: ; preds = %24
%30 = call i32 @perror(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%31 = load i32, i32* @EXIT_FAILURE
%32 = call i32 @exit(i32 %31)
unreachable
33: ; preds = %24
%34 = load i32, i32* %6
%35 = load i32, i32* @SOL_SOCKET
%36 = load i32, i32* @SO_REUSEADDR
%37 = bitcast i32* %13 to i8*
%38 = call i32 @setsockopt(i32 %34, i32 %35, i32 %36, i8* %37, i32 4)
%39 = call i32 @memset(%struct.sockaddr_in* %8, i32 0, i32 12)
%40 = load i32, i32* @AF_INET
%41 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %8, i32 0, i32 2
store i32 %40, i32* %41
%42 = load i32, i32* @INADDR_ANY
%43 = call i32 @htonl(i32 %42)
%44 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %8, i32 0, i32 1
%45 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %44, i32 0, i32 0
store i32 %43, i32* %45
%46 = load i8**, i8*** %5
%47 = getelementptr inbounds i8*, i8** %46, i64 1
%48 = load i8*, i8** %47
%49 = call i32 @atoi(i8* %48)
%50 = call i32 @htons(i32 %49)
%51 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %8, i32 0, i32 0
store i32 %50, i32* %51
%52 = load i32, i32* %6
%53 = bitcast %struct.sockaddr_in* %8 to %struct.sockaddr*
%54 = call i32 @bind(i32 %52, %struct.sockaddr* %53, i32 12)
%55 = icmp eq i32 %54, -1
br i1 %55, label %56, label %63
56: ; preds = %33
%57 = load i32, i32* @stderr
%58 = load i32, i32* @errno
%59 = call i8* @strerror(i32 %58)
%60 = call i32 @fprintf(i32 %57, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i8* %59)
%61 = load i32, i32* @EXIT_FAILURE
%62 = call i32 @exit(i32 %61)
unreachable
63: ; preds = %33
%64 = load i32, i32* %6
%65 = call i32 @listen(i32 %64, i32 5)
%66 = icmp eq i32 %65, -1
br i1 %66, label %67, label %74
67: ; preds = %63
%68 = load i32, i32* @stderr
%69 = load i32, i32* @errno
%70 = call i8* @strerror(i32 %69)
%71 = call i32 @fprintf(i32 %68, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0), i8* %70)
%72 = load i32, i32* @EXIT_FAILURE
%73 = call i32 @exit(i32 %72)
unreachable
74: ; preds = %63
store i32 12, i32* %10
br label %75
75: ; preds = %74, %99
%76 = load i32, i32* %6
%77 = bitcast %struct.sockaddr_in* %9 to %struct.sockaddr*
%78 = call i32 @accept(i32 %76, %struct.sockaddr* %77, i32* %10)
store i32 %78, i32* %7
%79 = load i32, i32* %7
%80 = icmp eq i32 %79, -1
br i1 %80, label %81, label %88
81: ; preds = %75
%82 = load i32, i32* @stderr
%83 = load i32, i32* @errno
%84 = call i8* @strerror(i32 %83)
%85 = call i32 @fprintf(i32 %82, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), i8* %84)
%86 = load i32, i32* @EXIT_FAILURE
%87 = call i32 @exit(i32 %86)
unreachable
88: ; preds = %75
br label %89
89: ; preds = %94, %88
%90 = load i32, i32* %7
%91 = getelementptr inbounds [1024 x i8], [1024 x i8]* %11, i64 0, i64 0
%92 = call i32 @read(i32 %90, i8* %91, i32 1024)
store i32 %92, i32* %12
%93 = icmp sgt i32 %92, 0
br i1 %93, label %94, label %99
94: ; preds = %89
%95 = load i32, i32* %7
%96 = getelementptr inbounds [1024 x i8], [1024 x i8]* %11, i64 0, i64 0
%97 = load i32, i32* %12
%98 = call i32 @write(i32 %95, i8* %96, i32 %97)
br label %89
99: ; preds = %89
%100 = load i32, i32* %7
%101 = call i32 @close(i32 %100)
br label %75
}

LLVM IR (-O2):
%struct.sockaddr_in = type { i32, %struct.TYPE_2__, i32 }
%struct.TYPE_2__ = type { i32 }
%struct.sockaddr = type { i32 }
@stderr = global i32 0
@.str = [18 x i8] c"Usage: %s <port>\0A\00"
@EXIT_FAILURE = global i32 0
@AF_INET = global i32 0
@SOCK_STREAM = global i32 0
@.str.1 = [16 x i8] c"socket() failed\00"
@SOL_SOCKET = global i32 0
@SO_REUSEADDR = global i32 0
@INADDR_ANY = global i32 0
@.str.2 = [19 x i8] c"bind() failed: %s\0A\00"
@errno = global i32 0
@.str.3 = [21 x i8] c"listen() failed: %s\0A\00"
@.str.4 = [21 x i8] c"accept() failed: %s\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca %struct.sockaddr_in
%4 = alloca %struct.sockaddr_in
%5 = alloca i32
%6 = alloca [1024 x i8]
%7 = alloca i32
%8 = bitcast %struct.sockaddr_in* %3 to i8*
%9 = bitcast %struct.sockaddr_in* %4 to i8*
%10 = bitcast i32* %5 to i8*
%11 = getelementptr inbounds [1024 x i8], [1024 x i8]* %6, i64 0, i64 0
%12 = bitcast i32* %7 to i8*
store i32 1, i32* %7
%13 = icmp eq i32 %0, 2
br i1 %13, label %20, label %14
14: ; preds = %2
%15 = load i32, i32* @stderr
%16 = load i8*, i8** %1
%17 = tail call i32 @fprintf(i32 %15, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %16)
%18 = load i32, i32* @EXIT_FAILURE
%19 = tail call i32 @exit(i32 %18)
unreachable
20: ; preds = %2
%21 = load i32, i32* @AF_INET
%22 = load i32, i32* @SOCK_STREAM
%23 = tail call i32 @socket(i32 %21, i32 %22, i32 0)
%24 = icmp eq i32 %23, -1
br i1 %24, label %25, label %29
25: ; preds = %20
%26 = tail call i32 @perror(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%27 = load i32, i32* @EXIT_FAILURE
%28 = tail call i32 @exit(i32 %27)
unreachable
29: ; preds = %20
%30 = load i32, i32* @SOL_SOCKET
%31 = load i32, i32* @SO_REUSEADDR
%32 = call i32 @setsockopt(i32 %23, i32 %30, i32 %31, i8* %12, i32 4)
%33 = call i32 @memset(%struct.sockaddr_in* %3, i32 0, i32 12)
%34 = load i32, i32* @AF_INET
%35 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %3, i64 0, i32 2
store i32 %34, i32* %35
%36 = load i32, i32* @INADDR_ANY
%37 = call i32 @htonl(i32 %36)
%38 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %3, i64 0, i32 1, i32 0
store i32 %37, i32* %38
%39 = getelementptr inbounds i8*, i8** %1, i64 1
%40 = load i8*, i8** %39
%41 = call i32 @atoi(i8* %40)
%42 = call i32 @htons(i32 %41)
%43 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %3, i64 0, i32 0
store i32 %42, i32* %43
%44 = bitcast %struct.sockaddr_in* %3 to %struct.sockaddr*
%45 = call i32 @bind(i32 %23, %struct.sockaddr* %44, i32 12)
%46 = icmp eq i32 %45, -1
br i1 %46, label %47, label %54
47: ; preds = %29
%48 = load i32, i32* @stderr
%49 = load i32, i32* @errno
%50 = call i8* @strerror(i32 %49)
%51 = call i32 @fprintf(i32 %48, i8* getelementptr inbounds ([19 x i8], [19 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 = %29
%55 = call i32 @listen(i32 %23, i32 5)
%56 = icmp eq i32 %55, -1
br i1 %56, label %57, label %64
57: ; preds = %54
%58 = load i32, i32* @stderr
%59 = load i32, i32* @errno
%60 = call i8* @strerror(i32 %59)
%61 = call i32 @fprintf(i32 %58, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0), i8* %60)
%62 = load i32, i32* @EXIT_FAILURE
%63 = call i32 @exit(i32 %62)
unreachable
64: ; preds = %54
store i32 12, i32* %5
%65 = bitcast %struct.sockaddr_in* %4 to %struct.sockaddr*
%66 = call i32 @accept(i32 %23, %struct.sockaddr* %65, i32* %5)
%67 = icmp eq i32 %66, -1
br i1 %67, label %72, label %68
68: ; preds = %64, %84
%69 = phi i32 [ %86, %84 ], [ %66, %64 ]
%70 = call i32 @read(i32 %69, i8* %11, i32 1024)
%71 = icmp sgt i32 %70, 0
br i1 %71, label %79, label %84
72: ; preds = %84, %64
%73 = load i32, i32* @stderr
%74 = load i32, i32* @errno
%75 = call i8* @strerror(i32 %74)
%76 = call i32 @fprintf(i32 %73, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), i8* %75)
%77 = load i32, i32* @EXIT_FAILURE
%78 = call i32 @exit(i32 %77)
unreachable
79: ; preds = %68, %79
%80 = phi i32 [ %82, %79 ], [ %70, %68 ]
%81 = call i32 @write(i32 %69, i8* %11, i32 %80)
%82 = call i32 @read(i32 %69, i8* %11, i32 1024)
%83 = icmp sgt i32 %82, 0
br i1 %83, label %79, label %84
84: ; preds = %79, %68
%85 = call i32 @close(i32 %69)
%86 = call i32 @accept(i32 %23, %struct.sockaddr* %65, i32* %5)
%87 = icmp eq i32 %86, -1
br i1 %87, label %72, label %68
}