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

/* Variables and functions */
int /*<<< orphan*/ AF_INET;
int /*<<< orphan*/ INADDR_ANY;
int /*<<< orphan*/ SOCK_STREAM;
int accept(int, struct sockaddr *, int *);
int bind(int, struct sockaddr *, int);
int /*<<< orphan*/ bzero(struct sockaddr_in *, int);
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ htonl(int /*<<< orphan*/);
int /*<<< orphan*/ htons(int);
char *inet_ntoa(TYPE_1__);
int listen(int, int);
int /*<<< orphan*/ memset(char *, char, int);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *, char *, ...);
int /*<<< orphan*/ puts(char *);
int read(int, char *, int);
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
scalar_t__ strcmp(char *, char *);
int main(void) {
  int sockfd, cli_fd;
  char buffer[80];
  struct sockaddr_in server_addr;
  struct sockaddr_in client_addr;
  if ((sockfd = socket(AF_INET, SOCK_STREAM, 0)) == -1) {
    perror("create socket error");
    return 1;
  }
  puts("create socket done!");
  bzero(&server_addr, sizeof(struct sockaddr_in));
  server_addr.sin_family = AF_INET;
  server_addr.sin_addr.s_addr = htonl(INADDR_ANY);
  server_addr.sin_port = htons(8888);
  if (bind(sockfd, (struct sockaddr *)&server_addr, sizeof(struct sockaddr)) ==
      -1) {
    perror("bind socket error");
    return 2;
  }
  puts("bind socket done!");
  if (listen(sockfd, 5) == -1) {
    perror("set the server max connect error");
    return 3;
  }
  puts("set the server max connect done!");
  puts("wait for connect");
  while (1) {
    int sock_size = sizeof(struct sockaddr);
    if ((cli_fd = accept(sockfd, (struct sockaddr *)&client_addr,
                         &sock_size)) == -1) {
      perror("accept client error");
      return 4;
    }
    printf("server get connection form %s\n", inet_ntoa(client_addr.sin_addr));
    memset(buffer, '\0', sizeof(buffer));
    if (read(cli_fd, buffer, sizeof(buffer)) == -1) {
      perror("read data from client error");
      return 5;
    }
    if (strcmp(buffer, "exit") == 0) {
      close(cli_fd);
    }
    printf("server receive data from %s is: %s",
           inet_ntoa(client_addr.sin_addr), buffer);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2ddf(%rip),%rax
mov    (%rax),%edi
mov    0x2dbe(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1110 <socket@plt>
mov    %eax,-0x8(%rbp)
cmp    $0xffffffff,%eax
jne    123f <main+0x4f>
lea    0xdd2(%rip),%rdi
call   10e0 <perror@plt>
movl   $0x1,-0x4(%rbp)
jmp    13e7 <main+0x1f7>
lea    0xdce(%rip),%rdi
call   1030 <puts@plt>
lea    -0x70(%rbp),%rdi
mov    $0xc,%esi
call   10f0 <bzero@plt>
mov    0x2d88(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x68(%rbp)
mov    0x2d74(%rip),%rax
mov    (%rax),%edi
call   1070 <htonl@plt>
mov    %eax,-0x70(%rbp)
mov    $0x22b8,%edi
call   1050 <htons@plt>
mov    %eax,-0x6c(%rbp)
mov    -0x8(%rbp),%edi
lea    -0x70(%rbp),%rsi
mov    $0x4,%edx
call   10d0 <bind@plt>
cmp    $0xffffffff,%eax
jne    12b5 <main+0xc5>
lea    0xd84(%rip),%rdi
call   10e0 <perror@plt>
movl   $0x2,-0x4(%rbp)
jmp    13e7 <main+0x1f7>
lea    0xd7e(%rip),%rdi
call   1030 <puts@plt>
mov    -0x8(%rbp),%edi
mov    $0x5,%esi
call   10c0 <listen@plt>
cmp    $0xffffffff,%eax
jne    12ef <main+0xff>
lea    0xd6e(%rip),%rdi
call   10e0 <perror@plt>
movl   $0x3,-0x4(%rbp)
jmp    13e7 <main+0x1f7>
lea    0xd77(%rip),%rdi
call   1030 <puts@plt>
lea    0xd8c(%rip),%rdi
call   1030 <puts@plt>
movl   $0x4,-0x84(%rbp)
mov    -0x8(%rbp),%edi
lea    -0x80(%rbp),%rsi
lea    -0x84(%rbp),%rdx
call   1100 <accept@plt>
mov    %eax,-0xc(%rbp)
cmp    $0xffffffff,%eax
jne    1348 <main+0x158>
lea    0xd68(%rip),%rdi
call   10e0 <perror@plt>
movl   $0x4,-0x4(%rbp)
jmp    13e7 <main+0x1f7>
mov    -0x80(%rbp),%edi
call   1040 <inet_ntoa@plt>
mov    %rax,%rsi
lea    0xd59(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    -0x60(%rbp),%rdi
xor    %esi,%esi
mov    $0x50,%edx
call   1080 <memset@plt>
mov    -0xc(%rbp),%edi
lea    -0x60(%rbp),%rsi
mov    $0x50,%edx
call   10a0 <read@plt>
cmp    $0xffffffff,%eax
jne    13a3 <main+0x1b3>
lea    0xd40(%rip),%rdi
call   10e0 <perror@plt>
movl   $0x5,-0x4(%rbp)
jmp    13e7 <main+0x1f7>
lea    -0x60(%rbp),%rdi
lea    0xd40(%rip),%rsi
call   10b0 <strcmp@plt>
cmp    $0x0,%rax
jne    13c5 <main+0x1d5>
mov    -0xc(%rbp),%edi
call   1090 <close@plt>
mov    -0x80(%rbp),%edi
call   1040 <inet_ntoa@plt>
mov    %rax,%rsi
lea    -0x60(%rbp),%rdx
lea    0xd18(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    1307 <main+0x117>
mov    -0x4(%rbp),%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x88,%rsp
mov    0x2de0(%rip),%rbp
mov    0x0(%rbp),%edi
mov    0x2dbe(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1110 <socket@plt>
cmp    $0xffffffff,%eax
jne    1236 <main+0x46>
lea    0xdd9(%rip),%rdi
call   10e0 <perror@plt>
mov    $0x1,%ebp
jmp    13f8 <main+0x208>
mov    %eax,%ebx
lea    0xdd5(%rip),%rdi
call   1030 <puts@plt>
lea    0x20(%rsp),%r14
mov    %r14,%rdi
mov    $0xc,%esi
call   10f0 <bzero@plt>
mov    0x0(%rbp),%eax
mov    %eax,0x28(%rsp)
mov    0x2d7c(%rip),%rax
mov    (%rax),%edi
call   1070 <htonl@plt>
mov    %eax,0x20(%rsp)
mov    $0x22b8,%edi
call   1050 <htons@plt>
mov    %eax,0x24(%rsp)
mov    %ebx,%edi
mov    %r14,%rsi
mov    $0x4,%edx
call   10d0 <bind@plt>
cmp    $0xffffffff,%eax
jne    12a7 <main+0xb7>
lea    0xd90(%rip),%rdi
call   10e0 <perror@plt>
mov    $0x2,%ebp
jmp    13f8 <main+0x208>
lea    0xd8c(%rip),%rdi
call   1030 <puts@plt>
mov    %ebx,%edi
mov    $0x5,%esi
call   10c0 <listen@plt>
cmp    $0xffffffff,%eax
jne    12da <main+0xea>
lea    0xd81(%rip),%rdi
call   10e0 <perror@plt>
mov    $0x3,%ebp
jmp    13f8 <main+0x208>
lea    0xd8c(%rip),%rdi
call   1030 <puts@plt>
lea    0xda1(%rip),%rdi
call   1030 <puts@plt>
movl   $0x4,0xc(%rsp)
lea    0x10(%rsp),%rsi
lea    0xc(%rsp),%rdx
mov    %ebx,%edi
call   1100 <accept@plt>
mov    $0x4,%ebp
lea    0xd88(%rip),%rdi
cmp    $0xffffffff,%eax
je     13f3 <main+0x203>
mov    %eax,%r13d
lea    0x30(%rsp),%rbp
lea    0xdc4(%rip),%r14
lea    0x10(%rsp),%r15
lea    0xc(%rsp),%r12
jmp    1376 <main+0x186>
nopl   0x0(%rax,%rax,1)
mov    0x10(%rsp),%edi
call   1040 <inet_ntoa@plt>
mov    %r14,%rdi
mov    %rax,%rsi
mov    %rbp,%rdx
xor    %eax,%eax
call   1060 <printf@plt>
movl   $0x4,0xc(%rsp)
mov    %ebx,%edi
mov    %r15,%rsi
mov    %r12,%rdx
call   1100 <accept@plt>
mov    %eax,%r13d
cmp    $0xffffffff,%eax
je     13e7 <main+0x1f7>
mov    0x10(%rsp),%edi
call   1040 <inet_ntoa@plt>
lea    0xd2d(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbp,%rdi
xor    %esi,%esi
mov    $0x50,%edx
call   1080 <memset@plt>
mov    %r13d,%edi
mov    %rbp,%rsi
mov    $0x50,%edx
call   10a0 <read@plt>
cmp    $0xffffffff,%eax
je     13d9 <main+0x1e9>
mov    %rbp,%rdi
lea    0xd30(%rip),%rsi
call   10b0 <strcmp@plt>
test   %rax,%rax
jne    1340 <main+0x150>
mov    %r13d,%edi
call   1090 <close@plt>
jmp    1340 <main+0x150>
mov    $0x5,%ebp
lea    0xced(%rip),%rdi
jmp    13f3 <main+0x203>
lea    0xcb1(%rip),%rdi
mov    $0x4,%ebp
call   10e0 <perror@plt>
mov    %ebp,%eax
add    $0x88,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.sockaddr_in = type { %struct.TYPE_2__, i32, i32 }
%struct.TYPE_2__ = type { i32 }
%struct.sockaddr = type { i32 }
@AF_INET = global i32 0
@SOCK_STREAM = global i32 0
@.str = [20 x i8] c"create socket error\00"
@.str.1 = [20 x i8] c"create socket done!\00"
@INADDR_ANY = global i32 0
@.str.2 = [18 x i8] c"bind socket error\00"
@.str.3 = [18 x i8] c"bind socket done!\00"
@.str.4 = [33 x i8] c"set the server max connect error\00"
@.str.5 = [33 x i8] c"set the server max connect done!\00"
@.str.6 = [17 x i8] c"wait for connect\00"
@.str.7 = [20 x i8] c"accept client error\00"
@.str.8 = [31 x i8] c"server get connection form %s\0A\00"
@.str.9 = [28 x i8] c"read data from client error\00"
@.str.10 = [5 x i8] c"exit\00"
@.str.11 = [35 x i8] c"server receive data from %s is: %s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca [80 x i8]
%5 = alloca %struct.sockaddr_in
%6 = alloca %struct.sockaddr_in
%7 = alloca i32
store i32 0, i32* %1
%8 = load i32, i32* @AF_INET
%9 = load i32, i32* @SOCK_STREAM
%10 = call i32 @socket(i32 %8, i32 %9, i32 0)
store i32 %10, i32* %2
%11 = icmp eq i32 %10, -1
br i1 %11, label %12, label %14
12: ; preds = %0
%13 = call i32 @perror(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %1
br label %76
14: ; preds = %0
%15 = call i32 @puts(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%16 = call i32 @bzero(%struct.sockaddr_in* %5, i32 12)
%17 = load i32, i32* @AF_INET
%18 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %5, i32 0, i32 2
store i32 %17, i32* %18
%19 = load i32, i32* @INADDR_ANY
%20 = call i32 @htonl(i32 %19)
%21 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %5, i32 0, i32 0
%22 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %21, i32 0, i32 0
store i32 %20, i32* %22
%23 = call i32 @htons(i32 8888)
%24 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %5, i32 0, i32 1
store i32 %23, i32* %24
%25 = load i32, i32* %2
%26 = bitcast %struct.sockaddr_in* %5 to %struct.sockaddr*
%27 = call i32 @bind(i32 %25, %struct.sockaddr* %26, i32 4)
%28 = icmp eq i32 %27, -1
br i1 %28, label %29, label %31
29: ; preds = %14
%30 = call i32 @perror(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
store i32 2, i32* %1
br label %76
31: ; preds = %14
%32 = call i32 @puts(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0))
%33 = load i32, i32* %2
%34 = call i32 @listen(i32 %33, i32 5)
%35 = icmp eq i32 %34, -1
br i1 %35, label %36, label %38
36: ; preds = %31
%37 = call i32 @perror(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.4, i64 0, i64 0))
store i32 3, i32* %1
br label %76
38: ; preds = %31
%39 = call i32 @puts(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0))
%40 = call i32 @puts(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0))
br label %41
41: ; preds = %38, %69
store i32 4, i32* %7
%42 = load i32, i32* %2
%43 = bitcast %struct.sockaddr_in* %6 to %struct.sockaddr*
%44 = call i32 @accept(i32 %42, %struct.sockaddr* %43, i32* %7)
store i32 %44, i32* %3
%45 = icmp eq i32 %44, -1
br i1 %45, label %46, label %48
46: ; preds = %41
%47 = call i32 @perror(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0))
store i32 4, i32* %1
br label %76
48: ; preds = %41
%49 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %6, i32 0, i32 0
%50 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %49, i32 0, i32 0
%51 = load i32, i32* %50
%52 = call i8* @inet_ntoa(i32 %51)
%53 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.8, i64 0, i64 0), i8* %52)
%54 = getelementptr inbounds [80 x i8], [80 x i8]* %4, i64 0, i64 0
%55 = call i32 @memset(i8* %54, i8 signext 0, i32 80)
%56 = load i32, i32* %3
%57 = getelementptr inbounds [80 x i8], [80 x i8]* %4, i64 0, i64 0
%58 = call i32 @read(i32 %56, i8* %57, i32 80)
%59 = icmp eq i32 %58, -1
br i1 %59, label %60, label %62
60: ; preds = %48
%61 = call i32 @perror(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.9, i64 0, i64 0))
store i32 5, i32* %1
br label %76
62: ; preds = %48
%63 = getelementptr inbounds [80 x i8], [80 x i8]* %4, i64 0, i64 0
%64 = call i64 @strcmp(i8* %63, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0))
%65 = icmp eq i64 %64, 0
br i1 %65, label %66, label %69
66: ; preds = %62
%67 = load i32, i32* %3
%68 = call i32 @close(i32 %67)
br label %69
69: ; preds = %66, %62
%70 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %6, i32 0, i32 0
%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 [80 x i8], [80 x i8]* %4, i64 0, i64 0
%75 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.11, i64 0, i64 0), i8* %73, i8* %74)
br label %41
76: ; preds = %60, %46, %36, %29, %12
%77 = load i32, i32* %1
ret i32 %77
}

LLVM IR (-O2):
%struct.sockaddr_in = type { %struct.TYPE_2__, i32, i32 }
%struct.TYPE_2__ = type { i32 }
%struct.sockaddr = type { i32 }
@AF_INET = global i32 0
@SOCK_STREAM = global i32 0
@.str = [20 x i8] c"create socket error\00"
@.str.1 = [20 x i8] c"create socket done!\00"
@INADDR_ANY = global i32 0
@.str.2 = [18 x i8] c"bind socket error\00"
@.str.3 = [18 x i8] c"bind socket done!\00"
@.str.4 = [33 x i8] c"set the server max connect error\00"
@.str.5 = [33 x i8] c"set the server max connect done!\00"
@.str.6 = [17 x i8] c"wait for connect\00"
@.str.7 = [20 x i8] c"accept client error\00"
@.str.8 = [31 x i8] c"server get connection form %s\0A\00"
@.str.9 = [28 x i8] c"read data from client error\00"
@.str.10 = [5 x i8] c"exit\00"
@.str.11 = [35 x i8] c"server receive data from %s is: %s\00"
define i32 @main() {
%1 = alloca [80 x i8]
%2 = alloca %struct.sockaddr_in
%3 = alloca %struct.sockaddr_in
%4 = alloca i32
%5 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 0
%6 = bitcast %struct.sockaddr_in* %2 to i8*
%7 = bitcast %struct.sockaddr_in* %3 to i8*
%8 = load i32, i32* @AF_INET
%9 = load i32, i32* @SOCK_STREAM
%10 = tail call i32 @socket(i32 %8, i32 %9, i32 0)
%11 = icmp eq i32 %10, -1
br i1 %11, label %12, label %14
12: ; preds = %0
%13 = tail call i32 @perror(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
br label %67
14: ; preds = %0
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%16 = call i32 @bzero(%struct.sockaddr_in* %2, i32 12)
%17 = load i32, i32* @AF_INET
%18 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %2, i64 0, i32 2
store i32 %17, i32* %18
%19 = load i32, i32* @INADDR_ANY
%20 = tail call i32 @htonl(i32 %19)
%21 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %2, i64 0, i32 0, i32 0
store i32 %20, i32* %21
%22 = tail call i32 @htons(i32 8888)
%23 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %2, i64 0, i32 1
store i32 %22, i32* %23
%24 = bitcast %struct.sockaddr_in* %2 to %struct.sockaddr*
%25 = call i32 @bind(i32 %10, %struct.sockaddr* %24, i32 4)
%26 = icmp eq i32 %25, -1
br i1 %26, label %27, label %29
27: ; preds = %14
%28 = call i32 @perror(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
br label %67
29: ; preds = %14
%30 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0))
%31 = call i32 @listen(i32 %10, i32 5)
%32 = icmp eq i32 %31, -1
br i1 %32, label %33, label %35
33: ; preds = %29
%34 = call i32 @perror(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.4, i64 0, i64 0))
br label %67
35: ; preds = %29
%36 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0))
%37 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0))
%38 = bitcast i32* %4 to i8*
%39 = bitcast %struct.sockaddr_in* %3 to %struct.sockaddr*
store i32 4, i32* %4
%40 = call i32 @accept(i32 %10, %struct.sockaddr* %39, i32* %4)
%41 = icmp eq i32 %40, -1
br i1 %41, label %57, label %42
42: ; preds = %35
%43 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %3, i64 0, i32 0, i32 0
br label %44
44: ; preds = %42, %61
%45 = phi i32 [ %40, %42 ], [ %65, %61 ]
%46 = load i32, i32* %43
%47 = call i8* @inet_ntoa(i32 %46)
%48 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.8, i64 0, i64 0), i8* %47)
%49 = call i32 @memset(i8* %5, i8 signext 0, i32 80)
%50 = call i32 @read(i32 %45, i8* %5, i32 80)
%51 = icmp eq i32 %50, -1
br i1 %51, label %57, label %52
52: ; preds = %44
%53 = call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0))
%54 = icmp eq i64 %53, 0
br i1 %54, label %55, label %61
55: ; preds = %52
%56 = call i32 @close(i32 %45)
br label %61
57: ; preds = %44, %61, %35
%58 = phi i8* [ getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0), %35 ], [ getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0), %61 ], [ getelementptr inbounds ([28 x i8], [28 x i8]* @.str.9, i64 0, i64 0), %44 ]
%59 = phi i32 [ 4, %35 ], [ 4, %61 ], [ 5, %44 ]
%60 = call i32 @perror(i8* %58)
br label %67
61: ; preds = %52, %55
%62 = load i32, i32* %43
%63 = call i8* @inet_ntoa(i32 %62)
%64 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.11, i64 0, i64 0), i8* %63, i8* %5)
store i32 4, i32* %4
%65 = call i32 @accept(i32 %10, %struct.sockaddr* %39, i32* %4)
%66 = icmp eq i32 %65, -1
br i1 %66, label %57, label %44
67: ; preds = %57, %33, %27, %12
%68 = phi i32 [ 1, %12 ], [ 2, %27 ], [ 3, %33 ], [ %59, %57 ]
ret i32 %68
}