// File: /workspace/github_cpp_makefile_star2_O1/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 $0x108, %rsp            # imm = 0x108
movq %rdx, %r14
movq %rsi, 0xe0(%rsp)
leaq 0xc8(%rsp), %rax
movq %rax, -0x10(%rax)
xorl %ecx, %ecx
movq %rcx, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x8(%rdi), %rax
movl %ecx, 0x8(%rdi)
movq %rcx, 0x10(%rdi)
movq %rax, 0x18(%rdi)
movq %rax, 0x20(%rdi)
movq %rcx, 0x28(%rdi)
leaq 0x38(%rdi), %rax
movl %ecx, 0x38(%rdi)
movq %rcx, 0x40(%rdi)
movq %rax, 0x48(%rdi)
movq %rax, 0x50(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x58(%rdi)
movq (%rdx), %rsi
movq 0x8(%rdx), %rdx
testq %rdx, %rdx
movq %rdi, 0x48(%rsp)
je 0x3af94
leaq 0x30(%rdi), %rax
movq %rax, 0xd8(%rsp)
leaq 0xb8(%rsp), %r12
leaq 0x18(%rsp), %r15
movq %rsi, %rbx
movq $0x0, 0x10(%rsp)
xorl %ebp, %ebp
movl $0x0, 0xc(%rsp)
movb (%rbx), %al
movq 0xe0(%rsp), %rcx
cmpb 0x18(%rcx), %al
jne 0x3af3b
cmpq $0x0, 0xc0(%rsp)
je 0x3af7c
leaq 0xa8(%rsp), %rax
movq %rax, 0x98(%rsp)
xorl %ecx, %ecx
movq %rcx, 0xa0(%rsp)
movb %cl, 0xa8(%rsp)
leaq 0x88(%rsp), %rax
movq %rax, 0x78(%rsp)
movq %rcx, 0x80(%rsp)
movb %cl, 0x88(%rsp)
movl $0x1, %ecx
movq %r12, %rdi
leaq 0x20479(%rip), %rsi     # 0x5b195
xorl %edx, %edx
callq 0x309b0
movq %r12, %rsi
cmpq $-0x1, %rax
je 0x3af48
movq %rax, %r12
movq %r15, %rdi
movq %rsi, %r13
xorl %edx, %edx
movq %rax, %rcx
callq 0x2f8b0
leaq 0x98(%rsp), %rdi
movq %r15, %rsi
callq 0x2fd50
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x3ad67
callq 0x2f6c0
incq %r12
movq 0xc0(%rsp), %rcx
leaq 0x18(%rsp), %r15
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x2f8b0
leaq 0x78(%rsp), %rdi
movq %r15, %rsi
callq 0x2fd50
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x3ada6
callq 0x2f6c0
leaq 0x68(%rsp), %rax
movq %rax, 0x58(%rsp)
movq $0x0, 0x60(%rsp)
movb $0x0, 0x68(%rsp)
movq 0x98(%rsp), %rdi
callq 0x30530
movl %eax, 0x50(%rsp)
leaq 0x58(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0x2ec40
movq %r13, %r12
testb $0x1, %bpl
movzbl %bpl, %ebp
movl %ebp, %ecx
jne 0x3adf2
movl $0x1, %ecx
movl 0x50(%rsp), %eax
cmpl $0x23, %eax
cmovel %ecx, %ebp
xorl %ecx, %ecx
testb $0x1, %bpl
jne 0x3ae06
movl %ebp, %ecx
cmpl $0xa, %eax
cmovel %ecx, %ebp
testb $0x1, %bpl
je 0x3ae5a
movq 0x98(%rsp), %rsi
leaq 0x18(%rsp), %rdi
leaq 0xb(%rsp), %rdx
callq 0x2e880
movl 0x60(%rsp), %r12d
addl 0x20(%rsp), %r12d
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x3ae47
callq 0x2f6c0
movq 0x10(%rsp), %rax
addl %r12d, %eax
addl $0x2, %eax
movq %rax, 0x10(%rsp)
movq %r13, %r12
movl 0xc(%rsp), %eax
movl %eax, 0x18(%rsp)
movl 0x50(%rsp), %eax
movl %eax, 0x20(%rsp)
leaq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x58(%rsp), %rsi
movq 0x60(%rsp), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %rdi
callq 0x2e8a0
leaq 0x18(%rsp), %r15
movq 0x48(%rsp), %rdi
movq %r15, %rsi
callq 0x2e6b0
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x3aeb1
callq 0x2f6c0
movq 0x98(%rsp), %rdi
callq 0x30530
movl %eax, 0x18(%rsp)
leaq 0x30(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x78(%rsp), %rsi
movq 0x80(%rsp), %rdx
addq %rsi, %rdx
leaq 0x20(%rsp), %rdi
callq 0x2e8a0
movq 0xd8(%rsp), %rdi
movq %r15, %rsi
callq 0x2f390
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x3af0a
callq 0x2f6c0
movq $0x0, 0xc0(%rsp)
movq 0xb8(%rsp), %rax
movb $0x0, (%rax)
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x3af35
callq 0x2f6c0
incl 0xc(%rsp)
jmp 0x3af4b
movsbl %al, %esi
movq %r12, %rdi
callq 0x2f460
jmp 0x3af7c
movq %rsi, %r12
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0x3af62
callq 0x2f6c0
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0x3af7c
callq 0x2f6c0
incq %rbx
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
cmpq %rdx, %rbx
jne 0x3acae
jmp 0x3afa0
movq $0x0, 0x10(%rsp)
addq %rsi, %rdx
movq 0x48(%rsp), %r14
movq 0x10(%rsp), %rax
movl %eax, 0x60(%r14)
leaq 0xf8(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0xe8(%rsp), %rdi
callq 0x2e8a0
leaq 0xe8(%rsp), %rsi
callq 0x2fd70
movzbl %al, %eax
movl %eax, 0x64(%r14)
movq 0xe8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x3afed
callq 0x2f6c0
movq 0xb8(%rsp), %rdi
leaq 0xc8(%rsp), %rax
cmpq %rax, %rdi
je 0x3b007
callq 0x2f6c0
movq %r14, %rax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq 0xe8(%rsp), %rdi
cmpq %rbx, %rdi
jne 0x3b0ab
jmp 0x3b0b5
jmp 0x3b0b2
jmp 0x3b063
jmp 0x3b07c
movq %rax, %r14
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
jmp 0x3b055
jmp 0x3b063
movq %rax, %r14
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x3b066
callq 0x2f6c0
jmp 0x3b066
jmp 0x3b063
movq %rax, %r14
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x3b07f
callq 0x2f6c0
jmp 0x3b07f
movq %rax, %r14
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0x3b096
callq 0x2f6c0
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0x3b0b5
callq 0x2f6c0
jmp 0x3b0b5
movq %rax, %r14
movq 0x48(%rsp), %rbx
leaq 0x30(%rbx), %rdi
callq 0x2f5f0
movq %rbx, %rdi
callq 0x2f630
movq 0xb8(%rsp), %rdi
leaq 0xc8(%rsp), %rax
cmpq %rax, %rdi
je 0x3b0e5
callq 0x2f6c0
movq %r14, %rdi
callq 0x30a20
nop