LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/openshmem-org[P]openshmem-examples/c++/version.cxx
// Function: main
int
main()
{
    struct utsname u;
    uname(&u);

    shmem_init();

    const int me = shmem_my_pe();
    const int npes = shmem_n_pes();

    int maj, min;
    shmem_info_get_version(&maj, &min);

    char verstring[SHMEM_MAX_NAME_LEN];
    shmem_info_get_name(verstring);

    std::cout << u.nodename
              << " \"" << verstring << "\" "
              << "version " << maj << "." << min
              << " on PE " << me << " of " << npes
              << "\n";

    shmem_finalize();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2a8, %rsp            # imm = 0x2A8
leaq 0x1a(%rsp), %rdi
callq 0x1030
callq 0x10e0
callq 0x10b0
movl %eax, %ebp
callq 0x1090
movl %eax, 0xc(%rsp)
leaq 0x14(%rsp), %r15
leaq 0x10(%rsp), %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0x1040
leaq 0x1a0(%rsp), %r13
movq %r13, %rdi
callq 0x1050
leaq 0x5b(%rsp), %rbx
movq %rbx, %rdi
callq 0x1070
movq 0x2d53(%rip), %r12      # 0x3fd8
movq %r12, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x10a0
leaq 0xd6a(%rip), %rsi       # 0x2004
movl $0x2, %edx
movq %r12, %rdi
callq 0x10a0
movq %r13, %rdi
callq 0x1070
movq %r12, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x10a0
leaq 0xd43(%rip), %rsi       # 0x2007
movl $0x2, %edx
movq %r12, %rdi
callq 0x10a0
leaq 0xd32(%rip), %rsi       # 0x200a
movl $0x8, %edx
movq %r12, %rdi
callq 0x10a0
movl (%r15), %esi
movq %r12, %rdi
callq 0x10d0
movq %rax, %rbx
leaq 0xd19(%rip), %rsi       # 0x2013
movl $0x1, %edx
movq %rax, %rdi
callq 0x10a0
movl (%r14), %esi
movq %rbx, %rdi
callq 0x10d0
movq %rax, %rbx
leaq 0xcf9(%rip), %rsi       # 0x2015
movl $0x7, %edx
movq %rax, %rdi
callq 0x10a0
movq %rbx, %rdi
movl %ebp, %esi
callq 0x10d0
movq %rax, %rbx
leaq 0xce0(%rip), %rsi       # 0x201d
movl $0x4, %edx
movq %rax, %rdi
callq 0x10a0
movq %rbx, %rdi
movl 0xc(%rsp), %esi
callq 0x10d0
leaq 0xcc5(%rip), %rsi       # 0x2022
movl $0x1, %edx
movq %rax, %rdi
callq 0x10a0
callq 0x1060
xorl %eax, %eax
addq $0x2a8, %rsp            # imm = 0x2A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/antonblanchard[P]will-it-scale/tests/pthread_mutex2.c
// Function: testcase
void testcase(unsigned long long *iterations, unsigned long nr)
{
	pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;

	while (1) {
		pthread_mutex_lock(&mutex);
		pthread_mutex_unlock(&mutex);

		(*iterations)++;
	}
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movq %rsp, %r14
movaps %xmm0, 0x10(%r14)
movaps %xmm0, (%r14)
movq $0x0, 0x20(%r14)
movq %r14, %rdi
callq 0x22b0
movq %r14, %rdi
callq 0x2190
incq (%rbx)
jmp 0x2bfd
// File: /workspace/github_c_makefile_star2_O1/ramirezsebas[P]TP-LISTINGS/./src/capitulo_3/3.7/sigchld.c
// Function: main
int main ()
{
	/* Handle SIGCHLD by calling clean_up_child_process. */
	struct sigaction sigchld_action;
	memset (&sigchld_action, 0, sizeof (sigchld_action));
	sigchld_action.sa_handler = &clean_up_child_process;
	sigaction (SIGCHLD, &sigchld_action, NULL);

	pid_t pidc;

	if((pidc = fork()) == 0) {
    		printf ("Child process: %d\n", (int)getpid());
    		pid_t pidcc;

		if ((pidcc = fork()) == 0) {
			printf("Child's child process: %d\n", (int)getpid());
		} else {
      			kill((int)getpid(),SIGCHLD);
		}
	}else {
   	 	printf ("Parent process: %d\n", (int)getpid());
      		kill((int)getpid(),SIGCHLD);
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x98, %rsp
leaq -0xa0(%rbp), %rbx
movl $0x98, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1050
leaq -0x4a(%rip), %rax       # 0x119c
movq %rax, (%rbx)
movl $0x11, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x1070
callq 0x1040
movl %eax, %ebx
callq 0x1090
testl %ebx, %ebx
je 0x121f
leaq 0xe23(%rip), %rdi       # 0x2032
movl %eax, %esi
xorl %eax, %eax
callq 0x1030
callq 0x1090
jmp 0x123f
leaq 0xdde(%rip), %rdi       # 0x2004
movl %eax, %esi
xorl %eax, %eax
callq 0x1030
callq 0x1040
movl %eax, %ebx
callq 0x1090
testl %ebx, %ebx
je 0x1257
movl %eax, %edi
movl $0x11, %esi
callq 0x1080
xorl %eax, %eax
addq $0x98, %rsp
popq %rbx
popq %rbp
retq
leaq 0xdb9(%rip), %rdi       # 0x2017
movl %eax, %esi
xorl %eax, %eax
callq 0x1030
jmp 0x124b
// File: /workspace/github_c_makefile_star2_O1/chriso[P]columnix/lib/column.c
// Function: cx_column_new_size
static struct cx_column *cx_column_new_size(enum cx_column_type type,
                                            enum cx_encoding_type encoding,
                                            size_t size, size_t count)
{
    struct cx_column *column = calloc(1, sizeof(*column));
    if (!column)
        return NULL;
    if (size) {
#ifdef CX_COLUMN_OVER_ALLOC
        size += CX_COLUMN_OVER_ALLOC;
#endif
        column->buffer.mutable = malloc(size);
        if (!column->buffer.mutable)
            goto error;
#ifdef CX_COLUMN_OVER_ALLOC
        memset(column->buffer.mutable, 0, size);
#endif
        column->size = size;
    }
    column->type = type;
    column->encoding = encoding;
    column->count = count;
    return column;
error:
    free(column);
    return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %r14
movq %rdx, %r12
movl %esi, %ebp
movl %edi, %r15d
movl $0x1, %edi
movl $0x30, %esi
callq 0x5450
testq %rax, %rax
je 0x5b5d
movq %rax, %rbx
testq %r12, %r12
je 0x5b48
movq %r12, %rdi
callq 0x5590
movq %rax, (%rbx)
testq %rax, %rax
je 0x5b55
movq %r12, 0x18(%rbx)
movl %r15d, 0x20(%rbx)
movl %ebp, 0x24(%rbx)
movq %r14, 0x8(%rbx)
jmp 0x5b5f
movq %rbx, %rdi
callq 0x5080
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/chriso[P]columnix/lib/column.c
// Function: cx_column_new_mmapped
struct cx_column *cx_column_new_mmapped(enum cx_column_type type,
                                        enum cx_encoding_type encoding,
                                        const void *ptr, size_t size,
                                        size_t count)
{
    struct cx_column *column = cx_column_new_size(type, encoding, 0, count);
    if (!column)
        return NULL;
    column->offset = size;
    column->size = size;
    column->mmapped = true;
    column->buffer.mmapped = ptr;
    return column;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %r8, %r15
movq %rcx, %r14
movq %rdx, %rbx
movl %esi, %ebp
movl %edi, %r12d
movl $0x1, %edi
movl $0x30, %esi
callq 0x5450
testq %rax, %rax
je 0x5ba2
movl %r12d, 0x20(%rax)
movl %ebp, 0x24(%rax)
movq %r15, 0x8(%rax)
jmp 0x5ba4
xorl %eax, %eax
testq %rax, %rax
je 0x5bba
movq %r14, 0x10(%rax)
movq %r14, 0x18(%rax)
movb $0x1, 0x28(%rax)
movq %rbx, (%rax)
jmp 0x5bbc
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/chriso[P]columnix/lib/column.c
// Function: cx_column_new_compressed
struct cx_column *cx_column_new_compressed(enum cx_column_type type,
                                           enum cx_encoding_type encoding,
                                           void **ptr, size_t size,
                                           size_t count)
{
    if (!size)
        return NULL;
    struct cx_column *column = cx_column_new_size(type, encoding, size, count);
    if (!column)
        return NULL;
    column->offset = size;
    *ptr = column->buffer.mutable;
    return column;
}

// Assembly:
testq %rcx, %rcx
je 0x5bf0
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %rbx
movq %rcx, %rdx
movq %r8, %rcx
callq 0x5b05
testq %rax, %rax
je 0x5bf3
movq %r14, 0x10(%rax)
movq (%rax), %rcx
movq %rcx, (%rbx)
jmp 0x5bf5
xorl %eax, %eax
retq
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/chriso[P]columnix/lib/column.c
// Function: cx_column_put_bit
bool cx_column_put_bit(struct cx_column *column, bool value)
{
    if (column->count % 64 == 0) {
        uint64_t bitset = value != 0;
        return cx_column_put(column, CX_COLUMN_BIT, &bitset, sizeof(uint64_t));
    } else if (column->type != CX_COLUMN_BIT || column->mmapped)
        return false;
    if (value) {
        uint64_t *bitset = (uint64_t *)cx_column_offset(
            column, column->offset - sizeof(uint64_t));
        *bitset |= (uint64_t)1 << column->count;
    }
    column->count++;
    return true;
}

// Assembly:
movq 0x8(%rdi), %rcx
testb $0x3f, %cl
je 0x5c48
cmpl $0x0, 0x20(%rdi)
jne 0x5c45
cmpb $0x0, 0x28(%rdi)
je 0x5c64
xorl %eax, %eax
retq
pushq %rax
movzbl %sil, %eax
movq %rsp, %rdx
movq %rax, (%rdx)
movl $0x8, %ecx
xorl %esi, %esi
callq 0x5c84
addq $0x8, %rsp
retq
testb %sil, %sil
je 0x5c7d
movq (%rdi), %rax
movl $0x1, %edx
shlq %cl, %rdx
movq 0x10(%rdi), %rcx
orq %rdx, -0x8(%rcx,%rax)
incq 0x8(%rdi)
movb $0x1, %al
retq
// File: /workspace/github_c_makefile_star2_O1/chriso[P]columnix/lib/column.c
// Function: cx_column_put
static bool cx_column_put(struct cx_column *column, enum cx_column_type type,
                          const void *value, size_t size)
{
    if (column->mmapped || column->type != type || !value)
        return false;
    if (column->offset + size > column->size)
        if (!cx_column_resize(column, size))
            return false;
    void *slot = (void *)cx_column_tail(column);
    memcpy(slot, value, size);
    column->count++;
    column->offset += size;
    return true;
}

// Assembly:
cmpb $0x0, 0x28(%rdi)
je 0x5c8d
xorl %eax, %eax
retq
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
xorl %eax, %eax
testq %rdx, %rdx
je 0x5ce3
movq %rdi, %r14
cmpl %esi, 0x20(%rdi)
jne 0x5ce3
movq %rcx, %rbx
movq 0x10(%r14), %rax
addq %rcx, %rax
cmpq 0x18(%r14), %rax
jbe 0x5cc3
movq %r14, %rdi
movq %rbx, %rsi
callq 0x620e
testb %al, %al
je 0x5ce1
movq 0x10(%r14), %rdi
addq (%r14), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x54e0
incq 0x8(%r14)
addq %rbx, 0x10(%r14)
movb $0x1, %al
jmp 0x5ce3
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/chriso[P]columnix/lib/column.c
// Function: cx_column_put_unit
bool cx_column_put_unit(struct cx_column *column)
{
    switch (column->type) {
        case CX_COLUMN_BIT:
            return cx_column_put_bit(column, false);
        case CX_COLUMN_I32:
            return cx_column_put_i32(column, 0);
        case CX_COLUMN_I64:
            return cx_column_put_i64(column, 0);
        case CX_COLUMN_FLT:
            return cx_column_put_flt(column, 0.0);
        case CX_COLUMN_DBL:
            return cx_column_put_dbl(column, 0.0);
        case CX_COLUMN_STR:
            return cx_column_put_str(column, "");
    }
    return false;
}

// Assembly:
pushq %rax
movl 0x20(%rdi), %eax
cmpq $0x5, %rax
ja 0x5e13
leaq 0x6270(%rip), %rcx      # 0xc000
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
xorl %esi, %esi
popq %rax
jmp 0x54a0
movq %rsp, %rdx
movq $0x0, (%rdx)
movl $0x8, %ecx
movl $0x4, %esi
jmp 0x5df5
movq %rsp, %rdx
movq $0x0, (%rdx)
movl $0x8, %ecx
movl $0x2, %esi
jmp 0x5df5
movq %rsp, %rdx
movl $0x0, (%rdx)
movl $0x4, %ecx
movl $0x3, %esi
jmp 0x5df5
movq %rsp, %rdx
movl $0x0, (%rdx)
movl $0x4, %ecx
movl $0x1, %esi
callq 0x5c84
popq %rcx
retq
leaq 0x75c9(%rip), %rdx      # 0xd3cc
movl $0x1, %ecx
movl $0x5, %esi
popq %rax
jmp 0x5c84
xorl %eax, %eax
jmp 0x5dfa
// File: /workspace/github_c_makefile_star2_O1/chriso[P]columnix/lib/column.c
// Function: cx_column_cursor_new
struct cx_column_cursor *cx_column_cursor_new(const struct cx_column *column)
{
    struct cx_column_cursor *cursor = malloc(sizeof(*cursor));
    if (!cursor)
        return NULL;
    cursor->column = column;
    cursor->start = cx_column_head(column);
    cursor->end = cx_column_tail(column);
    if (!cx_column_madvise(column, MADV_SEQUENTIAL))
        goto error;
    cx_column_cursor_rewind(cursor);
    return cursor;
error:
    free(cursor);
    return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r15
movl $0x420, %edi            # imm = 0x420
callq 0x5590
testq %rax, %rax
je 0x5e88
movq %rax, %rbx
movq %r15, (%rax)
movq (%r15), %r14
movq %r14, 0x8(%rax)
movq 0x10(%r15), %rax
addq %r14, %rax
movq %rax, 0x10(%rbx)
cmpb $0x1, 0x28(%r15)
jne 0x5e8c
movq 0x18(%r15), %r15
testq %r15, %r15
je 0x5e8c
callq 0x5890
movslq %eax, %rcx
movq %r14, %rax
xorl %edx, %edx
divq %rcx
movq %r14, %rdi
subq %rdx, %rdi
addq %rdx, %r15
movq %r15, %rsi
movl $0x2, %edx
callq 0x5770
testl %eax, %eax
je 0x5e8c
movq %rbx, %rdi
callq 0x5080
xorl %ebx, %ebx
jmp 0x5e90
movq %r14, 0x18(%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/chriso[P]columnix/lib/column.c
// Function: cx_column_cursor_skip_bit
size_t cx_column_cursor_skip_bit(struct cx_column_cursor *cursor, size_t count)
{
    assert(count % 64 == 0);
    size_t skipped = cx_column_cursor_skip(cursor, CX_COLUMN_BIT,
                                           sizeof(uint64_t), count / 64);
    skipped *= 64;
    if (!cx_column_cursor_valid(cursor)) {
        size_t trailing_bits = cursor->column->count % 64;
        if (trailing_bits)
            skipped -= 64 - trailing_bits;
    }
    return skipped;
}

// Assembly:
pushq %rbx
movq %rsi, %rcx
testb $0x3f, %cl
jne 0x5ef9
movq %rdi, %rbx
shrq $0x6, %rcx
movl $0x8, %edx
xorl %esi, %esi
callq 0x5f18
shlq $0x6, %rax
movq 0x18(%rbx), %rcx
cmpq 0x10(%rbx), %rcx
jb 0x5ef7
movq (%rbx), %rcx
movq 0x8(%rcx), %rcx
movl %ecx, %edx
andl $0x3f, %edx
orq $-0x40, %rcx
testq %rdx, %rdx
cmoveq %rdx, %rcx
addq %rcx, %rax
popq %rbx
retq
leaq 0x6118(%rip), %rdi      # 0xc018
leaq 0x6121(%rip), %rsi      # 0xc028
leaq 0x6123(%rip), %rcx      # 0xc031
movl $0x13b, %edx            # imm = 0x13B
callq 0x5350
// File: /workspace/github_c_makefile_star2_O1/chriso[P]columnix/lib/column.c
// Function: cx_column_cursor_skip
static size_t cx_column_cursor_skip(struct cx_column_cursor *cursor,
                                    enum cx_column_type type, size_t size,
                                    size_t count)
{
    assert(cursor->column->type == type);
    size_t remaining =
        ((uintptr_t)cursor->end - (uintptr_t)cursor->position) / size;
    if (remaining < count)
        count = remaining;
    cx_column_cursor_advance(cursor, size * count);
    return count;
}

// Assembly:
pushq %rax
movq (%rdi), %rax
cmpl %esi, 0x20(%rax)
jne 0x5f53
movq %rdx, %r8
movq 0x10(%rdi), %rsi
movq 0x18(%rdi), %r9
movq %rsi, %rax
subq %r9, %rax
xorl %edx, %edx
divq %r8
cmpq %rcx, %rax
cmovbq %rax, %rcx
imulq %rcx, %r8
addq %r9, %r8
movq %r8, 0x18(%rdi)
cmpq %r8, %rsi
jb 0x5f72
movq %rcx, %rax
popq %rcx
retq
leaq 0x6225(%rip), %rdi      # 0xc17f
leaq 0x60c7(%rip), %rsi      # 0xc028
leaq 0x6234(%rip), %rcx      # 0xc19c
movl $0x130, %edx            # imm = 0x130
callq 0x5350
leaq 0x6280(%rip), %rdi      # 0xc1f9
leaq 0x60a8(%rip), %rsi      # 0xc028
leaq 0x6292(%rip), %rcx      # 0xc219
movl $0x129, %edx            # imm = 0x129
callq 0x5350
// File: /workspace/github_c_makefile_star2_O1/chriso[P]columnix/lib/column.c
// Function: cx_column_cursor_skip_str
size_t cx_column_cursor_skip_str(struct cx_column_cursor *cursor, size_t count)
{
    assert(cursor->column->type == CX_COLUMN_STR);
    size_t skipped = 0;
    // TODO: vectorise this
    for (; skipped < count && cx_column_cursor_valid(cursor); skipped++)
        cx_column_cursor_advance(cursor, cx_strlen(cursor->position) + 1);
    return skipped;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq (%rdi), %rax
cmpl $0x5, 0x20(%rax)
jne 0x6059
movq %rsi, %rbx
testq %rsi, %rsi
je 0x602a
movq %rdi, %r14
movq 0x10(%rdi), %r13
movq 0x18(%rdi), %r12
xorl %r15d, %r15d
cmpq %r13, %r12
jae 0x602d
movq %r12, %rdi
callq 0x5250
addq %rax, %r12
incq %r12
movq %r12, 0x18(%r14)
cmpq %r12, %r13
jb 0x603a
incq %r15
cmpq %r15, %rbx
jne 0x6001
movq %rbx, %r15
jmp 0x602d
xorl %r15d, %r15d
movq %r15, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x61b8(%rip), %rdi      # 0xc1f9
leaq 0x5fe0(%rip), %rsi      # 0xc028
leaq 0x61ca(%rip), %rcx      # 0xc219
movl $0x129, %edx            # imm = 0x129
callq 0x5350
leaq 0x6015(%rip), %rdi      # 0xc075
leaq 0x5fc1(%rip), %rsi      # 0xc028
leaq 0x602d(%rip), %rcx      # 0xc09b
movl $0x171, %edx            # imm = 0x171
callq 0x5350
// File: /workspace/github_c_makefile_star2_O1/chriso[P]columnix/lib/column.c
// Function: cx_column_cursor_next_batch_str
const struct cx_string *cx_column_cursor_next_batch_str(
    struct cx_column_cursor *cursor, size_t *available)
{
    assert(cursor->column->type == CX_COLUMN_STR);
    size_t i = 0;
    struct cx_string *strings = (struct cx_string *)cursor->buffer;
    for (; i < CX_BATCH_SIZE && cx_column_cursor_valid(cursor); i++) {
        strings[i].ptr = cursor->position;
        strings[i].len = cx_strlen(cursor->position);
        cx_column_cursor_advance(cursor, strings[i].len + 1);
    }
    *available = i;
    return strings;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, (%rsp)
movq (%rdi), %rax
cmpl $0x5, 0x20(%rax)
jne 0x61ef
movq %rdi, %r15
leaq 0x20(%rdi), %r14
movq 0x10(%rdi), %rbp
movq 0x18(%rdi), %r12
leaq 0x28(%rdi), %rbx
xorl %r13d, %r13d
cmpq %rbp, %r12
jae 0x61b7
movq %r12, -0x8(%rbx)
movq %r12, %rdi
callq 0x5250
movq %rax, (%rbx)
addq %rax, %r12
incq %r12
movq %r12, 0x18(%r15)
cmpq %r12, %rbp
jb 0x61d0
incq %r13
addq $0x10, %rbx
cmpq $0x40, %r13
jne 0x6181
movl $0x40, %r13d
movq (%rsp), %rax
movq %r13, (%rax)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x6022(%rip), %rdi      # 0xc1f9
leaq 0x5e4a(%rip), %rsi      # 0xc028
leaq 0x6034(%rip), %rcx      # 0xc219
movl $0x129, %edx            # imm = 0x129
callq 0x5350
leaq 0x5e7f(%rip), %rdi      # 0xc075
leaq 0x5e2b(%rip), %rsi      # 0xc028
leaq 0x5edb(%rip), %rcx      # 0xc0df
movl $0x1a4, %edx            # imm = 0x1A4
callq 0x5350
// File: /workspace/github_c_makefile_star2_O1/chriso[P]columnix/lib/column.c
// Function: cx_column_resize
__attribute__((noinline)) static bool cx_column_resize(struct cx_column *column,
                                                       size_t alloc_size)
{
    size_t size = column->size;
    size_t required_size = column->offset + alloc_size;
#ifdef CX_COLUMN_OVER_ALLOC
    required_size += CX_COLUMN_OVER_ALLOC;
#endif
    while (size < required_size) {
        assert(size * 2 > size);
        size *= 2;
    }
    void *buffer = realloc(column->buffer.mutable, size);
    if (!buffer)
        return false;
#ifdef CX_COLUMN_OVER_ALLOC
    memset((void *)((uintptr_t)buffer + column->offset), 0,
           size - column->offset);
#endif
    column->buffer.mutable = buffer;
    column->size = size;
    return true;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %r14
addq 0x10(%rdi), %rsi
cmpq %rsi, %r14
jae 0x622c
testq %r14, %r14
jle 0x6251
addq %r14, %r14
jmp 0x621d
movq (%rbx), %rdi
movq %r14, %rsi
callq 0x56d0
testq %rax, %rax
je 0x6243
movq %rax, (%rbx)
movq %r14, 0x18(%rbx)
testq %rax, %rax
setne %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x5ee4(%rip), %rdi      # 0xc13c
leaq 0x5dc9(%rip), %rsi      # 0xc028
leaq 0x5ee6(%rip), %rcx      # 0xc14c
movl $0xa1, %edx
callq 0x5350
// File: /workspace/github_c_makefile_star2_O1/chriso[P]columnix/lib/compress.c
// Function: cx_compress
void *cx_compress(enum cx_compression_type type, int level, const void *src,
                  size_t src_size, size_t *dest_size)
{
    if (type == CX_COMPRESSION_LZ4)
        return cx_compress_lz4(level, src, src_size, dest_size);
    else if (type == CX_COMPRESSION_LZ4HC)
        return cx_compress_lz4hc(level, src, src_size, dest_size);
    else if (type == CX_COMPRESSION_ZSTD)
        return cx_compress_zstd(level, src, src_size, dest_size);
    else
        return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r15
movq %rdx, %r12
movl %esi, %ebp
cmpl $0x3, %edi
je 0x6332
cmpl $0x2, %edi
je 0x62e7
cmpl $0x1, %edi
jne 0x637c
cmpq $0x7fffffff, %r15       # imm = 0x7FFFFFFF
ja 0x637c
movl %r15d, %edi
callq 0x5170
testl %eax, %eax
je 0x637c
movl %eax, %r13d
movslq %eax, %rdi
callq 0x5590
testq %rax, %rax
je 0x637c
movq %rax, %r14
movq %r12, %rdi
movq %rax, %rsi
movl %r15d, %edx
movl %r13d, %ecx
movl %ebp, %r8d
callq 0x5730
jmp 0x6327
cmpq $0x7fffffff, %r15       # imm = 0x7FFFFFFF
ja 0x637c
movl %r15d, %edi
callq 0x5170
testl %eax, %eax
je 0x637c
movl %eax, %r13d
movslq %eax, %rdi
callq 0x5590
testq %rax, %rax
je 0x637c
movq %rax, %r14
movq %r12, %rdi
movq %rax, %rsi
movl %r15d, %edx
movl %r13d, %ecx
movl %ebp, %r8d
callq 0x5050
testl %eax, %eax
je 0x6374
cltq
movq %rax, (%rbx)
jmp 0x637f
movq %r15, %rdi
callq 0x57b0
testl %eax, %eax
je 0x637c
movslq %eax, %r13
movq %r13, %rdi
callq 0x5590
testq %rax, %rax
je 0x637c
movq %rax, %r14
movq %rax, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %r15, %rcx
movl %ebp, %r8d
callq 0x5200
movq %rax, %r15
movq %rax, %rdi
callq 0x5150
testl %eax, %eax
je 0x6391
movq %r14, %rdi
callq 0x5080
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r15, (%rbx)
jmp 0x637f
// File: /workspace/github_c_makefile_star2_O1/chriso[P]columnix/lib/compress.c
// Function: cx_decompress
bool cx_decompress(enum cx_compression_type type, const void *src,
                   size_t src_size, void *dest, size_t dest_size)
{
    if (type == CX_COMPRESSION_LZ4 || type == CX_COMPRESSION_LZ4HC)
        return cx_decompress_lz4(src, src_size, dest, dest_size);
    else if (type == CX_COMPRESSION_ZSTD)
        return cx_decompress_zstd(src, src_size, dest, dest_size);
    else
        return false;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rdx, %rax
movq %rsi, %rdx
leal -0x1(%rdi), %esi
cmpl $0x1, %esi
ja 0x63c6
movq %rdx, %rdi
movq %rcx, %rsi
movl %eax, %edx
movl %ebx, %ecx
callq 0x5680
testl %eax, %eax
setne %cl
cltq
cmpq %rbx, %rax
jmp 0x63ec
cmpl $0x3, %edi
jne 0x63f3
movq %rcx, %rdi
movq %rbx, %rsi
movq %rax, %rcx
callq 0x51e0
movq %rax, %r14
movq %rax, %rdi
callq 0x5150
testl %eax, %eax
sete %cl
cmpq %rbx, %r14
sete %al
andb %cl, %al
jmp 0x63f5
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/chriso[P]columnix/lib/index.c
// Function: cx_index_match_bit_eq
enum cx_index_match cx_index_match_bit_eq(const struct cx_index *index,
                                          bool value)
{
    if (index->min.bit && index->max.bit)
        return value ? CX_INDEX_MATCH_ALL : CX_INDEX_MATCH_NONE;
    if (!index->min.bit && !index->max.bit)
        return value ? CX_INDEX_MATCH_NONE : CX_INDEX_MATCH_ALL;
    return CX_INDEX_MATCH_UNKNOWN;
}

// Assembly:
movb 0x8(%rdi), %cl
cmpb $0x1, %cl
jne 0x683c
cmpb $0x1, 0x10(%rdi)
jne 0x6836
movzbl %sil, %eax
decl %eax
orl $0x1, %eax
retq
xorl %eax, %eax
testb %cl, %cl
jne 0x684e
movzbl %sil, %ecx
negl %ecx
orl $0x1, %ecx
xorl %eax, %eax
cmpb $0x0, 0x10(%rdi)
cmovel %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/chriso[P]columnix/lib/predicate.c
// Function: cx_predicate_free
void cx_predicate_free(struct cx_predicate *predicate)
{
    if (predicate->operands) {
        for (size_t i = 0; i < predicate->operand_count; i++)
            if (predicate->operands[i])
                cx_predicate_free(predicate->operands[i]);
        free(predicate->operands);
    }
    if (predicate->string)
        free(predicate->string);
    free(predicate);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x0, 0x28(%rdi)
je 0x7394
cmpq $0x0, 0x20(%rbx)
je 0x738b
xorl %r14d, %r14d
movq 0x28(%rbx), %rax
movq (%rax,%r14,8), %rdi
testq %rdi, %rdi
je 0x7382
callq 0x53e0
incq %r14
cmpq 0x20(%rbx), %r14
jb 0x7370
movq 0x28(%rbx), %rdi
callq 0x5080
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x73a2
callq 0x5080
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x5080
// File: /workspace/github_c_makefile_star2_O1/chriso[P]columnix/lib/predicate.c
// Function: cx_predicate_new_null
struct cx_predicate *cx_predicate_new_null(size_t column)
{
    struct cx_predicate *predicate = cx_predicate_new();
    if (!predicate)
        return NULL;
    predicate->type = CX_PREDICATE_NULL;
    predicate->column = column;
    return predicate;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x1, %edi
movl $0x60, %esi
callq 0x5450
testq %rax, %rax
je 0x73f6
movl $0x1, (%rax)
movq %rbx, 0x8(%rax)
jmp 0x73f8
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/chriso[P]columnix/lib/predicate.c
// Function: cx_predicate_new_bit_eq
struct cx_predicate *cx_predicate_new_bit_eq(size_t column, bool value)
{
    struct cx_predicate *predicate = cx_predicate_new();
    if (!predicate)
        return NULL;
    predicate->column = column;
    predicate->type = CX_PREDICATE_EQ;
    predicate->column_type = CX_COLUMN_BIT;
    predicate->value.bit = value;
    return predicate;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movl $0x1, %edi
movl $0x60, %esi
callq 0x5450
testq %rax, %rax
je 0x7427
movq %r14, 0x8(%rax)
movq $0x2, (%rax)
movb %bl, 0x10(%rax)
jmp 0x7429
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/chriso[P]columnix/lib/predicate.c
// Function: cx_predicate_new_str
static struct cx_predicate *cx_predicate_new_str(size_t column,
                                                 const char *value,
                                                 enum cx_predicate_type type,
                                                 bool case_sensitive)
{
    struct cx_predicate *predicate = cx_predicate_new();
    if (!predicate)
        return NULL;
    predicate->column = column;
    predicate->type = type;
    predicate->column_type = CX_COLUMN_STR;
    size_t length = strlen(value);
#if CX_SSE42
    predicate->string = calloc(1, length + 1 + 16);
#else
    predicate->string = malloc(length + 1);
#endif
    if (!predicate->string)
        goto error;
    memcpy(predicate->string, value, length + 1);
    predicate->value.str.ptr = predicate->string;
    predicate->value.str.len = length;
    predicate->case_sensitive = case_sensitive;
    return predicate;
error:
    free(predicate);
    return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebp
movl %edx, %r15d
movq %rsi, %r14
movq %rdi, %r12
movl $0x1, %edi
movl $0x60, %esi
callq 0x5450
testq %rax, %rax
je 0x77e0
movq %rax, %rbx
movq %r12, 0x8(%rax)
movl %r15d, (%rax)
movl $0x5, 0x4(%rax)
movq %r14, %rdi
callq 0x5250
movq %rax, %r15
leaq 0x1(%rax), %r12
movq %r12, %rdi
callq 0x5590
movq %rax, 0x30(%rbx)
testq %rax, %rax
je 0x77d8
movq %rax, %r13
movq %rax, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x54e0
movq %r13, 0x10(%rbx)
movq %r15, 0x18(%rbx)
movb %bpl, 0x3c(%rbx)
jmp 0x77e2
movq %rbx, %rdi
callq 0x5080
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/chriso[P]columnix/lib/predicate.c
// Function: cx_predicate_new_custom
struct cx_predicate *cx_predicate_new_custom(size_t column,
                                             enum cx_column_type type,
                                             cx_index_match_rows_t match_rows,
                                             cx_index_match_index_t match_index,
                                             int cost, void *data)
{
    struct cx_predicate *predicate = cx_predicate_new();
    if (!predicate)
        return NULL;
    predicate->column = column;
    predicate->type = CX_PREDICATE_CUSTOM;
    predicate->column_type = type;
    predicate->custom.match_rows = match_rows;
    predicate->custom.match_index = match_index;
    predicate->custom.data = data;
    predicate->custom.cost = cost;
    return predicate;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r14
movl %r8d, %ebx
movq %rcx, %r15
movq %rdx, %r12
movl %esi, %ebp
movq %rdi, %r13
movl $0x1, %edi
movl $0x60, %esi
callq 0x5450
testq %rax, %rax
je 0x7877
movq %r13, 0x8(%rax)
movl $0x8, (%rax)
movl %ebp, 0x4(%rax)
movq %r12, 0x40(%rax)
movq %r15, 0x48(%rax)
movq %r14, 0x58(%rax)
movl %ebx, 0x50(%rax)
jmp 0x7879
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/chriso[P]columnix/lib/predicate.c
// Function: cx_predicate_new_operator
static struct cx_predicate *cx_predicate_new_operator(
    enum cx_predicate_type type, size_t count, va_list operands)
{
    if (!count)
        return NULL;
    struct cx_predicate *predicate = cx_predicate_new();
    if (!predicate)
        return NULL;
    predicate->operand_count = count;
    predicate->type = type;
    predicate->operands = calloc(count, sizeof(struct cx_predicate *));
    if (!predicate->operands)
        goto error;
    for (size_t i = 0; i < count; i++) {
        predicate->operands[i] = va_arg(operands, struct cx_predicate *);
        if (!predicate->operands[i])
            goto error;
    }
    return predicate;
error:
    cx_predicate_free(predicate);
    return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x79dc
movq %rdx, %r14
movq %rsi, %r15
movl %edi, %ebp
movl $0x1, %edi
movl $0x60, %esi
callq 0x5450
testq %rax, %rax
je 0x79dc
movq %rax, %rbx
movq %r15, 0x20(%rax)
movl %ebp, (%rax)
movl $0x8, %esi
movq %r15, %rdi
callq 0x5450
movq %rax, 0x28(%rbx)
testq %rax, %rax
je 0x79d4
movl (%r14), %ecx
movq %r15, %rdx
negq %rdx
movb $0x1, %dil
movl $0x1, %esi
cmpl $0x28, %ecx
ja 0x799c
movl %ecx, %r8d
addq 0x10(%r14), %r8
addl $0x8, %ecx
movl %ecx, (%r14)
jmp 0x79a8
movq 0x8(%r14), %r8
leaq 0x8(%r8), %r9
movq %r9, 0x8(%r14)
movq (%r8), %r8
movq %r8, -0x8(%rax,%rsi,8)
testq %r8, %r8
je 0x79ce
cmpq %r15, %rsi
setb %dil
leaq (%rdx,%rsi), %r8
incq %r8
incq %rsi
cmpq $0x1, %r8
jne 0x7988
jmp 0x79de
testb $0x1, %dil
je 0x79de
movq %rbx, %rdi
callq 0x53e0
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/chriso[P]columnix/lib/predicate.c
// Function: cx_predicate_new_operator_array
static struct cx_predicate *cx_predicate_new_operator_array(
    enum cx_predicate_type type, size_t count, struct cx_predicate **operands)
{
    if (!count)
        return NULL;
    struct cx_predicate *predicate = cx_predicate_new();
    if (!predicate)
        return NULL;
    predicate->operand_count = count;
    predicate->type = type;
    predicate->operands = calloc(count, sizeof(struct cx_predicate *));
    if (!predicate->operands)
        goto error;
    for (size_t i = 0; i < count; i++) {
        predicate->operands[i] = operands[i];
        if (!predicate->operands[i])
            goto error;
    }
    return predicate;
error:
    cx_predicate_free(predicate);
    return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x7a75
movq %rdx, %r15
movq %rsi, %r14
movl %edi, %ebp
movl $0x1, %edi
movl $0x60, %esi
callq 0x5450
testq %rax, %rax
je 0x7a75
movq %rax, %rbx
movq %r14, 0x20(%rax)
movl %ebp, (%rax)
movl $0x8, %esi
movq %r14, %rdi
callq 0x5450
movq %rax, 0x28(%rbx)
testq %rax, %rax
je 0x7a6d
movq (%r15), %rcx
movq %rcx, (%rax)
testq %rcx, %rcx
je 0x7a6d
leaq -0x1(%r14), %rdx
xorl %ecx, %ecx
cmpq %rcx, %rdx
je 0x7a77
movq 0x8(%r15,%rcx,8), %rsi
movq %rsi, 0x8(%rax,%rcx,8)
incq %rcx
testq %rsi, %rsi
jne 0x7a51
cmpq %r14, %rcx
jae 0x7a77
movq %rbx, %rdi
callq 0x53e0
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/chriso[P]columnix/lib/predicate.c
// Function: cx_predicate_valid
bool cx_predicate_valid(const struct cx_predicate *predicate,
                        const struct cx_row_group *row_group)
{
    if (predicate->column >= cx_row_group_column_count(row_group))
        return false;

    enum cx_column_type column_type =
        cx_row_group_column_type(row_group, predicate->column);
    if (!cx_predicate_is_operator(predicate) &&
        predicate->type != CX_PREDICATE_TRUE &&
        predicate->type != CX_PREDICATE_NULL &&
        predicate->column_type != column_type)
        return false;

    switch (predicate->type) {
        case CX_PREDICATE_TRUE:
        case CX_PREDICATE_NULL:
        case CX_PREDICATE_EQ:
        case CX_PREDICATE_CUSTOM:
            break;
        case CX_PREDICATE_LT:
        case CX_PREDICATE_GT:
            return column_type != CX_COLUMN_BIT;
        case CX_PREDICATE_CONTAINS:
            return column_type == CX_COLUMN_STR;
        case CX_PREDICATE_AND:
        case CX_PREDICATE_OR:
            for (size_t i = 0; i < predicate->operand_count; i++)
                if (!cx_predicate_valid(predicate->operands[i], row_group))
                    return false;
            break;
    }

    return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %r15
movq %rsi, %rdi
callq 0x5440
cmpq %rax, %r15
jae 0x7bca
movq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0x58d0
movl %eax, %ecx
movl (%r14), %edx
movb $0x1, %al
cmpl $0x2, %edx
jb 0x7bcc
leal -0x6(%rdx), %esi
cmpl $0x2, %esi
jae 0x7baa
cmpq $0x0, 0x20(%r14)
je 0x7bcc
xorl %r15d, %r15d
movq 0x28(%r14), %rax
movq (%rax,%r15,8), %rdi
movq %rbx, %rsi
callq 0x50f0
testb %al, %al
je 0x7bcc
incq %r15
cmpq 0x20(%r14), %r15
jb 0x7b8b
jmp 0x7bcc
cmpl %ecx, 0x4(%r14)
jne 0x7bca
leal -0x3(%rdx), %edi
cmpl $0x2, %edi
jb 0x7bd2
cmpl $0x2, %esi
jb 0x7b81
cmpl $0x5, %edx
jne 0x7bcc
cmpl $0x5, %ecx
sete %al
jmp 0x7bcc
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
testl %ecx, %ecx
setne %al
jmp 0x7bcc
// File: /workspace/github_c_makefile_star2_O1/chriso[P]columnix/lib/predicate.c
// Function: cx_predicate_optimize
void cx_predicate_optimize(struct cx_predicate *predicate,
                           const struct cx_row_group *row_group)
{
#ifdef __APPLE__
    qsort_r(predicate->operands, predicate->operand_count,
            sizeof(struct cx_predicate *), (void *)row_group, cx_predicate_cmp);
#else
    qsort_r(predicate->operands, predicate->operand_count,
            sizeof(struct cx_predicate *), cx_predicate_cmp, (void *)row_group);
#endif
    if (cx_predicate_is_operator(predicate)) {
        for (size_t i = 0; i < predicate->operand_count; i++)
            cx_predicate_optimize(predicate->operands[i], row_group);
        return;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x20(%rdi), %rsi
movq 0x28(%rdi), %rdi
leaq 0x41(%rip), %rcx        # 0x8b13
movl $0x8, %edx
movq %rbx, %r8
callq 0x5540
movl (%r14), %eax
andl $-0x2, %eax
cmpl $0x6, %eax
jne 0x8b0d
cmpq $0x0, 0x20(%r14)
je 0x8b0d
xorl %r15d, %r15d
movq 0x28(%r14), %rax
movq (%rax,%r15,8), %rdi
movq %rbx, %rsi
callq 0x59e0
incq %r15
cmpq 0x20(%r14), %r15
jb 0x8af4
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl (%rdi), %eax
xorl %ebp, %ebp
decl %eax
cmpl $0x7, %eax
ja 0x8bd3
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x3ef3(%rip), %rcx      # 0xca5c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0x58d0
movl $0x0, %ebp
cmpl $0x6, %eax
jae 0x8bd3
movl %eax, %eax
leaq 0x3eeb(%rip), %rcx      # 0xca7c
movl (%rcx,%rax,4), %ebp
jmp 0x8bd3
cmpq $0x0, 0x20(%r14)
movl $0x0, %ebp
je 0x8bd3
xorl %r15d, %r15d
xorl %ebp, %ebp
movq 0x28(%r14), %rax
movq (%rax,%r15,8), %rdi
movq %rbx, %rsi
callq 0x8b4a
addl %eax, %ebp
incq %r15
cmpq 0x20(%r14), %r15
jb 0x8ba7
jmp 0x8bd3
movl $0x1, %ebp
jmp 0x8bd3
movl 0x50(%r14), %ebp
testl %ebp, %ebp
js 0x8b72
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x8c97
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r15
movl $0x1, %edi
movl $0x38, %esi
callq 0x5450
testq %rax, %rax
je 0x8c97
movq %rax, %rbx
movq %r15, %rdi
callq 0x55e0
movq %rax, (%rbx)
testq %rax, %rax
je 0x8c8f
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 0x8c99
movq %rax, %rdi
xorl %esi, %esi
callq 0x5a10
testq %rax, %rax
je 0x8c8f
movq %rax, %r15
movq %r14, %rdi
movq %rax, %rsi
callq 0x50f0
testb %al, %al
je 0x8c87
movq %r14, %rdi
movq %r15, %rsi
callq 0x59e0
movq %r15, %rdi
callq 0x5860
jmp 0x8c99
movq %r15, %rdi
callq 0x5860
movq %rbx, %rdi
callq 0x5080
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x8cc0
callq 0x5690
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x8cce
callq 0x5860
movq 0x8(%rbx), %rdi
callq 0x53e0
movq (%rbx), %rdi
callq 0x5980
movq %rbx, %rdi
popq %rbx
jmp 0x5080
// File: /workspace/github_c_makefile_star2_O1/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 0x8cfe
movq 0x10(%rbx), %rsi
callq 0x5700
movq (%rbx), %rdi
callq 0x51f0
movq 0x20(%rbx), %rdi
callq 0x58f0
movq %rbx, %rdi
popq %rbx
jmp 0x5080
// File: /workspace/github_c_makefile_star2_O1/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 0x8d7e
callq 0x5690
leaq 0x10(%rbx), %r14
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x8d90
callq 0x5860
movq $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_O1/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 0x8e08
movq %rdi, %rbx
movq 0x28(%rdi), %rax
cmpq 0x20(%rdi), %rax
jae 0x8e08
cmpq $0x0, 0x18(%rbx)
jne 0x8dd4
movq %rbx, %rdi
callq 0x8e13
testb %al, %al
je 0x8e04
movq 0x18(%rbx), %rdi
callq 0x5360
movl %eax, %ebp
testb %al, %al
jne 0x8e0a
movq 0x18(%rbx), %rdi
callq 0x55f0
testb %al, %al
jne 0x8e04
movq %rbx, %rdi
callq 0x8e60
movq 0x28(%rbx), %rax
cmpq 0x20(%rbx), %rax
jb 0x8dc1
jmp 0x8e0a
movb $0x1, 0x31(%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x5a10
movq %rax, 0x10(%rbx)
testq %rax, %rax
je 0x8e46
movq 0x8(%rbx), %rsi
movq %rax, %rdi
callq 0x52d0
movq %rax, %rcx
movq %rax, 0x18(%rbx)
movb $0x1, %al
testq %rcx, %rcx
jne 0x8e5e
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x8e54
callq 0x5860
movq $0x0, 0x10(%rbx)
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x8e7a
callq 0x5690
movq $0x0, 0x18(%rbx)
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x8e90
callq 0x5860
movq $0x0, 0x10(%rbx)
incq 0x28(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x8f09
movq %rdi, %rbx
callq 0x5190
movq 0x28(%rbx), %rax
cmpq 0x20(%rbx), %rax
jae 0x8f06
xorl %r14d, %r14d
movq %rbx, %rdi
callq 0x8e13
testb %al, %al
je 0x8f02
movq 0x18(%rbx), %rdi
callq 0x52f0
movq %rax, %r15
movq 0x18(%rbx), %rdi
callq 0x55f0
testb %al, %al
jne 0x8f02
addq %r15, %r14
movq %rbx, %rdi
callq 0x8e60
movq 0x28(%rbx), %rax
cmpq 0x20(%rbx), %rax
jb 0x8ec6
jmp 0x8f09
movb $0x1, 0x31(%rbx)
xorl %r14d, %r14d
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x8fc8
movq 0x20(%rdi), %rax
testq %rax, %rax
je 0x8fcd
movl %esi, %ebp
movq (%rdi), %rsi
leaq 0x40(%rsp), %rbx
movq %rsi, -0x38(%rbx)
movq 0x8(%rdi), %rsi
movq %rsi, -0x30(%rbx)
xorl %r14d, %r14d
movq %r14, -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)
movq %r14, 0x20(%rbx)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5970
testl %eax, %eax
jne 0x8fd0
movl %ebp, %eax
movq %rax, (%rsp)
leaq (,%rax,8), %rdi
callq 0x5590
movq %rax, %r14
testq %rax, %rax
je 0x8fb8
leaq 0xbc(%rip), %rdx        # 0x9061
leaq 0x8(%rsp), %rcx
movq %r14, %rdi
xorl %esi, %esi
callq 0x5740
testl %eax, %eax
je 0x8fe2
movq %r14, %rdi
callq 0x5080
movq %rbx, %rdi
callq 0x5320
xorl %r14d, %r14d
jmp 0x8fd0
movb $0x1, %r14b
movl %r14d, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %r15
addq $0x8, %r15
movq (%rsp), %rax
leaq -0x1(%rax), %r13
xorl %r12d, %r12d
cmpq %r12, %r13
je 0x9020
movq %r15, %rdi
xorl %esi, %esi
leaq 0x5c(%rip), %rdx        # 0x9061
leaq 0x8(%rsp), %rcx
callq 0x5740
addq $0x8, %r15
incq %r12
testl %eax, %eax
je 0x8ff4
cmpq (%rsp), %r12
jb 0x8fb8
cmpl $0x2, %ebp
movl $0x1, %r15d
cmovgel %ebp, %r15d
xorl %r12d, %r12d
movq (%r14,%r12,8), %rdi
xorl %esi, %esi
callq 0x5920
incq %r12
cmpq %r12, %r15
jne 0x9030
movq %r14, %rdi
callq 0x5080
movq %rbx, %rdi
callq 0x5320
movb 0x38(%rsp), %r14b
xorb $0x1, %r14b
jmp 0x8fd0