#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 */
typedef int /*<<< orphan*/ tmp;
typedef int /*<<< orphan*/ time_t;
struct TYPE_2__ {
  int /*<<< orphan*/ s_addr;
};
struct sockaddr_in {
  int sin_port;
  TYPE_1__ sin_addr;
  int /*<<< orphan*/ sin_family;
};
struct sockaddr {
  int dummy;
};
typedef int /*<<< orphan*/ serv_add;
typedef int /*<<< orphan*/ buffer;

/* Variables and functions */
int /*<<< orphan*/ AF_INET;
int /*<<< orphan*/ INADDR_ANY;
int /*<<< orphan*/ SOCK_STREAM;
int /*<<< orphan*/ SOL_SOCKET;
int /*<<< orphan*/ SO_REUSEADDR;
int accept(int, struct sockaddr *, int /*<<< orphan*/ *);
scalar_t__ bind(int, struct sockaddr *, int);
int /*<<< orphan*/ close(int);
char *ctime(int /*<<< orphan*/ *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ getpeername(int, struct sockaddr *, unsigned int *);
int /*<<< orphan*/ htonl(int /*<<< orphan*/);
int htons(int const);
char *inet_ntoa(TYPE_1__);
scalar_t__ listen(int, int);
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, int);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *, char *, int);
scalar_t__ setsockopt(int, int /*<<< orphan*/, int /*<<< orphan*/, int *, int);
int /*<<< orphan*/ snprintf(char *, int, char *, char *);
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
scalar_t__ write(int, char *, int /*<<< orphan*/);
int main(int argc, const char *argv[]) {
  const int list_port = 1212;
  int list_fd, conn_fd;
  struct sockaddr_in serv_add;
  char buffer[80];
  time_t timeval;
  if ((list_fd = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
    perror("socket creation error");
    exit(-1);
  }
  memset((void *)&serv_add, 0, sizeof(serv_add));
  serv_add.sin_family = AF_INET;
  serv_add.sin_port = htons(list_port);
  serv_add.sin_addr.s_addr = htonl(INADDR_ANY);
  int yes = 1;
  if (setsockopt(list_fd, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof(int)) < 0) {
    perror("setsockopt");
    exit(-1);
  }
  if (bind(list_fd, (struct sockaddr *)&serv_add, sizeof(serv_add)) < 0) {
    perror("bind error");
    exit(-1);
  }
  if (listen(list_fd, 10) < 0) {
    perror("listen error");
    exit(-1);
  }
  while (1) {
    struct sockaddr_in tmp;
    unsigned int addrlen = sizeof(tmp);
    memset((void *)&tmp, 0, sizeof(tmp));
    if ((conn_fd = accept(list_fd, (struct sockaddr *)NULL, NULL)) < 0) {
      perror("accept error");
      exit(-1);
    }
    getpeername(conn_fd, (struct sockaddr *)&tmp, &addrlen);
    printf("Client IP: %s\nClient port: %d\n", inet_ntoa(tmp.sin_addr),
           tmp.sin_port);
    timeval = time(NULL);
    snprintf(buffer, sizeof(buffer), "%.24s\r\n", ctime(&timeval));
    if (write(conn_fd, buffer, strlen(buffer)) < 0) {
      perror("write error");
      exit(-1);
    }
    close(conn_fd);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x4bc,-0x14(%rbp)
mov    0x2d89(%rip),%rax
mov    (%rax),%edi
mov    0x2d68(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1150 <socket@plt>
mov    %eax,-0x18(%rbp)
cmp    $0x0,%eax
jge    128b <main+0x5b>
lea    0xd84(%rip),%rdi
call   1120 <perror@plt>
mov    $0xffffffff,%edi
call   1140 <exit@plt>
lea    -0x28(%rbp),%rdi
xor    %esi,%esi
mov    $0xc,%edx
call   10d0 <memset@plt>
mov    0x2d3e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x20(%rbp)
mov    $0x4bc,%edi
call   1090 <htons@plt>
mov    %eax,-0x28(%rbp)
mov    0x2d1d(%rip),%rax
mov    (%rax),%edi
call   10c0 <htonl@plt>
mov    %eax,-0x24(%rbp)
movl   $0x1,-0x88(%rbp)
mov    -0x18(%rbp),%edi
mov    0x2d0f(%rip),%rax
mov    (%rax),%esi
mov    0x2cde(%rip),%rax
mov    (%rax),%edx
lea    -0x88(%rbp),%rcx
mov    $0x4,%r8d
call   1030 <setsockopt@plt>
cmp    $0x0,%rax
jge    1316 <main+0xe6>
lea    0xd0f(%rip),%rdi
call   1120 <perror@plt>
mov    $0xffffffff,%edi
call   1140 <exit@plt>
mov    -0x18(%rbp),%edi
lea    -0x28(%rbp),%rsi
mov    $0xc,%edx
call   1110 <bind@plt>
cmp    $0x0,%rax
jge    1347 <main+0x117>
lea    0xce9(%rip),%rdi
call   1120 <perror@plt>
mov    $0xffffffff,%edi
call   1140 <exit@plt>
mov    -0x18(%rbp),%edi
mov    $0xa,%esi
call   1100 <listen@plt>
cmp    $0x0,%rax
jge    1374 <main+0x144>
lea    0xcc7(%rip),%rdi
call   1120 <perror@plt>
mov    $0xffffffff,%edi
call   1140 <exit@plt>
jmp    1379 <main+0x149>
movl   $0xc,-0x9c(%rbp)
lea    -0x98(%rbp),%rdi
xor    %esi,%esi
mov    $0xc,%edx
call   10d0 <memset@plt>
mov    -0x18(%rbp),%edi
xor    %eax,%eax
mov    %eax,%edx
mov    %rdx,%rsi
call   1130 <accept@plt>
mov    %eax,-0x1c(%rbp)
cmp    $0x0,%eax
jge    13c7 <main+0x197>
lea    0xc81(%rip),%rdi
call   1120 <perror@plt>
mov    $0xffffffff,%edi
call   1140 <exit@plt>
mov    -0x1c(%rbp),%edi
lea    -0x98(%rbp),%rsi
lea    -0x9c(%rbp),%rdx
call   1060 <getpeername@plt>
mov    -0x94(%rbp),%edi
call   1050 <inet_ntoa@plt>
mov    %rax,%rsi
mov    -0x98(%rbp),%edx
lea    0xc4e(%rip),%rdi
call   10a0 <printf@plt>
xor    %eax,%eax
mov    %eax,%edi
call   10f0 <time@plt>
mov    %eax,-0x84(%rbp)
lea    -0x80(%rbp),%rax
mov    %rax,-0xb8(%rbp)
lea    -0x84(%rbp),%rdi
call   1070 <ctime@plt>
mov    -0xb8(%rbp),%rdi
mov    %rax,%rcx
mov    $0x50,%esi
lea    0xc2c(%rip),%rdx
call   10b0 <snprintf@plt>
mov    -0x1c(%rbp),%eax
mov    %eax,-0xac(%rbp)
lea    -0x80(%rbp),%rax
mov    %rax,-0xa8(%rbp)
lea    -0x80(%rbp),%rdi
call   1080 <strlen@plt>
mov    -0xac(%rbp),%edi
mov    -0xa8(%rbp),%rsi
mov    %eax,%edx
call   1040 <write@plt>
cmp    $0x0,%rax
jge    148f <main+0x25f>
lea    0xbed(%rip),%rdi
call   1120 <perror@plt>
mov    $0xffffffff,%edi
call   1140 <exit@plt>
mov    -0x1c(%rbp),%edi
call   10e0 <close@plt>
jmp    1379 <main+0x149>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x88,%rsp
mov    0x2d98(%rip),%rbx
mov    (%rbx),%edi
mov    0x2d77(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1150 <socket@plt>
test   %eax,%eax
jns    126a <main+0x3a>
lea    0xd9b(%rip),%rdi
jmp    1421 <main+0x1f1>
mov    %eax,%ebp
lea    0x10(%rsp),%rdi
xor    %esi,%esi
mov    $0xc,%edx
call   10d0 <memset@plt>
mov    (%rbx),%eax
mov    %eax,0x18(%rsp)
mov    $0x4bc,%edi
call   1090 <htons@plt>
mov    %eax,0x10(%rsp)
mov    0x2d40(%rip),%rax
mov    (%rax),%edi
call   10c0 <htonl@plt>
mov    %eax,0x14(%rsp)
movl   $0x1,0x8(%rsp)
mov    0x2d36(%rip),%rax
mov    (%rax),%esi
mov    0x2d05(%rip),%rax
mov    (%rax),%edx
lea    0x8(%rsp),%rcx
mov    %ebp,%edi
mov    $0x4,%r8d
call   1030 <setsockopt@plt>
test   %rax,%rax
jns    12e0 <main+0xb0>
lea    0xd3b(%rip),%rdi
jmp    1421 <main+0x1f1>
lea    0x10(%rsp),%rsi
mov    %ebp,%edi
mov    $0xc,%edx
call   1110 <bind@plt>
test   %rax,%rax
jns    1302 <main+0xd2>
lea    0xd24(%rip),%rdi
jmp    1421 <main+0x1f1>
mov    %ebp,%edi
mov    $0xa,%esi
call   1100 <listen@plt>
test   %rax,%rax
jns    131f <main+0xef>
lea    0xd12(%rip),%rdi
jmp    1421 <main+0x1f1>
movl   $0xc,0x4(%rsp)
lea    0x20(%rsp),%rdi
xor    %esi,%esi
mov    $0xc,%edx
call   10d0 <memset@plt>
mov    %ebp,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1130 <accept@plt>
test   %eax,%eax
js     1411 <main+0x1e1>
mov    %eax,%r15d
lea    0x20(%rsp),%rbx
lea    0xc(%rsp),%r12
lea    0xd06(%rip),%r13
lea    0x30(%rsp),%r14
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r15d,%edi
mov    %rbx,%rsi
lea    0x4(%rsp),%rdx
call   1060 <getpeername@plt>
mov    0x24(%rsp),%edi
call   1050 <inet_ntoa@plt>
mov    0x20(%rsp),%edx
lea    0xcb2(%rip),%rdi
mov    %rax,%rsi
call   10a0 <printf@plt>
xor    %edi,%edi
call   10f0 <time@plt>
mov    %eax,0xc(%rsp)
mov    %r12,%rdi
call   1070 <ctime@plt>
mov    %r14,%rdi
mov    $0x50,%esi
mov    %r13,%rdx
mov    %rax,%rcx
call   10b0 <snprintf@plt>
mov    %r14,%rdi
call   1080 <strlen@plt>
mov    %r15d,%edi
mov    %r14,%rsi
mov    %eax,%edx
call   1040 <write@plt>
test   %rax,%rax
js     141a <main+0x1ea>
mov    %r15d,%edi
call   10e0 <close@plt>
movl   $0xc,0x4(%rsp)
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0xc,%edx
call   10d0 <memset@plt>
mov    %ebp,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1130 <accept@plt>
mov    %eax,%r15d
test   %eax,%eax
jns    1370 <main+0x140>
lea    0xc21(%rip),%rdi
jmp    1421 <main+0x1f1>
lea    0xc4c(%rip),%rdi
call   1120 <perror@plt>
mov    $0xffffffff,%edi
call   1140 <exit@plt>

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"socket creation error\00"
@INADDR_ANY = global i32 0
@SOL_SOCKET = global i32 0
@SO_REUSEADDR = global i32 0
@.str.1 = [11 x i8] c"setsockopt\00"
@.str.2 = [11 x i8] c"bind error\00"
@.str.3 = [13 x i8] c"listen error\00"
@.str.4 = [13 x i8] c"accept error\00"
@.str.5 = [31 x i8] c"Client IP: %s\0AClient port: %d\0A\00"
@.str.6 = [8 x i8] c"%.24s\0D\0A\00"
@.str.7 = [12 x i8] c"write error\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 %struct.sockaddr_in
%10 = alloca [80 x i8]
%11 = alloca i32
%12 = alloca i32
%13 = alloca %struct.sockaddr_in
%14 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 1212, i32* %6
%15 = load i32, i32* @AF_INET
%16 = load i32, i32* @SOCK_STREAM
%17 = call i32 @socket(i32 %15, i32 %16, i32 0)
store i32 %17, i32* %7
%18 = icmp slt i32 %17, 0
br i1 %18, label %19, label %22
19: ; preds = %2
%20 = call i32 @perror(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%21 = call i32 @exit(i32 -1)
unreachable
22: ; preds = %2
%23 = bitcast %struct.sockaddr_in* %9 to i8*
%24 = call i32 @memset(i8* %23, i32 0, i32 12)
%25 = load i32, i32* @AF_INET
%26 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %9, i32 0, i32 2
store i32 %25, i32* %26
%27 = call i32 @htons(i32 1212)
%28 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %9, i32 0, i32 0
store i32 %27, i32* %28
%29 = load i32, i32* @INADDR_ANY
%30 = call i32 @htonl(i32 %29)
%31 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %9, i32 0, i32 1
%32 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %31, i32 0, i32 0
store i32 %30, i32* %32
store i32 1, i32* %12
%33 = load i32, i32* %7
%34 = load i32, i32* @SOL_SOCKET
%35 = load i32, i32* @SO_REUSEADDR
%36 = call i64 @setsockopt(i32 %33, i32 %34, i32 %35, i32* %12, i32 4)
%37 = icmp slt i64 %36, 0
br i1 %37, label %38, label %41
38: ; preds = %22
%39 = call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%40 = call i32 @exit(i32 -1)
unreachable
41: ; preds = %22
%42 = load i32, i32* %7
%43 = bitcast %struct.sockaddr_in* %9 to %struct.sockaddr*
%44 = call i64 @bind(i32 %42, %struct.sockaddr* %43, i32 12)
%45 = icmp slt i64 %44, 0
br i1 %45, label %46, label %49
46: ; preds = %41
%47 = call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%48 = call i32 @exit(i32 -1)
unreachable
49: ; preds = %41
%50 = load i32, i32* %7
%51 = call i64 @listen(i32 %50, i32 10)
%52 = icmp slt i64 %51, 0
br i1 %52, label %53, label %56
53: ; preds = %49
%54 = call i32 @perror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0))
%55 = call i32 @exit(i32 -1)
unreachable
56: ; preds = %49
br label %57
57: ; preds = %56, %90
store i32 12, i32* %14
%58 = bitcast %struct.sockaddr_in* %13 to i8*
%59 = call i32 @memset(i8* %58, i32 0, i32 12)
%60 = load i32, i32* %7
%61 = call i32 @accept(i32 %60, %struct.sockaddr* null, i32* null)
store i32 %61, i32* %8
%62 = icmp slt i32 %61, 0
br i1 %62, label %63, label %66
63: ; preds = %57
%64 = call i32 @perror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
%65 = call i32 @exit(i32 -1)
unreachable
66: ; preds = %57
%67 = load i32, i32* %8
%68 = bitcast %struct.sockaddr_in* %13 to %struct.sockaddr*
%69 = call i32 @getpeername(i32 %67, %struct.sockaddr* %68, i32* %14)
%70 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %13, i32 0, i32 1
%71 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %70, i32 0, i32 0
%72 = load i32, i32* %71
%73 = call i8* @inet_ntoa(i32 %72)
%74 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %13, i32 0, i32 0
%75 = load i32, i32* %74
%76 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.5, i64 0, i64 0), i8* %73, i32 %75)
%77 = call i32 @time(i32* null)
store i32 %77, i32* %11
%78 = getelementptr inbounds [80 x i8], [80 x i8]* %10, i64 0, i64 0
%79 = call i8* @ctime(i32* %11)
%80 = call i32 @snprintf(i8* %78, i32 80, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), i8* %79)
%81 = load i32, i32* %8
%82 = getelementptr inbounds [80 x i8], [80 x i8]* %10, i64 0, i64 0
%83 = getelementptr inbounds [80 x i8], [80 x i8]* %10, i64 0, i64 0
%84 = call i32 @strlen(i8* %83)
%85 = call i64 @write(i32 %81, i8* %82, i32 %84)
%86 = icmp slt i64 %85, 0
br i1 %86, label %87, label %90
87: ; preds = %66
%88 = call i32 @perror(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0))
%89 = call i32 @exit(i32 -1)
unreachable
90: ; preds = %66
%91 = load i32, i32* %8
%92 = call i32 @close(i32 %91)
br label %57
}

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"socket creation error\00"
@INADDR_ANY = global i32 0
@SOL_SOCKET = global i32 0
@SO_REUSEADDR = global i32 0
@.str.1 = [11 x i8] c"setsockopt\00"
@.str.2 = [11 x i8] c"bind error\00"
@.str.3 = [13 x i8] c"listen error\00"
@.str.4 = [13 x i8] c"accept error\00"
@.str.5 = [31 x i8] c"Client IP: %s\0AClient port: %d\0A\00"
@.str.6 = [8 x i8] c"%.24s\0D\0A\00"
@.str.7 = [12 x i8] c"write error\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca %struct.sockaddr_in
%4 = alloca [80 x i8]
%5 = alloca i32
%6 = alloca i32
%7 = alloca %struct.sockaddr_in
%8 = alloca i32
%9 = bitcast %struct.sockaddr_in* %3 to i8*
%10 = getelementptr inbounds [80 x i8], [80 x i8]* %4, i64 0, i64 0
%11 = bitcast i32* %5 to i8*
%12 = load i32, i32* @AF_INET
%13 = load i32, i32* @SOCK_STREAM
%14 = tail call i32 @socket(i32 %12, i32 %13, i32 0)
%15 = icmp slt i32 %14, 0
br i1 %15, label %16, label %19
16: ; preds = %2
%17 = tail call i32 @perror(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%18 = tail call i32 @exit(i32 -1)
unreachable
19: ; preds = %2
%20 = call i32 @memset(i8* %9, i32 0, i32 12)
%21 = load i32, i32* @AF_INET
%22 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %3, i64 0, i32 2
store i32 %21, i32* %22
%23 = call i32 @htons(i32 1212)
%24 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %3, i64 0, i32 0
store i32 %23, i32* %24
%25 = load i32, i32* @INADDR_ANY
%26 = call i32 @htonl(i32 %25)
%27 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %3, i64 0, i32 1, i32 0
store i32 %26, i32* %27
%28 = bitcast i32* %6 to i8*
store i32 1, i32* %6
%29 = load i32, i32* @SOL_SOCKET
%30 = load i32, i32* @SO_REUSEADDR
%31 = call i64 @setsockopt(i32 %14, i32 %29, i32 %30, i32* %6, i32 4)
%32 = icmp slt i64 %31, 0
br i1 %32, label %33, label %36
33: ; preds = %19
%34 = call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%35 = call i32 @exit(i32 -1)
unreachable
36: ; preds = %19
%37 = bitcast %struct.sockaddr_in* %3 to %struct.sockaddr*
%38 = call i64 @bind(i32 %14, %struct.sockaddr* %37, i32 12)
%39 = icmp slt i64 %38, 0
br i1 %39, label %40, label %43
40: ; preds = %36
%41 = call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%42 = call i32 @exit(i32 -1)
unreachable
43: ; preds = %36
%44 = call i64 @listen(i32 %14, i32 10)
%45 = icmp slt i64 %44, 0
br i1 %45, label %56, label %46
46: ; preds = %43
%47 = bitcast %struct.sockaddr_in* %7 to i8*
%48 = bitcast i32* %8 to i8*
store i32 12, i32* %8
%49 = call i32 @memset(i8* %47, i32 0, i32 12)
%50 = call i32 @accept(i32 %14, %struct.sockaddr* null, i32* null)
%51 = icmp slt i32 %50, 0
br i1 %51, label %59, label %52
52: ; preds = %46
%53 = bitcast %struct.sockaddr_in* %7 to %struct.sockaddr*
%54 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %7, i64 0, i32 1, i32 0
%55 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %7, i64 0, i32 0
br label %62
56: ; preds = %43
%57 = call i32 @perror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0))
%58 = call i32 @exit(i32 -1)
unreachable
59: ; preds = %78, %46
%60 = call i32 @perror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
%61 = call i32 @exit(i32 -1)
unreachable
62: ; preds = %52, %78
%63 = phi i32 [ %50, %52 ], [ %81, %78 ]
%64 = call i32 @getpeername(i32 %63, %struct.sockaddr* %53, i32* %8)
%65 = load i32, i32* %54
%66 = call i8* @inet_ntoa(i32 %65)
%67 = load i32, i32* %55
%68 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.5, i64 0, i64 0), i8* %66, i32 %67)
%69 = call i32 @time(i32* null)
store i32 %69, i32* %5
%70 = call i8* @ctime(i32* %5)
%71 = call i32 @snprintf(i8* %10, i32 80, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), i8* %70)
%72 = call i32 @strlen(i8* %10)
%73 = call i64 @write(i32 %63, i8* %10, i32 %72)
%74 = icmp slt i64 %73, 0
br i1 %74, label %75, label %78
75: ; preds = %62
%76 = call i32 @perror(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0))
%77 = call i32 @exit(i32 -1)
unreachable
78: ; preds = %62
%79 = call i32 @close(i32 %63)
store i32 12, i32* %8
%80 = call i32 @memset(i8* %47, i32 0, i32 12)
%81 = call i32 @accept(i32 %14, %struct.sockaddr* null, i32* null)
%82 = icmp slt i32 %81, 0
br i1 %82, label %59, label %62
}