// File: /workspace/github_c_makefile_star2_O0/adsr[P]phpspy/phpspy.c
// Function: phpspy_zend_inline_hash_func
uint64_t phpspy_zend_inline_hash_func(const char *str, size_t len) {
    /* Adapted from zend_string.h */
    uint64_t hash;
    hash = 5381UL;

    for (; len >= 8; len -= 8) {
        hash = ((hash << 5) + hash) + *str++;
        hash = ((hash << 5) + hash) + *str++;
        hash = ((hash << 5) + hash) + *str++;
        hash = ((hash << 5) + hash) + *str++;
        hash = ((hash << 5) + hash) + *str++;
        hash = ((hash << 5) + hash) + *str++;
        hash = ((hash << 5) + hash) + *str++;
        hash = ((hash << 5) + hash) + *str++;
    }
    switch (len) {
        case 7: hash = ((hash << 5) + hash) + *str++; /* fallthrough... */
        case 6: hash = ((hash << 5) + hash) + *str++; /* fallthrough... */
        case 5: hash = ((hash << 5) + hash) + *str++; /* fallthrough... */
        case 4: hash = ((hash << 5) + hash) + *str++; /* fallthrough... */
        case 3: hash = ((hash << 5) + hash) + *str++; /* fallthrough... */
        case 2: hash = ((hash << 5) + hash) + *str++; /* fallthrough... */
        case 1: hash = ((hash << 5) + hash) + *str++; break;
        case 0: break;
    }

    return hash | 0x8000000000000000UL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x1505, -0x18(%rbp)    # imm = 0x1505
cmpq $0x8, -0x10(%rbp)
jb 0xc300
movq -0x18(%rbp), %rax
shlq $0x5, %rax
addq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rbp)
movsbq (%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
shlq $0x5, %rax
addq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rbp)
movsbq (%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
shlq $0x5, %rax
addq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rbp)
movsbq (%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
shlq $0x5, %rax
addq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rbp)
movsbq (%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
shlq $0x5, %rax
addq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rbp)
movsbq (%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
shlq $0x5, %rax
addq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rbp)
movsbq (%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
shlq $0x5, %rax
addq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rbp)
movsbq (%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
shlq $0x5, %rax
addq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rbp)
movsbq (%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
subq $0x8, %rax
movq %rax, -0x10(%rbp)
jmp 0xc1b4
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
subq $0x7, %rax
ja 0xc434
movq -0x20(%rbp), %rax
leaq 0x26017(%rip), %rcx     # 0x32334
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x18(%rbp), %rax
shlq $0x5, %rax
addq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rbp)
movsbq (%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
shlq $0x5, %rax
addq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rbp)
movsbq (%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
shlq $0x5, %rax
addq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rbp)
movsbq (%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
shlq $0x5, %rax
addq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rbp)
movsbq (%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
shlq $0x5, %rax
addq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rbp)
movsbq (%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
shlq $0x5, %rax
addq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rbp)
movsbq (%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
shlq $0x5, %rax
addq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rbp)
movsbq (%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
jmp 0xc434
jmp 0xc434
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
orq -0x18(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)