LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_zy_sslt()
void parse_zy_sslt()
{
u32 val;
int prn;
int c;

   // satellite enables
   log_packet_id("sat enables");

   val = 0;
   if(get_msg_field()) {
      for(prn=1; prn<=32; prn++) {
         c = msg_field[prn-1];
         if(c == 0) break;
         if(c == '0') sat[prn].disabled = 0;
         else if(c == '1') sat[prn].disabled = 1;
         else continue;
         if(!sat[prn].disabled) val |= 1 << (prn-1);
      }
      sats_enabled = val;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x7bd0c(%rip), %rdi     # 0x126068
callq 0x58e77
callq 0x811da
testl %eax, %eax
je 0xaa3b8
movl $0x349, %eax            # imm = 0x349
addq 0xa5bca(%rip), %rax     # 0x14ff40
xorl %ecx, %ecx
leaq 0x2916c1(%rip), %rsi    # 0x33ba40
xorl %edx, %edx
movzbl (%rsi,%rcx), %edi
cmpl $0x30, %edi
je 0xaa39a
cmpl $0x31, %edi
je 0xaa395
testl %edi, %edi
jne 0xaa3a0
jmp 0xaa3af
movb $0x1, (%rax)
jmp 0xaa3a0
movb $0x0, (%rax)
btsl %ecx, %edx
addq $0x348, %rax            # imm = 0x348
incq %rcx
cmpq $0x20, %rcx
jne 0xaa381
leaq 0x262d2e(%rip), %rax    # 0x30d0e4
movl %edx, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_zy_stat()
void parse_zy_stat()
{
int sats;
int hex1,hex2,hex3;

   // status
   log_packet_id("status");

   if(get_msg_field()) sats = atoi(msg_field);
   else return;

   if(get_msg_field()) {
      msg_field[32] = 0;
      strcpy(zy_osc_type, msg_field);
   }
   else return;

   if(get_msg_field()) hex1 = atohex(msg_field);
   else return;
   if(get_msg_field()) hex2 = atohex(msg_field);
   else return;
   if(get_msg_field()) hex3 = atohex(msg_field);
   else return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x7b678(%rip), %rdi     # 0x125a3d
callq 0x58e77
callq 0x811da
testl %eax, %eax
je 0xaa433
callq 0x811da
testl %eax, %eax
je 0xaa433
leaq 0x29165d(%rip), %rsi    # 0x33ba40
movb $0x0, 0x20(%rsi)
leaq 0x293232(%rip), %rdi    # 0x33d620
callq 0x9340
callq 0x811da
testl %eax, %eax
je 0xaa433
leaq 0x29163d(%rip), %rdi    # 0x33ba40
callq 0x98c6
callq 0x811da
testl %eax, %eax
je 0xaa433
leaq 0x291628(%rip), %rdi    # 0x33ba40
callq 0x98c6
callq 0x811da
testl %eax, %eax
je 0xaa433
leaq 0x291613(%rip), %rdi    # 0x33ba40
popq %rbp
jmp 0x98c6
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_zy_temp()
void parse_zy_temp()
{
   // temperature
   log_packet_id("temperature");

   if(get_msg_field()) {
      temperature = (DATA_SIZE) atof(msg_field);
      have_temperature = 115;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x79f59(%rip), %rdi     # 0x124399
callq 0x58e77
callq 0x811da
testl %eax, %eax
je 0xaa472
leaq 0x2915eb(%rip), %rdi    # 0x33ba40
callq 0x9470
leaq 0x2625b7(%rip), %rax    # 0x30ca18
movsd %xmm0, (%rax)
leaq 0x262de0(%rip), %rax    # 0x30d24c
movl $0x73, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_zy_timd()
void parse_zy_timd()
{
double timd;

   // gps/pps time difference
   log_packet_id("time difference");

   if(get_msg_field()) {
      timd = atof(msg_field);// / 1.0E9;
      pps_offset = timd;
      have_pps_offset = 66;
      have_rcvr_pps = 66;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x7bbf5(%rip), %rdi     # 0x126074
callq 0x58e77
callq 0x811da
testl %eax, %eax
je 0xaa4bb
leaq 0x2915ac(%rip), %rdi    # 0x33ba40
callq 0x9470
leaq 0x262318(%rip), %rax    # 0x30c7b8
movsd %xmm0, (%rax)
leaq 0x262d8d(%rip), %rax    # 0x30d238
movl $0x42, %ecx
movl %ecx, (%rax)
leaq 0x262d8b(%rip), %rax    # 0x30d244
movl %ecx, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_zy_timi()
void parse_zy_timi()
{
double timi;

   // undocumented  (time interval?)
   log_packet_id("time interval");

   if(get_msg_field()) {
      timi = atof(msg_field);// / 1.0E9;
      pps_offset = timi;
      have_pps_offset = 69;
      have_rcvr_pps = 69;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x7bbbc(%rip), %rdi     # 0x126084
callq 0x58e77
callq 0x811da
testl %eax, %eax
je 0xaa504
leaq 0x291563(%rip), %rdi    # 0x33ba40
callq 0x9470
leaq 0x2622cf(%rip), %rax    # 0x30c7b8
movsd %xmm0, (%rax)
leaq 0x262d44(%rip), %rax    # 0x30d238
movl $0x45, %ecx
movl %ecx, (%rax)
leaq 0x262d42(%rip), %rax    # 0x30d244
movl %ecx, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_zy_timm()
void parse_zy_timm()
{
int tmode;

   // timing mode
   log_packet_id("timing mode");

   if(get_msg_field()) {
      tmode = atoi(msg_field);
      if((tmode == 1) || (tmode == 4)) { 
         time_flags &= (~TFLAGS_UTC);
         timing_mode = TMODE_GPS;
         have_timing_mode = 1;
      }
      else if((tmode == 2) || (tmode == 3)) {  // utc time
         time_flags |= (TFLAGS_UTC);
         timing_mode = TMODE_UTC;
         have_timing_mode = 1;
      }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x7a49c(%rip), %rdi     # 0x124b8c
callq 0x58e77
callq 0x811da
testl %eax, %eax
je 0xaa741
leaq 0x29133b(%rip), %rdi    # 0x33ba40
callq 0x95e0
cmpl $0x4, %eax
je 0xaa714
cmpl $0x1, %eax
jne 0xaa743
leaq 0x262d89(%rip), %rax    # 0x30d4a4
movl (%rax), %eax
andl $-0x2, %eax
xorl %ecx, %ecx
leaq 0x262d7b(%rip), %rdx    # 0x30d4a4
movl %eax, (%rdx)
leaq 0x262d8b(%rip), %rax    # 0x30d4bd
movb %cl, (%rax)
leaq 0x262c91(%rip), %rax    # 0x30d3cc
movl $0x1, (%rax)
popq %rbp
retq
andl $-0x2, %eax
cmpl $0x2, %eax
jne 0xaa741
leaq 0x262d52(%rip), %rax    # 0x30d4a4
movl (%rax), %eax
orl $0x1, %eax
movb $0x3, %cl
jmp 0xaa722
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_zy_trmo()
void parse_zy_trmo()
{
char trmo;

   // surveying / position hold mode
   log_packet_id("survey info");

   if(get_msg_field()) {
      trmo = msg_field[0];  // P=position average mode   K=known position
      if(trmo == 'P') {
         minor_alarms |= MINOR_SURVEY;
         rcvr_mode = RCVR_MODE_SURVEY;
      }
      else if(trmo == 'K') {
         minor_alarms &= (~MINOR_SURVEY);
         rcvr_mode = RCVR_MODE_HOLD;
      }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x7b92c(%rip), %rdi     # 0x126092
callq 0x58e77
callq 0x811da
testl %eax, %eax
je 0xaa7b8
leaq 0x2912c5(%rip), %rax    # 0x33ba40
movzbl (%rax), %eax
cmpl $0x4b, %eax
je 0xaa798
cmpl $0x50, %eax
jne 0xaa7b8
leaq 0x262a49(%rip), %rax    # 0x30d1d8
movl (%rax), %eax
orl $0x20, %eax
movb $0xb, %cl
jmp 0xaa7a6
leaq 0x262a39(%rip), %rax    # 0x30d1d8
movl (%rax), %eax
andl $-0x21, %eax
movb $0x7, %cl
leaq 0x262a2b(%rip), %rdx    # 0x30d1d8
movl %eax, (%rdx)
leaq 0x26291a(%rip), %rax    # 0x30d0d0
movb %cl, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_true_clock()
void parse_true_clock()
{
double jd;
int utc;

   log_packet_id("clock");

   if(get_msg_field()) jd = atof(msg_field);
   else return;

   if(get_msg_field()) utc = atoi(msg_field);
   else return;

   if(get_msg_field()) {
      tfom = atoi(msg_field);
      have_tfom = 1;
   }
   else return;

   jd /= (24.0*60.0*60.0);
   jd += GPS_EPOCH;

   if(!user_set_utc_ofs && utc) utc_offset = (int) utc;
   check_utc_ofs(33);

   set_gregorian_time(jd);
   if(time_flags & TFLAGS_UTC) {
      gps_to_utc();
   }

   update_gps_screen(4387);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x8783e(%rip), %rdi     # 0x13202c
callq 0x58e77
callq 0x811da
testl %eax, %eax
je 0xaa923
leaq 0x291239(%rip), %rdi    # 0x33ba40
callq 0x9470
movsd %xmm0, -0x10(%rbp)
callq 0x811da
testl %eax, %eax
je 0xaa923
leaq 0x29121b(%rip), %rdi    # 0x33ba40
callq 0x95e0
movl %eax, %ebx
callq 0x811da
testl %eax, %eax
je 0xaa923
leaq 0x291200(%rip), %rdi    # 0x33ba40
callq 0x95e0
leaq 0x262404(%rip), %rcx    # 0x30cc50
movl %eax, (%rcx)
leaq 0x2623ff(%rip), %rax    # 0x30cc54
movl $0x1, (%rax)
movsd -0x10(%rbp), %xmm0
divsd 0x5e7b0(%rip), %xmm0    # 0x109018
leaq 0x262ec5(%rip), %rax    # 0x30d734
cmpl $0x0, (%rax)
sete %al
testl %ebx, %ebx
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0xaa88a
leaq 0x262ea0(%rip), %rax    # 0x30d728
movl %ebx, (%rax)
addsd 0x60ff6(%rip), %xmm0    # 0x10b888
leaq 0x262a83(%rip), %rax    # 0x30d31c
cmpl $0x0, (%rax)
jne 0xaa8df
leaq 0x262c6f(%rip), %rcx    # 0x30d514
cmpl $0x7e1, (%rcx)          # imm = 0x7E1
setge %cl
leaq 0x262e73(%rip), %rdx    # 0x30d728
movl (%rdx), %edx
cmpl $0x12, %edx
setl %sil
andb %cl, %sil
cmpl $0x11, %edx
setl %cl
orb %sil, %cl
jne 0xaa8df
leaq 0x16df71(%rip), %rcx    # 0x218844
movl $0x7f1, (%rcx)          # imm = 0x7F1
movl $0x21, (%rax)
callq 0x5c837
leaq 0x262bb9(%rip), %rbx    # 0x30d4a4
testb $0x1, (%rbx)
je 0xaa918
leaq 0x262e31(%rip), %rax    # 0x30d728
cvtsi2sdl (%rax), %xmm1
xorpd %xmm0, %xmm0
subsd %xmm1, %xmm0
callq 0x5c907
orb $0x1, (%rbx)
leaq 0x262aba(%rip), %rax    # 0x30d3cc
movl $0x1, (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x7327e
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_true_extstatus()
void parse_true_extstatus()
{
   log_packet_id("extstatus");

   if(get_msg_field()) {  // position questionable?  0=normal  1=survey?
   }
   else return;

   if(get_msg_field()) {  // sat count related?
   }
   else return;

   if(get_msg_field()) {  // seems to be related to operating mode 
      true_eval = atof(msg_field);  // ,,, much noisier during survey, 
                                    // ... stable in position hold mode
                                    // ... might be 1PPS or osc error related
      have_true_eval = 1;
   }
   else return;

   if(get_msg_field()) {
      temperature = (DATA_SIZE) atof(msg_field);
      if(temperature && (have_temperature == 0)) {
         new_queue(RESET_ALL_QUEUES, 6543); // clear the queues so temp scales nicely
         have_temperature = 116;
      }
   }
   else return;

   if(get_msg_field()) {  // ?
   }
   else return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x7b7e0(%rip), %rdi     # 0x126117
callq 0x58e77
callq 0x811da
testl %eax, %eax
je 0xaa9db
callq 0x811da
testl %eax, %eax
je 0xaa9db
callq 0x811da
testl %eax, %eax
je 0xaa9db
leaq 0x2910da(%rip), %rdi    # 0x33ba40
callq 0x9470
leaq 0x2929f6(%rip), %rax    # 0x33d368
movsd %xmm0, (%rax)
leaq 0x2929f3(%rip), %rax    # 0x33d370
movl $0x1, (%rax)
callq 0x811da
testl %eax, %eax
je 0xaa9db
leaq 0x2910ad(%rip), %rdi    # 0x33ba40
callq 0x9470
leaq 0x262079(%rip), %rax    # 0x30ca18
movsd %xmm0, (%rax)
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0xaa9af
jnp 0xaa9d0
leaq 0x262896(%rip), %rbx    # 0x30d24c
cmpl $0x0, (%rbx)
jne 0xaa9d0
movl $0x7, %edi
movl $0x198f, %esi           # imm = 0x198F
callq 0x1120f
movl $0x74, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x811da
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_true_geta()
void parse_true_geta()
{
   // attenuator
   log_packet_id("geta");

   if(get_msg_field()) {
      atten_val = atof(msg_field);
      have_atten = 1;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x7b734(%rip), %rdi     # 0x126121
callq 0x58e77
callq 0x811da
testl %eax, %eax
je 0xaaa1f
leaq 0x29103e(%rip), %rdi    # 0x33ba40
callq 0x9470
leaq 0x29297a(%rip), %rax    # 0x33d388
movsd %xmm0, (%rax)
leaq 0x292977(%rip), %rax    # 0x33d390
movl $0x1, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_true_getp()
void parse_true_getp()
{
   // get "pot" values
   log_packet_id("getp");

   if(get_msg_field()) {  // integer
      true_pot1 = atoi(msg_field);
      have_true_pot |= 0x01;
   }
   if(get_msg_field()) {  // integer
      true_pot2 = atoi(msg_field);
      have_true_pot |= 0x02;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x7b6fa(%rip), %rdi     # 0x126126
callq 0x58e77
callq 0x811da
testl %eax, %eax
je 0xaaa59
leaq 0x290fff(%rip), %rdi    # 0x33ba40
callq 0x95e0
leaq 0x292947(%rip), %rcx    # 0x33d394
movl %eax, (%rcx)
leaq 0x292946(%rip), %rax    # 0x33d39c
orb $0x1, (%rax)
callq 0x811da
testl %eax, %eax
je 0xaaa81
leaq 0x290fd7(%rip), %rdi    # 0x33ba40
callq 0x95e0
leaq 0x292923(%rip), %rcx    # 0x33d398
movl %eax, (%rcx)
leaq 0x29291e(%rip), %rax    # 0x33d39c
orb $0x2, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_true_getdelay()
void parse_true_getdelay()
{
   log_packet_id("getdelay");

   if(get_msg_field()) {
      cable_delay = atof(msg_field) / 1.0E9;
      have_cable_delay = 444;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x7b69d(%rip), %rdi     # 0x12612b
callq 0x58e77
callq 0x811da
testl %eax, %eax
je 0xaaac8
leaq 0x290f9d(%rip), %rdi    # 0x33ba40
callq 0x9470
divsd 0x5e578(%rip), %xmm0    # 0x109028
leaq 0x263311(%rip), %rax    # 0x30ddc8
movsd %xmm0, (%rax)
leaq 0x2627f2(%rip), %rax    # 0x30d2b4
movl $0x1bc, (%rax)          # imm = 0x1BC
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_true_getbdelay()
void parse_true_getbdelay()
{
   log_packet_id("getbdelay");

   if(get_msg_field()) {
      pps1_delay = atof(msg_field) / 1.0E9;
      have_pps_delay |= 0x01;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x7b65f(%rip), %rdi     # 0x126134
callq 0x58e77
callq 0x811da
testl %eax, %eax
je 0xaab0c
leaq 0x290f56(%rip), %rdi    # 0x33ba40
callq 0x9470
divsd 0x5e531(%rip), %xmm0    # 0x109028
leaq 0x2632da(%rip), %rax    # 0x30ddd8
movsd %xmm0, (%rax)
leaq 0x2627af(%rip), %rax    # 0x30d2b8
orb $0x1, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_true_ppsdbg()
void parse_true_ppsdbg()
{
   log_packet_id("ppsdbg");

   get_msg_field();  // GPS time
   get_msg_field();  // Status - 0
   if(get_msg_field()) { // 32.42914e3   // EFC?
      dac_voltage = (DATA_SIZE) (atof(msg_field) * 4.096 / 65536.0);  // EFC DAC
      if(dac_voltage && (have_dac == 0)) {
         new_queue(RESET_ALL_QUEUES, 6544); // clear the queues so dac scales nicely
         have_dac = 66;
      }
   }
   get_msg_field();  // 0, -3, -2, -1

   if(get_msg_field()) {
//    dac_voltage = (DATA_SIZE) atof(msg_field);  // sawtooth?
//    have_sawtooth = 1;
   }

   get_msg_field();  // 0, 2
   get_msg_field();  // 0,1,3

   if(get_msg_field()) {  // temperature
//    temperature = (DATA_SIZE) atof(msg_field);
//    have_temperature = 117;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x7b623(%rip), %rdi     # 0x12613e
callq 0x58e77
callq 0x811da
callq 0x811da
callq 0x811da
testl %eax, %eax
je 0xaab87
leaq 0x290f06(%rip), %rdi    # 0x33ba40
callq 0x9470
mulsd 0x73bf9(%rip), %xmm0    # 0x11e740
mulsd 0x73bb1(%rip), %xmm0    # 0x11e700
leaq 0x261eaa(%rip), %rax    # 0x30ca00
movsd %xmm0, (%rax)
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0xaab66
jnp 0xaab87
leaq 0x26278f(%rip), %rbx    # 0x30d2fc
cmpl $0x0, (%rbx)
jne 0xaab87
movl $0x7, %edi
movl $0x1990, %esi           # imm = 0x1990
callq 0x1120f
movl $0x42, (%rbx)
callq 0x811da
callq 0x811da
callq 0x811da
callq 0x811da
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x811da
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_true_kaldbg()
void parse_true_kaldbg()
{
   log_packet_id("kaldbg");

   if(get_msg_field()) {} ;  // Unix time
   if(get_msg_field()) {} ;  // -0.32
   if(get_msg_field()) {} ;  // PPS related - 31.42890e3
   if(get_msg_field()) {} ;  // -0.336e-3
   if(get_msg_field()) {} ;  // 0.291      // smoothed phase error in approx 6.5 ns steps
   if(get_msg_field()) {} ;  // 0
   if(get_msg_field()) {} ;  // 0
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x7b594(%rip), %rdi     # 0x126145
callq 0x58e77
callq 0x811da
callq 0x811da
callq 0x811da
callq 0x811da
callq 0x811da
callq 0x811da
popq %rbp
jmp 0x811da
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_true_scale()
void parse_true_scale()
{
   log_packet_id("scalefactor");

   if(get_msg_field()) {
      true_scalefactor = atof(msg_field);
      have_true_scale = 1;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x7b567(%rip), %rdi     # 0x12614c
callq 0x58e77
callq 0x811da
testl %eax, %eax
je 0xaac17
leaq 0x290e46(%rip), %rdi    # 0x33ba40
callq 0x9470
leaq 0x292772(%rip), %rax    # 0x33d378
movsd %xmm0, (%rax)
leaq 0x29276f(%rip), %rax    # 0x33d380
movl $0x1, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_true_getver()
void parse_true_getver()
{
   log_packet_id("getver");

   if(get_msg_field()) {
      msg_field[32] = 0;
      strcpy(tp_sw, msg_field);
   }

   if(get_msg_field()) {
      msg_field[32] = 0;
      strcpy(tp_boot, msg_field);
      if(strstr(msg_field, "BOOT")) {
         send_true_cmd("$PROCEED");  // get out of boot mode
      }
   }

   if(get_msg_field()) {  // FPGA version
      msg_field[32] = 0;
      strcpy(tp_num1, msg_field);
   }

   if(get_msg_field()) {  // software checmsum
      msg_field[32] = 0;
      strcpy(tp_num2, msg_field);
   }

   if(get_msg_field()) {  // FPGA checksum
      msg_field[32] = 0;
      strcpy(tp_num3, msg_field);
   }

   if(get_msg_field()) {
      msg_field[32] = 0;
      strcpy(tp_sn, msg_field);
   }

   have_info |= ALL_ID_INFO;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x7b3e4(%rip), %rdi     # 0x12615f
callq 0x58e77
callq 0x811da
testl %eax, %eax
je 0xaada0
leaq 0x290cb0(%rip), %rsi    # 0x33ba40
movb $0x0, 0x20(%rsi)
leaq 0x292255(%rip), %rdi    # 0x33cff0
callq 0x9340
callq 0x811da
testl %eax, %eax
je 0xaade3
leaq 0x290c90(%rip), %rbx    # 0x33ba40
movb $0x0, 0x20(%rbx)
leaq 0x292265(%rip), %rdi    # 0x33d020
movq %rbx, %rsi
callq 0x9340
leaq 0x7b39c(%rip), %rsi     # 0x126166
movq %rbx, %rdi
callq 0x9090
testq %rax, %rax
je 0xaade3
leaq 0x76909(%rip), %rdi     # 0x1216e7
callq 0x5f2a0
callq 0x811da
testl %eax, %eax
je 0xaae03
leaq 0x290c4d(%rip), %rsi    # 0x33ba40
movb $0x0, 0x20(%rsi)
leaq 0x292252(%rip), %rdi    # 0x33d050
callq 0x9340
callq 0x811da
testl %eax, %eax
je 0xaae23
leaq 0x290c2d(%rip), %rsi    # 0x33ba40
movb $0x0, 0x20(%rsi)
leaq 0x292262(%rip), %rdi    # 0x33d080
callq 0x9340
callq 0x811da
testl %eax, %eax
je 0xaae43
leaq 0x290c0d(%rip), %rsi    # 0x33ba40
movb $0x0, 0x20(%rsi)
leaq 0x292272(%rip), %rdi    # 0x33d0b0
callq 0x9340
callq 0x811da
testl %eax, %eax
je 0xaae63
leaq 0x290bed(%rip), %rsi    # 0x33ba40
movb $0x0, 0x20(%rsi)
leaq 0x292282(%rip), %rdi    # 0x33d0e0
callq 0x9340
leaq 0x262b0a(%rip), %rax    # 0x30d974
orb $0xf, (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_true_sat()
void parse_true_sat()
{
int prn;
double az, el, sig;

   log_packet_id("sat info");

   if(get_msg_field()) {  // receiver channel
   }
   else return;

   if(get_msg_field()) {
      prn = atoi(msg_field);
      if(prn < 1) return;
      else if(prn > 255) return;
   }
   else return;

   az = el = 999.0;
   if(get_msg_field()) {
      el = atof(msg_field);
   }
   else return;
   if(get_msg_field()) {
      az = atof(msg_field);
   }
   else return;
   if((az < 999.0) && (el < 999.0)) {
      set_sat_azel(prn, (float) az, (float) el);
   }

   if(get_msg_field()) {
      sig = atof(msg_field);
      if(sig) {
         sat[prn].tracking = prn;
         sat[prn].level_msg = 55;
         sat[prn].sig_level = (float) sig;
         have_snr |= rinex_gnss(prn);
         record_sig_levels(prn);
      }
      else {
         sat[prn].level_msg = 0;
         sat[prn].tracking = 0;
      }
   }
   else return;

   level_type = "dBc";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x79d6e(%rip), %rdi     # 0x124bef
callq 0x58e77
callq 0x811da
testl %eax, %eax
je 0xaaf9d
callq 0x811da
testl %eax, %eax
je 0xaaf9d
leaq 0x290b99(%rip), %rdi    # 0x33ba40
callq 0x95e0
movl %eax, %ebx
leal -0x100(%rbx), %eax
cmpl $0xffffff01, %eax       # imm = 0xFFFFFF01
jb 0xaaf9d
callq 0x811da
testl %eax, %eax
je 0xaaf9d
leaq 0x290b6d(%rip), %rdi    # 0x33ba40
callq 0x9470
movsd %xmm0, -0x10(%rbp)
callq 0x811da
testl %eax, %eax
je 0xaaf9d
leaq 0x290b4f(%rip), %rdi    # 0x33ba40
callq 0x9470
movsd 0x7384a(%rip), %xmm1    # 0x11e748
ucomisd %xmm0, %xmm1
movsd -0x10(%rbp), %xmm2
jbe 0xaaf21
ucomisd %xmm2, %xmm1
jbe 0xaaf21
cvtsd2ss %xmm0, %xmm0
xorps %xmm1, %xmm1
cvtsd2ss %xmm2, %xmm1
movl %ebx, %edi
callq 0x5ad98
callq 0x811da
testl %eax, %eax
je 0xaaf9d
leaq 0x290b0f(%rip), %rdi    # 0x33ba40
callq 0x9470
movl %ebx, %eax
imulq $0x348, %rax, %rax      # imm = 0x348
xorpd %xmm1, %xmm1
addq 0xa4ff6(%rip), %rax     # 0x14ff40
ucomisd %xmm1, %xmm0
jne 0xaaf52
jnp 0xaaf81
movl %ebx, 0x218(%rax)
movl $0x37, 0x1c(%rax)
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x20(%rax)
movl %ebx, %edi
callq 0xdbb74
leaq 0x2623d6(%rip), %rcx    # 0x30d34c
orl %eax, (%rcx)
movl %ebx, %edi
callq 0x5ced3
jmp 0xaaf8c
xorl %ecx, %ecx
movl %ecx, 0x1c(%rax)
movl %ecx, 0x218(%rax)
leaq 0x76c67(%rip), %rax     # 0x121bfa
leaq 0x193f5e(%rip), %rcx    # 0x23eef8
movq %rax, (%rcx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_true_status()
void parse_true_status()
{
u32 ho;
int val;

   log_packet_id("status");

   if(get_msg_field()) {  // 10MHz
      val = atoi(msg_field);
   }
   else return;

   if(get_msg_field()) {  // 1PPS
      val = atoi(msg_field);
   }
   else return;

   if(get_msg_field()) {  // antenna          
      val = atoi(msg_field);
      if(val) minor_alarms |= (MINOR_ANT_NO_PWR);
      else    minor_alarms &= (~MINOR_ANT_NO_PWR);
      have_antenna = 56;
   }
   else return;

   if(get_msg_field()) {  // holdover duration
      ho = (u32) atoi(msg_field);
      if(ho) holdover = ho;
   }
   else return;

   if(get_msg_field()) {  // num sats
      val = atoi(msg_field);
   }
   else return;

   if(get_msg_field()) {  // state
      val = atoi(msg_field);
      if     (val == 0) discipline_mode = DIS_MODE_NORMAL;
      else if(val == 1) discipline_mode = DIS_MODE_ACQUIRE;     // acquiring
      else if(val == 2) discipline_mode = DIS_MODE_POWERUP;
      else if(val == 3) discipline_mode = DIS_MODE_AUTO_HOLD;
      else if(val == 4) discipline_mode = DIS_MODE_MANUAL_HOLD;
      else if(val == 5) discipline_mode = DIS_MODE_SOFT_HOLD;
      else if(val == 6) discipline_mode = DIS_MODE_NO_GPS;      // no gps
      else if(val == 7) discipline_mode = DIS_MODE_LEARNING;    // training OCXO
      else if(1 || ((val >= 8) && (val <= 17))) {
         true_wait = val;
         discipline_mode = DIS_MODE_WAIT;
      }
      else discipline_mode = DIS_MODE_UNKNOWN;

      true_debug = atoi(msg_field);
      have_true_debug = 1;
      have_ffom = 1;
   }
   else return;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x7a94a(%rip), %rdi     # 0x125a3d
callq 0x58e77
callq 0x811da
testl %eax, %eax
je 0xab1ec
callq 0x811da
testl %eax, %eax
je 0xab1ec
callq 0x811da
testl %eax, %eax
je 0xab1ec
leaq 0x29091a(%rip), %rdi    # 0x33ba40
callq 0x95e0
leaq 0x2620a6(%rip), %rcx    # 0x30d1d8
movl (%rcx), %edx
andl $-0x7, %edx
testl %eax, %eax
movl $0x6, %esi
cmovel %eax, %esi
orl %edx, %esi
movl %esi, (%rcx)
leaq 0x2620e0(%rip), %rax    # 0x30d22c
movl $0x38, (%rax)
callq 0x811da
testl %eax, %eax
je 0xab1ec
leaq 0x2908da(%rip), %rdi    # 0x33ba40
callq 0x95e0
testl %eax, %eax
je 0xab178
leaq 0x2622e2(%rip), %rcx    # 0x30d458
movl %eax, (%rcx)
callq 0x811da
testl %eax, %eax
je 0xab1ec
callq 0x811da
testl %eax, %eax
je 0xab1ec
leaq 0x2908af(%rip), %rdi    # 0x33ba40
callq 0x95e0
cmpl $0x8, %eax
jae 0xab1af
shll $0x3, %eax
movabsq $0x1415160302011700, %rdx # imm = 0x1415160302011700
movl %eax, %ecx
shrq %cl, %rdx
jmp 0xab1b7
movl %eax, 0x2c4e3f(%rip)    # 0x36fff4
movb $0x18, %dl
leaq 0x2622d9(%rip), %rax    # 0x30d497
movb %dl, (%rax)
leaq 0x290879(%rip), %rdi    # 0x33ba40
callq 0x95e0
leaq 0x2921cd(%rip), %rcx    # 0x33d3a0
movl %eax, (%rcx)
leaq 0x2921c8(%rip), %rax    # 0x33d3a4
movl $0x1, %ecx
movl %ecx, (%rax)
leaq 0x261a72(%rip), %rax    # 0x30cc5c
movl %ecx, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: two_enviro_mode()
int two_enviro_mode()
{
   // returns true if there is a environmental sensor thermometer on the main 
   // receiver port and on the auxiliary ENVIRO_PORT  - Heather does not 
   // currently support this.

   if((rcvr_type == THERMO_RCVR) && enviro_port_open()) return 1;
   return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x16d64b(%rip), %rax    # 0x2188d0
cmpq $0x80000, (%rax)        # imm = 0x80000
jne 0xab2ac
leaq 0x26304b(%rip), %rcx    # 0x30e2e0
cmpl $0x0, 0x225d4(%rcx)
je 0xab2ac
movl $0x1, %eax
cmpl $0x0, 0x225d0(%rcx)
jg 0xab2ae
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: get_enviro_field()
int get_enviro_field()
{
char c;
int i;

   // extract the next field from a sensorr message.  Fields are separated
   // by commas, spaces, or tabs.

   enviro_field[0] = 0;
   if(enviro_msg[enviro_col] == 0) return 0;  // at end-of-message

   i = 0;
   while(enviro_col < (int)sizeof(enviro_msg)) {   // get next field from the thermometer message
      c = enviro_msg[enviro_col];
      if(c == 0) {  // reached end-of-message
         break;
      }
      else if(c == ' ') {  // skip leading spaces, end field on a space
         ++enviro_col;
         if(i) break;
      }
      else if(c == '\t') {  // skip leading spaces, end field on a tab
         ++enviro_col;
         if(i) break;
      }
      else if(c == ',') {  // skip leading spaces, end field on a comma
         ++enviro_col;
         if(i) break;
      }
      else {        // add char to extracted field
         enviro_field[i++] = c;
         enviro_field[i] = 0;
         ++enviro_col;
      }
   }

   return enviro_field[0];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb $0x0, 0x2c1195(%rip)    # 0x36c450
movslq 0x2c1392(%rip), %rcx    # 0x36c654
leaq 0x2c0f77(%rip), %rax    # 0x36c240
cmpb $0x0, (%rcx,%rax)
je 0xab34a
movl 0x2c137f(%rip), %ecx    # 0x36c654
cmpl $0x200, %ecx            # imm = 0x200
jg 0xab341
xorl %esi, %esi
leaq 0x2c116a(%rip), %rdx    # 0x36c450
movslq %ecx, %rdi
movb (%rdi,%rax), %dil
movzbl %dil, %r8d
cmpl $0x1f, %r8d
jle 0xab305
cmpl $0x2c, %r8d
je 0xab30b
cmpl $0x20, %r8d
je 0xab30b
jmp 0xab320
cmpl $0x9, %r8d
jne 0xab31b
incl %ecx
movl %ecx, 0x2c1341(%rip)    # 0x36c654
testl %esi, %esi
jne 0xab341
xorl %esi, %esi
jmp 0xab339
testl %r8d, %r8d
je 0xab341
movslq %esi, %r8
leaq 0x1(%r8), %rsi
movb %dil, (%r8,%rdx)
movb $0x0, 0x1(%r8,%rdx)
incl %ecx
movl %ecx, 0x2c131b(%rip)    # 0x36c654
cmpl $0x201, %ecx            # imm = 0x201
jl 0xab2e6
movsbl 0x2c1108(%rip), %eax    # 0x36c450
jmp 0xab34c
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: save_temp1()
void save_temp1()
{
   // if the enviro sensor is the main receiver or the GPS device does not
   // report temperatures, store the main temp sensor reading in the regular 
   // temperature variable/plot (GT plot).

   if(rcvr_type == THERMO_RCVR) {
      temperature = tc1;
      have_temperature = 900;
   }
   else if(have_temperature == 0) {
      temperature = tc1;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x16d18a(%rip), %rax    # 0x2188d0
cmpq $0x80000, (%rax)        # imm = 0x80000
jne 0xab774
leaq 0x26145a(%rip), %rax    # 0x30cbb0
movsd (%rax), %xmm0
leaq 0x2612b7(%rip), %rax    # 0x30ca18
movsd %xmm0, (%rax)
leaq 0x261ae0(%rip), %rax    # 0x30d24c
movl $0x384, (%rax)          # imm = 0x384
jmp 0xab796
leaq 0x261ad1(%rip), %rax    # 0x30d24c
cmpl $0x0, (%rax)
jne 0xab796
leaq 0x261429(%rip), %rax    # 0x30cbb0
movsd (%rax), %xmm0
leaq 0x261286(%rip), %rax    # 0x30ca18
movsd %xmm0, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: next_enviro_poll()
int next_enviro_poll()
{
int i;

   // find the next reading that we can poll for

   for(i=0; i<NUM_SENSORS; i++) { 
      if(last_enviro == 0) next_enviro = ENV_TEMP1;
      else if(next_enviro == 0) next_enviro = ENV_TEMP1;
      else next_enviro <<= 1;
      if(next_enviro & (0x0001 << NUM_SENSORS)) next_enviro = ENV_TEMP1;

      if(next_enviro & enviro_sensors) {  // the device supports this reading
         return next_enviro;
      }
   }

   next_enviro = 0;     // device has no known supported readings
   return next_enviro;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x16d181(%rip), %rax    # 0x218924
movl (%rax), %ecx
leaq 0x16d174(%rip), %rax    # 0x218920
movl (%rax), %esi
leaq 0x16d173(%rip), %rdx    # 0x218928
movl (%rdx), %eax
movl $0xb, %edi
movl $0x1, %r8d
testl %eax, %eax
leal (%rax,%rax), %eax
cmovel %r8d, %eax
testl %ecx, %ecx
cmovel %r8d, %eax
btl $0xb, %eax
jae 0xab7dc
movl $0x1, %eax
testl %eax, %esi
jne 0xab7ee
decl %edi
jne 0xab7c2
movl $0x0, (%rdx)
xorl %eax, %eax
jmp 0xab7f0
movl %eax, (%rdx)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: set_lfs_type()
int set_lfs_type()
{
   enviro_field[UNIT_LEN] = 0;
   strcpy(enviro_dev, enviro_field);
   have_info |= (MANUF_PARAMS | PRODN_PARAMS | VERSION_INFO);

   if(strstr(enviro_field, "LFS104A")) { 
      enviro_sensors = (ENV_SN | ENV_TEMP1 | ENV_TEMP2 | ENV_DP | ENV_LUX | ENV_REFALT);
      enviro_type = LFS_ENVIRO;
   }
   else if(strstr(enviro_field, "LFS104B")) {  // LFS104BW
      enviro_sensors = (ENV_SN | ENV_TEMP1 | ENV_TEMP2 | ENV_HUMID | ENV_PRESS | ENV_EMIS);
      enviro_type = LFS_ENVIRO;
   }
   else if(strstr(enviro_field, "LFS108A")) { 
      enviro_sensors = (ENV_SN | ENV_TEMP1 | ENV_RTEMP);
      enviro_type = LFS_ENVIRO;
   }
   else if(strstr(enviro_field, "LFS108B")) { 
      enviro_sensors = (ENV_SN | ENV_TEMP1 | ENV_TEMP2 | ENV_DP);
      enviro_type = LFS_ENVIRO;
   }
   else if(strstr(enviro_field, "LFS108C")) { 
      enviro_sensors = (ENV_SN | ENV_TEMP1 | ENV_TEMP2 | ENV_HUMID);
      enviro_type = LFS_ENVIRO;
   }
   else if(strstr(enviro_field, "LFS108D")) { 
      enviro_sensors = (ENV_SN | ENV_TEMP1 | ENV_TEMP2 | ENV_HUMID);
      enviro_type = LFS_ENVIRO;
   }
   else if(strstr(enviro_field, "LFS108E")) { 
      enviro_sensors = (ENV_SN | ENV_TEMP1 | ENV_COUNT);
      enviro_type = LFS_ENVIRO;
   }
   else return 0;

   return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movb $0x0, 0x2c0c63(%rip)    # 0x36c462
leaq 0x2c0c4a(%rip), %rbx    # 0x36c450
leaq 0x291a53(%rip), %rdi    # 0x33d260
movq %rbx, %rsi
callq 0x9340
leaq 0x262158(%rip), %rax    # 0x30d974
orb $0x7, (%rax)
leaq 0x7a9c3(%rip), %rsi     # 0x1261e9
movq %rbx, %rdi
callq 0x9090
movl $0x1b3, %ebx            # imm = 0x1B3
testq %rax, %rax
jne 0xab8e9
leaq 0x2c0c0d(%rip), %rdi    # 0x36c450
leaq 0x7a9a7(%rip), %rsi     # 0x1261f1
callq 0x9090
movl $0x41f, %ebx            # imm = 0x41F
testq %rax, %rax
jne 0xab8e9
leaq 0x2c0bec(%rip), %rdi    # 0x36c450
leaq 0x7a98e(%rip), %rsi     # 0x1261f9
callq 0x9090
movl $0x51, %ebx
testq %rax, %rax
jne 0xab8e9
leaq 0x2c0bcf(%rip), %rdi    # 0x36c450
leaq 0x7a979(%rip), %rsi     # 0x126201
callq 0x9090
movl $0x33, %ebx
testq %rax, %rax
jne 0xab8e9
leaq 0x2c0bb2(%rip), %rdi    # 0x36c450
leaq 0x7a964(%rip), %rsi     # 0x126209
callq 0x9090
movl $0x17, %ebx
testq %rax, %rax
jne 0xab8e9
leaq 0x2c0b95(%rip), %rdi    # 0x36c450
leaq 0x7a94f(%rip), %rsi     # 0x126211
callq 0x9090
testq %rax, %rax
jne 0xab8e9
leaq 0x2c0b7d(%rip), %rdi    # 0x36c450
leaq 0x7a93f(%rip), %rsi     # 0x126219
callq 0x9090
movl $0x211, %ebx            # imm = 0x211
testq %rax, %rax
je 0xab90b
leaq 0x16d030(%rip), %rax    # 0x218920
movl %ebx, (%rax)
leaq 0x16d01b(%rip), %rax    # 0x218914
movl $0x3, (%rax)
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
xorl %eax, %eax
jmp 0xab904
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: detect_enviro_type()
void detect_enviro_type()
{
   // figure up the sensor type and what readings it can do

   enviro_sensors = ENV_TEMP1;   // assume everybody does temperature
   if(strstr(enviro_field, "$PLHEN")) {  // custom Heather BME280 + two thermistors
      enviro_sensors = (ENV_TEMP1 | ENV_TEMP2 | ENV_HUMID | ENV_PRESS);
      enviro_type = HEATHER_ENVIRO;
   }
   else if(strstr(enviro_field, "USB-")) {   // dogratian.com USB devices
      enviro_field[UNIT_LEN] = 0;
      strcpy(enviro_dev, enviro_field);
      have_info |= (MANUF_PARAMS | PRODN_PARAMS | VERSION_INFO);

      if(strstr(enviro_field, "PA")) {  // see what measurements it does
         enviro_sensors = (ENV_SN | ENV_TEMP1 | ENV_HUMID | ENV_PRESS);
         enviro_type = DOG_ENVIRO;
      }
      else if(strstr(enviro_field, "SHT")) {
         enviro_sensors = (ENV_SN | ENV_TEMP1 | ENV_HUMID);
         enviro_type = DOG_ENVIRO;
      }
      else if(strstr(enviro_field, "LM75")) {
         enviro_sensors = (ENV_SN | ENV_TEMP1);
         enviro_type = DOG_ENVIRO;
      }
   }
   else if(strstr(enviro_field, "LFS10")) {
      set_lfs_type();
   }

   next_enviro = 0;  // start the polling cycle
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x16d003(%rip), %r14    # 0x218920
movl $0x1, (%r14)
leaq 0x2c0b25(%rip), %rdi    # 0x36c450
leaq 0x7a8ef(%rip), %rsi     # 0x126221
callq 0x9090
testq %rax, %rax
je 0xab955
movl $0xf, (%r14)
leaq 0x16cfca(%rip), %rax    # 0x218914
movl $0x2, (%rax)
jmp 0xaba1d
leaq 0x2c0af4(%rip), %rdi    # 0x36c450
leaq 0x7a8c5(%rip), %rsi     # 0x126228
callq 0x9090
testq %rax, %rax
je 0xab9b1
movb $0x0, 0x2c0aee(%rip)    # 0x36c462
leaq 0x2c0ad5(%rip), %rbx    # 0x36c450
leaq 0x2918de(%rip), %rdi    # 0x33d260
movq %rbx, %rsi
callq 0x9340
leaq 0x261fe3(%rip), %rax    # 0x30d974
orb $0x7, (%rax)
leaq 0x7a892(%rip), %rsi     # 0x12622d
movq %rbx, %rdi
callq 0x9090
testq %rax, %rax
je 0xab9d0
movl $0x1d, (%r14)
jmp 0xaba10
leaq 0x2c0a98(%rip), %rdi    # 0x36c450
leaq 0x7a87a(%rip), %rsi     # 0x126239
callq 0x9090
testq %rax, %rax
je 0xaba1d
callq 0xab7f2
jmp 0xaba1d
leaq 0x2c0a79(%rip), %rdi    # 0x36c450
leaq 0x7a852(%rip), %rsi     # 0x126230
callq 0x9090
testq %rax, %rax
je 0xab9f1
movl $0x15, (%r14)
jmp 0xaba10
leaq 0x2c0a58(%rip), %rdi    # 0x36c450
leaq 0x7a835(%rip), %rsi     # 0x126234
callq 0x9090
testq %rax, %rax
je 0xaba1d
movl $0x11, (%r14)
leaq 0x16cefd(%rip), %rax    # 0x218914
movl $0x1, (%rax)
leaq 0x16cf04(%rip), %rax    # 0x218928
movl $0x0, (%rax)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: decode_heather_enviro(unsigned int, int)
void decode_heather_enviro(unsigned port, int i)
{
   // decode Heather sensor values.  No need to poll for the next readings

   enviro_type = HEATHER_ENVIRO;
   if(get_enviro_field()) {  // humidity
      parse_humidity();
   }
   if(get_enviro_field()) {  // pressure
      parse_pressure();
   }
   if(get_enviro_field()) {  // BME280 temp sensor (room temp) (not currently used)
      parse_temp0();
   }
   if(get_enviro_field()) {  // thermistor 1
      parse_temp1();
      save_temp1();
   }
   if(get_enviro_field()) {  // thermistor 2
      parse_temp2();
   }
   if(get_enviro_field()) {  // ADC channel 3
//lfs parse_adc3();
   }
   if(get_enviro_field()) {  // ADC channel 4
//lfs parse_adc4();
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x16c900(%rip), %rax    # 0x218914
movl $0x2, (%rax)
callq 0xab2b0
testl %eax, %eax
je 0xac028
callq 0xab34e
callq 0xab2b0
testl %eax, %eax
je 0xac036
callq 0xab391
callq 0xab2b0
testl %eax, %eax
je 0xac044
callq 0xab3d4
callq 0xab2b0
testl %eax, %eax
je 0xac0a9
callq 0xab417
leaq 0x16c877(%rip), %rax    # 0x2188d0
cmpq $0x80000, (%rax)        # imm = 0x80000
jne 0xac087
leaq 0x260b47(%rip), %rax    # 0x30cbb0
movsd (%rax), %xmm0
leaq 0x2609a4(%rip), %rax    # 0x30ca18
movsd %xmm0, (%rax)
leaq 0x2611cd(%rip), %rax    # 0x30d24c
movl $0x384, (%rax)          # imm = 0x384
jmp 0xac0a9
leaq 0x2611be(%rip), %rax    # 0x30d24c
cmpl $0x0, (%rax)
jne 0xac0a9
leaq 0x260b16(%rip), %rax    # 0x30cbb0
movsd (%rax), %xmm0
leaq 0x260973(%rip), %rax    # 0x30ca18
movsd %xmm0, (%rax)
callq 0xab2b0
testl %eax, %eax
je 0xac0b7
callq 0xab45a
callq 0xab2b0
popq %rbp
jmp 0xab2b0
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: send_dac_value(double)
int send_dac_value(double val)
{
unsigned i;

   // send a value to the external DAC port
   if(dac_port_open() == 0) return 0;


   sprintf(out, "%.6f", val);
   sendout(DAC_PORT, '$', ADD_CHAR);
   for(i=0; i<strlen(out); i++) {
      sendout(DAC_PORT, out[i], ADD_CHAR);
   }
   sendout(DAC_PORT, 0x0D, ADD_CHAR);
   sendout(DAC_PORT, 0x0A, EOM);

   return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0x261af6(%rip), %rax    # 0x30e2e0
xorl %ebx, %ebx
cmpl $0x0, 0x24834(%rax)
je 0xac88b
cmpl $0x0, 0x24830(%rax)
jle 0xac88b
leaq 0x28fa13(%rip), %rbx    # 0x33c220
leaq 0x684bb(%rip), %rsi     # 0x114ccf
movq %rbx, %rdi
movb $0x1, %al
callq 0x9060
movl $0x10, %edi
movl $0x24, %esi
xorl %edx, %edx
callq 0xbcc0
cmpb $0x0, (%rbx)
je 0xac861
movl $0x1, %r14d
xorl %r15d, %r15d
movzbl (%rbx,%r15), %esi
movl $0x10, %edi
xorl %edx, %edx
callq 0xbcc0
movl %r14d, %r15d
movq %rbx, %rdi
callq 0x9120
incl %r14d
cmpq %r15, %rax
ja 0xac83d
movl $0x10, %edi
movl $0xd, %esi
xorl %edx, %edx
callq 0xbcc0
movl $0x1, %ebx
movl $0x10, %edi
movl $0xa, %esi
movl $0x1, %edx
callq 0xbcc0
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: get_dac_field()
int get_dac_field()
{
char c;
int i;

   // extract the next field from a ADC message.  Fields are separated by
   // spaces or tabs.  

   dac_field[0] = 0;
   if(dac_msg[dac_col] == 0) return 0;  // at end-of-message

   i = 0;
   while(dac_col < (int)sizeof(dac_msg)) {   // get next field from the ADC message
      c = dac_msg[dac_col];
      if(c == 0) {  // reached end-of-message
         break;
      }
      else if(c == ' ') {  // skip leading spaces, end field on a space
         ++dac_col;
         if(i) break;
      }
      else if(c == '\t') {  // skip leading spaces, end field on a tab
         ++dac_col;
         if(i) break;
      }
      else {        // add char to extracted field
         dac_field[i++] = c;
         dac_field[i] = 0;
         ++dac_col;
      }
   }

   return dac_field[0];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb $0x0, 0x2bffcd(%rip)    # 0x36c870
movslq 0x2c01ca(%rip), %rcx    # 0x36ca74
leaq 0x2bfdaf(%rip), %rax    # 0x36c660
cmpb $0x0, (%rcx,%rax)
je 0xac91d
movl 0x2c01b7(%rip), %ecx    # 0x36ca74
cmpl $0x200, %ecx            # imm = 0x200
jg 0xac914
xorl %esi, %esi
leaq 0x2bffa2(%rip), %rdx    # 0x36c870
movslq %ecx, %rdi
movzbl (%rdi,%rax), %edi
cmpl $0x9, %edi
je 0xac8fe
cmpl $0x20, %edi
je 0xac8fe
testl %edi, %edi
je 0xac914
movslq %esi, %r8
leaq 0x1(%r8), %rsi
movb %dil, (%r8,%rdx)
movb $0x0, 0x1(%r8,%rdx)
incl %ecx
movl %ecx, 0x2c0178(%rip)    # 0x36ca74
jmp 0xac90c
incl %ecx
movl %ecx, 0x2c016e(%rip)    # 0x36ca74
testl %esi, %esi
jne 0xac914
xorl %esi, %esi
cmpl $0x201, %ecx            # imm = 0x201
jl 0xac8ce
movsbl 0x2bff55(%rip), %eax    # 0x36c870
jmp 0xac91f
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: decode_dac_msg(unsigned int)
void decode_dac_msg(unsigned port)
{
int i;
u08 c;
DATA_SIZE val;

// if(rcvr_type == DAC_RCVR) {
   if(0) {
      start_msg_decode(1);
      ++dac_packets;
   }
   else {
      ++packet_count;
      ++dac_packets;
   }

   // reset the data queues shortly after startup.  
//   if((dac_packets == DAC_RESET_THRESH) && (pause_data == 0)) {
//      new_queue(RESET_ALL_QUEUES, 103);
//   }

   dac_msg[0] = 0;
   if(port == DAC_PORT) {
      for(i=0; i<dac_wptr; i++) {  // copy message from ADC buffer to dac_msg
         c = dac_buf[i];
         dac_msg[i] = c;
         dac_msg[i+1] = 0;
      }
   }
   else {
      for(i=0; i<tsip_wptr; i++) {  // copy message from tsip buffer to dac_msg
         c = tsip_buf[i];
         dac_msg[i] = c;
         dac_msg[i+1] = 0;
      }
   }

   strupr(dac_msg);

   dac_col = 0;     // index of next char to get from DAC (actally ADC) buffer
   if(get_dac_field()) {
      if(is_numeric(dac_field)) {
         val = (DATA_SIZE) atof(dac_field);
         // !!!!!!! do something
      }
      else return;
   }

   saw_rcvr_msg = 1;
   return;
}

// Assembly:
leaq 0x19264c(%rip), %rax    # 0x23ef74
incl (%rax)
leaq 0x192653(%rip), %rax    # 0x23ef84
incl (%rax)
movb $0x0, 0x2bfd26(%rip)    # 0x36c660
cmpl $0x10, %edi
jne 0xac975
leaq 0x28e93e(%rip), %rax    # 0x33b284
movslq (%rax), %rax
testq %rax, %rax
jle 0xac9a9
xorl %ecx, %ecx
leaq 0x28d929(%rip), %rdx    # 0x33a280
leaq 0x2bfd02(%rip), %rsi    # 0x36c660
movb (%rdx,%rcx), %dil
movb %dil, (%rcx,%rsi)
movb $0x0, 0x1(%rcx,%rsi)
incq %rcx
cmpq %rcx, %rax
jne 0xac95e
jmp 0xac9a9
leaq 0x28b8d6(%rip), %rax    # 0x338252
movzwl (%rax), %eax
testq %rax, %rax
je 0xac9a9
xorl %ecx, %ecx
leaq 0x28a8c3(%rip), %rdx    # 0x337250
leaq 0x2bfccc(%rip), %rsi    # 0x36c660
movb (%rdx,%rcx), %dil
movb %dil, (%rcx,%rsi)
movb $0x0, 0x1(%rcx,%rsi)
incq %rcx
cmpq %rcx, %rax
jne 0xac994
pushq %rbp
movq %rsp, %rbp
leaq 0x2bfcac(%rip), %rdi    # 0x36c660
callq 0x9899
movl $0x0, 0x2c00b1(%rip)    # 0x36ca74
callq 0xac898
testl %eax, %eax
je 0xac9dc
leaq 0x2bfe9d(%rip), %rdi    # 0x36c870
callq 0x81140
testl %eax, %eax
je 0xac9e9
leaq 0x1925bd(%rip), %rax    # 0x23efa0
movl $0x1, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: two_ticc_mode()
int two_ticc_mode()
{
   // returns true if there is a TICC on the main receiver port and
   // on the auxiliary TICC port.

   if((rcvr_type == TICC_RCVR) && ticc_port_open()) return 1;
   return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x16bd8d(%rip), %rax    # 0x2188d0
cmpq $0x10000, (%rax)        # imm = 0x10000
jne 0xacb77
leaq 0x191845(%rip), %rcx    # 0x23e398
movl $0x1, %eax
cmpq $0x0, (%rcx)
jne 0xacb79
leaq 0x26177b(%rip), %rcx    # 0x30e2e0
cmpl $0x0, 0x1e114(%rcx)
je 0xacb77
cmpl $0x0, 0x1e110(%rcx)
jg 0xacb79
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: get_ticc_field()
int get_ticc_field()
{
char c;
int i;

   // extract the next field from a TICC message.  Fields are separated by
   // spaces or tabs.  HP counters embed commas in numbers so we don't end
   // fields with commas.

   ticc_field[0] = 0;
   if(ticc_msg[ticc_col] == 0) return 0;  // at end-of-message

   i = 0;
   while(ticc_col < (int)sizeof(ticc_msg)) {   // get next field from the ticc message
      c = ticc_msg[ticc_col];
      if(c == 0) {  // reached end-of-message
         break;
      }
      else if(c == ' ') {  // skip leading spaces, end field on a space
         ++ticc_col;
         if(i) break;
      }
      else if(c == '\t') {  // skip leading spaces, end field on a tab
         ++ticc_col;
         if(i) break;
      }
      else {        // add char to extracted field
         ticc_field[i++] = c;
         ticc_field[i] = 0;
         ++ticc_col;
      }
   }

   return ticc_field[0];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb $0x0, 0x2bf4aa(%rip)    # 0x36c030
movslq 0x2bf6a7(%rip), %rcx    # 0x36c234
leaq 0x2bf28c(%rip), %rax    # 0x36be20
cmpb $0x0, (%rcx,%rax)
je 0xacc00
movl 0x2bf694(%rip), %ecx    # 0x36c234
cmpl $0x200, %ecx            # imm = 0x200
jg 0xacbf7
xorl %esi, %esi
leaq 0x2bf47f(%rip), %rdx    # 0x36c030
movslq %ecx, %rdi
movzbl (%rdi,%rax), %edi
cmpl $0x9, %edi
je 0xacbe1
cmpl $0x20, %edi
je 0xacbe1
testl %edi, %edi
je 0xacbf7
movslq %esi, %r8
leaq 0x1(%r8), %rsi
movb %dil, (%r8,%rdx)
movb $0x0, 0x1(%r8,%rdx)
incl %ecx
movl %ecx, 0x2bf655(%rip)    # 0x36c234
jmp 0xacbef
incl %ecx
movl %ecx, 0x2bf64b(%rip)    # 0x36c234
testl %esi, %esi
jne 0xacbf7
xorl %esi, %esi
cmpl $0x201, %ecx            # imm = 0x201
jl 0xacbb1
movsbl 0x2bf432(%rip), %eax    # 0x36c030
jmp 0xacc02
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: get_ticc_line(unsigned int)
int get_ticc_line(unsigned port)
{
unsigned i;
char c;
double t0;

   // get a line from the TICC menu.

   if(port >= NUM_COM_PORTS) return 1;

   i = 0;
   cfg_buf[i] = 0;
   t0 = GetMsecs();
   while(GetMsecs() < (t0 + 1000.0)) {   // !!!! we need a timeout here
      if(SERIAL_DATA_AVAILABLE(port)) {
         c = get_ticc_char();
         if(c == 0x0A) continue;
         if(c == 0x0D) return 0;
         if(i > (sizeof(cfg_buf) - 2)) break;
         cfg_buf[i++] = c;
         cfg_buf[i] = 0;
      }
   }
   return 1;
}

// Assembly:
cmpl $0x12, %edi
jbe 0xacc13
movl $0x1, %ecx
jmp 0xacc99
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
movb $0x0, 0x2c563a(%rip)    # 0x372260
callq 0xaea1
addsd 0x5c405(%rip), %xmm0    # 0x109038
movsd %xmm0, -0x20(%rbp)
xorl %r15d, %r15d
leaq 0x2c561e(%rip), %r14    # 0x372260
callq 0xaea1
movsd -0x20(%rbp), %xmm1
ucomisd %xmm0, %xmm1
jbe 0xacc8a
movl %ebx, %edi
callq 0xb9c3
testl %eax, %eax
je 0xacc42
callq 0x5853c
cmpl $0xa, %eax
je 0xacc42
xorl %ecx, %ecx
cmpl $0xd, %eax
je 0xacc8f
cmpl $0x3fe, %r15d           # imm = 0x3FE
ja 0xacc8a
movl %r15d, %ecx
leaq 0x1(%rcx), %r15
movb %al, (%rcx,%r14)
movb $0x0, 0x1(%rcx,%r14)
jmp 0xacc42
movl $0x1, %ecx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
movl %ecx, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: pet_data(unsigned char*, int, int)
int pet_data(unsigned char *buf, int k, int check_crlf)
{
int p;

   // returns true if data in buf starting at char k is a valid picpet reading

   if(!isdigit(buf[k+0] & 0xFF)) return 0;
   if(!isdigit(buf[k+1] & 0xFF)) return 0;
   if(buf[k+2] != '.') return 0;

   for(p=3; p<=9; p++) {
      if(isdigit(buf[k+p] & 0xFF) == 0) return 0;
   }
   if(buf[k+10] != ' ') return 0;
   if(ishex(buf[k+11]) == 0) return 0;
   if(ishex(buf[k+12]) == 0) return 0;
   if(check_crlf) {
      if(buf[k+13] != 0x0D) return 0;
      if(buf[k+14] != 0x0A) return 0;
   }
   else {
      if(buf[k+13]) return 0;
   }

   return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movslq %esi, %r12
movzbl (%rdi,%r12), %eax
addl $-0x30, %eax
xorl %ebx, %ebx
cmpl $0x9, %eax
ja 0xacd7e
movq %rdi, %r14
movzbl 0x1(%rdi,%r12), %eax
addl $-0x30, %eax
cmpl $0x9, %eax
ja 0xacd7e
cmpb $0x2e, 0x2(%r14,%r12)
jne 0xacd7e
movl %edx, %r15d
leaq (%r12,%r14), %rax
addq $0x3, %rax
xorl %ebx, %ebx
xorl %ecx, %ecx
movzbl (%rax,%rcx), %edx
addl $-0x3a, %edx
cmpl $-0xa, %edx
jb 0xacd7e
incq %rcx
cmpq $0x7, %rcx
jne 0xacd12
cmpb $0x20, 0xa(%r14,%r12)
jne 0xacd7e
movsbl 0xb(%r14,%r12), %edi
leal -0x30(%rdi), %eax
cmpb $0xa, %al
jb 0xacd49
callq 0x9700
addl $-0x47, %eax
cmpl $-0x6, %eax
jb 0xacd7e
movsbl 0xc(%r14,%r12), %edi
leal -0x30(%rdi), %eax
cmpb $0xa, %al
jb 0xacd63
callq 0x9700
addl $-0x47, %eax
cmpl $-0x6, %eax
jb 0xacd7e
movb 0xd(%r14,%r12), %al
testl %r15d, %r15d
je 0xacd89
cmpb $0xd, %al
jne 0xacd7e
cmpb $0xa, 0xe(%r14,%r12)
jne 0xacd7e
movl $0x1, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
testb %al, %al
jne 0xacd7e
jmp 0xacd79