#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 hostent {
  char *h_name;
  char **h_aliases;
  scalar_t__ h_addrtype;
  char **h_addr_list;
};

/* Variables and functions */
scalar_t__ AF_INET;
scalar_t__ AF_INET6;
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ EXIT_SUCCESS;
int INET6_ADDRSTRLEN;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *);
struct hostent *gethostbyname(char *);
int /*<<< orphan*/ h_errno;
char *hstrerror(int /*<<< orphan*/);
char *inet_ntop(scalar_t__, char *, char *, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stderr;
int main(int argc, char *argv[]) {
  struct hostent *h;
  char **pp;
  char str[INET6_ADDRSTRLEN];
  if (argc < 2) {
    printf("usage: %s <domain-name>...\n", argv[0]);
    exit(EXIT_FAILURE);
  }
  for (argv++; *argv != NULL; argv++) {
    h = gethostbyname(*argv);
    if (h == NULL) {
      fprintf(stderr, "gethostname() failed for '%s': %s\n", *argv,
              hstrerror(h_errno));
      continue;
    }
    printf("Canonical name: %s\n", h->h_name);
    printf("        alias(es):     ");
    for (pp = h->h_aliases; *pp != NULL; pp++)
      printf(" %s", *pp);
    printf("\n");
    printf("        address type:   %s\n",
           (h->h_addrtype == AF_INET)    ? "AF_INET"
           : (h->h_addrtype == AF_INET6) ? "AF_INET6"
                                         : "???");
    if (h->h_addrtype == AF_INET || h->h_addrtype == AF_INET6) {
      printf("        address(es):   ");
      for (pp = h->h_addr_list; *pp != NULL; pp++)
        printf(" %s", inet_ntop(h->h_addrtype, *pp, str, INET6_ADDRSTRLEN));
      printf("\n");
    }
  }
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e6b(%rip),%rax
mov    (%rax),%eax
mov    %rsp,%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x38(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x30(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    11cf <main+0x6f>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xe46(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    0x2df0(%rip),%rax
mov    (%rax),%edi
call   1080 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
je     13d9 <main+0x279>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1050 <gethostbyname@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1244 <main+0xe4>
mov    0x2db5(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x44(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x40(%rbp)
mov    0x2db6(%rip),%rax
mov    (%rax),%edi
call   1070 <hstrerror@plt>
mov    -0x44(%rbp),%edi
mov    -0x40(%rbp),%rdx
mov    %rax,%rcx
lea    0xde2(%rip),%rsi
call   1060 <fprintf@plt>
jmp    13c8 <main+0x268>
mov    -0x18(%rbp),%rax
mov    (%rax),%rsi
lea    0xded(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xdf3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmpq   $0x0,(%rax)
je     12a7 <main+0x147>
mov    -0x20(%rbp),%rax
mov    (%rax),%rsi
lea    0xddc(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x20(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x20(%rbp)
jmp    1273 <main+0x113>
lea    0xd6c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%rax
mov    0x10(%rax),%rax
mov    0x2d1c(%rip),%rcx
cmp    (%rcx),%rax
jne    12dd <main+0x17d>
lea    0xdb7(%rip),%rax
mov    %rax,-0x50(%rbp)
jmp    1308 <main+0x1a8>
mov    -0x18(%rbp),%rax
mov    0x10(%rax),%rdx
mov    0x2ce4(%rip),%rax
mov    (%rax),%rsi
lea    0xda6(%rip),%rax
lea    0xd96(%rip),%rcx
cmp    %rsi,%rdx
cmove  %rcx,%rax
mov    %rax,-0x50(%rbp)
mov    -0x50(%rbp),%rsi
lea    0xd5c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%rax
mov    0x10(%rax),%rax
mov    0x2cb7(%rip),%rcx
cmp    (%rcx),%rax
je     134a <main+0x1ea>
mov    -0x18(%rbp),%rax
mov    0x10(%rax),%rax
mov    0x2c8f(%rip),%rcx
cmp    (%rcx),%rax
jne    13c3 <main+0x263>
lea    0xd4f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%rax
mov    0x18(%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmpq   $0x0,(%rax)
je     13b5 <main+0x255>
mov    -0x38(%rbp),%rdx
mov    -0x18(%rbp),%rax
mov    0x10(%rax),%rdi
mov    -0x20(%rbp),%rax
mov    (%rax),%rsi
mov    0x2c5c(%rip),%rax
mov    (%rax),%ecx
call   1030 <inet_ntop@plt>
mov    %rax,%rsi
lea    0xcce(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x20(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x20(%rbp)
jmp    1364 <main+0x204>
lea    0xc5e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    13c8 <main+0x268>
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
jmp    11db <main+0x7b>
mov    0x2bd0(%rip),%rax
mov    (%rax),%edi
call   1080 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%r14
mov    0x2e5d(%rip),%rax
mov    (%rax),%eax
mov    %rsp,%rcx
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rcx
mov    %rcx,%rsp
cmp    $0x2,%edi
jge    11c2 <main+0x52>
mov    (%r14),%rsi
lea    0xe53(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x2dfd(%rip),%rax
mov    (%rax),%edi
call   1090 <exit@plt>
mov    %rcx,-0x30(%rbp)
mov    0x8(%r14),%rdi
test   %rdi,%rdi
jne    11dd <main+0x6d>
mov    0x2dda(%rip),%rax
mov    (%rax),%edi
call   1090 <exit@plt>
add    $0x8,%r14
lea    0xe57(%rip),%r15
lea    0xe7c(%rip),%r12
jmp    123d <main+0xcd>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    0x2db9(%rip),%rax
mov    (%rax),%r13d
mov    (%r14),%rbx
mov    0x2dc4(%rip),%rax
mov    (%rax),%edi
call   1080 <hstrerror@plt>
mov    %r13d,%edi
lea    0xdf7(%rip),%rsi
mov    %rbx,%rdx
mov    %rax,%rcx
call   1070 <fprintf@plt>
mov    0x8(%r14),%rdi
add    $0x8,%r14
test   %rdi,%rdi
je     11cf <main+0x5f>
call   1060 <gethostbyname@plt>
test   %rax,%rax
je     1200 <main+0x90>
mov    %rax,%r13
mov    (%rax),%rsi
mov    %r15,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xdf5(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x8(%r13),%rbx
mov    (%rbx),%rsi
test   %rsi,%rsi
je     1296 <main+0x126>
add    $0x8,%rbx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r12,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%rbx),%rsi
add    $0x8,%rbx
test   %rsi,%rsi
jne    1280 <main+0x110>
mov    $0xa,%edi
call   1040 <putchar@plt>
mov    0x10(%r13),%rax
mov    0x2d25(%rip),%rcx
cmp    (%rcx),%rax
lea    0xde7(%rip),%rsi
lea    0xdd7(%rip),%rcx
cmove  %rcx,%rsi
mov    0x2d19(%rip),%rbx
cmp    (%rbx),%rax
lea    0xdba(%rip),%rax
cmove  %rax,%rsi
lea    0xd93(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x10(%r13),%rax
cmp    (%rbx),%rax
je     12fc <main+0x18c>
mov    0x2cdd(%rip),%rcx
cmp    (%rcx),%rax
jne    1230 <main+0xc0>
mov    %r14,-0x38(%rbp)
lea    0xd99(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x18(%r13),%rbx
mov    (%rbx),%rsi
test   %rsi,%rsi
mov    0x2cc9(%rip),%r14
mov    -0x30(%rbp),%r15
je     1358 <main+0x1e8>
add    $0x8,%rbx
nopl   0x0(%rax)
mov    0x10(%r13),%rdi
mov    (%r14),%ecx
mov    %r15,%rdx
call   1030 <inet_ntop@plt>
mov    %r12,%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%rbx),%rsi
add    $0x8,%rbx
test   %rsi,%rsi
jne    1330 <main+0x1c0>
mov    $0xa,%edi
call   1040 <putchar@plt>
mov    -0x38(%rbp),%r14
lea    0xcd2(%rip),%r15
jmp    1230 <main+0xc0>

LLVM IR (-O0):
%struct.hostent = type { i8*, i8**, i64, i8** }
@INET6_ADDRSTRLEN = global i32 0
@.str = [28 x i8] c"usage: %s <domain-name>...\0A\00"
@EXIT_FAILURE = global i32 0
@stderr = global i32 0
@.str.1 = [35 x i8] c"gethostname() failed for '%s': %s\0A\00"
@h_errno = global i32 0
@.str.2 = [20 x i8] c"Canonical name: %s\0A\00"
@.str.3 = [24 x i8] c" alias(es): \00"
@.str.4 = [4 x i8] c" %s\00"
@.str.5 = [2 x i8] c"\0A\00"
@.str.6 = [28 x i8] c" address type: %s\0A\00"
@AF_INET = global i64 0
@.str.7 = [8 x i8] c"AF_INET\00"
@AF_INET6 = global i64 0
@.str.8 = [9 x i8] c"AF_INET6\00"
@.str.9 = [4 x i8] c"???\00"
@.str.10 = [24 x i8] c" address(es): \00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca %struct.hostent*
%7 = alloca i8**
%8 = alloca i8*
%9 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%10 = load i32, i32* @INET6_ADDRSTRLEN
%11 = zext i32 %10 to i64
%12 = call i8* @llvm.stacksave()
store i8* %12, i8** %8
%13 = alloca i8, i64 %11
store i64 %11, i64* %9
%14 = load i32, i32* %4
%15 = icmp slt i32 %14, 2
br i1 %15, label %16, label %23
16: ; preds = %2
%17 = load i8**, i8*** %5
%18 = getelementptr inbounds i8*, i8** %17, i64 0
%19 = load i8*, i8** %18
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* %19)
%21 = load i32, i32* @EXIT_FAILURE
%22 = call i32 @exit(i32 %21)
unreachable
23: ; preds = %2
%24 = load i8**, i8*** %5
%25 = getelementptr inbounds i8*, i8** %24, i32 1
store i8** %25, i8*** %5
br label %26
26: ; preds = %117, %23
%27 = load i8**, i8*** %5
%28 = load i8*, i8** %27
%29 = icmp ne i8* %28, null
br i1 %29, label %30, label %120
30: ; preds = %26
%31 = load i8**, i8*** %5
%32 = load i8*, i8** %31
%33 = call %struct.hostent* @gethostbyname(i8* %32)
store %struct.hostent* %33, %struct.hostent** %6
%34 = load %struct.hostent*, %struct.hostent** %6
%35 = icmp eq %struct.hostent* %34, null
br i1 %35, label %36, label %43
36: ; preds = %30
%37 = load i32, i32* @stderr
%38 = load i8**, i8*** %5
%39 = load i8*, i8** %38
%40 = load i32, i32* @h_errno
%41 = call i8* @hstrerror(i32 %40)
%42 = call i32 @fprintf(i32 %37, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0), i8* %39, i8* %41)
br label %117
43: ; preds = %30
%44 = load %struct.hostent*, %struct.hostent** %6
%45 = getelementptr inbounds %struct.hostent, %struct.hostent* %44, i32 0, i32 0
%46 = load i8*, i8** %45
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i8* %46)
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0))
%49 = load %struct.hostent*, %struct.hostent** %6
%50 = getelementptr inbounds %struct.hostent, %struct.hostent* %49, i32 0, i32 1
%51 = load i8**, i8*** %50
store i8** %51, i8*** %7
br label %52
52: ; preds = %60, %43
%53 = load i8**, i8*** %7
%54 = load i8*, i8** %53
%55 = icmp ne i8* %54, null
br i1 %55, label %56, label %63
56: ; preds = %52
%57 = load i8**, i8*** %7
%58 = load i8*, i8** %57
%59 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8* %58)
br label %60
60: ; preds = %56
%61 = load i8**, i8*** %7
%62 = getelementptr inbounds i8*, i8** %61, i32 1
store i8** %62, i8*** %7
br label %52
63: ; preds = %52
%64 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%65 = load %struct.hostent*, %struct.hostent** %6
%66 = getelementptr inbounds %struct.hostent, %struct.hostent* %65, i32 0, i32 2
%67 = load i64, i64* %66
%68 = load i64, i64* @AF_INET
%69 = icmp eq i64 %67, %68
br i1 %69, label %70, label %71
70: ; preds = %63
br label %79
71: ; preds = %63
%72 = load %struct.hostent*, %struct.hostent** %6
%73 = getelementptr inbounds %struct.hostent, %struct.hostent* %72, i32 0, i32 2
%74 = load i64, i64* %73
%75 = load i64, i64* @AF_INET6
%76 = icmp eq i64 %74, %75
%77 = zext i1 %76 to i64
%78 = select i1 %76, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0)
br label %79
79: ; preds = %71, %70
%80 = phi i8* [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), %70 ], [ %78, %71 ]
%81 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.6, i64 0, i64 0), i8* %80)
%82 = load %struct.hostent*, %struct.hostent** %6
%83 = getelementptr inbounds %struct.hostent, %struct.hostent* %82, i32 0, i32 2
%84 = load i64, i64* %83
%85 = load i64, i64* @AF_INET
%86 = icmp eq i64 %84, %85
br i1 %86, label %93, label %87
87: ; preds = %79
%88 = load %struct.hostent*, %struct.hostent** %6
%89 = getelementptr inbounds %struct.hostent, %struct.hostent* %88, i32 0, i32 2
%90 = load i64, i64* %89
%91 = load i64, i64* @AF_INET6
%92 = icmp eq i64 %90, %91
br i1 %92, label %93, label %116
93: ; preds = %87, %79
%94 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.10, i64 0, i64 0))
%95 = load %struct.hostent*, %struct.hostent** %6
%96 = getelementptr inbounds %struct.hostent, %struct.hostent* %95, i32 0, i32 3
%97 = load i8**, i8*** %96
store i8** %97, i8*** %7
br label %98
98: ; preds = %111, %93
%99 = load i8**, i8*** %7
%100 = load i8*, i8** %99
%101 = icmp ne i8* %100, null
br i1 %101, label %102, label %114
102: ; preds = %98
%103 = load %struct.hostent*, %struct.hostent** %6
%104 = getelementptr inbounds %struct.hostent, %struct.hostent* %103, i32 0, i32 2
%105 = load i64, i64* %104
%106 = load i8**, i8*** %7
%107 = load i8*, i8** %106
%108 = load i32, i32* @INET6_ADDRSTRLEN
%109 = call i8* @inet_ntop(i64 %105, i8* %107, i8* %13, i32 %108)
%110 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8* %109)
br label %111
111: ; preds = %102
%112 = load i8**, i8*** %7
%113 = getelementptr inbounds i8*, i8** %112, i32 1
store i8** %113, i8*** %7
br label %98
114: ; preds = %98
%115 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
br label %116
116: ; preds = %114, %87
br label %117
117: ; preds = %116, %36
%118 = load i8**, i8*** %5
%119 = getelementptr inbounds i8*, i8** %118, i32 1
store i8** %119, i8*** %5
br label %26
120: ; preds = %26
%121 = load i32, i32* @EXIT_SUCCESS
%122 = call i32 @exit(i32 %121)
unreachable
}

LLVM IR (-O2):
%struct.hostent = type { i8*, i8**, i64, i8** }
@INET6_ADDRSTRLEN = global i32 0
@.str = [28 x i8] c"usage: %s <domain-name>...\0A\00"
@EXIT_FAILURE = global i32 0
@stderr = global i32 0
@.str.1 = [35 x i8] c"gethostname() failed for '%s': %s\0A\00"
@h_errno = global i32 0
@.str.2 = [20 x i8] c"Canonical name: %s\0A\00"
@.str.3 = [24 x i8] c" alias(es): \00"
@.str.4 = [4 x i8] c" %s\00"
@.str.6 = [28 x i8] c" address type: %s\0A\00"
@AF_INET = global i64 0
@.str.7 = [8 x i8] c"AF_INET\00"
@AF_INET6 = global i64 0
@.str.8 = [9 x i8] c"AF_INET6\00"
@.str.9 = [4 x i8] c"???\00"
@.str.10 = [24 x i8] c" address(es): \00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = load i32, i32* @INET6_ADDRSTRLEN
%4 = zext i32 %3 to i64
%5 = alloca i8, i64 %4
%6 = icmp slt i32 %0, 2
br i1 %6, label %11, label %7
7: ; preds = %2
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = icmp eq i8* %9, null
br i1 %10, label %82, label %16
11: ; preds = %2
%12 = load i8*, i8** %1
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* %12)
%14 = load i32, i32* @EXIT_FAILURE
%15 = tail call i32 @exit(i32 %14)
unreachable
16: ; preds = %7, %78
%17 = phi i8* [ %80, %78 ], [ %9, %7 ]
%18 = phi i8** [ %79, %78 ], [ %8, %7 ]
%19 = call %struct.hostent* @gethostbyname(i8* %17)
%20 = icmp eq %struct.hostent* %19, null
br i1 %20, label %21, label %27
21: ; preds = %16
%22 = load i32, i32* @stderr
%23 = load i8*, i8** %18
%24 = load i32, i32* @h_errno
%25 = call i8* @hstrerror(i32 %24)
%26 = call i32 @fprintf(i32 %22, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0), i8* %23, i8* %25)
br label %78
27: ; preds = %16
%28 = getelementptr inbounds %struct.hostent, %struct.hostent* %19, i64 0, i32 0
%29 = load i8*, i8** %28
%30 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i8* %29)
%31 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0))
%32 = getelementptr inbounds %struct.hostent, %struct.hostent* %19, i64 0, i32 1
%33 = load i8**, i8*** %32
%34 = load i8*, i8** %33
%35 = icmp eq i8* %34, null
br i1 %35, label %43, label %36
36: ; preds = %27, %36
%37 = phi i8* [ %41, %36 ], [ %34, %27 ]
%38 = phi i8** [ %40, %36 ], [ %33, %27 ]
%39 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8* %37)
%40 = getelementptr inbounds i8*, i8** %38, i64 1
%41 = load i8*, i8** %40
%42 = icmp eq i8* %41, null
br i1 %42, label %43, label %36
43: ; preds = %36, %27
%44 = call i32 @putchar(i32 10)
%45 = getelementptr inbounds %struct.hostent, %struct.hostent* %19, i64 0, i32 2
%46 = load i64, i64* %45
%47 = load i64, i64* @AF_INET
%48 = icmp eq i64 %46, %47
%49 = load i64, i64* @AF_INET6
%50 = icmp eq i64 %46, %49
%51 = select i1 %50, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0)
%52 = select i1 %48, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), i8* %51
%53 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.6, i64 0, i64 0), i8* %52)
%54 = load i64, i64* %45
%55 = load i64, i64* @AF_INET
%56 = icmp eq i64 %54, %55
%57 = load i64, i64* @AF_INET6
%58 = icmp eq i64 %54, %57
%59 = select i1 %56, i1 true, i1 %58
br i1 %59, label %60, label %78
60: ; preds = %43
%61 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.10, i64 0, i64 0))
%62 = getelementptr inbounds %struct.hostent, %struct.hostent* %19, i64 0, i32 3
%63 = load i8**, i8*** %62
%64 = load i8*, i8** %63
%65 = icmp eq i8* %64, null
br i1 %65, label %76, label %66
66: ; preds = %60, %66
%67 = phi i8* [ %74, %66 ], [ %64, %60 ]
%68 = phi i8** [ %73, %66 ], [ %63, %60 ]
%69 = load i64, i64* %45
%70 = load i32, i32* @INET6_ADDRSTRLEN
%71 = call i8* @inet_ntop(i64 %69, i8* %67, i8* %5, i32 %70)
%72 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8* %71)
%73 = getelementptr inbounds i8*, i8** %68, i64 1
%74 = load i8*, i8** %73
%75 = icmp eq i8* %74, null
br i1 %75, label %76, label %66
76: ; preds = %66, %60
%77 = call i32 @putchar(i32 10)
br label %78
78: ; preds = %43, %76, %21
%79 = getelementptr inbounds i8*, i8** %18, i64 1
%80 = load i8*, i8** %79
%81 = icmp eq i8* %80, null
br i1 %81, label %82, label %16
82: ; preds = %78, %7
%83 = load i32, i32* @EXIT_SUCCESS
%84 = call i32 @exit(i32 %83)
unreachable
}