#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 {
  int /*<<< orphan*/ sin_addr;
  int /*<<< orphan*/ sin_port;
  int /*<<< orphan*/ sin_family;
};
struct sockaddr {
  int dummy;
};
typedef int /*<<< orphan*/ servaddr;
typedef int /*<<< orphan*/ c;

/* Variables and functions */
int /*<<< orphan*/ AF_INET;
int /*<<< orphan*/ MSG_CONFIRM;
int /*<<< orphan*/ SOCK_STREAM;
int /*<<< orphan*/ close(int);
scalar_t__ connect(int, struct sockaddr *, int);
int errno;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ htons(int);
scalar_t__ inet_pton(int /*<<< orphan*/, char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ memset(struct sockaddr_in *, int /*<<< orphan*/, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ send(int, char *, int, int /*<<< orphan*/);
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
char *strerror(int);
int /*<<< orphan*/ usleep(int);
int main(int argc, char **argv) {
  int sockfd, n;
  char recvline[4096], sendline[4096];
  struct sockaddr_in servaddr;
  int socket_fd_array[1000];
  if (argc != 2) {
    printf("usage: ./client <ipaddress>\n");
    exit(0);
  }
  int i;
  for (i = 0; i < 10; i++) {
    if ((sockfd = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
      printf("create socket error: %s(errno: %d)\n", strerror(errno), errno);
      exit(0);
    }
    socket_fd_array[i] = sockfd;
    memset(&servaddr, 0, sizeof(servaddr));
    servaddr.sin_family = AF_INET;
    servaddr.sin_port = htons(6633);
    if (inet_pton(AF_INET, argv[1], &servaddr.sin_addr) <= 0) {
      printf("inet_pton error for %s\n", argv[1]);
      exit(0);
    }
    if (connect(sockfd, (struct sockaddr *)&servaddr, sizeof(servaddr)) < 0) {
      printf("connect error: %s(errno: %d)\n", strerror(errno), errno);
      exit(0);
    }
    char c[256] = "hello from a socket";
    send(sockfd, c, sizeof(c), MSG_CONFIRM);
    usleep(100);
  }
  for (i = 0; i < 10; i++) {
    close(socket_fd_array[i]);
    usleep(100);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30e0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     11f8 <main+0x38>
lea    0xe16(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
xor    %edi,%edi
call   10a0 <exit@plt>
movl   $0x0,-0x2fd4(%rbp)
cmpl   $0xa,-0x2fd4(%rbp)
jge    138a <main+0x1ca>
mov    0x2dd2(%rip),%rax
mov    (%rax),%edi
mov    0x2db1(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   10e0 <socket@plt>
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
jge    1263 <main+0xa3>
mov    0x2d8d(%rip),%rax
mov    (%rax),%edi
call   10c0 <strerror@plt>
mov    %rax,%rsi
mov    0x2d7c(%rip),%rax
mov    (%rax),%edx
lea    0xdc8(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
xor    %edi,%edi
call   10a0 <exit@plt>
mov    -0x14(%rbp),%ecx
movslq -0x2fd4(%rbp),%rax
mov    %ecx,-0x2fd0(%rbp,%rax,4)
lea    -0x2030(%rbp),%rdi
xor    %esi,%esi
mov    $0xc,%edx
call   1060 <memset@plt>
mov    0x2d5a(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x2028(%rbp)
mov    $0x19e9,%edi
call   1030 <htons@plt>
mov    %eax,-0x202c(%rbp)
mov    0x2d3b(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    -0x2030(%rbp),%rdx
call   1090 <inet_pton@plt>
cmp    $0x0,%rax
jg     12ea <main+0x12a>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xd65(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
xor    %edi,%edi
call   10a0 <exit@plt>
mov    -0x14(%rbp),%edi
lea    -0x2030(%rbp),%rsi
mov    $0xc,%edx
call   10b0 <connect@plt>
cmp    $0x0,%rax
jge    1337 <main+0x177>
mov    0x2cb9(%rip),%rax
mov    (%rax),%edi
call   10c0 <strerror@plt>
mov    %rax,%rsi
mov    0x2ca8(%rip),%rax
mov    (%rax),%edx
lea    0xd30(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
xor    %edi,%edi
call   10a0 <exit@plt>
lea    -0x30e0(%rbp),%rdi
lea    0xd3b(%rip),%rsi
mov    $0x100,%edx
call   1080 <memcpy@plt>
mov    -0x14(%rbp),%edi
lea    -0x30e0(%rbp),%rsi
mov    0x2c80(%rip),%rax
mov    (%rax),%ecx
mov    $0x100,%edx
call   1040 <send@plt>
mov    $0x64,%edi
call   10d0 <usleep@plt>
mov    -0x2fd4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2fd4(%rbp)
jmp    1202 <main+0x42>
movl   $0x0,-0x2fd4(%rbp)
cmpl   $0xa,-0x2fd4(%rbp)
jge    13d2 <main+0x212>
movslq -0x2fd4(%rbp),%rax
mov    -0x2fd0(%rbp,%rax,4),%edi
call   1070 <close@plt>
mov    $0x64,%edi
call   10d0 <usleep@plt>
mov    -0x2fd4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2fd4(%rbp)
jmp    1394 <main+0x1d4>
xor    %eax,%eax
add    $0x30e0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x10b8,%rsp
cmp    $0x2,%edi
jne    1406 <main+0x236>
mov    %rsi,%r14
xor    %ebx,%ebx
mov    0x2df2(%rip),%r15
mov    %rsp,%r13
lea    0x10(%rsp),%r12
xchg   %ax,%ax
mov    (%r15),%edi
mov    0x2dc6(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   10f0 <socket@plt>
test   %eax,%eax
js     13ac <main+0x1dc>
mov    %eax,%ebp
mov    %eax,0x110(%rsp,%rbx,4)
mov    %r13,%rdi
xor    %esi,%esi
mov    $0xc,%edx
call   1070 <memset@plt>
mov    (%r15),%eax
mov    %eax,0x8(%rsp)
mov    $0x19e9,%edi
call   1040 <htons@plt>
mov    %eax,0x4(%rsp)
mov    (%r15),%edi
mov    0x8(%r14),%rsi
mov    %r13,%rdx
call   10a0 <inet_pton@plt>
test   %rax,%rax
jle    13c5 <main+0x1f5>
mov    %ebp,%edi
mov    %r13,%rsi
mov    $0xc,%edx
call   10c0 <connect@plt>
test   %rax,%rax
js     13de <main+0x20e>
mov    $0x100,%edx
mov    %r12,%rdi
lea    0xdf9(%rip),%rsi
call   1090 <memcpy@plt>
mov    0x2d4d(%rip),%rax
mov    (%rax),%ecx
mov    %ebp,%edi
mov    %r12,%rsi
mov    $0x100,%edx
call   1050 <send@plt>
mov    $0x64,%edi
call   10e0 <usleep@plt>
add    $0x1,%rbx
cmp    $0xa,%rbx
jne    1200 <main+0x30>
mov    0x110(%rsp),%edi
call   1080 <close@plt>
mov    $0x64,%edi
call   10e0 <usleep@plt>
mov    0x114(%rsp),%edi
call   1080 <close@plt>
mov    $0x64,%edi
call   10e0 <usleep@plt>
mov    0x118(%rsp),%edi
call   1080 <close@plt>
mov    $0x64,%edi
call   10e0 <usleep@plt>
mov    0x11c(%rsp),%edi
call   1080 <close@plt>
mov    $0x64,%edi
call   10e0 <usleep@plt>
mov    0x120(%rsp),%edi
call   1080 <close@plt>
mov    $0x64,%edi
call   10e0 <usleep@plt>
mov    0x124(%rsp),%edi
call   1080 <close@plt>
mov    $0x64,%edi
call   10e0 <usleep@plt>
mov    0x128(%rsp),%edi
call   1080 <close@plt>
mov    $0x64,%edi
call   10e0 <usleep@plt>
mov    0x12c(%rsp),%edi
call   1080 <close@plt>
mov    $0x64,%edi
call   10e0 <usleep@plt>
mov    0x130(%rsp),%edi
call   1080 <close@plt>
mov    $0x64,%edi
call   10e0 <usleep@plt>
mov    0x134(%rsp),%edi
call   1080 <close@plt>
mov    $0x64,%edi
call   10e0 <usleep@plt>
xor    %eax,%eax
add    $0x10b8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2c15(%rip),%rbx
mov    (%rbx),%edi
call   10d0 <strerror@plt>
mov    (%rbx),%edx
lea    0xc3d(%rip),%rdi
jmp    13f5 <main+0x225>
mov    0x8(%r14),%rsi
lea    0xc54(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
xor    %edi,%edi
call   10b0 <exit@plt>
mov    0x2be3(%rip),%rbx
mov    (%rbx),%edi
call   10d0 <strerror@plt>
mov    (%rbx),%edx
lea    0xc47(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
xor    %edi,%edi
call   10b0 <exit@plt>
lea    0xc4d(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   10b0 <exit@plt>

LLVM IR (-O0):
%struct.sockaddr_in = type { i32, i32, i32 }
%struct.sockaddr = type { i32 }
@.str = [29 x i8] c"usage: ./client <ipaddress>\0A\00"
@AF_INET = global i32 0
@SOCK_STREAM = global i32 0
@.str.1 = [36 x i8] c"create socket error: %s(errno: %d)\0A\00"
@errno = global i32 0
@.str.2 = [24 x i8] c"inet_pton error for %s\0A\00"
@.str.3 = [30 x i8] c"connect error: %s(errno: %d)\0A\00"
@__const.main.c = [256 x i8] c"hello from a socket\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@MSG_CONFIRM = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca [4096 x i8]
%9 = alloca [4096 x i8]
%10 = alloca %struct.sockaddr_in
%11 = alloca [1000 x i32]
%12 = alloca i32
%13 = alloca [256 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%14 = load i32, i32* %4
%15 = icmp ne i32 %14, 2
br i1 %15, label %16, label %19
16: ; preds = %2
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%18 = call i32 @exit(i32 0)
unreachable
19: ; preds = %2
store i32 0, i32* %12
br label %20
20: ; preds = %75, %19
%21 = load i32, i32* %12
%22 = icmp slt i32 %21, 10
br i1 %22, label %23, label %78
23: ; preds = %20
%24 = load i32, i32* @AF_INET
%25 = load i32, i32* @SOCK_STREAM
%26 = call i32 @socket(i32 %24, i32 %25, i32 0)
store i32 %26, i32* %6
%27 = icmp slt i32 %26, 0
br i1 %27, label %28, label %34
28: ; preds = %23
%29 = load i32, i32* @errno
%30 = call i8* @strerror(i32 %29)
%31 = load i32, i32* @errno
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i8* %30, i32 %31)
%33 = call i32 @exit(i32 0)
unreachable
34: ; preds = %23
%35 = load i32, i32* %6
%36 = load i32, i32* %12
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds [1000 x i32], [1000 x i32]* %11, i64 0, i64 %37
store i32 %35, i32* %38
%39 = call i32 @memset(%struct.sockaddr_in* %10, i32 0, i32 12)
%40 = load i32, i32* @AF_INET
%41 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %10, i32 0, i32 2
store i32 %40, i32* %41
%42 = call i32 @htons(i32 6633)
%43 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %10, i32 0, i32 1
store i32 %42, i32* %43
%44 = load i32, i32* @AF_INET
%45 = load i8**, i8*** %5
%46 = getelementptr inbounds i8*, i8** %45, i64 1
%47 = load i8*, i8** %46
%48 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %10, i32 0, i32 0
%49 = call i64 @inet_pton(i32 %44, i8* %47, i32* %48)
%50 = icmp sle i64 %49, 0
br i1 %50, label %51, label %57
51: ; preds = %34
%52 = load i8**, i8*** %5
%53 = getelementptr inbounds i8*, i8** %52, i64 1
%54 = load i8*, i8** %53
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i8* %54)
%56 = call i32 @exit(i32 0)
unreachable
57: ; preds = %34
%58 = load i32, i32* %6
%59 = bitcast %struct.sockaddr_in* %10 to %struct.sockaddr*
%60 = call i64 @connect(i32 %58, %struct.sockaddr* %59, i32 12)
%61 = icmp slt i64 %60, 0
br i1 %61, label %62, label %68
62: ; preds = %57
%63 = load i32, i32* @errno
%64 = call i8* @strerror(i32 %63)
%65 = load i32, i32* @errno
%66 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0), i8* %64, i32 %65)
%67 = call i32 @exit(i32 0)
unreachable
68: ; preds = %57
%69 = bitcast [256 x i8]* %13 to i8*
%70 = load i32, i32* %6
%71 = getelementptr inbounds [256 x i8], [256 x i8]* %13, i64 0, i64 0
%72 = load i32, i32* @MSG_CONFIRM
%73 = call i32 @send(i32 %70, i8* %71, i32 256, i32 %72)
%74 = call i32 @usleep(i32 100)
br label %75
75: ; preds = %68
%76 = load i32, i32* %12
%77 = add nsw i32 %76, 1
store i32 %77, i32* %12
br label %20
78: ; preds = %20
store i32 0, i32* %12
br label %79
79: ; preds = %89, %78
%80 = load i32, i32* %12
%81 = icmp slt i32 %80, 10
br i1 %81, label %82, label %92
82: ; preds = %79
%83 = load i32, i32* %12
%84 = sext i32 %83 to i64
%85 = getelementptr inbounds [1000 x i32], [1000 x i32]* %11, i64 0, i64 %84
%86 = load i32, i32* %85
%87 = call i32 @close(i32 %86)
%88 = call i32 @usleep(i32 100)
br label %89
89: ; preds = %82
%90 = load i32, i32* %12
%91 = add nsw i32 %90, 1
store i32 %91, i32* %12
br label %79
92: ; preds = %79
ret i32 0
}

LLVM IR (-O2):
%struct.sockaddr_in = type { i32, i32, i32 }
%struct.sockaddr = type { i32 }
@AF_INET = global i32 0
@SOCK_STREAM = global i32 0
@.str.1 = [36 x i8] c"create socket error: %s(errno: %d)\0A\00"
@errno = global i32 0
@.str.2 = [24 x i8] c"inet_pton error for %s\0A\00"
@.str.3 = [30 x i8] c"connect error: %s(errno: %d)\0A\00"
@__const.main.c = [256 x i8] c"hello from a socket\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@MSG_CONFIRM = global i32 0
@str = [28 x i8] c"usage: ./client <ipaddress>\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca %struct.sockaddr_in
%4 = alloca [1000 x i32]
%5 = alloca [256 x i8]
%6 = bitcast %struct.sockaddr_in* %3 to i8*
%7 = bitcast [1000 x i32]* %4 to i8*
%8 = icmp eq i32 %0, 2
br i1 %8, label %9, label %16
9: ; preds = %2
%10 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %3, i64 0, i32 2
%11 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %3, i64 0, i32 1
%12 = getelementptr inbounds i8*, i8** %1, i64 1
%13 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %3, i64 0, i32 0
%14 = bitcast %struct.sockaddr_in* %3 to %struct.sockaddr*
%15 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
br label %19
16: ; preds = %2
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str, i64 0, i64 0))
%18 = tail call i32 @exit(i32 0)
unreachable
19: ; preds = %9, %53
%20 = phi i64 [ 0, %9 ], [ %57, %53 ]
%21 = load i32, i32* @AF_INET
%22 = load i32, i32* @SOCK_STREAM
%23 = call i32 @socket(i32 %21, i32 %22, i32 0)
%24 = icmp slt i32 %23, 0
br i1 %24, label %25, label %31
25: ; preds = %19
%26 = load i32, i32* @errno
%27 = call i8* @strerror(i32 %26)
%28 = load i32, i32* @errno
%29 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i8* %27, i32 %28)
%30 = call i32 @exit(i32 0)
unreachable
31: ; preds = %19
%32 = getelementptr inbounds [1000 x i32], [1000 x i32]* %4, i64 0, i64 %20
store i32 %23, i32* %32
%33 = call i32 @memset(%struct.sockaddr_in* %3, i32 0, i32 12)
%34 = load i32, i32* @AF_INET
store i32 %34, i32* %10
%35 = call i32 @htons(i32 6633)
store i32 %35, i32* %11
%36 = load i32, i32* @AF_INET
%37 = load i8*, i8** %12
%38 = call i64 @inet_pton(i32 %36, i8* %37, i32* %13)
%39 = icmp slt i64 %38, 1
br i1 %39, label %40, label %44
40: ; preds = %31
%41 = load i8*, i8** %12
%42 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i8* %41)
%43 = call i32 @exit(i32 0)
unreachable
44: ; preds = %31
%45 = call i64 @connect(i32 %23, %struct.sockaddr* %14, i32 12)
%46 = icmp slt i64 %45, 0
br i1 %46, label %47, label %53
47: ; preds = %44
%48 = load i32, i32* @errno
%49 = call i8* @strerror(i32 %48)
%50 = load i32, i32* @errno
%51 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0), i8* %49, i32 %50)
%52 = call i32 @exit(i32 0)
unreachable
53: ; preds = %44
%54 = load i32, i32* @MSG_CONFIRM
%55 = call i32 @send(i32 %23, i8* %15, i32 256, i32 %54)
%56 = call i32 @usleep(i32 100)
%57 = add nuw nsw i64 %20, 1
%58 = icmp eq i64 %57, 10
br i1 %58, label %59, label %19
59: ; preds = %53
%60 = getelementptr inbounds [1000 x i32], [1000 x i32]* %4, i64 0, i64 0
%61 = load i32, i32* %60
%62 = call i32 @close(i32 %61)
%63 = call i32 @usleep(i32 100)
%64 = getelementptr inbounds [1000 x i32], [1000 x i32]* %4, i64 0, i64 1
%65 = load i32, i32* %64
%66 = call i32 @close(i32 %65)
%67 = call i32 @usleep(i32 100)
%68 = getelementptr inbounds [1000 x i32], [1000 x i32]* %4, i64 0, i64 2
%69 = load i32, i32* %68
%70 = call i32 @close(i32 %69)
%71 = call i32 @usleep(i32 100)
%72 = getelementptr inbounds [1000 x i32], [1000 x i32]* %4, i64 0, i64 3
%73 = load i32, i32* %72
%74 = call i32 @close(i32 %73)
%75 = call i32 @usleep(i32 100)
%76 = getelementptr inbounds [1000 x i32], [1000 x i32]* %4, i64 0, i64 4
%77 = load i32, i32* %76
%78 = call i32 @close(i32 %77)
%79 = call i32 @usleep(i32 100)
%80 = getelementptr inbounds [1000 x i32], [1000 x i32]* %4, i64 0, i64 5
%81 = load i32, i32* %80
%82 = call i32 @close(i32 %81)
%83 = call i32 @usleep(i32 100)
%84 = getelementptr inbounds [1000 x i32], [1000 x i32]* %4, i64 0, i64 6
%85 = load i32, i32* %84
%86 = call i32 @close(i32 %85)
%87 = call i32 @usleep(i32 100)
%88 = getelementptr inbounds [1000 x i32], [1000 x i32]* %4, i64 0, i64 7
%89 = load i32, i32* %88
%90 = call i32 @close(i32 %89)
%91 = call i32 @usleep(i32 100)
%92 = getelementptr inbounds [1000 x i32], [1000 x i32]* %4, i64 0, i64 8
%93 = load i32, i32* %92
%94 = call i32 @close(i32 %93)
%95 = call i32 @usleep(i32 100)
%96 = getelementptr inbounds [1000 x i32], [1000 x i32]* %4, i64 0, i64 9
%97 = load i32, i32* %96
%98 = call i32 @close(i32 %97)
%99 = call i32 @usleep(i32 100)
ret i32 0
}