// File: /workspace/github_c_makefile_star2_O0/chriso[P]columnix/lib/predicate.c
// Function: cx_index_match_rows_gt
static bool cx_index_match_rows_gt(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:
            goto error;  // unsupported
        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_gt(*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_gt(*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_gt(*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_gt(*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_gt(*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, -0x68(%rbp)
subq $0x5, %rax
ja 0xaa04
movq -0x68(%rbp), %rax
leaq 0x6245(%rip), %rcx      # 0x10a04
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
jmp 0xaa15
movq -0x10(%rbp), %rax
cmpl $0x1, 0x4(%rax)
jne 0xa7d9
jmp 0xa7f8
leaq 0x646e(%rip), %rdi      # 0x10c4e
leaq 0x62f5(%rip), %rsi      # 0x10adc
movl $0x271, %edx            # imm = 0x271
leaq 0x65a6(%rip), %rcx      # 0x10d99
callq 0x53a0
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x30(%rbp), %rdx
callq 0x58a0
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0xa81d
jmp 0xaa15
movq -0x30(%rbp), %rax
movq (%rax), %rdi
movq -0x40(%rbp), %rsi
movq -0x10(%rbp), %rax
movl 0x10(%rax), %edx
callq 0x5980
movq %rax, -0x38(%rbp)
jmp 0xaa04
movq -0x10(%rbp), %rax
cmpl $0x2, 0x4(%rax)
jne 0xa849
jmp 0xa868
leaq 0x6426(%rip), %rdi      # 0x10c76
leaq 0x6285(%rip), %rsi      # 0x10adc
movl $0x279, %edx            # imm = 0x279
leaq 0x6536(%rip), %rcx      # 0x10d99
callq 0x53a0
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x30(%rbp), %rdx
callq 0x5950
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
jne 0xa88d
jmp 0xaa15
movq -0x30(%rbp), %rax
movq (%rax), %rdi
movq -0x48(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdx
callq 0x5840
movq %rax, -0x38(%rbp)
jmp 0xaa04
movq -0x10(%rbp), %rax
cmpl $0x3, 0x4(%rax)
jne 0xa8ba
jmp 0xa8d9
leaq 0x63dd(%rip), %rdi      # 0x10c9e
leaq 0x6214(%rip), %rsi      # 0x10adc
movl $0x281, %edx            # imm = 0x281
leaq 0x64c5(%rip), %rcx      # 0x10d99
callq 0x53a0
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x30(%rbp), %rdx
callq 0x58b0
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
jne 0xa8fe
jmp 0xaa15
movq -0x30(%rbp), %rax
movq (%rax), %rdi
movq -0x50(%rbp), %rsi
movq -0x10(%rbp), %rax
movss 0x10(%rax), %xmm0
callq 0x5a50
movq %rax, -0x38(%rbp)
jmp 0xaa04
movq -0x10(%rbp), %rax
cmpl $0x4, 0x4(%rax)
jne 0xa92c
jmp 0xa94b
leaq 0x6393(%rip), %rdi      # 0x10cc6
leaq 0x61a2(%rip), %rsi      # 0x10adc
movl $0x289, %edx            # imm = 0x289
leaq 0x6453(%rip), %rcx      # 0x10d99
callq 0x53a0
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x30(%rbp), %rdx
callq 0x56a0
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x58(%rbp)
jne 0xa970
jmp 0xaa15
movq -0x30(%rbp), %rax
movq (%rax), %rdi
movq -0x58(%rbp), %rsi
movq -0x10(%rbp), %rax
movsd 0x10(%rax), %xmm0
callq 0x5320
movq %rax, -0x38(%rbp)
jmp 0xaa04
movq -0x10(%rbp), %rax
cmpl $0x5, 0x4(%rax)
jne 0xa99b
jmp 0xa9ba
leaq 0x634c(%rip), %rdi      # 0x10cee
leaq 0x6133(%rip), %rsi      # 0x10adc
movl $0x291, %edx            # imm = 0x291
leaq 0x63e4(%rip), %rcx      # 0x10d99
callq 0x53a0
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x30(%rbp), %rdx
callq 0x5670
movq %rax, -0x60(%rbp)
cmpq $0x0, -0x60(%rbp)
jne 0xa9dc
jmp 0xaa15
movq -0x30(%rbp), %rax
movq (%rax), %rdi
movq -0x60(%rbp), %rsi
movq -0x10(%rbp), %rdx
addq $0x10, %rdx
movq -0x10(%rbp), %rax
movb 0x3c(%rax), %al
andb $0x1, %al
movzbl %al, %ecx
callq 0x50e0
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movb $0x1, -0x1(%rbp)
jmp 0xaa19
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)