#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;
  scalar_t__ ai_protocol;
  int /*<<< orphan*/ ai_socktype;
  int /*<<< orphan*/ ai_family;
  struct addrinfo *ai_next;
  int /*<<< orphan*/ ai_flags;
};

/* Variables and functions */
int /*<<< orphan*/ AF_INET;
int /*<<< orphan*/ AI_PASSIVE;
int /*<<< orphan*/ SOCK_DGRAM;
int /*<<< orphan*/ SOCK_STREAM;
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*/ imprime_extremo_conexion(int /*<<< orphan*/ *,
                                            int /*<<< orphan*/, int);
int /*<<< orphan*/ memset(struct addrinfo *, int /*<<< orphan*/, int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stderr;
int traduce_a_direccion(const char *maquina, const char *puerto, int tipo,
                        struct addrinfo *info) {
  struct addrinfo hints;
  struct addrinfo *result, *rp;
  int error = 0;
  memset(&hints, 0, sizeof(struct addrinfo));
  hints.ai_family = AF_INET;
  if (0 == tipo)
    hints.ai_socktype = SOCK_DGRAM;
  else
    hints.ai_socktype = SOCK_STREAM;
  hints.ai_protocol = 0;
  if (2 == tipo)
    hints.ai_flags |= AI_PASSIVE;
  error = getaddrinfo(maquina, puerto, &hints, &result);
  if (error != 0) {
    fprintf(stderr, "getaddrinfo: %s\n", gai_strerror(error));
  } else {
    printf("Resultado de la resolucion de nombre:\n");
    for (rp = result; rp != NULL; rp = rp->ai_next) {
      printf("-> ");
      imprime_extremo_conexion(rp->ai_addr, rp->ai_addrlen, tipo);
      printf("\n");
    }
    if (result == NULL) {
      fprintf(stderr, "No se han encontrado direcciones.\n");
      error = 1;
    } else {
      info->ai_family = result->ai_family;
      info->ai_socktype = result->ai_socktype;
      info->ai_protocol = result->ai_protocol;
      *info->ai_addr = *result->ai_addr;
      info->ai_addrlen = result->ai_addrlen;
    }
    freeaddrinfo(result);
  }
  return !error;
}


x86 assembly (clang, -O0):
<traduce_a_direccion>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
movl   $0x0,-0x64(%rbp)
lea    -0x50(%rbp),%rdi
xor    %esi,%esi
mov    $0x30,%edx
call   1060 <memset@plt>
mov    0x2e3b(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x34(%rbp)
xor    %eax,%eax
cmp    -0x14(%rbp),%eax
jne    11c6 <traduce_a_direccion+0x56>
mov    0x2e1c(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x38(%rbp)
jmp    11d2 <traduce_a_direccion+0x62>
mov    0x2df3(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x38(%rbp)
movq   $0x0,-0x40(%rbp)
mov    $0x2,%eax
cmp    -0x14(%rbp),%eax
jne    11f7 <traduce_a_direccion+0x87>
mov    0x2df9(%rip),%rax
mov    (%rax),%eax
or     -0x28(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x50(%rbp),%rdx
lea    -0x58(%rbp),%rcx
call   1080 <getaddrinfo@plt>
mov    %eax,-0x64(%rbp)
cmpl   $0x0,-0x64(%rbp)
je     1246 <traduce_a_direccion+0xd6>
mov    0x2da8(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x68(%rbp)
mov    -0x64(%rbp),%edi
call   1050 <gai_strerror@plt>
mov    -0x68(%rbp),%edi
mov    %rax,%rdx
lea    0xdc6(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    1327 <traduce_a_direccion+0x1b7>
lea    0xdc4(%rip),%rdi
call   1040 <printf@plt>
mov    -0x58(%rbp),%rax
mov    %rax,-0x60(%rbp)
cmpq   $0x0,-0x60(%rbp)
je     12a4 <traduce_a_direccion+0x134>
lea    0xdcc(%rip),%rdi
call   1040 <printf@plt>
mov    -0x60(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x60(%rbp),%rax
mov    (%rax),%esi
mov    -0x14(%rbp),%edx
call   1030 <imprime_extremo_conexion@plt>
lea    0xdcf(%rip),%rdi
call   1040 <printf@plt>
mov    -0x60(%rbp),%rax
mov    0x20(%rax),%rax
mov    %rax,-0x60(%rbp)
jmp    125a <traduce_a_direccion+0xea>
cmpq   $0x0,-0x58(%rbp)
jne    12d2 <traduce_a_direccion+0x162>
mov    0x2d12(%rip),%rax
mov    (%rax),%edi
lea    0xd7d(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movl   $0x1,-0x64(%rbp)
jmp    131e <traduce_a_direccion+0x1ae>
mov    -0x58(%rbp),%rax
mov    0x1c(%rax),%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,0x1c(%rax)
mov    -0x58(%rbp),%rax
mov    0x18(%rax),%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,0x18(%rax)
mov    -0x58(%rbp),%rax
mov    0x10(%rax),%rcx
mov    -0x20(%rbp),%rax
mov    %rcx,0x10(%rax)
mov    -0x58(%rbp),%rax
mov    0x8(%rax),%rax
mov    (%rax),%ecx
mov    -0x20(%rbp),%rax
mov    0x8(%rax),%rax
mov    %ecx,(%rax)
mov    -0x58(%rbp),%rax
mov    (%rax),%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x58(%rbp),%rdi
call   1090 <freeaddrinfo@plt>
cmpl   $0x0,-0x64(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<traduce_a_direccion>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x38,%rsp
mov    %rcx,%r14
mov    %edx,%ebp
mov    %rsi,%r15
mov    %rdi,%rbx
lea    0x8(%rsp),%rdi
xor    %esi,%esi
mov    $0x30,%edx
call   1080 <memset@plt>
mov    0x2e23(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x24(%rsp)
test   %ebp,%ebp
je     11f1 <traduce_a_direccion+0x61>
mov    0x2df2(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x20(%rsp)
movq   $0x0,0x18(%rsp)
cmp    $0x2,%ebp
jne    1207 <traduce_a_direccion+0x77>
mov    0x2dff(%rip),%rax
mov    (%rax),%eax
or     %eax,0x30(%rsp)
jmp    1207 <traduce_a_direccion+0x77>
mov    0x2de0(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x20(%rsp)
movq   $0x0,0x18(%rsp)
lea    0x8(%rsp),%rdx
mov    %rsp,%rcx
mov    %rbx,%rdi
mov    %r15,%rsi
call   10a0 <getaddrinfo@plt>
test   %eax,%eax
je     124b <traduce_a_direccion+0xbb>
mov    0x2da3(%rip),%rcx
mov    (%rcx),%ebx
mov    %eax,%edi
call   1070 <gai_strerror@plt>
lea    0xdcb(%rip),%rsi
mov    %ebx,%edi
mov    %rax,%rdx
xor    %eax,%eax
call   1090 <fprintf@plt>
mov    $0x1,%ebx
jmp    12f1 <traduce_a_direccion+0x161>
lea    0xde6(%rip),%rdi
call   1050 <puts@plt>
mov    (%rsp),%rbx
test   %rbx,%rbx
je     12cc <traduce_a_direccion+0x13c>
lea    0xdaa(%rip),%r15
nopw   0x0(%rax,%rax,1)
mov    %r15,%rdi
call   1060 <printf@plt>
mov    0x8(%rbx),%rdi
mov    (%rbx),%esi
mov    %ebp,%edx
call   1030 <imprime_extremo_conexion@plt>
mov    $0xa,%edi
call   1040 <putchar@plt>
mov    0x20(%rbx),%rbx
test   %rbx,%rbx
jne    1270 <traduce_a_direccion+0xe0>
mov    (%rsp),%rdi
test   %rdi,%rdi
je     12cc <traduce_a_direccion+0x13c>
mov    0x1c(%rdi),%eax
mov    %eax,0x1c(%r14)
mov    0x18(%rdi),%eax
mov    %eax,0x18(%r14)
mov    0x10(%rdi),%rax
mov    %rax,0x10(%r14)
mov    0x8(%rdi),%rax
mov    (%rax),%eax
mov    0x8(%r14),%rcx
mov    %eax,(%rcx)
mov    (%rdi),%eax
mov    %eax,(%r14)
xor    %ebx,%ebx
jmp    12ec <traduce_a_direccion+0x15c>
mov    0x2cf5(%rip),%rax
mov    (%rax),%edi
lea    0xd39(%rip),%rsi
xor    %eax,%eax
call   1090 <fprintf@plt>
mov    $0x1,%ebx
mov    (%rsp),%rdi
call   10b0 <freeaddrinfo@plt>
xor    %eax,%eax
test   %ebx,%ebx
sete   %al
add    $0x38,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.addrinfo = type { i32, i32*, i64, i32, i32, %struct.addrinfo*, i32 }
@AF_INET = global i32 0
@SOCK_DGRAM = global i32 0
@SOCK_STREAM = global i32 0
@AI_PASSIVE = global i32 0
@stderr = global i32 0
@.str = [17 x i8] c"getaddrinfo: %s\0A\00"
@.str.1 = [39 x i8] c"Resultado de la resolucion de nombre:\0A\00"
@.str.2 = [4 x i8] c"-> \00"
@.str.3 = [2 x i8] c"\0A\00"
@.str.4 = [35 x i8] c"No se han encontrado direcciones.\0A\00"
define i32 @traduce_a_direccion(i8* %0, i8* %1, i32 %2, %struct.addrinfo* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca %struct.addrinfo*
%9 = alloca %struct.addrinfo
%10 = alloca %struct.addrinfo*
%11 = alloca %struct.addrinfo*
%12 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store %struct.addrinfo* %3, %struct.addrinfo** %8
store i32 0, i32* %12
%13 = call i32 @memset(%struct.addrinfo* %9, i32 0, i32 48)
%14 = load i32, i32* @AF_INET
%15 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %9, i32 0, i32 4
store i32 %14, i32* %15
%16 = load i32, i32* %7
%17 = icmp eq i32 0, %16
br i1 %17, label %18, label %21
18: ; preds = %4
%19 = load i32, i32* @SOCK_DGRAM
%20 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %9, i32 0, i32 3
store i32 %19, i32* %20
br label %24
21: ; preds = %4
%22 = load i32, i32* @SOCK_STREAM
%23 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %9, i32 0, i32 3
store i32 %22, i32* %23
br label %24
24: ; preds = %21, %18
%25 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %9, i32 0, i32 2
store i64 0, i64* %25
%26 = load i32, i32* %7
%27 = icmp eq i32 2, %26
br i1 %27, label %28, label %33
28: ; preds = %24
%29 = load i32, i32* @AI_PASSIVE
%30 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %9, i32 0, i32 6
%31 = load i32, i32* %30
%32 = or i32 %31, %29
store i32 %32, i32* %30
br label %33
33: ; preds = %28, %24
%34 = load i8*, i8** %5
%35 = load i8*, i8** %6
%36 = call i32 @getaddrinfo(i8* %34, i8* %35, %struct.addrinfo* %9, %struct.addrinfo** %10)
store i32 %36, i32* %12
%37 = load i32, i32* %12
%38 = icmp ne i32 %37, 0
br i1 %38, label %39, label %44
39: ; preds = %33
%40 = load i32, i32* @stderr
%41 = load i32, i32* %12
%42 = call i8* @gai_strerror(i32 %41)
%43 = call i32 (i32, i8*, ...) @fprintf(i32 %40, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %42)
br label %102
44: ; preds = %33
%45 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0))
%46 = load %struct.addrinfo*, %struct.addrinfo** %10
store %struct.addrinfo* %46, %struct.addrinfo** %11
br label %47
47: ; preds = %61, %44
%48 = load %struct.addrinfo*, %struct.addrinfo** %11
%49 = icmp ne %struct.addrinfo* %48, null
br i1 %49, label %50, label %65
50: ; preds = %47
%51 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%52 = load %struct.addrinfo*, %struct.addrinfo** %11
%53 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %52, i32 0, i32 1
%54 = load i32*, i32** %53
%55 = load %struct.addrinfo*, %struct.addrinfo** %11
%56 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %55, i32 0, i32 0
%57 = load i32, i32* %56
%58 = load i32, i32* %7
%59 = call i32 @imprime_extremo_conexion(i32* %54, i32 %57, i32 %58)
%60 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %61
61: ; preds = %50
%62 = load %struct.addrinfo*, %struct.addrinfo** %11
%63 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %62, i32 0, i32 5
%64 = load %struct.addrinfo*, %struct.addrinfo** %63
store %struct.addrinfo* %64, %struct.addrinfo** %11
br label %47
65: ; preds = %47
%66 = load %struct.addrinfo*, %struct.addrinfo** %10
%67 = icmp eq %struct.addrinfo* %66, null
br i1 %67, label %68, label %71
68: ; preds = %65
%69 = load i32, i32* @stderr
%70 = call i32 (i32, i8*, ...) @fprintf(i32 %69, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0))
store i32 1, i32* %12
br label %99
71: ; preds = %65
%72 = load %struct.addrinfo*, %struct.addrinfo** %10
%73 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %72, i32 0, i32 4
%74 = load i32, i32* %73
%75 = load %struct.addrinfo*, %struct.addrinfo** %8
%76 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %75, i32 0, i32 4
store i32 %74, i32* %76
%77 = load %struct.addrinfo*, %struct.addrinfo** %10
%78 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %77, i32 0, i32 3
%79 = load i32, i32* %78
%80 = load %struct.addrinfo*, %struct.addrinfo** %8
%81 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %80, i32 0, i32 3
store i32 %79, i32* %81
%82 = load %struct.addrinfo*, %struct.addrinfo** %10
%83 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %82, i32 0, i32 2
%84 = load i64, i64* %83
%85 = load %struct.addrinfo*, %struct.addrinfo** %8
%86 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %85, i32 0, i32 2
store i64 %84, i64* %86
%87 = load %struct.addrinfo*, %struct.addrinfo** %10
%88 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %87, i32 0, i32 1
%89 = load i32*, i32** %88
%90 = load i32, i32* %89
%91 = load %struct.addrinfo*, %struct.addrinfo** %8
%92 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %91, i32 0, i32 1
%93 = load i32*, i32** %92
store i32 %90, i32* %93
%94 = load %struct.addrinfo*, %struct.addrinfo** %10
%95 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %94, i32 0, i32 0
%96 = load i32, i32* %95
%97 = load %struct.addrinfo*, %struct.addrinfo** %8
%98 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %97, i32 0, i32 0
store i32 %96, i32* %98
br label %99
99: ; preds = %71, %68
%100 = load %struct.addrinfo*, %struct.addrinfo** %10
%101 = call i32 @freeaddrinfo(%struct.addrinfo* %100)
br label %102
102: ; preds = %99, %39
%103 = load i32, i32* %12
%104 = icmp ne i32 %103, 0
%105 = xor i1 %104, true
%106 = zext i1 %105 to i32
ret i32 %106
}

LLVM IR (-O2):
%struct.addrinfo = type { i32, i32*, i64, i32, i32, %struct.addrinfo*, i32 }
@AF_INET = global i32 0
@SOCK_DGRAM = global i32 0
@SOCK_STREAM = global i32 0
@AI_PASSIVE = global i32 0
@stderr = global i32 0
@.str = [17 x i8] c"getaddrinfo: %s\0A\00"
@.str.2 = [4 x i8] c"-> \00"
@.str.4 = [35 x i8] c"No se han encontrado direcciones.\0A\00"
@str = [38 x i8] c"Resultado de la resolucion de nombre:\00"
define i32 @traduce_a_direccion(i8* %0, i8* %1, i32 %2, %struct.addrinfo* nocapture %3) {
%5 = alloca %struct.addrinfo
%6 = alloca %struct.addrinfo*
%7 = bitcast %struct.addrinfo* %5 to i8*
%8 = bitcast %struct.addrinfo** %6 to i8*
%9 = call i32 @memset(%struct.addrinfo* %5, i32 0, i32 48)
%10 = load i32, i32* @AF_INET
%11 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %5, i64 0, i32 4
store i32 %10, i32* %11
%12 = icmp eq i32 %2, 0
br i1 %12, label %13, label %17
13: ; preds = %4
%14 = load i32, i32* @SOCK_DGRAM
%15 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %5, i64 0, i32 3
store i32 %14, i32* %15
%16 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %5, i64 0, i32 2
store i64 0, i64* %16
br label %27
17: ; preds = %4
%18 = load i32, i32* @SOCK_STREAM
%19 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %5, i64 0, i32 3
store i32 %18, i32* %19
%20 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %5, i64 0, i32 2
store i64 0, i64* %20
%21 = icmp eq i32 %2, 2
br i1 %21, label %22, label %27
22: ; preds = %17
%23 = load i32, i32* @AI_PASSIVE
%24 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %5, i64 0, i32 6
%25 = load i32, i32* %24
%26 = or i32 %25, %23
store i32 %26, i32* %24
br label %27
27: ; preds = %13, %22, %17
%28 = call i32 @getaddrinfo(i8* %0, i8* %1, %struct.addrinfo* %5, %struct.addrinfo** %6)
%29 = icmp eq i32 %28, 0
br i1 %29, label %34, label %30
30: ; preds = %27
%31 = load i32, i32* @stderr
%32 = call i8* @gai_strerror(i32 %28)
%33 = call i32 (i32, i8*, ...) @fprintf(i32 %31, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %32)
br label %79
34: ; preds = %27
%35 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str, i64 0, i64 0))
%36 = load %struct.addrinfo*, %struct.addrinfo** %6
%37 = icmp eq %struct.addrinfo* %36, null
br i1 %37, label %53, label %38
38: ; preds = %34, %38
%39 = phi %struct.addrinfo* [ %48, %38 ], [ %36, %34 ]
%40 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%41 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %39, i64 0, i32 1
%42 = load i32*, i32** %41
%43 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %39, i64 0, i32 0
%44 = load i32, i32* %43
%45 = call i32 @imprime_extremo_conexion(i32* %42, i32 %44, i32 %2)
%46 = call i32 @putchar(i32 10)
%47 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %39, i64 0, i32 5
%48 = load %struct.addrinfo*, %struct.addrinfo** %47
%49 = icmp eq %struct.addrinfo* %48, null
br i1 %49, label %50, label %38
50: ; preds = %38
%51 = load %struct.addrinfo*, %struct.addrinfo** %6
%52 = icmp eq %struct.addrinfo* %51, null
br i1 %52, label %53, label %57
53: ; preds = %34, %50
%54 = load i32, i32* @stderr
%55 = call i32 (i32, i8*, ...) @fprintf(i32 %54, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0))
%56 = load %struct.addrinfo*, %struct.addrinfo** %6
br label %75
57: ; preds = %50
%58 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %51, i64 0, i32 4
%59 = load i32, i32* %58
%60 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %3, i64 0, i32 4
store i32 %59, i32* %60
%61 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %51, i64 0, i32 3
%62 = load i32, i32* %61
%63 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %3, i64 0, i32 3
store i32 %62, i32* %63
%64 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %51, i64 0, i32 2
%65 = load i64, i64* %64
%66 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %3, i64 0, i32 2
store i64 %65, i64* %66
%67 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %51, i64 0, i32 1
%68 = load i32*, i32** %67
%69 = load i32, i32* %68
%70 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %3, i64 0, i32 1
%71 = load i32*, i32** %70
store i32 %69, i32* %71
%72 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %51, i64 0, i32 0
%73 = load i32, i32* %72
%74 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %3, i64 0, i32 0
store i32 %73, i32* %74
br label %75
75: ; preds = %57, %53
%76 = phi %struct.addrinfo* [ %56, %53 ], [ %51, %57 ]
%77 = phi i32 [ 1, %53 ], [ 0, %57 ]
%78 = call i32 @freeaddrinfo(%struct.addrinfo* %76)
br label %79
79: ; preds = %75, %30
%80 = phi i32 [ 1, %30 ], [ %77, %75 ]
%81 = icmp eq i32 %80, 0
%82 = zext i1 %81 to i32
ret i32 %82
}