// File: /workspace/github_cpp_makefile_star2_O3/xjrueda[P]fixprime/src/FixParser.cpp
// Function: fprime::FixParser::parseLevel(std::map<unsigned int, fprime::FixParser::FixPair, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, fprime::FixParser::FixPair>>>, unsigned int&, std::shared_ptr<fprime::Node>, unsigned int, bool)
bool FixParser::parseLevel(OrderedMap map, unsigned int& position, fprime::Node::NodePtr node, unsigned int groupBeginning, bool isGroupInstance) {
        int instanceCounter = 0;
        for (OrderedMap::iterator it = map.find(position); it != map.end(); std::advance(it, position - (std::distance(map.begin(), it)))) {
            position++;
            try {
                string val = node->getChild(it->second.field)->getValue();
            } catch (InvalidField& e) {
                position--;
                if (isGroupInstance) {
                    return true;
                } else {
                    return false;
                }
            }
            switch (node->getChild(it->second.field)->getType()) {
                case fprime::Node::FIELD_NODE:
                {
                    node->getChild(it->second.field)->setValue(it->second.value);
                    break;
                }
                case fprime::Node::REPEATING_GROUP:
                {
                    int value = boost::lexical_cast<unsigned int>(it->second.value);
//                    node(it->second.field).setValue(it->second.value);
                    FixPair fpair = map[it->first + 1];

                    for (unsigned int i = 1; i <= value; i++) {
                        node->getChild(it->second.field)->appendGroupInstance();
                        bool result = parseLevel(map, position, node->getChild(it->second.field)->getInstance(i), fpair.field, true);
                    }
                    break;
                }
            }
            if (isGroupInstance) {
                if (groupBeginning == map[it->first + 1].field) {
                    return true;
                }
            }
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movl %r9d, 0x1c(%rsp)
movl %r8d, 0x5c(%rsp)
movq %rcx, %r15
movq %rdi, 0x60(%rsp)
movq 0x10(%rsi), %rax
movq %rsi, 0x48(%rsp)
leaq 0x8(%rsi), %rbp
movq %rdx, 0x50(%rsp)
movl (%rdx), %r14d
testq %rax, %rax
je 0x3a500
movq %rbp, %rcx
xorl %edx, %edx
cmpl %r14d, 0x20(%rax)
setb %dl
cmovaeq %rax, %rcx
movq 0x10(%rax,%rdx,8), %rax
testq %rax, %rax
jne 0x3a4dc
cmpq %rbp, %rcx
je 0x3a500
cmpl 0x20(%rcx), %r14d
cmovaeq %rcx, %rbp
leaq 0x98(%rsp), %r13
incl %r14d
movq 0x50(%rsp), %rax
movl %r14d, (%rax)
movq (%r15), %rsi
movl 0x28(%rbp), %edx
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x2f9d0
movq 0x8(%rsp), %rsi
leaq 0x20(%rsp), %rdi
callq 0x2e290
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x3a544
callq 0x2f370
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x3a558
callq 0x2f6c0
movq (%r15), %rsi
movl 0x28(%rbp), %edx
leaq 0x20(%rsp), %rdi
callq 0x2f9d0
movq 0x20(%rsp), %rdi
callq 0x300c0
movl %eax, %r14d
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x3a584
callq 0x2f370
cmpl $0x1, %r14d
je 0x3a6e0
cmpl $0x2, %r14d
jne 0x3a745
movl $0x0, 0x8(%rsp)
movq 0x30(%rbp), %rax
movq 0x38(%rbp), %rcx
addq %rax, %rcx
movq %rax, 0x20(%rsp)
movq %rcx, 0x28(%rsp)
leaq 0x20(%rsp), %rdi
movq %rbx, %rsi
callq 0x30f90
testb %al, %al
je 0x3a7d3
movq %rbx, %rsi
movl 0x8(%rsp), %ebx
movl 0x20(%rbp), %eax
incl %eax
movl %eax, 0x8(%rsp)
movq 0x48(%rsp), %rdi
callq 0x2e3d0
movl (%rax), %ecx
movl %ecx, 0x20(%rsp)
leaq 0x38(%rsp), %rcx
movq %rcx, 0x28(%rsp)
movq 0x8(%rax), %rsi
movq 0x10(%rax), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %rdi
callq 0x2e8a0
testl %ebx, %ebx
je 0x3a6ca
movl $0x1, %r14d
movq (%r15), %rsi
movl 0x28(%rbp), %edx
leaq 0x8(%rsp), %rdi
callq 0x2f9d0
movq 0x8(%rsp), %rdi
callq 0x2f530
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x3a640
callq 0x2f370
movq %r13, %rdi
movq 0x48(%rsp), %rsi
callq 0x2efe0
movq (%r15), %rsi
movl 0x28(%rbp), %edx
leaq 0x8(%rsp), %rdi
callq 0x2f9d0
movq 0x8(%rsp), %rsi
leaq 0x88(%rsp), %r12
movq %r12, %rdi
movl %r14d, %edx
callq 0x30b90
movl 0x20(%rsp), %r8d
movq 0x60(%rsp), %rdi
movq %r13, %rsi
movq 0x50(%rsp), %rdx
movq %r12, %rcx
movl $0x1, %r9d
callq 0x2e390
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x3a6a7
callq 0x2f370
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x3a6b6
callq 0x2f370
movq %r13, %rdi
callq 0x2f630
incl %r14d
cmpl %ebx, %r14d
jbe 0x3a617
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x3a745
callq 0x2f6c0
jmp 0x3a745
movq (%r15), %rsi
movl 0x28(%rbp), %edx
leaq 0x20(%rsp), %rdi
callq 0x2f9d0
movq 0x20(%rsp), %r14
leaq 0x78(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x30(%rbp), %rsi
movq 0x38(%rbp), %rdx
addq %rsi, %rdx
leaq 0x68(%rsp), %rbx
movq %rbx, %rdi
callq 0x2e8a0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2ecf0
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x3a736
callq 0x2f6c0
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x3a745
callq 0x2f370
cmpb $0x0, 0x1c(%rsp)
je 0x3a770
movl 0x20(%rbp), %eax
incl %eax
movl %eax, 0x20(%rsp)
movq 0x48(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x2e3d0
movl 0x5c(%rsp), %ecx
cmpl %ecx, (%rax)
je 0x3a869
movq 0x50(%rsp), %rax
movl (%rax), %r14d
movq 0x48(%rsp), %rax
movq 0x18(%rax), %rax
xorl %ebx, %ebx
cmpq %rbp, %rax
je 0x3a795
movq %rax, %rdi
callq 0x2f100
incq %rbx
jmp 0x3a783
movq %r14, %rax
subq %rbx, %rax
jle 0x3a7b5
subq %r14, %rbx
movq %rbp, %rdi
callq 0x2f100
movq %rax, %rbp
incq %rbx
jne 0x3a7a0
jmp 0x3a508
je 0x3a508
subq %r14, %rbx
movq %rbp, %rdi
callq 0x2f8d0
movq %rax, %rbp
decq %rbx
jne 0x3a7be
jmp 0x3a508
movq 0x36626(%rip), %rax     # 0x70e00
addq $0x10, %rax
leaq 0x20(%rsp), %rdi
movq %rax, (%rdi)
movq 0x36503(%rip), %rax     # 0x70cf0
movq %rax, 0x8(%rdi)
movq 0x36730(%rip), %rax     # 0x70f28
movq %rax, 0x10(%rdi)
callq 0x2fd00
jmp 0x3a87f
movq %rax, %rbx
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x3a882
callq 0x2f6c0
jmp 0x3a882
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x305b0
jmp 0x3a8fd
movq %rdx, %r14
movq %rax, %rbx
jmp 0x3a84b
movq %rdx, %r14
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x3a84b
callq 0x2f370
cmpl $0x1, %r14d
jne 0x3a8fd
movq %rbx, %rdi
callq 0x2e8b0
movq 0x50(%rsp), %rax
decl (%rax)
callq 0x30740
movl 0x1c(%rsp), %eax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x3a8fd
callq 0x2f370
jmp 0x3a8fd
movq %rax, %rbx
jmp 0x3a8c1
movq %rax, %rbx
jmp 0x3a8b2
movq %rax, %rbx
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x3a8b2
callq 0x2f370
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x3a8c1
callq 0x2f370
leaq 0x98(%rsp), %rdi
callq 0x2f630
jmp 0x3a8e9
jmp 0x3a8d2
movq %rax, %rbx
jmp 0x3a8e9
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x3a8e9
callq 0x2f370
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x3a8fd
callq 0x2f6c0
movq %rbx, %rdi
callq 0x30a10
nop