// File: /workspace/github_cpp_makefile_star2_O2/xjrueda[P]fixprime/src/FixDictionary.cpp
// Function: fprime::FixDictionary::loadProtocols(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void FixDictionary::loadProtocols(string fileName) {
        FixLoader loader;
        Json::Value protocolList = loader.parseFile(fileName);
        if (protocolList.empty()) {
            throw std::runtime_error("Protocol list could not be load");
        } else {
            // Process the protocol list
             std::vector<string> protocolNames = protocolList.getMemberNames();
             
            for (std::vector<string>::iterator itr = protocolNames.begin(); itr != protocolNames.end(); itr++) {
                string protocolSpecFile = protocolList[*itr]["dataFile"].asString();
                Json::Value protocolSpec = loader.parseFile(protocolSpecFile);
                
                if (protocolSpec.empty()) {
                    throw std::runtime_error("Protocol " +  *itr + " could not be load");
                } else {
                    try {
                    fprime::Protocol::ProtocolPtr protocol(new fprime::Protocol); 
                    protocol->setSpecification(protocolSpec);
                    protocol->setVersion(*itr);
                    protocols[*itr] = protocol;
                    protocol->load();
                    } catch (exception& e) {
                        throw std::runtime_error("Protocol " +  *itr + " could not be load. Reason: " + e.what());
                    }
                }
                
            }
            //////////////////////////////
            
        } 
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
movq %rsi, %rbx
movq %rdi, 0x30(%rsp)
leaq 0x8(%rsp), %rdi
callq 0x3f780
leaq 0xb8(%rsp), %rdi
movq %rbx, %rsi
callq 0x412d0
leaq 0x70(%rsp), %rdi
leaq 0x8(%rsp), %rsi
leaq 0xb8(%rsp), %rdx
callq 0x3ec60
leaq 0xb8(%rsp), %rdi
callq 0x3ef50
leaq 0x70(%rsp), %rdi
callq 0x423b0
testb %al, %al
jne 0x4a683
leaq 0x38(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x3fd40
movq 0x38(%rsp), %rbx
addq $0x8, 0x30(%rsp)
leaq 0x118(%rsp), %r15
leaq 0x160(%rsp), %r12
leaq 0x138(%rsp), %r14
leaq 0xf8(%rsp), %r13
cmpq 0x40(%rsp), %rbx
je 0x4a5f2
leaq 0x70(%rsp), %rdi
movq %rbx, %rsi
callq 0x42770
movq %rax, %rdi
leaq 0x1b9d6(%rip), %rsi     # 0x65ec7
callq 0x3ed60
leaq 0x98(%rsp), %rdi
movq %rax, %rsi
callq 0x424b0
movq %r15, %rdi
leaq 0x98(%rsp), %rsi
callq 0x412d0
movq %r12, %rdi
leaq 0x8(%rsp), %rsi
movq %r15, %rdx
callq 0x3ec60
movq %r15, %rdi
callq 0x3ef50
movq %r12, %rdi
callq 0x423b0
testb %al, %al
jne 0x4a622
movl $0x120, %edi            # imm = 0x120
callq 0x405e0
movq %rax, %rbp
movq %rax, %rdi
callq 0x3f520
leaq 0x10(%rsp), %rdi
movq %rbp, %rsi
callq 0x411d0
movq 0x10(%rsp), %rbp
movq %r14, %rdi
movq %r12, %rsi
callq 0x41bd0
movq %rbp, %rdi
movq %r14, %rsi
callq 0x40530
movq %r14, %rdi
callq 0x3f200
movq 0x10(%rsp), %rbp
movq %r13, %rdi
movq %rbx, %rsi
callq 0x412d0
movq %rbp, %rdi
movq %r13, %rsi
callq 0x41e00
movq %r13, %rdi
callq 0x3ef50
movq 0x30(%rsp), %rdi
movq %rbx, %rsi
callq 0x3efb0
movq %rax, %rdi
leaq 0x10(%rsp), %rsi
callq 0x3f1f0
movq 0x10(%rsp), %rdi
callq 0x41650
leaq 0x18(%rsp), %rdi
callq 0x40650
movq %r12, %rdi
callq 0x3f200
leaq 0x98(%rsp), %rdi
callq 0x3ef50
addq $0x20, %rbx
jmp 0x4a4cf
leaq 0x38(%rsp), %rdi
callq 0x3fb10
leaq 0x70(%rsp), %rdi
callq 0x3f200
leaq 0x8(%rsp), %rdi
callq 0x3f360
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x3f0e0
movq %rax, %r15
leaq 0x1b8d7(%rip), %rsi     # 0x65f0b
leaq 0x50(%rsp), %rdi
movq %rbx, %rdx
callq 0x40140
leaq 0x1b86c(%rip), %rdx     # 0x65eb4
leaq 0x10(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x3e640
movb $0x1, %bl
leaq 0x10(%rsp), %rsi
movq %r15, %rdi
callq 0x41c90
xorl %ebx, %ebx
movq 0x34969(%rip), %rsi     # 0x7efd8
movq 0x34752(%rip), %rdx     # 0x7edc8
movq %r15, %rdi
callq 0x42050
jmp 0x4a837
pushq $0x10
popq %rdi
callq 0x3f0e0
movq %rax, %rbx
leaq 0x1b812(%rip), %rsi     # 0x65ea7
movq %rax, %rdi
callq 0x3ecd0
movq 0x34934(%rip), %rsi     # 0x7efd8
movq 0x3471d(%rip), %rdx     # 0x7edc8
movq %rbx, %rdi
callq 0x42050
jmp 0x4a837
movq %rax, %r14
movq %rbx, %rdi
callq 0x3faf0
jmp 0x4a8a3
jmp 0x4a6e7
movq %rax, %r14
leaq 0xb8(%rsp), %rdi
callq 0x3ef50
jmp 0x4a8ad
movq %rax, %r14
jmp 0x4a8ad
movq %rax, %r14
jmp 0x4a8a3
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x3ef50
jmp 0x4a703
movq %rax, %r14
movb $0x1, %bl
leaq 0x50(%rsp), %rdi
callq 0x3ef50
testb %bl, %bl
jne 0x4a719
jmp 0x4a87f
movq %rax, %r14
movq %r15, %rdi
callq 0x3faf0
jmp 0x4a87f
movq %rax, %r14
leaq 0x118(%rsp), %rdi
callq 0x3ef50
jmp 0x4a88c
movq %rax, %r14
jmp 0x4a87f
movq %rdx, %r15
movq %rax, %r14
movq %rbp, %rdi
callq 0x403f0
jmp 0x4a7a5
movq %rdx, %r15
movq %rax, %r14
leaq 0x138(%rsp), %rdi
callq 0x3f200
jmp 0x4a79b
movq %rdx, %r15
movq %rax, %r14
leaq 0xf8(%rsp), %rdi
callq 0x3ef50
jmp 0x4a79b
movq %rax, %r14
jmp 0x4a88c
movq %rdx, %r15
movq %rax, %r14
jmp 0x4a7a5
movq %rax, %r14
jmp 0x4a899
movq %rdx, %r15
movq %rax, %r14
leaq 0x18(%rsp), %rdi
callq 0x40650
cmpl $0x1, %r15d
jne 0x4a87f
movq %r14, %rdi
callq 0x3ed90
movq %rax, %r14
pushq $0x10
popq %rdi
callq 0x3f0e0
movq %rax, %r15
leaq 0x1b73f(%rip), %rsi     # 0x65f0b
leaq 0xd8(%rsp), %rdi
movq %rbx, %rdx
callq 0x40140
leaq 0x1b6ed(%rip), %rdx     # 0x65ed0
leaq 0x50(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
callq 0x3e640
movq (%r14), %rax
movq %r14, %rdi
callq *0x10(%rax)
leaq 0x10(%rsp), %rdi
leaq 0x50(%rsp), %rsi
movq %rax, %rdx
callq 0x3e640
movb $0x1, %bl
leaq 0x10(%rsp), %rsi
movq %r15, %rdi
callq 0x41c90
xorl %ebx, %ebx
movq 0x347b0(%rip), %rsi     # 0x7efd8
movq 0x34599(%rip), %rdx     # 0x7edc8
movq %r15, %rdi
callq 0x42050
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x3ef50
jmp 0x4a84b
movq %rax, %r14
movb $0x1, %bl
leaq 0x50(%rsp), %rdi
callq 0x3ef50
jmp 0x4a85c
movq %rax, %r14
movb $0x1, %bl
leaq 0xd8(%rsp), %rdi
callq 0x3ef50
testb %bl, %bl
jne 0x4a872
jmp 0x4a87a
movq %rax, %r14
movq %r15, %rdi
callq 0x3faf0
callq 0x41d30
leaq 0x160(%rsp), %rdi
callq 0x3f200
leaq 0x98(%rsp), %rdi
callq 0x3ef50
leaq 0x38(%rsp), %rdi
callq 0x3fb10
leaq 0x70(%rsp), %rdi
callq 0x3f200
leaq 0x8(%rsp), %rdi
callq 0x3f360
movq %r14, %rdi
callq 0x42200
movq %rax, %rdi
callq 0x43915
nop