// File: yasz24[P]eau2/src/network/./../application/../dataframe/../utils/distributedArray.h
// Function: DoubleDistributedArray::storeChunk()
void storeChunk() {
        //std::cout << "total nodes: " << totalNodes_ << "\n";
        //creates a unique keyname based on provided ID - could be modified to randomly pick number?
        StrBuff sb;
        sb.c(uid_);
        sb.c("_dist_double_array_chunk_");
        sb.c(chunkCount_);
        String* s = sb.get();
        Key* k = new Key(s->c_str(), curNode_); //create new key with current node and keyName
        keys_->pushBack(k);
        char* serialized = chunkArray_->serialize();
        //std::cout << serialized << "\n";
        kv_->put(k, new Value(serialized, (size_t)0)); //adds new IntArray to kvStore
        delete chunkArray_;
        chunkArray_ = new DoubleArray(chunkSize_); //creates new Int array to store values for new chunk
        curNode_+=1;
        chunkCount_+=1;
        if(curNode_ == totalNodes_) { //starts cycle of chunks on nodes again
            curNode_ = 0;
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x68(%rbp)
leaq -0x30(%rbp), %rdi
movq %rdi, -0x60(%rbp)
callq 0xa020
movq -0x68(%rbp), %rax
movq -0x60(%rbp), %rdi
movq 0x40(%rax), %rsi
callq 0x14390
jmp 0x14167
leaq 0x1854d(%rip), %rsi     # 0x2c6bb
leaq -0x30(%rbp), %rdi
callq 0xa0f0
jmp 0x14179
movq -0x68(%rbp), %rax
movq 0x50(%rax), %rsi
leaq -0x30(%rbp), %rdi
callq 0x14390
jmp 0x1418c
leaq -0x30(%rbp), %rdi
callq 0xa210
movq %rax, -0x70(%rbp)
jmp 0x1419b
movq -0x70(%rbp), %rax
movq %rax, -0x48(%rbp)
movl $0x20, %edi
callq 0x8290
movq %rax, -0x78(%rbp)
jmp 0x141b3
movq -0x48(%rbp), %rdi
movq (%rdi), %rax
movq 0x30(%rax), %rax
callq *%rax
movq %rax, -0x80(%rbp)
jmp 0x141c6
movq -0x80(%rbp), %rsi
movq -0x78(%rbp), %rdi
movq -0x68(%rbp), %rax
movq 0x60(%rax), %rdx
callq 0xa840
jmp 0x141dd
movq -0x68(%rbp), %rax
movq -0x78(%rbp), %rcx
movq %rcx, -0x50(%rbp)
movq 0x38(%rax), %rdi
movq -0x50(%rbp), %rsi
movq (%rdi), %rax
movq 0x58(%rax), %rax
callq *%rax
jmp 0x141fc
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rdi
movq (%rdi), %rax
movq 0x38(%rax), %rax
callq *%rax
movq %rax, -0x88(%rbp)
jmp 0x14216
movq -0x68(%rbp), %rax
movq -0x88(%rbp), %rcx
movq %rcx, -0x58(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0xa0(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x98(%rbp)
movl $0x20, %edi
callq 0x8290
movq %rax, -0x90(%rbp)
jmp 0x1424e
movq -0x90(%rbp), %rdi
movq -0x58(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0xdad0
jmp 0x14264
movq -0x90(%rbp), %rdx
movq -0x98(%rbp), %rsi
movq -0xa0(%rbp), %rdi
callq 0xdb20
jmp 0x14280
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0xa8(%rbp)
cmpq $0x0, %rax
je 0x142a2
movq -0xa8(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movl $0x28, %edi
callq 0x8290
movq %rax, -0xb0(%rbp)
jmp 0x142b5
movq -0xb0(%rbp), %rdi
movq -0x68(%rbp), %rax
movl 0x48(%rax), %esi
callq 0x10490
jmp 0x142ca
movq -0x68(%rbp), %rcx
movq -0xb0(%rbp), %rax
movq %rax, 0x18(%rcx)
movq 0x60(%rcx), %rax
addq $0x1, %rax
movq %rax, 0x60(%rcx)
movq 0x50(%rcx), %rax
addq $0x1, %rax
movq %rax, 0x50(%rcx)
movq 0x60(%rcx), %rax
cmpq 0x68(%rcx), %rax
jne 0x14362
movq -0x68(%rbp), %rax
movq $0x0, 0x60(%rax)
jmp 0x14362
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x14374
movq -0x78(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
callq 0x8260
jmp 0x14374
movq -0x90(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
callq 0x8260
jmp 0x14374
movq -0xb0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
callq 0x8260
jmp 0x14374
leaq -0x30(%rbp), %rdi
callq 0xa0a0
addq $0xb0, %rsp
popq %rbp
retq
leaq -0x30(%rbp), %rdi
callq 0xa0a0
movq -0x38(%rbp), %rdi
callq 0x8400
nopw %cs:(%rax,%rax)