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

/* Type definitions */
typedef int /*<<< orphan*/ bool_t;
struct TYPE_5__ {
  int x_op;
};
typedef TYPE_1__ XDR;

/* Variables and functions */
int /*<<< orphan*/ FALSE;
int /*<<< orphan*/ TRUE;
#define XDR_DECODE 130
#define XDR_ENCODE 129
#define XDR_FREE 128
int /*<<< orphan*/ XDR_GETLONG(TYPE_1__ *, long *);
int /*<<< orphan*/ XDR_PUTLONG(TYPE_1__ *, long *);
bool_t xdr_long(XDR *xdrs, long *lp) {
  switch (xdrs->x_op) {
  case XDR_ENCODE:
    return (XDR_PUTLONG(xdrs, lp));
  case XDR_DECODE:
    return (XDR_GETLONG(xdrs, lp));
  case XDR_FREE:
    return (TRUE);
  }
  return (FALSE);
}


x86 assembly (clang, -O0):
<xdr_long>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
sub    $0x80,%eax
je     1199 <xdr_long+0x79>
jmp    1149 <xdr_long+0x29>
mov    -0x1c(%rbp),%eax
sub    $0x81,%eax
je     116f <xdr_long+0x4f>
jmp    115c <xdr_long+0x3c>
mov    -0x1c(%rbp),%eax
sub    $0x82,%eax
je     1184 <xdr_long+0x64>
jmp    11aa <xdr_long+0x8a>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <XDR_PUTLONG@plt>
mov    %eax,-0x4(%rbp)
jmp    11b6 <xdr_long+0x96>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <XDR_GETLONG@plt>
mov    %eax,-0x4(%rbp)
jmp    11b6 <xdr_long+0x96>
mov    0x2e48(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    11b6 <xdr_long+0x96>
mov    0x2e27(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xdr_long>:
mov    (%rdi),%eax
cmp    $0x80,%eax
je     113c <xdr_long+0x1c>
cmp    $0x82,%eax
je     1146 <xdr_long+0x26>
cmp    $0x81,%eax
jne    114b <xdr_long+0x2b>
jmp    1040 <XDR_PUTLONG@plt>
mov    0x2ea5(%rip),%rax
mov    (%rax),%eax
ret
jmp    1030 <XDR_GETLONG@plt>
mov    0x2e86(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
%struct.TYPE_5__ = type { i32 }
@TRUE = global i32 0
@FALSE = global i32 0
define i32 @xdr_long(%struct.TYPE_5__* %0, i64* %1) {
%3 = alloca i32
%4 = alloca %struct.TYPE_5__*
%5 = alloca i64*
store %struct.TYPE_5__* %0, %struct.TYPE_5__** %4
store i64* %1, i64** %5
%6 = load %struct.TYPE_5__*, %struct.TYPE_5__** %4
%7 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %6, i32 0, i32 0
%8 = load i32, i32* %7
switch i32 %8, label %19 [
i32 129, label %9
i32 130, label %13
i32 128, label %17
]
9: ; preds = %2
%10 = load %struct.TYPE_5__*, %struct.TYPE_5__** %4
%11 = load i64*, i64** %5
%12 = call i32 @XDR_PUTLONG(%struct.TYPE_5__* %10, i64* %11)
store i32 %12, i32* %3
br label %21
13: ; preds = %2
%14 = load %struct.TYPE_5__*, %struct.TYPE_5__** %4
%15 = load i64*, i64** %5
%16 = call i32 @XDR_GETLONG(%struct.TYPE_5__* %14, i64* %15)
store i32 %16, i32* %3
br label %21
17: ; preds = %2
%18 = load i32, i32* @TRUE
store i32 %18, i32* %3
br label %21
19: ; preds = %2
%20 = load i32, i32* @FALSE
store i32 %20, i32* %3
br label %21
21: ; preds = %19, %17, %13, %9
%22 = load i32, i32* %3
ret i32 %22
}

LLVM IR (-O2):
%struct.TYPE_5__ = type { i32 }
@TRUE = global i32 0
@FALSE = global i32 0
define i32 @xdr_long(%struct.TYPE_5__* %0, i64* %1) {
%3 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %0, i64 0, i32 0
%4 = load i32, i32* %3
switch i32 %4, label %11 [
i32 129, label %5
i32 130, label %7
i32 128, label %9
]
5: ; preds = %2
%6 = tail call i32 @XDR_PUTLONG(%struct.TYPE_5__* %0, i64* %1)
br label %13
7: ; preds = %2
%8 = tail call i32 @XDR_GETLONG(%struct.TYPE_5__* %0, i64* %1)
br label %13
9: ; preds = %2
%10 = load i32, i32* @TRUE
br label %13
11: ; preds = %2
%12 = load i32, i32* @FALSE
br label %13
13: ; preds = %11, %9, %7, %5
%14 = phi i32 [ %12, %11 ], [ %10, %9 ], [ %8, %7 ], [ %6, %5 ]
ret i32 %14
}