// File: /workspace/github_c_makefile_star2_O0/chriso[P]columnix/lib/predicate.c
// Function: cx_index_match_rows_lt
static bool cx_index_match_rows_lt(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_lt(*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_lt(*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_lt(*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_lt(*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_lt(*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 0xa754
movq -0x68(%rbp), %rax
leaq 0x64dd(%rip), %rcx      # 0x109ec
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
jmp 0xa765
movq -0x10(%rbp), %rax
cmpl $0x1, 0x4(%rax)
jne 0xa529
jmp 0xa548
leaq 0x671e(%rip), %rdi      # 0x10c4e
leaq 0x65a5(%rip), %rsi      # 0x10adc
movl $0x21a, %edx            # imm = 0x21A
leaq 0x67d3(%rip), %rcx      # 0x10d16
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 0xa56d
jmp 0xa765
movq -0x30(%rbp), %rax
movq (%rax), %rdi
movq -0x40(%rbp), %rsi
movq -0x10(%rbp), %rax
movl 0x10(%rax), %edx
callq 0x5280
movq %rax, -0x38(%rbp)
jmp 0xa754
movq -0x10(%rbp), %rax
cmpl $0x2, 0x4(%rax)
jne 0xa599
jmp 0xa5b8
leaq 0x66d6(%rip), %rdi      # 0x10c76
leaq 0x6535(%rip), %rsi      # 0x10adc
movl $0x222, %edx            # imm = 0x222
leaq 0x6763(%rip), %rcx      # 0x10d16
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 0xa5dd
jmp 0xa765
movq -0x30(%rbp), %rax
movq (%rax), %rdi
movq -0x48(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdx
callq 0x5750
movq %rax, -0x38(%rbp)
jmp 0xa754
movq -0x10(%rbp), %rax
cmpl $0x3, 0x4(%rax)
jne 0xa60a
jmp 0xa629
leaq 0x668d(%rip), %rdi      # 0x10c9e
leaq 0x64c4(%rip), %rsi      # 0x10adc
movl $0x22a, %edx            # imm = 0x22A
leaq 0x66f2(%rip), %rcx      # 0x10d16
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 0xa64e
jmp 0xa765
movq -0x30(%rbp), %rax
movq (%rax), %rdi
movq -0x50(%rbp), %rsi
movq -0x10(%rbp), %rax
movss 0x10(%rax), %xmm0
callq 0x5940
movq %rax, -0x38(%rbp)
jmp 0xa754
movq -0x10(%rbp), %rax
cmpl $0x4, 0x4(%rax)
jne 0xa67c
jmp 0xa69b
leaq 0x6643(%rip), %rdi      # 0x10cc6
leaq 0x6452(%rip), %rsi      # 0x10adc
movl $0x232, %edx            # imm = 0x232
leaq 0x6680(%rip), %rcx      # 0x10d16
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 0xa6c0
jmp 0xa765
movq -0x30(%rbp), %rax
movq (%rax), %rdi
movq -0x58(%rbp), %rsi
movq -0x10(%rbp), %rax
movsd 0x10(%rax), %xmm0
callq 0x5130
movq %rax, -0x38(%rbp)
jmp 0xa754
movq -0x10(%rbp), %rax
cmpl $0x5, 0x4(%rax)
jne 0xa6eb
jmp 0xa70a
leaq 0x65fc(%rip), %rdi      # 0x10cee
leaq 0x63e3(%rip), %rsi      # 0x10adc
movl $0x23a, %edx            # imm = 0x23A
leaq 0x6611(%rip), %rcx      # 0x10d16
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 0xa72c
jmp 0xa765
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 0x5270
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movb $0x1, -0x1(%rbp)
jmp 0xa769
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)