// File: /workspace/github_cpp_makefile_star2_O2/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
andq $0x0, 0x8(%rdi)
leaq 0x1a624(%rip), %rax     # 0x27968
movq %rax, (%rdi)
movq $0x64, 0x10(%rdi)
andq $0x0, 0x20(%rdi)
testq %rsi, %rsi
je 0xd464
movq %rdi, %rbx
movq %rsi, %r14
movq %rsi, %rdi
callq 0x7100
movq %rax, %r15
xorl %eax, %eax
movl $0x20095, %ecx          # imm = 0x20095
cmpq %rax, %r15
je 0xd399
movzbl (%r14,%rax), %edx
addl $-0x42, %edx
cmpl $0x11, %edx
ja 0xd450
btl %edx, %ecx
jae 0xd450
incq %rax
jmp 0xd375
cmpq $0x64, %r15
jb 0xd3b1
leaq (%r15,%r15), %rax
movq %rax, 0x10(%rbx)
leaq 0x1(,%r15,2), %rdi
jmp 0xd3b4
pushq $0x65
popq %rdi
callq 0x7030
movq %rax, 0x18(%rbx)
xorl %eax, %eax
cmpq %rax, %r15
je 0xd3d4
movb (%r14,%rax), %cl
movq 0x18(%rbx), %rdx
movb %cl, (%rdx,%rax)
incq %rax
jmp 0xd3bf
movq %r15, 0x20(%rbx)
movq 0x10(%rbx), %rcx
movq 0x18(%rbx), %rax
movb $0x0, (%rax,%rcx)
andq $0x0, 0x28(%rbx)
pushq $0x30
popq %rdi
callq 0x7220
movq %rax, %r14
movq %rax, %rdi
callq 0x16038
movq %r14, 0x30(%rbx)
pushq $0x30
popq %rdi
callq 0x7220
movq %rax, %r14
movq %rax, %rdi
callq 0x16038
movq %r14, 0x38(%rbx)
pushq $0x30
popq %rdi
callq 0x7220
movq %rax, %r14
movq %rax, %rdi
callq 0x16038
movq %r14, 0x40(%rbx)
pushq $0x30
popq %rdi
callq 0x7220
movq %rax, %r14
movq %rax, %rdi
callq 0x16038
movq %r14, 0x48(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x65
popq %rdi
callq 0x7030
movq %rax, 0x18(%rbx)
pushq $0x64
popq %rcx
jmp 0xd3e0
leaq 0xd69d(%rip), %rdi      # 0x1ab08
leaq 0xd6a7(%rip), %rsi      # 0x1ab19
leaq 0xd6bc(%rip), %rcx      # 0x1ab35
pushq $0x56
popq %rdx
callq 0x7150
jmp 0xd487
jmp 0xd487
jmp 0xd487
movq %rax, %rbx
movq %r14, %rdi
callq 0x71f0
movq %rbx, %rdi
callq 0x7330