#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*/ int32_t;
struct TYPE_5__ {
  int x_op;
};
typedef TYPE_1__ XDR;

/* Variables and functions */
#define XDR_DECODE 130
#define XDR_ENCODE 129
#define XDR_FREE 128
int XDR_GETINT32(TYPE_1__ *, int /*<<< orphan*/ *);
int XDR_PUTINT32(TYPE_1__ *, int /*<<< orphan*/ *);
int xdr_int32_t(XDR *xdrs, int32_t *lp) {
  switch (xdrs->x_op) {
  case XDR_ENCODE:
    return XDR_PUTINT32(xdrs, lp);
  case XDR_DECODE:
    return XDR_GETINT32(xdrs, lp);
  case XDR_FREE:
    return 1;
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<xdr_int32_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_int32_t+0x79>
jmp    1149 <xdr_int32_t+0x29>
mov    -0x1c(%rbp),%eax
sub    $0x81,%eax
je     116f <xdr_int32_t+0x4f>
jmp    115c <xdr_int32_t+0x3c>
mov    -0x1c(%rbp),%eax
sub    $0x82,%eax
je     1184 <xdr_int32_t+0x64>
jmp    11a5 <xdr_int32_t+0x85>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <XDR_PUTINT32@plt>
mov    %eax,-0x4(%rbp)
jmp    11ac <xdr_int32_t+0x8c>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <XDR_GETINT32@plt>
mov    %eax,-0x4(%rbp)
jmp    11ac <xdr_int32_t+0x8c>
movl   $0x1,-0x4(%rbp)
jmp    11ac <xdr_int32_t+0x8c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xdr_int32_t>:
mov    (%rdi),%eax
cmp    $0x80,%eax
je     113c <xdr_int32_t+0x1c>
cmp    $0x82,%eax
je     1142 <xdr_int32_t+0x22>
cmp    $0x81,%eax
jne    1147 <xdr_int32_t+0x27>
jmp    1030 <XDR_PUTINT32@plt>
mov    $0x1,%eax
ret
jmp    1040 <XDR_GETINT32@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
%struct.TYPE_5__ = type { i32 }
define i32 @xdr_int32_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 %18 [
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 %19
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 %19
17: ; preds = %2
store i32 1, i32* %3
br label %19
18: ; preds = %2
store i32 0, i32* %3
br label %19
19: ; preds = %18, %17, %13, %9
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
%struct.TYPE_5__ = type { i32 }
define i32 @xdr_int32_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 %9 [
i32 129, label %5
i32 130, label %7
i32 128, label %10
]
5: ; preds = %2
%6 = tail call i32 @XDR_PUTINT32(%struct.TYPE_5__* %0, i32* %1)
br label %10
7: ; preds = %2
%8 = tail call i32 @XDR_GETINT32(%struct.TYPE_5__* %0, i32* %1)
br label %10
9: ; preds = %2
br label %10
10: ; preds = %2, %9, %7, %5
%11 = phi i32 [ 0, %9 ], [ %8, %7 ], [ %6, %5 ], [ 1, %2 ]
ret i32 %11
}