// File: yasz24[P]eau2/src/network/./../application/../dataframe/distributedDataframe.h
// Function: DistributedDataFrame::add_column(Column*, String*)
void add_column(Column* col, String* name) {
      if (col == nullptr) {
        return;
      }
      size_t col_size = col->size();
      // if (col_size > this->schema_->length()) {
      //   return;
      // }
      if (schema_->num_rows_ == 0) {
        schema_->num_rows_ = col_size;
      }
      char col_type = col->get_type();
      this->schema_->add_column(col_type, name);
      if (col_size < this->schema_->length()) {
        //padding columns with dummy data.
        switch (col_type) {
        case 'I': {
            DistributedIntColumn* intCol = col->as_dist_int();
            for (size_t i = col_size; i < this->schema_->length(); i++) {
              intCol->push_back(0);
            }
            break;
          }
        case 'S': {
            DistributedStringColumn* strCol = col->as_dist_string();
            for (size_t i = col_size; i < this->schema_->length(); i++) {
              strCol->push_back(nullptr);
            }
            break;
          }
        case 'B': {
            DistributedBoolColumn* boolCol = col->as_dist_bool();
            for (size_t i = col_size; i < this->schema_->length(); i++) {
              boolCol->push_back(false);
            }
            break;
          }
        case 'F': {
            DistributedFloatColumn* floatCol = col->as_dist_float();
            for (size_t i = col_size; i < this->schema_->length(); i++) {
              floatCol->push_back((float) 0);
            }
            break;
          }
        case 'D': {
          DistributedDoubleColumn* doublCol = col->as_dist_double();
          for (size_t i = col_size; i < this->schema_->length(); i++) {
            doublCol->push_back((double) 0);
          }
          break;
        }
        default:
          //do nothing.
          break;
        }
      }
      this->cols_->pushBack(col);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x80(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0xd81b
jmp 0xdac7
movq -0x10(%rbp), %rdi
movq (%rdi), %rax
callq *0xc8(%rax)
movq %rax, %rcx
movq -0x80(%rbp), %rax
movq %rcx, -0x20(%rbp)
movq 0x10(%rax), %rax
cmpq $0x0, 0x28(%rax)
jne 0xd84e
movq -0x80(%rbp), %rax
movq -0x20(%rbp), %rcx
movq 0x10(%rax), %rax
movq %rcx, 0x28(%rax)
movq -0x10(%rbp), %rdi
movq (%rdi), %rax
callq *0xd0(%rax)
movb %al, %cl
movq -0x80(%rbp), %rax
movb %cl, -0x21(%rbp)
movq 0x10(%rax), %rdi
movb -0x21(%rbp), %al
movq -0x18(%rbp), %rdx
movsbl %al, %esi
callq 0x1d720
movq -0x80(%rbp), %rax
movq -0x20(%rbp), %rcx
movq %rcx, -0x88(%rbp)
movq 0x10(%rax), %rdi
callq 0x1d700
movq %rax, %rcx
movq -0x88(%rbp), %rax
cmpq %rcx, %rax
jae 0xdab5
movsbl -0x21(%rbp), %eax
addl $-0x42, %eax
movl %eax, %ecx
movq %rcx, -0x90(%rbp)
subl $0x11, %eax
ja 0xdab1
movq -0x90(%rbp), %rax
leaq 0x1e7af(%rip), %rcx     # 0x2c078
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rbp), %rdi
movq (%rdi), %rax
callq *0x68(%rax)
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x80(%rbp), %rax
movq -0x38(%rbp), %rcx
movq %rcx, -0x98(%rbp)
movq 0x10(%rax), %rdi
callq 0x1d700
movq %rax, %rcx
movq -0x98(%rbp), %rax
cmpq %rcx, %rax
jae 0xd92c
movq -0x30(%rbp), %rdi
movq (%rdi), %rax
xorl %esi, %esi
callq *0x98(%rax)
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0xd8e8
jmp 0xdab3
movq -0x10(%rbp), %rdi
movq (%rdi), %rax
callq *0x88(%rax)
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x80(%rbp), %rax
movq -0x48(%rbp), %rcx
movq %rcx, -0xa0(%rbp)
movq 0x10(%rax), %rdi
callq 0x1d700
movq %rax, %rcx
movq -0xa0(%rbp), %rax
cmpq %rcx, %rax
jae 0xd990
movq -0x40(%rbp), %rdi
movq (%rdi), %rax
xorl %ecx, %ecx
movl %ecx, %esi
callq *0xb8(%rax)
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0xd94a
jmp 0xdab3
movq -0x10(%rbp), %rdi
movq (%rdi), %rax
callq *0x78(%rax)
movq %rax, -0x50(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x80(%rbp), %rax
movq -0x58(%rbp), %rcx
movq %rcx, -0xa8(%rbp)
movq 0x10(%rax), %rdi
callq 0x1d700
movq %rax, %rcx
movq -0xa8(%rbp), %rax
cmpq %rcx, %rax
jae 0xd9ef
movq -0x50(%rbp), %rdi
movq (%rdi), %rax
xorl %esi, %esi
callq *0xa8(%rax)
movq -0x58(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x58(%rbp)
jmp 0xd9ab
jmp 0xdab3
movq -0x10(%rbp), %rdi
movq (%rdi), %rax
callq *0x80(%rax)
movq %rax, -0x60(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x80(%rbp), %rax
movq -0x68(%rbp), %rcx
movq %rcx, -0xb0(%rbp)
movq 0x10(%rax), %rdi
callq 0x1d700
movq %rax, %rcx
movq -0xb0(%rbp), %rax
cmpq %rcx, %rax
jae 0xda52
movq -0x60(%rbp), %rdi
movq (%rdi), %rax
xorps %xmm0, %xmm0
callq *0xb0(%rax)
movq -0x68(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x68(%rbp)
jmp 0xda0d
jmp 0xdab3
movq -0x10(%rbp), %rdi
movq (%rdi), %rax
callq *0x70(%rax)
movq %rax, -0x70(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x80(%rbp), %rax
movq -0x78(%rbp), %rcx
movq %rcx, -0xb8(%rbp)
movq 0x10(%rax), %rdi
callq 0x1d700
movq %rax, %rcx
movq -0xb8(%rbp), %rax
cmpq %rcx, %rax
jae 0xdaaf
movq -0x70(%rbp), %rdi
movq (%rdi), %rax
xorps %xmm0, %xmm0
callq *0xa0(%rax)
movq -0x78(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x78(%rbp)
jmp 0xda6a
jmp 0xdab3
jmp 0xdab3
jmp 0xdab5
movq -0x80(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x10(%rbp), %rsi
movq (%rdi), %rax
callq *0x58(%rax)
addq $0xc0, %rsp
popq %rbp
retq