// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathui.cpp
// Function: edit_plot(int, int)
void edit_plot(int id, int c)
{
char *s;
char *a;
char *pid;

   // process the plot control commands

   last_selected_plot = selected_plot;
   if(id != FFT) pre_fft_plot = id;

   selected_plot = id;
   #ifdef FFT_STUFF
      if(selected_plot != FFT) live_fft = selected_plot;
   #endif
   getting_plot = c;
   first_key = '{';
   prot_menu = 0;
   set_steps();

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

   // display prompt string for the command
   if(plot[selected_plot].show_plot) s = "hide";
   else                              s = "show";
   if(auto_scale) a = "disable";
   else           a = "enable";

   pid = plot[selected_plot].plot_id;
   sprintf(out, " %4s plot: A)utoscale %s all plots      X) toggle %s autoscale modes", pid, a, pid);
   vidstr(EDIT_ROW+0, EDIT_COL, PROMPT_COLOR, out);

   #ifdef FFT_STUFF
      if(selected_plot == FFT) sprintf(out, "            C)olor   I)nvert  S)cale factor   Z)ero ref     /)statistics");
      else if(luxor)           sprintf(out, "            C)olor   I)nvert  S)cale factor   Z)ero ref     /)statistics   &C)al");
      else                     sprintf(out, "            C)olor   I)nvert  S)cale factor   Z)ero ref     /)statistics   F)FT   H)ist");
   #else
      if(luxor) sprintf(out,                "            C)olor   I)nvert  S)cale factor   Z)ero ref     &)Cal   /)statistics");
      else      sprintf(out,                "            C)olor   I)nvert  S)cale factor   Z)ero ref     /)statistics");
   #endif
   vidstr(EDIT_ROW+1, EDIT_COL, PROMPT_COLOR, out);

   if(tie_plot(selected_plot)) {
      if(rcvr_type == PRS_RCVR) {
         sprintf(out,                       "            trend L)ine       =)remove trend  *)derivative  #) FC as freq   ~)deglitch");
      }
      else {
         sprintf(out,                       "            trend L)ine       =)remove trend  *)derivative  #) TIE as freq  ~)deglitch");
      }
   }
   else {
      sprintf(out,                          "            trend L)ine       =)remove trend  *)derivative  ~)deglitch");
   }
   vidstr(EDIT_ROW+2, EDIT_COL, PROMPT_COLOR, out);

   sprintf(out,                             "            %c or <cr>=%s", c, s);
   vidstr(EDIT_ROW+3, EDIT_COL, PROMPT_COLOR, out);

   refresh_page();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x3062cd(%rip), %r15    # 0x33fd58
movl (%r15), %eax
leaq 0x3062c7(%rip), %rcx    # 0x33fd5c
movl %eax, (%rcx)
cmpl $0xe, %edi
je 0x39aaf
leaq 0x3062c1(%rip), %rax    # 0x33fd64
movl %edi, (%rax)
leaq 0x1e197f(%rip), %rax    # 0x21b42b
movb %dil, (%rax)
movl %edi, (%r15)
movl %esi, 0x308e84(%rip)    # 0x34293c
leaq 0x205499(%rip), %rax    # 0x23ef58
movl $0x7b, (%rax)
leaq 0x1e168c(%rip), %rax    # 0x21b158
movb $0x0, (%rax)
movslq %edi, %rax
imulq $0xe8, %rax, %rax
leaq 0x124250(%rip), %r14    # 0x15dd30
movsd 0x38(%r14,%rax), %xmm0
movsd 0xcf611(%rip), %xmm1    # 0x109100
mulsd %xmm0, %xmm1
movsd %xmm1, 0x308e5d(%rip)   # 0x342958
movq $0x0, 0x308e5a(%rip) # 0x342960
movsd 0x10(%r14,%rax), %xmm1
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm1
jne 0x39b19
jnp 0x39b2d
mulsd 0xcf587(%rip), %xmm1    # 0x1090a8
divsd %xmm1, %xmm0
movsd %xmm0, 0x308e33(%rip)   # 0x342960
movl %esi, -0x2c(%rbp)
leaq 0x1deca1(%rip), %rax    # 0x2187d8
cmpl $0x0, (%rax)
je 0x39b43
callq 0xeceb
jmp 0x39b48
callq 0xecb9
movslq (%r15), %rax
imulq $0xe8, %rax, %rax
movl 0x18(%r14,%rax), %ebx
leaq 0x1e1876(%rip), %rcx    # 0x21b3d4
cmpb $0x0, (%rcx)
leaq 0xd8f47(%rip), %rdx     # 0x112aaf
leaq 0xdfb68(%rip), %rcx     # 0x1196d7
cmoveq %rdx, %rcx
movq (%r14,%rax), %rdx
leaq 0x3026a2(%rip), %r14    # 0x33c220
leaq 0xdce81(%rip), %rsi     # 0x116a06
movq %r14, %rdi
movq %rdx, %r8
xorl %eax, %eax
callq 0x9060
leaq 0x305a73(%rip), %r13    # 0x33f60c
movl (%r13), %edi
leaq 0x305a6c(%rip), %r12    # 0x33f610
movl (%r12), %esi
movl $0xb, %edx
movq %r14, %rcx
callq 0xe787
cmpl $0xe, (%r15)
jne 0x39bd0
leaq 0x30265e(%rip), %rdi    # 0x33c220
leaq 0xdce82(%rip), %rsi     # 0x116a4b
movl $0x49, %edx
jmp 0x39c04
leaq 0x205367(%rip), %rax    # 0x23ef3e
cmpb $0x0, (%rax)
je 0x39bf1
leaq 0x30263d(%rip), %rdi    # 0x33c220
leaq 0xdceaa(%rip), %rsi     # 0x116a94
movl $0x51, %edx
jmp 0x39c04
leaq 0x302628(%rip), %rdi    # 0x33c220
leaq 0xdcee6(%rip), %rsi     # 0x116ae5
movl $0x58, %edx
callq 0x92b0
movl (%r13), %edi
incl %edi
movl (%r12), %esi
leaq 0x302606(%rip), %rcx    # 0x33c220
movl $0xb, %edx
callq 0xe787
movl (%r15), %edi
callq 0x13c3e
testl %eax, %eax
je 0x39c50
leaq 0x1dec99(%rip), %rax    # 0x2188d0
cmpq $0x1000000, (%rax)      # imm = 0x1000000
jne 0x39c65
leaq 0x3025d9(%rip), %rdi    # 0x33c220
leaq 0xdceef(%rip), %rsi     # 0x116b3d
jmp 0x39c73
leaq 0x3025c9(%rip), %rdi    # 0x33c220
leaq 0xdcf8d(%rip), %rsi     # 0x116beb
movl $0x47, %edx
jmp 0x39c78
leaq 0x3025b4(%rip), %rdi    # 0x33c220
leaq 0xdcf21(%rip), %rsi     # 0x116b94
movl $0x57, %edx
callq 0x92b0
testl %ebx, %ebx
leaq 0xdcd7b(%rip), %rax     # 0x116a01
leaq 0xdd0ea(%rip), %r14     # 0x116d77
cmoveq %rax, %r14
movl (%r13), %edi
addl $0x2, %edi
movl (%r12), %esi
leaq 0x30257d(%rip), %r15    # 0x33c220
movl $0xb, %edx
movq %r15, %rcx
callq 0xe787
leaq 0xdcf7b(%rip), %rsi     # 0x116c32
movq %r15, %rdi
movl -0x2c(%rbp), %edx
movq %r14, %rcx
xorl %eax, %eax
callq 0x9060
movl (%r13), %edi
addl $0x3, %edi
movl (%r12), %esi
movl $0xb, %edx
movq %r15, %rcx
callq 0xe787
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xab54