#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 int /*<<< orphan*/ socklen_t;
typedef enum nss_status { ____Placeholder_nss_status } nss_status;

/* Variables and functions */
int _nss_myhostname_gethostbyaddr2_r(void const *, int /*<<< orphan*/, int,
                                     struct hostent *, char *, size_t, int *,
                                     int *, int /*<<< orphan*/ *);
enum nss_status _nss_myhostname_gethostbyaddr_r(const void *addr, socklen_t len,
                                                int af, struct hostent *host,
                                                char *buffer, size_t buflen,
                                                int *errnop, int *h_errnop) {
  return _nss_myhostname_gethostbyaddr2_r(addr, len, af, host, buffer, buflen,
                                          errnop, h_errnop, NULL);
}


x86 assembly (clang, -O0):
<_nss_myhostname_gethostbyaddr_r>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
mov    -0x28(%rbp),%r9
mov    0x10(%rbp),%r10
mov    0x18(%rbp),%rax
xor    %r11d,%r11d
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
movq   $0x0,0x10(%rsp)
call   1030 <_nss_myhostname_gethostbyaddr2_r@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_nss_myhostname_gethostbyaddr_r>:
sub    $0x18,%rsp
movaps 0x20(%rsp),%xmm0
movups %xmm0,(%rsp)
movq   $0x0,0x10(%rsp)
call   1030 <_nss_myhostname_gethostbyaddr2_r@plt>
add    $0x18,%rsp
ret

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

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