#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__ {
  scalar_t__ s_addr;
};
struct sockaddr_in {
  int /*<<< orphan*/ sin_port;
  TYPE_1__ sin_addr;
  int /*<<< orphan*/ sin_zero;
  int /*<<< orphan*/ sin_family;
};
struct sockaddr {
  int dummy;
};
typedef int socklen_t;

/* Variables and functions */
int /*<<< orphan*/ AF_INET;
int /*<<< orphan*/ PF_INET;
int /*<<< orphan*/ SOCK_STREAM;
int /*<<< orphan*/ SOL_SOCKET;
int /*<<< orphan*/ SO_REUSEADDR;
int accept(int, struct sockaddr *, int *);
int bind(int, struct sockaddr *, int);
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ dump(char *, int);
int /*<<< orphan*/ fatal(char *);
int /*<<< orphan*/ htons(int);
char *inet_ntoa(TYPE_1__);
int listen(int, int);
int /*<<< orphan*/ memset(int /*<<< orphan*/ *, char, int);
int ntohs(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int recv(int, char **, int, int /*<<< orphan*/);
int /*<<< orphan*/ send(int, char *, int, int /*<<< orphan*/);
int setsockopt(int, int /*<<< orphan*/, int /*<<< orphan*/, int *, int);
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int main() {
  int sockfd, new_sockfd;
  struct sockaddr_in host_addr, client_addr;
  socklen_t sin_size;
  int recv_length = 1, yes = 1;
  char buffer[1024];
  if ((sockfd = socket(PF_INET, SOCK_STREAM, 0)) == -1)
    fatal("in socket");
  if (setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof(int)) == -1)
    fatal("setting socket option SO_REUSEADDR");
  host_addr.sin_family = AF_INET;
  host_addr.sin_port = htons(7890);
  host_addr.sin_addr.s_addr = 0;
  memset(&(host_addr.sin_zero), '\0', 8);
  if (bind(sockfd, (struct sockaddr *)&host_addr, sizeof(struct sockaddr)) ==
      -1)
    fatal("binding to socket");
  if (listen(sockfd, 5) == -1)
    fatal("listening on socket");
  while (1) {
    sin_size = sizeof(struct sockaddr_in);
    new_sockfd = accept(sockfd, (struct sockaddr *)&client_addr, &sin_size);
    if (new_sockfd == -1)
      fatal("accepting connection");
    printf("Server got connection from %s port %d.\n",
           inet_ntoa(client_addr.sin_addr), ntohs(client_addr.sin_port));
    send(new_sockfd, "Hello World!\n", 13, 0);
    recv_length = recv(new_sockfd, &buffer, 1024, 0);
    while (recv_length > 0) {
      printf("RECV : %d bytes\n", recv_length);
      dump(buffer, recv_length);
      recv_length = recv(new_sockfd, &buffer, 1024, 0);
    }
    printf("Disconnecting from %s port %d.\n", inet_ntoa(client_addr.sin_addr),
           ntohs(client_addr.sin_port));
    close(new_sockfd);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x460,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x48(%rbp)
movl   $0x1,-0x4c(%rbp)
mov    0x2db1(%rip),%rax
mov    (%rax),%edi
mov    0x2db0(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1110 <socket@plt>
mov    %eax,-0x8(%rbp)
cmp    $0xffffffff,%eax
jne    1241 <main+0x51>
lea    0xdc4(%rip),%rdi
call   1100 <fatal@plt>
mov    -0x8(%rbp),%edi
mov    0x2d9d(%rip),%rax
mov    (%rax),%esi
mov    0x2d6c(%rip),%rax
mov    (%rax),%edx
lea    -0x4c(%rbp),%rcx
mov    $0x4,%r8d
call   1040 <setsockopt@plt>
cmp    $0xffffffff,%eax
jne    127a <main+0x8a>
lea    0xd95(%rip),%rdi
call   1100 <fatal@plt>
mov    0x2d5f(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    $0x1ed2,%edi
call   1060 <htons@plt>
mov    %eax,-0x28(%rbp)
movq   $0x0,-0x20(%rbp)
lea    -0x28(%rbp),%rdi
add    $0x10,%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1090 <memset@plt>
mov    -0x8(%rbp),%edi
lea    -0x28(%rbp),%rsi
mov    $0x4,%edx
call   10e0 <bind@plt>
cmp    $0xffffffff,%eax
jne    12d5 <main+0xe5>
lea    0xd5d(%rip),%rdi
call   1100 <fatal@plt>
mov    -0x8(%rbp),%edi
mov    $0x5,%esi
call   10c0 <listen@plt>
cmp    $0xffffffff,%eax
jne    12f7 <main+0x107>
lea    0xd4d(%rip),%rdi
call   1100 <fatal@plt>
jmp    12fc <main+0x10c>
movl   $0x18,-0x44(%rbp)
mov    -0x8(%rbp),%edi
lea    -0x40(%rbp),%rsi
lea    -0x44(%rbp),%rdx
call   10f0 <accept@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0xffffffff,-0xc(%rbp)
jne    132c <main+0x13c>
lea    0xd2c(%rip),%rdi
call   1100 <fatal@plt>
mov    -0x38(%rbp),%rdi
call   1050 <inet_ntoa@plt>
mov    %rax,-0x458(%rbp)
mov    -0x40(%rbp),%edi
call   10d0 <ntohs@plt>
mov    -0x458(%rbp),%rsi
mov    %eax,%edx
lea    0xd14(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
mov    -0xc(%rbp),%edi
lea    0xd2b(%rip),%rsi
mov    $0xd,%edx
xor    %ecx,%ecx
call   1070 <send@plt>
mov    -0xc(%rbp),%edi
lea    -0x450(%rbp),%rsi
mov    $0x400,%edx
xor    %ecx,%ecx
call   1030 <recv@plt>
mov    %eax,-0x48(%rbp)
cmpl   $0x0,-0x48(%rbp)
jle    13d2 <main+0x1e2>
mov    -0x48(%rbp),%esi
lea    0xd00(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
lea    -0x450(%rbp),%rdi
mov    -0x48(%rbp),%esi
call   10b0 <dump@plt>
mov    -0xc(%rbp),%edi
lea    -0x450(%rbp),%rsi
mov    $0x400,%edx
xor    %ecx,%ecx
call   1030 <recv@plt>
mov    %eax,-0x48(%rbp)
jmp    138a <main+0x19a>
mov    -0x38(%rbp),%rdi
call   1050 <inet_ntoa@plt>
mov    %rax,-0x460(%rbp)
mov    -0x40(%rbp),%edi
call   10d0 <ntohs@plt>
mov    -0x460(%rbp),%rsi
mov    %eax,%edx
lea    0xcb5(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
mov    -0xc(%rbp),%edi
call   10a0 <close@plt>
jmp    12fc <main+0x10c>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x448,%rsp
movl   $0x1,0x8(%rsp)
mov    0x2db8(%rip),%rax
mov    (%rax),%edi
mov    0x2db7(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1110 <socket@plt>
mov    %eax,%ebx
cmp    $0xffffffff,%eax
jne    1235 <main+0x45>
lea    0xdd0(%rip),%rdi
call   1100 <fatal@plt>
mov    0x2dac(%rip),%rax
mov    (%rax),%esi
mov    0x2d7b(%rip),%rax
mov    (%rax),%edx
lea    0x8(%rsp),%rcx
mov    %ebx,%edi
mov    $0x4,%r8d
call   1040 <setsockopt@plt>
cmp    $0xffffffff,%eax
jne    126a <main+0x7a>
lea    0xda5(%rip),%rdi
call   1100 <fatal@plt>
mov    0x2d6f(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x3c(%rsp)
mov    $0x1ed2,%edi
call   1060 <htons@plt>
mov    %eax,0x28(%rsp)
movq   $0x0,0x30(%rsp)
lea    0x38(%rsp),%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1090 <memset@plt>
lea    0x28(%rsp),%rsi
mov    %ebx,%edi
mov    $0x4,%edx
call   10e0 <bind@plt>
cmp    $0xffffffff,%eax
jne    12c1 <main+0xd1>
lea    0xd71(%rip),%rdi
call   1100 <fatal@plt>
mov    %ebx,%edi
mov    $0x5,%esi
call   10c0 <listen@plt>
cmp    $0xffffffff,%eax
jne    12de <main+0xee>
lea    0xd66(%rip),%rdi
call   1100 <fatal@plt>
lea    0x40(%rsp),%r12
lea    0xdb4(%rip),%r14
lea    0xdbe(%rip),%r15
jmp    132d <main+0x13d>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    0x18(%rsp),%rdi
call   1050 <inet_ntoa@plt>
mov    %rax,%rbp
mov    0x10(%rsp),%edi
call   10d0 <ntohs@plt>
mov    %r15,%rdi
mov    %rbp,%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1080 <printf@plt>
mov    %r13d,%edi
call   10a0 <close@plt>
movl   $0x18,0xc(%rsp)
mov    %ebx,%edi
lea    0x10(%rsp),%rsi
lea    0xc(%rsp),%rdx
call   10f0 <accept@plt>
mov    %eax,%r13d
cmp    $0xffffffff,%eax
jne    135a <main+0x16a>
lea    0xcfe(%rip),%rdi
call   1100 <fatal@plt>
mov    0x18(%rsp),%rdi
call   1050 <inet_ntoa@plt>
mov    %rax,%rbp
mov    0x10(%rsp),%edi
call   10d0 <ntohs@plt>
lea    0xcf1(%rip),%rdi
mov    %rbp,%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1080 <printf@plt>
mov    %r13d,%edi
lea    0xd03(%rip),%rsi
mov    $0xd,%edx
xor    %ecx,%ecx
call   1070 <send@plt>
mov    %r13d,%edi
mov    %r12,%rsi
mov    $0x400,%edx
xor    %ecx,%ecx
call   1030 <recv@plt>
test   %eax,%eax
jle    1300 <main+0x110>
mov    %eax,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r14,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1080 <printf@plt>
mov    %r12,%rdi
mov    %ebp,%esi
call   10b0 <dump@plt>
mov    %r13d,%edi
mov    %r12,%rsi
mov    $0x400,%edx
xor    %ecx,%ecx
call   1030 <recv@plt>
mov    %eax,%ebp
test   %eax,%eax
jg     13c0 <main+0x1d0>
jmp    1300 <main+0x110>

LLVM IR (-O0):
%struct.sockaddr_in = type { i32, %struct.TYPE_2__, i32, i32 }
%struct.TYPE_2__ = type { i64 }
%struct.sockaddr = type { i32 }
@PF_INET = global i32 0
@SOCK_STREAM = global i32 0
@.str = [10 x i8] c"in socket\00"
@SOL_SOCKET = global i32 0
@SO_REUSEADDR = global i32 0
@.str.1 = [35 x i8] c"setting socket option SO_REUSEADDR\00"
@AF_INET = global i32 0
@.str.2 = [18 x i8] c"binding to socket\00"
@.str.3 = [20 x i8] c"listening on socket\00"
@.str.4 = [21 x i8] c"accepting connection\00"
@.str.5 = [40 x i8] c"Server got connection from %s port %d.\0A\00"
@.str.6 = [14 x i8] c"Hello World!\0A\00"
@.str.7 = [17 x i8] c"RECV : %d bytes\0A\00"
@.str.8 = [32 x i8] c"Disconnecting from %s port %d.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca %struct.sockaddr_in
%5 = alloca %struct.sockaddr_in
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca [1024 x i8]
store i32 0, i32* %1
store i32 1, i32* %7
store i32 1, i32* %8
%10 = load i32, i32* @PF_INET
%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 %16
14: ; preds = %0
%15 = call i32 @fatal(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
br label %16
16: ; preds = %14, %0
%17 = load i32, i32* %2
%18 = load i32, i32* @SOL_SOCKET
%19 = load i32, i32* @SO_REUSEADDR
%20 = call i32 @setsockopt(i32 %17, i32 %18, i32 %19, i32* %8, i32 4)
%21 = icmp eq i32 %20, -1
br i1 %21, label %22, label %24
22: ; preds = %16
%23 = call i32 @fatal(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0))
br label %24
24: ; preds = %22, %16
%25 = load i32, i32* @AF_INET
%26 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %4, i32 0, i32 3
store i32 %25, i32* %26
%27 = call i32 @htons(i32 7890)
%28 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %4, i32 0, i32 0
store i32 %27, i32* %28
%29 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %4, i32 0, i32 1
%30 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %29, i32 0, i32 0
store i64 0, i64* %30
%31 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %4, i32 0, i32 2
%32 = call i32 @memset(i32* %31, i8 signext 0, i32 8)
%33 = load i32, i32* %2
%34 = bitcast %struct.sockaddr_in* %4 to %struct.sockaddr*
%35 = call i32 @bind(i32 %33, %struct.sockaddr* %34, i32 4)
%36 = icmp eq i32 %35, -1
br i1 %36, label %37, label %39
37: ; preds = %24
%38 = call i32 @fatal(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
br label %39
39: ; preds = %37, %24
%40 = load i32, i32* %2
%41 = call i32 @listen(i32 %40, i32 5)
%42 = icmp eq i32 %41, -1
br i1 %42, label %43, label %45
43: ; preds = %39
%44 = call i32 @fatal(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0))
br label %45
45: ; preds = %43, %39
br label %46
46: ; preds = %45, %80
store i32 24, i32* %6
%47 = load i32, i32* %2
%48 = bitcast %struct.sockaddr_in* %5 to %struct.sockaddr*
%49 = call i32 @accept(i32 %47, %struct.sockaddr* %48, i32* %6)
store i32 %49, i32* %3
%50 = load i32, i32* %3
%51 = icmp eq i32 %50, -1
br i1 %51, label %52, label %54
52: ; preds = %46
%53 = call i32 @fatal(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0))
br label %54
54: ; preds = %52, %46
%55 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %5, i32 0, i32 1
%56 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %55, i32 0, i32 0
%57 = load i64, i64* %56
%58 = call i8* @inet_ntoa(i64 %57)
%59 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %5, i32 0, i32 0
%60 = load i32, i32* %59
%61 = call i32 @ntohs(i32 %60)
%62 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.5, i64 0, i64 0), i8* %58, i32 %61)
%63 = load i32, i32* %3
%64 = call i32 @send(i32 %63, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), i32 13, i32 0)
%65 = load i32, i32* %3
%66 = bitcast [1024 x i8]* %9 to i8**
%67 = call i32 @recv(i32 %65, i8** %66, i32 1024, i32 0)
store i32 %67, i32* %7
br label %68
68: ; preds = %71, %54
%69 = load i32, i32* %7
%70 = icmp sgt i32 %69, 0
br i1 %70, label %71, label %80
71: ; preds = %68
%72 = load i32, i32* %7
%73 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0), i32 %72)
%74 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%75 = load i32, i32* %7
%76 = call i32 @dump(i8* %74, i32 %75)
%77 = load i32, i32* %3
%78 = bitcast [1024 x i8]* %9 to i8**
%79 = call i32 @recv(i32 %77, i8** %78, i32 1024, i32 0)
store i32 %79, i32* %7
br label %68
80: ; preds = %68
%81 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %5, i32 0, i32 1
%82 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %81, i32 0, i32 0
%83 = load i64, i64* %82
%84 = call i8* @inet_ntoa(i64 %83)
%85 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %5, i32 0, i32 0
%86 = load i32, i32* %85
%87 = call i32 @ntohs(i32 %86)
%88 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.8, i64 0, i64 0), i8* %84, i32 %87)
%89 = load i32, i32* %3
%90 = call i32 @close(i32 %89)
br label %46
}

LLVM IR (-O2):
%struct.sockaddr_in = type { i32, %struct.TYPE_2__, i32, i32 }
%struct.TYPE_2__ = type { i64 }
%struct.sockaddr = type { i32 }
@PF_INET = global i32 0
@SOCK_STREAM = global i32 0
@.str = [10 x i8] c"in socket\00"
@SOL_SOCKET = global i32 0
@SO_REUSEADDR = global i32 0
@.str.1 = [35 x i8] c"setting socket option SO_REUSEADDR\00"
@AF_INET = global i32 0
@.str.2 = [18 x i8] c"binding to socket\00"
@.str.3 = [20 x i8] c"listening on socket\00"
@.str.4 = [21 x i8] c"accepting connection\00"
@.str.5 = [40 x i8] c"Server got connection from %s port %d.\0A\00"
@.str.6 = [14 x i8] c"Hello World!\0A\00"
@.str.7 = [17 x i8] c"RECV : %d bytes\0A\00"
@.str.8 = [32 x i8] c"Disconnecting from %s port %d.\0A\00"
define i32 @main() {
%1 = alloca %struct.sockaddr_in
%2 = alloca %struct.sockaddr_in
%3 = alloca i32
%4 = alloca i32
%5 = alloca [1024 x i8]
%6 = bitcast %struct.sockaddr_in* %1 to i8*
%7 = bitcast %struct.sockaddr_in* %2 to i8*
%8 = bitcast i32* %3 to i8*
%9 = bitcast i32* %4 to i8*
store i32 1, i32* %4
%10 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%11 = load i32, i32* @PF_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 %17
15: ; preds = %0
%16 = tail call i32 @fatal(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
br label %17
17: ; preds = %15, %0
%18 = load i32, i32* @SOL_SOCKET
%19 = load i32, i32* @SO_REUSEADDR
%20 = call i32 @setsockopt(i32 %13, i32 %18, i32 %19, i32* %4, i32 4)
%21 = icmp eq i32 %20, -1
br i1 %21, label %22, label %24
22: ; preds = %17
%23 = call i32 @fatal(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0))
br label %24
24: ; preds = %22, %17
%25 = load i32, i32* @AF_INET
%26 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %1, i64 0, i32 3
store i32 %25, i32* %26
%27 = call i32 @htons(i32 7890)
%28 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %1, i64 0, i32 0
store i32 %27, i32* %28
%29 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %1, i64 0, i32 1, i32 0
store i64 0, i64* %29
%30 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %1, i64 0, i32 2
%31 = call i32 @memset(i32* %30, i8 signext 0, i32 8)
%32 = bitcast %struct.sockaddr_in* %1 to %struct.sockaddr*
%33 = call i32 @bind(i32 %13, %struct.sockaddr* %32, i32 4)
%34 = icmp eq i32 %33, -1
br i1 %34, label %35, label %37
35: ; preds = %24
%36 = call i32 @fatal(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
br label %37
37: ; preds = %35, %24
%38 = call i32 @listen(i32 %13, i32 5)
%39 = icmp eq i32 %38, -1
br i1 %39, label %40, label %42
40: ; preds = %37
%41 = call i32 @fatal(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0))
br label %42
42: ; preds = %40, %37
%43 = bitcast %struct.sockaddr_in* %2 to %struct.sockaddr*
%44 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %2, i64 0, i32 1, i32 0
%45 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %2, i64 0, i32 0
%46 = bitcast [1024 x i8]* %5 to i8**
br label %47
47: ; preds = %67, %42
store i32 24, i32* %3
%48 = call i32 @accept(i32 %13, %struct.sockaddr* %43, i32* %3)
%49 = icmp eq i32 %48, -1
br i1 %49, label %50, label %52
50: ; preds = %47
%51 = call i32 @fatal(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0))
br label %52
52: ; preds = %50, %47
%53 = load i64, i64* %44
%54 = call i8* @inet_ntoa(i64 %53)
%55 = load i32, i32* %45
%56 = call i32 @ntohs(i32 %55)
%57 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.5, i64 0, i64 0), i8* %54, i32 %56)
%58 = call i32 @send(i32 %48, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), i32 13, i32 0)
%59 = call i32 @recv(i32 %48, i8** %46, i32 1024, i32 0)
%60 = icmp sgt i32 %59, 0
br i1 %60, label %61, label %67
61: ; preds = %52, %61
%62 = phi i32 [ %65, %61 ], [ %59, %52 ]
%63 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0), i32 %62)
%64 = call i32 @dump(i8* %10, i32 %62)
%65 = call i32 @recv(i32 %48, i8** %46, i32 1024, i32 0)
%66 = icmp sgt i32 %65, 0
br i1 %66, label %61, label %67
67: ; preds = %61, %52
%68 = load i64, i64* %44
%69 = call i8* @inet_ntoa(i64 %68)
%70 = load i32, i32* %45
%71 = call i32 @ntohs(i32 %70)
%72 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.8, i64 0, i64 0), i8* %69, i32 %71)
%73 = call i32 @close(i32 %48)
br label %47
}