// File: /workspace/github_c_makefile_star2_O1/chriso[P]columnix/lib/predicate.c
// Function: cx_index_match_indexes
enum cx_index_match cx_index_match_indexes(const struct cx_predicate *predicate,
                                           const struct cx_row_group *row_group)
{
    if (!cx_row_group_row_count(row_group))
        return CX_INDEX_MATCH_NONE;

    const struct cx_index *index =
        cx_row_group_column_index(row_group, predicate->column);
    enum cx_column_type type =
        cx_row_group_column_type(row_group, predicate->column);
    enum cx_index_match result = CX_INDEX_MATCH_UNKNOWN;
    switch (predicate->type) {
        case CX_PREDICATE_TRUE:
            result = CX_INDEX_MATCH_ALL;
            break;
        case CX_PREDICATE_NULL:
            index = cx_row_group_null_index(row_group, predicate->column);
            result = cx_index_match_bit_eq(index, true);
            break;
        case CX_PREDICATE_EQ:
            result = cx_index_match_index_eq(predicate, type, index);
            break;
        case CX_PREDICATE_LT:
            result = cx_index_match_index_lt(predicate, type, index);
            break;
        case CX_PREDICATE_GT:
            result = cx_index_match_index_gt(predicate, type, index);
            break;
        case CX_PREDICATE_CONTAINS:
            result = cx_index_match_str_contains(index, &predicate->value.str);
            break;
        case CX_PREDICATE_AND:
            result = CX_INDEX_MATCH_ALL;
            for (size_t i = 0;
                 result != CX_INDEX_MATCH_NONE && i < predicate->operand_count;
                 i++) {
                enum cx_index_match operand_match =
                    cx_index_match_indexes(predicate->operands[i], row_group);
                if (operand_match < result)
                    result = operand_match;
            }
            break;
        case CX_PREDICATE_OR:
            result = CX_INDEX_MATCH_NONE;
            for (size_t i = 0;
                 result != CX_INDEX_MATCH_ALL && i < predicate->operand_count;
                 i++) {
                enum cx_index_match operand_match =
                    cx_index_match_indexes(predicate->operands[i], row_group);
                if (operand_match > result)
                    result = operand_match;
            }
            break;
        case CX_PREDICATE_CUSTOM:
            if (predicate->custom.match_index) {
                const struct cx_index *index =
                    cx_row_group_column_index(row_group, predicate->column);
                result = predicate->custom.match_index(type, index,
                                                       predicate->custom.data);
            }
            break;
    }
    return predicate->negate ? -result : result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x5430
testq %rax, %rax
je 0x866e
movq 0x8(%rbx), %rsi
movq %r15, %rdi
callq 0x50e0
movq %rax, %r14
movq 0x8(%rbx), %rsi
movq %r15, %rdi
callq 0x58d0
movl %eax, %r12d
movl (%rbx), %eax
xorl %ebp, %ebp
cmpq $0x8, %rax
ja 0x88f2
leaq 0x43a5(%rip), %rcx      # 0xca00
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x1, %ebp
jmp 0x88f2
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x88fd
decl %r12d
cmpl $0x3, %r12d
ja 0x88f2
leaq 0x4398(%rip), %rax      # 0xca24
movslq (%rax,%r12,4), %rcx
addq %rax, %rcx
jmpq *%rcx
cmpl $0x1, 0x4(%rbx)
jne 0x8906
movl 0x10(%rbx), %esi
movq %r14, %rdi
callq 0x53c0
jmp 0x88f0
cmpl $0x5, %r12d
ja 0x88f2
movl %r12d, %eax
leaq 0x4381(%rip), %rcx      # 0xca44
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpl $0x0, 0x4(%rbx)
jne 0x89fe
movzbl 0x10(%rbx), %esi
movq %r14, %rdi
jmp 0x875e
decl %r12d
cmpl $0x3, %r12d
ja 0x88f2
leaq 0x4341(%rip), %rax      # 0xca34
movslq (%rax,%r12,4), %rcx
addq %rax, %rcx
jmpq *%rcx
cmpl $0x1, 0x4(%rbx)
jne 0x8982
movl 0x10(%rbx), %esi
movq %r14, %rdi
callq 0x57c0
jmp 0x88f0
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
xorl %r14d, %r14d
cmpq 0x20(%rbx), %r14
jae 0x88f2
movq 0x28(%rbx), %rax
movq (%rax,%r14,8), %rdi
movq %r15, %rsi
callq 0x5180
cmpl %ebp, %eax
cmovgl %eax, %ebp
incq %r14
cmpl $0x1, %ebp
jne 0x871e
jmp 0x88f2
movq 0x8(%rbx), %rsi
movq %r15, %rdi
callq 0x54d0
movq %rax, %rdi
movl $0x1, %esi
callq 0x55b0
jmp 0x88f0
leaq 0x10(%rbx), %rsi
movq %r14, %rdi
callq 0x5760
jmp 0x88f0
movl $0x1, %ebp
xorl %r14d, %r14d
cmpq 0x20(%rbx), %r14
jae 0x88f2
movq 0x28(%rbx), %rax
movq (%rax,%r14,8), %rdi
movq %r15, %rsi
callq 0x5180
cmpl %ebp, %eax
cmovll %eax, %ebp
incq %r14
cmpl $-0x1, %ebp
jne 0x8781
jmp 0x88f2
cmpq $0x0, 0x48(%rbx)
je 0x88f2
movq 0x8(%rbx), %rsi
movq %r15, %rdi
callq 0x50e0
movq 0x58(%rbx), %rdx
movl %r12d, %edi
movq %rax, %rsi
callq *0x48(%rbx)
jmp 0x88f0
cmpl $0x3, 0x4(%rbx)
jne 0x8925
movss 0x10(%rbx), %xmm0
movq %r14, %rdi
callq 0x5220
jmp 0x88f0
cmpl $0x4, 0x4(%rbx)
jne 0x8944
movsd 0x10(%rbx), %xmm0
movq %r14, %rdi
callq 0x5420
jmp 0x88f0
cmpl $0x2, 0x4(%rbx)
jne 0x8963
movq 0x10(%rbx), %rsi
movq %r14, %rdi
callq 0x51a0
jmp 0x88f0
cmpl $0x3, 0x4(%rbx)
jne 0x89a1
movss 0x10(%rbx), %xmm0
movq %r14, %rdi
callq 0x59a0
jmp 0x88f0
cmpl $0x4, 0x4(%rbx)
jne 0x89c0
movsd 0x10(%rbx), %xmm0
movq %r14, %rdi
callq 0x5960
jmp 0x88f0
cmpl $0x2, 0x4(%rbx)
jne 0x89df
movq 0x10(%rbx), %rsi
movq %r14, %rdi
callq 0x5880
jmp 0x88f0
cmpl $0x4, 0x4(%rbx)
jne 0x8a1d
movsd 0x10(%rbx), %xmm0
movq %r14, %rdi
callq 0x51c0
jmp 0x88f0
cmpl $0x2, 0x4(%rbx)
jne 0x8a3c
movq 0x10(%rbx), %rsi
movq %r14, %rdi
callq 0x5490
jmp 0x88f0
cmpl $0x3, 0x4(%rbx)
jne 0x8a5b
movss 0x10(%rbx), %xmm0
movq %r14, %rdi
callq 0x59d0
jmp 0x88f0
cmpl $0x1, 0x4(%rbx)
jne 0x8a7a
movl 0x10(%rbx), %esi
movq %r14, %rdi
callq 0x5580
jmp 0x88f0
cmpl $0x5, 0x4(%rbx)
jne 0x8a99
leaq 0x10(%rbx), %rsi
movq %r14, %rdi
callq 0x5750
movl %eax, %ebp
movl %ebp, %eax
negl %eax
cmpb $0x0, 0x3d(%rbx)
cmovel %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x42f9(%rip), %rdi      # 0xcc06
leaq 0x4180(%rip), %rsi      # 0xca94
leaq 0x462e(%rip), %rcx      # 0xcf49
movl $0x2a9, %edx            # imm = 0x2A9
callq 0x5350
leaq 0x432a(%rip), %rdi      # 0xcc56
leaq 0x4161(%rip), %rsi      # 0xca94
leaq 0x460f(%rip), %rcx      # 0xcf49
movl $0x2b1, %edx            # imm = 0x2B1
callq 0x5350
leaq 0x4333(%rip), %rdi      # 0xcc7e
leaq 0x4142(%rip), %rsi      # 0xca94
leaq 0x45f0(%rip), %rcx      # 0xcf49
movl $0x2b5, %edx            # imm = 0x2B5
callq 0x5350
leaq 0x42c4(%rip), %rdi      # 0xcc2e
leaq 0x4123(%rip), %rsi      # 0xca94
leaq 0x45d1(%rip), %rcx      # 0xcf49
movl $0x2ad, %edx            # imm = 0x2AD
callq 0x5350
leaq 0x427d(%rip), %rdi      # 0xcc06
leaq 0x4104(%rip), %rsi      # 0xca94
leaq 0x453b(%rip), %rcx      # 0xced2
movl $0x252, %edx            # imm = 0x252
callq 0x5350
leaq 0x42ae(%rip), %rdi      # 0xcc56
leaq 0x40e5(%rip), %rsi      # 0xca94
leaq 0x451c(%rip), %rcx      # 0xced2
movl $0x25a, %edx            # imm = 0x25A
callq 0x5350
leaq 0x42b7(%rip), %rdi      # 0xcc7e
leaq 0x40c6(%rip), %rsi      # 0xca94
leaq 0x44fd(%rip), %rcx      # 0xced2
movl $0x25e, %edx            # imm = 0x25E
callq 0x5350
leaq 0x4248(%rip), %rdi      # 0xcc2e
leaq 0x40a7(%rip), %rsi      # 0xca94
leaq 0x44de(%rip), %rcx      # 0xced2
movl $0x256, %edx            # imm = 0x256
callq 0x5350
leaq 0x4156(%rip), %rdi      # 0xcb5b
leaq 0x4088(%rip), %rsi      # 0xca94
leaq 0x4448(%rip), %rcx      # 0xce5b
movl $0x1f5, %edx            # imm = 0x1F5
callq 0x5350
leaq 0x425a(%rip), %rdi      # 0xcc7e
leaq 0x4069(%rip), %rsi      # 0xca94
leaq 0x4429(%rip), %rcx      # 0xce5b
movl $0x205, %edx            # imm = 0x205
callq 0x5350
leaq 0x41eb(%rip), %rdi      # 0xcc2e
leaq 0x404a(%rip), %rsi      # 0xca94
leaq 0x440a(%rip), %rcx      # 0xce5b
movl $0x1fd, %edx            # imm = 0x1FD
callq 0x5350
leaq 0x41f4(%rip), %rdi      # 0xcc56
leaq 0x402b(%rip), %rsi      # 0xca94
leaq 0x43eb(%rip), %rcx      # 0xce5b
movl $0x201, %edx            # imm = 0x201
callq 0x5350
leaq 0x4185(%rip), %rdi      # 0xcc06
leaq 0x400c(%rip), %rsi      # 0xca94
leaq 0x43cc(%rip), %rcx      # 0xce5b
movl $0x1f9, %edx            # imm = 0x1F9
callq 0x5350
leaq 0x4206(%rip), %rdi      # 0xcca6
leaq 0x3fed(%rip), %rsi      # 0xca94
leaq 0x43ad(%rip), %rcx      # 0xce5b
movl $0x209, %edx            # imm = 0x209
callq 0x5350