#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 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*/ portstr;
typedef int /*<<< orphan*/ hints;

/* Variables and functions */
int /*<<< orphan*/ AF_UNSPEC;
scalar_t__ EINPROGRESS;
int /*<<< orphan*/ SOCK_STREAM;
scalar_t__ anetNonBlock(char *, int);
int /*<<< orphan*/ anetSetError(char *, char *, int /*<<< orphan*/);
int anetSetReuseAddr(char *, int);
int /*<<< orphan*/ close(int);
int connect(int, int /*<<< orphan*/, int /*<<< orphan*/);
scalar_t__ errno;
int /*<<< orphan*/ freeaddrinfo(struct addrinfo *);
int /*<<< orphan*/ gai_strerror(int);
int getaddrinfo(char *, char *, struct addrinfo *, struct addrinfo **);
int /*<<< orphan*/ memset(struct addrinfo *, int /*<<< orphan*/, int);
int /*<<< orphan*/ snprintf(char *, int, char *, int);
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ strerror(scalar_t__);
int anetTcpGenericConnect(char *err, char *addr, int port, int flags) {
  int s = -1, rv;
  char portstr[6];
  struct addrinfo hints, *servinfo, *p;
  snprintf(portstr, sizeof(portstr), "%d", port);
  memset(&hints, 0, sizeof(hints));
  hints.ai_family = AF_UNSPEC;
  hints.ai_socktype = SOCK_STREAM;
  if ((rv = getaddrinfo(addr, portstr, &hints, &servinfo)) != 0) {
    anetSetError(err, "%s", gai_strerror(rv));
    return -1;
  }
  for (p = servinfo; p != NULL; p = p->ai_next) {
    if ((s = socket(p->ai_family, p->ai_socktype, p->ai_protocol)) == -1)
      continue;
    if (anetSetReuseAddr(err, s) == -1)
      goto error;
    if (flags & 1 && anetNonBlock(err, s) != 0)
      goto error;
    if (connect(s, p->ai_addr, p->ai_addrlen) == -1) {
      if (errno == EINPROGRESS && flags & 1)
        goto end;
      close(s);
      s = -1;
      continue;
    }
    goto end;
  }
  if (p == NULL)
    anetSetError(err, "creating socket: %s", strerror(errno));
error:
  if (s != -1) {
    close(s);
    s = -1;
  }
end:
  freeaddrinfo(servinfo);
  return s;
}


x86 assembly (clang, -O0):
<anetTcpGenericConnect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    %ecx,-0x20(%rbp)
movl   $0xffffffff,-0x24(%rbp)
lea    -0x2e(%rbp),%rdi
mov    -0x1c(%rbp),%ecx
mov    $0x6,%esi
lea    0xe10(%rip),%rdx
call   1040 <snprintf@plt>
lea    -0x50(%rbp),%rdi
xor    %esi,%esi
mov    $0x20,%edx
call   1060 <memset@plt>
mov    0x2dd4(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x40(%rbp)
mov    0x2db8(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x44(%rbp)
mov    -0x18(%rbp),%rdi
lea    -0x2e(%rbp),%rsi
lea    -0x50(%rbp),%rdx
lea    -0x58(%rbp),%rcx
call   10b0 <getaddrinfo@plt>
mov    %eax,-0x28(%rbp)
cmp    $0x0,%eax
je     126c <anetTcpGenericConnect+0xac>
mov    -0x10(%rbp),%rax
mov    %rax,-0x68(%rbp)
mov    -0x28(%rbp),%edi
call   1050 <gai_strerror@plt>
mov    -0x68(%rbp),%rdi
mov    %eax,%edx
lea    0xdb9(%rip),%rsi
call   1080 <anetSetError@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    13ca <anetTcpGenericConnect+0x20a>
mov    -0x58(%rbp),%rax
mov    %rax,-0x60(%rbp)
cmpq   $0x0,-0x60(%rbp)
je     1364 <anetTcpGenericConnect+0x1a4>
mov    -0x60(%rbp),%rax
mov    0x10(%rax),%edi
mov    -0x60(%rbp),%rax
mov    0xc(%rax),%esi
mov    -0x60(%rbp),%rax
mov    0x8(%rax),%edx
call   10e0 <socket@plt>
mov    %eax,-0x24(%rbp)
cmp    $0xffffffff,%eax
jne    12aa <anetTcpGenericConnect+0xea>
jmp    1353 <anetTcpGenericConnect+0x193>
mov    -0x10(%rbp),%rdi
mov    -0x24(%rbp),%esi
call   1090 <anetSetReuseAddr@plt>
cmp    $0xffffffff,%eax
jne    12c4 <anetTcpGenericConnect+0x104>
jmp    139d <anetTcpGenericConnect+0x1dd>
mov    -0x20(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     12ee <anetTcpGenericConnect+0x12e>
mov    -0x10(%rbp),%rdi
mov    -0x24(%rbp),%esi
call   1030 <anetNonBlock@plt>
cmp    $0x0,%rax
je     12ee <anetTcpGenericConnect+0x12e>
jmp    139d <anetTcpGenericConnect+0x1dd>
mov    -0x24(%rbp),%edi
mov    -0x60(%rbp),%rax
mov    0x4(%rax),%esi
mov    -0x60(%rbp),%rax
mov    (%rax),%edx
call   10a0 <connect@plt>
cmp    $0xffffffff,%eax
jne    134e <anetTcpGenericConnect+0x18e>
mov    0x2cb5(%rip),%rax
mov    (%rax),%rax
mov    0x2ccb(%rip),%rcx
cmp    (%rcx),%rax
jne    133a <anetTcpGenericConnect+0x17a>
mov    -0x20(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     133a <anetTcpGenericConnect+0x17a>
jmp    13bb <anetTcpGenericConnect+0x1fb>
mov    -0x24(%rbp),%edi
call   1070 <close@plt>
movl   $0xffffffff,-0x24(%rbp)
jmp    1353 <anetTcpGenericConnect+0x193>
jmp    13bb <anetTcpGenericConnect+0x1fb>
mov    -0x60(%rbp),%rax
mov    0x18(%rax),%rax
mov    %rax,-0x60(%rbp)
jmp    1274 <anetTcpGenericConnect+0xb4>
cmpq   $0x0,-0x60(%rbp)
jne    1398 <anetTcpGenericConnect+0x1d8>
mov    -0x10(%rbp),%rax
mov    %rax,-0x70(%rbp)
mov    0x2c4a(%rip),%rax
mov    (%rax),%rdi
call   10c0 <strerror@plt>
mov    -0x70(%rbp),%rdi
mov    %eax,%edx
lea    0xc70(%rip),%rsi
call   1080 <anetSetError@plt>
jmp    139d <anetTcpGenericConnect+0x1dd>
cmpl   $0xffffffff,-0x24(%rbp)
je     13b6 <anetTcpGenericConnect+0x1f6>
mov    -0x24(%rbp),%edi
call   1070 <close@plt>
movl   $0xffffffff,-0x24(%rbp)
jmp    13bb <anetTcpGenericConnect+0x1fb>
mov    -0x58(%rbp),%rdi
call   10d0 <freeaddrinfo@plt>
mov    -0x24(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<anetTcpGenericConnect>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %ecx,%r15d
mov    %edx,%ecx
mov    %rsi,%rbx
mov    %rdi,%r14
lea    0xe20(%rip),%rdx
lea    0x12(%rsp),%r12
mov    %r12,%rdi
mov    $0x6,%esi
call   1040 <snprintf@plt>
lea    0x18(%rsp),%rbp
mov    %rbp,%rdi
xor    %esi,%esi
mov    $0x20,%edx
call   1060 <memset@plt>
mov    0x2dd3(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x28(%rsp)
mov    0x2db6(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x24(%rsp)
lea    0x8(%rsp),%rcx
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %rbp,%rdx
call   10b0 <getaddrinfo@plt>
test   %eax,%eax
je     1259 <anetTcpGenericConnect+0x99>
mov    %eax,%edi
call   1050 <gai_strerror@plt>
lea    0xdcf(%rip),%rsi
mov    %r14,%rdi
mov    %eax,%edx
call   1080 <anetSetError@plt>
mov    $0xffffffff,%ebx
jmp    1325 <anetTcpGenericConnect+0x165>
mov    0x8(%rsp),%rbp
test   %rbp,%rbp
je     12ed <anetTcpGenericConnect+0x12d>
mov    0x2d5a(%rip),%r12
mov    0x2d73(%rip),%r13
jmp    1290 <anetTcpGenericConnect+0xd0>
nopw   0x0(%rax,%rax,1)
mov    %ebx,%edi
call   1070 <close@plt>
mov    0x18(%rbp),%rbp
test   %rbp,%rbp
je     12ed <anetTcpGenericConnect+0x12d>
mov    0x10(%rbp),%edi
mov    0x8(%rbp),%edx
mov    0xc(%rbp),%esi
call   10e0 <socket@plt>
cmp    $0xffffffff,%eax
je     1287 <anetTcpGenericConnect+0xc7>
mov    %eax,%ebx
mov    %r14,%rdi
mov    %eax,%esi
call   1090 <anetSetReuseAddr@plt>
cmp    $0xffffffff,%eax
je     130f <anetTcpGenericConnect+0x14f>
test   $0x1,%r15b
je     12c9 <anetTcpGenericConnect+0x109>
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <anetNonBlock@plt>
test   %rax,%rax
jne    130f <anetTcpGenericConnect+0x14f>
mov    0x0(%rbp),%edx
mov    0x4(%rbp),%esi
mov    %ebx,%edi
call   10a0 <connect@plt>
cmp    $0xffffffff,%eax
jne    131b <anetTcpGenericConnect+0x15b>
test   $0x1,%r15b
je     1280 <anetTcpGenericConnect+0xc0>
mov    0x0(%r13),%rax
cmp    %rax,(%r12)
jne    1280 <anetTcpGenericConnect+0xc0>
jmp    131b <anetTcpGenericConnect+0x15b>
mov    0x2cd4(%rip),%rax
mov    (%rax),%rdi
call   10c0 <strerror@plt>
lea    0xd00(%rip),%rsi
mov    %r14,%rdi
mov    %eax,%edx
call   1080 <anetSetError@plt>
jmp    1316 <anetTcpGenericConnect+0x156>
mov    %ebx,%edi
call   1070 <close@plt>
mov    $0xffffffff,%ebx
mov    0x8(%rsp),%rdi
call   10d0 <freeaddrinfo@plt>
mov    %ebx,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.addrinfo = type { i32, i32, i32, i32, i32, %struct.addrinfo* }
@.str = [3 x i8] c"%d\00"
@AF_UNSPEC = global i32 0
@SOCK_STREAM = global i32 0
@.str.1 = [3 x i8] c"%s\00"
@errno = global i64 0
@EINPROGRESS = global i64 0
@.str.2 = [20 x i8] c"creating socket: %s\00"
define i32 @anetTcpGenericConnect(i8* %0, i8* %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca [6 x i8]
%13 = alloca %struct.addrinfo
%14 = alloca %struct.addrinfo*
%15 = alloca %struct.addrinfo*
store i8* %0, i8** %6
store i8* %1, i8** %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 -1, i32* %10
%16 = getelementptr inbounds [6 x i8], [6 x i8]* %12, i64 0, i64 0
%17 = load i32, i32* %8
%18 = call i32 @snprintf(i8* %16, i32 6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %17)
%19 = call i32 @memset(%struct.addrinfo* %13, i32 0, i32 32)
%20 = load i32, i32* @AF_UNSPEC
%21 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %13, i32 0, i32 4
store i32 %20, i32* %21
%22 = load i32, i32* @SOCK_STREAM
%23 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %13, i32 0, i32 3
store i32 %22, i32* %23
%24 = load i8*, i8** %7
%25 = getelementptr inbounds [6 x i8], [6 x i8]* %12, i64 0, i64 0
%26 = call i32 @getaddrinfo(i8* %24, i8* %25, %struct.addrinfo* %13, %struct.addrinfo** %14)
store i32 %26, i32* %11
%27 = icmp ne i32 %26, 0
br i1 %27, label %28, label %33
28: ; preds = %4
%29 = load i8*, i8** %6
%30 = load i32, i32* %11
%31 = call i32 @gai_strerror(i32 %30)
%32 = call i32 @anetSetError(i8* %29, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %31)
store i32 -1, i32* %5
br label %114
33: ; preds = %4
%34 = load %struct.addrinfo*, %struct.addrinfo** %14
store %struct.addrinfo* %34, %struct.addrinfo** %15
br label %35
35: ; preds = %90, %33
%36 = load %struct.addrinfo*, %struct.addrinfo** %15
%37 = icmp ne %struct.addrinfo* %36, null
br i1 %37, label %38, label %94
38: ; preds = %35
%39 = load %struct.addrinfo*, %struct.addrinfo** %15
%40 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %39, i32 0, i32 4
%41 = load i32, i32* %40
%42 = load %struct.addrinfo*, %struct.addrinfo** %15
%43 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %42, i32 0, i32 3
%44 = load i32, i32* %43
%45 = load %struct.addrinfo*, %struct.addrinfo** %15
%46 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %45, i32 0, i32 2
%47 = load i32, i32* %46
%48 = call i32 @socket(i32 %41, i32 %44, i32 %47)
store i32 %48, i32* %10
%49 = icmp eq i32 %48, -1
br i1 %49, label %50, label %51
50: ; preds = %38
br label %90
51: ; preds = %38
%52 = load i8*, i8** %6
%53 = load i32, i32* %10
%54 = call i32 @anetSetReuseAddr(i8* %52, i32 %53)
%55 = icmp eq i32 %54, -1
br i1 %55, label %56, label %57
56: ; preds = %51
br label %103
57: ; preds = %51
%58 = load i32, i32* %9
%59 = and i32 %58, 1
%60 = icmp ne i32 %59, 0
br i1 %60, label %61, label %67
61: ; preds = %57
%62 = load i8*, i8** %6
%63 = load i32, i32* %10
%64 = call i64 @anetNonBlock(i8* %62, i32 %63)
%65 = icmp ne i64 %64, 0
br i1 %65, label %66, label %67
66: ; preds = %61
br label %103
67: ; preds = %61, %57
%68 = load i32, i32* %10
%69 = load %struct.addrinfo*, %struct.addrinfo** %15
%70 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %69, i32 0, i32 1
%71 = load i32, i32* %70
%72 = load %struct.addrinfo*, %struct.addrinfo** %15
%73 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %72, i32 0, i32 0
%74 = load i32, i32* %73
%75 = call i32 @connect(i32 %68, i32 %71, i32 %74)
%76 = icmp eq i32 %75, -1
br i1 %76, label %77, label %89
77: ; preds = %67
%78 = load i64, i64* @errno
%79 = load i64, i64* @EINPROGRESS
%80 = icmp eq i64 %78, %79
br i1 %80, label %81, label %86
81: ; preds = %77
%82 = load i32, i32* %9
%83 = and i32 %82, 1
%84 = icmp ne i32 %83, 0
br i1 %84, label %85, label %86
85: ; preds = %81
br label %110
86: ; preds = %81, %77
%87 = load i32, i32* %10
%88 = call i32 @close(i32 %87)
store i32 -1, i32* %10
br label %90
89: ; preds = %67
br label %110
90: ; preds = %86, %50
%91 = load %struct.addrinfo*, %struct.addrinfo** %15
%92 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %91, i32 0, i32 5
%93 = load %struct.addrinfo*, %struct.addrinfo** %92
store %struct.addrinfo* %93, %struct.addrinfo** %15
br label %35
94: ; preds = %35
%95 = load %struct.addrinfo*, %struct.addrinfo** %15
%96 = icmp eq %struct.addrinfo* %95, null
br i1 %96, label %97, label %102
97: ; preds = %94
%98 = load i8*, i8** %6
%99 = load i64, i64* @errno
%100 = call i32 @strerror(i64 %99)
%101 = call i32 @anetSetError(i8* %98, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i32 %100)
br label %102
102: ; preds = %97, %94
br label %103
103: ; preds = %102, %66, %56
%104 = load i32, i32* %10
%105 = icmp ne i32 %104, -1
br i1 %105, label %106, label %109
106: ; preds = %103
%107 = load i32, i32* %10
%108 = call i32 @close(i32 %107)
store i32 -1, i32* %10
br label %109
109: ; preds = %106, %103
br label %110
110: ; preds = %109, %89, %85
%111 = load %struct.addrinfo*, %struct.addrinfo** %14
%112 = call i32 @freeaddrinfo(%struct.addrinfo* %111)
%113 = load i32, i32* %10
store i32 %113, i32* %5
br label %114
114: ; preds = %110, %28
%115 = load i32, i32* %5
ret i32 %115
}

LLVM IR (-O2):
%struct.addrinfo = type { i32, i32, i32, i32, i32, %struct.addrinfo* }
@.str = [3 x i8] c"%d\00"
@AF_UNSPEC = global i32 0
@SOCK_STREAM = global i32 0
@.str.1 = [3 x i8] c"%s\00"
@errno = global i64 0
@EINPROGRESS = global i64 0
@.str.2 = [20 x i8] c"creating socket: %s\00"
define i32 @anetTcpGenericConnect(i8* %0, i8* %1, i32 %2, i32 %3) {
%5 = alloca [6 x i8]
%6 = alloca %struct.addrinfo
%7 = alloca %struct.addrinfo*
%8 = getelementptr inbounds [6 x i8], [6 x i8]* %5, i64 0, i64 0
%9 = bitcast %struct.addrinfo* %6 to i8*
%10 = bitcast %struct.addrinfo** %7 to i8*
%11 = call i32 @snprintf(i8* %8, i32 6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %2)
%12 = call i32 @memset(%struct.addrinfo* %6, i32 0, i32 32)
%13 = load i32, i32* @AF_UNSPEC
%14 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %6, i64 0, i32 4
store i32 %13, i32* %14
%15 = load i32, i32* @SOCK_STREAM
%16 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %6, i64 0, i32 3
store i32 %15, i32* %16
%17 = call i32 @getaddrinfo(i8* %1, i8* %8, %struct.addrinfo* %6, %struct.addrinfo** %7)
%18 = icmp eq i32 %17, 0
br i1 %18, label %19, label %25
19: ; preds = %4
%20 = load %struct.addrinfo*, %struct.addrinfo** %7
%21 = icmp eq %struct.addrinfo* %20, null
br i1 %21, label %63, label %22
22: ; preds = %19
%23 = and i32 %3, 1
%24 = icmp eq i32 %23, 0
br label %28
25: ; preds = %4
%26 = call i32 @gai_strerror(i32 %17)
%27 = call i32 @anetSetError(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %26)
br label %73
28: ; preds = %22, %59
%29 = phi %struct.addrinfo* [ %20, %22 ], [ %61, %59 ]
%30 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %29, i64 0, i32 4
%31 = load i32, i32* %30
%32 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %29, i64 0, i32 3
%33 = load i32, i32* %32
%34 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %29, i64 0, i32 2
%35 = load i32, i32* %34
%36 = call i32 @socket(i32 %31, i32 %33, i32 %35)
%37 = icmp eq i32 %36, -1
br i1 %37, label %59, label %38
38: ; preds = %28
%39 = call i32 @anetSetReuseAddr(i8* %0, i32 %36)
%40 = icmp eq i32 %39, -1
br i1 %40, label %67, label %41
41: ; preds = %38
br i1 %24, label %45, label %42
42: ; preds = %41
%43 = call i64 @anetNonBlock(i8* %0, i32 %36)
%44 = icmp eq i64 %43, 0
br i1 %44, label %45, label %67
45: ; preds = %42, %41
%46 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %29, i64 0, i32 1
%47 = load i32, i32* %46
%48 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %29, i64 0, i32 0
%49 = load i32, i32* %48
%50 = call i32 @connect(i32 %36, i32 %47, i32 %49)
%51 = icmp eq i32 %50, -1
br i1 %51, label %52, label %69
52: ; preds = %45
%53 = load i64, i64* @errno
%54 = load i64, i64* @EINPROGRESS
%55 = icmp ne i64 %53, %54
%56 = or i1 %24, %55
br i1 %56, label %57, label %69
57: ; preds = %52
%58 = call i32 @close(i32 %36)
br label %59
59: ; preds = %28, %57
%60 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %29, i64 0, i32 5
%61 = load %struct.addrinfo*, %struct.addrinfo** %60
%62 = icmp eq %struct.addrinfo* %61, null
br i1 %62, label %63, label %28
63: ; preds = %59, %19
%64 = load i64, i64* @errno
%65 = call i32 @strerror(i64 %64)
%66 = call i32 @anetSetError(i8* %0, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i32 %65)
br label %69
67: ; preds = %38, %42
%68 = call i32 @close(i32 %36)
br label %69
69: ; preds = %52, %45, %63, %67
%70 = phi i32 [ -1, %67 ], [ -1, %63 ], [ %36, %45 ], [ %36, %52 ]
%71 = load %struct.addrinfo*, %struct.addrinfo** %7
%72 = call i32 @freeaddrinfo(%struct.addrinfo* %71)
br label %73
73: ; preds = %69, %25
%74 = phi i32 [ -1, %25 ], [ %70, %69 ]
ret i32 %74
}