// File: /workspace/github_c_makefile_star2_O3/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 0x8630
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 0x88a0
leaq 0x4417(%rip), %rcx      # 0xca20
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x8(%rbx), %rsi
movq %r15, %rdi
callq 0x54d0
movq %rax, %rdi
movl $0x1, %esi
callq 0x55b0
jmp 0x889e
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x88ab
decl %r12d
cmpl $0x3, %r12d
ja 0x88a0
leaq 0x43f6(%rip), %rax      # 0xca44
movslq (%rax,%r12,4), %rcx
addq %rax, %rcx
jmpq *%rcx
cmpl $0x1, 0x4(%rbx)
jne 0x88b4
movl 0x10(%rbx), %esi
movq %r14, %rdi
callq 0x53c0
jmp 0x889e
cmpl $0x5, %r12d
ja 0x88a0
movl %r12d, %eax
leaq 0x43df(%rip), %rcx      # 0xca64
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpl $0x0, 0x4(%rbx)
jne 0x89ac
movzbl 0x10(%rbx), %esi
movq %r14, %rdi
jmp 0x8626
decl %r12d
cmpl $0x3, %r12d
ja 0x88a0
leaq 0x439f(%rip), %rax      # 0xca54
movslq (%rax,%r12,4), %rcx
addq %rax, %rcx
jmpq *%rcx
cmpl $0x1, 0x4(%rbx)
jne 0x8930
movl 0x10(%rbx), %esi
movq %r14, %rdi
callq 0x57c0
jmp 0x889e
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
xorl %r14d, %r14d
cmpq 0x20(%rbx), %r14
jae 0x88a0
movq 0x28(%rbx), %rax
movq (%rax,%r14,8), %rdi
movq %r15, %rsi
callq 0x5180
incq %r14
cmpl %ebp, %eax
cmovgl %eax, %ebp
cmpl $0x1, %ebp
jne 0x86e0
movl $0x1, %ebp
jmp 0x88a0
leaq 0x10(%rbx), %rsi
movq %r14, %rdi
callq 0x5760
jmp 0x889e
movl $0x1, %ebp
xorl %r14d, %r14d
cmpq 0x20(%rbx), %r14
jae 0x88a0
movq 0x28(%rbx), %rax
movq (%rax,%r14,8), %rdi
movq %r15, %rsi
callq 0x5180
incq %r14
cmpl %ebp, %eax
cmovll %eax, %ebp
cmpl $-0x1, %ebp
jne 0x872a
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0x88a0
cmpq $0x0, 0x48(%rbx)
je 0x88a0
movq 0x8(%rbx), %rsi
movq %r15, %rdi
callq 0x50e0
movq 0x58(%rbx), %rdx
movl %r12d, %edi
movq %rax, %rsi
callq *0x48(%rbx)
jmp 0x889e
cmpl $0x3, 0x4(%rbx)
jne 0x88d3
movss 0x10(%rbx), %xmm0
movq %r14, %rdi
callq 0x5220
jmp 0x889e
cmpl $0x4, 0x4(%rbx)
jne 0x88f2
movsd 0x10(%rbx), %xmm0
movq %r14, %rdi
callq 0x5420
jmp 0x889e
cmpl $0x2, 0x4(%rbx)
jne 0x8911
movq 0x10(%rbx), %rsi
movq %r14, %rdi
callq 0x51a0
jmp 0x889e
cmpl $0x3, 0x4(%rbx)
jne 0x894f
movss 0x10(%rbx), %xmm0
movq %r14, %rdi
callq 0x59a0
jmp 0x889e
cmpl $0x4, 0x4(%rbx)
jne 0x896e
movsd 0x10(%rbx), %xmm0
movq %r14, %rdi
callq 0x5960
jmp 0x889e
cmpl $0x2, 0x4(%rbx)
jne 0x898d
movq 0x10(%rbx), %rsi
movq %r14, %rdi
callq 0x5880
jmp 0x889e
cmpl $0x4, 0x4(%rbx)
jne 0x89cb
movsd 0x10(%rbx), %xmm0
movq %r14, %rdi
callq 0x51c0
jmp 0x889e
cmpl $0x2, 0x4(%rbx)
jne 0x89ea
movq 0x10(%rbx), %rsi
movq %r14, %rdi
callq 0x5490
jmp 0x889e
cmpl $0x3, 0x4(%rbx)
jne 0x8a09
movss 0x10(%rbx), %xmm0
movq %r14, %rdi
callq 0x59d0
jmp 0x889e
cmpl $0x1, 0x4(%rbx)
jne 0x8a28
movl 0x10(%rbx), %esi
movq %r14, %rdi
callq 0x5580
jmp 0x889e
cmpl $0x5, 0x4(%rbx)
jne 0x8a47
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 0x436b(%rip), %rdi      # 0xcc26
leaq 0x41f2(%rip), %rsi      # 0xcab4
leaq 0x46a0(%rip), %rcx      # 0xcf69
movl $0x2a9, %edx            # imm = 0x2A9
callq 0x5350
leaq 0x439c(%rip), %rdi      # 0xcc76
leaq 0x41d3(%rip), %rsi      # 0xcab4
leaq 0x4681(%rip), %rcx      # 0xcf69
movl $0x2b1, %edx            # imm = 0x2B1
callq 0x5350
leaq 0x43a5(%rip), %rdi      # 0xcc9e
leaq 0x41b4(%rip), %rsi      # 0xcab4
leaq 0x4662(%rip), %rcx      # 0xcf69
movl $0x2b5, %edx            # imm = 0x2B5
callq 0x5350
leaq 0x4336(%rip), %rdi      # 0xcc4e
leaq 0x4195(%rip), %rsi      # 0xcab4
leaq 0x4643(%rip), %rcx      # 0xcf69
movl $0x2ad, %edx            # imm = 0x2AD
callq 0x5350
leaq 0x42ef(%rip), %rdi      # 0xcc26
leaq 0x4176(%rip), %rsi      # 0xcab4
leaq 0x45ad(%rip), %rcx      # 0xcef2
movl $0x252, %edx            # imm = 0x252
callq 0x5350
leaq 0x4320(%rip), %rdi      # 0xcc76
leaq 0x4157(%rip), %rsi      # 0xcab4
leaq 0x458e(%rip), %rcx      # 0xcef2
movl $0x25a, %edx            # imm = 0x25A
callq 0x5350
leaq 0x4329(%rip), %rdi      # 0xcc9e
leaq 0x4138(%rip), %rsi      # 0xcab4
leaq 0x456f(%rip), %rcx      # 0xcef2
movl $0x25e, %edx            # imm = 0x25E
callq 0x5350
leaq 0x42ba(%rip), %rdi      # 0xcc4e
leaq 0x4119(%rip), %rsi      # 0xcab4
leaq 0x4550(%rip), %rcx      # 0xcef2
movl $0x256, %edx            # imm = 0x256
callq 0x5350
leaq 0x41c8(%rip), %rdi      # 0xcb7b
leaq 0x40fa(%rip), %rsi      # 0xcab4
leaq 0x44ba(%rip), %rcx      # 0xce7b
movl $0x1f5, %edx            # imm = 0x1F5
callq 0x5350
leaq 0x42cc(%rip), %rdi      # 0xcc9e
leaq 0x40db(%rip), %rsi      # 0xcab4
leaq 0x449b(%rip), %rcx      # 0xce7b
movl $0x205, %edx            # imm = 0x205
callq 0x5350
leaq 0x425d(%rip), %rdi      # 0xcc4e
leaq 0x40bc(%rip), %rsi      # 0xcab4
leaq 0x447c(%rip), %rcx      # 0xce7b
movl $0x1fd, %edx            # imm = 0x1FD
callq 0x5350
leaq 0x4266(%rip), %rdi      # 0xcc76
leaq 0x409d(%rip), %rsi      # 0xcab4
leaq 0x445d(%rip), %rcx      # 0xce7b
movl $0x201, %edx            # imm = 0x201
callq 0x5350
leaq 0x41f7(%rip), %rdi      # 0xcc26
leaq 0x407e(%rip), %rsi      # 0xcab4
leaq 0x443e(%rip), %rcx      # 0xce7b
movl $0x1f9, %edx            # imm = 0x1F9
callq 0x5350
leaq 0x4278(%rip), %rdi      # 0xccc6
leaq 0x405f(%rip), %rsi      # 0xcab4
leaq 0x441f(%rip), %rcx      # 0xce7b
movl $0x209, %edx            # imm = 0x209
callq 0x5350