#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_7__ TYPE_2__;
typedef struct TYPE_6__ TYPE_1__;

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

/* Variables and functions */
#define XDR_DECODE 130
#define XDR_ENCODE 129
#define XDR_FREE 128
int stub1(TYPE_2__ *, int /*<<< orphan*/ *);
int stub2(TYPE_2__ *, int /*<<< orphan*/ *);
bool_t xdr_uint32_t(XDR *xdrs, unsigned int *ulp) {
  switch (xdrs->x_op) {
  case XDR_ENCODE:
    return (*(xdrs)->x_ops->x_putint32)(xdrs, (int32_t *)ulp);
  case XDR_DECODE:
    return (*(xdrs)->x_ops->x_getint32)(xdrs, (int32_t *)ulp);
  case XDR_FREE:
    return 1;
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<xdr_uint32_t>:
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     118a <xdr_uint32_t+0x8a>
jmp    1129 <xdr_uint32_t+0x29>
mov    -0x1c(%rbp),%eax
sub    $0x81,%eax
je     114f <xdr_uint32_t+0x4f>
jmp    113c <xdr_uint32_t+0x3c>
mov    -0x1c(%rbp),%eax
sub    $0x82,%eax
je     116c <xdr_uint32_t+0x6c>
jmp    1196 <xdr_uint32_t+0x96>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    (%rax),%rax
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   *%rax
mov    %eax,-0x4(%rbp)
jmp    119d <xdr_uint32_t+0x9d>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    0x8(%rax),%rax
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   *%rax
mov    %eax,-0x4(%rbp)
jmp    119d <xdr_uint32_t+0x9d>
movl   $0x1,-0x4(%rbp)
jmp    119d <xdr_uint32_t+0x9d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xdr_uint32_t>:
mov    (%rdi),%eax
cmp    $0x80,%eax
je     1120 <xdr_uint32_t+0x20>
cmp    $0x82,%eax
je     1126 <xdr_uint32_t+0x26>
cmp    $0x81,%eax
jne    1130 <xdr_uint32_t+0x30>
mov    0x8(%rdi),%rax
mov    (%rax),%rax
jmp    *%rax
mov    $0x1,%eax
ret
mov    0x8(%rdi),%rax
mov    0x8(%rax),%rax
jmp    *%rax
xor    %eax,%eax
ret

LLVM IR (-O0):
%struct.TYPE_7__ = type { i32, %struct.TYPE_6__* }
%struct.TYPE_6__ = type { i32 (%struct.TYPE_7__*, i32*)*, i32 (%struct.TYPE_7__*, i32*)* }
define i32 @xdr_uint32_t(%struct.TYPE_7__* %0, i32* %1) {
%3 = alloca i32
%4 = alloca %struct.TYPE_7__*
%5 = alloca i32*
store %struct.TYPE_7__* %0, %struct.TYPE_7__** %4
store i32* %1, i32** %5
%6 = load %struct.TYPE_7__*, %struct.TYPE_7__** %4
%7 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %6, i32 0, i32 0
%8 = load i32, i32* %7
switch i32 %8, label %28 [
i32 129, label %9
i32 130, label %18
i32 128, label %27
]
9: ; preds = %2
%10 = load %struct.TYPE_7__*, %struct.TYPE_7__** %4
%11 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %10, i32 0, i32 1
%12 = load %struct.TYPE_6__*, %struct.TYPE_6__** %11
%13 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %12, i32 0, i32 0
%14 = load i32 (%struct.TYPE_7__*, i32*)*, i32 (%struct.TYPE_7__*, i32*)** %13
%15 = load %struct.TYPE_7__*, %struct.TYPE_7__** %4
%16 = load i32*, i32** %5
%17 = call i32 %14(%struct.TYPE_7__* %15, i32* %16)
store i32 %17, i32* %3
br label %29
18: ; preds = %2
%19 = load %struct.TYPE_7__*, %struct.TYPE_7__** %4
%20 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %19, i32 0, i32 1
%21 = load %struct.TYPE_6__*, %struct.TYPE_6__** %20
%22 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %21, i32 0, i32 1
%23 = load i32 (%struct.TYPE_7__*, i32*)*, i32 (%struct.TYPE_7__*, i32*)** %22
%24 = load %struct.TYPE_7__*, %struct.TYPE_7__** %4
%25 = load i32*, i32** %5
%26 = call i32 %23(%struct.TYPE_7__* %24, i32* %25)
store i32 %26, i32* %3
br label %29
27: ; preds = %2
store i32 1, i32* %3
br label %29
28: ; preds = %2
store i32 0, i32* %3
br label %29
29: ; preds = %28, %27, %18, %9
%30 = load i32, i32* %3
ret i32 %30
}

LLVM IR (-O2):
%struct.TYPE_7__ = type { i32, %struct.TYPE_6__* }
%struct.TYPE_6__ = type { i32 (%struct.TYPE_7__*, i32*)*, i32 (%struct.TYPE_7__*, i32*)* }
define i32 @xdr_uint32_t(%struct.TYPE_7__* %0, i32* %1) {
%3 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %0, i64 0, i32 0
%4 = load i32, i32* %3
switch i32 %4, label %17 [
i32 129, label %5
i32 130, label %11
i32 128, label %18
]
5: ; preds = %2
%6 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %0, i64 0, i32 1
%7 = load %struct.TYPE_6__*, %struct.TYPE_6__** %6
%8 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %7, i64 0, i32 0
%9 = load i32 (%struct.TYPE_7__*, i32*)*, i32 (%struct.TYPE_7__*, i32*)** %8
%10 = tail call i32 %9(%struct.TYPE_7__* %0, i32* %1)
br label %18
11: ; preds = %2
%12 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %0, i64 0, i32 1
%13 = load %struct.TYPE_6__*, %struct.TYPE_6__** %12
%14 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %13, i64 0, i32 1
%15 = load i32 (%struct.TYPE_7__*, i32*)*, i32 (%struct.TYPE_7__*, i32*)** %14
%16 = tail call i32 %15(%struct.TYPE_7__* %0, i32* %1)
br label %18
17: ; preds = %2
br label %18
18: ; preds = %2, %17, %11, %5
%19 = phi i32 [ 0, %17 ], [ %16, %11 ], [ %10, %5 ], [ 1, %2 ]
ret i32 %19
}