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

/* Type definitions */
struct sockaddr_un {
  int /*<<< orphan*/ sun_path;
  int /*<<< orphan*/ sun_family;
};
struct sockaddr {
  int dummy;
};
typedef int /*<<< orphan*/ srv_addr;
typedef int socklen_t;
typedef int /*<<< orphan*/ recv_buf;
typedef int /*<<< orphan*/ clt_addr;

/* Variables and functions */
int /*<<< orphan*/ AF_UNIX;
int /*<<< orphan*/ PF_UNIX;
int /*<<< orphan*/ SOCK_STREAM;
int accept(int, struct sockaddr *, int *);
int bind(int, struct sockaddr *, int);
int /*<<< orphan*/ close(int);
int listen(int, int);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *, ...);
int read(int, char *, int);
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ strcpy(char *, char *);
int /*<<< orphan*/ strncpy(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ unlink(char *);
int write(int, char *, int);
int main(void) {
  int lsn_fd, apt_fd;
  struct sockaddr_un srv_addr;
  struct sockaddr_un clt_addr;
  socklen_t clt_len;
  int ret;
  int i;
  char recv_buf[1024];
  char send_buf[1024];
  lsn_fd = socket(PF_UNIX, SOCK_STREAM, 0);
  if (lsn_fd < 0) {
    perror("can't create communication socket!");
    return 1;
  }
  srv_addr.sun_family = AF_UNIX;
  strncpy(srv_addr.sun_path, "/tmp/UNIX.domain", sizeof(srv_addr.sun_path) - 1);
  unlink("/tmp/UNIX.domain");
  ret = bind(lsn_fd, (struct sockaddr *)&srv_addr, sizeof(srv_addr));
  if (ret == -1) {
    perror("can't bind local sockaddr!");
    close(lsn_fd);
    unlink("/tmp/UNIX.domain");
    return 1;
  }
  ret = listen(lsn_fd, 1);
  if (ret == -1) {
    perror("can't listen client connect request");
    close(lsn_fd);
    unlink("/tmp/UNIX.domain");
    return 1;
  }
  clt_len = sizeof(clt_addr);
  while (1) {
    apt_fd = accept(lsn_fd, (struct sockaddr *)&clt_addr, &clt_len);
    if (apt_fd < 0) {
      perror("can't listen client connect request");
      close(lsn_fd);
      unlink("/tmp/UNIX.domain");
      return 1;
    }
    printf("received a connection\n");
    printf("send message to client\n");
    memset(send_buf, 0, 1024);
    strcpy(send_buf, "Hello, you have connected to server succeed");
    int snd_num = write(apt_fd, send_buf, 1024);
    if (snd_num != 1024) {
      perror("send messge to client failed\n");
      close(apt_fd);
      close(lsn_fd);
      unlink("/tmp/UNIX.domain");
      return 1;
    }
    printf("============info=================\n");
    for (i = 0; i < 4; i++) {
      memset(recv_buf, 0, 1024);
      int rcv_num = read(apt_fd, recv_buf, sizeof(recv_buf));
      printf("Message from client (%d) :%s\n", rcv_num, recv_buf);
    }
  }
  close(apt_fd);
  close(lsn_fd);
  unlink("/tmp/UNIX.domain");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x840,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2e0f(%rip),%rax
mov    (%rax),%edi
mov    0x2dde(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   10f0 <socket@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1220 <main+0x50>
lea    0xdf1(%rip),%rdi
call   10d0 <perror@plt>
movl   $0x1,-0x4(%rbp)
jmp    1446 <main+0x276>
mov    0x2db9(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x18(%rbp),%edi
lea    0xded(%rip),%rsi
mov    $0x3,%edx
call   1040 <strncpy@plt>
lea    0xddc(%rip),%rdi
call   1030 <unlink@plt>
mov    -0x8(%rbp),%edi
lea    -0x18(%rbp),%rsi
mov    $0x8,%edx
call   10c0 <bind@plt>
mov    %eax,-0x28(%rbp)
cmpl   $0xffffffff,-0x28(%rbp)
jne    1296 <main+0xc6>
lea    0xdc3(%rip),%rdi
call   10d0 <perror@plt>
mov    -0x8(%rbp),%edi
call   1090 <close@plt>
lea    0xd9e(%rip),%rdi
call   1030 <unlink@plt>
movl   $0x1,-0x4(%rbp)
jmp    1446 <main+0x276>
mov    -0x8(%rbp),%edi
mov    $0x1,%esi
call   10b0 <listen@plt>
mov    %eax,-0x28(%rbp)
cmpl   $0xffffffff,-0x28(%rbp)
jne    12dc <main+0x10c>
lea    0xd98(%rip),%rdi
call   10d0 <perror@plt>
mov    -0x8(%rbp),%edi
call   1090 <close@plt>
lea    0xd58(%rip),%rdi
call   1030 <unlink@plt>
movl   $0x1,-0x4(%rbp)
jmp    1446 <main+0x276>
movl   $0x8,-0x24(%rbp)
mov    -0x8(%rbp),%edi
lea    -0x20(%rbp),%rsi
lea    -0x24(%rbp),%rdx
call   10e0 <accept@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    132c <main+0x15c>
lea    0xd48(%rip),%rdi
call   10d0 <perror@plt>
mov    -0x8(%rbp),%edi
call   1090 <close@plt>
lea    0xd08(%rip),%rdi
call   1030 <unlink@plt>
movl   $0x1,-0x4(%rbp)
jmp    1446 <main+0x276>
lea    0xd40(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    0xd49(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    -0x830(%rbp),%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1080 <memset@plt>
lea    -0x830(%rbp),%rdi
lea    0xd39(%rip),%rsi
call   1050 <strcpy@plt>
mov    -0xc(%rbp),%edi
lea    -0x830(%rbp),%rsi
mov    $0x400,%edx
call   1060 <write@plt>
mov    %eax,-0x834(%rbp)
cmpl   $0x400,-0x834(%rbp)
je     13cc <main+0x1fc>
lea    0xd2f(%rip),%rdi
call   10d0 <perror@plt>
mov    -0xc(%rbp),%edi
call   1090 <close@plt>
mov    -0x8(%rbp),%edi
call   1090 <close@plt>
lea    0xc68(%rip),%rdi
call   1030 <unlink@plt>
movl   $0x1,-0x4(%rbp)
jmp    1446 <main+0x276>
lea    0xd19(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
movl   $0x0,-0x2c(%rbp)
cmpl   $0x4,-0x2c(%rbp)
jge    1441 <main+0x271>
lea    -0x430(%rbp),%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1080 <memset@plt>
mov    -0xc(%rbp),%edi
lea    -0x430(%rbp),%rsi
mov    $0x400,%edx
call   10a0 <read@plt>
mov    %eax,-0x838(%rbp)
mov    -0x838(%rbp),%esi
lea    -0x430(%rbp),%rdx
lea    0xce3(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    13e1 <main+0x211>
jmp    12e3 <main+0x113>
mov    -0x4(%rbp),%eax
add    $0x840,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x828,%rsp
mov    0x2e00(%rip),%rax
mov    (%rax),%edi
mov    0x2dcf(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1100 <socket@plt>
test   %eax,%eax
jns    121f <main+0x3f>
lea    0xdeb(%rip),%rdi
call   10e0 <perror@plt>
jmp    140e <main+0x22e>
mov    %eax,%ebp
mov    0x2db8(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x1c(%rsp)
lea    0xdee(%rip),%rbx
mov    %rbx,%rsi
mov    $0x3,%edx
call   1040 <strncpy@plt>
mov    %rbx,%rdi
call   1030 <unlink@plt>
lea    0x18(%rsp),%rsi
mov    %ebp,%edi
mov    $0x8,%edx
call   10d0 <bind@plt>
cmp    $0xffffffff,%eax
jne    126c <main+0x8c>
lea    0xdcd(%rip),%rdi
jmp    13f6 <main+0x216>
mov    %ebp,%edi
mov    $0x1,%esi
call   10c0 <listen@plt>
cmp    $0xffffffff,%eax
je     13ef <main+0x20f>
movl   $0x8,0xc(%rsp)
lea    0x10(%rsp),%rsi
lea    0xc(%rsp),%rdx
mov    %ebp,%edi
call   10f0 <accept@plt>
test   %eax,%eax
js     13ef <main+0x20f>
mov    %eax,%r14d
lea    0x20(%rsp),%rbx
lea    0x420(%rsp),%r15
lea    0xe04(%rip),%r12
lea    0xc(%rsp),%r13
xchg   %ax,%ax
lea    0xe14(%rip),%rdi
call   1060 <puts@plt>
lea    0xe1e(%rip),%rdi
call   1060 <puts@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1090 <memset@plt>
mov    %rbx,%rdi
lea    0xd82(%rip),%rsi
call   1050 <strcpy@plt>
mov    %r14d,%edi
mov    %rbx,%rsi
mov    $0x400,%edx
call   1070 <write@plt>
cmp    $0x400,%eax
jne    1425 <main+0x245>
lea    0xdf0(%rip),%rdi
call   1060 <puts@plt>
mov    %r15,%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1090 <memset@plt>
mov    %r14d,%edi
mov    %r15,%rsi
mov    $0x400,%edx
call   10b0 <read@plt>
mov    %r12,%rdi
mov    %eax,%esi
mov    %r15,%rdx
xor    %eax,%eax
call   1080 <printf@plt>
mov    %r15,%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1090 <memset@plt>
mov    %r14d,%edi
mov    %r15,%rsi
mov    $0x400,%edx
call   10b0 <read@plt>
mov    %r12,%rdi
mov    %eax,%esi
mov    %r15,%rdx
xor    %eax,%eax
call   1080 <printf@plt>
mov    %r15,%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1090 <memset@plt>
mov    %r14d,%edi
mov    %r15,%rsi
mov    $0x400,%edx
call   10b0 <read@plt>
mov    %r12,%rdi
mov    %eax,%esi
mov    %r15,%rdx
xor    %eax,%eax
call   1080 <printf@plt>
mov    %r15,%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1090 <memset@plt>
mov    %r14d,%edi
mov    %r15,%rsi
mov    $0x400,%edx
call   10b0 <read@plt>
mov    %r12,%rdi
mov    %eax,%esi
mov    %r15,%rdx
xor    %eax,%eax
call   1080 <printf@plt>
mov    %ebp,%edi
lea    0x10(%rsp),%rsi
mov    %r13,%rdx
call   10f0 <accept@plt>
mov    %eax,%r14d
test   %eax,%eax
jns    12c0 <main+0xe0>
lea    0xc59(%rip),%rdi
call   10e0 <perror@plt>
mov    %ebp,%edi
call   10a0 <close@plt>
lea    0xc1a(%rip),%rdi
call   1030 <unlink@plt>
mov    $0x1,%eax
add    $0x828,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xc73(%rip),%rdi
call   10e0 <perror@plt>
mov    %r14d,%edi
call   10a0 <close@plt>
jmp    13fb <main+0x21b>

LLVM IR (-O0):
%struct.sockaddr_un = type { i32, i32 }
%struct.sockaddr = type { i32 }
@PF_UNIX = global i32 0
@SOCK_STREAM = global i32 0
@.str = [35 x i8] c"can't create communication socket!\00"
@AF_UNIX = global i32 0
@.str.1 = [17 x i8] c"/tmp/UNIX.domain\00"
@.str.2 = [27 x i8] c"can't bind local sockaddr!\00"
@.str.3 = [36 x i8] c"can't listen client connect request\00"
@.str.4 = [23 x i8] c"received a connection\0A\00"
@.str.5 = [24 x i8] c"send message to client\0A\00"
@.str.6 = [44 x i8] c"Hello, you have connected to server succeed\00"
@.str.7 = [30 x i8] c"send messge to client failed\0A\00"
@.str.8 = [35 x i8] c"============info=================\0A\00"
@.str.9 = [30 x i8] c"Message from client (%d) :%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca %struct.sockaddr_un
%5 = alloca %struct.sockaddr_un
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca [1024 x i8]
%10 = alloca [1024 x i8]
%11 = alloca i32
%12 = alloca i32
store i32 0, i32* %1
%13 = load i32, i32* @PF_UNIX
%14 = load i32, i32* @SOCK_STREAM
%15 = call i32 @socket(i32 %13, i32 %14, i32 0)
store i32 %15, i32* %2
%16 = load i32, i32* %2
%17 = icmp slt i32 %16, 0
br i1 %17, label %18, label %20
18: ; preds = %0
%19 = call i32 @perror(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %1
br label %96
20: ; preds = %0
%21 = load i32, i32* @AF_UNIX
%22 = getelementptr inbounds %struct.sockaddr_un, %struct.sockaddr_un* %4, i32 0, i32 1
store i32 %21, i32* %22
%23 = getelementptr inbounds %struct.sockaddr_un, %struct.sockaddr_un* %4, i32 0, i32 0
%24 = load i32, i32* %23
%25 = call i32 @strncpy(i32 %24, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 3)
%26 = call i32 @unlink(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%27 = load i32, i32* %2
%28 = bitcast %struct.sockaddr_un* %4 to %struct.sockaddr*
%29 = call i32 @bind(i32 %27, %struct.sockaddr* %28, i32 8)
store i32 %29, i32* %7
%30 = load i32, i32* %7
%31 = icmp eq i32 %30, -1
br i1 %31, label %32, label %37
32: ; preds = %20
%33 = call i32 @perror(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
%34 = load i32, i32* %2
%35 = call i32 @close(i32 %34)
%36 = call i32 @unlink(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
store i32 1, i32* %1
br label %96
37: ; preds = %20
%38 = load i32, i32* %2
%39 = call i32 @listen(i32 %38, i32 1)
store i32 %39, i32* %7
%40 = load i32, i32* %7
%41 = icmp eq i32 %40, -1
br i1 %41, label %42, label %47
42: ; preds = %37
%43 = call i32 @perror(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0))
%44 = load i32, i32* %2
%45 = call i32 @close(i32 %44)
%46 = call i32 @unlink(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
store i32 1, i32* %1
br label %96
47: ; preds = %37
store i32 8, i32* %6
br label %48
48: ; preds = %47, %95
%49 = load i32, i32* %2
%50 = bitcast %struct.sockaddr_un* %5 to %struct.sockaddr*
%51 = call i32 @accept(i32 %49, %struct.sockaddr* %50, i32* %6)
store i32 %51, i32* %3
%52 = load i32, i32* %3
%53 = icmp slt i32 %52, 0
br i1 %53, label %54, label %59
54: ; preds = %48
%55 = call i32 @perror(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0))
%56 = load i32, i32* %2
%57 = call i32 @close(i32 %56)
%58 = call i32 @unlink(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
store i32 1, i32* %1
br label %96
59: ; preds = %48
%60 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.4, i64 0, i64 0))
%61 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0))
%62 = getelementptr inbounds [1024 x i8], [1024 x i8]* %10, i64 0, i64 0
%63 = call i32 @memset(i8* %62, i32 0, i32 1024)
%64 = getelementptr inbounds [1024 x i8], [1024 x i8]* %10, i64 0, i64 0
%65 = call i32 @strcpy(i8* %64, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.6, i64 0, i64 0))
%66 = load i32, i32* %3
%67 = getelementptr inbounds [1024 x i8], [1024 x i8]* %10, i64 0, i64 0
%68 = call i32 @write(i32 %66, i8* %67, i32 1024)
store i32 %68, i32* %11
%69 = load i32, i32* %11
%70 = icmp ne i32 %69, 1024
br i1 %70, label %71, label %78
71: ; preds = %59
%72 = call i32 @perror(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.7, i64 0, i64 0))
%73 = load i32, i32* %3
%74 = call i32 @close(i32 %73)
%75 = load i32, i32* %2
%76 = call i32 @close(i32 %75)
%77 = call i32 @unlink(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
store i32 1, i32* %1
br label %96
78: ; preds = %59
%79 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.8, i64 0, i64 0))
store i32 0, i32* %8
br label %80
80: ; preds = %92, %78
%81 = load i32, i32* %8
%82 = icmp slt i32 %81, 4
br i1 %82, label %83, label %95
83: ; preds = %80
%84 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%85 = call i32 @memset(i8* %84, i32 0, i32 1024)
%86 = load i32, i32* %3
%87 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%88 = call i32 @read(i32 %86, i8* %87, i32 1024)
store i32 %88, i32* %12
%89 = load i32, i32* %12
%90 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%91 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.9, i64 0, i64 0), i32 %89, i8* %90)
br label %92
92: ; preds = %83
%93 = load i32, i32* %8
%94 = add nsw i32 %93, 1
store i32 %94, i32* %8
br label %80
95: ; preds = %80
br label %48
96: ; preds = %71, %54, %42, %32, %18
%97 = load i32, i32* %1
ret i32 %97
}

LLVM IR (-O2):
%struct.sockaddr_un = type { i32, i32 }
%struct.sockaddr = type { i32 }
@PF_UNIX = global i32 0
@SOCK_STREAM = global i32 0
@.str = [35 x i8] c"can't create communication socket!\00"
@AF_UNIX = global i32 0
@.str.1 = [17 x i8] c"/tmp/UNIX.domain\00"
@.str.2 = [27 x i8] c"can't bind local sockaddr!\00"
@.str.3 = [36 x i8] c"can't listen client connect request\00"
@.str.6 = [44 x i8] c"Hello, you have connected to server succeed\00"
@.str.7 = [30 x i8] c"send messge to client failed\0A\00"
@.str.9 = [30 x i8] c"Message from client (%d) :%s\0A\00"
@str = [22 x i8] c"received a connection\00"
@str.10 = [23 x i8] c"send message to client\00"
@str.11 = [34 x i8] c"============info=================\00"
define i32 @main() {
%1 = alloca %struct.sockaddr_un
%2 = alloca %struct.sockaddr_un
%3 = alloca i32
%4 = alloca [1024 x i8]
%5 = alloca [1024 x i8]
%6 = bitcast %struct.sockaddr_un* %1 to i8*
%7 = bitcast %struct.sockaddr_un* %2 to i8*
%8 = bitcast i32* %3 to i8*
%9 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%10 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%11 = load i32, i32* @PF_UNIX
%12 = load i32, i32* @SOCK_STREAM
%13 = tail call i32 @socket(i32 %11, i32 %12, i32 0)
%14 = icmp slt i32 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %0
%16 = tail call i32 @perror(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
br label %73
17: ; preds = %0
%18 = load i32, i32* @AF_UNIX
%19 = getelementptr inbounds %struct.sockaddr_un, %struct.sockaddr_un* %1, i64 0, i32 1
store i32 %18, i32* %19
%20 = tail call i32 @strncpy(i32 undef, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 3)
%21 = tail call i32 @unlink(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%22 = bitcast %struct.sockaddr_un* %1 to %struct.sockaddr*
%23 = call i32 @bind(i32 %13, %struct.sockaddr* %22, i32 8)
%24 = icmp eq i32 %23, -1
br i1 %24, label %25, label %29
25: ; preds = %17
%26 = call i32 @perror(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
%27 = call i32 @close(i32 %13)
%28 = call i32 @unlink(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
br label %73
29: ; preds = %17
%30 = call i32 @listen(i32 %13, i32 1)
%31 = icmp eq i32 %30, -1
br i1 %31, label %32, label %36
32: ; preds = %29
%33 = call i32 @perror(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0))
%34 = call i32 @close(i32 %13)
%35 = call i32 @unlink(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
br label %73
36: ; preds = %29
store i32 8, i32* %3
%37 = bitcast %struct.sockaddr_un* %2 to %struct.sockaddr*
%38 = call i32 @accept(i32 %13, %struct.sockaddr* %37, i32* %3)
%39 = icmp slt i32 %38, 0
br i1 %39, label %40, label %44
40: ; preds = %57, %36
%41 = call i32 @perror(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0))
%42 = call i32 @close(i32 %13)
%43 = call i32 @unlink(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
br label %73
44: ; preds = %36, %57
%45 = phi i32 [ %71, %57 ], [ %38, %36 ]
%46 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
%47 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.10, i64 0, i64 0))
%48 = call i32 @memset(i8* %10, i32 0, i32 1024)
%49 = call i32 @strcpy(i8* %10, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.6, i64 0, i64 0))
%50 = call i32 @write(i32 %45, i8* %10, i32 1024)
%51 = icmp eq i32 %50, 1024
br i1 %51, label %57, label %52
52: ; preds = %44
%53 = call i32 @perror(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.7, i64 0, i64 0))
%54 = call i32 @close(i32 %45)
%55 = call i32 @close(i32 %13)
%56 = call i32 @unlink(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
br label %73
57: ; preds = %44
%58 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.11, i64 0, i64 0))
%59 = call i32 @memset(i8* %9, i32 0, i32 1024)
%60 = call i32 @read(i32 %45, i8* %9, i32 1024)
%61 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.9, i64 0, i64 0), i32 %60, i8* %9)
%62 = call i32 @memset(i8* %9, i32 0, i32 1024)
%63 = call i32 @read(i32 %45, i8* %9, i32 1024)
%64 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.9, i64 0, i64 0), i32 %63, i8* %9)
%65 = call i32 @memset(i8* %9, i32 0, i32 1024)
%66 = call i32 @read(i32 %45, i8* %9, i32 1024)
%67 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.9, i64 0, i64 0), i32 %66, i8* %9)
%68 = call i32 @memset(i8* %9, i32 0, i32 1024)
%69 = call i32 @read(i32 %45, i8* %9, i32 1024)
%70 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.9, i64 0, i64 0), i32 %69, i8* %9)
%71 = call i32 @accept(i32 %13, %struct.sockaddr* %37, i32* %3)
%72 = icmp slt i32 %71, 0
br i1 %72, label %40, label %44
73: ; preds = %52, %40, %32, %25, %15
ret i32 1
}