// File: /workspace/github_cpp_makefile_star2_O2/xjrueda[P]fixprime/src/Protocol.cpp
// Function: fprime::Protocol::loadMessages()
void Protocol::loadMessages() {
        try {
            if (protocolSpec["Messages"].empty()) {
                throw std::runtime_error("No messages specified for current  protocol ");
            } else {
                // gets the header and trailer specifications
                Json::Value headerSpec = protocolSpec["Components"]["StandardHeader"];
                Json::Value trailerSpec = protocolSpec["Components"]["StandardTrailer"];
                fprime::Node::NodePtr header(new fprime::Node(fprime::Node::ROOT_NODE));
                fprime::Node::NodePtr trailer(new fprime::Node(fprime::Node::ROOT_NODE));
                try {
                    populateNode(header, headerSpec, true);
                    header->getChild(8)->setValue(version);
                } catch (exception& e) {
                    throw std::runtime_error("Error populating header node: " + string(e.what()));
                }
                try {
                    populateNode(trailer, trailerSpec, true);
                } catch (exception& e) {
                    throw std::runtime_error("Error populating trailer node: " + string(e.what()));
                }

                //Gets the message list of the session layer
                std::vector<string> messageList = protocolSpec["Messages"].getMemberNames();
                // process the message list
                for (std::vector<string>::iterator itr = messageList.begin(); itr != messageList.end(); itr++) {
                    try {
                        fprime::Message message(*itr);
                        fprime::Node::NodePtr currentHeader(new fprime::Node(fprime::Node::ROOT_NODE));
                        fprime::Node::NodePtr currentTrailer(new fprime::Node(fprime::Node::ROOT_NODE));
                        currentHeader = header;
                        currentTrailer = trailer;
                        currentHeader->getChild(35)->setValue(string(*itr));
                        
                        Json::Value bodySpec = protocolSpec["Messages"][*itr];
                        fprime::Node::NodePtr body(new fprime::Node(fprime::Node::ROOT_NODE));
                        populateNode(body, bodySpec, true);
  
                        message.setHeader(currentHeader);
                        message.setTrailer(currentTrailer);
                        message.setBody(body);
                        messages[*itr] = message;
                    } catch (exception& e) {
                        throw std::runtime_error("Exception loading message " + *itr + " : " + string(e.what()));
                    }
                }
            }
        } catch (exception& e) {
            throw std::runtime_error("at Protocol.LoadMessages: " + string(e.what()));
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2b8, %rsp            # imm = 0x2B8
movq %rdi, 0x8(%rsp)
addq $0x28, %rdi
leaq 0x14139(%rip), %rsi     # 0x66904
movq %rdi, 0x18(%rsp)
callq 0x3ed60
movq %rax, %rdi
callq 0x423b0
testb %al, %al
jne 0x52cd1
leaq 0x13ed9(%rip), %rsi     # 0x666c5
movq 0x18(%rsp), %rdi
callq 0x3ed60
leaq 0x1413d(%rip), %rsi     # 0x6693a
movq %rax, %rdi
callq 0x3ed60
leaq 0x190(%rsp), %rdi
movq %rax, %rsi
callq 0x41bd0
leaq 0x13ea9(%rip), %rsi     # 0x666c5
movq 0x18(%rsp), %rdi
callq 0x3ed60
leaq 0x1411c(%rip), %rsi     # 0x66949
movq %rax, %rdi
callq 0x3ed60
leaq 0x1d8(%rsp), %rdi
movq %rax, %rsi
callq 0x41bd0
movl $0xe8, %edi
callq 0x405e0
movq %rax, %r15
movq %rax, %rdi
xorl %esi, %esi
callq 0x41f90
leaq 0x30(%rsp), %rdi
movq %r15, %rsi
callq 0x418c0
movl $0xe8, %edi
callq 0x405e0
movq %rax, %r15
movq %rax, %rdi
xorl %esi, %esi
callq 0x41f90
leaq 0x88(%rsp), %rdi
movq %r15, %rsi
callq 0x418c0
leaq 0xd0(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x3e1b0
leaq 0x228(%rsp), %rdi
leaq 0x190(%rsp), %rsi
callq 0x41bd0
leaq 0xd0(%rsp), %rsi
leaq 0x228(%rsp), %rdx
pushq $0x1
popq %rcx
movq 0x8(%rsp), %rdi
callq 0x3f750
leaq 0x228(%rsp), %rdi
callq 0x3f200
leaq 0xd8(%rsp), %rdi
callq 0x40650
movq 0x30(%rsp), %rsi
leaq 0xf8(%rsp), %rdi
pushq $0x8
popq %rdx
callq 0x40840
movq 0xf8(%rsp), %rbx
movq 0x8(%rsp), %rax
leaq 0x8(%rax), %rsi
leaq 0x1b8(%rsp), %rdi
callq 0x412d0
leaq 0x1b8(%rsp), %rsi
movq %rbx, %rdi
callq 0x3f400
leaq 0x1b8(%rsp), %rdi
callq 0x3ef50
leaq 0x100(%rsp), %rdi
callq 0x40650
leaq 0xc0(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x3e1b0
leaq 0x200(%rsp), %rdi
leaq 0x1d8(%rsp), %rsi
callq 0x41bd0
leaq 0xc0(%rsp), %rsi
leaq 0x200(%rsp), %rdx
pushq $0x1
popq %rcx
movq 0x8(%rsp), %rdi
callq 0x3f750
leaq 0x200(%rsp), %rdi
callq 0x3f200
leaq 0xc8(%rsp), %rdi
callq 0x40650
leaq 0x13f51(%rip), %rsi     # 0x66904
movq 0x18(%rsp), %rdi
callq 0x3ed60
leaq 0xe0(%rsp), %rdi
movq %rax, %rsi
callq 0x3fd40
movq 0xe0(%rsp), %rsi
movq 0x8(%rsp), %rax
addq $0xc0, %rax
movq %rax, 0x98(%rsp)
leaq 0x250(%rsp), %r12
leaq 0xf8(%rsp), %r13
leaq 0x40(%rsp), %rbx
leaq 0x270(%rsp), %rbp
leaq 0x290(%rsp), %r15
cmpq 0xe8(%rsp), %rsi
je 0x52c81
movq %r12, %rdi
movq %rsi, 0x10(%rsp)
callq 0x412d0
movq %r13, %rdi
movq %r12, %rsi
callq 0x3ee00
movq %r12, %rdi
callq 0x3ef50
movl $0xe8, %edi
callq 0x405e0
movq %rax, %r12
movq %rax, %rdi
xorl %esi, %esi
callq 0x41f90
leaq 0x68(%rsp), %rdi
movq %r12, %rsi
callq 0x418c0
movl $0xe8, %edi
callq 0x405e0
movq %rax, %r12
movq %rax, %rdi
xorl %esi, %esi
callq 0x41f90
leaq 0xa0(%rsp), %rdi
movq %r12, %rsi
callq 0x418c0
movq %r15, %r14
movq %r13, %r15
leaq 0x68(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x3f870
leaq 0xa0(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x3f870
movq 0x68(%rsp), %rsi
movq %rbx, %r13
movq %rbx, %rdi
pushq $0x23
popq %rdx
callq 0x40840
movq 0x40(%rsp), %r12
movq %rbp, %rbx
movq %rbp, %rdi
movq 0x10(%rsp), %rsi
callq 0x412d0
movq %r12, %rdi
movq %rbx, %rsi
callq 0x3f400
movq %rbx, %rdi
callq 0x3ef50
leaq 0x48(%rsp), %rdi
callq 0x40650
movq 0x18(%rsp), %rdi
leaq 0x13e03(%rip), %rsi     # 0x66904
callq 0x3ed60
movq %r13, %rbx
movq %rax, %rdi
movq 0x10(%rsp), %rsi
callq 0x42770
movq %rbx, %rdi
movq %rax, %rsi
callq 0x41bd0
movl $0xe8, %edi
callq 0x405e0
movq %rax, %r12
movq %r15, %r13
movq %rax, %rdi
xorl %esi, %esi
callq 0x41f90
leaq 0x20(%rsp), %rdi
movq %r12, %rsi
callq 0x418c0
leaq 0x180(%rsp), %r15
movq %r15, %rdi
leaq 0x20(%rsp), %rsi
callq 0x3e1b0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x41bd0
movq 0x8(%rsp), %rdi
movq %r15, %rsi
movq %r14, %rdx
pushq $0x1
popq %rcx
callq 0x3f750
movq %r14, %r15
movq %r14, %rdi
callq 0x3f200
leaq 0x188(%rsp), %rdi
callq 0x40650
leaq 0x170(%rsp), %r14
movq %r14, %rdi
leaq 0x68(%rsp), %rsi
callq 0x3e1b0
movq %r13, %rdi
movq %r14, %rsi
callq 0x40050
leaq 0x178(%rsp), %rdi
callq 0x40650
leaq 0x160(%rsp), %r14
movq %r14, %rdi
leaq 0xa0(%rsp), %rsi
callq 0x3e1b0
movq %r13, %rdi
movq %r14, %rsi
callq 0x424e0
leaq 0x168(%rsp), %rdi
callq 0x40650
leaq 0x150(%rsp), %r14
movq %r14, %rdi
leaq 0x20(%rsp), %rsi
callq 0x3e1b0
movq %r13, %rdi
movq %r14, %rsi
callq 0x42600
leaq 0x158(%rsp), %rdi
callq 0x40650
movq 0x98(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x3e550
movq %rax, %rdi
movq %r13, %rsi
callq 0x3f940
leaq 0x28(%rsp), %rdi
callq 0x40650
movq %rbx, %rdi
callq 0x3f200
leaq 0xa8(%rsp), %rdi
callq 0x40650
leaq 0x70(%rsp), %rdi
callq 0x40650
movq %r13, %rdi
callq 0x3f990
movq 0x10(%rsp), %rsi
addq $0x20, %rsi
leaq 0x250(%rsp), %r12
jmp 0x52a0d
leaq 0xe0(%rsp), %rdi
callq 0x3fb10
leaq 0x90(%rsp), %rdi
callq 0x40650
leaq 0x38(%rsp), %rdi
callq 0x40650
leaq 0x1d8(%rsp), %rdi
callq 0x3f200
leaq 0x190(%rsp), %rdi
callq 0x3f200
addq $0x2b8, %rsp            # imm = 0x2B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x3f0e0
movq %rax, %r15
leaq 0x13c2a(%rip), %rsi     # 0x6690d
movq %rax, %rdi
callq 0x3ecd0
movq 0x2c2e6(%rip), %rsi     # 0x7efd8
movq 0x2c0cf(%rip), %rdx     # 0x7edc8
movq %r15, %rdi
callq 0x42050
jmp 0x532b1
movq %rdx, %r14
movq %rax, %rbx
movq %r15, %rdi
callq 0x3faf0
jmp 0x53229
movq %rdx, %r14
movq %rax, %rbx
leaq 0x200(%rsp), %rdi
callq 0x3f200
jmp 0x52d34
movq %rdx, %r14
movq %rax, %rbx
leaq 0xc8(%rsp), %rdi
callq 0x40650
cmpl $0x1, %r14d
jne 0x531f8
movq %rbx, %rdi
callq 0x3ed90
movq %rax, %rbx
pushq $0x10
popq %rdi
callq 0x3f0e0
movq %rax, %r15
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
leaq 0x40(%rsp), %rdi
leaq 0x68(%rsp), %rdx
movq %rax, %rsi
callq 0x3ed70
leaq 0x13bf5(%rip), %rsi     # 0x66978
leaq 0xf8(%rsp), %rdi
leaq 0x40(%rsp), %rdx
callq 0x41f00
movb $0x1, %bpl
leaq 0xf8(%rsp), %rsi
movq %r15, %rdi
callq 0x41c90
xorl %ebp, %ebp
movq 0x2c227(%rip), %rsi     # 0x7efd8
movq 0x2c010(%rip), %rdx     # 0x7edc8
movq %r15, %rdi
callq 0x42050
jmp 0x532b1
movq %rdx, %r14
movq %rax, %rbx
leaq 0xf8(%rsp), %rdi
callq 0x3ef50
jmp 0x52de3
movq %rdx, %r14
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x40(%rsp), %rdi
callq 0x3ef50
testb %bpl, %bpl
jne 0x52dfa
jmp 0x52e02
movq %rdx, %r14
movq %rax, %rbx
movq %r15, %rdi
callq 0x3faf0
callq 0x41d30
jmp 0x531f8
movq %rdx, %r14
movq %rax, %rbx
leaq 0x1b8(%rsp), %rdi
callq 0x3ef50
jmp 0x52e27
movq %rdx, %r14
movq %rax, %rbx
leaq 0x100(%rsp), %rdi
jmp 0x52e5c
movq %rdx, %r14
movq %rax, %rbx
jmp 0x52e61
movq %rdx, %r14
movq %rax, %rbx
leaq 0x228(%rsp), %rdi
callq 0x3f200
jmp 0x52e54
movq %rdx, %r14
movq %rax, %rbx
leaq 0xd8(%rsp), %rdi
callq 0x40650
cmpl $0x1, %r14d
jne 0x531f8
movq %rbx, %rdi
callq 0x3ed90
movq %rax, %rbx
pushq $0x10
popq %rdi
callq 0x3f0e0
movq %rax, %r15
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
leaq 0x40(%rsp), %rdi
leaq 0x68(%rsp), %rdx
movq %rax, %rsi
callq 0x3ed70
leaq 0x13ab6(%rip), %rsi     # 0x66959
leaq 0xf8(%rsp), %rdi
leaq 0x40(%rsp), %rdx
callq 0x41f00
movb $0x1, %bpl
leaq 0xf8(%rsp), %rsi
movq %r15, %rdi
callq 0x41c90
xorl %ebp, %ebp
movq 0x2c107(%rip), %rsi     # 0x7efd8
movq 0x2bef0(%rip), %rdx     # 0x7edc8
movq %r15, %rdi
callq 0x42050
jmp 0x532b1
movq %rdx, %r14
movq %rax, %rbx
leaq 0xf8(%rsp), %rdi
callq 0x3ef50
jmp 0x52f03
movq %rdx, %r14
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x40(%rsp), %rdi
callq 0x3ef50
testb %bpl, %bpl
jne 0x52f40
jmp 0x52f48
movq %rdx, %r14
movq %rax, %rbx
movq %r15, %rdi
callq 0x403f0
jmp 0x53205
movq %rdx, %r14
movq %rax, %rbx
movq %r15, %rdi
callq 0x403f0
jmp 0x5320f
movq %rdx, %r14
movq %rax, %rbx
movq %r15, %rdi
callq 0x3faf0
callq 0x41d30
jmp 0x531f8
movq %rdx, %r14
movq %rax, %rbx
jmp 0x531f8
movq %rdx, %r14
movq %rax, %rbx
jmp 0x53205
movq %rdx, %r14
movq %rax, %rbx
jmp 0x5320f
jmp 0x52f80
movq %rdx, %r14
movq %rax, %rbx
jmp 0x5321c
movq %rdx, %r14
movq %rax, %rbx
jmp 0x53229
movq %rdx, %r14
movq %rax, %rbx
leaq 0x168(%rsp), %rdi
jmp 0x52fde
movq %rdx, %r14
movq %rax, %rbx
leaq 0x158(%rsp), %rdi
jmp 0x52fde
movq %rdx, %r14
movq %rax, %rbx
jmp 0x52fc6
movq %rdx, %r14
movq %rax, %rbx
leaq 0x290(%rsp), %rdi
callq 0x3f200
leaq 0x188(%rsp), %rdi
jmp 0x52fde
movq %rdx, %r14
movq %rax, %rbx
leaq 0x178(%rsp), %rdi
callq 0x40650
jmp 0x53070
movq %rdx, %r14
movq %rax, %rbx
movq %r12, %rdi
callq 0x403f0
jmp 0x530b1
movq %rdx, %r14
movq %rax, %rbx
movq %r12, %rdi
callq 0x403f0
jmp 0x53082
movq %rdx, %r14
movq %rax, %rbx
jmp 0x530c8
jmp 0x5309e
movq %rdx, %r14
movq %rax, %rbx
leaq 0x250(%rsp), %rdi
callq 0x3ef50
jmp 0x530c8
movq %rdx, %r14
movq %rax, %rbx
jmp 0x5305e
movq %rdx, %r14
movq %rax, %rbx
movq %r12, %rdi
callq 0x403f0
jmp 0x530bb
movq %rdx, %r14
movq %rax, %rbx
leaq 0x270(%rsp), %rdi
callq 0x3ef50
leaq 0x48(%rsp), %rdi
callq 0x40650
jmp 0x530a4
movq %rdx, %r14
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x40650
jmp 0x53082
movq %rdx, %r14
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x3f200
jmp 0x530a4
movq %rdx, %r14
movq %rax, %rbx
jmp 0x530b1
movq %rdx, %r14
movq %rax, %rbx
jmp 0x530bb
movq %rdx, %r14
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
callq 0x40650
leaq 0x70(%rsp), %rdi
callq 0x40650
leaq 0xf8(%rsp), %rdi
callq 0x3f990
cmpl $0x1, %r14d
jne 0x531eb
movq %rbx, %rdi
callq 0x3ed90
movq %rax, %rbx
pushq $0x10
popq %rdi
callq 0x3f0e0
movq %rax, %r12
leaq 0x138a9(%rip), %rsi     # 0x66998
leaq 0x68(%rsp), %rdi
movq 0x10(%rsp), %rdx
callq 0x40140
leaq 0x1349b(%rip), %rdx     # 0x665a0
leaq 0x40(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x3e640
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
leaq 0xa0(%rsp), %rdi
leaq 0x20(%rsp), %rdx
movq %rax, %rsi
callq 0x3ed70
leaq 0xf8(%rsp), %rdi
leaq 0x40(%rsp), %rsi
leaq 0xa0(%rsp), %rdx
callq 0x3ffe0
movb $0x1, %bpl
leaq 0xf8(%rsp), %rsi
movq %r12, %rdi
callq 0x41c90
xorl %ebp, %ebp
movq 0x2be70(%rip), %rsi     # 0x7efd8
movq 0x2bc59(%rip), %rdx     # 0x7edc8
movq %r12, %rdi
callq 0x42050
jmp 0x532b1
movq %rdx, %r14
movq %rax, %rbx
leaq 0xf8(%rsp), %rdi
callq 0x3ef50
jmp 0x5319a
movq %rdx, %r14
movq %rax, %rbx
movb $0x1, %bpl
leaq 0xa0(%rsp), %rdi
callq 0x3ef50
jmp 0x531b2
movq %rdx, %r14
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x40(%rsp), %rdi
callq 0x3ef50
jmp 0x531c7
movq %rdx, %r14
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x68(%rsp), %rdi
callq 0x3ef50
testb %bpl, %bpl
jne 0x531de
jmp 0x531e6
movq %rdx, %r14
movq %rax, %rbx
movq %r12, %rdi
callq 0x3faf0
callq 0x41d30
leaq 0xe0(%rsp), %rdi
callq 0x3fb10
leaq 0x90(%rsp), %rdi
callq 0x40650
leaq 0x38(%rsp), %rdi
callq 0x40650
leaq 0x1d8(%rsp), %rdi
callq 0x3f200
leaq 0x190(%rsp), %rdi
callq 0x3f200
cmpl $0x1, %r14d
jne 0x532ed
movq %rbx, %rdi
callq 0x3ed90
movq %rax, %rbx
pushq $0x10
popq %rdi
callq 0x3f0e0
movq %rax, %r14
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
leaq 0x190(%rsp), %rdi
leaq 0x1d8(%rsp), %rdx
movq %rax, %rsi
callq 0x3ed70
leaq 0x13742(%rip), %rsi     # 0x669b3
leaq 0xf8(%rsp), %rdi
leaq 0x190(%rsp), %rdx
callq 0x41f00
movb $0x1, %bpl
leaq 0xf8(%rsp), %rsi
movq %r14, %rdi
callq 0x41c90
xorl %ebp, %ebp
movq 0x2bd36(%rip), %rsi     # 0x7efd8
movq 0x2bb1f(%rip), %rdx     # 0x7edc8
movq %r14, %rdi
callq 0x42050
movq %rax, %rbx
leaq 0xf8(%rsp), %rdi
callq 0x3ef50
jmp 0x532c9
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x190(%rsp), %rdi
callq 0x3ef50
testb %bpl, %bpl
jne 0x532e0
jmp 0x532e8
movq %rax, %rbx
movq %r14, %rdi
callq 0x3faf0
callq 0x41d30
movq %rbx, %rdi
callq 0x42200
movq %rax, %rdi
callq 0x43915
nop