#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 */
typedef scalar_t__ time_t;
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*/ si_other;
typedef int /*<<< orphan*/ si_me;

/* Variables and functions */
int /*<<< orphan*/ AF_INET;
int /*<<< orphan*/ INADDR_ANY;
int /*<<< orphan*/ IPPROTO_UDP;
int /*<<< orphan*/ SOCK_DGRAM;
int bind(int, struct sockaddr *, int);
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ diep(char *);
int /*<<< orphan*/ htonl(int /*<<< orphan*/);
int /*<<< orphan*/ htons(int);
char *inet_ntoa(TYPE_1__);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
int ntohs(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int recvfrom(int, char *, int, int /*<<< orphan*/, struct sockaddr *, int *);
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
scalar_t__ time(int /*<<< orphan*/ *);
int main(void) {
  struct sockaddr_in si_me, si_other;
  int s, slen = sizeof(si_other);
  unsigned int recvcount = 0;
  unsigned long bw = 0;
  unsigned int i = 0;
  char buf[4096];
  int *head = (int *)buf;
  time_t start, now, next = 0;
  long long int bytes = 0, intervalbytes = 0;
  unsigned int lost = 0;
  if ((s = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) == -1)
    diep("socket");
  memset((char *)&si_me, 0, sizeof(si_me));
  si_me.sin_family = AF_INET;
  si_me.sin_port = htons(9930);
  si_me.sin_addr.s_addr = htonl(INADDR_ANY);
  if (bind(s, (struct sockaddr *)&si_me, sizeof(si_me)) == -1)
    diep("bind");
  recvfrom(s, buf, 4096, 0, (struct sockaddr *)&si_other, &slen);
  recvcount++;
  bytes += 4096;
  intervalbytes += 4096;
  lost = (*head) - recvcount;
  printf("\nServer started receiving data\n");
  printf("head = %u, recvcount = %u, lost = %u\n\n", *head, recvcount, lost);
  start = now = time(NULL);
  next = now + 5;
  while (1) {
    if (recvfrom(s, buf, 4096, 0, (struct sockaddr *)&si_other, &slen) == -1)
      diep("recvfrom()");
    buf[4096 - 1] = '\0';
    recvcount++;
    bytes += 4096;
    intervalbytes += 4096;
    lost = (*head) - recvcount;
    now = time(NULL);
    if (now >= next) {
      next = now + 5;
      printf("Received packet from %s:%d\n%lld Bytes (%u Packets, lost: %u). "
             "Average bw = %.2f Bytes/s, Current bw = %.2f Bytes/s\n\n",
             inet_ntoa(si_other.sin_addr), ntohs(si_other.sin_port), bytes,
             recvcount, lost, ((float)bytes / (float)(now - start)),
             ((float)intervalbytes / (float)5));
      intervalbytes = 0;
    }
  }
  close(s);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1080,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xc,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
movq   $0x0,-0x38(%rbp)
movl   $0x0,-0x3c(%rbp)
lea    -0x1040(%rbp),%rax
mov    %rax,-0x1048(%rbp)
movq   $0x0,-0x1060(%rbp)
movq   $0x0,-0x1068(%rbp)
movq   $0x0,-0x1070(%rbp)
movl   $0x0,-0x1074(%rbp)
mov    0x2dc9(%rip),%rax
mov    (%rax),%edi
mov    0x2db0(%rip),%rax
mov    (%rax),%esi
mov    0x2d8f(%rip),%rax
mov    (%rax),%edx
call   10d0 <socket@plt>
mov    %eax,-0x24(%rbp)
cmp    $0xffffffff,%eax
jne    1250 <main+0xa0>
lea    0xdb9(%rip),%rdi
call   1080 <diep@plt>
lea    -0x10(%rbp),%rdi
xor    %esi,%esi
mov    $0xc,%edx
call   1070 <memset@plt>
mov    0x2d81(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
mov    $0x26ca,%edi
call   1040 <htons@plt>
mov    %eax,-0x10(%rbp)
mov    0x2d60(%rip),%rax
mov    (%rax),%edi
call   1060 <htonl@plt>
mov    %eax,-0xc(%rbp)
mov    -0x24(%rbp),%edi
lea    -0x10(%rbp),%rsi
mov    $0xc,%edx
call   10c0 <bind@plt>
cmp    $0xffffffff,%eax
jne    12b0 <main+0x100>
lea    0xd60(%rip),%rdi
call   1080 <diep@plt>
mov    -0x24(%rbp),%edi
lea    -0x1040(%rbp),%rsi
lea    -0x20(%rbp),%r8
mov    $0x1000,%edx
xor    %ecx,%ecx
lea    -0x28(%rbp),%r9
call   10a0 <recvfrom@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x1068(%rbp),%rax
add    $0x1000,%rax
mov    %rax,-0x1068(%rbp)
mov    -0x1070(%rbp),%rax
add    $0x1000,%rax
mov    %rax,-0x1070(%rbp)
mov    -0x1048(%rbp),%rax
mov    (%rax),%eax
sub    -0x2c(%rbp),%eax
mov    %eax,-0x1074(%rbp)
lea    0xcf8(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x1048(%rbp),%rax
mov    (%rax),%esi
mov    -0x2c(%rbp),%edx
mov    -0x1074(%rbp),%ecx
lea    0xcf8(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1090 <time@plt>
mov    %rax,-0x1058(%rbp)
mov    %rax,-0x1050(%rbp)
mov    -0x1058(%rbp),%rax
add    $0x5,%rax
mov    %rax,-0x1060(%rbp)
mov    -0x24(%rbp),%edi
lea    -0x1040(%rbp),%rsi
lea    -0x20(%rbp),%r8
mov    $0x1000,%edx
xor    %ecx,%ecx
lea    -0x28(%rbp),%r9
call   10a0 <recvfrom@plt>
cmp    $0xffffffff,%eax
jne    139b <main+0x1eb>
lea    0xcc1(%rip),%rdi
call   1080 <diep@plt>
movb   $0x0,-0x41(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x1068(%rbp),%rax
add    $0x1000,%rax
mov    %rax,-0x1068(%rbp)
mov    -0x1070(%rbp),%rax
add    $0x1000,%rax
mov    %rax,-0x1070(%rbp)
mov    -0x1048(%rbp),%rax
mov    (%rax),%eax
sub    -0x2c(%rbp),%eax
mov    %eax,-0x1074(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1090 <time@plt>
mov    %rax,-0x1058(%rbp)
mov    -0x1058(%rbp),%rax
cmp    -0x1060(%rbp),%rax
jl     14a0 <main+0x2f0>
mov    -0x1058(%rbp),%rax
add    $0x5,%rax
mov    %rax,-0x1060(%rbp)
mov    -0x1c(%rbp),%edi
call   1030 <inet_ntoa@plt>
mov    %rax,-0x1080(%rbp)
mov    -0x20(%rbp),%edi
call   10b0 <ntohs@plt>
mov    -0x1080(%rbp),%rsi
mov    %eax,%edx
mov    -0x1068(%rbp),%rcx
mov    -0x2c(%rbp),%r8d
mov    -0x1074(%rbp),%r9d
cvtsi2ssq -0x1068(%rbp),%xmm0
ff ff
mov    -0x1058(%rbp),%rax
sub    -0x1050(%rbp),%rax
cvtsi2ss %rax,%xmm1
divss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
cvtsi2ssq -0x1070(%rbp),%xmm1
ff ff
movss  0xb81(%rip),%xmm2
divss  %xmm2,%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xbd4(%rip),%rdi
mov    $0x2,%al
call   1050 <printf@plt>
movq   $0x0,-0x1070(%rbp)
jmp    1368 <main+0x1b8>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1048,%rsp
movl   $0xc,0x4(%rsp)
mov    0x2e08(%rip),%r14
mov    (%r14),%edi
mov    0x2dee(%rip),%rax
mov    (%rax),%esi
mov    0x2dcd(%rip),%rax
mov    (%rax),%edx
call   10e0 <socket@plt>
mov    %eax,%ebx
cmp    $0xffffffff,%eax
jne    120d <main+0x4d>
lea    0xdfc(%rip),%rdi
call   1090 <diep@plt>
lea    0x20(%rsp),%rbp
mov    %rbp,%rdi
xor    %esi,%esi
mov    $0xc,%edx
call   1080 <memset@plt>
mov    (%r14),%eax
mov    %eax,0x28(%rsp)
mov    $0x26ca,%edi
call   1050 <htons@plt>
mov    %eax,0x20(%rsp)
mov    0x2da3(%rip),%rax
mov    (%rax),%edi
call   1070 <htonl@plt>
mov    %eax,0x24(%rsp)
mov    %ebx,%edi
mov    %rbp,%rsi
mov    $0xc,%edx
call   10d0 <bind@plt>
cmp    $0xffffffff,%eax
jne    1268 <main+0xa8>
lea    0xda8(%rip),%rdi
call   1090 <diep@plt>
lea    0x40(%rsp),%rsi
lea    0x10(%rsp),%r8
lea    0x4(%rsp),%r9
mov    %ebx,%edi
mov    $0x1000,%edx
xor    %ecx,%ecx
call   10b0 <recvfrom@plt>
mov    0x40(%rsp),%r14d
add    $0xffffffff,%r14d
lea    0xe22(%rip),%rdi
call   1030 <puts@plt>
mov    0x40(%rsp),%esi
lea    0xd6b(%rip),%rdi
mov    $0x1,%ebp
mov    $0x1,%edx
mov    %r14d,%ecx
xor    %eax,%eax
call   1060 <printf@plt>
xor    %edi,%edi
call   10a0 <time@plt>
mov    %rax,%r12
mov    $0x1000,%ecx
mov    %rcx,0x8(%rsp)
mov    %rax,0x30(%rsp)
mov    $0x1000,%eax
jmp    1365 <main+0x1a5>
nopl   0x0(%rax)
mov    %rax,%r13
sub    %ebp,%r14d
mov    0x14(%rsp),%edi
call   1040 <inet_ntoa@plt>
mov    %rax,%r12
mov    0x10(%rsp),%edi
call   10c0 <ntohs@plt>
mov    0x8(%rsp),%rcx
sub    %r15,%rcx
xorps  %xmm0,%xmm0
cvtsi2ss %rcx,%xmm0
mov    %r13,%rdx
sub    0x30(%rsp),%rdx
xorps  %xmm1,%xmm1
cvtsi2ss %rdx,%xmm1
mov    0x38(%rsp),%rdx
sub    %r15,%rdx
xorps  %xmm2,%xmm2
cvtsi2ss %rdx,%xmm2
divss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
divss  0xcc5(%rip),%xmm2
xorps  %xmm1,%xmm1
cvtss2sd %xmm2,%xmm1
lea    0xcf9(%rip),%rdi
mov    %r12,%rsi
mov    %eax,%edx
mov    %rcx,0x8(%rsp)
mov    %ebp,%r8d
mov    %r14d,%r9d
mov    $0x2,%al
call   1060 <printf@plt>
mov    %r13,%r12
xor    %eax,%eax
mov    %rax,0x38(%rsp)
add    $0x5,%r12
xor    %r15d,%r15d
jmp    13a7 <main+0x1e7>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movb   $0x0,0x103f(%rsp)
add    $0x1,%ebp
mov    0x40(%rsp),%r14d
xor    %edi,%edi
call   10a0 <time@plt>
add    $0xfffffffffffff000,%r15
cmp    %r12,%rax
jge    12e0 <main+0x120>
mov    %ebx,%edi
lea    0x40(%rsp),%rsi
mov    $0x1000,%edx
xor    %ecx,%ecx
lea    0x10(%rsp),%r8
lea    0x4(%rsp),%r9
call   10b0 <recvfrom@plt>
cmp    $0xffffffff,%eax
jne    1380 <main+0x1c0>
lea    0xc67(%rip),%rdi
call   1090 <diep@plt>
jmp    1380 <main+0x1c0>

LLVM IR (-O0):
%struct.sockaddr_in = type { i32, %struct.TYPE_2__, i32 }
%struct.TYPE_2__ = type { i32 }
%struct.sockaddr = type { i32 }
@AF_INET = global i32 0
@SOCK_DGRAM = global i32 0
@IPPROTO_UDP = global i32 0
@.str = [7 x i8] c"socket\00"
@INADDR_ANY = global i32 0
@.str.1 = [5 x i8] c"bind\00"
@.str.2 = [32 x i8] c"\0AServer started receiving data\0A\00"
@.str.3 = [39 x i8] c"head = %u, recvcount = %u, lost = %u\0A\0A\00"
@.str.4 = [11 x i8] c"recvfrom()\00"
@.str.5 = [117 x i8] c"Received packet from %s:%d\0A%lld Bytes (%u Packets, lost: %u). Average bw = %.2f Bytes/s, Current bw = %.2f Bytes/s\0A\0A\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 i32
%7 = alloca i64
%8 = alloca i32
%9 = alloca [4096 x i8]
%10 = alloca i32*
%11 = alloca i64
%12 = alloca i64
%13 = alloca i64
%14 = alloca i64
%15 = alloca i64
%16 = alloca i32
store i32 0, i32* %1
store i32 12, i32* %5
store i32 0, i32* %6
store i64 0, i64* %7
store i32 0, i32* %8
%17 = getelementptr inbounds [4096 x i8], [4096 x i8]* %9, i64 0, i64 0
%18 = bitcast i8* %17 to i32*
store i32* %18, i32** %10
store i64 0, i64* %13
store i64 0, i64* %14
store i64 0, i64* %15
store i32 0, i32* %16
%19 = load i32, i32* @AF_INET
%20 = load i32, i32* @SOCK_DGRAM
%21 = load i32, i32* @IPPROTO_UDP
%22 = call i32 @socket(i32 %19, i32 %20, i32 %21)
store i32 %22, i32* %4
%23 = icmp eq i32 %22, -1
br i1 %23, label %24, label %26
24: ; preds = %0
%25 = call i32 @diep(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %26
26: ; preds = %24, %0
%27 = bitcast %struct.sockaddr_in* %2 to i8*
%28 = call i32 @memset(i8* %27, i32 0, i32 12)
%29 = load i32, i32* @AF_INET
%30 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %2, i32 0, i32 2
store i32 %29, i32* %30
%31 = call i32 @htons(i32 9930)
%32 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %2, i32 0, i32 0
store i32 %31, i32* %32
%33 = load i32, i32* @INADDR_ANY
%34 = call i32 @htonl(i32 %33)
%35 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %2, i32 0, i32 1
%36 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %35, i32 0, i32 0
store i32 %34, i32* %36
%37 = load i32, i32* %4
%38 = bitcast %struct.sockaddr_in* %2 to %struct.sockaddr*
%39 = call i32 @bind(i32 %37, %struct.sockaddr* %38, i32 12)
%40 = icmp eq i32 %39, -1
br i1 %40, label %41, label %43
41: ; preds = %26
%42 = call i32 @diep(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %43
43: ; preds = %41, %26
%44 = load i32, i32* %4
%45 = getelementptr inbounds [4096 x i8], [4096 x i8]* %9, i64 0, i64 0
%46 = bitcast %struct.sockaddr_in* %3 to %struct.sockaddr*
%47 = call i32 @recvfrom(i32 %44, i8* %45, i32 4096, i32 0, %struct.sockaddr* %46, i32* %5)
%48 = load i32, i32* %6
%49 = add i32 %48, 1
store i32 %49, i32* %6
%50 = load i64, i64* %14
%51 = add nsw i64 %50, 4096
store i64 %51, i64* %14
%52 = load i64, i64* %15
%53 = add nsw i64 %52, 4096
store i64 %53, i64* %15
%54 = load i32*, i32** %10
%55 = load i32, i32* %54
%56 = load i32, i32* %6
%57 = sub i32 %55, %56
store i32 %57, i32* %16
%58 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0))
%59 = load i32*, i32** %10
%60 = load i32, i32* %59
%61 = load i32, i32* %6
%62 = load i32, i32* %16
%63 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.3, i64 0, i64 0), i32 %60, i32 %61, i32 %62)
%64 = call i64 @time(i32* null)
store i64 %64, i64* %12
store i64 %64, i64* %11
%65 = load i64, i64* %12
%66 = add nsw i64 %65, 5
store i64 %66, i64* %13
br label %67
67: ; preds = %43, %117
%68 = load i32, i32* %4
%69 = getelementptr inbounds [4096 x i8], [4096 x i8]* %9, i64 0, i64 0
%70 = bitcast %struct.sockaddr_in* %3 to %struct.sockaddr*
%71 = call i32 @recvfrom(i32 %68, i8* %69, i32 4096, i32 0, %struct.sockaddr* %70, i32* %5)
%72 = icmp eq i32 %71, -1
br i1 %72, label %73, label %75
73: ; preds = %67
%74 = call i32 @diep(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0))
br label %75
75: ; preds = %73, %67
%76 = getelementptr inbounds [4096 x i8], [4096 x i8]* %9, i64 0, i64 4095
store i8 0, i8* %76
%77 = load i32, i32* %6
%78 = add i32 %77, 1
store i32 %78, i32* %6
%79 = load i64, i64* %14
%80 = add nsw i64 %79, 4096
store i64 %80, i64* %14
%81 = load i64, i64* %15
%82 = add nsw i64 %81, 4096
store i64 %82, i64* %15
%83 = load i32*, i32** %10
%84 = load i32, i32* %83
%85 = load i32, i32* %6
%86 = sub i32 %84, %85
store i32 %86, i32* %16
%87 = call i64 @time(i32* null)
store i64 %87, i64* %12
%88 = load i64, i64* %12
%89 = load i64, i64* %13
%90 = icmp sge i64 %88, %89
br i1 %90, label %91, label %117
91: ; preds = %75
%92 = load i64, i64* %12
%93 = add nsw i64 %92, 5
store i64 %93, i64* %13
%94 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %3, i32 0, i32 1
%95 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %94, i32 0, i32 0
%96 = load i32, i32* %95
%97 = call i8* @inet_ntoa(i32 %96)
%98 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %3, i32 0, i32 0
%99 = load i32, i32* %98
%100 = call i32 @ntohs(i32 %99)
%101 = load i64, i64* %14
%102 = load i32, i32* %6
%103 = load i32, i32* %16
%104 = load i64, i64* %14
%105 = sitofp i64 %104 to float
%106 = load i64, i64* %12
%107 = load i64, i64* %11
%108 = sub nsw i64 %106, %107
%109 = sitofp i64 %108 to float
%110 = fdiv float %105, %109
%111 = fpext float %110 to double
%112 = load i64, i64* %15
%113 = sitofp i64 %112 to float
%114 = fdiv float %113, 5.000000e+00
%115 = fpext float %114 to double
%116 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([117 x i8], [117 x i8]* @.str.5, i64 0, i64 0), i8* %97, i32 %100, i64 %101, i32 %102, i32 %103, double %111, double %115)
store i64 0, i64* %15
br label %117
117: ; preds = %91, %75
br label %67
}

LLVM IR (-O2):
%struct.sockaddr_in = type { i32, %struct.TYPE_2__, i32 }
%struct.TYPE_2__ = type { i32 }
%struct.sockaddr = type { i32 }
@AF_INET = global i32 0
@SOCK_DGRAM = global i32 0
@IPPROTO_UDP = global i32 0
@.str = [7 x i8] c"socket\00"
@INADDR_ANY = global i32 0
@.str.1 = [5 x i8] c"bind\00"
@.str.3 = [39 x i8] c"head = %u, recvcount = %u, lost = %u\0A\0A\00"
@.str.4 = [11 x i8] c"recvfrom()\00"
@.str.5 = [117 x i8] c"Received packet from %s:%d\0A%lld Bytes (%u Packets, lost: %u). Average bw = %.2f Bytes/s, Current bw = %.2f Bytes/s\0A\0A\00"
@str = [31 x i8] c"\0AServer started receiving data\00"
define i32 @main() {
%1 = alloca %struct.sockaddr_in
%2 = alloca %struct.sockaddr_in
%3 = alloca i32
%4 = alloca [4096 x i8]
%5 = bitcast %struct.sockaddr_in* %1 to i8*
%6 = bitcast %struct.sockaddr_in* %2 to i8*
%7 = bitcast i32* %3 to i8*
store i32 12, i32* %3
%8 = getelementptr inbounds [4096 x i8], [4096 x i8]* %4, i64 0, i64 0
%9 = bitcast [4096 x i8]* %4 to i32*
%10 = load i32, i32* @AF_INET
%11 = load i32, i32* @SOCK_DGRAM
%12 = load i32, i32* @IPPROTO_UDP
%13 = tail call i32 @socket(i32 %10, i32 %11, i32 %12)
%14 = icmp eq i32 %13, -1
br i1 %14, label %15, label %17
15: ; preds = %0
%16 = tail call i32 @diep(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %17
17: ; preds = %15, %0
%18 = call i32 @memset(i8* %5, i32 0, i32 12)
%19 = load i32, i32* @AF_INET
%20 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %1, i64 0, i32 2
store i32 %19, i32* %20
%21 = call i32 @htons(i32 9930)
%22 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %1, i64 0, i32 0
store i32 %21, i32* %22
%23 = load i32, i32* @INADDR_ANY
%24 = call i32 @htonl(i32 %23)
%25 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %1, i64 0, i32 1, i32 0
store i32 %24, i32* %25
%26 = bitcast %struct.sockaddr_in* %1 to %struct.sockaddr*
%27 = call i32 @bind(i32 %13, %struct.sockaddr* %26, i32 12)
%28 = icmp eq i32 %27, -1
br i1 %28, label %29, label %31
29: ; preds = %17
%30 = call i32 @diep(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %31
31: ; preds = %29, %17
%32 = bitcast %struct.sockaddr_in* %2 to %struct.sockaddr*
%33 = call i32 @recvfrom(i32 %13, i8* %8, i32 4096, i32 0, %struct.sockaddr* %32, i32* %3)
%34 = load i32, i32* %9
%35 = add i32 %34, -1
%36 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
%37 = load i32, i32* %9
%38 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.3, i64 0, i64 0), i32 %37, i32 1, i32 %35)
%39 = call i64 @time(i32* null)
%40 = getelementptr inbounds [4096 x i8], [4096 x i8]* %4, i64 0, i64 4095
%41 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %2, i64 0, i32 1, i32 0
%42 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %2, i64 0, i32 0
br label %43
43: ; preds = %64, %31
%44 = phi i32 [ %58, %64 ], [ 1, %31 ]
%45 = phi i64 [ %62, %64 ], [ %39, %31 ]
%46 = phi i64 [ %59, %64 ], [ 4096, %31 ]
%47 = phi i64 [ 0, %64 ], [ 4096, %31 ]
%48 = add nsw i64 %45, 5
br label %49
49: ; preds = %43, %57
%50 = phi i32 [ %58, %57 ], [ %44, %43 ]
%51 = phi i64 [ %59, %57 ], [ %46, %43 ]
%52 = phi i64 [ %60, %57 ], [ %47, %43 ]
%53 = call i32 @recvfrom(i32 %13, i8* %8, i32 4096, i32 0, %struct.sockaddr* %32, i32* %3)
%54 = icmp eq i32 %53, -1
br i1 %54, label %55, label %57
55: ; preds = %49
%56 = call i32 @diep(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0))
br label %57
57: ; preds = %55, %49
store i8 0, i8* %40
%58 = add i32 %50, 1
%59 = add nuw nsw i64 %51, 4096
%60 = add nuw nsw i64 %52, 4096
%61 = load i32, i32* %9
%62 = call i64 @time(i32* null)
%63 = icmp slt i64 %62, %48
br i1 %63, label %49, label %64
64: ; preds = %57
%65 = sub i32 %61, %58
%66 = load i32, i32* %41
%67 = call i8* @inet_ntoa(i32 %66)
%68 = load i32, i32* %42
%69 = call i32 @ntohs(i32 %68)
%70 = sitofp i64 %59 to float
%71 = sub nsw i64 %62, %39
%72 = sitofp i64 %71 to float
%73 = fdiv float %70, %72
%74 = fpext float %73 to double
%75 = sitofp i64 %60 to float
%76 = fdiv float %75, 5.000000e+00
%77 = fpext float %76 to double
%78 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([117 x i8], [117 x i8]* @.str.5, i64 0, i64 0), i8* %67, i32 %69, i64 %59, i32 %58, i32 %65, double %74, double %77)
br label %43
}