// File: jkingan[P]ladyheather/heathgps.cpp
// Function: parse_star_inv()
void parse_star_inv()    
{
   // hardware version info
   log_packet_id("Star inventory");

   if(star_type == OSA_TYPE) {
      msg_col = 5;     // index of next char to get from nmea buffer
      if(get_fixed_field(12)) {
         strcpy(star_module, msg_field);
         osa_model = atoi(star_module);
         if(set_al_mask) {  // set alarm mask the first time through here
            set_al_mask = 0;
            if(osa_model != 4530) queue_star_cmd("AL_MASK=0000000", STAR_ALMASK_MSG); // enable all alarms !!!! 4531
            else                  queue_star_cmd("AL_MASK=000000", STAR_ALMASK_MSG); // enable all alarms !!!! 4531
            queue_star_cmd("AL_MASK", STAR_ALMASK_MSG);
         }
      }
      if(get_fixed_field(12)) {
         strcpy(star_article, msg_field);
      }
      if(get_fixed_field(6)) {
         strcpy(star_commercial, msg_field);
      }
      if(get_fixed_field(5)) {
         strcpy(star_sn, msg_field);
      }
      if(get_fixed_field(2)) {  // layout version
         strcpy(star_layout, msg_field);
      }
      if(get_fixed_field(4)) {
         strcpy(star_fw, msg_field);
      }
      if(get_fixed_field(8)) {
         strcpy(star_test_date, msg_field);
      }
      if(get_fixed_field(8)) {  // reserved
      }
      if(get_fixed_field(4)) {
         strcpy(star_test_version, msg_field);
      }
      if(get_fixed_field(10)) {
         strcpy(star_osc, msg_field);
      }

      have_info |= ALL_ID_INFO;
   }
   else {
      if(get_msg_field()) {  // a: name of module (12 chars)
         msg_field[12] = 0;
         if(star_module[0] == 0) need_redraw = 5478;  // just got the inventory
         strcpy(star_module, msg_field);
         if(strstr(msg_field, "NEC")) star_type = NEC_TYPE;
         else star_type = STAR4_TYPE;
      }

      if(get_msg_field()) {  // b: article number (6 chars) 
         msg_field[6] = 0;
         strcpy(star_article, msg_field);
      }

      if(get_msg_field()) {  // c: serial number (6 chars) 
         msg_field[6] = 0;
         strcpy(star_sn, msg_field);
      }

      if(get_msg_field()) {  // d: hardware version (2 chars) 
         msg_field[2] = 0;
         strcpy(star_hw_ver, msg_field);
      }

      if(get_msg_field()) {  // e: firmware article (6 chars) 
         msg_field[6] = 0;
         strcpy(star_fw_article, msg_field);
      }

      if(get_msg_field()) {  // f: fw version
         msg_field[12] = 0;
         strcpy(star_fw, msg_field);
      }

      if(get_msg_field()) {  // g: date of test (ddmmyyyy)
         msg_field[8] = 0;
         strcpy(star_test_date, msg_field);
      }

      if(get_msg_field()) {  // h: test system version (4 chars) 
         msg_field[4] = 0;
         strcpy(star_test_version, msg_field);
      }

      if(get_msg_field()) {  // i: osc type (10 chars) 
         msg_field[10] = 0;
         strcpy(star_osc, msg_field);
      }

      if(get_msg_field()) {  // j: fpga version
         msg_field[12] = 0;
         strcpy(star_fpga, msg_field);
      }

      have_info |= ALL_ID_INFO;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0xbf105(%rip), %rdi     # 0x187780
callq 0x7add0
leaq 0x1b1b41(%rip), %rax    # 0x27a1c8
cmpl $0x4f, (%rax)
jne 0xc886e
leaq 0x2d278d(%rip), %rax    # 0x39ae24
movl $0x5, (%rax)
movl $0xc, %edi
callq 0xb4d60
cmpl $0x0, %eax
je 0xc8733
leaq 0x2d479f(%rip), %rdi    # 0x39ce56
leaq 0x2d2562(%rip), %rsi    # 0x39ac20
callq 0x9350
leaq 0x2d478c(%rip), %rdi    # 0x39ce56
callq 0x95c0
movl %eax, %ecx
leaq 0x1b1af4(%rip), %rax    # 0x27a1cc
movl %ecx, (%rax)
cmpl $0x0, 0x303717(%rip)    # 0x3cbdf8
je 0xc8731
movl $0x0, 0x30370b(%rip)    # 0x3cbdf8
leaq 0x1b1ad8(%rip), %rax    # 0x27a1cc
cmpl $0x11b2, (%rax)         # imm = 0x11B2
je 0xc870f
leaq 0xbf08c(%rip), %rdi     # 0x18778f
movl $0xc9, %esi
callq 0x82fd0
jmp 0xc8720
leaq 0xbf089(%rip), %rdi     # 0x18779f
movl $0xc9, %esi
callq 0x82fd0
leaq 0xbf087(%rip), %rdi     # 0x1877ae
movl $0xc9, %esi
callq 0x82fd0
jmp 0xc8733
movl $0xc, %edi
callq 0xb4d60
cmpl $0x0, %eax
je 0xc8755
leaq 0x2d471a(%rip), %rdi    # 0x39ce63
leaq 0x2d24d0(%rip), %rsi    # 0x39ac20
callq 0x9350
movl $0x6, %edi
callq 0xb4d60
cmpl $0x0, %eax
je 0xc8777
leaq 0x2d4746(%rip), %rdi    # 0x39ceb1
leaq 0x2d24ae(%rip), %rsi    # 0x39ac20
callq 0x9350
movl $0x5, %edi
callq 0xb4d60
cmpl $0x0, %eax
je 0xc8799
leaq 0x2d46e3(%rip), %rdi    # 0x39ce70
leaq 0x2d248c(%rip), %rsi    # 0x39ac20
callq 0x9350
movl $0x2, %edi
callq 0xb4d60
cmpl $0x0, %eax
je 0xc87bb
leaq 0x2d46f5(%rip), %rdi    # 0x39cea4
leaq 0x2d246a(%rip), %rsi    # 0x39ac20
callq 0x9350
movl $0x4, %edi
callq 0xb4d60
cmpl $0x0, %eax
je 0xc87dd
leaq 0x2d46c6(%rip), %rdi    # 0x39ce97
leaq 0x2d2448(%rip), %rsi    # 0x39ac20
callq 0x9350
movl $0x8, %edi
callq 0xb4d60
cmpl $0x0, %eax
je 0xc87ff
leaq 0x2d46cb(%rip), %rdi    # 0x39cebe
leaq 0x2d2426(%rip), %rsi    # 0x39ac20
callq 0x9350
movl $0x8, %edi
callq 0xb4d60
cmpl $0x0, %eax
je 0xc8810
jmp 0xc8810
movl $0x4, %edi
callq 0xb4d60
cmpl $0x0, %eax
je 0xc8832
leaq 0x2d46a5(%rip), %rdi    # 0x39cecb
leaq 0x2d23f3(%rip), %rsi    # 0x39ac20
callq 0x9350
movl $0xa, %edi
callq 0xb4d60
cmpl $0x0, %eax
je 0xc8854
leaq 0x2d4690(%rip), %rdi    # 0x39ced8
leaq 0x2d23d1(%rip), %rsi    # 0x39ac20
callq 0x9350
leaq 0x2a42f9(%rip), %rax    # 0x36cb54
movl (%rax), %ecx
orl $0xf, %ecx
leaq 0x2a42ed(%rip), %rax    # 0x36cb54
movl %ecx, (%rax)
jmp 0xc8a66
callq 0xb0bd0
cmpl $0x0, %eax
je 0xc88e9
leaq 0x2d23a1(%rip), %rax    # 0x39ac20
movb $0x0, 0xc(%rax)
leaq 0x2d45cc(%rip), %rax    # 0x39ce56
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0xc889f
leaq 0x1af18b(%rip), %rax    # 0x277a24
movl $0x1566, (%rax)         # imm = 0x1566
leaq 0x2d45b0(%rip), %rdi    # 0x39ce56
leaq 0x2d2373(%rip), %rsi    # 0x39ac20
callq 0x9350
leaq 0x2d2367(%rip), %rdi    # 0x39ac20
leaq 0xbeef6(%rip), %rsi     # 0x1877b6
callq 0x9090
cmpq $0x0, %rax
je 0xc88da
leaq 0x1b18f6(%rip), %rax    # 0x27a1c8
movl $0x4e, (%rax)
jmp 0xc88e7
leaq 0x1b18e7(%rip), %rax    # 0x27a1c8
movl $0x34, (%rax)
jmp 0xc88e9
callq 0xb0bd0
cmpl $0x0, %eax
je 0xc8911
leaq 0x2d2326(%rip), %rax    # 0x39ac20
movb $0x0, 0x6(%rax)
leaq 0x2d455e(%rip), %rdi    # 0x39ce63
leaq 0x2d2314(%rip), %rsi    # 0x39ac20
callq 0x9350
callq 0xb0bd0
cmpl $0x0, %eax
je 0xc8939
leaq 0x2d22fe(%rip), %rax    # 0x39ac20
movb $0x0, 0x6(%rax)
leaq 0x2d4543(%rip), %rdi    # 0x39ce70
leaq 0x2d22ec(%rip), %rsi    # 0x39ac20
callq 0x9350
callq 0xb0bd0
cmpl $0x0, %eax
je 0xc8961
leaq 0x2d22d6(%rip), %rax    # 0x39ac20
movb $0x0, 0x2(%rax)
leaq 0x2d4528(%rip), %rdi    # 0x39ce7d
leaq 0x2d22c4(%rip), %rsi    # 0x39ac20
callq 0x9350
callq 0xb0bd0
cmpl $0x0, %eax
je 0xc8989
leaq 0x2d22ae(%rip), %rax    # 0x39ac20
movb $0x0, 0x6(%rax)
leaq 0x2d450d(%rip), %rdi    # 0x39ce8a
leaq 0x2d229c(%rip), %rsi    # 0x39ac20
callq 0x9350
callq 0xb0bd0
cmpl $0x0, %eax
je 0xc89b1
leaq 0x2d2286(%rip), %rax    # 0x39ac20
movb $0x0, 0xc(%rax)
leaq 0x2d44f2(%rip), %rdi    # 0x39ce97
leaq 0x2d2274(%rip), %rsi    # 0x39ac20
callq 0x9350
callq 0xb0bd0
cmpl $0x0, %eax
je 0xc89d9
leaq 0x2d225e(%rip), %rax    # 0x39ac20
movb $0x0, 0x8(%rax)
leaq 0x2d44f1(%rip), %rdi    # 0x39cebe
leaq 0x2d224c(%rip), %rsi    # 0x39ac20
callq 0x9350
callq 0xb0bd0
cmpl $0x0, %eax
je 0xc8a01
leaq 0x2d2236(%rip), %rax    # 0x39ac20
movb $0x0, 0x4(%rax)
leaq 0x2d44d6(%rip), %rdi    # 0x39cecb
leaq 0x2d2224(%rip), %rsi    # 0x39ac20
callq 0x9350
callq 0xb0bd0
cmpl $0x0, %eax
je 0xc8a29
leaq 0x2d220e(%rip), %rax    # 0x39ac20
movb $0x0, 0xa(%rax)
leaq 0x2d44bb(%rip), %rdi    # 0x39ced8
leaq 0x2d21fc(%rip), %rsi    # 0x39ac20
callq 0x9350
callq 0xb0bd0
cmpl $0x0, %eax
je 0xc8a51
leaq 0x2d21e6(%rip), %rax    # 0x39ac20
movb $0x0, 0xc(%rax)
leaq 0x2d44a0(%rip), %rdi    # 0x39cee5
leaq 0x2d21d4(%rip), %rsi    # 0x39ac20
callq 0x9350
leaq 0x2a40fc(%rip), %rax    # 0x36cb54
movl (%rax), %ecx
orl $0xf, %ecx
leaq 0x2a40f0(%rip), %rax    # 0x36cb54
movl %ecx, (%rax)
popq %rbp
retq
nopl (%rax,%rax)