#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 socklen_t;
typedef int /*<<< orphan*/ server;
typedef int /*<<< orphan*/ client;

/* Variables and functions */
int /*<<< orphan*/ AF_UNIX;
int /*<<< orphan*/ SOCK_STREAM;
int accept(int, struct sockaddr *, int *);
int bind(int, struct sockaddr *, int);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int listen(int, int);
int /*<<< orphan*/ printf(char *, char *);
int recv(int, char *, int, int /*<<< orphan*/);
int send(int, char *, int, int /*<<< orphan*/);
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
scalar_t__ strlen(char *);
int /*<<< orphan*/ strncpy(int /*<<< orphan*/, char *, scalar_t__);
int /*<<< orphan*/ unlink(int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  if (argc < 2) {
    fprintf(stderr, "Usage: %s [socket-path]\n", argv[0]);
    fflush(stderr);
    exit(1);
  };
  char *sock_path = argv[1];
  int server_fd, client_fd, err;
  struct sockaddr_un server, client;
  char buf[1024];
  server_fd = socket(AF_UNIX, SOCK_STREAM, 0);
  if (server_fd < 0) {
    fprintf(stderr, "Could not create socket\n");
    fflush(stderr);
    exit(1);
  };
  server.sun_family = AF_UNIX;
  strncpy(server.sun_path, sock_path, strlen(sock_path) + 1);
  unlink(server.sun_path);
  err = bind(server_fd, (struct sockaddr *)&server, sizeof(server));
  if (err < 0) {
    fprintf(stderr, "Could not bind socket\n");
    fflush(stderr);
    exit(1);
  };
  err = listen(server_fd, 128);
  if (err < 0) {
    fprintf(stderr, "Could not listen on socket\n");
    fflush(stderr);
    exit(1);
  };
  printf("Server is listening on %s\n", sock_path);
  while (1) {
    socklen_t client_len = sizeof(client);
    client_fd = accept(server_fd, (struct sockaddr *)&client, &client_len);
    if (client_fd < 0) {
      fprintf(stderr, "Could not establish new connection\n");
      fflush(stderr);
      exit(1);
    };
    while (1) {
      int read = recv(client_fd, buf, 1024, 0);
      if (!read)
        break;
      if (read < 0) {
        fprintf(stderr, "Client read failed\n");
        fflush(stderr);
        exit(1);
      };
      err = send(client_fd, buf, read, 0);
      if (err < 0) {
        fprintf(stderr, "Client write failed\n");
        fflush(stderr);
        exit(1);
      };
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x460,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    1229 <main+0x59>
mov    0x2dde(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xdf6(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    0x2dc0(%rip),%rax
mov    (%rax),%edi
call   10a0 <fflush@plt>
mov    $0x1,%edi
call   10e0 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    0x2dac(%rip),%rax
mov    (%rax),%edi
mov    0x2d8b(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   10f0 <socket@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jge    128a <main+0xba>
mov    0x2d76(%rip),%rax
mov    (%rax),%edi
lea    0xdae(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    0x2d5f(%rip),%rax
mov    (%rax),%edi
call   10a0 <fflush@plt>
mov    $0x1,%edi
call   10e0 <exit@plt>
mov    0x2d57(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x30(%rbp),%eax
mov    %eax,-0x454(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x450(%rbp)
mov    -0x18(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x454(%rbp),%edi
mov    -0x450(%rbp),%rsi
mov    %rax,%rdx
add    $0x1,%rdx
call   1050 <strncpy@plt>
mov    -0x30(%rbp),%edi
call   1040 <unlink@plt>
mov    -0x1c(%rbp),%edi
lea    -0x30(%rbp),%rsi
mov    $0x8,%edx
call   10c0 <bind@plt>
mov    %eax,-0x24(%rbp)
cmpl   $0x0,-0x24(%rbp)
jge    1321 <main+0x151>
mov    0x2cdf(%rip),%rax
mov    (%rax),%edi
lea    0xd30(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    0x2cc8(%rip),%rax
mov    (%rax),%edi
call   10a0 <fflush@plt>
mov    $0x1,%edi
call   10e0 <exit@plt>
mov    -0x1c(%rbp),%edi
mov    $0x80,%esi
call   10b0 <listen@plt>
mov    %eax,-0x24(%rbp)
cmpl   $0x0,-0x24(%rbp)
jge    136a <main+0x19a>
mov    0x2c96(%rip),%rax
mov    (%rax),%edi
lea    0xcfe(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    0x2c7f(%rip),%rax
mov    (%rax),%edi
call   10a0 <fflush@plt>
mov    $0x1,%edi
call   10e0 <exit@plt>
mov    -0x18(%rbp),%rsi
lea    0xcf0(%rip),%rdi
call   1080 <printf@plt>
movl   $0x8,-0x444(%rbp)
mov    -0x1c(%rbp),%edi
lea    -0x38(%rbp),%rsi
lea    -0x444(%rbp),%rdx
call   10d0 <accept@plt>
mov    %eax,-0x20(%rbp)
cmpl   $0x0,-0x20(%rbp)
jge    13d3 <main+0x203>
mov    0x2c2d(%rip),%rax
mov    (%rax),%edi
lea    0xccc(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    0x2c16(%rip),%rax
mov    (%rax),%edi
call   10a0 <fflush@plt>
mov    $0x1,%edi
call   10e0 <exit@plt>
jmp    13d8 <main+0x208>
mov    -0x20(%rbp),%edi
lea    -0x440(%rbp),%rsi
mov    $0x400,%edx
xor    %ecx,%ecx
call   1030 <recv@plt>
mov    %eax,-0x448(%rbp)
cmpl   $0x0,-0x448(%rbp)
jne    1406 <main+0x236>
jmp    149a <main+0x2ca>
cmpl   $0x0,-0x448(%rbp)
jge    1442 <main+0x272>
mov    0x2bbe(%rip),%rax
mov    (%rax),%edi
lea    0xc81(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    0x2ba7(%rip),%rax
mov    (%rax),%edi
call   10a0 <fflush@plt>
mov    $0x1,%edi
call   10e0 <exit@plt>
mov    -0x20(%rbp),%edi
lea    -0x440(%rbp),%rsi
mov    -0x448(%rbp),%edx
xor    %ecx,%ecx
call   1070 <send@plt>
mov    %eax,-0x24(%rbp)
cmpl   $0x0,-0x24(%rbp)
jge    1495 <main+0x2c5>
mov    0x2b6b(%rip),%rax
mov    (%rax),%edi
lea    0xc42(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    0x2b54(%rip),%rax
mov    (%rax),%edi
call   10a0 <fflush@plt>
mov    $0x1,%edi
call   10e0 <exit@plt>
jmp    13d8 <main+0x208>
jmp    137a <main+0x1aa>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x420,%rsp
cmp    $0x1,%edi
jg     1203 <main+0x33>
mov    0x2ded(%rip),%rbx
mov    (%rbx),%edi
mov    (%rsi),%rdx
lea    0xe09(%rip),%rsi
xor    %eax,%eax
call   1090 <fprintf@plt>
jmp    1372 <main+0x1a2>
mov    0x8(%rsi),%r14
mov    0x2dda(%rip),%rbx
mov    (%rbx),%edi
mov    0x2db9(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   10f0 <socket@plt>
test   %eax,%eax
jns    1239 <main+0x69>
mov    0x2dad(%rip),%rbx
mov    (%rbx),%edi
lea    0xde5(%rip),%rsi
jmp    136b <main+0x19b>
mov    %eax,%r15d
mov    (%rbx),%eax
mov    %eax,0x1c(%rsp)
mov    %r14,%rdi
call   1060 <strlen@plt>
lea    0x1(%rax),%rdx
mov    %r14,%rsi
call   1050 <strncpy@plt>
call   1040 <unlink@plt>
lea    0x18(%rsp),%rsi
mov    %r15d,%edi
mov    $0x8,%edx
call   10c0 <bind@plt>
test   %eax,%eax
jns    1286 <main+0xb6>
mov    0x2d60(%rip),%rbx
mov    (%rbx),%edi
lea    0xdb1(%rip),%rsi
jmp    136b <main+0x19b>
mov    %r15d,%edi
mov    $0x80,%esi
call   10b0 <listen@plt>
test   %eax,%eax
jns    12ac <main+0xdc>
mov    0x2d3a(%rip),%rbx
mov    (%rbx),%edi
lea    0xda2(%rip),%rsi
jmp    136b <main+0x19b>
lea    0xdb2(%rip),%rdi
mov    %r14,%rsi
call   1080 <printf@plt>
movl   $0x8,0xc(%rsp)
lea    0x10(%rsp),%rsi
lea    0xc(%rsp),%rdx
mov    %r15d,%edi
call   10d0 <accept@plt>
test   %eax,%eax
jns    12ee <main+0x11e>
mov    0x2cf8(%rip),%rbx
mov    (%rbx),%edi
lea    0xd97(%rip),%rsi
jmp    136b <main+0x19b>
mov    %eax,%ebp
lea    0x20(%rsp),%rbx
lea    0x10(%rsp),%r14
lea    0xc(%rsp),%r12
jmp    1320 <main+0x150>
movl   $0x8,0xc(%rsp)
mov    %r15d,%edi
mov    %r14,%rsi
mov    %r12,%rdx
call   10d0 <accept@plt>
mov    %eax,%ebp
test   %eax,%eax
js     12d9 <main+0x109>
nopl   (%rax)
mov    %ebp,%edi
mov    %rbx,%rsi
mov    $0x400,%edx
xor    %ecx,%ecx
call   1030 <recv@plt>
test   %eax,%eax
je     1301 <main+0x131>
js     135b <main+0x18b>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %eax,%edx
xor    %ecx,%ecx
call   1070 <send@plt>
test   %eax,%eax
jns    1320 <main+0x150>
mov    0x2c88(%rip),%rbx
mov    (%rbx),%edi
lea    0xd5f(%rip),%rsi
jmp    136b <main+0x19b>
mov    0x2c76(%rip),%rbx
mov    (%rbx),%edi
lea    0xd39(%rip),%rsi
xor    %eax,%eax
call   1090 <fprintf@plt>
mov    (%rbx),%edi
call   10a0 <fflush@plt>
mov    $0x1,%edi
call   10e0 <exit@plt>

LLVM IR (-O0):
%struct.sockaddr_un = type { i32, i32 }
%struct.sockaddr = type { i32 }
@stderr = global i32 0
@.str = [25 x i8] c"Usage: %s [socket-path]\0A\00"
@AF_UNIX = global i32 0
@SOCK_STREAM = global i32 0
@.str.1 = [25 x i8] c"Could not create socket\0A\00"
@.str.2 = [23 x i8] c"Could not bind socket\0A\00"
@.str.3 = [28 x i8] c"Could not listen on socket\0A\00"
@.str.4 = [27 x i8] c"Server is listening on %s\0A\00"
@.str.5 = [36 x i8] c"Could not establish new connection\0A\00"
@.str.6 = [20 x i8] c"Client read failed\0A\00"
@.str.7 = [21 x i8] c"Client write failed\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca %struct.sockaddr_un
%11 = alloca %struct.sockaddr_un
%12 = alloca [1024 x i8]
%13 = alloca i32
%14 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%15 = load i32, i32* %4
%16 = icmp slt i32 %15, 2
br i1 %16, label %17, label %26
17: ; preds = %2
%18 = load i32, i32* @stderr
%19 = load i8**, i8*** %5
%20 = getelementptr inbounds i8*, i8** %19, i64 0
%21 = load i8*, i8** %20
%22 = call i32 (i32, i8*, ...) @fprintf(i32 %18, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %21)
%23 = load i32, i32* @stderr
%24 = call i32 @fflush(i32 %23)
%25 = call i32 @exit(i32 1)
unreachable
26: ; preds = %2
%27 = load i8**, i8*** %5
%28 = getelementptr inbounds i8*, i8** %27, i64 1
%29 = load i8*, i8** %28
store i8* %29, i8** %6
%30 = load i32, i32* @AF_UNIX
%31 = load i32, i32* @SOCK_STREAM
%32 = call i32 @socket(i32 %30, i32 %31, i32 0)
store i32 %32, i32* %7
%33 = load i32, i32* %7
%34 = icmp slt i32 %33, 0
br i1 %34, label %35, label %41
35: ; preds = %26
%36 = load i32, i32* @stderr
%37 = call i32 (i32, i8*, ...) @fprintf(i32 %36, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
%38 = load i32, i32* @stderr
%39 = call i32 @fflush(i32 %38)
%40 = call i32 @exit(i32 1)
unreachable
41: ; preds = %26
%42 = load i32, i32* @AF_UNIX
%43 = getelementptr inbounds %struct.sockaddr_un, %struct.sockaddr_un* %10, i32 0, i32 1
store i32 %42, i32* %43
%44 = getelementptr inbounds %struct.sockaddr_un, %struct.sockaddr_un* %10, i32 0, i32 0
%45 = load i32, i32* %44
%46 = load i8*, i8** %6
%47 = load i8*, i8** %6
%48 = call i64 @strlen(i8* %47)
%49 = add nsw i64 %48, 1
%50 = call i32 @strncpy(i32 %45, i8* %46, i64 %49)
%51 = getelementptr inbounds %struct.sockaddr_un, %struct.sockaddr_un* %10, i32 0, i32 0
%52 = load i32, i32* %51
%53 = call i32 @unlink(i32 %52)
%54 = load i32, i32* %7
%55 = bitcast %struct.sockaddr_un* %10 to %struct.sockaddr*
%56 = call i32 @bind(i32 %54, %struct.sockaddr* %55, i32 8)
store i32 %56, i32* %9
%57 = load i32, i32* %9
%58 = icmp slt i32 %57, 0
br i1 %58, label %59, label %65
59: ; preds = %41
%60 = load i32, i32* @stderr
%61 = call i32 (i32, i8*, ...) @fprintf(i32 %60, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0))
%62 = load i32, i32* @stderr
%63 = call i32 @fflush(i32 %62)
%64 = call i32 @exit(i32 1)
unreachable
65: ; preds = %41
%66 = load i32, i32* %7
%67 = call i32 @listen(i32 %66, i32 128)
store i32 %67, i32* %9
%68 = load i32, i32* %9
%69 = icmp slt i32 %68, 0
br i1 %69, label %70, label %76
70: ; preds = %65
%71 = load i32, i32* @stderr
%72 = call i32 (i32, i8*, ...) @fprintf(i32 %71, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0))
%73 = load i32, i32* @stderr
%74 = call i32 @fflush(i32 %73)
%75 = call i32 @exit(i32 1)
unreachable
76: ; preds = %65
%77 = load i8*, i8** %6
%78 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0), i8* %77)
br label %79
79: ; preds = %76, %122
store i32 8, i32* %13
%80 = load i32, i32* %7
%81 = bitcast %struct.sockaddr_un* %11 to %struct.sockaddr*
%82 = call i32 @accept(i32 %80, %struct.sockaddr* %81, i32* %13)
store i32 %82, i32* %8
%83 = load i32, i32* %8
%84 = icmp slt i32 %83, 0
br i1 %84, label %85, label %91
85: ; preds = %79
%86 = load i32, i32* @stderr
%87 = call i32 (i32, i8*, ...) @fprintf(i32 %86, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.5, i64 0, i64 0))
%88 = load i32, i32* @stderr
%89 = call i32 @fflush(i32 %88)
%90 = call i32 @exit(i32 1)
unreachable
91: ; preds = %79
br label %92
92: ; preds = %91, %121
%93 = load i32, i32* %8
%94 = getelementptr inbounds [1024 x i8], [1024 x i8]* %12, i64 0, i64 0
%95 = call i32 @recv(i32 %93, i8* %94, i32 1024, i32 0)
store i32 %95, i32* %14
%96 = load i32, i32* %14
%97 = icmp ne i32 %96, 0
br i1 %97, label %99, label %98
98: ; preds = %92
br label %122
99: ; preds = %92
%100 = load i32, i32* %14
%101 = icmp slt i32 %100, 0
br i1 %101, label %102, label %108
102: ; preds = %99
%103 = load i32, i32* @stderr
%104 = call i32 (i32, i8*, ...) @fprintf(i32 %103, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0))
%105 = load i32, i32* @stderr
%106 = call i32 @fflush(i32 %105)
%107 = call i32 @exit(i32 1)
unreachable
108: ; preds = %99
%109 = load i32, i32* %8
%110 = getelementptr inbounds [1024 x i8], [1024 x i8]* %12, i64 0, i64 0
%111 = load i32, i32* %14
%112 = call i32 @send(i32 %109, i8* %110, i32 %111, i32 0)
store i32 %112, i32* %9
%113 = load i32, i32* %9
%114 = icmp slt i32 %113, 0
br i1 %114, label %115, label %121
115: ; preds = %108
%116 = load i32, i32* @stderr
%117 = call i32 (i32, i8*, ...) @fprintf(i32 %116, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.7, i64 0, i64 0))
%118 = load i32, i32* @stderr
%119 = call i32 @fflush(i32 %118)
%120 = call i32 @exit(i32 1)
unreachable
121: ; preds = %108
br label %92
122: ; preds = %98
br label %79
}

LLVM IR (-O2):
%struct.sockaddr_un = type { i32, i32 }
%struct.sockaddr = type { i32 }
@stderr = global i32 0
@.str = [25 x i8] c"Usage: %s [socket-path]\0A\00"
@AF_UNIX = global i32 0
@SOCK_STREAM = global i32 0
@.str.1 = [25 x i8] c"Could not create socket\0A\00"
@.str.2 = [23 x i8] c"Could not bind socket\0A\00"
@.str.3 = [28 x i8] c"Could not listen on socket\0A\00"
@.str.4 = [27 x i8] c"Server is listening on %s\0A\00"
@.str.5 = [36 x i8] c"Could not establish new connection\0A\00"
@.str.6 = [20 x i8] c"Client read failed\0A\00"
@.str.7 = [21 x i8] c"Client write failed\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca %struct.sockaddr_un
%4 = alloca %struct.sockaddr_un
%5 = alloca [1024 x i8]
%6 = alloca i32
%7 = icmp slt i32 %0, 2
br i1 %7, label %8, label %15
8: ; preds = %2
%9 = load i32, i32* @stderr
%10 = load i8*, i8** %1
%11 = tail call i32 (i32, i8*, ...) @fprintf(i32 %9, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %10)
%12 = load i32, i32* @stderr
%13 = tail call i32 @fflush(i32 %12)
%14 = tail call i32 @exit(i32 1)
unreachable
15: ; preds = %2
%16 = getelementptr inbounds i8*, i8** %1, i64 1
%17 = load i8*, i8** %16
%18 = bitcast %struct.sockaddr_un* %3 to i8*
%19 = bitcast %struct.sockaddr_un* %4 to i8*
%20 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%21 = load i32, i32* @AF_UNIX
%22 = load i32, i32* @SOCK_STREAM
%23 = tail call i32 @socket(i32 %21, i32 %22, i32 0)
%24 = icmp slt i32 %23, 0
br i1 %24, label %25, label %31
25: ; preds = %15
%26 = load i32, i32* @stderr
%27 = tail call i32 (i32, i8*, ...) @fprintf(i32 %26, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
%28 = load i32, i32* @stderr
%29 = tail call i32 @fflush(i32 %28)
%30 = tail call i32 @exit(i32 1)
unreachable
31: ; preds = %15
%32 = load i32, i32* @AF_UNIX
%33 = getelementptr inbounds %struct.sockaddr_un, %struct.sockaddr_un* %3, i64 0, i32 1
store i32 %32, i32* %33
%34 = tail call i64 @strlen(i8* dereferenceable(1) %17)
%35 = add nsw i64 %34, 1
%36 = tail call i32 @strncpy(i32 undef, i8* %17, i64 %35)
%37 = tail call i32 @unlink(i32 undef)
%38 = bitcast %struct.sockaddr_un* %3 to %struct.sockaddr*
%39 = call i32 @bind(i32 %23, %struct.sockaddr* %38, i32 8)
%40 = icmp slt i32 %39, 0
br i1 %40, label %41, label %47
41: ; preds = %31
%42 = load i32, i32* @stderr
%43 = call i32 (i32, i8*, ...) @fprintf(i32 %42, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0))
%44 = load i32, i32* @stderr
%45 = call i32 @fflush(i32 %44)
%46 = call i32 @exit(i32 1)
unreachable
47: ; preds = %31
%48 = call i32 @listen(i32 %23, i32 128)
%49 = icmp slt i32 %48, 0
br i1 %49, label %50, label %56
50: ; preds = %47
%51 = load i32, i32* @stderr
%52 = call i32 (i32, i8*, ...) @fprintf(i32 %51, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0))
%53 = load i32, i32* @stderr
%54 = call i32 @fflush(i32 %53)
%55 = call i32 @exit(i32 1)
unreachable
56: ; preds = %47
%57 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0), i8* %17)
%58 = bitcast i32* %6 to i8*
%59 = bitcast %struct.sockaddr_un* %4 to %struct.sockaddr*
store i32 8, i32* %6
%60 = call i32 @accept(i32 %23, %struct.sockaddr* %59, i32* %6)
%61 = icmp slt i32 %60, 0
br i1 %61, label %64, label %62
62: ; preds = %56, %90
%63 = phi i32 [ %91, %90 ], [ %60, %56 ]
br label %70
64: ; preds = %90, %56
%65 = load i32, i32* @stderr
%66 = call i32 (i32, i8*, ...) @fprintf(i32 %65, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.5, i64 0, i64 0))
%67 = load i32, i32* @stderr
%68 = call i32 @fflush(i32 %67)
%69 = call i32 @exit(i32 1)
unreachable
70: ; preds = %62, %81
%71 = call i32 @recv(i32 %63, i8* %20, i32 1024, i32 0)
%72 = icmp eq i32 %71, 0
br i1 %72, label %90, label %73
73: ; preds = %70
%74 = icmp slt i32 %71, 0
br i1 %74, label %75, label %81
75: ; preds = %73
%76 = load i32, i32* @stderr
%77 = call i32 (i32, i8*, ...) @fprintf(i32 %76, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0))
%78 = load i32, i32* @stderr
%79 = call i32 @fflush(i32 %78)
%80 = call i32 @exit(i32 1)
unreachable
81: ; preds = %73
%82 = call i32 @send(i32 %63, i8* %20, i32 %71, i32 0)
%83 = icmp slt i32 %82, 0
br i1 %83, label %84, label %70
84: ; preds = %81
%85 = load i32, i32* @stderr
%86 = call i32 (i32, i8*, ...) @fprintf(i32 %85, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.7, i64 0, i64 0))
%87 = load i32, i32* @stderr
%88 = call i32 @fflush(i32 %87)
%89 = call i32 @exit(i32 1)
unreachable
90: ; preds = %70
store i32 8, i32* %6
%91 = call i32 @accept(i32 %23, %struct.sockaddr* %59, i32* %6)
%92 = icmp slt i32 %91, 0
br i1 %92, label %64, label %62
}