#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 {
  scalar_t__ tv_usec;
  scalar_t__ tv_sec;
};
struct sockaddr_in {
  int /*<<< orphan*/ sin_addr;
  int /*<<< orphan*/ sin_port;
  int /*<<< orphan*/ sin_family;
  int /*<<< orphan*/ member_0;
};
struct sockaddr {
  int dummy;
};
typedef int /*<<< orphan*/ addr;

/* Variables and functions */
int /*<<< orphan*/ AF_INET;
int /*<<< orphan*/ SOCK_STREAM;
int connect(int, struct sockaddr *, int);
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
int /*<<< orphan*/ htons(int);
scalar_t__ inet_pton(int /*<<< orphan*/, char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ memset(char *, char, int);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ read(int, char *, int);
int /*<<< orphan*/ send(int, char *, int /*<<< orphan*/, int /*<<< orphan*/);
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char *);
int main(int argc, char *argv[]) {
  int ret = 0;
  if (argc != 2) {
    printf("[CLIENT SOCKET] Usage: ./%s <server IP4> \n", argv[0]);
    return 1;
  }
  int sockfd = socket(AF_INET, SOCK_STREAM, 0);
  if (sockfd == -1) {
    perror("[CLIENT SOCKET] Error creating socket!\n");
    return 1;
  }
  struct sockaddr_in addr = {0};
  addr.sin_family = AF_INET;
  addr.sin_port = htons(50123);
  if (inet_pton(AF_INET, argv[1], &addr.sin_addr) <= 0) {
    perror("[CLIENT SOCKET] Error in address!\n");
    return 1;
  }
  ret = connect(sockfd, (struct sockaddr *)&addr, sizeof(addr));
  if (ret == -1) {
    perror("[CLIENT SOCKET] Error connect!\n");
    return 1;
  }
  char data[1024 + 1] = {0};
  char readbuf[1024 + 1] = {0};
  int i = 0;
  unsigned long long totaltime = 0;
  struct timeval tv1, tv2;
  for (i = 0; i < 100; i++) {
    memset(data, 'A' + (i % 26), 1024);
    gettimeofday(&tv1, NULL);
    send(sockfd, data, strlen(data), 0);
    read(sockfd, readbuf, 1024);
    gettimeofday(&tv2, NULL);
    totaltime += (unsigned long long)(tv2.tv_sec - tv1.tv_sec) * 1000000 +
                 (unsigned long long)(tv2.tv_usec - tv1.tv_usec);
  }
  printf("[CLIENT SOCKET] Transferred and Received total of %d bytes..\n",
         100 * 1024);
  printf("[CLIENT SOCKET] Measured total time (for full payload): %llu "
         "microseconds, Round trip latency: %llu microseconds per trip with "
         "payload size of %d bytes.\n",
         totaltime, totaltime / 100, 1024);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x880,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     11fb <main+0x4b>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xe18(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    144a <main+0x29a>
mov    0x2de6(%rip),%rax
mov    (%rax),%edi
mov    0x2dcd(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   10d0 <socket@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0xffffffff,-0x18(%rbp)
jne    1239 <main+0x89>
lea    0xe03(%rip),%rdi
call   10b0 <perror@plt>
movl   $0x1,-0x4(%rbp)
jmp    144a <main+0x29a>
lea    -0x28(%rbp),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1080 <memset@plt>
mov    0x2d98(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x20(%rbp)
mov    $0xc3cb,%edi
call   1040 <htons@plt>
mov    %eax,-0x24(%rbp)
mov    0x2d7f(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    -0x28(%rbp),%rdx
call   10a0 <inet_pton@plt>
cmp    $0x0,%rax
jg     129e <main+0xee>
lea    0xdc6(%rip),%rdi
call   10b0 <perror@plt>
movl   $0x1,-0x4(%rbp)
jmp    144a <main+0x29a>
mov    -0x18(%rbp),%edi
lea    -0x28(%rbp),%rsi
mov    $0x10,%edx
call   10c0 <connect@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xffffffff,-0x14(%rbp)
jne    12d4 <main+0x124>
lea    0xdb3(%rip),%rdi
call   10b0 <perror@plt>
movl   $0x1,-0x4(%rbp)
jmp    144a <main+0x29a>
lea    -0x430(%rbp),%rdi
xor    %esi,%esi
mov    $0x401,%edx
call   1080 <memset@plt>
lea    -0x840(%rbp),%rdi
xor    %esi,%esi
mov    $0x401,%edx
call   1080 <memset@plt>
movl   $0x0,-0x844(%rbp)
movq   $0x0,-0x850(%rbp)
movl   $0x0,-0x844(%rbp)
cmpl   $0x64,-0x844(%rbp)
jge    1402 <main+0x252>
lea    -0x430(%rbp),%rdi
mov    -0x844(%rbp),%eax
mov    $0x1a,%ecx
cltd
idiv   %ecx
add    $0x41,%edx
mov    %dl,%al
movsbl %al,%esi
mov    $0x400,%edx
call   1080 <memset@plt>
lea    -0x860(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1070 <gettimeofday@plt>
mov    -0x18(%rbp),%eax
mov    %eax,-0x87c(%rbp)
lea    -0x430(%rbp),%rax
mov    %rax,-0x878(%rbp)
lea    -0x430(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x87c(%rbp),%edi
mov    -0x878(%rbp),%rsi
mov    %eax,%edx
xor    %ecx,%ecx
call   1050 <send@plt>
mov    -0x18(%rbp),%edi
lea    -0x840(%rbp),%rsi
mov    $0x400,%edx
call   1090 <read@plt>
lea    -0x870(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1070 <gettimeofday@plt>
mov    -0x868(%rbp),%rax
sub    -0x858(%rbp),%rax
imul   $0xf4240,%rax,%rax
mov    -0x870(%rbp),%rcx
sub    -0x860(%rbp),%rcx
add    %rcx,%rax
add    -0x850(%rbp),%rax
mov    %rax,-0x850(%rbp)
mov    -0x844(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x844(%rbp)
jmp    1319 <main+0x169>
lea    0xc8d(%rip),%rdi
mov    $0x19000,%esi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x850(%rbp),%rsi
mov    -0x850(%rbp),%rax
mov    $0x64,%ecx
xor    %edx,%edx
div    %rcx
mov    %rax,%rdx
lea    0xc9d(%rip),%rdi
mov    $0x400,%ecx
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x880,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x848,%rsp
mov    %rsi,%rbx
cmp    $0x2,%edi
jne    135c <main+0x1ac>
mov    0x2e14(%rip),%r14
mov    (%r14),%edi
mov    0x2dfa(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   10d0 <socket@plt>
cmp    $0xffffffff,%eax
je     1386 <main+0x1d6>
mov    %eax,%ebp
xorps  %xmm0,%xmm0
movaps %xmm0,(%rsp)
mov    (%r14),%eax
mov    %eax,0x8(%rsp)
mov    $0xc3cb,%edi
call   1040 <htons@plt>
mov    %eax,0x4(%rsp)
mov    (%r14),%edi
mov    0x8(%rbx),%rsi
mov    %rsp,%rdx
call   10a0 <inet_pton@plt>
test   %rax,%rax
jle    138f <main+0x1df>
mov    %rsp,%rsi
mov    %ebp,%edi
mov    $0x10,%edx
call   10c0 <connect@plt>
cmp    $0xffffffff,%eax
je     1398 <main+0x1e8>
lea    0x440(%rsp),%r14
xor    %r15d,%r15d
mov    $0x401,%edx
mov    %r14,%rdi
xor    %esi,%esi
call   1080 <memset@plt>
lea    0x30(%rsp),%rdi
mov    $0x401,%edx
xor    %esi,%esi
call   1080 <memset@plt>
mov    $0x64,%r12d
mov    $0x41,%r13b
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movzbl %r15b,%r15d
imul   $0x4f,%r15d,%eax
shr    $0xb,%eax
lea    (%rax,%rax,4),%ecx
lea    (%rcx,%rcx,4),%ecx
add    %eax,%ecx
mov    %r13d,%eax
sub    %cl,%al
movsbl %al,%esi
mov    %r14,%rdi
mov    $0x400,%edx
call   1080 <memset@plt>
lea    0x20(%rsp),%rdi
xor    %esi,%esi
call   1070 <gettimeofday@plt>
mov    %r14,%rdi
call   1030 <strlen@plt>
mov    %ebp,%edi
mov    %r14,%rsi
mov    %eax,%edx
xor    %ecx,%ecx
call   1050 <send@plt>
mov    %ebp,%edi
lea    0x30(%rsp),%rsi
mov    $0x400,%edx
call   1090 <read@plt>
lea    0x10(%rsp),%rdi
xor    %esi,%esi
call   1070 <gettimeofday@plt>
mov    0x18(%rsp),%rax
sub    0x28(%rsp),%rax
imul   $0xf4240,%rax,%rax
add    0x10(%rsp),%rbx
sub    0x20(%rsp),%rbx
add    %rax,%rbx
add    $0x1,%r13b
add    $0x1,%r15b
add    $0xffffffff,%r12d
jne    1280 <main+0xd0>
lea    0xd78(%rip),%rdi
xor    %ebp,%ebp
mov    $0x19000,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rax
shr    $0x2,%rax
movabs $0x28f5c28f5c28f5c3,%rcx
c2 f5 28
mul    %rcx
shr    $0x2,%rdx
lea    0xd89(%rip),%rdi
mov    %rbx,%rsi
mov    $0x400,%ecx
xor    %eax,%eax
call   1060 <printf@plt>
jmp    1372 <main+0x1c2>
mov    (%rbx),%rsi
lea    0xc9a(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0x1,%ebp
mov    %ebp,%eax
add    $0x848,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xc9e(%rip),%rdi
jmp    139f <main+0x1ef>
lea    0xcbd(%rip),%rdi
jmp    139f <main+0x1ef>
lea    0xcd7(%rip),%rdi
call   10b0 <perror@plt>
jmp    136d <main+0x1bd>

LLVM IR (-O0):
%struct.sockaddr_in = type { i32, i32, i32, i32 }
%struct.timeval = type { i64, i64 }
%struct.sockaddr = type { i32 }
@.str = [43 x i8] c"[CLIENT SOCKET] Usage: ./%s <server IP4> \0A\00"
@AF_INET = global i32 0
@SOCK_STREAM = global i32 0
@.str.1 = [40 x i8] c"[CLIENT SOCKET] Error creating socket!\0A\00"
@.str.2 = [35 x i8] c"[CLIENT SOCKET] Error in address!\0A\00"
@.str.3 = [32 x i8] c"[CLIENT SOCKET] Error connect!\0A\00"
@.str.4 = [62 x i8] c"[CLIENT SOCKET] Transferred and Received total of %d bytes..\0A\00"
@.str.5 = [154 x i8] c"[CLIENT SOCKET] Measured total time (for full payload): %llu microseconds, Round trip latency: %llu microseconds per trip with payload size of %d bytes.\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 %struct.sockaddr_in
%9 = alloca [1025 x i8]
%10 = alloca [1025 x i8]
%11 = alloca i32
%12 = alloca i64
%13 = alloca %struct.timeval
%14 = alloca %struct.timeval
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
%15 = load i32, i32* %4
%16 = icmp ne i32 %15, 2
br i1 %16, label %17, label %22
17: ; preds = %2
%18 = load i8**, i8*** %5
%19 = getelementptr inbounds i8*, i8** %18, i64 0
%20 = load i8*, i8** %19
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* %20)
store i32 1, i32* %3
br label %99
22: ; preds = %2
%23 = load i32, i32* @AF_INET
%24 = load i32, i32* @SOCK_STREAM
%25 = call i32 @socket(i32 %23, i32 %24, i32 0)
store i32 %25, i32* %7
%26 = load i32, i32* %7
%27 = icmp eq i32 %26, -1
br i1 %27, label %28, label %30
28: ; preds = %22
%29 = call i32 @perror(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
store i32 1, i32* %3
br label %99
30: ; preds = %22
%31 = bitcast %struct.sockaddr_in* %8 to i8*
%32 = load i32, i32* @AF_INET
%33 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %8, i32 0, i32 2
store i32 %32, i32* %33
%34 = call i32 @htons(i32 50123)
%35 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %8, i32 0, i32 1
store i32 %34, i32* %35
%36 = load i32, i32* @AF_INET
%37 = load i8**, i8*** %5
%38 = getelementptr inbounds i8*, i8** %37, i64 1
%39 = load i8*, i8** %38
%40 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %8, i32 0, i32 0
%41 = call i64 @inet_pton(i32 %36, i8* %39, i32* %40)
%42 = icmp sle i64 %41, 0
br i1 %42, label %43, label %45
43: ; preds = %30
%44 = call i32 @perror(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0))
store i32 1, i32* %3
br label %99
45: ; preds = %30
%46 = load i32, i32* %7
%47 = bitcast %struct.sockaddr_in* %8 to %struct.sockaddr*
%48 = call i32 @connect(i32 %46, %struct.sockaddr* %47, i32 16)
store i32 %48, i32* %6
%49 = load i32, i32* %6
%50 = icmp eq i32 %49, -1
br i1 %50, label %51, label %53
51: ; preds = %45
%52 = call i32 @perror(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0))
store i32 1, i32* %3
br label %99
53: ; preds = %45
%54 = bitcast [1025 x i8]* %9 to i8*
%55 = bitcast [1025 x i8]* %10 to i8*
store i32 0, i32* %11
store i64 0, i64* %12
store i32 0, i32* %11
br label %56
56: ; preds = %90, %53
%57 = load i32, i32* %11
%58 = icmp slt i32 %57, 100
br i1 %58, label %59, label %93
59: ; preds = %56
%60 = getelementptr inbounds [1025 x i8], [1025 x i8]* %9, i64 0, i64 0
%61 = load i32, i32* %11
%62 = srem i32 %61, 26
%63 = add nsw i32 65, %62
%64 = trunc i32 %63 to i8
%65 = call i32 @memset(i8* %60, i8 signext %64, i32 1024)
%66 = call i32 @gettimeofday(%struct.timeval* %13, i32* null)
%67 = load i32, i32* %7
%68 = getelementptr inbounds [1025 x i8], [1025 x i8]* %9, i64 0, i64 0
%69 = getelementptr inbounds [1025 x i8], [1025 x i8]* %9, i64 0, i64 0
%70 = call i32 @strlen(i8* %69)
%71 = call i32 @send(i32 %67, i8* %68, i32 %70, i32 0)
%72 = load i32, i32* %7
%73 = getelementptr inbounds [1025 x i8], [1025 x i8]* %10, i64 0, i64 0
%74 = call i32 @read(i32 %72, i8* %73, i32 1024)
%75 = call i32 @gettimeofday(%struct.timeval* %14, i32* null)
%76 = getelementptr inbounds %struct.timeval, %struct.timeval* %14, i32 0, i32 1
%77 = load i64, i64* %76
%78 = getelementptr inbounds %struct.timeval, %struct.timeval* %13, i32 0, i32 1
%79 = load i64, i64* %78
%80 = sub nsw i64 %77, %79
%81 = mul i64 %80, 1000000
%82 = getelementptr inbounds %struct.timeval, %struct.timeval* %14, i32 0, i32 0
%83 = load i64, i64* %82
%84 = getelementptr inbounds %struct.timeval, %struct.timeval* %13, i32 0, i32 0
%85 = load i64, i64* %84
%86 = sub nsw i64 %83, %85
%87 = add i64 %81, %86
%88 = load i64, i64* %12
%89 = add i64 %88, %87
store i64 %89, i64* %12
br label %90
90: ; preds = %59
%91 = load i32, i32* %11
%92 = add nsw i32 %91, 1
store i32 %92, i32* %11
br label %56
93: ; preds = %56
%94 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.4, i64 0, i64 0), i32 102400)
%95 = load i64, i64* %12
%96 = load i64, i64* %12
%97 = udiv i64 %96, 100
%98 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([154 x i8], [154 x i8]* @.str.5, i64 0, i64 0), i64 %95, i64 %97, i32 1024)
store i32 0, i32* %3
br label %99
99: ; preds = %93, %51, %43, %28, %17
%100 = load i32, i32* %3
ret i32 %100
}

LLVM IR (-O2):
%struct.sockaddr_in = type { i32, i32, i32, i32 }
%struct.timeval = type { i64, i64 }
%struct.sockaddr = type { i32 }
@.str = [43 x i8] c"[CLIENT SOCKET] Usage: ./%s <server IP4> \0A\00"
@AF_INET = global i32 0
@SOCK_STREAM = global i32 0
@.str.1 = [40 x i8] c"[CLIENT SOCKET] Error creating socket!\0A\00"
@.str.2 = [35 x i8] c"[CLIENT SOCKET] Error in address!\0A\00"
@.str.3 = [32 x i8] c"[CLIENT SOCKET] Error connect!\0A\00"
@.str.4 = [62 x i8] c"[CLIENT SOCKET] Transferred and Received total of %d bytes..\0A\00"
@.str.5 = [154 x i8] c"[CLIENT SOCKET] Measured total time (for full payload): %llu microseconds, Round trip latency: %llu microseconds per trip with payload size of %d bytes.\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca %struct.sockaddr_in
%4 = alloca [1025 x i8]
%5 = alloca [1025 x i8]
%6 = alloca %struct.timeval
%7 = alloca %struct.timeval
%8 = icmp eq i32 %0, 2
br i1 %8, label %12, label %9
9: ; preds = %2
%10 = load i8*, i8** %1
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* %10)
br label %77
12: ; preds = %2
%13 = load i32, i32* @AF_INET
%14 = load i32, i32* @SOCK_STREAM
%15 = tail call i32 @socket(i32 %13, i32 %14, i32 0)
%16 = icmp eq i32 %15, -1
br i1 %16, label %17, label %19
17: ; preds = %12
%18 = tail call i32 @perror(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
br label %77
19: ; preds = %12
%20 = bitcast %struct.sockaddr_in* %3 to i8*
%21 = load i32, i32* @AF_INET
%22 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %3, i64 0, i32 2
store i32 %21, i32* %22
%23 = tail call i32 @htons(i32 50123)
%24 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %3, i64 0, i32 1
store i32 %23, i32* %24
%25 = load i32, i32* @AF_INET
%26 = getelementptr inbounds i8*, i8** %1, i64 1
%27 = load i8*, i8** %26
%28 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %3, i64 0, i32 0
%29 = call i64 @inet_pton(i32 %25, i8* %27, i32* %28)
%30 = icmp slt i64 %29, 1
br i1 %30, label %31, label %33
31: ; preds = %19
%32 = call i32 @perror(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0))
br label %75
33: ; preds = %19
%34 = bitcast %struct.sockaddr_in* %3 to %struct.sockaddr*
%35 = call i32 @connect(i32 %15, %struct.sockaddr* %34, i32 16)
%36 = icmp eq i32 %35, -1
br i1 %36, label %37, label %39
37: ; preds = %33
%38 = call i32 @perror(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0))
br label %75
39: ; preds = %33
%40 = getelementptr inbounds [1025 x i8], [1025 x i8]* %4, i64 0, i64 0
%41 = getelementptr inbounds [1025 x i8], [1025 x i8]* %5, i64 0, i64 0
%42 = bitcast %struct.timeval* %6 to i8*
%43 = bitcast %struct.timeval* %7 to i8*
%44 = getelementptr inbounds %struct.timeval, %struct.timeval* %7, i64 0, i32 1
%45 = getelementptr inbounds %struct.timeval, %struct.timeval* %6, i64 0, i32 1
%46 = getelementptr inbounds %struct.timeval, %struct.timeval* %7, i64 0, i32 0
%47 = getelementptr inbounds %struct.timeval, %struct.timeval* %6, i64 0, i32 0
br label %48
48: ; preds = %39, %48
%49 = phi i64 [ 0, %39 ], [ %68, %48 ]
%50 = phi i32 [ 0, %39 ], [ %69, %48 ]
%51 = trunc i32 %50 to i8
%52 = urem i8 %51, 26
%53 = add nuw nsw i8 %52, 65
%54 = call i32 @memset(i8* %40, i8 signext %53, i32 1024)
%55 = call i32 @gettimeofday(%struct.timeval* %6, i32* null)
%56 = call i32 @strlen(i8* %40)
%57 = call i32 @send(i32 %15, i8* %40, i32 %56, i32 0)
%58 = call i32 @read(i32 %15, i8* %41, i32 1024)
%59 = call i32 @gettimeofday(%struct.timeval* %7, i32* null)
%60 = load i64, i64* %44
%61 = load i64, i64* %45
%62 = sub nsw i64 %60, %61
%63 = mul i64 %62, 1000000
%64 = load i64, i64* %46
%65 = load i64, i64* %47
%66 = add i64 %64, %49
%67 = sub i64 %66, %65
%68 = add i64 %67, %63
%69 = add nuw nsw i32 %50, 1
%70 = icmp eq i32 %69, 100
br i1 %70, label %71, label %48
71: ; preds = %48
%72 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @.str.4, i64 0, i64 0), i32 102400)
%73 = udiv i64 %68, 100
%74 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([154 x i8], [154 x i8]* @.str.5, i64 0, i64 0), i64 %68, i64 %73, i32 1024)
br label %75
75: ; preds = %71, %37, %31
%76 = phi i32 [ 1, %31 ], [ 1, %37 ], [ 0, %71 ]
br label %77
77: ; preds = %17, %75, %9
%78 = phi i32 [ 1, %9 ], [ 1, %17 ], [ %76, %75 ]
ret i32 %78
}