// File: /workspace/github_cpp_makefile_star2_O3/yasz24[P]eau2/tests/./../src/dataframe/schema.h
// Function: Schema::Schema(char const*)
Schema(const char* types) {
        assert(types != nullptr);
        bool schemaValid = true;
        size_t types_len =  strlen(types);
        //loop through character by character to validate schema.
        for (size_t i = 0; i < types_len; i++)
        {
            char c = types[i];
            //todo: find a better way to do this.
            if (!this->valid_col_char_(c)) {
                // the schema is invalid, create an empty schema.
                schemaValid = false;
                break;
            }
        }

        if (schemaValid) {
            if (this->capacity_ - 1 < types_len) {
                this->capacity_ = 2 * types_len;
            }
            //allocate a buffer.
            this->val_ = new char[this->capacity_ + 1];
            for (size_t i=0; i < types_len; i++) {
			    this->val_[i] = types[i];
		    }
            //set the empty_index_ to the length of types.
            this->empty_index_ = types_len;
        } else {
            this->val_ = new char[this->capacity_ + 1];
        }
        //null terminate the string.
        this->val_[this->capacity_] = '\0';

        //initialize num_rows
        this->num_rows_ = 0;
        //initialize the row and col maps.
        this->col_name_idx = new Map();
        this->row_name_idx = new Map();
        this->col_idx_name = new Map();
        this->row_idx_name = new Map();
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
xorl %eax, %eax
movq %rax, 0x8(%rdi)
leaq 0x1c565(%rip), %rcx     # 0x2c980
movq %rcx, (%rdi)
movq $0x64, 0x10(%rdi)
movq %rax, 0x20(%rdi)
testq %rsi, %rsi
je 0x1055f
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x70f0
movq %rax, %r14
testq %rax, %rax
je 0x104b5
xorl %eax, %eax
movl $0x20095, %ecx          # imm = 0x20095
movzbl (%r15,%rax), %edx
addl $-0x42, %edx
cmpl $0x11, %edx
ja 0x10547
btl %edx, %ecx
jae 0x10547
incq %rax
cmpq %rax, %r14
jne 0x10450
movl $0x65, %edi
cmpq $0x64, %r14
jb 0x1048d
leaq (%r14,%r14), %rax
movq %rax, 0x10(%rbx)
leaq 0x1(,%r14,2), %rdi
callq 0x7030
movq %rax, 0x18(%rbx)
xorl %eax, %eax
movb (%r15,%rax), %cl
movq 0x18(%rbx), %rdx
movb %cl, (%rdx,%rax)
incq %rax
cmpq %rax, %r14
jne 0x10498
movq 0x10(%rbx), %rcx
movq 0x18(%rbx), %rax
jmp 0x104c8
movl $0x65, %edi
callq 0x7030
movq %rax, 0x18(%rbx)
movl $0x64, %ecx
movq %r14, 0x20(%rbx)
movb $0x0, (%rax,%rcx)
movq $0x0, 0x28(%rbx)
movl $0x30, %edi
callq 0x7200
movq %rax, %r14
movq %rax, %rdi
callq 0x1a95c
movq %r14, 0x30(%rbx)
movl $0x30, %edi
callq 0x7200
movq %rax, %r14
movq %rax, %rdi
callq 0x1a95c
movq %r14, 0x38(%rbx)
movl $0x30, %edi
callq 0x7200
movq %rax, %r14
movq %rax, %rdi
callq 0x1a95c
movq %r14, 0x40(%rbx)
movl $0x30, %edi
callq 0x7200
movq %rax, %r14
movq %rax, %rdi
callq 0x1a95c
movq %r14, 0x48(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x65, %edi
callq 0x7030
movq %rax, 0x18(%rbx)
movl $0x64, %ecx
jmp 0x104cc
leaq 0x10558(%rip), %rdi     # 0x20abe
leaq 0x10562(%rip), %rsi     # 0x20acf
leaq 0x10577(%rip), %rcx     # 0x20aeb
movl $0x56, %edx
callq 0x7130
jmp 0x10584
jmp 0x10584
jmp 0x10584
movq %rax, %rbx
movq %r14, %rdi
callq 0x71d0
movq %rbx, %rdi
callq 0x7350
nop