// File: /workspace/github_c_makefile_star2_O0/mgrosvenor[P]evec/./evec.h
// Function: evhdrcheck
int _evhdrcheck(evhd_t* hdr)
{
    if(strncmp(hdr->magic1, EV_MAGIC1, sizeof(EV_MAGIC1)) != 0){
        EV_FAIL("Header magic 1 should be '%s' but found '%.*s'\n", EV_MAGIC1, sizeof(EV_MAGIC1), hdr->magic1);
        return -1;
    };
    if(strncmp(hdr->magic2, EV_MAGIC2, sizeof(EV_MAGIC2)) != 0){
        EV_FAIL("Header magic 2 should be '%s' but found '%.*s'\n", EV_MAGIC2, sizeof(EV_MAGIC2), hdr->magic2);
        return -1;
    };

    if(hdr->obj_count < 0){
        EV_FAIL("Object count cannot be less than zero!\n");
        return -1;
    }

    if(hdr->index < 0){
        EV_FAIL("Index value cannot be less than zero!\n");
        return -1;
    }

    if(hdr->slt_count < 0){
        EV_FAIL("Slot count cannot be less than zero\n");
        return -1;
    }

    if(hdr->obj_count > hdr->slt_count){
        EV_FAIL("More items in vector (%" PRId64 ") than there is space (%" PRId64 ")\n",
                hdr->obj_count,
                hdr->slt_count);
        return -1;
    }

    if(hdr->slt_size < 0){
        EV_FAIL("Slot size cannot be less than zero\n");
        return -1;
    }

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x2b74(%rip), %rsi      # 0x409b
movl $0x8, %edx
callq 0x1040
cmpl $0x0, %eax
je 0x158c
movq -0x10(%rbp), %r10
movl $0x2, %edi
movl $0x1e8, %esi            # imm = 0x1E8
leaq 0x2b1d(%rip), %rdx      # 0x4068
leaq 0x2b59(%rip), %rcx      # 0x40ab
leaq 0x2b5e(%rip), %r8       # 0x40b7
leaq 0x2b3b(%rip), %r9       # 0x409b
leaq 0x2bfe(%rip), %rax      # 0x4165
movq $0x8, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
movb $0x0, %al
callq 0x13d0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1779
movq -0x10(%rbp), %rdi
addq $0x28, %rdi
leaq 0x2b08(%rip), %rsi      # 0x40a3
movl $0x8, %edx
callq 0x1040
cmpl $0x0, %eax
je 0x1604
movq -0x10(%rbp), %r10
addq $0x28, %r10
movl $0x2, %edi
movl $0x1ec, %esi            # imm = 0x1EC
leaq 0x2aa5(%rip), %rdx      # 0x4068
leaq 0x2ae1(%rip), %rcx      # 0x40ab
leaq 0x2b16(%rip), %r8       # 0x40e7
leaq 0x2acb(%rip), %r9       # 0x40a3
leaq 0x2b86(%rip), %rax      # 0x4165
movq $0x8, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
movb $0x0, %al
callq 0x13d0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1779
movq -0x10(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jge 0x1648
movl $0x2, %edi
movl $0x1f1, %esi            # imm = 0x1F1
leaq 0x2a48(%rip), %rdx      # 0x4068
leaq 0x2a84(%rip), %rcx      # 0x40ab
leaq 0x2ae9(%rip), %r8       # 0x4117
leaq 0x2b30(%rip), %r9       # 0x4165
movb $0x0, %al
callq 0x13d0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1779
movq -0x10(%rbp), %rax
cmpq $0x0, 0x20(%rax)
jge 0x168c
movl $0x2, %edi
movl $0x1f6, %esi            # imm = 0x1F6
leaq 0x2a04(%rip), %rdx      # 0x4068
leaq 0x2a40(%rip), %rcx      # 0x40ab
leaq 0x2acd(%rip), %r8       # 0x413f
leaq 0x2aec(%rip), %r9       # 0x4165
movb $0x0, %al
callq 0x13d0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1779
movq -0x10(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jge 0x16d0
movl $0x2, %edi
movl $0x1fb, %esi            # imm = 0x1FB
leaq 0x29c0(%rip), %rdx      # 0x4068
leaq 0x29fc(%rip), %rcx      # 0x40ab
leaq 0x2ab0(%rip), %r8       # 0x4166
leaq 0x2aa8(%rip), %r9       # 0x4165
movb $0x0, %al
callq 0x13d0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1779
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x18(%rcx), %rax
jle 0x1731
movq -0x10(%rbp), %rax
movq 0x10(%rax), %r9
movq -0x10(%rbp), %rax
movq 0x18(%rax), %r10
movl $0x2, %edi
movl $0x202, %esi            # imm = 0x202
leaq 0x2965(%rip), %rdx      # 0x4068
leaq 0x29a1(%rip), %rcx      # 0x40ab
leaq 0x2a7a(%rip), %r8       # 0x418b
leaq 0x2a4d(%rip), %rax      # 0x4165
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
movb $0x0, %al
callq 0x13d0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1779
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jge 0x1772
movl $0x2, %edi
movl $0x207, %esi            # imm = 0x207
leaq 0x291b(%rip), %rdx      # 0x4068
leaq 0x2957(%rip), %rcx      # 0x40ab
leaq 0x2a66(%rip), %r8       # 0x41c1
leaq 0x2a03(%rip), %r9       # 0x4165
movb $0x0, %al
callq 0x13d0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1779
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)