// File: /workspace/github_cpp_makefile_star2_O3/xjrueda[P]fixprime/src/Node.cpp
// Function: fprime::Node::Node(fprime::Node const&)
Node::Node(const Node& other) :
    _type(other._type),
    isRequired(other.isRequired),
    field(other.field),
    protocolPtr(other.protocolPtr),
    componentPtr(other.componentPtr) {

        if (other._type == fprime::Node::NodeType::FIELD_NODE || other._type == fprime::Node::NodeType::REPEATING_GROUP) {
            fprime::DataHolderFactory factory;
            this->value = factory.create(other.field->getDataType());
            const string val = other.value->get();
            this->value->set(val);
        }

        childsVector.clear();
        childsByFieldId.clear();
        for (NodeVector::const_iterator itr = other.childsVector.begin(); itr != other.childsVector.end(); itr++) {
            NodePtr newNode(new Node(**itr));
            childsVector.push_back(newNode);
            if (other._type == fprime::Node::NodeType::ROOT_NODE || other._type == fprime::Node::NodeType::GROUP_INSTANCE)
                childsByFieldId[newNode->getField()->getId()] = newNode;

            if (other._type == fprime::Node::NodeType::REPEATING_GROUP)
                childsByFieldId[childsVector.size()] = newNode;
        }

        //        if (_type != fprime::Node::NodeType::ROOT_NODE)
        //            cout << "Node " << field->getId() << " copied" << endl;
        //        else
        //            cout << "Root Node " << " copied" << endl;

    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rsi, %rbp
movq %rdi, %rbx
movq 0x32986(%rip), %rax     # 0x70ef8
addq $0x10, %rax
movq %rax, (%rdi)
movl 0x8(%rsi), %eax
movl %eax, 0x8(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movb 0x20(%rsi), %al
movb %al, 0x20(%rdi)
movq 0x28(%rsi), %rax
movq %rax, 0x28(%rdi)
movq 0x30(%rsi), %rax
movq %rax, 0x30(%rdi)
testq %rax, %rax
je 0x3e5b6
movq 0x328b0(%rip), %rcx     # 0x70e58
cmpb $0x0, (%rcx)
je 0x3e5b2
incl 0x8(%rax)
jmp 0x3e5b6
lock
incl 0x8(%rax)
leaq 0x38(%rbx), %rax
movq %rax, 0x20(%rsp)
movups %xmm0, 0x38(%rbx)
xorl %eax, %eax
movq %rax, 0x48(%rbx)
leaq 0x50(%rbx), %rcx
movq %rcx, 0x18(%rsp)
leaq 0x58(%rbx), %rcx
movl $0x0, 0x58(%rbx)
movq %rax, 0x60(%rbx)
movq %rcx, 0x68(%rbx)
movq %rcx, 0x70(%rbx)
movq %rax, 0x78(%rbx)
leaq 0x80(%rbx), %r12
movq %r12, %rdi
xorl %esi, %esi
callq 0x2e950
leaq 0xa8(%rbx), %r13
movq %r13, %rdi
xorl %esi, %esi
callq 0x2e950
movups 0xd0(%rbp), %xmm0
movups %xmm0, 0xd0(%rbx)
movq 0xe0(%rbp), %rax
movq %rax, 0xe0(%rbx)
testq %rax, %rax
je 0x3e645
movq 0x32821(%rip), %rcx     # 0x70e58
cmpb $0x0, (%rcx)
je 0x3e641
incl 0x8(%rax)
jmp 0x3e645
lock
incl 0x8(%rax)
movl 0x8(%rbp), %eax
decl %eax
cmpl $0x1, %eax
ja 0x3e745
leaq 0x50(%rsp), %rdi
callq 0x30d60
movq 0x28(%rbp), %rsi
leaq 0xa8(%rsp), %rdi
callq 0x2fdc0
leaq 0x30(%rsp), %rdi
leaq 0x50(%rsp), %rsi
leaq 0xa8(%rsp), %rdx
callq 0x2f9f0
movaps 0x30(%rsp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, 0x30(%rsp)
movq 0x18(%rbx), %rdi
movups %xmm0, 0x10(%rbx)
testq %rdi, %rdi
je 0x3e6b3
callq 0x2f370
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x3e6b3
callq 0x2f370
leaq 0xb8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3e6c9
callq 0x2f6c0
movq 0x10(%rbp), %rsi
movq (%rsi), %rax
leaq 0x30(%rsp), %rdi
callq *0x18(%rax)
leaq 0x10(%rbx), %rax
movq (%rax), %r14
leaq 0x98(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
addq %rsi, %rdx
leaq 0x88(%rsp), %rdi
callq 0x2e8a0
movq (%r14), %rax
leaq 0x88(%rsp), %rsi
movq %r14, %rdi
callq *0x10(%rax)
movq 0x88(%rsp), %rdi
cmpq %r15, %rdi
je 0x3e728
callq 0x2f6c0
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3e73b
callq 0x2f6c0
leaq 0x50(%rsp), %rdi
callq 0x30d90
movq %r13, 0x8(%rsp)
movq %r12, 0x10(%rsp)
movq 0x20(%rsp), %rdi
callq 0x30350
movq 0x18(%rsp), %rdi
callq 0x2eb60
movq 0x38(%rbp), %r13
cmpq 0x40(%rbp), %r13
je 0x3e868
leaq 0x58(%rsp), %r12
leaq 0x30(%rsp), %r14
movl $0xe8, %edi
callq 0x2f830
movq %rax, %r15
movq (%r13), %rsi
movq %rax, %rdi
callq 0x30c80
movq %r15, 0x50(%rsp)
movq %r12, %rdi
movq %r15, %rsi
callq 0x2e4a0
movq 0x20(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x2fd80
movl 0x8(%rbp), %eax
cmpl $0x3, %eax
je 0x3e7bf
testl %eax, %eax
jne 0x3e812
movq 0x50(%rsp), %rsi
movq %r14, %rdi
callq 0x2f8c0
movq 0x30(%rsp), %rdi
callq 0x2f6e0
movl %eax, 0x2c(%rsp)
movq 0x18(%rsp), %rdi
leaq 0x2c(%rsp), %rsi
callq 0x2f1a0
movq 0x50(%rsp), %rcx
movq %rcx, (%rax)
addq $0x8, %rax
movq %rax, %rdi
movq %r12, %rsi
callq 0x30ce0
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x3e80f
callq 0x2f370
movl 0x8(%rbp), %eax
cmpl $0x2, %eax
jne 0x3e84b
movq 0x40(%rbx), %rax
subq 0x38(%rbx), %rax
shrq $0x4, %rax
movl %eax, 0x30(%rsp)
movq 0x18(%rsp), %rdi
movq %r14, %rsi
callq 0x2f1a0
movq 0x50(%rsp), %rcx
movq %rcx, (%rax)
addq $0x8, %rax
movq %rax, %rdi
movq %r12, %rsi
callq 0x30ce0
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x3e85a
callq 0x2f370
addq $0x10, %r13
cmpq 0x40(%rbp), %r13
jne 0x3e77b
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbp
movq 0x88(%rsp), %rdi
cmpq %r15, %rdi
je 0x3e894
callq 0x2f6c0
jmp 0x3e894
movq %rax, %rbp
leaq 0x40(%rsp), %rax
jmp 0x3e8a8
jmp 0x3e8b8
movq %rax, %rbp
leaq 0xb8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3e8bb
callq 0x2f6c0
jmp 0x3e8bb
movq %rax, %rbp
leaq 0x50(%rsp), %rdi
callq 0x30d90
jmp 0x3e91c
movq %rax, %rbp
jmp 0x3e91c
movq %rax, %rbp
jmp 0x3e935
movq %rax, %rbp
jmp 0x3e93d
jmp 0x3e8e7
jmp 0x3e8e7
movq %rax, %rbp
movq %r15, %rdi
callq 0x2f6c0
jmp 0x3e912
movq %rax, %rbp
jmp 0x3e8fe
movq %rax, %rbp
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x3e8fe
callq 0x2f370
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x3e912
callq 0x2f370
jmp 0x3e912
movq %rax, %rbp
movq 0x10(%rsp), %r12
movq 0x8(%rsp), %r13
movq 0xe0(%rbx), %rdi
testq %rdi, %rdi
je 0x3e92d
callq 0x2f370
movq %r13, %rdi
callq 0x2ebb0
movq %r12, %rdi
callq 0x2ebb0
movq 0x18(%rsp), %rdi
callq 0x2e4c0
movq 0x20(%rsp), %rdi
callq 0x300b0
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x3e95f
callq 0x2f370
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x3e96d
callq 0x2f370
movq %rbp, %rdi
callq 0x30a10
nop