#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 _nss_myhostname_gethostbyname3_r(char const *, int, struct hostent *,
                                     char *, size_t, int *, int *,
                                     int /*<<< orphan*/ *,
                                     int /*<<< orphan*/ *);
enum nss_status _nss_myhostname_gethostbyname2_r(const char *name, int af,
                                                 struct hostent *host,
                                                 char *buffer, size_t buflen,
                                                 int *errnop, int *h_errnop) {
  return _nss_myhostname_gethostbyname3_r(name, af, host, buffer, buflen,
                                          errnop, h_errnop, NULL, NULL);
}


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

x86 assembly (clang, -O2):
<_nss_myhostname_gethostbyname2_r>:
sub    $0x18,%rsp
mov    0x20(%rsp),%rax
xorps  %xmm0,%xmm0
movups %xmm0,0x8(%rsp)
mov    %rax,(%rsp)
call   1030 <_nss_myhostname_gethostbyname3_r@plt>
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
%struct.hostent = type { i32 }
define i32 @_nss_myhostname_gethostbyname2_r(i8* %0, i32 %1, %struct.hostent* %2, i8* %3, i64 %4, i32* %5, i32* %6) {
%8 = tail call i32 @_nss_myhostname_gethostbyname3_r(i8* %0, i32 %1, %struct.hostent* %2, i8* %3, i64 %4, i32* %5, i32* %6, i32* null, i32* null)
ret i32 %8
}