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

/* 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*/ close(int);
int /*<<< orphan*/ exit(int);
int listen(int, int);
int /*<<< orphan*/ perror(char *);
int recv(int, char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ send(int, char *, int, int /*<<< orphan*/);
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ strcpy(int /*<<< orphan*/, char *);
int strlen(int /*<<< orphan*/);
scalar_t__ strncmp(char *, char *, int);
char *strtok(char *, char *);
int /*<<< orphan*/ unlink(char *);
int main(void) {
  int s, s2, t, len;
  struct sockaddr_un local, remote;
  char str[1024];
  unlink("/tmp/weborf_auth.socket");
  if ((s = socket(AF_UNIX, SOCK_STREAM, 0)) == -1) {
    perror("socket");
    exit(1);
  }
  local.sun_family = AF_UNIX;
  strcpy(local.sun_path, "/tmp/weborf_auth.socket");
  unlink("/tmp/weborf_auth.socket");
  len = strlen(local.sun_path) + sizeof(local.sun_family);
  if (bind(s, (struct sockaddr *)&local, len) == -1) {
    perror("bind");
    exit(1);
  }
  if (listen(s, 5) == -1) {
    perror("listen");
    exit(1);
  }
  for (;;) {
    t = sizeof(remote);
    if ((s2 = accept(s, (struct sockaddr *)&remote, &t)) == -1) {
      perror("accept");
      exit(1);
    }
    t = recv(s2, str, 1024, 0);
    str[t] = '\0';
    char *uri = strtok(str, "\r\n");
    char *ip = strtok(NULL, "\r\n");
    char *method = strtok(NULL, "\r\n");
    if (strncmp(method, "GET", 3) == 0 || strncmp(method, "POST", 4) == 0 ||
        strncmp(method, "OPTIONS", 7)) {
      close(s2);
    } else if (strncmp(method, "PROPFIND", 8) == 0 ||
               strncmp(method, "PUT", 3) == 0 ||
               strncmp(method, "MKCOL", 5) == 0) {
      if (strncmp(ip, "::ffff:10.0.", 12) != 0)
        send(s2, "c", 1, 0);
      close(s2);
    } else {
      send(s2, "c", 1, 0);
      close(s2);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x450,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe07(%rip),%rdi
call   1040 <unlink@plt>
mov    0x2de3(%rip),%rax
mov    (%rax),%edi
mov    0x2dca(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1100 <socket@plt>
mov    %eax,-0x8(%rbp)
cmp    $0xffffffff,%eax
jne    1239 <main+0x59>
lea    0xde7(%rip),%rdi
call   10c0 <perror@plt>
mov    $0x1,%edi
call   10f0 <exit@plt>
mov    0x2da8(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x20(%rbp),%edi
lea    0xdb1(%rip),%rsi
call   1060 <strcpy@plt>
lea    0xda5(%rip),%rdi
call   1040 <unlink@plt>
mov    -0x20(%rbp),%edi
call   1070 <strlen@plt>
cltq
add    $0x4,%rax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%edi
lea    -0x20(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   10b0 <bind@plt>
cmp    $0xffffffff,%eax
jne    129f <main+0xbf>
lea    0xd88(%rip),%rdi
call   10c0 <perror@plt>
mov    $0x1,%edi
call   10f0 <exit@plt>
mov    -0x8(%rbp),%edi
mov    $0x5,%esi
call   10a0 <listen@plt>
cmp    $0xffffffff,%eax
jne    12cb <main+0xeb>
lea    0xd61(%rip),%rdi
call   10c0 <perror@plt>
mov    $0x1,%edi
call   10f0 <exit@plt>
jmp    12d0 <main+0xf0>
movl   $0x8,-0x10(%rbp)
mov    -0x8(%rbp),%edi
lea    -0x28(%rbp),%rsi
lea    -0x10(%rbp),%rdx
call   10e0 <accept@plt>
mov    %eax,-0xc(%rbp)
cmp    $0xffffffff,%eax
jne    1309 <main+0x129>
lea    0xd2a(%rip),%rdi
call   10c0 <perror@plt>
mov    $0x1,%edi
call   10f0 <exit@plt>
mov    -0xc(%rbp),%edi
lea    -0x430(%rbp),%rsi
mov    $0x400,%edx
xor    %ecx,%ecx
call   1030 <recv@plt>
mov    %eax,-0x10(%rbp)
movslq -0x10(%rbp),%rax
movb   $0x0,-0x430(%rbp,%rax,1)
lea    -0x430(%rbp),%rdi
lea    0xcef(%rip),%rsi
call   10d0 <strtok@plt>
mov    %rax,-0x438(%rbp)
xor    %eax,%eax
mov    %eax,%edi
lea    0xcd8(%rip),%rsi
call   10d0 <strtok@plt>
mov    %rax,-0x440(%rbp)
xor    %eax,%eax
mov    %eax,%edi
lea    0xcc1(%rip),%rsi
call   10d0 <strtok@plt>
mov    %rax,-0x448(%rbp)
mov    -0x448(%rbp),%rdi
lea    0xcaa(%rip),%rsi
mov    $0x3,%edx
call   1050 <strncmp@plt>
cmp    $0x0,%rax
je     13dc <main+0x1fc>
mov    -0x448(%rbp),%rdi
lea    0xc8c(%rip),%rsi
mov    $0x4,%edx
call   1050 <strncmp@plt>
cmp    $0x0,%rax
je     13dc <main+0x1fc>
mov    -0x448(%rbp),%rdi
lea    0xc6f(%rip),%rsi
mov    $0x7,%edx
call   1050 <strncmp@plt>
cmp    $0x0,%rax
je     13e9 <main+0x209>
mov    -0xc(%rbp),%edi
call   1090 <close@plt>
jmp    14b7 <main+0x2d7>
mov    -0x448(%rbp),%rdi
lea    0xc48(%rip),%rsi
mov    $0x8,%edx
call   1050 <strncmp@plt>
cmp    $0x0,%rax
je     144f <main+0x26f>
mov    -0x448(%rbp),%rdi
lea    0xc2f(%rip),%rsi
mov    $0x3,%edx
call   1050 <strncmp@plt>
cmp    $0x0,%rax
je     144f <main+0x26f>
mov    -0x448(%rbp),%rdi
lea    0xc11(%rip),%rsi
mov    $0x5,%edx
call   1050 <strncmp@plt>
cmp    $0x0,%rax
jne    1494 <main+0x2b4>
mov    -0x440(%rbp),%rdi
lea    0xbf5(%rip),%rsi
mov    $0xc,%edx
call   1050 <strncmp@plt>
cmp    $0x0,%rax
je     1487 <main+0x2a7>
mov    -0xc(%rbp),%edi
lea    0xbe4(%rip),%rsi
mov    $0x1,%edx
xor    %ecx,%ecx
call   1080 <send@plt>
mov    -0xc(%rbp),%edi
call   1090 <close@plt>
jmp    14b2 <main+0x2d2>
mov    -0xc(%rbp),%edi
lea    0xbc1(%rip),%rsi
mov    $0x1,%edx
xor    %ecx,%ecx
call   1080 <send@plt>
mov    -0xc(%rbp),%edi
call   1090 <close@plt>
jmp    14b7 <main+0x2d7>
jmp    12d0 <main+0xf0>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x428,%rsp
lea    0xe08(%rip),%rdi
call   1040 <unlink@plt>
mov    0x2de4(%rip),%rbx
mov    (%rbx),%edi
mov    0x2dcb(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1100 <socket@plt>
cmp    $0xffffffff,%eax
jne    1227 <main+0x47>
lea    0xdef(%rip),%rdi
jmp    12ab <main+0xcb>
mov    %eax,%r14d
mov    (%rbx),%eax
mov    %eax,0x1c(%rsp)
lea    0xdc9(%rip),%rbx
mov    %rbx,%rsi
call   1060 <strcpy@plt>
mov    %rbx,%rdi
call   1040 <unlink@plt>
call   1070 <strlen@plt>
lea    0x4(%rax),%edx
lea    0x18(%rsp),%rsi
mov    %r14d,%edi
call   10b0 <bind@plt>
cmp    $0xffffffff,%eax
jne    126a <main+0x8a>
lea    0xdb0(%rip),%rdi
jmp    12ab <main+0xcb>
mov    %r14d,%edi
mov    $0x5,%esi
call   10a0 <listen@plt>
cmp    $0xffffffff,%eax
jne    1285 <main+0xa5>
lea    0xd9a(%rip),%rdi
jmp    12ab <main+0xcb>
movl   $0x8,0xc(%rsp)
lea    0x10(%rsp),%rsi
lea    0xc(%rsp),%rdx
mov    %r14d,%edi
call   10e0 <accept@plt>
cmp    $0xffffffff,%eax
jne    12ba <main+0xda>
lea    0xd79(%rip),%rdi
call   10c0 <perror@plt>
mov    $0x1,%edi
call   10f0 <exit@plt>
mov    %eax,%ebx
lea    0x20(%rsp),%r12
lea    0xd63(%rip),%rbp
jmp    132c <main+0x14c>
mov    %r13,%rdi
lea    0xd7e(%rip),%rsi
mov    $0xc,%edx
call   1050 <strncmp@plt>
test   %rax,%rax
je     1300 <main+0x120>
mov    %ebx,%edi
lea    0xd73(%rip),%rsi
mov    $0x1,%edx
xor    %ecx,%ecx
call   1080 <send@plt>
nopl   0x0(%rax,%rax,1)
mov    %ebx,%edi
call   1090 <close@plt>
movl   $0x8,0xc(%rsp)
mov    %r14d,%edi
lea    0x10(%rsp),%rsi
lea    0xc(%rsp),%rdx
call   10e0 <accept@plt>
mov    %eax,%ebx
cmp    $0xffffffff,%eax
je     12a4 <main+0xc4>
mov    %ebx,%edi
mov    %r12,%rsi
mov    $0x400,%edx
xor    %ecx,%ecx
call   1030 <recv@plt>
mov    %eax,0xc(%rsp)
cltq
movb   $0x0,0x20(%rsp,%rax,1)
mov    %r12,%rdi
mov    %rbp,%rsi
call   10d0 <strtok@plt>
xor    %edi,%edi
mov    %rbp,%rsi
call   10d0 <strtok@plt>
mov    %rax,%r13
xor    %edi,%edi
mov    %rbp,%rsi
call   10d0 <strtok@plt>
mov    %rax,%r15
mov    %rax,%rdi
lea    0xcb7(%rip),%rsi
mov    $0x3,%edx
call   1050 <strncmp@plt>
test   %rax,%rax
je     1300 <main+0x120>
mov    %r15,%rdi
lea    0xc9e(%rip),%rsi
mov    $0x4,%edx
call   1050 <strncmp@plt>
test   %rax,%rax
je     1300 <main+0x120>
mov    %r15,%rdi
lea    0xc86(%rip),%rsi
mov    $0x7,%edx
call   1050 <strncmp@plt>
test   %rax,%rax
jne    1300 <main+0x120>
mov    %r15,%rdi
lea    0xc71(%rip),%rsi
mov    $0x8,%edx
call   1050 <strncmp@plt>
test   %rax,%rax
je     12ca <main+0xea>
mov    %r15,%rdi
lea    0xc5d(%rip),%rsi
mov    $0x3,%edx
call   1050 <strncmp@plt>
test   %rax,%rax
je     12ca <main+0xea>
mov    %r15,%rdi
lea    0xc44(%rip),%rsi
mov    $0x5,%edx
call   1050 <strncmp@plt>
test   %rax,%rax
jne    12e3 <main+0x103>
jmp    12ca <main+0xea>

LLVM IR (-O0):
%struct.sockaddr_un = type { i32, i32 }
%struct.sockaddr = type { i32 }
@.str = [24 x i8] c"/tmp/weborf_auth.socket\00"
@AF_UNIX = global i32 0
@SOCK_STREAM = global i32 0
@.str.1 = [7 x i8] c"socket\00"
@.str.2 = [5 x i8] c"bind\00"
@.str.3 = [7 x i8] c"listen\00"
@.str.4 = [7 x i8] c"accept\00"
@.str.5 = [3 x i8] c"\0D\0A\00"
@.str.6 = [4 x i8] c"GET\00"
@.str.7 = [5 x i8] c"POST\00"
@.str.8 = [8 x i8] c"OPTIONS\00"
@.str.9 = [9 x i8] c"PROPFIND\00"
@.str.10 = [4 x i8] c"PUT\00"
@.str.11 = [6 x i8] c"MKCOL\00"
@.str.12 = [13 x i8] c"::ffff:10.0.\00"
@.str.13 = [2 x i8] c"c\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca %struct.sockaddr_un
%7 = alloca %struct.sockaddr_un
%8 = alloca [1024 x i8]
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
store i32 0, i32* %1
%12 = call i32 @unlink(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%13 = load i32, i32* @AF_UNIX
%14 = load i32, i32* @SOCK_STREAM
%15 = call i32 @socket(i32 %13, i32 %14, i32 0)
store i32 %15, i32* %2
%16 = icmp eq i32 %15, -1
br i1 %16, label %17, label %20
17: ; preds = %0
%18 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%19 = call i32 @exit(i32 1)
unreachable
20: ; preds = %0
%21 = load i32, i32* @AF_UNIX
%22 = getelementptr inbounds %struct.sockaddr_un, %struct.sockaddr_un* %6, i32 0, i32 1
store i32 %21, i32* %22
%23 = getelementptr inbounds %struct.sockaddr_un, %struct.sockaddr_un* %6, i32 0, i32 0
%24 = load i32, i32* %23
%25 = call i32 @strcpy(i32 %24, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%26 = call i32 @unlink(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%27 = getelementptr inbounds %struct.sockaddr_un, %struct.sockaddr_un* %6, i32 0, i32 0
%28 = load i32, i32* %27
%29 = call i32 @strlen(i32 %28)
%30 = sext i32 %29 to i64
%31 = add i64 %30, 4
%32 = trunc i64 %31 to i32
store i32 %32, i32* %5
%33 = load i32, i32* %2
%34 = bitcast %struct.sockaddr_un* %6 to %struct.sockaddr*
%35 = load i32, i32* %5
%36 = call i32 @bind(i32 %33, %struct.sockaddr* %34, i32 %35)
%37 = icmp eq i32 %36, -1
br i1 %37, label %38, label %41
38: ; preds = %20
%39 = call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%40 = call i32 @exit(i32 1)
unreachable
41: ; preds = %20
%42 = load i32, i32* %2
%43 = call i32 @listen(i32 %42, i32 5)
%44 = icmp eq i32 %43, -1
br i1 %44, label %45, label %48
45: ; preds = %41
%46 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
%47 = call i32 @exit(i32 1)
unreachable
48: ; preds = %41
br label %49
49: ; preds = %110, %48
store i32 8, i32* %4
%50 = load i32, i32* %2
%51 = bitcast %struct.sockaddr_un* %7 to %struct.sockaddr*
%52 = call i32 @accept(i32 %50, %struct.sockaddr* %51, i32* %4)
store i32 %52, i32* %3
%53 = icmp eq i32 %52, -1
br i1 %53, label %54, label %57
54: ; preds = %49
%55 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%56 = call i32 @exit(i32 1)
unreachable
57: ; preds = %49
%58 = load i32, i32* %3
%59 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%60 = call i32 @recv(i32 %58, i8* %59, i32 1024, i32 0)
store i32 %60, i32* %4
%61 = load i32, i32* %4
%62 = sext i32 %61 to i64
%63 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 %62
store i8 0, i8* %63
%64 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%65 = call i8* @strtok(i8* %64, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
store i8* %65, i8** %9
%66 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
store i8* %66, i8** %10
%67 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
store i8* %67, i8** %11
%68 = load i8*, i8** %11
%69 = call i64 @strncmp(i8* %68, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i32 3)
%70 = icmp eq i64 %69, 0
br i1 %70, label %79, label %71
71: ; preds = %57
%72 = load i8*, i8** %11
%73 = call i64 @strncmp(i8* %72, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i32 4)
%74 = icmp eq i64 %73, 0
br i1 %74, label %79, label %75
75: ; preds = %71
%76 = load i8*, i8** %11
%77 = call i64 @strncmp(i8* %76, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0), i32 7)
%78 = icmp ne i64 %77, 0
br i1 %78, label %79, label %82
79: ; preds = %75, %71, %57
%80 = load i32, i32* %3
%81 = call i32 @close(i32 %80)
br label %110
82: ; preds = %75
%83 = load i8*, i8** %11
%84 = call i64 @strncmp(i8* %83, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0), i32 8)
%85 = icmp eq i64 %84, 0
br i1 %85, label %94, label %86
86: ; preds = %82
%87 = load i8*, i8** %11
%88 = call i64 @strncmp(i8* %87, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i32 3)
%89 = icmp eq i64 %88, 0
br i1 %89, label %94, label %90
90: ; preds = %86
%91 = load i8*, i8** %11
%92 = call i64 @strncmp(i8* %91, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.11, i64 0, i64 0), i32 5)
%93 = icmp eq i64 %92, 0
br i1 %93, label %94, label %104
94: ; preds = %90, %86, %82
%95 = load i8*, i8** %10
%96 = call i64 @strncmp(i8* %95, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.12, i64 0, i64 0), i32 12)
%97 = icmp ne i64 %96, 0
br i1 %97, label %98, label %101
98: ; preds = %94
%99 = load i32, i32* %3
%100 = call i32 @send(i32 %99, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0), i32 1, i32 0)
br label %101
101: ; preds = %98, %94
%102 = load i32, i32* %3
%103 = call i32 @close(i32 %102)
br label %109
104: ; preds = %90
%105 = load i32, i32* %3
%106 = call i32 @send(i32 %105, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0), i32 1, i32 0)
%107 = load i32, i32* %3
%108 = call i32 @close(i32 %107)
br label %109
109: ; preds = %104, %101
br label %110
110: ; preds = %109, %79
br label %49
}

LLVM IR (-O2):
%struct.sockaddr_un = type { i32, i32 }
%struct.sockaddr = type { i32 }
@.str = [24 x i8] c"/tmp/weborf_auth.socket\00"
@AF_UNIX = global i32 0
@SOCK_STREAM = global i32 0
@.str.1 = [7 x i8] c"socket\00"
@.str.2 = [5 x i8] c"bind\00"
@.str.3 = [7 x i8] c"listen\00"
@.str.4 = [7 x i8] c"accept\00"
@.str.5 = [3 x i8] c"\0D\0A\00"
@.str.6 = [4 x i8] c"GET\00"
@.str.7 = [5 x i8] c"POST\00"
@.str.8 = [8 x i8] c"OPTIONS\00"
@.str.9 = [9 x i8] c"PROPFIND\00"
@.str.10 = [4 x i8] c"PUT\00"
@.str.11 = [6 x i8] c"MKCOL\00"
@.str.12 = [13 x i8] c"::ffff:10.0.\00"
@.str.13 = [2 x i8] c"c\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.sockaddr_un
%3 = alloca %struct.sockaddr_un
%4 = alloca [1024 x i8]
%5 = bitcast i32* %1 to i8*
%6 = bitcast %struct.sockaddr_un* %2 to i8*
%7 = bitcast %struct.sockaddr_un* %3 to i8*
%8 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%9 = tail call i32 @unlink(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%10 = load i32, i32* @AF_UNIX
%11 = load i32, i32* @SOCK_STREAM
%12 = tail call i32 @socket(i32 %10, i32 %11, i32 0)
%13 = icmp eq i32 %12, -1
br i1 %13, label %14, label %17
14: ; preds = %0
%15 = tail call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%16 = tail call i32 @exit(i32 1)
unreachable
17: ; preds = %0
%18 = load i32, i32* @AF_UNIX
%19 = getelementptr inbounds %struct.sockaddr_un, %struct.sockaddr_un* %2, i64 0, i32 1
store i32 %18, i32* %19
%20 = tail call i32 @strcpy(i32 undef, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%21 = tail call i32 @unlink(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%22 = tail call i32 @strlen(i32 undef)
%23 = add i32 %22, 4
%24 = bitcast %struct.sockaddr_un* %2 to %struct.sockaddr*
%25 = call i32 @bind(i32 %12, %struct.sockaddr* %24, i32 %23)
%26 = icmp eq i32 %25, -1
br i1 %26, label %27, label %30
27: ; preds = %17
%28 = call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%29 = call i32 @exit(i32 1)
unreachable
30: ; preds = %17
%31 = call i32 @listen(i32 %12, i32 5)
%32 = icmp eq i32 %31, -1
br i1 %32, label %37, label %33
33: ; preds = %30
%34 = bitcast %struct.sockaddr_un* %3 to %struct.sockaddr*
store i32 8, i32* %1
%35 = call i32 @accept(i32 %12, %struct.sockaddr* %34, i32* %1)
%36 = icmp eq i32 %35, -1
br i1 %36, label %40, label %43
37: ; preds = %30
%38 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
%39 = call i32 @exit(i32 1)
unreachable
40: ; preds = %73, %33
%41 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%42 = call i32 @exit(i32 1)
unreachable
43: ; preds = %33, %73
%44 = phi i32 [ %75, %73 ], [ %35, %33 ]
%45 = call i32 @recv(i32 %44, i8* %8, i32 1024, i32 0)
store i32 %45, i32* %1
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 %46
store i8 0, i8* %47
%48 = call i8* @strtok(i8* %8, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
%49 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
%50 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
%51 = call i64 @strncmp(i8* %50, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i32 3)
%52 = icmp eq i64 %51, 0
br i1 %52, label %73, label %53
53: ; preds = %43
%54 = call i64 @strncmp(i8* %50, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i32 4)
%55 = icmp eq i64 %54, 0
br i1 %55, label %73, label %56
56: ; preds = %53
%57 = call i64 @strncmp(i8* %50, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0), i32 7)
%58 = icmp eq i64 %57, 0
br i1 %58, label %59, label %73
59: ; preds = %56
%60 = call i64 @strncmp(i8* %50, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0), i32 8)
%61 = icmp eq i64 %60, 0
br i1 %61, label %68, label %62
62: ; preds = %59
%63 = call i64 @strncmp(i8* %50, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i32 3)
%64 = icmp eq i64 %63, 0
br i1 %64, label %68, label %65
65: ; preds = %62
%66 = call i64 @strncmp(i8* %50, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.11, i64 0, i64 0), i32 5)
%67 = icmp eq i64 %66, 0
br i1 %67, label %68, label %71
68: ; preds = %65, %62, %59
%69 = call i64 @strncmp(i8* %49, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.12, i64 0, i64 0), i32 12)
%70 = icmp eq i64 %69, 0
br i1 %70, label %73, label %71
71: ; preds = %65, %68
%72 = call i32 @send(i32 %44, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0), i32 1, i32 0)
br label %73
73: ; preds = %71, %68, %43, %53, %56
%74 = call i32 @close(i32 %44)
store i32 8, i32* %1
%75 = call i32 @accept(i32 %12, %struct.sockaddr* %34, i32* %1)
%76 = icmp eq i32 %75, -1
br i1 %76, label %40, label %43
}