#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 authunix_parms {
  int /*<<< orphan*/ aup_len;
  int /*<<< orphan*/ aup_gids;
  int /*<<< orphan*/ aup_gid;
  int /*<<< orphan*/ aup_uid;
  int /*<<< orphan*/ aup_machname;
  int /*<<< orphan*/ aup_time;
};
typedef int /*<<< orphan*/ caddr_t;
typedef int /*<<< orphan*/ bool_t;
typedef int /*<<< orphan*/ XDR;

/* Variables and functions */
int /*<<< orphan*/ FALSE;
int /*<<< orphan*/ MAX_MACHINE_NAME;
int /*<<< orphan*/ NGRPS;
int /*<<< orphan*/ TRUE;
scalar_t__ xdr_array(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                     int /*<<< orphan*/ *, int /*<<< orphan*/, int,
                     int /*<<< orphan*/);
scalar_t__ xdr_int(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
scalar_t__ xdr_string(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                      int /*<<< orphan*/);
scalar_t__ xdr_u_long(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
bool_t xdr_authunix_parms(XDR *xdrs, struct authunix_parms *p) {
  if (xdr_u_long(xdrs, &(p->aup_time)) &&
      xdr_string(xdrs, &(p->aup_machname), MAX_MACHINE_NAME) &&
      xdr_int(xdrs, &(p->aup_uid)) && xdr_int(xdrs, &(p->aup_gid)) &&
      xdr_array(xdrs, (caddr_t *)(void *)&(p->aup_gids), &(p->aup_len), NGRPS,
                sizeof(int), (xdrproc_t)xdr_int)) {
    return (TRUE);
  }
  return (FALSE);
}


x86 assembly (clang, -O0):
<xdr_authunix_parms>:
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    $0x14,%rsi
call   1050 <xdr_u_long@plt>
cmp    $0x0,%rax
je     11fe <xdr_authunix_parms+0xce>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
add    $0x10,%rsi
mov    0x2e72(%rip),%rax
mov    (%rax),%edx
call   1030 <xdr_string@plt>
cmp    $0x0,%rax
je     11fe <xdr_authunix_parms+0xce>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
add    $0xc,%rsi
call   1060 <xdr_int@plt>
cmp    $0x0,%rax
je     11fe <xdr_authunix_parms+0xce>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
add    $0x8,%rsi
call   1060 <xdr_int@plt>
cmp    $0x0,%rax
je     11fe <xdr_authunix_parms+0xce>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
add    $0x4,%rsi
mov    -0x18(%rbp),%rdx
mov    0x2df4(%rip),%rax
mov    (%rax),%ecx
mov    $0x4,%r8d
mov    0x2e0d(%rip),%rax
mov    %eax,%r9d
call   1040 <xdr_array@plt>
cmp    $0x0,%rax
je     11fe <xdr_authunix_parms+0xce>
mov    0x2de4(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    120a <xdr_authunix_parms+0xda>
mov    0x2dc3(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xdr_authunix_parms>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
add    $0x14,%rsi
call   1050 <xdr_u_long@plt>
test   %rax,%rax
je     11b7 <xdr_authunix_parms+0x87>
lea    0x10(%rbx),%rsi
mov    0x2e8d(%rip),%rax
mov    (%rax),%edx
mov    %r14,%rdi
call   1030 <xdr_string@plt>
test   %rax,%rax
je     11b7 <xdr_authunix_parms+0x87>
lea    0xc(%rbx),%rsi
mov    %r14,%rdi
call   1060 <xdr_int@plt>
test   %rax,%rax
je     11b7 <xdr_authunix_parms+0x87>
lea    0x8(%rbx),%rsi
mov    %r14,%rdi
call   1060 <xdr_int@plt>
test   %rax,%rax
je     11b7 <xdr_authunix_parms+0x87>
lea    0x4(%rbx),%rsi
mov    0x2e31(%rip),%rax
mov    (%rax),%ecx
mov    0x2e50(%rip),%r9d
mov    %r14,%rdi
mov    %rbx,%rdx
mov    $0x4,%r8d
call   1040 <xdr_array@plt>
test   %rax,%rax
je     11b7 <xdr_authunix_parms+0x87>
mov    0x2e23(%rip),%rax
jmp    11be <xdr_authunix_parms+0x8e>
mov    0x2e0a(%rip),%rax
mov    (%rax),%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.authunix_parms = type { i32, i32, i32, i32, i32, i32 }
@MAX_MACHINE_NAME = global i32 0
@NGRPS = global i32 0
@TRUE = global i32 0
@FALSE = global i32 0
define i32 @xdr_authunix_parms(i32* %0, %struct.authunix_parms* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca %struct.authunix_parms*
store i32* %0, i32** %4
store %struct.authunix_parms* %1, %struct.authunix_parms** %5
%6 = load i32*, i32** %4
%7 = load %struct.authunix_parms*, %struct.authunix_parms** %5
%8 = getelementptr inbounds %struct.authunix_parms, %struct.authunix_parms* %7, i32 0, i32 5
%9 = call i64 @xdr_u_long(i32* %6, i32* %8)
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %43
11: ; preds = %2
%12 = load i32*, i32** %4
%13 = load %struct.authunix_parms*, %struct.authunix_parms** %5
%14 = getelementptr inbounds %struct.authunix_parms, %struct.authunix_parms* %13, i32 0, i32 4
%15 = load i32, i32* @MAX_MACHINE_NAME
%16 = call i64 @xdr_string(i32* %12, i32* %14, i32 %15)
%17 = icmp ne i64 %16, 0
br i1 %17, label %18, label %43
18: ; preds = %11
%19 = load i32*, i32** %4
%20 = load %struct.authunix_parms*, %struct.authunix_parms** %5
%21 = getelementptr inbounds %struct.authunix_parms, %struct.authunix_parms* %20, i32 0, i32 3
%22 = call i64 @xdr_int(i32* %19, i32* %21)
%23 = icmp ne i64 %22, 0
br i1 %23, label %24, label %43
24: ; preds = %18
%25 = load i32*, i32** %4
%26 = load %struct.authunix_parms*, %struct.authunix_parms** %5
%27 = getelementptr inbounds %struct.authunix_parms, %struct.authunix_parms* %26, i32 0, i32 2
%28 = call i64 @xdr_int(i32* %25, i32* %27)
%29 = icmp ne i64 %28, 0
br i1 %29, label %30, label %43
30: ; preds = %24
%31 = load i32*, i32** %4
%32 = load %struct.authunix_parms*, %struct.authunix_parms** %5
%33 = getelementptr inbounds %struct.authunix_parms, %struct.authunix_parms* %32, i32 0, i32 1
%34 = bitcast i32* %33 to i8*
%35 = bitcast i8* %34 to i32*
%36 = load %struct.authunix_parms*, %struct.authunix_parms** %5
%37 = getelementptr inbounds %struct.authunix_parms, %struct.authunix_parms* %36, i32 0, i32 0
%38 = load i32, i32* @NGRPS
%39 = call i64 @xdr_array(i32* %31, i32* %35, i32* %37, i32 %38, i32 4, i32 ptrtoint (i64 (i32*, i32*)* @xdr_int to i32))
%40 = icmp ne i64 %39, 0
br i1 %40, label %41, label %43
41: ; preds = %30
%42 = load i32, i32* @TRUE
store i32 %42, i32* %3
br label %45
43: ; preds = %30, %24, %18, %11, %2
%44 = load i32, i32* @FALSE
store i32 %44, i32* %3
br label %45
45: ; preds = %43, %41
%46 = load i32, i32* %3
ret i32 %46
}

LLVM IR (-O2):
%struct.authunix_parms = type { i32, i32, i32, i32, i32, i32 }
@MAX_MACHINE_NAME = global i32 0
@NGRPS = global i32 0
@TRUE = global i32 0
@FALSE = global i32 0
define i32 @xdr_authunix_parms(i32* %0, %struct.authunix_parms* %1) {
%3 = getelementptr inbounds %struct.authunix_parms, %struct.authunix_parms* %1, i64 0, i32 5
%4 = tail call i64 @xdr_u_long(i32* %0, i32* %3)
%5 = icmp eq i64 %4, 0
br i1 %5, label %25, label %6
6: ; preds = %2
%7 = getelementptr inbounds %struct.authunix_parms, %struct.authunix_parms* %1, i64 0, i32 4
%8 = load i32, i32* @MAX_MACHINE_NAME
%9 = tail call i64 @xdr_string(i32* %0, i32* %7, i32 %8)
%10 = icmp eq i64 %9, 0
br i1 %10, label %25, label %11
11: ; preds = %6
%12 = getelementptr inbounds %struct.authunix_parms, %struct.authunix_parms* %1, i64 0, i32 3
%13 = tail call i64 @xdr_int(i32* %0, i32* %12)
%14 = icmp eq i64 %13, 0
br i1 %14, label %25, label %15
15: ; preds = %11
%16 = getelementptr inbounds %struct.authunix_parms, %struct.authunix_parms* %1, i64 0, i32 2
%17 = tail call i64 @xdr_int(i32* %0, i32* %16)
%18 = icmp eq i64 %17, 0
br i1 %18, label %25, label %19
19: ; preds = %15
%20 = getelementptr inbounds %struct.authunix_parms, %struct.authunix_parms* %1, i64 0, i32 1
%21 = getelementptr inbounds %struct.authunix_parms, %struct.authunix_parms* %1, i64 0, i32 0
%22 = load i32, i32* @NGRPS
%23 = tail call i64 @xdr_array(i32* %0, i32* %20, i32* %21, i32 %22, i32 4, i32 ptrtoint (i64 (i32*, i32*)* @xdr_int to i32))
%24 = icmp eq i64 %23, 0
br i1 %24, label %25, label %26
25: ; preds = %19, %15, %11, %6, %2
br label %26
26: ; preds = %19, %25
%27 = phi i32* [ @FALSE, %25 ], [ @TRUE, %19 ]
%28 = load i32, i32* %27
ret i32 %28
}