#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;
  int h_addrtype;
  int h_length;
  scalar_t__ h_addr;
};

/* Variables and functions */
#define AF_INET 129
#define AF_INET6 128
struct hostent *gethostbyname(char *);
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char **argv) {
  char *hostname = "localhost";
  struct hostent *hent;
  int i, ret;
  if (argc > 1)
    hostname = argv[1];
  hent = gethostbyname(hostname);
  if (hent == NULL) {
    printf("gethostbyname(%s) returned NULL !!\n", hostname);
    return 1;
  }
  printf("gethostbyname(%s) returned:\n", hostname);
  printf("  name: %s\n", hent->h_name);
  printf("  aliases:");
  for (i = 0; hent->h_aliases[i] != NULL; i++)
    printf(" %s", hent->h_aliases[i]);
  printf("\n");
  printf("  address type: ");
  switch (hent->h_addrtype) {
  case AF_INET:
    printf("AF_INET\n");
    break;
  case AF_INET6:
    printf("AF_INET6\n");
    break;
  default:
    printf("UNKNOWN (%d)\n", hent->h_addrtype);
  }
  printf("  address: ");
  switch (hent->h_addrtype) {
  case AF_INET: {
    const char *dot = "";
    for (i = 0; i < hent->h_length; i++) {
      printf("%s%d", dot, ((unsigned char *)hent->h_addr)[i]);
      dot = ".";
    }
  } break;
  default:
    for (i = 0; i < hent->h_length; i++) {
      printf("%02x", ((unsigned char *)hent->h_addr)[i]);
    }
  }
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rax
mov    %rax,-0x18(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    1157 <main+0x37>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <gethostbyname@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    118d <main+0x6d>
mov    -0x18(%rbp),%rsi
lea    0xe90(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1378 <main+0x258>
mov    -0x18(%rbp),%rsi
lea    0xe96(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%rax
mov    (%rax),%rsi
lea    0xe9e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe9c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x24(%rbp)
mov    -0x20(%rbp),%rax
mov    0x8(%rax),%rax
movslq -0x24(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     120c <main+0xec>
mov    -0x20(%rbp),%rax
mov    0x8(%rax),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xe6b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    11c9 <main+0xa9>
lea    0xe19(%rip),%rdi
xor    %eax,%eax
mov    %al,-0x35(%rbp)
call   1030 <printf@plt>
mov    -0x35(%rbp),%al
lea    0xe3f(%rip),%rdi
call   1030 <printf@plt>
mov    -0x20(%rbp),%rax
mov    0x10(%rax),%eax
mov    %eax,-0x34(%rbp)
sub    $0x80,%eax
je     126c <main+0x14c>
jmp    1246 <main+0x126>
mov    -0x34(%rbp),%eax
sub    $0x81,%eax
jne    127f <main+0x15f>
jmp    1259 <main+0x139>
lea    0xe17(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1294 <main+0x174>
lea    0xe0d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1294 <main+0x174>
mov    -0x20(%rbp),%rax
mov    0x10(%rax),%esi
lea    0xdfd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xdfd(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    -0x20(%rbp),%rax
mov    0x10(%rax),%eax
sub    $0x81,%eax
jne    131b <main+0x1fb>
jmp    12b9 <main+0x199>
lea    0xd6d(%rip),%rax
mov    %rax,-0x30(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    -0x20(%rbp),%rcx
cmp    0x14(%rcx),%eax
jge    1316 <main+0x1f6>
mov    -0x30(%rbp),%rsi
mov    -0x20(%rbp),%rax
mov    0x18(%rax),%rax
movslq -0x24(%rbp),%rcx
movzbl (%rax,%rcx,1),%edx
lea    0xdae(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xda5(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    12cb <main+0x1ab>
jmp    1363 <main+0x243>
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    -0x20(%rbp),%rcx
cmp    0x14(%rcx),%eax
jge    135e <main+0x23e>
mov    -0x20(%rbp),%rax
mov    0x18(%rax),%rax
movslq -0x24(%rbp),%rcx
movzbl (%rax,%rcx,1),%esi
lea    0xd62(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1322 <main+0x202>
jmp    1363 <main+0x243>
lea    0xcc2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
cmp    $0x2,%edi
jl     1153 <main+0x13>
mov    0x8(%rsi),%r14
jmp    115a <main+0x1a>
lea    0xea6(%rip),%r14
mov    %r14,%rdi
call   1060 <gethostbyname@plt>
test   %rax,%rax
je     1217 <main+0xd7>
mov    %rax,%r12
lea    0xeb9(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%r12),%rsi
lea    0xec1(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xebf(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x8(%r12),%rax
mov    (%rax),%rsi
test   %rsi,%rsi
je     11dc <main+0x9c>
mov    $0x8,%ebx
lea    0xeaa(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x8(%r12),%rax
mov    (%rax,%rbx,1),%rsi
add    $0x8,%rbx
test   %rsi,%rsi
jne    11c0 <main+0x80>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xe79(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x10(%r12),%esi
cmp    $0x80,%esi
je     1232 <main+0xf2>
cmp    $0x81,%esi
jne    1240 <main+0x100>
lea    0xe96(%rip),%rdi
call   1040 <puts@plt>
jmp    124e <main+0x10e>
lea    0xdec(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x1,%eax
jmp    131d <main+0x1dd>
lea    0xe64(%rip),%rdi
call   1040 <puts@plt>
jmp    124e <main+0x10e>
lea    0xe30(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe30(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x14(%r12),%eax
cmpl   $0x81,0x10(%r12)
jne    12d6 <main+0x196>
test   %eax,%eax
jle    1311 <main+0x1d1>
mov    0x18(%r12),%rax
movzbl (%rax),%edx
lea    0xe0e(%rip),%rdi
lea    0xda3(%rip),%rsi
xor    %eax,%eax
call   1050 <printf@plt>
cmpl   $0x2,0x14(%r12)
jl     1311 <main+0x1d1>
mov    $0x1,%ebx
lea    0xdec(%rip),%r14
lea    0xdea(%rip),%r15
nopl   0x0(%rax)
mov    0x18(%r12),%rax
movzbl (%rax,%rbx,1),%edx
mov    %r14,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%rbx
movslq 0x14(%r12),%rax
cmp    %rax,%rbx
jl     12b0 <main+0x170>
jmp    1311 <main+0x1d1>
test   %eax,%eax
jle    1311 <main+0x1d1>
lea    0xdb7(%rip),%r14
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    0x18(%r12),%rax
movzbl (%rax,%rbx,1),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%rbx
movslq 0x14(%r12),%rax
cmp    %rax,%rbx
jl     12f0 <main+0x1b0>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
%struct.hostent = type { i8*, i8**, i32, i32, i64 }
@.str = [10 x i8] c"localhost\00"
@.str.1 = [36 x i8] c"gethostbyname(%s) returned NULL !!\0A\00"
@.str.2 = [29 x i8] c"gethostbyname(%s) returned:\0A\00"
@.str.3 = [12 x i8] c" name: %s\0A\00"
@.str.4 = [11 x i8] c" aliases:\00"
@.str.5 = [4 x i8] c" %s\00"
@.str.7 = [17 x i8] c" address type: \00"
@.str.10 = [14 x i8] c"UNKNOWN (%d)\0A\00"
@.str.11 = [12 x i8] c" address: \00"
@.str.12 = [1 x i8] zeroinitializer
@.str.13 = [5 x i8] c"%s%d\00"
@.str.14 = [2 x i8] c".\00"
@.str.15 = [5 x i8] c"%02x\00"
@str = [9 x i8] c"AF_INET6\00"
@str.16 = [8 x i8] c"AF_INET\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
br label %7
7: ; preds = %4, %2
%8 = phi i8* [ %6, %4 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), %2 ]
%9 = tail call %struct.hostent* @gethostbyname(i8* %8)
%10 = icmp eq %struct.hostent* %9, null
br i1 %10, label %11, label %13
11: ; preds = %7
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i8* %8)
br label %89
13: ; preds = %7
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), i8* %8)
%15 = getelementptr inbounds %struct.hostent, %struct.hostent* %9, i64 0, i32 0
%16 = load i8*, i8** %15
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i8* %16)
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0))
%19 = getelementptr inbounds %struct.hostent, %struct.hostent* %9, i64 0, i32 1
%20 = load i8**, i8*** %19
%21 = load i8*, i8** %20
%22 = icmp eq i8* %21, null
br i1 %22, label %32, label %23
23: ; preds = %13, %23
%24 = phi i64 [ %27, %23 ], [ 0, %13 ]
%25 = phi i8* [ %30, %23 ], [ %21, %13 ]
%26 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i8* %25)
%27 = add nuw i64 %24, 1
%28 = load i8**, i8*** %19
%29 = getelementptr inbounds i8*, i8** %28, i64 %27
%30 = load i8*, i8** %29
%31 = icmp eq i8* %30, null
br i1 %31, label %32, label %23
32: ; preds = %23, %13
%33 = tail call i32 @putchar(i32 10)
%34 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0))
%35 = getelementptr inbounds %struct.hostent, %struct.hostent* %9, i64 0, i32 2
%36 = load i32, i32* %35
switch i32 %36, label %41 [
i32 129, label %37
i32 128, label %39
]
37: ; preds = %32
%38 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str.16, i64 0, i64 0))
br label %43
39: ; preds = %32
%40 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
br label %43
41: ; preds = %32
%42 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.10, i64 0, i64 0), i32 %36)
br label %43
43: ; preds = %41, %39, %37
%44 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.11, i64 0, i64 0))
%45 = load i32, i32* %35
%46 = icmp eq i32 %45, 129
%47 = getelementptr inbounds %struct.hostent, %struct.hostent* %9, i64 0, i32 3
%48 = load i32, i32* %47
%49 = icmp sgt i32 %48, 0
br i1 %46, label %53, label %50
50: ; preds = %43
br i1 %49, label %51, label %87
51: ; preds = %50
%52 = getelementptr inbounds %struct.hostent, %struct.hostent* %9, i64 0, i32 4
br label %75
53: ; preds = %43
br i1 %49, label %54, label %87
54: ; preds = %53
%55 = getelementptr inbounds %struct.hostent, %struct.hostent* %9, i64 0, i32 4
%56 = load i64, i64* %55
%57 = inttoptr i64 %56 to i8*
%58 = load i8, i8* %57
%59 = zext i8 %58 to i32
%60 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.12, i64 0, i64 0), i32 %59)
%61 = load i32, i32* %47
%62 = icmp sgt i32 %61, 1
br i1 %62, label %63, label %87
63: ; preds = %54, %63
%64 = phi i64 [ %71, %63 ], [ 1, %54 ]
%65 = load i64, i64* %55
%66 = inttoptr i64 %65 to i8*
%67 = getelementptr inbounds i8, i8* %66, i64 %64
%68 = load i8, i8* %67
%69 = zext i8 %68 to i32
%70 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i64 0, i64 0), i32 %69)
%71 = add nuw nsw i64 %64, 1
%72 = load i32, i32* %47
%73 = sext i32 %72 to i64
%74 = icmp slt i64 %71, %73
br i1 %74, label %63, label %87
75: ; preds = %51, %75
%76 = phi i64 [ 0, %51 ], [ %83, %75 ]
%77 = load i64, i64* %52
%78 = inttoptr i64 %77 to i8*
%79 = getelementptr inbounds i8, i8* %78, i64 %76
%80 = load i8, i8* %79
%81 = zext i8 %80 to i32
%82 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.15, i64 0, i64 0), i32 %81)
%83 = add nuw nsw i64 %76, 1
%84 = load i32, i32* %47
%85 = sext i32 %84 to i64
%86 = icmp slt i64 %83, %85
br i1 %86, label %75, label %87
87: ; preds = %75, %63, %54, %50, %53
%88 = tail call i32 @putchar(i32 10)
br label %89
89: ; preds = %87, %11
%90 = phi i32 [ 1, %11 ], [ 0, %87 ]
ret i32 %90
}