// File: /workspace/github_c_makefile_star2_O0/00pauln00[P]yapio/yapio.c
// Function: yapio_verify_contents_of_io_buffer
static int
yapio_verify_contents_of_io_buffer(const char *buf, size_t buf_len,
                                   const yapio_blk_md_t *md)
{
    if (!md->ybm_not_hole)
    {
        log_msg(YAPIO_LL_DEBUG, "No verification for hole");
        return 0;
    }

    const unsigned long long *buffer_of_longs = (unsigned long long *)buf;
    size_t num_words = buf_len / sizeof(unsigned long long);

    size_t i;
    for (i = 0; i < num_words; i++)
    {
        if (buffer_of_longs[i] != yapio_get_content_word(md, i))
        {
            unsigned long x = md->ybm_blk_number;

            log_msg(YAPIO_LL_ERROR, "blk=%lu word=%zu got=%llx expected=%llx",
                    x, i, buffer_of_longs[i], yapio_get_content_word(md, i));

            return -1;
        }

        log_msg(YAPIO_LL_TRACE, "OK %zu:%llx", i, buffer_of_longs[i]);
    }

    return 0;
}

// Assembly:
pushq %rbx
subq $0xa0, %rsp
movq %rdi, 0x90(%rsp)
movq %rsi, 0x88(%rsp)
movq %rdx, 0x80(%rsp)
movq 0x80(%rsp), %rax
movq 0x8(%rax), %rax
shrq $0x3e, %rax
andq $0x1, %rax
cmpq $0x0, %rax
jne 0xa2ea
movl $0x3, %eax
cmpl 0x4f7b(%rip), %eax      # 0xf210
jg 0xa2da
movq 0x4d42(%rip), %rax      # 0xefe0
movq (%rax), %rax
movq %rax, 0x58(%rsp)
movl $0x3, %edi
callq 0x4890
movq 0x58(%rsp), %rdi
movq %rax, %rdx
movl 0x4fd1(%rip), %r8d      # 0xf290
leaq 0x28d4(%rip), %rsi      # 0xcb9a
leaq 0x28f5(%rip), %rcx      # 0xcbc2
movl $0x637, %r9d            # imm = 0x637
movb $0x0, %al
callq 0x2370
movl $0x0, 0x9c(%rsp)
jmp 0xa4c2
movq 0x90(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x88(%rsp), %rax
shrq $0x3, %rax
movq %rax, 0x70(%rsp)
movq $0x0, 0x68(%rsp)
movq 0x68(%rsp), %rax
cmpq 0x70(%rsp), %rax
jae 0xa4b7
movq 0x78(%rsp), %rax
movq 0x68(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x50(%rsp)
movq 0x80(%rsp), %rdi
movq 0x68(%rsp), %rsi
callq 0xa620
movq %rax, %rcx
movq 0x50(%rsp), %rax
cmpq %rcx, %rax
je 0xa436
movq 0x80(%rsp), %rcx
movabsq $0x3fffffffffffffff, %rax # imm = 0x3FFFFFFFFFFFFFFF
andq 0x8(%rcx), %rax
movq %rax, 0x60(%rsp)
movl $0x1, %eax
cmpl 0x4e93(%rip), %eax      # 0xf210
jg 0xa426
movq 0x4c56(%rip), %rax      # 0xefe0
movq (%rax), %rax
movq %rax, 0x28(%rsp)
movl $0x1, %edi
callq 0x4890
movq %rax, 0x30(%rsp)
movl 0x4ee9(%rip), %eax      # 0xf290
movl %eax, 0x3c(%rsp)
movq 0x60(%rsp), %rbx
movq 0x68(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x78(%rsp), %rax
movq 0x68(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x48(%rsp)
movq 0x80(%rsp), %rdi
movq 0x68(%rsp), %rsi
callq 0xa620
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rdx
movl 0x3c(%rsp), %r8d
movq 0x40(%rsp), %r11
movq 0x48(%rsp), %r10
leaq 0x27e6(%rip), %rsi      # 0xcbe5
leaq 0x27bc(%rip), %rcx      # 0xcbc2
movl $0x646, %r9d            # imm = 0x646
movq %rbx, (%rsp)
movq %r11, 0x8(%rsp)
movq %r10, 0x10(%rsp)
movq %rax, 0x18(%rsp)
movb $0x0, %al
callq 0x2370
movl $0xffffffff, 0x9c(%rsp) # imm = 0xFFFFFFFF
jmp 0xa4c2
movl $0x4, %eax
cmpl 0x4dcf(%rip), %eax      # 0xf210
jg 0xa4a2
movq 0x4b96(%rip), %rax      # 0xefe0
movq (%rax), %rax
movq %rax, 0x20(%rsp)
movl $0x4, %edi
callq 0x4890
movq 0x20(%rsp), %rdi
movq %rax, %rdx
movl 0x4e25(%rip), %r8d      # 0xf290
movq 0x68(%rsp), %r10
movq 0x78(%rsp), %rax
movq 0x68(%rsp), %rcx
movq (%rax,%rcx,8), %rax
leaq 0x2797(%rip), %rsi      # 0xcc1c
leaq 0x2736(%rip), %rcx      # 0xcbc2
movl $0x64b, %r9d            # imm = 0x64B
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
movb $0x0, %al
callq 0x2370
jmp 0xa4a4
movq 0x68(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x68(%rsp)
jmp 0xa311
movl $0x0, 0x9c(%rsp)
movl 0x9c(%rsp), %eax
addq $0xa0, %rsp
popq %rbx
retq
nopw %cs:(%rax,%rax)