#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*/ st_netname;
  int /*<<< orphan*/ st_pub_key;
  int /*<<< orphan*/ st_priv_key;
};
typedef TYPE_1__ key_netstarg;
typedef int /*<<< orphan*/ bool_t;
typedef int /*<<< orphan*/ XDR;

/* Variables and functions */
int /*<<< orphan*/ FALSE;
int /*<<< orphan*/ TRUE;
int /*<<< orphan*/ xdr_keybuf(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ xdr_netnamestr(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
bool_t xdr_key_netstarg(register XDR *xdrs, key_netstarg *objp) {
  if (!xdr_keybuf(xdrs, objp->st_priv_key))
    return (FALSE);
  if (!xdr_keybuf(xdrs, objp->st_pub_key))
    return (FALSE);
  if (!xdr_netnamestr(xdrs, &objp->st_netname))
    return (FALSE);
  return (TRUE);
}


x86 assembly (clang, -O0):
<xdr_key_netstarg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%esi
call   1030 <xdr_keybuf@plt>
cmp    $0x0,%eax
jne    115a <xdr_key_netstarg+0x3a>
mov    0x2e88(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    11b7 <xdr_key_netstarg+0x97>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rax
mov    0x4(%rax),%esi
call   1030 <xdr_keybuf@plt>
cmp    $0x0,%eax
jne    1184 <xdr_key_netstarg+0x64>
mov    0x2e5e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    11b7 <xdr_key_netstarg+0x97>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <xdr_netnamestr@plt>
cmp    $0x0,%eax
jne    11ab <xdr_key_netstarg+0x8b>
mov    0x2e37(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    11b7 <xdr_key_netstarg+0x97>
mov    0x2e36(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xdr_key_netstarg>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
mov    0x8(%rsi),%esi
call   1030 <xdr_keybuf@plt>
mov    0x2e9e(%rip),%r15
test   %eax,%eax
je     116d <xdr_key_netstarg+0x4d>
mov    0x4(%r14),%esi
mov    %rbx,%rdi
call   1030 <xdr_keybuf@plt>
test   %eax,%eax
je     116d <xdr_key_netstarg+0x4d>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <xdr_netnamestr@plt>
test   %eax,%eax
jne    1166 <xdr_key_netstarg+0x46>
mov    0x2e74(%rip),%r15
jmp    116d <xdr_key_netstarg+0x4d>
mov    0x2e7b(%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_key_netstarg(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 = load i32, i32* %8
%10 = call i32 @xdr_keybuf(i32* %6, i32 %9)
%11 = icmp ne i32 %10, 0
br i1 %11, label %14, label %12
12: ; preds = %2
%13 = load i32, i32* @FALSE
store i32 %13, i32* %3
br label %33
14: ; preds = %2
%15 = load i32*, i32** %4
%16 = load %struct.TYPE_3__*, %struct.TYPE_3__** %5
%17 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %16, i32 0, i32 1
%18 = load i32, i32* %17
%19 = call i32 @xdr_keybuf(i32* %15, i32 %18)
%20 = icmp ne i32 %19, 0
br i1 %20, label %23, label %21
21: ; preds = %14
%22 = load i32, i32* @FALSE
store i32 %22, i32* %3
br label %33
23: ; preds = %14
%24 = load i32*, i32** %4
%25 = load %struct.TYPE_3__*, %struct.TYPE_3__** %5
%26 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %25, i32 0, i32 0
%27 = call i32 @xdr_netnamestr(i32* %24, i32* %26)
%28 = icmp ne i32 %27, 0
br i1 %28, label %31, label %29
29: ; preds = %23
%30 = load i32, i32* @FALSE
store i32 %30, i32* %3
br label %33
31: ; preds = %23
%32 = load i32, i32* @TRUE
store i32 %32, i32* %3
br label %33
33: ; preds = %31, %29, %21, %12
%34 = load i32, i32* %3
ret i32 %34
}

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