// File: jkingan[P]ladyheather/heathgps.cpp
// Function: parse_sa35_telem()
void parse_sa35_telem()
{
   log_packet_id("telemetry");
   have_sa35_telem = 35;

   if(get_msg_field()) {  // BITE (0=locked  1=unlocked)
      sa35_unlock = atoi(msg_field);
      if(sa35_unlock) discipline_mode = DIS_MODE_UNLOCK;
      else            discipline_mode = DIS_MODE_NORMAL;
   }

   if(get_msg_field()) {  // firmware
      msg_field[32] = 0;
      strcpy(sa35_fw, msg_field);
   }

   if(get_msg_field()) {  // serial number
      msg_field[32] = 0;
      strcpy(sa35_id, msg_field);
      strcpy(sa35_sn, &msg_field[6]);
      msg_field[6] = 0;

      strcpy(sa35_model, &msg_field[4]);
      msg_field[4] = 0;

      strcpy(sa35_date, &msg_field[0]);
      have_info |= ALL_ID_INFO;
   }

   if(get_msg_field()) { // TEC control (millidegrees C)
      sa35_tec = atof(msg_field) / 1000.0;
   }

   if(get_msg_field()) { // rf control  (0.1 mV)
      sa35_rf = atof(msg_field) / 10000.0;
   }

   if(get_msg_field()) { // DDS freq center current (0.01 Hz)
      sa35_center_freq = atof(msg_field) / 0.01;
   }

   if(get_msg_field()) { // cell heater current (mA)
      sa35_heater = atof(msg_field);
   }

   if(get_msg_field()) { // dc signal (mV)
      sa35_dc = atof(msg_field) / 1000.0;
   }

   if(get_msg_field()) { // temperature (millidegrees C)
      temperature = (DATA_SIZE) (atof(msg_field) / 1000.0);
      have_temperature = 35;
   }

   if(get_msg_field()) { // digital tuning (0.01 Hz)
      sa35_tune = atof(msg_field) / 0.01;
   }

   if(get_msg_field()) { // EFC enable
      sa35_efc_enable = atoi(msg_field);
   }

   if(get_msg_field()) { // EFC voltage (mV)
      sa35_efc = atof(msg_field) / 1000.0;
      dac_voltage = (DATA_SIZE) sa35_efc;
      have_dac = 35;
   }

   if(get_msg_field()) { // digital tuning (1E-15)
      sa35_dds = atof(msg_field) * 1.0E-15;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0xc75c1(%rip), %rdi     # 0x186d0c
callq 0x7add0
leaq 0x2ac4e5(%rip), %rax    # 0x36bc3c
movl $0x23, (%rax)
callq 0xb0bd0
cmpl $0x0, %eax
je 0xbf7a2
leaq 0x2db4b2(%rip), %rdi    # 0x39ac20
callq 0x95c0
movl %eax, %ecx
leaq 0x2ac508(%rip), %rax    # 0x36bc84
movl %ecx, (%rax)
leaq 0x2ac4ff(%rip), %rax    # 0x36bc84
cmpl $0x0, (%rax)
je 0xbf796
leaq 0x2acee6(%rip), %rax    # 0x36c677
movb $0x1a, (%rax)
jmp 0xbf7a0
leaq 0x2aceda(%rip), %rax    # 0x36c677
movb $0x0, (%rax)
jmp 0xbf7a2
callq 0xb0bd0
cmpl $0x0, %eax
je 0xbf7ca
leaq 0x2db46d(%rip), %rax    # 0x39ac20
movb $0x0, 0x20(%rax)
leaq 0x2ac4d2(%rip), %rdi    # 0x36bc90
leaq 0x2db45b(%rip), %rsi    # 0x39ac20
callq 0x9350
callq 0xb0bd0
cmpl $0x0, %eax
je 0xbf862
leaq 0x2db441(%rip), %rax    # 0x39ac20
movb $0x0, 0x20(%rax)
leaq 0x2ac4d6(%rip), %rdi    # 0x36bcc0
leaq 0x2db42f(%rip), %rsi    # 0x39ac20
callq 0x9350
leaq 0x2db423(%rip), %rsi    # 0x39ac20
addq $0x6, %rsi
leaq 0x2ac548(%rip), %rdi    # 0x36bd50
callq 0x9350
leaq 0x2db40c(%rip), %rax    # 0x39ac20
movb $0x0, 0x6(%rax)
leaq 0x2db401(%rip), %rsi    # 0x39ac20
addq $0x4, %rsi
leaq 0x2ac4f6(%rip), %rdi    # 0x36bd20
callq 0x9350
leaq 0x2db3ea(%rip), %rax    # 0x39ac20
movb $0x0, 0x4(%rax)
leaq 0x2ac4af(%rip), %rdi    # 0x36bcf0
leaq 0x2db3d8(%rip), %rsi    # 0x39ac20
callq 0x9350
leaq 0x2ad300(%rip), %rax    # 0x36cb54
movl (%rax), %ecx
orl $0xf, %ecx
leaq 0x2ad2f4(%rip), %rax    # 0x36cb54
movl %ecx, (%rax)
callq 0xb0bd0
cmpl $0x0, %eax
je 0xbf88f
leaq 0x2db3ad(%rip), %rdi    # 0x39ac20
callq 0x9480
movsd 0xaf7b0(%rip), %xmm1    # 0x16f030
divsd %xmm1, %xmm0
leaq 0x2ac3b5(%rip), %rax    # 0x36bc40
movsd %xmm0, (%rax)
callq 0xb0bd0
cmpl $0x0, %eax
je 0xbf8bc
leaq 0x2db380(%rip), %rdi    # 0x39ac20
callq 0x9480
movsd 0xaf84b(%rip), %xmm1    # 0x16f0f8
divsd %xmm1, %xmm0
leaq 0x2ac390(%rip), %rax    # 0x36bc48
movsd %xmm0, (%rax)
callq 0xb0bd0
cmpl $0x0, %eax
je 0xbf8e9
leaq 0x2db353(%rip), %rdi    # 0x39ac20
callq 0x9480
movsd 0xaf846(%rip), %xmm1    # 0x16f120
divsd %xmm1, %xmm0
leaq 0x2ac36b(%rip), %rax    # 0x36bc50
movsd %xmm0, (%rax)
callq 0xb0bd0
cmpl $0x0, %eax
je 0xbf90a
leaq 0x2db326(%rip), %rdi    # 0x39ac20
callq 0x9480
leaq 0x2ac352(%rip), %rax    # 0x36bc58
movsd %xmm0, (%rax)
callq 0xb0bd0
cmpl $0x0, %eax
je 0xbf937
leaq 0x2db305(%rip), %rdi    # 0x39ac20
callq 0x9480
movsd 0xaf708(%rip), %xmm1    # 0x16f030
divsd %xmm1, %xmm0
leaq 0x2ac32d(%rip), %rax    # 0x36bc60
movsd %xmm0, (%rax)
callq 0xb0bd0
cmpl $0x0, %eax
je 0xbf971
leaq 0x2db2d8(%rip), %rdi    # 0x39ac20
callq 0x9480
movsd 0xaf6db(%rip), %xmm1    # 0x16f030
divsd %xmm1, %xmm0
leaq 0x2ac298(%rip), %rax    # 0x36bbf8
movsd %xmm0, (%rax)
leaq 0x2acac1(%rip), %rax    # 0x36c42c
movl $0x23, (%rax)
callq 0xb0bd0
cmpl $0x0, %eax
je 0xbf99e
leaq 0x2db29e(%rip), %rdi    # 0x39ac20
callq 0x9480
movsd 0xaf791(%rip), %xmm1    # 0x16f120
divsd %xmm1, %xmm0
leaq 0x2ac2ce(%rip), %rax    # 0x36bc68
movsd %xmm0, (%rax)
callq 0xb0bd0
cmpl $0x0, %eax
je 0xbf9bf
leaq 0x2db271(%rip), %rdi    # 0x39ac20
callq 0x95c0
movl %eax, %ecx
leaq 0x2ac2c3(%rip), %rax    # 0x36bc80
movl %ecx, (%rax)
callq 0xb0bd0
cmpl $0x0, %eax
je 0xbfa0f
leaq 0x2db250(%rip), %rdi    # 0x39ac20
callq 0x9480
movsd 0xaf653(%rip), %xmm1    # 0x16f030
divsd %xmm1, %xmm0
leaq 0x2ac288(%rip), %rax    # 0x36bc70
movsd %xmm0, (%rax)
leaq 0x2ac27d(%rip), %rax    # 0x36bc70
movsd (%rax), %xmm0
leaq 0x2ac1e2(%rip), %rax    # 0x36bbe0
movsd %xmm0, (%rax)
leaq 0x2acad3(%rip), %rax    # 0x36c4dc
movl $0x23, (%rax)
callq 0xb0bd0
cmpl $0x0, %eax
je 0xbfa3c
leaq 0x2db200(%rip), %rdi    # 0x39ac20
callq 0x9480
movsd 0xaf713(%rip), %xmm1    # 0x16f140
mulsd %xmm1, %xmm0
leaq 0x2ac240(%rip), %rax    # 0x36bc78
movsd %xmm0, (%rax)
popq %rbp
retq
nop