// File: /workspace/github_c_makefile_star2_O0/chriso[P]columnix/lib/writer.c
// Function: cx_writer_ensure_columns
static bool cx_writer_ensure_columns(struct cx_writer *writer)
{
    assert(!writer->columns && writer->column_count);
    writer->columns = calloc(writer->column_count, sizeof(*writer->columns));
    if (!writer->columns)
        return false;
    for (size_t i = 0; i < writer->column_count; i++) {
        struct cx_column_descriptor *descriptor =
            &writer->writer->columns.descriptors[i];
        writer->columns[i].values =
            cx_column_new(descriptor->type, descriptor->encoding);
        if (!writer->columns[i].values)
            goto error;
        writer->columns[i].nulls =
            cx_column_new(CX_COLUMN_BIT, CX_ENCODING_NONE);
        if (!writer->columns[i].nulls)
            goto error;
    }
    return true;
error:
    for (size_t i = 0; i < writer->column_count; i++) {
        if (writer->columns[i].values)
            cx_column_free(writer->columns[i].values);
        if (writer->columns[i].nulls)
            cx_column_free(writer->columns[i].nulls);
    }
    free(writer->columns);
    writer->columns = NULL;
    return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0xfd44
movq -0x10(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0xfd44
jmp 0xfd63
leaq 0x1af4(%rip), %rdi      # 0x1183f
leaq 0x19c6(%rip), %rsi      # 0x11718
movl $0x80, %edx
leaq 0x1b0a(%rip), %rcx      # 0x11868
callq 0x53a0
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x10, %esi
callq 0x54d0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0xfd94
movb $0x0, -0x1(%rbp)
jmp 0xff17
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x18(%rcx), %rax
jae 0xfe5e
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
imulq $0x18, -0x18(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl 0x4(%rax), %edi
movq -0x20(%rbp), %rax
movl 0x8(%rax), %esi
callq 0x5890
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
cmpq $0x0, (%rax)
jne 0xfe0c
jmp 0xfe67
xorl %esi, %esi
movl %esi, %edi
callq 0x5890
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
cmpq $0x0, 0x8(%rax)
jne 0xfe4b
jmp 0xfe67
jmp 0xfe4d
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0xfd9c
movb $0x1, -0x1(%rbp)
jmp 0xff17
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x18(%rcx), %rax
jae 0xfefa
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x28(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
cmpq $0x0, (%rax)
je 0xfeb1
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x28(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rdi
callq 0x5990
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x28(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
cmpq $0x0, 0x8(%rax)
je 0xfee7
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x28(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rdi
callq 0x5990
jmp 0xfee9
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0xfe6f
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x50a0
movq -0x10(%rbp), %rax
movq $0x0, 0x8(%rax)
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq