// File: /workspace/github_c_makefile_star2_O0/chriso[P]columnix/lib/predicate.c
// Function: cx_index_match_rows_eq
static bool cx_index_match_rows_eq(const struct cx_predicate *predicate,
                                   struct cx_row_group_cursor *cursor,
                                   enum cx_column_type type, uint64_t *matches,
                                   size_t *count)
{
    uint64_t mask = 0;
    switch (type) {
        case CX_COLUMN_BIT: {
            assert(predicate->column_type == CX_COLUMN_BIT);
            const uint64_t *values =
                cx_row_group_cursor_batch_bit(cursor, predicate->column, count);
            if (!values)
                goto error;
            if (*count) {
                if (predicate->value.bit)
                    mask = *values;
                else
                    mask = cx_mask_cap(~*values, *count);
            }
        } break;
        case CX_COLUMN_I32: {
            assert(predicate->column_type == CX_COLUMN_I32);
            const int32_t *values =
                cx_row_group_cursor_batch_i32(cursor, predicate->column, count);
            if (!values)
                goto error;
            mask = cx_match_i32_eq(*count, values, predicate->value.i32);
        } break;
        case CX_COLUMN_I64: {
            assert(predicate->column_type == CX_COLUMN_I64);
            const int64_t *values =
                cx_row_group_cursor_batch_i64(cursor, predicate->column, count);
            if (!values)
                goto error;
            mask = cx_match_i64_eq(*count, values, predicate->value.i64);
        } break;
        case CX_COLUMN_FLT: {
            assert(predicate->column_type == CX_COLUMN_FLT);
            const float *values =
                cx_row_group_cursor_batch_flt(cursor, predicate->column, count);
            if (!values)
                goto error;
            mask = cx_match_flt_eq(*count, values, predicate->value.flt);
        } break;
        case CX_COLUMN_DBL: {
            assert(predicate->column_type == CX_COLUMN_DBL);
            const double *values =
                cx_row_group_cursor_batch_dbl(cursor, predicate->column, count);
            if (!values)
                goto error;
            mask = cx_match_dbl_eq(*count, values, predicate->value.dbl);
        } break;
        case CX_COLUMN_STR: {
            assert(predicate->column_type == CX_COLUMN_STR);
            const struct cx_string *values =
                cx_row_group_cursor_batch_str(cursor, predicate->column, count);
            if (!values)
                goto error;
            mask = cx_match_str_eq(*count, values, &predicate->value.str,
                                   predicate->case_sensitive);
        } break;
    }
    *matches = mask;
    return true;
error:
    return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movl -0x1c(%rbp), %eax
movq %rax, -0x70(%rbp)
subq $0x5, %rax
ja 0xa4a2
movq -0x70(%rbp), %rax
leaq 0x6805(%rip), %rcx      # 0x109d4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rbp), %rax
cmpl $0x0, 0x4(%rax)
jne 0xa1e4
jmp 0xa203
leaq 0x69b8(%rip), %rdi      # 0x10ba3
leaq 0x68ea(%rip), %rsi      # 0x10adc
movl $0x1b2, %edx            # imm = 0x1B2
leaq 0x69cd(%rip), %rcx      # 0x10bcb
callq 0x53a0
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x30(%rbp), %rdx
callq 0x5590
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0xa228
jmp 0xa4b3
movq -0x30(%rbp), %rax
cmpq $0x0, (%rax)
je 0xa266
movq -0x10(%rbp), %rax
testb $0x1, 0x10(%rax)
je 0xa249
movq -0x40(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
jmp 0xa264
movq -0x40(%rbp), %rax
movq (%rax), %rdi
xorq $-0x1, %rdi
movq -0x30(%rbp), %rax
movq (%rax), %rsi
callq 0xa120
movq %rax, -0x38(%rbp)
jmp 0xa266
jmp 0xa4a2
movq -0x10(%rbp), %rax
cmpl $0x1, 0x4(%rax)
jne 0xa277
jmp 0xa296
leaq 0x69d0(%rip), %rdi      # 0x10c4e
leaq 0x6857(%rip), %rsi      # 0x10adc
movl $0x1bf, %edx            # imm = 0x1BF
leaq 0x693a(%rip), %rcx      # 0x10bcb
callq 0x53a0
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x30(%rbp), %rdx
callq 0x58a0
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
jne 0xa2bb
jmp 0xa4b3
movq -0x30(%rbp), %rax
movq (%rax), %rdi
movq -0x48(%rbp), %rsi
movq -0x10(%rbp), %rax
movl 0x10(%rax), %edx
callq 0x56e0
movq %rax, -0x38(%rbp)
jmp 0xa4a2
movq -0x10(%rbp), %rax
cmpl $0x2, 0x4(%rax)
jne 0xa2e7
jmp 0xa306
leaq 0x6988(%rip), %rdi      # 0x10c76
leaq 0x67e7(%rip), %rsi      # 0x10adc
movl $0x1c7, %edx            # imm = 0x1C7
leaq 0x68ca(%rip), %rcx      # 0x10bcb
callq 0x53a0
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x30(%rbp), %rdx
callq 0x5950
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
jne 0xa32b
jmp 0xa4b3
movq -0x30(%rbp), %rax
movq (%rax), %rdi
movq -0x50(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdx
callq 0x5540
movq %rax, -0x38(%rbp)
jmp 0xa4a2
movq -0x10(%rbp), %rax
cmpl $0x3, 0x4(%rax)
jne 0xa358
jmp 0xa377
leaq 0x693f(%rip), %rdi      # 0x10c9e
leaq 0x6776(%rip), %rsi      # 0x10adc
movl $0x1cf, %edx            # imm = 0x1CF
leaq 0x6859(%rip), %rcx      # 0x10bcb
callq 0x53a0
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x30(%rbp), %rdx
callq 0x58b0
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x58(%rbp)
jne 0xa39c
jmp 0xa4b3
movq -0x30(%rbp), %rax
movq (%rax), %rdi
movq -0x58(%rbp), %rsi
movq -0x10(%rbp), %rax
movss 0x10(%rax), %xmm0
callq 0x58c0
movq %rax, -0x38(%rbp)
jmp 0xa4a2
movq -0x10(%rbp), %rax
cmpl $0x4, 0x4(%rax)
jne 0xa3ca
jmp 0xa3e9
leaq 0x68f5(%rip), %rdi      # 0x10cc6
leaq 0x6704(%rip), %rsi      # 0x10adc
movl $0x1d7, %edx            # imm = 0x1D7
leaq 0x67e7(%rip), %rcx      # 0x10bcb
callq 0x53a0
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x30(%rbp), %rdx
callq 0x56a0
movq %rax, -0x60(%rbp)
cmpq $0x0, -0x60(%rbp)
jne 0xa40e
jmp 0xa4b3
movq -0x30(%rbp), %rax
movq (%rax), %rdi
movq -0x60(%rbp), %rsi
movq -0x10(%rbp), %rax
movsd 0x10(%rax), %xmm0
callq 0x5070
movq %rax, -0x38(%rbp)
jmp 0xa4a2
movq -0x10(%rbp), %rax
cmpl $0x5, 0x4(%rax)
jne 0xa439
jmp 0xa458
leaq 0x68ae(%rip), %rdi      # 0x10cee
leaq 0x6695(%rip), %rsi      # 0x10adc
movl $0x1df, %edx            # imm = 0x1DF
leaq 0x6778(%rip), %rcx      # 0x10bcb
callq 0x53a0
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x30(%rbp), %rdx
callq 0x5670
movq %rax, -0x68(%rbp)
cmpq $0x0, -0x68(%rbp)
jne 0xa47a
jmp 0xa4b3
movq -0x30(%rbp), %rax
movq (%rax), %rdi
movq -0x68(%rbp), %rsi
movq -0x10(%rbp), %rdx
addq $0x10, %rdx
movq -0x10(%rbp), %rax
movb 0x3c(%rax), %al
andb $0x1, %al
movzbl %al, %ecx
callq 0x53d0
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movb $0x1, -0x1(%rbp)
jmp 0xa4b7
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)