#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*/ uint32_t;
typedef int /*<<< orphan*/ int32_t;
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_GETINT32(TYPE_1__ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ XDR_PUTINT32(TYPE_1__ *, int /*<<< orphan*/ *);
bool_t xdr_uint32_t(XDR *xdrs, uint32_t *ulp) {
  switch (xdrs->x_op) {
  case XDR_ENCODE:
    return XDR_PUTINT32(xdrs, (int32_t *)ulp);
  case XDR_DECODE:
    return XDR_GETINT32(xdrs, (int32_t *)ulp);
  case XDR_FREE:
    return TRUE;
  default:
    return FALSE;
  }
}


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     1199 <xdr_uint32_t+0x79>
jmp    1149 <xdr_uint32_t+0x29>
mov    -0x1c(%rbp),%eax
sub    $0x81,%eax
je     116f <xdr_uint32_t+0x4f>
jmp    115c <xdr_uint32_t+0x3c>
mov    -0x1c(%rbp),%eax
sub    $0x82,%eax
je     1184 <xdr_uint32_t+0x64>
jmp    11aa <xdr_uint32_t+0x8a>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <XDR_PUTINT32@plt>
mov    %eax,-0x4(%rbp)
jmp    11b6 <xdr_uint32_t+0x96>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <XDR_GETINT32@plt>
mov    %eax,-0x4(%rbp)
jmp    11b6 <xdr_uint32_t+0x96>
mov    0x2e48(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    11b6 <xdr_uint32_t+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_uint32_t>:
mov    (%rdi),%eax
cmp    $0x80,%eax
je     113c <xdr_uint32_t+0x1c>
cmp    $0x82,%eax
je     1146 <xdr_uint32_t+0x26>
cmp    $0x81,%eax
jne    114b <xdr_uint32_t+0x2b>
jmp    1030 <XDR_PUTINT32@plt>
mov    0x2ea5(%rip),%rax
mov    (%rax),%eax
ret
jmp    1040 <XDR_GETINT32@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_uint32_t(%struct.TYPE_5__* %0, i32* %1) {
%3 = alloca i32
%4 = alloca %struct.TYPE_5__*
%5 = alloca i32*
store %struct.TYPE_5__* %0, %struct.TYPE_5__** %4
store i32* %1, i32** %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 i32*, i32** %5
%12 = call i32 @XDR_PUTINT32(%struct.TYPE_5__* %10, i32* %11)
store i32 %12, i32* %3
br label %21
13: ; preds = %2
%14 = load %struct.TYPE_5__*, %struct.TYPE_5__** %4
%15 = load i32*, i32** %5
%16 = call i32 @XDR_GETINT32(%struct.TYPE_5__* %14, i32* %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_uint32_t(%struct.TYPE_5__* %0, i32* %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_PUTINT32(%struct.TYPE_5__* %0, i32* %1)
br label %13
7: ; preds = %2
%8 = tail call i32 @XDR_GETINT32(%struct.TYPE_5__* %0, i32* %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
}