// File: xjrueda[P]fixprime/src/Node.cpp
// Function: fprime::Node::stringify(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, bool&, unsigned int&)
void Node::stringify(string& outputString, bool& isBody, unsigned int& bodyLength) {
        try {
            switch (_type) {
                case ROOT_NODE:
                case GROUP_INSTANCE:
                case REPEATING_GROUP:
                {
                    if (_type == REPEATING_GROUP) {
                        unsigned int id = this->getField()->getId();
                        this->addValuePair(outputString, id, this->getValue());
                    }
                    for (int i = 0; i < childsVector.size(); i++) {
                        childsVector[i]->stringify(outputString, isBody, bodyLength);
                    }
                    break;
                }
                case FIELD_NODE:
                {
                    if (!isBody) {
                        if (this->getField()->getId() == 9)
                            isBody = true;
                    }
                    int prelen = outputString.size();
                    unsigned int id = this->getField()->getId();
                    this->addValuePair(outputString, id, this->getValue());
                    if (isBody && this->getField()->getId() != 9)
                        bodyLength += (outputString.size() - prelen);
                    break;
                }
            }

        } catch (exception& e) {
            cout << "at Node.stringify : " << e.what() << endl;
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xe8(%rbp)
movl 0x8(%rax), %eax
movl %eax, -0xdc(%rbp)
testl %eax, %eax
je 0xcd76a
jmp 0xcd745
movl -0xdc(%rbp), %eax
subl $0x1, %eax
je 0xcd8c2
jmp 0xcd756
movl -0xdc(%rbp), %eax
addl $-0x2, %eax
subl $0x1, %eax
ja 0xcdb7f
jmp 0xcd76a
movq -0xe8(%rbp), %rax
cmpl $0x2, 0x8(%rax)
jne 0xcd84d
movq -0xe8(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0x9e010
jmp 0xcd78d
leaq -0x38(%rbp), %rdi
callq 0x9d390
movq %rax, %rdi
callq 0x9d720
movl %eax, -0xec(%rbp)
jmp 0xcd7a6
leaq -0x38(%rbp), %rdi
callq 0xa2ae0
movl -0xec(%rbp), %eax
movq -0xe8(%rbp), %rsi
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xf8(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0xf0(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x97be0
jmp 0xcd7de
movl -0xf0(%rbp), %edx
movq -0xf8(%rbp), %rsi
movq -0xe8(%rbp), %rdi
leaq -0x68(%rbp), %rcx
callq 0x990c0
jmp 0xcd7fd
leaq -0x68(%rbp), %rdi
callq 0xa4f00
jmp 0xcd84d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xcdaf6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x38(%rbp), %rdi
callq 0xa2ae0
jmp 0xcdaf6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x68(%rbp), %rdi
callq 0xa4f00
jmp 0xcdaf6
movl $0x0, -0x6c(%rbp)
movq -0xe8(%rbp), %rdi
movslq -0x6c(%rbp), %rax
movq %rax, -0x100(%rbp)
addq $0x38, %rdi
callq 0x9dad0
movq %rax, %rcx
movq -0x100(%rbp), %rax
cmpq %rcx, %rax
jae 0xcd8bd
movq -0xe8(%rbp), %rdi
addq $0x38, %rdi
movslq -0x6c(%rbp), %rsi
callq 0xa1680
movq %rax, %rdi
callq 0x98080
movq %rax, %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0x97470
jmp 0xcd8b0
jmp 0xcd8b2
movl -0x6c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x6c(%rbp)
jmp 0xcd854
jmp 0xcdb7f
movq -0x18(%rbp), %rax
testb $0x1, (%rax)
jne 0xcd92f
movq -0xe8(%rbp), %rsi
leaq -0x80(%rbp), %rdi
callq 0x9e010
jmp 0xcd8dd
leaq -0x80(%rbp), %rdi
callq 0x9d390
movq %rax, %rdi
callq 0x9d720
movl %eax, -0x104(%rbp)
jmp 0xcd8f6
leaq -0x80(%rbp), %rdi
callq 0xa2ae0
movl -0x104(%rbp), %eax
cmpl $0x9, %eax
jne 0xcd92d
movq -0x18(%rbp), %rax
movb $0x1, (%rax)
jmp 0xcd92d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x80(%rbp), %rdi
callq 0xa2ae0
jmp 0xcdaf6
jmp 0xcd92f
movq -0x10(%rbp), %rdi
callq 0x9b8b0
movq -0xe8(%rbp), %rsi
movl %eax, -0x84(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x9e010
jmp 0xcd953
leaq -0x98(%rbp), %rdi
callq 0x9d390
movq %rax, %rdi
callq 0x9d720
movl %eax, -0x108(%rbp)
jmp 0xcd96f
leaq -0x98(%rbp), %rdi
callq 0xa2ae0
movl -0x108(%rbp), %eax
movq -0xe8(%rbp), %rsi
movl %eax, -0x88(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x118(%rbp)
movl -0x88(%rbp), %eax
movl %eax, -0x10c(%rbp)
leaq -0xb8(%rbp), %rdi
callq 0x97be0
jmp 0xcd9b3
movl -0x10c(%rbp), %edx
movq -0x118(%rbp), %rsi
movq -0xe8(%rbp), %rdi
leaq -0xb8(%rbp), %rcx
callq 0x990c0
jmp 0xcd9d5
leaq -0xb8(%rbp), %rdi
callq 0xa4f00
movq -0x18(%rbp), %rax
movb (%rax), %cl
movb $0x0, -0xc9(%rbp)
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x119(%rbp)
je 0xcda45
movq -0xe8(%rbp), %rsi
leaq -0xc8(%rbp), %rdi
callq 0x9e010
jmp 0xcda10
movb $0x1, -0xc9(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x9d390
movq %rax, %rdi
callq 0x9d720
movl %eax, -0x120(%rbp)
jmp 0xcda33
movl -0x120(%rbp), %eax
cmpl $0x9, %eax
setne %al
movb %al, -0x119(%rbp)
movb -0x119(%rbp), %al
movb %al, -0x121(%rbp)
testb $0x1, -0xc9(%rbp)
jne 0xcda5c
jmp 0xcda68
leaq -0xc8(%rbp), %rdi
callq 0xa2ae0
movb -0x121(%rbp), %al
testb $0x1, %al
jne 0xcda77
jmp 0xcdb7d
movq -0x10(%rbp), %rdi
callq 0x9b8b0
movq %rax, %rdx
movslq -0x84(%rbp), %rax
subq %rax, %rdx
movq -0x20(%rbp), %rax
movl (%rax), %ecx
addq %rdx, %rcx
movl %ecx, (%rax)
jmp 0xcdb7d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x98(%rbp), %rdi
callq 0xa2ae0
jmp 0xcdaf6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0xb8(%rbp), %rdi
callq 0xa4f00
jmp 0xcdaf6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
testb $0x1, -0xc9(%rbp)
jne 0xcdae8
jmp 0xcdaf4
leaq -0xc8(%rbp), %rdi
callq 0xa2ae0
jmp 0xcdaf6
movl -0x44(%rbp), %eax
movl $0x1, %ecx
cmpl %ecx, %eax
jne 0xcdb96
movq -0x40(%rbp), %rdi
callq 0x99540
movq %rax, -0xd8(%rbp)
movq 0x6531b(%rip), %rdi     # 0x132e38
leaq 0x35a41(%rip), %rsi     # 0x103565
callq 0x9dba0
movq %rax, -0x130(%rbp)
jmp 0xcdb32
movq -0xd8(%rbp), %rdi
movq (%rdi), %rax
movq 0x10(%rax), %rax
callq *%rax
movq -0x130(%rbp), %rdi
movq %rax, %rsi
callq 0x9dba0
movq %rax, -0x138(%rbp)
jmp 0xcdb5a
movq -0x138(%rbp), %rdi
movq 0x650f8(%rip), %rsi     # 0x132c60
callq 0x9e070
jmp 0xcdb6f
callq 0xa2520
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
jmp 0xcdb7f
jmp 0xcdb74
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
callq 0xa2520
jmp 0xcdb94
jmp 0xcdb96
movq -0x40(%rbp), %rdi
callq 0xa3520
movq %rax, %rdi
callq 0xa6900
nopw (%rax,%rax)