#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*/ newpw;
  int /*<<< orphan*/ oldpass;
};
typedef TYPE_1__ yppasswd;
typedef int /*<<< orphan*/ bool_t;
typedef int /*<<< orphan*/ XDR;

/* Variables and functions */
int /*<<< orphan*/ FALSE;
int /*<<< orphan*/ TRUE;
int /*<<< orphan*/ xdr_passwd(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ xdr_string(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                              int /*<<< orphan*/);
bool_t xdr_yppasswd(XDR *xdrs, yppasswd *objp) {
  if (!xdr_string(xdrs, &objp->oldpass, ~0))
    return FALSE;
  if (!xdr_passwd(xdrs, &objp->newpw))
    return FALSE;
  return TRUE;
}


x86 assembly (clang, -O0):
<xdr_yppasswd>:
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    $0x4,%rsi
mov    $0xffffffff,%edx
call   1040 <xdr_string@plt>
cmp    $0x0,%eax
jne    1160 <xdr_yppasswd+0x40>
mov    0x2e82(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1193 <xdr_yppasswd+0x73>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <xdr_passwd@plt>
cmp    $0x0,%eax
jne    1187 <xdr_yppasswd+0x67>
mov    0x2e5b(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1193 <xdr_yppasswd+0x73>
mov    0x2e5a(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xdr_yppasswd>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
add    $0x4,%rsi
mov    $0xffffffff,%edx
call   1040 <xdr_string@plt>
test   %eax,%eax
je     114b <xdr_yppasswd+0x2b>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <xdr_passwd@plt>
test   %eax,%eax
jne    1154 <xdr_yppasswd+0x34>
mov    0x2e86(%rip),%rax
jmp    115b <xdr_yppasswd+0x3b>
mov    0x2e8d(%rip),%rax
mov    (%rax),%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.TYPE_3__ = type { i32, i32 }
@FALSE = global i32 0
@TRUE = global i32 0
define i32 @xdr_yppasswd(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 1
%9 = call i32 @xdr_string(i32* %6, i32* %8, i32 -1)
%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 %23
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 0
%17 = call i32 @xdr_passwd(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 %23
21: ; preds = %13
%22 = load i32, i32* @TRUE
store i32 %22, i32* %3
br label %23
23: ; preds = %21, %19, %11
%24 = load i32, i32* %3
ret i32 %24
}

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