#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_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int /*<<< orphan*/ high;
  int /*<<< orphan*/ low;
};
struct rejected_reply {
  int rj_stat;
  int /*<<< orphan*/ rj_why;
  TYPE_1__ rj_vers;
};
typedef int /*<<< orphan*/ enum_t;
typedef int /*<<< orphan*/ bool_t;
typedef int /*<<< orphan*/ XDR;

/* Variables and functions */
#define AUTH_ERROR 129
int /*<<< orphan*/ FALSE;
#define RPC_MISMATCH 128
int /*<<< orphan*/ xdr_enum(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ xdr_u_long(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
bool_t xdr_rejected_reply(XDR *xdrs, struct rejected_reply *rr) {
  if (!xdr_enum(xdrs, (enum_t *)&(rr->rj_stat)))
    return (FALSE);
  switch (rr->rj_stat) {
  case RPC_MISMATCH:
    if (!xdr_u_long(xdrs, &(rr->rj_vers.low)))
      return (FALSE);
    return (xdr_u_long(xdrs, &(rr->rj_vers.high)));
  case AUTH_ERROR:
    return (xdr_enum(xdrs, (enum_t *)&(rr->rj_why)));
  }
  return (FALSE);
}


x86 assembly (clang, -O0):
<xdr_rejected_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
call   1030 <xdr_enum@plt>
cmp    $0x0,%eax
jne    1157 <xdr_rejected_reply+0x37>
mov    0x2e93(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    11f0 <xdr_rejected_reply+0xd0>
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
sub    $0x80,%eax
je     1183 <xdr_rejected_reply+0x63>
jmp    1170 <xdr_rejected_reply+0x50>
mov    -0x1c(%rbp),%eax
sub    $0x81,%eax
je     11cb <xdr_rejected_reply+0xab>
jmp    11e4 <xdr_rejected_reply+0xc4>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
add    $0x8,%rsi
add    $0x4,%rsi
call   1040 <xdr_u_long@plt>
cmp    $0x0,%eax
jne    11b2 <xdr_rejected_reply+0x92>
mov    0x2e38(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    11f0 <xdr_rejected_reply+0xd0>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
add    $0x8,%rsi
call   1040 <xdr_u_long@plt>
mov    %eax,-0x4(%rbp)
jmp    11f0 <xdr_rejected_reply+0xd0>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
add    $0x4,%rsi
call   1030 <xdr_enum@plt>
mov    %eax,-0x4(%rbp)
jmp    11f0 <xdr_rejected_reply+0xd0>
mov    0x2df5(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xdr_rejected_reply>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
call   1030 <xdr_enum@plt>
test   %eax,%eax
je     1169 <xdr_rejected_reply+0x49>
mov    (%rbx),%eax
cmp    $0x81,%eax
je     117a <xdr_rejected_reply+0x5a>
cmp    $0x80,%eax
jne    1169 <xdr_rejected_reply+0x49>
lea    0xc(%rbx),%rsi
mov    %r14,%rdi
call   1040 <xdr_u_long@plt>
test   %eax,%eax
je     1169 <xdr_rejected_reply+0x49>
add    $0x8,%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <xdr_u_long@plt>
mov    0x2e70(%rip),%rax
mov    (%rax),%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
add    $0x4,%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <xdr_enum@plt>

LLVM IR (-O0):
%struct.rejected_reply = type { i32, i32, %struct.TYPE_2__ }
%struct.TYPE_2__ = type { i32, i32 }
@FALSE = global i32 0
define i32 @xdr_rejected_reply(i32* %0, %struct.rejected_reply* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca %struct.rejected_reply*
store i32* %0, i32** %4
store %struct.rejected_reply* %1, %struct.rejected_reply** %5
%6 = load i32*, i32** %4
%7 = load %struct.rejected_reply*, %struct.rejected_reply** %5
%8 = getelementptr inbounds %struct.rejected_reply, %struct.rejected_reply* %7, i32 0, i32 0
%9 = call i32 @xdr_enum(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 %39
13: ; preds = %2
%14 = load %struct.rejected_reply*, %struct.rejected_reply** %5
%15 = getelementptr inbounds %struct.rejected_reply, %struct.rejected_reply* %14, i32 0, i32 0
%16 = load i32, i32* %15
switch i32 %16, label %37 [
i32 128, label %17
i32 129, label %32
]
17: ; preds = %13
%18 = load i32*, i32** %4
%19 = load %struct.rejected_reply*, %struct.rejected_reply** %5
%20 = getelementptr inbounds %struct.rejected_reply, %struct.rejected_reply* %19, i32 0, i32 2
%21 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %20, i32 0, i32 1
%22 = call i32 @xdr_u_long(i32* %18, i32* %21)
%23 = icmp ne i32 %22, 0
br i1 %23, label %26, label %24
24: ; preds = %17
%25 = load i32, i32* @FALSE
store i32 %25, i32* %3
br label %39
26: ; preds = %17
%27 = load i32*, i32** %4
%28 = load %struct.rejected_reply*, %struct.rejected_reply** %5
%29 = getelementptr inbounds %struct.rejected_reply, %struct.rejected_reply* %28, i32 0, i32 2
%30 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %29, i32 0, i32 0
%31 = call i32 @xdr_u_long(i32* %27, i32* %30)
store i32 %31, i32* %3
br label %39
32: ; preds = %13
%33 = load i32*, i32** %4
%34 = load %struct.rejected_reply*, %struct.rejected_reply** %5
%35 = getelementptr inbounds %struct.rejected_reply, %struct.rejected_reply* %34, i32 0, i32 1
%36 = call i32 @xdr_enum(i32* %33, i32* %35)
store i32 %36, i32* %3
br label %39
37: ; preds = %13
%38 = load i32, i32* @FALSE
store i32 %38, i32* %3
br label %39
39: ; preds = %37, %32, %26, %24, %11
%40 = load i32, i32* %3
ret i32 %40
}

LLVM IR (-O2):
%struct.rejected_reply = type { i32, i32, %struct.TYPE_2__ }
%struct.TYPE_2__ = type { i32, i32 }
@FALSE = global i32 0
define i32 @xdr_rejected_reply(i32* %0, %struct.rejected_reply* %1) {
%3 = getelementptr inbounds %struct.rejected_reply, %struct.rejected_reply* %1, i64 0, i32 0
%4 = tail call i32 @xdr_enum(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 %24
8: ; preds = %2
%9 = load i32, i32* %3
switch i32 %9, label %22 [
i32 128, label %10
i32 129, label %19
]
10: ; preds = %8
%11 = getelementptr inbounds %struct.rejected_reply, %struct.rejected_reply* %1, i64 0, i32 2, i32 1
%12 = tail call i32 @xdr_u_long(i32* %0, i32* %11)
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %10
%15 = load i32, i32* @FALSE
br label %24
16: ; preds = %10
%17 = getelementptr inbounds %struct.rejected_reply, %struct.rejected_reply* %1, i64 0, i32 2, i32 0
%18 = tail call i32 @xdr_u_long(i32* %0, i32* %17)
br label %24
19: ; preds = %8
%20 = getelementptr inbounds %struct.rejected_reply, %struct.rejected_reply* %1, i64 0, i32 1
%21 = tail call i32 @xdr_enum(i32* %0, i32* %20)
br label %24
22: ; preds = %8
%23 = load i32, i32* @FALSE
br label %24
24: ; preds = %22, %19, %16, %14, %6
%25 = phi i32 [ %23, %22 ], [ %21, %19 ], [ %18, %16 ], [ %15, %14 ], [ %7, %6 ]
ret i32 %25
}