// File: yasz24[P]eau2/src/network/./../application/../dataframe/distributedColumn.h
// Function: DistributedDoubleColumn::getColumnOnNode()
Column* getColumnOnNode() override {
    size_t _node = kv_->this_node_;
    DoubleColumn* col = new DoubleColumn();
    Array* keys = val_->keys_;
    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.
        Value* val = kv_->get(key);
        Deserializable ds;
        DoubleArray* chunk = dynamic_cast<DoubleArray*>(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) {
      DoubleArray* 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 0x13830
jmp 0x1010e
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 0x102e5
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 0x101b9
movq -0x90(%rbp), %rdi
leaq 0x29f3a(%rip), %rsi     # 0x3a0c0
leaq 0x2a5a3(%rip), %rdx     # 0x3a730
xorl %eax, %eax
movl %eax, %ecx
callq 0x82f0
movq %rax, -0x98(%rbp)
jmp 0x101c4
movq -0x78(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x8260
jmp 0x1036c
xorl %eax, %eax
movq %rax, -0x98(%rbp)
jmp 0x101c4
movq -0x98(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq 0x18(%rax), %rax
cmpq -0x10(%rbp), %rax
jne 0x102d2
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 0x1023b
movq -0xa0(%rbp), %rdi
leaq 0x29e9e(%rip), %rsi     # 0x3a0c0
leaq 0x2a9ff(%rip), %rdx     # 0x3ac28
xorl %eax, %eax
movl %eax, %ecx
callq 0x82f0
movq %rax, -0xa8(%rbp)
jmp 0x10246
xorl %eax, %eax
movq %rax, -0xa8(%rbp)
jmp 0x10246
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 0x13950
movq %rax, %rcx
movq -0xb0(%rbp), %rax
cmpq %rcx, %rax
jae 0x102b2
movq -0x18(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0x58(%rbp), %rdi
movq -0x60(%rbp), %rsi
callq 0x10c80
movq -0xb8(%rbp), %rdi
movq (%rdi), %rax
callq *0xa0(%rax)
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x60(%rbp)
jmp 0x10259
movq -0x58(%rbp), %rax
movq %rax, -0xc0(%rbp)
cmpq $0x0, %rax
je 0x102d0
movq -0xc0(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x102d2
jmp 0x102d4
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x1012e
cmpq $0x0, -0x10(%rbp)
jne 0x1035f
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 0x13950
movq %rax, %rcx
movq -0xc8(%rbp), %rax
cmpq %rcx, %rax
jae 0x1035d
movq -0x18(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq -0x68(%rbp), %rdi
movq -0x70(%rbp), %rsi
callq 0x10c80
movq -0xd0(%rbp), %rdi
movq (%rdi), %rax
callq *0xa0(%rax)
movq -0x70(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x70(%rbp)
jmp 0x10304
jmp 0x1035f
movq -0x18(%rbp), %rax
addq $0xd0, %rsp
popq %rbp
retq
movq -0x20(%rbp), %rdi
callq 0x8400
nopw %cs:(%rax,%rax)
nop