#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_in {
  void *sin_port;
  int /*<<< orphan*/ sin_addr;
  int /*<<< orphan*/ sin_family;
};
struct sockaddr {
  int dummy;
};
typedef int /*<<< orphan*/ sockaddr;
typedef scalar_t__ pid_t;

/* Variables and functions */
int /*<<< orphan*/ AF_INET;
scalar_t__ EADDRINUSE;
int /*<<< orphan*/ SOCK_STREAM;
int accept(int, int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int atoi(char *);
int bind(int, struct sockaddr *, int);
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ connect(int, struct sockaddr *, int);
scalar_t__ errno;
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
scalar_t__ fork();
void *htons(int);
int /*<<< orphan*/ inet_aton(char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ listen(int, int);
int /*<<< orphan*/ memset(struct sockaddr_in *, int /*<<< orphan*/, int);
int ntohs(void *);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *);
int read(int, char *, int);
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
int write(int, char *, int);
int main(int argc, char *argv[]) {
  int port = (argc == 2 ? atoi(argv[1]) : 6500);
  struct sockaddr_in sockaddr;
  int listener_sd, rc;
  pid_t pid;
  memset(&sockaddr, 0, sizeof(sockaddr));
  sockaddr.sin_family = AF_INET;
  inet_aton("127.0.0.1", &sockaddr.sin_addr);
  sockaddr.sin_port = htons(port);
  listener_sd = socket(AF_INET, SOCK_STREAM, 0);
  do {
    sockaddr.sin_port = htons(ntohs(sockaddr.sin_port) + 1);
    rc = bind(listener_sd, (struct sockaddr *)&sockaddr, sizeof(sockaddr));
  } while (rc == -1 && errno == EADDRINUSE);
  if (rc == -1) {
    perror("bind");
  }
  listen(listener_sd, 5);
  pid = fork();
  if (pid) {
    int sd;
    int i = 0;
    char byte;
    close(listener_sd);
    sd = socket(AF_INET, SOCK_STREAM, 0);
    connect(sd, (struct sockaddr *)&sockaddr, sizeof(sockaddr));
    while (1) {
      if (i++ % 1000 == 0) {
        printf(".");
        fflush(stdout);
      }
      if (i % 50000 == 0) {
        printf("\n");
      }
      while (write(sd, &byte, 1) != 1) {
      }
      while (read(sd, &byte, 1) != 1) {
      }
    }
  } else {
    int sd;
    char byte;
    sd = accept(listener_sd, NULL, NULL);
    while (1) {
      while (read(sd, &byte, 1) != 1) {
      }
      while (write(sd, &byte, 1) != 1) {
      }
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jne    1245 <main+0x35>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1100 <atoi@plt>
mov    %eax,-0x50(%rbp)
jmp    1252 <main+0x42>
mov    $0x1964,%eax
mov    %eax,-0x50(%rbp)
jmp    1252 <main+0x42>
mov    -0x50(%rbp),%eax
mov    %eax,-0x14(%rbp)
lea    -0x28(%rbp),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1060 <memset@plt>
mov    0x2d79(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
lea    -0x28(%rbp),%rsi
add    $0x8,%rsi
lea    0xd7d(%rip),%rdi
call   1090 <inet_aton@plt>
mov    -0x14(%rbp),%edi
call   1040 <htons@plt>
mov    %rax,-0x28(%rbp)
mov    0x2d4d(%rip),%rax
mov    (%rax),%edi
mov    0x2d34(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1130 <socket@plt>
mov    %eax,-0x2c(%rbp)
mov    -0x28(%rbp),%rdi
call   10c0 <ntohs@plt>
mov    %eax,%edi
add    $0x1,%edi
call   1040 <htons@plt>
mov    %rax,-0x28(%rbp)
mov    -0x2c(%rbp),%edi
lea    -0x28(%rbp),%rsi
mov    $0x10,%edx
call   10d0 <bind@plt>
mov    %eax,-0x30(%rbp)
xor    %eax,%eax
cmpl   $0xffffffff,-0x30(%rbp)
mov    %al,-0x51(%rbp)
jne    1304 <main+0xf4>
mov    0x2cd7(%rip),%rax
mov    (%rax),%rax
mov    0x2cd5(%rip),%rcx
cmp    (%rcx),%rax
sete   %al
mov    %al,-0x51(%rbp)
mov    -0x51(%rbp),%al
test   $0x1,%al
jne    12b0 <main+0xa0>
cmpl   $0xffffffff,-0x30(%rbp)
jne    1325 <main+0x115>
lea    0xcea(%rip),%rdi
call   10e0 <perror@plt>
mov    -0x2c(%rbp),%edi
mov    $0x5,%esi
call   10b0 <listen@plt>
mov    $0x0,%al
call   1120 <fork@plt>
mov    %rax,-0x38(%rbp)
cmpq   $0x0,-0x38(%rbp)
je     1427 <main+0x217>
movl   $0x0,-0x40(%rbp)
mov    -0x2c(%rbp),%edi
call   1070 <close@plt>
mov    0x2c8a(%rip),%rax
mov    (%rax),%edi
mov    0x2c71(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1130 <socket@plt>
mov    %eax,-0x3c(%rbp)
mov    -0x3c(%rbp),%edi
lea    -0x28(%rbp),%rsi
mov    $0x10,%edx
call   1110 <connect@plt>
mov    -0x40(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x40(%rbp)
mov    $0x3e8,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    13ba <main+0x1aa>
lea    0xc68(%rip),%rdi
call   1050 <printf@plt>
mov    0x2c0d(%rip),%rax
mov    (%rax),%edi
call   10a0 <fflush@plt>
mov    -0x40(%rbp),%eax
mov    $0xc350,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    13da <main+0x1ca>
lea    0xc3c(%rip),%rdi
call   1050 <printf@plt>
jmp    13df <main+0x1cf>
mov    -0x3c(%rbp),%edi
lea    -0x41(%rbp),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
cmp    $0x1,%eax
je     13fe <main+0x1ee>
jmp    13df <main+0x1cf>
jmp    1403 <main+0x1f3>
mov    -0x3c(%rbp),%edi
lea    -0x41(%rbp),%rsi
mov    $0x1,%edx
call   1080 <read@plt>
cmp    $0x1,%eax
je     1422 <main+0x212>
jmp    1403 <main+0x1f3>
jmp    1384 <main+0x174>
mov    -0x2c(%rbp),%edi
xor    %eax,%eax
mov    %eax,%edx
mov    %rdx,%rsi
call   10f0 <accept@plt>
mov    %eax,-0x48(%rbp)
jmp    143e <main+0x22e>
mov    -0x48(%rbp),%edi
lea    -0x49(%rbp),%rsi
mov    $0x1,%edx
call   1080 <read@plt>
cmp    $0x1,%eax
je     145d <main+0x24d>
jmp    143e <main+0x22e>
jmp    1462 <main+0x252>
mov    -0x48(%rbp),%edi
lea    -0x49(%rbp),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
cmp    $0x1,%eax
je     1481 <main+0x271>
jmp    1462 <main+0x252>
jmp    1439 <main+0x229>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    $0x1964,%ebx
cmp    $0x2,%edi
jne    1233 <main+0x23>
mov    0x8(%rsi),%rdi
call   1100 <atoi@plt>
mov    %eax,%ebx
lea    0x8(%rsp),%r14
mov    %r14,%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1060 <memset@plt>
mov    0x2d9a(%rip),%r15
mov    (%r15),%eax
mov    %eax,0x14(%rsp)
lea    0x10(%rsp),%rsi
lea    0xd9f(%rip),%rdi
call   1090 <inet_aton@plt>
mov    %ebx,%edi
call   1050 <htons@plt>
mov    %rax,0x8(%rsp)
mov    (%r15),%edi
mov    0x2d5c(%rip),%r12
mov    (%r12),%esi
xor    %edx,%edx
call   1130 <socket@plt>
mov    %eax,%ebx
mov    0x2d38(%rip),%r13
mov    0x2d39(%rip),%rbp
nopw   0x0(%rax,%rax,1)
mov    0x8(%rsp),%rdi
call   10c0 <ntohs@plt>
lea    0x1(%rax),%edi
call   1050 <htons@plt>
mov    %rax,0x8(%rsp)
mov    %ebx,%edi
mov    %r14,%rsi
mov    $0x10,%edx
call   10d0 <bind@plt>
cmp    $0xffffffff,%eax
jne    12d5 <main+0xc5>
mov    0x0(%rbp),%rcx
cmp    %rcx,0x0(%r13)
je     12a0 <main+0x90>
cmp    $0xffffffff,%eax
je     13f6 <main+0x1e6>
mov    %ebx,%edi
mov    $0x5,%esi
call   10b0 <listen@plt>
xor    %ebp,%ebp
xor    %eax,%eax
call   1120 <fork@plt>
mov    %ebx,%edi
test   %rax,%rax
je     13a6 <main+0x196>
call   1070 <close@plt>
mov    (%r15),%edi
mov    (%r12),%esi
xor    %edx,%edx
call   1130 <socket@plt>
mov    %eax,%ebx
lea    0x8(%rsp),%rsi
mov    %eax,%edi
mov    $0x10,%edx
call   1110 <connect@plt>
mov    0x2c95(%rip),%r15
lea    0x7(%rsp),%r14
imul   $0x26e978d5,%ebp,%eax
ror    $0x3,%eax
cmp    $0x418937,%eax
ja     1352 <main+0x142>
mov    $0x2e,%edi
call   1030 <putchar@plt>
mov    (%r15),%edi
call   10a0 <fflush@plt>
add    $0x1,%ebp
imul   $0xbcbe61d,%ebp,%eax
ror    $0x4,%eax
cmp    $0x14f8b,%eax
ja     1370 <main+0x160>
mov    $0xa,%edi
call   1030 <putchar@plt>
nop
mov    %ebx,%edi
mov    %r14,%rsi
mov    $0x1,%edx
call   1040 <write@plt>
cmp    $0x1,%eax
jne    1370 <main+0x160>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %ebx,%edi
mov    %r14,%rsi
mov    $0x1,%edx
call   1080 <read@plt>
cmp    $0x1,%eax
jne    1390 <main+0x180>
jmp    1330 <main+0x120>
xor    %esi,%esi
xor    %edx,%edx
call   10f0 <accept@plt>
mov    %eax,%ebx
lea    0x7(%rsp),%r14
cs nopw 0x0(%rax,%rax,1)
mov    %ebx,%edi
mov    %r14,%rsi
mov    $0x1,%edx
call   1080 <read@plt>
cmp    $0x1,%eax
jne    13c0 <main+0x1b0>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %ebx,%edi
mov    %r14,%rsi
mov    $0x1,%edx
call   1040 <write@plt>
cmp    $0x1,%eax
jne    13e0 <main+0x1d0>
jmp    13c0 <main+0x1b0>
lea    0xc0d(%rip),%rdi
call   10e0 <perror@plt>
jmp    12de <main+0xce>

LLVM IR (-O0):
%struct.sockaddr_in = type { i8*, i32, i32 }
%struct.sockaddr = type { i32 }
@AF_INET = global i32 0
@.str = [10 x i8] c"127.0.0.1\00"
@SOCK_STREAM = global i32 0
@errno = global i64 0
@EADDRINUSE = global i64 0
@.str.1 = [5 x i8] c"bind\00"
@.str.2 = [2 x i8] c".\00"
@stdout = global i32 0
@.str.3 = [2 x i8] c"\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca %struct.sockaddr_in
%8 = alloca i32
%9 = alloca i32
%10 = alloca i64
%11 = alloca i32
%12 = alloca i32
%13 = alloca i8
%14 = alloca i32
%15 = alloca i8
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%16 = load i32, i32* %4
%17 = icmp eq i32 %16, 2
br i1 %17, label %18, label %23
18: ; preds = %2
%19 = load i8**, i8*** %5
%20 = getelementptr inbounds i8*, i8** %19, i64 1
%21 = load i8*, i8** %20
%22 = call i32 @atoi(i8* %21)
br label %24
23: ; preds = %2
br label %24
24: ; preds = %23, %18
%25 = phi i32 [ %22, %18 ], [ 6500, %23 ]
store i32 %25, i32* %6
%26 = call i32 @memset(%struct.sockaddr_in* %7, i32 0, i32 16)
%27 = load i32, i32* @AF_INET
%28 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %7, i32 0, i32 2
store i32 %27, i32* %28
%29 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %7, i32 0, i32 1
%30 = call i32 @inet_aton(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32* %29)
%31 = load i32, i32* %6
%32 = call i8* @htons(i32 %31)
%33 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %7, i32 0, i32 0
store i8* %32, i8** %33
%34 = load i32, i32* @AF_INET
%35 = load i32, i32* @SOCK_STREAM
%36 = call i32 @socket(i32 %34, i32 %35, i32 0)
store i32 %36, i32* %8
br label %37
37: ; preds = %54, %24
%38 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %7, i32 0, i32 0
%39 = load i8*, i8** %38
%40 = call i32 @ntohs(i8* %39)
%41 = add nsw i32 %40, 1
%42 = call i8* @htons(i32 %41)
%43 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %7, i32 0, i32 0
store i8* %42, i8** %43
%44 = load i32, i32* %8
%45 = bitcast %struct.sockaddr_in* %7 to %struct.sockaddr*
%46 = call i32 @bind(i32 %44, %struct.sockaddr* %45, i32 16)
store i32 %46, i32* %9
br label %47
47: ; preds = %37
%48 = load i32, i32* %9
%49 = icmp eq i32 %48, -1
br i1 %49, label %50, label %54
50: ; preds = %47
%51 = load i64, i64* @errno
%52 = load i64, i64* @EADDRINUSE
%53 = icmp eq i64 %51, %52
br label %54
54: ; preds = %50, %47
%55 = phi i1 [ false, %47 ], [ %53, %50 ]
br i1 %55, label %37, label %56
56: ; preds = %54
%57 = load i32, i32* %9
%58 = icmp eq i32 %57, -1
br i1 %58, label %59, label %61
59: ; preds = %56
%60 = call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %61
61: ; preds = %59, %56
%62 = load i32, i32* %8
%63 = call i32 @listen(i32 %62, i32 5)
%64 = call i64 (...) @fork()
store i64 %64, i64* %10
%65 = load i64, i64* %10
%66 = icmp ne i64 %65, 0
br i1 %66, label %67, label %104
67: ; preds = %61
store i32 0, i32* %12
%68 = load i32, i32* %8
%69 = call i32 @close(i32 %68)
%70 = load i32, i32* @AF_INET
%71 = load i32, i32* @SOCK_STREAM
%72 = call i32 @socket(i32 %70, i32 %71, i32 0)
store i32 %72, i32* %11
%73 = load i32, i32* %11
%74 = bitcast %struct.sockaddr_in* %7 to %struct.sockaddr*
%75 = call i32 @connect(i32 %73, %struct.sockaddr* %74, i32 16)
br label %76
76: ; preds = %67, %103
%77 = load i32, i32* %12
%78 = add nsw i32 %77, 1
store i32 %78, i32* %12
%79 = srem i32 %77, 1000
%80 = icmp eq i32 %79, 0
br i1 %80, label %81, label %85
81: ; preds = %76
%82 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%83 = load i32, i32* @stdout
%84 = call i32 @fflush(i32 %83)
br label %85
85: ; preds = %81, %76
%86 = load i32, i32* %12
%87 = srem i32 %86, 50000
%88 = icmp eq i32 %87, 0
br i1 %88, label %89, label %91
89: ; preds = %85
%90 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %91
91: ; preds = %89, %85
br label %92
92: ; preds = %96, %91
%93 = load i32, i32* %11
%94 = call i32 @write(i32 %93, i8* %13, i32 1)
%95 = icmp ne i32 %94, 1
br i1 %95, label %96, label %97
96: ; preds = %92
br label %92
97: ; preds = %92
br label %98
98: ; preds = %102, %97
%99 = load i32, i32* %11
%100 = call i32 @read(i32 %99, i8* %13, i32 1)
%101 = icmp ne i32 %100, 1
br i1 %101, label %102, label %103
102: ; preds = %98
br label %98
103: ; preds = %98
br label %76
104: ; preds = %61
%105 = load i32, i32* %8
%106 = call i32 @accept(i32 %105, i32* null, i32* null)
store i32 %106, i32* %14
br label %107
107: ; preds = %104, %119
br label %108
108: ; preds = %112, %107
%109 = load i32, i32* %14
%110 = call i32 @read(i32 %109, i8* %15, i32 1)
%111 = icmp ne i32 %110, 1
br i1 %111, label %112, label %113
112: ; preds = %108
br label %108
113: ; preds = %108
br label %114
114: ; preds = %118, %113
%115 = load i32, i32* %14
%116 = call i32 @write(i32 %115, i8* %15, i32 1)
%117 = icmp ne i32 %116, 1
br i1 %117, label %118, label %119
118: ; preds = %114
br label %114
119: ; preds = %114
br label %107
}

LLVM IR (-O2):
%struct.sockaddr_in = type { i8*, i32, i32 }
%struct.sockaddr = type { i32 }
@AF_INET = global i32 0
@.str = [10 x i8] c"127.0.0.1\00"
@SOCK_STREAM = global i32 0
@errno = global i64 0
@EADDRINUSE = global i64 0
@.str.1 = [5 x i8] c"bind\00"
@stdout = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca %struct.sockaddr_in
%4 = alloca i8
%5 = alloca i8
%6 = icmp eq i32 %0, 2
br i1 %6, label %7, label %11
7: ; preds = %2
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = tail call i32 @atoi(i8* %9)
br label %11
11: ; preds = %2, %7
%12 = phi i32 [ %10, %7 ], [ 6500, %2 ]
%13 = bitcast %struct.sockaddr_in* %3 to i8*
%14 = call i32 @memset(%struct.sockaddr_in* %3, i32 0, i32 16)
%15 = load i32, i32* @AF_INET
%16 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %3, i64 0, i32 2
store i32 %15, i32* %16
%17 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %3, i64 0, i32 1
%18 = call i32 @inet_aton(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32* %17)
%19 = call i8* @htons(i32 %12)
%20 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %3, i64 0, i32 0
store i8* %19, i8** %20
%21 = load i32, i32* @AF_INET
%22 = load i32, i32* @SOCK_STREAM
%23 = call i32 @socket(i32 %21, i32 %22, i32 0)
%24 = bitcast %struct.sockaddr_in* %3 to %struct.sockaddr*
br label %25
25: ; preds = %25, %11
%26 = load i8*, i8** %20
%27 = call i32 @ntohs(i8* %26)
%28 = add nsw i32 %27, 1
%29 = call i8* @htons(i32 %28)
store i8* %29, i8** %20
%30 = call i32 @bind(i32 %23, %struct.sockaddr* %24, i32 16)
%31 = icmp eq i32 %30, -1
%32 = load i64, i64* @errno
%33 = load i64, i64* @EADDRINUSE
%34 = icmp eq i64 %32, %33
%35 = select i1 %31, i1 %34, i1 false
br i1 %35, label %25, label %36
36: ; preds = %25
br i1 %31, label %37, label %39
37: ; preds = %36
%38 = call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %39
39: ; preds = %37, %36
%40 = call i32 @listen(i32 %23, i32 5)
%41 = call i64 (...) @fork()
%42 = icmp eq i64 %41, 0
br i1 %42, label %70, label %43
43: ; preds = %39
%44 = call i32 @close(i32 %23)
%45 = load i32, i32* @AF_INET
%46 = load i32, i32* @SOCK_STREAM
%47 = call i32 @socket(i32 %45, i32 %46, i32 0)
%48 = call i32 @connect(i32 %47, %struct.sockaddr* %24, i32 16)
br label %49
49: ; preds = %67, %43
%50 = phi i32 [ 0, %43 ], [ %51, %67 ]
%51 = add nuw nsw i32 %50, 1
%52 = urem i32 %50, 1000
%53 = icmp eq i32 %52, 0
br i1 %53, label %54, label %58
54: ; preds = %49
%55 = call i32 @putchar(i32 46)
%56 = load i32, i32* @stdout
%57 = call i32 @fflush(i32 %56)
br label %58
58: ; preds = %54, %49
%59 = urem i32 %51, 50000
%60 = icmp eq i32 %59, 0
br i1 %60, label %61, label %63
61: ; preds = %58
%62 = call i32 @putchar(i32 10)
br label %63
63: ; preds = %61, %58
br label %64
64: ; preds = %63, %64
%65 = call i32 @write(i32 %47, i8* %4, i32 1)
%66 = icmp eq i32 %65, 1
br i1 %66, label %67, label %64
67: ; preds = %64, %67
%68 = call i32 @read(i32 %47, i8* %4, i32 1)
%69 = icmp eq i32 %68, 1
br i1 %69, label %49, label %67
70: ; preds = %39
%71 = call i32 @accept(i32 %23, i32* null, i32* null)
br label %72
72: ; preds = %75, %70
%73 = call i32 @read(i32 %71, i8* %5, i32 1)
%74 = icmp eq i32 %73, 1
br i1 %74, label %76, label %75
75: ; preds = %76, %72
br label %72
76: ; preds = %72, %76
%77 = call i32 @write(i32 %71, i8* %5, i32 1)
%78 = icmp eq i32 %77, 1
br i1 %78, label %75, label %76
}