#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 */
struct TYPE_2__ {
  int /*<<< orphan*/ s_addr;
};
struct sockaddr_in {
  TYPE_1__ sin_addr;
  void *sin_port;
  void *sin_family;
};
struct sockaddr {
  int dummy;
};
typedef int /*<<< orphan*/ remaddr;
typedef int /*<<< orphan*/ myaddr;

/* Variables and functions */
void *AF_INET;
int /*<<< orphan*/ INADDR_ANY;
int /*<<< orphan*/ SOCK_DGRAM;
scalar_t__ bind(int, struct sockaddr *, int);
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ htonl(int /*<<< orphan*/);
void *htons(int);
scalar_t__ inet_aton(char *, TYPE_1__ *);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *, ...);
scalar_t__ sendto(int, char *, int /*<<< orphan*/, int /*<<< orphan*/,
                  struct sockaddr *, int);
int socket(void *, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ sprintf(char *, char *, int);
int /*<<< orphan*/ strlen(char *);
int main(void) {
  struct sockaddr_in myaddr, remaddr;
  int fd, i, slen = sizeof(remaddr);
  char *server = "127.0.0.1";
  char buf[2048];
  if ((fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
    printf("Error: Socket()\n");
    return -1;
  }
  memset((char *)&myaddr, 0, sizeof(myaddr));
  myaddr.sin_family = AF_INET;
  myaddr.sin_addr.s_addr = htonl(INADDR_ANY);
  myaddr.sin_port = htons(0);
  if (bind(fd, (struct sockaddr *)&myaddr, sizeof(myaddr)) < 0) {
    perror("Error: Bind()\n");
    return 0;
  }
  memset((char *)&remaddr, 0, sizeof(remaddr));
  remaddr.sin_family = AF_INET;
  remaddr.sin_port = htons(9999);
  if (inet_aton(server, &remaddr.sin_addr) <= 0) {
    printf("Error: Inet_aton()\n");
    exit(1);
  }
  for (i = 0; i < 5; i++) {
    printf("Enviando mensaje %d a %s puerto %d\n", i, server, 9999);
    sprintf(buf, "Mensaje número %d", i);
    if (sendto(fd, buf, strlen(buf), 0, (struct sockaddr *)&remaddr, slen) < 0)
      printf("Error: Mensaje %d\n");
  }
  close(fd);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x860,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x18,-0x44(%rbp)
lea    0xe10(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    0x2ded(%rip),%rax
mov    (%rax),%rdi
mov    0x2dd3(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   10f0 <socket@plt>
mov    %eax,-0x3c(%rbp)
cmp    $0x0,%eax
jge    1234 <main+0x64>
lea    0xde9(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    13b8 <main+0x1e8>
lea    -0x20(%rbp),%rdi
xor    %esi,%esi
mov    $0x18,%edx
call   1070 <memset@plt>
mov    0x2d9d(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x10(%rbp)
mov    0x2d87(%rip),%rax
mov    (%rax),%edi
call   1060 <htonl@plt>
mov    %eax,-0x20(%rbp)
xor    %edi,%edi
call   1040 <htons@plt>
mov    %rax,-0x18(%rbp)
mov    -0x3c(%rbp),%edi
lea    -0x20(%rbp),%rsi
mov    $0x18,%edx
call   10b0 <bind@plt>
cmp    $0x0,%rax
jge    12a1 <main+0xd1>
lea    0xd8b(%rip),%rdi
call   10c0 <perror@plt>
movl   $0x0,-0x4(%rbp)
jmp    13b8 <main+0x1e8>
lea    -0x38(%rbp),%rdi
xor    %esi,%esi
mov    $0x18,%edx
call   1070 <memset@plt>
mov    0x2d30(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
mov    $0x270f,%edi
call   1040 <htons@plt>
mov    %rax,-0x30(%rbp)
mov    -0x50(%rbp),%rdi
lea    -0x38(%rbp),%rsi
call   10a0 <inet_aton@plt>
cmp    $0x0,%rax
jg     12fc <main+0x12c>
lea    0xd3f(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x1,%edi
call   10e0 <exit@plt>
movl   $0x0,-0x40(%rbp)
cmpl   $0x5,-0x40(%rbp)
jge    13a9 <main+0x1d9>
mov    -0x40(%rbp),%esi
mov    -0x50(%rbp),%rdx
lea    0xd23(%rip),%rdi
mov    $0x270f,%ecx
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x850(%rbp),%rdi
mov    -0x40(%rbp),%edx
lea    0xd2a(%rip),%rsi
call   10d0 <sprintf@plt>
mov    -0x3c(%rbp),%eax
mov    %eax,-0x85c(%rbp)
lea    -0x850(%rbp),%rax
mov    %rax,-0x858(%rbp)
lea    -0x850(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x85c(%rbp),%edi
mov    -0x858(%rbp),%rsi
mov    %eax,%edx
lea    -0x38(%rbp),%r8
mov    -0x44(%rbp),%r9d
xor    %ecx,%ecx
call   1080 <sendto@plt>
cmp    $0x0,%rax
jge    1396 <main+0x1c6>
lea    0xce6(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    139b <main+0x1cb>
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    1303 <main+0x133>
mov    -0x3c(%rbp),%edi
call   1090 <close@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x860,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x838,%rsp
mov    0x2df4(%rip),%r15
mov    (%r15),%rdi
mov    0x2dda(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1100 <socket@plt>
test   %eax,%eax
js     14c5 <main+0x2e5>
mov    %eax,%r14d
lea    0x18(%rsp),%rbx
xor    %ebp,%ebp
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x18,%edx
call   1080 <memset@plt>
mov    (%r15),%rax
mov    %rax,0x28(%rsp)
mov    0x2da9(%rip),%rax
mov    (%rax),%edi
call   1070 <htonl@plt>
mov    %eax,0x18(%rsp)
xor    %edi,%edi
call   1050 <htons@plt>
mov    %rax,0x20(%rsp)
mov    %r14d,%edi
mov    %rbx,%rsi
mov    $0x18,%edx
call   10c0 <bind@plt>
test   %rax,%rax
js     14e6 <main+0x306>
mov    %rsp,%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x18,%edx
call   1080 <memset@plt>
mov    (%r15),%rax
mov    %rax,0x10(%rsp)
mov    $0x270f,%edi
call   1050 <htons@plt>
mov    %rax,0x8(%rsp)
lea    0xd69(%rip),%rdi
mov    %rbx,%rsi
call   10b0 <inet_aton@plt>
test   %rax,%rax
jle    14f4 <main+0x314>
lea    0xd6a(%rip),%rdi
lea    0xd4a(%rip),%rdx
xor    %esi,%esi
mov    $0x270f,%ecx
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xd72(%rip),%rsi
lea    0x30(%rsp),%rbx
mov    %rbx,%rdi
xor    %edx,%edx
call   10e0 <sprintf@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %rsp,%r8
mov    %r14d,%edi
mov    %rbx,%rsi
mov    %eax,%edx
xor    %ecx,%ecx
mov    $0x18,%r9d
call   1090 <sendto@plt>
test   %rax,%rax
jns    130d <main+0x12d>
lea    0xd4a(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xd05(%rip),%rdi
lea    0xce5(%rip),%rdx
mov    $0x1,%esi
mov    $0x270f,%ecx
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xd0a(%rip),%rsi
lea    0x30(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x1,%edx
call   10e0 <sprintf@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %rsp,%r8
mov    %r14d,%edi
mov    %rbx,%rsi
mov    %eax,%edx
xor    %ecx,%ecx
mov    $0x18,%r9d
call   1090 <sendto@plt>
test   %rax,%rax
jns    1378 <main+0x198>
lea    0xcdf(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xc9a(%rip),%rdi
lea    0xc7a(%rip),%rdx
mov    $0x2,%esi
mov    $0x270f,%ecx
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xc9f(%rip),%rsi
lea    0x30(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x2,%edx
call   10e0 <sprintf@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %rsp,%r8
mov    %r14d,%edi
mov    %rbx,%rsi
mov    %eax,%edx
xor    %ecx,%ecx
mov    $0x18,%r9d
call   1090 <sendto@plt>
test   %rax,%rax
jns    13e3 <main+0x203>
lea    0xc74(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xc2f(%rip),%rdi
lea    0xc0f(%rip),%rdx
mov    $0x3,%esi
mov    $0x270f,%ecx
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xc34(%rip),%rsi
lea    0x30(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x3,%edx
call   10e0 <sprintf@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %rsp,%r8
mov    %r14d,%edi
mov    %rbx,%rsi
mov    %eax,%edx
xor    %ecx,%ecx
mov    $0x18,%r9d
call   1090 <sendto@plt>
test   %rax,%rax
jns    144e <main+0x26e>
lea    0xc09(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xbc4(%rip),%rdi
lea    0xba4(%rip),%rdx
xor    %ebp,%ebp
mov    $0x4,%esi
mov    $0x270f,%ecx
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xbc7(%rip),%rsi
lea    0x30(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x4,%edx
call   10e0 <sprintf@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %rsp,%r8
mov    %r14d,%edi
mov    %rbx,%rsi
mov    %eax,%edx
xor    %ecx,%ecx
mov    $0x18,%r9d
call   1090 <sendto@plt>
test   %rax,%rax
jns    14bb <main+0x2db>
lea    0xb9c(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r14d,%edi
call   10a0 <close@plt>
jmp    14d6 <main+0x2f6>
lea    0xbaa(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%ebp
mov    %ebp,%eax
add    $0x838,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xb1d(%rip),%rdi
call   10d0 <perror@plt>
jmp    14d6 <main+0x2f6>
lea    0xb68(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   10f0 <exit@plt>

LLVM IR (-O0):
%struct.sockaddr_in = type { %struct.TYPE_2__, i8*, i8* }
%struct.TYPE_2__ = type { i32 }
%struct.sockaddr = type { i32 }
@.str = [10 x i8] c"127.0.0.1\00"
@AF_INET = global i8* null
@SOCK_DGRAM = global i32 0
@.str.1 = [17 x i8] c"Error: Socket()\0A\00"
@INADDR_ANY = global i32 0
@.str.2 = [15 x i8] c"Error: Bind()\0A\00"
@.str.3 = [20 x i8] c"Error: Inet_aton()\0A\00"
@.str.4 = [36 x i8] c"Enviando mensaje %d a %s puerto %d\0A\00"
@.str.5 = [19 x i8] c"Mensaje n\C3\BAmero %d\00"
@.str.6 = [19 x i8] c"Error: Mensaje %d\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 i8*
%8 = alloca [2048 x i8]
store i32 0, i32* %1
store i32 24, i32* %6
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8** %7
%9 = load i8*, i8** @AF_INET
%10 = load i32, i32* @SOCK_DGRAM
%11 = call i32 @socket(i8* %9, i32 %10, i32 0)
store i32 %11, i32* %4
%12 = icmp slt i32 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %0
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
store i32 -1, i32* %1
br label %74
15: ; preds = %0
%16 = bitcast %struct.sockaddr_in* %2 to i8*
%17 = call i32 @memset(i8* %16, i32 0, i32 24)
%18 = load i8*, i8** @AF_INET
%19 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %2, i32 0, i32 2
store i8* %18, i8** %19
%20 = load i32, i32* @INADDR_ANY
%21 = call i32 @htonl(i32 %20)
%22 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %2, i32 0, i32 0
%23 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %22, i32 0, i32 0
store i32 %21, i32* %23
%24 = call i8* @htons(i32 0)
%25 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %2, i32 0, i32 1
store i8* %24, i8** %25
%26 = load i32, i32* %4
%27 = bitcast %struct.sockaddr_in* %2 to %struct.sockaddr*
%28 = call i64 @bind(i32 %26, %struct.sockaddr* %27, i32 24)
%29 = icmp slt i64 %28, 0
br i1 %29, label %30, label %32
30: ; preds = %15
%31 = call i32 @perror(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %1
br label %74
32: ; preds = %15
%33 = bitcast %struct.sockaddr_in* %3 to i8*
%34 = call i32 @memset(i8* %33, i32 0, i32 24)
%35 = load i8*, i8** @AF_INET
%36 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %3, i32 0, i32 2
store i8* %35, i8** %36
%37 = call i8* @htons(i32 9999)
%38 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %3, i32 0, i32 1
store i8* %37, i8** %38
%39 = load i8*, i8** %7
%40 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %3, i32 0, i32 0
%41 = call i64 @inet_aton(i8* %39, %struct.TYPE_2__* %40)
%42 = icmp sle i64 %41, 0
br i1 %42, label %43, label %46
43: ; preds = %32
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0))
%45 = call i32 @exit(i32 1)
unreachable
46: ; preds = %32
store i32 0, i32* %5
br label %47
47: ; preds = %68, %46
%48 = load i32, i32* %5
%49 = icmp slt i32 %48, 5
br i1 %49, label %50, label %71
50: ; preds = %47
%51 = load i32, i32* %5
%52 = load i8*, i8** %7
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.4, i64 0, i64 0), i32 %51, i8* %52, i32 9999)
%54 = getelementptr inbounds [2048 x i8], [2048 x i8]* %8, i64 0, i64 0
%55 = load i32, i32* %5
%56 = call i32 @sprintf(i8* %54, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0), i32 %55)
%57 = load i32, i32* %4
%58 = getelementptr inbounds [2048 x i8], [2048 x i8]* %8, i64 0, i64 0
%59 = getelementptr inbounds [2048 x i8], [2048 x i8]* %8, i64 0, i64 0
%60 = call i32 @strlen(i8* %59)
%61 = bitcast %struct.sockaddr_in* %3 to %struct.sockaddr*
%62 = load i32, i32* %6
%63 = call i64 @sendto(i32 %57, i8* %58, i32 %60, i32 0, %struct.sockaddr* %61, i32 %62)
%64 = icmp slt i64 %63, 0
br i1 %64, label %65, label %67
65: ; preds = %50
%66 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0))
br label %67
67: ; preds = %65, %50
br label %68
68: ; preds = %67
%69 = load i32, i32* %5
%70 = add nsw i32 %69, 1
store i32 %70, i32* %5
br label %47
71: ; preds = %47
%72 = load i32, i32* %4
%73 = call i32 @close(i32 %72)
store i32 0, i32* %1
br label %74
74: ; preds = %71, %30, %13
%75 = load i32, i32* %1
ret i32 %75
}

LLVM IR (-O2):
%struct.sockaddr_in = type { %struct.TYPE_2__, i8*, i8* }
%struct.TYPE_2__ = type { i32 }
%struct.sockaddr = type { i32 }
@.str = [10 x i8] c"127.0.0.1\00"
@AF_INET = global i8* null
@SOCK_DGRAM = global i32 0
@INADDR_ANY = global i32 0
@.str.2 = [15 x i8] c"Error: Bind()\0A\00"
@.str.4 = [36 x i8] c"Enviando mensaje %d a %s puerto %d\0A\00"
@.str.5 = [19 x i8] c"Mensaje n\C3\BAmero %d\00"
@.str.6 = [19 x i8] c"Error: Mensaje %d\0A\00"
@str = [19 x i8] c"Error: Inet_aton()\00"
@str.7 = [16 x i8] c"Error: Socket()\00"
define i32 @main() {
%1 = alloca %struct.sockaddr_in
%2 = alloca %struct.sockaddr_in
%3 = alloca [2048 x i8]
%4 = bitcast %struct.sockaddr_in* %1 to i8*
%5 = bitcast %struct.sockaddr_in* %2 to i8*
%6 = getelementptr inbounds [2048 x i8], [2048 x i8]* %3, i64 0, i64 0
%7 = load i8*, i8** @AF_INET
%8 = load i32, i32* @SOCK_DGRAM
%9 = tail call i32 @socket(i8* %7, i32 %8, i32 0)
%10 = icmp slt i32 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %0
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.7, i64 0, i64 0))
br label %82
13: ; preds = %0
%14 = call i32 @memset(i8* %4, i32 0, i32 24)
%15 = load i8*, i8** @AF_INET
%16 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %1, i64 0, i32 2
store i8* %15, i8** %16
%17 = load i32, i32* @INADDR_ANY
%18 = call i32 @htonl(i32 %17)
%19 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %1, i64 0, i32 0, i32 0
store i32 %18, i32* %19
%20 = call i8* @htons(i32 0)
%21 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %1, i64 0, i32 1
store i8* %20, i8** %21
%22 = bitcast %struct.sockaddr_in* %1 to %struct.sockaddr*
%23 = call i64 @bind(i32 %9, %struct.sockaddr* %22, i32 24)
%24 = icmp slt i64 %23, 0
br i1 %24, label %25, label %27
25: ; preds = %13
%26 = call i32 @perror(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
br label %82
27: ; preds = %13
%28 = call i32 @memset(i8* %5, i32 0, i32 24)
%29 = load i8*, i8** @AF_INET
%30 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %2, i64 0, i32 2
store i8* %29, i8** %30
%31 = call i8* @htons(i32 9999)
%32 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %2, i64 0, i32 1
store i8* %31, i8** %32
%33 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %2, i64 0, i32 0
%34 = call i64 @inet_aton(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), %struct.TYPE_2__* %33)
%35 = icmp slt i64 %34, 1
br i1 %35, label %43, label %36
36: ; preds = %27
%37 = bitcast %struct.sockaddr_in* %2 to %struct.sockaddr*
%38 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.4, i64 0, i64 0), i32 0, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 9999)
%39 = call i32 @sprintf(i8* %6, i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0), i32 0)
%40 = call i32 @strlen(i8* %6)
%41 = call i64 @sendto(i32 %9, i8* %6, i32 %40, i32 0, %struct.sockaddr* %37, i32 24)
%42 = icmp slt i64 %41, 0
br i1 %42, label %46, label %48
43: ; preds = %27
%44 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
%45 = call i32 @exit(i32 1)
unreachable
46: ; preds = %36
%47 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0))
br label %48
48: ; preds = %36, %46
%49 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.4, i64 0, i64 0), i32 1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 9999)
%50 = call i32 @sprintf(i8* %6, i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0), i32 1)
%51 = call i32 @strlen(i8* %6)
%52 = call i64 @sendto(i32 %9, i8* %6, i32 %51, i32 0, %struct.sockaddr* %37, i32 24)
%53 = icmp slt i64 %52, 0
br i1 %53, label %54, label %56
54: ; preds = %48
%55 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0))
br label %56
56: ; preds = %54, %48
%57 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.4, i64 0, i64 0), i32 2, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 9999)
%58 = call i32 @sprintf(i8* %6, i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0), i32 2)
%59 = call i32 @strlen(i8* %6)
%60 = call i64 @sendto(i32 %9, i8* %6, i32 %59, i32 0, %struct.sockaddr* %37, i32 24)
%61 = icmp slt i64 %60, 0
br i1 %61, label %62, label %64
62: ; preds = %56
%63 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0))
br label %64
64: ; preds = %62, %56
%65 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.4, i64 0, i64 0), i32 3, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 9999)
%66 = call i32 @sprintf(i8* %6, i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0), i32 3)
%67 = call i32 @strlen(i8* %6)
%68 = call i64 @sendto(i32 %9, i8* %6, i32 %67, i32 0, %struct.sockaddr* %37, i32 24)
%69 = icmp slt i64 %68, 0
br i1 %69, label %70, label %72
70: ; preds = %64
%71 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0))
br label %72
72: ; preds = %70, %64
%73 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.4, i64 0, i64 0), i32 4, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 9999)
%74 = call i32 @sprintf(i8* %6, i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0), i32 4)
%75 = call i32 @strlen(i8* %6)
%76 = call i64 @sendto(i32 %9, i8* %6, i32 %75, i32 0, %struct.sockaddr* %37, i32 24)
%77 = icmp slt i64 %76, 0
br i1 %77, label %78, label %80
78: ; preds = %72
%79 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0))
br label %80
80: ; preds = %78, %72
%81 = call i32 @close(i32 %9)
br label %82
82: ; preds = %80, %25, %11
%83 = phi i32 [ -1, %11 ], [ 0, %25 ], [ 0, %80 ]
ret i32 %83
}