#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 */
int /*<<< orphan*/ verify_marker_block_hash(void const *, size_t);
int verify_marker_hash(const void *src, size_t block_bytes,
                       unsigned marker_blocks) {
  while (marker_blocks > 0) {
    if (!verify_marker_block_hash(src, block_bytes))
      return 0;
    src = ((char *)src) + block_bytes;
    --marker_blocks;
  }
  return 1;
}


x86 assembly (clang, -O0):
<verify_marker_hash>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jbe    1169 <verify_marker_hash+0x59>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <verify_marker_block_hash@plt>
cmp    $0x0,%eax
jne    114f <verify_marker_hash+0x3f>
movl   $0x0,-0x4(%rbp)
jmp    1170 <verify_marker_hash+0x60>
mov    -0x10(%rbp),%rax
add    -0x18(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x1c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
jmp    1123 <verify_marker_hash+0x13>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<verify_marker_hash>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    $0x1,%r14d
test   %edx,%edx
je     114c <verify_marker_hash+0x3c>
mov    %edx,%ebp
mov    %rsi,%r15
mov    %rdi,%rbx
nopl   0x0(%rax)
mov    %rbx,%rdi
mov    %r15,%rsi
call   1030 <verify_marker_block_hash@plt>
test   %eax,%eax
je     1149 <verify_marker_hash+0x39>
add    %r15,%rbx
add    $0xffffffff,%ebp
jne    1130 <verify_marker_hash+0x20>
jmp    114c <verify_marker_hash+0x3c>
xor    %r14d,%r14d
mov    %r14d,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @verify_marker_hash(i8* %0, i64 %1, i32 %2) {
%4 = icmp eq i32 %2, 0
br i1 %4, label %14, label %5
5: ; preds = %3, %10
%6 = phi i32 [ %12, %10 ], [ %2, %3 ]
%7 = phi i8* [ %11, %10 ], [ %0, %3 ]
%8 = tail call i32 @verify_marker_block_hash(i8* %7, i64 %1)
%9 = icmp eq i32 %8, 0
br i1 %9, label %14, label %10
10: ; preds = %5
%11 = getelementptr inbounds i8, i8* %7, i64 %1
%12 = add i32 %6, -1
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %5
14: ; preds = %5, %10, %3
%15 = phi i32 [ 1, %3 ], [ 1, %10 ], [ 0, %5 ]
ret i32 %15
}