// File: /workspace/github_cpp_makefile_star2_O3/xjrueda[P]fixprime/src/Message.cpp
// Function: fprime::Message::toFix[abi:cxx11]()
string Message::toFix() {
        string strHeader, strBody, strTrailer, strDummy;

        unsigned int bodyLength = 0;
        unsigned int dummy = 0;
        bool isBody = false;

        header->stringify(strDummy, isBody, bodyLength);
        body->stringify(strBody, isBody, bodyLength);
        header->getChild(9)->setValue(boost::lexical_cast<string>(bodyLength));
        header->stringify(strHeader, isBody, dummy);
        trailer->stringify(strTrailer, isBody, dummy);

        //calculate checksum
        fprime::FixParser fparser;
        unsigned int checkSum = fparser.checkSum(strHeader + strBody + strTrailer);
        
        stringstream ssCheckSum;
        ssCheckSum << std::setw (3) << std::setfill('0')<< checkSum;
        trailer->getChild(10)->setValue(ssCheckSum.str());
        isBody = false;
        strTrailer.clear();
        trailer->stringify(strTrailer, isBody, dummy);
        return strHeader + strBody + strTrailer;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2b8, %rsp            # imm = 0x2B8
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x80(%rsp), %rcx
movq %rcx, -0x10(%rcx)
xorl %eax, %eax
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq 0x60(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq 0x40(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq 0x120(%rsp), %r13
movq %r13, -0x10(%r13)
movq %rax, -0x8(%r13)
movb %al, (%r13)
leaq 0xc(%rsp), %rcx
movl %eax, (%rcx)
movl %eax, 0x8(%rsp)
leaq 0x7(%rsp), %rdx
movb %al, (%rdx)
movq 0x8(%rsi), %rdi
leaq 0x110(%rsp), %rsi
callq 0x2e120
movq 0x18(%r14), %rdi
leaq 0x50(%rsp), %rsi
leaq 0x7(%rsp), %rdx
leaq 0xc(%rsp), %rcx
callq 0x2e120
movq 0x8(%r14), %rsi
leaq 0x10(%rsp), %rdi
movl $0x9, %edx
callq 0x2f9d0
movq 0x10(%rsp), %r15
leaq 0xc0(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq $0x0, -0x8(%rbp)
movb $0x0, (%rbp)
leaq 0x132(%rsp), %rax
movq %rax, 0x16(%rax)
leaq 0x146(%rsp), %r12
movq %r12, 0xa(%r12)
movl 0xc(%rsp), %eax
leaq 0xd0(%rsp), %rdi
movl %eax, (%rdi)
movq %r12, 0x8(%rdi)
movb $0x30, 0x10(%rdi)
movl $0x30, 0x14(%rdi)
callq 0x30040
movq %rax, 0x148(%rsp)
movq %r12, 0x150(%rsp)
leaq 0xb0(%rsp), %rdi
movq 0x8(%rdi), %rdx
subq %rax, %r12
xorl %esi, %esi
movq %rax, %rcx
movq %r12, %r8
callq 0x2fad0
leaq 0xb0(%rsp), %rsi
movq %r15, %rdi
callq 0x2ecf0
movq 0xb0(%rsp), %rdi
cmpq %rbp, %rdi
je 0x3dbbf
callq 0x2f6c0
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x3dbce
callq 0x2f370
movq 0x8(%r14), %rdi
leaq 0x70(%rsp), %rsi
leaq 0x7(%rsp), %rdx
leaq 0x8(%rsp), %rcx
callq 0x2e120
movq 0x28(%r14), %rdi
leaq 0x30(%rsp), %rsi
leaq 0x7(%rsp), %rdx
leaq 0x8(%rsp), %rcx
callq 0x2e120
leaq 0xd0(%rsp), %rdi
callq 0x2ea90
leaq 0x130(%rsp), %rdi
leaq 0x70(%rsp), %rsi
leaq 0x50(%rsp), %rdx
callq 0x30ef0
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
leaq 0x130(%rsp), %rdi
callq 0x2e660
leaq 0xa0(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x3dc69
movq %rdx, 0x90(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xa0(%rsp)
jmp 0x3dc70
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
leaq 0x90(%rsp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0xd0(%rsp), %rdi
callq 0x2fd60
movl %eax, %ebp
movq 0x90(%rsp), %rdi
cmpq %r15, %rdi
je 0x3dcb0
callq 0x2f6c0
leaq 0x140(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3dcc6
callq 0x2f6c0
leaq 0x130(%rsp), %rdi
callq 0x2f130
movq 0x140(%rsp), %rax
movq -0x18(%rax), %rcx
movq $0x3, 0x150(%rsp,%rcx)
movq -0x18(%rax), %rax
leaq (%rsp,%rax), %r15
addq $0x140, %r15            # imm = 0x140
cmpb $0x0, 0xe1(%r15)
jne 0x3dd19
movq %r15, %rdi
movl $0x20, %esi
callq 0x2f710
movb $0x1, 0xe1(%r15)
leaq 0x140(%rsp), %rdi
movb $0x30, 0xe0(%r15)
movzbl %bpl, %esi
callq 0x2f090
movq 0x28(%r14), %rsi
leaq 0x10(%rsp), %rdi
movl $0xa, %edx
callq 0x2f9d0
movq 0x10(%rsp), %r15
leaq 0x148(%rsp), %rsi
leaq 0xf0(%rsp), %rdi
callq 0x305c0
leaq 0xf0(%rsp), %rsi
movq %r15, %rdi
callq 0x2ecf0
leaq 0x100(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3dd85
callq 0x2f6c0
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x3dd94
callq 0x2f370
xorl %eax, %eax
leaq 0x7(%rsp), %rdx
movb %al, (%rdx)
leaq 0x30(%rsp), %rsi
movq $0x0, 0x8(%rsi)
movq (%rsi), %rcx
movb %al, (%rcx)
movq 0x28(%r14), %rdi
leaq 0x8(%rsp), %rcx
callq 0x2e120
leaq 0x10(%rsp), %rdi
leaq 0x70(%rsp), %rsi
leaq 0x50(%rsp), %rdx
callq 0x30ef0
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
leaq 0x10(%rsp), %rdi
callq 0x2e660
leaq 0x10(%rbx), %rdx
movq %rdx, (%rbx)
movq (%rax), %rsi
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rsi
je 0x3de07
movq %rsi, (%rbx)
movq (%rcx), %rdx
movq %rdx, 0x10(%rbx)
jmp 0x3de0d
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rbx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3de37
callq 0x2f6c0
movq 0x32e42(%rip), %rsi     # 0x70c80
leaq 0x130(%rsp), %rdi
callq 0x2f190
leaq 0x1b0(%rsp), %rdi
callq 0x2e700
leaq 0xd0(%rsp), %rdi
callq 0x2fa00
movq 0x110(%rsp), %rdi
cmpq %r13, %rdi
je 0x3de77
callq 0x2f6c0
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x3de8b
callq 0x2f6c0
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x3de9f
callq 0x2f6c0
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x3deb6
callq 0x2f6c0
movq %rbx, %rax
addq $0x2b8, %rsp            # imm = 0x2B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3df88
callq 0x2f6c0
jmp 0x3df88
jmp 0x3df85
movq %rax, %rbx
leaq 0x100(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3df0d
callq 0x2f6c0
jmp 0x3df0d
movq %rax, %rbx
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x3df88
callq 0x2f370
jmp 0x3df88
jmp 0x3df85
jmp 0x3df54
movq %rax, %rbx
movq 0x90(%rsp), %rdi
cmpq %r15, %rdi
je 0x3df3c
callq 0x2f6c0
jmp 0x3df3c
movq %rax, %rbx
leaq 0x140(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3dfa9
callq 0x2f6c0
jmp 0x3dfa9
movq %rax, %rbx
jmp 0x3dfa9
jmp 0x3dfb8
jmp 0x3df5f
jmp 0x3dfb8
movq %rax, %rbx
movq 0xb0(%rsp), %rdi
cmpq %rbp, %rdi
je 0x3df74
callq 0x2f6c0
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x3dfbb
callq 0x2f370
jmp 0x3dfbb
movq %rax, %rbx
movq 0x32cf1(%rip), %rsi     # 0x70c80
leaq 0x130(%rsp), %rdi
callq 0x2f190
leaq 0x1b0(%rsp), %rdi
callq 0x2e700
leaq 0xd0(%rsp), %rdi
callq 0x2fa00
jmp 0x3dfbb
movq %rax, %rbx
movq 0x110(%rsp), %rdi
cmpq %r13, %rdi
je 0x3dfcd
callq 0x2f6c0
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x3dfe1
callq 0x2f6c0
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x3dff5
callq 0x2f6c0
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x3e00c
callq 0x2f6c0
movq %rbx, %rdi
callq 0x30a10