// File: /workspace/github_c_makefile_star2_O0/dolphinking[P]slimox/src/slimox-match.h
// Function: matcher_getpos
static inline uint32_t matcher_getpos(matcher_t* matcher, unsigned char* data, uint32_t pos) {
    uint32_t context4 = *(uint32_t*)(data + pos - 4);
    uint32_t lzpos[3] = {
        matcher->m_lzp8[M_hash8_(data + pos - 8)] & 0xffffffff,
        matcher->m_lzp4[M_hash4_(data + pos - 4)] & 0xffffffff,
        matcher->m_lzp2[M_hash2_(data + pos - 2)],
    };
    if(matcher->m_lzp8[M_hash8_(data + pos - 8)] >> 32 == context4 && lzpos[0] != 0) return lzpos[0];
    if(matcher->m_lzp4[M_hash4_(data + pos - 4)] >> 32 == context4 && lzpos[1] != 0) return lzpos[1];
    return lzpos[2];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movl -0x1c(%rbp), %ecx
movl -0x4(%rax,%rcx), %eax
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq -0x18(%rbp), %rax
movl -0x1c(%rbp), %edx
movq -0x8(%rax,%rdx), %rdx
movq -0x18(%rbp), %rax
movl -0x1c(%rbp), %esi
movq -0x8(%rax,%rsi), %rax
shrq $0x16, %rax
xorq %rax, %rdx
movq -0x18(%rbp), %rax
movl -0x1c(%rbp), %esi
movq -0x8(%rax,%rsi), %rax
shrq $0x2c, %rax
xorq %rax, %rdx
andq $0xfffff, %rdx          # imm = 0xFFFFF
movabsq $0xffffffff, %rax       # imm = 0xFFFFFFFF
andq (%rcx,%rdx,8), %rax
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x18(%rbp), %rax
movl -0x1c(%rbp), %edx
movl -0x4(%rax,%rdx), %eax
movq -0x18(%rbp), %rdx
movl -0x1c(%rbp), %esi
movl -0x4(%rdx,%rsi), %edx
shrl $0x6, %edx
xorl %edx, %eax
movq -0x18(%rbp), %rdx
movl -0x1c(%rbp), %esi
movl -0x4(%rdx,%rsi), %edx
shrl $0xc, %edx
xorl %edx, %eax
andl $0xfffff, %eax          # imm = 0xFFFFF
movl %eax, %eax
movl %eax, %edx
movabsq $0xffffffff, %rax       # imm = 0xFFFFFFFF
andq (%rcx,%rdx,8), %rax
movl %eax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rbp), %rcx
movl -0x1c(%rbp), %edx
movzwl -0x2(%rcx,%rdx), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movl -0x1c(%rbp), %edx
movq -0x8(%rcx,%rdx), %rcx
movq -0x18(%rbp), %rdx
movl -0x1c(%rbp), %esi
movq -0x8(%rdx,%rsi), %rdx
shrq $0x16, %rdx
xorq %rdx, %rcx
movq -0x18(%rbp), %rdx
movl -0x1c(%rbp), %esi
movq -0x8(%rdx,%rsi), %rdx
shrq $0x2c, %rdx
xorq %rdx, %rcx
andq $0xfffff, %rcx          # imm = 0xFFFFF
movq (%rax,%rcx,8), %rax
shrq $0x20, %rax
movl -0x20(%rbp), %ecx
cmpq %rcx, %rax
jne 0x15383
cmpl $0x0, -0x2c(%rbp)
je 0x15383
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x153e2
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rcx
movl -0x1c(%rbp), %edx
movl -0x4(%rcx,%rdx), %ecx
movq -0x18(%rbp), %rdx
movl -0x1c(%rbp), %esi
movl -0x4(%rdx,%rsi), %edx
shrl $0x6, %edx
xorl %edx, %ecx
movq -0x18(%rbp), %rdx
movl -0x1c(%rbp), %esi
movl -0x4(%rdx,%rsi), %edx
shrl $0xc, %edx
xorl %edx, %ecx
andl $0xfffff, %ecx          # imm = 0xFFFFF
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
shrq $0x20, %rax
movl -0x20(%rbp), %ecx
cmpq %rcx, %rax
jne 0x153dc
cmpl $0x0, -0x28(%rbp)
je 0x153dc
movl -0x28(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x153e2
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)