#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;
typedef int /*<<< orphan*/ uid_t;
typedef int /*<<< orphan*/ u_short;
typedef int /*<<< orphan*/ u_int;
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*/ gid_t;
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_string(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                      int /*<<< orphan*/);
scalar_t__ xdr_u_int(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
scalar_t__ xdr_u_long(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
scalar_t__ xdr_u_short(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) &&
      (sizeof(uid_t) == sizeof(short int)
           ? xdr_u_short(xdrs, (u_short *)&(p->aup_uid))
           : xdr_u_int(xdrs, (u_int *)&(p->aup_uid))) &&
      (sizeof(gid_t) == sizeof(short int)
           ? xdr_u_short(xdrs, (u_short *)&(p->aup_gid))
           : xdr_u_int(xdrs, (u_int *)&(p->aup_gid))) &&
      xdr_array(xdrs, (caddr_t *)&(p->aup_gids), &(p->aup_len), NGRPS,
                sizeof(gid_t),
                (sizeof(gid_t) == sizeof(short int) ? (xdrproc_t)xdr_u_short
                                                    : (xdrproc_t)xdr_u_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   1060 <xdr_u_long@plt>
cmp    $0x0,%rax
je     126c <xdr_authunix_parms+0x12c>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
add    $0x10,%rsi
mov    0x2e62(%rip),%rax
mov    (%rax),%edx
call   1030 <xdr_string@plt>
cmp    $0x0,%rax
je     126c <xdr_authunix_parms+0x12c>
xor    %eax,%eax
test   $0x1,%al
jne    119e <xdr_authunix_parms+0x5e>
jmp    11be <xdr_authunix_parms+0x7e>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
add    $0xc,%rsi
call   1050 <xdr_u_short@plt>
cmp    $0x0,%rax
jne    11d9 <xdr_authunix_parms+0x99>
jmp    126c <xdr_authunix_parms+0x12c>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
add    $0xc,%rsi
call   1070 <xdr_u_int@plt>
cmp    $0x0,%rax
je     126c <xdr_authunix_parms+0x12c>
xor    %eax,%eax
test   $0x1,%al
jne    11e8 <xdr_authunix_parms+0xa8>
jmp    1208 <xdr_authunix_parms+0xc8>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
add    $0x8,%rsi
call   1050 <xdr_u_short@plt>
cmp    $0x0,%rax
jne    1223 <xdr_authunix_parms+0xe3>
jmp    126c <xdr_authunix_parms+0x12c>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
add    $0x8,%rsi
call   1070 <xdr_u_int@plt>
cmp    $0x0,%rax
je     126c <xdr_authunix_parms+0x12c>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
add    $0x4,%rsi
mov    -0x18(%rbp),%rdx
mov    0x2d86(%rip),%rax
mov    (%rax),%ecx
mov    $0x4,%r8d
mov    0x2da7(%rip),%rax
mov    %eax,%r9d
call   1040 <xdr_array@plt>
cmp    $0x0,%rax
je     126c <xdr_authunix_parms+0x12c>
mov    0x2d76(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1278 <xdr_authunix_parms+0x138>
mov    0x2d55(%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_u_int@plt>
test   %rax,%rax
je     11b7 <xdr_authunix_parms+0x87>
lea    0x8(%rbx),%rsi
mov    %r14,%rdi
call   1060 <xdr_u_int@plt>
test   %rax,%rax
je     11b7 <xdr_authunix_parms+0x87>
lea    0x4(%rbx),%rsi
mov    0x2e31(%rip),%rax
mov    (%rax),%ecx
mov    0x2e58(%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 %55
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 %55
18: ; preds = %11
br i1 false, label %19, label %25
19: ; preds = %18
%20 = load i32*, i32** %4
%21 = load %struct.authunix_parms*, %struct.authunix_parms** %5
%22 = getelementptr inbounds %struct.authunix_parms, %struct.authunix_parms* %21, i32 0, i32 3
%23 = call i64 @xdr_u_short(i32* %20, i32* %22)
%24 = icmp ne i64 %23, 0
br i1 %24, label %31, label %55
25: ; preds = %18
%26 = load i32*, i32** %4
%27 = load %struct.authunix_parms*, %struct.authunix_parms** %5
%28 = getelementptr inbounds %struct.authunix_parms, %struct.authunix_parms* %27, i32 0, i32 3
%29 = call i64 @xdr_u_int(i32* %26, i32* %28)
%30 = icmp ne i64 %29, 0
br i1 %30, label %31, label %55
31: ; preds = %25, %19
br i1 false, label %32, label %38
32: ; preds = %31
%33 = load i32*, i32** %4
%34 = load %struct.authunix_parms*, %struct.authunix_parms** %5
%35 = getelementptr inbounds %struct.authunix_parms, %struct.authunix_parms* %34, i32 0, i32 2
%36 = call i64 @xdr_u_short(i32* %33, i32* %35)
%37 = icmp ne i64 %36, 0
br i1 %37, label %44, label %55
38: ; preds = %31
%39 = load i32*, i32** %4
%40 = load %struct.authunix_parms*, %struct.authunix_parms** %5
%41 = getelementptr inbounds %struct.authunix_parms, %struct.authunix_parms* %40, i32 0, i32 2
%42 = call i64 @xdr_u_int(i32* %39, i32* %41)
%43 = icmp ne i64 %42, 0
br i1 %43, label %44, label %55
44: ; preds = %38, %32
%45 = load i32*, i32** %4
%46 = load %struct.authunix_parms*, %struct.authunix_parms** %5
%47 = getelementptr inbounds %struct.authunix_parms, %struct.authunix_parms* %46, i32 0, i32 1
%48 = load %struct.authunix_parms*, %struct.authunix_parms** %5
%49 = getelementptr inbounds %struct.authunix_parms, %struct.authunix_parms* %48, i32 0, i32 0
%50 = load i32, i32* @NGRPS
%51 = call i64 @xdr_array(i32* %45, i32* %47, i32* %49, i32 %50, i32 4, i32 ptrtoint (i64 (i32*, i32*)* @xdr_u_int to i32))
%52 = icmp ne i64 %51, 0
br i1 %52, label %53, label %55
53: ; preds = %44
%54 = load i32, i32* @TRUE
store i32 %54, i32* %3
br label %57
55: ; preds = %44, %38, %32, %25, %19, %11, %2
%56 = load i32, i32* @FALSE
store i32 %56, i32* %3
br label %57
57: ; preds = %55, %53
%58 = load i32, i32* %3
ret i32 %58
}

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_u_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_u_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_u_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
}