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

/* Variables and functions */
int /*<<< orphan*/ AI_ADDRCONFIG;
int /*<<< orphan*/ PF_UNSPEC;
int /*<<< orphan*/ SOCK_STREAM;
int /*<<< orphan*/ _log(char *, int, int, int /*<<< orphan*/, int, char *, ...);
int /*<<< orphan*/ basename(char *);
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ connect(int, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ freeaddrinfo(struct addrinfo *);
char const *gai_strerror(int);
int getaddrinfo(char const *, char const *, struct addrinfo *,
                struct addrinfo **);
int /*<<< orphan*/ memset(struct addrinfo *, int /*<<< orphan*/, int);
int /*<<< orphan*/ print_ip(struct addrinfo *);
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int tcp_connect(const char *host, const char *service) {
  int res;
  int sock = -1;
  struct addrinfo *sa_head, *sa, hints;
  memset(&hints, 0, sizeof(hints));
  hints.ai_socktype = SOCK_STREAM;
  hints.ai_family = PF_UNSPEC;
  hints.ai_flags = AI_ADDRCONFIG;
  res = getaddrinfo(host, service, &hints, &sa_head);
  if (res)
    do {
      _log("ERROR", 1, 0,
           basename("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                    "outputs/2022-01-22/02-19-57/repos/shifty91/nc-ssl/refs/"
                    "heads/master/src/net.c"),
           60, "getaddrinfo() for host %s failed: %s", host, gai_strerror(res));
    } while (0);
  for (sa = sa_head; sa != NULL; sa = sa->ai_next) {
    sock = socket(sa->ai_family, sa->ai_socktype, sa->ai_protocol);
    if (sock < 0) {
      freeaddrinfo(sa_head);
      do {
        _log("ERROR", 1, 1,
             basename("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                      "outputs/2022-01-22/02-19-57/repos/shifty91/nc-ssl/refs/"
                      "heads/master/src/net.c"),
             67, "socket() failed: %s");
      } while (0);
    }
    if (!connect(sock, sa->ai_addr, sa->ai_addrlen)) {
      print_ip(sa);
      break;
    }
    close(sock);
  }
  if (!sa)
    do {
      _log("ERROR", 1, 1,
           basename("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                    "outputs/2022-01-22/02-19-57/repos/shifty91/nc-ssl/refs/"
                    "heads/master/src/net.c"),
           79, "connect() for host %s on service %s failed: %s", host, service);
    } while (0);
  freeaddrinfo(sa_head);
  return sock;
}


x86 assembly (clang, -O0):
<tcp_connect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0xffffffff,-0x18(%rbp)
lea    -0x50(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1050 <memset@plt>
mov    0x2e0a(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x44(%rbp)
mov    0x2e0e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x40(%rbp)
mov    0x2de2(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x50(%rbp),%rdx
lea    -0x20(%rbp),%rcx
call   10a0 <getaddrinfo@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1268 <tcp_connect+0xc8>
jmp    1212 <tcp_connect+0x72>
lea    0xded(%rip),%rdi
call   1080 <basename@plt>
mov    %eax,-0x5c(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x58(%rbp)
mov    -0x14(%rbp),%edi
call   1040 <gai_strerror@plt>
mov    -0x5c(%rbp),%ecx
mov    -0x58(%rbp),%r10
lea    0xdc1(%rip),%rdi
mov    $0x1,%esi
xor    %edx,%edx
mov    $0x3c,%r8d
lea    0xe39(%rip),%r9
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
mov    $0x0,%al
call   1030 <_log@plt>
jmp    1268 <tcp_connect+0xc8>
mov    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
je     1325 <tcp_connect+0x185>
mov    -0x28(%rbp),%rax
mov    0x10(%rax),%edi
mov    -0x28(%rbp),%rax
mov    0xc(%rax),%esi
mov    -0x28(%rbp),%rax
mov    0x8(%rax),%edx
call   10c0 <socket@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jge    12e0 <tcp_connect+0x140>
mov    -0x20(%rbp),%rdi
call   10b0 <freeaddrinfo@plt>
lea    0xd54(%rip),%rdi
call   1080 <basename@plt>
mov    %eax,%ecx
lea    0xd40(%rip),%rdi
mov    $0x1,%edx
mov    $0x43,%r8d
lea    0xddf(%rip),%r9
mov    %edx,%esi
mov    $0x0,%al
call   1030 <_log@plt>
jmp    12e0 <tcp_connect+0x140>
mov    -0x18(%rbp),%edi
mov    -0x28(%rbp),%rax
mov    0x4(%rax),%esi
mov    -0x28(%rbp),%rax
mov    (%rax),%edx
call   1090 <connect@plt>
cmp    $0x0,%eax
jne    130c <tcp_connect+0x16c>
mov    -0x28(%rbp),%rdi
call   1060 <print_ip@plt>
jmp    1325 <tcp_connect+0x185>
mov    -0x18(%rbp),%edi
call   1070 <close@plt>
mov    -0x28(%rbp),%rax
mov    0x18(%rax),%rax
mov    %rax,-0x28(%rbp)
jmp    1270 <tcp_connect+0xd0>
cmpq   $0x0,-0x28(%rbp)
jne    137b <tcp_connect+0x1db>
jmp    1335 <tcp_connect+0x195>
lea    0xcca(%rip),%rdi
call   1080 <basename@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%r10
mov    -0x10(%rbp),%rax
lea    0xcae(%rip),%rdi
mov    $0x1,%edx
mov    $0x4f,%r8d
lea    0xd61(%rip),%r9
mov    %edx,%esi
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
mov    $0x0,%al
call   1030 <_log@plt>
jmp    137b <tcp_connect+0x1db>
mov    -0x20(%rbp),%rdi
call   10b0 <freeaddrinfo@plt>
mov    -0x18(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tcp_connect>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %rsi,%rbp
mov    %rdi,%r15
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1050 <memset@plt>
mov    0x2e09(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x1c(%rsp)
mov    0x2e0c(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x20(%rsp)
mov    0x2ddf(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x30(%rsp)
mov    %rsp,%rcx
mov    %r15,%rdi
mov    %rbp,%rsi
mov    %rbx,%rdx
call   10a0 <getaddrinfo@plt>
test   %eax,%eax
je     124b <tcp_connect+0xab>
mov    %eax,%ebx
lea    0xdf9(%rip),%rdi
call   1080 <basename@plt>
mov    %eax,%r14d
mov    %ebx,%edi
call   1040 <gai_strerror@plt>
mov    %rax,%rbx
lea    0xdda(%rip),%rdi
lea    0xe5f(%rip),%r9
mov    $0x1,%esi
xor    %edx,%edx
mov    %r14d,%ecx
mov    $0x3c,%r8d
xor    %eax,%eax
push   %rbx
push   %r15
call   1030 <_log@plt>
add    $0x10,%rsp
mov    (%rsp),%rbx
test   %rbx,%rbx
mov    %rbp,0x8(%rsp)
je     12d6 <tcp_connect+0x136>
lea    0xda6(%rip),%r12
lea    0xd99(%rip),%r13
lea    0xe43(%rip),%r14
xchg   %ax,%ax
mov    0x10(%rbx),%edi
mov    0x8(%rbx),%edx
mov    0xc(%rbx),%esi
call   10c0 <socket@plt>
mov    %eax,%ebp
test   %eax,%eax
jns    12b4 <tcp_connect+0x114>
mov    (%rsp),%rdi
call   10b0 <freeaddrinfo@plt>
mov    %r12,%rdi
call   1080 <basename@plt>
mov    %r13,%rdi
mov    $0x1,%esi
mov    $0x1,%edx
mov    %eax,%ecx
mov    $0x43,%r8d
mov    %r14,%r9
xor    %eax,%eax
call   1030 <_log@plt>
mov    (%rbx),%edx
mov    0x4(%rbx),%esi
mov    %ebp,%edi
call   1090 <connect@plt>
test   %eax,%eax
je     131a <tcp_connect+0x17a>
mov    %ebp,%edi
call   1070 <close@plt>
mov    0x18(%rbx),%rbx
test   %rbx,%rbx
jne    1270 <tcp_connect+0xd0>
jmp    12db <tcp_connect+0x13b>
mov    $0xffffffff,%ebp
lea    0xd24(%rip),%rdi
call   1080 <basename@plt>
lea    0xd12(%rip),%rdi
lea    0xdd0(%rip),%r9
mov    $0x1,%esi
mov    $0x1,%edx
mov    %eax,%ecx
mov    $0x4f,%r8d
xor    %eax,%eax
push   0x8(%rsp)
push   %r15
call   1030 <_log@plt>
add    $0x10,%rsp
jmp    1322 <tcp_connect+0x182>
mov    %rbx,%rdi
call   1060 <print_ip@plt>
mov    (%rsp),%rdi
call   10b0 <freeaddrinfo@plt>
mov    %ebp,%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*, i32 }
@SOCK_STREAM = global i32 0
@PF_UNSPEC = global i32 0
@AI_ADDRCONFIG = global i32 0
@.str = [6 x i8] c"ERROR\00"
@.str.1 = [134 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/shifty91/nc-ssl/refs/heads/master/src/net.c\00"
@.str.2 = [37 x i8] c"getaddrinfo() for host %s failed: %s\00"
@.str.3 = [20 x i8] c"socket() failed: %s\00"
@.str.4 = [47 x i8] c"connect() for host %s on service %s failed: %s\00"
define i32 @tcp_connect(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca %struct.addrinfo*
%8 = alloca %struct.addrinfo*
%9 = alloca %struct.addrinfo
store i8* %0, i8** %3
store i8* %1, i8** %4
store i32 -1, i32* %6
%10 = call i32 @memset(%struct.addrinfo* %9, i32 0, i32 40)
%11 = load i32, i32* @SOCK_STREAM
%12 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %9, i32 0, i32 3
store i32 %11, i32* %12
%13 = load i32, i32* @PF_UNSPEC
%14 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %9, i32 0, i32 4
store i32 %13, i32* %14
%15 = load i32, i32* @AI_ADDRCONFIG
%16 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %9, i32 0, i32 6
store i32 %15, i32* %16
%17 = load i8*, i8** %3
%18 = load i8*, i8** %4
%19 = call i32 @getaddrinfo(i8* %17, i8* %18, %struct.addrinfo* %9, %struct.addrinfo** %7)
store i32 %19, i32* %5
%20 = load i32, i32* %5
%21 = icmp ne i32 %20, 0
br i1 %21, label %22, label %30
22: ; preds = %2
br label %23
23: ; preds = %22
%24 = call i32 @basename(i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str.1, i64 0, i64 0))
%25 = load i8*, i8** %3
%26 = load i32, i32* %5
%27 = call i8* @gai_strerror(i32 %26)
%28 = call i32 (i8*, i32, i32, i32, i32, i8*, ...) @_log(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 1, i32 0, i32 %24, i32 60, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0), i8* %25, i8* %27)
br label %29
29: ; preds = %23
br label %30
30: ; preds = %29, %2
%31 = load %struct.addrinfo*, %struct.addrinfo** %7
store %struct.addrinfo* %31, %struct.addrinfo** %8
br label %32
32: ; preds = %71, %30
%33 = load %struct.addrinfo*, %struct.addrinfo** %8
%34 = icmp ne %struct.addrinfo* %33, null
br i1 %34, label %35, label %75
35: ; preds = %32
%36 = load %struct.addrinfo*, %struct.addrinfo** %8
%37 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %36, i32 0, i32 4
%38 = load i32, i32* %37
%39 = load %struct.addrinfo*, %struct.addrinfo** %8
%40 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %39, i32 0, i32 3
%41 = load i32, i32* %40
%42 = load %struct.addrinfo*, %struct.addrinfo** %8
%43 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %42, i32 0, i32 2
%44 = load i32, i32* %43
%45 = call i32 @socket(i32 %38, i32 %41, i32 %44)
store i32 %45, i32* %6
%46 = load i32, i32* %6
%47 = icmp slt i32 %46, 0
br i1 %47, label %48, label %55
48: ; preds = %35
%49 = load %struct.addrinfo*, %struct.addrinfo** %7
%50 = call i32 @freeaddrinfo(%struct.addrinfo* %49)
br label %51
51: ; preds = %48
%52 = call i32 @basename(i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str.1, i64 0, i64 0))
%53 = call i32 (i8*, i32, i32, i32, i32, i8*, ...) @_log(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 1, i32 1, i32 %52, i32 67, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0))
br label %54
54: ; preds = %51
br label %55
55: ; preds = %54, %35
%56 = load i32, i32* %6
%57 = load %struct.addrinfo*, %struct.addrinfo** %8
%58 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %57, i32 0, i32 1
%59 = load i32, i32* %58
%60 = load %struct.addrinfo*, %struct.addrinfo** %8
%61 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %60, i32 0, i32 0
%62 = load i32, i32* %61
%63 = call i32 @connect(i32 %56, i32 %59, i32 %62)
%64 = icmp ne i32 %63, 0
br i1 %64, label %68, label %65
65: ; preds = %55
%66 = load %struct.addrinfo*, %struct.addrinfo** %8
%67 = call i32 @print_ip(%struct.addrinfo* %66)
br label %75
68: ; preds = %55
%69 = load i32, i32* %6
%70 = call i32 @close(i32 %69)
br label %71
71: ; preds = %68
%72 = load %struct.addrinfo*, %struct.addrinfo** %8
%73 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %72, i32 0, i32 5
%74 = load %struct.addrinfo*, %struct.addrinfo** %73
store %struct.addrinfo* %74, %struct.addrinfo** %8
br label %32
75: ; preds = %65, %32
%76 = load %struct.addrinfo*, %struct.addrinfo** %8
%77 = icmp ne %struct.addrinfo* %76, null
br i1 %77, label %85, label %78
78: ; preds = %75
br label %79
79: ; preds = %78
%80 = call i32 @basename(i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str.1, i64 0, i64 0))
%81 = load i8*, i8** %3
%82 = load i8*, i8** %4
%83 = call i32 (i8*, i32, i32, i32, i32, i8*, ...) @_log(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 1, i32 1, i32 %80, i32 79, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.4, i64 0, i64 0), i8* %81, i8* %82)
br label %84
84: ; preds = %79
br label %85
85: ; preds = %84, %75
%86 = load %struct.addrinfo*, %struct.addrinfo** %7
%87 = call i32 @freeaddrinfo(%struct.addrinfo* %86)
%88 = load i32, i32* %6
ret i32 %88
}

LLVM IR (-O2):
%struct.addrinfo = type { i32, i32, i32, i32, i32, %struct.addrinfo*, i32 }
@SOCK_STREAM = global i32 0
@PF_UNSPEC = global i32 0
@AI_ADDRCONFIG = global i32 0
@.str = [6 x i8] c"ERROR\00"
@.str.1 = [134 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/shifty91/nc-ssl/refs/heads/master/src/net.c\00"
@.str.2 = [37 x i8] c"getaddrinfo() for host %s failed: %s\00"
@.str.3 = [20 x i8] c"socket() failed: %s\00"
@.str.4 = [47 x i8] c"connect() for host %s on service %s failed: %s\00"
define i32 @tcp_connect(i8* %0, i8* %1) {
%3 = alloca %struct.addrinfo*
%4 = alloca %struct.addrinfo
%5 = bitcast %struct.addrinfo** %3 to i8*
%6 = bitcast %struct.addrinfo* %4 to i8*
%7 = call i32 @memset(%struct.addrinfo* %4, i32 0, i32 40)
%8 = load i32, i32* @SOCK_STREAM
%9 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %4, i64 0, i32 3
store i32 %8, i32* %9
%10 = load i32, i32* @PF_UNSPEC
%11 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %4, i64 0, i32 4
store i32 %10, i32* %11
%12 = load i32, i32* @AI_ADDRCONFIG
%13 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %4, i64 0, i32 6
store i32 %12, i32* %13
%14 = call i32 @getaddrinfo(i8* %0, i8* %1, %struct.addrinfo* %4, %struct.addrinfo** %3)
%15 = icmp eq i32 %14, 0
br i1 %15, label %20, label %16
16: ; preds = %2
%17 = call i32 @basename(i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str.1, i64 0, i64 0))
%18 = call i8* @gai_strerror(i32 %14)
%19 = call i32 (i8*, i32, i32, i32, i32, i8*, ...) @_log(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 1, i32 0, i32 %17, i32 60, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0), i8* %0, i8* %18)
br label %20
20: ; preds = %16, %2
%21 = load %struct.addrinfo*, %struct.addrinfo** %3
%22 = icmp eq %struct.addrinfo* %21, null
br i1 %22, label %52, label %23
23: ; preds = %20, %45
%24 = phi %struct.addrinfo* [ %48, %45 ], [ %21, %20 ]
%25 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %24, i64 0, i32 4
%26 = load i32, i32* %25
%27 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %24, i64 0, i32 3
%28 = load i32, i32* %27
%29 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %24, i64 0, i32 2
%30 = load i32, i32* %29
%31 = call i32 @socket(i32 %26, i32 %28, i32 %30)
%32 = icmp slt i32 %31, 0
br i1 %32, label %33, label %38
33: ; preds = %23
%34 = load %struct.addrinfo*, %struct.addrinfo** %3
%35 = call i32 @freeaddrinfo(%struct.addrinfo* %34)
%36 = call i32 @basename(i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str.1, i64 0, i64 0))
%37 = call i32 (i8*, i32, i32, i32, i32, i8*, ...) @_log(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 1, i32 1, i32 %36, i32 67, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0))
br label %38
38: ; preds = %33, %23
%39 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %24, i64 0, i32 1
%40 = load i32, i32* %39
%41 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %24, i64 0, i32 0
%42 = load i32, i32* %41
%43 = call i32 @connect(i32 %31, i32 %40, i32 %42)
%44 = icmp eq i32 %43, 0
br i1 %44, label %50, label %45
45: ; preds = %38
%46 = call i32 @close(i32 %31)
%47 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %24, i64 0, i32 5
%48 = load %struct.addrinfo*, %struct.addrinfo** %47
%49 = icmp eq %struct.addrinfo* %48, null
br i1 %49, label %52, label %23
50: ; preds = %38
%51 = call i32 @print_ip(%struct.addrinfo* %24)
br label %56
52: ; preds = %45, %20
%53 = phi i32 [ -1, %20 ], [ %31, %45 ]
%54 = call i32 @basename(i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str.1, i64 0, i64 0))
%55 = call i32 (i8*, i32, i32, i32, i32, i8*, ...) @_log(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 1, i32 1, i32 %54, i32 79, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.4, i64 0, i64 0), i8* %0, i8* %1)
br label %56
56: ; preds = %50, %52
%57 = phi i32 [ %53, %52 ], [ %31, %50 ]
%58 = load %struct.addrinfo*, %struct.addrinfo** %3
%59 = call i32 @freeaddrinfo(%struct.addrinfo* %58)
ret i32 %57
}