#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 */
typedef int /*<<< orphan*/ pthread_t;

/* Variables and functions */
int /*<<< orphan*/ send_handler(char *, int, char *);
int /*<<< orphan*/ sleep(int);
int main(int argc, char *argv[]) {
  pthread_t inc_x_thread;
  int err;
  int k;
  for (k = 0; k < 31; k++) {
    send_handler("52.17.166.244", 9898, "1B");
    sleep(2);
    send_handler("52.17.166.244", 9898, "10B");
    sleep(2);
    send_handler("52.17.166.244", 9898, "100B");
    sleep(2);
    send_handler("52.17.166.244", 9898, "1k");
    sleep(2);
    send_handler("52.17.166.244", 9898, "10k");
    sleep(2);
    send_handler("52.17.166.244", 9898, "100k");
    sleep(2);
    send_handler("52.17.166.244", 9898, "1mb");
    sleep(2);
    send_handler("52.17.166.244", 9898, "10mb");
    sleep(2);
    send_handler("52.17.166.244", 9898, "100mb");
    sleep(2);
    send_handler("52.17.166.244", 9898, "1gb");
    sleep(2);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x1f,-0x1c(%rbp)
jge    12a9 <main+0x189>
lea    0xeb2(%rip),%rdi
mov    $0x26aa,%esi
lea    0xeb4(%rip),%rdx
call   1030 <send_handler@plt>
mov    $0x2,%edi
call   1040 <sleep@plt>
lea    0xe90(%rip),%rdi
mov    $0x26aa,%esi
lea    0xe95(%rip),%rdx
call   1030 <send_handler@plt>
mov    $0x2,%edi
call   1040 <sleep@plt>
lea    0xe6e(%rip),%rdi
mov    $0x26aa,%esi
lea    0xe77(%rip),%rdx
call   1030 <send_handler@plt>
mov    $0x2,%edi
call   1040 <sleep@plt>
lea    0xe4c(%rip),%rdi
mov    $0x26aa,%esi
lea    0xe5a(%rip),%rdx
call   1030 <send_handler@plt>
mov    $0x2,%edi
call   1040 <sleep@plt>
lea    0xe2a(%rip),%rdi
mov    $0x26aa,%esi
lea    0xe3b(%rip),%rdx
call   1030 <send_handler@plt>
mov    $0x2,%edi
call   1040 <sleep@plt>
lea    0xe08(%rip),%rdi
mov    $0x26aa,%esi
lea    0xe1d(%rip),%rdx
call   1030 <send_handler@plt>
mov    $0x2,%edi
call   1040 <sleep@plt>
lea    0xde6(%rip),%rdi
mov    $0x26aa,%esi
lea    0xe00(%rip),%rdx
call   1030 <send_handler@plt>
mov    $0x2,%edi
call   1040 <sleep@plt>
lea    0xdc4(%rip),%rdi
mov    $0x26aa,%esi
lea    0xde2(%rip),%rdx
call   1030 <send_handler@plt>
mov    $0x2,%edi
call   1040 <sleep@plt>
lea    0xda2(%rip),%rdi
mov    $0x26aa,%esi
lea    0xdc5(%rip),%rdx
call   1030 <send_handler@plt>
mov    $0x2,%edi
call   1040 <sleep@plt>
lea    0xd80(%rip),%rdi
mov    $0x26aa,%esi
lea    0xda9(%rip),%rdx
call   1030 <send_handler@plt>
mov    $0x2,%edi
call   1040 <sleep@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    113d <main+0x1d>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    $0x1f,%r14d
lea    0xec8(%rip),%rbx
lea    0xee7(%rip),%r15
lea    0xee4(%rip),%r12
lea    0xee2(%rip),%r13
lea    0xee1(%rip),%rbp
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbx,%rdi
mov    $0x26aa,%esi
lea    0xe9f(%rip),%rdx
call   1030 <send_handler@plt>
mov    $0x2,%edi
call   1040 <sleep@plt>
mov    %rbx,%rdi
mov    $0x26aa,%esi
lea    0xe84(%rip),%rdx
call   1030 <send_handler@plt>
mov    $0x2,%edi
call   1040 <sleep@plt>
mov    %rbx,%rdi
mov    $0x26aa,%esi
lea    0xe6a(%rip),%rdx
call   1030 <send_handler@plt>
mov    $0x2,%edi
call   1040 <sleep@plt>
mov    %rbx,%rdi
mov    $0x26aa,%esi
lea    0xe51(%rip),%rdx
call   1030 <send_handler@plt>
mov    $0x2,%edi
call   1040 <sleep@plt>
mov    %rbx,%rdi
mov    $0x26aa,%esi
lea    0xe36(%rip),%rdx
call   1030 <send_handler@plt>
mov    $0x2,%edi
call   1040 <sleep@plt>
mov    %rbx,%rdi
mov    $0x26aa,%esi
lea    0xe1c(%rip),%rdx
call   1030 <send_handler@plt>
mov    $0x2,%edi
call   1040 <sleep@plt>
mov    %rbx,%rdi
mov    $0x26aa,%esi
mov    %r15,%rdx
call   1030 <send_handler@plt>
mov    $0x2,%edi
call   1040 <sleep@plt>
mov    %rbx,%rdi
mov    $0x26aa,%esi
mov    %r12,%rdx
call   1030 <send_handler@plt>
mov    $0x2,%edi
call   1040 <sleep@plt>
mov    %rbx,%rdi
mov    $0x26aa,%esi
mov    %r13,%rdx
call   1030 <send_handler@plt>
mov    $0x2,%edi
call   1040 <sleep@plt>
mov    %rbx,%rdi
mov    $0x26aa,%esi
mov    %rbp,%rdx
call   1030 <send_handler@plt>
mov    $0x2,%edi
call   1040 <sleep@plt>
add    $0xffffffff,%r14d
jne    1160 <main+0x40>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [14 x i8] c"52.17.166.244\00"
@.str.1 = [3 x i8] c"1B\00"
@.str.2 = [4 x i8] c"10B\00"
@.str.3 = [5 x i8] c"100B\00"
@.str.4 = [3 x i8] c"1k\00"
@.str.5 = [4 x i8] c"10k\00"
@.str.6 = [5 x i8] c"100k\00"
@.str.7 = [4 x i8] c"1mb\00"
@.str.8 = [5 x i8] c"10mb\00"
@.str.9 = [6 x i8] c"100mb\00"
@.str.10 = [4 x i8] c"1gb\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
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %8
br label %9
9: ; preds = %33, %2
%10 = load i32, i32* %8
%11 = icmp slt i32 %10, 31
br i1 %11, label %12, label %36
12: ; preds = %9
%13 = call i32 @send_handler(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 9898, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%14 = call i32 @sleep(i32 2)
%15 = call i32 @send_handler(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 9898, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%16 = call i32 @sleep(i32 2)
%17 = call i32 @send_handler(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 9898, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%18 = call i32 @sleep(i32 2)
%19 = call i32 @send_handler(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 9898, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%20 = call i32 @sleep(i32 2)
%21 = call i32 @send_handler(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 9898, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
%22 = call i32 @sleep(i32 2)
%23 = call i32 @send_handler(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 9898, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
%24 = call i32 @sleep(i32 2)
%25 = call i32 @send_handler(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 9898, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0))
%26 = call i32 @sleep(i32 2)
%27 = call i32 @send_handler(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 9898, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0))
%28 = call i32 @sleep(i32 2)
%29 = call i32 @send_handler(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 9898, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0))
%30 = call i32 @sleep(i32 2)
%31 = call i32 @send_handler(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 9898, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0))
%32 = call i32 @sleep(i32 2)
br label %33
33: ; preds = %12
%34 = load i32, i32* %8
%35 = add nsw i32 %34, 1
store i32 %35, i32* %8
br label %9
36: ; preds = %9
%37 = load i32, i32* %3
ret i32 %37
}

LLVM IR (-O2):
@.str = [14 x i8] c"52.17.166.244\00"
@.str.1 = [3 x i8] c"1B\00"
@.str.2 = [4 x i8] c"10B\00"
@.str.3 = [5 x i8] c"100B\00"
@.str.4 = [3 x i8] c"1k\00"
@.str.5 = [4 x i8] c"10k\00"
@.str.6 = [5 x i8] c"100k\00"
@.str.7 = [4 x i8] c"1mb\00"
@.str.8 = [5 x i8] c"10mb\00"
@.str.9 = [6 x i8] c"100mb\00"
@.str.10 = [4 x i8] c"1gb\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %3
3: ; preds = %2, %3
%4 = phi i32 [ 0, %2 ], [ %25, %3 ]
%5 = tail call i32 @send_handler(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 9898, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 @sleep(i32 2)
%7 = tail call i32 @send_handler(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 9898, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%8 = tail call i32 @sleep(i32 2)
%9 = tail call i32 @send_handler(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 9898, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%10 = tail call i32 @sleep(i32 2)
%11 = tail call i32 @send_handler(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 9898, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%12 = tail call i32 @sleep(i32 2)
%13 = tail call i32 @send_handler(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 9898, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
%14 = tail call i32 @sleep(i32 2)
%15 = tail call i32 @send_handler(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 9898, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
%16 = tail call i32 @sleep(i32 2)
%17 = tail call i32 @send_handler(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 9898, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0))
%18 = tail call i32 @sleep(i32 2)
%19 = tail call i32 @send_handler(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 9898, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0))
%20 = tail call i32 @sleep(i32 2)
%21 = tail call i32 @send_handler(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 9898, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0))
%22 = tail call i32 @sleep(i32 2)
%23 = tail call i32 @send_handler(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 9898, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0))
%24 = tail call i32 @sleep(i32 2)
%25 = add nuw nsw i32 %4, 1
%26 = icmp eq i32 %25, 31
br i1 %26, label %27, label %3
27: ; preds = %3
ret i32 0
}