#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 bool_t;
typedef int /*<<< orphan*/ XDR;

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


x86 assembly (clang, -O0):
<xdr_yppasswd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
add    $0x4,%rsi
mov    $0xffffffff,%edx
call   1040 <xdr_string@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x11(%rbp)
je     116f <xdr_yppasswd+0x4f>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <xdr_passwd@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%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   %rax,%rax
je     1155 <xdr_yppasswd+0x35>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <xdr_passwd@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
jmp    1157 <xdr_yppasswd+0x37>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.TYPE_3__ = type { i32, i32 }
define i32 @xdr_yppasswd(i32* %0, %struct.TYPE_3__* %1) {
%3 = alloca i32*
%4 = alloca %struct.TYPE_3__*
store i32* %0, i32** %3
store %struct.TYPE_3__* %1, %struct.TYPE_3__** %4
%5 = load i32*, i32** %3
%6 = load %struct.TYPE_3__*, %struct.TYPE_3__** %4
%7 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %6, i32 0, i32 1
%8 = call i64 @xdr_string(i32* %5, i32* %7, i32 -1)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %16
10: ; preds = %2
%11 = load i32*, i32** %3
%12 = load %struct.TYPE_3__*, %struct.TYPE_3__** %4
%13 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %12, i32 0, i32 0
%14 = call i64 @xdr_passwd(i32* %11, i32* %13)
%15 = icmp ne i64 %14, 0
br label %16
16: ; preds = %10, %2
%17 = phi i1 [ false, %2 ], [ %15, %10 ]
%18 = zext i1 %17 to i32
ret i32 %18
}

LLVM IR (-O2):
%struct.TYPE_3__ = type { i32, i32 }
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 i64 @xdr_string(i32* %0, i32* %3, i32 -1)
%5 = icmp eq i64 %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 i64 @xdr_passwd(i32* %0, i32* %7)
%9 = icmp ne i64 %8, 0
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %6, %2
%12 = phi i32 [ 0, %2 ], [ %10, %6 ]
ret i32 %12
}