// File: /workspace/github_cpp_makefile_star2_O1/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 0x94834(%rip), %rdi     # 0x123c8c
callq 0x8f3f1
testq %rax, %rax
je 0x8f4e8
movq %rax, %rdi
callq 0x9470
leaq 0x18b933(%rip), %rax    # 0x21ada8
movsd %xmm0, (%rax)
leaq 0x18b85c(%rip), %rax    # 0x21acdc
movl $0x1, %ecx
movl %ecx, (%rax)
leaq 0x18b87e(%rip), %rax    # 0x21ad0c
movl %ecx, (%rax)
leaq 0x18b849(%rip), %rax    # 0x21ace0
cmpl $0x0, (%rax)
jne 0x8f4af
leaq 0x18b89d(%rip), %rcx    # 0x21ad40
movl $0x0, (%rcx)
movl $0x1, (%rax)
leaq 0x94a90(%rip), %rdi     # 0x123f46
callq 0x8f3f1
testq %rax, %rax
je 0x8f4e8
leaq 0x18b8b9(%rip), %rcx    # 0x21ad80
movb $0x0, (%rcx)
xorl %edx, %edx
movb (%rax,%rdx), %sil
cmpb $0x3b, %sil
je 0x8f4e8
movb %sil, (%rdx,%rcx)
movb $0x0, 0x1(%rdx,%rcx)
incq %rdx
cmpq $0xc, %rdx
jne 0x8f4cc
leaq 0x947aa(%rip), %rdi     # 0x123c99
callq 0x8f3f1
testq %rax, %rax
je 0x8f573
movq %rax, %rdi
callq 0x9470
leaq 0x18b8a0(%rip), %rax    # 0x21ada8
movsd %xmm0, (%rax)
leaq 0x18b7c9(%rip), %rcx    # 0x21acdc
movl $0x1, %eax
movl %eax, (%rcx)
leaq 0x18b7eb(%rip), %rcx    # 0x21ad0c
movl %eax, (%rcx)
leaq 0x18b7b6(%rip), %rcx    # 0x21ace0
cmpl $0x0, (%rcx)
jne 0x8f53a
leaq 0x18b80a(%rip), %rdx    # 0x21ad40
movl %eax, (%rdx)
movl %eax, (%rcx)
leaq 0x94a05(%rip), %rdi     # 0x123f46
callq 0x8f3f1
testq %rax, %rax
je 0x8f573
leaq 0x18b82e(%rip), %rcx    # 0x21ad80
movb $0x0, (%rcx)
xorl %edx, %edx
movb (%rax,%rdx), %sil
cmpb $0x3b, %sil
je 0x8f573
movb %sil, (%rdx,%rcx)
movb $0x0, 0x1(%rdx,%rcx)
incq %rdx
cmpq $0xc, %rdx
jne 0x8f557
leaq 0x9472c(%rip), %rdi     # 0x123ca6
callq 0x8f3f1
testq %rax, %rax
je 0x8f5ac
movq %rax, %rdi
callq 0x95e0
leaq 0x18b79d(%rip), %rcx    # 0x21ad30
movl %eax, (%rcx)
leaq 0x18b74c(%rip), %rax    # 0x21ace8
movl $0x1, %ecx
movl %ecx, (%rax)
leaq 0x18b762(%rip), %rax    # 0x21ad0c
movl %ecx, (%rax)
leaq 0x94702(%rip), %rdi     # 0x123cb5
callq 0x8f3f1
testq %rax, %rax
je 0x8f5e5
movq %rax, %rdi
callq 0x95e0
leaq 0x18b768(%rip), %rcx    # 0x21ad34
movl %eax, (%rcx)
leaq 0x18b72b(%rip), %rax    # 0x21ad00
movl $0x1, %ecx
movl %ecx, (%rax)
leaq 0x18b729(%rip), %rax    # 0x21ad0c
movl %ecx, (%rax)
leaq 0x946d2(%rip), %rdi     # 0x123cbe
callq 0x8f3f1
testq %rax, %rax
je 0x8f63d
movq %rax, %rbx
movq %rax, %rdi
movl $0x2c, %esi
callq 0x9100
testq %rax, %rax
je 0x8f60e
movb $0x0, (%rax)
xorl %eax, %eax
leaq 0x18b739(%rip), %rcx    # 0x21ad50
movb (%rbx,%rax), %dl
movb %dl, (%rcx,%rax)
incq %rax
cmpq $0x14, %rax
jne 0x8f617
leaq 0x18b6b7(%rip), %rax    # 0x21ace4
movl $0x1, %ecx
movl %ecx, (%rax)
leaq 0x18b6d1(%rip), %rax    # 0x21ad0c
movl %ecx, (%rax)
leaq 0x94682(%rip), %rdi     # 0x123cc6
callq 0x8f3f1
testq %rax, %rax
je 0x8f678
movq %rax, %rdi
callq 0x9470
leaq 0x18b763(%rip), %rax    # 0x21adc0
movsd %xmm0, (%rax)
leaq 0x18b68c(%rip), %rax    # 0x21acf4
movl $0x1, %ecx
movl %ecx, (%rax)
leaq 0x18b696(%rip), %rax    # 0x21ad0c
movl %ecx, (%rax)
leaq 0x94650(%rip), %rdi     # 0x123ccf
callq 0x8f3f1
testq %rax, %rax
je 0x8f6b3
movq %rax, %rdi
callq 0x9470
leaq 0x18b738(%rip), %rax    # 0x21add0
movsd %xmm0, (%rax)
leaq 0x18b659(%rip), %rax    # 0x21acfc
movl $0x1, %ecx
movl %ecx, (%rax)
leaq 0x18b65b(%rip), %rax    # 0x21ad0c
movl %ecx, (%rax)
leaq 0x9461b(%rip), %rdi     # 0x123cd5
callq 0x8f3f1
testq %rax, %rax
je 0x8f6ee
movq %rax, %rdi
callq 0x9470
leaq 0x18b6f5(%rip), %rax    # 0x21adc8
movsd %xmm0, (%rax)
leaq 0x18b61a(%rip), %rax    # 0x21acf8
movl $0x1, %ecx
movl %ecx, (%rax)
leaq 0x18b620(%rip), %rax    # 0x21ad0c
movl %ecx, (%rax)
leaq 0x945e7(%rip), %rdi     # 0x123cdc
callq 0x8f3f1
testq %rax, %rax
je 0x8f731
movq %rax, %rdi
callq 0x98c6
movd %eax, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x18b69a(%rip), %rax    # 0x21adb0
movsd %xmm0, (%rax)
leaq 0x18b5cb(%rip), %rax    # 0x21acec
movl $0x1, %ecx
movl %ecx, (%rax)
leaq 0x18b5dd(%rip), %rax    # 0x21ad0c
movl %ecx, (%rax)
leaq 0x945b2(%rip), %rdi     # 0x123cea
callq 0x8f3f1
testq %rax, %rax
je 0x8f774
movq %rax, %rdi
callq 0x98c6
movd %eax, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x18b65f(%rip), %rax    # 0x21adb8
movsd %xmm0, (%rax)
leaq 0x18b58c(%rip), %rax    # 0x21acf0
movl $0x1, %ecx
movl %ecx, (%rax)
leaq 0x18b59a(%rip), %rax    # 0x21ad0c
movl %ecx, (%rax)
leaq 0x2dd3c5(%rip), %rdi    # 0x36cb40
leaq 0x944dd(%rip), %rsi     # 0x123c5f
callq 0x9090
testq %rax, %rax
je 0x8f796
leaq 0x27e1e1(%rip), %rax    # 0x30d974
orb $0xf, (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq