#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_3__ {
  int /*<<< orphan*/ high;
  int /*<<< orphan*/ low;
};
struct TYPE_4__ {
  int /*<<< orphan*/ where;
  int /*<<< orphan*/ (*proc)(int /*<<< orphan*/ *, int /*<<< orphan*/);
};
struct accepted_reply {
  int ar_stat;
  TYPE_1__ ar_vers;
  TYPE_2__ ar_results;
  int /*<<< orphan*/ ar_verf;
};
typedef int /*<<< orphan*/ enum_t;
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*/ 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_u_int32_t(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
bool_t xdr_accepted_reply(XDR *xdrs, struct accepted_reply *ar) {
  if (!xdr_opaque_auth(xdrs, &(ar->ar_verf)))
    return (FALSE);
  if (!xdr_enum(xdrs, (enum_t *)(void *)&(ar->ar_stat)))
    return (FALSE);
  switch (ar->ar_stat) {
  case SUCCESS:
    return ((*(ar->ar_results.proc))(xdrs, ar->ar_results.where));
  case PROG_MISMATCH:
    if (!xdr_u_int32_t(xdrs, &(ar->ar_vers.low)))
      return (FALSE);
    return (xdr_u_int32_t(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    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
add    $0x20,%rsi
call   1050 <xdr_opaque_auth@plt>
cmp    $0x0,%eax
jne    116b <xdr_accepted_reply+0x3b>
mov    0x2e77(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1270 <xdr_accepted_reply+0x140>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <xdr_enum@plt>
cmp    $0x0,%eax
jne    1192 <xdr_accepted_reply+0x62>
mov    0x2e50(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1270 <xdr_accepted_reply+0x140>
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
sub    $0x80,%eax
je     125f <xdr_accepted_reply+0x12f>
jmp    11ab <xdr_accepted_reply+0x7b>
mov    -0x1c(%rbp),%eax
sub    $0x81,%eax
je     11fa <xdr_accepted_reply+0xca>
jmp    11be <xdr_accepted_reply+0x8e>
mov    -0x1c(%rbp),%eax
sub    $0x82,%eax
je     125f <xdr_accepted_reply+0x12f>
jmp    11d1 <xdr_accepted_reply+0xa1>
mov    -0x1c(%rbp),%eax
sub    $0x83,%eax
je     1217 <xdr_accepted_reply+0xe7>
jmp    11e4 <xdr_accepted_reply+0xb4>
mov    -0x1c(%rbp),%eax
add    $0xffffff7c,%eax
sub    $0x2,%eax
jb     125f <xdr_accepted_reply+0x12f>
jmp    1264 <xdr_accepted_reply+0x134>
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    1270 <xdr_accepted_reply+0x140>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
add    $0x4,%rsi
add    $0x4,%rsi
call   1040 <xdr_u_int32_t@plt>
cmp    $0x0,%eax
jne    1246 <xdr_accepted_reply+0x116>
mov    0x2d9c(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1270 <xdr_accepted_reply+0x140>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
add    $0x4,%rsi
call   1040 <xdr_u_int32_t@plt>
mov    %eax,-0x4(%rbp)
jmp    1270 <xdr_accepted_reply+0x140>
jmp    1264 <xdr_accepted_reply+0x134>
mov    0x2d7d(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xdr_accepted_reply>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
add    $0x20,%rsi
call   1050 <xdr_opaque_auth@plt>
test   %eax,%eax
je     119f <xdr_accepted_reply+0x6f>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <xdr_enum@plt>
test   %eax,%eax
je     119f <xdr_accepted_reply+0x6f>
mov    (%rbx),%eax
cmp    $0x83,%eax
je     1179 <xdr_accepted_reply+0x49>
cmp    $0x81,%eax
jne    11b0 <xdr_accepted_reply+0x80>
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   1040 <xdr_u_int32_t@plt>
test   %eax,%eax
je     119f <xdr_accepted_reply+0x6f>
add    $0x4,%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <xdr_u_int32_t@plt>
mov    0x2e32(%rip),%rax
mov    (%rax),%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    0x2e31(%rip),%rax
jmp    11a6 <xdr_accepted_reply+0x76>

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

LLVM IR (-O2):
%struct.accepted_reply = type { i32, %struct.TYPE_3__, %struct.TYPE_4__, i32 }
%struct.TYPE_3__ = type { i32, i32 }
%struct.TYPE_4__ = 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 = getelementptr inbounds %struct.accepted_reply, %struct.accepted_reply* %1, i64 0, i32 3
%4 = tail call i32 @xdr_opaque_auth(i32* %0, i32* %3)
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = load i32, i32* @FALSE
br label %33
8: ; preds = %2
%9 = getelementptr inbounds %struct.accepted_reply, %struct.accepted_reply* %1, i64 0, i32 0
%10 = tail call i32 @xdr_enum(i32* %0, i32* %9)
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %8
%13 = load i32, i32* @FALSE
br label %33
14: ; preds = %8
%15 = load i32, i32* %9
switch i32 %15, label %31 [
i32 129, label %16
i32 131, label %22
]
16: ; preds = %14
%17 = getelementptr inbounds %struct.accepted_reply, %struct.accepted_reply* %1, i64 0, i32 2, i32 1
%18 = load i32 (i32*, i32)*, i32 (i32*, i32)** %17
%19 = getelementptr inbounds %struct.accepted_reply, %struct.accepted_reply* %1, i64 0, i32 2, i32 0
%20 = load i32, i32* %19
%21 = tail call i32 %18(i32* %0, i32 %20)
br label %33
22: ; preds = %14
%23 = getelementptr inbounds %struct.accepted_reply, %struct.accepted_reply* %1, i64 0, i32 1, i32 1
%24 = tail call i32 @xdr_u_int32_t(i32* %0, i32* %23)
%25 = icmp eq i32 %24, 0
br i1 %25, label %26, label %28
26: ; preds = %22
%27 = load i32, i32* @FALSE
br label %33
28: ; preds = %22
%29 = getelementptr inbounds %struct.accepted_reply, %struct.accepted_reply* %1, i64 0, i32 1, i32 0
%30 = tail call i32 @xdr_u_int32_t(i32* %0, i32* %29)
br label %33
31: ; preds = %14
%32 = load i32, i32* @TRUE
br label %33
33: ; preds = %31, %28, %26, %16, %12, %6
%34 = phi i32 [ %32, %31 ], [ %30, %28 ], [ %27, %26 ], [ %21, %16 ], [ %13, %12 ], [ %7, %6 ]
ret i32 %34
}