#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 sockaddr_storage {
  int dummy;
};
struct sockaddr {
  int dummy;
};
struct addrinfo {
  int /*<<< orphan*/ ai_addrlen;
  int /*<<< orphan*/ ai_addr;
  int /*<<< orphan*/ ai_protocol;
  int /*<<< orphan*/ ai_socktype;
  int /*<<< orphan*/ ai_family;
  int /*<<< orphan*/ ai_flags;
};
typedef int socklen_t;

/* Variables and functions */
int /*<<< orphan*/ AF_INET;
int /*<<< orphan*/ AI_PASSIVE;
int /*<<< orphan*/ MSG_WAITALL;
int /*<<< orphan*/ SOCK_DGRAM;
int /*<<< orphan*/ SOL_SOCKET;
int /*<<< orphan*/ SO_REUSEADDR;
int bind(int, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ freeaddrinfo(struct addrinfo *);
char *gai_strerror(int);
int getaddrinfo(int /*<<< orphan*/ *, char *, struct addrinfo *,
                struct addrinfo **);
int /*<<< orphan*/ memset(struct addrinfo *, int /*<<< orphan*/, int);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *);
int recvfrom(int, char *, int, int /*<<< orphan*/, struct sockaddr *, int *);
int sendto(int, char *, int, int /*<<< orphan*/, struct sockaddr *, int);
int setsockopt(int, int /*<<< orphan*/, int /*<<< orphan*/, int *, int);
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int server_loop_udp(char *server_port) {
  int sockfd, rc;
  int yes = 1;
  struct addrinfo hints, *server;
  char message[256];
  memset(&hints, 0, sizeof hints);
  hints.ai_family = AF_INET;
  hints.ai_socktype = SOCK_DGRAM;
  hints.ai_flags = AI_PASSIVE;
  if ((rc = getaddrinfo(NULL, server_port, &hints, &server)) != 0) {
    perror(gai_strerror(rc));
    exit(-1);
  }
  sockfd = socket(server->ai_family, server->ai_socktype, server->ai_protocol);
  if (sockfd == -1) {
    perror("ERROR opening socket");
    exit(-1);
  }
  if (setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof(int)) == -1) {
    perror("ERROR on setsockopt");
    exit(-1);
  }
  rc = bind(sockfd, server->ai_addr, server->ai_addrlen);
  if (rc == -1) {
    perror("ERROR on connect");
    close(sockfd);
    exit(-1);
  }
  while (1) {
    struct sockaddr_storage client_addr;
    socklen_t addr_size;
    int clientfd;
    int bytes_read, bytes_write;
    addr_size = sizeof client_addr;
    while (1) {
      bytes_read = recvfrom(sockfd, message, sizeof message, MSG_WAITALL,
                            (struct sockaddr *)&client_addr, &addr_size);
      if (bytes_read < 0) {
        perror("ERROR reading socket");
      }
      if (bytes_read == 0)
        break;
      bytes_write = sendto(sockfd, (char *)&message, bytes_read, 0,
                           (struct sockaddr *)&client_addr, addr_size);
      if (bytes_write < 0) {
        perror("ERROR writing socket");
      }
    }
    printf("Connection dropped!\n");
    close(clientfd);
  }
  freeaddrinfo(server);
  close(sockfd);
  return 0;
}


x86 assembly (clang, -O0):
<server_loop_udp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x160,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x1,-0x14(%rbp)
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0x18,%edx
call   1060 <memset@plt>
mov    0x2deb(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x20(%rbp)
mov    0x2dd7(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
mov    0x2ddb(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edi
lea    -0x30(%rbp),%rdx
lea    -0x38(%rbp),%rcx
call   10d0 <getaddrinfo@plt>
mov    %eax,-0x10(%rbp)
cmp    $0x0,%eax
je     1245 <server_loop_udp+0x85>
mov    -0x10(%rbp),%edi
call   1050 <gai_strerror@plt>
mov    %rax,%rdi
call   10b0 <perror@plt>
mov    $0xffffffff,%edi
call   10c0 <exit@plt>
mov    -0x38(%rbp),%rax
mov    0x10(%rax),%edi
mov    -0x38(%rbp),%rax
mov    0xc(%rax),%esi
mov    -0x38(%rbp),%rax
mov    0x8(%rax),%edx
call   10e0 <socket@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0xffffffff,-0xc(%rbp)
jne    1282 <server_loop_udp+0xc2>
lea    0xd8d(%rip),%rdi
call   10b0 <perror@plt>
mov    $0xffffffff,%edi
call   10c0 <exit@plt>
mov    -0xc(%rbp),%edi
mov    0x2d5c(%rip),%rax
mov    (%rax),%esi
mov    0x2d2b(%rip),%rax
mov    (%rax),%edx
lea    -0x14(%rbp),%rcx
mov    $0x4,%r8d
call   1030 <setsockopt@plt>
cmp    $0xffffffff,%eax
jne    12c5 <server_loop_udp+0x105>
lea    0xd5f(%rip),%rdi
call   10b0 <perror@plt>
mov    $0xffffffff,%edi
call   10c0 <exit@plt>
mov    -0xc(%rbp),%edi
mov    -0x38(%rbp),%rax
mov    0x4(%rax),%esi
mov    -0x38(%rbp),%rax
mov    (%rax),%edx
call   10a0 <bind@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0xffffffff,-0x10(%rbp)
jne    1305 <server_loop_udp+0x145>
lea    0xd3b(%rip),%rdi
call   10b0 <perror@plt>
mov    -0xc(%rbp),%edi
call   1080 <close@plt>
mov    $0xffffffff,%edi
call   10c0 <exit@plt>
jmp    130a <server_loop_udp+0x14a>
movl   $0x4,-0x14c(%rbp)
mov    -0xc(%rbp),%edi
lea    -0x140(%rbp),%rsi
mov    0x2c8b(%rip),%rax
mov    (%rax),%ecx
lea    -0x148(%rbp),%r8
mov    $0x100,%edx
lea    -0x14c(%rbp),%r9
call   1090 <recvfrom@plt>
mov    %eax,-0x154(%rbp)
cmpl   $0x0,-0x154(%rbp)
jge    135e <server_loop_udp+0x19e>
lea    0xce1(%rip),%rdi
call   10b0 <perror@plt>
cmpl   $0x0,-0x154(%rbp)
jne    1370 <server_loop_udp+0x1b0>
jmp    13b9 <server_loop_udp+0x1f9>
mov    -0xc(%rbp),%edi
lea    -0x140(%rbp),%rsi
mov    -0x154(%rbp),%edx
lea    -0x148(%rbp),%r8
mov    -0x14c(%rbp),%r9d
xor    %ecx,%ecx
call   1070 <sendto@plt>
mov    %eax,-0x158(%rbp)
cmpl   $0x0,-0x158(%rbp)
jge    13b4 <server_loop_udp+0x1f4>
lea    0xca0(%rip),%rdi
call   10b0 <perror@plt>
jmp    1314 <server_loop_udp+0x154>
lea    0xca4(%rip),%rdi
call   1040 <printf@plt>
mov    -0x150(%rbp),%edi
call   1080 <close@plt>
jmp    130a <server_loop_udp+0x14a>

x86 assembly (clang, -O2):
<server_loop_udp>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x138,%rsp
mov    %rdi,%rbx
movl   $0x1,0x4(%rsp)
lea    0x18(%rsp),%rbp
mov    %rbp,%rdi
xor    %esi,%esi
mov    $0x18,%edx
call   1060 <memset@plt>
mov    0x2de1(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x28(%rsp)
mov    0x2dcc(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x24(%rsp)
mov    0x2dcf(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x2c(%rsp)
lea    0x8(%rsp),%rcx
xor    %edi,%edi
mov    %rbx,%rsi
mov    %rbp,%rdx
call   10d0 <getaddrinfo@plt>
test   %eax,%eax
jne    131f <server_loop_udp+0x15f>
mov    0x8(%rsp),%rax
mov    0x10(%rax),%edi
mov    0x8(%rax),%edx
mov    0xc(%rax),%esi
call   10e0 <socket@plt>
cmp    $0xffffffff,%eax
je     132b <server_loop_udp+0x16b>
mov    %eax,%ebx
mov    0x2d92(%rip),%rax
mov    (%rax),%esi
mov    0x2d61(%rip),%rax
mov    (%rax),%edx
lea    0x4(%rsp),%rcx
mov    %ebx,%edi
mov    $0x4,%r8d
call   1040 <setsockopt@plt>
cmp    $0xffffffff,%eax
je     1334 <server_loop_udp+0x174>
mov    0x8(%rsp),%rax
mov    (%rax),%edx
mov    0x4(%rax),%esi
mov    %ebx,%edi
call   10a0 <bind@plt>
cmp    $0xffffffff,%eax
je     134a <server_loop_udp+0x18a>
mov    0x2d13(%rip),%rbp
lea    0x30(%rsp),%r14
lea    0x10(%rsp),%r15
mov    %rsp,%r12
jmp    12c1 <server_loop_udp+0x101>
nopl   0x0(%rax)
lea    0xdad(%rip),%rdi
call   1030 <puts@plt>
call   1080 <close@plt>
movl   $0x4,(%rsp)
mov    0x0(%rbp),%ecx
mov    %ebx,%edi
mov    %r14,%rsi
mov    $0x100,%edx
mov    %r15,%r8
mov    %r12,%r9
call   1090 <recvfrom@plt>
mov    %eax,%r13d
test   %eax,%eax
js     1311 <server_loop_udp+0x151>
je     12b0 <server_loop_udp+0xf0>
mov    (%rsp),%r9d
mov    %ebx,%edi
mov    %r14,%rsi
mov    %r13d,%edx
xor    %ecx,%ecx
mov    %r15,%r8
call   1070 <sendto@plt>
test   %eax,%eax
jns    12c8 <server_loop_udp+0x108>
lea    0xd45(%rip),%rdi
call   10b0 <perror@plt>
jmp    12c8 <server_loop_udp+0x108>
lea    0xd22(%rip),%rdi
call   10b0 <perror@plt>
jmp    12e9 <server_loop_udp+0x129>
mov    %eax,%edi
call   1050 <gai_strerror@plt>
mov    %rax,%rdi
jmp    133b <server_loop_udp+0x17b>
lea    0xcce(%rip),%rdi
jmp    133b <server_loop_udp+0x17b>
lea    0xcda(%rip),%rdi
call   10b0 <perror@plt>
mov    $0xffffffff,%edi
call   10c0 <exit@plt>
lea    0xcd8(%rip),%rdi
call   10b0 <perror@plt>
mov    %ebx,%edi
call   1080 <close@plt>
mov    $0xffffffff,%edi
call   10c0 <exit@plt>

LLVM IR (-O0):
%struct.addrinfo = type { i32, i32, i32, i32, i32, i32 }
%struct.sockaddr_storage = type { i32 }
%struct.sockaddr = type { i32 }
@AF_INET = global i32 0
@SOCK_DGRAM = global i32 0
@AI_PASSIVE = global i32 0
@.str = [21 x i8] c"ERROR opening socket\00"
@SOL_SOCKET = global i32 0
@SO_REUSEADDR = global i32 0
@.str.1 = [20 x i8] c"ERROR on setsockopt\00"
@.str.2 = [17 x i8] c"ERROR on connect\00"
@MSG_WAITALL = global i32 0
@.str.3 = [21 x i8] c"ERROR reading socket\00"
@.str.4 = [21 x i8] c"ERROR writing socket\00"
@.str.5 = [21 x i8] c"Connection dropped!\0A\00"
define i32 @server_loop_udp(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca %struct.addrinfo
%7 = alloca %struct.addrinfo*
%8 = alloca [256 x i8]
%9 = alloca %struct.sockaddr_storage
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
store i8* %0, i8** %2
store i32 1, i32* %5
%14 = call i32 @memset(%struct.addrinfo* %6, i32 0, i32 24)
%15 = load i32, i32* @AF_INET
%16 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %6, i32 0, i32 4
store i32 %15, i32* %16
%17 = load i32, i32* @SOCK_DGRAM
%18 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %6, i32 0, i32 3
store i32 %17, i32* %18
%19 = load i32, i32* @AI_PASSIVE
%20 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %6, i32 0, i32 5
store i32 %19, i32* %20
%21 = load i8*, i8** %2
%22 = call i32 @getaddrinfo(i32* null, i8* %21, %struct.addrinfo* %6, %struct.addrinfo** %7)
store i32 %22, i32* %4
%23 = icmp ne i32 %22, 0
br i1 %23, label %24, label %29
24: ; preds = %1
%25 = load i32, i32* %4
%26 = call i8* @gai_strerror(i32 %25)
%27 = call i32 @perror(i8* %26)
%28 = call i32 @exit(i32 -1)
unreachable
29: ; preds = %1
%30 = load %struct.addrinfo*, %struct.addrinfo** %7
%31 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %30, i32 0, i32 4
%32 = load i32, i32* %31
%33 = load %struct.addrinfo*, %struct.addrinfo** %7
%34 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %33, i32 0, i32 3
%35 = load i32, i32* %34
%36 = load %struct.addrinfo*, %struct.addrinfo** %7
%37 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %36, i32 0, i32 2
%38 = load i32, i32* %37
%39 = call i32 @socket(i32 %32, i32 %35, i32 %38)
store i32 %39, i32* %3
%40 = load i32, i32* %3
%41 = icmp eq i32 %40, -1
br i1 %41, label %42, label %45
42: ; preds = %29
%43 = call i32 @perror(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%44 = call i32 @exit(i32 -1)
unreachable
45: ; preds = %29
%46 = load i32, i32* %3
%47 = load i32, i32* @SOL_SOCKET
%48 = load i32, i32* @SO_REUSEADDR
%49 = call i32 @setsockopt(i32 %46, i32 %47, i32 %48, i32* %5, i32 4)
%50 = icmp eq i32 %49, -1
br i1 %50, label %51, label %54
51: ; preds = %45
%52 = call i32 @perror(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%53 = call i32 @exit(i32 -1)
unreachable
54: ; preds = %45
%55 = load i32, i32* %3
%56 = load %struct.addrinfo*, %struct.addrinfo** %7
%57 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %56, i32 0, i32 1
%58 = load i32, i32* %57
%59 = load %struct.addrinfo*, %struct.addrinfo** %7
%60 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %59, i32 0, i32 0
%61 = load i32, i32* %60
%62 = call i32 @bind(i32 %55, i32 %58, i32 %61)
store i32 %62, i32* %4
%63 = load i32, i32* %4
%64 = icmp eq i32 %63, -1
br i1 %64, label %65, label %70
65: ; preds = %54
%66 = call i32 @perror(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
%67 = load i32, i32* %3
%68 = call i32 @close(i32 %67)
%69 = call i32 @exit(i32 -1)
unreachable
70: ; preds = %54
br label %71
71: ; preds = %70, %98
store i32 4, i32* %10
br label %72
72: ; preds = %71, %97
%73 = load i32, i32* %3
%74 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%75 = load i32, i32* @MSG_WAITALL
%76 = bitcast %struct.sockaddr_storage* %9 to %struct.sockaddr*
%77 = call i32 @recvfrom(i32 %73, i8* %74, i32 256, i32 %75, %struct.sockaddr* %76, i32* %10)
store i32 %77, i32* %12
%78 = load i32, i32* %12
%79 = icmp slt i32 %78, 0
br i1 %79, label %80, label %82
80: ; preds = %72
%81 = call i32 @perror(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0))
br label %82
82: ; preds = %80, %72
%83 = load i32, i32* %12
%84 = icmp eq i32 %83, 0
br i1 %84, label %85, label %86
85: ; preds = %82
br label %98
86: ; preds = %82
%87 = load i32, i32* %3
%88 = bitcast [256 x i8]* %8 to i8*
%89 = load i32, i32* %12
%90 = bitcast %struct.sockaddr_storage* %9 to %struct.sockaddr*
%91 = load i32, i32* %10
%92 = call i32 @sendto(i32 %87, i8* %88, i32 %89, i32 0, %struct.sockaddr* %90, i32 %91)
store i32 %92, i32* %13
%93 = load i32, i32* %13
%94 = icmp slt i32 %93, 0
br i1 %94, label %95, label %97
95: ; preds = %86
%96 = call i32 @perror(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0))
br label %97
97: ; preds = %95, %86
br label %72
98: ; preds = %85
%99 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0))
%100 = load i32, i32* %11
%101 = call i32 @close(i32 %100)
br label %71
}

LLVM IR (-O2):
%struct.addrinfo = type { i32, i32, i32, i32, i32, i32 }
%struct.sockaddr_storage = type { i32 }
%struct.sockaddr = type { i32 }
@AF_INET = global i32 0
@SOCK_DGRAM = global i32 0
@AI_PASSIVE = global i32 0
@.str = [21 x i8] c"ERROR opening socket\00"
@SOL_SOCKET = global i32 0
@SO_REUSEADDR = global i32 0
@.str.1 = [20 x i8] c"ERROR on setsockopt\00"
@.str.2 = [17 x i8] c"ERROR on connect\00"
@MSG_WAITALL = global i32 0
@.str.3 = [21 x i8] c"ERROR reading socket\00"
@.str.4 = [21 x i8] c"ERROR writing socket\00"
@str = [20 x i8] c"Connection dropped!\00"
define i32 @server_loop_udp(i8* %0) {
%2 = alloca i32
%3 = alloca %struct.addrinfo
%4 = alloca %struct.addrinfo*
%5 = alloca [256 x i8]
%6 = alloca %struct.sockaddr_storage
%7 = alloca i32
%8 = bitcast i32* %2 to i8*
store i32 1, i32* %2
%9 = bitcast %struct.addrinfo* %3 to i8*
%10 = bitcast %struct.addrinfo** %4 to i8*
%11 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%12 = call i32 @memset(%struct.addrinfo* %3, i32 0, i32 24)
%13 = load i32, i32* @AF_INET
%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 = load i32, i32* @AI_PASSIVE
%18 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %3, i64 0, i32 5
store i32 %17, i32* %18
%19 = call i32 @getaddrinfo(i32* null, i8* %0, %struct.addrinfo* %3, %struct.addrinfo** %4)
%20 = icmp eq i32 %19, 0
br i1 %20, label %25, label %21
21: ; preds = %1
%22 = call i8* @gai_strerror(i32 %19)
%23 = call i32 @perror(i8* %22)
%24 = call i32 @exit(i32 -1)
unreachable
25: ; preds = %1
%26 = load %struct.addrinfo*, %struct.addrinfo** %4
%27 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %26, i64 0, i32 4
%28 = load i32, i32* %27
%29 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %26, i64 0, i32 3
%30 = load i32, i32* %29
%31 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %26, i64 0, i32 2
%32 = load i32, i32* %31
%33 = call i32 @socket(i32 %28, i32 %30, i32 %32)
%34 = icmp eq i32 %33, -1
br i1 %34, label %35, label %38
35: ; preds = %25
%36 = call i32 @perror(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%37 = call i32 @exit(i32 -1)
unreachable
38: ; preds = %25
%39 = load i32, i32* @SOL_SOCKET
%40 = load i32, i32* @SO_REUSEADDR
%41 = call i32 @setsockopt(i32 %33, i32 %39, i32 %40, i32* %2, i32 4)
%42 = icmp eq i32 %41, -1
br i1 %42, label %43, label %46
43: ; preds = %38
%44 = call i32 @perror(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%45 = call i32 @exit(i32 -1)
unreachable
46: ; preds = %38
%47 = load %struct.addrinfo*, %struct.addrinfo** %4
%48 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %47, i64 0, i32 1
%49 = load i32, i32* %48
%50 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %47, i64 0, i32 0
%51 = load i32, i32* %50
%52 = call i32 @bind(i32 %33, i32 %49, i32 %51)
%53 = icmp eq i32 %52, -1
br i1 %53, label %58, label %54
54: ; preds = %46
%55 = bitcast %struct.sockaddr_storage* %6 to i8*
%56 = bitcast i32* %7 to i8*
%57 = bitcast %struct.sockaddr_storage* %6 to %struct.sockaddr*
br label %62
58: ; preds = %46
%59 = call i32 @perror(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
%60 = call i32 @close(i32 %33)
%61 = call i32 @exit(i32 -1)
unreachable
62: ; preds = %54, %78
store i32 4, i32* %7
br label %63
63: ; preds = %77, %62
%64 = load i32, i32* @MSG_WAITALL
%65 = call i32 @recvfrom(i32 %33, i8* %11, i32 256, i32 %64, %struct.sockaddr* %57, i32* %7)
%66 = icmp slt i32 %65, 0
br i1 %66, label %67, label %69
67: ; preds = %63
%68 = call i32 @perror(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0))
br label %71
69: ; preds = %63
%70 = icmp eq i32 %65, 0
br i1 %70, label %78, label %71
71: ; preds = %67, %69
%72 = load i32, i32* %7
%73 = call i32 @sendto(i32 %33, i8* %11, i32 %65, i32 0, %struct.sockaddr* %57, i32 %72)
%74 = icmp slt i32 %73, 0
br i1 %74, label %75, label %77
75: ; preds = %71
%76 = call i32 @perror(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0))
br label %77
77: ; preds = %75, %71
br label %63
78: ; preds = %69
%79 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
%80 = call i32 @close(i32 undef)
br label %62
}