#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;
};
typedef int /*<<< orphan*/ bd;

/* Variables and functions */
int /*<<< orphan*/ AF_INET;
int /*<<< orphan*/ PF_INET;
int /*<<< orphan*/ SOCK_STREAM;
int accept(int, struct sockaddr_in *, int *);
int bind(int, struct sockaddr_in *, int);
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ dup2(int, int);
int /*<<< orphan*/ execvp(char *, char **);
int /*<<< orphan*/ exit(int);
scalar_t__ fork();
int /*<<< orphan*/ htons(int);
int /*<<< orphan*/ inet_aton(char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ listen(int, int);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *, ...);
int read(int, char *, int);
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
scalar_t__ strcmp(char *, char *);
char *strtok(char *, char *);
int /*<<< orphan*/ wait(int /*<<< orphan*/);
main() {
  int i;
  char *tokens[100];
  struct sockaddr_in bd, s;
  int sock, h, len;
  char buf[255] = "";
  sock = socket(PF_INET, SOCK_STREAM, 0);
  if (sock == -1) {
    perror("SOCKET");
    exit(1);
  }
  bd.sin_family = AF_INET;
  bd.sin_port = htons(5990);
  if (!inet_aton("127.0.0.1", &bd.sin_addr.s_addr)) {
    perror("INET_ATON");
    exit(1);
  }
  if (bind(sock, &bd, sizeof(bd)) == -1) {
    perror("BIND");
    exit(1);
  }
  printf("Démarrage du serveur.\n");
  listen(sock, 1);
  printf("Attente d'une connexion.\n");
  if ((h = accept(sock, &s, &len)) == -1) {
    perror("ACCEPT");
    exit(1);
  }
  printf("Connexion établie.\n");
  while (1) {
    len = read(h, buf, 2047);
    i = 0;
    tokens[i] = strtok(buf, " \n");
    while (tokens[i] != NULL) {
      tokens[++i] = strtok(NULL, " \n");
    }
    tokens[i] = 0;
    if (strcmp(tokens[0], "exit") == 0)
      break;
    if (fork() == 0) {
      dup2(h, 1);
      execvp(tokens[0], tokens);
      printf("Commande invalide : %s\n", tokens[0]);
      exit(1);
    }
    wait(0);
  }
  printf("\"%s\" reçu.\nFermeture du serveur.\n", buf);
  close(sock);
  close(h);
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x460,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x460(%rbp),%rdi
xor    %esi,%esi
mov    $0xff,%edx
call   1060 <memset@plt>
mov    0x2d84(%rip),%rax
mov    (%rax),%edi
mov    0x2d83(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1140 <socket@plt>
mov    %eax,-0x354(%rbp)
cmpl   $0xffffffff,-0x354(%rbp)
jne    1287 <main+0x67>
lea    0xd88(%rip),%rdi
call   10d0 <perror@plt>
mov    $0x1,%edi
call   1110 <exit@plt>
mov    0x2d5a(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x338(%rbp)
mov    $0x1766,%edi
call   1030 <htons@plt>
mov    %eax,-0x33c(%rbp)
lea    -0x340(%rbp),%rsi
lea    0xd53(%rip),%rdi
call   10a0 <inet_aton@plt>
cmp    $0x0,%eax
jne    12d8 <main+0xb8>
lea    0xd48(%rip),%rdi
call   10d0 <perror@plt>
mov    $0x1,%edi
call   1110 <exit@plt>
mov    -0x354(%rbp),%edi
lea    -0x340(%rbp),%rsi
mov    $0xc,%edx
call   10c0 <bind@plt>
cmp    $0xffffffff,%eax
jne    130e <main+0xee>
lea    0xd1c(%rip),%rdi
call   10d0 <perror@plt>
mov    $0x1,%edi
call   1110 <exit@plt>
lea    0xd0b(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x354(%rbp),%edi
mov    $0x1,%esi
call   10b0 <listen@plt>
lea    0xd05(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x354(%rbp),%edi
lea    -0x350(%rbp),%rsi
lea    -0x35c(%rbp),%rdx
call   10f0 <accept@plt>
mov    %eax,-0x358(%rbp)
cmp    $0xffffffff,%eax
jne    1378 <main+0x158>
lea    0xce9(%rip),%rdi
call   10d0 <perror@plt>
mov    $0x1,%edi
call   1110 <exit@plt>
lea    0xcda(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x358(%rbp),%edi
lea    -0x460(%rbp),%rsi
mov    $0x7ff,%edx
call   1080 <read@plt>
mov    %eax,-0x35c(%rbp)
movl   $0x0,-0x8(%rbp)
lea    -0x460(%rbp),%rdi
lea    0xcb6(%rip),%rsi
call   10e0 <strtok@plt>
mov    %rax,%rcx
movslq -0x8(%rbp),%rax
mov    %rcx,-0x330(%rbp,%rax,8)
ff
movslq -0x8(%rbp),%rax
cmpq   $0x0,-0x330(%rbp,%rax,8)
je     140a <main+0x1ea>
xor    %eax,%eax
mov    %eax,%edi
lea    0xc84(%rip),%rsi
call   10e0 <strtok@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
cltq
mov    %rcx,-0x330(%rbp,%rax,8)
ff
jmp    13cc <main+0x1ac>
movslq -0x8(%rbp),%rax
movq   $0x0,-0x330(%rbp,%rax,8)
mov    -0x330(%rbp),%rdi
lea    0xc49(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    143c <main+0x21c>
jmp    149b <main+0x27b>
mov    $0x0,%al
call   1130 <fork@plt>
cmp    $0x0,%rax
jne    148f <main+0x26f>
mov    -0x358(%rbp),%edi
mov    $0x1,%esi
call   1040 <dup2@plt>
mov    -0x330(%rbp),%rdi
lea    -0x330(%rbp),%rsi
call   1100 <execvp@plt>
mov    -0x330(%rbp),%rsi
lea    0xbf8(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x1,%edi
call   1110 <exit@plt>
xor    %edi,%edi
call   1120 <wait@plt>
jmp    1386 <main+0x166>
lea    -0x460(%rbp),%rsi
lea    0xbe5(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x354(%rbp),%edi
call   1070 <close@plt>
mov    -0x358(%rbp),%edi
call   1070 <close@plt>
xor    %edi,%edi
call   1110 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x458,%rsp
xorps  %xmm0,%xmm0
movups %xmm0,0x11f(%rsp)
movaps %xmm0,0x110(%rsp)
movaps %xmm0,0x100(%rsp)
movaps %xmm0,0xf0(%rsp)
movaps %xmm0,0xe0(%rsp)
movaps %xmm0,0xd0(%rsp)
movaps %xmm0,0xc0(%rsp)
movaps %xmm0,0xb0(%rsp)
movaps %xmm0,0xa0(%rsp)
movaps %xmm0,0x90(%rsp)
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
mov    0x2d24(%rip),%rax
mov    (%rax),%edi
mov    0x2d23(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1140 <socket@plt>
cmp    $0xffffffff,%eax
jne    12cf <main+0xaf>
lea    0xd36(%rip),%rdi
jmp    136e <main+0x14e>
mov    %eax,%r14d
mov    0x2d0f(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x18(%rsp)
mov    $0x1766,%edi
call   1040 <htons@plt>
mov    %eax,0x14(%rsp)
lea    0xd13(%rip),%rdi
lea    0x10(%rsp),%rsi
call   10a0 <inet_aton@plt>
test   %eax,%eax
jne    130b <main+0xeb>
lea    0xd08(%rip),%rdi
jmp    136e <main+0x14e>
lea    0x10(%rsp),%rsi
mov    %r14d,%edi
mov    $0xc,%edx
call   10c0 <bind@plt>
cmp    $0xffffffff,%eax
jne    132b <main+0x10b>
lea    0xcf2(%rip),%rdi
jmp    136e <main+0x14e>
lea    0xd38(%rip),%rdi
call   1030 <puts@plt>
mov    %r14d,%edi
mov    $0x1,%esi
call   10b0 <listen@plt>
lea    0xd36(%rip),%rdi
call   1030 <puts@plt>
lea    0x20(%rsp),%rsi
lea    0xc(%rsp),%rdx
mov    %r14d,%edi
call   10f0 <accept@plt>
cmp    $0xffffffff,%eax
jne    137d <main+0x15d>
lea    0xcb2(%rip),%rdi
call   10d0 <perror@plt>
mov    $0x1,%edi
call   1110 <exit@plt>
mov    %eax,%r15d
lea    0xd13(%rip),%rdi
call   1030 <puts@plt>
lea    0x30(%rsp),%r13
lea    0xc8f(%rip),%rbp
lea    0xc8b(%rip),%r12
nop
mov    %r15d,%edi
mov    %r13,%rsi
mov    $0x7ff,%edx
call   1080 <read@plt>
mov    %eax,0xc(%rsp)
mov    %r13,%rdi
mov    %rbp,%rsi
call   10e0 <strtok@plt>
mov    %rax,0x130(%rsp)
xor    %ebx,%ebx
test   %rax,%rax
je     13eb <main+0x1cb>
xchg   %ax,%ax
xor    %edi,%edi
mov    %rbp,%rsi
call   10e0 <strtok@plt>
mov    %rax,0x138(%rsp,%rbx,8)
add    $0x1,%rbx
test   %rax,%rax
jne    13d0 <main+0x1b0>
mov    %ebx,%eax
movq   $0x0,0x130(%rsp,%rax,8)
mov    0x130(%rsp),%rbx
mov    %rbx,%rdi
mov    %r12,%rsi
call   1090 <strcmp@plt>
test   %rax,%rax
je     1429 <main+0x209>
xor    %eax,%eax
call   1130 <fork@plt>
test   %rax,%rax
je     1453 <main+0x233>
xor    %edi,%edi
call   1120 <wait@plt>
jmp    13a0 <main+0x180>
lea    0xc17(%rip),%rdi
lea    0x30(%rsp),%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r14d,%edi
call   1070 <close@plt>
mov    %r15d,%edi
call   1070 <close@plt>
xor    %edi,%edi
call   1110 <exit@plt>
mov    %r15d,%edi
mov    $0x1,%esi
call   1050 <dup2@plt>
lea    0x130(%rsp),%rsi
mov    %rbx,%rdi
call   1100 <execvp@plt>
mov    0x130(%rsp),%rsi
lea    0xbb0(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0x1,%edi
call   1110 <exit@plt>

LLVM IR (-O0):
%struct.sockaddr_in = type { %struct.TYPE_2__, i32, i32 }
%struct.TYPE_2__ = type { i32 }
@PF_INET = global i32 0
@SOCK_STREAM = global i32 0
@.str = [7 x i8] c"SOCKET\00"
@AF_INET = global i32 0
@.str.1 = [10 x i8] c"127.0.0.1\00"
@.str.2 = [10 x i8] c"INET_ATON\00"
@.str.3 = [5 x i8] c"BIND\00"
@.str.4 = [24 x i8] c"D\C3\A9marrage du serveur.\0A\00"
@.str.5 = [26 x i8] c"Attente d'une connexion.\0A\00"
@.str.6 = [7 x i8] c"ACCEPT\00"
@.str.7 = [21 x i8] c"Connexion \C3\A9tablie.\0A\00"
@.str.8 = [3 x i8] c" \0A\00"
@.str.9 = [5 x i8] c"exit\00"
@.str.10 = [24 x i8] c"Commande invalide : %s\0A\00"
@.str.11 = [35 x i8] c"\22%s\22 re\C3\A7u.\0AFermeture du serveur.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [100 x i8*]
%4 = alloca %struct.sockaddr_in
%5 = alloca %struct.sockaddr_in
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca [255 x i8]
store i32 0, i32* %1
%10 = bitcast [255 x i8]* %9 to i8*
%11 = load i32, i32* @PF_INET
%12 = load i32, i32* @SOCK_STREAM
%13 = call i32 @socket(i32 %11, i32 %12, i32 0)
store i32 %13, i32* %6
%14 = load i32, i32* %6
%15 = icmp eq i32 %14, -1
br i1 %15, label %16, label %19
16: ; preds = %0
%17 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%18 = call i32 @exit(i32 1)
unreachable
19: ; preds = %0
%20 = load i32, i32* @AF_INET
%21 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %4, i32 0, i32 2
store i32 %20, i32* %21
%22 = call i32 @htons(i32 5990)
%23 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %4, i32 0, i32 1
store i32 %22, i32* %23
%24 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %4, i32 0, i32 0
%25 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %24, i32 0, i32 0
%26 = call i32 @inet_aton(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32* %25)
%27 = icmp ne i32 %26, 0
br i1 %27, label %31, label %28
28: ; preds = %19
%29 = call i32 @perror(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%30 = call i32 @exit(i32 1)
unreachable
31: ; preds = %19
%32 = load i32, i32* %6
%33 = call i32 @bind(i32 %32, %struct.sockaddr_in* %4, i32 12)
%34 = icmp eq i32 %33, -1
br i1 %34, label %35, label %38
35: ; preds = %31
%36 = call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%37 = call i32 @exit(i32 1)
unreachable
38: ; preds = %31
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0))
%40 = load i32, i32* %6
%41 = call i32 @listen(i32 %40, i32 1)
%42 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.5, i64 0, i64 0))
%43 = load i32, i32* %6
%44 = call i32 @accept(i32 %43, %struct.sockaddr_in* %5, i32* %8)
store i32 %44, i32* %7
%45 = icmp eq i32 %44, -1
br i1 %45, label %46, label %49
46: ; preds = %38
%47 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
%48 = call i32 @exit(i32 1)
unreachable
49: ; preds = %38
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.7, i64 0, i64 0))
br label %51
51: ; preds = %49, %95
%52 = load i32, i32* %7
%53 = getelementptr inbounds [255 x i8], [255 x i8]* %9, i64 0, i64 0
%54 = call i32 @read(i32 %52, i8* %53, i32 2047)
store i32 %54, i32* %8
store i32 0, i32* %2
%55 = getelementptr inbounds [255 x i8], [255 x i8]* %9, i64 0, i64 0
%56 = call i8* @strtok(i8* %55, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0))
%57 = load i32, i32* %2
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds [100 x i8*], [100 x i8*]* %3, i64 0, i64 %58
store i8* %56, i8** %59
br label %60
60: ; preds = %66, %51
%61 = load i32, i32* %2
%62 = sext i32 %61 to i64
%63 = getelementptr inbounds [100 x i8*], [100 x i8*]* %3, i64 0, i64 %62
%64 = load i8*, i8** %63
%65 = icmp ne i8* %64, null
br i1 %65, label %66, label %72
66: ; preds = %60
%67 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0))
%68 = load i32, i32* %2
%69 = add nsw i32 %68, 1
store i32 %69, i32* %2
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds [100 x i8*], [100 x i8*]* %3, i64 0, i64 %70
store i8* %67, i8** %71
br label %60
72: ; preds = %60
%73 = load i32, i32* %2
%74 = sext i32 %73 to i64
%75 = getelementptr inbounds [100 x i8*], [100 x i8*]* %3, i64 0, i64 %74
store i8* null, i8** %75
%76 = getelementptr inbounds [100 x i8*], [100 x i8*]* %3, i64 0, i64 0
%77 = load i8*, i8** %76
%78 = call i64 @strcmp(i8* %77, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0))
%79 = icmp eq i64 %78, 0
br i1 %79, label %80, label %81
80: ; preds = %72
br label %97
81: ; preds = %72
%82 = call i64 (...) @fork()
%83 = icmp eq i64 %82, 0
br i1 %83, label %84, label %95
84: ; preds = %81
%85 = load i32, i32* %7
%86 = call i32 @dup2(i32 %85, i32 1)
%87 = getelementptr inbounds [100 x i8*], [100 x i8*]* %3, i64 0, i64 0
%88 = load i8*, i8** %87
%89 = getelementptr inbounds [100 x i8*], [100 x i8*]* %3, i64 0, i64 0
%90 = call i32 @execvp(i8* %88, i8** %89)
%91 = getelementptr inbounds [100 x i8*], [100 x i8*]* %3, i64 0, i64 0
%92 = load i8*, i8** %91
%93 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.10, i64 0, i64 0), i8* %92)
%94 = call i32 @exit(i32 1)
unreachable
95: ; preds = %81
%96 = call i32 @wait(i32 0)
br label %51
97: ; preds = %80
%98 = getelementptr inbounds [255 x i8], [255 x i8]* %9, i64 0, i64 0
%99 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.11, i64 0, i64 0), i8* %98)
%100 = load i32, i32* %6
%101 = call i32 @close(i32 %100)
%102 = load i32, i32* %7
%103 = call i32 @close(i32 %102)
%104 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
%struct.sockaddr_in = type { %struct.TYPE_2__, i32, i32 }
%struct.TYPE_2__ = type { i32 }
@PF_INET = global i32 0
@SOCK_STREAM = global i32 0
@.str = [7 x i8] c"SOCKET\00"
@AF_INET = global i32 0
@.str.1 = [10 x i8] c"127.0.0.1\00"
@.str.2 = [10 x i8] c"INET_ATON\00"
@.str.3 = [5 x i8] c"BIND\00"
@.str.6 = [7 x i8] c"ACCEPT\00"
@.str.8 = [3 x i8] c" \0A\00"
@.str.9 = [5 x i8] c"exit\00"
@.str.10 = [24 x i8] c"Commande invalide : %s\0A\00"
@.str.11 = [35 x i8] c"\22%s\22 re\C3\A7u.\0AFermeture du serveur.\0A\00"
@str = [23 x i8] c"D\C3\A9marrage du serveur.\00"
@str.12 = [25 x i8] c"Attente d'une connexion.\00"
@str.13 = [20 x i8] c"Connexion \C3\A9tablie.\00"
define i32 @main() {
%1 = alloca [100 x i8*]
%2 = alloca %struct.sockaddr_in
%3 = alloca %struct.sockaddr_in
%4 = alloca i32
%5 = alloca [255 x i8]
%6 = bitcast [100 x i8*]* %1 to i8*
%7 = bitcast %struct.sockaddr_in* %2 to i8*
%8 = bitcast %struct.sockaddr_in* %3 to i8*
%9 = bitcast i32* %4 to i8*
%10 = getelementptr inbounds [255 x i8], [255 x i8]* %5, i64 0, i64 0
%11 = load i32, i32* @PF_INET
%12 = load i32, i32* @SOCK_STREAM
%13 = tail call i32 @socket(i32 %11, i32 %12, i32 0)
%14 = icmp eq i32 %13, -1
br i1 %14, label %15, label %18
15: ; preds = %0
%16 = tail call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%17 = tail call i32 @exit(i32 1)
unreachable
18: ; preds = %0
%19 = load i32, i32* @AF_INET
%20 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %2, i64 0, i32 2
store i32 %19, i32* %20
%21 = tail call i32 @htons(i32 5990)
%22 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %2, i64 0, i32 1
store i32 %21, i32* %22
%23 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %2, i64 0, i32 0, i32 0
%24 = call i32 @inet_aton(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32* %23)
%25 = icmp eq i32 %24, 0
br i1 %25, label %26, label %29
26: ; preds = %18
%27 = call i32 @perror(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%28 = call i32 @exit(i32 1)
unreachable
29: ; preds = %18
%30 = call i32 @bind(i32 %13, %struct.sockaddr_in* %2, i32 12)
%31 = icmp eq i32 %30, -1
br i1 %31, label %32, label %35
32: ; preds = %29
%33 = call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%34 = call i32 @exit(i32 1)
unreachable
35: ; preds = %29
%36 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
%37 = call i32 @listen(i32 %13, i32 1)
%38 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.12, i64 0, i64 0))
%39 = call i32 @accept(i32 %13, %struct.sockaddr_in* %3, i32* %4)
%40 = icmp eq i32 %39, -1
br i1 %40, label %41, label %44
41: ; preds = %35
%42 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
%43 = call i32 @exit(i32 1)
unreachable
44: ; preds = %35
%45 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.13, i64 0, i64 0))
%46 = getelementptr inbounds [100 x i8*], [100 x i8*]* %1, i64 0, i64 0
br label %47
47: ; preds = %73, %44
%48 = call i32 @read(i32 %39, i8* %10, i32 2047)
store i32 %48, i32* %4
%49 = call i8* @strtok(i8* %10, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0))
store i8* %49, i8** %46
%50 = icmp eq i8* %49, null
br i1 %50, label %57, label %51
51: ; preds = %47, %51
%52 = phi i64 [ %54, %51 ], [ 0, %47 ]
%53 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0))
%54 = add nuw nsw i64 %52, 1
%55 = getelementptr inbounds [100 x i8*], [100 x i8*]* %1, i64 0, i64 %54
store i8* %53, i8** %55
%56 = icmp eq i8* %53, null
br i1 %56, label %57, label %51
57: ; preds = %51, %47
%58 = phi i64 [ 0, %47 ], [ %54, %51 ]
%59 = and i64 %58, 4294967295
%60 = getelementptr inbounds [100 x i8*], [100 x i8*]* %1, i64 0, i64 %59
store i8* null, i8** %60
%61 = load i8*, i8** %46
%62 = call i64 @strcmp(i8* %61, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0))
%63 = icmp eq i64 %62, 0
br i1 %63, label %75, label %64
64: ; preds = %57
%65 = call i64 (...) @fork()
%66 = icmp eq i64 %65, 0
br i1 %66, label %67, label %73
67: ; preds = %64
%68 = call i32 @dup2(i32 %39, i32 1)
%69 = call i32 @execvp(i8* %61, i8** %46)
%70 = load i8*, i8** %46
%71 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.10, i64 0, i64 0), i8* %70)
%72 = call i32 @exit(i32 1)
unreachable
73: ; preds = %64
%74 = call i32 @wait(i32 0)
br label %47
75: ; preds = %57
%76 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.11, i64 0, i64 0), i8* %10)
%77 = call i32 @close(i32 %13)
%78 = call i32 @close(i32 %39)
%79 = call i32 @exit(i32 0)
unreachable
}