#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 u_quad_t;
typedef int bool_t;
struct TYPE_5__ {
  scalar_t__ x_op;
};
typedef TYPE_1__ XDR;

/* Variables and functions */
int FALSE;
int TRUE;
scalar_t__ XDR_DECODE;
scalar_t__ XDR_ENCODE;
scalar_t__ XDR_FREE;
int /*<<< orphan*/ XDR_GETLONG(TYPE_1__ *, unsigned long *);
scalar_t__ XDR_PUTLONG(TYPE_1__ *, unsigned long *);
bool_t xdr_u_hyper(XDR *xdrs, u_quad_t *ullp) {
  unsigned long t1;
  unsigned long t2;
  if (xdrs->x_op == XDR_ENCODE) {
    t1 = (unsigned long)((*ullp) >> 32);
    t2 = (unsigned long)(*ullp);
    return (XDR_PUTLONG(xdrs, &t1) && XDR_PUTLONG(xdrs, &t2));
  }
  if (xdrs->x_op == XDR_DECODE) {
    if (!XDR_GETLONG(xdrs, &t1) || !XDR_GETLONG(xdrs, &t2))
      return FALSE;
    *ullp = ((u_quad_t)t1) << 32;
    *ullp |= t2;
    return TRUE;
  }
  if (xdrs->x_op == XDR_FREE)
    return TRUE;
  return FALSE;
}


x86 assembly (clang, -O0):
<xdr_u_hyper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    0x2e9a(%rip),%rcx
cmp    (%rcx),%rax
jne    11ab <xdr_u_hyper+0x8b>
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    $0x20,%ecx
sar    %cl,%eax
cltq
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movslq (%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x20(%rbp),%rsi
call   1040 <XDR_PUTLONG@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x29(%rbp)
je     119b <xdr_u_hyper+0x7b>
mov    -0x10(%rbp),%rdi
lea    -0x28(%rbp),%rsi
call   1040 <XDR_PUTLONG@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x29(%rbp)
mov    -0x29(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
jmp    1267 <xdr_u_hyper+0x147>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    0x2e37(%rip),%rcx
cmp    (%rcx),%rax
jne    1233 <xdr_u_hyper+0x113>
mov    -0x10(%rbp),%rdi
lea    -0x20(%rbp),%rsi
call   1030 <XDR_GETLONG@plt>
cmp    $0x0,%eax
je     11ee <xdr_u_hyper+0xce>
mov    -0x10(%rbp),%rdi
lea    -0x28(%rbp),%rsi
call   1030 <XDR_GETLONG@plt>
cmp    $0x0,%eax
jne    11ff <xdr_u_hyper+0xdf>
mov    0x2dcb(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1267 <xdr_u_hyper+0x147>
mov    -0x20(%rbp),%rax
mov    $0x20,%ecx
shl    %cl,%eax
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x28(%rbp),%rdx
mov    -0x18(%rbp),%rax
movslq (%rax),%rcx
or     %rdx,%rcx
mov    %ecx,(%rax)
mov    0x2db7(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1267 <xdr_u_hyper+0x147>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    0x2d87(%rip),%rcx
cmp    (%rcx),%rax
jne    125b <xdr_u_hyper+0x13b>
mov    0x2d8f(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1267 <xdr_u_hyper+0x147>
mov    0x2d5e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xdr_u_hyper>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
mov    (%rdi),%rax
mov    0x2ea6(%rip),%rcx
cmp    (%rcx),%rax
jne    1168 <xdr_u_hyper+0x48>
movslq (%rsi),%rax
mov    %rax,(%rsp)
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <XDR_PUTLONG@plt>
test   %rax,%rax
je     11b4 <xdr_u_hyper+0x94>
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1040 <XDR_PUTLONG@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
jmp    11b6 <xdr_u_hyper+0x96>
mov    0x2e81(%rip),%rcx
cmp    (%rcx),%rax
jne    119d <xdr_u_hyper+0x7d>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1030 <XDR_GETLONG@plt>
test   %eax,%eax
je     11a9 <xdr_u_hyper+0x89>
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1030 <XDR_GETLONG@plt>
test   %eax,%eax
je     11a9 <xdr_u_hyper+0x89>
mov    0x2e45(%rip),%rax
jmp    11b0 <xdr_u_hyper+0x90>
mov    0x2e24(%rip),%rcx
cmp    (%rcx),%rax
je     1194 <xdr_u_hyper+0x74>
mov    0x2e10(%rip),%rax
mov    (%rax),%eax
jmp    11b6 <xdr_u_hyper+0x96>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.TYPE_5__ = type { i64 }
@XDR_ENCODE = global i64 0
@XDR_DECODE = global i64 0
@FALSE = global i32 0
@TRUE = global i32 0
@XDR_FREE = global i64 0
define i32 @xdr_u_hyper(%struct.TYPE_5__* %0, i32* %1) {
%3 = alloca i32
%4 = alloca %struct.TYPE_5__*
%5 = alloca i32*
%6 = alloca i64
%7 = alloca i64
store %struct.TYPE_5__* %0, %struct.TYPE_5__** %4
store i32* %1, i32** %5
%8 = load %struct.TYPE_5__*, %struct.TYPE_5__** %4
%9 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %8, i32 0, i32 0
%10 = load i64, i64* %9
%11 = load i64, i64* @XDR_ENCODE
%12 = icmp eq i64 %10, %11
br i1 %12, label %13, label %31
13: ; preds = %2
%14 = load i32*, i32** %5
%15 = load i32, i32* %14
%16 = ashr i32 %15, 32
%17 = sext i32 %16 to i64
store i64 %17, i64* %6
%18 = load i32*, i32** %5
%19 = load i32, i32* %18
%20 = sext i32 %19 to i64
store i64 %20, i64* %7
%21 = load %struct.TYPE_5__*, %struct.TYPE_5__** %4
%22 = call i64 @XDR_PUTLONG(%struct.TYPE_5__* %21, i64* %6)
%23 = icmp ne i64 %22, 0
br i1 %23, label %24, label %28
24: ; preds = %13
%25 = load %struct.TYPE_5__*, %struct.TYPE_5__** %4
%26 = call i64 @XDR_PUTLONG(%struct.TYPE_5__* %25, i64* %7)
%27 = icmp ne i64 %26, 0
br label %28
28: ; preds = %24, %13
%29 = phi i1 [ false, %13 ], [ %27, %24 ]
%30 = zext i1 %29 to i32
store i32 %30, i32* %3
br label %69
31: ; preds = %2
%32 = load %struct.TYPE_5__*, %struct.TYPE_5__** %4
%33 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %32, i32 0, i32 0
%34 = load i64, i64* %33
%35 = load i64, i64* @XDR_DECODE
%36 = icmp eq i64 %34, %35
br i1 %36, label %37, label %59
37: ; preds = %31
%38 = load %struct.TYPE_5__*, %struct.TYPE_5__** %4
%39 = call i32 @XDR_GETLONG(%struct.TYPE_5__* %38, i64* %6)
%40 = icmp ne i32 %39, 0
br i1 %40, label %41, label %45
41: ; preds = %37
%42 = load %struct.TYPE_5__*, %struct.TYPE_5__** %4
%43 = call i32 @XDR_GETLONG(%struct.TYPE_5__* %42, i64* %7)
%44 = icmp ne i32 %43, 0
br i1 %44, label %47, label %45
45: ; preds = %41, %37
%46 = load i32, i32* @FALSE
store i32 %46, i32* %3
br label %69
47: ; preds = %41
%48 = load i64, i64* %6
%49 = trunc i64 %48 to i32
%50 = shl i32 %49, 32
%51 = load i32*, i32** %5
store i32 %50, i32* %51
%52 = load i64, i64* %7
%53 = load i32*, i32** %5
%54 = load i32, i32* %53
%55 = sext i32 %54 to i64
%56 = or i64 %55, %52
%57 = trunc i64 %56 to i32
store i32 %57, i32* %53
%58 = load i32, i32* @TRUE
store i32 %58, i32* %3
br label %69
59: ; preds = %31
%60 = load %struct.TYPE_5__*, %struct.TYPE_5__** %4
%61 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %60, i32 0, i32 0
%62 = load i64, i64* %61
%63 = load i64, i64* @XDR_FREE
%64 = icmp eq i64 %62, %63
br i1 %64, label %65, label %67
65: ; preds = %59
%66 = load i32, i32* @TRUE
store i32 %66, i32* %3
br label %69
67: ; preds = %59
%68 = load i32, i32* @FALSE
store i32 %68, i32* %3
br label %69
69: ; preds = %67, %65, %47, %45, %28
%70 = load i32, i32* %3
ret i32 %70
}

LLVM IR (-O2):
%struct.TYPE_5__ = type { i64 }
@XDR_ENCODE = global i64 0
@XDR_DECODE = global i64 0
@FALSE = global i32 0
@TRUE = global i32 0
@XDR_FREE = global i64 0
define i32 @xdr_u_hyper(%struct.TYPE_5__* %0, i32* nocapture %1) {
%3 = alloca i64
%4 = alloca i64
%5 = bitcast i64* %3 to i8*
%6 = bitcast i64* %4 to i8*
%7 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %0, i64 0, i32 0
%8 = load i64, i64* %7
%9 = load i64, i64* @XDR_ENCODE
%10 = icmp eq i64 %8, %9
br i1 %10, label %11, label %20
11: ; preds = %2
%12 = load i32, i32* %1
%13 = sext i32 %12 to i64
store i64 %13, i64* %4
%14 = call i64 @XDR_PUTLONG(%struct.TYPE_5__* %0, i64* %3)
%15 = icmp eq i64 %14, 0
br i1 %15, label %40, label %16
16: ; preds = %11
%17 = call i64 @XDR_PUTLONG(%struct.TYPE_5__* %0, i64* %4)
%18 = icmp ne i64 %17, 0
%19 = zext i1 %18 to i32
br label %40
20: ; preds = %2
%21 = load i64, i64* @XDR_DECODE
%22 = icmp eq i64 %8, %21
br i1 %22, label %23, label %33
23: ; preds = %20
%24 = call i32 @XDR_GETLONG(%struct.TYPE_5__* %0, i64* %3)
%25 = icmp eq i32 %24, 0
br i1 %25, label %29, label %26
26: ; preds = %23
%27 = call i32 @XDR_GETLONG(%struct.TYPE_5__* %0, i64* %4)
%28 = icmp eq i32 %27, 0
br i1 %28, label %29, label %31
29: ; preds = %26, %23
%30 = load i32, i32* @FALSE
br label %40
31: ; preds = %26
%32 = load i32, i32* @TRUE
br label %40
33: ; preds = %20
%34 = load i64, i64* @XDR_FREE
%35 = icmp eq i64 %8, %34
br i1 %35, label %36, label %38
36: ; preds = %33
%37 = load i32, i32* @TRUE
br label %40
38: ; preds = %33
%39 = load i32, i32* @FALSE
br label %40
40: ; preds = %11, %16, %38, %36, %31, %29
%41 = phi i32 [ %32, %31 ], [ %30, %29 ], [ %37, %36 ], [ %39, %38 ], [ 0, %11 ], [ %19, %16 ]
ret i32 %41
}