#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;
};

/* Variables and functions */
int /*<<< orphan*/ AF_UNSPEC;
int /*<<< orphan*/ AI_PASSIVE;
int /*<<< orphan*/ SOCK_STREAM;
int /*<<< orphan*/ SOMAXCONN;
scalar_t__ bind(int, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ errno;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ freeaddrinfo(struct addrinfo *);
char *gai_strerror(int);
int getaddrinfo(int /*<<< orphan*/ *, char const *, struct addrinfo *,
                struct addrinfo **);
scalar_t__ listen(int, int /*<<< orphan*/);
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
char *strerror(int /*<<< orphan*/);
int socket_listen(const char *port) {
  struct addrinfo *results;
  int socket_fd = -1;
  struct addrinfo hints = {
      .ai_family = AF_UNSPEC,
      .ai_socktype = SOCK_STREAM,
      .ai_flags = AI_PASSIVE,
  };
  int status;
  if ((status = getaddrinfo(NULL, port, &hints, &results)) != 0) {
    fprintf(stderr, "getaddrinfo failed: %s\n", gai_strerror(status));
    return -1;
  }
  for (struct addrinfo *p = results; p != NULL && socket_fd < 0;
       p = p->ai_next) {
    if ((socket_fd = socket(p->ai_family, p->ai_socktype, p->ai_protocol)) <
        0) {
      fprintf(stderr, "Unable to make socket: %s\n", strerror(errno));
      continue;
    }
    if ((bind(socket_fd, p->ai_addr, p->ai_addrlen)) < 0) {
      fprintf(stderr, "Unable to bind: %s\n", strerror(errno));
      close(socket_fd);
      socket_fd = -1;
      continue;
    }
    if (listen(socket_fd, SOMAXCONN) < 0) {
      fprintf(stderr, "Unable to listen: %s\n", strerror(errno));
      close(socket_fd);
      socket_fd = -1;
      continue;
    }
  }
  freeaddrinfo(results);
  return socket_fd;
}


x86 assembly (clang, -O0):
<socket_listen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0xffffffff,-0x1c(%rbp)
movl   $0x0,-0x48(%rbp)
movl   $0x0,-0x44(%rbp)
movl   $0x0,-0x40(%rbp)
mov    0x2e01(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x3c(%rbp)
mov    0x2e15(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x38(%rbp)
movq   $0x0,-0x30(%rbp)
mov    0x2e09(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x28(%rbp)
mov    -0x10(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edi
lea    -0x48(%rbp),%rdx
lea    -0x18(%rbp),%rcx
call   1080 <getaddrinfo@plt>
mov    %eax,-0x4c(%rbp)
cmp    $0x0,%eax
je     1237 <socket_listen+0xa7>
mov    0x2dc4(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x5c(%rbp)
mov    -0x4c(%rbp),%edi
call   1030 <gai_strerror@plt>
mov    -0x5c(%rbp),%edi
mov    %rax,%rdx
lea    0xdda(%rip),%rsi
call   1050 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    139f <socket_listen+0x20f>
mov    -0x18(%rbp),%rax
mov    %rax,-0x58(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x58(%rbp)
mov    %al,-0x5d(%rbp)
je     1259 <socket_listen+0xc9>
cmpl   $0x0,-0x1c(%rbp)
setl   %al
mov    %al,-0x5d(%rbp)
mov    -0x5d(%rbp),%al
test   $0x1,%al
jne    1269 <socket_listen+0xd9>
jmp    1390 <socket_listen+0x200>
mov    -0x58(%rbp),%rax
mov    0x10(%rax),%edi
mov    -0x58(%rbp),%rax
mov    0xc(%rax),%esi
mov    -0x58(%rbp),%rax
mov    0x8(%rax),%edx
call   10b0 <socket@plt>
mov    %eax,-0x1c(%rbp)
cmp    $0x0,%eax
jge    12c0 <socket_listen+0x130>
mov    0x2d3a(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x64(%rbp)
mov    0x2d16(%rip),%rax
mov    (%rax),%edi
call   1090 <strerror@plt>
mov    -0x64(%rbp),%edi
mov    %rax,%rdx
lea    0xd62(%rip),%rsi
call   1050 <fprintf@plt>
jmp    137f <socket_listen+0x1ef>
mov    -0x1c(%rbp),%edi
mov    -0x58(%rbp),%rax
mov    0x4(%rax),%esi
mov    -0x58(%rbp),%rax
mov    (%rax),%edx
call   1070 <bind@plt>
cmp    $0x0,%rax
jge    131f <socket_listen+0x18f>
mov    0x2cea(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x68(%rbp)
mov    0x2cc6(%rip),%rax
mov    (%rax),%edi
call   1090 <strerror@plt>
mov    -0x68(%rbp),%edi
mov    %rax,%rdx
lea    0xd2d(%rip),%rsi
call   1050 <fprintf@plt>
mov    -0x1c(%rbp),%edi
call   1040 <close@plt>
movl   $0xffffffff,-0x1c(%rbp)
jmp    137f <socket_listen+0x1ef>
mov    -0x1c(%rbp),%edi
mov    0x2c9f(%rip),%rax
mov    (%rax),%esi
call   1060 <listen@plt>
cmp    $0x0,%rax
jge    137a <socket_listen+0x1ea>
mov    0x2c8f(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x6c(%rbp)
mov    0x2c6b(%rip),%rax
mov    (%rax),%edi
call   1090 <strerror@plt>
mov    -0x6c(%rbp),%edi
mov    %rax,%rdx
lea    0xce6(%rip),%rsi
call   1050 <fprintf@plt>
mov    -0x1c(%rbp),%edi
call   1040 <close@plt>
movl   $0xffffffff,-0x1c(%rbp)
jmp    137f <socket_listen+0x1ef>
jmp    137f <socket_listen+0x1ef>
mov    -0x58(%rbp),%rax
mov    0x18(%rax),%rax
mov    %rax,-0x58(%rbp)
jmp    123f <socket_listen+0xaf>
mov    -0x18(%rbp),%rdi
call   10a0 <freeaddrinfo@plt>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<socket_listen>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %rdi,%rsi
movq   $0x0,0x10(%rsp)
movl   $0x0,0x18(%rsp)
mov    0x2e07(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x1c(%rsp)
mov    0x2e1a(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x20(%rsp)
movq   $0x0,0x28(%rsp)
mov    0x2e0c(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x30(%rsp)
lea    0x10(%rsp),%rdx
lea    0x8(%rsp),%rcx
xor    %edi,%edi
call   1080 <getaddrinfo@plt>
test   %eax,%eax
je     1222 <socket_listen+0x92>
mov    0x2dd2(%rip),%rcx
mov    (%rcx),%ebx
mov    %eax,%edi
call   1030 <gai_strerror@plt>
lea    0xdf2(%rip),%rsi
mov    %ebx,%edi
mov    %rax,%rdx
call   1050 <fprintf@plt>
mov    $0xffffffff,%ebx
jmp    1311 <socket_listen+0x181>
mov    0x8(%rsp),%rbp
test   %rbp,%rbp
je     1305 <socket_listen+0x175>
mov    0x2d99(%rip),%r15
mov    0x2d7a(%rip),%r14
mov    0x2d83(%rip),%r12
jmp    127a <socket_listen+0xea>
nopw   0x0(%rax,%rax,1)
mov    (%r15),%r13d
mov    (%r14),%edi
call   1090 <strerror@plt>
mov    %r13d,%edi
lea    0xdb3(%rip),%rsi
mov    %rax,%rdx
call   1050 <fprintf@plt>
mov    0x18(%rbp),%rbp
test   %rbp,%rbp
je     12fe <socket_listen+0x16e>
mov    0x10(%rbp),%edi
mov    0x8(%rbp),%edx
mov    0xc(%rbp),%esi
call   10b0 <socket@plt>
mov    %eax,%ebx
test   %eax,%eax
js     1250 <socket_listen+0xc0>
mov    0x0(%rbp),%edx
mov    0x4(%rbp),%esi
mov    %ebx,%edi
call   1070 <bind@plt>
test   %rax,%rax
js     12d0 <socket_listen+0x140>
mov    (%r12),%esi
mov    %ebx,%edi
call   1060 <listen@plt>
test   %rax,%rax
jns    12fe <socket_listen+0x16e>
mov    (%r15),%r13d
mov    (%r14),%edi
call   1090 <strerror@plt>
mov    %r13d,%edi
lea    0xd82(%rip),%rsi
jmp    12e5 <socket_listen+0x155>
nopw   0x0(%rax,%rax,1)
mov    (%r15),%r13d
mov    (%r14),%edi
call   1090 <strerror@plt>
mov    %r13d,%edi
lea    0xd4e(%rip),%rsi
mov    %rax,%rdx
call   1050 <fprintf@plt>
mov    %ebx,%edi
call   1040 <close@plt>
mov    $0xffffffff,%ebx
jmp    126d <socket_listen+0xdd>
mov    0x8(%rsp),%rdi
jmp    130c <socket_listen+0x17c>
mov    $0xffffffff,%ebx
xor    %edi,%edi
call   10a0 <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*, i32 }
@SOCK_STREAM = global i32 0
@AF_UNSPEC = global i32 0
@AI_PASSIVE = global i32 0
@stderr = global i32 0
@.str = [24 x i8] c"getaddrinfo failed: %s\0A\00"
@.str.1 = [27 x i8] c"Unable to make socket: %s\0A\00"
@errno = global i32 0
@.str.2 = [20 x i8] c"Unable to bind: %s\0A\00"
@SOMAXCONN = global i32 0
@.str.3 = [22 x i8] c"Unable to listen: %s\0A\00"
define i32 @socket_listen(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca %struct.addrinfo*
%5 = alloca i32
%6 = alloca %struct.addrinfo
%7 = alloca i32
%8 = alloca %struct.addrinfo*
store i8* %0, i8** %3
store i32 -1, i32* %5
%9 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %6, i32 0, i32 0
store i32 0, i32* %9
%10 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %6, i32 0, i32 1
store i32 0, i32* %10
%11 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %6, i32 0, i32 2
store i32 0, i32* %11
%12 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %6, i32 0, i32 3
%13 = load i32, i32* @SOCK_STREAM
store i32 %13, i32* %12
%14 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %6, i32 0, i32 4
%15 = load i32, i32* @AF_UNSPEC
store i32 %15, i32* %14
%16 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %6, i32 0, i32 5
store %struct.addrinfo* null, %struct.addrinfo** %16
%17 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %6, i32 0, i32 6
%18 = load i32, i32* @AI_PASSIVE
store i32 %18, i32* %17
%19 = load i8*, i8** %3
%20 = call i32 @getaddrinfo(i32* null, i8* %19, %struct.addrinfo* %6, %struct.addrinfo** %4)
store i32 %20, i32* %7
%21 = icmp ne i32 %20, 0
br i1 %21, label %22, label %27
22: ; preds = %1
%23 = load i32, i32* @stderr
%24 = load i32, i32* %7
%25 = call i8* @gai_strerror(i32 %24)
%26 = call i32 @fprintf(i32 %23, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %25)
store i32 -1, i32* %2
br label %92
27: ; preds = %1
%28 = load %struct.addrinfo*, %struct.addrinfo** %4
store %struct.addrinfo* %28, %struct.addrinfo** %8
br label %29
29: ; preds = %84, %27
%30 = load %struct.addrinfo*, %struct.addrinfo** %8
%31 = icmp ne %struct.addrinfo* %30, null
br i1 %31, label %32, label %35
32: ; preds = %29
%33 = load i32, i32* %5
%34 = icmp slt i32 %33, 0
br label %35
35: ; preds = %32, %29
%36 = phi i1 [ false, %29 ], [ %34, %32 ]
br i1 %36, label %37, label %88
37: ; preds = %35
%38 = load %struct.addrinfo*, %struct.addrinfo** %8
%39 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %38, i32 0, i32 4
%40 = load i32, i32* %39
%41 = load %struct.addrinfo*, %struct.addrinfo** %8
%42 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %41, i32 0, i32 3
%43 = load i32, i32* %42
%44 = load %struct.addrinfo*, %struct.addrinfo** %8
%45 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %44, i32 0, i32 2
%46 = load i32, i32* %45
%47 = call i32 @socket(i32 %40, i32 %43, i32 %46)
store i32 %47, i32* %5
%48 = icmp slt i32 %47, 0
br i1 %48, label %49, label %54
49: ; preds = %37
%50 = load i32, i32* @stderr
%51 = load i32, i32* @errno
%52 = call i8* @strerror(i32 %51)
%53 = call i32 @fprintf(i32 %50, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* %52)
br label %84
54: ; preds = %37
%55 = load i32, i32* %5
%56 = load %struct.addrinfo*, %struct.addrinfo** %8
%57 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %56, i32 0, i32 1
%58 = load i32, i32* %57
%59 = load %struct.addrinfo*, %struct.addrinfo** %8
%60 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %59, i32 0, i32 0
%61 = load i32, i32* %60
%62 = call i64 @bind(i32 %55, i32 %58, i32 %61)
%63 = icmp slt i64 %62, 0
br i1 %63, label %64, label %71
64: ; preds = %54
%65 = load i32, i32* @stderr
%66 = load i32, i32* @errno
%67 = call i8* @strerror(i32 %66)
%68 = call i32 @fprintf(i32 %65, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i8* %67)
%69 = load i32, i32* %5
%70 = call i32 @close(i32 %69)
store i32 -1, i32* %5
br label %84
71: ; preds = %54
%72 = load i32, i32* %5
%73 = load i32, i32* @SOMAXCONN
%74 = call i64 @listen(i32 %72, i32 %73)
%75 = icmp slt i64 %74, 0
br i1 %75, label %76, label %83
76: ; preds = %71
%77 = load i32, i32* @stderr
%78 = load i32, i32* @errno
%79 = call i8* @strerror(i32 %78)
%80 = call i32 @fprintf(i32 %77, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i8* %79)
%81 = load i32, i32* %5
%82 = call i32 @close(i32 %81)
store i32 -1, i32* %5
br label %84
83: ; preds = %71
br label %84
84: ; preds = %83, %76, %64, %49
%85 = load %struct.addrinfo*, %struct.addrinfo** %8
%86 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %85, i32 0, i32 5
%87 = load %struct.addrinfo*, %struct.addrinfo** %86
store %struct.addrinfo* %87, %struct.addrinfo** %8
br label %29
88: ; preds = %35
%89 = load %struct.addrinfo*, %struct.addrinfo** %4
%90 = call i32 @freeaddrinfo(%struct.addrinfo* %89)
%91 = load i32, i32* %5
store i32 %91, i32* %2
br label %92
92: ; preds = %88, %22
%93 = load i32, i32* %2
ret i32 %93
}

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