#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 {
  int dummy;
};
typedef enum nss_status { ____Placeholder_nss_status } nss_status;

/* Variables and functions */
int /*<<< orphan*/ AF_UNSPEC;
int _nss_ddnss_gethostbyname3_r(char const *, int /*<<< orphan*/,
                                struct hostent *, char *, size_t, int *, int *,
                                int /*<<< orphan*/ *, int /*<<< orphan*/ *);
enum nss_status _nss_ddnss_gethostbyname_r(const char *name,
                                           struct hostent *host, char *buffer,
                                           size_t buflen, int *errnop,
                                           int *h_errnop) {
  return _nss_ddnss_gethostbyname3_r(name, AF_UNSPEC, host, buffer, buflen,
                                     errnop, h_errnop, NULL, NULL);
}


x86 assembly (clang, -O0):
<_nss_ddnss_gethostbyname_r>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ead(%rip),%rax
mov    (%rax),%esi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
mov    -0x28(%rbp),%r9
mov    -0x30(%rbp),%rax
xor    %r10d,%r10d
mov    %rax,(%rsp)
movq   $0x0,0x8(%rsp)
movq   $0x0,0x10(%rsp)
call   1030 <_nss_ddnss_gethostbyname3_r@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_nss_ddnss_gethostbyname_r>:
sub    $0x18,%rsp
mov    %r8,%rax
mov    %rcx,%r8
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    0x2ec1(%rip),%rsi
mov    (%rsi),%esi
xorps  %xmm0,%xmm0
movups %xmm0,0x8(%rsp)
mov    %r9,(%rsp)
mov    %rax,%r9
call   1030 <_nss_ddnss_gethostbyname3_r@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.hostent = type { i32 }
@AF_UNSPEC = global i32 0
define i32 @_nss_ddnss_gethostbyname_r(i8* %0, %struct.hostent* %1, i8* %2, i64 %3, i32* %4, i32* %5) {
%7 = alloca i8*
%8 = alloca %struct.hostent*
%9 = alloca i8*
%10 = alloca i64
%11 = alloca i32*
%12 = alloca i32*
store i8* %0, i8** %7
store %struct.hostent* %1, %struct.hostent** %8
store i8* %2, i8** %9
store i64 %3, i64* %10
store i32* %4, i32** %11
store i32* %5, i32** %12
%13 = load i8*, i8** %7
%14 = load i32, i32* @AF_UNSPEC
%15 = load %struct.hostent*, %struct.hostent** %8
%16 = load i8*, i8** %9
%17 = load i64, i64* %10
%18 = load i32*, i32** %11
%19 = load i32*, i32** %12
%20 = call i32 @_nss_ddnss_gethostbyname3_r(i8* %13, i32 %14, %struct.hostent* %15, i8* %16, i64 %17, i32* %18, i32* %19, i32* null, i32* null)
ret i32 %20
}

LLVM IR (-O2):
%struct.hostent = type { i32 }
@AF_UNSPEC = global i32 0
define i32 @_nss_ddnss_gethostbyname_r(i8* %0, %struct.hostent* %1, i8* %2, i64 %3, i32* %4, i32* %5) {
%7 = load i32, i32* @AF_UNSPEC
%8 = tail call i32 @_nss_ddnss_gethostbyname3_r(i8* %0, i32 %7, %struct.hostent* %1, i8* %2, i64 %3, i32* %4, i32* %5, i32* null, i32* null)
ret i32 %8
}