// File: 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
subq $0x20, %rsp
leaq 0xc2e54(%rip), %rdi     # 0x187053
callq 0xc4140
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xc42e4
movq -0x8(%rbp), %rdi
callq 0x9480
leaq 0x1b5d65(%rip), %rax    # 0x279f88
movsd %xmm0, (%rax)
leaq 0x1b5c8e(%rip), %rax    # 0x279ebc
movl $0x1, (%rax)
leaq 0x1b5cb1(%rip), %rax    # 0x279eec
movl $0x1, (%rax)
leaq 0x1b5c78(%rip), %rax    # 0x279ec0
cmpl $0x0, (%rax)
jne 0xc4267
leaq 0x1b5ccc(%rip), %rax    # 0x279f20
movl $0x0, (%rax)
leaq 0x1b5c5f(%rip), %rax    # 0x279ec0
movl $0x1, (%rax)
leaq 0xc30a5(%rip), %rdi     # 0x187313
callq 0xc4140
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xc42e2
leaq 0x1b5cdb(%rip), %rax    # 0x279f60
movb $0x0, (%rax)
movl $0x0, -0x14(%rbp)
cmpl $0xc, -0x14(%rbp)
jge 0xc42e0
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x3b, %eax
jne 0xc42a8
jmp 0xc42e0
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movb (%rax,%rcx), %dl
movslq -0x14(%rbp), %rcx
leaq 0x1b5ca2(%rip), %rax    # 0x279f60
movb %dl, (%rax,%rcx)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rcx
leaq 0x1b5c8f(%rip), %rax    # 0x279f60
movb $0x0, (%rax,%rcx)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xc428f
jmp 0xc42e2
jmp 0xc42e4
leaq 0xc2d75(%rip), %rdi     # 0x187060
callq 0xc4140
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xc43d0
movq -0x8(%rbp), %rdi
callq 0x9480
leaq 0x1b5c79(%rip), %rax    # 0x279f88
movsd %xmm0, (%rax)
leaq 0x1b5ba2(%rip), %rax    # 0x279ebc
movl $0x1, (%rax)
leaq 0x1b5bc5(%rip), %rax    # 0x279eec
movl $0x1, (%rax)
leaq 0x1b5b8c(%rip), %rax    # 0x279ec0
cmpl $0x0, (%rax)
jne 0xc4353
leaq 0x1b5be0(%rip), %rax    # 0x279f20
movl $0x1, (%rax)
leaq 0x1b5b73(%rip), %rax    # 0x279ec0
movl $0x1, (%rax)
leaq 0xc2fb9(%rip), %rdi     # 0x187313
callq 0xc4140
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xc43ce
leaq 0x1b5bef(%rip), %rax    # 0x279f60
movb $0x0, (%rax)
movl $0x0, -0x14(%rbp)
cmpl $0xc, -0x14(%rbp)
jge 0xc43cc
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x3b, %eax
jne 0xc4394
jmp 0xc43cc
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movb (%rax,%rcx), %dl
movslq -0x14(%rbp), %rcx
leaq 0x1b5bb6(%rip), %rax    # 0x279f60
movb %dl, (%rax,%rcx)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rcx
leaq 0x1b5ba3(%rip), %rax    # 0x279f60
movb $0x0, (%rax,%rcx)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xc437b
jmp 0xc43ce
jmp 0xc43d0
leaq 0xc2c96(%rip), %rdi     # 0x18706d
callq 0xc4140
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xc4415
movq -0x8(%rbp), %rdi
callq 0x95c0
movl %eax, %ecx
leaq 0x1b5b17(%rip), %rax    # 0x279f10
movl %ecx, (%rax)
leaq 0x1b5ac6(%rip), %rax    # 0x279ec8
movl $0x1, (%rax)
leaq 0x1b5add(%rip), %rax    # 0x279eec
movl $0x1, (%rax)
leaq 0xc2c60(%rip), %rdi     # 0x18707c
callq 0xc4140
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xc445a
movq -0x8(%rbp), %rdi
callq 0x95c0
movl %eax, %ecx
leaq 0x1b5ad6(%rip), %rax    # 0x279f14
movl %ecx, (%rax)
leaq 0x1b5a99(%rip), %rax    # 0x279ee0
movl $0x1, (%rax)
leaq 0x1b5a98(%rip), %rax    # 0x279eec
movl $0x1, (%rax)
leaq 0xc2c24(%rip), %rdi     # 0x187085
callq 0xc4140
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xc44dc
movq -0x8(%rbp), %rdi
movl $0x2c, %esi
callq 0x9100
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xc4491
movq -0x10(%rbp), %rax
movb $0x0, (%rax)
movl $0x0, -0x14(%rbp)
cmpl $0x14, -0x14(%rbp)
jge 0xc44c2
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movb (%rax,%rcx), %dl
movslq -0x14(%rbp), %rcx
leaq 0x1b5a7c(%rip), %rax    # 0x279f30
movb %dl, (%rax,%rcx)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xc4498
leaq 0x1b59fb(%rip), %rax    # 0x279ec4
movl $0x1, (%rax)
leaq 0x1b5a16(%rip), %rax    # 0x279eec
movl $0x1, (%rax)
leaq 0xc2baa(%rip), %rdi     # 0x18708d
callq 0xc4140
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xc4521
movq -0x8(%rbp), %rdi
callq 0x9480
leaq 0x1b5a9d(%rip), %rax    # 0x279fa0
movsd %xmm0, (%rax)
leaq 0x1b59c6(%rip), %rax    # 0x279ed4
movl $0x1, (%rax)
leaq 0x1b59d1(%rip), %rax    # 0x279eec
movl $0x1, (%rax)
leaq 0xc2b6e(%rip), %rdi     # 0x187096
callq 0xc4140
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xc4566
movq -0x8(%rbp), %rdi
callq 0x9480
leaq 0x1b5a68(%rip), %rax    # 0x279fb0
movsd %xmm0, (%rax)
leaq 0x1b5989(%rip), %rax    # 0x279edc
movl $0x1, (%rax)
leaq 0x1b598c(%rip), %rax    # 0x279eec
movl $0x1, (%rax)
leaq 0xc2b2f(%rip), %rdi     # 0x18709c
callq 0xc4140
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xc45ab
movq -0x8(%rbp), %rdi
callq 0x9480
leaq 0x1b5a1b(%rip), %rax    # 0x279fa8
movsd %xmm0, (%rax)
leaq 0x1b5940(%rip), %rax    # 0x279ed8
movl $0x1, (%rax)
leaq 0x1b5947(%rip), %rax    # 0x279eec
movl $0x1, (%rax)
leaq 0xc6be9(%rip), %rdi     # 0x18b19b
callq 0xc4140
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xc45c4
jmp 0xc45c4
leaq 0xc42b8(%rip), %rdi     # 0x188883
callq 0xc4140
movq %rax, -0x8(%rbp)
leaq 0xc2ac8(%rip), %rdi     # 0x1870a3
callq 0xc4140
movq %rax, -0x8(%rbp)
leaq 0xc2abe(%rip), %rdi     # 0x1870a9
callq 0xc4140
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xc462d
movq -0x8(%rbp), %rdi
callq 0xc41b0
cvtss2sd %xmm0, %xmm0
leaq 0x1b5981(%rip), %rax    # 0x279f90
movsd %xmm0, (%rax)
leaq 0x1b58b2(%rip), %rax    # 0x279ecc
movl $0x1, (%rax)
leaq 0x1b58c5(%rip), %rax    # 0x279eec
movl $0x1, (%rax)
leaq 0xc2a83(%rip), %rdi     # 0x1870b7
callq 0xc4140
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xc4676
movq -0x8(%rbp), %rdi
callq 0xc41b0
cvtss2sd %xmm0, %xmm0
leaq 0x1b5940(%rip), %rax    # 0x279f98
movsd %xmm0, (%rax)
leaq 0x1b586d(%rip), %rax    # 0x279ed0
movl $0x1, (%rax)
leaq 0x1b587c(%rip), %rax    # 0x279eec
movl $0x1, (%rax)
leaq 0x307693(%rip), %rdi    # 0x3cbd10
leaq 0xc29a2(%rip), %rsi     # 0x187026
callq 0x9090
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xc46a9
leaq 0x2a84b9(%rip), %rax    # 0x36cb54
movl (%rax), %ecx
orl $0xf, %ecx
leaq 0x2a84ad(%rip), %rax    # 0x36cb54
movl %ecx, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nop