#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*/ tv;
struct timeval {
  int tv_sec;
  scalar_t__ tv_usec;
};
struct sockaddr_in {
  int /*<<< orphan*/ sin_port;
  int /*<<< orphan*/ sin_addr;
  int /*<<< orphan*/ sin_family;
};
struct sockaddr {
  int dummy;
};
struct hostent {
  int /*<<< orphan*/ h_length;
  scalar_t__ h_addr;
};

/* Variables and functions */
int /*<<< orphan*/ AF_INET;
int /*<<< orphan*/ SOCK_DGRAM;
int /*<<< orphan*/ SOL_SOCKET;
int /*<<< orphan*/ SO_RCVTIMEO;
int /*<<< orphan*/ atoi(char *);
int /*<<< orphan*/ bcopy(char *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ bzero(char *, int);
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ error(char *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
struct hostent *gethostbyname(char *);
int /*<<< orphan*/ htons(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *);
int recvfrom(int, char *, int, int /*<<< orphan*/, struct sockaddr *,
             unsigned int *);
int sendto(int, char *, int /*<<< orphan*/, int /*<<< orphan*/,
           struct sockaddr const *, unsigned int);
scalar_t__ setsockopt(int, int /*<<< orphan*/, int /*<<< orphan*/,
                      struct timeval *, int);
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ strlen(char *);
int /*<<< orphan*/ write(int, char *, int);
int main(int argc, char *argv[]) {
  int sock, n;
  unsigned int length;
  struct sockaddr_in server, from;
  struct hostent *hp;
  char buffer[256];
  if (argc != 3) {
    printf("Usage: server port\n");
    exit(1);
  }
  sock = socket(AF_INET, SOCK_DGRAM, 0);
  if (sock < 0)
    error("socket");
  server.sin_family = AF_INET;
  hp = gethostbyname(argv[1]);
  if (hp == 0)
    error("Unknown host");
  bcopy((char *)hp->h_addr, (char *)&server.sin_addr, hp->h_length);
  server.sin_port = htons(atoi(argv[2]));
  length = sizeof(struct sockaddr_in);
  printf("Please enter the message: ");
  bzero(buffer, 256);
  fgets(buffer, 255, stdin);
  n = sendto(sock, buffer, strlen(buffer), 0, (const struct sockaddr *)&server,
             length);
  if (n < 0)
    error("Sendto");
  struct timeval tv;
  tv.tv_sec = 5;
  tv.tv_usec = 0;
  if (setsockopt(sock, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv)) < 0) {
    perror("Error\n");
  }
  n = recvfrom(sock, buffer, 256, 0, (struct sockaddr *)&from, &length);
  if (n < 0) {
    error("Connection timed out.");
  }
  write(1, "Got an ack: ", 12);
  write(1, buffer, n);
  close(sock);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x160,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x3,-0x8(%rbp)
je     1249 <main+0x39>
lea    0xdc6(%rip),%rdi
call   1070 <printf@plt>
mov    $0x1,%edi
call   1120 <exit@plt>
mov    0x2d90(%rip),%rax
mov    (%rax),%edi
mov    0x2d77(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1130 <socket@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    127b <main+0x6b>
lea    0xd9e(%rip),%rdi
call   10e0 <error@plt>
mov    0x2d5e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   10b0 <gethostbyname@plt>
mov    %rax,-0x40(%rbp)
cmpq   $0x0,-0x40(%rbp)
jne    12af <main+0x9f>
lea    0xd71(%rip),%rdi
call   10e0 <error@plt>
mov    -0x40(%rbp),%rax
mov    0x8(%rax),%rdi
lea    -0x28(%rbp),%rsi
add    $0x4,%rsi
mov    -0x40(%rbp),%rax
mov    (%rax),%edx
call   10d0 <bcopy@plt>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1110 <atoi@plt>
mov    %eax,%edi
call   1060 <htons@plt>
mov    %eax,-0x28(%rbp)
movl   $0xc,-0x1c(%rbp)
lea    0xd39(%rip),%rdi
call   1070 <printf@plt>
lea    -0x140(%rbp),%rdi
mov    $0x100,%esi
call   1100 <bzero@plt>
lea    -0x140(%rbp),%rdi
mov    0x2cc5(%rip),%rax
mov    (%rax),%edx
mov    $0xff,%esi
call   10a0 <fgets@plt>
mov    -0x14(%rbp),%eax
mov    %eax,-0x15c(%rbp)
lea    -0x140(%rbp),%rax
mov    %rax,-0x158(%rbp)
lea    -0x140(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x15c(%rbp),%edi
mov    -0x158(%rbp),%rsi
mov    %eax,%edx
lea    -0x28(%rbp),%r8
mov    -0x1c(%rbp),%r9d
xor    %ecx,%ecx
call   1080 <sendto@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jge    1379 <main+0x169>
lea    0xccf(%rip),%rdi
call   10e0 <error@plt>
movl   $0x5,-0x150(%rbp)
movq   $0x0,-0x148(%rbp)
mov    -0x14(%rbp),%edi
mov    0x2c50(%rip),%rax
mov    (%rax),%esi
mov    0x2c1f(%rip),%rax
mov    (%rax),%edx
lea    -0x150(%rbp),%rcx
mov    $0x10,%r8d
call   1030 <setsockopt@plt>
cmp    $0x0,%rax
jge    13cb <main+0x1bb>
lea    0xc84(%rip),%rdi
call   10f0 <perror@plt>
mov    -0x14(%rbp),%edi
lea    -0x140(%rbp),%rsi
lea    -0x38(%rbp),%r8
mov    $0x100,%edx
xor    %ecx,%ecx
lea    -0x1c(%rbp),%r9
call   10c0 <recvfrom@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jge    1402 <main+0x1f2>
lea    0xc54(%rip),%rdi
call   10e0 <error@plt>
mov    $0x1,%edi
lea    0xc59(%rip),%rsi
mov    $0xc,%edx
call   1040 <write@plt>
lea    -0x140(%rbp),%rsi
mov    -0x18(%rbp),%edx
mov    $0x1,%edi
call   1040 <write@plt>
mov    -0x14(%rbp),%edi
call   1090 <close@plt>
xor    %eax,%eax
add    $0x160,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x140,%rsp
cmp    $0x3,%edi
jne    13d1 <main+0x1b1>
mov    %rsi,%rbx
mov    0x2da2(%rip),%rbp
mov    0x0(%rbp),%edi
mov    0x2d88(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1140 <socket@plt>
mov    %eax,%r14d
test   %eax,%eax
jns    1264 <main+0x44>
lea    0xda1(%rip),%rdi
call   10f0 <error@plt>
mov    0x0(%rbp),%eax
mov    %eax,0x18(%rsp)
mov    0x8(%rbx),%rdi
call   10c0 <gethostbyname@plt>
mov    %rax,%rbp
test   %rax,%rax
jne    1288 <main+0x68>
lea    0xd84(%rip),%rdi
call   10f0 <error@plt>
mov    0x8(%rbp),%rsi
lea    0x14(%rsp),%rdi
mov    0x0(%rbp),%edx
call   10e0 <memmove@plt>
mov    0x10(%rbx),%rdi
call   1120 <atoi@plt>
mov    %eax,%edi
call   1070 <htons@plt>
mov    %eax,0x10(%rsp)
movl   $0xc,0xc(%rsp)
lea    0xd58(%rip),%rdi
call   1080 <printf@plt>
lea    0x40(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x100,%esi
call   1110 <bzero@plt>
mov    0x2cfe(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
mov    $0xff,%esi
call   10b0 <fgets@plt>
mov    %rbx,%rdi
call   1060 <strlen@plt>
lea    0x10(%rsp),%r8
mov    %r14d,%edi
mov    %rbx,%rsi
mov    %eax,%edx
xor    %ecx,%ecx
mov    $0xc,%r9d
call   1090 <sendto@plt>
test   %eax,%eax
jns    131b <main+0xfb>
lea    0xd19(%rip),%rdi
call   10f0 <error@plt>
movl   $0x5,0x20(%rsp)
movq   $0x0,0x28(%rsp)
mov    0x2cb5(%rip),%rax
mov    (%rax),%esi
mov    0x2c84(%rip),%rax
mov    (%rax),%edx
lea    0x20(%rsp),%rcx
mov    %r14d,%edi
mov    $0x10,%r8d
call   1040 <setsockopt@plt>
test   %rax,%rax
js     13c3 <main+0x1a3>
lea    0x40(%rsp),%rsi
lea    0x30(%rsp),%r8
lea    0xc(%rsp),%r9
mov    %r14d,%edi
mov    $0x100,%edx
xor    %ecx,%ecx
call   10d0 <recvfrom@plt>
mov    %eax,%ebx
test   %eax,%eax
jns    1386 <main+0x166>
lea    0xcbc(%rip),%rdi
call   10f0 <error@plt>
lea    0xcc6(%rip),%rsi
mov    $0x1,%edi
mov    $0xc,%edx
call   1050 <write@plt>
lea    0x40(%rsp),%rsi
mov    $0x1,%edi
mov    %ebx,%edx
call   1050 <write@plt>
mov    %r14d,%edi
call   10a0 <close@plt>
xor    %eax,%eax
add    $0x140,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret
lea    0xc6c(%rip),%rdi
call   1100 <perror@plt>
jmp    1356 <main+0x136>
lea    0xc88(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1130 <exit@plt>

LLVM IR (-O0):
%struct.sockaddr_in = type { i32, i32, i32 }
%struct.hostent = type { i32, i64 }
%struct.timeval = type { i32, i64 }
%struct.sockaddr = type { i32 }
@.str = [20 x i8] c"Usage: server port\0A\00"
@AF_INET = global i32 0
@SOCK_DGRAM = global i32 0
@.str.1 = [7 x i8] c"socket\00"
@.str.2 = [13 x i8] c"Unknown host\00"
@.str.3 = [27 x i8] c"Please enter the message: \00"
@stdin = global i32 0
@.str.4 = [7 x i8] c"Sendto\00"
@SOL_SOCKET = global i32 0
@SO_RCVTIMEO = global i32 0
@.str.5 = [7 x i8] c"Error\0A\00"
@.str.6 = [22 x i8] c"Connection timed out.\00"
@.str.7 = [13 x i8] c"Got an ack: \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
%9 = alloca %struct.sockaddr_in
%10 = alloca %struct.sockaddr_in
%11 = alloca %struct.hostent*
%12 = alloca [256 x i8]
%13 = alloca %struct.timeval
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%14 = load i32, i32* %4
%15 = icmp ne i32 %14, 3
br i1 %15, label %16, label %19
16: ; preds = %2
%17 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%18 = call i32 @exit(i32 1)
unreachable
19: ; preds = %2
%20 = load i32, i32* @AF_INET
%21 = load i32, i32* @SOCK_DGRAM
%22 = call i32 @socket(i32 %20, i32 %21, i32 0)
store i32 %22, i32* %6
%23 = load i32, i32* %6
%24 = icmp slt i32 %23, 0
br i1 %24, label %25, label %27
25: ; preds = %19
%26 = call i32 @error(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
br label %27
27: ; preds = %25, %19
%28 = load i32, i32* @AF_INET
%29 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %9, i32 0, i32 2
store i32 %28, i32* %29
%30 = load i8**, i8*** %5
%31 = getelementptr inbounds i8*, i8** %30, i64 1
%32 = load i8*, i8** %31
%33 = call %struct.hostent* @gethostbyname(i8* %32)
store %struct.hostent* %33, %struct.hostent** %11
%34 = load %struct.hostent*, %struct.hostent** %11
%35 = icmp eq %struct.hostent* %34, null
br i1 %35, label %36, label %38
36: ; preds = %27
%37 = call i32 @error(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
br label %38
38: ; preds = %36, %27
%39 = load %struct.hostent*, %struct.hostent** %11
%40 = getelementptr inbounds %struct.hostent, %struct.hostent* %39, i32 0, i32 1
%41 = load i64, i64* %40
%42 = inttoptr i64 %41 to i8*
%43 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %9, i32 0, i32 1
%44 = bitcast i32* %43 to i8*
%45 = load %struct.hostent*, %struct.hostent** %11
%46 = getelementptr inbounds %struct.hostent, %struct.hostent* %45, i32 0, i32 0
%47 = load i32, i32* %46
%48 = call i32 @bcopy(i8* %42, i8* %44, i32 %47)
%49 = load i8**, i8*** %5
%50 = getelementptr inbounds i8*, i8** %49, i64 2
%51 = load i8*, i8** %50
%52 = call i32 @atoi(i8* %51)
%53 = call i32 @htons(i32 %52)
%54 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %9, i32 0, i32 0
store i32 %53, i32* %54
store i32 12, i32* %8
%55 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0))
%56 = getelementptr inbounds [256 x i8], [256 x i8]* %12, i64 0, i64 0
%57 = call i32 @bzero(i8* %56, i32 256)
%58 = getelementptr inbounds [256 x i8], [256 x i8]* %12, i64 0, i64 0
%59 = load i32, i32* @stdin
%60 = call i32 @fgets(i8* %58, i32 255, i32 %59)
%61 = load i32, i32* %6
%62 = getelementptr inbounds [256 x i8], [256 x i8]* %12, i64 0, i64 0
%63 = getelementptr inbounds [256 x i8], [256 x i8]* %12, i64 0, i64 0
%64 = call i32 @strlen(i8* %63)
%65 = bitcast %struct.sockaddr_in* %9 to %struct.sockaddr*
%66 = load i32, i32* %8
%67 = call i32 @sendto(i32 %61, i8* %62, i32 %64, i32 0, %struct.sockaddr* %65, i32 %66)
store i32 %67, i32* %7
%68 = load i32, i32* %7
%69 = icmp slt i32 %68, 0
br i1 %69, label %70, label %72
70: ; preds = %38
%71 = call i32 @error(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
br label %72
72: ; preds = %70, %38
%73 = getelementptr inbounds %struct.timeval, %struct.timeval* %13, i32 0, i32 0
store i32 5, i32* %73
%74 = getelementptr inbounds %struct.timeval, %struct.timeval* %13, i32 0, i32 1
store i64 0, i64* %74
%75 = load i32, i32* %6
%76 = load i32, i32* @SOL_SOCKET
%77 = load i32, i32* @SO_RCVTIMEO
%78 = call i64 @setsockopt(i32 %75, i32 %76, i32 %77, %struct.timeval* %13, i32 16)
%79 = icmp slt i64 %78, 0
br i1 %79, label %80, label %82
80: ; preds = %72
%81 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
br label %82
82: ; preds = %80, %72
%83 = load i32, i32* %6
%84 = getelementptr inbounds [256 x i8], [256 x i8]* %12, i64 0, i64 0
%85 = bitcast %struct.sockaddr_in* %10 to %struct.sockaddr*
%86 = call i32 @recvfrom(i32 %83, i8* %84, i32 256, i32 0, %struct.sockaddr* %85, i32* %8)
store i32 %86, i32* %7
%87 = load i32, i32* %7
%88 = icmp slt i32 %87, 0
br i1 %88, label %89, label %91
89: ; preds = %82
%90 = call i32 @error(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0))
br label %91
91: ; preds = %89, %82
%92 = call i32 @write(i32 1, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0), i32 12)
%93 = getelementptr inbounds [256 x i8], [256 x i8]* %12, i64 0, i64 0
%94 = load i32, i32* %7
%95 = call i32 @write(i32 1, i8* %93, i32 %94)
%96 = load i32, i32* %6
%97 = call i32 @close(i32 %96)
ret i32 0
}

LLVM IR (-O2):
%struct.sockaddr_in = type { i32, i32, i32 }
%struct.timeval = type { i32, i64 }
%struct.hostent = type { i32, i64 }
%struct.sockaddr = type { i32 }
@AF_INET = global i32 0
@SOCK_DGRAM = global i32 0
@.str.1 = [7 x i8] c"socket\00"
@.str.2 = [13 x i8] c"Unknown host\00"
@.str.3 = [27 x i8] c"Please enter the message: \00"
@stdin = global i32 0
@.str.4 = [7 x i8] c"Sendto\00"
@SOL_SOCKET = global i32 0
@SO_RCVTIMEO = global i32 0
@.str.5 = [7 x i8] c"Error\0A\00"
@.str.6 = [22 x i8] c"Connection timed out.\00"
@.str.7 = [13 x i8] c"Got an ack: \00"
@str = [19 x i8] c"Usage: server port\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i32
%4 = alloca %struct.sockaddr_in
%5 = alloca %struct.sockaddr_in
%6 = alloca [256 x i8]
%7 = alloca %struct.timeval
%8 = bitcast i32* %3 to i8*
%9 = bitcast %struct.sockaddr_in* %4 to i8*
%10 = bitcast %struct.sockaddr_in* %5 to i8*
%11 = getelementptr inbounds [256 x i8], [256 x i8]* %6, i64 0, i64 0
%12 = icmp eq i32 %0, 3
br i1 %12, label %16, label %13
13: ; preds = %2
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
%15 = tail call i32 @exit(i32 1)
unreachable
16: ; preds = %2
%17 = load i32, i32* @AF_INET
%18 = load i32, i32* @SOCK_DGRAM
%19 = tail call i32 @socket(i32 %17, i32 %18, i32 0)
%20 = icmp slt i32 %19, 0
br i1 %20, label %21, label %23
21: ; preds = %16
%22 = tail call i32 @error(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
br label %23
23: ; preds = %21, %16
%24 = load i32, i32* @AF_INET
%25 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %4, i64 0, i32 2
store i32 %24, i32* %25
%26 = getelementptr inbounds i8*, i8** %1, i64 1
%27 = load i8*, i8** %26
%28 = tail call %struct.hostent* @gethostbyname(i8* %27)
%29 = icmp eq %struct.hostent* %28, null
br i1 %29, label %30, label %32
30: ; preds = %23
%31 = tail call i32 @error(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
br label %32
32: ; preds = %30, %23
%33 = getelementptr inbounds %struct.hostent, %struct.hostent* %28, i64 0, i32 1
%34 = load i64, i64* %33
%35 = inttoptr i64 %34 to i8*
%36 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %4, i64 0, i32 1
%37 = bitcast i32* %36 to i8*
%38 = getelementptr inbounds %struct.hostent, %struct.hostent* %28, i64 0, i32 0
%39 = load i32, i32* %38
%40 = getelementptr inbounds i8*, i8** %1, i64 2
%41 = load i8*, i8** %40
%42 = tail call i32 @atoi(i8* %41)
%43 = tail call i32 @htons(i32 %42)
%44 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %4, i64 0, i32 0
store i32 %43, i32* %44
store i32 12, i32* %3
%45 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0))
%46 = call i32 @bzero(i8* %11, i32 256)
%47 = load i32, i32* @stdin
%48 = call i32 @fgets(i8* %11, i32 255, i32 %47)
%49 = call i32 @strlen(i8* %11)
%50 = bitcast %struct.sockaddr_in* %4 to %struct.sockaddr*
%51 = call i32 @sendto(i32 %19, i8* %11, i32 %49, i32 0, %struct.sockaddr* %50, i32 12)
%52 = icmp slt i32 %51, 0
br i1 %52, label %53, label %55
53: ; preds = %32
%54 = call i32 @error(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
br label %55
55: ; preds = %53, %32
%56 = bitcast %struct.timeval* %7 to i8*
%57 = getelementptr inbounds %struct.timeval, %struct.timeval* %7, i64 0, i32 0
store i32 5, i32* %57
%58 = getelementptr inbounds %struct.timeval, %struct.timeval* %7, i64 0, i32 1
store i64 0, i64* %58
%59 = load i32, i32* @SOL_SOCKET
%60 = load i32, i32* @SO_RCVTIMEO
%61 = call i64 @setsockopt(i32 %19, i32 %59, i32 %60, %struct.timeval* %7, i32 16)
%62 = icmp slt i64 %61, 0
br i1 %62, label %63, label %65
63: ; preds = %55
%64 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
br label %65
65: ; preds = %63, %55
%66 = bitcast %struct.sockaddr_in* %5 to %struct.sockaddr*
%67 = call i32 @recvfrom(i32 %19, i8* %11, i32 256, i32 0, %struct.sockaddr* %66, i32* %3)
%68 = icmp slt i32 %67, 0
br i1 %68, label %69, label %71
69: ; preds = %65
%70 = call i32 @error(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0))
br label %71
71: ; preds = %69, %65
%72 = call i32 @write(i32 1, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0), i32 12)
%73 = call i32 @write(i32 1, i8* %11, i32 %67)
%74 = call i32 @close(i32 %19)
ret i32 0
}