#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 EINVAL;
int NO_RECOVERY;
int NSS_STATUS_UNAVAIL;
enum nss_status _nss_dnspq_gethostbyaddr_r(const void *addr, socklen_t len,
                                           int af, struct hostent *host,
                                           char *buffer, size_t buflen,
                                           int *errnop, int *h_errnop) {
  (void)addr;
  (void)len;
  (void)af;
  (void)host;
  (void)buffer;
  (void)buflen;
  *errnop = EINVAL;
  *h_errnop = NO_RECOVERY;
  return NSS_STATUS_UNAVAIL;
}


x86 assembly (clang, -O0):
<_nss_dnspq_gethostbyaddr_r>:
push   %rbp
mov    %rsp,%rbp
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    0x2ea7(%rip),%rax
mov    (%rax),%ecx
mov    0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    0x2ea0(%rip),%rax
mov    (%rax),%ecx
mov    0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    0x2ea1(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_nss_dnspq_gethostbyaddr_r>:
mov    0x10(%rsp),%rax
mov    0x8(%rsp),%rcx
mov    0x2ebf(%rip),%rdx
mov    (%rdx),%edx
mov    %edx,(%rcx)
mov    0x2ebc(%rip),%rcx
mov    (%rcx),%ecx
mov    %ecx,(%rax)
mov    0x2ec1(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
%struct.hostent = type { i32 }
@EINVAL = global i32 0
@NO_RECOVERY = global i32 0
@NSS_STATUS_UNAVAIL = global i32 0
define i32 @_nss_dnspq_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* @EINVAL
%24 = load i32*, i32** %15
store i32 %23, i32* %24
%25 = load i32, i32* @NO_RECOVERY
%26 = load i32*, i32** %16
store i32 %25, i32* %26
%27 = load i32, i32* @NSS_STATUS_UNAVAIL
ret i32 %27
}

LLVM IR (-O2):
%struct.hostent = type { i32 }
@EINVAL = global i32 0
@NO_RECOVERY = global i32 0
@NSS_STATUS_UNAVAIL = global i32 0
define i32 @_nss_dnspq_gethostbyaddr_r(i8* nocapture readnone %0, i32 %1, i32 %2, %struct.hostent* nocapture readnone %3, i8* nocapture readnone %4, i64 %5, i32* nocapture writeonly %6, i32* nocapture writeonly %7) {
%9 = load i32, i32* @EINVAL
store i32 %9, i32* %6
%10 = load i32, i32* @NO_RECOVERY
store i32 %10, i32* %7
%11 = load i32, i32* @NSS_STATUS_UNAVAIL
ret i32 %11
}