LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/chriso[P]columnix/lib/predicate.c
// Function: cx_predicate_cost
static int cx_predicate_cost(const struct cx_predicate *predicate,
                             const struct cx_row_group *row_group)
{
    // in future, this function should look at more than just the
    // column type to determine the cost of evaluating the predicate.
    // for example, it could check the size of each column, whether
    // it's compressed and/or encoded, and the compression ratio
    int cost = 0;
    switch (predicate->type) {
        case CX_PREDICATE_TRUE:
            break;
        case CX_PREDICATE_NULL:
            cost = cx_column_cost(CX_COLUMN_BIT);
            break;
        case CX_PREDICATE_EQ:
        case CX_PREDICATE_LT:
        case CX_PREDICATE_GT:
        case CX_PREDICATE_CONTAINS:
            cost = cx_column_cost(
                cx_row_group_column_type(row_group, predicate->column));
            break;
        case CX_PREDICATE_AND:
        case CX_PREDICATE_OR:
            for (size_t i = 0; i < predicate->operand_count; i++)
                cost += cx_predicate_cost(predicate->operands[i], row_group);
            break;
        case CX_PREDICATE_CUSTOM:
            if (predicate->custom.cost >= 0)
                cost = predicate->custom.cost;
            else
                cost = cx_column_cost(
                    cx_row_group_column_type(row_group, predicate->column));
            break;
    }
    return cost;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl (%rdi), %eax
decl %eax
cmpl $0x7, %eax
ja 0x866a
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x346b(%rip), %rcx      # 0xba7c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0x5920
movl %eax, %edi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x867c
xorl %r15d, %r15d
xorl %r12d, %r12d
cmpq 0x20(%r14), %r12
jae 0x866d
movq 0x28(%r14), %rax
movq (%rax,%r12,8), %rdi
movq %rbx, %rsi
callq 0x85f3
addl %eax, %r15d
incq %r12
jmp 0x863b
pushq $0x1
popq %r15
jmp 0x866d
movl 0x50(%r14), %r15d
testl %r15d, %r15d
jns 0x866d
jmp 0x861a
xorl %r15d, %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/chriso[P]columnix/lib/reader.c
// Function: cx_reader_new_impl
static struct cx_reader *cx_reader_new_impl(const char *path,
                                            struct cx_predicate *predicate,
                                            bool match_all_rows)
{
    if (!predicate)
        return NULL;
    struct cx_reader *reader = calloc(1, sizeof(*reader));
    if (!reader)
        return NULL;
    reader->reader = cx_row_group_reader_new(path);
    if (!reader->reader)
        goto error;
    reader->predicate = predicate;
    reader->match_all_rows = match_all_rows;
    reader->row_group_count =
        cx_row_group_reader_row_group_count(reader->reader);
    // validate and optimize the predicate
    if (reader->row_group_count && !match_all_rows) {
        struct cx_row_group *row_group =
            cx_row_group_reader_get(reader->reader, 0);
        if (!row_group)
            goto error;
        if (!cx_predicate_valid(predicate, row_group)) {
            cx_row_group_free(row_group);
            goto error;
        }
        cx_predicate_optimize(predicate, row_group);
        cx_row_group_free(row_group);
    }
    return reader;
error:
    free(reader);
    return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x8741
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r15
pushq $0x1
popq %rdi
pushq $0x38
popq %rsi
callq 0x5480
testq %rax, %rax
je 0x8741
movq %rax, %rbx
movq %r15, %rdi
callq 0x5620
movq %rax, (%rbx)
testq %rax, %rax
je 0x8739
movq %r14, 0x8(%rbx)
movb %bpl, 0x30(%rbx)
movq 0x40(%rax), %rcx
movq %rcx, 0x20(%rbx)
testq %rcx, %rcx
sete %cl
orb %bpl, %cl
jne 0x8743
movq %rax, %rdi
xorl %esi, %esi
callq 0x5a80
testq %rax, %rax
je 0x8739
movq %rax, %r15
movq %r14, %rdi
movq %rax, %rsi
callq 0x5110
testb %al, %al
je 0x8731
movq %r14, %rdi
movq %r15, %rsi
callq 0x5a50
movq %r15, %rdi
callq 0x58b0
jmp 0x8743
movq %r15, %rdi
callq 0x58b0
movq %rbx, %rdi
callq 0x5090
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/chriso[P]columnix/lib/reader.c
// Function: cx_reader_free
void cx_reader_free(struct cx_reader *reader)
{
    if (reader->row_cursor)
        cx_row_cursor_free(reader->row_cursor);
    if (reader->row_group)
        cx_row_group_free(reader->row_group);
    cx_predicate_free(reader->predicate);
    cx_row_group_reader_free(reader->reader);
    free(reader);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
je 0x876a
callq 0x56d0
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x8778
callq 0x58b0
movq 0x8(%rbx), %rdi
callq 0x5410
movq (%rbx), %rdi
callq 0x59e0
movq %rbx, %rdi
popq %rbx
jmp 0x5090
// File: /workspace/github_c_makefile_star2_O2/chriso[P]columnix/lib/reader.c
// Function: cx_row_group_reader_free
void cx_row_group_reader_free(struct cx_row_group_reader *reader)
{
    if (reader->mmap_ptr)
        munmap(reader->mmap_ptr, reader->file_size);
    fclose(reader->file);
    cx_column_free(reader->strings);
    free(reader);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0x87a8
movq 0x10(%rbx), %rsi
callq 0x5740
movq (%rbx), %rdi
callq 0x5210
movq 0x20(%rbx), %rdi
callq 0x5940
movq %rbx, %rdi
popq %rbx
jmp 0x5090
// File: /workspace/github_c_makefile_star2_O2/chriso[P]columnix/lib/reader.c
// Function: cx_reader_rewind
void cx_reader_rewind(struct cx_reader *reader)
{
    if (reader->row_cursor)
        cx_row_cursor_free(reader->row_cursor);
    if (reader->row_group)
        cx_row_group_free(reader->row_group);
    reader->row_cursor = NULL;
    reader->row_group = NULL;
    reader->position = 0;
    reader->error = false;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
je 0x8803
callq 0x56d0
leaq 0x10(%rbx), %r14
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x8815
callq 0x58b0
andq $0x0, 0x28(%rbx)
movb $0x0, 0x31(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/chriso[P]columnix/lib/reader.c
// Function: cx_reader_next
bool cx_reader_next(struct cx_reader *reader)
{
    if (reader->error)
        return false;
    for (; cx_reader_valid(reader); cx_reader_advance(reader)) {
        if (!reader->row_cursor)
            if (!cx_reader_load_cursor(reader))
                goto error;
        if (cx_row_cursor_next(reader->row_cursor))
            return true;
        if (cx_row_cursor_error(reader->row_cursor))
            goto error;
    }
    return false;
error:
    reader->error = true;
    return false;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
cmpb $0x0, 0x31(%rdi)
jne 0x8884
movq %rdi, %rbx
movq 0x28(%rbx), %rax
cmpq 0x20(%rbx), %rax
setb %bpl
jae 0x8886
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
jne 0x8860
movq %rbx, %rdi
callq 0x888f
testb %al, %al
je 0x8880
movq 0x18(%rbx), %rdi
callq 0x5390
testb %al, %al
jne 0x8886
movq 0x18(%rbx), %rdi
callq 0x5630
testb %al, %al
jne 0x8880
movq %rbx, %rdi
callq 0x88d9
jmp 0x8839
movb $0x1, 0x31(%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/chriso[P]columnix/lib/reader.c
// Function: cx_reader_load_cursor
static bool cx_reader_load_cursor(struct cx_reader *reader)
{
    reader->row_group =
        cx_row_group_reader_get(reader->reader, reader->position);
    if (!reader->row_group)
        goto error;
    reader->row_cursor =
        cx_row_cursor_new(reader->row_group, reader->predicate);
    if (!reader->row_cursor)
        goto error;
    return true;
error:
    if (reader->row_group)
        cx_row_group_free(reader->row_group);
    reader->row_group = NULL;
    return false;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
movq 0x28(%rbx), %rsi
callq 0x5a80
movq %rax, 0x10(%rbx)
testq %rax, %rax
je 0x88d0
movq 0x8(%rbx), %rsi
movq %rax, %rdi
callq 0x5300
movq %rax, %rcx
movq %rax, 0x18(%rbx)
movb $0x1, %al
testq %rcx, %rcx
jne 0x88d7
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x88d0
callq 0x58b0
andq $0x0, 0x10(%rbx)
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/chriso[P]columnix/lib/reader.c
// Function: cx_reader_advance
static void cx_reader_advance(struct cx_reader *reader)
{
    if (reader->row_cursor) {
        cx_row_cursor_free(reader->row_cursor);
        reader->row_cursor = NULL;
    }
    if (reader->row_group) {
        cx_row_group_free(reader->row_group);
        reader->row_group = NULL;
    }
    reader->position++;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
je 0x88f0
callq 0x56d0
andq $0x0, 0x18(%rbx)
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x8903
callq 0x58b0
andq $0x0, 0x10(%rbx)
incq 0x28(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/chriso[P]columnix/lib/reader.c
// Function: cx_reader_row_count
size_t cx_reader_row_count(struct cx_reader *reader)
{
    size_t total_row_count = cx_row_group_reader_row_count(reader->reader);
    if (reader->match_all_rows || !total_row_count)
        return total_row_count;
    cx_reader_rewind(reader);
    size_t count = 0;
    for (; cx_reader_valid(reader); cx_reader_advance(reader)) {
        if (!cx_reader_load_cursor(reader))
            goto error;
        count += cx_row_cursor_count(reader->row_cursor);
        if (cx_row_cursor_error(reader->row_cursor))
            goto error;
    }
    return count;
error:
    reader->error = true;
    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq (%rdi), %rax
movq 0x18(%rax), %r14
testq %r14, %r14
sete %al
orb 0x30(%rdi), %al
jne 0x8972
movq %rdi, %rbx
callq 0x51b0
xorl %r14d, %r14d
movq 0x28(%rbx), %rax
cmpq 0x20(%rbx), %rax
jae 0x8972
movq %rbx, %rdi
callq 0x888f
testb %al, %al
je 0x896b
movq 0x18(%rbx), %rdi
callq 0x5320
movq %rax, %r15
movq 0x18(%rbx), %rdi
callq 0x5630
testb %al, %al
jne 0x896b
addq %r15, %r14
movq %rbx, %rdi
callq 0x88d9
jmp 0x892f
movb $0x1, 0x31(%rbx)
xorl %r14d, %r14d
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/chriso[P]columnix/lib/reader.c
// Function: cx_reader_query
bool cx_reader_query(struct cx_reader *reader, int thread_count, void *data,
                     void (*iter)(struct cx_row_cursor *, pthread_mutex_t *,
                                  void *))
{
    if (thread_count <= 0)
        return false;
    if (!reader->row_group_count)
        return true;
    pthread_t *threads = NULL;
    struct cx_reader_query_context query_context = {
        .reader = reader->reader,
        .predicate = reader->predicate,
        .position = 0,
        .row_group_count = reader->row_group_count,
        .iter = iter,
        .data = data,
        .error = false};
    if (pthread_mutex_init(&query_context.mutex, NULL))
        return false;
    threads = malloc(thread_count * sizeof(pthread_t));
    if (!threads)
        goto error;
    for (int i = 0; i < thread_count; i++)
        if (pthread_create(&threads[i], NULL, cx_reader_query_thread,
                           &query_context))
            goto error;
    for (int i = 0; i < thread_count; i++)
        pthread_join(threads[i], NULL);
    free(threads);
    pthread_mutex_destroy(&query_context.mutex);
    return !query_context.error;
error:
    free(threads);
    pthread_mutex_destroy(&query_context.mutex);
    return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
testl %esi, %esi
jle 0x8a3f
movq 0x20(%rdi), %rax
testq %rax, %rax
je 0x8a44
movl %esi, %ebp
movups (%rdi), %xmm0
leaq 0x38(%rsp), %rbx
movaps %xmm0, -0x38(%rbx)
andq $0x0, -0x28(%rbx)
movq %rax, -0x20(%rbx)
movq %rcx, -0x18(%rbx)
movq %rdx, -0x10(%rbx)
movb $0x0, -0x8(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movups %xmm0, 0x10(%rbx)
andq $0x0, 0x20(%rbx)
xorl %r14d, %r14d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x59d0
testl %eax, %eax
jne 0x8a47
movl %ebp, %r13d
leaq (,%r13,8), %rdi
callq 0x55d0
movq %rax, %r14
testq %rax, %rax
je 0x8a2f
leaq 0x8(,%r13,8), %rbp
xorl %edi, %edi
movq %rsp, %r12
leaq 0x8(%rdi), %r15
cmpq %r15, %rbp
je 0x8a59
addq %r14, %rdi
xorl %esi, %esi
leaq 0x6c(%rip), %rdx        # 0x8a8c
movq %r12, %rcx
callq 0x5780
movq %r15, %rdi
testl %eax, %eax
je 0x8a0b
movq %r14, %rdi
callq 0x5090
movq %rbx, %rdi
callq 0x5350
xorl %r14d, %r14d
jmp 0x8a47
movb $0x1, %r14b
movl %r14d, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r15d, %r15d
cmpq %r15, %r13
je 0x8a71
movq (%r14,%r15,8), %rdi
xorl %esi, %esi
callq 0x5970
incq %r15
jmp 0x8a5c
movq %r14, %rdi
callq 0x5090
movq %rbx, %rdi
callq 0x5350
movb 0x30(%rsp), %r14b
xorb $0x1, %r14b
jmp 0x8a47
// File: /workspace/github_c_makefile_star2_O2/chriso[P]columnix/lib/reader.c
// Function: cx_reader_query_thread
static void *cx_reader_query_thread(void *ptr)
{
    struct cx_reader_query_context *context = ptr;
    struct cx_row_group *row_group = NULL;
    struct cx_row_cursor *cursor = NULL;
    for (;;) {
        pthread_mutex_lock(&context->mutex);
        size_t position = context->position++;
        pthread_mutex_unlock(&context->mutex);
        if (position >= context->row_group_count)
            break;
        row_group = cx_row_group_reader_get(context->reader, position);
        if (!row_group)
            goto error;
        cursor = cx_row_cursor_new(row_group, context->predicate);
        if (!cursor)
            goto error;
        context->iter(cursor, &context->mutex, context->data);
        if (cx_row_cursor_error(cursor))
            goto error;
        cx_row_group_free(row_group);
        cx_row_cursor_free(cursor);
        row_group = NULL;
        cursor = NULL;
    }
    return NULL;
error:
    if (row_group)
        cx_row_group_free(row_group);
    if (cursor)
        cx_row_cursor_free(cursor);
    pthread_mutex_lock(&context->mutex);
    context->error = true;
    pthread_mutex_unlock(&context->mutex);
    return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x38(%rdi), %rbx
movq %rbx, %rdi
callq 0x5a30
movq 0x10(%r14), %r15
leaq 0x1(%r15), %rax
movq %rax, 0x10(%r14)
movq %rbx, %rdi
callq 0x55b0
cmpq 0x18(%r14), %r15
jae 0x8b3a
movq (%r14), %rdi
movq %r15, %rsi
callq 0x5a80
testq %rax, %rax
je 0x8b25
movq %rax, %r15
movq 0x8(%r14), %rsi
movq %rax, %rdi
callq 0x5300
movq %rax, %r12
testq %rax, %rax
je 0x8b10
movq 0x28(%r14), %rdx
movq %r12, %rdi
movq %rbx, %rsi
callq *0x20(%r14)
movq %r12, %rdi
callq 0x5630
testb %al, %al
jne 0x8b10
movq %r15, %rdi
callq 0x58b0
movq %r12, %rdi
callq 0x56d0
jmp 0x8a9b
movq %r15, %rdi
callq 0x58b0
testq %r12, %r12
je 0x8b25
movq %r12, %rdi
callq 0x56d0
movq %rbx, %rdi
callq 0x5a30
movb $0x1, 0x30(%r14)
movq %rbx, %rdi
callq 0x55b0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/chriso[P]columnix/lib/reader.c
// Function: cx_row_group_reader_column_compression
enum cx_compression_type cx_row_group_reader_column_compression(
    const struct cx_row_group_reader *reader, size_t column, int *level)
{
    assert(column < reader->columns.count);
    const struct cx_column_descriptor *descriptor =
        &reader->columns.descriptors[column];
    if (level)
        *level = descriptor->compression_level;
    return descriptor->compression;
}

// Assembly:
cmpq %rsi, 0x30(%rdi)
jbe 0x8c10
imulq $0x18, %rsi, %rax
addq 0x28(%rdi), %rax
testq %rdx, %rdx
je 0x8c0c
movl 0x10(%rax), %ecx
movl %ecx, (%rdx)
movl 0xc(%rax), %eax
retq
pushq %rax
leaq 0x349e(%rip), %rdi      # 0xc0b6
leaq 0x33f5(%rip), %rsi      # 0xc014
leaq 0x3575(%rip), %rcx      # 0xc19b
movl $0x20d, %edx            # imm = 0x20D
callq 0x5380
// File: /workspace/github_c_makefile_star2_O2/chriso[P]columnix/lib/reader.c
// Function: cx_row_group_reader_string
const char *cx_row_group_reader_string(const struct cx_row_group_reader *reader,
                                       size_t index)
{
    size_t size;
    assert(cx_column_type(reader->strings) == CX_COLUMN_STR);
    assert(cx_column_encoding(reader->strings) == CX_ENCODING_NONE);
    const char *string = cx_column_export(reader->strings, &size);
    const char *end = string + size;
    for (; index && string < end; index--)
        string += strlen(string) + 1;
    assert(string <= end);
    return index == 0 && string != end ? string : NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x20(%rdi), %rdi
callq 0x54b0
cmpl $0x5, %eax
jne 0x8ec1
movq 0x20(%r14), %rdi
callq 0x50e0
testl %eax, %eax
jne 0x8ee0
movq 0x20(%r14), %rdi
movq %rsp, %r15
movq %r15, %rsi
callq 0x5160
movq %rax, %r14
movq %rax, %r12
addq (%r15), %r12
movq %rbx, %r15
addq $-0x1, %r15
jae 0x8e9d
cmpq %r12, %r14
jae 0x8e9d
movq %r14, %rdi
callq 0x5280
addq %rax, %r14
incq %r14
movq %r15, %rbx
jmp 0x8e7f
cmpq %r12, %r14
ja 0x8eff
xorl %eax, %eax
cmpq %r12, %r14
cmoveq %rax, %r14
testq %rbx, %rbx
cmovneq %rax, %r14
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x311b(%rip), %rdi      # 0xbfe3
leaq 0x3145(%rip), %rsi      # 0xc014
leaq 0x3147(%rip), %rcx      # 0xc01d
movl $0x1db, %edx            # imm = 0x1DB
callq 0x5380
leaq 0x3189(%rip), %rdi      # 0xc070
leaq 0x3126(%rip), %rsi      # 0xc014
leaq 0x3128(%rip), %rcx      # 0xc01d
movl $0x1dc, %edx            # imm = 0x1DC
callq 0x5380
leaq 0x31a2(%rip), %rdi      # 0xc0a8
leaq 0x3107(%rip), %rsi      # 0xc014
leaq 0x3109(%rip), %rcx      # 0xc01d
movl $0x1e1, %edx            # imm = 0x1E1
callq 0x5380
// File: /workspace/github_c_makefile_star2_O2/chriso[P]columnix/lib/row.c
// Function: cx_row_cursor_new
struct cx_row_cursor *cx_row_cursor_new(struct cx_row_group *row_group,
                                        const struct cx_predicate *predicate)
{
    struct cx_row_cursor *cursor = calloc(1, sizeof(*cursor));
    if (!cursor)
        return NULL;
    cursor->row_group = row_group;
    cursor->cursor = cx_row_group_cursor_new(row_group);
    if (!cursor->cursor)
        goto error;
    cursor->predicate = predicate;
    cursor->index_match =
        cx_index_match_indexes(cursor->predicate, cursor->row_group);
    cx_row_cursor_rewind(cursor);
    return cursor;
error:
    free(cursor);
    return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %r14
pushq $0x1
popq %rdi
pushq $0x38
popq %rsi
callq 0x5480
testq %rax, %rax
je 0x90b6
movq %rax, %rbx
movq %r14, (%rax)
movq %r14, %rdi
callq 0x5650
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x90ae
movq %r15, 0x10(%rbx)
movq %r15, %rdi
movq %r14, %rsi
callq 0x51a0
movl %eax, 0x30(%rbx)
movq %rbx, %rdi
callq 0x50a0
jmp 0x90b8
movq %rbx, %rdi
callq 0x5090
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/chriso[P]columnix/lib/row.c
// Function: cx_row_cursor_rewind
void cx_row_cursor_rewind(struct cx_row_cursor *cursor)
{
    cursor->row_mask = 0;
    cursor->position = 64;
    cx_row_group_cursor_rewind(cursor->cursor);
    cursor->error = false;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
andq $0x0, 0x20(%rdi)
movq $0x40, 0x28(%rdi)
movq 0x8(%rdi), %rdi
callq 0x58a0
movb $0x0, 0x35(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/chriso[P]columnix/lib/row.c
// Function: cx_row_cursor_next
bool cx_row_cursor_next(struct cx_row_cursor *cursor)
{
    if (cursor->position < 63) {
        uint64_t mask = cursor->row_mask >> (cursor->position + 1);
        if (mask) {
            cursor->position += __builtin_ctzll(mask) + 1;
            return true;
        }
    }
    cursor->row_mask = cx_row_cursor_load_row_mask(cursor);
    if (!cursor->row_mask)
        return false;
    cursor->position = __builtin_ctzll(cursor->row_mask);
    return true;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x28(%rdi), %rcx
cmpq $0x3e, %rcx
ja 0x911d
movq 0x20(%rbx), %rax
incq %rcx
shrq %cl, %rax
testq %rax, %rax
je 0x911d
bsfq %rax, %rax
addq %rax, %rcx
jmp 0x9132
movq %rbx, %rdi
callq 0x913e
movq %rax, 0x20(%rbx)
testq %rax, %rax
je 0x913a
bsfq %rax, %rcx
movq %rcx, 0x28(%rbx)
movb $0x1, %al
jmp 0x913c
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/chriso[P]columnix/lib/row.c
// Function: cx_row_cursor_load_row_mask
static uint64_t cx_row_cursor_load_row_mask(struct cx_row_cursor *cursor)
{
    uint64_t row_mask = 0;
    while (!row_mask && cx_row_group_cursor_next(cursor->cursor)) {
        size_t count;
        if (cursor->index_match == CX_INDEX_MATCH_ALL) {
            count = cx_row_group_cursor_batch_count(cursor->cursor);
            row_mask = (uint64_t)-1;
            if (count < 64)
                row_mask &= ((uint64_t)1 << count) - 1;
        } else if (!cx_index_match_rows(cursor->predicate, cursor->row_group,
                                        cursor->cursor, &row_mask, &count))
            goto error;
    }
    return row_mask;
error:
    cursor->error = true;
    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
leaq 0x8(%rsp), %rbx
andq $0x0, (%rbx)
movq %rdi, %r14
xorl %eax, %eax
pushq $-0x1
popq %r12
leaq 0x10(%rsp), %r15
testq %rax, %rax
jne 0x91d3
movq 0x8(%r14), %rdi
callq 0x5980
testb %al, %al
je 0x91c5
cmpl $0x1, 0x30(%r14)
jne 0x91a4
movq 0x8(%r14), %rdi
callq 0x5a60
orq $-0x1, 0x8(%rsp)
movq %rax, %rcx
movq %r12, %rax
cmpq $0x3f, %rcx
ja 0x9160
movq %r12, %rax
shlq %cl, %rax
notq %rax
movq %rax, 0x8(%rsp)
jmp 0x9160
movq 0x10(%r14), %rdi
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rcx
movq %r15, %r8
callq 0x56b0
testb %al, %al
je 0x91cc
movq 0x8(%rsp), %rax
jmp 0x9160
movq 0x8(%rsp), %rax
jmp 0x91d3
movb $0x1, 0x35(%r14)
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/chriso[P]columnix/lib/row.c
// Function: cx_row_cursor_count
size_t cx_row_cursor_count(struct cx_row_cursor *cursor)
{
    if (cursor->index_match == CX_INDEX_MATCH_NONE)
        return 0;
    else if (cursor->index_match == CX_INDEX_MATCH_ALL)
        return cx_row_group_row_count(cursor->row_group);
    cx_row_cursor_rewind(cursor);
    size_t count = 0;
    for (;;) {
        uint64_t row_mask = cx_row_cursor_load_row_mask(cursor);
        if (!row_mask)
            break;
        count += __builtin_popcountll(row_mask);
    }
    return count;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl 0x30(%rdi), %eax
cmpl $-0x1, %eax
je 0x9214
movq %rdi, %rbx
cmpl $0x1, %eax
jne 0x9229
movq (%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5460
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x50a0
xorl %r14d, %r14d
movabsq $0x5555555555555555, %r15 # imm = 0x5555555555555555
movabsq $0x3333333333333333, %r12 # imm = 0x3333333333333333
movabsq $0xf0f0f0f0f0f0f0f, %r13 # imm = 0xF0F0F0F0F0F0F0F
movabsq $0x101010101010101, %rbp # imm = 0x101010101010101
movq %rbx, %rdi
callq 0x913e
testq %rax, %rax
je 0x9217
movq %rax, %rcx
shrq %rcx
andq %r15, %rcx
subq %rcx, %rax
movq %rax, %rcx
andq %r12, %rcx
shrq $0x2, %rax
andq %r12, %rax
addq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
addq %rax, %rcx
andq %r13, %rcx
imulq %rbp, %rcx
shrq $0x38, %rcx
addq %rcx, %r14
jmp 0x925c
// File: /workspace/github_c_makefile_star2_O2/chriso[P]columnix/lib/row.c
// Function: cx_row_cursor_get_null
bool cx_row_cursor_get_null(const struct cx_row_cursor *cursor,
                            size_t column_index, bool *value)
{
    assert(cursor->row_mask);
    size_t count;
    const uint64_t *nulls =
        cx_row_group_cursor_batch_nulls(cursor->cursor, column_index, &count);
    uint64_t row_bit = (uint64_t)1 << cursor->position;
    if (!count || !nulls)
        return false;
    *value = *nulls & row_bit;
    return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
cmpq $0x0, 0x20(%rdi)
je 0x92f4
movq %rdx, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %rdi
leaq 0x8(%rsp), %r15
movq %r15, %rdx
callq 0x50f0
movq %rax, %rcx
cmpq $0x0, (%r15)
setne %dl
testq %rax, %rax
setne %al
andb %dl, %al
cmpb $0x1, %al
jne 0x92ea
movq (%rcx), %rcx
movl 0x28(%r14), %edx
btq %rdx, %rcx
setb (%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x2f13(%rip), %rdi      # 0xc20e
leaq 0x2f1d(%rip), %rsi      # 0xc21f
leaq 0x2f1c(%rip), %rcx      # 0xc225
pushq $0x71
popq %rdx
callq 0x5380
// File: /workspace/github_c_makefile_star2_O2/chriso[P]columnix/lib/row.c
// Function: cx_row_cursor_get_bit
bool cx_row_cursor_get_bit(const struct cx_row_cursor *cursor,
                           size_t column_index, bool *value)
{
    assert(cursor->row_mask);
    size_t count;
    const uint64_t *bitset =
        cx_row_group_cursor_batch_bit(cursor->cursor, column_index, &count);
    uint64_t row_bit = (uint64_t)1 << cursor->position;
    if (!count || !bitset)
        return false;
    *value = *bitset & row_bit;
    return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
cmpq $0x0, 0x20(%rdi)
je 0x9366
movq %rdx, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %rdi
leaq 0x8(%rsp), %r15
movq %r15, %rdx
callq 0x5540
movq %rax, %rcx
cmpq $0x0, (%r15)
setne %dl
testq %rax, %rax
setne %al
andb %dl, %al
cmpb $0x1, %al
jne 0x935c
movq (%rcx), %rcx
movl 0x28(%r14), %edx
btq %rdx, %rcx
setb (%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x2ea1(%rip), %rdi      # 0xc20e
leaq 0x2eab(%rip), %rsi      # 0xc21f
leaq 0x2ef6(%rip), %rcx      # 0xc271
pushq $0x7f
popq %rdx
callq 0x5380
// File: /workspace/github_c_makefile_star2_O2/chriso[P]columnix/lib/row.c
// Function: cx_row_cursor_get_i32
bool cx_row_cursor_get_i32(const struct cx_row_cursor *cursor,
                           size_t column_index, int32_t *value)
{
    assert(cursor->row_mask);
    size_t count;
    const int32_t *batch =
        cx_row_group_cursor_batch_i32(cursor->cursor, column_index, &count);
    if (!batch || !count)
        return false;
    *value = batch[cursor->position];
    return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
cmpq $0x0, 0x20(%rdi)
je 0x93d3
movq %rdx, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %rdi
leaq 0x8(%rsp), %r15
movq %r15, %rdx
callq 0x5850
testq %rax, %rax
setne %dl
cmpq $0x0, (%r15)
setne %cl
andb %dl, %cl
cmpb $0x1, %cl
jne 0x93c7
movq 0x28(%r14), %rdx
movl (%rax,%rdx,4), %eax
movl %eax, (%rbx)
movl %ecx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x2e34(%rip), %rdi      # 0xc20e
leaq 0x2e3e(%rip), %rsi      # 0xc21f
leaq 0x2ed4(%rip), %rcx      # 0xc2bc
movl $0x8d, %edx
callq 0x5380
// File: /workspace/github_c_makefile_star2_O2/chriso[P]columnix/lib/row.c
// Function: cx_row_cursor_get_i64
bool cx_row_cursor_get_i64(const struct cx_row_cursor *cursor,
                           size_t column_index, int64_t *value)
{
    assert(cursor->row_mask);
    size_t count;
    const int64_t *batch =
        cx_row_group_cursor_batch_i64(cursor->cursor, column_index, &count);
    if (!batch || !count)
        return false;
    *value = batch[cursor->position];
    return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
cmpq $0x0, 0x20(%rdi)
je 0x9444
movq %rdx, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %rdi
leaq 0x8(%rsp), %r15
movq %r15, %rdx
callq 0x5900
testq %rax, %rax
setne %dl
cmpq $0x0, (%r15)
setne %cl
andb %dl, %cl
cmpb $0x1, %cl
jne 0x9438
movq 0x28(%r14), %rdx
movq (%rax,%rdx,8), %rax
movq %rax, (%rbx)
movl %ecx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x2dc3(%rip), %rdi      # 0xc20e
leaq 0x2dcd(%rip), %rsi      # 0xc21f
leaq 0x2eb0(%rip), %rcx      # 0xc309
movl $0x9a, %edx
callq 0x5380
// File: /workspace/github_c_makefile_star2_O2/chriso[P]columnix/lib/row.c
// Function: cx_row_cursor_get_flt
bool cx_row_cursor_get_flt(const struct cx_row_cursor *cursor,
                           size_t column_index, float *value)
{
    assert(cursor->row_mask);
    size_t count;
    const float *batch =
        cx_row_group_cursor_batch_flt(cursor->cursor, column_index, &count);
    if (!batch || !count)
        return false;
    *value = batch[cursor->position];
    return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
cmpq $0x0, 0x20(%rdi)
je 0x94b7
movq %rdx, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %rdi
leaq 0x8(%rsp), %r15
movq %r15, %rdx
callq 0x5860
testq %rax, %rax
setne %dl
cmpq $0x0, (%r15)
setne %cl
andb %dl, %cl
cmpb $0x1, %cl
jne 0x94ab
movq 0x28(%r14), %rdx
movss (%rax,%rdx,4), %xmm0
movss %xmm0, (%rbx)
movl %ecx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x2d50(%rip), %rdi      # 0xc20e
leaq 0x2d5a(%rip), %rsi      # 0xc21f
leaq 0x2e8a(%rip), %rcx      # 0xc356
movl $0xa7, %edx
callq 0x5380
// File: /workspace/github_c_makefile_star2_O2/chriso[P]columnix/lib/row.c
// Function: cx_row_cursor_get_dbl
bool cx_row_cursor_get_dbl(const struct cx_row_cursor *cursor,
                           size_t column_index, double *value)
{
    assert(cursor->row_mask);
    size_t count;
    const double *batch =
        cx_row_group_cursor_batch_dbl(cursor->cursor, column_index, &count);
    if (!batch || !count)
        return false;
    *value = batch[cursor->position];
    return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
cmpq $0x0, 0x20(%rdi)
je 0x952a
movq %rdx, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %rdi
leaq 0x8(%rsp), %r15
movq %r15, %rdx
callq 0x5640
testq %rax, %rax
setne %dl
cmpq $0x0, (%r15)
setne %cl
andb %dl, %cl
cmpb $0x1, %cl
jne 0x951e
movq 0x28(%r14), %rdx
movsd (%rax,%rdx,8), %xmm0
movsd %xmm0, (%rbx)
movl %ecx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x2cdd(%rip), %rdi      # 0xc20e
leaq 0x2ce7(%rip), %rsi      # 0xc21f
leaq 0x2e62(%rip), %rcx      # 0xc3a1
movl $0xb4, %edx
callq 0x5380
// File: /workspace/github_c_makefile_star2_O2/chriso[P]columnix/lib/row.c
// Function: cx_row_cursor_get_str
bool cx_row_cursor_get_str(const struct cx_row_cursor *cursor,
                           size_t column_index, struct cx_string *value)
{
    assert(cursor->row_mask);
    size_t count;
    const struct cx_string *batch =
        cx_row_group_cursor_batch_str(cursor->cursor, column_index, &count);
    if (!batch || !count)
        return false;
    const struct cx_string *string = &batch[cursor->position];
    value->ptr = string->ptr;
    value->len = string->len;
    return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
cmpq $0x0, 0x20(%rdi)
je 0x95a8
movq %rdx, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %rdi
leaq 0x8(%rsp), %r15
movq %r15, %rdx
callq 0x5610
testq %rax, %rax
setne %dl
cmpq $0x0, (%r15)
setne %cl
andb %dl, %cl
cmpb $0x1, %cl
jne 0x959c
movq 0x28(%r14), %rdx
shlq $0x4, %rdx
movq (%rax,%rdx), %rsi
movq %rsi, (%rbx)
movq 0x8(%rax,%rdx), %rax
movq %rax, 0x8(%rbx)
movl %ecx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x2c5f(%rip), %rdi      # 0xc20e
leaq 0x2c69(%rip), %rsi      # 0xc21f
leaq 0x2e30(%rip), %rcx      # 0xc3ed
movl $0xc1, %edx
callq 0x5380
nop
// File: /workspace/github_c_makefile_star2_O2/chriso[P]columnix/lib/row_group.c
// Function: cx_row_group_new
struct cx_row_group *cx_row_group_new()
{
    struct cx_row_group *row_group = malloc(sizeof(*row_group));
    if (!row_group)
        return NULL;
    row_group->columns =
        malloc(cx_row_group_column_initial_size * sizeof(*row_group->columns));
    if (!row_group->columns)
        goto error;
    row_group->count = 0;
    row_group->size = cx_row_group_column_initial_size;
    return row_group;
error:
    free(row_group);
    return NULL;
}

// Assembly:
pushq %rbx
pushq $0x20
popq %rdi
callq 0x55d0
testq %rax, %rax
je 0x9602
movq %rax, %rbx
movl $0x480, %edi            # imm = 0x480
callq 0x55d0
movq %rax, (%rbx)
testq %rax, %rax
je 0x95fa
andq $0x0, 0x8(%rbx)
movq $0x8, 0x10(%rbx)
jmp 0x9604
movq %rbx, %rdi
callq 0x5090
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/chriso[P]columnix/lib/row_group.c
// Function: cx_row_group_free
void cx_row_group_free(struct cx_row_group *row_group)
{
    for (size_t i = 0; i < row_group->count; i++) {
        struct cx_row_group_column *row_group_column = &row_group->columns[i];
        if (row_group_column->lazy) {
            if (row_group_column->values.column)
                cx_column_free(row_group_column->values.column);
            if (row_group_column->nulls.column)
                cx_column_free(row_group_column->nulls.column);
        } else {
            cx_index_free(row_group_column->values.index);
            cx_index_free(row_group_column->nulls.index);
        }
    }
    free(row_group->columns);
    free(row_group);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x88, %r15d
xorl %r12d, %r12d
movq (%rbx), %r14
cmpq 0x8(%rbx), %r12
jae 0x966d
cmpb $0x1, (%r14,%r15)
jne 0x964d
movq -0x78(%r14,%r15), %rdi
testq %rdi, %rdi
je 0x963c
callq 0x5940
movq -0x38(%r14,%r15), %rdi
testq %rdi, %rdi
je 0x9661
callq 0x5940
jmp 0x9661
movq -0x80(%r14,%r15), %rdi
callq 0x5530
movq -0x40(%r14,%r15), %rdi
callq 0x5530
incq %r12
addq $0x90, %r15
jmp 0x961d
movq %r14, %rdi
callq 0x5090
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x5090
// File: /workspace/github_c_makefile_star2_O2/chriso[P]columnix/lib/row_group.c
// Function: cx_row_group_add_column
bool cx_row_group_add_column(struct cx_row_group *row_group,
                             struct cx_column *column, struct cx_column *nulls)
{
    if (!column)
        return false;
    size_t row_count = cx_column_count(column);
    if (row_count != cx_column_count(nulls) ||
        cx_column_type(nulls) != CX_COLUMN_BIT)
        return false;
    if (row_group->count && row_group->row_count != row_count)
        return false;
    struct cx_index *index = cx_index_new(column);
    struct cx_index *nulls_index = cx_index_new(nulls);
    if (!index || !nulls_index)
        goto error;
    if (!cx_row_group_ensure_column_size(row_group))
        goto error;
    struct cx_row_group_column *row_group_column =
        &row_group->columns[row_group->count++];
    row_group_column->type = cx_column_type(column);
    row_group_column->encoding = cx_column_encoding(column);
    row_group_column->values.column = column;
    row_group_column->values.index = index;
    row_group_column->lazy = false;
    row_group_column->nulls.column = nulls;
    row_group_column->nulls.index = nulls_index;
    row_group->row_count = row_count;
    return true;
error:
    if (index)
        cx_index_free(index);
    if (nulls_index)
        cx_index_free(nulls_index);
    return false;
}

// Assembly:
testq %rsi, %rsi
je 0x96d9
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x5400
movq %rax, %r12
movq %r14, %rdi
callq 0x5400
cmpq %rax, %r12
jne 0x96c8
movq %r14, %rdi
callq 0x54b0
testl %eax, %eax
je 0x96dc
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
retq
cmpq $0x0, 0x8(%rbx)
je 0x96e9
cmpq %r12, 0x18(%rbx)
jne 0x96c8
movq %r15, %rdi
callq 0x5330
movq %rax, %rbp
movq %r14, %rdi
callq 0x5330
movq %rax, %r13
testq %rbp, %rbp
setne %al
testq %r13, %r13
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x978a
movq %rbx, %rdi
callq 0x97ad
testb %al, %al
je 0x978f
movq %r13, 0x10(%rsp)
movq (%rbx), %r13
movq 0x8(%rbx), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rbx)
movq %rbp, 0x8(%rsp)
imulq $0x90, %rax, %rbp
movq %r15, %rdi
callq 0x54b0
movl %eax, (%r13,%rbp)
movq %r15, %rdi
callq 0x50e0
movl %eax, 0x4(%r13,%rbp)
movq %r15, 0x10(%r13,%rbp)
movq 0x8(%rsp), %rax
movq %rax, 0x8(%r13,%rbp)
movb $0x0, 0x88(%r13,%rbp)
movq %r14, 0x50(%r13,%rbp)
movq 0x10(%rsp), %rax
movq %rax, 0x48(%r13,%rbp)
movq %r12, 0x18(%rbx)
movb $0x1, %al
jmp 0x96ca
testq %rbp, %rbp
je 0x9797
movq %rbp, %rdi
callq 0x5530
testq %r13, %r13
je 0x96c8
movq %r13, %rdi
callq 0x5530
jmp 0x96c8
// File: /workspace/github_c_makefile_star2_O2/chriso[P]columnix/lib/row_group.c
// Function: cx_row_group_ensure_column_size
static bool cx_row_group_ensure_column_size(struct cx_row_group *row_group)
{
    if (row_group->count == row_group->size) {
        size_t new_size = row_group->size * 2;
        assert(new_size && new_size > row_group->size);
        struct cx_row_group_column *columns =
            realloc(row_group->columns, new_size * sizeof(*columns));
        if (!columns)
            return false;
        row_group->columns = columns;
        row_group->size = new_size;
    }
    return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq 0x8(%rdi), %rax
movb $0x1, %bl
cmpq 0x10(%rdi), %rax
jne 0x97ed
testq %rax, %rax
jle 0x97f5
movq %rax, %r15
addq %rax, %r15
je 0x97f5
movq %rdi, %r14
movq (%rdi), %rdi
imulq $0x120, %rax, %rsi      # imm = 0x120
callq 0x5710
testq %rax, %rax
je 0x97eb
movq %rax, (%r14)
movq %r15, 0x10(%r14)
jmp 0x97ed
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x2e61(%rip), %rdi      # 0xc65d
leaq 0x2c59(%rip), %rsi      # 0xc45c
leaq 0x2e7a(%rip), %rcx      # 0xc684
pushq $0x5b
popq %rdx
callq 0x5380
// File: /workspace/github_c_makefile_star2_O2/chriso[P]columnix/lib/row_group.c
// Function: cx_row_group_add_lazy_column
bool cx_row_group_add_lazy_column(struct cx_row_group *row_group,
                                  const struct cx_lazy_column *column,
                                  const struct cx_lazy_column *nulls)
{
    size_t row_count = column->index->count;
    if (row_count != nulls->index->count || nulls->type != CX_COLUMN_BIT)
        return false;
    if (row_group->count && row_group->row_count != row_count)
        return false;
    if (!cx_row_group_ensure_column_size(row_group))
        return false;
    struct cx_row_group_column *row_group_column =
        &row_group->columns[row_group->count++];
    row_group_column->type = column->type;
    row_group_column->encoding = column->encoding;
    row_group_column->values.index = (struct cx_index *)column->index;
    row_group_column->values.column = NULL;
    memcpy(&row_group_column->values.lazy_column, column, sizeof(*column));
    row_group_column->lazy = true;
    row_group_column->nulls.column = NULL;
    row_group_column->nulls.index = (struct cx_index *)nulls->index;
    memcpy(&row_group_column->nulls.lazy_column, nulls, sizeof(*nulls));
    row_group->row_count = row_count;
    return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq 0x10(%rsi), %rax
movq (%rax), %r12
movq 0x10(%rdx), %rax
cmpq (%rax), %r12
jne 0x9832
movq %rdx, %r14
cmpl $0x0, (%rdx)
je 0x9840
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rsi, %r15
movq %rdi, %rbx
cmpq $0x0, 0x8(%rdi)
je 0x9853
cmpq %r12, 0x18(%rbx)
jne 0x9832
movq %rbx, %rdi
callq 0x97ad
testb %al, %al
je 0x9832
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x8(%rbx)
imulq $0x90, %rcx, %rcx
movq (%r15), %rdx
movq %rdx, (%rax,%rcx)
movq 0x10(%r15), %rdx
movq %rdx, 0x8(%rax,%rcx)
andq $0x0, 0x10(%rax,%rcx)
movups (%r15), %xmm0
movups 0x10(%r15), %xmm1
movups 0x20(%r15), %xmm2
movups %xmm0, 0x18(%rax,%rcx)
movups %xmm1, 0x28(%rax,%rcx)
movups %xmm2, 0x38(%rax,%rcx)
movb $0x1, 0x88(%rax,%rcx)
andq $0x0, 0x50(%rax,%rcx)
movq 0x10(%r14), %rdx
movq %rdx, 0x48(%rax,%rcx)
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups 0x20(%r14), %xmm2
movups %xmm0, 0x58(%rax,%rcx)
movups %xmm1, 0x68(%rax,%rcx)
movups %xmm2, 0x78(%rax,%rcx)
movq %r12, 0x18(%rbx)
movb $0x1, %al
jmp 0x9834
// File: /workspace/github_c_makefile_star2_O2/chriso[P]columnix/lib/row_group.c
// Function: cx_row_group_column
const struct cx_column *cx_row_group_column(
    const struct cx_row_group *row_group, size_t index)
{
    assert(index < row_group->count);
    struct cx_row_group_column *row_group_column = &row_group->columns[index];
    if (row_group_column->lazy && !row_group_column->values.column)
        if (!cx_row_group_lazy_column_init(&row_group_column->values))
            return NULL;
    return row_group_column->values.column;
}

// Assembly:
pushq %rbx
cmpq %rsi, 0x8(%rdi)
jbe 0x9a18
movq (%rdi), %rax
imulq $0x90, %rsi, %rcx
leaq (%rax,%rcx), %rbx
cmpb $0x1, 0x88(%rax,%rcx)
jne 0x9a0e
cmpq $0x0, 0x10(%rbx)
jne 0x9a0e
leaq 0x8(%rbx), %rdi
callq 0x9a37
testb %al, %al
je 0x9a14
movq 0x10(%rbx), %rax
popq %rbx
retq
xorl %eax, %eax
jmp 0x9a12
leaq 0x2a24(%rip), %rdi      # 0xc443
leaq 0x2a36(%rip), %rsi      # 0xc45c
leaq 0x2b8f(%rip), %rcx      # 0xc5bc
movl $0xee, %edx
callq 0x5380
// File: /workspace/github_c_makefile_star2_O2/chriso[P]columnix/lib/row_group.c
// Function: cx_row_group_lazy_column_init
static bool cx_row_group_lazy_column_init(
    struct cx_row_group_physical_column *row_group_column)
{
    struct cx_lazy_column *lazy = &row_group_column->lazy_column;
    struct cx_column *column = NULL;
    if (lazy->compression && lazy->size) {
        void *dest;
        column = cx_column_new_compressed(lazy->type, lazy->encoding, &dest,
                                          lazy->decompressed_size,
                                          row_group_column->index->count);
        if (!column)
            goto error;
        if (!cx_decompress(lazy->compression, lazy->ptr, lazy->size, dest,
                           lazy->decompressed_size))
            goto error;
    } else {
        column =
            cx_column_new_mmapped(lazy->type, lazy->encoding, lazy->ptr,
                                  lazy->size, row_group_column->index->count);
        if (!column)
            goto error;
    }
    row_group_column->column = column;
    return true;
error:
    if (column)
        cx_column_free(column);
    return false;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, 0x18(%rdi)
movq 0x30(%rdi), %rcx
je 0x9a95
testq %rcx, %rcx
je 0x9a93
movl 0x10(%rbx), %edi
movl 0x14(%rbx), %esi
movq 0x38(%rbx), %rcx
movq (%rbx), %rax
movq (%rax), %r8
movq %rsp, %rdx
callq 0x5a90
testq %rax, %rax
je 0x9aba
movq %rax, %r14
movl 0x18(%rbx), %edi
movq 0x28(%rbx), %rsi
movq 0x30(%rbx), %rdx
movq (%rsp), %rcx
movq 0x38(%rbx), %r8
callq 0x5590
testb %al, %al
jne 0x9ab2
movq %r14, %rdi
callq 0x5940
jmp 0x9aba
xorl %ecx, %ecx
movl 0x10(%rbx), %edi
movl 0x14(%rbx), %esi
movq 0x28(%rbx), %rdx
movq (%rbx), %rax
movq (%rax), %r8
callq 0x56e0
movq %rax, %r14
testq %rax, %rax
je 0x9aba
movq %r14, 0x8(%rbx)
movb $0x1, %al
jmp 0x9abc
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/chriso[P]columnix/lib/row_group.c
// Function: cx_row_group_nulls
const struct cx_column *cx_row_group_nulls(const struct cx_row_group *row_group,
                                           size_t index)
{
    assert(index < row_group->count);
    struct cx_row_group_column *row_group_column = &row_group->columns[index];
    if (row_group_column->lazy && !row_group_column->nulls.column)
        if (!cx_row_group_lazy_column_init(&row_group_column->nulls))
            return NULL;
    return row_group_column->nulls.column;
}

// Assembly:
pushq %rbx
cmpq %rsi, 0x8(%rdi)
jbe 0x9b01
movq (%rdi), %rax
imulq $0x90, %rsi, %rcx
leaq (%rax,%rcx), %rbx
cmpb $0x1, 0x88(%rax,%rcx)
jne 0x9af7
cmpq $0x0, 0x50(%rbx)
jne 0x9af7
leaq 0x48(%rbx), %rdi
callq 0x9a37
testb %al, %al
je 0x9afd
movq 0x50(%rbx), %rax
popq %rbx
retq
xorl %eax, %eax
jmp 0x9afb
leaq 0x293b(%rip), %rdi      # 0xc443
leaq 0x294d(%rip), %rsi      # 0xc45c
leaq 0x2af7(%rip), %rcx      # 0xc60d
movl $0xf9, %edx
callq 0x5380
// File: /workspace/github_c_makefile_star2_O2/chriso[P]columnix/lib/row_group.c
// Function: cx_row_group_cursor_new
struct cx_row_group_cursor *cx_row_group_cursor_new(
    struct cx_row_group *row_group)
{
    size_t column_count = cx_row_group_column_count(row_group);
    size_t size = sizeof(struct cx_row_group_cursor) +
                  column_count * sizeof(struct cx_row_group_cursor_column);
    struct cx_row_group_cursor *cursor = calloc(1, size);
    if (!cursor)
        return NULL;
    cursor->row_group = row_group;
    cursor->column_count = column_count;
    cursor->row_count = cx_row_group_row_count(row_group);
    return cursor;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %r15
movq %r15, %rsi
shlq $0x6, %rsi
orq $0x28, %rsi
pushq $0x1
popq %rdi
callq 0x5480
movq %rax, %r14
testq %rax, %rax
je 0x9b5a
movq %rbx, (%r14)
movq %r15, 0x8(%r14)
movq %rbx, %rdi
callq 0x5460
movq %rax, 0x10(%r14)
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/chriso[P]columnix/lib/row_group.c
// Function: cx_row_group_cursor_rewind
void cx_row_group_cursor_rewind(struct cx_row_group_cursor *cursor)
{
    cursor->initialized = false;
    cursor->position = 0;
    for (size_t i = 0; i < cursor->column_count; i++) {
        cx_row_group_cursor_rewind_columns(&cursor->columns[i].values);
        cx_row_group_cursor_rewind_columns(&cursor->columns[i].nulls);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movb $0x0, 0x20(%rdi)
andq $0x0, 0x18(%rdi)
leaq 0x48(%rdi), %r14
xorl %r15d, %r15d
cmpq 0x8(%rbx), %r15
jae 0x9bad
leaq -0x20(%r14), %rdi
callq 0x9bb3
movq %r14, %rdi
callq 0x9bb3
incq %r15
addq $0x40, %r14
jmp 0x9b8d
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/chriso[P]columnix/lib/row_group.c
// Function: cx_row_group_cursor_next
bool cx_row_group_cursor_next(struct cx_row_group_cursor *cursor)
{
    if (!cursor->initialized)
        cursor->initialized = true;
    else
        cursor->position += CX_BATCH_SIZE;
    return cursor->position < cursor->row_count;
}

// Assembly:
cmpb $0x0, 0x20(%rdi)
je 0x9be0
movq 0x18(%rdi), %rax
addq $0x40, %rax
movq %rax, 0x18(%rdi)
jmp 0x9be8
movb $0x1, 0x20(%rdi)
movq 0x18(%rdi), %rax
cmpq 0x10(%rdi), %rax
setb %al
retq
// File: /workspace/github_c_makefile_star2_O2/chriso[P]columnix/lib/row_group.c
// Function: cx_row_group_cursor_batch_nulls
const uint64_t *cx_row_group_cursor_batch_nulls(
    struct cx_row_group_cursor *cursor, size_t column_index, size_t *count)
{
    if (!cx_row_group_cursor_lazy_nulls_init(cursor, column_index))
        return NULL;
    struct cx_row_group_cursor_column *column = &cursor->columns[column_index];
    if (column->nulls.position <= cursor->position) {
        size_t skipped = cx_column_cursor_skip_bit(
            column->nulls.cursor, cursor->position - column->nulls.position);
        column->nulls.position += skipped;
        column->nulls.batch = cx_column_cursor_next_batch_bit(
            column->nulls.cursor, &column->nulls.count);
        column->nulls.position += column->nulls.count;
    }
    *count = column->nulls.count;
    return column->nulls.batch;
}

// Assembly:
cmpq %rsi, 0x8(%rdi)
jbe 0x9c4f
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rdi, %r14
movq %rsi, %rax
shlq $0x6, %rax
leaq (%rdi,%rax), %r15
addq $0x48, %r15
movq (%r15), %rdi
testq %rdi, %rdi
je 0x9c78
movq 0x18(%r14), %rsi
subq 0x8(%r15), %rsi
jae 0x9c52
movq 0x10(%r15), %rax
movq 0x18(%r15), %rcx
jmp 0x9c73
xorl %eax, %eax
retq
callq 0x5370
addq %rax, 0x8(%r15)
movq (%r15), %rdi
leaq 0x18(%r15), %rsi
callq 0x5660
movq %rax, 0x10(%r15)
movq 0x18(%r15), %rcx
addq %rcx, 0x8(%r15)
movq %rcx, (%rbx)
jmp 0x9c9a
movq (%r14), %rdi
callq 0x5680
testq %rax, %rax
je 0x9c98
movq %rax, %rdi
callq 0x53e0
movq %rax, %rdi
movq %rax, (%r15)
testq %rax, %rax
jne 0x9c3b
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq