// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0xd594
movb $0x0, -0x1(%rbp)
jmp 0xd6f2
movq -0x18(%rbp), %rdi
callq 0x5430
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rdi
callq 0x5430
movq %rax, %rcx
movq -0x48(%rbp), %rax
cmpq %rcx, %rax
jne 0xd5cc
movq -0x20(%rbp), %rdi
callq 0x5500
cmpl $0x0, %eax
je 0xd5d5
movb $0x0, -0x1(%rbp)
jmp 0xd6f2
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0xd5f7
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
cmpq -0x28(%rbp), %rax
je 0xd5f7
movb $0x0, -0x1(%rbp)
jmp 0xd6f2
movq -0x18(%rbp), %rdi
callq 0x5340
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rdi
callq 0x5340
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0xd61f
cmpq $0x0, -0x38(%rbp)
jne 0xd624
jmp 0xd6ce
movq -0x10(%rbp), %rdi
callq 0xd700
testb $0x1, %al
jne 0xd636
jmp 0xd6ce
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rdx
movq 0x8(%rdx), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, 0x8(%rdx)
imulq $0x90, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rdi
callq 0x5500
movl %eax, %ecx
movq -0x40(%rbp), %rax
movl %ecx, (%rax)
movq -0x18(%rbp), %rdi
callq 0x50f0
movl %eax, %ecx
movq -0x40(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x18(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x30(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x40(%rbp), %rax
movb $0x0, 0x88(%rax)
movq -0x20(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x50(%rax)
movq -0x38(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x48(%rax)
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movb $0x1, -0x1(%rbp)
jmp 0xd6f2
cmpq $0x0, -0x30(%rbp)
je 0xd6de
movq -0x30(%rbp), %rdi
callq 0x5580
cmpq $0x0, -0x38(%rbp)
je 0xd6ee
movq -0x38(%rbp), %rdi
callq 0x5580
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)