// File: /workspace/github_cpp_makefile_star2_O3/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 %rbx
pushq %rax
leaq 0x948b7(%rip), %rdi     # 0x123d6c
callq 0x8f44e
testq %rax, %rax
je 0x8f545
movq %rax, %rdi
callq 0x9470
leaq 0x18b8d6(%rip), %rax    # 0x21ada8
movsd %xmm0, (%rax)
leaq 0x18b7ff(%rip), %rax    # 0x21acdc
movl $0x1, %ecx
movl %ecx, (%rax)
leaq 0x18b821(%rip), %rax    # 0x21ad0c
movl %ecx, (%rax)
leaq 0x18b7ec(%rip), %rax    # 0x21ace0
cmpl $0x0, (%rax)
jne 0x8f50c
leaq 0x18b840(%rip), %rcx    # 0x21ad40
movl $0x0, (%rcx)
movl $0x1, (%rax)
leaq 0x94b13(%rip), %rdi     # 0x124026
callq 0x8f44e
testq %rax, %rax
je 0x8f545
leaq 0x18b85c(%rip), %rcx    # 0x21ad80
movb $0x0, (%rcx)
xorl %edx, %edx
movb (%rax,%rdx), %sil
cmpb $0x3b, %sil
je 0x8f545
movb %sil, (%rdx,%rcx)
movb $0x0, 0x1(%rdx,%rcx)
incq %rdx
cmpq $0xc, %rdx
jne 0x8f529
leaq 0x9482d(%rip), %rdi     # 0x123d79
callq 0x8f44e
testq %rax, %rax
je 0x8f5d0
movq %rax, %rdi
callq 0x9470
leaq 0x18b843(%rip), %rax    # 0x21ada8
movsd %xmm0, (%rax)
leaq 0x18b76c(%rip), %rcx    # 0x21acdc
movl $0x1, %eax
movl %eax, (%rcx)
leaq 0x18b78e(%rip), %rcx    # 0x21ad0c
movl %eax, (%rcx)
leaq 0x18b759(%rip), %rcx    # 0x21ace0
cmpl $0x0, (%rcx)
jne 0x8f597
leaq 0x18b7ad(%rip), %rdx    # 0x21ad40
movl %eax, (%rdx)
movl %eax, (%rcx)
leaq 0x94a88(%rip), %rdi     # 0x124026
callq 0x8f44e
testq %rax, %rax
je 0x8f5d0
leaq 0x18b7d1(%rip), %rcx    # 0x21ad80
movb $0x0, (%rcx)
xorl %edx, %edx
movb (%rax,%rdx), %sil
cmpb $0x3b, %sil
je 0x8f5d0
movb %sil, (%rdx,%rcx)
movb $0x0, 0x1(%rdx,%rcx)
incq %rdx
cmpq $0xc, %rdx
jne 0x8f5b4
leaq 0x947af(%rip), %rdi     # 0x123d86
callq 0x8f44e
testq %rax, %rax
je 0x8f609
movq %rax, %rdi
callq 0x95e0
leaq 0x18b740(%rip), %rcx    # 0x21ad30
movl %eax, (%rcx)
leaq 0x18b6ef(%rip), %rax    # 0x21ace8
movl $0x1, %ecx
movl %ecx, (%rax)
leaq 0x18b705(%rip), %rax    # 0x21ad0c
movl %ecx, (%rax)
leaq 0x94785(%rip), %rdi     # 0x123d95
callq 0x8f44e
testq %rax, %rax
je 0x8f642
movq %rax, %rdi
callq 0x95e0
leaq 0x18b70b(%rip), %rcx    # 0x21ad34
movl %eax, (%rcx)
leaq 0x18b6ce(%rip), %rax    # 0x21ad00
movl $0x1, %ecx
movl %ecx, (%rax)
leaq 0x18b6cc(%rip), %rax    # 0x21ad0c
movl %ecx, (%rax)
leaq 0x94755(%rip), %rdi     # 0x123d9e
callq 0x8f44e
testq %rax, %rax
je 0x8f69a
movq %rax, %rbx
movq %rax, %rdi
movl $0x2c, %esi
callq 0x9100
testq %rax, %rax
je 0x8f66b
movb $0x0, (%rax)
xorl %eax, %eax
leaq 0x18b6dc(%rip), %rcx    # 0x21ad50
movb (%rbx,%rax), %dl
movb %dl, (%rcx,%rax)
incq %rax
cmpq $0x14, %rax
jne 0x8f674
leaq 0x18b65a(%rip), %rax    # 0x21ace4
movl $0x1, %ecx
movl %ecx, (%rax)
leaq 0x18b674(%rip), %rax    # 0x21ad0c
movl %ecx, (%rax)
leaq 0x94705(%rip), %rdi     # 0x123da6
callq 0x8f44e
testq %rax, %rax
je 0x8f6d5
movq %rax, %rdi
callq 0x9470
leaq 0x18b706(%rip), %rax    # 0x21adc0
movsd %xmm0, (%rax)
leaq 0x18b62f(%rip), %rax    # 0x21acf4
movl $0x1, %ecx
movl %ecx, (%rax)
leaq 0x18b639(%rip), %rax    # 0x21ad0c
movl %ecx, (%rax)
leaq 0x946d3(%rip), %rdi     # 0x123daf
callq 0x8f44e
testq %rax, %rax
je 0x8f710
movq %rax, %rdi
callq 0x9470
leaq 0x18b6db(%rip), %rax    # 0x21add0
movsd %xmm0, (%rax)
leaq 0x18b5fc(%rip), %rax    # 0x21acfc
movl $0x1, %ecx
movl %ecx, (%rax)
leaq 0x18b5fe(%rip), %rax    # 0x21ad0c
movl %ecx, (%rax)
leaq 0x9469e(%rip), %rdi     # 0x123db5
callq 0x8f44e
testq %rax, %rax
je 0x8f74b
movq %rax, %rdi
callq 0x9470
leaq 0x18b698(%rip), %rax    # 0x21adc8
movsd %xmm0, (%rax)
leaq 0x18b5bd(%rip), %rax    # 0x21acf8
movl $0x1, %ecx
movl %ecx, (%rax)
leaq 0x18b5c3(%rip), %rax    # 0x21ad0c
movl %ecx, (%rax)
leaq 0x9466a(%rip), %rdi     # 0x123dbc
callq 0x8f44e
testq %rax, %rax
je 0x8f78e
movq %rax, %rdi
callq 0x98c6
movd %eax, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x18b63d(%rip), %rax    # 0x21adb0
movsd %xmm0, (%rax)
leaq 0x18b56e(%rip), %rax    # 0x21acec
movl $0x1, %ecx
movl %ecx, (%rax)
leaq 0x18b580(%rip), %rax    # 0x21ad0c
movl %ecx, (%rax)
leaq 0x94635(%rip), %rdi     # 0x123dca
callq 0x8f44e
testq %rax, %rax
je 0x8f7d1
movq %rax, %rdi
callq 0x98c6
movd %eax, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x18b602(%rip), %rax    # 0x21adb8
movsd %xmm0, (%rax)
leaq 0x18b52f(%rip), %rax    # 0x21acf0
movl $0x1, %ecx
movl %ecx, (%rax)
leaq 0x18b53d(%rip), %rax    # 0x21ad0c
movl %ecx, (%rax)
leaq 0x2dd368(%rip), %rdi    # 0x36cb40
leaq 0x94560(%rip), %rsi     # 0x123d3f
callq 0x9090
testq %rax, %rax
je 0x8f7f3
leaq 0x27e184(%rip), %rax    # 0x30d974
orb $0xf, (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq