#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_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_4__ {
  int /*<<< orphan*/ high;
  int /*<<< orphan*/ low;
};
struct TYPE_3__ {
  int /*<<< orphan*/ where;
  int /*<<< orphan*/ (*proc)(int /*<<< orphan*/ *, int /*<<< orphan*/);
};
struct accepted_reply {
  int ar_stat;
  TYPE_2__ ar_vers;
  TYPE_1__ ar_results;
  int /*<<< orphan*/ ar_verf;
};
typedef int /*<<< orphan*/ enum_t;
typedef enum accept_stat { ____Placeholder_accept_stat } accept_stat;
typedef int /*<<< orphan*/ bool_t;
typedef int /*<<< orphan*/ XDR;

/* Variables and functions */
int /*<<< orphan*/ FALSE;
#define GARBAGE_ARGS 133
#define PROC_UNAVAIL 132
#define PROG_MISMATCH 131
#define PROG_UNAVAIL 130
#define SUCCESS 129
#define SYSTEM_ERR 128
int /*<<< orphan*/ TRUE;
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ stub1(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ xdr_enum(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ xdr_opaque_auth(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ xdr_rpcvers(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
bool_t xdr_accepted_reply(XDR *xdrs, struct accepted_reply *ar) {
  enum accept_stat *par_stat;
  assert(xdrs != NULL);
  assert(ar != NULL);
  par_stat = &ar->ar_stat;
  if (!xdr_opaque_auth(xdrs, &(ar->ar_verf)))
    return (FALSE);
  if (!xdr_enum(xdrs, (enum_t *)par_stat))
    return (FALSE);
  switch (ar->ar_stat) {
  case SUCCESS:
    return ((*(ar->ar_results.proc))(xdrs, ar->ar_results.where));
  case PROG_MISMATCH:
    if (!xdr_rpcvers(xdrs, &(ar->ar_vers.low)))
      return (FALSE);
    return (xdr_rpcvers(xdrs, &(ar->ar_vers.high)));
  case GARBAGE_ARGS:
  case SYSTEM_ERR:
  case PROC_UNAVAIL:
  case PROG_UNAVAIL:
    break;
  }
  return (TRUE);
}


x86 assembly (clang, -O0):
<xdr_accepted_reply>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%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
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
add    $0x20,%rsi
call   1060 <xdr_opaque_auth@plt>
cmp    $0x0,%eax
jne    11a7 <xdr_accepted_reply+0x67>
mov    0x2e3b(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    12ac <xdr_accepted_reply+0x16c>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1040 <xdr_enum@plt>
cmp    $0x0,%eax
jne    11ce <xdr_accepted_reply+0x8e>
mov    0x2e14(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    12ac <xdr_accepted_reply+0x16c>
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
sub    $0x80,%eax
je     129b <xdr_accepted_reply+0x15b>
jmp    11e7 <xdr_accepted_reply+0xa7>
mov    -0x24(%rbp),%eax
sub    $0x81,%eax
je     1236 <xdr_accepted_reply+0xf6>
jmp    11fa <xdr_accepted_reply+0xba>
mov    -0x24(%rbp),%eax
sub    $0x82,%eax
je     129b <xdr_accepted_reply+0x15b>
jmp    120d <xdr_accepted_reply+0xcd>
mov    -0x24(%rbp),%eax
sub    $0x83,%eax
je     1253 <xdr_accepted_reply+0x113>
jmp    1220 <xdr_accepted_reply+0xe0>
mov    -0x24(%rbp),%eax
add    $0xffffff7c,%eax
sub    $0x2,%eax
jb     129b <xdr_accepted_reply+0x15b>
jmp    12a0 <xdr_accepted_reply+0x160>
mov    -0x18(%rbp),%rax
mov    0x18(%rax),%rax
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rcx
mov    0x10(%rcx),%esi
call   *%rax
mov    %eax,-0x4(%rbp)
jmp    12ac <xdr_accepted_reply+0x16c>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
add    $0x4,%rsi
add    $0x4,%rsi
call   1030 <xdr_rpcvers@plt>
cmp    $0x0,%eax
jne    1282 <xdr_accepted_reply+0x142>
mov    0x2d60(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    12ac <xdr_accepted_reply+0x16c>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
add    $0x4,%rsi
call   1030 <xdr_rpcvers@plt>
mov    %eax,-0x4(%rbp)
jmp    12ac <xdr_accepted_reply+0x16c>
jmp    12a0 <xdr_accepted_reply+0x160>
mov    0x2d41(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xdr_accepted_reply>:
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    0x20(%rbx),%rsi
mov    %r14,%rdi
call   1060 <xdr_opaque_auth@plt>
test   %eax,%eax
je     11ce <xdr_accepted_reply+0x8e>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <xdr_enum@plt>
test   %eax,%eax
je     11ce <xdr_accepted_reply+0x8e>
mov    (%rbx),%eax
cmp    $0x83,%eax
je     11a8 <xdr_accepted_reply+0x68>
cmp    $0x81,%eax
jne    11df <xdr_accepted_reply+0x9f>
mov    0x18(%rbx),%rax
mov    0x10(%rbx),%esi
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    *%rax
lea    0x8(%rbx),%rsi
mov    %r14,%rdi
call   1030 <xdr_rpcvers@plt>
test   %eax,%eax
je     11ce <xdr_accepted_reply+0x8e>
add    $0x4,%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <xdr_rpcvers@plt>
mov    0x2e03(%rip),%rax
mov    (%rax),%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    0x2e02(%rip),%rax
jmp    11d5 <xdr_accepted_reply+0x95>

LLVM IR (-O0):
%struct.accepted_reply = type { i32, %struct.TYPE_4__, %struct.TYPE_3__, i32 }
%struct.TYPE_4__ = type { i32, i32 }
%struct.TYPE_3__ = type { i32, i32 (i32*, i32)* }
@FALSE = global i32 0
@TRUE = global i32 0
define i32 @xdr_accepted_reply(i32* %0, %struct.accepted_reply* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca %struct.accepted_reply*
%6 = alloca i32*
store i32* %0, i32** %4
store %struct.accepted_reply* %1, %struct.accepted_reply** %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.accepted_reply*, %struct.accepted_reply** %5
%12 = icmp ne %struct.accepted_reply* %11, null
%13 = zext i1 %12 to i32
%14 = call i32 @assert(i32 %13)
%15 = load %struct.accepted_reply*, %struct.accepted_reply** %5
%16 = getelementptr inbounds %struct.accepted_reply, %struct.accepted_reply* %15, i32 0, i32 0
store i32* %16, i32** %6
%17 = load i32*, i32** %4
%18 = load %struct.accepted_reply*, %struct.accepted_reply** %5
%19 = getelementptr inbounds %struct.accepted_reply, %struct.accepted_reply* %18, i32 0, i32 3
%20 = call i32 @xdr_opaque_auth(i32* %17, i32* %19)
%21 = icmp ne i32 %20, 0
br i1 %21, label %24, label %22
22: ; preds = %2
%23 = load i32, i32* @FALSE
store i32 %23, i32* %3
br label %64
24: ; preds = %2
%25 = load i32*, i32** %4
%26 = load i32*, i32** %6
%27 = call i32 @xdr_enum(i32* %25, i32* %26)
%28 = icmp ne i32 %27, 0
br i1 %28, label %31, label %29
29: ; preds = %24
%30 = load i32, i32* @FALSE
store i32 %30, i32* %3
br label %64
31: ; preds = %24
%32 = load %struct.accepted_reply*, %struct.accepted_reply** %5
%33 = getelementptr inbounds %struct.accepted_reply, %struct.accepted_reply* %32, i32 0, i32 0
%34 = load i32, i32* %33
switch i32 %34, label %62 [
i32 129, label %35
i32 131, label %46
i32 133, label %61
i32 128, label %61
i32 132, label %61
i32 130, label %61
]
35: ; preds = %31
%36 = load %struct.accepted_reply*, %struct.accepted_reply** %5
%37 = getelementptr inbounds %struct.accepted_reply, %struct.accepted_reply* %36, i32 0, i32 2
%38 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %37, i32 0, i32 1
%39 = load i32 (i32*, i32)*, i32 (i32*, i32)** %38
%40 = load i32*, i32** %4
%41 = load %struct.accepted_reply*, %struct.accepted_reply** %5
%42 = getelementptr inbounds %struct.accepted_reply, %struct.accepted_reply* %41, i32 0, i32 2
%43 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %42, i32 0, i32 0
%44 = load i32, i32* %43
%45 = call i32 %39(i32* %40, i32 %44)
store i32 %45, i32* %3
br label %64
46: ; preds = %31
%47 = load i32*, i32** %4
%48 = load %struct.accepted_reply*, %struct.accepted_reply** %5
%49 = getelementptr inbounds %struct.accepted_reply, %struct.accepted_reply* %48, i32 0, i32 1
%50 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %49, i32 0, i32 1
%51 = call i32 @xdr_rpcvers(i32* %47, i32* %50)
%52 = icmp ne i32 %51, 0
br i1 %52, label %55, label %53
53: ; preds = %46
%54 = load i32, i32* @FALSE
store i32 %54, i32* %3
br label %64
55: ; preds = %46
%56 = load i32*, i32** %4
%57 = load %struct.accepted_reply*, %struct.accepted_reply** %5
%58 = getelementptr inbounds %struct.accepted_reply, %struct.accepted_reply* %57, i32 0, i32 1
%59 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %58, i32 0, i32 0
%60 = call i32 @xdr_rpcvers(i32* %56, i32* %59)
store i32 %60, i32* %3
br label %64
61: ; preds = %31, %31, %31, %31
br label %62
62: ; preds = %31, %61
%63 = load i32, i32* @TRUE
store i32 %63, i32* %3
br label %64
64: ; preds = %62, %55, %53, %35, %29, %22
%65 = load i32, i32* %3
ret i32 %65
}

LLVM IR (-O2):
%struct.accepted_reply = type { i32, %struct.TYPE_4__, %struct.TYPE_3__, i32 }
%struct.TYPE_4__ = type { i32, i32 }
%struct.TYPE_3__ = type { i32, i32 (i32*, i32)* }
@FALSE = global i32 0
@TRUE = global i32 0
define i32 @xdr_accepted_reply(i32* %0, %struct.accepted_reply* %1) {
%3 = icmp ne i32* %0, null
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = icmp ne %struct.accepted_reply* %1, null
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
%9 = getelementptr inbounds %struct.accepted_reply, %struct.accepted_reply* %1, i64 0, i32 0
%10 = getelementptr inbounds %struct.accepted_reply, %struct.accepted_reply* %1, i64 0, i32 3
%11 = tail call i32 @xdr_opaque_auth(i32* %0, i32* %10)
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %2
%14 = load i32, i32* @FALSE
br label %39
15: ; preds = %2
%16 = tail call i32 @xdr_enum(i32* %0, i32* %9)
%17 = icmp eq i32 %16, 0
br i1 %17, label %18, label %20
18: ; preds = %15
%19 = load i32, i32* @FALSE
br label %39
20: ; preds = %15
%21 = load i32, i32* %9
switch i32 %21, label %37 [
i32 129, label %22
i32 131, label %28
]
22: ; preds = %20
%23 = getelementptr inbounds %struct.accepted_reply, %struct.accepted_reply* %1, i64 0, i32 2, i32 1
%24 = load i32 (i32*, i32)*, i32 (i32*, i32)** %23
%25 = getelementptr inbounds %struct.accepted_reply, %struct.accepted_reply* %1, i64 0, i32 2, i32 0
%26 = load i32, i32* %25
%27 = tail call i32 %24(i32* %0, i32 %26)
br label %39
28: ; preds = %20
%29 = getelementptr inbounds %struct.accepted_reply, %struct.accepted_reply* %1, i64 0, i32 1, i32 1
%30 = tail call i32 @xdr_rpcvers(i32* %0, i32* %29)
%31 = icmp eq i32 %30, 0
br i1 %31, label %32, label %34
32: ; preds = %28
%33 = load i32, i32* @FALSE
br label %39
34: ; preds = %28
%35 = getelementptr inbounds %struct.accepted_reply, %struct.accepted_reply* %1, i64 0, i32 1, i32 0
%36 = tail call i32 @xdr_rpcvers(i32* %0, i32* %35)
br label %39
37: ; preds = %20
%38 = load i32, i32* @TRUE
br label %39
39: ; preds = %37, %34, %32, %22, %18, %13
%40 = phi i32 [ %38, %37 ], [ %36, %34 ], [ %33, %32 ], [ %27, %22 ], [ %19, %18 ], [ %14, %13 ]
ret i32 %40
}