#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 scalar_t__ uint8_t;
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ Unicodedecode(scalar_t__ *, int, char *);
int UDFLogVolume(uint8_t *data, char *VolumeDescriptor) {
  uint32_t lbsize;
  Unicodedecode(&data[84], 128, VolumeDescriptor);
  lbsize =
      ((uint32_t)data[212] | ((uint32_t)data[(212) + 1] << 8) |
       ((uint32_t)data[(212) + 2] << 16) | ((uint32_t)data[(212) + 3] << 24));
  if (lbsize != 2048)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<UDFLogVolume>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
add    $0x2a0,%rdi
mov    -0x18(%rbp),%rdx
mov    $0x80,%esi
call   1030 <Unicodedecode@plt>
mov    -0x10(%rbp),%rax
mov    0x6a0(%rax),%rax
mov    -0x10(%rbp),%rcx
mov    0x6a8(%rcx),%rcx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%rcx
mov    0x6b0(%rcx),%rcx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%rcx
mov    0x6b8(%rcx),%rcx
shl    $0x18,%ecx
or     %ecx,%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0x800,-0x1c(%rbp)
je     1190 <UDFLogVolume+0x80>
movl   $0x1,-0x4(%rbp)
jmp    1197 <UDFLogVolume+0x87>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UDFLogVolume>:
push   %rbx
mov    %rsi,%rdx
mov    %rdi,%rbx
add    $0x2a0,%rdi
mov    $0x80,%esi
call   1030 <Unicodedecode@plt>
mov    0x6a8(%rbx),%eax
mov    0x6b0(%rbx),%ecx
shl    $0x8,%eax
or     0x6a0(%rbx),%eax
shl    $0x10,%ecx
mov    0x6b8(%rbx),%edx
shl    $0x18,%edx
or     %ecx,%edx
or     %eax,%edx
xor    %eax,%eax
cmp    $0x800,%edx
setne  %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @UDFLogVolume(i64* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i64*
%5 = alloca i8*
%6 = alloca i32
store i64* %0, i64** %4
store i8* %1, i8** %5
%7 = load i64*, i64** %4
%8 = getelementptr inbounds i64, i64* %7, i64 84
%9 = load i8*, i8** %5
%10 = call i32 @Unicodedecode(i64* %8, i32 128, i8* %9)
%11 = load i64*, i64** %4
%12 = getelementptr inbounds i64, i64* %11, i64 212
%13 = load i64, i64* %12
%14 = trunc i64 %13 to i32
%15 = load i64*, i64** %4
%16 = getelementptr inbounds i64, i64* %15, i64 213
%17 = load i64, i64* %16
%18 = trunc i64 %17 to i32
%19 = shl i32 %18, 8
%20 = or i32 %14, %19
%21 = load i64*, i64** %4
%22 = getelementptr inbounds i64, i64* %21, i64 214
%23 = load i64, i64* %22
%24 = trunc i64 %23 to i32
%25 = shl i32 %24, 16
%26 = or i32 %20, %25
%27 = load i64*, i64** %4
%28 = getelementptr inbounds i64, i64* %27, i64 215
%29 = load i64, i64* %28
%30 = trunc i64 %29 to i32
%31 = shl i32 %30, 24
%32 = or i32 %26, %31
store i32 %32, i32* %6
%33 = load i32, i32* %6
%34 = icmp ne i32 %33, 2048
br i1 %34, label %35, label %36
35: ; preds = %2
store i32 1, i32* %3
br label %37
36: ; preds = %2
store i32 0, i32* %3
br label %37
37: ; preds = %36, %35
%38 = load i32, i32* %3
ret i32 %38
}

LLVM IR (-O2):
define i32 @UDFLogVolume(i64* %0, i8* %1) {
%3 = getelementptr inbounds i64, i64* %0, i64 84
%4 = tail call i32 @Unicodedecode(i64* %3, i32 128, i8* %1)
%5 = getelementptr inbounds i64, i64* %0, i64 212
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
%8 = getelementptr inbounds i64, i64* %0, i64 213
%9 = load i64, i64* %8
%10 = trunc i64 %9 to i32
%11 = shl i32 %10, 8
%12 = or i32 %11, %7
%13 = getelementptr inbounds i64, i64* %0, i64 214
%14 = load i64, i64* %13
%15 = trunc i64 %14 to i32
%16 = shl i32 %15, 16
%17 = or i32 %12, %16
%18 = getelementptr inbounds i64, i64* %0, i64 215
%19 = load i64, i64* %18
%20 = trunc i64 %19 to i32
%21 = shl i32 %20, 24
%22 = or i32 %17, %21
%23 = icmp ne i32 %22, 2048
%24 = zext i1 %23 to i32
ret i32 %24
}