#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*/ client_addr;

/* Variables and functions */
int /*<<< orphan*/ AF_INET;
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ INADDR_ANY;
int INET_ADDRSTRLEN;
int /*<<< orphan*/ IPPROTO_TCP;
int /*<<< orphan*/ SOCK_STREAM;
int /*<<< orphan*/ SOMAXCONN;
int accept(int, struct sockaddr *, int *);
int /*<<< orphan*/ atoi(char *);
int bind(int, struct sockaddr *, int);
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ htonl(int /*<<< orphan*/);
int /*<<< orphan*/ htons(int /*<<< orphan*/);
int /*<<< orphan*/ inet_ntop(int /*<<< orphan*/, TYPE_1__ *, char *, int);
int listen(int, int /*<<< orphan*/);
int /*<<< orphan*/ memset(struct sockaddr_in *, int /*<<< orphan*/, int);
int ntohs(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ send(int, char *, int /*<<< orphan*/, int /*<<< orphan*/);
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ strlen(char *);
int main(int argc, char **argv) {
  int sockfd;
  int retval;
  int new_socket;
  char *message = "<test message>";
  char adresIPv4[INET_ADDRSTRLEN];
  socklen_t client_addr_len, server_addr_len;
  struct sockaddr_in client_addr, server_addr;
  if (argc != 2) {
    fprintf(stderr, "Bad arguments!\nusage: %s <PORT>\n", argv[0]);
    exit(EXIT_FAILURE);
  }
  sockfd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
  if (sockfd == -1) {
    perror("socket()");
    exit(EXIT_FAILURE);
  }
  memset(&server_addr, 0, sizeof(server_addr));
  server_addr.sin_family = AF_INET;
  server_addr.sin_port = htons(atoi(argv[1]));
  server_addr.sin_addr.s_addr = htonl(INADDR_ANY);
  server_addr_len = sizeof(server_addr);
  retval = bind(sockfd, (struct sockaddr *)&server_addr, server_addr_len);
  if (retval == -1) {
    perror("Binding error.");
    exit(EXIT_FAILURE);
  }
  printf("Listing...\n");
  client_addr_len = sizeof(client_addr);
  if (listen(sockfd, SOMAXCONN) == -1) {
    perror("Call rejected.");
    exit(EXIT_FAILURE);
  }
  for (;;) {
    if ((new_socket = accept(sockfd, (struct sockaddr *)&client_addr,
                             (socklen_t *)&client_addr_len)) < 0) {
      perror("Connection error");
      exit(EXIT_FAILURE);
    } else {
      inet_ntop(AF_INET, &client_addr.sin_addr, adresIPv4, INET_ADDRSTRLEN);
      printf("Addr [%s] Port [%d] \n", adresIPv4, ntohs(client_addr.sin_port));
      send(new_socket, message, strlen(message), 0);
    }
    close(new_socket);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xdd0(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0x2d75(%rip),%rax
mov    (%rax),%eax
mov    %rsp,%rcx
mov    %rcx,-0x30(%rbp)
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x68(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x38(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     1294 <main+0x84>
mov    0x2d57(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xd8e(%rip),%rsi
call   10b0 <fprintf@plt>
mov    0x2d1b(%rip),%rax
mov    (%rax),%edi
call   1120 <exit@plt>
mov    0x2d4d(%rip),%rax
mov    (%rax),%edi
mov    0x2d14(%rip),%rax
mov    (%rax),%esi
mov    0x2d2b(%rip),%rax
mov    (%rax),%edx
call   1130 <socket@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xffffffff,-0x14(%rbp)
jne    12db <main+0xcb>
lea    0xd68(%rip),%rdi
call   10f0 <perror@plt>
mov    0x2cd4(%rip),%rax
mov    (%rax),%edi
call   1120 <exit@plt>
lea    -0x60(%rbp),%rdi
xor    %esi,%esi
mov    $0xc,%edx
call   1090 <memset@plt>
mov    0x2cf6(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x58(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1110 <atoi@plt>
mov    %eax,%edi
call   1050 <htons@plt>
mov    %eax,-0x60(%rbp)
mov    0x2ccb(%rip),%rax
mov    (%rax),%edi
call   1080 <htonl@plt>
mov    %eax,-0x5c(%rbp)
movl   $0xc,-0x40(%rbp)
mov    -0x14(%rbp),%edi
lea    -0x60(%rbp),%rsi
mov    -0x40(%rbp),%edx
call   10e0 <bind@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0xffffffff,-0x18(%rbp)
jne    135c <main+0x14c>
lea    0xcf0(%rip),%rdi
call   10f0 <perror@plt>
mov    0x2c53(%rip),%rax
mov    (%rax),%edi
call   1120 <exit@plt>
lea    0xce5(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
movl   $0xc,-0x3c(%rbp)
mov    -0x14(%rbp),%edi
mov    0x2c45(%rip),%rax
mov    (%rax),%esi
call   10c0 <listen@plt>
cmp    $0xffffffff,%eax
jne    13a5 <main+0x195>
lea    0xcc2(%rip),%rdi
call   10f0 <perror@plt>
mov    0x2c0a(%rip),%rax
mov    (%rax),%edi
call   1120 <exit@plt>
jmp    13aa <main+0x19a>
mov    -0x14(%rbp),%edi
lea    -0x50(%rbp),%rsi
lea    -0x3c(%rbp),%rdx
call   1100 <accept@plt>
mov    %eax,-0x1c(%rbp)
cmp    $0x0,%eax
jge    13e0 <main+0x1d0>
lea    0xc96(%rip),%rdi
call   10f0 <perror@plt>
mov    0x2bcf(%rip),%rax
mov    (%rax),%edi
call   1120 <exit@plt>
mov    -0x68(%rbp),%rdx
mov    0x2bfd(%rip),%rax
mov    (%rax),%edi
lea    -0x50(%rbp),%rsi
add    $0x4,%rsi
mov    0x2bb4(%rip),%rax
mov    (%rax),%ecx
call   1030 <inet_ntop@plt>
mov    -0x50(%rbp),%edi
call   10d0 <ntohs@plt>
mov    -0x68(%rbp),%rsi
mov    %eax,%edx
lea    0xc5c(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x74(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x70(%rbp)
mov    -0x28(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x74(%rbp),%edi
mov    -0x70(%rbp),%rsi
mov    %eax,%edx
xor    %ecx,%ecx
call   1060 <send@plt>
mov    -0x1c(%rbp),%edi
call   10a0 <close@plt>
jmp    13aa <main+0x19a>

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %rsi,%r13
mov    0x2d75(%rip),%r15
mov    (%r15),%eax
mov    %rsp,%rbx
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rbx
mov    %rbx,%rsp
cmp    $0x2,%edi
jne    1286 <main+0x66>
mov    0x2d8d(%rip),%r14
mov    (%r14),%edi
mov    0x2d53(%rip),%rax
mov    (%rax),%esi
mov    0x2d6a(%rip),%rax
mov    (%rax),%edx
call   1140 <socket@plt>
cmp    $0xffffffff,%eax
jne    12a4 <main+0x84>
lea    0xdaf(%rip),%rdi
jmp    13db <main+0x1bb>
mov    0x2d3b(%rip),%rax
mov    (%rax),%edi
mov    0x0(%r13),%rdx
lea    0xd75(%rip),%rsi
call   10c0 <fprintf@plt>
jmp    13e0 <main+0x1c0>
mov    %eax,%r12d
lea    -0x40(%rbp),%rdi
xor    %esi,%esi
mov    $0xc,%edx
call   10a0 <memset@plt>
mov    (%r14),%eax
mov    %eax,-0x38(%rbp)
mov    0x8(%r13),%rdi
call   1120 <atoi@plt>
mov    %eax,%edi
call   1060 <htons@plt>
mov    %eax,-0x40(%rbp)
mov    0x2d09(%rip),%rax
mov    (%rax),%edi
call   1090 <htonl@plt>
mov    %eax,-0x3c(%rbp)
mov    %r12d,%edi
lea    -0x40(%rbp),%rsi
mov    $0xc,%edx
call   10f0 <bind@plt>
cmp    $0xffffffff,%eax
jne    1303 <main+0xe3>
lea    0xd3b(%rip),%rdi
jmp    13db <main+0x1bb>
mov    0x2cde(%rip),%r13
lea    0xd6d(%rip),%rdi
call   1040 <puts@plt>
movl   $0xc,-0x2c(%rbp)
mov    0x2c9c(%rip),%rax
mov    (%rax),%esi
mov    %r12d,%edi
call   10d0 <listen@plt>
cmp    $0xffffffff,%eax
jne    133f <main+0x11f>
lea    0xd0e(%rip),%rdi
jmp    13db <main+0x1bb>
lea    -0x50(%rbp),%rsi
lea    -0x2c(%rbp),%rdx
mov    %r12d,%edi
call   1110 <accept@plt>
mov    %r15,%r14
mov    %eax,%r15d
test   %eax,%eax
mov    %r12d,%eax
mov    %r12d,-0x30(%rbp)
js     13d4 <main+0x1b4>
mov    %rbx,%r12
lea    0xc96(%rip),%rbx
nopw   0x0(%rax,%rax,1)
mov    0x0(%r13),%edi
mov    (%r14),%ecx
lea    -0x4c(%rbp),%rsi
mov    %r12,%rdx
call   1030 <inet_ntop@plt>
mov    -0x50(%rbp),%edi
call   10e0 <ntohs@plt>
lea    0xcd6(%rip),%rdi
mov    %r12,%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1080 <printf@plt>
mov    %rbx,%rdi
call   1050 <strlen@plt>
mov    %r15d,%edi
mov    %rbx,%rsi
mov    %eax,%edx
xor    %ecx,%ecx
call   1070 <send@plt>
mov    %r15d,%edi
call   10b0 <close@plt>
mov    -0x30(%rbp),%edi
lea    -0x50(%rbp),%rsi
lea    -0x2c(%rbp),%rdx
call   1110 <accept@plt>
mov    %eax,%r15d
test   %eax,%eax
jns    1370 <main+0x150>
lea    0xc7c(%rip),%rdi
call   1100 <perror@plt>
mov    0x2bc1(%rip),%rax
mov    (%rax),%edi
call   1130 <exit@plt>

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

LLVM IR (-O2):
%struct.sockaddr_in = type { i32, %struct.TYPE_2__, i32 }
%struct.TYPE_2__ = type { i32 }
%struct.sockaddr = type { i32 }
@.str = [15 x i8] c"<test message>\00"
@INET_ADDRSTRLEN = global i32 0
@stderr = global i32 0
@.str.1 = [33 x i8] c"Bad arguments!\0Ausage: %s <PORT>\0A\00"
@EXIT_FAILURE = global i32 0
@AF_INET = global i32 0
@SOCK_STREAM = global i32 0
@IPPROTO_TCP = global i32 0
@.str.2 = [9 x i8] c"socket()\00"
@INADDR_ANY = global i32 0
@.str.3 = [15 x i8] c"Binding error.\00"
@SOMAXCONN = global i32 0
@.str.5 = [15 x i8] c"Call rejected.\00"
@.str.6 = [17 x i8] c"Connection error\00"
@.str.7 = [22 x i8] c"Addr [%s] Port [%d] \0A\00"
@str = [11 x i8] c"Listing...\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i32
%4 = alloca %struct.sockaddr_in
%5 = alloca %struct.sockaddr_in
%6 = load i32, i32* @INET_ADDRSTRLEN
%7 = zext i32 %6 to i64
%8 = alloca i8, i64 %7
%9 = bitcast i32* %3 to i8*
%10 = bitcast %struct.sockaddr_in* %4 to i8*
%11 = bitcast %struct.sockaddr_in* %5 to i8*
%12 = icmp eq i32 %0, 2
br i1 %12, label %19, label %13
13: ; preds = %2
%14 = load i32, i32* @stderr
%15 = load i8*, i8** %1
%16 = tail call i32 @fprintf(i32 %14, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), i8* %15)
%17 = load i32, i32* @EXIT_FAILURE
%18 = tail call i32 @exit(i32 %17)
unreachable
19: ; preds = %2
%20 = load i32, i32* @AF_INET
%21 = load i32, i32* @SOCK_STREAM
%22 = load i32, i32* @IPPROTO_TCP
%23 = tail call i32 @socket(i32 %20, i32 %21, i32 %22)
%24 = icmp eq i32 %23, -1
br i1 %24, label %25, label %29
25: ; preds = %19
%26 = tail call i32 @perror(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%27 = load i32, i32* @EXIT_FAILURE
%28 = tail call i32 @exit(i32 %27)
unreachable
29: ; preds = %19
%30 = call i32 @memset(%struct.sockaddr_in* %5, i32 0, i32 12)
%31 = load i32, i32* @AF_INET
%32 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %5, i64 0, i32 2
store i32 %31, i32* %32
%33 = getelementptr inbounds i8*, i8** %1, i64 1
%34 = load i8*, i8** %33
%35 = call i32 @atoi(i8* %34)
%36 = call i32 @htons(i32 %35)
%37 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %5, i64 0, i32 0
store i32 %36, i32* %37
%38 = load i32, i32* @INADDR_ANY
%39 = call i32 @htonl(i32 %38)
%40 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %5, i64 0, i32 1, i32 0
store i32 %39, i32* %40
%41 = bitcast %struct.sockaddr_in* %5 to %struct.sockaddr*
%42 = call i32 @bind(i32 %23, %struct.sockaddr* %41, i32 12)
%43 = icmp eq i32 %42, -1
br i1 %43, label %44, label %48
44: ; preds = %29
%45 = call i32 @perror(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
%46 = load i32, i32* @EXIT_FAILURE
%47 = call i32 @exit(i32 %46)
unreachable
48: ; preds = %29
%49 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
store i32 12, i32* %3
%50 = load i32, i32* @SOMAXCONN
%51 = call i32 @listen(i32 %23, i32 %50)
%52 = icmp eq i32 %51, -1
br i1 %52, label %60, label %53
53: ; preds = %48
%54 = bitcast %struct.sockaddr_in* %4 to %struct.sockaddr*
%55 = call i32 @accept(i32 %23, %struct.sockaddr* %54, i32* %3)
%56 = icmp slt i32 %55, 0
br i1 %56, label %64, label %57
57: ; preds = %53
%58 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %4, i64 0, i32 1
%59 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %4, i64 0, i32 0
br label %68
60: ; preds = %48
%61 = call i32 @perror(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0))
%62 = load i32, i32* @EXIT_FAILURE
%63 = call i32 @exit(i32 %62)
unreachable
64: ; preds = %68, %53
%65 = call i32 @perror(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0))
%66 = load i32, i32* @EXIT_FAILURE
%67 = call i32 @exit(i32 %66)
unreachable
68: ; preds = %57, %68
%69 = phi i32 [ %55, %57 ], [ %79, %68 ]
%70 = load i32, i32* @AF_INET
%71 = load i32, i32* @INET_ADDRSTRLEN
%72 = call i32 @inet_ntop(i32 %70, %struct.TYPE_2__* %58, i8* %8, i32 %71)
%73 = load i32, i32* %59
%74 = call i32 @ntohs(i32 %73)
%75 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.7, i64 0, i64 0), i8* %8, i32 %74)
%76 = call i32 @strlen(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%77 = call i32 @send(i32 %69, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %76, i32 0)
%78 = call i32 @close(i32 %69)
%79 = call i32 @accept(i32 %23, %struct.sockaddr* %54, i32* %3)
%80 = icmp slt i32 %79, 0
br i1 %80, label %64, label %68
}