#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_in {
  int /*<<< orphan*/ sin_addr;
  int /*<<< orphan*/ sin_port;
  int /*<<< orphan*/ sin_family;
};
struct sockaddr {
  int dummy;
};
struct in_addr {
  int dummy;
};
struct hostent {
  int /*<<< orphan*/ h_addr;
};
typedef int /*<<< orphan*/ sa;
typedef int /*<<< orphan*/ on;

/* Variables and functions */
int /*<<< orphan*/ AF_INET;
scalar_t__ EINPROGRESS;
scalar_t__ EINTR;
int /*<<< orphan*/ SOCK_STREAM;
int /*<<< orphan*/ SOL_SOCKET;
int /*<<< orphan*/ SO_REUSEADDR;
scalar_t__ anetNonBlock(char *, int);
int /*<<< orphan*/ anetSetError(char *, char *, char const *, ...);
int /*<<< orphan*/ close(int);
int connect(int, struct sockaddr *, int);
scalar_t__ errno;
struct hostent *gethostbyname(char const *);
int /*<<< orphan*/ htons(int);
scalar_t__ inet_aton(char const *, int /*<<< orphan*/ *);
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, int /*<<< orphan*/, int);
int /*<<< orphan*/ setsockopt(int, int /*<<< orphan*/, int /*<<< orphan*/,
                              int *, int);
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ strerror(scalar_t__);
int anetTcpGenericConnect(char *err, const char *addr, int port, int flags) {
  int s, on = 1;
  struct sockaddr_in sa;
  if ((s = socket(AF_INET, SOCK_STREAM, 0)) == -1) {
    anetSetError(err, "creating socket: %s\n", strerror(errno));
    return -1;
  }
  setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on));
  sa.sin_family = AF_INET;
  sa.sin_port = htons(port);
  if (inet_aton(addr, &sa.sin_addr) == 0) {
    struct hostent *he;
    he = gethostbyname(addr);
    if (he == NULL) {
      anetSetError(err, "can't resolve: %s\n", addr);
      close(s);
      return -1;
    }
    memcpy(&sa.sin_addr, he->h_addr, sizeof(struct in_addr));
  }
  if (flags & 1) {
    if (anetNonBlock(err, s) != 0)
      return -1;
  }
  int retry = 1;
  while (retry-- && connect(s, (struct sockaddr *)&sa, sizeof(sa)) == -1) {
    if (errno == EINPROGRESS && flags & 1)
      return s;
    if (errno == EINTR) {
      retry++;
      continue;
    }
    anetSetError(err, "connect: %s connecting to %s:%d\n", strerror(errno),
                 addr, port);
    close(s);
    return -1;
  }
  return s;
}


x86 assembly (clang, -O0):
<anetTcpGenericConnect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    %ecx,-0x20(%rbp)
movl   $0x1,-0x28(%rbp)
mov    0x2e0c(%rip),%rax
mov    (%rax),%edi
mov    0x2deb(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   10d0 <socket@plt>
mov    %eax,-0x24(%rbp)
cmp    $0xffffffff,%eax
jne    122a <anetTcpGenericConnect+0x7a>
mov    -0x10(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    0x2dbf(%rip),%rax
mov    (%rax),%rdi
call   10c0 <strerror@plt>
mov    -0x50(%rbp),%rdi
movslq %eax,%rdx
lea    0xde9(%rip),%rsi
mov    $0x0,%al
call   1080 <anetSetError@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    13fc <anetTcpGenericConnect+0x24c>
mov    -0x24(%rbp),%edi
mov    0x2db4(%rip),%rax
mov    (%rax),%esi
mov    0x2d73(%rip),%rax
mov    (%rax),%edx
lea    -0x28(%rbp),%rcx
mov    $0x4,%r8d
call   1040 <setsockopt@plt>
mov    0x2d8b(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x30(%rbp)
mov    -0x1c(%rbp),%edi
call   1050 <htons@plt>
mov    %eax,-0x34(%rbp)
mov    -0x18(%rbp),%rdi
lea    -0x38(%rbp),%rsi
call   10a0 <inet_aton@plt>
cmp    $0x0,%rax
jne    12d2 <anetTcpGenericConnect+0x122>
mov    -0x18(%rbp),%rdi
call   1070 <gethostbyname@plt>
mov    %rax,-0x40(%rbp)
cmpq   $0x0,-0x40(%rbp)
jne    12be <anetTcpGenericConnect+0x10e>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rdx
lea    0xd72(%rip),%rsi
mov    $0x0,%al
call   1080 <anetSetError@plt>
mov    -0x24(%rbp),%edi
call   1060 <close@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    13fc <anetTcpGenericConnect+0x24c>
lea    -0x38(%rbp),%rdi
mov    -0x40(%rbp),%rax
mov    (%rax),%esi
mov    $0x4,%edx
call   1090 <memcpy@plt>
mov    -0x20(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1308 <anetTcpGenericConnect+0x158>
mov    -0x10(%rbp),%rdi
mov    -0x24(%rbp),%esi
call   1030 <anetNonBlock@plt>
cmp    $0x0,%rax
je     1303 <anetTcpGenericConnect+0x153>
movl   $0xffffffff,-0x4(%rbp)
jmp    13fc <anetTcpGenericConnect+0x24c>
jmp    1308 <anetTcpGenericConnect+0x158>
movl   $0x1,-0x44(%rbp)
mov    -0x44(%rbp),%ecx
mov    %ecx,%eax
add    $0xffffffff,%eax
mov    %eax,-0x44(%rbp)
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x51(%rbp)
je     1342 <anetTcpGenericConnect+0x192>
mov    -0x24(%rbp),%edi
lea    -0x38(%rbp),%rsi
mov    $0xc,%edx
call   10b0 <connect@plt>
cmp    $0xffffffff,%eax
sete   %al
mov    %al,-0x51(%rbp)
mov    -0x51(%rbp),%al
test   $0x1,%al
jne    1352 <anetTcpGenericConnect+0x1a2>
jmp    13f6 <anetTcpGenericConnect+0x246>
mov    0x2c67(%rip),%rax
mov    (%rax),%rax
mov    0x2c75(%rip),%rcx
cmp    (%rcx),%rax
jne    1386 <anetTcpGenericConnect+0x1d6>
mov    -0x20(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1386 <anetTcpGenericConnect+0x1d6>
mov    -0x24(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    13fc <anetTcpGenericConnect+0x24c>
mov    0x2c33(%rip),%rax
mov    (%rax),%rax
mov    0x2c21(%rip),%rcx
cmp    (%rcx),%rax
jne    13ae <anetTcpGenericConnect+0x1fe>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    130f <anetTcpGenericConnect+0x15f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x60(%rbp)
mov    0x2c03(%rip),%rax
mov    (%rax),%rdi
call   10c0 <strerror@plt>
mov    -0x60(%rbp),%rdi
movslq %eax,%rdx
mov    -0x18(%rbp),%rcx
mov    -0x1c(%rbp),%r8d
lea    0xc4d(%rip),%rsi
mov    $0x0,%al
call   1080 <anetSetError@plt>
mov    -0x24(%rbp),%edi
call   1060 <close@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    13fc <anetTcpGenericConnect+0x24c>
mov    -0x24(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<anetTcpGenericConnect>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %ecx,%r13d
mov    %edx,%r12d
mov    %rsi,%r15
mov    %rdi,%r14
movl   $0x1,0x4(%rsp)
mov    0x2e07(%rip),%rbx
mov    (%rbx),%edi
mov    0x2de6(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   10d0 <socket@plt>
cmp    $0xffffffff,%eax
je     1242 <anetTcpGenericConnect+0x92>
mov    %eax,%ebp
mov    0x2def(%rip),%rax
mov    (%rax),%esi
mov    0x2dae(%rip),%rax
mov    (%rax),%edx
lea    0x4(%rsp),%rcx
mov    %ebp,%edi
mov    $0x4,%r8d
call   1040 <setsockopt@plt>
mov    (%rbx),%eax
mov    %eax,0x10(%rsp)
mov    %r12d,%edi
call   1050 <htons@plt>
mov    %eax,0xc(%rsp)
lea    0x8(%rsp),%rsi
mov    %r15,%rdi
call   10a0 <inet_aton@plt>
test   %rax,%rax
je     126a <anetTcpGenericConnect+0xba>
test   $0x1,%r13b
jne    1292 <anetTcpGenericConnect+0xe2>
jmp    12ad <anetTcpGenericConnect+0xfd>
mov    0x2d77(%rip),%rax
mov    (%rax),%rdi
call   10c0 <strerror@plt>
movslq %eax,%rdx
lea    0xda5(%rip),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1080 <anetSetError@plt>
jmp    134d <anetTcpGenericConnect+0x19d>
mov    %r15,%rdi
call   1070 <gethostbyname@plt>
test   %rax,%rax
je     1332 <anetTcpGenericConnect+0x182>
mov    (%rax),%esi
lea    0x8(%rsp),%rdi
mov    $0x4,%edx
call   1090 <memcpy@plt>
test   $0x1,%r13b
je     12ad <anetTcpGenericConnect+0xfd>
mov    %r14,%rdi
mov    %ebp,%esi
call   1030 <anetNonBlock@plt>
mov    %rax,%rcx
mov    $0xffffffff,%eax
test   %rcx,%rcx
jne    1352 <anetTcpGenericConnect+0x1a2>
mov    %r12d,(%rsp)
mov    %r15,0x18(%rsp)
mov    %r14,0x20(%rsp)
lea    0x8(%rsp),%rbx
mov    0x2cf9(%rip),%r14
mov    0x2d0a(%rip),%r15
mov    0x2ce3(%rip),%r12
jmp    12e6 <anetTcpGenericConnect+0x136>
nopw   0x0(%rax,%rax,1)
cmp    (%r12),%rdi
jne    130c <anetTcpGenericConnect+0x15c>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    $0xc,%edx
call   10b0 <connect@plt>
cmp    $0xffffffff,%eax
jne    1308 <anetTcpGenericConnect+0x158>
mov    (%r14),%rdi
test   $0x1,%r13b
je     12e0 <anetTcpGenericConnect+0x130>
cmp    (%r15),%rdi
jne    12e0 <anetTcpGenericConnect+0x130>
mov    %ebp,%eax
jmp    1352 <anetTcpGenericConnect+0x1a2>
call   10c0 <strerror@plt>
movslq %eax,%rdx
lea    0xd0d(%rip),%rsi
mov    0x20(%rsp),%rdi
mov    0x18(%rsp),%rcx
mov    (%rsp),%r8d
xor    %eax,%eax
call   1080 <anetSetError@plt>
jmp    1346 <anetTcpGenericConnect+0x196>
lea    0xcdc(%rip),%rsi
mov    %r14,%rdi
mov    %r15,%rdx
xor    %eax,%eax
call   1080 <anetSetError@plt>
mov    %ebp,%edi
call   1060 <close@plt>
mov    $0xffffffff,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.sockaddr_in = type { i32, i32, i32 }
%struct.hostent = type { i32 }
%struct.sockaddr = type { i32 }
@AF_INET = global i32 0
@SOCK_STREAM = global i32 0
@.str = [21 x i8] c"creating socket: %s\0A\00"
@errno = global i64 0
@SOL_SOCKET = global i32 0
@SO_REUSEADDR = global i32 0
@.str.1 = [19 x i8] c"can't resolve: %s\0A\00"
@EINPROGRESS = global i64 0
@EINTR = global i64 0
@.str.2 = [33 x i8] c"connect: %s connecting to %s:%d\0A\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 %struct.sockaddr_in
%13 = alloca %struct.hostent*
%14 = alloca i32
store i8* %0, i8** %6
store i8* %1, i8** %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 1, i32* %11
%15 = load i32, i32* @AF_INET
%16 = load i32, i32* @SOCK_STREAM
%17 = call i32 @socket(i32 %15, i32 %16, i32 0)
store i32 %17, i32* %10
%18 = icmp eq i32 %17, -1
br i1 %18, label %19, label %26
19: ; preds = %4
%20 = load i8*, i8** %6
%21 = load i64, i64* @errno
%22 = call i32 @strerror(i64 %21)
%23 = sext i32 %22 to i64
%24 = inttoptr i64 %23 to i8*
%25 = call i32 (i8*, i8*, i8*, ...) @anetSetError(i8* %20, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %24)
store i32 -1, i32* %5
br label %110
26: ; preds = %4
%27 = load i32, i32* %10
%28 = load i32, i32* @SOL_SOCKET
%29 = load i32, i32* @SO_REUSEADDR
%30 = call i32 @setsockopt(i32 %27, i32 %28, i32 %29, i32* %11, i32 4)
%31 = load i32, i32* @AF_INET
%32 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %12, i32 0, i32 2
store i32 %31, i32* %32
%33 = load i32, i32* %8
%34 = call i32 @htons(i32 %33)
%35 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %12, i32 0, i32 1
store i32 %34, i32* %35
%36 = load i8*, i8** %7
%37 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %12, i32 0, i32 0
%38 = call i64 @inet_aton(i8* %36, i32* %37)
%39 = icmp eq i64 %38, 0
br i1 %39, label %40, label %57
40: ; preds = %26
%41 = load i8*, i8** %7
%42 = call %struct.hostent* @gethostbyname(i8* %41)
store %struct.hostent* %42, %struct.hostent** %13
%43 = load %struct.hostent*, %struct.hostent** %13
%44 = icmp eq %struct.hostent* %43, null
br i1 %44, label %45, label %51
45: ; preds = %40
%46 = load i8*, i8** %6
%47 = load i8*, i8** %7
%48 = call i32 (i8*, i8*, i8*, ...) @anetSetError(i8* %46, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8* %47)
%49 = load i32, i32* %10
%50 = call i32 @close(i32 %49)
store i32 -1, i32* %5
br label %110
51: ; preds = %40
%52 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %12, i32 0, i32 0
%53 = load %struct.hostent*, %struct.hostent** %13
%54 = getelementptr inbounds %struct.hostent, %struct.hostent* %53, i32 0, i32 0
%55 = load i32, i32* %54
%56 = call i32 @memcpy(i32* %52, i32 %55, i32 4)
br label %57
57: ; preds = %51, %26
%58 = load i32, i32* %9
%59 = and i32 %58, 1
%60 = icmp ne i32 %59, 0
br i1 %60, label %61, label %68
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
store i32 -1, i32* %5
br label %110
67: ; preds = %61
br label %68
68: ; preds = %67, %57
store i32 1, i32* %14
br label %69
69: ; preds = %94, %68
%70 = load i32, i32* %14
%71 = add nsw i32 %70, -1
store i32 %71, i32* %14
%72 = icmp ne i32 %70, 0
br i1 %72, label %73, label %78
73: ; preds = %69
%74 = load i32, i32* %10
%75 = bitcast %struct.sockaddr_in* %12 to %struct.sockaddr*
%76 = call i32 @connect(i32 %74, %struct.sockaddr* %75, i32 12)
%77 = icmp eq i32 %76, -1
br label %78
78: ; preds = %73, %69
%79 = phi i1 [ false, %69 ], [ %77, %73 ]
br i1 %79, label %80, label %108
80: ; preds = %78
%81 = load i64, i64* @errno
%82 = load i64, i64* @EINPROGRESS
%83 = icmp eq i64 %81, %82
br i1 %83, label %84, label %90
84: ; preds = %80
%85 = load i32, i32* %9
%86 = and i32 %85, 1
%87 = icmp ne i32 %86, 0
br i1 %87, label %88, label %90
88: ; preds = %84
%89 = load i32, i32* %10
store i32 %89, i32* %5
br label %110
90: ; preds = %84, %80
%91 = load i64, i64* @errno
%92 = load i64, i64* @EINTR
%93 = icmp eq i64 %91, %92
br i1 %93, label %94, label %97
94: ; preds = %90
%95 = load i32, i32* %14
%96 = add nsw i32 %95, 1
store i32 %96, i32* %14
br label %69
97: ; preds = %90
%98 = load i8*, i8** %6
%99 = load i64, i64* @errno
%100 = call i32 @strerror(i64 %99)
%101 = sext i32 %100 to i64
%102 = inttoptr i64 %101 to i8*
%103 = load i8*, i8** %7
%104 = load i32, i32* %8
%105 = call i32 (i8*, i8*, i8*, ...) @anetSetError(i8* %98, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0), i8* %102, i8* %103, i32 %104)
%106 = load i32, i32* %10
%107 = call i32 @close(i32 %106)
store i32 -1, i32* %5
br label %110
108: ; preds = %78
%109 = load i32, i32* %10
store i32 %109, i32* %5
br label %110
110: ; preds = %108, %97, %88, %66, %45, %19
%111 = load i32, i32* %5
ret i32 %111
}

LLVM IR (-O2):
%struct.sockaddr_in = type { i32, i32, i32 }
%struct.hostent = type { i32 }
%struct.sockaddr = type { i32 }
@AF_INET = global i32 0
@SOCK_STREAM = global i32 0
@.str = [21 x i8] c"creating socket: %s\0A\00"
@errno = global i64 0
@SOL_SOCKET = global i32 0
@SO_REUSEADDR = global i32 0
@.str.1 = [19 x i8] c"can't resolve: %s\0A\00"
@EINPROGRESS = global i64 0
@EINTR = global i64 0
@.str.2 = [33 x i8] c"connect: %s connecting to %s:%d\0A\00"
define i32 @anetTcpGenericConnect(i8* %0, i8* %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca %struct.sockaddr_in
%7 = bitcast i32* %5 to i8*
store i32 1, i32* %5
%8 = bitcast %struct.sockaddr_in* %6 to i8*
%9 = load i32, i32* @AF_INET
%10 = load i32, i32* @SOCK_STREAM
%11 = tail call i32 @socket(i32 %9, i32 %10, i32 0)
%12 = icmp eq i32 %11, -1
br i1 %12, label %13, label %19
13: ; preds = %4
%14 = load i64, i64* @errno
%15 = tail call i32 @strerror(i64 %14)
%16 = sext i32 %15 to i64
%17 = inttoptr i64 %16 to i8*
%18 = tail call i32 (i8*, i8*, i8*, ...) @anetSetError(i8* %0, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %17)
br label %65
19: ; preds = %4
%20 = load i32, i32* @SOL_SOCKET
%21 = load i32, i32* @SO_REUSEADDR
%22 = call i32 @setsockopt(i32 %11, i32 %20, i32 %21, i32* %5, i32 4)
%23 = load i32, i32* @AF_INET
%24 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %6, i64 0, i32 2
store i32 %23, i32* %24
%25 = call i32 @htons(i32 %2)
%26 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %6, i64 0, i32 1
store i32 %25, i32* %26
%27 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %6, i64 0, i32 0
%28 = call i64 @inet_aton(i8* %1, i32* %27)
%29 = icmp eq i64 %28, 0
br i1 %29, label %30, label %40
30: ; preds = %19
%31 = call %struct.hostent* @gethostbyname(i8* %1)
%32 = icmp eq %struct.hostent* %31, null
br i1 %32, label %33, label %36
33: ; preds = %30
%34 = call i32 (i8*, i8*, i8*, ...) @anetSetError(i8* %0, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8* %1)
%35 = call i32 @close(i32 %11)
br label %65
36: ; preds = %30
%37 = getelementptr inbounds %struct.hostent, %struct.hostent* %31, i64 0, i32 0
%38 = load i32, i32* %37
%39 = call i32 @memcpy(i32* %27, i32 %38, i32 4)
br label %40
40: ; preds = %36, %19
%41 = and i32 %3, 1
%42 = icmp eq i32 %41, 0
br i1 %42, label %46, label %43
43: ; preds = %40
%44 = call i64 @anetNonBlock(i8* %0, i32 %11)
%45 = icmp eq i64 %44, 0
br i1 %45, label %46, label %65
46: ; preds = %43, %40
%47 = bitcast %struct.sockaddr_in* %6 to %struct.sockaddr*
br label %48
48: ; preds = %56, %46
%49 = call i32 @connect(i32 %11, %struct.sockaddr* %47, i32 12)
%50 = icmp eq i32 %49, -1
br i1 %50, label %51, label %65
51: ; preds = %48
%52 = load i64, i64* @errno
%53 = load i64, i64* @EINPROGRESS
%54 = icmp ne i64 %52, %53
%55 = or i1 %42, %54
br i1 %55, label %56, label %65
56: ; preds = %51
%57 = load i64, i64* @EINTR
%58 = icmp eq i64 %52, %57
br i1 %58, label %48, label %59
59: ; preds = %56
%60 = call i32 @strerror(i64 %52)
%61 = sext i32 %60 to i64
%62 = inttoptr i64 %61 to i8*
%63 = call i32 (i8*, i8*, i8*, ...) @anetSetError(i8* %0, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0), i8* %62, i8* %1, i32 %2)
%64 = call i32 @close(i32 %11)
br label %65
65: ; preds = %51, %48, %33, %59, %43, %13
%66 = phi i32 [ -1, %13 ], [ -1, %43 ], [ -1, %59 ], [ -1, %33 ], [ %11, %48 ], [ %11, %51 ]
ret i32 %66
}