// File: xjrueda[P]fixprime/src/Node.cpp
// Function: fprime::Node::setField(std::shared_ptr<fprime::Field>)
void Node::setField(fprime::Field::FieldPtr fld) {
        try {
            if (fld == nullptr)
                throw runtime_error("Invalid field assigment to node.");
            fprime::DataHolderFactory factory;
            value = factory.create(fld->getDataType());

            if (_type == GROUP_INSTANCE) {
                throw runtime_error("The method is not available for groups instances.");
            }

            if (_type == ROOT_NODE) {
                stringstream ss;
                ss << "This method is not available for root nodes. setting field " << fld->getId();
                throw runtime_error(ss.str());
            }

            //            if (_type == REPEATING_GROUP) {
            //                value->set("0");
            //            }
            field = fld;
        } catch (exception& e) {
            throw runtime_error("at Node.setField: " + string(e.what()));
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2e0, %rsp            # imm = 0x2E0
movq %rsi, -0x2a0(%rbp)
movq %rdi, %rax
movq -0x2a0(%rbp), %rdi
movq %rdi, -0x298(%rbp)
movq %rax, -0x8(%rbp)
movq %rdi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x290(%rbp)
xorl %eax, %eax
movl %eax, %esi
callq 0x9b970
testb $0x1, %al
jne 0xcc1c5
jmp 0xcc237
movl $0x10, %edi
callq 0x99e80
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x2a8(%rbp)
leaq 0x371a2(%rip), %rsi     # 0x103385
callq 0x99380
jmp 0xcc1ea
movq -0x2a8(%rbp), %rdi
movq 0x66de0(%rip), %rsi     # 0x132fd8
movq 0x66ba1(%rip), %rdx     # 0x132da0
callq 0xa2fe0
jmp 0xcc5f5
movq -0x2a8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
callq 0x9b9c0
jmp 0xcc49a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0xcc49a
leaq -0x58(%rbp), %rdi
callq 0xa42e0
jmp 0xcc242
movq -0x298(%rbp), %rdi
callq 0x9d390
movq %rax, %rsi
leaq -0x88(%rbp), %rdi
callq 0x9f700
jmp 0xcc25f
leaq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rsi
leaq -0x88(%rbp), %rdx
callq 0x9e630
jmp 0xcc275
movq -0x290(%rbp), %rdi
addq $0x10, %rdi
leaq -0x68(%rbp), %rsi
callq 0x9d1f0
leaq -0x68(%rbp), %rdi
callq 0xa1ae0
leaq -0x88(%rbp), %rdi
callq 0xa4f00
movq -0x290(%rbp), %rax
cmpl $0x3, 0x8(%rax)
jne 0xcc33e
movl $0x10, %edi
callq 0x99e80
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x2b0(%rbp)
leaq 0x370d9(%rip), %rsi     # 0x1033a6
callq 0x99380
jmp 0xcc2d4
movq -0x2b0(%rbp), %rdi
movq 0x66cf6(%rip), %rsi     # 0x132fd8
movq 0x66ab7(%rip), %rdx     # 0x132da0
callq 0xa2fe0
jmp 0xcc5f5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0xcc491
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
leaq -0x88(%rbp), %rdi
callq 0xa4f00
jmp 0xcc491
movq -0x2b0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
callq 0x9b9c0
jmp 0xcc491
movq -0x290(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jne 0xcc46c
leaq -0x210(%rbp), %rdi
callq 0x9b940
jmp 0xcc35d
leaq -0x200(%rbp), %rdi
leaq 0x3706d(%rip), %rsi     # 0x1033d8
callq 0x9dba0
movq %rax, -0x2b8(%rbp)
jmp 0xcc379
movq -0x298(%rbp), %rdi
callq 0x9d390
movq %rax, %rdi
callq 0x9d720
movl %eax, -0x2bc(%rbp)
jmp 0xcc395
movl -0x2bc(%rbp), %esi
movq -0x2b8(%rbp), %rdi
callq 0xa0150
jmp 0xcc3a9
movb $0x1, -0x231(%rbp)
movl $0x10, %edi
callq 0x99e80
movq %rax, -0x2c8(%rbp)
leaq -0x230(%rbp), %rdi
leaq -0x210(%rbp), %rsi
callq 0x9da80
jmp 0xcc3d6
movq -0x2c8(%rbp), %rdi
leaq -0x230(%rbp), %rsi
callq 0xa2430
jmp 0xcc3eb
movq -0x2c8(%rbp), %rdi
movb $0x0, -0x231(%rbp)
movq 0x66bd8(%rip), %rsi     # 0x132fd8
movq 0x66999(%rip), %rdx     # 0x132da0
callq 0xa2fe0
jmp 0xcc5f5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0xcc45e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0xcc445
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
leaq -0x230(%rbp), %rdi
callq 0xa4f00
testb $0x1, -0x231(%rbp)
jne 0xcc450
jmp 0xcc45c
movq -0x2c8(%rbp), %rdi
callq 0x9b9c0
jmp 0xcc45e
leaq -0x210(%rbp), %rdi
callq 0x9bca0
jmp 0xcc491
movq -0x298(%rbp), %rsi
movq -0x290(%rbp), %rdi
addq $0x28, %rdi
callq 0x992c0
leaq -0x58(%rbp), %rdi
callq 0xa4380
jmp 0xcc5db
leaq -0x58(%rbp), %rdi
callq 0xa4380
movl -0x1c(%rbp), %eax
movl $0x1, %ecx
cmpl %ecx, %eax
jne 0xcc5e4
movq -0x18(%rbp), %rdi
callq 0x99540
movq %rax, -0x240(%rbp)
movb $0x1, -0x282(%rbp)
movl $0x10, %edi
callq 0x99e80
movq %rax, -0x2e0(%rbp)
movq -0x240(%rbp), %rdi
movq (%rdi), %rax
movq 0x10(%rax), %rax
callq *%rax
movq %rax, -0x2d8(%rbp)
leaq -0x281(%rbp), %rdi
movq %rdi, -0x2d0(%rbp)
callq 0xa35e0
movq -0x2d8(%rbp), %rsi
movq -0x2d0(%rbp), %rdx
leaq -0x280(%rbp), %rdi
callq 0xa0510
jmp 0xcc518
leaq 0x36ef5(%rip), %rsi     # 0x103414
leaq -0x260(%rbp), %rdi
leaq -0x280(%rbp), %rdx
callq 0xa2cb0
jmp 0xcc534
movq -0x2e0(%rbp), %rdi
leaq -0x260(%rbp), %rsi
callq 0xa2430
jmp 0xcc549
movq -0x2e0(%rbp), %rdi
movb $0x0, -0x282(%rbp)
movq 0x66a7a(%rip), %rsi     # 0x132fd8
movq 0x6683b(%rip), %rdx     # 0x132da0
callq 0xa2fe0
jmp 0xcc5f5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0xcc5af
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0xcc5a3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
leaq -0x260(%rbp), %rdi
callq 0xa4f00
leaq -0x280(%rbp), %rdi
callq 0xa4f00
leaq -0x281(%rbp), %rdi
callq 0x9e350
testb $0x1, -0x282(%rbp)
jne 0xcc5c6
jmp 0xcc5d2
movq -0x2e0(%rbp), %rdi
callq 0x9b9c0
callq 0xa2520
jmp 0xcc5d9
jmp 0xcc5e4
addq $0x2e0, %rsp            # imm = 0x2E0
popq %rbp
retq
movq -0x18(%rbp), %rdi
callq 0xa3520
movq %rax, %rdi
callq 0xa6900
nopw %cs:(%rax,%rax)