LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
pushq %rax
leaq 0xa03e0(%rip), %rdi     # 0x10c050
callq 0x520bf
callq 0x51c63
callq 0x51cf3
callq 0x51c47
callq 0x51c47
callq 0x51c63
callq 0x51c47
callq 0x51c63
callq 0x51e6f
callq 0x51e6f
callq 0x51dc3
callq 0x51dc3
callq 0x51e6f
callq 0x51e6f
callq 0x51e6f
pushq $0x8
popq %rbx
subl $0x1, %ebx
jb 0x6bcca
callq 0x51c47
jmp 0x6bcbe
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x1b92fc(%rip), %rbx    # 0x226c68
cmpl $0x0, (%rbx)
jne 0x6d9b0
leaq 0x1b9388(%rip), %rax    # 0x226d00
movsd (%rax), %xmm1
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm1
jbe 0x6d9b0
leaq 0x1b91bb(%rip), %r14    # 0x226b48
movsd (%r14), %xmm2
addsd 0x856d6(%rip), %xmm2    # 0xf3070
movsd %xmm2, (%r14)
ucomisd %xmm1, %xmm2
jb 0x6d9b0
xorl %edi, %edi
callq 0xea2e5
andq $0x0, (%r14)
andl $0x0, (%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x1b92a6(%rip), %rbx    # 0x226c6c
cmpl $0x0, (%rbx)
jne 0x6da0a
leaq 0x1b9336(%rip), %rax    # 0x226d08
movsd (%rax), %xmm1
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm1
jbe 0x6da0a
leaq 0x1b91b1(%rip), %r14    # 0x226b98
movsd (%r14), %xmm2
addsd 0x8567c(%rip), %xmm2    # 0xf3070
movsd %xmm2, (%r14)
ucomisd %xmm1, %xmm2
jb 0x6da0a
xorl %edi, %edi
callq 0xea737
andq $0x0, (%r14)
andl $0x0, (%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x194c6a(%rip), %rax    # 0x2028d0
cmpq $0x1, (%rax)
jne 0x6dce3
leaq 0x197705(%rip), %rax    # 0x205378
cmpl $0x0, (%rax)
je 0x6dce3
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
callq 0x6dbe8
cmpl $0x0, 0x2ed12e(%rip)    # 0x35adb8
je 0x6dcd6
movslq 0x2ed129(%rip), %rax    # 0x35adbc
leaq 0x2ed096(%rip), %rbx    # 0x35ad30
movl 0x4(%rbx,%rax,4), %esi
pushq $0x6
popq %rdi
callq 0x5fd4d
movslq 0x2ed10f(%rip), %rax    # 0x35adbc
movl 0x4(%rbx,%rax,4), %edi
callq 0x60c03
movl 0x2ed100(%rip), %eax    # 0x35adbc
leal 0x1(%rax), %ecx
xorl %edx, %edx
cmpl $0x20, %eax
cmovgel %edx, %ecx
cmpl 0x2ed0eb(%rip), %ecx    # 0x35adb8
cmovgl %edx, %ecx
movl %ecx, 0x2ed0e6(%rip)    # 0x35adbc
xorl %edi, %edi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x60c58
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x194bdb(%rip), %rax    # 0x2028d0
movq (%rax), %rax
movabsq $0x105b8b0400, %rcx     # imm = 0x105B8B0400
testq %rcx, %rax
jne 0x6de02
leaq 0x1972be(%rip), %rcx    # 0x204fd0
cmpl $0x0, (%rcx)
je 0x6dd27
leaq 0x2896a6(%rip), %rcx    # 0x2f73c4
cmpl $0x0, (%rcx)
je 0x6de02
cmpq $0x400000, %rax         # imm = 0x400000
setne %al
leaq 0x289c7d(%rip), %rcx    # 0x2f79b4
cmpl $0x0, (%rcx)
setne %cl
orb %al, %cl
cmpb $0x1, %cl
jne 0x6de02
leaq 0x289281(%rip), %rbx    # 0x2f6fd0
movsd (%rbx), %xmm1
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
jne 0x6dd63
jnp 0x6de02
leaq 0x28926e(%rip), %r14    # 0x2f6fd8
movsd (%r14), %xmm1
ucomisd %xmm0, %xmm1
jne 0x6dd7b
jnp 0x6de02
leaq 0x289542(%rip), %r15    # 0x2f72c4
cmpl $0x0, (%r15)
jne 0x6de02
pushq $0x7
popq %rdi
movl $0x1942, %esi           # imm = 0x1942
callq 0x10a99
movl $0x1, (%r15)
movsd 0x853bc(%rip), %xmm0    # 0xf3160
movsd (%rbx), %xmm1
mulsd %xmm0, %xmm1
leaq 0x289255(%rip), %rax    # 0x2f7008
movsd %xmm1, (%rax)
leaq 0x289242(%rip), %rax    # 0x2f7000
mulsd (%r14), %xmm0
movsd %xmm1, (%rax)
leaq 0x28924a(%rip), %rax    # 0x2f7018
movsd %xmm0, (%rax)
leaq 0x289237(%rip), %rax    # 0x2f7010
movsd %xmm0, (%rax)
leaq 0x2b74d0(%rip), %rax    # 0x3252b4
cmpl $0x0, (%rax)
je 0x6de02
callq 0xe6741
xorl %edi, %edi
callq 0xe6975
leaq 0x194a48(%rip), %rax    # 0x202844
movl $0x10f8, (%rax)         # imm = 0x10F8
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x1949bb(%rip), %rax    # 0x2027d8
cmpl $0x0, (%rax)
je 0x6de32
leaq 0x1bb12f(%rip), %rax    # 0x228f58
cmpl $0x0, (%rax)
jne 0x6df21
leaq 0x28896f(%rip), %r14    # 0x2f67a8
movb (%r14), %al
cmpb $0x49, %al
jne 0x6de48
callq 0xa3d24
movb (%r14), %al
leaq 0x1bb0ef(%rip), %rcx    # 0x228f3e
orb (%rcx), %al
jne 0x6df21
orl $-0x1, 0x2e7f46(%rip)   # 0x355da4
callq 0x6b202
callq 0xa9165
callq 0xafe39
callq 0xa3fb8
movl 0x2e7f24(%rip), %eax    # 0x355d9c
cmpl 0x2e7f26(%rip), %eax    # 0x355da4
je 0x6deac
cmpl $0x0, 0x2e7f21(%rip)    # 0x355da8
je 0x6deac
leaq 0x194974(%rip), %rcx    # 0x202804
cmpl $0x259, (%rcx)          # imm = 0x259
jl 0x6deac
incl %eax
movl %eax, 0x2e7efc(%rip)    # 0x355d9c
decl 0x2e7efa(%rip)          # 0x355da0
movl %eax, 0x2e7ef8(%rip)    # 0x355da4
leaq 0x1b8e8b(%rip), %rax    # 0x226d3e
cmpb $0x0, (%rax)
je 0x6dedd
leaq 0x194955(%rip), %rax    # 0x202814
cmpl $0xd, (%rax)
setl %cl
leaq 0x194934(%rip), %rax    # 0x202800
movl (%rax), %eax
cmpl $0x4fa, %eax            # imm = 0x4FA
setge %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x6df26
callq 0xaace9
callq 0xa489c
callq 0xa6dab
callq 0xac56e
callq 0xad146
callq 0xad3c6
callq 0xadc5a
callq 0xaed6d
callq 0xafaad
callq 0xafc73
testl %ebx, %ebx
je 0x6df21
callq 0x54be8
popq %rbx
popq %r14
popq %rbp
jmp 0xaa05
popq %rbx
popq %r14
popq %rbp
retq
cmpl $0x4fa, %eax            # imm = 0x4FA
jl 0x6df37
callq 0xa489c
callq 0xa6dab
leaq 0x194876(%rip), %rax    # 0x2027b4
cmpl $0xc, (%rax)
jl 0x6deec
callq 0xaace9
jmp 0x6deec
// File: /workspace/github_cpp_makefile_star2_O2/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 0x1baf8b(%rip), %rax    # 0x228edc
cmpb $0x0, (%rax)
je 0xaa05
leaq 0x1972d3(%rip), %rax    # 0x205234
cmpb $0x0, (%rax)
jne 0xaa05
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
pushq $0x1
popq %rdi
callq 0x18dee
leaq 0x1baf55(%rip), %rbx    # 0x228ed4
cmpb $0x0, (%rbx)
je 0x6dfde
leaq 0x194945(%rip), %rax    # 0x2028d0
movq (%rax), %rax
cmpq $0x8, %rax
je 0x6dfbb
cmpq $0x10, %rax
je 0x6dfbb
leaq 0x2894f6(%rip), %rax    # 0x2f7497
movb (%rax), %al
cmpb $0x6, %al
leaq 0x2894e8(%rip), %rcx    # 0x2f7494
setne (%rcx)
cmpb $0x3, %al
leaq 0x28949c(%rip), %rax    # 0x2f7454
sete (%rax)
leaq 0x1b8d7c(%rip), %rax    # 0x226d3e
cmpb $0x0, (%rax)
je 0x6dfd3
leaq 0x1b8d6f(%rip), %rax    # 0x226d3d
cmpb $0x0, (%rax)
je 0x6dfdb
pushq $0x1
popq %rdi
callq 0x18cb0
movb $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x286dc5(%rip), %rax    # 0x2f6f69
cmpb $0x0, (%rax)
je 0x7021f
movsd 0x9817f(%rip), %xmm3    # 0x108330
mulsd %xmm1, %xmm3
movsd 0x9817b(%rip), %xmm4    # 0x108338
mulsd %xmm0, %xmm4
addsd %xmm3, %xmm4
movsd 0x98173(%rip), %xmm3    # 0x108340
mulsd %xmm2, %xmm3
addsd %xmm4, %xmm3
movsd 0x9816b(%rip), %xmm4    # 0x108348
mulsd %xmm1, %xmm4
movsd 0x98167(%rip), %xmm5    # 0x108350
mulsd %xmm0, %xmm5
addsd %xmm4, %xmm5
movsd 0x9815f(%rip), %xmm4    # 0x108358
mulsd %xmm2, %xmm4
addsd %xmm5, %xmm4
mulsd 0x98157(%rip), %xmm1    # 0x108360
mulsd 0x98157(%rip), %xmm0    # 0x108368
addsd %xmm1, %xmm0
mulsd 0x98153(%rip), %xmm2    # 0x108370
jmp 0x70293
movsd 0x98151(%rip), %xmm3    # 0x108378
mulsd %xmm1, %xmm3
movsd 0x9814d(%rip), %xmm4    # 0x108380
mulsd %xmm0, %xmm4
addsd %xmm3, %xmm4
movsd 0x98145(%rip), %xmm3    # 0x108388
mulsd %xmm2, %xmm3
addsd %xmm4, %xmm3
movsd 0x9813d(%rip), %xmm4    # 0x108390
mulsd %xmm1, %xmm4
movsd 0x98139(%rip), %xmm5    # 0x108398
mulsd %xmm0, %xmm5
addsd %xmm4, %xmm5
movsd 0x98131(%rip), %xmm4    # 0x1083a0
mulsd %xmm2, %xmm4
addsd %xmm5, %xmm4
mulsd 0x98129(%rip), %xmm1    # 0x1083a8
mulsd 0x98129(%rip), %xmm0    # 0x1083b0
addsd %xmm1, %xmm0
mulsd 0x98125(%rip), %xmm2    # 0x1083b8
addsd %xmm0, %xmm2
movsd %xmm3, 0x2eab21(%rip)   # 0x35adc0
movsd %xmm4, 0x2eab21(%rip)   # 0x35adc8
movsd %xmm2, 0x2eab21(%rip)   # 0x35add0
addsd %xmm4, %xmm3
addsd %xmm2, %xmm3
movsd %xmm3, 0x2eab19(%rip)   # 0x35add8
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x82b99(%rip), %xmm1    # 0xf3148
movapd %xmm1, %xmm2
mulsd %xmm1, %xmm2
mulsd %xmm1, %xmm2
mulsd %xmm1, %xmm2
mulsd %xmm1, %xmm2
movsd %xmm2, -0x8(%rbp)
mulsd 0x97e68(%rip), %xmm1    # 0x108438
mulsd %xmm0, %xmm1
movsd 0x97e64(%rip), %xmm0    # 0x108440
divsd %xmm1, %xmm0
callq 0x96f0
addsd 0x82b0b(%rip), %xmm0    # 0xf30f8
mulsd -0x8(%rbp), %xmm0
movsd 0x97e4e(%rip), %xmm1    # 0x108448
divsd %xmm0, %xmm1
divsd 0x82a4a(%rip), %xmm1    # 0xf3050
movapd %xmm1, %xmm0
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x285f46(%rip), %rbx    # 0x2f6e60
movl (%rbx), %edx
cmpl $0xa, %edx
jl 0x70f33
movl $0xffff, %edi           # imm = 0xFFFF
callq 0x71025
movl (%rbx), %edx
decl %edx
movl %edx, (%rbx)
jmp 0x70f83
testl %edx, %edx
je 0x7101e
cmpl $0x3, %edx
jne 0x70f7d
leaq 0x285e69(%rip), %rax    # 0x2f6db0
movsd (%rax), %xmm0
leaq 0x285efe(%rip), %rax    # 0x2f6e50
movsd %xmm0, (%rax)
leaq 0x285e5b(%rip), %rax    # 0x2f6db8
movsd (%rax), %xmm0
leaq 0x285ef0(%rip), %rax    # 0x2f6e58
movsd %xmm0, (%rax)
movl $0x2, (%rbx)
xorl %edi, %edi
callq 0x71025
movl (%rbx), %edx
jmp 0x70f83
decl %edx
movl %edx, (%rbx)
je 0x70f9e
leaq 0x2b78c6(%rip), %rdi    # 0x328850
leaq 0x9b58c(%rip), %rsi     # 0x10c51d
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x9060
leaq 0x285e0b(%rip), %rax    # 0x2f6db0
movsd (%rax), %xmm0
leaq 0x285ea0(%rip), %rax    # 0x2f6e50
subsd (%rax), %xmm0
andpd 0x821d4(%rip), %xmm0    # 0xf3190
movlpd %xmm0, (%rax)
leaq 0x285e91(%rip), %rcx    # 0x2f6e58
movsd (%rcx), %xmm1
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm1
jne 0x70fd7
jnp 0x71002
divsd %xmm1, %xmm0
movsd %xmm0, (%rax)
mulsd 0x82051(%rip), %xmm0    # 0xf3038
leaq 0x2b7862(%rip), %rdi    # 0x328850
leaq 0x9b555(%rip), %rsi     # 0x10c54a
movb $0x2, %al
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x9060
movups 0x9b58a(%rip), %xmm0    # 0x10c593
leaq 0x2b7840(%rip), %rax    # 0x328850
movaps %xmm0, 0x10(%rax)
movups 0x9b568(%rip), %xmm0    # 0x10c583
movaps %xmm0, (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x1b7f0c(%rip), %rax    # 0x228f3e
cmpb $0x0, (%rax)
je 0x71088
movl %edi, %ebx
movl $0xdc, %edi
callq 0x5707f
pushq $0x6
popq %rdi
callq 0x523f2
movzwl %bx, %ebx
movl %ebx, %edi
callq 0x52599
callq 0x570f8
testw %bx, %bx
jne 0x71088
leaq 0x286ec6(%rip), %rax    # 0x2f7f2c
andl $0x0, (%rax)
leaq 0x286eac(%rip), %rax    # 0x2f7f1c
andl $0x0, (%rax)
leaq 0x286e8e(%rip), %rax    # 0x2f7f08
andq $0x0, (%rax)
leaq 0x286e93(%rip), %rax    # 0x2f7f18
movb $0x0, (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x285dec(%rip), %rax    # 0x2f6e88
xorl %ecx, %ecx
movb %cl, (%rax)
leaq 0x285e21(%rip), %rax    # 0x2f6ec8
andq $0x0, (%rax)
leaq 0x285e0e(%rip), %rax    # 0x2f6ec0
andq $0x0, (%rax)
leaq 0x285dcc(%rip), %rax    # 0x2f6e89
movb %cl, (%rax)
leaq 0x285e12(%rip), %rbx    # 0x2f6ed8
cmpl $0x0, (%rbx)
je 0x710ea
leaq 0x194162(%rip), %rax    # 0x205234
movb $0x1, (%rax)
pushq $0x1
popq %rdi
callq 0x2ca0e
leaq 0x191760(%rip), %rax    # 0x202844
movl $0x7db, (%rax)          # imm = 0x7DB
andl $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x1b785c(%rip), %rax    # 0x228f3e
cmpb $0x0, (%rax)
je 0x7170e
leaq 0x2af932(%rip), %rax    # 0x321020
cmpb $0x0, (%rax)
jne 0x7170e
pushq %rbp
movq %rsp, %rbp
movl $0xdc, %edi
callq 0x5707f
xorl %edi, %edi
callq 0x523f2
popq %rbp
jmp 0x570f8
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x1b6038(%rip), %rax    # 0x228f3e
cmpb $0x0, (%rax)
je 0x72f38
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
movl $0xdc, %edi
callq 0x5707f
pushq $0x9
popq %rdi
callq 0x523f2
movzbl %bl, %edi
callq 0x523f2
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x570f8
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: get_luxor_config()
void get_luxor_config()
{
   if(luxor == 0) return;

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

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

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

// Assembly:
leaq 0x1b5ffe(%rip), %rax    # 0x228f3e
cmpb $0x0, (%rax)
je 0x730b8
pushq %rbp
movq %rsp, %rbp
callq 0x51dc3
cvtss2sd %xmm0, %xmm0
leaq 0x1921c3(%rip), %rax    # 0x205120
movsd %xmm0, (%rax)
callq 0x51dc3
cvtss2sd %xmm0, %xmm0
leaq 0x1921a7(%rip), %rax    # 0x205118
movsd %xmm0, (%rax)
callq 0x51dc3
cvtss2sd %xmm0, %xmm0
leaq 0x19218b(%rip), %rax    # 0x205110
movsd %xmm0, (%rax)
callq 0x51dc3
cvtss2sd %xmm0, %xmm0
leaq 0x19218f(%rip), %rax    # 0x205128
movsd %xmm0, (%rax)
callq 0x51dc3
cvtss2sd %xmm0, %xmm0
leaq 0x192153(%rip), %rax    # 0x205100
movsd %xmm0, (%rax)
callq 0x51dc3
cvtss2sd %xmm0, %xmm0
leaq 0x192137(%rip), %rax    # 0x2050f8
movsd %xmm0, (%rax)
callq 0x51dc3
cvtss2sd %xmm0, %xmm0
leaq 0x19211b(%rip), %rax    # 0x2050f0
movsd %xmm0, (%rax)
callq 0x51dc3
cvtss2sd %xmm0, %xmm0
leaq 0x19211f(%rip), %rax    # 0x205108
movsd %xmm0, (%rax)
callq 0x51dc3
cvtss2sd %xmm0, %xmm0
leaq 0x19213b(%rip), %rax    # 0x205138
movsd %xmm0, (%rax)
callq 0x51dc3
cvtss2sd %xmm0, %xmm0
leaq 0x19211f(%rip), %rax    # 0x205130
movsd %xmm0, (%rax)
callq 0x51dc3
cvtss2sd %xmm0, %xmm0
leaq 0x19211b(%rip), %rax    # 0x205140
movsd %xmm0, (%rax)
callq 0x51dc3
cvtss2sd %xmm0, %xmm0
leaq 0x19210f(%rip), %rax    # 0x205148
movsd %xmm0, (%rax)
callq 0x51dc3
cvtss2sd %xmm0, %xmm0
leaq 0x192103(%rip), %rax    # 0x205150
movsd %xmm0, (%rax)
callq 0x51dc3
cvttss2si %xmm0, %eax
leaq 0x283daf(%rip), %rcx    # 0x2f6e10
movb %al, (%rcx)
callq 0x51dc3
cvttss2si %xmm0, %eax
leaq 0x283d9e(%rip), %rcx    # 0x2f6e11
movb %al, (%rcx)
callq 0x51dc3
cvtss2sd %xmm0, %xmm0
leaq 0x283d5b(%rip), %rax    # 0x2f6de0
movsd %xmm0, (%rax)
callq 0x51dc3
cvtss2sd %xmm0, %xmm0
leaq 0x283d4f(%rip), %rax    # 0x2f6de8
movsd %xmm0, (%rax)
callq 0x51c47
leaq 0x283d6b(%rip), %rcx    # 0x2f6e14
movb %al, (%rcx)
callq 0x732ab
xorl %edi, %edi
popq %rbp
jmp 0x52194
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: get_luxor_cal()
void get_luxor_cal()
{
   if(luxor == 0) return;

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

   check_tsip_end(1);
}

// Assembly:
leaq 0x1b5e7e(%rip), %rax    # 0x228f3e
cmpb $0x0, (%rax)
je 0x73265
pushq %rbp
movq %rsp, %rbp
callq 0x51dc3
cvtss2sd %xmm0, %xmm0
leaq 0x192083(%rip), %rax    # 0x205160
movsd %xmm0, (%rax)
callq 0x51dc3
cvtss2sd %xmm0, %xmm0
leaq 0x192077(%rip), %rax    # 0x205168
movsd %xmm0, (%rax)
callq 0x51dc3
cvtss2sd %xmm0, %xmm0
leaq 0x19206b(%rip), %rax    # 0x205170
movsd %xmm0, (%rax)
callq 0x51dc3
cvtss2sd %xmm0, %xmm0
leaq 0x19205f(%rip), %rax    # 0x205178
movsd %xmm0, (%rax)
callq 0x51dc3
cvtss2sd %xmm0, %xmm0
leaq 0x192053(%rip), %rax    # 0x205180
movsd %xmm0, (%rax)
callq 0x51dc3
cvtss2sd %xmm0, %xmm0
leaq 0x192047(%rip), %rax    # 0x205188
movsd %xmm0, (%rax)
callq 0x51dc3
cvtss2sd %xmm0, %xmm0
leaq 0x19203b(%rip), %rax    # 0x205190
movsd %xmm0, (%rax)
callq 0x51dc3
cvtss2sd %xmm0, %xmm0
leaq 0x19202f(%rip), %rax    # 0x205198
movsd %xmm0, (%rax)
callq 0x51dc3
cvtss2sd %xmm0, %xmm0
leaq 0x192023(%rip), %rax    # 0x2051a0
movsd %xmm0, (%rax)
callq 0x51dc3
cvtss2sd %xmm0, %xmm0
leaq 0x192017(%rip), %rax    # 0x2051a8
movsd %xmm0, (%rax)
callq 0x51dc3
cvtss2sd %xmm0, %xmm0
leaq 0x19200b(%rip), %rax    # 0x2051b0
movsd %xmm0, (%rax)
callq 0x51dc3
cvtss2sd %xmm0, %xmm0
leaq 0x191fff(%rip), %rax    # 0x2051b8
movsd %xmm0, (%rax)
callq 0x51dc3
cvtss2sd %xmm0, %xmm0
leaq 0x191ff3(%rip), %rax    # 0x2051c0
movsd %xmm0, (%rax)
callq 0x51dc3
cvtss2sd %xmm0, %xmm0
leaq 0x191fe7(%rip), %rax    # 0x2051c8
movsd %xmm0, (%rax)
callq 0x51dc3
cvtss2sd %xmm0, %xmm0
leaq 0x191fdb(%rip), %rax    # 0x2051d0
movsd %xmm0, (%rax)
callq 0x51dc3
cvtss2sd %xmm0, %xmm0
leaq 0x191fcf(%rip), %rax    # 0x2051d8
movsd %xmm0, (%rax)
callq 0x51dc3
cvtss2sd %xmm0, %xmm0
leaq 0x191fc3(%rip), %rax    # 0x2051e0
movsd %xmm0, (%rax)
callq 0x51dc3
cvtss2sd %xmm0, %xmm0
leaq 0x191fb7(%rip), %rax    # 0x2051e8
movsd %xmm0, (%rax)
callq 0x51dc3
cvtss2sd %xmm0, %xmm0
leaq 0x191fab(%rip), %rax    # 0x2051f0
movsd %xmm0, (%rax)
callq 0x51dc3
cvtss2sd %xmm0, %xmm0
leaq 0x191f9f(%rip), %rax    # 0x2051f8
movsd %xmm0, (%rax)
xorl %edi, %edi
popq %rbp
jmp 0x52194
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: set_luxor_sens(unsigned char, unsigned char)
void set_luxor_sens(u08 lux1, u08 lux2)
{
   if(luxor == 0) return;

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

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x283b5e(%rip), %rax    # 0x2f6e14
movzbl (%rax), %ecx
cmpl $0x9, %ecx
je 0x732d6
cmpl $0x8, %ecx
jne 0x732ec
leaq 0x283b4e(%rip), %rax    # 0x2f6e18
movabsq $0x3f70000000000000, %rcx # imm = 0x3F70000000000000
jmp 0x732e7
leaq 0x283b3b(%rip), %rax    # 0x2f6e18
movabsq $0x3f60000000000000, %rcx # imm = 0x3F60000000000000
movq %rcx, (%rax)
jmp 0x73303
leaq 0x283b25(%rip), %rcx    # 0x2f6e18
movabsq $0x3f50000000000000, %rdx # imm = 0x3F50000000000000
movq %rdx, (%rcx)
movb $0xa, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: set_luxor_config()
void set_luxor_config()
{
   if(luxor == 0) return;

   send_tsip_start(LUXOR_ID); 
   send_byte(0x07);
   send_single((float) batt_lvc);
   send_single((float) batt_hvc);
   send_single((float) batt_ovc);
   send_single((float) batt_watts);
   send_single((float) load_lvc);
   send_single((float) load_hvc);
   send_single((float) load_ovc);
   send_single((float) load_watts);
   send_single((float) auxv_lvc);
   send_single((float) auxv_hvc);
   send_single((float) tc1_ovt);
   send_single((float) tc2_ovt);
   send_single((float) msg_timeout);

   send_single((float) lux1_time);
   send_single((float) lux2_time);
   send_single((float) emis1);
   send_single((float) emis2);

   send_byte(batt_pwm_res);
   send_tsip_end();

   set_pwm_step();

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

// Assembly:
leaq 0x1b5c32(%rip), %rax    # 0x228f3e
cmpb $0x0, (%rax)
je 0x73465
pushq %rbp
movq %rsp, %rbp
movl $0xdc, %edi
callq 0x5707f
pushq $0x7
popq %rdi
callq 0x523f2
leaq 0x191dee(%rip), %rax    # 0x205120
cvtsd2ss (%rax), %xmm0
callq 0x52673
leaq 0x191dd6(%rip), %rax    # 0x205118
cvtsd2ss (%rax), %xmm0
callq 0x52673
leaq 0x191dbe(%rip), %rax    # 0x205110
cvtsd2ss (%rax), %xmm0
callq 0x52673
leaq 0x191dc6(%rip), %rax    # 0x205128
cvtsd2ss (%rax), %xmm0
callq 0x52673
leaq 0x191d8e(%rip), %rax    # 0x205100
cvtsd2ss (%rax), %xmm0
callq 0x52673
leaq 0x191d76(%rip), %rax    # 0x2050f8
cvtsd2ss (%rax), %xmm0
callq 0x52673
leaq 0x191d5e(%rip), %rax    # 0x2050f0
cvtsd2ss (%rax), %xmm0
callq 0x52673
leaq 0x191d66(%rip), %rax    # 0x205108
cvtsd2ss (%rax), %xmm0
callq 0x52673
leaq 0x191d86(%rip), %rax    # 0x205138
cvtsd2ss (%rax), %xmm0
callq 0x52673
leaq 0x191d6e(%rip), %rax    # 0x205130
cvtsd2ss (%rax), %xmm0
callq 0x52673
leaq 0x191d6e(%rip), %rax    # 0x205140
cvtsd2ss (%rax), %xmm0
callq 0x52673
leaq 0x191d66(%rip), %rax    # 0x205148
cvtsd2ss (%rax), %xmm0
callq 0x52673
leaq 0x191d5e(%rip), %rax    # 0x205150
cvtsd2ss (%rax), %xmm0
callq 0x52673
leaq 0x283a0e(%rip), %rax    # 0x2f6e10
movzbl (%rax), %eax
cvtsi2ss %eax, %xmm0
callq 0x52673
leaq 0x2839fc(%rip), %rax    # 0x2f6e11
movzbl (%rax), %eax
cvtsi2ss %eax, %xmm0
callq 0x52673
leaq 0x2839b8(%rip), %rax    # 0x2f6de0
cvtsd2ss (%rax), %xmm0
callq 0x52673
leaq 0x2839b0(%rip), %rax    # 0x2f6de8
cvtsd2ss (%rax), %xmm0
callq 0x52673
leaq 0x2839cc(%rip), %rax    # 0x2f6e14
movzbl (%rax), %edi
callq 0x523f2
callq 0x570f8
callq 0x732ab
movl $0x1f4, %edi            # imm = 0x1F4
popq %rbp
jmp 0xae83
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: set_luxor_cal()
void set_luxor_cal()
{
   if(luxor == 0) return;

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

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

// Assembly:
leaq 0x1b5ad1(%rip), %rax    # 0x228f3e
cmpb $0x0, (%rax)
je 0x735dc
pushq %rbp
movq %rsp, %rbp
movl $0xdc, %edi
callq 0x5707f
pushq $0x11
popq %rdi
callq 0x523f2
leaq 0x191ccd(%rip), %rax    # 0x205160
cvtsd2ss (%rax), %xmm0
callq 0x52673
leaq 0x191cc5(%rip), %rax    # 0x205168
cvtsd2ss (%rax), %xmm0
callq 0x52673
leaq 0x191cbd(%rip), %rax    # 0x205170
cvtsd2ss (%rax), %xmm0
callq 0x52673
leaq 0x191cb5(%rip), %rax    # 0x205178
cvtsd2ss (%rax), %xmm0
callq 0x52673
leaq 0x191cad(%rip), %rax    # 0x205180
cvtsd2ss (%rax), %xmm0
callq 0x52673
leaq 0x191ca5(%rip), %rax    # 0x205188
cvtsd2ss (%rax), %xmm0
callq 0x52673
leaq 0x191c9d(%rip), %rax    # 0x205190
cvtsd2ss (%rax), %xmm0
callq 0x52673
leaq 0x191c95(%rip), %rax    # 0x205198
cvtsd2ss (%rax), %xmm0
callq 0x52673
leaq 0x191c8d(%rip), %rax    # 0x2051a0
cvtsd2ss (%rax), %xmm0
callq 0x52673
leaq 0x191c85(%rip), %rax    # 0x2051a8
cvtsd2ss (%rax), %xmm0
callq 0x52673
leaq 0x191c7d(%rip), %rax    # 0x2051b0
cvtsd2ss (%rax), %xmm0
callq 0x52673
leaq 0x191c75(%rip), %rax    # 0x2051b8
cvtsd2ss (%rax), %xmm0
callq 0x52673
leaq 0x191c6d(%rip), %rax    # 0x2051c0
cvtsd2ss (%rax), %xmm0
callq 0x52673
leaq 0x191c65(%rip), %rax    # 0x2051c8
cvtsd2ss (%rax), %xmm0
callq 0x52673
leaq 0x191c5d(%rip), %rax    # 0x2051d0
cvtsd2ss (%rax), %xmm0
callq 0x52673
leaq 0x191c55(%rip), %rax    # 0x2051d8
cvtsd2ss (%rax), %xmm0
callq 0x52673
leaq 0x191c4d(%rip), %rax    # 0x2051e0
cvtsd2ss (%rax), %xmm0
callq 0x52673
leaq 0x191c45(%rip), %rax    # 0x2051e8
cvtsd2ss (%rax), %xmm0
callq 0x52673
leaq 0x191c3d(%rip), %rax    # 0x2051f0
cvtsd2ss (%rax), %xmm0
callq 0x52673
leaq 0x191c35(%rip), %rax    # 0x2051f8
cvtsd2ss (%rax), %xmm0
callq 0x52673
callq 0x570f8
movl $0x1f4, %edi            # imm = 0x1F4
popq %rbp
jmp 0xae83
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: set_luxor_runtime(unsigned int)
void set_luxor_runtime(u32 seconds)
{
   if(luxor == 0) return;

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

// Assembly:
leaq 0x1b595a(%rip), %rax    # 0x228f3e
cmpb $0x0, (%rax)
je 0x73615
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
movl $0xdc, %edi
callq 0x5707f
pushq $0xa
popq %rdi
callq 0x523f2
movl %ebx, %edi
callq 0x525e2
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x570f8
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: set_luxor_delay(unsigned short)
void set_luxor_delay(u16 msecs)
{
   if(luxor == 0) return;

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

// Assembly:
leaq 0x1b5921(%rip), %rax    # 0x228f3e
cmpb $0x0, (%rax)
je 0x7364f
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
movl $0xdc, %edi
callq 0x5707f
pushq $0xb
popq %rdi
callq 0x523f2
movzwl %bx, %edi
callq 0x52599
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x570f8
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: set_emissivity(double, double)
void set_emissivity(DATA_SIZE em1, DATA_SIZE em2)
{
   if(luxor) {
      send_tsip_start(LUXOR_ID); 
      send_byte(0x04);
      send_single((float) em1);
      send_single((float) em2);
      send_tsip_end();
   }
   else if((rcvr_type == THERMO_RCVR) && (enviro_type == LFS_ENVIRO) && (enviro_sensors & ENV_EMIS)) {
      sprintf(out, "PEMIS%d\r", (int) (em1*100.0));
      send_enviro_cmd(out, RCVR_PORT);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x18, %rsp
leaq 0x1b56a6(%rip), %rax    # 0x228f3e
cmpb $0x0, (%rax)
je 0x738d8
movl $0xdc, %edi
movsd %xmm0, -0x10(%rbp)
movsd %xmm1, -0x18(%rbp)
callq 0x5707f
pushq $0x4
popq %rdi
callq 0x523f2
cvtsd2ss -0x10(%rbp), %xmm0
callq 0x52673
cvtsd2ss -0x18(%rbp), %xmm0
callq 0x52673
addq $0x18, %rsp
popq %rbx
popq %rbp
jmp 0x570f8
leaq 0x18eff1(%rip), %rax    # 0x2028d0
cmpq $0x80000, (%rax)        # imm = 0x80000
jne 0x73901
leaq 0x18f025(%rip), %rax    # 0x202914
cmpl $0x3, (%rax)
jne 0x73901
leaq 0x18f025(%rip), %rax    # 0x202920
testb $0x4, 0x1(%rax)
jne 0x73908
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
mulsd 0x7f750(%rip), %xmm0    # 0xf3060
cvttsd2si %xmm0, %edx
leaq 0x2b2905(%rip), %rbx    # 0x326220
leaq 0x9912c(%rip), %rsi     # 0x10ca4e
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
pushq $0xa
popq %rsi
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %rbp
jmp 0x593cc
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: set_cal_mode(unsigned char)
void set_cal_mode(u08 cal_mode)
{
   if(luxor == 0) return;

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

// Assembly:
leaq 0x1b55fa(%rip), %rax    # 0x228f3e
cmpb $0x0, (%rax)
je 0x73976
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
movl $0xdc, %edi
callq 0x5707f
pushq $0x5
popq %rdi
callq 0x523f2
movzbl %bl, %edi
callq 0x523f2
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x570f8
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: get_timing_msg()
void get_timing_msg()
{
   subcode = tsip_byte();

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

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0x51c47
leaq 0x1b55d7(%rip), %rcx    # 0x228f5e
movb %al, (%rcx)
movzbl %al, %edi
leal -0xa0(%rdi), %eax
cmpl $0xe, %eax
jbe 0x739b5
leal -0x41(%rdi), %eax
cmpl $0xd, %eax
ja 0x739cb
leaq 0x9550a(%rip), %rcx     # 0x108eb0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
popq %rbp
jmp 0x6ae7d
leaq 0x9552c(%rip), %rcx     # 0x108ee8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
popq %rbp
jmp 0x6b32c
cmpl $0x26, %edi
je 0x73a81
cmpl $0x14, %edi
je 0x73a6e
cmpl $0x15, %edi
je 0x73a7b
cmpl $0x20, %edi
je 0x73a75
cmpl $0xb, %edi
jne 0x739fa
popq %rbp
jmp 0x6bc63
orl $0x8f00, %edi           # imm = 0x8F00
jmp 0x73a86
popq %rbp
jmp 0x6b417
popq %rbp
jmp 0x6b3f5
popq %rbp
jmp 0x6b544
popq %rbp
jmp 0x6b362
movl $0x8fad, %edi           # imm = 0x8FAD
jmp 0x73a86
popq %rbp
jmp 0x6b395
popq %rbp
jmp 0x6bb0a
pushq $0x1
popq %rdi
popq %rbp
jmp 0x6c10a
pushq $0x1
popq %rdi
popq %rbp
jmp 0x6caa5
popq %rbp
jmp 0x6f501
movl $0x8f4d, %edi           # imm = 0x8F4D
jmp 0x73a86
movl $0x8f4b, %edi           # imm = 0x8F4B
jmp 0x73a86
popq %rbp
jmp 0x6b0ee
popq %rbp
jmp 0x6b125
popq %rbp
jmp 0x6b05f
popq %rbp
jmp 0x6b2f9
movl $0x8f14, %edi           # imm = 0x8F14
jmp 0x73a86
popq %rbp
jmp 0x6ae6c
popq %rbp
jmp 0x6ad98
movl $0x8f26, %edi           # imm = 0x8F26
popq %rbp
jmp 0x73a8c
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: get_unknown_msg(unsigned short)
void get_unknown_msg(u16 msg_id)
{
   if(msg_id == 0x13) {
      msg_id = get_next_tsip();
      if(log_comments && (log_stream & LOG_HEX_STREAM) && log_file) {
         fprintf(log_file, "#!! Message rejected: %02X\n      ", msg_id);
         if(log_flush_mode) fflush(log_file);
         kol = (-1);
      }
   }
   else {
      if(log_comments && (log_stream & LOG_HEX_STREAM) && log_file) {
         fprintf(log_file, "#!! Unknown message: id %02X:\n      ", msg_id);
         if(log_flush_mode) fflush(log_file);
         kol = (-1);
      }
   }

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpl $0x13, %edi
jne 0x73ad3
callq 0x51b3c
leaq 0x1b4973(%rip), %rcx    # 0x228414
cmpb $0x0, (%rcx)
je 0x73b32
leaq 0x1b495f(%rip), %rcx    # 0x228410
leaq 0x1b48a8(%rip), %rdx    # 0x228360
movq (%rdx), %rdi
testq %rdi, %rdi
setne %dl
andb (%rcx), %dl
cmpb $0x1, %dl
jne 0x73b32
leaq 0x98f88(%rip), %rsi     # 0x10ca57
movl %eax, %edx
jmp 0x73b06
leaq 0x1b493a(%rip), %rax    # 0x228414
cmpb $0x0, (%rax)
je 0x73b32
movl %edi, %edx
leaq 0x1b4928(%rip), %rax    # 0x228410
leaq 0x1b4871(%rip), %rcx    # 0x228360
movq (%rcx), %rdi
testq %rdi, %rdi
setne %cl
andb (%rax), %cl
cmpb $0x1, %cl
jne 0x73b32
leaq 0x98f73(%rip), %rsi     # 0x10ca79
xorl %eax, %eax
callq 0x9560
leaq 0x1b490c(%rip), %rax    # 0x228420
cmpl $0x0, (%rax)
je 0x73b28
leaq 0x1b4840(%rip), %rax    # 0x228360
movq (%rax), %rdi
callq 0x9420
leaq 0x1b5435(%rip), %rax    # 0x228f64
orl $-0x1, (%rax)
leaq 0x2ae719(%rip), %rax    # 0x322252
andw $0x0, (%rax)
leaq 0x2ae710(%rip), %rax    # 0x322254
andw $0x0, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: new_packet(int)
void new_packet(int redraw)
{
   ++packet_count;
   if(packet_count == 1L) {
      if(redraw) need_redraw = 3333;  // get rid of any "no serial..." message
   }

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

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

// Assembly:
leaq 0x1b5245(%rip), %rax    # 0x228f74
movl (%rax), %ecx
leal 0x1(%rcx), %edx
movl %edx, (%rax)
testl %ecx, %ecx
setne %al
testl %edi, %edi
sete %cl
orb %al, %cl
jne 0x73d51
leaq 0x18eaf9(%rip), %rax    # 0x202844
movl $0xd05, (%rax)          # imm = 0xD05
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x1b521a(%rip), %rbx    # 0x228f78
cmpl $0x2, (%rbx)
jne 0x73d74
pushq $0x7
popq %rdi
pushq $0x64
popq %rsi
callq 0x10a99
movl $0x3, (%rbx)
leaq 0x1b5215(%rip), %rbx    # 0x228f90
cmpl $0x0, (%rbx)
je 0x73dc4
leaq 0x18eb49(%rip), %rax    # 0x2028d0
cmpq $0x400000, (%rax)       # imm = 0x400000
jne 0x73dc4
leaq 0x283565(%rip), %rax    # 0x2f72fc
cmpl $0x0, (%rax)
je 0x73dc4
leaq 0x2834a9(%rip), %rax    # 0x2f724c
cmpl $0x0, (%rax)
je 0x73dc4
leaq 0x283489(%rip), %rax    # 0x2f7238
cmpl $0x0, (%rax)
je 0x73dc4
pushq $0x7
popq %rdi
movl $0xde, %esi
callq 0x10a99
andl $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: start_msg_decode(int)
void start_msg_decode(int redraw)
{
   // prepare to decode a receiver message

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

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

   flush_debug();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x1b5196(%rip), %rax    # 0x228f6c
andl $0x0, (%rax)
leaq 0x2ae474(%rip), %rax    # 0x322254
andw $0x0, (%rax)
leaq 0x2af47d(%rip), %rax    # 0x323268
andl $0x0, (%rax)
leaq 0x2b0483(%rip), %rax    # 0x324278
andl $0x0, (%rax)
leaq 0x1b5199(%rip), %rax    # 0x228f98
incq (%rax)
leaq 0x1b5167(%rip), %rax    # 0x228f70
andl $0x0, (%rax)
leaq 0x2ad216(%rip), %rax    # 0x321029
movb $0x0, (%rax)
leaq 0x1b513f(%rip), %rax    # 0x228f5c
movzwl (%rax), %eax
movl %eax, 0x2e1f9e(%rip)    # 0x355dc4
andw $0x0, 0x2e1f92(%rip)    # 0x355dc0
callq 0x73d28
popq %rbp
jmp 0x51408
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_rt17_posn(int)
void parse_rt17_posn(int rif)
{
int flags;
int count;
int i;
double clock;
double freq;

   log_packet_id("Position");

   lat = tsip_double() * PI;
   lon = tsip_double() * PI;
   alt = tsip_double();
   clock = tsip_double();  // clock offset (meters)
   freq = tsip_double();   // freq offset (from 1536*1.023MHz)
   pdop = (float) tsip_double();
   have_dops |= PDOP;
   tsip_double();   // lat rate
   tsip_double();   // lon rate
   tsip_double();   // alt rate
   tsip_dword();    // time tag (msecs)
   flags = tsip_byte();
   count = tsip_byte();

   if(     (flags & 0x07) == 0x00) rcvr_mode = RCVR_MODE_SINGLE;
   else if((flags & 0x07) == 0x01) rcvr_mode = RCVR_MODE_2D;
   else if((flags & 0x07) == 0x02) rcvr_mode = RCVR_MODE_2DCLK;
   else if((flags & 0x07) == 0x03) rcvr_mode = RCVR_MODE_2D_3D;
   else if((flags & 0x07) == 0x04) rcvr_mode = RCVR_MODE_3D;
   else if((flags & 0x07) == 0x05) rcvr_mode = RCVR_MODE_DGPS;  // RTK/SBAS
   else                            rcvr_mode = RCVR_MODE_UNKNOWN; 

   for(i=0; i<count; i++) {  // channel numbers
      tsip_byte();
   }
   for(i=0; i<count; i++) {  // prn numbers
      tsip_byte();
   }

clock = (clock / (LIGHTSPEED*1000.0)); // convert meters to secs
clock *= 1.0E9;  // nsecs
pps_offset = clock;
have_pps_offset = 17;
osc_offset = freq;
have_osc_offset = 17;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
leaq 0x9884d(%rip), %rdi     # 0x10cad0
callq 0x520bf
callq 0x51e6f
mulsd 0x8160b(%rip), %xmm0    # 0xf58a0
leaq 0x282d34(%rip), %rax    # 0x2f6fd0
movsd %xmm0, (%rax)
callq 0x51e6f
mulsd 0x815f3(%rip), %xmm0    # 0xf58a0
leaq 0x282d24(%rip), %rax    # 0x2f6fd8
movsd %xmm0, (%rax)
callq 0x51e6f
leaq 0x282d1c(%rip), %rax    # 0x2f6fe0
movsd %xmm0, (%rax)
callq 0x51e6f
movsd %xmm0, -0x18(%rbp)
callq 0x51e6f
movsd %xmm0, -0x20(%rbp)
callq 0x51e6f
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x1991f8(%rip), %rax    # 0x20d4e8
movsd %xmm0, (%rax)
leaq 0x1991e9(%rip), %rax    # 0x20d4e4
orb $0x1, (%rax)
callq 0x51e6f
callq 0x51e6f
callq 0x51e6f
callq 0x51cf3
callq 0x51c47
movl %eax, %ebx
callq 0x51c47
shlb $0x3, %bl
movabsq $0x6363050400060301, %rdx # imm = 0x6363050400060301
movl %ebx, %ecx
shrq %cl, %rdx
movzbl %al, %ebx
leaq 0x282d96(%rip), %rax    # 0x2f70d0
movb %dl, (%rax)
movl %ebx, %r14d
subl $0x1, %r14d
jb 0x74351
callq 0x51c47
jmp 0x7433f
callq 0x51c47
subl $0x1, %ebx
jae 0x7434c
movsd -0x18(%rbp), %xmm0
divsd 0x81585(%rip), %xmm0    # 0xf58e8
mulsd 0x7ecbd(%rip), %xmm0    # 0xf3028
leaq 0x282446(%rip), %rax    # 0x2f67b8
movsd %xmm0, (%rax)
leaq 0x282ebb(%rip), %rax    # 0x2f7238
pushq $0x11
popq %rcx
movl %ecx, (%rax)
leaq 0x282437(%rip), %rax    # 0x2f67c0
movsd -0x20(%rbp), %xmm0
movsd %xmm0, (%rax)
leaq 0x282e9b(%rip), %rax    # 0x2f7234
movl %ecx, (%rax)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq