// File: /workspace/github_cpp_makefile_star2_O2/xjrueda[P]fixprime/src/Node.cpp
// Function: fprime::Node::operator=(fprime::Node const&)
fprime::Node& Node::operator=(const fprime::Node& other) {
        _type = other._type;
        value = other.value;
        isRequired = other.isRequired;
        field = other.field;
        protocolPtr = other.protocolPtr;
        componentPtr = other.componentPtr;

        fprime::DataHolderFactory factory;

        if (other._type == fprime::Node::NodeType::FIELD_NODE) {
            fprime::DataHolderFactory factory;
            value = factory.create(other.field->getDataType());
            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;
        }
        return *this;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rsi, %r14
movq %rdi, %rbx
movl 0x8(%rsi), %eax
movl %eax, 0x8(%rdi)
leaq 0x10(%rsi), %r12
leaq 0x10(%rdi), %r15
movq %r15, %rdi
movq %r12, %rsi
callq 0x41000
movb 0x20(%r14), %al
movb %al, 0x20(%rbx)
leaq 0x28(%r14), %r13
leaq 0x28(%rbx), %rdi
movq %r13, %rsi
callq 0x3edd0
movq 0xd0(%r14), %rax
movq %rax, 0xd0(%rbx)
movl $0xd8, %edi
leaq (%r14,%rdi), %rsi
movq %rbx, 0x8(%rsp)
addq %rbx, %rdi
callq 0x40350
leaq 0xd0(%rsp), %rdi
callq 0x426b0
cmpl $0x1, 0x8(%r14)
jne 0x4efae
leaq 0x38(%rsp), %rdi
callq 0x426b0
movq (%r13), %rsi
leaq 0xb0(%rsp), %rdi
callq 0x40e10
leaq 0x10(%rsp), %rdi
leaq 0x38(%rsp), %rsi
leaq 0xb0(%rsp), %rdx
callq 0x40870
leaq 0x10(%rsp), %rsi
movq %r15, %rdi
callq 0x3f600
leaq 0x18(%rsp), %rdi
callq 0x40650
leaq 0xb0(%rsp), %rdi
callq 0x3ef50
movq (%r13), %rsi
leaq 0x90(%rsp), %rdi
callq 0x40e10
leaq 0x10(%rsp), %rdi
leaq 0x38(%rsp), %rsi
leaq 0x90(%rsp), %rdx
callq 0x40870
leaq 0x10(%rsp), %rsi
movq %r15, %rdi
callq 0x3f600
leaq 0x18(%rsp), %rdi
callq 0x40650
leaq 0x90(%rsp), %rdi
callq 0x3ef50
movq (%r12), %rsi
movq (%rsi), %rax
leaq 0x10(%rsp), %rdi
callq *0x18(%rax)
movq (%r15), %rbx
leaq 0x70(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x412d0
movq (%rbx), %rax
leaq 0x70(%rsp), %rsi
movq %rbx, %rdi
callq *0x10(%rax)
leaq 0x70(%rsp), %rdi
callq 0x3ef50
leaq 0x10(%rsp), %rdi
callq 0x3ef50
leaq 0x38(%rsp), %rdi
callq 0x42700
movq 0x8(%rsp), %rbx
leaq 0x38(%rbx), %r12
movq %r12, %rdi
callq 0x41720
leaq 0x50(%rbx), %r13
movq %r13, %rdi
callq 0x3f190
movq 0x38(%r14), %r15
leaq 0x38(%rsp), %rbp
cmpq 0x40(%r14), %r15
je 0x4f0a1
movl $0xe8, %edi
callq 0x405e0
movq %rax, %rbx
movq (%r15), %rsi
movq %rax, %rdi
callq 0x42590
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x418c0
movq %r12, %rdi
movq %rbp, %rsi
callq 0x40da0
movl 0x8(%r14), %eax
cmpl $0x3, %eax
je 0x4f019
testl %eax, %eax
jne 0x4f05c
movq 0x38(%rsp), %rsi
leaq 0x10(%rsp), %rdi
callq 0x406d0
movq 0x10(%rsp), %rdi
callq 0x40430
movl %eax, 0x34(%rsp)
movq %r13, %rdi
leaq 0x34(%rsp), %rsi
callq 0x3fb80
movq %rax, %rdi
movq %rbp, %rsi
callq 0x3f870
leaq 0x18(%rsp), %rdi
callq 0x40650
movl 0x8(%r14), %eax
cmpl $0x2, %eax
jne 0x4f08e
movq 0x8(%rsp), %rcx
movq 0x40(%rcx), %rax
subq 0x38(%rcx), %rax
shrq $0x4, %rax
movl %eax, 0x10(%rsp)
movq %r13, %rdi
leaq 0x10(%rsp), %rsi
callq 0x3fb80
movq %rax, %rdi
movq %rbp, %rsi
callq 0x3f870
leaq 0x40(%rsp), %rdi
callq 0x40650
addq $0x10, %r15
jmp 0x4efd4
leaq 0xd0(%rsp), %rdi
callq 0x42700
movq 0x8(%rsp), %rax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq 0x70(%rsp), %rdi
callq 0x3ef50
jmp 0x4f0d7
movq %rax, %r14
leaq 0x10(%rsp), %rdi
jmp 0x4f0fa
jmp 0x4f101
movq %rax, %r14
leaq 0x90(%rsp), %rdi
jmp 0x4f0fa
jmp 0x4f101
movq %rax, %r14
leaq 0xb0(%rsp), %rdi
callq 0x3ef50
jmp 0x4f104
movq %rax, %r14
leaq 0x38(%rsp), %rdi
callq 0x42700
jmp 0x4f144
jmp 0x4f141
jmp 0x4f116
jmp 0x4f116
movq %rax, %r14
jmp 0x4f135
movq %rax, %r14
movq %rbx, %rdi
callq 0x403f0
jmp 0x4f144
movq %rax, %r14
leaq 0x18(%rsp), %rdi
callq 0x40650
leaq 0x40(%rsp), %rdi
callq 0x40650
jmp 0x4f144
movq %rax, %r14
leaq 0xd0(%rsp), %rdi
callq 0x42700
movq %r14, %rdi
callq 0x42200
nop