#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_in6 {
  int /*<<< orphan*/ sin6_addr;
};
struct sockaddr_in {
  int /*<<< orphan*/ sin_addr;
};
struct addrinfo {
  scalar_t__ ai_family;
  scalar_t__ ai_addr;
  struct addrinfo *ai_next;
  int /*<<< orphan*/ ai_socktype;
};
typedef int /*<<< orphan*/ hints;

/* Variables and functions */
scalar_t__ AF_INET;
scalar_t__ AF_INET6;
scalar_t__ AF_UNSPEC;
int /*<<< orphan*/ EXIT_FAILURE;
int INET6_ADDRSTRLEN;
int /*<<< orphan*/ SOCK_STREAM;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ freeaddrinfo(struct addrinfo *);
char *gai_strerror(int);
int getaddrinfo(char const *, char const *, struct addrinfo *,
                struct addrinfo **);
int /*<<< orphan*/ inet_ntop(scalar_t__, void *, char *, int);
int /*<<< orphan*/ memset(struct addrinfo *, int /*<<< orphan*/, int);
int /*<<< orphan*/ printf(char *, char *, ...);
int /*<<< orphan*/ stderr;
int main(int argc, const char *argv[]) {
  int status;
  struct addrinfo hints, *servinfo, *p;
  char ipster[INET6_ADDRSTRLEN];
  const char *port = argc >= 3 ? argv[2] : "80";
  const char *address = argv[1];
  if (argc < 2) {
    fprintf(stderr, "Usage: ipsub [IP or Domain] (Optional: Port)\n");
    exit(EXIT_FAILURE);
  }
  memset(&hints, 0, sizeof(hints));
  hints.ai_family = AF_UNSPEC;
  hints.ai_socktype = SOCK_STREAM;
  if ((status = getaddrinfo(address, port, &hints, &servinfo)) != 0) {
    printf("IP Lookup error: %s", gai_strerror(status));
  }
  for (p = servinfo; p != NULL; p = p->ai_next) {
    char *ipVersion = NULL;
    void *addr = NULL;
    if (p->ai_family == AF_INET) {
      struct sockaddr_in *ipv4 = (struct sockaddr_in *)p->ai_addr;
      addr = &(ipv4->sin_addr);
      ipVersion = "IP V4";
    }
    if (p->ai_family == AF_INET6) {
      struct sockaddr_in6 *ipv6 = (struct sockaddr_in6 *)p->ai_addr;
      addr = &(ipv6->sin6_addr);
      ipVersion = "IP V6";
    }
    inet_ntop(p->ai_family, addr, ipster, sizeof ipster);
    printf("%s: %s\n", ipVersion, ipster);
  }
  freeaddrinfo(servinfo);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e48(%rip),%rax
mov    (%rax),%eax
mov    %rax,-0x98(%rbp)
mov    %rsp,%rcx
mov    %rcx,-0x50(%rbp)
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x90(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x58(%rbp)
cmpl   $0x3,-0x8(%rbp)
jl     11ed <main+0x6d>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0xa0(%rbp)
jmp    1200 <main+0x80>
lea    0xe0c(%rip),%rax
mov    %rax,-0xa0(%rbp)
jmp    1200 <main+0x80>
mov    -0xa0(%rbp),%rax
mov    %rax,-0x60(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x68(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    1244 <main+0xc4>
mov    0x2d98(%rip),%rax
mov    (%rax),%edi
lea    0xdd2(%rip),%rsi
call   1070 <fprintf@plt>
mov    0x2d73(%rip),%rax
mov    (%rax),%edi
call   1080 <exit@plt>
lea    -0x38(%rbp),%rdi
xor    %esi,%esi
mov    $0x20,%edx
call   1060 <memset@plt>
mov    0x2d7d(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x38(%rbp)
mov    0x2d4f(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x20(%rbp)
mov    -0x68(%rbp),%rdi
mov    -0x60(%rbp),%rsi
lea    -0x38(%rbp),%rdx
lea    -0x40(%rbp),%rcx
call   1090 <getaddrinfo@plt>
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
je     12a8 <main+0x128>
mov    -0x14(%rbp),%edi
call   1050 <gai_strerror@plt>
mov    %rax,%rsi
lea    0xd90(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x40(%rbp),%rax
mov    %rax,-0x48(%rbp)
cmpq   $0x0,-0x48(%rbp)
je     1387 <main+0x207>
movq   $0x0,-0x70(%rbp)
movq   $0x0,-0x78(%rbp)
mov    -0x48(%rbp),%rax
mov    (%rax),%rax
mov    0x2d07(%rip),%rcx
cmp    (%rcx),%rax
jne    1301 <main+0x181>
mov    -0x48(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x80(%rbp)
mov    -0x80(%rbp),%rax
mov    %rax,-0x78(%rbp)
lea    0xd48(%rip),%rax
mov    %rax,-0x70(%rbp)
mov    -0x48(%rbp),%rax
mov    (%rax),%rax
mov    0x2cc1(%rip),%rcx
cmp    (%rcx),%rax
jne    133d <main+0x1bd>
mov    -0x48(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x88(%rbp)
mov    -0x88(%rbp),%rax
mov    %rax,-0x78(%rbp)
lea    0xd12(%rip),%rax
mov    %rax,-0x70(%rbp)
mov    -0x90(%rbp),%rdx
mov    -0x98(%rbp),%rax
mov    -0x48(%rbp),%rcx
mov    (%rcx),%rdi
mov    -0x78(%rbp),%rsi
mov    %eax,%ecx
call   1030 <inet_ntop@plt>
mov    -0x90(%rbp),%rdx
mov    -0x70(%rbp),%rsi
lea    0xce2(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x48(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x48(%rbp)
jmp    12b0 <main+0x130>
mov    -0x40(%rbp),%rdi
call   10a0 <freeaddrinfo@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x50(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %rsp,%rcx
mov    0x2e4d(%rip),%rax
mov    (%rax),%r14d
mov    %rsp,%r12
lea    0xf(%r14),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r12
mov    %r12,%rsp
cmp    $0x3,%edi
mov    %rcx,-0x38(%rbp)
jl     11be <main+0x3e>
mov    0x10(%rsi),%r15
jmp    11ce <main+0x4e>
cmp    $0x2,%edi
jne    12c0 <main+0x140>
lea    0xe32(%rip),%r15
mov    0x8(%rsi),%rbx
lea    -0x58(%rbp),%r13
mov    %r13,%rdi
xor    %esi,%esi
mov    $0x20,%edx
call   1060 <memset@plt>
mov    0x2dec(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x58(%rbp)
mov    0x2dbe(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x40(%rbp)
lea    -0x30(%rbp),%rcx
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r13,%rdx
call   1090 <getaddrinfo@plt>
test   %eax,%eax
je     122d <main+0xad>
mov    %eax,%edi
call   1050 <gai_strerror@plt>
lea    0xe0e(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    -0x30(%rbp),%rbx
test   %rbx,%rbx
je     12a4 <main+0x124>
lea    0xe14(%rip),%r15
jmp    1264 <main+0xe4>
nop
mov    %r12,%rdx
mov    %r14d,%ecx
call   1030 <inet_ntop@plt>
mov    %r15,%rdi
mov    %r13,%rsi
mov    %r12,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x10(%rbx),%rbx
test   %rbx,%rbx
je     129e <main+0x11e>
mov    (%rbx),%rdi
mov    0x2d72(%rip),%rax
cmp    (%rax),%rdi
jne    1280 <main+0x100>
mov    0x8(%rbx),%rsi
lea    0xdc7(%rip),%r13
jmp    1285 <main+0x105>
xor    %r13d,%r13d
xor    %esi,%esi
mov    0x2d44(%rip),%rax
cmp    (%rax),%rdi
jne    1240 <main+0xc0>
mov    0x8(%rbx),%rsi
lea    0xdaf(%rip),%r13
jmp    1240 <main+0xc0>
mov    -0x30(%rbp),%rdi
jmp    12a6 <main+0x126>
xor    %edi,%edi
call   10a0 <freeaddrinfo@plt>
mov    -0x38(%rbp),%rsp
xor    %eax,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2cf9(%rip),%rax
mov    (%rax),%edi
lea    0xd33(%rip),%rsi
call   1070 <fprintf@plt>
mov    0x2cd4(%rip),%rax
mov    (%rax),%edi
call   1080 <exit@plt>

LLVM IR (-O0):
%struct.addrinfo = type { i64, i64, %struct.addrinfo*, i32 }
%struct.sockaddr_in = type { i32 }
%struct.sockaddr_in6 = type { i32 }
@INET6_ADDRSTRLEN = global i32 0
@.str = [3 x i8] c"80\00"
@stderr = global i32 0
@.str.1 = [46 x i8] c"Usage: ipsub [IP or Domain] (Optional: Port)\0A\00"
@EXIT_FAILURE = global i32 0
@AF_UNSPEC = global i64 0
@SOCK_STREAM = global i32 0
@.str.2 = [20 x i8] c"IP Lookup error: %s\00"
@AF_INET = global i64 0
@.str.3 = [6 x i8] c"IP V4\00"
@AF_INET6 = global i64 0
@.str.4 = [6 x i8] c"IP V6\00"
@.str.5 = [8 x i8] c"%s: %s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca %struct.addrinfo
%8 = alloca %struct.addrinfo*
%9 = alloca %struct.addrinfo*
%10 = alloca i8*
%11 = alloca i64
%12 = alloca i8*
%13 = alloca i8*
%14 = alloca i8*
%15 = alloca i8*
%16 = alloca %struct.sockaddr_in*
%17 = alloca %struct.sockaddr_in6*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%18 = load i32, i32* @INET6_ADDRSTRLEN
%19 = zext i32 %18 to i64
%20 = call i8* @llvm.stacksave()
store i8* %20, i8** %10
%21 = alloca i8, i64 %19
store i64 %19, i64* %11
%22 = load i32, i32* %4
%23 = icmp sge i32 %22, 3
br i1 %23, label %24, label %28
24: ; preds = %2
%25 = load i8**, i8*** %5
%26 = getelementptr inbounds i8*, i8** %25, i64 2
%27 = load i8*, i8** %26
br label %29
28: ; preds = %2
br label %29
29: ; preds = %28, %24
%30 = phi i8* [ %27, %24 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), %28 ]
store i8* %30, i8** %12
%31 = load i8**, i8*** %5
%32 = getelementptr inbounds i8*, i8** %31, i64 1
%33 = load i8*, i8** %32
store i8* %33, i8** %13
%34 = load i32, i32* %4
%35 = icmp slt i32 %34, 2
br i1 %35, label %36, label %41
36: ; preds = %29
%37 = load i32, i32* @stderr
%38 = call i32 @fprintf(i32 %37, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i64 0, i64 0))
%39 = load i32, i32* @EXIT_FAILURE
%40 = call i32 @exit(i32 %39)
unreachable
41: ; preds = %29
%42 = call i32 @memset(%struct.addrinfo* %7, i32 0, i32 32)
%43 = load i64, i64* @AF_UNSPEC
%44 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %7, i32 0, i32 0
store i64 %43, i64* %44
%45 = load i32, i32* @SOCK_STREAM
%46 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %7, i32 0, i32 3
store i32 %45, i32* %46
%47 = load i8*, i8** %13
%48 = load i8*, i8** %12
%49 = call i32 @getaddrinfo(i8* %47, i8* %48, %struct.addrinfo* %7, %struct.addrinfo** %8)
store i32 %49, i32* %6
%50 = icmp ne i32 %49, 0
br i1 %50, label %51, label %55
51: ; preds = %41
%52 = load i32, i32* %6
%53 = call i8* @gai_strerror(i32 %52)
%54 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i8* %53)
br label %55
55: ; preds = %51, %41
%56 = load %struct.addrinfo*, %struct.addrinfo** %8
store %struct.addrinfo* %56, %struct.addrinfo** %9
br label %57
57: ; preds = %97, %55
%58 = load %struct.addrinfo*, %struct.addrinfo** %9
%59 = icmp ne %struct.addrinfo* %58, null
br i1 %59, label %60, label %101
60: ; preds = %57
store i8* null, i8** %14
store i8* null, i8** %15
%61 = load %struct.addrinfo*, %struct.addrinfo** %9
%62 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %61, i32 0, i32 0
%63 = load i64, i64* %62
%64 = load i64, i64* @AF_INET
%65 = icmp eq i64 %63, %64
br i1 %65, label %66, label %74
66: ; preds = %60
%67 = load %struct.addrinfo*, %struct.addrinfo** %9
%68 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %67, i32 0, i32 1
%69 = load i64, i64* %68
%70 = inttoptr i64 %69 to %struct.sockaddr_in*
store %struct.sockaddr_in* %70, %struct.sockaddr_in** %16
%71 = load %struct.sockaddr_in*, %struct.sockaddr_in** %16
%72 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %71, i32 0, i32 0
%73 = bitcast i32* %72 to i8*
store i8* %73, i8** %15
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8** %14
br label %74
74: ; preds = %66, %60
%75 = load %struct.addrinfo*, %struct.addrinfo** %9
%76 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %75, i32 0, i32 0
%77 = load i64, i64* %76
%78 = load i64, i64* @AF_INET6
%79 = icmp eq i64 %77, %78
br i1 %79, label %80, label %88
80: ; preds = %74
%81 = load %struct.addrinfo*, %struct.addrinfo** %9
%82 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %81, i32 0, i32 1
%83 = load i64, i64* %82
%84 = inttoptr i64 %83 to %struct.sockaddr_in6*
store %struct.sockaddr_in6* %84, %struct.sockaddr_in6** %17
%85 = load %struct.sockaddr_in6*, %struct.sockaddr_in6** %17
%86 = getelementptr inbounds %struct.sockaddr_in6, %struct.sockaddr_in6* %85, i32 0, i32 0
%87 = bitcast i32* %86 to i8*
store i8* %87, i8** %15
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i8** %14
br label %88
88: ; preds = %80, %74
%89 = load %struct.addrinfo*, %struct.addrinfo** %9
%90 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %89, i32 0, i32 0
%91 = load i64, i64* %90
%92 = load i8*, i8** %15
%93 = trunc i64 %19 to i32
%94 = call i32 @inet_ntop(i64 %91, i8* %92, i8* %21, i32 %93)
%95 = load i8*, i8** %14
%96 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8* %95, i8* %21)
br label %97
97: ; preds = %88
%98 = load %struct.addrinfo*, %struct.addrinfo** %9
%99 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %98, i32 0, i32 2
%100 = load %struct.addrinfo*, %struct.addrinfo** %99
store %struct.addrinfo* %100, %struct.addrinfo** %9
br label %57
101: ; preds = %57
%102 = load %struct.addrinfo*, %struct.addrinfo** %8
%103 = call i32 @freeaddrinfo(%struct.addrinfo* %102)
store i32 0, i32* %3
%104 = load i8*, i8** %10
%105 = load i32, i32* %3
ret i32 %105
}

LLVM IR (-O2):
%struct.addrinfo = type { i64, i64, %struct.addrinfo*, i32 }
@INET6_ADDRSTRLEN = global i32 0
@.str = [3 x i8] c"80\00"
@stderr = global i32 0
@.str.1 = [46 x i8] c"Usage: ipsub [IP or Domain] (Optional: Port)\0A\00"
@EXIT_FAILURE = global i32 0
@AF_UNSPEC = global i64 0
@SOCK_STREAM = global i32 0
@.str.2 = [20 x i8] c"IP Lookup error: %s\00"
@AF_INET = global i64 0
@.str.3 = [6 x i8] c"IP V4\00"
@AF_INET6 = global i64 0
@.str.4 = [6 x i8] c"IP V6\00"
@.str.5 = [8 x i8] c"%s: %s\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca %struct.addrinfo
%4 = alloca %struct.addrinfo*
%5 = bitcast %struct.addrinfo* %3 to i8*
%6 = bitcast %struct.addrinfo** %4 to i8*
%7 = load i32, i32* @INET6_ADDRSTRLEN
%8 = zext i32 %7 to i64
%9 = tail call i8* @llvm.stacksave()
%10 = alloca i8, i64 %8
%11 = icmp sgt i32 %0, 2
br i1 %11, label %12, label %15
12: ; preds = %2
%13 = getelementptr inbounds i8*, i8** %1, i64 2
%14 = load i8*, i8** %13
br label %22
15: ; preds = %2
%16 = icmp eq i32 %0, 2
br i1 %16, label %22, label %17
17: ; preds = %15
%18 = load i32, i32* @stderr
%19 = tail call i32 @fprintf(i32 %18, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i64 0, i64 0))
%20 = load i32, i32* @EXIT_FAILURE
%21 = tail call i32 @exit(i32 %20)
unreachable
22: ; preds = %12, %15
%23 = phi i8* [ %14, %12 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), %15 ]
%24 = getelementptr inbounds i8*, i8** %1, i64 1
%25 = load i8*, i8** %24
%26 = call i32 @memset(%struct.addrinfo* %3, i32 0, i32 32)
%27 = load i64, i64* @AF_UNSPEC
%28 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %3, i64 0, i32 0
store i64 %27, i64* %28
%29 = load i32, i32* @SOCK_STREAM
%30 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %3, i64 0, i32 3
store i32 %29, i32* %30
%31 = call i32 @getaddrinfo(i8* %25, i8* %23, %struct.addrinfo* %3, %struct.addrinfo** %4)
%32 = icmp eq i32 %31, 0
br i1 %32, label %36, label %33
33: ; preds = %22
%34 = call i8* @gai_strerror(i32 %31)
%35 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i8* %34)
br label %36
36: ; preds = %33, %22
%37 = load %struct.addrinfo*, %struct.addrinfo** %4
%38 = icmp eq %struct.addrinfo* %37, null
br i1 %38, label %68, label %39
39: ; preds = %36, %58
%40 = phi %struct.addrinfo* [ %64, %58 ], [ %37, %36 ]
%41 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %40, i64 0, i32 0
%42 = load i64, i64* %41
%43 = load i64, i64* @AF_INET
%44 = icmp eq i64 %42, %43
br i1 %44, label %45, label %49
45: ; preds = %39
%46 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %40, i64 0, i32 1
%47 = load i64, i64* %46
%48 = inttoptr i64 %47 to i8*
br label %49
49: ; preds = %45, %39
%50 = phi i8* [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), %45 ], [ null, %39 ]
%51 = phi i8* [ %48, %45 ], [ null, %39 ]
%52 = load i64, i64* @AF_INET6
%53 = icmp eq i64 %42, %52
br i1 %53, label %54, label %58
54: ; preds = %49
%55 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %40, i64 0, i32 1
%56 = load i64, i64* %55
%57 = inttoptr i64 %56 to i8*
br label %58
58: ; preds = %54, %49
%59 = phi i8* [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), %54 ], [ %50, %49 ]
%60 = phi i8* [ %57, %54 ], [ %51, %49 ]
%61 = call i32 @inet_ntop(i64 %42, i8* %60, i8* %10, i32 %7)
%62 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8* %59, i8* %10)
%63 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %40, i64 0, i32 2
%64 = load %struct.addrinfo*, %struct.addrinfo** %63
%65 = icmp eq %struct.addrinfo* %64, null
br i1 %65, label %66, label %39
66: ; preds = %58
%67 = load %struct.addrinfo*, %struct.addrinfo** %4
br label %68
68: ; preds = %66, %36
%69 = phi %struct.addrinfo* [ %67, %66 ], [ null, %36 ]
%70 = call i32 @freeaddrinfo(%struct.addrinfo* %69)
ret i32 0
}