// File: /workspace/github_cpp_makefile_star2_O2/xjrueda[P]fixprime/src/FixParser.cpp
// Function: fprime::FixParser::explode(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
fprime::FixParser::FlatMessage FixParser::explode(const string str) {
        string next;
        fprime::FixParser::FlatMessage result;
        unsigned int position = 0;
        unsigned int bodyLength = 0;
        bool inBody = false;
        // For each character in the string
        for (string::const_iterator it = str.begin(); it != str.end(); it++) {
            // If we've hit the terminal character
            if (*it == separator) {
                // If we have some characters accumulated
                if (!next.empty()) {
                    string fieldTag, fieldValue;
                    size_t found = next.find("=");
                    if (found != std::string::npos) {
                        fieldTag = next.substr(0, found);
                        fieldValue = next.substr(found + 1, next.size());
                        // Add them to the result multimap
                        FixPair fixPair;
                        fixPair.field = atoi(fieldTag.c_str());
                        fixPair.value = fieldValue;

                        if (fixPair.field == 35 && !inBody)
                            inBody = true;
                        if (fixPair.field == 10 && inBody)
                            inBody = false;

                        if (inBody) {
                            bodyLength += string(fieldTag.c_str()).size() + fixPair.value.size() + 2;
                        }
                        result.orderedMap.insert(pair<unsigned int, FixPair>(position, fixPair));
                        result.tagsMap.insert(pair<unsigned int, string>(atoi(fieldTag.c_str()), fieldValue));
                        next.clear();
                        position++;
                    }

                }
            } else {
                // Accumulate the next character into the sequence
                next += *it;
            }
        }
        result.bodylength = bodyLength;
        result.checkSum = checkSum(str);
        return result;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x68(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
callq 0x40fa0
movq (%r15), %rax
movq %rbx, 0x18(%rsp)
leaq 0x30(%rbx), %rcx
movq %rcx, 0xa0(%rsp)
leaq 0x58(%rsp), %r13
leaq 0xd8(%rsp), %rbx
leaq 0xa8(%rsp), %r14
movq %rax, %rbp
movl $0x0, 0x10(%rsp)
movl $0x0, 0x14(%rsp)
movq $0x0, 0x20(%rsp)
movq %r15, 0x30(%rsp)
movq %r12, 0x28(%rsp)
addq 0x8(%r15), %rax
cmpq %rax, %rbp
je 0x4bac2
movb (%rbp), %al
cmpb 0x18(%r12), %al
jne 0x4b9e4
cmpq $0x0, 0x60(%rsp)
je 0x4bab7
movq %rbx, %r15
leaq 0x48(%rsp), %rax
movq %rax, 0x38(%rsp)
andq $0x0, 0x40(%rsp)
xorl %ecx, %ecx
movb %cl, 0x48(%rsp)
leaq 0xe8(%rsp), %rax
movq %rax, 0xd8(%rsp)
andq $0x0, 0xe0(%rsp)
movb %cl, 0xe8(%rsp)
movq %r13, %rdi
leaq 0x1989a(%rip), %rsi     # 0x6515b
xorl %edx, %edx
callq 0x42aa0
movq %r13, %rbx
cmpq $-0x1, %rax
je 0x4b9f4
movq %rax, %r13
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x406c0
leaq 0x38(%rsp), %rdi
movq %r14, %rsi
callq 0x40ce0
movq %r14, %rdi
callq 0x3ef50
incq %r13
movq 0x60(%rsp), %rcx
movq %r14, %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x406c0
movq %r15, %rbx
movq %r15, %rdi
movq %r14, %rsi
callq 0x40ce0
movq %r14, %r13
movq %r14, %rdi
callq 0x3ef50
leaq 0x90(%rsp), %rax
movq %rax, 0x80(%rsp)
andq $0x0, 0x88(%rsp)
movb $0x0, 0x90(%rsp)
movq 0x38(%rsp), %rdi
callq 0x419b0
movl %eax, 0x78(%rsp)
leaq 0x80(%rsp), %rdi
movq %r15, %rsi
callq 0x3f300
movl 0x14(%rsp), %eax
testb $0x1, %al
movzbl %al, %eax
pushq $0x1
popq %rcx
cmovnel %eax, %ecx
movl 0x78(%rsp), %edx
cmpl $0x23, %edx
cmovnel %eax, %ecx
testb $0x1, %cl
movl %ecx, %esi
movl $0x0, %eax
cmovnel %eax, %esi
cmpl $0xa, %edx
cmovnel %ecx, %esi
movl %esi, 0x14(%rsp)
testb $0x1, %sil
movq 0x30(%rsp), %r15
je 0x4ba04
movq 0x38(%rsp), %rsi
movq %r13, %rdi
leaq 0xf(%rsp), %rdx
callq 0x3ed70
movq 0x28(%rsp), %r12
movl 0x88(%rsp), %eax
addl 0xb0(%rsp), %eax
movq 0x20(%rsp), %rcx
addl %eax, %ecx
addl $0x2, %ecx
movq %rcx, 0x20(%rsp)
movq %r13, %rdi
callq 0x3ef50
jmp 0x4ba09
movsbl %al, %esi
movq %r13, %rdi
callq 0x40000
jmp 0x4bab7
movq %rbx, %r13
movq %r15, %rbx
movq 0x30(%rsp), %r15
jmp 0x4baa5
movq 0x28(%rsp), %r12
movq %r13, %r14
leaq 0x58(%rsp), %r13
movl 0x10(%rsp), %eax
movl %eax, 0xa8(%rsp)
leaq 0xb0(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0x3f820
movq 0x18(%rsp), %rdi
movq %r14, %rsi
callq 0x3ea90
leaq 0xb8(%rsp), %rdi
callq 0x3ef50
movq 0x38(%rsp), %rdi
callq 0x419b0
movl %eax, 0xa8(%rsp)
leaq 0xb0(%rsp), %rdi
movq %rbx, %rsi
callq 0x412d0
movq 0xa0(%rsp), %rdi
movq %r14, %rsi
callq 0x3feb0
leaq 0xb0(%rsp), %rdi
callq 0x3ef50
andq $0x0, 0x60(%rsp)
movq 0x58(%rsp), %rax
movb $0x0, (%rax)
incl 0x10(%rsp)
leaq 0x80(%rsp), %rdi
callq 0x3ef50
movq %rbx, %rdi
callq 0x3ef50
leaq 0x38(%rsp), %rdi
callq 0x3ef50
incq %rbp
movq (%r15), %rax
jmp 0x4b857
movq 0x18(%rsp), %rax
movq 0x20(%rsp), %rcx
movl %ecx, 0x60(%rax)
leaq 0xf8(%rsp), %rdi
movq %r15, %rsi
callq 0x412d0
leaq 0xf8(%rsp), %rsi
callq 0x40d30
movzbl %al, %eax
movq 0x18(%rsp), %rbx
movl %eax, 0x64(%rbx)
leaq 0xf8(%rsp), %rdi
callq 0x3ef50
leaq 0x58(%rsp), %rdi
callq 0x3ef50
movq %rbx, %rax
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0xf8(%rsp), %rdi
jmp 0x4bb80
jmp 0x4bb87
jmp 0x4bb59
jmp 0x4bb6b
movq %rax, %rbx
leaq 0xb0(%rsp), %rdi
jmp 0x4bb50
jmp 0x4bb59
movq %rax, %rbx
leaq 0xb8(%rsp), %rdi
callq 0x3ef50
jmp 0x4bb5c
jmp 0x4bb59
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0x3ef50
jmp 0x4bb6e
movq %rax, %rbx
leaq 0xd8(%rsp), %rdi
callq 0x3ef50
leaq 0x38(%rsp), %rdi
callq 0x3ef50
jmp 0x4bb8a
movq %rax, %rbx
movq 0x18(%rsp), %rdi
callq 0x3f920
leaq 0x58(%rsp), %rdi
callq 0x3ef50
movq %rbx, %rdi
callq 0x42200