LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: get_fix_status()
void get_fix_status()
{
int fix_status;
int meas;

   log_packet_id("Packet 0x5E (Additional fix status)");

   fix_status = tsip_byte();
   meas = tsip_byte();
   check_tsip_end(1);
   if(tsip_error) return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0xad3c5(%rip), %rdi     # 0x121cd9
callq 0x58e77
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x7492f
leaq 0x1ca644(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x74945
leaq 0x1ca62e(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
xorl %edi, %edi
popq %rbp
jmp 0x58f50
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: get_eeprom_status()
void get_eeprom_status()
{
u08 flag;
u16 ee_status;

   log_packet_id("Packet 0x5F (EEPROM status)");

   flag = tsip_byte();
   if(flag == 0x11) {
      ee_status = tsip_word();
   }

   check_tsip_end(1);
   if(tsip_error) return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0xad3a5(%rip), %rdi     # 0x121cfd
callq 0x58e77
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x74973
leaq 0x1ca600(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
cmpb $0x11, %al
jne 0x7497c
callq 0x588f0
xorl %edi, %edi
popq %rbp
jmp 0x58f50
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: get_filter_config()
void get_filter_config()
{
   log_packet_id("Packet 0x70 (Filter config)");

   pv_filter = tsip_byte();
   static_filter = tsip_byte();
   alt_filter = tsip_byte();
   kalman_filter = tsip_byte();
   have_filter = (PV_FILTER | STATIC_FILTER | ALT_FILTER | KALMAN_FILTER);
   // Note: the ACUTIME and PALISADE return this value, but is not
   //       documented.  Can we set the filters?  !!!!!
   check_tsip_end(1);
   if(tsip_error) return;

   saw_version |= 0x80;
if(just_read) return;

   saw_kalman_on |= kalman_filter;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0xad13f(%rip), %rdi     # 0x121d58
callq 0x58e77
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x74c34
leaq 0x1ca33f(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
leaq 0x29845d(%rip), %rcx    # 0x30d098
movb %al, (%rcx)
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x74c53
leaq 0x1ca320(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
leaq 0x29843f(%rip), %rcx    # 0x30d099
movb %al, (%rcx)
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x74c72
leaq 0x1ca301(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
leaq 0x298421(%rip), %rcx    # 0x30d09a
movb %al, (%rcx)
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x74c91
leaq 0x1ca2e2(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
leaq 0x298403(%rip), %rbx    # 0x30d09b
movb %al, (%rbx)
leaq 0x2983ef(%rip), %rax    # 0x30d090
movl $0xf, (%rax)
xorl %edi, %edi
callq 0x58f50
leaq 0x1ca2bb(%rip), %rax    # 0x23ef70
cmpl $0x0, (%rax)
jne 0x74cdb
leaq 0x298747(%rip), %rax    # 0x30d408
orb $-0x80, (%rax)
leaq 0x2c234d(%rip), %rax    # 0x337018
cmpb $0x0, (%rax)
jne 0x74cdb
movb (%rbx), %al
leaq 0x29874b(%rip), %rcx    # 0x30d424
orb %al, (%rcx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: get_posn_filter()
void get_posn_filter()
{
int mode;
float f1,f2,f3,f4,f5;
int i1,i2,i3,i4,i5;

   log_packet_id("Packet 0x72 (SV6_FAMILY position filter)");

   mode = tsip_word();
   f1 = tsip_single();
   i1 = tsip_word();
   i2 = tsip_word();
   i3 = tsip_word();
   i4 = tsip_word();
   f2 = tsip_single();
   f3 = tsip_single();
   f4 = tsip_single();
   f5 = tsip_single();
   i5 = tsip_word();
   check_tsip_end(1);
//sprintf(debug_text3, "i: %f %f %f %f %f", f1,f2,f3,f4,f5);
//sprintf(debug_text2, "i: %d %d %d %d %d", i1,i2,i3,i4,i5);
//sprintf(debug_text, "posn:%d  err:%04X", mode, tsip_error);
   if(i5 == 65535) static_filter = 0;
   else            static_filter = 1;
   have_filter |= STATIC_FILTER;

   if(f1 == 1.0) pv_filter = 0;
   else          pv_filter = 1;
   have_filter |= PV_FILTER;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0xad085(%rip), %rdi     # 0x121d74
callq 0x58e77
callq 0x588f0
callq 0x58aae
movss %xmm0, -0xc(%rbp)
callq 0x588f0
callq 0x588f0
callq 0x588f0
callq 0x588f0
callq 0x58aae
callq 0x58aae
callq 0x58aae
callq 0x58aae
callq 0x588f0
movl %eax, %ebx
xorl %edi, %edi
callq 0x58f50
cmpw $-0x1, %bx
leaq 0x298355(%rip), %rax    # 0x30d099
setne (%rax)
leaq 0x298342(%rip), %rax    # 0x30d090
movss -0xc(%rbp), %xmm0
ucomiss 0x9827a(%rip), %xmm0    # 0x10cfd4
setp %cl
setne %dl
orb %cl, %dl
leaq 0x29832f(%rip), %rcx    # 0x30d098
movb %dl, (%rcx)
orb $0x3, (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: get_alt_filter()
void get_alt_filter()
{
float mode;

   log_packet_id("Packet 0x74 (High-8 mode)");

   mode = tsip_single();
   check_tsip_end(1);

   if(tsip_error) return;
   if(mode > 1) alt_filter = 1;
   else         alt_filter = 0;
   have_filter |= ALT_FILTER;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0xad019(%rip), %rdi     # 0x121d9d
callq 0x58e77
callq 0x58aae
movss %xmm0, -0x4(%rbp)
xorl %edi, %edi
callq 0x58f50
leaq 0x1ca1cf(%rip), %rax    # 0x23ef70
cmpl $0x0, (%rax)
jne 0x74dc6
movss -0x4(%rbp), %xmm0
ucomiss 0x98222(%rip), %xmm0    # 0x10cfd4
leaq 0x2982e1(%rip), %rax    # 0x30d09a
seta (%rax)
leaq 0x2982cd(%rip), %rax    # 0x30d090
orb $0x4, (%rax)
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: get_diff_mode()
void get_diff_mode()
{
u08 diff_mode;

   log_packet_id("Packet 0x82 (Differential correction age)");

   diff_mode = tsip_byte();
   check_tsip_end(1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0xacfbc(%rip), %rdi     # 0x121e1e
callq 0x58e77
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x74e7d
leaq 0x1ca0f6(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
xorl %edi, %edi
popq %rbp
jmp 0x58f50
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: get_lla_fix()
void get_lla_fix()
{
double xlat, xlon, xalt;
double clock_bias;
float time_of_fix;

   log_packet_id("Packet 0x84 (LLA fix)");

   xlat = tsip_double();
   xlon = tsip_double();
   xalt = tsip_double();
   clock_bias = tsip_double();
   time_of_fix = tsip_single();
   check_tsip_end(1);
   if(tsip_error) return;

   if(SV6_FAMILY || PALISADE || (have_pri_time == 0)) {
      sv6_time_code(time_of_fix);

      lat = xlat;
      lon = xlon;
      alt = xalt;
      #ifdef PRECISE_STUFF
         precise_check();
      #endif
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
leaq 0xacf9a(%rip), %rdi     # 0x121e5f
callq 0x58e77
callq 0x58b86
movsd %xmm0, -0x20(%rbp)
callq 0x58b86
movsd %xmm0, -0x18(%rbp)
callq 0x58b86
movsd %xmm0, -0x10(%rbp)
callq 0x58b86
callq 0x58aae
movss %xmm0, -0x4(%rbp)
xorl %edi, %edi
callq 0x58f50
leaq 0x1ca06b(%rip), %rax    # 0x23ef70
cmpl $0x0, (%rax)
je 0x74f10
addq $0x20, %rsp
popq %rbp
retq
leaq 0x1a39b9(%rip), %rax    # 0x2188d0
movq (%rax), %rax
cmpq $0x1, %rax
jne 0x74f3b
leaq 0x1a60ad(%rip), %rcx    # 0x21afd4
movl (%rcx), %ecx
addl $-0x33, %ecx
cmpl $0x1d, %ecx
ja 0x74f3b
movl $0x20004009, %edx       # imm = 0x20004009
btl %ecx, %edx
jb 0x74f5f
cmpq $0x1, %rax
sete %al
leaq 0x1a608b(%rip), %rcx    # 0x21afd4
cmpl $0x50, (%rcx)
sete %cl
testb %cl, %al
jne 0x74f5f
leaq 0x1c9f7e(%rip), %rax    # 0x23eed8
cmpl $0x0, (%rax)
jne 0x74f0a
movss -0x4(%rbp), %xmm0
callq 0x73194
leaq 0x298060(%rip), %rax    # 0x30cfd0
movsd -0x20(%rbp), %xmm0
movsd %xmm0, (%rax)
leaq 0x298058(%rip), %rax    # 0x30cfd8
movsd -0x18(%rbp), %xmm0
movsd %xmm0, (%rax)
leaq 0x298050(%rip), %rax    # 0x30cfe0
movsd -0x10(%rbp), %xmm0
movsd %xmm0, (%rax)
addq $0x20, %rsp
popq %rbp
jmp 0xfabd0
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: fix_manuf_params()
void fix_manuf_params()
{
   if(luxor) return;
   if(rcvr_type != TSIP_RCVR) return;
   if(SV6_FAMILY) return;

   send_tsip_start(0x8E);
   send_byte(0x41);
   send_word(0x1234);           //prefix
   send_dword(0x56789ABCL);     // sn
   send_byte(10);               // yr
   send_byte(1);    // mo
   send_byte(2);    //day
   send_byte(3);    // hr
   send_single(0.0F);    // build offset
   send_word(0);    // test code
   send_tsip_end();

   save_segment(0xFF, 27);
}

// Assembly:
leaq 0x1c9f5e(%rip), %rax    # 0x23ef3e
cmpb $0x0, (%rax)
jne 0x7500d
leaq 0x1a38e4(%rip), %rax    # 0x2188d0
cmpq $0x1, (%rax)
jne 0x7500d
leaq 0x1a5fdb(%rip), %rax    # 0x21afd4
movl (%rax), %eax
addl $-0x33, %eax
cmpl $0x1d, %eax
ja 0x7500e
movl $0x20004009, %ecx       # imm = 0x20004009
btl %eax, %ecx
jae 0x7500e
retq
pushq %rbp
movq %rsp, %rbp
movl $0x8e, %edi
callq 0x5e740
movl $0x41, %edi
callq 0x591af
movl $0x1234, %edi           # imm = 0x1234
callq 0x5936c
movl $0x56789abc, %edi       # imm = 0x56789ABC
callq 0x593b5
movl $0xa, %edi
callq 0x591af
movl $0x1, %edi
callq 0x591af
movl $0x2, %edi
callq 0x591af
movl $0x3, %edi
callq 0x591af
xorps %xmm0, %xmm0
callq 0x59440
xorl %edi, %edi
callq 0x5936c
callq 0x5e7c0
movl $0xff, %edi
popq %rbp
jmp 0x6a306
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: show_manuf_params()
void show_manuf_params()
{
   if(rcvr_type != TSIP_RCVR) return;

   have_info |= MANUF_PARAMS;

   if(text_mode && first_key) return;
   if(zoom_screen) return;
   if(luxor) return;
   if(just_read) return;

   show_build_info(0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x1a3677(%rip), %rax    # 0x2188d0
cmpq $0x1, (%rax)
jne 0x752b3
leaq 0x29870e(%rip), %rax    # 0x30d974
orb $0x1, (%rax)
leaq 0x1a3568(%rip), %rax    # 0x2187d8
cmpl $0x0, (%rax)
setne %al
leaq 0x1c9cdb(%rip), %rcx    # 0x23ef58
cmpl $0x0, (%rcx)
setne %cl
testb %cl, %al
jne 0x752b3
leaq 0x29751a(%rip), %rax    # 0x30c7a8
cmpb $0x0, (%rax)
jne 0x752b3
leaq 0x1c9ca4(%rip), %rax    # 0x23ef3e
cmpb $0x0, (%rax)
jne 0x752b3
leaq 0x2c1d72(%rip), %rax    # 0x337018
cmpb $0x0, (%rax)
jne 0x752b3
xorl %edi, %edi
popq %rbp
jmp 0xb9056
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: get_prodn_params()
void get_prodn_params()
{
u16 rsvd2;
u16 rsvd1;

   log_packet_id("Packet 0x8F.42 (Production Params)");

   prodn_options = tsip_byte();
   prodn_extn = tsip_byte();
   case_prefix = tsip_word();
   case_sn = tsip_dword();
   prodn_num = tsip_dword();
   rsvd1 = tsip_word();
   machine_id = tsip_word();
   rsvd2 = tsip_word();
   check_tsip_end(1);
   if(tsip_error) return;

   have_info |= PRODN_PARAMS;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0xacc0d(%rip), %rdi     # 0x121ecd
callq 0x58e77
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x752db
leaq 0x1c9c98(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
leaq 0x2986b2(%rip), %rcx    # 0x30d994
movb %al, (%rcx)
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x752fa
leaq 0x1c9c79(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
leaq 0x298694(%rip), %rcx    # 0x30d995
movb %al, (%rcx)
callq 0x588f0
leaq 0x298687(%rip), %rcx    # 0x30d996
movw %ax, (%rcx)
callq 0x589b0
leaq 0x29867a(%rip), %rcx    # 0x30d998
movl %eax, (%rcx)
callq 0x589b0
leaq 0x298670(%rip), %rcx    # 0x30d99c
movl %eax, (%rcx)
callq 0x588f0
callq 0x588f0
leaq 0x298661(%rip), %rcx    # 0x30d9a0
movw %ax, (%rcx)
callq 0x588f0
xorl %edi, %edi
callq 0x58f50
leaq 0x1c9c1b(%rip), %rax    # 0x23ef70
cmpl $0x0, (%rax)
jne 0x75364
leaq 0x298613(%rip), %rax    # 0x30d974
orb $0x2, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: get_segment_info()
void get_segment_info()
{
u08 seg_info;

   log_packet_id("Packet 0x8F.45 (EEPROM Segment Info)");

   seg_info = tsip_byte();
   check_tsip_end(1);
   if(tsip_error) return;
   have_seg_info = 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0xacb7f(%rip), %rdi     # 0x121ef0
callq 0x58e77
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x7538c
leaq 0x1c9be7(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
xorl %edi, %edi
callq 0x58f50
leaq 0x1c9bd6(%rip), %rax    # 0x23ef70
cmpl $0x0, (%rax)
jne 0x753ac
leaq 0x2985d6(%rip), %rax    # 0x30d97c
movl $0x1, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: get_pps_settings()
void get_pps_settings()
{
u08 pps_rsvd;
float bias_threshold;

   log_packet_id("Packet 0x8F.4A (PPS settings)");

   pps_enabled = tsip_byte();
   have_pps_enable = 1;
   pps_rsvd = tsip_byte();
   pps_polarity = tsip_byte();
   have_pps_polarity = 1;
   cable_delay = tsip_double();
   bias_threshold = tsip_single();
   check_tsip_end(1);

// if(have_cable_delay == 0) need_redraw = 2005;
   have_cable_delay = 1;
   if(tsip_error) return;

   if(text_mode && first_key) return;
   if(zoom_screen) return;
   if(luxor) return;
if(just_read) return;

   saw_version |= 0x40;
   show_cable_delay();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0xacb5a(%rip), %rdi     # 0x121f15
callq 0x58e77
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x753d6
leaq 0x1c9b9d(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
leaq 0x298943(%rip), %rcx    # 0x30dd20
movb %al, (%rcx)
leaq 0x297ef6(%rip), %rax    # 0x30d2dc
movl $0x1, (%rax)
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x75402
leaq 0x1c9b71(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x75418
leaq 0x1c9b5b(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
movzbl %al, %eax
leaq 0x2988f6(%rip), %rcx    # 0x30dd18
movl %eax, (%rcx)
leaq 0x297eb5(%rip), %rax    # 0x30d2e0
movl $0x1, %ebx
movl %ebx, (%rax)
callq 0x58b86
leaq 0x29898a(%rip), %rax    # 0x30ddc8
movsd %xmm0, (%rax)
callq 0x58aae
xorl %edi, %edi
callq 0x58f50
leaq 0x297e5f(%rip), %rax    # 0x30d2b4
movl %ebx, (%rax)
leaq 0x1c9b12(%rip), %rax    # 0x23ef70
cmpl $0x0, (%rax)
je 0x7546a
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x1a3367(%rip), %rax    # 0x2187d8
cmpl $0x0, (%rax)
sete %al
leaq 0x1c9ada(%rip), %rcx    # 0x23ef58
cmpl $0x0, (%rcx)
sete %cl
orb %al, %cl
cmpb $0x1, %cl
jne 0x75463
leaq 0x297316(%rip), %rax    # 0x30c7a8
cmpb $0x0, (%rax)
jne 0x75463
leaq 0x1c9aa0(%rip), %rax    # 0x23ef3e
cmpb $0x0, (%rax)
jne 0x75463
leaq 0x2c1b6e(%rip), %rax    # 0x337018
cmpb $0x0, (%rax)
jne 0x75463
leaq 0x297f52(%rip), %rax    # 0x30d408
orb $0x40, (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x754c4
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: show_cable_delay()
void show_cable_delay()
{
double val;
char *s;

   if(zoom_screen) return;
   if(text_mode && first_key) return;
   if(!have_cable_delay) return;

   if(0 && (rcvr_type == RFTG_RCVR)) {
      s = "ft";
      val = cable_delay;
   }
   else {
      s = "ns";
      val = cable_delay*1.0E9;
   }

   if     (val >= 100000000.0) sprintf(out, "Dly:%11.0f %s", val, s);
   else if(val >= 10000000.0)  sprintf(out, "Dly:%11.1f %s", val, s);
   else if(val >= 1000000.0)   sprintf(out, "Dly:%11.2f %s", val, s);
   else if(val >= 100000.0)    sprintf(out, "Dly:%11.3f %s", val, s);
   else if(val >= 10000.0)     sprintf(out, "Dly:%11.4f %s", val, s);
   else if(val >= 1000.0)      sprintf(out, "Dly:%11.5f %s", val, s);
   else                        sprintf(out, "Dly:%11.6f %s", val, s);
   vidstr(VAL_ROW+5, VAL_COL, WHITE, out);
}

// Assembly:
leaq 0x2972dd(%rip), %rax    # 0x30c7a8
cmpb $0x0, (%rax)
je 0x754d1
retq
leaq 0x1a3300(%rip), %rax    # 0x2187d8
cmpl $0x0, (%rax)
setne %al
leaq 0x1c9a73(%rip), %rcx    # 0x23ef58
cmpl $0x0, (%rcx)
setne %cl
testb %cl, %al
jne 0x754d0
leaq 0x297dbe(%rip), %rax    # 0x30d2b4
cmpl $0x0, (%rax)
je 0x754d0
leaq 0x2988c6(%rip), %rax    # 0x30ddc8
movsd (%rax), %xmm0
mulsd 0x93b1a(%rip), %xmm0    # 0x109028
ucomisd 0xa8c0a(%rip), %xmm0    # 0x11e120
jae 0x7555c
ucomisd 0x963a8(%rip), %xmm0    # 0x10b8c8
jae 0x75565
ucomisd 0x93b26(%rip), %xmm0    # 0x109050
jae 0x7556e
ucomisd 0x93b94(%rip), %xmm0    # 0x1090c8
jae 0x75577
ucomisd 0x93b9a(%rip), %xmm0    # 0x1090d8
jae 0x75580
ucomisd 0x93af0(%rip), %xmm0    # 0x109038
leaq 0xb0ef4(%rip), %rax     # 0x126443
leaq 0xb0edf(%rip), %rsi     # 0x126435
cmovbq %rax, %rsi
jmp 0x75587
leaq 0xb0e8c(%rip), %rsi     # 0x1263ef
jmp 0x75587
leaq 0xb0e91(%rip), %rsi     # 0x1263fd
jmp 0x75587
leaq 0xb0e96(%rip), %rsi     # 0x12640b
jmp 0x75587
leaq 0xb0e9b(%rip), %rsi     # 0x126419
jmp 0x75587
leaq 0xb0ea0(%rip), %rsi     # 0x126427
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x2c6c8c(%rip), %rbx    # 0x33c220
leaq 0xa001b(%rip), %rdx     # 0x1155b6
movq %rbx, %rdi
movb $0x1, %al
callq 0x9060
movl $0x5, %edi
movl $0xf, %esi
movl $0xf, %edx
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xe7d0
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: get_pps_mode()
void get_pps_mode()
{
   log_packet_id("Packet 0x8F.4E (pps rate)");

   pps_rate = tsip_byte();
   have_pps_rate = 2;
   check_tsip_end(1);
   if(tsip_error) return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0xac966(%rip), %rdi     # 0x121f33
callq 0x58e77
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x755e8
leaq 0x1c998b(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
leaq 0x298734(%rip), %rcx    # 0x30dd23
movb %al, (%rcx)
leaq 0x297cd8(%rip), %rax    # 0x30d2d0
movl $0x2, (%rax)
xorl %edi, %edi
popq %rbp
jmp 0x58f50
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: get_dac_values()
void get_dac_values()
{
u32 dac_value;
float dac_voltage;
u08 dac_res;
u08 dac_format;
float dac_min, dac_max;

   log_packet_id("Packet 0x8F.A0 (DAC values)");

   dac_value = tsip_dword();
   dac_voltage = tsip_single();
   dac_res = tsip_byte();
   dac_format = tsip_byte();
   dac_min = tsip_single();
   dac_max = tsip_single();
   check_tsip_end(1);
   if(tsip_error) return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0xac93c(%rip), %rdi     # 0x121f4d
callq 0x58e77
callq 0x589b0
callq 0x58aae
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x75636
leaq 0x1c993d(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x7564c
leaq 0x1c9927(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x58aae
callq 0x58aae
xorl %edi, %edi
popq %rbp
jmp 0x58f50
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: get_osc_sense()
void get_osc_sense()
{
   log_packet_id("Packet 0x8F.A1 (10 MHz sense)");
// not avilable on ThunderBolt-E or early ThunderBolts

   osc_polarity = tsip_byte();
   have_osc_polarity = 1;
   check_tsip_end(1);
   if(tsip_error) return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0xac900(%rip), %rdi     # 0x121f69
callq 0x58e77
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x75684
leaq 0x1c98ef(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
leaq 0x298687(%rip), %rcx    # 0x30dd12
movb %al, (%rcx)
leaq 0x297c54(%rip), %rax    # 0x30d2e8
movl $0x1, (%rax)
xorl %edi, %edi
popq %rbp
jmp 0x58f50
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: get_timing_mode()
void get_timing_mode()
{
   log_packet_id("Packet 0x8F.A2 (Timing mode)");
   if(STARLOC) { // receiver randomly changes reported timing mode
      return;
   }

   timing_mode = tsip_byte();
timing_mode &= (TMODE_UTC);
if(timing_mode != TMODE_GPS) timing_mode = TMODE_UTC;
   have_rcvr_tmode = 1;
   have_timing_mode = 1;
   check_tsip_end(1);
   if(tsip_error) return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0xac8da(%rip), %rdi     # 0x121f87
callq 0x58e77
leaq 0x1a3217(%rip), %rax    # 0x2188d0
cmpq $0x1, (%rax)
jne 0x756cd
leaq 0x1a590e(%rip), %rax    # 0x21afd4
cmpl $0x53, (%rax)
jne 0x756cd
popq %rbp
retq
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x756e3
leaq 0x1c9890(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
xorl %ecx, %ecx
testb $0x3, %al
setne %cl
leal (%rcx,%rcx,2), %eax
leaq 0x297dc9(%rip), %rcx    # 0x30d4bd
movb %al, (%rcx)
leaq 0x297cd3(%rip), %rax    # 0x30d3d0
movl $0x1, %ecx
movl %ecx, (%rax)
leaq 0x297cc1(%rip), %rax    # 0x30d3cc
movl %ecx, (%rax)
xorl %edi, %edi
popq %rbp
jmp 0x58f50
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: get_survey_params()
void get_survey_params()
{
u08 survey_flag;
u32 rsvd;

   log_packet_id("Packet 0x8F.A9 (Survey params)");

   survey_flag = tsip_byte();
   survey_save = tsip_byte();
   survey_length = tsip_dword();
   rsvd = tsip_dword();
   check_tsip_end(1);
   if(tsip_error) return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0xac153(%rip), %rdi     # 0x122009
callq 0x58e77
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x75ed1
leaq 0x1c90a2(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x75ee7
leaq 0x1c908c(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
leaq 0x297f86(%rip), %rcx    # 0x30de74
movb %al, (%rcx)
callq 0x589b0
leaq 0x297f74(%rip), %rcx    # 0x30de70
movl %eax, (%rcx)
callq 0x589b0
xorl %edi, %edi
popq %rbp
jmp 0x58f50
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: check_for_leapsecond()
void check_for_leapsecond()
{
   // see if the receiver time code could be a leapsecond

   leap_time = 0;   // see if the time could be a leap second, if so do a screen grab and a log entry
   leap_sixty = 0;
   if(time_flags & TFLAGS_NO_UTC_OFS) return;  // time is not valid
   if(time_flags & TFLAGS_INVALID) return;
   if(rcvr_type == THERMO_RCVR) return;
   if(rcvr_type == TICC_RCVR) return;
   if((rcvr_type == TSIP_RCVR) && (tsip_type == STARLOC_TYPE)) return;  // STARLOC has too many bogus time stamps

if(0 && (pri_minutes == 00) && (pri_seconds == 0)) {  // simulate leap second time code
   pri_seconds = 60;
   pri_minutes = 59;
   if(--pri_hours < 0) pri_hours = 23;
}

   if((pri_minutes == 59) && (pri_seconds == 60)) {  // xx:59:60 leapsecond
      leap_sixty = 1;  // used to restore xx:59:60 leapsecond value from jd value
   }

   if((nav_rate != 1.0) && (raw_frac != 0.0)) ;
   else if((pri_minutes == 59) && (pri_seconds == 60)) {
      leap_time = 1;  // xx:59:60
   }
   else if((pri_minutes == 0) && (pri_seconds == 0) && (last_second == 0)) {
      leap_time = 2;  // repeated xx:00:00 second
   }
   else if((pri_minutes == 59) && (pri_seconds == 59) && (last_second == 59)) {
      leap_time = 3;  // repeated xx:59:59 second
   }

   if(leap_file && leap_time) {
      leaped = leap_time;
   }

   last_second = pri_seconds;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x29753a(%rip), %rax    # 0x30d450
movb $0x0, (%rax)
leaq 0x297308(%rip), %rsi    # 0x30d228
movl $0x0, (%rsi)
leaq 0x297577(%rip), %rcx    # 0x30d4a4
movl (%rcx), %ecx
testb $0x8, %cl
jne 0x76038
testb $0x4, %cl
jne 0x76038
leaq 0x1a2988(%rip), %rcx    # 0x2188d0
movq (%rcx), %rcx
cmpq $0x10000, %rcx          # imm = 0x10000
je 0x76038
cmpq $0x80000, %rcx          # imm = 0x80000
je 0x76038
cmpq $0x1, %rcx
jne 0x75f7b
leaq 0x1a5062(%rip), %rcx    # 0x21afd4
cmpl $0x53, (%rcx)
je 0x76038
leaq 0x297582(%rip), %rcx    # 0x30d504
movl (%rcx), %edi
movl %edi, %edx
xorl $0x3b, %edx
leaq 0x297570(%rip), %rcx    # 0x30d500
movl (%rcx), %ecx
movl %ecx, %r8d
xorl $0x3c, %r8d
orl %edx, %r8d
sete %r8b
jne 0x75fa8
movl $0x1, (%rsi)
leaq 0x1a53a9(%rip), %rsi    # 0x21b358
movsd (%rsi), %xmm0
ucomisd 0x930b5(%rip), %xmm0    # 0x109070
jne 0x75fbf
jnp 0x75fd6
leaq 0x29751a(%rip), %rsi    # 0x30d4e0
movsd (%rsi), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x76008
jp 0x76008
movb $0x1, %sil
testb %r8b, %r8b
jne 0x76005
orl %ecx, %edi
leaq 0x297721(%rip), %rsi    # 0x30d708
movl (%rsi), %r8d
movb $0x2, %sil
orl %r8d, %edi
je 0x76005
movl %ecx, %esi
xorl $0x3b, %esi
orl %esi, %edx
xorl $0x3b, %r8d
movb $0x3, %sil
orl %edx, %r8d
jne 0x76008
movb %sil, (%rax)
leaq 0x2982b5(%rip), %rdx    # 0x30e2c4
cmpb $0x0, (%rdx)
setne %dl
movb (%rax), %al
testb %al, %al
setne %sil
andb %dl, %sil
cmpb $0x1, %sil
jne 0x7602f
leaq 0x2971bc(%rip), %rdx    # 0x30d1e9
movb %al, (%rdx)
leaq 0x2976d2(%rip), %rax    # 0x30d708
movl %ecx, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: get_comp_time()
void get_comp_time()
{
int i;
char sat_id[8];

   log_packet_id("Packet 0x8F.0B (Comprehensive timing)");

   tsip_word();   // event count
   tsip_dword();  // time of week
   tsip_byte();   // day
   tsip_byte();   // month
   tsip_word();   // year
   tsip_byte();   // receiver mode
   tsip_word();   // utc offset
   tsip_double(); // osc bias  (meters)
   tsip_double(); // osc drift (meters/sec)
   tsip_single(); // osc bias uncertainty (meters)
   tsip_single(); // osc drift uncertainty (meters/sec)
   tsip_double(); // lat
   tsip_double(); // lon
   tsip_double(); // alt

   for(i=0; i<8; i++) { // id of tracking/usable sats
      sat_id[i] = tsip_byte();
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0xabfe0(%rip), %rdi     # 0x122028
callq 0x58e77
callq 0x588f0
callq 0x589b0
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x7606d
leaq 0x1c8f06(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x76083
leaq 0x1c8ef0(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x588f0
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x7609e
leaq 0x1c8ed5(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x588f0
callq 0x58b86
callq 0x58b86
callq 0x58aae
callq 0x58aae
callq 0x58b86
callq 0x58b86
callq 0x58b86
movl $0x8, %ebx
leaq 0x1c8e9e(%rip), %r14    # 0x23ef70
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x760e2
orb $0x8, (%r14)
decl %ebx
jne 0x760d2
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: do_pps_adev(double)
void do_pps_adev(double val)
{
   // perform adev calc on a receiver PPS value

   if(pps_adevs_cleared) ; // skip the first point after clearing adevs
   else if(pps_adev_period > 0.0) {  // using receiver data
     if(++pps_adev_time >= pps_adev_period) {   // add this data point to adev data queues  aaaahhhh assumes 1Hz
        add_pps_adev_point(val, 0);
        pps_adev_time = 0.0;
     }
   }
   pps_adevs_cleared = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x1c4b85(%rip), %rbx    # 0x23cc68
cmpl $0x0, (%rbx)
jne 0x7812a
leaq 0x1c4c11(%rip), %rax    # 0x23cd00
movsd (%rax), %xmm1
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm1
jbe 0x7812a
leaq 0x1c4a44(%rip), %r14    # 0x23cb48
movsd (%r14), %xmm2
addsd 0x90f5f(%rip), %xmm2    # 0x109070
movsd %xmm2, (%r14)
ucomisd %xmm1, %xmm2
jb 0x7812a
xorl %edi, %edi
callq 0xffd2b
movq $0x0, (%r14)
movl $0x0, (%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: do_osc_adev(double)
void do_osc_adev(double val)
{
   // perform adev calc on a receiver OSC value

   if(osc_adevs_cleared) ; // skip the first point after clearing adevs
   else if(osc_adev_period > 0.0) {  // using receiver data
     if(++osc_adev_time >= osc_adev_period) {   // add this data point to adev data queues  aaaahhhh assumes 1Hz
        add_osc_adev_point(val, 0);
        osc_adev_time = 0.0;
     }
   }
   osc_adevs_cleared = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x1c4b29(%rip), %rbx    # 0x23cc6c
cmpl $0x0, (%rbx)
jne 0x7818a
leaq 0x1c4bb9(%rip), %rax    # 0x23cd08
movsd (%rax), %xmm1
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm1
jbe 0x7818a
leaq 0x1c4a34(%rip), %r14    # 0x23cb98
movsd (%r14), %xmm2
addsd 0x90eff(%rip), %xmm2    # 0x109070
movsd %xmm2, (%r14)
ucomisd %xmm1, %xmm2
jb 0x7818a
xorl %edi, %edi
callq 0x1002ad
movq $0x0, (%r14)
movl $0x0, (%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: poll_raw_data()
void poll_raw_data()
{
int i;
static int vis_seq = 0;

   // ask for raw observation data

   if(rcvr_type != TSIP_RCVR) return;
   if(raw_msg_rate == 0) return;

   build_vis_table();   // get list of visible sats
   if(vis_sat_count) {  // poll for a different visible sat ephemeris once a second
      request_system_data(6, vis_table[vis_seq+1]);
      request_eph_status(vis_table[vis_seq+1]);
      if(++vis_seq > 32) vis_seq = 0;
      if(vis_seq > vis_sat_count) vis_seq = 0;
   }

   if((0 && ACU_360)) {  // poll for sats raw data individually  rnx
      for(i=1; i<=vis_sat_count; i++) {  
         if(vis_table[i]) {
            request_last_raw(vis_table[i]);
         }
      }
   }
   else {  // get all sats raw data
      request_last_raw(0x00);
   }
}

// Assembly:
leaq 0x1a04ad(%rip), %rax    # 0x2188d0
cmpq $0x1, (%rax)
jne 0x784a2
leaq 0x1a2f48(%rip), %rax    # 0x21b378
cmpl $0x0, (%rax)
je 0x784a2
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
callq 0x783ab
cmpl $0x0, 0x2f8971(%rip)    # 0x370db8
je 0x78495
movslq 0x2f896c(%rip), %rax    # 0x370dbc
leaq 0x2f88d9(%rip), %rbx    # 0x370d30
movl 0x4(%rbx,%rax,4), %esi
movl $0x6, %edi
callq 0x68699
movslq 0x2f8950(%rip), %rax    # 0x370dbc
movl 0x4(%rbx,%rax,4), %edi
callq 0x69773
movl 0x2f8941(%rip), %eax    # 0x370dbc
leal 0x1(%rax), %ecx
xorl %edx, %edx
cmpl $0x20, %eax
cmovgel %edx, %ecx
cmpl 0x2f892c(%rip), %ecx    # 0x370db8
cmovgl %edx, %ecx
movl %ecx, 0x2f8927(%rip)    # 0x370dbc
xorl %edi, %edi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x697ca
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: show_scaled_lla()
void show_scaled_lla()
{
   // start scaled lla mode (if enabled) once valid lat/lon info received
   if(NO_SATS) return;

   if(1 && (lat && lon) && (have_valid_lla == 0)) {  // we now have valid lat/lon
      new_queue(RESET_ALL_QUEUES, 6466); // clear the queues so autoscale_lla does not crash
      have_valid_lla = 1;
      min_q_lat = max_q_lat = lat*RAD_TO_DEG;
      min_q_lon = max_q_lon = lon*RAD_TO_DEG;
      if(autoscale_lla) {
         change_lla_scale();
         rebuild_lla_plot(0);
         need_redraw = 4344;
      }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0x1a041c(%rip), %rax    # 0x2188d0
movq (%rax), %rax
movabsq $0x105b8b0400, %rcx     # imm = 0x105B8B0400
testq %rcx, %rax
jne 0x785c3
leaq 0x1a2aff(%rip), %rcx    # 0x21afd0
cmpl $0x0, (%rcx)
je 0x784e6
leaq 0x294ee7(%rip), %rcx    # 0x30d3c4
cmpl $0x0, (%rcx)
je 0x785c3
cmpq $0x400000, %rax         # imm = 0x400000
setne %al
leaq 0x2954be(%rip), %rcx    # 0x30d9b4
cmpl $0x0, (%rcx)
setne %cl
orb %al, %cl
cmpb $0x1, %cl
jne 0x785c3
leaq 0x294ac2(%rip), %rbx    # 0x30cfd0
movsd (%rbx), %xmm1
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
jne 0x78522
jnp 0x785c3
leaq 0x294aaf(%rip), %r14    # 0x30cfd8
movsd (%r14), %xmm1
ucomisd %xmm0, %xmm1
jne 0x7853a
jnp 0x785c3
leaq 0x294d83(%rip), %r15    # 0x30d2c4
cmpl $0x0, (%r15)
jne 0x785c3
movl $0x7, %edi
movl $0x1942, %esi           # imm = 0x1942
callq 0x1120f
movl $0x1, (%r15)
movsd 0x90bf3(%rip), %xmm0    # 0x109158
movsd (%rbx), %xmm1
mulsd %xmm0, %xmm1
leaq 0x294a94(%rip), %rax    # 0x30d008
movsd %xmm1, (%rax)
leaq 0x294a81(%rip), %rax    # 0x30d000
mulsd (%r14), %xmm0
movsd %xmm1, (%rax)
leaq 0x294a89(%rip), %rax    # 0x30d018
movsd %xmm0, (%rax)
leaq 0x294a76(%rip), %rax    # 0x30d010
movsd %xmm0, (%rax)
leaq 0x2c2d0f(%rip), %rax    # 0x33b2b4
cmpl $0x0, (%rax)
je 0x785c3
callq 0xfbb19
xorl %edi, %edi
callq 0xfbd5d
leaq 0x1a0287(%rip), %rax    # 0x218844
movl $0x10f8, (%rax)         # imm = 0x10F8
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: show_param_values(int)
void show_param_values(int all)
{
   // this routine shows various receiver data, status, and configuration values

   if(text_mode && first_key) return;
   if(zoom_screen == 'I') {
      show_lla(543);
   }
   if(zoom_screen) return;
   if(luxor) return;

   last_pp = (-1);
   show_cable_delay();      // show cable delay value
   show_version_info();     // show receiver version info

   erase_info_col();
   show_critical_alarms();  // show critical alarms
   if((info_row != last_pp) && did_crit && (SCREEN_HEIGHT > SHORT_SCREEN)) {  //pretty printing
      ++info_row;
      --info_avail;
      last_pp = info_row;
   }

   if((all_adevs == SINGLE_ADEVS) || ((TEXT_HEIGHT <= 12) && (SCREEN_WIDTH >= WIDE_WIDTH))) {
      show_operation_info(1);
      show_minor_alarms();
      show_state_info();
   }
   else if(all_adevs) {
      if(SCREEN_WIDTH >= WIDE_WIDTH) {
         show_minor_alarms();
         show_state_info();
      }
      if(all_adev_row >= (ALL_ROW+5)) show_operation_info(2);
   }


   show_rcvr_type();        // current receiver data values
   show_dac_info();
   show_temp_info();
   show_pps_info();
   show_osc_info();
   show_chc_info();         // plot[SEVEN]
   show_chd_info();         // plot[EIGHT]

   if(all) { 
      show_time_info();
//    show_survey_info();
      refresh_page();
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edi, %ebx
leaq 0x1a01fa(%rip), %rax    # 0x2187d8
cmpl $0x0, (%rax)
je 0x785f3
leaq 0x1c696e(%rip), %rax    # 0x23ef58
cmpl $0x0, (%rax)
jne 0x786e4
leaq 0x2941ae(%rip), %r14    # 0x30c7a8
cmpb $0x49, (%r14)
jne 0x78605
callq 0xb3e3b
leaq 0x1c6932(%rip), %rax    # 0x23ef3e
movb (%rax), %al
orb (%r14), %al
jne 0x786e4
movl $0xffffffff, 0x2f3783(%rip) # imm = 0xFFFFFFFF
callq 0x754c4
callq 0xb937f
callq 0xc06f9
callq 0xb40d2
movl 0x2f3761(%rip), %eax    # 0x36bd9c
cmpl 0x2f3763(%rip), %eax    # 0x36bda4
je 0x7866f
cmpl $0x0, 0x2f375e(%rip)    # 0x36bda8
je 0x7866f
leaq 0x1a01b1(%rip), %rcx    # 0x218804
cmpl $0x259, (%rcx)          # imm = 0x259
jl 0x7866f
incl %eax
movl %eax, 0x2f3739(%rip)    # 0x36bd9c
decl 0x2f3737(%rip)          # 0x36bda0
movl %eax, 0x2f3735(%rip)    # 0x36bda4
leaq 0x1c46c8(%rip), %rax    # 0x23cd3e
cmpb $0x0, (%rax)
je 0x786a0
leaq 0x1a0192(%rip), %rax    # 0x218814
cmpl $0xd, (%rax)
setl %cl
leaq 0x1a0171(%rip), %rax    # 0x218800
movl (%rax), %eax
cmpl $0x4fa, %eax            # imm = 0x4FA
setge %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x786e9
callq 0xbb02c
callq 0xb4a19
callq 0xb7044
callq 0xbca43
callq 0xbd719
callq 0xbda29
callq 0xbe38b
callq 0xbf4fc
callq 0xc0357
callq 0xc0528
testl %ebx, %ebx
je 0x786e4
callq 0x5c009
popq %rbx
popq %r14
popq %rbp
jmp 0xab5f
popq %rbx
popq %r14
popq %rbp
retq
cmpl $0x4fa, %eax            # imm = 0x4FA
jl 0x786fa
callq 0xb4a19
callq 0xb7044
leaq 0x1a00b3(%rip), %rax    # 0x2187b4
cmpl $0xc, (%rax)
jl 0x786af
callq 0xbb02c
jmp 0x786af
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: update_plot_data()
void update_plot_data()
{
   // add the latest data to the plot queue and update the screen
   if(have_time && (pause_data == 0)) {
      if(continuous_scroll) update_plot(REFRESH_SCREEN);
      else if((all_adevs == SINGLE_ADEVS) || mixed_adevs) update_plot(REFRESH_SCREEN);
      else if(all_adevs) update_plot(REFRESH_SCREEN);
      else update_plot(NO_REFRESH);

      if(first_sample) {
         if(rcvr_type == SCPI_RCVR) ;
         else if(rcvr_type == UCCM_RCVR) ;
         else {
            if(discipline_mode == DIS_MODE_DISABLED) osc_discipline = 0;
            else                                     osc_discipline = 1;

            if(discipline_mode == DIS_MODE_MANUAL_HOLD) user_holdover = 1;
            else                                        user_holdover = 0;
         }

         if((all_adevs == SINGLE_ADEVS) || mixed_adevs) {
            draw_plot(REFRESH_SCREEN);
         }

         first_sample = 0;
      }
   }
   else {
      refresh_page();
   }
}

// Assembly:
leaq 0x1c67c8(%rip), %rax    # 0x23eedc
cmpb $0x0, (%rax)
je 0xab5f
leaq 0x1a2b10(%rip), %rax    # 0x21b234
cmpb $0x0, (%rax)
jne 0xab5f
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl $0x1, %edi
callq 0x198d4
leaq 0x1c6790(%rip), %rbx    # 0x23eed4
cmpb $0x0, (%rbx)
je 0x787a5
leaq 0x1a0180(%rip), %rax    # 0x2188d0
movq (%rax), %rax
cmpq $0x8, %rax
je 0x78780
cmpq $0x10, %rax
je 0x78780
leaq 0x294d31(%rip), %rax    # 0x30d497
movb (%rax), %al
cmpb $0x6, %al
leaq 0x294d23(%rip), %rcx    # 0x30d494
setne (%rcx)
cmpb $0x3, %al
leaq 0x294cd7(%rip), %rax    # 0x30d454
sete (%rax)
leaq 0x1c45b7(%rip), %rax    # 0x23cd3e
cmpb $0x0, (%rax)
je 0x78798
leaq 0x1c45aa(%rip), %rax    # 0x23cd3d
cmpb $0x0, (%rax)
je 0x787a2
movl $0x1, %edi
callq 0x19792
movb $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: calc_cie(double, double, double)
void calc_cie(DATA_SIZE red_uw, DATA_SIZE green_uw,  DATA_SIZE blue_uw)
{
   if(tcs_color) {  // TCS3414
      cie_x = ((DATA_SIZE) -0.14282*red_uw) + ((DATA_SIZE) 1.54924*green_uw) + ((DATA_SIZE) -0.95641*blue_uw); // TCS3414
      cie_y = ((DATA_SIZE) -0.32466*red_uw) + ((DATA_SIZE) 1.57837*green_uw) + ((DATA_SIZE) -0.73191*blue_uw);
      cie_z = ((DATA_SIZE) -0.68202*red_uw) + ((DATA_SIZE) 0.77073*green_uw) + ((DATA_SIZE) +0.56332*blue_uw);
   }
   else {           // TCS3210
      cie_x = ((DATA_SIZE) 0.4287*red_uw) + ((DATA_SIZE) 0.4489*green_uw)  + ((DATA_SIZE) 0.0493*blue_uw);
      cie_y = ((DATA_SIZE) 0.1450*red_uw) + ((DATA_SIZE) 0.9623*green_uw)  + ((DATA_SIZE) -0.1167*blue_uw);
      cie_z = ((DATA_SIZE) 0.0539*red_uw) + ((DATA_SIZE) -0.4059*green_uw) + ((DATA_SIZE) 1.4191*blue_uw);
   }
   cie_sum = cie_x + cie_y + cie_z;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x2923c5(%rip), %rax    # 0x30cf69
cmpb $0x0, (%rax)
je 0x7ac36
movsd 0xa3663(%rip), %xmm3    # 0x11e218
mulsd %xmm1, %xmm3
movsd 0xa365f(%rip), %xmm4    # 0x11e220
mulsd %xmm0, %xmm4
addsd %xmm3, %xmm4
movsd 0xa3657(%rip), %xmm3    # 0x11e228
mulsd %xmm2, %xmm3
addsd %xmm4, %xmm3
movsd %xmm3, 0x2f61df(%rip)   # 0x370dc0
movsd 0xa3647(%rip), %xmm3    # 0x11e230
mulsd %xmm1, %xmm3
movsd 0xa3643(%rip), %xmm4    # 0x11e238
mulsd %xmm0, %xmm4
addsd %xmm3, %xmm4
movsd 0xa363b(%rip), %xmm3    # 0x11e240
mulsd %xmm2, %xmm3
addsd %xmm4, %xmm3
movsd %xmm3, 0x2f61b3(%rip)   # 0x370dc8
mulsd 0xa362b(%rip), %xmm1    # 0x11e248
mulsd 0xa362b(%rip), %xmm0    # 0x11e250
addsd %xmm1, %xmm0
mulsd 0xa3627(%rip), %xmm2    # 0x11e258
jmp 0x7acba
movsd 0xa3622(%rip), %xmm3    # 0x11e260
mulsd %xmm1, %xmm3
movsd 0xa361e(%rip), %xmm4    # 0x11e268
mulsd %xmm0, %xmm4
addsd %xmm3, %xmm4
movsd 0xa3616(%rip), %xmm3    # 0x11e270
mulsd %xmm2, %xmm3
addsd %xmm4, %xmm3
movsd %xmm3, 0x2f6156(%rip)   # 0x370dc0
movsd 0xa3606(%rip), %xmm3    # 0x11e278
mulsd %xmm1, %xmm3
movsd 0xa3602(%rip), %xmm4    # 0x11e280
mulsd %xmm0, %xmm4
addsd %xmm3, %xmm4
movsd 0xa35fa(%rip), %xmm3    # 0x11e288
mulsd %xmm2, %xmm3
addsd %xmm4, %xmm3
movsd %xmm3, 0x2f612a(%rip)   # 0x370dc8
mulsd 0xa35ea(%rip), %xmm1    # 0x11e290
mulsd 0xa35ea(%rip), %xmm0    # 0x11e298
addsd %xmm1, %xmm0
mulsd 0xa35e6(%rip), %xmm2    # 0x11e2a0
addsd %xmm0, %xmm2
movsd %xmm2, 0x2f610a(%rip)   # 0x370dd0
movsd 0x2f60f2(%rip), %xmm0   # 0x370dc0
addsd 0x2f60f2(%rip), %xmm0   # 0x370dc8
addsd %xmm2, %xmm0
movsd %xmm0, 0x2f60f6(%rip)   # 0x370dd8
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: plank(double, double)
double plank(double t, double y)
{
double f;

// This routine used Plank's equation to calculate the energy at wavelength
// y (in namometers) of a black body at temperature t (in degrees K)

   y *= 1.0E-9;     // convert wavelenth to meters
   f = (2.0*PI*HH*CC*CC) /
       ((y*y*y*y*y) * (exp((HH*CC) / (KK*y*t)) - 1.0));
   f /= 1.0E6;      // normalize to standard units
//printf("T=%f  y=%g  f=%g\n", t,y,f);
   return f;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
mulsd 0xa321d(%rip), %xmm1    # 0x11e1f0
movapd %xmm1, %xmm2
mulsd %xmm1, %xmm2
mulsd %xmm1, %xmm2
mulsd %xmm1, %xmm2
mulsd %xmm1, %xmm2
movsd %xmm2, -0x8(%rbp)
mulsd 0xa332c(%rip), %xmm1    # 0x11e320
mulsd %xmm0, %xmm1
movsd 0xa3328(%rip), %xmm0    # 0x11e328
divsd %xmm1, %xmm0
callq 0x96f0
addsd 0x8e0e7(%rip), %xmm0    # 0x1090f8
mulsd -0x8(%rbp), %xmm0
movsd 0xa3312(%rip), %xmm1    # 0x11e330
divsd %xmm0, %xmm1
divsd 0x8e026(%rip), %xmm1    # 0x109050
movapd %xmm1, %xmm0
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: measure_ir()
void measure_ir()
{
   // this routine measures the battery internal resistance by checking
   // how the battery voltage changes when loaded and unloaded

   if(calc_ir >= IR_TIME) {        // turn on load
      set_batt_pwm(0xFFFF);
      --calc_ir;
      sprintf(plot_title, "Calculating battery internal resistance: %2d", calc_ir);
   }
   else if(calc_ir == 3) {   // get loaded readings
      ir_v = batt_v;
      ir_i = batt_i;
      --calc_ir;
      set_batt_pwm(0);
      sprintf(plot_title, "Calculating battery internal resistance: %2d", calc_ir);
   }
   else if(calc_ir) {
      --calc_ir;
      if(calc_ir) {     // get unloaded readings
         sprintf(plot_title, "Calculating battery internal resistance: %2d", calc_ir);
      }
      else {
         ir_v = fabs(batt_v-ir_v);
         if(ir_i) {
            ir_v /= ir_i;
            sprintf(plot_title, "Battery internal resistance: %.2f milliohms at %.3f amps", ir_v*1000.0F, ir_i);
         }
         else {
            sprintf(plot_title, "No load detected on the battery");
         }
      }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x290b6d(%rip), %rbx    # 0x30ce60
movl (%rbx), %edx
cmpl $0xa, %edx
jl 0x7c30c
movl $0xffff, %edi           # imm = 0xFFFF
callq 0x7c3fc
movl (%rbx), %edx
decl %edx
movl %edx, (%rbx)
jmp 0x7c35a
testl %edx, %edx
je 0x7c3f5
cmpl $0x3, %edx
jne 0x7c354
leaq 0x290a90(%rip), %rax    # 0x30cdb0
movsd (%rax), %xmm0
leaq 0x290b25(%rip), %rax    # 0x30ce50
movsd %xmm0, (%rax)
leaq 0x290a82(%rip), %rax    # 0x30cdb8
movsd (%rax), %xmm0
leaq 0x290b17(%rip), %rax    # 0x30ce58
movsd %xmm0, (%rax)
decl %edx
movl %edx, (%rbx)
xorl %edi, %edi
callq 0x7c3fc
movl (%rbx), %edx
jmp 0x7c35a
decl %edx
movl %edx, (%rbx)
je 0x7c375
leaq 0x2c24ef(%rip), %rdi    # 0x33e850
leaq 0xa618d(%rip), %rsi     # 0x1224f5
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x9060
leaq 0x290a34(%rip), %rax    # 0x30cdb0
movsd (%rax), %xmm0
leaq 0x290ac9(%rip), %rax    # 0x30ce50
subsd (%rax), %xmm0
andpd 0x8cded(%rip), %xmm0    # 0x109180
movlpd %xmm0, (%rax)
leaq 0x290aba(%rip), %rcx    # 0x30ce58
movsd (%rcx), %xmm1
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm1
jne 0x7c3ae
jnp 0x7c3d9
divsd %xmm1, %xmm0
movsd %xmm0, (%rax)
mulsd 0x8cc7a(%rip), %xmm0    # 0x109038
leaq 0x2c248b(%rip), %rdi    # 0x33e850
leaq 0xa6156(%rip), %rsi     # 0x122522
movb $0x2, %al
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x9060
movups 0xa618b(%rip), %xmm0    # 0x12256b
leaq 0x2c2469(%rip), %rax    # 0x33e850
movaps %xmm0, 0x10(%rax)
movups 0xa6169(%rip), %xmm0    # 0x12255b
movaps %xmm0, (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: set_batt_pwm(unsigned short)
void set_batt_pwm(u16 pwm)
{
   if(luxor == 0) return;

   send_tsip_start(LUXOR_ID); 
   send_byte(0x06);
   send_word(pwm);
   send_tsip_end();

   if(pwm == 0) {    // cancel alarm timers
      alarm_time = alarm_date = 0;
      egg_timer = 0;
      repeat_egg = 0;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x1c2b35(%rip), %rax    # 0x23ef3e
cmpb $0x0, (%rax)
je 0x7c464
movl %edi, %ebx
movl $0xdc, %edi
callq 0x5e740
movl $0x6, %edi
callq 0x591af
movzwl %bx, %ebx
movl %ebx, %edi
callq 0x5936c
callq 0x5e7c0
testw %bx, %bx
jne 0x7c464
leaq 0x291aed(%rip), %rax    # 0x30df2c
xorl %ecx, %ecx
movl %ecx, (%rax)
leaq 0x291ad2(%rip), %rax    # 0x30df1c
movl %ecx, (%rax)
leaq 0x291ab5(%rip), %rax    # 0x30df08
movq $0x0, (%rax)
leaq 0x291ab7(%rip), %rax    # 0x30df18
movb $0x0, (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: end_sweep()
void end_sweep()
{
   cc_mode = 0;
   sweep_stop = 0.0F;
   sweep_val = 0.0F;
   cc_state = 0;
   if(update_stop) {
      pause_data = 1;
      view_all(1);
      need_redraw = 2011;
   }
   update_stop = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x290a10(%rip), %rax    # 0x30ce88
xorl %ecx, %ecx
movb %cl, (%rax)
leaq 0x290a45(%rip), %rax    # 0x30cec8
movq %rcx, (%rax)
leaq 0x290a33(%rip), %rax    # 0x30cec0
movq %rcx, (%rax)
leaq 0x2909f2(%rip), %rax    # 0x30ce89
movb %cl, (%rax)
leaq 0x290a38(%rip), %rbx    # 0x30ced8
cmpl $0x0, (%rbx)
je 0x7c4c6
leaq 0x19ed88(%rip), %rax    # 0x21b234
movb $0x1, (%rax)
movl $0x1, %edi
callq 0x2f340
leaq 0x19c384(%rip), %rax    # 0x218844
movl $0x7db, (%rax)          # imm = 0x7DB
movl $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: request_luxor_ver()
void request_luxor_ver()
{
   if(luxor == 0) return;
   if(no_poll) return;

   send_tsip_start(LUXOR_ID); 
   send_byte(0x00);
   send_tsip_end();
}

// Assembly:
leaq 0x1c24b4(%rip), %rax    # 0x23ef3e
cmpb $0x0, (%rax)
je 0x7cab6
leaq 0x2ba58a(%rip), %rax    # 0x337020
cmpb $0x0, (%rax)
jne 0x7cab6
pushq %rbp
movq %rsp, %rbp
movl $0xdc, %edi
callq 0x5e740
xorl %edi, %edi
callq 0x591af
popq %rbp
jmp 0x5e7c0
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: reset_luxor_wdt(unsigned char)
void reset_luxor_wdt(u08 flag)
{
   if(luxor == 0) return;

   send_tsip_start(LUXOR_ID); 
   send_byte(0x09);
   send_byte(flag);
   send_tsip_end();
}

// Assembly:
leaq 0x1c0b2d(%rip), %rax    # 0x23ef3e
cmpb $0x0, (%rax)
je 0x7e445
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
movl $0xdc, %edi
callq 0x5e740
movl $0x9, %edi
callq 0x591af
movzbl %bl, %edi
callq 0x591af
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x5e7c0
retq