LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/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 0x305b27(%rip), %rax    # 0x33e9a0
xorl %ecx, %ecx
movb %cl, (%rax)
leaq 0x305c6c(%rip), %rax    # 0x33eaf0
movb %cl, (%rax)
leaq 0x305db3(%rip), %rax    # 0x33ec40
movb %cl, (%rax)
leaq 0x305efa(%rip), %rax    # 0x33ed90
movb %cl, (%rax)
leaq 0x306041(%rip), %rax    # 0x33eee0
movb %cl, (%rax)
leaq 0x306188(%rip), %rax    # 0x33f030
movb %cl, (%rax)
leaq 0x3062cf(%rip), %rax    # 0x33f180
movb %cl, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x306c21(%rip), %rax    # 0x33fd58
movslq (%rax), %rax
imulq $0xe8, %rax, %rcx
leaq 0x124be8(%rip), %rax    # 0x15dd30
movsd 0x38(%rax,%rcx), %xmm0
mulsd 0xcffaa(%rip), %xmm0    # 0x109100
movsd %xmm0, 0x3097fa(%rip)   # 0x342958
movq $0x0, 0x3097f7(%rip) # 0x342960
movsd 0x10(%rax,%rcx), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x3917b
jnp 0x39197
addq %rcx, %rax
movsd 0x38(%rax), %xmm1
mulsd 0xcff1d(%rip), %xmm0    # 0x1090a8
divsd %xmm0, %xmm1
movsd %xmm1, 0x3097c9(%rip)   # 0x342960
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0xe47f8(%rip), %rax     # 0x11dcb5
leaq 0x12486c(%rip), %rbx    # 0x15dd30
movq %rax, 0xd98(%rbx)
leaq 0xe47e9(%rip), %rax     # 0x11dcbb
movq %rax, 0xda0(%rbx)
movabsq $0x300000001, %rcx      # imm = 0x300000001
movq %rcx, 0xdb4(%rbx)
leaq 0xe47cd(%rip), %rcx     # 0x11dcbe
movq %rcx, 0xe80(%rbx)
movq %rax, 0xe88(%rbx)
movabsq $0x200000001, %rcx      # imm = 0x200000001
movq %rcx, 0xe9c(%rbx)
leaq 0xe47ad(%rip), %rcx     # 0x11dcc4
movq %rcx, 0xf68(%rbx)
movq %rax, 0xf70(%rbx)
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, 0xf84(%rbx)
leaq 0xe478d(%rip), %rax     # 0x11dcca
movq %rax, 0x1050(%rbx)
leaq 0xe4784(%rip), %rax     # 0x11dccf
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 0x1df34e(%rip), %rax    # 0x2188d0
movq (%rax), %rax
cmpq $0x80000, %rax          # imm = 0x80000
je 0x3959e
cmpq $0x800000, %rax         # imm = 0x800000
jne 0x395eb
callq 0x5f743
testl %eax, %eax
je 0x395eb
leaq 0xe472f(%rip), %rax     # 0x11dcd4
movq %rax, (%rbx)
leaq 0xf60d5(%rip), %rax     # 0x12f684
movq %rax, 0x8(%rbx)
movabsq $0x3ff0000000000000, %rcx # imm = 0x3FF0000000000000
movq %rcx, 0x10(%rbx)
movl $0x1, %edx
movl %edx, 0x1c(%rbx)
leaq 0xe4709(%rip), %rsi     # 0x11dcd9
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_O1/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 0x2fda27(%rip), %rax    # 0x337024
movl $0x1, (%rax)
callq 0xed2c
leaq 0x305ffd(%rip), %rax    # 0x33f60c
movl (%rax), %edi
addl $0x4, %edi
leaq 0x305ff5(%rip), %rax    # 0x33f610
movl (%rax), %esi
leaq 0xdd1b5(%rip), %rcx     # 0x1167d9
movl $0xc, %edx
callq 0xe7d0
popq %rbp
jmp 0xab5f
// File: /workspace/github_cpp_makefile_star2_O1/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 0x301c1d(%rip), %rbx    # 0x33b3e8
movzbl (%rbx), %edi
callq 0x33ef8
leaq 0x1df0f6(%rip), %rcx    # 0x2188d0
xorl %edx, %edx
cmpq $0x400, (%rcx)          # imm = 0x400
movzbl %al, %eax
cmovel %edx, %eax
movb %al, (%rbx)
callq 0x27872
leaq 0x1e1961(%rip), %rax    # 0x21b158
movb $0x0, (%rax)
movl $0x6a, %edi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xcf81
// File: /workspace/github_cpp_makefile_star2_O1/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, 0x30911e(%rip) # imm = 0xFFFFFFFF
leaq 0x205733(%rip), %rax    # 0x23ef58
movl $0x7b, (%rax)
leaq 0x1e1926(%rip), %rax    # 0x21b158
movb $0x0, (%rax)
leaq 0x1def9c(%rip), %rax    # 0x2187d8
cmpl $0x0, (%rax)
je 0x39848
callq 0xed5e
jmp 0x3984d
callq 0xed2c
leaq 0x3029cc(%rip), %rbx    # 0x33c220
leaq 0xdcfc9(%rip), %rsi     # 0x116824
movl $0x49, %edx
movq %rbx, %rdi
callq 0x92b0
leaq 0x305d9d(%rip), %r15    # 0x33f60c
movl (%r15), %edi
leaq 0x305d97(%rip), %r14    # 0x33f610
movl (%r14), %esi
movl $0xb, %edx
movq %rbx, %rcx
callq 0xe7d0
movups 0xdd00d(%rip), %xmm0    # 0x11689d
movaps %xmm0, 0x30(%rbx)
movups 0xdcff2(%rip), %xmm0    # 0x11688d
movaps %xmm0, 0x20(%rbx)
movups 0xdcfd7(%rip), %xmm0    # 0x11687d
movaps %xmm0, 0x10(%rbx)
movups 0xdcfbc(%rip), %xmm0    # 0x11686d
movaps %xmm0, (%rbx)
movl (%r15), %edi
incl %edi
movl (%r14), %esi
movl $0xb, %edx
movq %rbx, %rcx
callq 0xe7d0
leaq 0xdcfdd(%rip), %rsi     # 0x1168ad
movl $0x49, %edx
movq %rbx, %rdi
callq 0x92b0
movl (%r15), %edi
addl $0x2, %edi
movl (%r14), %esi
movl $0xb, %edx
movq %rbx, %rcx
callq 0xe7d0
movups 0xdd018(%rip), %xmm0    # 0x116912
movups %xmm0, 0x1c(%rbx)
movups 0xdd001(%rip), %xmm0    # 0x116906
movaps %xmm0, 0x10(%rbx)
movups 0xdcfe6(%rip), %xmm0    # 0x1168f6
movaps %xmm0, (%rbx)
movl (%r15), %edi
addl $0x3, %edi
movl (%r14), %esi
movl $0xb, %edx
movq %rbx, %rcx
callq 0xe7d0
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xab5f
// File: /workspace/github_cpp_makefile_star2_O1/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, 0x308ff4(%rip) # imm = 0xFFFFFFFE
leaq 0x205609(%rip), %rax    # 0x23ef58
movl $0x7b, (%rax)
leaq 0x1e17fc(%rip), %rax    # 0x21b158
movb $0x0, (%rax)
leaq 0x1dee72(%rip), %rax    # 0x2187d8
cmpl $0x0, (%rax)
je 0x39972
callq 0xed5e
jmp 0x39977
callq 0xed2c
leaq 0x3028a2(%rip), %rbx    # 0x33c220
leaq 0xdcf9d(%rip), %rsi     # 0x116922
movl $0x4b, %edx
movq %rbx, %rdi
callq 0x92b0
leaq 0x305c73(%rip), %rax    # 0x33f60c
movl (%rax), %edi
leaq 0x305c6e(%rip), %rax    # 0x33f610
movl (%rax), %esi
movl $0xb, %edx
movq %rbx, %rcx
callq 0xe7d0
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xab5f
// File: /workspace/github_cpp_makefile_star2_O1/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 0x30610c(%rip), %rax    # 0x33fd58
movslq (%rax), %rax
imulq $0xe8, %rax, %rax
leaq 0x1240d3(%rip), %rcx    # 0x15dd30
movl $0x1, %edx
movl %edx, 0x30(%rcx,%rax)
movsd 0x28(%rcx,%rax), %xmm0
subsd 0x308cec(%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_O1/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 0x308cc9(%rip), %xmm0   # 0x342960
leaq 0x3060ba(%rip), %rax    # 0x33fd58
movslq (%rax), %rax
imulq $0xe8, %rax, %rax
leaq 0x124081(%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_O1/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 0x306078(%rip), %rax    # 0x33fd58
movslq (%rax), %rax
imulq $0xe8, %rax, %rax
leaq 0x12403f(%rip), %rcx    # 0x15dd30
movl $0x1, %edx
movl %edx, 0x30(%rcx,%rax)
movsd 0x308c56(%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_O1/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 0x1e1439(%rip), %rax    # 0x21b3d4
movb (%rax), %al
xorl %ecx, %ecx
leaq 0x123d8a(%rip), %rdx    # 0x15dd30
movl $0x1, %esi
testb %al, %al
je 0x39fc4
movl $0x0, 0x30(%rdx,%rcx)
movl %esi, 0x1c(%rdx,%rcx)
movl %esi, 0xdc(%rdx,%rcx)
jmp 0x39fd4
movl $0x1, 0x30(%rdx,%rcx)
movl $0x0, 0x1c(%rdx,%rcx)
addq $0xe8, %rcx
cmpq $0x1220, %rcx           # imm = 0x1220
jne 0x39fab
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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:
movl %edi, %eax
leaq 0x1e0946(%rip), %rcx    # 0x21b300
movl %edi, (%rcx)
leal -0x30(%rax), %edi
cmpl $0xa, %edi
jb 0x3a9d9
cmpl $0x61, %eax
jl 0x3a9d0
addl $-0x57, %eax
movl %eax, %edi
jmp 0x3a9d9
leal -0x37(%rax), %edi
cmpl $0x41, %eax
cmovll %eax, %edi
cmpl $0x9, %edi
jbe 0x3a9df
retq
movl %edi, %eax
leaq 0x1e08c8(%rip), %rcx    # 0x21b2b0
cmpq $0x0, (%rcx,%rax,8)
je 0x3aa03
pushq %rbp
movq %rsp, %rbp
callq 0x1b3a7
movl $0x15, %edi
popq %rbp
jmp 0xfd83
leaq 0x1e086e(%rip), %rdx    # 0x21b278
movq (%rdx), %rsi
movl $0x1, %edi
cmpq %rsi, (%rcx,%rdi,8)
je 0x3aa32
incq %rdi
cmpq $0xa, %rdi
jne 0x3aa12
movq (%rdx), %rdx
movq %rdx, (%rcx,%rax,8)
movl $0x1, %edi
jmp 0x19792
movl $0x137, %edi            # imm = 0x137
jmp 0x9d80
// File: /workspace/github_cpp_makefile_star2_O1/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 0x1e082f(%rip), %rax    # 0x21b278
movq (%rax), %rsi
movl $0x1, %edx
leaq 0x1e0858(%rip), %rcx    # 0x21b2b0
cmpq %rsi, (%rcx,%rdx,8)
je 0x3aa8a
incq %rdx
cmpq $0xa, %rdx
jne 0x3aa58
movl $0x1, %edx
cmpq $0x0, (%rcx,%rdx,8)
je 0x3aa94
incq %rdx
cmpq $0xa, %rdx
jne 0x3aa6c
movl $0x138, %edi            # imm = 0x138
callq 0x9d80
xorl %ebx, %ebx
jmp 0x3aab6
movq $0x0, (%rcx,%rdx,8)
jmp 0x3aaa7
leal 0x30(%rdx), %esi
leaq 0x1e0862(%rip), %rdi    # 0x21b300
movl %esi, (%rdi)
movq (%rax), %rax
movq %rax, (%rcx,%rdx,8)
movl $0x1, %ebx
movl $0x1, %edi
callq 0x19792
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x3ab20
leaq 0x1e093e(%rip), %rax    # 0x21b408
movzbl (%rax), %eax
movl %eax, 0x309c49(%rip)    # 0x34471c
leaq 0x1e0939(%rip), %rax    # 0x21b413
movzbl (%rax), %eax
movl %eax, 0x309c3d(%rip)    # 0x344720
leaq 0x3008fe(%rip), %rax    # 0x33b3e8
movzbl (%rax), %eax
movl %eax, 0x309c31(%rip)    # 0x344724
leaq 0x1e091b(%rip), %rax    # 0x21b415
movzbl (%rax), %eax
movl %eax, 0x309c25(%rip)    # 0x344728
leaq 0x3007a6(%rip), %rax    # 0x33b2b0
movzbl (%rax), %eax
movl %eax, 0x309c19(%rip)    # 0x34472c
movl %edi, 0x309c17(%rip)    # 0x344730
incl 0x309c15(%rip)          # 0x344734
retq
cmpl $0x0, 0x309c09(%rip)    # 0x344730
je 0x3abb5
incl 0x309c05(%rip)          # 0x344738
movb 0x309be3(%rip), %al     # 0x34471c
leaq 0x1e08c8(%rip), %rcx    # 0x21b408
movb %al, (%rcx)
movb 0x309bd8(%rip), %al     # 0x344720
leaq 0x1e08c4(%rip), %rcx    # 0x21b413
movb %al, (%rcx)
movb 0x309bcd(%rip), %al     # 0x344724
leaq 0x30088a(%rip), %rcx    # 0x33b3e8
movb %al, (%rcx)
movb 0x309bc2(%rip), %al     # 0x344728
leaq 0x1e08a8(%rip), %rcx    # 0x21b415
movb %al, (%rcx)
leaq 0x30075e(%rip), %rcx    # 0x33b2d4
xorl %eax, %eax
cmpb $0x0, (%rcx)
je 0x3ab83
movl 0x309ba9(%rip), %eax    # 0x34472c
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x300720(%rip), %rcx    # 0x33b2b0
movb %al, (%rcx)
leaq 0x1ddcaf(%rip), %rbx    # 0x218848
movl $0x1, (%rbx)
movl $0x82, %edi
callq 0xcf81
movl $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x135796(%rip), %rax    # 0x170c60
movl $0x0, (%rax)
movl $0x7, %edi
movl $0xd, %esi
callq 0x1120f
movl $0x1, %edi
callq 0xfa6ba
callq 0xf8d50
callq 0xf43e5
leaq 0x1dfecb(%rip), %rax    # 0x21b3c5
movzbl (%rax), %eax
cmpl $0x1, %eax
je 0x3b510
cmpl $0x2, %eax
jne 0x3b51c
leaq 0xd21e8(%rip), %rdi     # 0x10d6f6
jmp 0x3b517
leaq 0xe6dbe(%rip), %rdi     # 0x1222d5
callq 0x2f3c6
leaq 0x1dd321(%rip), %rax    # 0x218844
movl $0x15be, (%rax)         # imm = 0x15BE
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x2ffd9c(%rip), %rbx    # 0x33b2d4
movzbl (%rbx), %edi
callq 0x3aabf
cmpb $0x0, (%rbx)
je 0x3b619
leaq 0x2d2948(%rip), %rax    # 0x30de98
cmpb $0x0, (%rax)
jne 0x3b619
leaq 0x2d293c(%rip), %rax    # 0x30de9c
cmpl $0x0, (%rax)
jne 0x3b619
leaq 0x2d1a60(%rip), %rax    # 0x30cfd0
movsd (%rax), %xmm0
leaq 0x2ffd75(%rip), %rax    # 0x33b2f0
movsd %xmm0, (%rax)
leaq 0x2d1a52(%rip), %rax    # 0x30cfd8
movsd (%rax), %xmm1
leaq 0x2ffd67(%rip), %rax    # 0x33b2f8
movsd %xmm1, (%rax)
leaq 0x2d1a44(%rip), %rax    # 0x30cfe0
movsd (%rax), %xmm2
leaq 0x2ffd59(%rip), %rax    # 0x33b300
movsd %xmm2, (%rax)
leaq 0x2ffd56(%rip), %rax    # 0x33b308
movl $0xfffffff9, (%rax)     # imm = 0xFFFFFFF9
leaq 0x2ffd81(%rip), %rax    # 0x33b340
cmpl $0x0, (%rax)
jne 0x3b5e5
leaq 0x2ffd45(%rip), %rax    # 0x33b310
movsd %xmm0, (%rax)
leaq 0x2ffd42(%rip), %rax    # 0x33b318
movsd %xmm1, (%rax)
leaq 0x2ffd3f(%rip), %rax    # 0x33b320
movsd %xmm2, (%rax)
leaq 0x2ffd24(%rip), %rax    # 0x33b310
movsd (%rax), %xmm0
callq 0x9710
leaq 0x2d19cc(%rip), %rax    # 0x30cfc8
movsd %xmm0, (%rax)
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x3b619
jp 0x3b619
movabsq $0x3f50624dd2f1a9fc, %rcx # imm = 0x3F50624DD2F1A9FC
movq %rcx, (%rax)
cmpb $0x0, (%rbx)
je 0x3b62d
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
movl $0x2, %esi
callq 0xfa611
movl $0x1, %edi
xorl %esi, %esi
callq 0x3ada6
movl $0x70, %edi
callq 0xcf81
leaq 0x2ffc8b(%rip), %rax    # 0x33b2d5
movb $0x0, (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x2f6de0(%rip), %rax    # 0x338256
xorl %ecx, %ecx
movw %cx, (%rax)
leaq 0x2f6dd0(%rip), %rax    # 0x338252
movw %cx, (%rax)
leaq 0x2f6dc8(%rip), %rax    # 0x338254
movw %cx, (%rax)
movl $0x6e, %edi
xorl %esi, %esi
callq 0x61765
popq %rbp
jmp 0xfb1a
// File: /workspace/github_cpp_makefile_star2_O1/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 0x47432
xorl %r14d, %r14d
leaq 0x2efee4(%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 0x47394
shll $0x4, %r12d
addl $0xffd0, %ecx           # imm = 0xFFD0
orl %r12d, %ecx
movb $0x1, %r15b
movl %ecx, %r12d
jmp 0x4741c
leal -0x41(%rcx), %edx
cmpl $0x5, %edx
ja 0x473ac
shll $0x4, %r12d
addl %ecx, %r12d
addl $-0x37, %r12d
movb $0x1, %r15b
jmp 0x4741c
testb %r15b, %r15b
je 0x47408
movb (%rbx), %cl
cmpb $0x3d, %cl
jne 0x473d2
leaq 0x2efd75(%rip), %rdx    # 0x337134
movl (%rdx), %ecx
leaq 0x2efc68(%rip), %rsi    # 0x337030
cmpl $0x101, %ecx            # imm = 0x101
jl 0x473f9
jmp 0x47405
cmpb $0x24, %cl
sete %dl
movl (%r13), %ecx
cmpl $0x101, %ecx            # imm = 0x101
setl %dil
andb %dl, %dil
movq %r13, %rdx
leaq 0x2efd4d(%rip), %rsi    # 0x337140
cmpb $0x1, %dil
jne 0x47405
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 0x4741c
cmpl $0x20000000, %eax       # imm = 0x20000000
jne 0x47432
movq %rbx, %rdi
callq 0x9120
cltq
incq %r14
cmpq %rax, %r14
jl 0x47366
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x1d3f7f(%rip), %rax    # 0x21b408
movb $0x1, (%rax)
movl $0x81, %edi
callq 0xcf81
leaq 0x2f7273(%rip), %rax    # 0x33e710
xorl %r14d, %r14d
movb %r14b, (%rax)
leaq 0x2f7246(%rip), %rax    # 0x33e6f0
movb %r14b, (%rax)
cmpb %r14b, (%rbx)
je 0x4753e
movl $0x1, %r12d
xorl %r13d, %r13d
xorl %r15d, %r15d
movzbl (%rbx,%r13), %eax
cmpl $0x2f, %eax
je 0x47502
testl %eax, %eax
je 0x4753e
cmpb $0x5f, %al
movzbl %al, %eax
movl $0x20, %ecx
cmovel %ecx, %eax
cmpl $0x1, %r14d
je 0x4750a
testl %r14d, %r14d
jne 0x4752b
movl %r15d, %ecx
incl %r15d
leaq 0x2f71fb(%rip), %rdx    # 0x33e6f0
movb %al, (%rdx,%rcx)
movb $0x0, (%rdx,%r15)
xorl %r14d, %r14d
jmp 0x47525
incl %r14d
xorl %r15d, %r15d
jmp 0x4752b
movl %r15d, %ecx
incl %r15d
leaq 0x2f71f9(%rip), %rdx    # 0x33e710
movb %al, (%rdx,%rcx)
movb $0x0, (%rdx,%r15)
movl $0x1, %r14d
cmpl $0x1d, %r15d
ja 0x4753e
movl %r12d, %r13d
movq %rbx, %rdi
callq 0x9120
incl %r12d
cmpq %r13, %rax
ja 0x474c2
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x2c5f60(%rip), %rax    # 0x30d4b4
cmpl $0x0, (%rax)
je 0x4756c
leaq 0x2c5f50(%rip), %rax    # 0x30d4b0
leaq 0x2c5f3d(%rip), %rcx    # 0x30d4a4
orb $0x1, (%rcx)
jmp 0x47582
leaq 0x2c5f3d(%rip), %rcx    # 0x30d4b0
cmpl $0x0, (%rcx)
je 0x475a3
leaq 0x2c5f25(%rip), %rcx    # 0x30d4a4
andb $-0x2, (%rcx)
movl $0x0, (%rax)
leaq 0x1f79af(%rip), %rax    # 0x23ef3e
cmpb $0x0, (%rax)
je 0x475b6
leaq 0x2c5e31(%rip), %rax    # 0x30d3cc
movl $0x1, (%rax)
jmp 0x475b6
leaq 0x2c5efa(%rip), %rdx    # 0x30d4a4
xorl %esi, %esi
movl %esi, (%rdx)
movl $0x1, (%rcx)
movl %esi, (%rax)
testl %edi, %edi
je 0x4764f
leaq 0x2c616f(%rip), %rax    # 0x30d734
cmpl $0x0, (%rax)
jne 0x4764f
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
callq 0xa495
leaq 0x2c60fe(%rip), %rax    # 0x30d6e0
movsd (%rax), %xmm0
movsd %xmm0, -0x8(%rbp)
movl $0x7e3, %edi            # imm = 0x7E3
movl $0x7, %esi
movl $0x1, %edx
callq 0xd4110
movl $0x12, %eax
ucomisd -0x8(%rbp), %xmm0
ja 0x47634
leaq 0x2c60b6(%rip), %rax    # 0x30d6c8
movl $0xfffff7f3, %ecx       # imm = 0xFFFFF7F3
addl (%rax), %ecx
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
mulsd 0xc4408(%rip), %xmm0    # 0x10ba30
addsd 0xc4408(%rip), %xmm0    # 0x10ba38
cvttsd2si %xmm0, %eax
leaq 0x2c60ed(%rip), %rcx    # 0x30d728
movl %eax, (%rcx)
leaq 0x2c5cd8(%rip), %rax    # 0x30d31c
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x1f28e6(%rip), %rax    # 0x23ccf8
movsd (%rax), %xmm0
leaq 0x2f0fe3(%rip), %rax    # 0x33b400
movsd %xmm0, (%rax)
leaq 0x1f28d8(%rip), %rax    # 0x23cd00
movsd (%rax), %xmm0
leaq 0x2f0fd5(%rip), %rax    # 0x33b408
movsd %xmm0, (%rax)
leaq 0x1f28ca(%rip), %rax    # 0x23cd08
movsd (%rax), %xmm0
leaq 0x2f0fc7(%rip), %rax    # 0x33b410
movsd %xmm0, (%rax)
leaq 0x1f28bc(%rip), %rax    # 0x23cd10
movsd (%rax), %xmm0
leaq 0x2f0fb9(%rip), %rax    # 0x33b418
movsd %xmm0, (%rax)
leaq 0x1f28ae(%rip), %rax    # 0x23cd18
movsd (%rax), %xmm0
leaq 0x2f0fab(%rip), %rax    # 0x33b420
movsd %xmm0, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x4d678
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 0x4d683
cmpb $0x0, (%rsi)
movl %ebx, %r15d
je 0x4d5f4
imulq $0x2260, %r15, %r12     # imm = 0x2260
leaq 0x2c0d6e(%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 0x4d5f4
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 0x4d5f4
btq %rdx, %rcx
jae 0x4d5ef
movb $0x0, (%rax)
incq %rax
jmp 0x4d5d8
testq %rdx, %rdx
je 0x4d5ea
imulq $0x2260, %r15, %rax     # imm = 0x2260
leaq 0x2c0cde(%rip), %r14    # 0x30e2e0
movb $0x0, 0x20d(%r14,%rax)
cmpb $0x0, 0x10d(%r14,%rax)
je 0x4d67e
addq %rax, %r14
movl $0x2, 0x225c(%r14)
cmpl $0x0, 0x2230(%r14)
je 0x4d657
movq $0x0, (%r14)
movl $0x0, 0x2228(%r14)
movl $0x1, 0x2234(%r14)
movl %ebx, %edi
movl $0xf, %esi
callq 0xb49f
leaq 0x2c010a(%rip), %rax    # 0x30d768
movsd (%rax), %xmm0
subsd 0x2238(%r14), %xmm0
movsd %xmm0, 0x2248(%r14)
xorl %eax, %eax
jmp 0x4d683
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_O1/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 0x1cae47(%rip), %rax    # 0x2188d0
movq $0x200, (%rax)          # imm = 0x200
leaq 0x2c0849(%rip), %rax    # 0x30e2e0
movq $0x0, 0x157c0(%rax)
cmpl $0x0, 0x17a1c(%rax)
jne 0x4dacd
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 0xb49f
// File: /workspace/github_cpp_makefile_star2_O1/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 0x31dd6b(%rip), %r15    # 0x36b870
xorl %r14d, %r14d
movl $0x201, %edx            # imm = 0x201
movq %r15, %rdi
xorl %esi, %esi
callq 0x91a0
leaq 0x31df62(%rip), %rdi    # 0x36ba80
movl $0x201, %edx            # imm = 0x201
xorl %esi, %esi
callq 0x91a0
testq %rbx, %rbx
je 0x4db81
addq $0x2, %rbx
xorl %eax, %eax
movzbl -0x1(%rbx), %r14d
testl %r14d, %r14d
je 0x4db75
cmpl $0x3d, %r14d
je 0x4db62
cmpl $0x3a, %r14d
je 0x4db62
movb %r14b, (%rax,%r15)
incq %rax
incq %rbx
cmpq $0x200, %rax            # imm = 0x200
jne 0x4db35
xorl %r14d, %r14d
jmp 0x4db75
movsbl %r14b, %r14d
leaq 0x31df13(%rip), %rdi    # 0x36ba80
movq %rbx, %rsi
callq 0x9340
leaq 0x31dcf4(%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_O1/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 0x2ed866(%rip), %rax    # 0x33b400
movsd (%rax), %xmm0
leaq 0x1ef153(%rip), %rax    # 0x23ccf8
movsd %xmm0, (%rax)
leaq 0x2ed858(%rip), %rax    # 0x33b408
movsd (%rax), %xmm0
leaq 0x1ef145(%rip), %rax    # 0x23cd00
movsd %xmm0, (%rax)
leaq 0x2ed84a(%rip), %rax    # 0x33b410
movsd (%rax), %xmm0
leaq 0x1ef137(%rip), %rax    # 0x23cd08
movsd %xmm0, (%rax)
leaq 0x2ed83c(%rip), %rax    # 0x33b418
movsd (%rax), %xmm0
leaq 0x1ef129(%rip), %rax    # 0x23cd10
movsd %xmm0, (%rax)
leaq 0x2ed82e(%rip), %rax    # 0x33b420
movsd (%rax), %xmm0
leaq 0x1ef11b(%rip), %rax    # 0x23cd18
movsd %xmm0, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x5809c
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
movl %edi, %eax
imulq $0x2260, %rax, %rcx     # imm = 0x2260
leaq 0x2b6274(%rip), %rax    # 0x30e2e0
cmpl $0x0, 0x2234(%rax,%rcx)
je 0x58096
addq %rcx, %rax
cmpl $0x0, 0x2230(%rax)
jg 0x5808b
jmp 0x58096
movl %ebx, %edi
callq 0xbb11
movl %ebx, %edi
callq 0xb9c3
testl %eax, %eax
jne 0x58084
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x58126
movq %rdi, %rbx
leaq 0x2b46ee(%rip), %rax    # 0x30c7a8
cmpb $0x48, (%rax)
jne 0x58101
cmpb $0x0, (%rbx)
je 0x58101
movl $0x1, %r14d
xorl %r13d, %r13d
leaq 0x2b61fc(%rip), %r15    # 0x30e2d0
leaq 0x1e6369(%rip), %r12    # 0x23e444
movsbl (%rbx,%r13), %esi
movl (%r15), %edi
movl (%r12), %edx
xorl %ecx, %ecx
callq 0xac26
movl %r14d, %r13d
movq %rbx, %rdi
callq 0x9120
incl %r14d
cmpq %r13, %rax
ja 0x580db
leaq 0x1e6258(%rip), %rax    # 0x23e360
movq (%rax), %rsi
testq %rsi, %rsi
je 0x58126
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_O1/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 0xbb11
leaq 0x1c03e4(%rip), %rcx    # 0x2188d0
movq (%rcx), %rcx
movzbl %al, %edx
andb $0x7f, %al
cmpq $0x4000, %rcx           # imm = 0x4000
movzbl %al, %eax
cmovnel %edx, %eax
cmpq $0x10000, %rcx          # imm = 0x10000
sete %cl
leaq 0x1e5e76(%rip), %rdx    # 0x23e388
movq (%rdx), %rsi
testq %rsi, %rsi
setne %dl
andb %cl, %dl
movzbl %al, %ebx
movl %ebx, %edi
cmpb $0x1, %dl
jne 0x5852e
callq 0x9480
jmp 0x58533
callq 0x58135
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: get_ticc_char()
int get_ticc_char() 
{
u08 c;

   // Get the next byte from the TICC port (or simulation file)

   if(rcvr_type == TICC_RCVR) c = get_serial_char(RCVR_PORT);
   else                       c = get_serial_char(TICC_PORT);

   if((rcvr_type == TICC_RCVR) && (ticc_file == 0)) {  // aaattt
      echo_stream(c); // echo ticc char to a file or com device
   }
   else if(ticc_file) {  // echo ticc data to TICC capture file
      echo_ticc(c);
   }
   return c;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x1c0386(%rip), %rbx    # 0x2188d0
movl $0x10000, %r14d         # imm = 0x10000
xorl %eax, %eax
cmpq %r14, (%rbx)
setne %al
leal (%rax,%rax,2), %edi
addl $0xa, %edi
callq 0xbb11
xorq (%rbx), %r14
leaq 0x1e5e1b(%rip), %rcx    # 0x23e388
movq (%rcx), %rsi
orq %rsi, %r14
movzbl %al, %ebx
jne 0x58581
movl %ebx, %edi
callq 0x58135
jmp 0x5858d
testq %rsi, %rsi
je 0x5858d
movl %ebx, %edi
callq 0x9480
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: get_enviro_char()
int get_enviro_char() 
{
u08 c;

   // Get the next byte from the environmental sensor port (or simulation file)

   if(rcvr_type == THERMO_RCVR) {
      c = get_serial_char(RCVR_PORT);
   }
   else {
      c = get_serial_char(THERMO_PORT);
   }

   if((rcvr_type == THERMO_RCVR) && (enviro_file == 0)) {  // aaattt
      echo_stream(c); // echo enviro char to a file or com device
   }
   else if(enviro_file) {  // echo enviro data to capture file
      echo_enviro(c);
   }
   return c;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x1c032e(%rip), %rbx    # 0x2188d0
movl $0x80000, %r14d         # imm = 0x80000
xorl %eax, %eax
cmpq %r14, (%rbx)
setne %al
leal (%rax,%rax,4), %edi
addl $0xa, %edi
callq 0xbb11
xorq (%rbx), %r14
leaq 0x1e5dbb(%rip), %rcx    # 0x23e380
movq (%rcx), %rsi
orq %rsi, %r14
movzbl %al, %ebx
jne 0x585d9
movl %ebx, %edi
callq 0x58135
jmp 0x585e5
testq %rsi, %rsi
je 0x585e5
movl %ebx, %edi
callq 0x9480
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: drain_com_data()
void drain_com_data()
{
   // drain any data from the serial input buffer

   if(sim_file) return;
   if(rcvr_type == NO_RCVR) return;

   Sleep(250);
   while(SERIAL_DATA_AVAILABLE(RCVR_PORT)) {
      update_pwm();
      if((this_msec-com[RCVR_PORT].last_com_time) > 1000.0) { 
         break;
      }
      get_serial_char(RCVR_PORT);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x1e5db3(%rip), %rax    # 0x23e3c0
cmpq $0x0, (%rax)
jne 0x5867d
leaq 0x1c02b6(%rip), %rax    # 0x2188d0
cmpq $0x400, (%rax)          # imm = 0x400
je 0x5867d
movl $0xfa, %edi
callq 0xaff7
movl $0xa, %edi
callq 0xb9c3
testl %eax, %eax
je 0x5867d
leaq 0x2b5126(%rip), %rbx    # 0x30d768
leaq 0x2b5c97(%rip), %r14    # 0x30e2e0
callq 0xd1865
movsd (%rbx), %xmm0
subsd 0x17a08(%r14), %xmm0
ucomisd 0xb09d5(%rip), %xmm0    # 0x109038
ja 0x5867d
movl $0xa, %edi
callq 0xbb11
movl $0xa, %edi
callq 0xb9c3
testl %eax, %eax
jne 0x58649
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: get_sync_time()
void get_sync_time()
{
int bits;

   // get the approximate time the receiver sent the start bit of the message
   // (this assumes no delay through the operating system buffers)

   if(com[RCVR_PORT].baud_rate == 0) return;

   bits = 1 + com[RCVR_PORT].data_bits + com[RCVR_PORT].stop_bits;
   if(com[RCVR_PORT].parity) ++bits;
   msg_sync_msec = 0.0 - ((double) bits / (double) com[RCVR_PORT].baud_rate);

   msg_sync_msec += GetMsecs();
}

// Assembly:
leaq 0x2b5c57(%rip), %rcx    # 0x30e2e0
movl 0x159d0(%rcx), %eax
testl %eax, %eax
je 0x586e3
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl 0x159d4(%rcx), %edx
addl 0x159d8(%rcx), %edx
cmpl $0x1, 0x159dc(%rcx)
sbbl $-0x1, %edx
incl %edx
cvtsi2sd %edx, %xmm0
cvtsi2sd %eax, %xmm1
divsd %xmm1, %xmm0
xorpd %xmm1, %xmm1
subsd %xmm0, %xmm1
leaq 0x2b5054(%rip), %rbx    # 0x30d720
movsd %xmm1, (%rbx)
callq 0xaea1
addsd (%rbx), %xmm0
movsd %xmm0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: check_utc_ofs(int)
void check_utc_ofs(int redraw)
{
   if(have_utc_ofs) return;
   else if((pri_year > 2016) && (utc_offset < 18)) return;
   else if(utc_offset < MIN_UTC_OFFSET) return;

   if((redraw > 0) && (have_utc_ofs == 0)) need_redraw = 2000+redraw;
   if(redraw < 0) have_utc_ofs = (0 - redraw);
   else           have_utc_ofs = redraw;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x2b4c2d(%rip), %rax    # 0x30d31c
cmpl $0x0, (%rax)
jne 0x5873e
leaq 0x2b4e19(%rip), %rcx    # 0x30d514
cmpl $0x7e1, (%rcx)          # imm = 0x7E1
setge %cl
leaq 0x2b501d(%rip), %rdx    # 0x30d728
movl (%rdx), %edx
cmpl $0x12, %edx
setl %sil
andb %cl, %sil
cmpl $0x11, %edx
setl %cl
orb %sil, %cl
jne 0x5873e
testl %edi, %edi
jle 0x58735
leal 0x7d0(%rdi), %ecx
leaq 0x1c0111(%rip), %rdx    # 0x218844
movl %ecx, (%rdx)
movl %edi, %ecx
negl %ecx
cmovsl %edi, %ecx
movl %ecx, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: get_unkn_message()
void get_unkn_message()
{
u08 c;

   // This routine reads and throws away messages from unknown receiver types.

   if(SERIAL_DATA_AVAILABLE(RCVR_PORT) == 0) {
      check_com_timer(RCVR_PORT);
      return;
   }
   else {
      reset_com_timer(RCVR_PORT);
   }

   c = get_com_char();
   if(com[RCVR_PORT].rcv_error) {      // parity/framing/overrun errors
      com[RCVR_PORT].rcv_error = 0;
   }

   tsip_wptr = 0;
   tsip_sync = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl $0xa, %edi
callq 0xb9c3
movl $0xa, %edi
testl %eax, %eax
je 0x58790
callq 0x1ea2c
callq 0x584d5
leaq 0x2b5b78(%rip), %rax    # 0x30e2e0
cmpb $0x0, 0x17a12(%rax)
je 0x58778
movb $0x0, 0x17a12(%rax)
leaq 0x2dfad3(%rip), %rax    # 0x338252
xorl %ecx, %ecx
movw %cx, (%rax)
leaq 0x2dfacb(%rip), %rax    # 0x338256
movw %cx, (%rax)
popq %rbp
retq
popq %rbp
jmp 0x1e6a0