#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 */
typedef int /*<<< orphan*/ xdrproc_t;
struct timeval {
  int /*<<< orphan*/ member_1;
  int /*<<< orphan*/ member_0;
};
typedef int /*<<< orphan*/ domainname;
typedef int /*<<< orphan*/ clnt_res;
typedef int /*<<< orphan*/ caddr_t;
typedef int /*<<< orphan*/ bool_t;
typedef int /*<<< orphan*/ CLIENT;

/* Variables and functions */
scalar_t__ RPC_SUCCESS;
int /*<<< orphan*/ YPPROC_DOMAIN_NONACK;
scalar_t__ clnt_call(int /*<<< orphan*/ *, int /*<<< orphan*/,
                     int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/,
                     int /*<<< orphan*/, struct timeval);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
scalar_t__ xdr_bool;
bool_t *ypproc_domain_nonack_2_recv(domainname *argp, CLIENT *clnt) {
  static bool_t clnt_res;
  struct timeval TIMEOUT = {0, 0};
  memset((char *)&clnt_res, 0, sizeof(clnt_res));
  if (clnt_call(clnt, YPPROC_DOMAIN_NONACK, (xdrproc_t)NULL, (caddr_t)argp,
                (xdrproc_t)xdr_bool, (caddr_t)&clnt_res,
                TIMEOUT) != RPC_SUCCESS) {
    return (NULL);
  }
  return (&clnt_res);
}


x86 assembly (clang, -O0):
<ypproc_domain_nonack_2_recv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
lea    -0x20(%rbp),%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1030 <memset@plt>
lea    0x2ef1(%rip),%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1030 <memset@plt>
mov    -0x18(%rbp),%rdi
mov    0x2e7a(%rip),%rax
mov    (%rax),%esi
mov    -0x10(%rbp),%rax
mov    %eax,%ecx
mov    0x2e63(%rip),%rax
mov    (%rax),%rax
mov    %eax,%r8d
mov    -0x20(%rbp),%rax
xor    %edx,%edx
lea    0x2eb8(%rip),%r9
mov    %rax,(%rsp)
call   1040 <clnt_call@plt>
mov    0x2e58(%rip),%rcx
cmp    (%rcx),%rax
je     11a6 <ypproc_domain_nonack_2_recv+0x86>
movq   $0x0,-0x8(%rbp)
jmp    11b1 <ypproc_domain_nonack_2_recv+0x91>
lea    0x2e8b(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ypproc_domain_nonack_2_recv>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r12
mov    %rdi,%r14
lea    0x2f03(%rip),%r15
xor    %ebx,%ebx
mov    %r15,%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1030 <memset@plt>
mov    0x2e8b(%rip),%rax
mov    (%rax),%esi
mov    0x2e7a(%rip),%rax
mov    (%rax),%r8d
movq   $0x0,(%rsp)
mov    %r12,%rdi
xor    %edx,%edx
mov    %r14d,%ecx
mov    %r15d,%r9d
call   1040 <clnt_call@plt>
mov    0x2e70(%rip),%rcx
cmp    (%rcx),%rax
cmove  %r15,%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i32 }
@ypproc_domain_nonack_2_recv.clnt_res = internal global i32 0
@YPPROC_DOMAIN_NONACK = global i32 0
@xdr_bool = global i64 0
@RPC_SUCCESS = global i64 0
define i32* @ypproc_domain_nonack_2_recv(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca %struct.timeval
store i32* %0, i32** %4
store i32* %1, i32** %5
%7 = bitcast %struct.timeval* %6 to i8*
%8 = call i32 @memset(i8* bitcast (i32* @ypproc_domain_nonack_2_recv.clnt_res to i8*), i32 0, i32 4)
%9 = load i32*, i32** %5
%10 = load i32, i32* @YPPROC_DOMAIN_NONACK
%11 = load i32*, i32** %4
%12 = ptrtoint i32* %11 to i32
%13 = load i64, i64* @xdr_bool
%14 = trunc i64 %13 to i32
%15 = bitcast %struct.timeval* %6 to i64*
%16 = load i64, i64* %15
%17 = call i64 @clnt_call(i32* %9, i32 %10, i32 0, i32 %12, i32 %14, i32 ptrtoint (i32* @ypproc_domain_nonack_2_recv.clnt_res to i32), i64 %16)
%18 = load i64, i64* @RPC_SUCCESS
%19 = icmp ne i64 %17, %18
br i1 %19, label %20, label %21
20: ; preds = %2
store i32* null, i32** %3
br label %22
21: ; preds = %2
store i32* @ypproc_domain_nonack_2_recv.clnt_res, i32** %3
br label %22
22: ; preds = %21, %20
%23 = load i32*, i32** %3
ret i32* %23
}

LLVM IR (-O2):
@ypproc_domain_nonack_2_recv.clnt_res = internal global i32 0
@YPPROC_DOMAIN_NONACK = global i32 0
@xdr_bool = global i64 0
@RPC_SUCCESS = global i64 0
define i32* @ypproc_domain_nonack_2_recv(i32* %0, i32* %1) {
%3 = tail call i32 @memset(i8* bitcast (i32* @ypproc_domain_nonack_2_recv.clnt_res to i8*), i32 0, i32 4)
%4 = load i32, i32* @YPPROC_DOMAIN_NONACK
%5 = ptrtoint i32* %0 to i64
%6 = trunc i64 %5 to i32
%7 = load i64, i64* @xdr_bool
%8 = trunc i64 %7 to i32
%9 = tail call i64 @clnt_call(i32* %1, i32 %4, i32 0, i32 %6, i32 %8, i32 ptrtoint (i32* @ypproc_domain_nonack_2_recv.clnt_res to i32), i64 0)
%10 = load i64, i64* @RPC_SUCCESS
%11 = icmp eq i64 %9, %10
%12 = select i1 %11, i32* @ypproc_domain_nonack_2_recv.clnt_res, i32* null
ret i32* %12
}