#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_in6 {
  int /*<<< orphan*/ sin6_port;
  int /*<<< orphan*/ sin6_addr;
};
struct sockaddr_in {
  int /*<<< orphan*/ sin_port;
  int /*<<< orphan*/ sin_addr;
};
struct addrinfo {
  int ai_family;
  int ai_socktype;
  struct addrinfo *ai_next;
  scalar_t__ ai_addr;
};
typedef int /*<<< orphan*/ straddr;

/* Variables and functions */
#define AF_INET 132
#define AF_INET6 131
int INET6_ADDRSTRLEN;
#define SOCK_DGRAM 130
#define SOCK_RAW 129
#define SOCK_STREAM 128
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
char *inet_ntoa(int /*<<< orphan*/);
char *inet_ntop(int const, int /*<<< orphan*/ *, char *, int);
int ntohs(int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void printAddressStructures(struct addrinfo *addr) {
  int count = 0;
  while (addr) {
    fprintf(stderr, "Address %d:", count++);
    fprintf(stderr, "\r\n");
    fprintf(stderr, "   ");
    ;
    switch (addr->ai_family) {
    case AF_INET:
      fprintf(stderr, "IPv4");
      ;
      break;
    case AF_INET6:
      fprintf(stderr, "IPv6");
      ;
      break;
    default:
      fprintf(stderr, "Unknown address family");
      ;
      break;
    }
    switch (addr->ai_socktype) {
    case SOCK_DGRAM:
      fprintf(stderr, ", UDP");
      ;
      break;
    case SOCK_STREAM:
      fprintf(stderr, ", TCP");
      ;
      break;
    case SOCK_RAW:
      fprintf(stderr, ", RAW");
      ;
      break;
    default:
      fprintf(stderr, ", Unknown socket type.");
      ;
      break;
    }
    struct sockaddr_in *v4Addr;
    struct sockaddr_in6 *v6Addr;
    char straddr[INET6_ADDRSTRLEN];
    switch (addr->ai_family) {
    case AF_INET:
      v4Addr = (struct sockaddr_in *)addr->ai_addr;
      fprintf(stderr, ", %s:%d", inet_ntoa(v4Addr->sin_addr),
              ntohs(v4Addr->sin_port));
      ;
      break;
    case AF_INET6:
      v6Addr = (struct sockaddr_in6 *)addr->ai_addr;
      fprintf(stderr, ", %s:%d",
              inet_ntop(AF_INET6, &v6Addr->sin6_addr, straddr, sizeof(straddr)),
              ntohs(v6Addr->sin6_port));
      ;
      break;
    }
    fprintf(stderr, " ");
    fprintf(stderr, "\r\n");
    addr = addr->ai_next;
  }
}


x86 assembly (clang, -O0):
<printAddressStructures>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1425 <printAddressStructures+0x2e5>
mov    0x2e70(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    (%rax),%edi
mov    -0xc(%rbp),%edx
mov    %edx,%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
lea    0xe80(%rip),%rsi
xor    %eax,%eax
mov    %al,-0x35(%rbp)
call   1050 <fprintf@plt>
mov    -0x40(%rbp),%rcx
mov    -0x35(%rbp),%al
mov    (%rcx),%edi
lea    0xe72(%rip),%rsi
call   1050 <fprintf@plt>
mov    -0x40(%rbp),%rcx
mov    -0x35(%rbp),%al
mov    (%rcx),%edi
lea    0xe60(%rip),%rsi
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x34(%rbp)
sub    $0x83,%eax
je     11fc <printAddressStructures+0xbc>
jmp    11cd <printAddressStructures+0x8d>
mov    -0x34(%rbp),%eax
sub    $0x84,%eax
jne    1218 <printAddressStructures+0xd8>
jmp    11e0 <printAddressStructures+0xa0>
mov    0x2df1(%rip),%rax
mov    (%rax),%edi
lea    0xe23(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    122f <printAddressStructures+0xef>
mov    0x2dd5(%rip),%rax
mov    (%rax),%edi
lea    0xe0c(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    122f <printAddressStructures+0xef>
mov    0x2db9(%rip),%rax
mov    (%rax),%edi
lea    0xdf5(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
mov    %eax,-0x44(%rbp)
sub    $0x80,%eax
je     128b <printAddressStructures+0x14b>
jmp    1249 <printAddressStructures+0x109>
mov    -0x44(%rbp),%eax
sub    $0x81,%eax
je     12a7 <printAddressStructures+0x167>
jmp    125c <printAddressStructures+0x11c>
mov    -0x44(%rbp),%eax
sub    $0x82,%eax
jne    12c3 <printAddressStructures+0x183>
jmp    126f <printAddressStructures+0x12f>
mov    0x2d62(%rip),%rax
mov    (%rax),%edi
lea    0xdb5(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    12da <printAddressStructures+0x19a>
mov    0x2d46(%rip),%rax
mov    (%rax),%edi
lea    0xd9f(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    12da <printAddressStructures+0x19a>
mov    0x2d2a(%rip),%rax
mov    (%rax),%edi
lea    0xd89(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    12da <printAddressStructures+0x19a>
mov    0x2d0e(%rip),%rax
mov    (%rax),%edi
lea    0xd73(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    0x2d07(%rip),%rax
mov    (%rax),%eax
mov    %rax,-0x58(%rbp)
mov    %rsp,%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x50(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x30(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x48(%rbp)
sub    $0x83,%eax
je     1385 <printAddressStructures+0x245>
jmp    1323 <printAddressStructures+0x1e3>
mov    -0x48(%rbp),%eax
sub    $0x84,%eax
jne    13df <printAddressStructures+0x29f>
jmp    1336 <printAddressStructures+0x1f6>
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    0x2c8f(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x64(%rbp)
mov    -0x18(%rbp),%rax
mov    0x4(%rax),%edi
call   1040 <inet_ntoa@plt>
mov    %rax,-0x60(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%edi
call   1060 <ntohs@plt>
mov    -0x64(%rbp),%edi
mov    -0x60(%rbp),%rdx
mov    %eax,%ecx
lea    0xce4(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    13df <printAddressStructures+0x29f>
mov    -0x50(%rbp),%rdx
mov    -0x58(%rbp),%rax
mov    -0x8(%rbp),%rcx
mov    0x10(%rcx),%rcx
mov    %rcx,-0x20(%rbp)
mov    0x2c38(%rip),%rcx
mov    (%rcx),%ecx
mov    %ecx,-0x74(%rbp)
mov    -0x20(%rbp),%rsi
add    $0x4,%rsi
mov    %eax,%ecx
mov    $0x83,%edi
call   1030 <inet_ntop@plt>
mov    %rax,-0x70(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%edi
call   1060 <ntohs@plt>
mov    -0x74(%rbp),%edi
mov    -0x70(%rbp),%rdx
mov    %eax,%ecx
lea    0xc85(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    0x2bf2(%rip),%rax
mov    (%rax),%edi
lea    0xc22(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    0x2bdb(%rip),%rax
mov    (%rax),%edi
lea    0xc06(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x8(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,%rsp
jmp    1156 <printAddressStructures+0x16>
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printAddressStructures>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
test   %rdi,%rdi
je     12cb <printAddressStructures+0x18b>
mov    %rdi,%rbx
mov    0x2e74(%rip),%r15
lea    0xea1(%rip),%r12
xor    %r14d,%r14d
jmp    11ec <printAddressStructures+0xac>
mov    0x10(%rbx),%r12
mov    (%r15),%eax
mov    %eax,-0x2c(%rbp)
lea    0x4(%r12),%rsi
mov    $0x83,%edi
call   1030 <inet_ntop@plt>
mov    %r13,-0x38(%rbp)
mov    %rax,%r13
mov    (%r12),%edi
lea    0xe71(%rip),%r12
call   1060 <ntohs@plt>
mov    -0x2c(%rbp),%edi
lea    0xeb3(%rip),%rsi
mov    %r13,%rdx
mov    -0x38(%rbp),%r13
mov    %eax,%ecx
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    (%r15),%edi
lea    0xe4d(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    (%r15),%edi
mov    %r12,%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    0x8(%rbx),%rbx
mov    %r13,%rsp
add    $0x1,%r14d
test   %rbx,%rbx
je     12cb <printAddressStructures+0x18b>
mov    (%r15),%edi
lea    0xe0a(%rip),%rsi
mov    %r14d,%edx
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    (%r15),%edi
mov    %r12,%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    (%r15),%edi
lea    0xdf8(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    (%rbx),%eax
cmp    $0x83,%eax
lea    0xdf1(%rip),%rsi
lea    0xde5(%rip),%rcx
cmove  %rcx,%rsi
cmp    $0x84,%eax
lea    0xdd0(%rip),%rax
cmove  %rax,%rsi
mov    (%r15),%edi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    0x4(%rbx),%eax
add    $0xffffff80,%eax
lea    0xde8(%rip),%rsi
cmp    $0x2,%eax
ja     1273 <printAddressStructures+0x133>
cltq
lea    0xdfc(%rip),%rcx
movslq (%rcx,%rax,4),%rsi
add    %rcx,%rsi
mov    (%r15),%edi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    %rsp,%r13
mov    0x2d61(%rip),%rax
mov    (%rax),%ecx
mov    %rsp,%rdx
lea    0xf(%rcx),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rdx
mov    %rdx,%rsp
mov    (%rbx),%eax
cmp    $0x83,%eax
je     1170 <printAddressStructures+0x30>
cmp    $0x84,%eax
jne    11ba <printAddressStructures+0x7a>
mov    0x10(%rbx),%r12
mov    (%r15),%eax
mov    %eax,-0x2c(%rbp)
mov    0x4(%r12),%edi
call   1040 <inet_ntoa@plt>
jmp    1189 <printAddressStructures+0x49>
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.addrinfo = type { i32, i32, %struct.addrinfo*, i64 }
%struct.sockaddr_in = type { i32, i32 }
%struct.sockaddr_in6 = type { i32, i32 }
@stderr = global i32 0
@.str = [12 x i8] c"Address %d:\00"
@.str.1 = [3 x i8] c"\0D\0A\00"
@.str.2 = [4 x i8] c" \00"
@.str.3 = [5 x i8] c"IPv4\00"
@.str.4 = [5 x i8] c"IPv6\00"
@.str.5 = [23 x i8] c"Unknown address family\00"
@.str.6 = [6 x i8] c", UDP\00"
@.str.7 = [6 x i8] c", TCP\00"
@.str.8 = [6 x i8] c", RAW\00"
@.str.9 = [23 x i8] c", Unknown socket type.\00"
@INET6_ADDRSTRLEN = global i32 0
@.str.10 = [8 x i8] c", %s:%d\00"
@.str.11 = [2 x i8] c" \00"
define void @printAddressStructures(%struct.addrinfo* %0) {
%2 = alloca %struct.addrinfo*
%3 = alloca i32
%4 = alloca %struct.sockaddr_in*
%5 = alloca %struct.sockaddr_in6*
%6 = alloca i8*
%7 = alloca i64
store %struct.addrinfo* %0, %struct.addrinfo** %2
store i32 0, i32* %3
br label %8
8: ; preds = %86, %1
%9 = load %struct.addrinfo*, %struct.addrinfo** %2
%10 = icmp ne %struct.addrinfo* %9, null
br i1 %10, label %11, label %95
11: ; preds = %8
%12 = load i32, i32* @stderr
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 1
store i32 %14, i32* %3
%15 = call i32 (i32, i8*, ...) @fprintf(i32 %12, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %13)
%16 = load i32, i32* @stderr
%17 = call i32 (i32, i8*, ...) @fprintf(i32 %16, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%18 = load i32, i32* @stderr
%19 = call i32 (i32, i8*, ...) @fprintf(i32 %18, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%20 = load %struct.addrinfo*, %struct.addrinfo** %2
%21 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %20, i32 0, i32 0
%22 = load i32, i32* %21
switch i32 %22, label %29 [
i32 132, label %23
i32 131, label %26
]
23: ; preds = %11
%24 = load i32, i32* @stderr
%25 = call i32 (i32, i8*, ...) @fprintf(i32 %24, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
br label %32
26: ; preds = %11
%27 = load i32, i32* @stderr
%28 = call i32 (i32, i8*, ...) @fprintf(i32 %27, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
br label %32
29: ; preds = %11
%30 = load i32, i32* @stderr
%31 = call i32 (i32, i8*, ...) @fprintf(i32 %30, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0))
br label %32
32: ; preds = %29, %26, %23
%33 = load %struct.addrinfo*, %struct.addrinfo** %2
%34 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %33, i32 0, i32 1
%35 = load i32, i32* %34
switch i32 %35, label %45 [
i32 130, label %36
i32 128, label %39
i32 129, label %42
]
36: ; preds = %32
%37 = load i32, i32* @stderr
%38 = call i32 (i32, i8*, ...) @fprintf(i32 %37, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0))
br label %48
39: ; preds = %32
%40 = load i32, i32* @stderr
%41 = call i32 (i32, i8*, ...) @fprintf(i32 %40, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
br label %48
42: ; preds = %32
%43 = load i32, i32* @stderr
%44 = call i32 (i32, i8*, ...) @fprintf(i32 %43, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0))
br label %48
45: ; preds = %32
%46 = load i32, i32* @stderr
%47 = call i32 (i32, i8*, ...) @fprintf(i32 %46, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.9, i64 0, i64 0))
br label %48
48: ; preds = %45, %42, %39, %36
%49 = load i32, i32* @INET6_ADDRSTRLEN
%50 = zext i32 %49 to i64
%51 = call i8* @llvm.stacksave()
store i8* %51, i8** %6
%52 = alloca i8, i64 %50
store i64 %50, i64* %7
%53 = load %struct.addrinfo*, %struct.addrinfo** %2
%54 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %53, i32 0, i32 0
%55 = load i32, i32* %54
switch i32 %55, label %86 [
i32 132, label %56
i32 131, label %71
]
56: ; preds = %48
%57 = load %struct.addrinfo*, %struct.addrinfo** %2
%58 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %57, i32 0, i32 3
%59 = load i64, i64* %58
%60 = inttoptr i64 %59 to %struct.sockaddr_in*
store %struct.sockaddr_in* %60, %struct.sockaddr_in** %4
%61 = load i32, i32* @stderr
%62 = load %struct.sockaddr_in*, %struct.sockaddr_in** %4
%63 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %62, i32 0, i32 1
%64 = load i32, i32* %63
%65 = call i8* @inet_ntoa(i32 %64)
%66 = load %struct.sockaddr_in*, %struct.sockaddr_in** %4
%67 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %66, i32 0, i32 0
%68 = load i32, i32* %67
%69 = call i32 @ntohs(i32 %68)
%70 = call i32 (i32, i8*, ...) @fprintf(i32 %61, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0), i8* %65, i32 %69)
br label %86
71: ; preds = %48
%72 = load %struct.addrinfo*, %struct.addrinfo** %2
%73 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %72, i32 0, i32 3
%74 = load i64, i64* %73
%75 = inttoptr i64 %74 to %struct.sockaddr_in6*
store %struct.sockaddr_in6* %75, %struct.sockaddr_in6** %5
%76 = load i32, i32* @stderr
%77 = load %struct.sockaddr_in6*, %struct.sockaddr_in6** %5
%78 = getelementptr inbounds %struct.sockaddr_in6, %struct.sockaddr_in6* %77, i32 0, i32 1
%79 = trunc i64 %50 to i32
%80 = call i8* @inet_ntop(i32 131, i32* %78, i8* %52, i32 %79)
%81 = load %struct.sockaddr_in6*, %struct.sockaddr_in6** %5
%82 = getelementptr inbounds %struct.sockaddr_in6, %struct.sockaddr_in6* %81, i32 0, i32 0
%83 = load i32, i32* %82
%84 = call i32 @ntohs(i32 %83)
%85 = call i32 (i32, i8*, ...) @fprintf(i32 %76, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0), i8* %80, i32 %84)
br label %86
86: ; preds = %48, %71, %56
%87 = load i32, i32* @stderr
%88 = call i32 (i32, i8*, ...) @fprintf(i32 %87, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0))
%89 = load i32, i32* @stderr
%90 = call i32 (i32, i8*, ...) @fprintf(i32 %89, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%91 = load %struct.addrinfo*, %struct.addrinfo** %2
%92 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %91, i32 0, i32 2
%93 = load %struct.addrinfo*, %struct.addrinfo** %92
store %struct.addrinfo* %93, %struct.addrinfo** %2
%94 = load i8*, i8** %6
br label %8
95: ; preds = %8
ret void
}

LLVM IR (-O2):
%struct.addrinfo = type { i32, i32, %struct.addrinfo*, i64 }
%struct.sockaddr_in = type { i32, i32 }
%struct.sockaddr_in6 = type { i32, i32 }
@stderr = global i32 0
@.str = [12 x i8] c"Address %d:\00"
@.str.1 = [3 x i8] c"\0D\0A\00"
@.str.2 = [4 x i8] c" \00"
@.str.3 = [5 x i8] c"IPv4\00"
@.str.4 = [5 x i8] c"IPv6\00"
@.str.5 = [23 x i8] c"Unknown address family\00"
@.str.6 = [6 x i8] c", UDP\00"
@.str.7 = [6 x i8] c", TCP\00"
@.str.8 = [6 x i8] c", RAW\00"
@.str.9 = [23 x i8] c", Unknown socket type.\00"
@INET6_ADDRSTRLEN = global i32 0
@.str.10 = [8 x i8] c", %s:%d\00"
@.str.11 = [2 x i8] c" \00"
@reltable.printAddressStructures = [3 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str.7 to i64), i64 ptrtoint ([3 x i32]* @reltable.printAddressStructures to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str.8 to i64), i64 ptrtoint ([3 x i32]* @reltable.printAddressStructures to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str.6 to i64), i64 ptrtoint ([3 x i32]* @reltable.printAddressStructures to i64)) to i32)]
define void @printAddressStructures(%struct.addrinfo* %0) {
%2 = icmp eq %struct.addrinfo* %0, null
br i1 %2, label %69, label %3
3: ; preds = %1, %61
%4 = phi %struct.addrinfo* [ %67, %61 ], [ %0, %1 ]
%5 = phi i32 [ %7, %61 ], [ 0, %1 ]
%6 = load i32, i32* @stderr
%7 = add nuw nsw i32 %5, 1
%8 = call i32 (i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %5)
%9 = load i32, i32* @stderr
%10 = call i32 (i32, i8*, ...) @fprintf(i32 %9, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%11 = load i32, i32* @stderr
%12 = call i32 (i32, i8*, ...) @fprintf(i32 %11, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%13 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %4, i64 0, i32 0
%14 = load i32, i32* %13
%15 = icmp eq i32 %14, 131
%16 = select i1 %15, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0)
%17 = icmp eq i32 %14, 132
%18 = select i1 %17, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* %16
%19 = load i32, i32* @stderr
%20 = call i32 (i32, i8*, ...) @fprintf(i32 %19, i8* %18)
%21 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %4, i64 0, i32 1
%22 = load i32, i32* %21
%23 = add i32 %22, -128
%24 = icmp ult i32 %23, 3
br i1 %24, label %25, label %29
25: ; preds = %3
%26 = sext i32 %23 to i64
%27 = shl i64 %26, 2
%28 = call i8* @llvm.load.relative.i64(i8* bitcast ([3 x i32]* @reltable.printAddressStructures to i8*), i64 %27)
br label %29
29: ; preds = %3, %25
%30 = phi i8* [ %28, %25 ], [ getelementptr inbounds ([23 x i8], [23 x i8]* @.str.9, i64 0, i64 0), %3 ]
%31 = load i32, i32* @stderr
%32 = call i32 (i32, i8*, ...) @fprintf(i32 %31, i8* %30)
%33 = load i32, i32* @INET6_ADDRSTRLEN
%34 = zext i32 %33 to i64
%35 = call i8* @llvm.stacksave()
%36 = alloca i8, i64 %34
%37 = load i32, i32* %13
switch i32 %37, label %61 [
i32 132, label %38
i32 131, label %50
]
38: ; preds = %29
%39 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %4, i64 0, i32 3
%40 = load i64, i64* %39
%41 = inttoptr i64 %40 to %struct.sockaddr_in*
%42 = load i32, i32* @stderr
%43 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %41, i64 0, i32 1
%44 = load i32, i32* %43
%45 = call i8* @inet_ntoa(i32 %44)
%46 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %41, i64 0, i32 0
%47 = load i32, i32* %46
%48 = call i32 @ntohs(i32 %47)
%49 = call i32 (i32, i8*, ...) @fprintf(i32 %42, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0), i8* %45, i32 %48)
br label %61
50: ; preds = %29
%51 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %4, i64 0, i32 3
%52 = load i64, i64* %51
%53 = inttoptr i64 %52 to %struct.sockaddr_in6*
%54 = load i32, i32* @stderr
%55 = getelementptr inbounds %struct.sockaddr_in6, %struct.sockaddr_in6* %53, i64 0, i32 1
%56 = call i8* @inet_ntop(i32 131, i32* %55, i8* %36, i32 %33)
%57 = getelementptr inbounds %struct.sockaddr_in6, %struct.sockaddr_in6* %53, i64 0, i32 0
%58 = load i32, i32* %57
%59 = call i32 @ntohs(i32 %58)
%60 = call i32 (i32, i8*, ...) @fprintf(i32 %54, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0), i8* %56, i32 %59)
br label %61
61: ; preds = %29, %50, %38
%62 = load i32, i32* @stderr
%63 = call i32 (i32, i8*, ...) @fprintf(i32 %62, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0))
%64 = load i32, i32* @stderr
%65 = call i32 (i32, i8*, ...) @fprintf(i32 %64, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%66 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %4, i64 0, i32 2
%67 = load %struct.addrinfo*, %struct.addrinfo** %66
%68 = icmp eq %struct.addrinfo* %67, null
br i1 %68, label %69, label %3
69: ; preds = %61, %1
ret void
}