LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: get_luxor_config()
void get_luxor_config()
{
   if(luxor == 0) return;

   batt_lvc = tsip_single();
   batt_hvc = tsip_single(); 
   batt_ovc = tsip_single(); 
   batt_watts = tsip_single();
   load_lvc = tsip_single(); 
   load_hvc = tsip_single(); 
   load_ovc = tsip_single(); 
   load_watts = tsip_single();
   auxv_lvc = tsip_single(); 
   auxv_hvc = tsip_single(); 
   tc1_ovt = tsip_single(); 
   tc2_ovt = tsip_single(); 
   msg_timeout = tsip_single();

   lux1_time = (u08) tsip_single();
   lux2_time = (u08) tsip_single();
   emis1 = tsip_single(); 
   emis2 = tsip_single(); 

   batt_pwm_res = tsip_byte();
   set_pwm_step();
   check_tsip_end(1);
}

// Assembly:
leaq 0x1c0cda(%rip), %rax    # 0x23ef3e
cmpb $0x0, (%rax)
je 0x7e3ff
pushq %rbp
movq %rsp, %rbp
callq 0x58a30
cvtss2sd %xmm0, %xmm0
leaq 0x19ce9f(%rip), %rax    # 0x21b120
movsd %xmm0, (%rax)
callq 0x58a30
cvtss2sd %xmm0, %xmm0
leaq 0x19ce83(%rip), %rax    # 0x21b118
movsd %xmm0, (%rax)
callq 0x58a30
cvtss2sd %xmm0, %xmm0
leaq 0x19ce67(%rip), %rax    # 0x21b110
movsd %xmm0, (%rax)
callq 0x58a30
cvtss2sd %xmm0, %xmm0
leaq 0x19ce6b(%rip), %rax    # 0x21b128
movsd %xmm0, (%rax)
callq 0x58a30
cvtss2sd %xmm0, %xmm0
leaq 0x19ce2f(%rip), %rax    # 0x21b100
movsd %xmm0, (%rax)
callq 0x58a30
cvtss2sd %xmm0, %xmm0
leaq 0x19ce13(%rip), %rax    # 0x21b0f8
movsd %xmm0, (%rax)
callq 0x58a30
cvtss2sd %xmm0, %xmm0
leaq 0x19cdf7(%rip), %rax    # 0x21b0f0
movsd %xmm0, (%rax)
callq 0x58a30
cvtss2sd %xmm0, %xmm0
leaq 0x19cdfb(%rip), %rax    # 0x21b108
movsd %xmm0, (%rax)
callq 0x58a30
cvtss2sd %xmm0, %xmm0
leaq 0x19ce17(%rip), %rax    # 0x21b138
movsd %xmm0, (%rax)
callq 0x58a30
cvtss2sd %xmm0, %xmm0
leaq 0x19cdfb(%rip), %rax    # 0x21b130
movsd %xmm0, (%rax)
callq 0x58a30
cvtss2sd %xmm0, %xmm0
leaq 0x19cdf7(%rip), %rax    # 0x21b140
movsd %xmm0, (%rax)
callq 0x58a30
cvtss2sd %xmm0, %xmm0
leaq 0x19cdeb(%rip), %rax    # 0x21b148
movsd %xmm0, (%rax)
callq 0x58a30
cvtss2sd %xmm0, %xmm0
leaq 0x19cddf(%rip), %rax    # 0x21b150
movsd %xmm0, (%rax)
callq 0x58a30
cvttss2si %xmm0, %eax
leaq 0x28ea8b(%rip), %rcx    # 0x30ce10
movb %al, (%rcx)
callq 0x58a30
cvttss2si %xmm0, %eax
leaq 0x28ea7a(%rip), %rcx    # 0x30ce11
movb %al, (%rcx)
callq 0x58a30
cvtss2sd %xmm0, %xmm0
leaq 0x28ea37(%rip), %rax    # 0x30cde0
movsd %xmm0, (%rax)
callq 0x58a30
cvtss2sd %xmm0, %xmm0
leaq 0x28ea2b(%rip), %rax    # 0x30cde8
movsd %xmm0, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x7e3d7
leaq 0x1c0b9c(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
leaq 0x28ea36(%rip), %rcx    # 0x30ce14
movb %al, (%rcx)
cmpb $0x9, %al
je 0x7e400
movzbl %al, %eax
cmpl $0x8, %eax
jne 0x7e416
leaq 0x28ea25(%rip), %rax    # 0x30ce18
movabsq $0x3f70000000000000, %rcx # imm = 0x3F70000000000000
jmp 0x7e411
retq
leaq 0x28ea11(%rip), %rax    # 0x30ce18
movabsq $0x3f60000000000000, %rcx # imm = 0x3F60000000000000
movq %rcx, (%rax)
jmp 0x7e42d
leaq 0x28e9fb(%rip), %rax    # 0x30ce18
movabsq $0x3f50000000000000, %rdx # imm = 0x3F50000000000000
movq %rdx, (%rax)
movb $0xa, (%rcx)
xorl %edi, %edi
popq %rbp
jmp 0x58e9b
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: get_luxor_cal()
void get_luxor_cal()
{
   if(luxor == 0) return;

   vref_m = tsip_single();
   vref_b = tsip_single();
   temp1_m = tsip_single();
   temp1_b = tsip_single();
   temp2_m = tsip_single();
   temp2_b = tsip_single();
   vcal_m = tsip_single();
   vcal_b = tsip_single();
   batti_m = tsip_single();
   batti_b = tsip_single();
   ledi_m = tsip_single();
   ledi_b = tsip_single();
   lux1_m = tsip_single();
   lux1_b = tsip_single();
   lux2_m = tsip_single();
   lux2_b = tsip_single();
   adc2_m = tsip_single();
   adc2_b = tsip_single();
   rb_m = tsip_single();
   rb_b = tsip_single();

   check_tsip_end(1);
}

// Assembly:
leaq 0x1c0b02(%rip), %rax    # 0x23ef3e
cmpb $0x0, (%rax)
je 0x7e5e1
pushq %rbp
movq %rsp, %rbp
callq 0x58a30
cvtss2sd %xmm0, %xmm0
leaq 0x19cd07(%rip), %rax    # 0x21b160
movsd %xmm0, (%rax)
callq 0x58a30
cvtss2sd %xmm0, %xmm0
leaq 0x19ccfb(%rip), %rax    # 0x21b168
movsd %xmm0, (%rax)
callq 0x58a30
cvtss2sd %xmm0, %xmm0
leaq 0x19ccef(%rip), %rax    # 0x21b170
movsd %xmm0, (%rax)
callq 0x58a30
cvtss2sd %xmm0, %xmm0
leaq 0x19cce3(%rip), %rax    # 0x21b178
movsd %xmm0, (%rax)
callq 0x58a30
cvtss2sd %xmm0, %xmm0
leaq 0x19ccd7(%rip), %rax    # 0x21b180
movsd %xmm0, (%rax)
callq 0x58a30
cvtss2sd %xmm0, %xmm0
leaq 0x19cccb(%rip), %rax    # 0x21b188
movsd %xmm0, (%rax)
callq 0x58a30
cvtss2sd %xmm0, %xmm0
leaq 0x19ccbf(%rip), %rax    # 0x21b190
movsd %xmm0, (%rax)
callq 0x58a30
cvtss2sd %xmm0, %xmm0
leaq 0x19ccb3(%rip), %rax    # 0x21b198
movsd %xmm0, (%rax)
callq 0x58a30
cvtss2sd %xmm0, %xmm0
leaq 0x19cca7(%rip), %rax    # 0x21b1a0
movsd %xmm0, (%rax)
callq 0x58a30
cvtss2sd %xmm0, %xmm0
leaq 0x19cc9b(%rip), %rax    # 0x21b1a8
movsd %xmm0, (%rax)
callq 0x58a30
cvtss2sd %xmm0, %xmm0
leaq 0x19cc8f(%rip), %rax    # 0x21b1b0
movsd %xmm0, (%rax)
callq 0x58a30
cvtss2sd %xmm0, %xmm0
leaq 0x19cc83(%rip), %rax    # 0x21b1b8
movsd %xmm0, (%rax)
callq 0x58a30
cvtss2sd %xmm0, %xmm0
leaq 0x19cc77(%rip), %rax    # 0x21b1c0
movsd %xmm0, (%rax)
callq 0x58a30
cvtss2sd %xmm0, %xmm0
leaq 0x19cc6b(%rip), %rax    # 0x21b1c8
movsd %xmm0, (%rax)
callq 0x58a30
cvtss2sd %xmm0, %xmm0
leaq 0x19cc5f(%rip), %rax    # 0x21b1d0
movsd %xmm0, (%rax)
callq 0x58a30
cvtss2sd %xmm0, %xmm0
leaq 0x19cc53(%rip), %rax    # 0x21b1d8
movsd %xmm0, (%rax)
callq 0x58a30
cvtss2sd %xmm0, %xmm0
leaq 0x19cc47(%rip), %rax    # 0x21b1e0
movsd %xmm0, (%rax)
callq 0x58a30
cvtss2sd %xmm0, %xmm0
leaq 0x19cc3b(%rip), %rax    # 0x21b1e8
movsd %xmm0, (%rax)
callq 0x58a30
cvtss2sd %xmm0, %xmm0
leaq 0x19cc2f(%rip), %rax    # 0x21b1f0
movsd %xmm0, (%rax)
callq 0x58a30
cvtss2sd %xmm0, %xmm0
leaq 0x19cc23(%rip), %rax    # 0x21b1f8
movsd %xmm0, (%rax)
xorl %edi, %edi
popq %rbp
jmp 0x58e9b
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: set_luxor_sens(unsigned char, unsigned char)
void set_luxor_sens(u08 lux1, u08 lux2)
{
   if(luxor == 0) return;

   send_tsip_start(LUXOR_ID); 
   send_byte(0x03);
   send_byte(lux1);
   send_byte(lux2);
   send_tsip_end();
}

// Assembly:
leaq 0x1c0955(%rip), %rax    # 0x23ef3e
cmpb $0x0, (%rax)
je 0x7e628
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %esi, %ebx
movl %edi, %r14d
movl $0xdc, %edi
callq 0x5e6be
movl $0x3, %edi
callq 0x590f7
movzbl %r14b, %edi
callq 0x590f7
movzbl %bl, %edi
callq 0x590f7
popq %rbx
popq %r14
popq %rbp
jmp 0x5e73c
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: set_pwm_step()
void set_pwm_step()
{
   if(batt_pwm_res == 8) PWM_STEP = (256.0F / 65536.0F);
   else if(batt_pwm_res == 9) PWM_STEP = (128.0F / 65536.0F);
   else { 
      PWM_STEP = (64.0F / 65536.0F);
      batt_pwm_res = 10;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x28e7e0(%rip), %rax    # 0x30ce14
movzbl (%rax), %ecx
cmpl $0x9, %ecx
je 0x7e654
cmpl $0x8, %ecx
jne 0x7e66a
leaq 0x28e7d0(%rip), %rax    # 0x30ce18
movabsq $0x3f70000000000000, %rcx # imm = 0x3F70000000000000
jmp 0x7e665
leaq 0x28e7bd(%rip), %rax    # 0x30ce18
movabsq $0x3f60000000000000, %rcx # imm = 0x3F60000000000000
movq %rcx, (%rax)
jmp 0x7e681
leaq 0x28e7a7(%rip), %rcx    # 0x30ce18
movabsq $0x3f50000000000000, %rdx # imm = 0x3F50000000000000
movq %rdx, (%rcx)
movb $0xa, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: set_luxor_cal()
void set_luxor_cal()
{
   if(luxor == 0) return;

   send_tsip_start(LUXOR_ID); 
   send_byte(0x11);
   send_single((float) vref_m);
   send_single((float) vref_b);
   send_single((float) temp1_m);
   send_single((float) temp1_b);
   send_single((float) temp2_m);
   send_single((float) temp2_b);
   send_single((float) vcal_m);
   send_single((float) vcal_b);
   send_single((float) batti_m);
   send_single((float) batti_b);
   send_single((float) ledi_m);
   send_single((float) ledi_b);
   send_single((float) lux1_m);
   send_single((float) lux1_b);
   send_single((float) lux2_m);
   send_single((float) lux2_b);
   send_single((float) adc2_m);
   send_single((float) adc2_b);
   send_single((float) rb_m);
   send_single((float) rb_b);
   send_tsip_end();

   Sleep(500);   // !!!!!! allow time for message to be processed
}

// Assembly:
leaq 0x1c06d2(%rip), %rax    # 0x23ef3e
cmpb $0x0, (%rax)
je 0x7ea16
pushq %rbp
movq %rsp, %rbp
movl $0xdc, %edi
callq 0x5e6be
movl $0x11, %edi
callq 0x590f7
leaq 0x19c8cc(%rip), %rax    # 0x21b160
cvtsd2ss (%rax), %xmm0
callq 0x59376
leaq 0x19c8c4(%rip), %rax    # 0x21b168
xorps %xmm0, %xmm0
cvtsd2ss (%rax), %xmm0
callq 0x59376
leaq 0x19c8b9(%rip), %rax    # 0x21b170
xorps %xmm0, %xmm0
cvtsd2ss (%rax), %xmm0
callq 0x59376
leaq 0x19c8ae(%rip), %rax    # 0x21b178
xorps %xmm0, %xmm0
cvtsd2ss (%rax), %xmm0
callq 0x59376
leaq 0x19c8a3(%rip), %rax    # 0x21b180
xorps %xmm0, %xmm0
cvtsd2ss (%rax), %xmm0
callq 0x59376
leaq 0x19c898(%rip), %rax    # 0x21b188
xorps %xmm0, %xmm0
cvtsd2ss (%rax), %xmm0
callq 0x59376
leaq 0x19c88d(%rip), %rax    # 0x21b190
xorps %xmm0, %xmm0
cvtsd2ss (%rax), %xmm0
callq 0x59376
leaq 0x19c882(%rip), %rax    # 0x21b198
xorps %xmm0, %xmm0
cvtsd2ss (%rax), %xmm0
callq 0x59376
leaq 0x19c877(%rip), %rax    # 0x21b1a0
xorps %xmm0, %xmm0
cvtsd2ss (%rax), %xmm0
callq 0x59376
leaq 0x19c86c(%rip), %rax    # 0x21b1a8
xorps %xmm0, %xmm0
cvtsd2ss (%rax), %xmm0
callq 0x59376
leaq 0x19c861(%rip), %rax    # 0x21b1b0
xorps %xmm0, %xmm0
cvtsd2ss (%rax), %xmm0
callq 0x59376
leaq 0x19c856(%rip), %rax    # 0x21b1b8
xorps %xmm0, %xmm0
cvtsd2ss (%rax), %xmm0
callq 0x59376
leaq 0x19c84b(%rip), %rax    # 0x21b1c0
xorps %xmm0, %xmm0
cvtsd2ss (%rax), %xmm0
callq 0x59376
leaq 0x19c840(%rip), %rax    # 0x21b1c8
xorps %xmm0, %xmm0
cvtsd2ss (%rax), %xmm0
callq 0x59376
leaq 0x19c835(%rip), %rax    # 0x21b1d0
xorps %xmm0, %xmm0
cvtsd2ss (%rax), %xmm0
callq 0x59376
leaq 0x19c82a(%rip), %rax    # 0x21b1d8
xorps %xmm0, %xmm0
cvtsd2ss (%rax), %xmm0
callq 0x59376
leaq 0x19c81f(%rip), %rax    # 0x21b1e0
xorps %xmm0, %xmm0
cvtsd2ss (%rax), %xmm0
callq 0x59376
leaq 0x19c814(%rip), %rax    # 0x21b1e8
xorps %xmm0, %xmm0
cvtsd2ss (%rax), %xmm0
callq 0x59376
leaq 0x19c809(%rip), %rax    # 0x21b1f0
xorps %xmm0, %xmm0
cvtsd2ss (%rax), %xmm0
callq 0x59376
leaq 0x19c7fe(%rip), %rax    # 0x21b1f8
xorps %xmm0, %xmm0
cvtsd2ss (%rax), %xmm0
callq 0x59376
callq 0x5e73c
movl $0x1f4, %edi            # imm = 0x1F4
popq %rbp
jmp 0xafe8
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: set_luxor_runtime(unsigned int)
void set_luxor_runtime(u32 seconds)
{
   if(luxor == 0) return;

   send_tsip_start(LUXOR_ID); 
   send_byte(0x0A);
   send_dword(seconds);
   send_tsip_end();
}

// Assembly:
leaq 0x1c0520(%rip), %rax    # 0x23ef3e
cmpb $0x0, (%rax)
je 0x7ea51
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
movl $0xdc, %edi
callq 0x5e6be
movl $0xa, %edi
callq 0x590f7
movl %ebx, %edi
callq 0x592eb
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x5e73c
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: set_luxor_delay(unsigned short)
void set_luxor_delay(u16 msecs)
{
   if(luxor == 0) return;

   send_tsip_start(LUXOR_ID); 
   send_byte(0x0B);
   send_word(msecs);
   send_tsip_end();
}

// Assembly:
leaq 0x1c04e5(%rip), %rax    # 0x23ef3e
cmpb $0x0, (%rax)
je 0x7eab4
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
movl $0xdc, %edi
callq 0x5e6be
movl $0xb, %edi
callq 0x590f7
movw %bx, -0xa(%rbp)
leaq 0x199d4f(%rip), %rbx    # 0x2187d4
xorl %eax, %eax
cmpb $0x0, (%rbx)
sete %al
movzbl -0xa(%rbp,%rax), %edi
callq 0x590f7
xorl %eax, %eax
cmpb $0x0, (%rbx)
setne %al
movzbl -0xa(%rbp,%rax), %edi
callq 0x590f7
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x5e73c
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: set_emissivity(double, double)
void set_emissivity(DATA_SIZE em1, DATA_SIZE em2)
{
   if(luxor) {
      send_tsip_start(LUXOR_ID); 
      send_byte(0x04);
      send_single((float) em1);
      send_single((float) em2);
      send_tsip_end();
   }
   else if((rcvr_type == THERMO_RCVR) && (enviro_type == LFS_ENVIRO) && (enviro_sensors & ENV_EMIS)) {
      sprintf(out, "PEMIS%d\r", (int) (em1*100.0));
      send_enviro_cmd(out, RCVR_PORT);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x18, %rsp
leaq 0x1c022c(%rip), %rax    # 0x23ef3e
cmpb $0x0, (%rax)
je 0x7ed5a
movl $0xdc, %edi
movsd %xmm0, -0x10(%rbp)
movsd %xmm1, -0x18(%rbp)
callq 0x5e6be
movl $0x4, %edi
callq 0x590f7
xorps %xmm0, %xmm0
cvtsd2ss -0x10(%rbp), %xmm0
callq 0x59376
xorps %xmm0, %xmm0
cvtsd2ss -0x18(%rbp), %xmm0
callq 0x59376
addq $0x18, %rsp
popq %rbx
popq %rbp
jmp 0x5e73c
leaq 0x199b6f(%rip), %rax    # 0x2188d0
cmpq $0x80000, (%rax)        # imm = 0x80000
jne 0x7ed83
leaq 0x199ba3(%rip), %rax    # 0x218914
cmpl $0x3, (%rax)
jne 0x7ed83
leaq 0x199ba3(%rip), %rax    # 0x218920
testb $0x4, 0x1(%rax)
jne 0x7ed8a
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
mulsd 0x8a2ce(%rip), %xmm0    # 0x109060
cvttsd2si %xmm0, %edx
leaq 0x2bd483(%rip), %rbx    # 0x33c220
leaq 0xa3d62(%rip), %rsi     # 0x122b06
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
movl $0xa, %esi
addq $0x18, %rsp
popq %rbx
popq %rbp
jmp 0x60f7b
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: set_cal_mode(unsigned char)
void set_cal_mode(u08 cal_mode)
{
   if(luxor == 0) return;

   send_tsip_start(LUXOR_ID); 
   send_byte(0x05);
   send_byte(cal_mode);
   send_tsip_end();
}

// Assembly:
leaq 0x1c0176(%rip), %rax    # 0x23ef3e
cmpb $0x0, (%rax)
je 0x7edfc
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
movl $0xdc, %edi
callq 0x5e6be
movl $0x5, %edi
callq 0x590f7
movzbl %bl, %edi
callq 0x590f7
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x5e73c
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: get_timing_msg()
void get_timing_msg()
{
   subcode = tsip_byte();

   if     (subcode == 0x0B) get_comp_time();
   else if(subcode == 0x14) get_unknown_msg(0x8F00 | subcode);  // * current datum values
   else if(subcode == 0x15) get_datums();
   else if(subcode == 0x20) get_sv6_fix();
   else if(subcode == 0x26) get_unknown_msg(0x8F00 | subcode);  // * eeprom write acknowledge
   else if(subcode == 0x41) get_manuf_params();
   else if(subcode == 0x42) get_prodn_params();
   else if(subcode == 0x45) get_segment_info();                 // EEPROM segemnt info
   else if(subcode == 0x4A) get_pps_settings();
   else if(subcode == 0x4B) get_unknown_msg(0x8F00 | subcode);  // * programming the survey limit
   else if(subcode == 0x4D) get_unknown_msg(0x8F00 | subcode);  // * automatic packet output mask
   else if(subcode == 0x4E) get_pps_mode();
   else if(subcode == 0xA0) get_dac_values();
   else if(subcode == 0xA1) get_osc_sense();

   else if(subcode == 0xA2) get_timing_mode();
   else if(subcode == 0xA5) get_packet_mask();
   else if(subcode == 0xA7) get_sat_solutions();   // not on ThunderBolt-E
   else if(subcode == 0xA8) get_discipline_params();
   else if(subcode == 0xA9) get_survey_params();
   else if(subcode == 0xAB) primary_timing(1);
   else if(subcode == 0xAC) secondary_timing(1);
   else if(subcode == 0xAD) get_unknown_msg(0x8F00 | subcode);  // * primary UTC time
   else if(subcode == 0xAE) get_ae_packet();
   else                     get_unknown_msg(0x8F00 | subcode);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x7ee17
leaq 0x1c015c(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
leaq 0x1c0140(%rip), %rcx    # 0x23ef5e
movb %al, (%rcx)
movzbl %al, %ecx
cmpl $0x9f, %ecx
jg 0x7ee4e
cmpl $0x1f, %ecx
jle 0x7ee73
leal -0x41(%rcx), %edx
cmpl $0xd, %edx
ja 0x7ee88
leaq 0xa012d(%rip), %rcx     # 0x11ef6c
movslq (%rcx,%rdx,4), %rdx
addq %rcx, %rdx
jmpq *%rdx
popq %rbp
jmp 0x74ef4
addl $0xffffff60, %ecx       # imm = 0xFFFFFF60
cmpl $0xe, %ecx
ja 0x7eef4
leaq 0xa0140(%rip), %rdx     # 0x11efa4
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
popq %rbp
jmp 0x75468
cmpl $0xb, %ecx
je 0x7eea0
cmpl $0x14, %ecx
je 0x7eea6
cmpl $0x15, %ecx
jne 0x7eef4
popq %rbp
jmp 0x74db4
cmpl $0x20, %ecx
je 0x7ef29
cmpl $0x26, %ecx
jne 0x7eef4
movl $0x8f26, %edi           # imm = 0x8F26
jmp 0x7ef23
popq %rbp
jmp 0x75ead
movl $0x8f14, %edi           # imm = 0x8F14
jmp 0x7ef23
movl $0x8fad, %edi           # imm = 0x8FAD
jmp 0x7ef23
movl $0x1, %edi
popq %rbp
jmp 0x76e69
movl $0x1, %edi
popq %rbp
jmp 0x763a8
popq %rbp
jmp 0x75599
popq %rbp
jmp 0x75d0d
popq %rbp
jmp 0x754c0
popq %rbp
jmp 0x75577
popq %rbp
jmp 0x79b08
popq %rbp
jmp 0x75504
popq %rbp
jmp 0x756ef
movzbl %al, %edi
orl $0x8f00, %edi           # imm = 0x8F00
jmp 0x7ef23
popq %rbp
jmp 0x75210
popq %rbp
jmp 0x751c8
popq %rbp
jmp 0x75117
movl $0x8f4b, %edi           # imm = 0x8F4B
jmp 0x7ef23
popq %rbp
jmp 0x75424
movl $0x8f4d, %edi           # imm = 0x8F4D
popq %rbp
jmp 0x7ef36
leaq 0xa303d(%rip), %rdi     # 0x121f6d
popq %rbp
jmp 0x58dc2
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: get_unknown_msg(unsigned short)
void get_unknown_msg(u16 msg_id)
{
   if(msg_id == 0x13) {
      msg_id = get_next_tsip();
      if(log_comments && (log_stream & LOG_HEX_STREAM) && log_file) {
         fprintf(log_file, "#!! Message rejected: %02X\n      ", msg_id);
         if(log_flush_mode) fflush(log_file);
         kol = (-1);
      }
   }
   else {
      if(log_comments && (log_stream & LOG_HEX_STREAM) && log_file) {
         fprintf(log_file, "#!! Unknown message: id %02X:\n      ", msg_id);
         if(log_flush_mode) fflush(log_file);
         kol = (-1);
      }
   }

   tsip_rptr = tsip_wptr = 0;  // flush the tsip buffer
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpl $0x13, %edi
jne 0x7efab
movw $0x0, 0x2ece78(%rip)    # 0x36bdc0
leaq 0x2b9305(%rip), %rcx    # 0x338254
movzwl (%rcx), %eax
leaq 0x2b92f9(%rip), %rsi    # 0x338252
movl $0x2000, %edx           # imm = 0x2000
cmpw (%rsi), %ax
jae 0x7ef74
leal 0x1(%rax), %edx
movw %dx, (%rcx)
leaq 0x2b82e0(%rip), %rcx    # 0x337250
movzbl (%rcx,%rax), %edx
leaq 0x1bf499(%rip), %rax    # 0x23e414
cmpb $0x0, (%rax)
je 0x7f00d
leaq 0x1bf485(%rip), %rax    # 0x23e410
leaq 0x1bf3ce(%rip), %rcx    # 0x23e360
movq (%rcx), %rdi
testq %rdi, %rdi
setne %cl
andb (%rax), %cl
cmpb $0x1, %cl
jne 0x7f00d
leaq 0xa3b66(%rip), %rsi     # 0x122b0f
jmp 0x7efde
leaq 0x1bf462(%rip), %rax    # 0x23e414
cmpb $0x0, (%rax)
je 0x7f00d
movl %edi, %edx
leaq 0x1bf450(%rip), %rax    # 0x23e410
leaq 0x1bf399(%rip), %rcx    # 0x23e360
movq (%rcx), %rdi
testq %rdi, %rdi
setne %cl
andb (%rax), %cl
cmpb $0x1, %cl
jne 0x7f00d
leaq 0xa3b53(%rip), %rsi     # 0x122b31
xorl %eax, %eax
callq 0x9560
leaq 0x1bf434(%rip), %rax    # 0x23e420
cmpl $0x0, (%rax)
je 0x7f000
leaq 0x1bf368(%rip), %rax    # 0x23e360
movq (%rax), %rdi
callq 0x9420
leaq 0x1bff5d(%rip), %rax    # 0x23ef64
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
leaq 0x2b923e(%rip), %rax    # 0x338252
xorl %ecx, %ecx
movw %cx, (%rax)
leaq 0x2b9234(%rip), %rax    # 0x338254
movw %cx, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: new_packet(int)
void new_packet(int redraw)
{
   ++packet_count;
   if(packet_count == 1L) {
      if(redraw) need_redraw = 3333;  // get rid of any "no serial..." message
   }

   if(timing_seen == 2) { // reset queues when second time message seen
      new_queue(RESET_ALL_QUEUES, 100);
      timing_seen = 3;
   }

   // NEW_RCVR
   if(need_queue_reset) {  // data has just started comming in... reset queues when importand plots have data
      if(rcvr_type == RFTG_RCVR) {  // reset queues after first few packets have arrived
         if(have_dac && have_temperature && have_pps_offset) { // all plots now have data
            new_queue(RESET_ALL_QUEUES, 222);
            need_queue_reset = 0;
         }
      }
   }
}

// Assembly:
leaq 0x1bfd61(%rip), %rax    # 0x23ef74
movl (%rax), %ecx
leal 0x1(%rcx), %edx
movl %edx, (%rax)
testl %ecx, %ecx
setne %al
testl %edi, %edi
sete %cl
orb %al, %cl
jne 0x7f235
leaq 0x199615(%rip), %rax    # 0x218844
movl $0xd05, (%rax)          # imm = 0xD05
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x1bfd36(%rip), %rbx    # 0x23ef78
cmpl $0x2, (%rbx)
jne 0x7f25c
movl $0x7, %edi
movl $0x64, %esi
callq 0x1118c
movl $0x3, (%rbx)
leaq 0x1bfd2d(%rip), %rbx    # 0x23ef90
cmpl $0x0, (%rbx)
je 0x7f2b1
leaq 0x199661(%rip), %rax    # 0x2188d0
cmpq $0x400000, (%rax)       # imm = 0x400000
jne 0x7f2b1
leaq 0x28e07d(%rip), %rax    # 0x30d2fc
cmpl $0x0, (%rax)
je 0x7f2b1
leaq 0x28dfc1(%rip), %rax    # 0x30d24c
cmpl $0x0, (%rax)
je 0x7f2b1
leaq 0x28dfa1(%rip), %rax    # 0x30d238
cmpl $0x0, (%rax)
je 0x7f2b1
movl $0x7, %edi
movl $0xde, %esi
callq 0x1118c
movl $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: start_msg_decode(int)
void start_msg_decode(int redraw)
{
   // prepare to decode a receiver message

   msg_fault = 0x00;
   tsip_rptr = 0;
   ticc_rptr = 0;
   enviro_rptr = 0;

   first_msg = 0;
   last_msg = msg_id;
   ++wakeup_tsip_msg; // we have seen a message
   tsip_error = 0;    // this flag gets set if we see something wrong in a message
   early_end = 0;
   new_packet(redraw);

   flush_debug();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x1bfca9(%rip), %rax    # 0x23ef6c
xorl %ecx, %ecx
movl %ecx, (%rax)
leaq 0x2b8f86(%rip), %rax    # 0x338254
movw %cx, (%rax)
leaq 0x2b9f90(%rip), %rax    # 0x339268
movl %ecx, (%rax)
leaq 0x2baf97(%rip), %rax    # 0x33a278
movl %ecx, (%rax)
leaq 0x1bfcae(%rip), %rax    # 0x23ef98
incq (%rax)
leaq 0x2b7d35(%rip), %rax    # 0x337029
movb $0x0, (%rax)
leaq 0x1bfc5e(%rip), %rax    # 0x23ef5c
movzwl (%rax), %eax
movl %eax, 0x2ecabd(%rip)    # 0x36bdc4
leaq 0x1bfc62(%rip), %rax    # 0x23ef70
movl %ecx, (%rax)
movw %cx, 0x2ecaa9(%rip)     # 0x36bdc0
callq 0x7f20c
leaq 0x1bf06d(%rip), %rax    # 0x23e390
movq (%rax), %rdi
testq %rdi, %rdi
je 0x7f33d
leaq 0x1bf0f6(%rip), %rax    # 0x23e428
cmpl $0x0, (%rax)
je 0x7f33d
popq %rbp
jmp 0x9420
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_rt17_event()
void parse_rt17_event()
{
int source;
int port;
int tag;
double time;

   log_packet_id("Event");
   source = tsip_byte();
   port = tsip_byte();
   tag = tsip_word();
   time = tsip_double();  // msecs in GPS week
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0xa3233(%rip), %rdi     # 0x122b91
callq 0x58dc2
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x7f979
leaq 0x1bf5fa(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x7f98f
leaq 0x1bf5e4(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x588d2
popq %rbp
jmp 0x58b08
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_rt17_svdata(int)
void parse_rt17_svdata(int msg)
{
int subcode;

   // satellite data
   subcode = tsip_byte();
   sprintf(out, "SVDATA 0x%02X:%02X", msg, subcode);
   log_packet_id(out);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edi, %ebx
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x80841
leaq 0x1be732(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
movzbl %al, %ecx
leaq 0x2bb9d5(%rip), %r14    # 0x33c220
leaq 0xa2530(%rip), %rsi     # 0x122d82
movq %r14, %rdi
movl %ebx, %edx
xorl %eax, %eax
callq 0x9060
movq %r14, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x58dc2
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_rt17_rawdata(int)
void parse_rt17_rawdata(int msg)
{
int subcode;
int page;
int reply;
int flags;

   subcode = tsip_byte();
   page = tsip_byte();
   reply = tsip_byte();
   flags = tsip_byte();

   if     (subcode == 0x00) parse_rt17_realtime(flags);
   else if(subcode == 0x01) parse_rt17_posn(flags);
   else if(subcode == 0x02) parse_rt17_event();
   else if(subcode == 0x05) parse_rt17_raw5();
   else if(subcode == 0x06) parse_rt17_raw6();
   else if(subcode == 0x07) parse_rt17_enh_posn();
   else {
      sprintf(out, "RAWDATA 0x%02X:%02X", msg, subcode);
      log_packet_id(out);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edi, %ebx
callq 0x587be
movl %eax, %r14d
cmpl $0x100, %eax            # imm = 0x100
jb 0x8088c
leaq 0x1be6e7(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x808a2
leaq 0x1be6d1(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x808b8
leaq 0x1be6bb(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x808ce
leaq 0x1be6a5(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
movzbl %r14b, %ecx
cmpb $0x7, %cl
ja 0x80905
leaq 0x9e81e(%rip), %rdx     # 0x11f0fc
movslq (%rdx,%rcx,4), %rsi
addq %rdx, %rsi
jmpq *%rsi
movzbl %al, %edi
popq %rbx
popq %r14
popq %rbp
jmp 0x804b0
popq %rbx
popq %r14
popq %rbp
jmp 0x7f953
leaq 0xa246d(%rip), %rdi     # 0x122d70
jmp 0x8093d
leaq 0x2bb914(%rip), %r14    # 0x33c220
leaq 0xa2482(%rip), %rsi     # 0x122d95
movq %r14, %rdi
movl %ebx, %edx
xorl %eax, %eax
callq 0x9060
movq %r14, %rdi
jmp 0x8093d
popq %rbx
popq %r14
popq %rbp
jmp 0x7f7d5
leaq 0xa241c(%rip), %rdi     # 0x122d50
jmp 0x8093d
leaq 0xa2420(%rip), %rdi     # 0x122d5d
popq %rbx
popq %r14
popq %rbp
jmp 0x58dc2
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_rt17_gsof(int)
void parse_rt17_gsof(int msg)
{
int reply;
int page;
int pages;

int subcode;
int len;

   reply = tsip_byte();
   page = tsip_byte();
   pages = tsip_byte();

   while(tsip_rptr < tsip_wptr) {  // parse the GSOF messages
      subcode = tsip_byte();
      len = tsip_byte();
      sprintf(out, "GSOF msg 0x%02X:%d", subcode, len);
      log_packet_id(out);
      // decode GSOF packets here
while(len--) tsip_byte();  // toots - skip payload bytes for now
break;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x80966
leaq 0x1be60d(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x8097c
leaq 0x1be5f7(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x80992
leaq 0x1be5e1(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
leaq 0x2b78bb(%rip), %rax    # 0x338254
movzwl (%rax), %eax
leaq 0x2b78af(%rip), %rcx    # 0x338252
cmpw (%rcx), %ax
jae 0x80a2c
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x809c2
leaq 0x1be5b1(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
movzbl %al, %r14d
callq 0x587be
movl %eax, %ebx
cmpl $0x100, %eax            # imm = 0x100
jb 0x809de
leaq 0x1be595(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
leaq 0x2bb83b(%rip), %r15    # 0x33c220
leaq 0xa23bd(%rip), %rsi     # 0x122da9
movl %ebx, %ecx
andl $0xff, %ecx
movq %r15, %rdi
movl %r14d, %edx
xorl %eax, %eax
callq 0x9060
movq %r15, %rdi
callq 0x58dc2
andl $0xff, %ebx
je 0x80a2c
leaq 0x1be558(%rip), %r14    # 0x23ef70
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x80a28
orb $0x8, (%r14)
decl %ebx
jne 0x80a18
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: is_numeric(char*)
int is_numeric(char *field)
{
unsigned i;

   // returns true if field starts with + - . or digit

   if(field[0] == 0) return 0;

   for(i=0; i<strlen(field); i++) {  // skip leading whitespace
      if(field[i] == ' ') ;
      else if(field[i] == '\t') ;
      else {  // first non-whitespace seen
         if(field[i] == '+') return 1;
         if(field[i] == '-') return 2;
         if(field[i] == '.') return 3;
         if((field[i] >= '0') && (field[i] <= '9')) return 4;
         if((field[i] == '.') && (field[i+1] >= '0') && (field[i+1] <= '9')) return 5;
         break;
      }
   }

   return 0;  // field is not a number
}

// Assembly:
xorl %eax, %eax
cmpb $0x0, (%rdi)
je 0x81065
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x9120
testq %rax, %rax
je 0x8105d
movl $0x1, %ecx
xorl %edx, %edx
movb (%rbx,%rdx), %dl
movzbl %dl, %esi
cmpl $0x1f, %esi
jle 0x8104f
cmpl $0x2a, %esi
jg 0x81066
cmpl $0x20, %esi
je 0x81054
jmp 0x8108a
cmpl $0x9, %esi
jne 0x8108a
movl %ecx, %edx
incl %ecx
cmpq %rdx, %rax
ja 0x81038
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
cmpl $0x2b, %esi
je 0x81083
cmpl $0x2d, %esi
je 0x8107c
cmpl $0x2e, %esi
jne 0x8108a
movl $0x3, %eax
jmp 0x8105f
movl $0x2, %eax
jmp 0x8105f
movl $0x1, %eax
jmp 0x8105f
leal -0x30(%rdx), %esi
movl $0x4, %eax
cmpb $0xa, %sil
jb 0x8105f
cmpb $0x2e, %dl
jne 0x8105d
movl %ecx, %eax
movb (%rbx,%rax), %cl
addb $-0x30, %cl
movl $0x5, %eax
cmpb $0xa, %cl
jae 0x8105d
jmp 0x8105f
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: get_nmea_lat()
void get_nmea_lat()
{
double deg;

   if(get_msg_field()) {
      deg = atof(msg_field);
      lat = (double) (int) (deg / 100.0);
      deg = deg - (lat * 100.0);
      deg /= 60.0;
      lat += deg;
      lat *= (PI / 180.0);
   }

   if(get_msg_field()) {
      if(msg_field[0] == 'S') lat = 0.0 - lat;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0x810b1
testl %eax, %eax
je 0x81730
leaq 0x2ba354(%rip), %rdi    # 0x33ba40
callq 0x9470
movsd 0x87967(%rip), %xmm1    # 0x109060
movapd %xmm0, %xmm2
divsd %xmm1, %xmm2
cvttpd2dq %xmm2, %xmm2
cvtdq2pd %xmm2, %xmm2
mulsd %xmm2, %xmm1
subsd %xmm1, %xmm0
divsd 0x878ef(%rip), %xmm0    # 0x109008
addsd %xmm2, %xmm0
mulsd 0x8a1eb(%rip), %xmm0    # 0x10b910
leaq 0x28b8a4(%rip), %rax    # 0x30cfd0
movsd %xmm0, (%rax)
callq 0x810b1
testl %eax, %eax
je 0x81758
leaq 0x2ba300(%rip), %rax    # 0x33ba40
cmpb $0x53, (%rax)
jne 0x81758
leaq 0x28b884(%rip), %rax    # 0x30cfd0
xorpd %xmm0, %xmm0
subsd (%rax), %xmm0
movsd %xmm0, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: get_nmea_lon()
void get_nmea_lon()
{
double deg;

   if(get_msg_field()) {
      deg = atof(msg_field);
      lon = (double) (int) (deg / 100.0);
      deg = deg - (lon * 100.0);
      deg /= 60.0;
      lon += deg;
      lon *= (PI / 180.0);
   }

   if(get_msg_field()) {
      if(msg_field[0] == 'W') lon = 0.0 - lon;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0x810b1
testl %eax, %eax
je 0x817b2
leaq 0x2ba2d2(%rip), %rdi    # 0x33ba40
callq 0x9470
movsd 0x878e5(%rip), %xmm1    # 0x109060
movapd %xmm0, %xmm2
divsd %xmm1, %xmm2
cvttpd2dq %xmm2, %xmm2
cvtdq2pd %xmm2, %xmm2
mulsd %xmm2, %xmm1
subsd %xmm1, %xmm0
divsd 0x8786d(%rip), %xmm0    # 0x109008
addsd %xmm2, %xmm0
mulsd 0x8a169(%rip), %xmm0    # 0x10b910
leaq 0x28b82a(%rip), %rax    # 0x30cfd8
movsd %xmm0, (%rax)
callq 0x810b1
testl %eax, %eax
je 0x817da
leaq 0x2ba27e(%rip), %rax    # 0x33ba40
cmpb $0x57, (%rax)
jne 0x817da
leaq 0x28b80a(%rip), %rax    # 0x30cfd8
xorpd %xmm0, %xmm0
subsd (%rax), %xmm0
movsd %xmm0, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: get_nmea_alt()
void get_nmea_alt()
{
   if(get_msg_field()) {  //altitude
      alt = atoi(msg_field);
      get_msg_field();    // meters or feet
      if(msg_field[0] == 'F') alt = alt * FEET_PER_METER;
   }
   else get_msg_field();  // meters or feet
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
callq 0x810b1
testl %eax, %eax
je 0x8182c
leaq 0x2ba24d(%rip), %rbx    # 0x33ba40
movq %rbx, %rdi
callq 0x95e0
cvtsi2sd %eax, %xmm0
leaq 0x28b7da(%rip), %r14    # 0x30cfe0
movsd %xmm0, (%r14)
callq 0x810b1
cmpb $0x46, (%rbx)
jne 0x81827
movsd (%r14), %xmm0
mulsd 0x8a086(%rip), %xmm0    # 0x10b8a8
movsd %xmm0, (%r14)
popq %rbx
popq %r14
popq %rbp
retq
popq %rbx
popq %r14
popq %rbp
jmp 0x810b1
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: get_nmea_date()
void get_nmea_date()
{
int date;

   // get a date field from a NMEA message

   if(rcvr_type == BRANDY_RCVR) {  // we use the brandywine time and date message
      get_msg_field();
   }
   else if(get_msg_field()) {
      date = atoi(msg_field);
      have_nmea_date = 0x07;     // we have day/month/year

      pri_day = day = (date / 10000);
      pri_month = month = ((date / 100) % 100);
      pri_year = ((date / 1) % 100);
      if(pri_year > TRUNC_YEAR) pri_year += 1900;
      else                      pri_year += 2000;
      year = pri_year;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x196ecf(%rip), %rax    # 0x2188d0
cmpq $0x40000, (%rax)        # imm = 0x40000
sete %bl
callq 0x810b1
testl %eax, %eax
sete %al
orb %bl, %al
jne 0x81ace
leaq 0x2ba01c(%rip), %rdi    # 0x33ba40
callq 0x95e0
leaq 0x1996b8(%rip), %rcx    # 0x21b0e8
movl $0x7, (%rcx)
cltq
imulq $0x68db8bad, %rax, %rcx # imm = 0x68DB8BAD
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x2c, %rcx
addl %edx, %ecx
leaq 0x28ba81(%rip), %rdx    # 0x30d4d4
movl %ecx, (%rdx)
leaq 0x28bab0(%rip), %rdx    # 0x30d50c
movl %ecx, (%rdx)
imulq $0x51eb851f, %rax, %rcx # imm = 0x51EB851F
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x25, %rcx
addl %edx, %ecx
movslq %ecx, %rcx
imulq $0x51eb851f, %rcx, %rdx # imm = 0x51EB851F
movq %rdx, %rsi
shrq $0x3f, %rsi
sarq $0x25, %rdx
addl %esi, %edx
imull $0x64, %edx, %edx
imull $0x64, %ecx, %esi
subl %edx, %ecx
leaq 0x28ba40(%rip), %rdx    # 0x30d4d8
movl %ecx, (%rdx)
leaq 0x28ba6f(%rip), %rdx    # 0x30d510
movl %ecx, (%rdx)
movl %eax, %ecx
subl %esi, %ecx
leal 0x76c(%rcx), %edx
negl %esi
cmpl $0x51, %ecx
leal 0x7d0(%rax,%rsi), %eax
cmovgel %edx, %eax
leaq 0x28ba51(%rip), %rcx    # 0x30d514
movl %eax, (%rcx)
leaq 0x28ba10(%rip), %rcx    # 0x30d4dc
movl %eax, (%rcx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: check_nmea_date()
void check_nmea_date()
{
   // fake a date from the system clock if none seen from the GPS
   if(rcvr_type == BRANDY_RCVR) return;

   if(have_nmea_date != 0x07) {  // SV6_TYPE - has no date messages, use the system clock
      get_clock_time();
      year = pri_year = clk_year;
      month = pri_month = clk_month;
      day = pri_day = clk_day;
   }
}

// Assembly:
leaq 0x196df4(%rip), %rax    # 0x2188d0
cmpq $0x40000, (%rax)        # imm = 0x40000
je 0x81b4c
leaq 0x1995fc(%rip), %rax    # 0x21b0e8
cmpl $0x7, (%rax)
je 0x81b4c
pushq %rbp
movq %rsp, %rbp
callq 0xa477
leaq 0x28bbc7(%rip), %rax    # 0x30d6c8
movl (%rax), %eax
leaq 0x28ba0a(%rip), %rcx    # 0x30d514
movl %eax, (%rcx)
leaq 0x28b9c9(%rip), %rcx    # 0x30d4dc
movl %eax, (%rcx)
leaq 0x28bba4(%rip), %rax    # 0x30d6c0
movl (%rax), %eax
leaq 0x28b9eb(%rip), %rcx    # 0x30d510
movl %eax, (%rcx)
leaq 0x28b9aa(%rip), %rcx    # 0x30d4d8
movl %eax, (%rcx)
leaq 0x28bb8d(%rip), %rax    # 0x30d6c4
movl (%rax), %eax
leaq 0x28b9cc(%rip), %rcx    # 0x30d50c
movl %eax, (%rcx)
leaq 0x28b98b(%rip), %rcx    # 0x30d4d4
movl %eax, (%rcx)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_gpgll(int)
void parse_gpgll(int system)
{
double old_lat, old_lon,old_alt;

   old_lat = lat;
   old_lon = lon;
   old_alt = alt;

   get_nmea_lat();
   get_nmea_lon();
   get_nmea_alt();

   if(get_msg_field()) {  // status: A=valid  V=invalid
      if(msg_field[0] == 'V') {
         lat = old_lat;
         lon = old_lon;
         alt = old_alt;
      }
   }
   if(get_msg_field()) {  // mode: A=autonomus  D=differential  N=invalid
      if(msg_field[0] == 'N') {
         lat = old_lat;
         lon = old_lon;
         alt = old_alt;
      }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
leaq 0x28b46d(%rip), %rbx    # 0x30cfd0
movsd (%rbx), %xmm0
movsd %xmm0, -0x38(%rbp)
leaq 0x28b465(%rip), %r14    # 0x30cfd8
movsd (%r14), %xmm0
movsd %xmm0, -0x30(%rbp)
leaq 0x28b45c(%rip), %r15    # 0x30cfe0
movsd (%r15), %xmm0
movsd %xmm0, -0x28(%rbp)
callq 0x816d8
callq 0x8175a
callq 0x817dc
callq 0x810b1
leaq 0x2b9e97(%rip), %r12    # 0x33ba40
testl %eax, %eax
je 0x81bd1
cmpb $0x56, (%r12)
jne 0x81bd1
movsd -0x38(%rbp), %xmm0
movsd %xmm0, (%rbx)
movsd -0x30(%rbp), %xmm0
movsd %xmm0, (%r14)
movsd -0x28(%rbp), %xmm0
movsd %xmm0, (%r15)
callq 0x810b1
testl %eax, %eax
je 0x81bfe
cmpb $0x4e, (%r12)
jne 0x81bfe
movsd -0x38(%rbp), %xmm0
movsd %xmm0, (%rbx)
movsd -0x30(%rbp), %xmm0
movsd %xmm0, (%r14)
movsd -0x28(%rbp), %xmm0
movsd %xmm0, (%r15)
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_gprmc(int)
void parse_gprmc(int system)
{
   if((system & system_mask) == 0) return;

   last_was_gsv = 0;
   have_gprmc = system;

   if(TIME_FILTER && have_gpzda) get_msg_field();
   else                          get_nmea_time();

   get_msg_field();  // active flag A=good  V=invalid fix

   if(msg_field[0] == 'A') {
      get_nmea_lat();
      get_nmea_lon();

      if(get_msg_field()) {  // speed (km/hr)
         speed = atof(msg_field) * 0.514444;
         have_speed = 4;
      }
      if(get_msg_field()) {  // course angle
         heading = atof(msg_field);
         have_heading = 4;
      }

      if(rcvr_type == BRANDY_RCVR) return;  // Brandywine gets date/time from a different message

      if(TIME_FILTER && have_gpzda && (have_nmea_date == 0x07)) get_msg_field();
      else get_nmea_date();
   }

   check_nmea_date();

   if(TIME_FILTER && have_gpzda) ;
   else drive_nmea_screen(system, NMEA_RMC);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0xeebd1(%rip), %rax     # 0x170c70
testl %edi, (%rax)
je 0x8218a
movl $0x0, 0x2efd73(%rip)    # 0x371e24
leaq 0x199020(%rip), %rax    # 0x21b0d8
movl %edi, (%rax)
leaq 0x19901f(%rip), %rbx    # 0x21b0e0
cmpl $0x0, (%rbx)
je 0x820cd
callq 0x810b1
jmp 0x820d2
callq 0x81835
callq 0x810b1
leaq 0x2b9962(%rip), %rax    # 0x33ba40
cmpb $0x41, (%rax)
jne 0x82180
callq 0x816d8
callq 0x8175a
callq 0x810b1
testl %eax, %eax
je 0x82126
leaq 0x2b993f(%rip), %rdi    # 0x33ba40
callq 0x9470
mulsd 0x9c022(%rip), %xmm0    # 0x11e130
leaq 0x28af0b(%rip), %rax    # 0x30d020
movsd %xmm0, (%rax)
leaq 0x28b218(%rip), %rax    # 0x30d338
movl $0x4, (%rax)
callq 0x810b1
testl %eax, %eax
je 0x82153
leaq 0x2b990a(%rip), %rdi    # 0x33ba40
callq 0x9470
leaq 0x28aee6(%rip), %rax    # 0x30d028
movsd %xmm0, (%rax)
leaq 0x28b1e7(%rip), %rax    # 0x30d334
movl $0x4, (%rax)
leaq 0x196776(%rip), %rax    # 0x2188d0
cmpq $0x40000, (%rax)        # imm = 0x40000
je 0x8218a
cmpl $0x0, (%rbx)
je 0x8217b
leaq 0x198f79(%rip), %rax    # 0x21b0e8
cmpl $0x7, (%rax)
jne 0x8217b
callq 0x810b1
jmp 0x82180
callq 0x819f4
callq 0x81ad5
cmpl $0x0, (%rbx)
je 0x82191
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x81f3d
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_gpgga(int)
void parse_gpgga(int system)
{
int fix;

   if((system & system_mask) == 0) return;

   last_was_gsv = 0;
   if((rcvr_type == BRANDY_RCVR) && (have_gpgga = 0)) {
      new_queue(RESET_ALL_QUEUES, 1504);
   }
   have_gpgga = system;

   if     (TIME_FILTER && have_gpzda) get_msg_field();
   else if(TIME_FILTER && have_gprmc) get_msg_field();
   else                               get_nmea_time();  // was get_msg_field();

   get_nmea_lat();
   get_nmea_lon();

   get_msg_field();  // fix status   zzzzz - verify fix is good
   if(msg_field[0]) fix = atoi(msg_field);
   else             fix = 0;

   if(get_msg_field()) { // sat count
      sat_count = atoi(msg_field);
      have_count = 3;
   }

   if(get_msg_field()) { // hdop
      hdop = (float) atof(msg_field);
      have_dops |= HDOP;
   }

   get_nmea_alt();

   get_msg_field();  // geiod height
   get_msg_field();  // dgps time
   get_msg_field();  // dgps station

   config_sat_count(sat_count);

   check_nmea_date();

   if     (TIME_FILTER && have_gpzda) ;
   else if(TIME_FILTER && have_gprmc) ;
   else if(rcvr_type == BRANDY_RCVR) {
      return;  // Brandywine gets date/time from a different message
   }
   else drive_nmea_screen(system, NMEA_GGA);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0xeeac7(%rip), %rax     # 0x170c70
testl %edi, (%rax)
je 0x822a4
movl $0x0, 0x2efc69(%rip)    # 0x371e24
leaq 0x198f12(%rip), %rax    # 0x21b0d4
movl %edi, (%rax)
leaq 0x198f15(%rip), %rbx    # 0x21b0e0
cmpl $0x0, (%rbx)
jne 0x821e0
leaq 0x198f01(%rip), %rax    # 0x21b0d8
cmpl $0x0, (%rax)
je 0x822ab
callq 0x810b1
callq 0x816d8
callq 0x8175a
callq 0x810b1
callq 0x810b1
testl %eax, %eax
je 0x8221f
leaq 0x2b983c(%rip), %rdi    # 0x33ba40
callq 0x95e0
leaq 0x1bccfc(%rip), %rcx    # 0x23ef0c
movl %eax, (%rcx)
leaq 0x28b0ff(%rip), %rax    # 0x30d318
movl $0x3, (%rax)
callq 0x810b1
testl %eax, %eax
je 0x82251
leaq 0x2b9811(%rip), %rdi    # 0x33ba40
callq 0x9470
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x1a12ad(%rip), %rax    # 0x2234f0
movsd %xmm0, (%rax)
leaq 0x1a1296(%rip), %rax    # 0x2234e4
orb $0x2, (%rax)
callq 0x817dc
callq 0x810b1
callq 0x810b1
callq 0x810b1
leaq 0x1bcca0(%rip), %rax    # 0x23ef0c
movl (%rax), %edi
callq 0x5e390
callq 0x81ad5
cmpl $0x0, (%rbx)
jne 0x822a4
leaq 0x198e54(%rip), %rax    # 0x21b0d8
cmpl $0x0, (%rax)
jne 0x822a4
leaq 0x196640(%rip), %rax    # 0x2188d0
cmpq $0x40000, (%rax)        # imm = 0x40000
je 0x822a4
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x81f3d
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
callq 0x81835
jmp 0x821e5
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: config_jackson()
void config_jackson()
{
   // proprietary Jackson Labs STATUS message seen... config for Jack Labs LTE-Lite 

   if(lte_lite) return;  // we are already congigured

   lte_lite = 1;
   have_info |= ALL_ID_INFO;

if(1 || (rcvr_type != VENUS_RCVR)) {
   rcvr_type = VENUS_RCVR;
   nmea_type = VENUS_NMEA;
   lte_lite = 1;
   config_rcvr_type(0);
   need_msg_init = 2005;
   lte_lite = 1;
}

   plot[DAC].plot_id = "DAC";    // setup plots
   plot[DAC].units = "%";
   plot[DAC].scale_factor = 1.0;
   plot[DAC].ref_scale = 1.0;
   if(user_set_dac_plot == 0) plot[DAC].show_plot = 1;

   plot[OSC].units = " ns";
   plot[OSC].ref_scale = 1.0F;
   ppt_string = " ns";
   ppb_string = " ns";
   if(user_set_osc_float == 0) plot[OSC].float_center = 1;
   if(user_set_osc_plot == 0) plot[OSC].show_plot = 1;

   if(user_set_pps_plot == 0) plot[PPS].show_plot = 1;
   if(user_set_pps_float == 0) plot[PPS].float_center = 1;

// if(user_set_dac_float == 0) plot[DAC].float_center = 1;
   new_queue(RESET_ALL_QUEUES, 135);  // flush old data
   need_redraw = 6386;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x198857(%rip), %rbx    # 0x21afd0
cmpl $0x0, (%rbx)
jne 0x828af
leaq 0x28b1eb(%rip), %rax    # 0x30d974
orb $0xf, (%rax)
leaq 0x19613d(%rip), %rax    # 0x2188d0
movq $0x80, (%rax)
leaq 0x198843(%rip), %rax    # 0x21afe4
movl $0x56, (%rax)
movl $0x1, %r14d
movl %r14d, (%rbx)
xorl %edi, %edi
callq 0x4b2af
leaq 0x198872(%rip), %rax    # 0x21b030
movl $0x7d5, (%rax)          # imm = 0x7D5
movl %r14d, (%rbx)
leaq 0xa4de7(%rip), %rcx     # 0x1275b5
leaq 0xdb55b(%rip), %rax     # 0x15dd30
movq %rcx, 0x1d0(%rax)
leaq 0xa0260(%rip), %rcx     # 0x122a43
movq %rcx, 0x1d8(%rax)
movabsq $0x3ff0000000000000, %rcx # imm = 0x3FF0000000000000
movq %rcx, 0x208(%rax)
movq %rcx, 0x1e0(%rax)
leaq 0x28b658(%rip), %rdx    # 0x30de61
cmpb $0x0, (%rdx)
jne 0x82818
movl $0x1, 0x1e8(%rax)
leaq 0x92e2a(%rip), %rdx     # 0x115649
movq %rdx, 0xf0(%rax)
movq %rcx, 0xf8(%rax)
leaq 0x2bcdec(%rip), %rcx    # 0x33f620
movq %rdx, (%rcx)
leaq 0x2bcdda(%rip), %rcx    # 0x33f618
movq %rdx, (%rcx)
leaq 0x28b615(%rip), %rcx    # 0x30de5d
cmpb $0x0, (%rcx)
jne 0x82857
movl $0x1, 0x104(%rax)
leaq 0x28b602(%rip), %rcx    # 0x30de60
cmpb $0x0, (%rcx)
jne 0x8286d
movl $0x1, 0x100(%rax)
leaq 0x28b5eb(%rip), %rcx    # 0x30de5f
cmpb $0x0, (%rcx)
jne 0x82880
movl $0x1, 0x18(%rax)
leaq 0x28b5d5(%rip), %rcx    # 0x30de5c
cmpb $0x0, (%rcx)
jne 0x82893
movl $0x1, 0x1c(%rax)
movl $0x7, %edi
movl $0x87, %esi
callq 0x1118c
leaq 0x195f9b(%rip), %rax    # 0x218844
movl $0x18f2, (%rax)         # imm = 0x18F2
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: config_venus_timing()
void config_venus_timing()
{
   if((saw_timing_msg == 0) || (have_sawtooth == 0)) {
      if(rcvr_type != VENUS_RCVR) {
         rcvr_type = VENUS_RCVR;
         config_rcvr_type(0);
         need_msg_init = 2004;
      }
      else {
         config_rcvr_plots();
         config_msg_ofs();
      }

      plot[ONE].show_plot = 0;
      plot[TWO].show_plot = 0;
      plot[THREE].show_plot = 0;
      plot[SIX].show_plot = 0;
      if(user_set_dac_plot == 0) plot[DAC].show_plot = 1;
   }
}

// Assembly:
leaq 0x28a99d(%rip), %rax    # 0x30d428
cmpl $0x0, (%rax)
je 0x82a9d
leaq 0x28a92d(%rip), %rax    # 0x30d3c4
cmpl $0x0, (%rax)
je 0x82a9d
retq
pushq %rbp
movq %rsp, %rbp
leaq 0x195e28(%rip), %rax    # 0x2188d0
cmpq $0x80, (%rax)
jne 0x82abd
callq 0x47bae
callq 0x4771f
jmp 0x82ad8
movq $0x80, (%rax)
xorl %edi, %edi
callq 0x4b2af
leaq 0x19855e(%rip), %rax    # 0x21b030
movl $0x7d4, (%rax)          # imm = 0x7D4
leaq 0xdb251(%rip), %rax     # 0x15dd30
xorl %ecx, %ecx
movl %ecx, 0x3b8(%rax)
movl %ecx, 0x4a0(%rax)
movl %ecx, 0x588(%rax)
movl %ecx, 0x840(%rax)
leaq 0x28b361(%rip), %rcx    # 0x30de61
cmpb $0x0, (%rcx)
popq %rbp
jne 0x82a9c
movl $0x1, 0x1e8(%rax)
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_venus_sawtooth()
void parse_venus_sawtooth()
{
int mode;
int survey_len;
float sawtooth;
float sdev1;
float sdev2;

  have_venus_timing |= 0x01;
  config_venus_timing();
  saw_timing_msg |= 0x08;

  if(get_msg_field()) {
     mode = atoi(msg_field);

     if(mode == 0) { // PVT mode
        minor_alarms &= (~MINOR_SURVEY);
        venus_hold_mode = 0;
        rcvr_mode = RCVR_MODE_3D;
     }
     else if(mode == 1) {  // surveying
        minor_alarms |= (MINOR_SURVEY);
        venus_hold_mode = 0;
        rcvr_mode = RCVR_MODE_SURVEY;
     }
     else if(mode == 2) {  // position hold
        minor_alarms &= (~MINOR_SURVEY);
        venus_hold_mode = 1;
        rcvr_mode = RCVR_MODE_HOLD;
     }
  }

  if(get_msg_field()) {
     survey_len = atoi(msg_field);
  }

  if(get_msg_field()) {
     sawtooth = (float) atof(msg_field);
     have_sawtooth = 1;

     if(lte_lite) ;   // we show dac voltage instead of sawtooth
     else {
        dac_voltage = sawtooth;
     }
  }

  if(get_msg_field()) {
     sdev1 = (float) atof(msg_field);
  }

  if(get_msg_field()) {
     sdev2 = (float) atof(msg_field);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x2bb2dc(%rip), %rax    # 0x33ddf8
orb $0x1, (%rax)
callq 0x82a84
leaq 0x28a8fd(%rip), %rax    # 0x30d428
orb $0x8, (%rax)
callq 0x810b1
testl %eax, %eax
je 0x82b9e
leaq 0x2b8f02(%rip), %rdi    # 0x33ba40
callq 0x95e0
cmpl $0x2, %eax
je 0x82b73
cmpl $0x1, %eax
je 0x82b61
testl %eax, %eax
jne 0x82b9e
leaq 0x28a680(%rip), %rax    # 0x30d1d8
movl (%rax), %eax
andl $-0x21, %eax
movb $0x4, %cl
jmp 0x82b6f
leaq 0x28a670(%rip), %rax    # 0x30d1d8
movl (%rax), %eax
orl $0x20, %eax
movb $0xb, %cl
xorl %edx, %edx
jmp 0x82b83
leaq 0x28a65e(%rip), %rax    # 0x30d1d8
movl (%rax), %eax
andl $-0x21, %eax
movb $0x7, %cl
movb $0x1, %dl
leaq 0x28a64e(%rip), %rsi    # 0x30d1d8
movl %eax, (%rsi)
leaq 0x28a540(%rip), %rax    # 0x30d0d3
movb %dl, (%rax)
leaq 0x28a534(%rip), %rax    # 0x30d0d0
movb %cl, (%rax)
callq 0x810b1
callq 0x810b1
testl %eax, %eax
je 0x82be4
leaq 0x2b8e8d(%rip), %rdi    # 0x33ba40
callq 0x9470
leaq 0x28a805(%rip), %rax    # 0x30d3c4
movl $0x1, (%rax)
leaq 0x198404(%rip), %rax    # 0x21afd0
cmpl $0x0, (%rax)
jne 0x82be4
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x289e20(%rip), %rax    # 0x30ca00
movsd %xmm0, (%rax)
callq 0x810b1
popq %rbp
jmp 0x810b1