#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 uint16_t;
struct addrinfo {
  int /*<<< orphan*/ ai_addrlen;
  int /*<<< orphan*/ ai_addr;
  int /*<<< orphan*/ ai_protocol;
  int /*<<< orphan*/ ai_socktype;
  int /*<<< orphan*/ ai_family;
  struct addrinfo *ai_next;
};
typedef int /*<<< orphan*/ packet;

/* Variables and functions */
int /*<<< orphan*/ AF_UNSPEC;
int /*<<< orphan*/ SOCK_DGRAM;
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ freeaddrinfo(struct addrinfo *);
char *gai_strerror(int);
int getaddrinfo(char *, char *, struct addrinfo *, struct addrinfo **);
int /*<<< orphan*/ memset(struct addrinfo *, int /*<<< orphan*/, int);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *, ...);
int rand();
int sendto(int, int *, int, int /*<<< orphan*/, int /*<<< orphan*/,
           int /*<<< orphan*/);
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ srand(unsigned int);
int /*<<< orphan*/ stderr;
scalar_t__ time(int /*<<< orphan*/ *);
int /*<<< orphan*/ usleep(int);
int main(int argc, char *argv[]) {
  int sockfd;
  struct addrinfo hints, *servinfo, *p;
  int rv;
  int numbytes;
  uint16_t packet[1470 / 2];
  int i = 0;
  int j = 0;
  int k = 0;
  int go = 1;
  unsigned int iseed = 0;
  uint16_t p_count = 0;
  iseed = (unsigned int)time(NULL);
  srand(iseed);
  memset(&hints, 0, sizeof hints);
  hints.ai_family = AF_UNSPEC;
  hints.ai_socktype = SOCK_DGRAM;
  if ((rv = getaddrinfo("127.0.0.1", "60000", &hints, &servinfo)) != 0) {
    fprintf(stderr, "getaddrinfo: %s\n", gai_strerror(rv));
    return 1;
  }
  for (p = servinfo; p != NULL; p = p->ai_next) {
    if ((sockfd = socket(p->ai_family, p->ai_socktype, p->ai_protocol)) == -1) {
      perror("talker: socket");
      continue;
    }
    break;
  }
  if (p == NULL) {
    fprintf(stderr, "talker: failed to bind socket\n");
    return 2;
  }
  printf("About to loop the datas\n");
  printf("PACKET ROWS:%i \n", 1470 / 2 / 3);
  while (go) {
    for (j = 0; j < 16384; j++) {
      for (k = 0; k < 16384; k++) {
        if (i == 0) {
          packet[0 * 3 + 0] = 244;
          packet[0 * 3 + 1] = p_count;
          packet[0 * 3 + 2] = 0x0000;
          i = 1;
        }
        if ((j) % 2 == 0) {
          if (k % 2 == 0) {
            packet[i * 3 + 0] = j;
            packet[i * 3 + 1] = k;
            packet[i * 3 + 2] = rand() % 64;
            i++;
          }
        } else {
          if (k % 2 == 1) {
            packet[i * 3 + 0] = j;
            packet[i * 3 + 1] = k;
            packet[i * 3 + 2] = rand() % 64;
            i++;
          }
        }
        if (i == 245) {
          if ((numbytes = sendto(sockfd, packet, sizeof(packet), 0, p->ai_addr,
                                 p->ai_addrlen)) == -1) {
            perror("talker: sendto");
            exit(1);
          }
          p_count++;
          usleep(100);
          i = 0;
        }
      }
    }
  }
  freeaddrinfo(servinfo);
  printf("talker: sent %d bytes to %s\n", numbytes, "127.0.0.1");
  close(sockfd);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xbf0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0xbd4(%rbp)
movl   $0x0,-0xbd8(%rbp)
movl   $0x0,-0xbdc(%rbp)
movl   $0x1,-0xbe0(%rbp)
movl   $0x0,-0xbe4(%rbp)
movl   $0x0,-0xbe8(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   10a0 <time@plt>
mov    %eax,-0xbe4(%rbp)
mov    -0xbe4(%rbp),%edi
call   1080 <srand@plt>
lea    -0x38(%rbp),%rdi
xor    %esi,%esi
mov    $0x20,%edx
call   1050 <memset@plt>
mov    0x2d72(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x28(%rbp)
mov    0x2d5e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x2c(%rbp)
lea    0xd72(%rip),%rdi
lea    0xd75(%rip),%rsi
lea    -0x38(%rbp),%rdx
lea    -0x40(%rbp),%rcx
call   10d0 <getaddrinfo@plt>
mov    %eax,-0x4c(%rbp)
cmp    $0x0,%eax
je     12e8 <main+0xf8>
mov    0x2d1b(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xbec(%rbp)
mov    -0x4c(%rbp),%edi
call   1040 <gai_strerror@plt>
mov    -0xbec(%rbp),%edi
mov    %rax,%rdx
lea    0xd3b(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1605 <main+0x415>
mov    -0x40(%rbp),%rax
mov    %rax,-0x48(%rbp)
cmpq   $0x0,-0x48(%rbp)
je     1348 <main+0x158>
mov    -0x48(%rbp),%rax
mov    0x10(%rax),%edi
mov    -0x48(%rbp),%rax
mov    0xc(%rax),%esi
mov    -0x48(%rbp),%rax
mov    0x8(%rax),%edx
call   1110 <socket@plt>
mov    %eax,-0x14(%rbp)
cmp    $0xffffffff,%eax
jne    1332 <main+0x142>
lea    0xcf9(%rip),%rdi
call   10b0 <perror@plt>
jmp    1337 <main+0x147>
jmp    1348 <main+0x158>
mov    -0x48(%rbp),%rax
mov    0x18(%rax),%rax
mov    %rax,-0x48(%rbp)
jmp    12f0 <main+0x100>
cmpq   $0x0,-0x48(%rbp)
jne    1376 <main+0x186>
mov    0x2c76(%rip),%rax
mov    (%rax),%edi
lea    0xccd(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
movl   $0x2,-0x4(%rbp)
jmp    1605 <main+0x415>
lea    0xcd2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xcdd(%rip),%rdi
mov    $0xf5,%esi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x0,-0xbe0(%rbp)
je     15d5 <main+0x3e5>
movl   $0x0,-0xbd8(%rbp)
cmpl   $0x4000,-0xbd8(%rbp)
jge    15d0 <main+0x3e0>
movl   $0x0,-0xbdc(%rbp)
cmpl   $0x4000,-0xbdc(%rbp)
jge    15b7 <main+0x3c7>
cmpl   $0x0,-0xbd4(%rbp)
jne    140f <main+0x21f>
movl   $0xf4,-0xbd0(%rbp)
mov    -0xbe8(%rbp),%eax
mov    %eax,-0xbcc(%rbp)
movl   $0x0,-0xbc8(%rbp)
movl   $0x1,-0xbd4(%rbp)
mov    -0xbd8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    14a5 <main+0x2b5>
mov    -0xbdc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    14a0 <main+0x2b0>
mov    -0xbd8(%rbp),%ecx
imul   $0x3,-0xbd4(%rbp),%eax
add    $0x0,%eax
cltq
mov    %ecx,-0xbd0(%rbp,%rax,4)
mov    -0xbdc(%rbp),%ecx
imul   $0x3,-0xbd4(%rbp),%eax
add    $0x1,%eax
cltq
mov    %ecx,-0xbd0(%rbp,%rax,4)
mov    $0x0,%al
call   10e0 <rand@plt>
mov    $0x40,%ecx
cltd
idiv   %ecx
imul   $0x3,-0xbd4(%rbp),%eax
add    $0x2,%eax
cltq
mov    %edx,-0xbd0(%rbp,%rax,4)
mov    -0xbd4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xbd4(%rbp)
jmp    1524 <main+0x334>
mov    -0xbdc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x1,%edx
jne    151f <main+0x32f>
mov    -0xbd8(%rbp),%ecx
imul   $0x3,-0xbd4(%rbp),%eax
add    $0x0,%eax
cltq
mov    %ecx,-0xbd0(%rbp,%rax,4)
mov    -0xbdc(%rbp),%ecx
imul   $0x3,-0xbd4(%rbp),%eax
add    $0x1,%eax
cltq
mov    %ecx,-0xbd0(%rbp,%rax,4)
mov    $0x0,%al
call   10e0 <rand@plt>
mov    $0x40,%ecx
cltd
idiv   %ecx
imul   $0x3,-0xbd4(%rbp),%eax
add    $0x2,%eax
cltq
mov    %edx,-0xbd0(%rbp,%rax,4)
mov    -0xbd4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xbd4(%rbp)
jmp    1524 <main+0x334>
cmpl   $0xf5,-0xbd4(%rbp)
jne    159e <main+0x3ae>
mov    -0x14(%rbp),%edi
lea    -0xbd0(%rbp),%rsi
mov    -0x48(%rbp),%rax
mov    0x4(%rax),%r8d
mov    -0x48(%rbp),%rax
mov    (%rax),%r9d
mov    $0xb7c,%edx
xor    %ecx,%ecx
call   1060 <sendto@plt>
mov    %eax,-0x50(%rbp)
cmp    $0xffffffff,%eax
jne    157b <main+0x38b>
lea    0xb0d(%rip),%rdi
call   10b0 <perror@plt>
mov    $0x1,%edi
call   10c0 <exit@plt>
mov    -0xbe8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xbe8(%rbp)
mov    $0x64,%edi
call   10f0 <usleep@plt>
movl   $0x0,-0xbd4(%rbp)
jmp    15a3 <main+0x3b3>
mov    -0xbdc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xbdc(%rbp)
jmp    13c8 <main+0x1d8>
jmp    15bc <main+0x3cc>
mov    -0xbd8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xbd8(%rbp)
jmp    13ae <main+0x1be>
jmp    1397 <main+0x1a7>
mov    -0x40(%rbp),%rdi
call   1100 <freeaddrinfo@plt>
mov    -0x50(%rbp),%esi
lea    0xaa0(%rip),%rdi
lea    0xa11(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%edi
call   1070 <close@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xbf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xbb8,%rsp
xor    %edi,%edi
call   10a0 <time@plt>
mov    %eax,%edi
call   1080 <srand@plt>
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x20,%edx
call   1060 <memset@plt>
mov    0x2dce(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x20(%rsp)
mov    0x2db9(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x1c(%rsp)
lea    0xdcc(%rip),%rdi
lea    0xdcf(%rip),%rsi
lea    0x8(%rsp),%rcx
mov    %rbx,%rdx
call   10d0 <getaddrinfo@plt>
test   %eax,%eax
je     1276 <main+0x96>
mov    0x2d7d(%rip),%rcx
mov    (%rcx),%ebx
mov    %eax,%edi
call   1050 <gai_strerror@plt>
lea    0xdad(%rip),%rsi
mov    %ebx,%edi
mov    %rax,%rdx
xor    %eax,%eax
call   1090 <fprintf@plt>
mov    $0x1,%eax
jmp    12c7 <main+0xe7>
mov    0x8(%rsp),%rbx
test   %rbx,%rbx
je     12ab <main+0xcb>
lea    0xd9a(%rip),%r14
mov    0x10(%rbx),%edi
mov    0x8(%rbx),%edx
mov    0xc(%rbx),%esi
call   1100 <socket@plt>
cmp    $0xffffffff,%eax
jne    12d9 <main+0xf9>
mov    %r14,%rdi
call   10b0 <perror@plt>
mov    0x18(%rbx),%rbx
test   %rbx,%rbx
jne    1287 <main+0xa7>
mov    0x2d1e(%rip),%rax
mov    (%rax),%edi
lea    0xd75(%rip),%rsi
xor    %eax,%eax
call   1090 <fprintf@plt>
mov    $0x2,%eax
add    $0xbb8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %eax,%r15d
lea    0xd8c(%rip),%rdi
call   1030 <puts@plt>
lea    0xd60(%rip),%rdi
mov    $0xf5,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %r14d,%r14d
xor    %r13d,%r13d
movl   $0x0,0x4(%rsp)
jmp    1322 <main+0x142>
nopl   0x0(%rax,%rax,1)
mov    0x4(%rsp),%eax
add    $0x1,%eax
mov    %eax,0x4(%rsp)
cmp    $0x4000,%eax
je     1301 <main+0x121>
xor    %ebp,%ebp
jmp    133b <main+0x15b>
cs nopw 0x0(%rax,%rax,1)
add    $0x1,%ebp
cmp    $0x4000,%ebp
je     1310 <main+0x130>
test   %r14d,%r14d
je     1350 <main+0x170>
testb  $0x1,0x4(%rsp)
jne    1372 <main+0x192>
test   $0x1,%bpl
je     1378 <main+0x198>
jmp    13b0 <main+0x1d0>
nop
movl   $0xf4,0x30(%rsp)
mov    %r13d,0x34(%rsp)
movl   $0x0,0x38(%rsp)
mov    $0x1,%r14d
testb  $0x1,0x4(%rsp)
je     1347 <main+0x167>
test   $0x1,%bpl
je     13b0 <main+0x1d0>
lea    (%r14,%r14,2),%eax
mov    %r15d,%r12d
movslq %eax,%r15
mov    0x4(%rsp),%eax
mov    %eax,0x30(%rsp,%r15,4)
mov    %ebp,0x34(%rsp,%r15,4)
xor    %eax,%eax
call   10e0 <rand@plt>
lea    0x3f(%rax),%ecx
test   %eax,%eax
cmovns %eax,%ecx
and    $0xffffffc0,%ecx
sub    %ecx,%eax
mov    %eax,0x38(%rsp,%r15,4)
mov    %r12d,%r15d
add    $0x1,%r14d
cmp    $0xf5,%r14d
jne    1330 <main+0x150>
mov    (%rbx),%r9d
mov    0x4(%rbx),%r8d
mov    %r15d,%edi
lea    0x30(%rsp),%rsi
mov    $0xb7c,%edx
xor    %ecx,%ecx
call   1070 <sendto@plt>
cmp    $0xffffffff,%eax
je     13f3 <main+0x213>
add    $0x1,%r13d
mov    $0x64,%edi
call   10f0 <usleep@plt>
xor    %r14d,%r14d
jmp    1330 <main+0x150>
lea    0xc66(%rip),%rdi
call   10b0 <perror@plt>
mov    $0x1,%edi
call   10c0 <exit@plt>

LLVM IR (-O0):
%struct.addrinfo = type { i32, i32, i32, i32, i32, %struct.addrinfo* }
@AF_UNSPEC = global i32 0
@SOCK_DGRAM = global i32 0
@.str = [10 x i8] c"127.0.0.1\00"
@.str.1 = [6 x i8] c"60000\00"
@stderr = global i32 0
@.str.2 = [17 x i8] c"getaddrinfo: %s\0A\00"
@.str.3 = [15 x i8] c"talker: socket\00"
@.str.4 = [31 x i8] c"talker: failed to bind socket\0A\00"
@.str.5 = [25 x i8] c"About to loop the datas\0A\00"
@.str.6 = [17 x i8] c"PACKET ROWS:%i \0A\00"
@.str.7 = [15 x i8] c"talker: sendto\00"
@.str.8 = [29 x i8] c"talker: sent %d bytes to %s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca %struct.addrinfo
%8 = alloca %struct.addrinfo*
%9 = alloca %struct.addrinfo*
%10 = alloca i32
%11 = alloca i32
%12 = alloca [735 x i32]
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %13
store i32 0, i32* %14
store i32 0, i32* %15
store i32 1, i32* %16
store i32 0, i32* %17
store i32 0, i32* %18
%19 = call i64 @time(i32* null)
%20 = trunc i64 %19 to i32
store i32 %20, i32* %17
%21 = load i32, i32* %17
%22 = call i32 @srand(i32 %21)
%23 = call i32 @memset(%struct.addrinfo* %7, i32 0, i32 32)
%24 = load i32, i32* @AF_UNSPEC
%25 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %7, i32 0, i32 4
store i32 %24, i32* %25
%26 = load i32, i32* @SOCK_DGRAM
%27 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %7, i32 0, i32 3
store i32 %26, i32* %27
%28 = call i32 @getaddrinfo(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), %struct.addrinfo* %7, %struct.addrinfo** %8)
store i32 %28, i32* %10
%29 = icmp ne i32 %28, 0
br i1 %29, label %30, label %35
30: ; preds = %2
%31 = load i32, i32* @stderr
%32 = load i32, i32* %10
%33 = call i8* @gai_strerror(i32 %32)
%34 = call i32 (i32, i8*, ...) @fprintf(i32 %31, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* %33)
store i32 1, i32* %3
br label %182
35: ; preds = %2
%36 = load %struct.addrinfo*, %struct.addrinfo** %8
store %struct.addrinfo* %36, %struct.addrinfo** %9
br label %37
37: ; preds = %55, %35
%38 = load %struct.addrinfo*, %struct.addrinfo** %9
%39 = icmp ne %struct.addrinfo* %38, null
br i1 %39, label %40, label %59
40: ; preds = %37
%41 = load %struct.addrinfo*, %struct.addrinfo** %9
%42 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %41, i32 0, i32 4
%43 = load i32, i32* %42
%44 = load %struct.addrinfo*, %struct.addrinfo** %9
%45 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %44, i32 0, i32 3
%46 = load i32, i32* %45
%47 = load %struct.addrinfo*, %struct.addrinfo** %9
%48 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %47, i32 0, i32 2
%49 = load i32, i32* %48
%50 = call i32 @socket(i32 %43, i32 %46, i32 %49)
store i32 %50, i32* %6
%51 = icmp eq i32 %50, -1
br i1 %51, label %52, label %54
52: ; preds = %40
%53 = call i32 @perror(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
br label %55
54: ; preds = %40
br label %59
55: ; preds = %52
%56 = load %struct.addrinfo*, %struct.addrinfo** %9
%57 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %56, i32 0, i32 5
%58 = load %struct.addrinfo*, %struct.addrinfo** %57
store %struct.addrinfo* %58, %struct.addrinfo** %9
br label %37
59: ; preds = %54, %37
%60 = load %struct.addrinfo*, %struct.addrinfo** %9
%61 = icmp eq %struct.addrinfo* %60, null
br i1 %61, label %62, label %65
62: ; preds = %59
%63 = load i32, i32* @stderr
%64 = call i32 (i32, i8*, ...) @fprintf(i32 %63, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0))
store i32 2, i32* %3
br label %182
65: ; preds = %59
%66 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.5, i64 0, i64 0))
%67 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0), i32 245)
br label %68
68: ; preds = %174, %65
%69 = load i32, i32* %16
%70 = icmp ne i32 %69, 0
br i1 %70, label %71, label %175
71: ; preds = %68
store i32 0, i32* %14
br label %72
72: ; preds = %171, %71
%73 = load i32, i32* %14
%74 = icmp slt i32 %73, 16384
br i1 %74, label %75, label %174
75: ; preds = %72
store i32 0, i32* %15
br label %76
76: ; preds = %167, %75
%77 = load i32, i32* %15
%78 = icmp slt i32 %77, 16384
br i1 %78, label %79, label %170
79: ; preds = %76
%80 = load i32, i32* %13
%81 = icmp eq i32 %80, 0
br i1 %81, label %82, label %87
82: ; preds = %79
%83 = getelementptr inbounds [735 x i32], [735 x i32]* %12, i64 0, i64 0
store i32 244, i32* %83
%84 = load i32, i32* %18
%85 = getelementptr inbounds [735 x i32], [735 x i32]* %12, i64 0, i64 1
store i32 %84, i32* %85
%86 = getelementptr inbounds [735 x i32], [735 x i32]* %12, i64 0, i64 2
store i32 0, i32* %86
store i32 1, i32* %13
br label %87
87: ; preds = %82, %79
%88 = load i32, i32* %14
%89 = srem i32 %88, 2
%90 = icmp eq i32 %89, 0
br i1 %90, label %91, label %118
91: ; preds = %87
%92 = load i32, i32* %15
%93 = srem i32 %92, 2
%94 = icmp eq i32 %93, 0
br i1 %94, label %95, label %117
95: ; preds = %91
%96 = load i32, i32* %14
%97 = load i32, i32* %13
%98 = mul nsw i32 %97, 3
%99 = add nsw i32 %98, 0
%100 = sext i32 %99 to i64
%101 = getelementptr inbounds [735 x i32], [735 x i32]* %12, i64 0, i64 %100
store i32 %96, i32* %101
%102 = load i32, i32* %15
%103 = load i32, i32* %13
%104 = mul nsw i32 %103, 3
%105 = add nsw i32 %104, 1
%106 = sext i32 %105 to i64
%107 = getelementptr inbounds [735 x i32], [735 x i32]* %12, i64 0, i64 %106
store i32 %102, i32* %107
%108 = call i32 (...) @rand()
%109 = srem i32 %108, 64
%110 = load i32, i32* %13
%111 = mul nsw i32 %110, 3
%112 = add nsw i32 %111, 2
%113 = sext i32 %112 to i64
%114 = getelementptr inbounds [735 x i32], [735 x i32]* %12, i64 0, i64 %113
store i32 %109, i32* %114
%115 = load i32, i32* %13
%116 = add nsw i32 %115, 1
store i32 %116, i32* %13
br label %117
117: ; preds = %95, %91
br label %145
118: ; preds = %87
%119 = load i32, i32* %15
%120 = srem i32 %119, 2
%121 = icmp eq i32 %120, 1
br i1 %121, label %122, label %144
122: ; preds = %118
%123 = load i32, i32* %14
%124 = load i32, i32* %13
%125 = mul nsw i32 %124, 3
%126 = add nsw i32 %125, 0
%127 = sext i32 %126 to i64
%128 = getelementptr inbounds [735 x i32], [735 x i32]* %12, i64 0, i64 %127
store i32 %123, i32* %128
%129 = load i32, i32* %15
%130 = load i32, i32* %13
%131 = mul nsw i32 %130, 3
%132 = add nsw i32 %131, 1
%133 = sext i32 %132 to i64
%134 = getelementptr inbounds [735 x i32], [735 x i32]* %12, i64 0, i64 %133
store i32 %129, i32* %134
%135 = call i32 (...) @rand()
%136 = srem i32 %135, 64
%137 = load i32, i32* %13
%138 = mul nsw i32 %137, 3
%139 = add nsw i32 %138, 2
%140 = sext i32 %139 to i64
%141 = getelementptr inbounds [735 x i32], [735 x i32]* %12, i64 0, i64 %140
store i32 %136, i32* %141
%142 = load i32, i32* %13
%143 = add nsw i32 %142, 1
store i32 %143, i32* %13
br label %144
144: ; preds = %122, %118
br label %145
145: ; preds = %144, %117
%146 = load i32, i32* %13
%147 = icmp eq i32 %146, 245
br i1 %147, label %148, label %166
148: ; preds = %145
%149 = load i32, i32* %6
%150 = getelementptr inbounds [735 x i32], [735 x i32]* %12, i64 0, i64 0
%151 = load %struct.addrinfo*, %struct.addrinfo** %9
%152 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %151, i32 0, i32 1
%153 = load i32, i32* %152
%154 = load %struct.addrinfo*, %struct.addrinfo** %9
%155 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %154, i32 0, i32 0
%156 = load i32, i32* %155
%157 = call i32 @sendto(i32 %149, i32* %150, i32 2940, i32 0, i32 %153, i32 %156)
store i32 %157, i32* %11
%158 = icmp eq i32 %157, -1
br i1 %158, label %159, label %162
159: ; preds = %148
%160 = call i32 @perror(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0))
%161 = call i32 @exit(i32 1)
unreachable
162: ; preds = %148
%163 = load i32, i32* %18
%164 = add nsw i32 %163, 1
store i32 %164, i32* %18
%165 = call i32 @usleep(i32 100)
store i32 0, i32* %13
br label %166
166: ; preds = %162, %145
br label %167
167: ; preds = %166
%168 = load i32, i32* %15
%169 = add nsw i32 %168, 1
store i32 %169, i32* %15
br label %76
170: ; preds = %76
br label %171
171: ; preds = %170
%172 = load i32, i32* %14
%173 = add nsw i32 %172, 1
store i32 %173, i32* %14
br label %72
174: ; preds = %72
br label %68
175: ; preds = %68
%176 = load %struct.addrinfo*, %struct.addrinfo** %8
%177 = call i32 @freeaddrinfo(%struct.addrinfo* %176)
%178 = load i32, i32* %11
%179 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.8, i64 0, i64 0), i32 %178, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%180 = load i32, i32* %6
%181 = call i32 @close(i32 %180)
store i32 0, i32* %3
br label %182
182: ; preds = %175, %62, %30
%183 = load i32, i32* %3
ret i32 %183
}

LLVM IR (-O2):
%struct.addrinfo = type { i32, i32, i32, i32, i32, %struct.addrinfo* }
@AF_UNSPEC = global i32 0
@SOCK_DGRAM = global i32 0
@.str = [10 x i8] c"127.0.0.1\00"
@.str.1 = [6 x i8] c"60000\00"
@stderr = global i32 0
@.str.2 = [17 x i8] c"getaddrinfo: %s\0A\00"
@.str.3 = [15 x i8] c"talker: socket\00"
@.str.4 = [31 x i8] c"talker: failed to bind socket\0A\00"
@.str.6 = [17 x i8] c"PACKET ROWS:%i \0A\00"
@.str.7 = [15 x i8] c"talker: sendto\00"
@str = [24 x i8] c"About to loop the datas\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca %struct.addrinfo
%4 = alloca %struct.addrinfo*
%5 = alloca [735 x i32]
%6 = bitcast %struct.addrinfo* %3 to i8*
%7 = bitcast %struct.addrinfo** %4 to i8*
%8 = bitcast [735 x i32]* %5 to i8*
%9 = tail call i64 @time(i32* null)
%10 = trunc i64 %9 to i32
%11 = tail call i32 @srand(i32 %10)
%12 = call i32 @memset(%struct.addrinfo* %3, i32 0, i32 32)
%13 = load i32, i32* @AF_UNSPEC
%14 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %3, i64 0, i32 4
store i32 %13, i32* %14
%15 = load i32, i32* @SOCK_DGRAM
%16 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %3, i64 0, i32 3
store i32 %15, i32* %16
%17 = call i32 @getaddrinfo(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), %struct.addrinfo* %3, %struct.addrinfo** %4)
%18 = icmp eq i32 %17, 0
br i1 %18, label %19, label %22
19: ; preds = %2
%20 = load %struct.addrinfo*, %struct.addrinfo** %4
%21 = icmp eq %struct.addrinfo* %20, null
br i1 %21, label %41, label %26
22: ; preds = %2
%23 = load i32, i32* @stderr
%24 = call i8* @gai_strerror(i32 %17)
%25 = call i32 (i32, i8*, ...) @fprintf(i32 %23, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* %24)
br label %108
26: ; preds = %19, %36
%27 = phi %struct.addrinfo* [ %39, %36 ], [ %20, %19 ]
%28 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %27, i64 0, i32 4
%29 = load i32, i32* %28
%30 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %27, i64 0, i32 3
%31 = load i32, i32* %30
%32 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %27, i64 0, i32 2
%33 = load i32, i32* %32
%34 = call i32 @socket(i32 %29, i32 %31, i32 %33)
%35 = icmp eq i32 %34, -1
br i1 %35, label %36, label %44
36: ; preds = %26
%37 = call i32 @perror(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
%38 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %27, i64 0, i32 5
%39 = load %struct.addrinfo*, %struct.addrinfo** %38
%40 = icmp eq %struct.addrinfo* %39, null
br i1 %40, label %41, label %26
41: ; preds = %36, %19
%42 = load i32, i32* @stderr
%43 = call i32 (i32, i8*, ...) @fprintf(i32 %42, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0))
br label %108
44: ; preds = %26
%45 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
%46 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0), i32 245)
%47 = getelementptr inbounds [735 x i32], [735 x i32]* %5, i64 0, i64 0
%48 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %27, i64 0, i32 1
%49 = getelementptr inbounds [735 x i32], [735 x i32]* %5, i64 0, i64 1
%50 = getelementptr inbounds [735 x i32], [735 x i32]* %5, i64 0, i64 2
%51 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %27, i64 0, i32 0
br label %52
52: ; preds = %105, %44
%53 = phi i32 [ 0, %44 ], [ %101, %105 ]
%54 = phi i32 [ 0, %44 ], [ %102, %105 ]
br label %55
55: ; preds = %52, %105
%56 = phi i32 [ %54, %52 ], [ %102, %105 ]
%57 = phi i32 [ 0, %52 ], [ %106, %105 ]
%58 = phi i32 [ %53, %52 ], [ %101, %105 ]
%59 = and i32 %57, 1
%60 = icmp eq i32 %59, 0
br label %61
61: ; preds = %55, %100
%62 = phi i32 [ %56, %55 ], [ %102, %100 ]
%63 = phi i32 [ 0, %55 ], [ %103, %100 ]
%64 = phi i32 [ %58, %55 ], [ %101, %100 ]
%65 = icmp eq i32 %64, 0
br i1 %65, label %66, label %67
66: ; preds = %61
store i32 244, i32* %47
store i32 %62, i32* %49
store i32 0, i32* %50
br label %67
67: ; preds = %66, %61
%68 = phi i32 [ 1, %66 ], [ %64, %61 ]
%69 = and i32 %63, 1
%70 = icmp eq i32 %69, 0
br i1 %60, label %71, label %72
71: ; preds = %67
br i1 %70, label %73, label %86
72: ; preds = %67
br i1 %70, label %86, label %73
73: ; preds = %72, %71
%74 = mul nsw i32 %68, 3
%75 = sext i32 %74 to i64
%76 = getelementptr inbounds [735 x i32], [735 x i32]* %5, i64 0, i64 %75
store i32 %57, i32* %76
%77 = add nsw i32 %74, 1
%78 = sext i32 %77 to i64
%79 = getelementptr inbounds [735 x i32], [735 x i32]* %5, i64 0, i64 %78
store i32 %63, i32* %79
%80 = call i32 (...) @rand()
%81 = srem i32 %80, 64
%82 = add nsw i32 %74, 2
%83 = sext i32 %82 to i64
%84 = getelementptr inbounds [735 x i32], [735 x i32]* %5, i64 0, i64 %83
store i32 %81, i32* %84
%85 = add nsw i32 %68, 1
br label %86
86: ; preds = %73, %72, %71
%87 = phi i32 [ %68, %71 ], [ %68, %72 ], [ %85, %73 ]
%88 = icmp eq i32 %87, 245
br i1 %88, label %89, label %100
89: ; preds = %86
%90 = load i32, i32* %48
%91 = load i32, i32* %51
%92 = call i32 @sendto(i32 %34, i32* %47, i32 2940, i32 0, i32 %90, i32 %91)
%93 = icmp eq i32 %92, -1
br i1 %93, label %94, label %97
94: ; preds = %89
%95 = call i32 @perror(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0))
%96 = call i32 @exit(i32 1)
unreachable
97: ; preds = %89
%98 = add nsw i32 %62, 1
%99 = call i32 @usleep(i32 100)
br label %100
100: ; preds = %86, %97
%101 = phi i32 [ 0, %97 ], [ %87, %86 ]
%102 = phi i32 [ %98, %97 ], [ %62, %86 ]
%103 = add nuw nsw i32 %63, 1
%104 = icmp eq i32 %103, 16384
br i1 %104, label %105, label %61
105: ; preds = %100
%106 = add nuw nsw i32 %57, 1
%107 = icmp eq i32 %106, 16384
br i1 %107, label %52, label %55
108: ; preds = %41, %22
%109 = phi i32 [ 1, %22 ], [ 2, %41 ]
ret i32 %109
}