#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 */

/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int condExpr(int /*<<< orphan*/ *, char *, int);
unsigned int sis32toh(unsigned int);
scalar_t__ sisRead(int /*<<< orphan*/ *, unsigned int *, int, char *, int);
int conditional(FILE *fp, char *err, int errlen) {
  unsigned int condlen;
  if (sisRead(fp, &condlen, 4, err, errlen))
    return 1;
  condlen = sis32toh(condlen);
  return condExpr(fp, err, errlen);
}


x86 assembly (clang, -O0):
<conditional>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rcx
mov    -0x1c(%rbp),%r8d
lea    -0x20(%rbp),%rsi
mov    $0x4,%edx
call   1040 <sisRead@plt>
cmp    $0x0,%rax
je     1173 <conditional+0x43>
movl   $0x1,-0x4(%rbp)
jmp    1191 <conditional+0x61>
mov    -0x20(%rbp),%edi
call   1030 <sis32toh@plt>
mov    %eax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1050 <condExpr@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<conditional>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %rdi,%rbp
lea    0xc(%rsp),%rsi
mov    $0x4,%edx
mov    %rbx,%rcx
mov    %r14d,%r8d
call   1040 <sisRead@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
jne    117e <conditional+0x4e>
mov    0xc(%rsp),%edi
call   1030 <sis32toh@plt>
mov    %eax,0xc(%rsp)
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %r14d,%edx
call   1050 <condExpr@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @conditional(i32* %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
store i32* %0, i32** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
%9 = load i32*, i32** %5
%10 = load i8*, i8** %6
%11 = load i32, i32* %7
%12 = call i64 @sisRead(i32* %9, i32* %8, i32 4, i8* %10, i32 %11)
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %15
14: ; preds = %3
store i32 1, i32* %4
br label %22
15: ; preds = %3
%16 = load i32, i32* %8
%17 = call i32 @sis32toh(i32 %16)
store i32 %17, i32* %8
%18 = load i32*, i32** %5
%19 = load i8*, i8** %6
%20 = load i32, i32* %7
%21 = call i32 @condExpr(i32* %18, i8* %19, i32 %20)
store i32 %21, i32* %4
br label %22
22: ; preds = %15, %14
%23 = load i32, i32* %4
ret i32 %23
}

LLVM IR (-O2):
define i32 @conditional(i32* %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = bitcast i32* %4 to i8*
%6 = call i64 @sisRead(i32* %0, i32* %4, i32 4, i8* %1, i32 %2)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %3
%9 = load i32, i32* %4
%10 = call i32 @sis32toh(i32 %9)
store i32 %10, i32* %4
%11 = call i32 @condExpr(i32* %0, i8* %1, i32 %2)
br label %12
12: ; preds = %3, %8
%13 = phi i32 [ %11, %8 ], [ 1, %3 ]
ret i32 %13
}