#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_9__ TYPE_2__;
typedef struct TYPE_8__ TYPE_1__;

/* Type definitions */
typedef int uint64_t;
typedef int uint32_t;
typedef int /*<<< orphan*/ int32_t;
typedef int bool_t;
struct TYPE_9__ {
  int x_op;
  TYPE_1__ *x_ops;
};
typedef TYPE_2__ XDR;
struct TYPE_8__ {
  int /*<<< orphan*/ (*x_getint32)(TYPE_2__ *, int /*<<< orphan*/ *);
  int /*<<< orphan*/ (*x_putint32)(TYPE_2__ *, int /*<<< orphan*/ *);
};

/* Variables and functions */
#define XDR_DECODE 130
#define XDR_ENCODE 129
#define XDR_FREE 128
int /*<<< orphan*/ stub1(TYPE_2__ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ stub2(TYPE_2__ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ stub3(TYPE_2__ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ stub4(TYPE_2__ *, int /*<<< orphan*/ *);
bool_t xdr_uint64_t(XDR *xdrs, uint64_t *uip) {
  uint32_t t1;
  uint32_t t2;
  switch (xdrs->x_op) {
  case XDR_ENCODE:
    t1 = (uint32_t)((*uip) >> 32);
    t2 = (uint32_t)(*uip);
    return ((*(xdrs)->x_ops->x_putint32)(xdrs, (int32_t *)&t1) &&
            (*(xdrs)->x_ops->x_putint32)(xdrs, (int32_t *)&t2));
  case XDR_DECODE:
    if (!(*(xdrs)->x_ops->x_getint32)(xdrs, (int32_t *)&t1) ||
        !(*(xdrs)->x_ops->x_getint32)(xdrs, (int32_t *)&t2))
      return 0;
    *uip = ((uint64_t)t1) << 32;
    *uip |= t2;
    return 1;
  case XDR_FREE:
    return 1;
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<xdr_uint64_t>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
sub    $0x80,%eax
je     122e <xdr_uint64_t+0x12e>
jmp    1129 <xdr_uint64_t+0x29>
mov    -0x24(%rbp),%eax
sub    $0x81,%eax
je     114f <xdr_uint64_t+0x4f>
jmp    113c <xdr_uint64_t+0x3c>
mov    -0x24(%rbp),%eax
sub    $0x82,%eax
je     11bd <xdr_uint64_t+0xbd>
jmp    123a <xdr_uint64_t+0x13a>
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    $0x20,%ecx
sar    %cl,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    0x8(%rax),%rax
mov    -0x10(%rbp),%rdi
lea    -0x1c(%rbp),%rsi
call   *%rax
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x25(%rbp)
je     11ad <xdr_uint64_t+0xad>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    0x8(%rax),%rax
mov    -0x10(%rbp),%rdi
lea    -0x20(%rbp),%rsi
call   *%rax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x25(%rbp)
mov    -0x25(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
jmp    1241 <xdr_uint64_t+0x141>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    (%rax),%rax
mov    -0x10(%rbp),%rdi
lea    -0x1c(%rbp),%rsi
call   *%rax
cmp    $0x0,%eax
je     11f9 <xdr_uint64_t+0xf9>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    (%rax),%rax
mov    -0x10(%rbp),%rdi
lea    -0x20(%rbp),%rsi
call   *%rax
cmp    $0x0,%eax
jne    1205 <xdr_uint64_t+0x105>
movl   $0x0,-0x4(%rbp)
jmp    1241 <xdr_uint64_t+0x141>
mov    -0x1c(%rbp),%eax
mov    $0x20,%ecx
shl    %cl,%eax
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x20(%rbp),%ecx
mov    -0x18(%rbp),%rax
or     (%rax),%ecx
mov    %ecx,(%rax)
movl   $0x1,-0x4(%rbp)
jmp    1241 <xdr_uint64_t+0x141>
movl   $0x1,-0x4(%rbp)
jmp    1241 <xdr_uint64_t+0x141>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xdr_uint64_t>:
push   %rbx
sub    $0x10,%rsp
mov    (%rdi),%eax
cmp    $0x80,%eax
je     1149 <xdr_uint64_t+0x49>
mov    %rdi,%rbx
cmp    $0x82,%eax
je     114d <xdr_uint64_t+0x4d>
cmp    $0x81,%eax
jne    1174 <xdr_uint64_t+0x74>
mov    (%rsi),%eax
mov    %eax,0x8(%rsp)
mov    0x8(%rbx),%rax
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   *0x8(%rax)
test   %eax,%eax
je     1174 <xdr_uint64_t+0x74>
mov    0x8(%rbx),%rax
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   *0x8(%rax)
jmp    116d <xdr_uint64_t+0x6d>
mov    $0x1,%al
jmp    1176 <xdr_uint64_t+0x76>
mov    0x8(%rbx),%rax
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   *(%rax)
test   %eax,%eax
je     1174 <xdr_uint64_t+0x74>
mov    0x8(%rbx),%rax
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   *(%rax)
test   %eax,%eax
setne  %al
jmp    1176 <xdr_uint64_t+0x76>
xor    %eax,%eax
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

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