// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r14
pushq %rbx
leaq 0x91cda(%rip), %rdi     # 0x1243b8
callq 0x58e77
leaq 0x1888fe(%rip), %r14    # 0x21afe8
cmpl $0x4f, (%r14)
jne 0x9288a
leaq 0x2a9549(%rip), %rax    # 0x33bc44
movl $0x5, (%rax)
movl $0xc, %edi
callq 0x83e83
testl %eax, %eax
je 0x9277b
leaq 0x2ab560(%rip), %rbx    # 0x33dc76
leaq 0x2a9323(%rip), %rsi    # 0x33ba40
movq %rbx, %rdi
callq 0x9340
movq %rbx, %rdi
callq 0x95e0
leaq 0x1888b8(%rip), %rcx    # 0x21afec
movl %eax, (%rcx)
cmpl $0x0, 0x2da4eb(%rip)    # 0x36cc28
je 0x9277b
movl $0x0, 0x2da4df(%rip)    # 0x36cc28
cmpl $0x11b2, %eax           # imm = 0x11B2
leaq 0x91c82(%rip), %rax     # 0x1243d7
leaq 0x91c6b(%rip), %rdi     # 0x1243c7
cmoveq %rax, %rdi
movl $0xc9, %esi
callq 0x5ee52
leaq 0x91c75(%rip), %rdi     # 0x1243e6
movl $0xc9, %esi
callq 0x5ee52
movl $0xc, %edi
callq 0x83e83
testl %eax, %eax
je 0x9279c
leaq 0x2ab4f3(%rip), %rdi    # 0x33dc83
leaq 0x2a92a9(%rip), %rsi    # 0x33ba40
callq 0x9340
movl $0x6, %edi
callq 0x83e83
testl %eax, %eax
je 0x927bd
leaq 0x2ab520(%rip), %rdi    # 0x33dcd1
leaq 0x2a9288(%rip), %rsi    # 0x33ba40
callq 0x9340
movl $0x5, %edi
callq 0x83e83
testl %eax, %eax
je 0x927de
leaq 0x2ab4be(%rip), %rdi    # 0x33dc90
leaq 0x2a9267(%rip), %rsi    # 0x33ba40
callq 0x9340
movl $0x2, %edi
callq 0x83e83
testl %eax, %eax
je 0x927ff
leaq 0x2ab4d1(%rip), %rdi    # 0x33dcc4
leaq 0x2a9246(%rip), %rsi    # 0x33ba40
callq 0x9340
movl $0x4, %edi
callq 0x83e83
testl %eax, %eax
je 0x92820
leaq 0x2ab4a3(%rip), %rdi    # 0x33dcb7
leaq 0x2a9225(%rip), %rsi    # 0x33ba40
callq 0x9340
movl $0x8, %edi
callq 0x83e83
testl %eax, %eax
je 0x92841
leaq 0x2ab4a9(%rip), %rdi    # 0x33dcde
leaq 0x2a9204(%rip), %rsi    # 0x33ba40
callq 0x9340
movl $0x8, %edi
callq 0x83e83
movl $0x4, %edi
callq 0x83e83
testl %eax, %eax
je 0x9286c
leaq 0x2ab48b(%rip), %rdi    # 0x33dceb
leaq 0x2a91d9(%rip), %rsi    # 0x33ba40
callq 0x9340
movl $0xa, %edi
callq 0x83e83
testl %eax, %eax
je 0x92a16
leaq 0x2ab473(%rip), %rdi    # 0x33dcf8
jmp 0x92a0a
callq 0x811da
testl %eax, %eax
je 0x928ef
leaq 0x2a91a6(%rip), %rax    # 0x33ba40
movb $0x0, 0xc(%rax)
leaq 0x2ab3d1(%rip), %rax    # 0x33dc76
cmpb $0x0, (%rax)
jne 0x928b7
leaq 0x185f93(%rip), %rax    # 0x218844
movl $0x1566, (%rax)         # imm = 0x1566
leaq 0x2ab3b8(%rip), %rdi    # 0x33dc76
leaq 0x2a917b(%rip), %rbx    # 0x33ba40
movq %rbx, %rsi
callq 0x9340
leaq 0x91b1a(%rip), %rsi     # 0x1243ee
movq %rbx, %rdi
callq 0x9090
testq %rax, %rax
movl $0x34, %eax
movl $0x4e, %ecx
cmovel %eax, %ecx
movl %ecx, (%r14)
callq 0x811da
testl %eax, %eax
je 0x9290f
leaq 0x2a9141(%rip), %rsi    # 0x33ba40
movb $0x0, 0x6(%rsi)
leaq 0x2ab379(%rip), %rdi    # 0x33dc83
callq 0x9340
callq 0x811da
testl %eax, %eax
je 0x9292f
leaq 0x2a9121(%rip), %rsi    # 0x33ba40
movb $0x0, 0x6(%rsi)
leaq 0x2ab366(%rip), %rdi    # 0x33dc90
callq 0x9340
callq 0x811da
testl %eax, %eax
je 0x9294f
leaq 0x2a9101(%rip), %rsi    # 0x33ba40
movb $0x0, 0x2(%rsi)
leaq 0x2ab353(%rip), %rdi    # 0x33dc9d
callq 0x9340
callq 0x811da
testl %eax, %eax
je 0x9296f
leaq 0x2a90e1(%rip), %rsi    # 0x33ba40
movb $0x0, 0x6(%rsi)
leaq 0x2ab340(%rip), %rdi    # 0x33dcaa
callq 0x9340
callq 0x811da
testl %eax, %eax
je 0x9298f
leaq 0x2a90c1(%rip), %rsi    # 0x33ba40
movb $0x0, 0xc(%rsi)
leaq 0x2ab32d(%rip), %rdi    # 0x33dcb7
callq 0x9340
callq 0x811da
testl %eax, %eax
je 0x929af
leaq 0x2a90a1(%rip), %rsi    # 0x33ba40
movb $0x0, 0x8(%rsi)
leaq 0x2ab334(%rip), %rdi    # 0x33dcde
callq 0x9340
callq 0x811da
testl %eax, %eax
je 0x929cf
leaq 0x2a9081(%rip), %rsi    # 0x33ba40
movb $0x0, 0x4(%rsi)
leaq 0x2ab321(%rip), %rdi    # 0x33dceb
callq 0x9340
callq 0x811da
testl %eax, %eax
je 0x929ef
leaq 0x2a9061(%rip), %rsi    # 0x33ba40
movb $0x0, 0xa(%rsi)
leaq 0x2ab30e(%rip), %rdi    # 0x33dcf8
callq 0x9340
callq 0x811da
testl %eax, %eax
je 0x92a16
leaq 0x2a9041(%rip), %rax    # 0x33ba40
movb $0x0, 0xc(%rax)
leaq 0x2ab2fb(%rip), %rdi    # 0x33dd05
leaq 0x2a902f(%rip), %rsi    # 0x33ba40
callq 0x9340
leaq 0x27af57(%rip), %rax    # 0x30d974
orb $0xf, (%rax)
popq %rbx
popq %r14
popq %rbp
retq