#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 timeval {
  int tv_sec;
  int tv_usec;
};
typedef int /*<<< orphan*/ buff;

/* Variables and functions */
int atoi(char *);
int clientConnection(char *, int);
int /*<<< orphan*/ deleteSocket(int);
int /*<<< orphan*/ exit(int);
int getpid();
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
int /*<<< orphan*/ perror(char *);
int read(int, char *, int);
int /*<<< orphan*/ sprintf(char *, char *, ...);
int strlen(char *);
int /*<<< orphan*/ timersub(struct timeval *, struct timeval *,
                            struct timeval *);
int write(int, char *, int);
main(int argc, char *argv[]) {
  int connectionFD;
  int ret;
  int r;
  char buff[80];
  char buff2[80];
  char *hostname;
  int port;
  int i, num_it;
  int msec_elapsed;
  struct timeval init_t, end_t;
  gettimeofday(&init_t, NULL);
  if (argc != 4) {
    sprintf(buff, "Usage: %s num_it hostname port\n", argv[0]);
    write(2, buff, strlen(buff));
    exit(1);
  }
  num_it = atoi(argv[1]);
  hostname = argv[2];
  port = atoi(argv[3]);
  connectionFD = clientConnection(hostname, port);
  if (connectionFD < 0) {
    perror("Error establishing connection\n");
    exit(1);
  }
  for (i = 0; i < num_it; i++) {
    ret = write(connectionFD, "hola ", 5);
    if (ret < 0) {
      perror("Error writing to connection\n");
      exit(1);
    }
    ret = read(connectionFD, buff, sizeof(buff));
    if (ret < 0) {
      perror("Error reading on connection\n");
      exit(1);
    }
    buff[ret] = '\0';
    sprintf(buff2, "Client [%d] received: %s\n", getpid(), buff);
    write(1, buff2, strlen(buff2));
  }
  gettimeofday(&end_t, NULL);
  sprintf(buff2, "\nClient [%d] finishes\n", getpid());
  write(1, buff2, strlen(buff2));
  struct timeval res_t;
  timersub(&end_t, &init_t, &res_t);
  msec_elapsed = (res_t.tv_sec * 1000) + (res_t.tv_usec / 1000);
  sprintf(buff2, "Time %d msec\n", msec_elapsed);
  write(2, buff2, strlen(buff2));
  deleteSocket(connectionFD);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x130,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0xe0(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1070 <gettimeofday@plt>
cmpl   $0x4,-0x8(%rbp)
je     123d <main+0x7d>
lea    -0x70(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xdfb(%rip),%rsi
mov    $0x0,%al
call   10c0 <sprintf@plt>
lea    -0x70(%rbp),%rax
mov    %rax,-0xf8(%rbp)
lea    -0x70(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0xf8(%rbp),%rsi
mov    %eax,%edx
mov    $0x2,%edi
call   1030 <write@plt>
mov    $0x1,%edi
call   10d0 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   10b0 <atoi@plt>
mov    %eax,-0xd4(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0xc8(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
call   10b0 <atoi@plt>
mov    %eax,-0xcc(%rbp)
mov    -0xc8(%rbp),%rdi
mov    -0xcc(%rbp),%esi
call   1050 <clientConnection@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    12a7 <main+0xe7>
lea    0xd88(%rip),%rdi
call   10a0 <perror@plt>
mov    $0x1,%edi
call   10d0 <exit@plt>
movl   $0x0,-0xd0(%rbp)
mov    -0xd0(%rbp),%eax
cmp    -0xd4(%rbp),%eax
jge    13a8 <main+0x1e8>
mov    -0x14(%rbp),%edi
lea    0xd72(%rip),%rsi
mov    $0x5,%edx
call   1030 <write@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jge    12fa <main+0x13a>
lea    0xd5a(%rip),%rdi
call   10a0 <perror@plt>
mov    $0x1,%edi
call   10d0 <exit@plt>
mov    -0x14(%rbp),%edi
lea    -0x70(%rbp),%rsi
mov    $0x50,%edx
call   1080 <read@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jge    132e <main+0x16e>
lea    0xd43(%rip),%rdi
call   10a0 <perror@plt>
mov    $0x1,%edi
call   10d0 <exit@plt>
movslq -0x18(%rbp),%rax
movb   $0x0,-0x70(%rbp,%rax,1)
lea    -0xc0(%rbp),%rax
mov    %rax,-0x108(%rbp)
mov    $0x0,%al
call   1040 <getpid@plt>
mov    -0x108(%rbp),%rdi
mov    %eax,%edx
lea    -0x70(%rbp),%rcx
lea    0xd1f(%rip),%rsi
mov    $0x0,%al
call   10c0 <sprintf@plt>
lea    -0xc0(%rbp),%rax
mov    %rax,-0x100(%rbp)
lea    -0xc0(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x100(%rbp),%rsi
mov    %eax,%edx
mov    $0x1,%edi
call   1030 <write@plt>
mov    -0xd0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xd0(%rbp)
jmp    12b1 <main+0xf1>
lea    -0xe8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1070 <gettimeofday@plt>
lea    -0xc0(%rbp),%rax
mov    %rax,-0x128(%rbp)
mov    $0x0,%al
call   1040 <getpid@plt>
mov    -0x128(%rbp),%rdi
mov    %eax,%edx
lea    0xcbc(%rip),%rsi
mov    $0x0,%al
call   10c0 <sprintf@plt>
lea    -0xc0(%rbp),%rax
mov    %rax,-0x120(%rbp)
lea    -0xc0(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x120(%rbp),%rsi
mov    %eax,%edx
mov    $0x1,%edi
call   1030 <write@plt>
lea    -0xe8(%rbp),%rdi
lea    -0xe0(%rbp),%rsi
lea    -0xf0(%rbp),%rdx
call   10e0 <timersub@plt>
imul   $0x3e8,-0xf0(%rbp),%eax
mov    %eax,-0x114(%rbp)
mov    -0xec(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x114(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0xd8(%rbp)
lea    -0xc0(%rbp),%rdi
mov    -0xd8(%rbp),%edx
lea    0xc43(%rip),%rsi
mov    $0x0,%al
call   10c0 <sprintf@plt>
lea    -0xc0(%rbp),%rax
mov    %rax,-0x110(%rbp)
lea    -0xc0(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x110(%rbp),%rsi
mov    %eax,%edx
mov    $0x2,%edi
call   1030 <write@plt>
mov    -0x14(%rbp),%edi
call   1090 <deleteSocket@plt>
mov    -0x4(%rbp),%eax
add    $0x130,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xc8,%rsp
mov    %rsi,%rbx
mov    %edi,%ebp
lea    0x10(%rsp),%rdi
xor    %esi,%esi
call   1070 <gettimeofday@plt>
cmp    $0x4,%ebp
jne    1389 <main+0x1c9>
mov    0x8(%rbx),%rdi
call   10b0 <atoi@plt>
mov    %eax,%ebp
mov    0x10(%rbx),%r14
mov    0x18(%rbx),%rdi
call   10b0 <atoi@plt>
mov    %r14,%rdi
mov    %eax,%esi
call   1050 <clientConnection@plt>
test   %eax,%eax
js     13c3 <main+0x203>
mov    %eax,%r13d
test   %ebp,%ebp
jle    12ac <main+0xec>
lea    0xe18(%rip),%r14
lea    0x20(%rsp),%r15
lea    0xe4c(%rip),%r12
lea    0x70(%rsp),%rbx
nopl   0x0(%rax,%rax,1)
mov    %r13d,%edi
mov    %r14,%rsi
mov    $0x5,%edx
call   1030 <write@plt>
test   %eax,%eax
js     136a <main+0x1aa>
mov    %r13d,%edi
mov    %r15,%rsi
mov    $0x50,%edx
call   1080 <read@plt>
test   %eax,%eax
js     1373 <main+0x1b3>
mov    %eax,%eax
movb   $0x0,0x20(%rsp,%rax,1)
xor    %eax,%eax
call   1040 <getpid@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %eax,%edx
mov    %r15,%rcx
xor    %eax,%eax
call   10c0 <sprintf@plt>
mov    %rbx,%rdi
call   1060 <strlen@plt>
mov    $0x1,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <write@plt>
add    $0xffffffff,%ebp
jne    1240 <main+0x80>
lea    0x18(%rsp),%rbp
mov    %rbp,%rdi
xor    %esi,%esi
call   1070 <gettimeofday@plt>
xor    %eax,%eax
call   1040 <getpid@plt>
lea    0xdd0(%rip),%rsi
lea    0x70(%rsp),%rbx
mov    %rbx,%rdi
mov    %eax,%edx
xor    %eax,%eax
call   10c0 <sprintf@plt>
mov    %rbx,%rdi
call   1060 <strlen@plt>
mov    $0x1,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <write@plt>
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
mov    %rbp,%rdi
call   10e0 <timersub@plt>
imul   $0x3e8,0x8(%rsp),%eax
movslq 0xc(%rsp),%rcx
imul   $0x10624dd3,%rcx,%rdx
mov    %rdx,%rcx
shr    $0x3f,%rcx
sar    $0x26,%rdx
add    %ecx,%edx
add    %eax,%edx
lea    0xd83(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   10c0 <sprintf@plt>
mov    %rbx,%rdi
call   1060 <strlen@plt>
mov    $0x2,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <write@plt>
mov    %r13d,%edi
call   1090 <deleteSocket@plt>
xor    %eax,%eax
add    $0xc8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xcd4(%rip),%rdi
jmp    137a <main+0x1ba>
lea    0xce8(%rip),%rdi
call   10a0 <perror@plt>
mov    $0x1,%edi
call   10d0 <exit@plt>
mov    (%rbx),%rdx
lea    0xc6d(%rip),%rsi
lea    0x20(%rsp),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   10c0 <sprintf@plt>
mov    %rbx,%rdi
call   1060 <strlen@plt>
mov    $0x2,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <write@plt>
mov    $0x1,%edi
call   10d0 <exit@plt>
lea    0xc56(%rip),%rdi
jmp    137a <main+0x1ba>

LLVM IR (-O0):
%struct.timeval = type { i32, i32 }
@.str = [32 x i8] c"Usage: %s num_it hostname port\0A\00"
@.str.1 = [31 x i8] c"Error establishing connection\0A\00"
@.str.2 = [6 x i8] c"hola \00"
@.str.3 = [29 x i8] c"Error writing to connection\0A\00"
@.str.4 = [29 x i8] c"Error reading on connection\0A\00"
@.str.5 = [26 x i8] c"Client [%d] received: %s\0A\00"
@.str.6 = [23 x i8] c"\0AClient [%d] finishes\0A\00"
@.str.7 = [14 x i8] c"Time %d msec\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca [80 x i8]
%10 = alloca [80 x i8]
%11 = alloca i8*
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca %struct.timeval
%17 = alloca %struct.timeval
%18 = alloca %struct.timeval
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%19 = call i32 @gettimeofday(%struct.timeval* %16, i32* null)
%20 = load i32, i32* %4
%21 = icmp ne i32 %20, 4
br i1 %21, label %22, label %33
22: ; preds = %2
%23 = getelementptr inbounds [80 x i8], [80 x i8]* %9, i64 0, i64 0
%24 = load i8**, i8*** %5
%25 = getelementptr inbounds i8*, i8** %24, i64 0
%26 = load i8*, i8** %25
%27 = call i32 (i8*, i8*, ...) @sprintf(i8* %23, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %26)
%28 = getelementptr inbounds [80 x i8], [80 x i8]* %9, i64 0, i64 0
%29 = getelementptr inbounds [80 x i8], [80 x i8]* %9, i64 0, i64 0
%30 = call i32 @strlen(i8* %29)
%31 = call i32 @write(i32 2, i8* %28, i32 %30)
%32 = call i32 @exit(i32 1)
unreachable
33: ; preds = %2
%34 = load i8**, i8*** %5
%35 = getelementptr inbounds i8*, i8** %34, i64 1
%36 = load i8*, i8** %35
%37 = call i32 @atoi(i8* %36)
store i32 %37, i32* %14
%38 = load i8**, i8*** %5
%39 = getelementptr inbounds i8*, i8** %38, i64 2
%40 = load i8*, i8** %39
store i8* %40, i8** %11
%41 = load i8**, i8*** %5
%42 = getelementptr inbounds i8*, i8** %41, i64 3
%43 = load i8*, i8** %42
%44 = call i32 @atoi(i8* %43)
store i32 %44, i32* %12
%45 = load i8*, i8** %11
%46 = load i32, i32* %12
%47 = call i32 @clientConnection(i8* %45, i32 %46)
store i32 %47, i32* %6
%48 = load i32, i32* %6
%49 = icmp slt i32 %48, 0
br i1 %49, label %50, label %53
50: ; preds = %33
%51 = call i32 @perror(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
%52 = call i32 @exit(i32 1)
unreachable
53: ; preds = %33
store i32 0, i32* %13
br label %54
54: ; preds = %87, %53
%55 = load i32, i32* %13
%56 = load i32, i32* %14
%57 = icmp slt i32 %55, %56
br i1 %57, label %58, label %90
58: ; preds = %54
%59 = load i32, i32* %6
%60 = call i32 @write(i32 %59, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 5)
store i32 %60, i32* %7
%61 = load i32, i32* %7
%62 = icmp slt i32 %61, 0
br i1 %62, label %63, label %66
63: ; preds = %58
%64 = call i32 @perror(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0))
%65 = call i32 @exit(i32 1)
unreachable
66: ; preds = %58
%67 = load i32, i32* %6
%68 = getelementptr inbounds [80 x i8], [80 x i8]* %9, i64 0, i64 0
%69 = call i32 @read(i32 %67, i8* %68, i32 80)
store i32 %69, i32* %7
%70 = load i32, i32* %7
%71 = icmp slt i32 %70, 0
br i1 %71, label %72, label %75
72: ; preds = %66
%73 = call i32 @perror(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0))
%74 = call i32 @exit(i32 1)
unreachable
75: ; preds = %66
%76 = load i32, i32* %7
%77 = sext i32 %76 to i64
%78 = getelementptr inbounds [80 x i8], [80 x i8]* %9, i64 0, i64 %77
store i8 0, i8* %78
%79 = getelementptr inbounds [80 x i8], [80 x i8]* %10, i64 0, i64 0
%80 = call i32 (...) @getpid()
%81 = getelementptr inbounds [80 x i8], [80 x i8]* %9, i64 0, i64 0
%82 = call i32 (i8*, i8*, ...) @sprintf(i8* %79, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.5, i64 0, i64 0), i32 %80, i8* %81)
%83 = getelementptr inbounds [80 x i8], [80 x i8]* %10, i64 0, i64 0
%84 = getelementptr inbounds [80 x i8], [80 x i8]* %10, i64 0, i64 0
%85 = call i32 @strlen(i8* %84)
%86 = call i32 @write(i32 1, i8* %83, i32 %85)
br label %87
87: ; preds = %75
%88 = load i32, i32* %13
%89 = add nsw i32 %88, 1
store i32 %89, i32* %13
br label %54
90: ; preds = %54
%91 = call i32 @gettimeofday(%struct.timeval* %17, i32* null)
%92 = getelementptr inbounds [80 x i8], [80 x i8]* %10, i64 0, i64 0
%93 = call i32 (...) @getpid()
%94 = call i32 (i8*, i8*, ...) @sprintf(i8* %92, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0), i32 %93)
%95 = getelementptr inbounds [80 x i8], [80 x i8]* %10, i64 0, i64 0
%96 = getelementptr inbounds [80 x i8], [80 x i8]* %10, i64 0, i64 0
%97 = call i32 @strlen(i8* %96)
%98 = call i32 @write(i32 1, i8* %95, i32 %97)
%99 = call i32 @timersub(%struct.timeval* %17, %struct.timeval* %16, %struct.timeval* %18)
%100 = getelementptr inbounds %struct.timeval, %struct.timeval* %18, i32 0, i32 0
%101 = load i32, i32* %100
%102 = mul nsw i32 %101, 1000
%103 = getelementptr inbounds %struct.timeval, %struct.timeval* %18, i32 0, i32 1
%104 = load i32, i32* %103
%105 = sdiv i32 %104, 1000
%106 = add nsw i32 %102, %105
store i32 %106, i32* %15
%107 = getelementptr inbounds [80 x i8], [80 x i8]* %10, i64 0, i64 0
%108 = load i32, i32* %15
%109 = call i32 (i8*, i8*, ...) @sprintf(i8* %107, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i64 0, i64 0), i32 %108)
%110 = getelementptr inbounds [80 x i8], [80 x i8]* %10, i64 0, i64 0
%111 = getelementptr inbounds [80 x i8], [80 x i8]* %10, i64 0, i64 0
%112 = call i32 @strlen(i8* %111)
%113 = call i32 @write(i32 2, i8* %110, i32 %112)
%114 = load i32, i32* %6
%115 = call i32 @deleteSocket(i32 %114)
%116 = load i32, i32* %3
ret i32 %116
}

LLVM IR (-O2):
%struct.timeval = type { i32, i32 }
@.str = [32 x i8] c"Usage: %s num_it hostname port\0A\00"
@.str.1 = [31 x i8] c"Error establishing connection\0A\00"
@.str.2 = [6 x i8] c"hola \00"
@.str.3 = [29 x i8] c"Error writing to connection\0A\00"
@.str.4 = [29 x i8] c"Error reading on connection\0A\00"
@.str.5 = [26 x i8] c"Client [%d] received: %s\0A\00"
@.str.6 = [23 x i8] c"\0AClient [%d] finishes\0A\00"
@.str.7 = [14 x i8] c"Time %d msec\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [80 x i8]
%4 = alloca [80 x i8]
%5 = alloca %struct.timeval
%6 = alloca %struct.timeval
%7 = alloca %struct.timeval
%8 = getelementptr inbounds [80 x i8], [80 x i8]* %3, i64 0, i64 0
%9 = getelementptr inbounds [80 x i8], [80 x i8]* %4, i64 0, i64 0
%10 = bitcast %struct.timeval* %5 to i8*
%11 = bitcast %struct.timeval* %6 to i8*
%12 = call i32 @gettimeofday(%struct.timeval* %5, i32* null)
%13 = icmp eq i32 %0, 4
br i1 %13, label %20, label %14
14: ; preds = %2
%15 = load i8*, i8** %1
%16 = call i32 (i8*, i8*, ...) @sprintf(i8* %8, i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %15)
%17 = call i32 @strlen(i8* %8)
%18 = call i32 @write(i32 2, i8* %8, i32 %17)
%19 = call i32 @exit(i32 1)
unreachable
20: ; preds = %2
%21 = getelementptr inbounds i8*, i8** %1, i64 1
%22 = load i8*, i8** %21
%23 = tail call i32 @atoi(i8* %22)
%24 = getelementptr inbounds i8*, i8** %1, i64 2
%25 = load i8*, i8** %24
%26 = getelementptr inbounds i8*, i8** %1, i64 3
%27 = load i8*, i8** %26
%28 = tail call i32 @atoi(i8* %27)
%29 = tail call i32 @clientConnection(i8* %25, i32 %28)
%30 = icmp slt i32 %29, 0
br i1 %30, label %33, label %31
31: ; preds = %20
%32 = icmp sgt i32 %23, 0
br i1 %32, label %36, label %58
33: ; preds = %20
%34 = tail call i32 @perror(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
%35 = tail call i32 @exit(i32 1)
unreachable
36: ; preds = %31, %49
%37 = phi i32 [ %56, %49 ], [ 0, %31 ]
%38 = call i32 @write(i32 %29, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 5)
%39 = icmp slt i32 %38, 0
br i1 %39, label %40, label %43
40: ; preds = %36
%41 = call i32 @perror(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0))
%42 = call i32 @exit(i32 1)
unreachable
43: ; preds = %36
%44 = call i32 @read(i32 %29, i8* %8, i32 80)
%45 = icmp slt i32 %44, 0
br i1 %45, label %46, label %49
46: ; preds = %43
%47 = call i32 @perror(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0))
%48 = call i32 @exit(i32 1)
unreachable
49: ; preds = %43
%50 = zext i32 %44 to i64
%51 = getelementptr inbounds [80 x i8], [80 x i8]* %3, i64 0, i64 %50
store i8 0, i8* %51
%52 = call i32 (...) @getpid()
%53 = call i32 (i8*, i8*, ...) @sprintf(i8* %9, i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.5, i64 0, i64 0), i32 %52, i8* %8)
%54 = call i32 @strlen(i8* %9)
%55 = call i32 @write(i32 1, i8* %9, i32 %54)
%56 = add nuw nsw i32 %37, 1
%57 = icmp eq i32 %56, %23
br i1 %57, label %58, label %36
58: ; preds = %49, %31
%59 = call i32 @gettimeofday(%struct.timeval* %6, i32* null)
%60 = call i32 (...) @getpid()
%61 = call i32 (i8*, i8*, ...) @sprintf(i8* %9, i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0), i32 %60)
%62 = call i32 @strlen(i8* %9)
%63 = call i32 @write(i32 1, i8* %9, i32 %62)
%64 = bitcast %struct.timeval* %7 to i8*
%65 = call i32 @timersub(%struct.timeval* %6, %struct.timeval* %5, %struct.timeval* %7)
%66 = getelementptr inbounds %struct.timeval, %struct.timeval* %7, i64 0, i32 0
%67 = load i32, i32* %66
%68 = mul nsw i32 %67, 1000
%69 = getelementptr inbounds %struct.timeval, %struct.timeval* %7, i64 0, i32 1
%70 = load i32, i32* %69
%71 = sdiv i32 %70, 1000
%72 = add nsw i32 %71, %68
%73 = call i32 (i8*, i8*, ...) @sprintf(i8* %9, i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i64 0, i64 0), i32 %72)
%74 = call i32 @strlen(i8* %9)
%75 = call i32 @write(i32 2, i8* %9, i32 %74)
%76 = call i32 @deleteSocket(i32 %29)
ret i32 0
}