LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: get_eph_status()
void get_eph_status()
{
int prn;

   log_packet_id("Packet 0x5B (Sat ephemeris status)");

   prn = tsip_byte();
if(0 && debug_file) fprintf(debug_file, "\neph status %02d\n", prn);  //rnx3
   if((prn == 0) && (tsip_type == STARLOC_TYPE)) {  // bogus message
      for(prn=1; prn<=15; prn++) tsip_byte();
   }
   else {
      if(prn > MAX_PRN) prn = 0;  // !!!! max_sat_check - put any bogus data in unused entry in array
      if(prn < 1) prn = 0;  // !!!! max_sat_check - put any bogus data in unused entry in array

      sat[prn].eph_time = tsip_single();
      sat[prn].eph_health = tsip_byte();
      sat[prn].iode = (u08) tsip_byte();
      sat[prn].toe = tsip_single();
      sat[prn].fit_flag = tsip_byte();
      sat[prn].sv_accuracy = tsip_single();
      check_tsip_end(1);

      if(have_accu == 0) need_redraw = 2004;
      have_accu = 1;
if(0 && debug_file) {
   gregorian(0, jd_utc);
   fprintf(debug_file, "got eph status %d: %02d/%02d/%02d\n", prn, g_hours,g_minutes,g_seconds);
}
   }
   if(tsip_error) return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0xad9a7(%rip), %rdi     # 0x121d7b
callq 0x58dc2
callq 0x587be
movl %eax, %ebx
cmpl $0x100, %eax            # imm = 0x100
jb 0x743f1
leaq 0x1cab82(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
andl $0xff, %ebx
jne 0x7442a
leaq 0x1a6bd4(%rip), %rax    # 0x21afd4
cmpl $0x53, (%rax)
jne 0x7442a
movl $0xf, %ebx
leaq 0x1cab5f(%rip), %r14    # 0x23ef70
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x74421
orb $0x8, (%r14)
decl %ebx
jne 0x74411
jmp 0x744e0
callq 0x58a30
movl %ebx, %eax
imulq $0x348, %rax, %rax      # imm = 0x348
leaq 0x1cab71(%rip), %rcx    # 0x23efb0
leaq (%rcx,%rax), %rbx
movss %xmm0, 0x1ec(%rcx,%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x74462
leaq 0x1cab11(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
movb %al, 0x1f0(%rbx)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x7447e
leaq 0x1caaf5(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
movb %al, 0x1f1(%rbx)
callq 0x58a30
movss %xmm0, 0x1f4(%rbx)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x744a7
leaq 0x1caacc(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
movb %al, 0x1f8(%rbx)
callq 0x58a30
movss %xmm0, 0x1fc(%rbx)
xorl %edi, %edi
callq 0x58e9b
leaq 0x298ef8(%rip), %rax    # 0x30d3c0
cmpl $0x0, (%rax)
jne 0x744da
leaq 0x1a4370(%rip), %rcx    # 0x218844
movl $0x7d4, (%rcx)          # imm = 0x7D4
movl $0x1, (%rax)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0xad682(%rip), %rdi     # 0x121db9
callq 0x58dc2
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x74752
leaq 0x1ca821(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x74768
leaq 0x1ca80b(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
xorl %edi, %edi
popq %rbp
jmp 0x58e9b
// File: /workspace/github_cpp_makefile_star2_O3/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 0xad662(%rip), %rdi     # 0x121ddd
callq 0x58dc2
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x74796
leaq 0x1ca7dd(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
cmpb $0x11, %al
jne 0x7479f
callq 0x588d2
xorl %edi, %edi
popq %rbp
jmp 0x58e9b
// File: /workspace/github_cpp_makefile_star2_O3/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 0xad407(%rip), %rdi     # 0x121e38
callq 0x58dc2
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x74a4c
leaq 0x1ca527(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
leaq 0x298645(%rip), %rcx    # 0x30d098
movb %al, (%rcx)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x74a6b
leaq 0x1ca508(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
leaq 0x298627(%rip), %rcx    # 0x30d099
movb %al, (%rcx)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x74a8a
leaq 0x1ca4e9(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
leaq 0x298609(%rip), %rcx    # 0x30d09a
movb %al, (%rcx)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x74aa9
leaq 0x1ca4ca(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
leaq 0x2985eb(%rip), %rbx    # 0x30d09b
movb %al, (%rbx)
leaq 0x2985d7(%rip), %rax    # 0x30d090
movl $0xf, (%rax)
xorl %edi, %edi
callq 0x58e9b
leaq 0x1ca4a3(%rip), %rax    # 0x23ef70
cmpl $0x0, (%rax)
jne 0x74af3
leaq 0x29892f(%rip), %rax    # 0x30d408
orb $-0x80, (%rax)
leaq 0x2c2535(%rip), %rax    # 0x337018
cmpb $0x0, (%rax)
jne 0x74af3
movb (%rbx), %al
leaq 0x298933(%rip), %rcx    # 0x30d424
orb %al, (%rcx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0xad34d(%rip), %rdi     # 0x121e54
callq 0x58dc2
callq 0x588d2
callq 0x58a30
movss %xmm0, -0xc(%rbp)
callq 0x588d2
callq 0x588d2
callq 0x588d2
callq 0x588d2
callq 0x58a30
callq 0x58a30
callq 0x58a30
callq 0x58a30
callq 0x588d2
movl %eax, %ebx
xorl %edi, %edi
callq 0x58e9b
cmpw $-0x1, %bx
leaq 0x29853d(%rip), %rax    # 0x30d099
setne (%rax)
leaq 0x29852a(%rip), %rax    # 0x30d090
movss -0xc(%rbp), %xmm0
ucomiss 0x984fa(%rip), %xmm0    # 0x10d06c
setp %cl
setne %dl
orb %cl, %dl
leaq 0x298517(%rip), %rcx    # 0x30d098
movb %dl, (%rcx)
orb $0x3, (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0xad2e1(%rip), %rdi     # 0x121e7d
callq 0x58dc2
callq 0x58a30
movss %xmm0, -0x4(%rbp)
xorl %edi, %edi
callq 0x58e9b
leaq 0x1ca3b7(%rip), %rax    # 0x23ef70
cmpl $0x0, (%rax)
jne 0x74bde
movss -0x4(%rbp), %xmm0
ucomiss 0x984a2(%rip), %xmm0    # 0x10d06c
leaq 0x2984c9(%rip), %rax    # 0x30d09a
seta (%rax)
leaq 0x2984b5(%rip), %rax    # 0x30d090
orb $0x4, (%rax)
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0xad284(%rip), %rdi     # 0x121efe
callq 0x58dc2
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x74c95
leaq 0x1ca2de(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
xorl %edi, %edi
popq %rbp
jmp 0x58e9b
// File: /workspace/github_cpp_makefile_star2_O3/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 0xad262(%rip), %rdi     # 0x121f3f
callq 0x58dc2
callq 0x58b08
movsd %xmm0, -0x20(%rbp)
callq 0x58b08
movsd %xmm0, -0x18(%rbp)
callq 0x58b08
movsd %xmm0, -0x10(%rbp)
callq 0x58b08
callq 0x58a30
movss %xmm0, -0x4(%rbp)
xorl %edi, %edi
callq 0x58e9b
leaq 0x1ca253(%rip), %rax    # 0x23ef70
cmpl $0x0, (%rax)
je 0x74d28
addq $0x20, %rsp
popq %rbp
retq
leaq 0x1a3ba1(%rip), %rax    # 0x2188d0
movq (%rax), %rax
leaq 0x1a629b(%rip), %rcx    # 0x21afd4
movl (%rcx), %ecx
cmpq $0x1, %rax
jne 0x74d53
leal -0x33(%rcx), %edx
cmpl $0x1d, %edx
ja 0x74d53
movl $0x20004009, %esi       # imm = 0x20004009
btl %edx, %esi
jb 0x74d70
cmpq $0x1, %rax
sete %al
cmpl $0x50, %ecx
sete %cl
testb %cl, %al
jne 0x74d70
leaq 0x1ca16d(%rip), %rax    # 0x23eed8
cmpl $0x0, (%rax)
jne 0x74d22
movss -0x4(%rbp), %xmm0
callq 0x73056
leaq 0x29824f(%rip), %rax    # 0x30cfd0
movsd -0x20(%rbp), %xmm0
movsd %xmm0, (%rax)
leaq 0x298247(%rip), %rax    # 0x30cfd8
movsd -0x18(%rbp), %xmm0
movsd %xmm0, (%rax)
leaq 0x29823f(%rip), %rax    # 0x30cfe0
movsd -0x10(%rbp), %xmm0
movsd %xmm0, (%rax)
addq $0x20, %rsp
popq %rbp
jmp 0xfb374
// File: /workspace/github_cpp_makefile_star2_O3/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 0x1ca14d(%rip), %rax    # 0x23ef3e
cmpb $0x0, (%rax)
jne 0x74e1e
leaq 0x1a3ad3(%rip), %rax    # 0x2188d0
cmpq $0x1, (%rax)
jne 0x74e1e
leaq 0x1a61ca(%rip), %rax    # 0x21afd4
movl (%rax), %eax
addl $-0x33, %eax
cmpl $0x1d, %eax
ja 0x74e1f
movl $0x20004009, %ecx       # imm = 0x20004009
btl %eax, %ecx
jae 0x74e1f
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl $0x8e, %edi
callq 0x5e6be
movl $0x41, %edi
callq 0x590f7
movw $0x1234, -0xa(%rbp)     # imm = 0x1234
leaq 0x1a398e(%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
movl $0x56789abc, %edi       # imm = 0x56789ABC
callq 0x592eb
movl $0xa, %edi
callq 0x590f7
movl $0x1, %edi
callq 0x590f7
movl $0x2, %edi
callq 0x590f7
movl $0x3, %edi
callq 0x590f7
xorps %xmm0, %xmm0
callq 0x59376
movw $0x0, -0xc(%rbp)
xorl %eax, %eax
cmpb $0x0, (%rbx)
sete %al
movzbl -0xc(%rbp,%rax), %edi
callq 0x590f7
xorl %eax, %eax
cmpb $0x0, (%rbx)
setne %al
movzbl -0xc(%rbp,%rax), %edi
callq 0x590f7
callq 0x5e73c
movl $0xff, %edi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x6a4ce
// File: /workspace/github_cpp_makefile_star2_O3/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 0x1a3815(%rip), %rax    # 0x2188d0
cmpq $0x1, (%rax)
jne 0x75115
leaq 0x2988ac(%rip), %rax    # 0x30d974
orb $0x1, (%rax)
leaq 0x1a3706(%rip), %rax    # 0x2187d8
cmpl $0x0, (%rax)
setne %al
leaq 0x1c9e79(%rip), %rcx    # 0x23ef58
cmpl $0x0, (%rcx)
setne %cl
testb %cl, %al
jne 0x75115
leaq 0x2976b8(%rip), %rax    # 0x30c7a8
cmpb $0x0, (%rax)
jne 0x75115
leaq 0x1c9e42(%rip), %rax    # 0x23ef3e
cmpb $0x0, (%rax)
jne 0x75115
leaq 0x2c1f10(%rip), %rax    # 0x337018
cmpb $0x0, (%rax)
jne 0x75115
xorl %edi, %edi
popq %rbp
jmp 0xb9738
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0xace8b(%rip), %rdi     # 0x121fad
callq 0x58dc2
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x7513d
leaq 0x1c9e36(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
leaq 0x298850(%rip), %rcx    # 0x30d994
movb %al, (%rcx)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x7515c
leaq 0x1c9e17(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
leaq 0x298832(%rip), %rcx    # 0x30d995
movb %al, (%rcx)
callq 0x588d2
leaq 0x298825(%rip), %rcx    # 0x30d996
movw %ax, (%rcx)
callq 0x58964
leaq 0x298818(%rip), %rcx    # 0x30d998
movl %eax, (%rcx)
callq 0x58964
leaq 0x29880e(%rip), %rcx    # 0x30d99c
movl %eax, (%rcx)
callq 0x588d2
callq 0x588d2
leaq 0x2987ff(%rip), %rcx    # 0x30d9a0
movw %ax, (%rcx)
callq 0x588d2
xorl %edi, %edi
callq 0x58e9b
leaq 0x1c9db9(%rip), %rax    # 0x23ef70
cmpl $0x0, (%rax)
jne 0x751c6
leaq 0x2987b1(%rip), %rax    # 0x30d974
orb $0x2, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0xacdfd(%rip), %rdi     # 0x121fd0
callq 0x58dc2
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x751ee
leaq 0x1c9d85(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
xorl %edi, %edi
callq 0x58e9b
leaq 0x1c9d74(%rip), %rax    # 0x23ef70
cmpl $0x0, (%rax)
jne 0x7520e
leaq 0x298774(%rip), %rax    # 0x30d97c
movl $0x1, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0xacdd8(%rip), %rdi     # 0x121ff5
callq 0x58dc2
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x75238
leaq 0x1c9d3b(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
leaq 0x298ae1(%rip), %rcx    # 0x30dd20
movb %al, (%rcx)
leaq 0x298094(%rip), %rax    # 0x30d2dc
movl $0x1, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x75264
leaq 0x1c9d0f(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x7527a
leaq 0x1c9cf9(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
movzbl %al, %eax
leaq 0x298a94(%rip), %rcx    # 0x30dd18
movl %eax, (%rcx)
leaq 0x298053(%rip), %rax    # 0x30d2e0
movl $0x1, %ebx
movl %ebx, (%rax)
callq 0x58b08
leaq 0x298b28(%rip), %rax    # 0x30ddc8
movsd %xmm0, (%rax)
callq 0x58a30
xorl %edi, %edi
callq 0x58e9b
leaq 0x297ffd(%rip), %rax    # 0x30d2b4
movl %ebx, (%rax)
leaq 0x1c9cb0(%rip), %rax    # 0x23ef70
cmpl $0x0, (%rax)
je 0x752cc
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x1a3505(%rip), %rax    # 0x2187d8
cmpl $0x0, (%rax)
sete %al
leaq 0x1c9c78(%rip), %rcx    # 0x23ef58
cmpl $0x0, (%rcx)
sete %cl
orb %al, %cl
cmpb $0x1, %cl
jne 0x752c5
leaq 0x2974b4(%rip), %rax    # 0x30c7a8
cmpb $0x0, (%rax)
jne 0x752c5
leaq 0x1c9c3e(%rip), %rax    # 0x23ef3e
cmpb $0x0, (%rax)
jne 0x752c5
leaq 0x2c1d0c(%rip), %rax    # 0x337018
cmpb $0x0, (%rax)
jne 0x752c5
leaq 0x2980f0(%rip), %rax    # 0x30d408
orb $0x40, (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x75326
// File: /workspace/github_cpp_makefile_star2_O3/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 0x29747b(%rip), %rax    # 0x30c7a8
cmpb $0x0, (%rax)
je 0x75333
retq
leaq 0x1a349e(%rip), %rax    # 0x2187d8
cmpl $0x0, (%rax)
setne %al
leaq 0x1c9c11(%rip), %rcx    # 0x23ef58
cmpl $0x0, (%rcx)
setne %cl
testb %cl, %al
jne 0x75332
leaq 0x297f5c(%rip), %rax    # 0x30d2b4
cmpl $0x0, (%rax)
je 0x75332
leaq 0x298a64(%rip), %rax    # 0x30ddc8
movsd (%rax), %xmm0
mulsd 0x93cb8(%rip), %xmm0    # 0x109028
ucomisd 0xa8e50(%rip), %xmm0    # 0x11e1c8
jae 0x753be
ucomisd 0x96556(%rip), %xmm0    # 0x10b8d8
jae 0x753c7
ucomisd 0x93cc4(%rip), %xmm0    # 0x109050
jae 0x753d0
ucomisd 0x93d32(%rip), %xmm0    # 0x1090c8
jae 0x753d9
ucomisd 0x93d38(%rip), %xmm0    # 0x1090d8
jae 0x753e2
ucomisd 0x93c8e(%rip), %xmm0    # 0x109038
leaq 0xb1172(%rip), %rax     # 0x126523
leaq 0xb115d(%rip), %rsi     # 0x126515
cmovbq %rax, %rsi
jmp 0x753e9
leaq 0xb110a(%rip), %rsi     # 0x1264cf
jmp 0x753e9
leaq 0xb110f(%rip), %rsi     # 0x1264dd
jmp 0x753e9
leaq 0xb1114(%rip), %rsi     # 0x1264eb
jmp 0x753e9
leaq 0xb1119(%rip), %rsi     # 0x1264f9
jmp 0x753e9
leaq 0xb111e(%rip), %rsi     # 0x126507
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x2c6e2a(%rip), %rbx    # 0x33c220
leaq 0xa024d(%rip), %rdx     # 0x11564a
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 0xe787
// File: /workspace/github_cpp_makefile_star2_O3/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 0xacbe4(%rip), %rdi     # 0x122013
callq 0x58dc2
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x7544a
leaq 0x1c9b29(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
leaq 0x2988d2(%rip), %rcx    # 0x30dd23
movb %al, (%rcx)
leaq 0x297e76(%rip), %rax    # 0x30d2d0
movl $0x2, (%rax)
xorl %edi, %edi
popq %rbp
jmp 0x58e9b
// File: /workspace/github_cpp_makefile_star2_O3/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 0xacbba(%rip), %rdi     # 0x12202d
callq 0x58dc2
callq 0x58964
callq 0x58a30
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x75498
leaq 0x1c9adb(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x754ae
leaq 0x1c9ac5(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x58a30
callq 0x58a30
xorl %edi, %edi
popq %rbp
jmp 0x58e9b
// File: /workspace/github_cpp_makefile_star2_O3/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 0xacb7e(%rip), %rdi     # 0x122049
callq 0x58dc2
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x754e6
leaq 0x1c9a8d(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
leaq 0x298825(%rip), %rcx    # 0x30dd12
movb %al, (%rcx)
leaq 0x297df2(%rip), %rax    # 0x30d2e8
movl $0x1, (%rax)
xorl %edi, %edi
popq %rbp
jmp 0x58e9b
// File: /workspace/github_cpp_makefile_star2_O3/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 0xacb58(%rip), %rdi     # 0x122067
callq 0x58dc2
leaq 0x1a33b5(%rip), %rax    # 0x2188d0
cmpq $0x1, (%rax)
jne 0x7552f
leaq 0x1a5aac(%rip), %rax    # 0x21afd4
cmpl $0x53, (%rax)
jne 0x7552f
popq %rbp
retq
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x75545
leaq 0x1c9a2e(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
xorl %ecx, %ecx
testb $0x3, %al
setne %cl
leal (%rcx,%rcx,2), %eax
leaq 0x297f67(%rip), %rcx    # 0x30d4bd
movb %al, (%rcx)
leaq 0x297e71(%rip), %rax    # 0x30d3d0
movl $0x1, %ecx
movl %ecx, (%rax)
leaq 0x297e5f(%rip), %rax    # 0x30d3cc
movl %ecx, (%rax)
xorl %edi, %edi
popq %rbp
jmp 0x58e9b
// File: /workspace/github_cpp_makefile_star2_O3/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 0xac3d1(%rip), %rdi     # 0x1220e9
callq 0x58dc2
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x75d33
leaq 0x1c9240(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x75d49
leaq 0x1c922a(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
leaq 0x298124(%rip), %rcx    # 0x30de74
movb %al, (%rcx)
callq 0x58964
leaq 0x298112(%rip), %rcx    # 0x30de70
movl %eax, (%rcx)
callq 0x58964
xorl %edi, %edi
popq %rbp
jmp 0x58e9b
// File: /workspace/github_cpp_makefile_star2_O3/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 0xac24d(%rip), %rdi     # 0x122108
callq 0x58dc2
callq 0x588d2
callq 0x58964
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x75ee0
leaq 0x1c9093(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x75ef6
leaq 0x1c907d(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x588d2
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x75f11
leaq 0x1c9062(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x588d2
callq 0x58b08
callq 0x58b08
callq 0x58a30
callq 0x58a30
callq 0x58b08
callq 0x58b08
callq 0x58b08
movl $0x8, %ebx
leaq 0x1c902b(%rip), %r14    # 0x23ef70
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x75f55
orb $0x8, (%r14)
decl %ebx
jne 0x75f45
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x1c4e0a(%rip), %rbx    # 0x23cc68
cmpl $0x0, (%rbx)
jne 0x77ea5
leaq 0x1c4e96(%rip), %rax    # 0x23cd00
movsd (%rax), %xmm1
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm1
jbe 0x77ea5
leaq 0x1c4cc9(%rip), %r14    # 0x23cb48
movsd (%r14), %xmm2
addsd 0x911e4(%rip), %xmm2    # 0x109070
movsd %xmm2, (%r14)
ucomisd %xmm1, %xmm2
jb 0x77ea5
xorl %edi, %edi
callq 0x1003d6
movq $0x0, (%r14)
movl $0x0, (%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x1c4dae(%rip), %rbx    # 0x23cc6c
cmpl $0x0, (%rbx)
jne 0x77f05
leaq 0x1c4e3e(%rip), %rax    # 0x23cd08
movsd (%rax), %xmm1
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm1
jbe 0x77f05
leaq 0x1c4cb9(%rip), %r14    # 0x23cb98
movsd (%r14), %xmm2
addsd 0x91184(%rip), %xmm2    # 0x109070
movsd %xmm2, (%r14)
ucomisd %xmm1, %xmm2
jb 0x77f05
xorl %edi, %edi
callq 0x100950
movq $0x0, (%r14)
movl $0x0, (%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x1a0732(%rip), %rax    # 0x2188d0
cmpq $0x1, (%rax)
jne 0x7821d
leaq 0x1a31cd(%rip), %rax    # 0x21b378
cmpl $0x0, (%rax)
je 0x7821d
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
callq 0x78126
cmpl $0x0, 0x2f8bf6(%rip)    # 0x370db8
je 0x78210
movslq 0x2f8bf1(%rip), %rax    # 0x370dbc
leaq 0x2f8b5e(%rip), %rbx    # 0x370d30
movl 0x4(%rbx,%rax,4), %esi
movl $0x6, %edi
callq 0x688de
movslq 0x2f8bd5(%rip), %rax    # 0x370dbc
movl 0x4(%rbx,%rax,4), %edi
callq 0x69940
movl 0x2f8bc6(%rip), %eax    # 0x370dbc
leal 0x1(%rax), %ecx
xorl %edx, %edx
cmpl $0x20, %eax
cmovgel %edx, %ecx
cmpl 0x2f8bb1(%rip), %ecx    # 0x370db8
cmovgl %edx, %ecx
movl %ecx, 0x2f8bac(%rip)    # 0x370dbc
xorl %edi, %edi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x69997
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x1a06a1(%rip), %rax    # 0x2188d0
movq (%rax), %rax
movabsq $0x105b8b0400, %rcx     # imm = 0x105B8B0400
testq %rcx, %rax
jne 0x7833e
leaq 0x1a2d84(%rip), %rcx    # 0x21afd0
cmpl $0x0, (%rcx)
je 0x78261
leaq 0x29516c(%rip), %rcx    # 0x30d3c4
cmpl $0x0, (%rcx)
je 0x7833e
cmpq $0x400000, %rax         # imm = 0x400000
setne %al
leaq 0x295743(%rip), %rcx    # 0x30d9b4
cmpl $0x0, (%rcx)
setne %cl
orb %al, %cl
cmpb $0x1, %cl
jne 0x7833e
leaq 0x294d47(%rip), %rbx    # 0x30cfd0
movsd (%rbx), %xmm1
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
jne 0x7829d
jnp 0x7833e
leaq 0x294d34(%rip), %r14    # 0x30cfd8
movsd (%r14), %xmm1
ucomisd %xmm0, %xmm1
jne 0x782b5
jnp 0x7833e
leaq 0x295008(%rip), %r15    # 0x30d2c4
cmpl $0x0, (%r15)
jne 0x7833e
movl $0x7, %edi
movl $0x1942, %esi           # imm = 0x1942
callq 0x1118c
movl $0x1, (%r15)
movsd 0x90e80(%rip), %xmm0    # 0x109160
movsd (%rbx), %xmm1
mulsd %xmm0, %xmm1
leaq 0x294d19(%rip), %rax    # 0x30d008
movsd %xmm1, (%rax)
leaq 0x294d06(%rip), %rax    # 0x30d000
mulsd (%r14), %xmm0
movsd %xmm1, (%rax)
leaq 0x294d0e(%rip), %rax    # 0x30d018
movsd %xmm0, (%rax)
leaq 0x294cfb(%rip), %rax    # 0x30d010
movsd %xmm0, (%rax)
leaq 0x2c2f94(%rip), %rax    # 0x33b2b4
cmpl $0x0, (%rax)
je 0x7833e
callq 0xfc28e
xorl %edi, %edi
callq 0xfc4c8
leaq 0x1a050c(%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_O3/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 0x1a047f(%rip), %rax    # 0x2187d8
cmpl $0x0, (%rax)
je 0x7836e
leaq 0x1c6bf3(%rip), %rax    # 0x23ef58
cmpl $0x0, (%rax)
jne 0x78460
leaq 0x294433(%rip), %r14    # 0x30c7a8
movb (%r14), %al
cmpb $0x49, %al
jne 0x78384
callq 0xb429b
movb (%r14), %al
leaq 0x1c6bb3(%rip), %rcx    # 0x23ef3e
orb (%rcx), %al
jne 0x78460
movl $0xffffffff, 0x2f3a07(%rip) # imm = 0xFFFFFFFF
callq 0x75326
callq 0xb9a6f
callq 0xc0cd7
callq 0xb4535
movl 0x2f39e5(%rip), %eax    # 0x36bd9c
cmpl 0x2f39e7(%rip), %eax    # 0x36bda4
je 0x783eb
cmpl $0x0, 0x2f39e2(%rip)    # 0x36bda8
je 0x783eb
leaq 0x1a0435(%rip), %rcx    # 0x218804
cmpl $0x259, (%rcx)          # imm = 0x259
jl 0x783eb
incl %eax
movl %eax, 0x2f39bd(%rip)    # 0x36bd9c
decl 0x2f39bb(%rip)          # 0x36bda0
movl %eax, 0x2f39b9(%rip)    # 0x36bda4
leaq 0x1c494c(%rip), %rax    # 0x23cd3e
cmpb $0x0, (%rax)
je 0x7841c
leaq 0x1a0416(%rip), %rax    # 0x218814
cmpl $0xd, (%rax)
setl %cl
leaq 0x1a03f5(%rip), %rax    # 0x218800
movl (%rax), %eax
cmpl $0x4fa, %eax            # imm = 0x4FA
setge %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x78465
callq 0xbb6dc
callq 0xb4e44
callq 0xb754f
callq 0xbd0f2
callq 0xbddb3
callq 0xbe070
callq 0xbe9d9
callq 0xbfb5c
callq 0xc0935
callq 0xc0b06
testl %ebx, %ebx
je 0x78460
callq 0x5bef0
popq %rbx
popq %r14
popq %rbp
jmp 0xab54
popq %rbx
popq %r14
popq %rbp
retq
cmpl $0x4fa, %eax            # imm = 0x4FA
jl 0x78476
callq 0xb4e44
callq 0xb754f
leaq 0x1a0337(%rip), %rax    # 0x2187b4
cmpl $0xc, (%rax)
jl 0x7842b
callq 0xbb6dc
jmp 0x7842b
// File: /workspace/github_cpp_makefile_star2_O3/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 0x1c6a4c(%rip), %rax    # 0x23eedc
cmpb $0x0, (%rax)
je 0xab54
leaq 0x1a2d94(%rip), %rax    # 0x21b234
cmpb $0x0, (%rax)
jne 0xab54
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl $0x1, %edi
callq 0x198f5
leaq 0x1c6a14(%rip), %rbx    # 0x23eed4
cmpb $0x0, (%rbx)
je 0x78521
leaq 0x1a0404(%rip), %rax    # 0x2188d0
movq (%rax), %rax
cmpq $0x8, %rax
je 0x784fc
cmpq $0x10, %rax
je 0x784fc
leaq 0x294fb5(%rip), %rax    # 0x30d497
movb (%rax), %al
cmpb $0x6, %al
leaq 0x294fa7(%rip), %rcx    # 0x30d494
setne (%rcx)
cmpb $0x3, %al
leaq 0x294f5b(%rip), %rax    # 0x30d454
sete (%rax)
leaq 0x1c483b(%rip), %rax    # 0x23cd3e
cmpb $0x0, (%rax)
je 0x78514
leaq 0x1c482e(%rip), %rax    # 0x23cd3d
cmpb $0x0, (%rax)
je 0x7851e
movl $0x1, %edi
callq 0x197ae
movb $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x292604(%rip), %rax    # 0x30cf69
cmpb $0x0, (%rax)
je 0x7a9e0
movsd 0xa3946(%rip), %xmm3    # 0x11e2b8
mulsd %xmm1, %xmm3
movsd 0xa3942(%rip), %xmm4    # 0x11e2c0
mulsd %xmm0, %xmm4
addsd %xmm3, %xmm4
movsd 0xa393a(%rip), %xmm3    # 0x11e2c8
mulsd %xmm2, %xmm3
addsd %xmm4, %xmm3
movsd 0xa3932(%rip), %xmm4    # 0x11e2d0
mulsd %xmm1, %xmm4
movsd 0xa392e(%rip), %xmm5    # 0x11e2d8
mulsd %xmm0, %xmm5
addsd %xmm4, %xmm5
movsd 0xa3926(%rip), %xmm4    # 0x11e2e0
mulsd %xmm2, %xmm4
addsd %xmm5, %xmm4
mulsd 0xa391e(%rip), %xmm1    # 0x11e2e8
mulsd 0xa391e(%rip), %xmm0    # 0x11e2f0
addsd %xmm1, %xmm0
mulsd 0xa391a(%rip), %xmm2    # 0x11e2f8
jmp 0x7aa54
movsd 0xa3918(%rip), %xmm3    # 0x11e300
mulsd %xmm1, %xmm3
movsd 0xa3914(%rip), %xmm4    # 0x11e308
mulsd %xmm0, %xmm4
addsd %xmm3, %xmm4
movsd 0xa390c(%rip), %xmm3    # 0x11e310
mulsd %xmm2, %xmm3
addsd %xmm4, %xmm3
movsd 0xa3904(%rip), %xmm4    # 0x11e318
mulsd %xmm1, %xmm4
movsd 0xa3900(%rip), %xmm5    # 0x11e320
mulsd %xmm0, %xmm5
addsd %xmm4, %xmm5
movsd 0xa38f8(%rip), %xmm4    # 0x11e328
mulsd %xmm2, %xmm4
addsd %xmm5, %xmm4
mulsd 0xa38f0(%rip), %xmm1    # 0x11e330
mulsd 0xa38f0(%rip), %xmm0    # 0x11e338
addsd %xmm1, %xmm0
mulsd 0xa38ec(%rip), %xmm2    # 0x11e340
addsd %xmm0, %xmm2
movsd %xmm3, 0x2f6360(%rip)   # 0x370dc0
movsd %xmm4, 0x2f6360(%rip)   # 0x370dc8
movsd %xmm2, 0x2f6360(%rip)   # 0x370dd0
addsd %xmm4, %xmm3
addsd %xmm2, %xmm3
movsd %xmm3, 0x2f6358(%rip)   # 0x370dd8
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x8e3d5(%rip), %xmm1    # 0x109148
movapd %xmm1, %xmm2
mulsd %xmm1, %xmm2
mulsd %xmm1, %xmm2
mulsd %xmm1, %xmm2
mulsd %xmm1, %xmm2
movsd %xmm2, -0x8(%rbp)
mulsd 0xa362c(%rip), %xmm1    # 0x11e3c0
mulsd %xmm0, %xmm1
movsd 0xa3628(%rip), %xmm0    # 0x11e3c8
divsd %xmm1, %xmm0
callq 0x96f0
addsd 0x8e347(%rip), %xmm0    # 0x1090f8
mulsd -0x8(%rbp), %xmm0
movsd 0xa3612(%rip), %xmm1    # 0x11e3d0
divsd %xmm0, %xmm1
divsd 0x8e286(%rip), %xmm1    # 0x109050
movapd %xmm1, %xmm0
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x290de2(%rip), %rbx    # 0x30ce60
movl (%rbx), %edx
cmpl $0xa, %edx
jl 0x7c097
movl $0xffff, %edi           # imm = 0xFFFF
callq 0x7c189
movl (%rbx), %edx
decl %edx
movl %edx, (%rbx)
jmp 0x7c0e7
testl %edx, %edx
je 0x7c182
cmpl $0x3, %edx
jne 0x7c0e1
leaq 0x290d05(%rip), %rax    # 0x30cdb0
movsd (%rax), %xmm0
leaq 0x290d9a(%rip), %rax    # 0x30ce50
movsd %xmm0, (%rax)
leaq 0x290cf7(%rip), %rax    # 0x30cdb8
movsd (%rax), %xmm0
leaq 0x290d8c(%rip), %rax    # 0x30ce58
movsd %xmm0, (%rax)
movl $0x2, (%rbx)
xorl %edi, %edi
callq 0x7c189
movl (%rbx), %edx
jmp 0x7c0e7
decl %edx
movl %edx, (%rbx)
je 0x7c102
leaq 0x2c2762(%rip), %rdi    # 0x33e850
leaq 0xa64e0(%rip), %rsi     # 0x1225d5
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x9060
leaq 0x290ca7(%rip), %rax    # 0x30cdb0
movsd (%rax), %xmm0
leaq 0x290d3c(%rip), %rax    # 0x30ce50
subsd (%rax), %xmm0
andpd 0x8d070(%rip), %xmm0    # 0x109190
movlpd %xmm0, (%rax)
leaq 0x290d2d(%rip), %rcx    # 0x30ce58
movsd (%rcx), %xmm1
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm1
jne 0x7c13b
jnp 0x7c166
divsd %xmm1, %xmm0
movsd %xmm0, (%rax)
mulsd 0x8ceed(%rip), %xmm0    # 0x109038
leaq 0x2c26fe(%rip), %rdi    # 0x33e850
leaq 0xa64a9(%rip), %rsi     # 0x122602
movb $0x2, %al
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x9060
movups 0xa64de(%rip), %xmm0    # 0x12264b
leaq 0x2c26dc(%rip), %rax    # 0x33e850
movaps %xmm0, 0x10(%rax)
movups 0xa64bc(%rip), %xmm0    # 0x12263b
movaps %xmm0, (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 %r14
pushq %rbx
subq $0x10, %rsp
leaq 0x1c2da3(%rip), %rax    # 0x23ef3e
cmpb $0x0, (%rax)
je 0x7c21d
movl %edi, %ebx
movl $0xdc, %edi
callq 0x5e6be
movl $0x6, %edi
callq 0x590f7
movw %bx, -0x12(%rbp)
leaq 0x19c613(%rip), %r14    # 0x2187d4
xorl %eax, %eax
cmpb $0x0, (%r14)
sete %al
movzbl -0x12(%rbp,%rax), %edi
callq 0x590f7
xorl %eax, %eax
cmpb $0x0, (%r14)
setne %al
movzbl -0x12(%rbp,%rax), %edi
callq 0x590f7
callq 0x5e73c
testw %bx, %bx
jne 0x7c21d
leaq 0x291d34(%rip), %rax    # 0x30df2c
xorl %ecx, %ecx
movl %ecx, (%rax)
leaq 0x291d19(%rip), %rax    # 0x30df1c
movl %ecx, (%rax)
leaq 0x291cfc(%rip), %rax    # 0x30df08
movq $0x0, (%rax)
leaq 0x291cfe(%rip), %rax    # 0x30df18
movb $0x0, (%rax)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x290c55(%rip), %rax    # 0x30ce88
xorl %ecx, %ecx
movb %cl, (%rax)
leaq 0x290c8a(%rip), %rax    # 0x30cec8
movq %rcx, (%rax)
leaq 0x290c78(%rip), %rax    # 0x30cec0
movq %rcx, (%rax)
leaq 0x290c37(%rip), %rax    # 0x30ce89
movb %cl, (%rax)
leaq 0x290c7d(%rip), %rbx    # 0x30ced8
cmpl $0x0, (%rbx)
je 0x7c281
leaq 0x19efcd(%rip), %rax    # 0x21b234
movb $0x1, (%rax)
movl $0x1, %edi
callq 0x2f4ed
leaq 0x19c5c9(%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_O3/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 0x1c26a1(%rip), %rax    # 0x23ef3e
cmpb $0x0, (%rax)
je 0x7c8c9
leaq 0x2ba777(%rip), %rax    # 0x337020
cmpb $0x0, (%rax)
jne 0x7c8c9
pushq %rbp
movq %rsp, %rbp
movl $0xdc, %edi
callq 0x5e6be
xorl %edi, %edi
callq 0x590f7
popq %rbp
jmp 0x5e73c
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x1c0d16(%rip), %rax    # 0x23ef3e
cmpb $0x0, (%rax)
je 0x7e25c
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
movl $0xdc, %edi
callq 0x5e6be
movl $0x9, %edi
callq 0x590f7
movzbl %bl, %edi
callq 0x590f7
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x5e73c
retq