#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*/ u_int;
struct authunix_parms {
  int /*<<< orphan*/ aup_len;
  int /*<<< orphan*/ aup_gid;
  int /*<<< orphan*/ aup_uid;
  int /*<<< orphan*/ aup_machname;
  int /*<<< orphan*/ aup_time;
  int /*<<< orphan*/ *aup_gids;
};
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;
int /*<<< orphan*/ assert(int /*<<< orphan*/);
scalar_t__ xdr_array(int /*<<< orphan*/ *, char **, 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*/ *);
bool_t xdr_authunix_parms(XDR *xdrs, struct authunix_parms *p) {
  u_int **paup_gids;
  assert(xdrs != NULL);
  assert(p != NULL);
  paup_gids = &p->aup_gids;
  if (xdr_u_long(xdrs, &(p->aup_time)) &&
      xdr_string(xdrs, &(p->aup_machname), MAX_MACHINE_NAME) &&
      xdr_u_int(xdrs, &(p->aup_uid)) && xdr_u_int(xdrs, &(p->aup_gid)) &&
      xdr_array(xdrs, (char **)paup_gids, &(p->aup_len), NGRPS, sizeof(u_int),
                (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)
cmpq   $0x0,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
cmpq   $0x0,-0x18(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    -0x18(%rbp),%rax
add    $0x18,%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
add    $0x10,%rsi
call   1060 <xdr_u_long@plt>
cmp    $0x0,%rax
je     123a <xdr_authunix_parms+0xfa>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
add    $0xc,%rsi
mov    0x2e32(%rip),%rax
mov    (%rax),%edx
call   1030 <xdr_string@plt>
cmp    $0x0,%rax
je     123a <xdr_authunix_parms+0xfa>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
add    $0x8,%rsi
call   1070 <xdr_u_int@plt>
cmp    $0x0,%rax
je     123a <xdr_authunix_parms+0xfa>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
add    $0x4,%rsi
call   1070 <xdr_u_int@plt>
cmp    $0x0,%rax
je     123a <xdr_authunix_parms+0xfa>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    0x2db8(%rip),%rax
mov    (%rax),%ecx
mov    $0x4,%r8d
mov    0x2dd9(%rip),%rax
mov    %eax,%r9d
call   1040 <xdr_array@plt>
cmp    $0x0,%rax
je     123a <xdr_authunix_parms+0xfa>
mov    0x2da8(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1246 <xdr_authunix_parms+0x106>
mov    0x2d87(%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
xor    %edi,%edi
test   %r14,%r14
setne  %dil
call   1050 <assert@plt>
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1050 <assert@plt>
lea    0x10(%rbx),%rsi
mov    %r14,%rdi
call   1060 <xdr_u_long@plt>
test   %rax,%rax
je     11e6 <xdr_authunix_parms+0xa6>
lea    0xc(%rbx),%rsi
mov    0x2e5e(%rip),%rax
mov    (%rax),%edx
mov    %r14,%rdi
call   1030 <xdr_string@plt>
test   %rax,%rax
je     11e6 <xdr_authunix_parms+0xa6>
lea    0x8(%rbx),%rsi
mov    %r14,%rdi
call   1070 <xdr_u_int@plt>
test   %rax,%rax
je     11e6 <xdr_authunix_parms+0xa6>
lea    0x4(%rbx),%rsi
mov    %r14,%rdi
call   1070 <xdr_u_int@plt>
test   %rax,%rax
je     11e6 <xdr_authunix_parms+0xa6>
lea    0x18(%rbx),%rsi
mov    0x2e02(%rip),%rax
mov    (%rax),%ecx
mov    0x2e29(%rip),%r9d
mov    %r14,%rdi
mov    %rbx,%rdx
mov    $0x4,%r8d
call   1040 <xdr_array@plt>
test   %rax,%rax
je     11e6 <xdr_authunix_parms+0xa6>
mov    0x2df4(%rip),%rax
jmp    11ed <xdr_authunix_parms+0xad>
mov    0x2ddb(%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*
%6 = alloca i32**
store i32* %0, i32** %4
store %struct.authunix_parms* %1, %struct.authunix_parms** %5
%7 = load i32*, i32** %4
%8 = icmp ne i32* %7, null
%9 = zext i1 %8 to i32
%10 = call i32 @assert(i32 %9)
%11 = load %struct.authunix_parms*, %struct.authunix_parms** %5
%12 = icmp ne %struct.authunix_parms* %11, null
%13 = zext i1 %12 to i32
%14 = call i32 @assert(i32 %13)
%15 = load %struct.authunix_parms*, %struct.authunix_parms** %5
%16 = getelementptr inbounds %struct.authunix_parms, %struct.authunix_parms* %15, i32 0, i32 5
store i32** %16, i32*** %6
%17 = load i32*, i32** %4
%18 = load %struct.authunix_parms*, %struct.authunix_parms** %5
%19 = getelementptr inbounds %struct.authunix_parms, %struct.authunix_parms* %18, i32 0, i32 4
%20 = call i64 @xdr_u_long(i32* %17, i32* %19)
%21 = icmp ne i64 %20, 0
br i1 %21, label %22, label %52
22: ; preds = %2
%23 = load i32*, i32** %4
%24 = load %struct.authunix_parms*, %struct.authunix_parms** %5
%25 = getelementptr inbounds %struct.authunix_parms, %struct.authunix_parms* %24, i32 0, i32 3
%26 = load i32, i32* @MAX_MACHINE_NAME
%27 = call i64 @xdr_string(i32* %23, i32* %25, i32 %26)
%28 = icmp ne i64 %27, 0
br i1 %28, label %29, label %52
29: ; preds = %22
%30 = load i32*, i32** %4
%31 = load %struct.authunix_parms*, %struct.authunix_parms** %5
%32 = getelementptr inbounds %struct.authunix_parms, %struct.authunix_parms* %31, i32 0, i32 2
%33 = call i64 @xdr_u_int(i32* %30, i32* %32)
%34 = icmp ne i64 %33, 0
br i1 %34, label %35, label %52
35: ; preds = %29
%36 = load i32*, i32** %4
%37 = load %struct.authunix_parms*, %struct.authunix_parms** %5
%38 = getelementptr inbounds %struct.authunix_parms, %struct.authunix_parms* %37, i32 0, i32 1
%39 = call i64 @xdr_u_int(i32* %36, i32* %38)
%40 = icmp ne i64 %39, 0
br i1 %40, label %41, label %52
41: ; preds = %35
%42 = load i32*, i32** %4
%43 = load i32**, i32*** %6
%44 = bitcast i32** %43 to i8**
%45 = load %struct.authunix_parms*, %struct.authunix_parms** %5
%46 = getelementptr inbounds %struct.authunix_parms, %struct.authunix_parms* %45, i32 0, i32 0
%47 = load i32, i32* @NGRPS
%48 = call i64 @xdr_array(i32* %42, i8** %44, i32* %46, i32 %47, i32 4, i32 ptrtoint (i64 (i32*, i32*)* @xdr_u_int to i32))
%49 = icmp ne i64 %48, 0
br i1 %49, label %50, label %52
50: ; preds = %41
%51 = load i32, i32* @TRUE
store i32 %51, i32* %3
br label %54
52: ; preds = %41, %35, %29, %22, %2
%53 = load i32, i32* @FALSE
store i32 %53, i32* %3
br label %54
54: ; preds = %52, %50
%55 = load i32, i32* %3
ret i32 %55
}

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 = icmp ne i32* %0, null
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = icmp ne %struct.authunix_parms* %1, null
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
%9 = getelementptr inbounds %struct.authunix_parms, %struct.authunix_parms* %1, i64 0, i32 5
%10 = getelementptr inbounds %struct.authunix_parms, %struct.authunix_parms* %1, i64 0, i32 4
%11 = tail call i64 @xdr_u_long(i32* %0, i32* %10)
%12 = icmp eq i64 %11, 0
br i1 %12, label %32, label %13
13: ; preds = %2
%14 = getelementptr inbounds %struct.authunix_parms, %struct.authunix_parms* %1, i64 0, i32 3
%15 = load i32, i32* @MAX_MACHINE_NAME
%16 = tail call i64 @xdr_string(i32* %0, i32* %14, i32 %15)
%17 = icmp eq i64 %16, 0
br i1 %17, label %32, label %18
18: ; preds = %13
%19 = getelementptr inbounds %struct.authunix_parms, %struct.authunix_parms* %1, i64 0, i32 2
%20 = tail call i64 @xdr_u_int(i32* %0, i32* %19)
%21 = icmp eq i64 %20, 0
br i1 %21, label %32, label %22
22: ; preds = %18
%23 = getelementptr inbounds %struct.authunix_parms, %struct.authunix_parms* %1, i64 0, i32 1
%24 = tail call i64 @xdr_u_int(i32* %0, i32* %23)
%25 = icmp eq i64 %24, 0
br i1 %25, label %32, label %26
26: ; preds = %22
%27 = bitcast i32** %9 to i8**
%28 = getelementptr inbounds %struct.authunix_parms, %struct.authunix_parms* %1, i64 0, i32 0
%29 = load i32, i32* @NGRPS
%30 = tail call i64 @xdr_array(i32* %0, i8** %27, i32* %28, i32 %29, i32 4, i32 ptrtoint (i64 (i32*, i32*)* @xdr_u_int to i32))
%31 = icmp eq i64 %30, 0
br i1 %31, label %32, label %33
32: ; preds = %26, %22, %18, %13, %2
br label %33
33: ; preds = %26, %32
%34 = phi i32* [ @FALSE, %32 ], [ @TRUE, %26 ]
%35 = load i32, i32* %34
ret i32 %35
}