// File: /workspace/github_cpp_makefile_star2_O1/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 0x336e2(%rip), %rax     # 0x71ef8
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 0x3e85a
movq 0x3360c(%rip), %rcx     # 0x71e58
cmpb $0x0, (%rcx)
je 0x3e856
incl 0x8(%rax)
jmp 0x3e85a
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
movq 0xd0(%rbp), %rax
movq %rax, 0xd0(%rbx)
movq 0xd8(%rbp), %rax
movq %rax, 0xd8(%rbx)
movq 0xe0(%rbp), %rax
movq %rax, 0xe0(%rbx)
testq %rax, %rax
je 0x3e8f7
movq 0x3356f(%rip), %rcx     # 0x71e58
cmpb $0x0, (%rcx)
je 0x3e8f3
incl 0x8(%rax)
jmp 0x3e8f7
lock
incl 0x8(%rax)
movl 0x8(%rbp), %eax
decl %eax
cmpl $0x1, %eax
ja 0x3e9f7
leaq 0x50(%rsp), %rdi
callq 0x30d70
movq 0x28(%rbp), %rsi
leaq 0xa8(%rsp), %rdi
callq 0x2fdd0
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 0x3e956
callq 0x2f370
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x3e965
callq 0x2f370
leaq 0xb8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3e97b
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 0x3e9da
callq 0x2f6c0
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3e9ed
callq 0x2f6c0
leaq 0x50(%rsp), %rdi
callq 0x30da0
movq %r13, 0x8(%rsp)
movq %r12, 0x10(%rsp)
movq 0x20(%rsp), %rdi
callq 0x30360
movq 0x18(%rsp), %rdi
callq 0x2eb60
movq 0x38(%rbp), %r13
cmpq 0x40(%rbp), %r13
je 0x3eb18
leaq 0x58(%rsp), %r12
leaq 0x30(%rsp), %r14
movl $0xe8, %edi
callq 0x2f830
movq %rax, %r15
movq (%r13), %rsi
movq %rax, %rdi
callq 0x30c90
movq %r15, 0x50(%rsp)
movq %r12, %rdi
movq %r15, %rsi
callq 0x2e4a0
movq 0x20(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x2fd90
movl 0x8(%rbp), %eax
cmpl $0x3, %eax
je 0x3ea71
testl %eax, %eax
jne 0x3eac1
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 0x30cf0
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x3eac1
callq 0x2f370
cmpl $0x2, 0x8(%rbp)
jne 0x3eafb
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 0x30cf0
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x3eb0a
callq 0x2f370
addq $0x10, %r13
cmpq 0x40(%rbp), %r13
jne 0x3ea2d
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 0x3eb44
callq 0x2f6c0
jmp 0x3eb44
movq %rax, %rbp
leaq 0x40(%rsp), %rax
jmp 0x3eb58
jmp 0x3eb68
movq %rax, %rbp
leaq 0xb8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3eb6b
callq 0x2f6c0
jmp 0x3eb6b
movq %rax, %rbp
leaq 0x50(%rsp), %rdi
callq 0x30da0
jmp 0x3ebcc
movq %rax, %rbp
jmp 0x3ebcc
movq %rax, %rbp
jmp 0x3ebe5
movq %rax, %rbp
jmp 0x3ebed
jmp 0x3eb97
jmp 0x3eb97
movq %rax, %rbp
movq %r15, %rdi
callq 0x2f6c0
jmp 0x3ebc2
movq %rax, %rbp
jmp 0x3ebae
movq %rax, %rbp
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x3ebae
callq 0x2f370
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x3ebc2
callq 0x2f370
jmp 0x3ebc2
movq %rax, %rbp
movq 0x10(%rsp), %r12
movq 0x8(%rsp), %r13
movq 0xe0(%rbx), %rdi
testq %rdi, %rdi
je 0x3ebdd
callq 0x2f370
movq %r13, %rdi
callq 0x2ebb0
movq %r12, %rdi
callq 0x2ebb0
movq 0x18(%rsp), %rdi
callq 0x2e4c0
movq 0x20(%rsp), %rdi
callq 0x300c0
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x3ec0f
callq 0x2f370
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x3ec1d
callq 0x2f370
movq %rbp, %rdi
callq 0x30a20
nop