#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*/ uint32_t;
struct pointerFile {
  int dummy;
};

/* Variables and functions */
scalar_t__ fastForwardPtr(struct pointerFile *, int /*<<< orphan*/,
                          int /*<<< orphan*/);
char *getBytes(char *, struct pointerFile *, int /*<<< orphan*/);
char *getBytesWithFastForward(char *path, struct pointerFile *ptr,
                              uint32_t numOfBytes, uint32_t fileNumber,
                              uint32_t offset) {
  if (fastForwardPtr(ptr, fileNumber, offset))
    return NULL;
  return getBytes(path, ptr, numOfBytes);
}


x86 assembly (clang, -O0):
<getBytesWithFastForward>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    %ecx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%esi
mov    -0x24(%rbp),%edx
call   1040 <fastForwardPtr@plt>
cmp    $0x0,%rax
je     1160 <getBytesWithFastForward+0x40>
movq   $0x0,-0x8(%rbp)
jmp    1174 <getBytesWithFastForward+0x54>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1030 <getBytes@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getBytesWithFastForward>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %rdi,%rbp
mov    %rsi,%rdi
mov    %ecx,%esi
mov    %r8d,%edx
call   1040 <fastForwardPtr@plt>
test   %rax,%rax
je     1146 <getBytesWithFastForward+0x26>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %r14d,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <getBytes@plt>

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

LLVM IR (-O2):
%struct.pointerFile = type { i32 }
define i8* @getBytesWithFastForward(i8* %0, %struct.pointerFile* %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call i64 @fastForwardPtr(%struct.pointerFile* %1, i32 %3, i32 %4)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = tail call i8* @getBytes(i8* %0, %struct.pointerFile* %1, i32 %2)
br label %10
10: ; preds = %5, %8
%11 = phi i8* [ %9, %8 ], [ null, %5 ]
ret i8* %11
}