#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 */

/* Variables and functions */
int /*<<< orphan*/ AF_INET;
int /*<<< orphan*/ EAI_AGAIN;
int /*<<< orphan*/ EAI_BADFLAGS;
int /*<<< orphan*/ EAI_FAIL;
int /*<<< orphan*/ EAI_FAMILY;
int /*<<< orphan*/ EAI_MEMORY;
int /*<<< orphan*/ EAI_NONAME;
int /*<<< orphan*/ EAI_OVERFLOW;
int /*<<< orphan*/ EAI_SERVICE;
int /*<<< orphan*/ EAI_SOCKTYPE;
int /*<<< orphan*/ EAI_SYSTEM;
int /*<<< orphan*/ HOST_NOT_FOUND;
int /*<<< orphan*/ NO_DATA;
int /*<<< orphan*/ NO_RECOVERY;
int /*<<< orphan*/ TRY_AGAIN;
int _gai_strerror(char *, int /*<<< orphan*/);
int _getaddrinfo(char const *);
int _gethostbyaddr(char const *, char *, int, int /*<<< orphan*/);
int _gethostent(char const *);
int _getnameinfo(char const *, int, char *);
int _getnetent(char const *);
int _getprotoent(char const *);
int _getservbyname(char const *, char *, char *);
int _getservbyport(char const *, int, char *);
int _getservent(char const *);
int _hstrerror(char *, int /*<<< orphan*/);
int _netdb(char const *progname) {
  int ret = 0;
  ret |= _gethostbyaddr(progname, "\x7f\x00\x00\x01", 4, AF_INET);
  ret |= _gethostent(progname);
  ret |= _getnameinfo(progname, 22, "ssh");
  ret |= _getnameinfo(progname, 23, "telnet");
  ret |= _getnetent(progname);
  ret |= _getprotoent(progname);
  ret |= _getservbyname(progname, "ssh", "tcp");
  ret |= _getservbyport(progname, 22, "tcp");
  ret |= _getservent(progname);
  ret |= _hstrerror("HOST_NOT_FOUND", HOST_NOT_FOUND);
  ret |= _hstrerror("TRY_AGAIN", TRY_AGAIN);
  ret |= _hstrerror("NO_RECOVERY", NO_RECOVERY);
  ret |= _hstrerror("NO_DATA", NO_DATA);
  ret |= _gai_strerror("EAI_AGAIN", EAI_AGAIN);
  ret |= _gai_strerror("EAI_BADFLAGS", EAI_BADFLAGS);
  ret |= _gai_strerror("EAI_FAIL", EAI_FAIL);
  ret |= _gai_strerror("EAI_FAMILY", EAI_FAMILY);
  ret |= _gai_strerror("EAI_MEMORY", EAI_MEMORY);
  ret |= _gai_strerror("EAI_NONAME", EAI_NONAME);
  ret |= _gai_strerror("EAI_OVERFLOW", EAI_OVERFLOW);
  ret |= _gai_strerror("EAI_SERVICE", EAI_SERVICE);
  ret |= _gai_strerror("EAI_SOCKTYPE", EAI_SOCKTYPE);
  ret |= _gai_strerror("EAI_SYSTEM", EAI_SYSTEM);
  ret |= _getaddrinfo(progname);
  return ret;
}


x86 assembly (clang, -O0):
<_netdb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2e0a(%rip),%rax
mov    (%rax),%ecx
lea    0xe29(%rip),%rsi
mov    $0x4,%edx
call   1050 <_gethostbyaddr@plt>
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1060 <_gethostent@plt>
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x16,%esi
lea    0xdff(%rip),%rdx
call   1080 <_getnameinfo@plt>
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x17,%esi
lea    0xde8(%rip),%rdx
call   1080 <_getnameinfo@plt>
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   10c0 <_getnetent@plt>
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   10d0 <_getprotoent@plt>
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xdb0(%rip),%rsi
lea    0xdb4(%rip),%rdx
call   10b0 <_getservbyname@plt>
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x16,%esi
lea    0xd99(%rip),%rdx
call   1040 <_getservbyport@plt>
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <_getservent@plt>
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    0x2d28(%rip),%rax
mov    (%rax),%esi
lea    0xd73(%rip),%rdi
call   1090 <_hstrerror@plt>
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    0x2ce5(%rip),%rax
mov    (%rax),%esi
lea    0xd67(%rip),%rdi
call   1090 <_hstrerror@plt>
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    0x2cba(%rip),%rax
mov    (%rax),%esi
lea    0xd56(%rip),%rdi
call   1090 <_hstrerror@plt>
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    0x2c8f(%rip),%rax
mov    (%rax),%esi
lea    0xd47(%rip),%rdi
call   1090 <_hstrerror@plt>
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    0x2c8c(%rip),%rax
mov    (%rax),%esi
lea    0xd34(%rip),%rdi
call   10a0 <_gai_strerror@plt>
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    0x2c99(%rip),%rax
mov    (%rax),%esi
lea    0xd23(%rip),%rdi
call   10a0 <_gai_strerror@plt>
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    0x2c36(%rip),%rax
mov    (%rax),%esi
lea    0xd15(%rip),%rdi
call   10a0 <_gai_strerror@plt>
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    0x2c5b(%rip),%rax
mov    (%rax),%esi
lea    0xd03(%rip),%rdi
call   10a0 <_gai_strerror@plt>
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    0x2c10(%rip),%rax
mov    (%rax),%esi
lea    0xcf3(%rip),%rdi
call   10a0 <_gai_strerror@plt>
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    0x2c45(%rip),%rax
mov    (%rax),%esi
lea    0xce3(%rip),%rdi
call   10a0 <_gai_strerror@plt>
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    0x2c02(%rip),%rax
mov    (%rax),%esi
lea    0xcd3(%rip),%rdi
call   10a0 <_gai_strerror@plt>
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    0x2c27(%rip),%rax
mov    (%rax),%esi
lea    0xcc5(%rip),%rdi
call   10a0 <_gai_strerror@plt>
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    0x2c14(%rip),%rax
mov    (%rax),%esi
lea    0xcb6(%rip),%rdi
call   10a0 <_gai_strerror@plt>
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    0x2bd1(%rip),%rax
mov    (%rax),%esi
lea    0xca8(%rip),%rdi
call   10a0 <_gai_strerror@plt>
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1070 <_getaddrinfo@plt>
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_netdb>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rdi,%r14
mov    0x2e13(%rip),%rax
mov    (%rax),%ecx
lea    0xe32(%rip),%rsi
mov    $0x4,%edx
call   1050 <_gethostbyaddr@plt>
mov    %eax,%r15d
mov    %r14,%rdi
call   1060 <_gethostent@plt>
mov    %eax,%ebp
lea    0xe19(%rip),%r12
mov    %r14,%rdi
mov    $0x16,%esi
mov    %r12,%rdx
call   1080 <_getnameinfo@plt>
mov    %eax,%ebx
or     %ebp,%ebx
lea    0xe02(%rip),%rdx
mov    %r14,%rdi
mov    $0x17,%esi
call   1080 <_getnameinfo@plt>
mov    %eax,%ebp
or     %ebx,%ebp
mov    %r14,%rdi
call   10c0 <_getnetent@plt>
mov    %eax,%ebx
or     %ebp,%ebx
mov    %r14,%rdi
call   10d0 <_getprotoent@plt>
mov    %eax,%ebp
or     %ebx,%ebp
lea    0xdd9(%rip),%r13
mov    %r14,%rdi
mov    %r12,%rsi
mov    %r13,%rdx
call   10b0 <_getservbyname@plt>
mov    %eax,%ebx
or     %ebp,%ebx
mov    %r14,%rdi
mov    $0x16,%esi
mov    %r13,%rdx
call   1040 <_getservbyport@plt>
mov    %eax,%ebp
or     %ebx,%ebp
mov    %r14,%rdi
call   1030 <_getservent@plt>
mov    %eax,%ebx
or     %ebp,%ebx
or     %r15d,%ebx
mov    0x2d4d(%rip),%rax
mov    (%rax),%esi
lea    0xd98(%rip),%rdi
call   1090 <_hstrerror@plt>
mov    %eax,%r15d
mov    0x2d0d(%rip),%rax
mov    (%rax),%esi
lea    0xd8f(%rip),%rdi
call   1090 <_hstrerror@plt>
mov    %eax,%ebp
or     %r15d,%ebp
or     %ebx,%ebp
mov    0x2ce1(%rip),%rax
mov    (%rax),%esi
lea    0xd7d(%rip),%rdi
call   1090 <_hstrerror@plt>
mov    %eax,%r15d
mov    0x2cb9(%rip),%rax
mov    (%rax),%esi
lea    0xd71(%rip),%rdi
call   1090 <_hstrerror@plt>
mov    %eax,%ebx
or     %r15d,%ebx
mov    0x2cb7(%rip),%rax
mov    (%rax),%esi
lea    0xd5f(%rip),%rdi
call   10a0 <_gai_strerror@plt>
mov    %eax,%r15d
or     %ebx,%r15d
or     %ebp,%r15d
mov    0x2cc1(%rip),%rax
mov    (%rax),%esi
lea    0xd4b(%rip),%rdi
call   10a0 <_gai_strerror@plt>
mov    %eax,%ebx
mov    0x2c62(%rip),%rax
mov    (%rax),%esi
lea    0xd41(%rip),%rdi
call   10a0 <_gai_strerror@plt>
mov    %eax,%ebp
or     %ebx,%ebp
mov    0x2c89(%rip),%rax
mov    (%rax),%esi
lea    0xd31(%rip),%rdi
call   10a0 <_gai_strerror@plt>
mov    %eax,%ebx
or     %ebp,%ebx
mov    0x2c40(%rip),%rax
mov    (%rax),%esi
lea    0xd23(%rip),%rdi
call   10a0 <_gai_strerror@plt>
mov    %eax,%r12d
or     %ebx,%r12d
or     %r15d,%r12d
mov    0x2c72(%rip),%rax
mov    (%rax),%esi
lea    0xd10(%rip),%rdi
call   10a0 <_gai_strerror@plt>
mov    %eax,%r15d
mov    0x2c32(%rip),%rax
mov    (%rax),%esi
lea    0xd03(%rip),%rdi
call   10a0 <_gai_strerror@plt>
mov    %eax,%ebx
or     %r15d,%ebx
mov    0x2c58(%rip),%rax
mov    (%rax),%esi
lea    0xcf6(%rip),%rdi
call   10a0 <_gai_strerror@plt>
mov    %eax,%ebp
or     %ebx,%ebp
mov    0x2c47(%rip),%rax
mov    (%rax),%esi
lea    0xce9(%rip),%rdi
call   10a0 <_gai_strerror@plt>
mov    %eax,%ebx
or     %ebp,%ebx
mov    0x2c06(%rip),%rax
mov    (%rax),%esi
lea    0xcdd(%rip),%rdi
call   10a0 <_gai_strerror@plt>
mov    %eax,%ebp
or     %ebx,%ebp
or     %r12d,%ebp
mov    %r14,%rdi
call   1070 <_getaddrinfo@plt>
or     %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"\7F\00\00\01\00"
@AF_INET = global i32 0
@.str.1 = [4 x i8] c"ssh\00"
@.str.2 = [7 x i8] c"telnet\00"
@.str.3 = [4 x i8] c"tcp\00"
@.str.4 = [15 x i8] c"HOST_NOT_FOUND\00"
@HOST_NOT_FOUND = global i32 0
@.str.5 = [10 x i8] c"TRY_AGAIN\00"
@TRY_AGAIN = global i32 0
@.str.6 = [12 x i8] c"NO_RECOVERY\00"
@NO_RECOVERY = global i32 0
@.str.7 = [8 x i8] c"NO_DATA\00"
@NO_DATA = global i32 0
@.str.8 = [10 x i8] c"EAI_AGAIN\00"
@EAI_AGAIN = global i32 0
@.str.9 = [13 x i8] c"EAI_BADFLAGS\00"
@EAI_BADFLAGS = global i32 0
@.str.10 = [9 x i8] c"EAI_FAIL\00"
@EAI_FAIL = global i32 0
@.str.11 = [11 x i8] c"EAI_FAMILY\00"
@EAI_FAMILY = global i32 0
@.str.12 = [11 x i8] c"EAI_MEMORY\00"
@EAI_MEMORY = global i32 0
@.str.13 = [11 x i8] c"EAI_NONAME\00"
@EAI_NONAME = global i32 0
@.str.14 = [13 x i8] c"EAI_OVERFLOW\00"
@EAI_OVERFLOW = global i32 0
@.str.15 = [12 x i8] c"EAI_SERVICE\00"
@EAI_SERVICE = global i32 0
@.str.16 = [13 x i8] c"EAI_SOCKTYPE\00"
@EAI_SOCKTYPE = global i32 0
@.str.17 = [11 x i8] c"EAI_SYSTEM\00"
@EAI_SYSTEM = global i32 0
define i32 @_netdb(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
%4 = load i8*, i8** %2
%5 = load i32, i32* @AF_INET
%6 = call i32 @_gethostbyaddr(i8* %4, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 4, i32 %5)
%7 = load i32, i32* %3
%8 = or i32 %7, %6
store i32 %8, i32* %3
%9 = load i8*, i8** %2
%10 = call i32 @_gethostent(i8* %9)
%11 = load i32, i32* %3
%12 = or i32 %11, %10
store i32 %12, i32* %3
%13 = load i8*, i8** %2
%14 = call i32 @_getnameinfo(i8* %13, i32 22, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%15 = load i32, i32* %3
%16 = or i32 %15, %14
store i32 %16, i32* %3
%17 = load i8*, i8** %2
%18 = call i32 @_getnameinfo(i8* %17, i32 23, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%19 = load i32, i32* %3
%20 = or i32 %19, %18
store i32 %20, i32* %3
%21 = load i8*, i8** %2
%22 = call i32 @_getnetent(i8* %21)
%23 = load i32, i32* %3
%24 = or i32 %23, %22
store i32 %24, i32* %3
%25 = load i8*, i8** %2
%26 = call i32 @_getprotoent(i8* %25)
%27 = load i32, i32* %3
%28 = or i32 %27, %26
store i32 %28, i32* %3
%29 = load i8*, i8** %2
%30 = call i32 @_getservbyname(i8* %29, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%31 = load i32, i32* %3
%32 = or i32 %31, %30
store i32 %32, i32* %3
%33 = load i8*, i8** %2
%34 = call i32 @_getservbyport(i8* %33, i32 22, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%35 = load i32, i32* %3
%36 = or i32 %35, %34
store i32 %36, i32* %3
%37 = load i8*, i8** %2
%38 = call i32 @_getservent(i8* %37)
%39 = load i32, i32* %3
%40 = or i32 %39, %38
store i32 %40, i32* %3
%41 = load i32, i32* @HOST_NOT_FOUND
%42 = call i32 @_hstrerror(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), i32 %41)
%43 = load i32, i32* %3
%44 = or i32 %43, %42
store i32 %44, i32* %3
%45 = load i32, i32* @TRY_AGAIN
%46 = call i32 @_hstrerror(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i32 %45)
%47 = load i32, i32* %3
%48 = or i32 %47, %46
store i32 %48, i32* %3
%49 = load i32, i32* @NO_RECOVERY
%50 = call i32 @_hstrerror(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i32 %49)
%51 = load i32, i32* %3
%52 = or i32 %51, %50
store i32 %52, i32* %3
%53 = load i32, i32* @NO_DATA
%54 = call i32 @_hstrerror(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), i32 %53)
%55 = load i32, i32* %3
%56 = or i32 %55, %54
store i32 %56, i32* %3
%57 = load i32, i32* @EAI_AGAIN
%58 = call i32 @_gai_strerror(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0), i32 %57)
%59 = load i32, i32* %3
%60 = or i32 %59, %58
store i32 %60, i32* %3
%61 = load i32, i32* @EAI_BADFLAGS
%62 = call i32 @_gai_strerror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.9, i64 0, i64 0), i32 %61)
%63 = load i32, i32* %3
%64 = or i32 %63, %62
store i32 %64, i32* %3
%65 = load i32, i32* @EAI_FAIL
%66 = call i32 @_gai_strerror(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i64 0, i64 0), i32 %65)
%67 = load i32, i32* %3
%68 = or i32 %67, %66
store i32 %68, i32* %3
%69 = load i32, i32* @EAI_FAMILY
%70 = call i32 @_gai_strerror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.11, i64 0, i64 0), i32 %69)
%71 = load i32, i32* %3
%72 = or i32 %71, %70
store i32 %72, i32* %3
%73 = load i32, i32* @EAI_MEMORY
%74 = call i32 @_gai_strerror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.12, i64 0, i64 0), i32 %73)
%75 = load i32, i32* %3
%76 = or i32 %75, %74
store i32 %76, i32* %3
%77 = load i32, i32* @EAI_NONAME
%78 = call i32 @_gai_strerror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.13, i64 0, i64 0), i32 %77)
%79 = load i32, i32* %3
%80 = or i32 %79, %78
store i32 %80, i32* %3
%81 = load i32, i32* @EAI_OVERFLOW
%82 = call i32 @_gai_strerror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.14, i64 0, i64 0), i32 %81)
%83 = load i32, i32* %3
%84 = or i32 %83, %82
store i32 %84, i32* %3
%85 = load i32, i32* @EAI_SERVICE
%86 = call i32 @_gai_strerror(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.15, i64 0, i64 0), i32 %85)
%87 = load i32, i32* %3
%88 = or i32 %87, %86
store i32 %88, i32* %3
%89 = load i32, i32* @EAI_SOCKTYPE
%90 = call i32 @_gai_strerror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.16, i64 0, i64 0), i32 %89)
%91 = load i32, i32* %3
%92 = or i32 %91, %90
store i32 %92, i32* %3
%93 = load i32, i32* @EAI_SYSTEM
%94 = call i32 @_gai_strerror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.17, i64 0, i64 0), i32 %93)
%95 = load i32, i32* %3
%96 = or i32 %95, %94
store i32 %96, i32* %3
%97 = load i8*, i8** %2
%98 = call i32 @_getaddrinfo(i8* %97)
%99 = load i32, i32* %3
%100 = or i32 %99, %98
store i32 %100, i32* %3
%101 = load i32, i32* %3
ret i32 %101
}

LLVM IR (-O2):
@.str = [5 x i8] c"\7F\00\00\01\00"
@AF_INET = global i32 0
@.str.1 = [4 x i8] c"ssh\00"
@.str.2 = [7 x i8] c"telnet\00"
@.str.3 = [4 x i8] c"tcp\00"
@.str.4 = [15 x i8] c"HOST_NOT_FOUND\00"
@HOST_NOT_FOUND = global i32 0
@.str.5 = [10 x i8] c"TRY_AGAIN\00"
@TRY_AGAIN = global i32 0
@.str.6 = [12 x i8] c"NO_RECOVERY\00"
@NO_RECOVERY = global i32 0
@.str.7 = [8 x i8] c"NO_DATA\00"
@NO_DATA = global i32 0
@.str.8 = [10 x i8] c"EAI_AGAIN\00"
@EAI_AGAIN = global i32 0
@.str.9 = [13 x i8] c"EAI_BADFLAGS\00"
@EAI_BADFLAGS = global i32 0
@.str.10 = [9 x i8] c"EAI_FAIL\00"
@EAI_FAIL = global i32 0
@.str.11 = [11 x i8] c"EAI_FAMILY\00"
@EAI_FAMILY = global i32 0
@.str.12 = [11 x i8] c"EAI_MEMORY\00"
@EAI_MEMORY = global i32 0
@.str.13 = [11 x i8] c"EAI_NONAME\00"
@EAI_NONAME = global i32 0
@.str.14 = [13 x i8] c"EAI_OVERFLOW\00"
@EAI_OVERFLOW = global i32 0
@.str.15 = [12 x i8] c"EAI_SERVICE\00"
@EAI_SERVICE = global i32 0
@.str.16 = [13 x i8] c"EAI_SOCKTYPE\00"
@EAI_SOCKTYPE = global i32 0
@.str.17 = [11 x i8] c"EAI_SYSTEM\00"
@EAI_SYSTEM = global i32 0
define i32 @_netdb(i8* %0) {
%2 = load i32, i32* @AF_INET
%3 = tail call i32 @_gethostbyaddr(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 4, i32 %2)
%4 = tail call i32 @_gethostent(i8* %0)
%5 = or i32 %4, %3
%6 = tail call i32 @_getnameinfo(i8* %0, i32 22, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%7 = or i32 %5, %6
%8 = tail call i32 @_getnameinfo(i8* %0, i32 23, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%9 = or i32 %7, %8
%10 = tail call i32 @_getnetent(i8* %0)
%11 = or i32 %9, %10
%12 = tail call i32 @_getprotoent(i8* %0)
%13 = or i32 %11, %12
%14 = tail call i32 @_getservbyname(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%15 = or i32 %13, %14
%16 = tail call i32 @_getservbyport(i8* %0, i32 22, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%17 = or i32 %15, %16
%18 = tail call i32 @_getservent(i8* %0)
%19 = or i32 %17, %18
%20 = load i32, i32* @HOST_NOT_FOUND
%21 = tail call i32 @_hstrerror(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), i32 %20)
%22 = or i32 %19, %21
%23 = load i32, i32* @TRY_AGAIN
%24 = tail call i32 @_hstrerror(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i32 %23)
%25 = or i32 %22, %24
%26 = load i32, i32* @NO_RECOVERY
%27 = tail call i32 @_hstrerror(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i32 %26)
%28 = or i32 %25, %27
%29 = load i32, i32* @NO_DATA
%30 = tail call i32 @_hstrerror(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), i32 %29)
%31 = or i32 %28, %30
%32 = load i32, i32* @EAI_AGAIN
%33 = tail call i32 @_gai_strerror(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0), i32 %32)
%34 = or i32 %31, %33
%35 = load i32, i32* @EAI_BADFLAGS
%36 = tail call i32 @_gai_strerror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.9, i64 0, i64 0), i32 %35)
%37 = or i32 %34, %36
%38 = load i32, i32* @EAI_FAIL
%39 = tail call i32 @_gai_strerror(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i64 0, i64 0), i32 %38)
%40 = or i32 %37, %39
%41 = load i32, i32* @EAI_FAMILY
%42 = tail call i32 @_gai_strerror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.11, i64 0, i64 0), i32 %41)
%43 = or i32 %40, %42
%44 = load i32, i32* @EAI_MEMORY
%45 = tail call i32 @_gai_strerror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.12, i64 0, i64 0), i32 %44)
%46 = or i32 %43, %45
%47 = load i32, i32* @EAI_NONAME
%48 = tail call i32 @_gai_strerror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.13, i64 0, i64 0), i32 %47)
%49 = or i32 %46, %48
%50 = load i32, i32* @EAI_OVERFLOW
%51 = tail call i32 @_gai_strerror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.14, i64 0, i64 0), i32 %50)
%52 = or i32 %49, %51
%53 = load i32, i32* @EAI_SERVICE
%54 = tail call i32 @_gai_strerror(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.15, i64 0, i64 0), i32 %53)
%55 = or i32 %52, %54
%56 = load i32, i32* @EAI_SOCKTYPE
%57 = tail call i32 @_gai_strerror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.16, i64 0, i64 0), i32 %56)
%58 = or i32 %55, %57
%59 = load i32, i32* @EAI_SYSTEM
%60 = tail call i32 @_gai_strerror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.17, i64 0, i64 0), i32 %59)
%61 = or i32 %58, %60
%62 = tail call i32 @_getaddrinfo(i8* %0)
%63 = or i32 %61, %62
ret i32 %63
}