// File: 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
movq %rsp, %rbp
subq $0x270, %rsp            # imm = 0x270
movq %rdx, -0x1e8(%rbp)
movq %rdi, -0x1f0(%rbp)
movq %rdi, %rax
movq %rax, -0x200(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x1f8(%rbp)
leaq -0x38(%rbp), %rdi
callq 0xa0780
movq -0x1f0(%rbp), %rdi
movb $0x0, -0x39(%rbp)
callq 0x9fb20
movq -0x1e8(%rbp), %rdi
movl $0x0, -0x40(%rbp)
movl $0x0, -0x44(%rbp)
movb $0x0, -0x45(%rbp)
callq 0x9d740
movq %rax, -0x50(%rbp)
movq -0x1e8(%rbp), %rdi
callq 0xa4280
movq %rax, -0x58(%rbp)
leaq -0x50(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x984f0
testb $0x1, %al
jne 0xc35ab
jmp 0xc39e6
leaq -0x50(%rbp), %rdi
callq 0xa3290
movq -0x1f8(%rbp), %rcx
movsbl (%rax), %eax
movsbl 0x18(%rcx), %ecx
cmpl %ecx, %eax
jne 0xc399d
leaq -0x38(%rbp), %rdi
callq 0xa2940
testb $0x1, %al
jne 0xc399b
leaq -0x78(%rbp), %rdi
callq 0xa0780
leaq -0x98(%rbp), %rdi
callq 0xa0780
leaq -0x38(%rbp), %rdi
leaq 0x3eb60(%rip), %rsi     # 0x10215b
xorl %eax, %eax
movl %eax, %edx
callq 0xa4c70
movq %rax, -0xa0(%rbp)
cmpq $-0x1, -0xa0(%rbp)
je 0xc396a
movq -0xa0(%rbp), %rcx
xorl %eax, %eax
movl %eax, %edx
leaq -0xc0(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x9dfa0
jmp 0xc3636
leaq -0x78(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
movq %rsi, -0x218(%rbp)
callq 0x9f420
movq -0x218(%rbp), %rdi
callq 0xa4f00
movq -0xa0(%rbp), %rax
incq %rax
movq %rax, -0x208(%rbp)
leaq -0x38(%rbp), %rdi
movq %rdi, -0x210(%rbp)
callq 0x9b8b0
movq -0x210(%rbp), %rsi
movq -0x208(%rbp), %rdx
movq %rax, %rcx
leaq -0xf0(%rbp), %rdi
callq 0x9dfa0
jmp 0xc3699
leaq -0x98(%rbp), %rdi
movq %rdi, -0x220(%rbp)
leaq -0xf0(%rbp), %rsi
movq %rsi, -0x228(%rbp)
callq 0x9f420
movq -0x228(%rbp), %rdi
callq 0xa4f00
leaq -0x118(%rbp), %rdi
callq 0x9aa90
leaq -0x78(%rbp), %rdi
callq 0x99590
movq %rax, %rdi
callq 0xa1b50
movq -0x220(%rbp), %rsi
movl %eax, -0x118(%rbp)
leaq -0x110(%rbp), %rdi
callq 0x972c0
jmp 0xc36fe
cmpl $0x23, -0x118(%rbp)
jne 0xc3741
testb $0x1, -0x45(%rbp)
jne 0xc3741
movb $0x1, -0x45(%rbp)
jmp 0xc3741
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xc8(%rbp)
movl %eax, -0xcc(%rbp)
jmp 0xc3981
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xc8(%rbp)
movl %eax, -0xcc(%rbp)
jmp 0xc395c
cmpl $0xa, -0x118(%rbp)
jne 0xc3754
testb $0x1, -0x45(%rbp)
je 0xc3754
movb $0x0, -0x45(%rbp)
testb $0x1, -0x45(%rbp)
je 0xc3814
leaq -0x78(%rbp), %rdi
callq 0x99590
movq %rax, -0x238(%rbp)
leaq -0x139(%rbp), %rdi
movq %rdi, -0x230(%rbp)
callq 0xa35e0
movq -0x238(%rbp), %rsi
movq -0x230(%rbp), %rdx
leaq -0x138(%rbp), %rdi
callq 0xa0510
jmp 0xc379d
leaq -0x138(%rbp), %rdi
callq 0x9b8b0
movq %rax, -0x240(%rbp)
leaq -0x118(%rbp), %rdi
addq $0x8, %rdi
callq 0x9b8b0
movq -0x240(%rbp), %rcx
addq %rax, %rcx
addq $0x2, %rcx
movl -0x44(%rbp), %eax
addq %rcx, %rax
movl %eax, -0x44(%rbp)
leaq -0x138(%rbp), %rdi
callq 0xa4f00
leaq -0x139(%rbp), %rdi
callq 0x9e350
jmp 0xc3814
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xc8(%rbp)
movl %eax, -0xcc(%rbp)
leaq -0x139(%rbp), %rdi
callq 0x9e350
jmp 0xc395c
movq -0x1f0(%rbp), %rax
movq %rax, -0x248(%rbp)
leaq -0x170(%rbp), %rdi
leaq -0x40(%rbp), %rsi
leaq -0x118(%rbp), %rdx
callq 0x9c6a0
jmp 0xc383b
movq -0x248(%rbp), %rdi
leaq -0x170(%rbp), %rsi
callq 0x975d0
movb %dl, -0x251(%rbp)
movq %rax, -0x250(%rbp)
jmp 0xc385d
movb -0x251(%rbp), %al
movq -0x250(%rbp), %rcx
movq %rcx, -0x180(%rbp)
movb %al, -0x178(%rbp)
leaq -0x170(%rbp), %rdi
callq 0x99690
movq -0x1f0(%rbp), %rax
addq $0x30, %rax
movq %rax, -0x260(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x99590
movq %rax, %rdi
callq 0xa1b50
movl %eax, -0x1ac(%rbp)
leaq -0x1a8(%rbp), %rdi
leaq -0x1ac(%rbp), %rsi
leaq -0x98(%rbp), %rdx
callq 0x9c1a0
jmp 0xc38c8
movq -0x260(%rbp), %rdi
leaq -0x1a8(%rbp), %rsi
callq 0xa0e90
movq %rax, -0x268(%rbp)
jmp 0xc38e4
movq -0x268(%rbp), %rax
movq %rax, -0x1b8(%rbp)
leaq -0x1a8(%rbp), %rdi
callq 0x9a920
leaq -0x38(%rbp), %rdi
callq 0x9fdc0
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
leaq -0x118(%rbp), %rdi
callq 0xa0c90
jmp 0xc396a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xc8(%rbp)
movl %eax, -0xcc(%rbp)
leaq -0x170(%rbp), %rdi
callq 0x99690
jmp 0xc395c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xc8(%rbp)
movl %eax, -0xcc(%rbp)
leaq -0x1a8(%rbp), %rdi
callq 0x9a920
leaq -0x118(%rbp), %rdi
callq 0xa0c90
jmp 0xc3981
leaq -0x98(%rbp), %rdi
callq 0xa4f00
leaq -0x78(%rbp), %rdi
callq 0xa4f00
jmp 0xc399b
leaq -0x98(%rbp), %rdi
callq 0xa4f00
leaq -0x78(%rbp), %rdi
callq 0xa4f00
jmp 0xc3a93
jmp 0xc39cd
leaq -0x50(%rbp), %rdi
callq 0xa3290
movsbl (%rax), %esi
leaq -0x38(%rbp), %rdi
callq 0x9b130
jmp 0xc39b4
jmp 0xc39cd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xc8(%rbp)
movl %eax, -0xcc(%rbp)
jmp 0xc3a93
jmp 0xc39cf
leaq -0x50(%rbp), %rdi
xorl %esi, %esi
callq 0xa4190
movq %rax, -0x1c0(%rbp)
jmp 0xc3585
movq -0x1e8(%rbp), %rsi
movq -0x1f0(%rbp), %rax
movl -0x44(%rbp), %ecx
movl %ecx, 0x60(%rax)
leaq -0x1e0(%rbp), %rdi
callq 0x998d0
jmp 0xc3a08
movq -0x1f8(%rbp), %rdi
leaq -0x1e0(%rbp), %rsi
callq 0x9f4a0
movb %al, -0x269(%rbp)
jmp 0xc3a23
movq -0x1f0(%rbp), %rax
movb -0x269(%rbp), %cl
movzbl %cl, %ecx
movl %ecx, 0x64(%rax)
leaq -0x1e0(%rbp), %rdi
callq 0xa4f00
movb $0x1, -0x39(%rbp)
testb $0x1, -0x39(%rbp)
jne 0xc3a7a
jmp 0xc3a6e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xc8(%rbp)
movl %eax, -0xcc(%rbp)
leaq -0x1e0(%rbp), %rdi
callq 0xa4f00
jmp 0xc3a93
movq -0x1f0(%rbp), %rdi
callq 0x9b4f0
leaq -0x38(%rbp), %rdi
callq 0xa4f00
movq -0x200(%rbp), %rax
addq $0x270, %rsp            # imm = 0x270
popq %rbp
retq
movq -0x1f0(%rbp), %rdi
callq 0x9b4f0
leaq -0x38(%rbp), %rdi
callq 0xa4f00
movq -0xc8(%rbp), %rdi
callq 0xa3520
nopw %cs:(%rax,%rax)