// File: /workspace/github_cpp_makefile_star2_O2/Marm0t[P]dji-phantom3-parser/packet.cpp
// Function: Packet::toString[abi:cxx11]()
string Packet::toString()
{
    stringstream ss;
    ss << "MsgID: " << dec << _msgId;
    ss << ", len: " << (int)_packetLen;
    ss << ", type: " << noshowbase << hex << setw(4) << setfill ('0') << _packetType << endl;
    /*
    for ( packetv_t::const_iterator it = _packv.begin(); it != _packv.end(); ++it)
    {
        ss << noshowbase << hex << setw(2) << setfill('0') << (int)(unsigned char)(*it) << " ";
    }
    */
    for (int i = 0; i< _packv.size(); ++i)
    {
        if (i==10 || i==18 || i==26) ss << endl;
        if (i==30 || i==62) ss <<endl << endl; // unknown part of the GPS message begins
        ss << noshowbase << hex << setw(2) << setfill('0') << (int)(unsigned char)(_packv[i]) << " ";
    }
    ss << dec << endl;
    return ss.str();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x198, %rsp            # imm = 0x198
movq %rsi, %r15
movq %rdi, %rbx
leaq -0x1b8(%rbp), %rdi
callq 0x20d0
leaq -0x1a8(%rbp), %r14
leaq 0x131c(%rip), %rsi      # 0x4132
movq %r14, %rdi
callq 0x2150
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x2, %edx
movl %edx, 0x18(%rax,%rcx)
movl 0x24(%r15), %esi
movq %rax, %rdi
callq 0x20c0
leaq 0x12f4(%rip), %rsi      # 0x413a
movq %r14, %rdi
callq 0x2150
movzbl 0x20(%r15), %esi
movq %rax, %rdi
callq 0x2210
leaq 0x12e0(%rip), %rsi      # 0x4142
movq %r14, %rdi
callq 0x2150
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
andl $0xfffffdff, 0x18(%rax,%rdx) # imm = 0xFFFFFDFF
movq -0x18(%rcx), %rdx
movl 0x18(%rax,%rdx), %esi
andl $-0x4b, %esi
orl $0x8, %esi
movl %esi, 0x18(%rax,%rdx)
movq -0x18(%rcx), %rcx
movq $0x4, 0x10(%rax,%rcx)
pushq $0x30
popq %rsi
movq %rax, %rdi
callq 0x21c0
movzwl 0x22(%r15), %esi
movq %rax, %rdi
callq 0x2200
movq %rax, %rdi
callq 0x20a0
movq %rbx, -0x30(%rbp)
xorl %ebx, %ebx
pushq $0x30
popq %r12
leaq 0x137d(%rip), %r13      # 0x4246
movq 0x10(%r15), %rax
subq 0x8(%r15), %rax
cmpq %rbx, %rax
jbe 0x2f83
cmpq $0x12, %rbx
setne %al
movl %ebx, %ecx
andl $0x7fffffef, %ecx       # imm = 0x7FFFFFEF
cmpl $0xa, %ecx
setne %cl
testb %cl, %al
jne 0x2efb
movq %r14, %rdi
callq 0x20a0
movl %ebx, %eax
andl $0x7fffffdf, %eax       # imm = 0x7FFFFFDF
cmpl $0x1e, %eax
jne 0x2f17
movq %r14, %rdi
callq 0x20a0
movq %rax, %rdi
callq 0x20a0
movq -0x1a8(%rbp), %rax
movq -0x18(%rax), %rcx
andl $0xfffffdff, -0x190(%rbp,%rcx) # imm = 0xFFFFFDFF
movq -0x18(%rax), %rcx
movl -0x190(%rbp,%rcx), %edx
andl $-0x4b, %edx
orl $0x8, %edx
movl %edx, -0x190(%rbp,%rcx)
movq -0x18(%rax), %rax
movq $0x2, -0x198(%rbp,%rax)
movq %r14, %rdi
movl %r12d, %esi
callq 0x21c0
movq 0x8(%r15), %rcx
movzbl (%rcx,%rbx), %esi
movq %rax, %rdi
callq 0x2210
movq %rax, %rdi
movq %r13, %rsi
callq 0x2150
incq %rbx
jmp 0x2ec9
movq -0x1a8(%rbp), %rax
movq -0x18(%rax), %rax
movl -0x190(%rbp,%rax), %ecx
andl $-0x4b, %ecx
orl $0x2, %ecx
movl %ecx, -0x190(%rbp,%rax)
movq %r14, %rdi
callq 0x20a0
movq -0x30(%rbp), %rbx
leaq -0x1a0(%rbp), %rsi
movq %rbx, %rdi
callq 0x21d0
leaq -0x1b8(%rbp), %rdi
callq 0x2100
movq %rbx, %rax
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2fe0
movq %rax, %rbx
leaq -0x1b8(%rbp), %rdi
callq 0x2100
movq %rbx, %rdi
callq 0x2230
nop