#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_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int /*<<< orphan*/ val;
};
struct ypresp_all {
  int more;
  TYPE_1__ ypresp_all_u;
};
typedef int bool_t;
typedef int /*<<< orphan*/ XDR;

/* Variables and functions */
#define FALSE 129
#define TRUE 128
int /*<<< orphan*/ xdr_bool(int /*<<< orphan*/ *, int *);
int /*<<< orphan*/ xdr_ypresp_key_val(int /*<<< orphan*/ *,
                                      int /*<<< orphan*/ *);
bool_t xdr_ypresp_all(XDR *xdrs, struct ypresp_all *objp) {
  if (!xdr_bool(xdrs, &objp->more))
    return FALSE;
  switch (objp->more) {
  case TRUE:
    if (!xdr_ypresp_key_val(xdrs, &objp->ypresp_all_u.val))
      return FALSE;
    break;
  case FALSE:
    break;
  default:
    return FALSE;
  }
  return TRUE;
}


x86 assembly (clang, -O0):
<xdr_ypresp_all>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <xdr_bool@plt>
cmp    $0x0,%eax
jne    1152 <xdr_ypresp_all+0x32>
movl   $0x81,-0x4(%rbp)
jmp    11c1 <xdr_ypresp_all+0xa1>
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
sub    $0x80,%eax
je     117e <xdr_ypresp_all+0x5e>
jmp    116b <xdr_ypresp_all+0x4b>
mov    -0x1c(%rbp),%eax
sub    $0x81,%eax
je     11a9 <xdr_ypresp_all+0x89>
jmp    11ae <xdr_ypresp_all+0x8e>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
add    $0x4,%rsi
call   1030 <xdr_ypresp_key_val@plt>
cmp    $0x0,%eax
jne    11a4 <xdr_ypresp_all+0x84>
movl   $0x81,-0x4(%rbp)
jmp    11c1 <xdr_ypresp_all+0xa1>
jmp    11ba <xdr_ypresp_all+0x9a>
jmp    11ba <xdr_ypresp_all+0x9a>
movl   $0x81,-0x4(%rbp)
jmp    11c1 <xdr_ypresp_all+0xa1>
movl   $0x80,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xdr_ypresp_all>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%rbp
call   1040 <xdr_bool@plt>
mov    $0x81,%r14d
test   %eax,%eax
je     1162 <xdr_ypresp_all+0x42>
mov    (%rbx),%eax
cmp    $0x81,%eax
je     115c <xdr_ypresp_all+0x3c>
cmp    $0x80,%eax
jne    1162 <xdr_ypresp_all+0x42>
add    $0x4,%rbx
mov    %rbp,%rdi
mov    %rbx,%rsi
call   1030 <xdr_ypresp_key_val@plt>
test   %eax,%eax
je     1162 <xdr_ypresp_all+0x42>
mov    $0x80,%r14d
mov    %r14d,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
%struct.ypresp_all = type { i32, %struct.TYPE_2__ }
%struct.TYPE_2__ = type { i32 }
define i32 @xdr_ypresp_all(i32* %0, %struct.ypresp_all* %1) {
%3 = getelementptr inbounds %struct.ypresp_all, %struct.ypresp_all* %1, i64 0, i32 0
%4 = tail call i32 @xdr_bool(i32* %0, i32* %3)
%5 = icmp eq i32 %4, 0
br i1 %5, label %13, label %6
6: ; preds = %2
%7 = load i32, i32* %3
switch i32 %7, label %13 [
i32 128, label %8
i32 129, label %12
]
8: ; preds = %6
%9 = getelementptr inbounds %struct.ypresp_all, %struct.ypresp_all* %1, i64 0, i32 1, i32 0
%10 = tail call i32 @xdr_ypresp_key_val(i32* %0, i32* %9)
%11 = icmp eq i32 %10, 0
br i1 %11, label %13, label %12
12: ; preds = %8, %6
br label %13
13: ; preds = %6, %8, %2, %12
%14 = phi i32 [ 128, %12 ], [ 129, %2 ], [ 129, %8 ], [ 129, %6 ]
ret i32 %14
}