#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 */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int /*<<< orphan*/ deskey;
  int /*<<< orphan*/ remotekey;
  int /*<<< orphan*/ remotename;
};
typedef TYPE_1__ cryptkeyarg2;
typedef int /*<<< orphan*/ bool_t;
typedef int /*<<< orphan*/ XDR;

/* Variables and functions */
int /*<<< orphan*/ FALSE;
int /*<<< orphan*/ TRUE;
int /*<<< orphan*/ xdr_des_block(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ xdr_netnamestr(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ xdr_netobj(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
bool_t xdr_cryptkeyarg2(register XDR *xdrs, cryptkeyarg2 *objp) {
  if (!xdr_netnamestr(xdrs, &objp->remotename))
    return (FALSE);
  if (!xdr_netobj(xdrs, &objp->remotekey))
    return (FALSE);
  if (!xdr_des_block(xdrs, &objp->deskey))
    return (FALSE);
  return (TRUE);
}


x86 assembly (clang, -O0):
<xdr_cryptkeyarg2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
add    $0x8,%rsi
call   1040 <xdr_netnamestr@plt>
cmp    $0x0,%eax
jne    116b <xdr_cryptkeyarg2+0x3b>
mov    0x2e77(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    11c9 <xdr_cryptkeyarg2+0x99>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
add    $0x4,%rsi
call   1050 <xdr_netobj@plt>
cmp    $0x0,%eax
jne    1196 <xdr_cryptkeyarg2+0x66>
mov    0x2e4c(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    11c9 <xdr_cryptkeyarg2+0x99>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <xdr_des_block@plt>
cmp    $0x0,%eax
jne    11bd <xdr_cryptkeyarg2+0x8d>
mov    0x2e25(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    11c9 <xdr_cryptkeyarg2+0x99>
mov    0x2e24(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xdr_cryptkeyarg2>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
add    $0x8,%rsi
call   1040 <xdr_netnamestr@plt>
mov    0x2e8d(%rip),%r15
test   %eax,%eax
je     117e <xdr_cryptkeyarg2+0x4e>
lea    0x4(%r14),%rsi
mov    %rbx,%rdi
call   1050 <xdr_netobj@plt>
test   %eax,%eax
je     117e <xdr_cryptkeyarg2+0x4e>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <xdr_des_block@plt>
test   %eax,%eax
jne    1177 <xdr_cryptkeyarg2+0x47>
mov    0x2e63(%rip),%r15
jmp    117e <xdr_cryptkeyarg2+0x4e>
mov    0x2e6a(%rip),%r15
mov    (%r15),%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.TYPE_3__ = type { i32, i32, i32 }
@FALSE = global i32 0
@TRUE = global i32 0
define i32 @xdr_cryptkeyarg2(i32* %0, %struct.TYPE_3__* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca %struct.TYPE_3__*
store i32* %0, i32** %4
store %struct.TYPE_3__* %1, %struct.TYPE_3__** %5
%6 = load i32*, i32** %4
%7 = load %struct.TYPE_3__*, %struct.TYPE_3__** %5
%8 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %7, i32 0, i32 2
%9 = call i32 @xdr_netnamestr(i32* %6, i32* %8)
%10 = icmp ne i32 %9, 0
br i1 %10, label %13, label %11
11: ; preds = %2
%12 = load i32, i32* @FALSE
store i32 %12, i32* %3
br label %31
13: ; preds = %2
%14 = load i32*, i32** %4
%15 = load %struct.TYPE_3__*, %struct.TYPE_3__** %5
%16 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %15, i32 0, i32 1
%17 = call i32 @xdr_netobj(i32* %14, i32* %16)
%18 = icmp ne i32 %17, 0
br i1 %18, label %21, label %19
19: ; preds = %13
%20 = load i32, i32* @FALSE
store i32 %20, i32* %3
br label %31
21: ; preds = %13
%22 = load i32*, i32** %4
%23 = load %struct.TYPE_3__*, %struct.TYPE_3__** %5
%24 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %23, i32 0, i32 0
%25 = call i32 @xdr_des_block(i32* %22, i32* %24)
%26 = icmp ne i32 %25, 0
br i1 %26, label %29, label %27
27: ; preds = %21
%28 = load i32, i32* @FALSE
store i32 %28, i32* %3
br label %31
29: ; preds = %21
%30 = load i32, i32* @TRUE
store i32 %30, i32* %3
br label %31
31: ; preds = %29, %27, %19, %11
%32 = load i32, i32* %3
ret i32 %32
}

LLVM IR (-O2):
%struct.TYPE_3__ = type { i32, i32, i32 }
@FALSE = global i32 0
@TRUE = global i32 0
define i32 @xdr_cryptkeyarg2(i32* %0, %struct.TYPE_3__* %1) {
%3 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %1, i64 0, i32 2
%4 = tail call i32 @xdr_netnamestr(i32* %0, i32* %3)
%5 = icmp eq i32 %4, 0
br i1 %5, label %15, label %6
6: ; preds = %2
%7 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %1, i64 0, i32 1
%8 = tail call i32 @xdr_netobj(i32* %0, i32* %7)
%9 = icmp eq i32 %8, 0
br i1 %9, label %15, label %10
10: ; preds = %6
%11 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %1, i64 0, i32 0
%12 = tail call i32 @xdr_des_block(i32* %0, i32* %11)
%13 = icmp eq i32 %12, 0
%14 = select i1 %13, i32* @FALSE, i32* @TRUE
br label %15
15: ; preds = %10, %6, %2
%16 = phi i32* [ @FALSE, %2 ], [ @FALSE, %6 ], [ %14, %10 ]
%17 = load i32, i32* %16
ret i32 %17
}