#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 timeval {
  int dummy;
};
struct TYPE_2__ {
  int /*<<< orphan*/ s_addr;
};
struct sockaddr_in {
  int /*<<< orphan*/ sin_port;
  TYPE_1__ sin_addr;
  int /*<<< orphan*/ sin_family;
};
struct sockaddr {
  int dummy;
};
typedef int /*<<< orphan*/ server_address;
typedef int /*<<< orphan*/ fd_set;
typedef int /*<<< orphan*/ client_address;

/* Variables and functions */
int /*<<< orphan*/ AF_INET;
int /*<<< orphan*/ FD_CLR(int, int /*<<< orphan*/ *);
scalar_t__ FD_ISSET(int, int /*<<< orphan*/ *);
int /*<<< orphan*/ FD_SET(int, int /*<<< orphan*/ *);
int FD_SETSIZE;
int /*<<< orphan*/ FD_ZERO(int /*<<< orphan*/ *);
int /*<<< orphan*/ FIONREAD;
int /*<<< orphan*/ INADDR_ANY;
int /*<<< orphan*/ SOCK_STREAM;
int accept(int, struct sockaddr *, int *);
int /*<<< orphan*/ bind(int, struct sockaddr *, int);
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ htonl(int /*<<< orphan*/);
int /*<<< orphan*/ htons(int);
int /*<<< orphan*/ ioctl(int, int /*<<< orphan*/, int *);
int /*<<< orphan*/ listen(int, int);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ read(int, char *, int);
int select(int, int /*<<< orphan*/ *, int /*<<< orphan*/ *,
           int /*<<< orphan*/ *, struct timeval *);
int /*<<< orphan*/ sleep(int);
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ write(int, char *, int);
int main() {
  int server_sockfd, client_sockfd;
  int server_len, client_len;
  struct sockaddr_in server_address;
  struct sockaddr_in client_address;
  int result;
  fd_set readfds, testfds;
  server_sockfd = socket(AF_INET, SOCK_STREAM, 0);
  server_address.sin_family = AF_INET;
  server_address.sin_addr.s_addr = htonl(INADDR_ANY);
  server_address.sin_port = htons(10000);
  server_len = sizeof(server_address);
  bind(server_sockfd, (struct sockaddr *)&server_address, server_len);
  listen(server_sockfd, 5);
  FD_ZERO(&readfds);
  FD_SET(server_sockfd, &readfds);
  while (1) {
    char ch;
    int fd;
    int nread;
    testfds = readfds;
    printf("server waiting\n");
    result = select(FD_SETSIZE, &testfds, (fd_set *)0, (fd_set *)0,
                    (struct timeval *)0);
    if (result < 1) {
      perror("server5");
      exit(1);
    }
    for (fd = 0; fd < FD_SETSIZE; fd++) {
      if (FD_ISSET(fd, &testfds)) {
        if (fd == server_sockfd) {
          client_len = sizeof(client_address);
          client_sockfd = accept(
              server_sockfd, (struct sockaddr *)&client_address, &client_len);
          FD_SET(client_sockfd, &readfds);
          printf("adding client on fd %d\n", client_sockfd);
        } else {
          ioctl(fd, FIONREAD, &nread);
          if (nread == 0) {
            close(fd);
            FD_CLR(fd, &readfds);
            printf("removing client on fd %d\n", fd);
          } else {
            read(fd, &ch, 1);
            sleep(5);
            printf("serving client on fd %d\n", fd);
            ch++;
            write(fd, &ch, 1);
          }
        }
      }
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2d9a(%rip),%rax
mov    (%rax),%edi
mov    0x2d79(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1150 <socket@plt>
mov    %eax,-0x8(%rbp)
mov    0x2d7e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x18(%rbp)
mov    0x2d6a(%rip),%rax
mov    (%rax),%edi
call   1070 <htonl@plt>
mov    %eax,-0x1c(%rbp)
mov    $0x2710,%edi
call   1050 <htons@plt>
mov    %eax,-0x20(%rbp)
movl   $0xc,-0x10(%rbp)
mov    -0x8(%rbp),%edi
lea    -0x20(%rbp),%rsi
mov    -0x10(%rbp),%edx
call   10e0 <bind@plt>
mov    -0x8(%rbp),%edi
mov    $0x5,%esi
call   10d0 <listen@plt>
lea    -0x38(%rbp),%rdi
call   10b0 <FD_ZERO@plt>
mov    -0x8(%rbp),%edi
lea    -0x38(%rbp),%rsi
call   1130 <FD_SET@plt>
mov    -0x38(%rbp),%eax
mov    %eax,-0x3c(%rbp)
lea    0xd36(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    0x2ce8(%rip),%rax
mov    (%rax),%edi
lea    -0x3c(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%r8d
mov    %r8,%rdx
mov    %r8,%rcx
call   10c0 <select@plt>
mov    %eax,-0x34(%rbp)
cmpl   $0x1,-0x34(%rbp)
jge    1311 <main+0xe1>
lea    0xd0e(%rip),%rdi
call   10f0 <perror@plt>
mov    $0x1,%edi
call   1120 <exit@plt>
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
mov    0x2c9e(%rip),%rcx
cmp    (%rcx),%eax
jge    1433 <main+0x203>
mov    -0x44(%rbp),%edi
lea    -0x3c(%rbp),%rsi
call   1040 <FD_ISSET@plt>
cmp    $0x0,%rax
je     1420 <main+0x1f0>
mov    -0x44(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    1388 <main+0x158>
movl   $0xc,-0x14(%rbp)
mov    -0x8(%rbp),%edi
lea    -0x30(%rbp),%rsi
lea    -0x14(%rbp),%rdx
call   1100 <accept@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
lea    -0x38(%rbp),%rsi
call   1130 <FD_SET@plt>
mov    -0xc(%rbp),%esi
lea    0xc9c(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    141b <main+0x1eb>
mov    -0x44(%rbp),%edi
mov    0x2c56(%rip),%rax
mov    (%rax),%esi
lea    -0x48(%rbp),%rdx
call   1080 <ioctl@plt>
cmpl   $0x0,-0x48(%rbp)
jne    13d1 <main+0x1a1>
mov    -0x44(%rbp),%edi
call   1090 <close@plt>
mov    -0x44(%rbp),%edi
lea    -0x38(%rbp),%rsi
call   1110 <FD_CLR@plt>
mov    -0x44(%rbp),%esi
lea    0xc6b(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    1416 <main+0x1e6>
mov    -0x44(%rbp),%edi
lea    -0x3d(%rbp),%rsi
mov    $0x1,%edx
call   10a0 <read@plt>
mov    $0x5,%edi
call   1140 <sleep@plt>
mov    -0x44(%rbp),%esi
lea    0xc54(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x3d(%rbp),%al
add    $0x1,%al
mov    %al,-0x3d(%rbp)
mov    -0x44(%rbp),%edi
lea    -0x3d(%rbp),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
jmp    141b <main+0x1eb>
jmp    1420 <main+0x1f0>
jmp    1425 <main+0x1f5>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1318 <main+0xe8>
jmp    12bd <main+0x8d>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    0x2d8b(%rip),%rbp
mov    0x0(%rbp),%edi
mov    0x2d69(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1160 <socket@plt>
mov    %eax,%r13d
mov    0x0(%rbp),%eax
mov    %eax,0x20(%rsp)
mov    0x2d5f(%rip),%rax
mov    (%rax),%edi
call   1080 <htonl@plt>
mov    %eax,0x1c(%rsp)
mov    $0x2710,%edi
call   1060 <htons@plt>
mov    %eax,0x18(%rsp)
lea    0x18(%rsp),%rsi
mov    %r13d,%edi
mov    $0xc,%edx
call   10f0 <bind@plt>
mov    %r13d,%edi
mov    $0x5,%esi
call   10e0 <listen@plt>
lea    0xc(%rsp),%rbp
mov    %rbp,%rdi
call   10c0 <FD_ZERO@plt>
mov    %r13d,%edi
mov    %rbp,%rsi
call   1140 <FD_SET@plt>
mov    0xc(%rsp),%eax
mov    %eax,0x8(%rsp)
lea    0xd7b(%rip),%rdi
call   1030 <puts@plt>
mov    0x2cdc(%rip),%r12
mov    (%r12),%edi
lea    0x8(%rsp),%rsi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   10d0 <select@plt>
test   %eax,%eax
jg     1313 <main+0xd3>
lea    0xcfc(%rip),%rdi
call   1100 <perror@plt>
mov    $0x1,%edi
call   1130 <exit@plt>
lea    0x8(%rsp),%r14
lea    0xc(%rsp),%rbx
jmp    134b <main+0x10b>
nop
mov    0xc(%rsp),%eax
mov    %eax,0x8(%rsp)
lea    0xd24(%rip),%rdi
call   1030 <puts@plt>
mov    (%r12),%edi
mov    %r14,%rsi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   10d0 <select@plt>
test   %eax,%eax
jle    12fd <main+0xbd>
cmpl   $0x0,(%r12)
jle    1320 <main+0xe0>
xor    %ebp,%ebp
jmp    13a5 <main+0x165>
cs nopw 0x0(%rax,%rax,1)
movl   $0xc,0x14(%rsp)
mov    %r13d,%edi
lea    0x28(%rsp),%rsi
lea    0x14(%rsp),%rdx
call   1110 <accept@plt>
mov    %eax,%r15d
mov    %eax,%edi
mov    %rbx,%rsi
call   1140 <FD_SET@plt>
lea    0xc7a(%rip),%rdi
mov    %r15d,%esi
xor    %eax,%eax
call   1070 <printf@plt>
add    $0x1,%ebp
cmp    (%r12),%ebp
jge    1320 <main+0xe0>
mov    %ebp,%edi
mov    %r14,%rsi
call   1050 <FD_ISSET@plt>
test   %rax,%rax
je     1398 <main+0x158>
cmp    %ebp,%r13d
je     1360 <main+0x120>
mov    0x2c28(%rip),%rax
mov    (%rax),%esi
mov    %ebp,%edi
lea    0x10(%rsp),%rdx
call   1090 <ioctl@plt>
cmpl   $0x0,0x10(%rsp)
je     1422 <main+0x1e2>
mov    %ebp,%edi
mov    %rbx,%r15
lea    0x7(%rsp),%rbx
mov    %rbx,%rsi
mov    $0x1,%edx
call   10b0 <read@plt>
mov    $0x5,%edi
call   1150 <sleep@plt>
lea    0xc3d(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1070 <printf@plt>
addb   $0x1,0x7(%rsp)
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r15,%rbx
mov    $0x1,%edx
call   1040 <write@plt>
jmp    1398 <main+0x158>
mov    %ebp,%edi
call   10a0 <close@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1120 <FD_CLR@plt>
lea    0xbe6(%rip),%rdi
mov    %ebp,%esi
jmp    1391 <main+0x151>

LLVM IR (-O0):
%struct.sockaddr_in = type { i32, %struct.TYPE_2__, i32 }
%struct.TYPE_2__ = type { i32 }
%struct.sockaddr = type { i32 }
%struct.timeval = type { i32 }
@AF_INET = global i32 0
@SOCK_STREAM = global i32 0
@INADDR_ANY = global i32 0
@.str = [16 x i8] c"server waiting\0A\00"
@FD_SETSIZE = global i32 0
@.str.1 = [8 x i8] c"server5\00"
@.str.2 = [24 x i8] c"adding client on fd %d\0A\00"
@FIONREAD = global i32 0
@.str.3 = [26 x i8] c"removing client on fd %d\0A\00"
@.str.4 = [25 x i8] c"serving client on fd %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca %struct.sockaddr_in
%7 = alloca %struct.sockaddr_in
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i8
%12 = alloca i32
%13 = alloca i32
store i32 0, i32* %1
%14 = load i32, i32* @AF_INET
%15 = load i32, i32* @SOCK_STREAM
%16 = call i32 @socket(i32 %14, i32 %15, i32 0)
store i32 %16, i32* %2
%17 = load i32, i32* @AF_INET
%18 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %6, i32 0, i32 2
store i32 %17, i32* %18
%19 = load i32, i32* @INADDR_ANY
%20 = call i32 @htonl(i32 %19)
%21 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %6, i32 0, i32 1
%22 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %21, i32 0, i32 0
store i32 %20, i32* %22
%23 = call i32 @htons(i32 10000)
%24 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %6, i32 0, i32 0
store i32 %23, i32* %24
store i32 12, i32* %4
%25 = load i32, i32* %2
%26 = bitcast %struct.sockaddr_in* %6 to %struct.sockaddr*
%27 = load i32, i32* %4
%28 = call i32 @bind(i32 %25, %struct.sockaddr* %26, i32 %27)
%29 = load i32, i32* %2
%30 = call i32 @listen(i32 %29, i32 5)
%31 = call i32 @FD_ZERO(i32* %9)
%32 = load i32, i32* %2
%33 = call i32 @FD_SET(i32 %32, i32* %9)
br label %34
34: ; preds = %0, %94
%35 = load i32, i32* %9
store i32 %35, i32* %10
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%37 = load i32, i32* @FD_SETSIZE
%38 = call i32 @select(i32 %37, i32* %10, i32* null, i32* null, %struct.timeval* null)
store i32 %38, i32* %8
%39 = load i32, i32* %8
%40 = icmp slt i32 %39, 1
br i1 %40, label %41, label %44
41: ; preds = %34
%42 = call i32 @perror(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%43 = call i32 @exit(i32 1)
unreachable
44: ; preds = %34
store i32 0, i32* %12
br label %45
45: ; preds = %91, %44
%46 = load i32, i32* %12
%47 = load i32, i32* @FD_SETSIZE
%48 = icmp slt i32 %46, %47
br i1 %48, label %49, label %94
49: ; preds = %45
%50 = load i32, i32* %12
%51 = call i64 @FD_ISSET(i32 %50, i32* %10)
%52 = icmp ne i64 %51, 0
br i1 %52, label %53, label %90
53: ; preds = %49
%54 = load i32, i32* %12
%55 = load i32, i32* %2
%56 = icmp eq i32 %54, %55
br i1 %56, label %57, label %65
57: ; preds = %53
store i32 12, i32* %5
%58 = load i32, i32* %2
%59 = bitcast %struct.sockaddr_in* %7 to %struct.sockaddr*
%60 = call i32 @accept(i32 %58, %struct.sockaddr* %59, i32* %5)
store i32 %60, i32* %3
%61 = load i32, i32* %3
%62 = call i32 @FD_SET(i32 %61, i32* %9)
%63 = load i32, i32* %3
%64 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i32 %63)
br label %89
65: ; preds = %53
%66 = load i32, i32* %12
%67 = load i32, i32* @FIONREAD
%68 = call i32 @ioctl(i32 %66, i32 %67, i32* %13)
%69 = load i32, i32* %13
%70 = icmp eq i32 %69, 0
br i1 %70, label %71, label %78
71: ; preds = %65
%72 = load i32, i32* %12
%73 = call i32 @close(i32 %72)
%74 = load i32, i32* %12
%75 = call i32 @FD_CLR(i32 %74, i32* %9)
%76 = load i32, i32* %12
%77 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0), i32 %76)
br label %88
78: ; preds = %65
%79 = load i32, i32* %12
%80 = call i32 @read(i32 %79, i8* %11, i32 1)
%81 = call i32 @sleep(i32 5)
%82 = load i32, i32* %12
%83 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), i32 %82)
%84 = load i8, i8* %11
%85 = add i8 %84, 1
store i8 %85, i8* %11
%86 = load i32, i32* %12
%87 = call i32 @write(i32 %86, i8* %11, i32 1)
br label %88
88: ; preds = %78, %71
br label %89
89: ; preds = %88, %57
br label %90
90: ; preds = %89, %49
br label %91
91: ; preds = %90
%92 = load i32, i32* %12
%93 = add nsw i32 %92, 1
store i32 %93, i32* %12
br label %45
94: ; preds = %45
br label %34
}

LLVM IR (-O2):
%struct.sockaddr_in = type { i32, %struct.TYPE_2__, i32 }
%struct.TYPE_2__ = type { i32 }
%struct.sockaddr = type { i32 }
%struct.timeval = type { i32 }
@AF_INET = global i32 0
@SOCK_STREAM = global i32 0
@INADDR_ANY = global i32 0
@FD_SETSIZE = global i32 0
@.str.1 = [8 x i8] c"server5\00"
@.str.2 = [24 x i8] c"adding client on fd %d\0A\00"
@FIONREAD = global i32 0
@.str.3 = [26 x i8] c"removing client on fd %d\0A\00"
@.str.4 = [25 x i8] c"serving client on fd %d\0A\00"
@str = [15 x i8] c"server waiting\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.sockaddr_in
%3 = alloca %struct.sockaddr_in
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8
%7 = alloca i32
%8 = bitcast i32* %1 to i8*
%9 = bitcast %struct.sockaddr_in* %2 to i8*
%10 = bitcast %struct.sockaddr_in* %3 to i8*
%11 = bitcast i32* %4 to i8*
%12 = bitcast i32* %5 to i8*
%13 = load i32, i32* @AF_INET
%14 = load i32, i32* @SOCK_STREAM
%15 = tail call i32 @socket(i32 %13, i32 %14, i32 0)
%16 = load i32, i32* @AF_INET
%17 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %2, i64 0, i32 2
store i32 %16, i32* %17
%18 = load i32, i32* @INADDR_ANY
%19 = tail call i32 @htonl(i32 %18)
%20 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %2, i64 0, i32 1, i32 0
store i32 %19, i32* %20
%21 = tail call i32 @htons(i32 10000)
%22 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %2, i64 0, i32 0
store i32 %21, i32* %22
%23 = bitcast %struct.sockaddr_in* %2 to %struct.sockaddr*
%24 = call i32 @bind(i32 %15, %struct.sockaddr* %23, i32 12)
%25 = call i32 @listen(i32 %15, i32 5)
%26 = call i32 @FD_ZERO(i32* %4)
%27 = call i32 @FD_SET(i32 %15, i32* %4)
%28 = bitcast i32* %7 to i8*
%29 = load i32, i32* %4
store i32 %29, i32* %5
%30 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
%31 = load i32, i32* @FD_SETSIZE
%32 = call i32 @select(i32 %31, i32* %5, i32* null, i32* null, %struct.timeval* null)
%33 = icmp slt i32 %32, 1
br i1 %33, label %39, label %34
34: ; preds = %0
%35 = bitcast %struct.sockaddr_in* %3 to %struct.sockaddr*
br label %36
36: ; preds = %34, %72
%37 = load i32, i32* @FD_SETSIZE
%38 = icmp sgt i32 %37, 0
br i1 %38, label %42, label %72
39: ; preds = %72, %0
%40 = call i32 @perror(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%41 = call i32 @exit(i32 1)
unreachable
42: ; preds = %36, %68
%43 = phi i32 [ %69, %68 ], [ 0, %36 ]
%44 = call i64 @FD_ISSET(i32 %43, i32* %5)
%45 = icmp eq i64 %44, 0
br i1 %45, label %68, label %46
46: ; preds = %42
%47 = icmp eq i32 %43, %15
br i1 %47, label %48, label %52
48: ; preds = %46
store i32 12, i32* %1
%49 = call i32 @accept(i32 %15, %struct.sockaddr* %35, i32* %1)
%50 = call i32 @FD_SET(i32 %49, i32* %4)
%51 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i32 %49)
br label %68
52: ; preds = %46
%53 = load i32, i32* @FIONREAD
%54 = call i32 @ioctl(i32 %43, i32 %53, i32* %7)
%55 = load i32, i32* %7
%56 = icmp eq i32 %55, 0
br i1 %56, label %57, label %61
57: ; preds = %52
%58 = call i32 @close(i32 %43)
%59 = call i32 @FD_CLR(i32 %43, i32* %4)
%60 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0), i32 %43)
br label %68
61: ; preds = %52
%62 = call i32 @read(i32 %43, i8* %6, i32 1)
%63 = call i32 @sleep(i32 5)
%64 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), i32 %43)
%65 = load i8, i8* %6
%66 = add i8 %65, 1
store i8 %66, i8* %6
%67 = call i32 @write(i32 %43, i8* %6, i32 1)
br label %68
68: ; preds = %42, %57, %61, %48
%69 = add nuw nsw i32 %43, 1
%70 = load i32, i32* @FD_SETSIZE
%71 = icmp slt i32 %69, %70
br i1 %71, label %42, label %72
72: ; preds = %68, %36
%73 = load i32, i32* %4
store i32 %73, i32* %5
%74 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
%75 = load i32, i32* @FD_SETSIZE
%76 = call i32 @select(i32 %75, i32* %5, i32* null, i32* null, %struct.timeval* null)
%77 = icmp slt i32 %76, 1
br i1 %77, label %39, label %36
}