// File: /workspace/github_cpp_makefile_star2_O3/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 0x20e0
leaq -0x1a8(%rbp), %r14
leaq 0x21ba(%rip), %rsi      # 0x5132
movl $0x7, %edx
movq %r14, %rdi
callq 0x2170
movq -0x1a8(%rbp), %rax
movq -0x18(%rax), %rax
movl -0x190(%rbp,%rax), %ecx
andl $-0x4b, %ecx
orl $0x2, %ecx
movl %ecx, -0x190(%rbp,%rax)
movl 0x24(%r15), %esi
movq %r14, %rdi
callq 0x20c0
leaq 0x2183(%rip), %rsi      # 0x513a
movl $0x7, %edx
movq %r14, %rdi
callq 0x2170
movzbl 0x20(%r15), %esi
movq %r14, %rdi
callq 0x21e0
leaq 0x216a(%rip), %rsi      # 0x5142
movl $0x8, %edx
movq %r14, %rdi
callq 0x2170
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), %rcx
movq $0x4, -0x198(%rbp,%rcx)
movq -0x18(%rax), %rax
leaq (%r14,%rax), %r12
cmpb $0x0, -0xc7(%rbp,%rax)
jne 0x304b
movq %r12, %rdi
movl $0x20, %esi
callq 0x2140
movb $0x1, 0xe1(%r12)
movb $0x30, 0xe0(%r12)
movzwl 0x22(%r15), %esi
movq %r14, %rdi
callq 0x20c0
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x2140
movsbl %al, %esi
movq %r12, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
movq %rbx, -0x30(%rbp)
movq 0x10(%r15), %rax
cmpq 0x8(%r15), %rax
je 0x31ec
xorl %ebx, %ebx
leaq 0x21a0(%rip), %r12      # 0x5246
cmpq $0x12, %rbx
setne %al
movl %ebx, %ecx
andl $0x7fffffef, %ecx       # imm = 0x7FFFFFEF
cmpl $0xa, %ecx
setne %cl
testb %cl, %al
jne 0x30ea
movq -0x1a8(%rbp), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2140
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
movl %ebx, %eax
andl $0x7fffffdf, %eax       # imm = 0x7FFFFFDF
cmpl $0x1e, %eax
jne 0x314b
movq -0x1a8(%rbp), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2140
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x2140
movsbl %al, %esi
movq %r13, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
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), %rcx
movq $0x2, -0x198(%rbp,%rcx)
movq -0x18(%rax), %rax
leaq (%r14,%rax), %r13
cmpb $0x0, -0xc7(%rbp,%rax)
jne 0x31b0
movq %r13, %rdi
movl $0x20, %esi
callq 0x2140
movb $0x1, 0xe1(%r13)
movb $0x30, 0xe0(%r13)
movq 0x8(%r15), %rax
movzbl (%rax,%rbx), %esi
movq %r14, %rdi
callq 0x21e0
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x2170
incq %rbx
movq 0x10(%r15), %rax
subq 0x8(%r15), %rax
cmpq %rbx, %rax
ja 0x30a6
movq -0x1a8(%rbp), %rax
movq -0x18(%rax), %rcx
movl -0x190(%rbp,%rcx), %edx
andl $-0x4b, %edx
orl $0x2, %edx
movl %edx, -0x190(%rbp,%rcx)
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2140
movq -0x30(%rbp), %rbx
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
leaq -0x1a0(%rbp), %rsi
movq %rbx, %rdi
callq 0x21b0
movq 0x3d6f(%rip), %rsi      # 0x6fb8
leaq -0x1b8(%rbp), %rdi
callq 0x2100
leaq -0x138(%rbp), %rdi
callq 0x2070
movq %rbx, %rax
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3278
movq %rax, %rbx
movq 0x3d36(%rip), %rsi      # 0x6fb8
leaq -0x1b8(%rbp), %rdi
callq 0x2100
leaq -0x138(%rbp), %rdi
callq 0x2070
movq %rbx, %rdi
callq 0x2200