// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_x72_info()
void parse_x72_info()
{
char *s;
char *comma;
int i;

   // get values from the X72 info response

   s = info_param("SDCP VERSION");
   if(s) {
      x72_fw = atof(s);
      have_x72_fw = 1;
      have_x72_info = 1;
      if(have_x72_type == 0) {
         x72_type = X72_TYPE;
         have_x72_type = 1;
      }

      s = info_param("OF");
      if(s) {
         x72_date[0] = 0;
         for(i=0; i<12; i++) {
            if(s[i] == ';') break;
            x72_date[i] = s[i];
            x72_date[i+1] = 0;
         }
      }
   }
   s = info_param("SA22 VERSION");
   if(s) {
      x72_fw = atof(s);
      have_x72_fw = 1;
      have_x72_info = 1;
      if(have_x72_type == 0) {
         x72_type = SA22_TYPE;
         have_x72_type = 1;
      }

      s = info_param("OF");
      if(s) {
         x72_date[0] = 0;
         for(i=0; i<12; i++) {
            if(s[i] == ';') break;
            x72_date[i] = s[i];
            x72_date[i+1] = 0;
         }
      }
   }

   s = info_param("LOADER VERSION");
   if(s) {
      x72_loader = atoi(s);
      have_x72_loader = 1;
      have_x72_info = 1;
   }

   s = info_param("STATE IS");
   if(s) {
      x72_tune = atoi(s);
      have_x72_tune = 1;
      have_x72_info = 1;
   }

   s = info_param("CODE IS");
   if(s) {
      comma = strchr(s, ',');
      if(comma) *comma = 0;
      for(i=0; i<20; i++) x72_serial[i] = s[i];
      have_x72_serial = 1;
      have_x72_info = 1;
   }


   s = info_param("CRYSTAL:");
   if(s) {
      x72_crystal = atof(s);
      have_x72_crystal = 1;
      have_x72_info = 1;
   }

   s = info_param("SINE:");
   if(s) {
      x72_sine = atof(s);
      have_x72_sine = 1;
      have_x72_info = 1;
   }

   s = info_param("ACMOS:");
   if(s) {
      x72_acmos = atof(s);
      have_x72_acmos = 1;
      have_x72_info = 1;
   }

   s = info_param("MODE");
   if(s) {
   }

   s = info_param("FC:");
   if(0 && s) {  // we got these values elsewhere
      if(strstr(s, "ENABLED")) x72_efc = 1;
      else                     x72_efc = 0;
      have_x72_efc = 1;
      have_x72_info = 1;
   }

   s = info_param("SRVC:");
   if(0 && s) {  // we got these values elsewhere
      if(strstr(s, "LOW")) x72_srvc = 0;
      else                 x72_srvc = 1;
      have_x72_srvc = 1;
      have_x72_info = 1;
   }

   s = info_param("RES TEMP OFF:");
   if(s) {
      x72_res_tempofs = (double) x72_float(s);
      have_x72_res_tempofs = 1;
      have_x72_info = 1;
   }

   s = info_param("LAMP TEMP OFF:");
   if(s) {
      x72_lamp_tempofs = (double) x72_float(s);
      have_x72_lamp_tempofs = 1;
      have_x72_info = 1;
   }

   s = strstr(scpi_status_line, "R>");
   if(s) {
      have_info |= ALL_ID_INFO;
   }

// sprintf(debug_text, "fw:%f  loader:%d  tune:%d  xtal:%f  acmos:%f  sine:%f  serial:%s", x72_fw,x72_loader,x72_tune,  x72_crystal,x72_acmos,x72_sine, x72_serial);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x8b4ee(%rip), %rdi     # 0x10dcb4
callq 0x8275e
pushq $0x1
popq %r14
testq %rax, %rax
je 0x82852
movq %rax, %rdi
callq 0x9470
leaq 0x1825c5(%rip), %rax    # 0x204da8
movsd %xmm0, (%rax)
leaq 0x1824ee(%rip), %rax    # 0x204cdc
movl %r14d, (%rax)
leaq 0x182514(%rip), %rax    # 0x204d0c
movl %r14d, (%rax)
leaq 0x1824de(%rip), %rax    # 0x204ce0
cmpl $0x0, (%rax)
jne 0x82817
leaq 0x182532(%rip), %rcx    # 0x204d40
andl $0x0, (%rcx)
movl $0x1, (%rax)
leaq 0x8b750(%rip), %rdi     # 0x10df6e
callq 0x8275e
testq %rax, %rax
je 0x82852
leaq 0x182551(%rip), %rcx    # 0x204d80
movb $0x0, (%rcx)
xorl %edx, %edx
cmpq $0xc, %rdx
je 0x82852
movb (%rax,%rdx), %sil
cmpb $0x3b, %sil
je 0x82852
movb %sil, (%rdx,%rcx)
movb $0x0, 0x1(%rdx,%rcx)
incq %rdx
jmp 0x82834
leaq 0x8b468(%rip), %rdi     # 0x10dcc1
callq 0x8275e
testq %rax, %rax
je 0x828de
movq %rax, %rdi
callq 0x9470
leaq 0x182536(%rip), %rax    # 0x204da8
movsd %xmm0, (%rax)
leaq 0x18245f(%rip), %rax    # 0x204cdc
movl %r14d, (%rax)
leaq 0x182485(%rip), %rax    # 0x204d0c
movl %r14d, (%rax)
leaq 0x18244f(%rip), %rax    # 0x204ce0
cmpl $0x0, (%rax)
jne 0x828a3
leaq 0x1824a3(%rip), %rcx    # 0x204d40
movl %r14d, (%rcx)
movl %r14d, (%rax)
leaq 0x8b6c4(%rip), %rdi     # 0x10df6e
callq 0x8275e
testq %rax, %rax
je 0x828de
leaq 0x1824c5(%rip), %rcx    # 0x204d80
movb $0x0, (%rcx)
xorl %edx, %edx
cmpq $0xc, %rdx
je 0x828de
movb (%rax,%rdx), %sil
cmpb $0x3b, %sil
je 0x828de
movb %sil, (%rdx,%rcx)
movb $0x0, 0x1(%rdx,%rcx)
incq %rdx
jmp 0x828c0
leaq 0x8b3e9(%rip), %rdi     # 0x10dcce
callq 0x8275e
testq %rax, %rax
je 0x82914
movq %rax, %rdi
callq 0x95e0
leaq 0x182432(%rip), %rcx    # 0x204d30
movl %eax, (%rcx)
leaq 0x1823e1(%rip), %rax    # 0x204ce8
movl %r14d, (%rax)
leaq 0x1823fb(%rip), %rax    # 0x204d0c
movl %r14d, (%rax)
leaq 0x8b3c2(%rip), %rdi     # 0x10dcdd
callq 0x8275e
testq %rax, %rax
je 0x8294a
movq %rax, %rdi
callq 0x95e0
leaq 0x182400(%rip), %rcx    # 0x204d34
movl %eax, (%rcx)
leaq 0x1823c3(%rip), %rax    # 0x204d00
movl %r14d, (%rax)
leaq 0x1823c5(%rip), %rax    # 0x204d0c
movl %r14d, (%rax)
leaq 0x8b395(%rip), %rdi     # 0x10dce6
callq 0x8275e
testq %rax, %rax
je 0x8299f
movq %rax, %rbx
pushq $0x2c
popq %rsi
movq %rax, %rdi
callq 0x9100
testq %rax, %rax
je 0x82971
movb $0x0, (%rax)
xorl %eax, %eax
leaq 0x1823d6(%rip), %rcx    # 0x204d50
cmpq $0x14, %rax
je 0x8298b
movb (%rbx,%rax), %dl
movb %dl, (%rcx,%rax)
incq %rax
jmp 0x8297a
leaq 0x182352(%rip), %rax    # 0x204ce4
movl %r14d, (%rax)
leaq 0x182370(%rip), %rax    # 0x204d0c
movl %r14d, (%rax)
leaq 0x8b348(%rip), %rdi     # 0x10dcee
callq 0x8275e
testq %rax, %rax
je 0x829d7
movq %rax, %rdi
callq 0x9470
leaq 0x182401(%rip), %rax    # 0x204dc0
movsd %xmm0, (%rax)
leaq 0x18232a(%rip), %rax    # 0x204cf4
movl %r14d, (%rax)
leaq 0x182338(%rip), %rax    # 0x204d0c
movl %r14d, (%rax)
leaq 0x8b319(%rip), %rdi     # 0x10dcf7
callq 0x8275e
testq %rax, %rax
je 0x82a0f
movq %rax, %rdi
callq 0x9470
leaq 0x1823d9(%rip), %rax    # 0x204dd0
movsd %xmm0, (%rax)
leaq 0x1822fa(%rip), %rax    # 0x204cfc
movl %r14d, (%rax)
leaq 0x182300(%rip), %rax    # 0x204d0c
movl %r14d, (%rax)
leaq 0x8b2e7(%rip), %rdi     # 0x10dcfd
callq 0x8275e
testq %rax, %rax
je 0x82a47
movq %rax, %rdi
callq 0x9470
leaq 0x182399(%rip), %rax    # 0x204dc8
movsd %xmm0, (%rax)
leaq 0x1822be(%rip), %rax    # 0x204cf8
movl %r14d, (%rax)
leaq 0x1822c8(%rip), %rax    # 0x204d0c
movl %r14d, (%rax)
leaq 0x8b2b6(%rip), %rdi     # 0x10dd04
callq 0x8275e
testq %rax, %rax
je 0x82a87
movq %rax, %rdi
callq 0x98b2
movd %eax, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x182341(%rip), %rax    # 0x204db0
movsd %xmm0, (%rax)
leaq 0x182272(%rip), %rax    # 0x204cec
movl %r14d, (%rax)
leaq 0x182288(%rip), %rax    # 0x204d0c
movl %r14d, (%rax)
leaq 0x8b284(%rip), %rdi     # 0x10dd12
callq 0x8275e
testq %rax, %rax
je 0x82ac7
movq %rax, %rdi
callq 0x98b2
movd %eax, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x182309(%rip), %rax    # 0x204db8
movsd %xmm0, (%rax)
leaq 0x182236(%rip), %rax    # 0x204cf0
movl %r14d, (%rax)
leaq 0x182248(%rip), %rax    # 0x204d0c
movl %r14d, (%rax)
leaq 0x2d4072(%rip), %rdi    # 0x356b40
leaq 0x8b1b2(%rip), %rsi     # 0x10dc87
callq 0x9090
testq %rax, %rax
je 0x82ae9
leaq 0x274e8e(%rip), %rax    # 0x2f7974
orb $0xf, (%rax)
popq %rbx
popq %r14
popq %rbp
retq