// File: /workspace/github_cpp_makefile_star2_O2/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 0x88bb3(%rip), %rdi     # 0x10e3e0
callq 0x520bf
leaq 0x17f7af(%rip), %r14    # 0x204fe8
cmpl $0x4f, (%r14)
jne 0x859c2
leaq 0x2a03fa(%rip), %rax    # 0x325c44
movl $0x5, (%rax)
pushq $0xc
popq %rdi
callq 0x78198
testl %eax, %eax
je 0x858c5
leaq 0x2a2413(%rip), %rbx    # 0x327c76
leaq 0x2a01d6(%rip), %rsi    # 0x325a40
movq %rbx, %rdi
callq 0x9330
movq %rbx, %rdi
callq 0x95e0
leaq 0x17f76b(%rip), %rcx    # 0x204fec
movl %eax, (%rcx)
cmpl $0x0, 0x2d139e(%rip)    # 0x356c28
je 0x858c5
andl $0x0, 0x2d1395(%rip)    # 0x356c28
cmpl $0x11b2, %eax           # imm = 0x11B2
leaq 0x88b60(%rip), %rax     # 0x10e3ff
leaq 0x88b49(%rip), %rdi     # 0x10e3ef
cmoveq %rax, %rdi
movl $0xc9, %esi
callq 0x576d4
leaq 0x88b53(%rip), %rdi     # 0x10e40e
movl $0xc9, %esi
callq 0x576d4
pushq $0xc
popq %rdi
callq 0x78198
testl %eax, %eax
je 0x858e4
leaq 0x2a23ab(%rip), %rdi    # 0x327c83
leaq 0x2a0161(%rip), %rsi    # 0x325a40
callq 0x9330
pushq $0x6
popq %rdi
callq 0x78198
testl %eax, %eax
je 0x85903
leaq 0x2a23da(%rip), %rdi    # 0x327cd1
leaq 0x2a0142(%rip), %rsi    # 0x325a40
callq 0x9330
pushq $0x5
popq %rdi
callq 0x78198
testl %eax, %eax
je 0x85922
leaq 0x2a237a(%rip), %rdi    # 0x327c90
leaq 0x2a0123(%rip), %rsi    # 0x325a40
callq 0x9330
pushq $0x2
popq %rdi
callq 0x78198
testl %eax, %eax
je 0x85941
leaq 0x2a238f(%rip), %rdi    # 0x327cc4
leaq 0x2a0104(%rip), %rsi    # 0x325a40
callq 0x9330
pushq $0x4
popq %rdi
callq 0x78198
testl %eax, %eax
je 0x85960
leaq 0x2a2363(%rip), %rdi    # 0x327cb7
leaq 0x2a00e5(%rip), %rsi    # 0x325a40
callq 0x9330
pushq $0x8
popq %rdi
callq 0x78198
testl %eax, %eax
je 0x8597f
leaq 0x2a236b(%rip), %rdi    # 0x327cde
leaq 0x2a00c6(%rip), %rsi    # 0x325a40
callq 0x9330
pushq $0x8
popq %rdi
callq 0x78198
pushq $0x4
popq %rdi
callq 0x78198
testl %eax, %eax
je 0x859a6
leaq 0x2a2351(%rip), %rdi    # 0x327ceb
leaq 0x2a009f(%rip), %rsi    # 0x325a40
callq 0x9330
pushq $0xa
popq %rdi
callq 0x78198
testl %eax, %eax
je 0x85b4a
leaq 0x2a233b(%rip), %rdi    # 0x327cf8
jmp 0x85b3e
callq 0x75767
testl %eax, %eax
je 0x85a23
leaq 0x2a006e(%rip), %rax    # 0x325a40
movb $0x0, 0xc(%rax)
leaq 0x2a2299(%rip), %rax    # 0x327c76
cmpb $0x0, (%rax)
jne 0x859ef
leaq 0x17ce5b(%rip), %rax    # 0x202844
movl $0x1566, (%rax)         # imm = 0x1566
leaq 0x2a2280(%rip), %rdi    # 0x327c76
leaq 0x2a0043(%rip), %rbx    # 0x325a40
movq %rbx, %rsi
callq 0x9330
leaq 0x88a0a(%rip), %rsi     # 0x10e416
movq %rbx, %rdi
callq 0x9090
testq %rax, %rax
pushq $0x34
popq %rax
pushq $0x4e
popq %rcx
cmovel %eax, %ecx
movl %ecx, (%r14)
callq 0x75767
testl %eax, %eax
je 0x85a43
leaq 0x2a000d(%rip), %rsi    # 0x325a40
movb $0x0, 0x6(%rsi)
leaq 0x2a2245(%rip), %rdi    # 0x327c83
callq 0x9330
callq 0x75767
testl %eax, %eax
je 0x85a63
leaq 0x29ffed(%rip), %rsi    # 0x325a40
movb $0x0, 0x6(%rsi)
leaq 0x2a2232(%rip), %rdi    # 0x327c90
callq 0x9330
callq 0x75767
testl %eax, %eax
je 0x85a83
leaq 0x29ffcd(%rip), %rsi    # 0x325a40
movb $0x0, 0x2(%rsi)
leaq 0x2a221f(%rip), %rdi    # 0x327c9d
callq 0x9330
callq 0x75767
testl %eax, %eax
je 0x85aa3
leaq 0x29ffad(%rip), %rsi    # 0x325a40
movb $0x0, 0x6(%rsi)
leaq 0x2a220c(%rip), %rdi    # 0x327caa
callq 0x9330
callq 0x75767
testl %eax, %eax
je 0x85ac3
leaq 0x29ff8d(%rip), %rsi    # 0x325a40
movb $0x0, 0xc(%rsi)
leaq 0x2a21f9(%rip), %rdi    # 0x327cb7
callq 0x9330
callq 0x75767
testl %eax, %eax
je 0x85ae3
leaq 0x29ff6d(%rip), %rsi    # 0x325a40
movb $0x0, 0x8(%rsi)
leaq 0x2a2200(%rip), %rdi    # 0x327cde
callq 0x9330
callq 0x75767
testl %eax, %eax
je 0x85b03
leaq 0x29ff4d(%rip), %rsi    # 0x325a40
movb $0x0, 0x4(%rsi)
leaq 0x2a21ed(%rip), %rdi    # 0x327ceb
callq 0x9330
callq 0x75767
testl %eax, %eax
je 0x85b23
leaq 0x29ff2d(%rip), %rsi    # 0x325a40
movb $0x0, 0xa(%rsi)
leaq 0x2a21da(%rip), %rdi    # 0x327cf8
callq 0x9330
callq 0x75767
testl %eax, %eax
je 0x85b4a
leaq 0x29ff0d(%rip), %rax    # 0x325a40
movb $0x0, 0xc(%rax)
leaq 0x2a21c7(%rip), %rdi    # 0x327d05
leaq 0x29fefb(%rip), %rsi    # 0x325a40
callq 0x9330
leaq 0x271e23(%rip), %rax    # 0x2f7974
orb $0xf, (%rax)
popq %rbx
popq %r14
popq %rbp
retq