// File: yasz24[P]eau2/src/network/./../application/../dataframe/distributedColumn.h
// Function: DistributedStringColumn::getColumnOnNode()
Column* getColumnOnNode() override {
    size_t _node = kv_->this_node_;
    StringColumn* col = new StringColumn();
    Array* keys = val_->keys_;
    // std::cout << "keys length: " << keys->length() << "\n";
    for (size_t i = 0; i < keys->length(); i++) {
      Key* key = dynamic_cast<Key*>(val_->keys_->get(i));
      if (key->node_ == _node) { //only get the chunks that live locally on this node.
        // std::cout << "here\n";
        Value* val = kv_->get(key);
        Deserializable ds;
        StringArray* chunk = dynamic_cast<StringArray*>(ds.deserialize(val->data));
        for (size_t j = 0; j < chunk->length(); j++) {
          col->push_back(chunk->get(j));
        }
        delete chunk;
      }
    }
    //if node 0, append the chunk_array_ at the end too.
    if (_node == 0) {
      StringArray* chunk_array = val_->chunkArray_;
      for (size_t j = 0; j < chunk_array->length(); j++) {
          col->push_back(chunk_array->get(j));
      }
    }
    return col;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x80(%rbp)
movq 0x10(%rax), %rax
movq 0x18(%rax), %rax
movq %rax, -0x10(%rbp)
movl $0x28, %edi
callq 0x8290
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x78(%rbp)
callq 0x182d0
jmp 0x170ae
movq -0x80(%rbp), %rax
movq -0x78(%rbp), %rcx
movq %rcx, -0x18(%rbp)
movq 0x18(%rax), %rax
movq 0x38(%rax), %rax
movq %rax, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x30(%rbp), %rdi
callq 0x11670
movq %rax, %rcx
movq -0x88(%rbp), %rax
cmpq %rcx, %rax
jae 0x17288
movq -0x80(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x38(%rax), %rdi
movq -0x38(%rbp), %rsi
movq (%rdi), %rax
callq *0x40(%rax)
movq %rax, -0x90(%rbp)
cmpq $0x0, %rax
je 0x17159
movq -0x90(%rbp), %rdi
leaq 0x22f9a(%rip), %rsi     # 0x3a0c0
leaq 0x23603(%rip), %rdx     # 0x3a730
xorl %eax, %eax
movl %eax, %ecx
callq 0x82f0
movq %rax, -0x98(%rbp)
jmp 0x17164
movq -0x78(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x8260
jmp 0x17312
xorl %eax, %eax
movq %rax, -0x98(%rbp)
jmp 0x17164
movq -0x98(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq 0x18(%rax), %rax
cmpq -0x10(%rbp), %rax
jne 0x17275
movq -0x80(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x40(%rbp), %rsi
callq 0x11740
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq 0x10(%rax), %rsi
leaq -0x49(%rbp), %rdi
callq 0x20680
movq %rax, -0xa0(%rbp)
cmpq $0x0, %rax
je 0x171db
movq -0xa0(%rbp), %rdi
leaq 0x22efe(%rip), %rsi     # 0x3a0c0
leaq 0x241b7(%rip), %rdx     # 0x3b380
xorl %eax, %eax
movl %eax, %ecx
callq 0x82f0
movq %rax, -0xa8(%rbp)
jmp 0x171e6
xorl %eax, %eax
movq %rax, -0xa8(%rbp)
jmp 0x171e6
movq -0xa8(%rbp), %rax
movq %rax, -0x58(%rbp)
movq $0x0, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0x58(%rbp), %rdi
callq 0x183f0
movq %rax, %rcx
movq -0xb0(%rbp), %rax
cmpq %rcx, %rax
jae 0x17255
movq -0x18(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0x58(%rbp), %rdi
movq -0x60(%rbp), %rsi
callq 0x17a60
movq -0xb8(%rbp), %rdi
movq %rax, %rsi
movq (%rdi), %rax
callq *0xb8(%rax)
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x60(%rbp)
jmp 0x171f9
movq -0x58(%rbp), %rax
movq %rax, -0xc0(%rbp)
cmpq $0x0, %rax
je 0x17273
movq -0xc0(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x17275
jmp 0x17277
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x170ce
cmpq $0x0, -0x10(%rbp)
jne 0x17305
movq -0x80(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rax
movq %rax, -0x68(%rbp)
movq $0x0, -0x70(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq -0x68(%rbp), %rdi
callq 0x183f0
movq %rax, %rcx
movq -0xc8(%rbp), %rax
cmpq %rcx, %rax
jae 0x17303
movq -0x18(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq -0x68(%rbp), %rdi
movq -0x70(%rbp), %rsi
callq 0x17a60
movq -0xd0(%rbp), %rdi
movq %rax, %rsi
movq (%rdi), %rax
callq *0xb8(%rax)
movq -0x70(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x70(%rbp)
jmp 0x172a7
jmp 0x17305
movq -0x18(%rbp), %rax
addq $0xd0, %rsp
popq %rbp
retq
movq -0x20(%rbp), %rdi
callq 0x8400
nopl (%rax,%rax)