LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathui.cpp
// Function: edit_ticc_timeout()
void edit_ticc_timeout()
{
unsigned port;
int val;

   if(rcvr_type == TICC_RCVR) port = RCVR_PORT;
   else if(ticc_port_open())  port = TICC_PORT;
   else {
      edit_error("No TICC device found.");
      return;
   }

   val = (int) atof(edit_buffer);
   sprintf(out, "T%d", val);
   set_ticc_config(port, out);

   get_ticc_config(port);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x1e2afb(%rip), %rax    # 0x2188d0
movl $0xa, %ebx
cmpq $0x10000, (%rax)        # imm = 0x10000
je 0x35df1
callq 0x702e7
movl $0xd, %ebx
testl %eax, %eax
je 0x35e2e
leaq 0x3094e8(%rip), %rdi    # 0x33f2e0
callq 0x9470
cvttsd2si %xmm0, %edx
leaq 0x306418(%rip), %r14    # 0x33c220
leaq 0xd7a5c(%rip), %rsi     # 0x10d86b
movq %r14, %rdi
xorl %eax, %eax
callq 0x9060
movl %ebx, %edi
movq %r14, %rsi
callq 0x64550
movl %ebx, %edi
popq %rbx
popq %r14
popq %rbp
jmp 0x646d3
leaq 0xdfc30(%rip), %rdi     # 0x115a65
popq %rbx
popq %r14
popq %rbp
jmp 0x23027
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathui.cpp
// Function: edit_ticc_speed()
void edit_ticc_speed()
{
unsigned port;
double val;

   if(rcvr_type == TICC_RCVR) port = RCVR_PORT;
   else if(ticc_port_open())  port = TICC_PORT;
   else {
      edit_error("No TICC device found.");
      return;
   }

   val = atof(edit_buffer);
   sprintf(out, "S%.6f", val);
   set_ticc_config(port, out);

   get_ticc_config(port);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x1e2a84(%rip), %rax    # 0x2188d0
movl $0xa, %ebx
cmpq $0x10000, (%rax)        # imm = 0x10000
je 0x35e68
callq 0x702e7
movl $0xd, %ebx
testl %eax, %eax
je 0x35ea1
leaq 0x309471(%rip), %rdi    # 0x33f2e0
callq 0x9470
leaq 0x3063a5(%rip), %r14    # 0x33c220
leaq 0xdfce7(%rip), %rsi     # 0x115b69
movq %r14, %rdi
movb $0x1, %al
callq 0x9060
movl %ebx, %edi
movq %r14, %rsi
callq 0x64550
movl %ebx, %edi
popq %rbx
popq %r14
popq %rbp
jmp 0x646d3
leaq 0xdfbbd(%rip), %rdi     # 0x115a65
popq %rbx
popq %r14
popq %rbp
jmp 0x23027
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathui.cpp
// Function: set_nominal_freqs(double)
void set_nominal_freqs(double dval)
{
    // set nominal freq val and phase wrap interval for all channels.
    if(dval == 0.0) dval = NOMINAL_FREQ;

    nominal_cha_freq = dval;
    nominal_chb_freq = dval;
    nominal_chc_freq = dval;
    nominal_chd_freq = dval;
    if(nominal_cha_freq) cha_phase_wrap_interval = (1.0 / nominal_cha_freq);  // !!!!! what about chc and chd
    if(nominal_chb_freq) chb_phase_wrap_interval = (1.0 / nominal_chb_freq);
    if(nominal_chc_freq) chc_phase_wrap_interval = (1.0 / nominal_chc_freq);  // !!!!! what about chc and chd
    if(nominal_chd_freq) chc_phase_wrap_interval = (1.0 / nominal_chd_freq);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorpd %xmm1, %xmm1
cmpeqsd %xmm0, %xmm1
movsd 0xd599f(%rip), %xmm2    # 0x10b8d8
andpd %xmm1, %xmm2
andnpd %xmm0, %xmm1
orpd %xmm2, %xmm1
leaq 0x2d6a1c(%rip), %rax    # 0x30c968
movlpd %xmm1, (%rax)
leaq 0x2d6a19(%rip), %rax    # 0x30c970
movlpd %xmm1, (%rax)
leaq 0x2d6a16(%rip), %rax    # 0x30c978
movlpd %xmm1, (%rax)
leaq 0x2d6a13(%rip), %rax    # 0x30c980
movlpd %xmm1, (%rax)
movsd 0xd30f7(%rip), %xmm0    # 0x109070
divsd %xmm1, %xmm0
leaq 0x2d6a04(%rip), %rax    # 0x30c988
movsd %xmm0, (%rax)
leaq 0x2d6a01(%rip), %rax    # 0x30c990
movsd %xmm0, (%rax)
leaq 0x2d69fe(%rip), %rax    # 0x30c998
movsd %xmm0, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathui.cpp
// Function: update_delta_t_file()
void update_delta_t_file()
{
FILE *file;

   // write user delta-t value to deltat.dat file

   file = fopen(DELTAT_FILE, "w");
   if(file) {
      fprintf(file, "%.6f\n", user_delta_t);
      fclose(file);
      file = 0;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0xdfbc8(%rip), %rdi     # 0x115b75
leaq 0xeb407(%rip), %rsi     # 0x1213bb
callq 0x9430
testq %rax, %rax
je 0x35feb
movq %rax, %rbx
leaq 0x2d7528(%rip), %rax    # 0x30d4f0
movsd (%rax), %xmm0
leaq 0xec22f(%rip), %rsi     # 0x122202
movq %rbx, %rdi
movb $0x1, %al
callq 0x9560
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x9370
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathui.cpp
// Function: reset_eph_flags()
void reset_eph_flags()
{
int prn;

   for(prn=1; prn<MAX_PRN; prn++) {
      sat[prn].eph_valid = 0;
      sat[prn].eph_flag = 0;
   }
   have_range = 0;
   eph_polled = 0;
}

// Assembly:
movl $0x58c, %eax            # imm = 0x58C
leaq 0x2060a2(%rip), %rcx    # 0x23efb0
movl $0x0, (%rcx,%rax)
movb $0x0, -0x42(%rcx,%rax)
addq $0x348, %rax            # imm = 0x348
cmpq $0xcd03c, %rax          # imm = 0xCD03C
jne 0x38f0e
pushq %rbp
movq %rsp, %rbp
leaq 0x2d4415(%rip), %rax    # 0x30d348
xorl %ecx, %ecx
movl %ecx, (%rax)
leaq 0x2d450e(%rip), %rax    # 0x30d44c
movl %ecx, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathui.cpp
// Function: erase_debug_info()
void erase_debug_info()
{
   debug_text[0] = 0;  // erase debug info strings
   debug_text2[0] = 0;
   debug_text3[0] = 0;
   debug_text4[0] = 0;
   debug_text5[0] = 0;
   debug_text6[0] = 0;
   debug_text7[0] = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x305a53(%rip), %rax    # 0x33e9a0
xorl %ecx, %ecx
movb %cl, (%rax)
leaq 0x305b98(%rip), %rax    # 0x33eaf0
movb %cl, (%rax)
leaq 0x305cdf(%rip), %rax    # 0x33ec40
movb %cl, (%rax)
leaq 0x305e26(%rip), %rax    # 0x33ed90
movb %cl, (%rax)
leaq 0x305f6d(%rip), %rax    # 0x33eee0
movb %cl, (%rax)
leaq 0x3060b4(%rip), %rax    # 0x33f030
movb %cl, (%rax)
leaq 0x3061fb(%rip), %rax    # 0x33f180
movb %cl, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathui.cpp
// Function: set_steps()
void set_steps()
{
   scale_step = plot[selected_plot].scale_factor*(DATA_SIZE) 0.01;
   center_step = (DATA_SIZE) 0.0;
   if(plot[selected_plot].ref_scale) {
      center_step = plot[selected_plot].scale_factor/(plot[selected_plot].ref_scale*(DATA_SIZE)10.0);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x306b4d(%rip), %rax    # 0x33fd58
movslq (%rax), %rax
imulq $0xe8, %rax, %rax
leaq 0x124b14(%rip), %rcx    # 0x15dd30
movsd 0x38(%rcx,%rax), %xmm0
movsd 0xcfed6(%rip), %xmm1    # 0x109100
mulsd %xmm0, %xmm1
movsd %xmm1, 0x309722(%rip)   # 0x342958
movq $0x0, 0x30971f(%rip) # 0x342960
movsd 0x10(%rcx,%rax), %xmm1
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm1
jne 0x39253
jnp 0x39267
mulsd 0xcfe4d(%rip), %xmm1    # 0x1090a8
divsd %xmm1, %xmm0
movsd %xmm0, 0x3096f9(%rip)   # 0x342960
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathui.cpp
// Function: config_enviro_plots(int)
void config_enviro_plots(int enable)
{
if(rcvr_type == TIDE_RCVR) return;

    plot[TEMP1].plot_id = "TEMP1";     // [TC1] -> [FIVE]
    plot[TEMP1].units = degc;
    plot[TEMP1].float_center = 1;

    plot[TEMP2].plot_id = "TEMP2";     // [TC2] -> [FIVE]
    plot[TEMP2].units = degc;
    plot[TEMP2].float_center = 1;

    plot[HUMIDITY].plot_id = "RH";
    plot[HUMIDITY].units = "%";
    plot[HUMIDITY].ref_scale = (DATA_SIZE) 1.0;
    plot[HUMIDITY].float_center = 1;

    plot[PRESSURE].plot_id = "Pres";
    plot[PRESSURE].units = "mbar";
    plot[PRESSURE].ref_scale = (DATA_SIZE) 1.0;
    plot[PRESSURE].float_center = 1;

   if(enable && (rcvr_type == THERMO_RCVR)) {
      plot[HUMIDITY].show_plot = 1;
      plot[PRESSURE].show_plot = 1;
      plot[TEMP1].show_plot = 1;
      plot[TEMP2].show_plot = 1;
      plot[ADC3].show_plot = 1;
      plot[ADC4].show_plot = 1;

      plot[TEMP].show_plot = 0;
   }

   if((rcvr_type == THERMO_RCVR) || ((rcvr_type == TIDE_RCVR) && enviro_mode())) {
      plot[ADC3].plot_id = "ADC3";
      plot[ADC3].units = "V";
      plot[ADC3].ref_scale = (DATA_SIZE) 1.0;
      plot[ADC3].float_center = 1;

      plot[ADC4].plot_id = "ADC4";
      plot[ADC4].units = "V";
      plot[ADC4].ref_scale = (DATA_SIZE) 1.0;
      plot[ADC4].float_center = 1;

      plot[HUMIDITY].plot_color = MAGENTA;
      plot[PRESSURE].plot_color = WHITE;
      plot[TEMP1].plot_color = YELLOW;
      plot[TEMP2].plot_color = RED;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x1df4cf(%rip), %rax    # 0x2188d0
movq (%rax), %rdx
cmpq $0x800000, %rdx         # imm = 0x800000
je 0x39568
leaq 0xe4967(%rip), %rcx     # 0x11dd7f
leaq 0x124911(%rip), %rax    # 0x15dd30
movq %rcx, 0xf68(%rax)
leaq 0x1248fb(%rip), %rcx    # 0x15dd28
movq %rcx, 0xf70(%rax)
movl $0x1, %esi
movl %esi, 0xf84(%rax)
leaq 0xd6317(%rip), %r8      # 0x10f75d
movq %r8, 0x1050(%rax)
movq %rcx, 0x1058(%rax)
movl %esi, 0x106c(%rax)
leaq 0xe4924(%rip), %rcx     # 0x11dd85
movq %rcx, 0xd98(%rax)
leaq 0xe95d4(%rip), %rcx     # 0x122a43
movq %rcx, 0xda0(%rax)
movabsq $0x3ff0000000000000, %rcx # imm = 0x3FF0000000000000
movq %rcx, 0xda8(%rax)
movl %esi, 0xdb4(%rax)
leaq 0xe48f4(%rip), %r8      # 0x11dd88
movq %r8, 0xe80(%rax)
leaq 0xe48eb(%rip), %r8      # 0x11dd8d
movq %r8, 0xe88(%rax)
movq %rcx, 0xe90(%rax)
movl %esi, 0xe9c(%rax)
testl %edi, %edi
sete %dil
cmpq $0x80000, %rdx          # imm = 0x80000
setne %r8b
orb %dil, %r8b
jne 0x394f9
movl %esi, 0xdb0(%rax)
movl %esi, 0xe98(%rax)
movl %esi, 0xf80(%rax)
movl %esi, 0x1068(%rax)
movl %esi, 0x18(%rax)
movl %esi, 0x100(%rax)
movl $0x0, 0x2d0(%rax)
jmp 0x39502
cmpq $0x80000, %rdx          # imm = 0x80000
jne 0x39568
leaq 0xe485f(%rip), %rdx     # 0x11dd68
movq %rdx, (%rax)
leaq 0xf6261(%rip), %rdx     # 0x12f774
movq %rdx, 0x8(%rax)
movq %rcx, 0x10(%rax)
movl %esi, 0x1c(%rax)
leaq 0xe4848(%rip), %rdi     # 0x11dd6d
movq %rdi, 0xe8(%rax)
movq %rdx, 0xf0(%rax)
movq %rcx, 0xf8(%rax)
movl %esi, 0x104(%rax)
movl $0xd, 0xdb8(%rax)
movl $0xf, 0xea0(%rax)
movl $0xe, 0xf88(%rax)
movl $0xc, 0x1070(%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathui.cpp
// Function: config_tide_plots(int)
void config_tide_plots(int enable)
{
    plot[ELEVEN].plot_id = "Lat-t";
    plot[ELEVEN].units = "mm";
    plot[ELEVEN].float_center = 1;

    plot[TWELVE].plot_id = "Lon-t";
    plot[TWELVE].units = "mm";
    plot[TWELVE].float_center = 1;

    plot[THIRTEEN].plot_id = "Alt-t";
    plot[THIRTEEN].units = "mm";
    plot[THIRTEEN].float_center = 1;

    plot[FOURTEEN].plot_id = "Grav";
    plot[FOURTEEN].units = "uGal";
    plot[FOURTEEN].float_center = 1;

    plot[ELEVEN].show_plot = enable;
    plot[TWELVE].show_plot = enable;
    plot[THIRTEEN].show_plot = enable;
    plot[FOURTEEN].show_plot = enable;

    plot[ELEVEN].plot_color = ELEVEN_COLOR;
    plot[TWELVE].plot_color = TWELVE_COLOR;
    plot[THIRTEEN].plot_color = THIRTEEN_COLOR;
    plot[FOURTEEN].plot_color = FOURTEEN_COLOR;

    if((rcvr_type == THERMO_RCVR) || ((rcvr_type == TIDE_RCVR) && enviro_mode())) {
       plot[ADC3].plot_id = "ADC3";
       plot[ADC3].units = "V";
       plot[ADC3].ref_scale = (DATA_SIZE) 1.0;
       plot[ADC3].float_center = 1;

       plot[ADC4].plot_id = "ADC4";
       plot[ADC4].units = "V";
       plot[ADC4].ref_scale = (DATA_SIZE) 1.0;
       plot[ADC4].float_center = 1;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0xe47d2(%rip), %rax     # 0x11dd49
leaq 0x1247b2(%rip), %rbx    # 0x15dd30
movq %rax, 0xd98(%rbx)
leaq 0xe47c3(%rip), %rax     # 0x11dd4f
movq %rax, 0xda0(%rbx)
movabsq $0x300000001, %rcx      # imm = 0x300000001
movq %rcx, 0xdb4(%rbx)
leaq 0xe47a7(%rip), %rcx     # 0x11dd52
movq %rcx, 0xe80(%rbx)
movq %rax, 0xe88(%rbx)
movabsq $0x200000001, %rcx      # imm = 0x200000001
movq %rcx, 0xe9c(%rbx)
leaq 0xe4787(%rip), %rcx     # 0x11dd58
movq %rcx, 0xf68(%rbx)
movq %rax, 0xf70(%rbx)
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, 0xf84(%rbx)
leaq 0xe4767(%rip), %rax     # 0x11dd5e
movq %rax, 0x1050(%rbx)
leaq 0xe475e(%rip), %rax     # 0x11dd63
movq %rax, 0x1058(%rbx)
movabsq $0x800000001, %rax      # imm = 0x800000001
movq %rax, 0x106c(%rbx)
movl %edi, 0xdb0(%rbx)
movl %edi, 0xe98(%rbx)
movl %edi, 0xf80(%rbx)
movl %edi, 0x1068(%rbx)
leaq 0x1df294(%rip), %rax    # 0x2188d0
movq (%rax), %rax
cmpq $0x80000, %rax          # imm = 0x80000
je 0x39658
cmpq $0x800000, %rax         # imm = 0x800000
jne 0x396a5
callq 0x5f6cb
testl %eax, %eax
je 0x396a5
leaq 0xe4709(%rip), %rax     # 0x11dd68
movq %rax, (%rbx)
leaq 0xf610b(%rip), %rax     # 0x12f774
movq %rax, 0x8(%rbx)
movabsq $0x3ff0000000000000, %rcx # imm = 0x3FF0000000000000
movq %rcx, 0x10(%rbx)
movl $0x1, %edx
movl %edx, 0x1c(%rbx)
leaq 0xe46e3(%rip), %rsi     # 0x11dd6d
movq %rsi, 0xe8(%rbx)
movq %rax, 0xf0(%rbx)
movq %rcx, 0xf8(%rbx)
movl %edx, 0x104(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathui.cpp
// Function: kbd_exit()
void kbd_exit()
{
   // user told the program to exit
   break_flag = 1;
   erase_help();
   vidstr(EDIT_ROW+4, EDIT_COL, RED, "Exiting...");
   refresh_page();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x2fd96d(%rip), %rax    # 0x337024
movl $0x1, (%rax)
callq 0xecb9
leaq 0x305f43(%rip), %rax    # 0x33f60c
movl (%rax), %edi
addl $0x4, %edi
leaq 0x305f3b(%rip), %rax    # 0x33f610
movl (%rax), %esi
leaq 0xdd18f(%rip), %rcx     # 0x11686d
movl $0xc, %edx
callq 0xe787
popq %rbp
jmp 0xab54
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathui.cpp
// Function: share_it()
void share_it()
{
if(0) {
   if(plot_azel == 0)   {
      plot_azel = AZEL_OK;
      shared_plot = 1;
   }
   else if(shared_plot) {
      plot_azel = 0;
      shared_plot = 0;
   }
   else shared_plot = 1;
   if(WIDE_SCREEN && (plot_watch == 0)) shared_plot = 0;  // no need to share plot on wide screens
   //shared_plot = 1;
}
   shared_plot = toggle_value(shared_plot);
if(rcvr_type == NO_RCVR) shared_plot = 0;
   reset_first_key(24);
   prot_menu = 0;
   config_screen(106);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x301b63(%rip), %rbx    # 0x33b3e8
movzbl (%rbx), %edi
callq 0x34013
leaq 0x1df03c(%rip), %rcx    # 0x2188d0
xorl %edx, %edx
cmpq $0x400, (%rcx)          # imm = 0x400
movzbl %al, %eax
cmovel %edx, %eax
movb %al, (%rbx)
callq 0x275c7
leaq 0x1e18a7(%rip), %rax    # 0x21b158
movb $0x0, (%rax)
movl $0x6a, %edi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xcf89
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathui.cpp
// Function: edit_loc_format()
void edit_loc_format()
{
   // process the location formatting commands

   getting_plot = (-1);
   first_key = '{';
   prot_menu = 0;

   if(text_mode) erase_screen();
   else          erase_help();

   // display prompt string for the command
   sprintf(out, " Location format:  D)ecimal   dmS)   G)rads   R)adians    (ESC to abort)");
   vidstr(EDIT_ROW+0, EDIT_COL, PROMPT_COLOR, out);
   sprintf(out, "                   mI)ls      H)am   U)TM     N)ATO       E)CEF");
   vidstr(EDIT_ROW+1, EDIT_COL, PROMPT_COLOR, out);
   sprintf(out, "                   F)eet      M)eters         P)rivate    A)utoscale LLA");
   vidstr(EDIT_ROW+2, EDIT_COL, PROMPT_COLOR, out);
   sprintf(out, "                   earth T)ide displacement");
   vidstr(EDIT_ROW+3, EDIT_COL, PROMPT_COLOR, out);

   refresh_page();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl $0xffffffff, 0x309064(%rip) # imm = 0xFFFFFFFF
leaq 0x205679(%rip), %rax    # 0x23ef58
movl $0x7b, (%rax)
leaq 0x1e186c(%rip), %rax    # 0x21b158
movb $0x0, (%rax)
leaq 0x1deee2(%rip), %rax    # 0x2187d8
cmpl $0x0, (%rax)
je 0x39902
callq 0xeceb
jmp 0x39907
callq 0xecb9
leaq 0x302912(%rip), %rbx    # 0x33c220
leaq 0xdcfa3(%rip), %rsi     # 0x1168b8
movl $0x49, %edx
movq %rbx, %rdi
callq 0x92b0
leaq 0x305ce3(%rip), %r15    # 0x33f60c
movl (%r15), %edi
leaq 0x305cdd(%rip), %r14    # 0x33f610
movl (%r14), %esi
movl $0xb, %edx
movq %rbx, %rcx
callq 0xe787
movups 0xdcfe7(%rip), %xmm0    # 0x116931
movaps %xmm0, 0x30(%rbx)
movups 0xdcfcc(%rip), %xmm0    # 0x116921
movaps %xmm0, 0x20(%rbx)
movups 0xdcfb1(%rip), %xmm0    # 0x116911
movaps %xmm0, 0x10(%rbx)
movups 0xdcf96(%rip), %xmm0    # 0x116901
movaps %xmm0, (%rbx)
movl (%r15), %edi
incl %edi
movl (%r14), %esi
movl $0xb, %edx
movq %rbx, %rcx
callq 0xe787
leaq 0xdcfb7(%rip), %rsi     # 0x116941
movl $0x49, %edx
movq %rbx, %rdi
callq 0x92b0
movl (%r15), %edi
addl $0x2, %edi
movl (%r14), %esi
movl $0xb, %edx
movq %rbx, %rcx
callq 0xe787
movups 0xdcff2(%rip), %xmm0    # 0x1169a6
movups %xmm0, 0x1c(%rbx)
movups 0xdcfdb(%rip), %xmm0    # 0x11699a
movaps %xmm0, 0x10(%rbx)
movups 0xdcfc0(%rip), %xmm0    # 0x11698a
movaps %xmm0, (%rbx)
movl (%r15), %edi
addl $0x3, %edi
movl (%r14), %esi
movl $0xb, %edx
movq %rbx, %rcx
callq 0xe787
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xab54
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathui.cpp
// Function: edit_tide_plot()
void edit_tide_plot()
{
   // process the earth tide / gravity plot commands

   getting_plot = (-2);
   first_key = '{';
   prot_menu = 0;

   if(text_mode) erase_screen();
   else          erase_help();

   // display prompt string for the command
   sprintf(out, " Earth tide plot:  1)lat   2)lon   3)alt   4)uGals   A)ll   (ESC to abort)");
   vidstr(EDIT_ROW+0, EDIT_COL, PROMPT_COLOR, out);

   refresh_page();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl $0xfffffffe, 0x308f3a(%rip) # imm = 0xFFFFFFFE
leaq 0x20554f(%rip), %rax    # 0x23ef58
movl $0x7b, (%rax)
leaq 0x1e1742(%rip), %rax    # 0x21b158
movb $0x0, (%rax)
leaq 0x1dedb8(%rip), %rax    # 0x2187d8
cmpl $0x0, (%rax)
je 0x39a2c
callq 0xeceb
jmp 0x39a31
callq 0xecb9
leaq 0x3027e8(%rip), %rbx    # 0x33c220
leaq 0xdcf77(%rip), %rsi     # 0x1169b6
movl $0x4b, %edx
movq %rbx, %rdi
callq 0x92b0
leaq 0x305bb9(%rip), %rax    # 0x33f60c
movl (%rax), %edi
leaq 0x305bb4(%rip), %rax    # 0x33f610
movl (%rax), %esi
movl $0xb, %edx
movq %rbx, %rcx
callq 0xe787
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xab54
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathui.cpp
// Function: move_plot_up()
void move_plot_up()
{
   plot[selected_plot].user_scale = 1;
   plot[selected_plot].plot_center -= center_step;
   plot[selected_plot].float_center = 0;
   plot[selected_plot].user_set_float = 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x30605b(%rip), %rax    # 0x33fd58
movslq (%rax), %rax
imulq $0xe8, %rax, %rax
leaq 0x124022(%rip), %rcx    # 0x15dd30
movl $0x1, %edx
movl %edx, 0x30(%rcx,%rax)
movsd 0x28(%rcx,%rax), %xmm0
subsd 0x308c3b(%rip), %xmm0   # 0x342960
movsd %xmm0, 0x28(%rcx,%rax)
movl $0x0, 0x1c(%rcx,%rax)
movl %edx, 0xdc(%rcx,%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathui.cpp
// Function: move_plot_down()
void move_plot_down()
{
   plot[selected_plot].plot_center += center_step;
   plot[selected_plot].user_scale = 1;
   plot[selected_plot].float_center = 0;
   plot[selected_plot].user_set_float = 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movsd 0x308c18(%rip), %xmm0   # 0x342960
leaq 0x306009(%rip), %rax    # 0x33fd58
movslq (%rax), %rax
imulq $0xe8, %rax, %rax
leaq 0x123fd0(%rip), %rcx    # 0x15dd30
addsd 0x28(%rcx,%rax), %xmm0
movsd %xmm0, 0x28(%rcx,%rax)
movl $0x1, %edx
movl %edx, 0x30(%rcx,%rax)
movl $0x0, 0x1c(%rcx,%rax)
movl %edx, 0xdc(%rcx,%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathui.cpp
// Function: shrink_plot()
void shrink_plot()
{
   plot[selected_plot].user_scale = 1;
   plot[selected_plot].scale_factor += scale_step;
   plot[selected_plot].float_center = 0;
   plot[selected_plot].user_set_float = 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x305fc7(%rip), %rax    # 0x33fd58
movslq (%rax), %rax
imulq $0xe8, %rax, %rax
leaq 0x123f8e(%rip), %rcx    # 0x15dd30
movl $0x1, %edx
movl %edx, 0x30(%rcx,%rax)
movsd 0x308ba5(%rip), %xmm0   # 0x342958
addsd 0x38(%rcx,%rax), %xmm0
movsd %xmm0, 0x38(%rcx,%rax)
movl $0x0, 0x1c(%rcx,%rax)
movl %edx, 0xdc(%rcx,%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathui.cpp
// Function: set_auto_scale()
void set_auto_scale()
{
int i;

   // enable / disable auto scaling of all plots

   for(i=0; i<NUM_PLOTS+DERIVED_PLOTS; i++) {
      if(auto_scale) {
         plot[i].user_scale = 0;
         plot[i].float_center = 1;
         plot[i].user_set_float = 1;
      }
      else {
         plot[i].user_scale = 1;
         plot[i].float_center = 0;
      }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x1e1388(%rip), %rax    # 0x21b3d4
movb (%rax), %al
xorl %ecx, %ecx
leaq 0x123cd9(%rip), %rdx    # 0x15dd30
movl $0x1, %esi
testb %al, %al
je 0x3a075
movl $0x0, 0x30(%rdx,%rcx)
movl %esi, 0x1c(%rdx,%rcx)
movl %esi, 0xdc(%rdx,%rcx)
jmp 0x3a085
movl $0x1, 0x30(%rdx,%rcx)
movl $0x0, 0x1c(%rdx,%rcx)
addq $0xe8, %rcx
cmpq $0x1220, %rcx           # imm = 0x1220
jne 0x3a05c
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathui.cpp
// Function: kbd_marker(int)
void kbd_marker(int c)
{
long val;

   // set a plot marker from the keyboard
   last_was_mark = c;
   if((c >= '0') && (c <= '9')) c -= '0';
   else if(c >= 'a') c = (c - 'a') + 10;
   else if(c >= 'A') c = (c - 'A') + 10;

   if((c < 0) || (c >= MAX_MARKER)) return;

   if(mark_q_entry[c]) {  // marker was set,  go to it
      goto_mark(c);
      hide_kbd(21);
   }
   else {  // mark current spot if it is not already marked
      for(val=1; val<MAX_MARKER; val++) {
         if(mark_q_entry[val] == last_mouse_q) {  // place is already marked
            BEEP(311);
            return;
         }
      }
      mark_q_entry[c] = last_mouse_q;
      draw_plot(REFRESH_SCREEN);
   }
}

// Assembly:
leaq 0x1e08b5(%rip), %rax    # 0x21b300
movl %edi, (%rax)
leal -0x30(%rdi), %eax
cmpl $0xa, %eax
jae 0x3aa79
movl %eax, %edi
leaq 0x1e0852(%rip), %rax    # 0x21b2b0
cmpq $0x0, (%rax,%rdi,8)
je 0x3aa8d
pushq %rbp
movq %rsp, %rbp
callq 0x1b3c6
movl $0x15, %edi
popq %rbp
jmp 0xfd00
cmpl $0x60, %edi
jg 0x3aa8c
leal -0x37(%rdi), %eax
cmpl $0x41, %edi
cmovll %edi, %eax
cmpl $0x9, %eax
jbe 0x3aa55
retq
leaq 0x1e07e4(%rip), %rcx    # 0x21b278
movq (%rcx), %rcx
movl $0x1, %edx
cmpq %rcx, (%rax,%rdx,8)
je 0x3aab9
incq %rdx
cmpq $0xa, %rdx
jne 0x3aa9c
movq %rcx, (%rax,%rdi,8)
movl $0x1, %edi
jmp 0x197ae
movl $0x137, %edi            # imm = 0x137
jmp 0x9d78
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathui.cpp
// Function: set_next_marker()
int set_next_marker()
{
int val;

   // mark current mouse column with the next available marker number
   for(val=1; val<MAX_MARKER; val++) {
      if(mark_q_entry[val] == last_mouse_q) {  // place is already marked
         mark_q_entry[val] = 0;                // unmark it
         draw_plot(REFRESH_SCREEN);
         return 1;
      }
   }

   for(val=1; val<MAX_MARKER; val++) {
      if(mark_q_entry[val] == 0) {
         if(val < 10) last_was_mark = '0'+val;
         else         last_was_mark = 'A'+val-10;
         mark_q_entry[val] = last_mouse_q;  // last marker is mouse click marker
         draw_plot(REFRESH_SCREEN);
         return 1;
      }
   }

   BEEP(312);
   return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x1e07a8(%rip), %rax    # 0x21b278
movq (%rax), %rax
movl $0x1, %edx
leaq 0x1e07d1(%rip), %rcx    # 0x21b2b0
cmpq %rax, (%rcx,%rdx,8)
je 0x3ab11
incq %rdx
cmpq $0xa, %rdx
jne 0x3aadf
movl $0x1, %edx
cmpq $0x0, (%rcx,%rdx,8)
je 0x3ab1b
incq %rdx
cmpq $0xa, %rdx
jne 0x3aaf3
movl $0x138, %edi            # imm = 0x138
callq 0x9d78
xorl %ebx, %ebx
jmp 0x3ab3a
movq $0x0, (%rcx,%rdx,8)
jmp 0x3ab2b
leal 0x30(%rdx), %esi
leaq 0x1e07db(%rip), %rdi    # 0x21b300
movl %esi, (%rdi)
movq %rax, (%rcx,%rdx,8)
movl $0x1, %ebx
movl $0x1, %edi
callq 0x197ae
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathui.cpp
// Function: change_fix_config(int)
void change_fix_config(int save)
{
static int old_watch = 0;
static int old_azel = 0;
static int old_share = 0;
static int old_sigs = 0;
static int old_lla = 0;
static int saved_config = 0;
static int save_count = 0;
static int restore_count = 0;

   if(save > 0) {
      old_watch = plot_watch;
      old_azel = plot_azel;
      old_share = shared_plot;
      old_sigs = plot_signals;
      old_lla = plot_lla;
      saved_config = save;
      ++save_count;
//sprintf(debug_text, "plot watch fix save# %d: %d: %d", save_count, save, plot_watch);
   }
   else if(saved_config) {
      ++restore_count;
//sprintf(debug_text2, "plot watch fix restore# %d: %d: pw:%d  ow:%d", restore_count, saved_config, plot_watch, old_watch);
      plot_watch = old_watch;
      plot_azel = old_azel;
      shared_plot = old_share;
      plot_signals = old_sigs;
      if(show_fixes == 0) {
         plot_lla = 0; // !!!!! old_lla;
      }
      else plot_lla = old_lla;

      no_redraw = 1;
      config_screen(130);
      no_redraw = 0;
//saved_config = 0;  // (555)
   }
}

// Assembly:
testl %edi, %edi
jle 0x3aba4
leaq 0x1e08ba(%rip), %rax    # 0x21b408
movzbl (%rax), %eax
movl %eax, 0x309bc5(%rip)    # 0x34471c
leaq 0x1e08b5(%rip), %rax    # 0x21b413
movzbl (%rax), %eax
movl %eax, 0x309bb9(%rip)    # 0x344720
leaq 0x30087a(%rip), %rax    # 0x33b3e8
movzbl (%rax), %eax
movl %eax, 0x309bad(%rip)    # 0x344724
leaq 0x1e0897(%rip), %rax    # 0x21b415
movzbl (%rax), %eax
movl %eax, 0x309ba1(%rip)    # 0x344728
leaq 0x300722(%rip), %rax    # 0x33b2b0
movzbl (%rax), %eax
movl %eax, 0x309b95(%rip)    # 0x34472c
movl %edi, 0x309b93(%rip)    # 0x344730
incl 0x309b91(%rip)          # 0x344734
retq
cmpl $0x0, 0x309b85(%rip)    # 0x344730
je 0x3ac39
incl 0x309b81(%rip)          # 0x344738
movb 0x309b5f(%rip), %al     # 0x34471c
leaq 0x1e0844(%rip), %rcx    # 0x21b408
movb %al, (%rcx)
movb 0x309b54(%rip), %al     # 0x344720
leaq 0x1e0840(%rip), %rcx    # 0x21b413
movb %al, (%rcx)
movb 0x309b49(%rip), %al     # 0x344724
leaq 0x300806(%rip), %rcx    # 0x33b3e8
movb %al, (%rcx)
movb 0x309b3e(%rip), %al     # 0x344728
leaq 0x1e0824(%rip), %rcx    # 0x21b415
movb %al, (%rcx)
leaq 0x3006da(%rip), %rcx    # 0x33b2d4
xorl %eax, %eax
cmpb $0x0, (%rcx)
je 0x3ac07
movl 0x309b25(%rip), %eax    # 0x34472c
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x30069c(%rip), %rcx    # 0x33b2b0
movb %al, (%rcx)
leaq 0x1ddc2b(%rip), %rbx    # 0x218848
movl $0x1, (%rbx)
movl $0x82, %edi
callq 0xcf89
movl $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathui.cpp
// Function: clear_all_data()
void clear_all_data()
{
   dont_reset_queues = 0;
   new_queue(RESET_ALL_QUEUES, 13);

   #ifdef BUFFER_LLA
      clear_lla_points(1);
   #endif
   #ifdef SIG_LEVELS
      clear_signals();
   #endif
   #ifdef SAT_TRAILS
      clear_sat_trails();
   #endif

   if(view_all_data == 1) edit_user_view("A");
   else if(view_all_data == 2) edit_user_view("T");
   need_redraw = 5566;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x135721(%rip), %rax    # 0x170c60
movl $0x0, (%rax)
movl $0x7, %edi
movl $0xd, %esi
callq 0x1118c
movl $0x1, %edi
callq 0xfae0d
callq 0xf947d
callq 0xf4a96
leaq 0x1dfe56(%rip), %rax    # 0x21b3c5
movzbl (%rax), %eax
cmpl $0x1, %eax
je 0x3b585
cmpl $0x2, %eax
jne 0x3b591
leaq 0xd2207(%rip), %rdi     # 0x10d78a
jmp 0x3b58c
leaq 0xe6e29(%rip), %rdi     # 0x1223b5
callq 0x2f570
leaq 0x1dd2ac(%rip), %rax    # 0x218844
movl $0x15be, (%rax)         # imm = 0x15BE
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathui.cpp
// Function: config_fix_display()
void config_fix_display()
{
   change_fix_config(show_fixes);
   if(show_fixes && (precision_survey == 0) && (trimble_save == 0)) {  // set reference position for fix map
      precise_lat = lat;
      precise_lon = lon;
      precise_alt = alt;
      have_precise_lla = (-7);
      if(user_set_ref_lla == 0) {
         ref_lat = lat;
         ref_lon = lon;
         ref_alt = alt;
      }
      cos_factor = cos(ref_lat);
      if(cos_factor == 0.0) cos_factor = 0.001;
   }
   if(show_fixes) start_3d_fixes(-1, 2);
   if(1 || (GRAPH_LLA && (graph_lla == 0))) {
      config_lla_plots(KEEP_LLA_ON_HOLD, KEEP_LLA_SHOW);
   }

   config_screen(112);
   user_fix_set = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x2ffd27(%rip), %rbx    # 0x33b2d4
movzbl (%rbx), %edi
callq 0x3ab43
cmpb $0x0, (%rbx)
je 0x3b690
leaq 0x2d28d3(%rip), %rax    # 0x30de98
cmpb $0x0, (%rax)
jne 0x3b690
leaq 0x2d28c7(%rip), %rax    # 0x30de9c
cmpl $0x0, (%rax)
jne 0x3b690
leaq 0x2d19eb(%rip), %rax    # 0x30cfd0
movsd (%rax), %xmm0
leaq 0x2ffd00(%rip), %rax    # 0x33b2f0
movsd %xmm0, (%rax)
leaq 0x2d19dd(%rip), %rax    # 0x30cfd8
movsd (%rax), %xmm1
leaq 0x2ffcf2(%rip), %rax    # 0x33b2f8
movsd %xmm1, (%rax)
leaq 0x2d19cf(%rip), %rax    # 0x30cfe0
movsd (%rax), %xmm2
leaq 0x2ffce4(%rip), %rax    # 0x33b300
movsd %xmm2, (%rax)
leaq 0x2ffce1(%rip), %rax    # 0x33b308
movl $0xfffffff9, (%rax)     # imm = 0xFFFFFFF9
leaq 0x2ffd0c(%rip), %rax    # 0x33b340
cmpl $0x0, (%rax)
je 0x3b646
leaq 0x2ffcd0(%rip), %rax    # 0x33b310
movsd (%rax), %xmm0
jmp 0x3b667
leaq 0x2ffcc3(%rip), %rax    # 0x33b310
movsd %xmm0, (%rax)
leaq 0x2ffcc0(%rip), %rax    # 0x33b318
movsd %xmm1, (%rax)
leaq 0x2ffcbd(%rip), %rax    # 0x33b320
movsd %xmm2, (%rax)
callq 0x9710
leaq 0x2d1955(%rip), %rax    # 0x30cfc8
movsd %xmm0, (%rax)
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x3b690
jp 0x3b690
movabsq $0x3f50624dd2f1a9fc, %rcx # imm = 0x3F50624DD2F1A9FC
movq %rcx, (%rax)
cmpb $0x0, (%rbx)
je 0x3b6a4
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
movl $0x2, %esi
callq 0xfad64
movl $0x1, %edi
xorl %esi, %esi
callq 0x3ae2c
movl $0x70, %edi
callq 0xcf89
leaq 0x2ffc14(%rip), %rax    # 0x33b2d5
movb $0x0, (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathui.cpp
// Function: reset_parser()
void reset_parser()
{
   // reset serial port and message parser
   tsip_sync = 0;
   tsip_wptr = 0;
   tsip_rptr = 0;
   init_messages(110, 0);
   redraw_screen();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x2f6cf8(%rip), %rax    # 0x338256
xorl %ecx, %ecx
movw %cx, (%rax)
leaq 0x2f6ce8(%rip), %rax    # 0x338252
movw %cx, (%rax)
leaq 0x2f6ce0(%rip), %rax    # 0x338254
movw %cx, (%rax)
movl $0x6e, %edi
xorl %esi, %esi
callq 0x616de
popq %rbp
jmp 0xfa97
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathui.cpp
// Function: save_cmd_bytes(char*)
void save_cmd_bytes(char *arg)
{
u16 val;
char c;
int i;
u08 saw_digit;

   // save byte string to send to the receiver

   val = 0x00;
   saw_digit = 0;
   for(i=1; i<=(int)strlen(arg); i++) {  // get and save the string of bytes
      c = toupper(arg[i]);
      if((c >= '0') && (c <= '9')) {  // build hex value
         val = (val * 16) + (c-'0');
         saw_digit = 1;
         continue;
      }
      else if((c >= 'A') && (c <= 'F')) {  // build hex value
         val = (val * 16) + (c-'A'+10);
         saw_digit = 1;
         continue;
      }
      else if(saw_digit) {  // end of hex value
         if(arg[0] == '=') {  // add byte to list of bytes to send during receiver init
            if(user_init_len < USER_CMD_LEN) {
               user_init_cmd[user_init_len++] = (u08) val;
            }
         }
         else if(arg[0] == '$') {  // add byte to list of bytes to send every second
            if(user_pps_len < USER_CMD_LEN) {
               user_pps_cmd[user_pps_len++] = (u08) val;
            }
         }

         val = 0x00;     // setup for next hex value
         saw_digit = 0;
      }

      if(c == ',') continue;   // values can be separated by spaces or commas
      else if(c == ' ') continue;
      else break;  // anything else ends the list of hex values
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x9120
testl %eax, %eax
jle 0x47501
xorl %r14d, %r14d
leaq 0x2efe15(%rip), %r13    # 0x337244
xorl %r15d, %r15d
xorl %r12d, %r12d
movsbl 0x1(%rbx,%r14), %edi
callq 0x9700
movsbl %al, %ecx
leal -0x30(%rcx), %edx
cmpl $0x9, %edx
ja 0x47463
shll $0x4, %r12d
addl $0xffd0, %ecx           # imm = 0xFFD0
orl %r12d, %ecx
movb $0x1, %r15b
movl %ecx, %r12d
jmp 0x474eb
leal -0x41(%rcx), %edx
cmpl $0x5, %edx
ja 0x4747b
shll $0x4, %r12d
addl %ecx, %r12d
addl $-0x37, %r12d
movb $0x1, %r15b
jmp 0x474eb
testb %r15b, %r15b
je 0x474d7
movb (%rbx), %cl
cmpb $0x3d, %cl
jne 0x474a1
leaq 0x2efca6(%rip), %rdx    # 0x337134
movl (%rdx), %ecx
leaq 0x2efb99(%rip), %rsi    # 0x337030
cmpl $0x101, %ecx            # imm = 0x101
jl 0x474c8
jmp 0x474d4
cmpb $0x24, %cl
sete %dl
movl (%r13), %ecx
cmpl $0x101, %ecx            # imm = 0x101
setl %dil
andb %dl, %dil
movq %r13, %rdx
leaq 0x2efc7e(%rip), %rsi    # 0x337140
cmpb $0x1, %dil
jne 0x474d4
leal 0x1(%rcx), %edi
movl %edi, (%rdx)
movslq %ecx, %rcx
movb %r12b, (%rsi,%rcx)
xorl %r12d, %r12d
shll $0x18, %eax
xorl %r15d, %r15d
cmpl $0x2c000000, %eax       # imm = 0x2C000000
je 0x474eb
cmpl $0x20000000, %eax       # imm = 0x20000000
jne 0x47501
movq %rbx, %rdi
callq 0x9120
cltq
incq %r14
cmpq %rax, %r14
jl 0x47435
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathui.cpp
// Function: set_watch_name(char*)
void set_watch_name(char *s)
{
unsigned i, j;
int n;
char c;

   // set the analog watch face name info

   plot_watch = 1;
   config_screen(129);
   n = 0;
   j = 0;
   watch_name[j] = watch_name2[j] = 0;
   for(i=0; i<strlen(s); i++) {
      c = s[i];
      if(c == 0) break;
      if(c == '/') {
         ++n;
         j = 0;
         continue;
      }

      if(c == '_') c = ' ';
      if(n == 0) {
         watch_name[j++] = c;
         watch_name[j] = 0;
         if(j >= (sizeof(watch_name)-1)) break;
      }
      else if(n == 1) {
         watch_name2[j++] = c;
         watch_name2[j] = 0;
         if(j >= (sizeof(watch_name2)-1)) break;
      }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x1d3eb0(%rip), %rax    # 0x21b408
movb $0x1, (%rax)
movl $0x81, %edi
callq 0xcf89
leaq 0x2f71a4(%rip), %rax    # 0x33e710
xorl %r14d, %r14d
movb %r14b, (%rax)
leaq 0x2f7177(%rip), %rax    # 0x33e6f0
movb %r14b, (%rax)
cmpb %r14b, (%rbx)
je 0x4760d
movl $0x1, %r12d
xorl %r13d, %r13d
xorl %r15d, %r15d
movzbl (%rbx,%r13), %eax
cmpl $0x2f, %eax
je 0x475d1
testl %eax, %eax
je 0x4760d
cmpb $0x5f, %al
movzbl %al, %eax
movl $0x20, %ecx
cmovel %ecx, %eax
cmpl $0x1, %r14d
je 0x475d9
testl %r14d, %r14d
jne 0x475fa
movl %r15d, %ecx
incl %r15d
leaq 0x2f712c(%rip), %rdx    # 0x33e6f0
movb %al, (%rdx,%rcx)
movb $0x0, (%rdx,%r15)
xorl %r14d, %r14d
jmp 0x475f4
incl %r14d
xorl %r15d, %r15d
jmp 0x475fa
movl %r15d, %ecx
incl %r15d
leaq 0x2f712a(%rip), %rdx    # 0x33e710
movb %al, (%rdx,%rcx)
movb $0x0, (%rdx,%r15)
movl $0x1, %r14d
cmpl $0x1d, %r15d
ja 0x4760d
movl %r12d, %r13d
movq %rbx, %rdi
callq 0x9120
incl %r12d
cmpq %r13, %rax
ja 0x47591
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathui.cpp
// Function: config_utc_mode(int)
void config_utc_mode(int set_utc_ofs)
{
   // this routine configures the time mode for receivers that do not support
   // operating in GPS time mode.

   if(set_gps_mode) {
      set_utc_mode = 0;
      time_flags |= TFLAGS_UTC;
      if(luxor) have_timing_mode = 1;
   }
   else if(set_utc_mode) {
      set_gps_mode = 0;
      time_flags &= (~TFLAGS_UTC);
      if(luxor) have_timing_mode = 1;
   }
   else {
      time_flags = TFLAGS_NULL;
      if(luxor) time_flags = TFLAGS_NULL;
      set_utc_mode = 1;
      set_gps_mode = 0;
   }

   // here we attempt to estimate the leapsecond count if it is needed and
   // the user or GPS receiver did not specify one.

   if(!user_set_utc_ofs && set_utc_ofs) {
      get_clock_time();
      if(clk_jd < jdate(2019,7,1)) utc_offset = 18;
      else utc_offset = (int) (43.216 + (double)(clk_year-2061)*0.567);
      have_utc_ofs = (-1);
   }
}

// Assembly:
leaq 0x2c5e91(%rip), %rax    # 0x30d4b4
cmpl $0x0, (%rax)
je 0x4763b
leaq 0x2c5e81(%rip), %rax    # 0x30d4b0
leaq 0x2c5e6e(%rip), %rcx    # 0x30d4a4
orb $0x1, (%rcx)
jmp 0x47651
leaq 0x2c5e6e(%rip), %rcx    # 0x30d4b0
cmpl $0x0, (%rcx)
je 0x47672
leaq 0x2c5e56(%rip), %rcx    # 0x30d4a4
andb $-0x2, (%rcx)
movl $0x0, (%rax)
leaq 0x1f78e0(%rip), %rax    # 0x23ef3e
cmpb $0x0, (%rax)
je 0x47685
leaq 0x2c5d62(%rip), %rax    # 0x30d3cc
movl $0x1, (%rax)
jmp 0x47685
leaq 0x2c5e2b(%rip), %rdx    # 0x30d4a4
xorl %esi, %esi
movl %esi, (%rdx)
movl $0x1, (%rcx)
movl %esi, (%rax)
testl %edi, %edi
je 0x4771e
leaq 0x2c60a0(%rip), %rax    # 0x30d734
cmpl $0x0, (%rax)
jne 0x4771e
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
callq 0xa477
leaq 0x2c602f(%rip), %rax    # 0x30d6e0
movsd (%rax), %xmm0
movsd %xmm0, -0x8(%rbp)
movl $0x7e3, %edi            # imm = 0x7E3
movl $0x7, %esi
movl $0x1, %edx
callq 0xd485e
movl $0x12, %eax
ucomisd -0x8(%rbp), %xmm0
ja 0x47703
leaq 0x2c5fe7(%rip), %rax    # 0x30d6c8
movl $0xfffff7f3, %ecx       # imm = 0xFFFFF7F3
addl (%rax), %ecx
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
mulsd 0xc4339(%rip), %xmm0    # 0x10ba30
addsd 0xc4339(%rip), %xmm0    # 0x10ba38
cvttsd2si %xmm0, %eax
leaq 0x2c601e(%rip), %rcx    # 0x30d728
movl %eax, (%rcx)
leaq 0x2c5c09(%rip), %rax    # 0x30d31c
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathui.cpp
// Function: save_adev_period()
void save_adev_period()
{
   old_adev_period     = adev_period;
   old_pps_adev_period = pps_adev_period;
   old_osc_adev_period = osc_adev_period;
   old_chc_adev_period = chc_adev_period;
   old_chd_adev_period = chd_adev_period;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x1f2891(%rip), %rax    # 0x23ccf8
movsd (%rax), %xmm0
leaq 0x2f0f8e(%rip), %rax    # 0x33b400
movsd %xmm0, (%rax)
leaq 0x1f2883(%rip), %rax    # 0x23cd00
movsd (%rax), %xmm0
leaq 0x2f0f80(%rip), %rax    # 0x33b408
movsd %xmm0, (%rax)
leaq 0x1f2875(%rip), %rax    # 0x23cd08
movsd (%rax), %xmm0
leaq 0x2f0f72(%rip), %rax    # 0x33b410
movsd %xmm0, (%rax)
leaq 0x1f2867(%rip), %rax    # 0x23cd10
movsd (%rax), %xmm0
leaq 0x2f0f64(%rip), %rax    # 0x33b418
movsd %xmm0, (%rax)
leaq 0x1f2859(%rip), %rax    # 0x23cd18
movsd (%rax), %xmm0
leaq 0x2f0f56(%rip), %rax    # 0x33b420
movsd %xmm0, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathui.cpp
// Function: config_tcpip_device(unsigned int, char*)
int config_tcpip_device(unsigned port, char *arg)
{
int i;

   // setup to use a com device using a com device name.
   // Returns 0 if successful,  non-zero if error.

   if(arg == 0) return 1;
   if(port >= NUM_COM_PORTS) return 2;

   if(arg[0]) {  // TCP/IP addr given
      com[port].com_port = com[port].usb_port = 0;
      com[port].user_disabled_com = 0;
      com[port].process_com = 1;
      strncpy(com[port].IP_addr, &arg[0], sizeof(com[port].IP_addr)-1);
      com[port].IP_addr[sizeof(com[port].IP_addr)-1] = 0;

      for(i=strlen(com[port].IP_addr)-1; i>=0; i++) {  // trim trailing scuzz
         if     (com[port].IP_addr[i] == 0x0A) com[port].IP_addr[i] = 0;
         else if(com[port].IP_addr[i] == 0x0D) com[port].IP_addr[i] = 0;
         else if(com[port].IP_addr[i] == ' ')  com[port].IP_addr[i] = 0;
         else if(com[port].IP_addr[i] == '\t') com[port].IP_addr[i] = 0;
         else if(com[port].IP_addr[i]) break;
      }
   }
   else if(com[port].IP_addr[0]) {  // use old IP address
   }
   else {  // !!!!!! use a default IP addr
   }

   com[port].IP_addr[sizeof(com[port].IP_addr)-1] = 0;
   if(com[port].IP_addr[0] == 0) return 3;
   com[port].user_set_ip = 2;

   if(com[port].com_running && com[port].IP_addr[0]) {  // use TCPIP port
      com[port].com_port = com[port].usb_port = 0;
      com[port].user_disabled_com = 0;
      com[port].process_com = 1;
      init_com(port, 15);
   }

   com[port].last_com_time = this_msec - com[port].com_timeout;

   return 0;
}

// Assembly:
testq %rsi, %rsi
je 0x4d635
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edi, %ebx
movl $0x2, %eax
cmpl $0x12, %edi
ja 0x4d640
cmpb $0x0, (%rsi)
movl %ebx, %r15d
je 0x4d5b1
imulq $0x2260, %r15, %r12     # imm = 0x2260
leaq 0x2c0db1(%rip), %r13    # 0x30e2e0
leaq (%r12,%r13), %r14
addq $0x10d, %r14            # imm = 0x10D
movq $0x0, -0x10d(%r14)
movl $0x0, 0x211b(%r14)
movl $0x1, 0x2127(%r14)
movl $0x100, %edx            # imm = 0x100
movq %r14, %rdi
callq 0x9170
movb $0x0, 0x100(%r14)
movq %r14, %rdi
callq 0x9120
decl %eax
js 0x4d5b1
movl %eax, %eax
addq %rax, %r12
leaq (%r12,%r13), %rax
addq $0x10d, %rax            # imm = 0x10D
movabsq $0x100002600, %rcx      # imm = 0x100002600
movzbl (%rax), %edx
cmpq $0x20, %rdx
ja 0x4d5b1
btq %rdx, %rcx
jae 0x4d5ac
movb $0x0, (%rax)
incq %rax
jmp 0x4d595
testq %rdx, %rdx
je 0x4d5a7
imulq $0x2260, %r15, %rax     # imm = 0x2260
leaq 0x2c0d21(%rip), %r14    # 0x30e2e0
movb $0x0, 0x20d(%r14,%rax)
cmpb $0x0, 0x10d(%r14,%rax)
je 0x4d63b
addq %rax, %r14
movl $0x2, 0x225c(%r14)
cmpl $0x0, 0x2230(%r14)
je 0x4d614
movq $0x0, (%r14)
movl $0x0, 0x2228(%r14)
movl $0x1, 0x2234(%r14)
movl %ebx, %edi
movl $0xf, %esi
callq 0xb49e
leaq 0x2c014d(%rip), %rax    # 0x30d768
movsd (%rax), %xmm0
subsd 0x2238(%r14), %xmm0
movsd %xmm0, 0x2248(%r14)
xorl %eax, %eax
jmp 0x4d640
movl $0x1, %eax
retq
movl $0x3, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathui.cpp
// Function: set_gpsd_mode()
void set_gpsd_mode()
{
   // set the receiver type to GPSD and config the ports

   rcvr_type = GPSD_RCVR;
   com[RCVR_PORT].com_port = com[RCVR_PORT].usb_port = 0;
   if(com[RCVR_PORT].user_set_ip == 0) {
      strcpy(com[RCVR_PORT].IP_addr, "localhost:2947");
   }
   com[RCVR_PORT].user_disabled_com = 0;
   com[RCVR_PORT].process_com = 1;
   init_com(RCVR_PORT, 17);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x1cae39(%rip), %rax    # 0x2188d0
movq $0x200, (%rax)          # imm = 0x200
leaq 0x2c083b(%rip), %rax    # 0x30e2e0
movq $0x0, 0x157c0(%rax)
cmpl $0x0, 0x17a1c(%rax)
jne 0x4dadb
movabsq $0x373439323a7473, %rcx # imm = 0x373439323A7473
movq %rcx, 0x158d4(%rax)
movabsq $0x736f686c61636f6c, %rcx # imm = 0x736F686C61636F6C
movq %rcx, 0x158cd(%rax)
movl $0x0, 0x179e8(%rax)
movl $0x1, 0x179f4(%rax)
movl $0xa, %edi
movl $0x11, %esi
popq %rbp
jmp 0xb49e
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathui.cpp
// Function: parse_option(char*)
int parse_option(char *arg)
{
unsigned i;
char c;

   // break up a command line option into the command and argument fields.
   // connvert command to lower case.  Returns the char that separated the
   // command from the value, returns 0 if no value.

   for(i=0; i<sizeof(opt_cmd); i++) opt_cmd[i] = 0;
   for(i=0; i<sizeof(opt_arg); i++) opt_arg[i] = 0;
   if(arg == 0) return 0;

   for(i=0; i<sizeof(opt_cmd)-1; i++) {
      c = arg[i+1];
      if(c == 0) break;
      else if((c == '=') || (c == ':')) {  // : or = separates option from arg value
         strcpy(opt_arg, &arg[i+1+1]);
         strlwr(opt_cmd);
         return c;
      }
      else opt_cmd[i] = c;
   }

   strlwr(opt_cmd);
   return 0;
sprintf(plot_title, "cmd:(%s)  arg:(%s)", opt_cmd, opt_arg);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x31dd5d(%rip), %r15    # 0x36b870
xorl %r14d, %r14d
movl $0x201, %edx            # imm = 0x201
movq %r15, %rdi
xorl %esi, %esi
callq 0x91a0
leaq 0x31df54(%rip), %rdi    # 0x36ba80
movl $0x201, %edx            # imm = 0x201
xorl %esi, %esi
callq 0x91a0
testq %rbx, %rbx
je 0x4db8b
addq $0x2, %rbx
xorl %eax, %eax
movzbl -0x1(%rbx), %r14d
testl %r14d, %r14d
je 0x4db7f
cmpl $0x3d, %r14d
je 0x4db70
cmpl $0x3a, %r14d
je 0x4db70
movb %r14b, (%rax,%r15)
incq %rax
incq %rbx
cmpq $0x200, %rax            # imm = 0x200
jne 0x4db43
xorl %r14d, %r14d
jmp 0x4db7f
leaq 0x31df09(%rip), %rdi    # 0x36ba80
movq %rbx, %rsi
callq 0x9340
leaq 0x31dcea(%rip), %rdi    # 0x36b870
callq 0x986c
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathui.cpp
// Function: restore_adev_period()
void restore_adev_period()
{
   adev_period     = old_adev_period;
   pps_adev_period = old_pps_adev_period;
   osc_adev_period = old_osc_adev_period;
   chc_adev_period = old_chc_adev_period;
   chd_adev_period = old_chd_adev_period;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x2ed85c(%rip), %rax    # 0x33b400
movsd (%rax), %xmm0
leaq 0x1ef149(%rip), %rax    # 0x23ccf8
movsd %xmm0, (%rax)
leaq 0x2ed84e(%rip), %rax    # 0x33b408
movsd (%rax), %xmm0
leaq 0x1ef13b(%rip), %rax    # 0x23cd00
movsd %xmm0, (%rax)
leaq 0x2ed840(%rip), %rax    # 0x33b410
movsd (%rax), %xmm0
leaq 0x1ef12d(%rip), %rax    # 0x23cd08
movsd %xmm0, (%rax)
leaq 0x2ed832(%rip), %rax    # 0x33b418
movsd (%rax), %xmm0
leaq 0x1ef11f(%rip), %rax    # 0x23cd10
movsd %xmm0, (%rax)
leaq 0x2ed824(%rip), %rax    # 0x33b420
movsd (%rax), %xmm0
leaq 0x1ef111(%rip), %rax    # 0x23cd18
movsd %xmm0, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: drain_port(unsigned int)
void drain_port(unsigned port)
{
   // drain all received data from port buffers
   if(port >= NUM_COM_PORTS) return;
   if(com[port].process_com == 0) return;
   if(com[port].com_running <= 0) return;

   while(SERIAL_DATA_AVAILABLE(port)) {  // drain any input data from the ECHO_PORT
      get_serial_char(port);  // !!!! we should have a timeout on this loop
   }
}

// Assembly:
cmpl $0x12, %edi
ja 0x5807c
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
movl %edi, %eax
imulq $0x2260, %rax, %rcx     # imm = 0x2260
leaq 0x2b6294(%rip), %rax    # 0x30e2e0
cmpl $0x0, 0x2234(%rax,%rcx)
je 0x58076
addq %rcx, %rax
cmpl $0x0, 0x2230(%rax)
jg 0x5806b
jmp 0x58076
movl %ebx, %edi
callq 0xbafb
movl %ebx, %edi
callq 0xb9ad
testl %eax, %eax
jne 0x58064
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: echo_log(char*)
void echo_log(char *s)
{
unsigned i;
int c;

   if(s == 0) return;

   if(zoom_screen == 'H') {
      for(i=0; i<strlen(s); i++) {
         c = s[i];
         echo_term(monitor_port, c, monitor_hex, 0);
      }
   }

   if(log_file == 0) return;
   fprintf(log_file, "%s", s);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x58106
movq %rdi, %rbx
leaq 0x2b470e(%rip), %rax    # 0x30c7a8
cmpb $0x48, (%rax)
jne 0x580e1
cmpb $0x0, (%rbx)
je 0x580e1
movl $0x1, %r14d
xorl %r13d, %r13d
leaq 0x2b621c(%rip), %r15    # 0x30e2d0
leaq 0x1e6389(%rip), %r12    # 0x23e444
movsbl (%rbx,%r13), %esi
movl (%r15), %edi
movl (%r12), %edx
xorl %ecx, %ecx
callq 0xac18
movl %r14d, %r13d
movq %rbx, %rdi
callq 0x9120
incl %r14d
cmpq %r13, %rax
ja 0x580bb
leaq 0x1e6278(%rip), %rax    # 0x23e360
movq (%rax), %rsi
testq %rsi, %rsi
je 0x58106
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x9400
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: get_com_char()
int get_com_char()
{
u08 c;

   // Get the next byte from the receiver (or simulation file)

   c = get_serial_char(RCVR_PORT);
   if(rcvr_type == ACRON_RCVR) c &= 0x7F;

   if((rcvr_type == TICC_RCVR) && ticc_file) {
      echo_ticc(c);
   }
   else {
      echo_stream(c); // echo receiver char to a file or com device
   }
   return c;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl $0xa, %edi
callq 0xbafb
leaq 0x1c03fc(%rip), %rcx    # 0x2188d0
movq (%rcx), %rcx
cmpq $0x10000, %rcx          # imm = 0x10000
sete %dl
leaq 0x1e5ea0(%rip), %rsi    # 0x23e388
movq (%rsi), %rsi
testq %rsi, %rsi
setne %dil
andb %dl, %dil
cmpb $0x1, %dil
jne 0x58507
movzbl %al, %ebx
movl %ebx, %edi
callq 0x9480
jmp 0x58523
movzbl %al, %edx
andb $0x7f, %al
cmpq $0x4000, %rcx           # imm = 0x4000
movzbl %al, %eax
cmovnel %edx, %eax
movzbl %al, %ebx
movl %ebx, %edi
callq 0x58115
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq