// File: jkingan[P]ladyheather/heathgps.cpp
// Function: parse_ubx_ver()
void parse_ubx_ver()
{
int i;
int line;

   // note: docs say the message is 70+ bytes long, we only see 40 bytes
   // on a NEO-6M
   log_packet_id("UBX_VER");

   saw_version |= 0x100;

   for(i=0; i<30; i++) {  // sw version
      ubx_sw[i] = tsip_byte();
   }
ubx_sw[21] = 0;  // trim it so info fits on screen
   if(ubx_sw[0]) ubx_fw_ver = (float) atof(ubx_sw);
   else          ubx_fw_ver = (float) atof(ubx_sw);

   for(i=0; i<10; i++) {  // hw vers
      ubx_hw[i] = tsip_byte();
   }
   ubx_hw[9] = 0;

   for(line=0; line<UBX_ROM_INFO; line++) {  // clear rom version info
      ubx_rom[line][0] = 0;
   }

   for(line=0; line<UBX_ROM_INFO; line++) {  // get rom version info
      if(tsip_error) {  // past end of message
         break;
      }

      for(i=0; i<30; i++) {   // rom version (not on NEO-6M)
         ubx_rom[line][i] = tsip_byte();
         if(tsip_error) {
            ubx_rom[line][0] = 0;
            break;
         }
      }
      ubx_rom[line][30] = 0;
   }

   have_info |= ALL_ID_INFO;

// show_version_info();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0xbccd8(%rip), %rdi     # 0x187a67
callq 0x7add0
leaq 0x2a184d(%rip), %rax    # 0x36c5e8
movl (%rax), %ecx
orl $0x100, %ecx            # imm = 0x100
leaq 0x2a183e(%rip), %rax    # 0x36c5e8
movl %ecx, (%rax)
movl $0x0, -0x4(%rbp)
cmpl $0x1e, -0x4(%rbp)
jge 0xcadd9
callq 0x7a510
movb %al, %dl
movslq -0x4(%rbp), %rcx
leaq 0x2d1ad5(%rip), %rax    # 0x39c8a0
movb %dl, (%rax,%rcx)
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0xcadb3
leaq 0x2d1ac0(%rip), %rax    # 0x39c8a0
movb $0x0, 0x15(%rax)
leaq 0x2d1ab5(%rip), %rax    # 0x39c8a0
cmpb $0x0, (%rax)
je 0xcae0d
leaq 0x2d1aa9(%rip), %rdi    # 0x39c8a0
callq 0x9480
cvtsd2ss %xmm0, %xmm0
leaq 0x2d1d55(%rip), %rax    # 0x39cb5c
movss %xmm0, (%rax)
jmp 0xcae28
leaq 0x2d1a8c(%rip), %rdi    # 0x39c8a0
callq 0x9480
cvtsd2ss %xmm0, %xmm0
leaq 0x2d1d38(%rip), %rax    # 0x39cb5c
movss %xmm0, (%rax)
movl $0x0, -0x4(%rbp)
cmpl $0xa, -0x4(%rbp)
jge 0xcae55
callq 0x7a510
movb %al, %dl
movslq -0x4(%rbp), %rcx
leaq 0x2d1a77(%rip), %rax    # 0x39c8be
movb %dl, (%rax,%rcx)
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0xcae2f
leaq 0x2d1a62(%rip), %rax    # 0x39c8be
movb $0x0, 0x9(%rax)
movl $0x0, -0x8(%rbp)
cmpl $0x14, -0x8(%rbp)
jge 0xcae8d
movslq -0x8(%rbp), %rcx
leaq 0x2d1a58(%rip), %rax    # 0x39c8d0
imulq $0x1f, %rcx, %rcx
addq %rcx, %rax
movb $0x0, (%rax)
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0xcae67
movl $0x0, -0x8(%rbp)
cmpl $0x14, -0x8(%rbp)
jge 0xcaf30
leaq 0x1d32ab(%rip), %rax    # 0x29e150
cmpl $0x0, (%rax)
je 0xcaeaf
jmp 0xcaf30
movl $0x0, -0x4(%rbp)
cmpl $0x1e, -0x4(%rbp)
jge 0xcaf0c
callq 0x7a510
movb %al, %dl
movslq -0x8(%rbp), %rcx
leaq 0x2d1a02(%rip), %rax    # 0x39c8d0
imulq $0x1f, %rcx, %rcx
addq %rcx, %rax
movslq -0x4(%rbp), %rcx
movb %dl, (%rax,%rcx)
leaq 0x1d326d(%rip), %rax    # 0x29e150
cmpl $0x0, (%rax)
je 0xcaeff
movslq -0x8(%rbp), %rcx
leaq 0x2d19dd(%rip), %rax    # 0x39c8d0
imulq $0x1f, %rcx, %rcx
addq %rcx, %rax
movb $0x0, (%rax)
jmp 0xcaf0c
jmp 0xcaf01
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0xcaeb6
movslq -0x8(%rbp), %rcx
leaq 0x2d19b9(%rip), %rax    # 0x39c8d0
imulq $0x1f, %rcx, %rcx
addq %rcx, %rax
movb $0x0, 0x1e(%rax)
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0xcae94
leaq 0x2a1c1d(%rip), %rax    # 0x36cb54
movl (%rax), %ecx
orl $0xf, %ecx
leaq 0x2a1c11(%rip), %rax    # 0x36cb54
movl %ecx, (%rax)
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)