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

/* Variables and functions */
unsigned int fetch_int();
int /*<<< orphan*/ fetch_skip(int);
int /*<<< orphan*/ fetch_skip_photo_size();
int /*<<< orphan*/ fetch_str(int);
int prefetch_strlen();
void fetch_skip_document(void) {
  unsigned x = fetch_int();
  fetch_skip(2);
  if (x == 0x36f8c871) {
    return;
  }
  fetch_skip(4);
  int l = prefetch_strlen();
  fetch_str(l);
  l = prefetch_strlen();
  fetch_str(l);
  fetch_skip(1);
  fetch_skip_photo_size();
  fetch_skip(1);
}


x86 assembly (clang, -O0):
<fetch_skip_document>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1070 <fetch_int@plt>
mov    %eax,-0x4(%rbp)
mov    $0x2,%edi
call   1060 <fetch_skip@plt>
cmpl   $0x36f8c871,-0x4(%rbp)
jne    117e <fetch_skip_document+0x2e>
jmp    11c7 <fetch_skip_document+0x77>
mov    $0x4,%edi
call   1060 <fetch_skip@plt>
mov    $0x0,%al
call   1030 <prefetch_strlen@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <fetch_str@plt>
mov    $0x0,%al
call   1030 <prefetch_strlen@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <fetch_str@plt>
mov    $0x1,%edi
call   1060 <fetch_skip@plt>
mov    $0x0,%al
call   1050 <fetch_skip_photo_size@plt>
mov    $0x1,%edi
call   1060 <fetch_skip@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fetch_skip_document>:
push   %rbx
xor    %eax,%eax
call   1070 <fetch_int@plt>
mov    %eax,%ebx
mov    $0x2,%edi
call   1060 <fetch_skip@plt>
cmp    $0x36f8c871,%ebx
jne    116e <fetch_skip_document+0x1e>
pop    %rbx
ret
mov    $0x4,%edi
call   1060 <fetch_skip@plt>
xor    %eax,%eax
call   1030 <prefetch_strlen@plt>
mov    %eax,%edi
call   1040 <fetch_str@plt>
xor    %eax,%eax
call   1030 <prefetch_strlen@plt>
mov    %eax,%edi
call   1040 <fetch_str@plt>
mov    $0x1,%edi
call   1060 <fetch_skip@plt>
xor    %eax,%eax
call   1050 <fetch_skip_photo_size@plt>
mov    $0x1,%edi
pop    %rbx
jmp    1060 <fetch_skip@plt>

LLVM IR (-O0):
define void @fetch_skip_document() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (...) @fetch_int()
store i32 %3, i32* %1
%4 = call i32 @fetch_skip(i32 2)
%5 = load i32, i32* %1
%6 = icmp eq i32 %5, 922273905
br i1 %6, label %7, label %8
7: ; preds = %0
br label %19
8: ; preds = %0
%9 = call i32 @fetch_skip(i32 4)
%10 = call i32 (...) @prefetch_strlen()
store i32 %10, i32* %2
%11 = load i32, i32* %2
%12 = call i32 @fetch_str(i32 %11)
%13 = call i32 (...) @prefetch_strlen()
store i32 %13, i32* %2
%14 = load i32, i32* %2
%15 = call i32 @fetch_str(i32 %14)
%16 = call i32 @fetch_skip(i32 1)
%17 = call i32 (...) @fetch_skip_photo_size()
%18 = call i32 @fetch_skip(i32 1)
br label %19
19: ; preds = %8, %7
ret void
}

LLVM IR (-O2):
define void @fetch_skip_document() {
%1 = tail call i32 (...) @fetch_int()
%2 = tail call i32 @fetch_skip(i32 2)
%3 = icmp eq i32 %1, 922273905
br i1 %3, label %13, label %4
4: ; preds = %0
%5 = tail call i32 @fetch_skip(i32 4)
%6 = tail call i32 (...) @prefetch_strlen()
%7 = tail call i32 @fetch_str(i32 %6)
%8 = tail call i32 (...) @prefetch_strlen()
%9 = tail call i32 @fetch_str(i32 %8)
%10 = tail call i32 @fetch_skip(i32 1)
%11 = tail call i32 (...) @fetch_skip_photo_size()
%12 = tail call i32 @fetch_skip(i32 1)
br label %13
13: ; preds = %0, %4
ret void
}