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


x86 assembly (clang, -O0):
<_nss_dnspq_gethostbyaddr2_r>:
push   %rbp
mov    %rsp,%rbp
mov    0x20(%rbp),%rax
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    0x2ea3(%rip),%rax
mov    (%rax),%ecx
mov    0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    0x2e9c(%rip),%rax
mov    (%rax),%ecx
mov    0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    0x2e9d(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_nss_dnspq_gethostbyaddr2_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_gethostbyaddr2_r(i8* %0, i32 %1, i32 %2, %struct.hostent* %3, i8* %4, i64 %5, i32* %6, i32* %7, i32* %8) {
%10 = alloca i8*
%11 = alloca i32
%12 = alloca i32
%13 = alloca %struct.hostent*
%14 = alloca i8*
%15 = alloca i64
%16 = alloca i32*
%17 = alloca i32*
%18 = alloca i32*
store i8* %0, i8** %10
store i32 %1, i32* %11
store i32 %2, i32* %12
store %struct.hostent* %3, %struct.hostent** %13
store i8* %4, i8** %14
store i64 %5, i64* %15
store i32* %6, i32** %16
store i32* %7, i32** %17
store i32* %8, i32** %18
%19 = load i8*, i8** %10
%20 = load i32, i32* %11
%21 = load i32, i32* %12
%22 = load %struct.hostent*, %struct.hostent** %13
%23 = load i8*, i8** %14
%24 = load i64, i64* %15
%25 = load i32*, i32** %18
%26 = load i32, i32* @EINVAL
%27 = load i32*, i32** %16
store i32 %26, i32* %27
%28 = load i32, i32* @NO_RECOVERY
%29 = load i32*, i32** %17
store i32 %28, i32* %29
%30 = load i32, i32* @NSS_STATUS_UNAVAIL
ret i32 %30
}

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_gethostbyaddr2_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, i32* nocapture readnone %8) {
%10 = load i32, i32* @EINVAL
store i32 %10, i32* %6
%11 = load i32, i32* @NO_RECOVERY
store i32 %11, i32* %7
%12 = load i32, i32* @NSS_STATUS_UNAVAIL
ret i32 %12
}