#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 timezone {
  int dummy;
};
struct timeval {
  int dummy;
};
struct TYPE_2__ {
  int /*<<< orphan*/ s_addr;
};
struct sockaddr_in {
  void *sin_family;
  void *sin_port;
  TYPE_1__ sin_addr;
};
struct sockaddr {
  int dummy;
};
struct pollfd {
  int dummy;
};
typedef int /*<<< orphan*/ sockname;
typedef int /*<<< orphan*/ socklen_t;
typedef int /*<<< orphan*/ regex_t;
typedef int /*<<< orphan*/ fd_set;
typedef int /*<<< orphan*/ addr;

/* Variables and functions */
void *AF_INET;
int /*<<< orphan*/ INADDR_ANY;
int /*<<< orphan*/ IPPROTO_UDP;
int /*<<< orphan*/ PF_INET;
int /*<<< orphan*/ SOCK_DGRAM;
int /*<<< orphan*/ SOL_SOCKET;
int /*<<< orphan*/ SO_BSDCOMPAT;
int bind(int, struct sockaddr *, int);
int /*<<< orphan*/ exit(int);
int getsockopt(int, int /*<<< orphan*/, int /*<<< orphan*/, int *, int *);
int /*<<< orphan*/ htonl(int /*<<< orphan*/);
void *htons(short);
int /*<<< orphan*/ inet_addr(char *);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *, int);
int sendto(int, char *, int /*<<< orphan*/, int /*<<< orphan*/,
           struct sockaddr *, int);
scalar_t__ socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char *);
int /*<<< orphan*/ usleep(int);
void shoot() {
  struct sockaddr_in addr, sockname;
  struct timeval tv, sendtime, recvtime, firstsendt;
  struct timezone tz;
  struct pollfd sockerr;
  int ssock, redirected, retryAfter;
  int sock, i, len, ret, usrlocstep, randretrys;
  int dontsend, cseqcmp, cseqtmp;
  int rem_rand, rem_namebeg;
  char *contact, *crlf, *foo, *bar;
  fd_set fd;
  socklen_t slen;
  regex_t redexp, proexp, okexp, tmhexp, errexp;
  int bsd_compat, opt_size;
  int nretries = 3;
  char *buff = "MiniTest";
  sock = (int)socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP);
  if (sock == -1) {
    perror("no client socket");
    exit(2);
  }
  ssock = (int)socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP);
  if (ssock == -1) {
    perror("no server socket");
    exit(2);
  }
  sockname.sin_family = AF_INET;
  sockname.sin_addr.s_addr = htonl(INADDR_ANY);
  sockname.sin_port = htons((short)47437);
  if (bind(ssock, (struct sockaddr *)&sockname, sizeof(sockname)) == -1) {
    perror("no bind");
    exit(2);
  }
  addr.sin_addr.s_addr = inet_addr("192.168.99.100");
  addr.sin_port = htons((short)888);
  addr.sin_family = AF_INET;
  if (getsockopt(sock, SOL_SOCKET, SO_BSDCOMPAT, &bsd_compat, &opt_size) ==
      -1) {
    perror("ERROR");
    exit(1);
  }
  printf("BSD compat: %d\n", bsd_compat);
  for (i = 0; i <= nretries; i++) {
    ret = sendto(sock, buff, strlen(buff), 0, (struct sockaddr *)&addr,
                 sizeof(addr));
    usleep(100000);
    if (ret == -1) {
      perror("send failure");
      exit(1);
    }
  }
  exit(0);
}


x86 assembly (clang, -O0):
<shoot>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
movl   $0x3,-0xe0(%rbp)
lea    0xe24(%rip),%rax
mov    %rax,-0xe8(%rbp)
mov    0x2dce(%rip),%rax
mov    (%rax),%edi
mov    0x2ddd(%rip),%rax
mov    (%rax),%esi
mov    0x2dac(%rip),%rax
mov    (%rax),%edx
call   10e0 <socket@plt>
mov    %eax,-0x70(%rbp)
cmpl   $0xffffffff,-0x70(%rbp)
jne    1226 <shoot+0x66>
lea    0xdf2(%rip),%rdi
call   10b0 <perror@plt>
mov    $0x2,%edi
call   10c0 <exit@plt>
mov    0x2d8b(%rip),%rax
mov    (%rax),%edi
mov    0x2d9a(%rip),%rax
mov    (%rax),%esi
mov    0x2d69(%rip),%rax
mov    (%rax),%edx
call   10e0 <socket@plt>
mov    %eax,-0x64(%rbp)
cmpl   $0xffffffff,-0x64(%rbp)
jne    1269 <shoot+0xa9>
lea    0xdc0(%rip),%rdi
call   10b0 <perror@plt>
mov    $0x2,%edi
call   10c0 <exit@plt>
mov    0x2d70(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x30(%rbp)
mov    0x2d5a(%rip),%rax
mov    (%rax),%edi
call   1060 <htonl@plt>
mov    %eax,-0x20(%rbp)
mov    $0xffffb94d,%edi
call   1040 <htons@plt>
mov    %rax,-0x28(%rbp)
mov    -0x64(%rbp),%edi
lea    -0x30(%rbp),%rsi
mov    $0x18,%edx
call   10a0 <bind@plt>
cmp    $0xffffffff,%eax
jne    12c6 <shoot+0x106>
lea    0xd74(%rip),%rdi
call   10b0 <perror@plt>
mov    $0x2,%edi
call   10c0 <exit@plt>
lea    0xd66(%rip),%rdi
call   1090 <inet_addr@plt>
mov    %eax,-0x8(%rbp)
mov    $0x378,%edi
call   1040 <htons@plt>
mov    %rax,-0x10(%rbp)
mov    0x2cf6(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x70(%rbp),%edi
mov    0x2ced(%rip),%rax
mov    (%rax),%esi
mov    0x2cbc(%rip),%rax
mov    (%rax),%edx
lea    -0xd8(%rbp),%rcx
lea    -0xdc(%rbp),%r8
call   1080 <getsockopt@plt>
cmp    $0xffffffff,%eax
jne    1338 <shoot+0x178>
lea    0xd19(%rip),%rdi
call   10b0 <perror@plt>
mov    $0x1,%edi
call   10c0 <exit@plt>
mov    -0xd8(%rbp),%esi
lea    0xd03(%rip),%rdi
call   1050 <printf@plt>
movl   $0x0,-0x74(%rbp)
mov    -0x74(%rbp),%eax
cmp    -0xe0(%rbp),%eax
jg     13e3 <shoot+0x223>
mov    -0x70(%rbp),%eax
mov    %eax,-0xf4(%rbp)
mov    -0xe8(%rbp),%rax
mov    %rax,-0xf0(%rbp)
mov    -0xe8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0xf4(%rbp),%edi
mov    -0xf0(%rbp),%rsi
mov    %eax,%edx
lea    -0x18(%rbp),%r8
xor    %ecx,%ecx
mov    $0x18,%r9d
call   1070 <sendto@plt>
mov    %eax,-0x7c(%rbp)
mov    $0x186a0,%edi
call   10d0 <usleep@plt>
cmpl   $0xffffffff,-0x7c(%rbp)
jne    13d0 <shoot+0x210>
lea    0xc97(%rip),%rdi
call   10b0 <perror@plt>
mov    $0x1,%edi
call   10c0 <exit@plt>
jmp    13d5 <shoot+0x215>
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    1351 <shoot+0x191>
xor    %edi,%edi
call   10c0 <exit@plt>

x86 assembly (clang, -O2):
<shoot>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    0x2de6(%rip),%r15
mov    (%r15),%edi
mov    0x2df4(%rip),%r12
mov    (%r12),%esi
mov    0x2dc1(%rip),%rbx
mov    (%rbx),%edx
call   10e0 <socket@plt>
mov    %rax,%r14
cmp    $0xffffffff,%r14d
jne    1200 <shoot+0x40>
lea    0xe0b(%rip),%rdi
jmp    126c <shoot+0xac>
mov    (%r15),%edi
mov    (%r12),%esi
mov    (%rbx),%edx
call   10e0 <socket@plt>
mov    %rax,%rbx
cmp    $0xffffffff,%ebx
jne    121f <shoot+0x5f>
lea    0xdfd(%rip),%rdi
jmp    126c <shoot+0xac>
mov    0x2dba(%rip),%r15
mov    (%r15),%rax
mov    %rax,0x30(%rsp)
mov    0x2da3(%rip),%rax
mov    (%rax),%edi
call   1060 <htonl@plt>
mov    %eax,0x40(%rsp)
mov    $0xffffb94d,%edi
call   1040 <htons@plt>
mov    %rax,0x38(%rsp)
lea    0x30(%rsp),%rsi
mov    %ebx,%edi
mov    $0x18,%edx
call   10a0 <bind@plt>
cmp    $0xffffffff,%eax
jne    127b <shoot+0xbb>
lea    0xdbf(%rip),%rdi
call   10b0 <perror@plt>
mov    $0x2,%edi
call   10c0 <exit@plt>
lea    0xdb1(%rip),%rdi
call   1090 <inet_addr@plt>
mov    %eax,0x20(%rsp)
mov    $0x378,%edi
call   1040 <htons@plt>
mov    %rax,0x18(%rsp)
mov    (%r15),%rax
mov    %rax,0x10(%rsp)
mov    0x2d3f(%rip),%rax
mov    (%rax),%esi
mov    0x2d0e(%rip),%rax
mov    (%rax),%edx
lea    0xc(%rsp),%rcx
lea    0x2c(%rsp),%r8
mov    %r14d,%edi
call   1080 <getsockopt@plt>
cmp    $0xffffffff,%eax
jne    12d7 <shoot+0x117>
lea    0xd70(%rip),%rdi
jmp    13da <shoot+0x21a>
mov    0xc(%rsp),%esi
lea    0xd66(%rip),%rdi
call   1050 <printf@plt>
lea    0xd12(%rip),%rbx
mov    %rbx,%rdi
call   1030 <strlen@plt>
lea    0x10(%rsp),%r8
mov    %r14d,%edi
mov    %rbx,%rsi
mov    %eax,%edx
xor    %ecx,%ecx
mov    $0x18,%r9d
call   1070 <sendto@plt>
mov    %eax,%ebx
mov    $0x186a0,%edi
call   10d0 <usleep@plt>
cmp    $0xffffffff,%ebx
je     13d3 <shoot+0x213>
lea    0xcd4(%rip),%rbx
mov    %rbx,%rdi
call   1030 <strlen@plt>
lea    0x10(%rsp),%r8
mov    %r14d,%edi
mov    %rbx,%rsi
mov    %eax,%edx
xor    %ecx,%ecx
mov    $0x18,%r9d
call   1070 <sendto@plt>
mov    %eax,%ebx
mov    $0x186a0,%edi
call   10d0 <usleep@plt>
cmp    $0xffffffff,%ebx
je     13d3 <shoot+0x213>
lea    0xc9a(%rip),%rbx
mov    %rbx,%rdi
call   1030 <strlen@plt>
lea    0x10(%rsp),%r8
mov    %r14d,%edi
mov    %rbx,%rsi
mov    %eax,%edx
xor    %ecx,%ecx
mov    $0x18,%r9d
call   1070 <sendto@plt>
mov    %eax,%ebx
mov    $0x186a0,%edi
call   10d0 <usleep@plt>
cmp    $0xffffffff,%ebx
je     13d3 <shoot+0x213>
lea    0xc60(%rip),%rbx
mov    %rbx,%rdi
call   1030 <strlen@plt>
lea    0x10(%rsp),%r8
mov    %r14d,%edi
mov    %rbx,%rsi
mov    %eax,%edx
xor    %ecx,%ecx
mov    $0x18,%r9d
call   1070 <sendto@plt>
mov    %eax,%ebx
mov    $0x186a0,%edi
call   10d0 <usleep@plt>
cmp    $0xffffffff,%ebx
jne    13e9 <shoot+0x229>
lea    0xc7e(%rip),%rdi
call   10b0 <perror@plt>
mov    $0x1,%edi
call   10c0 <exit@plt>
xor    %edi,%edi
call   10c0 <exit@plt>

LLVM IR (-O0):
%struct.sockaddr_in = type { i8*, i8*, %struct.TYPE_2__ }
%struct.TYPE_2__ = type { i32 }
%struct.timeval = type { i32 }
%struct.timezone = type { i32 }
%struct.pollfd = type { i32 }
%struct.sockaddr = type { i32 }
@.str = [9 x i8] c"MiniTest\00"
@PF_INET = global i32 0
@SOCK_DGRAM = global i32 0
@IPPROTO_UDP = global i32 0
@.str.1 = [17 x i8] c"no client socket\00"
@.str.2 = [17 x i8] c"no server socket\00"
@AF_INET = global i8* null
@INADDR_ANY = global i32 0
@.str.3 = [8 x i8] c"no bind\00"
@.str.4 = [15 x i8] c"192.168.99.100\00"
@SOL_SOCKET = global i32 0
@SO_BSDCOMPAT = global i32 0
@.str.5 = [6 x i8] c"ERROR\00"
@.str.6 = [16 x i8] c"BSD compat: %d\0A\00"
@.str.7 = [13 x i8] c"send failure\00"
define void @shoot() {
%1 = alloca %struct.sockaddr_in
%2 = alloca %struct.sockaddr_in
%3 = alloca %struct.timeval
%4 = alloca %struct.timeval
%5 = alloca %struct.timeval
%6 = alloca %struct.timeval
%7 = alloca %struct.timezone
%8 = alloca %struct.pollfd
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca i8*
%24 = alloca i8*
%25 = alloca i8*
%26 = alloca i8*
%27 = alloca i32
%28 = alloca i32
%29 = alloca i32
%30 = alloca i32
%31 = alloca i32
%32 = alloca i32
%33 = alloca i32
%34 = alloca i32
%35 = alloca i32
%36 = alloca i32
%37 = alloca i8*
store i32 3, i32* %36
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8** %37
%38 = load i32, i32* @PF_INET
%39 = load i32, i32* @SOCK_DGRAM
%40 = load i32, i32* @IPPROTO_UDP
%41 = call i64 @socket(i32 %38, i32 %39, i32 %40)
%42 = trunc i64 %41 to i32
store i32 %42, i32* %12
%43 = load i32, i32* %12
%44 = icmp eq i32 %43, -1
br i1 %44, label %45, label %48
45: ; preds = %0
%46 = call i32 @perror(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%47 = call i32 @exit(i32 2)
unreachable
48: ; preds = %0
%49 = load i32, i32* @PF_INET
%50 = load i32, i32* @SOCK_DGRAM
%51 = load i32, i32* @IPPROTO_UDP
%52 = call i64 @socket(i32 %49, i32 %50, i32 %51)
%53 = trunc i64 %52 to i32
store i32 %53, i32* %9
%54 = load i32, i32* %9
%55 = icmp eq i32 %54, -1
br i1 %55, label %56, label %59
56: ; preds = %48
%57 = call i32 @perror(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
%58 = call i32 @exit(i32 2)
unreachable
59: ; preds = %48
%60 = load i8*, i8** @AF_INET
%61 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %2, i32 0, i32 0
store i8* %60, i8** %61
%62 = load i32, i32* @INADDR_ANY
%63 = call i32 @htonl(i32 %62)
%64 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %2, i32 0, i32 2
%65 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %64, i32 0, i32 0
store i32 %63, i32* %65
%66 = call i8* @htons(i16 signext -18099)
%67 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %2, i32 0, i32 1
store i8* %66, i8** %67
%68 = load i32, i32* %9
%69 = bitcast %struct.sockaddr_in* %2 to %struct.sockaddr*
%70 = call i32 @bind(i32 %68, %struct.sockaddr* %69, i32 24)
%71 = icmp eq i32 %70, -1
br i1 %71, label %72, label %75
72: ; preds = %59
%73 = call i32 @perror(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%74 = call i32 @exit(i32 2)
unreachable
75: ; preds = %59
%76 = call i32 @inet_addr(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0))
%77 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %1, i32 0, i32 2
%78 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %77, i32 0, i32 0
store i32 %76, i32* %78
%79 = call i8* @htons(i16 signext 888)
%80 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %1, i32 0, i32 1
store i8* %79, i8** %80
%81 = load i8*, i8** @AF_INET
%82 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %1, i32 0, i32 0
store i8* %81, i8** %82
%83 = load i32, i32* %12
%84 = load i32, i32* @SOL_SOCKET
%85 = load i32, i32* @SO_BSDCOMPAT
%86 = call i32 @getsockopt(i32 %83, i32 %84, i32 %85, i32* %34, i32* %35)
%87 = icmp eq i32 %86, -1
br i1 %87, label %88, label %91
88: ; preds = %75
%89 = call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
%90 = call i32 @exit(i32 1)
unreachable
91: ; preds = %75
%92 = load i32, i32* %34
%93 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.6, i64 0, i64 0), i32 %92)
store i32 0, i32* %13
br label %94
94: ; preds = %112, %91
%95 = load i32, i32* %13
%96 = load i32, i32* %36
%97 = icmp sle i32 %95, %96
br i1 %97, label %98, label %115
98: ; preds = %94
%99 = load i32, i32* %12
%100 = load i8*, i8** %37
%101 = load i8*, i8** %37
%102 = call i32 @strlen(i8* %101)
%103 = bitcast %struct.sockaddr_in* %1 to %struct.sockaddr*
%104 = call i32 @sendto(i32 %99, i8* %100, i32 %102, i32 0, %struct.sockaddr* %103, i32 24)
store i32 %104, i32* %15
%105 = call i32 @usleep(i32 100000)
%106 = load i32, i32* %15
%107 = icmp eq i32 %106, -1
br i1 %107, label %108, label %111
108: ; preds = %98
%109 = call i32 @perror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0))
%110 = call i32 @exit(i32 1)
unreachable
111: ; preds = %98
br label %112
112: ; preds = %111
%113 = load i32, i32* %13
%114 = add nsw i32 %113, 1
store i32 %114, i32* %13
br label %94
115: ; preds = %94
%116 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
%struct.sockaddr_in = type { i8*, i8*, %struct.TYPE_2__ }
%struct.TYPE_2__ = type { i32 }
%struct.sockaddr = type { i32 }
@.str = [9 x i8] c"MiniTest\00"
@PF_INET = global i32 0
@SOCK_DGRAM = global i32 0
@IPPROTO_UDP = global i32 0
@.str.1 = [17 x i8] c"no client socket\00"
@.str.2 = [17 x i8] c"no server socket\00"
@AF_INET = global i8* null
@INADDR_ANY = global i32 0
@.str.3 = [8 x i8] c"no bind\00"
@.str.4 = [15 x i8] c"192.168.99.100\00"
@SOL_SOCKET = global i32 0
@SO_BSDCOMPAT = global i32 0
@.str.5 = [6 x i8] c"ERROR\00"
@.str.6 = [16 x i8] c"BSD compat: %d\0A\00"
@.str.7 = [13 x i8] c"send failure\00"
define void @shoot() {
%1 = alloca %struct.sockaddr_in
%2 = alloca %struct.sockaddr_in
%3 = alloca i32
%4 = alloca i32
%5 = bitcast %struct.sockaddr_in* %1 to i8*
%6 = bitcast %struct.sockaddr_in* %2 to i8*
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = load i32, i32* @PF_INET
%10 = load i32, i32* @SOCK_DGRAM
%11 = load i32, i32* @IPPROTO_UDP
%12 = tail call i64 @socket(i32 %9, i32 %10, i32 %11)
%13 = trunc i64 %12 to i32
%14 = icmp eq i32 %13, -1
br i1 %14, label %15, label %18
15: ; preds = %0
%16 = tail call i32 @perror(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%17 = tail call i32 @exit(i32 2)
unreachable
18: ; preds = %0
%19 = load i32, i32* @PF_INET
%20 = load i32, i32* @SOCK_DGRAM
%21 = load i32, i32* @IPPROTO_UDP
%22 = tail call i64 @socket(i32 %19, i32 %20, i32 %21)
%23 = trunc i64 %22 to i32
%24 = icmp eq i32 %23, -1
br i1 %24, label %25, label %28
25: ; preds = %18
%26 = tail call i32 @perror(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
%27 = tail call i32 @exit(i32 2)
unreachable
28: ; preds = %18
%29 = load i8*, i8** @AF_INET
%30 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %2, i64 0, i32 0
store i8* %29, i8** %30
%31 = load i32, i32* @INADDR_ANY
%32 = tail call i32 @htonl(i32 %31)
%33 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %2, i64 0, i32 2, i32 0
store i32 %32, i32* %33
%34 = tail call i8* @htons(i16 signext -18099)
%35 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %2, i64 0, i32 1
store i8* %34, i8** %35
%36 = bitcast %struct.sockaddr_in* %2 to %struct.sockaddr*
%37 = call i32 @bind(i32 %23, %struct.sockaddr* %36, i32 24)
%38 = icmp eq i32 %37, -1
br i1 %38, label %39, label %42
39: ; preds = %28
%40 = call i32 @perror(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%41 = call i32 @exit(i32 2)
unreachable
42: ; preds = %28
%43 = call i32 @inet_addr(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0))
%44 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %1, i64 0, i32 2, i32 0
store i32 %43, i32* %44
%45 = call i8* @htons(i16 signext 888)
%46 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %1, i64 0, i32 1
store i8* %45, i8** %46
%47 = load i8*, i8** @AF_INET
%48 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %1, i64 0, i32 0
store i8* %47, i8** %48
%49 = load i32, i32* @SOL_SOCKET
%50 = load i32, i32* @SO_BSDCOMPAT
%51 = call i32 @getsockopt(i32 %13, i32 %49, i32 %50, i32* %3, i32* %4)
%52 = icmp eq i32 %51, -1
br i1 %52, label %53, label %56
53: ; preds = %42
%54 = call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
%55 = call i32 @exit(i32 1)
unreachable
56: ; preds = %42
%57 = load i32, i32* %3
%58 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.6, i64 0, i64 0), i32 %57)
%59 = bitcast %struct.sockaddr_in* %1 to %struct.sockaddr*
%60 = call i32 @strlen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%61 = call i32 @sendto(i32 %13, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %60, i32 0, %struct.sockaddr* %59, i32 24)
%62 = call i32 @usleep(i32 100000)
%63 = icmp eq i32 %61, -1
br i1 %63, label %81, label %64
64: ; preds = %56
%65 = call i32 @strlen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%66 = call i32 @sendto(i32 %13, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %65, i32 0, %struct.sockaddr* %59, i32 24)
%67 = call i32 @usleep(i32 100000)
%68 = icmp eq i32 %66, -1
br i1 %68, label %81, label %69
69: ; preds = %64
%70 = call i32 @strlen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%71 = call i32 @sendto(i32 %13, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %70, i32 0, %struct.sockaddr* %59, i32 24)
%72 = call i32 @usleep(i32 100000)
%73 = icmp eq i32 %71, -1
br i1 %73, label %81, label %74
74: ; preds = %69
%75 = call i32 @strlen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%76 = call i32 @sendto(i32 %13, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %75, i32 0, %struct.sockaddr* %59, i32 24)
%77 = call i32 @usleep(i32 100000)
%78 = icmp eq i32 %76, -1
br i1 %78, label %81, label %79
79: ; preds = %74
%80 = call i32 @exit(i32 0)
unreachable
81: ; preds = %74, %69, %64, %56
%82 = call i32 @perror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0))
%83 = call i32 @exit(i32 1)
unreachable
}