// File: /workspace/github_cpp_makefile_star2_O2/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 0x2f3417(%rip), %r12    # 0x329d58
movl (%r12), %eax
leaq 0x2f3410(%rip), %rcx    # 0x329d5c
movl %eax, (%rcx)
cmpl $0xe, %edi
je 0x36966
leaq 0x2f340a(%rip), %rax    # 0x329d64
movl %edi, (%rax)
leaq 0x1ceac8(%rip), %rax    # 0x20542b
movb %dil, (%rax)
movl %edi, (%r12)
movl %esi, -0x2c(%rbp)
movl %esi, 0x2f5fc9(%rip)    # 0x32c93c
leaq 0x1f25de(%rip), %rax    # 0x228f58
movl $0x7b, (%rax)
leaq 0x1ce7d1(%rip), %rax    # 0x205158
movb $0x0, (%rax)
callq 0x360d4
leaq 0x1cbe42(%rip), %rax    # 0x2027d8
cmpl $0x0, (%rax)
je 0x369a2
callq 0xe7d9
jmp 0x369a7
callq 0xe7aa
movslq (%r12), %rax
imulq $0xe8, %rax, %rax
leaq 0x111377(%rip), %rdx    # 0x147d30
movl 0x18(%rdx,%rax), %r15d
leaq 0x1cea0f(%rip), %rcx    # 0x2053d4
cmpb $0x0, (%rcx)
leaq 0xc6160(%rip), %rsi     # 0xfcb2f
leaq 0xccd81(%rip), %rcx     # 0x103757
cmoveq %rsi, %rcx
movq (%rdx,%rax), %rdx
leaq 0x2ef83b(%rip), %r14    # 0x326220
leaq 0xca09a(%rip), %rsi     # 0x100a86
movq %r14, %rdi
movq %rdx, %r8
xorl %eax, %eax
callq 0x9060
leaq 0x2f2c0c(%rip), %rbx    # 0x32960c
movl (%rbx), %edi
leaq 0x2f2c07(%rip), %r13    # 0x329610
movl (%r13), %esi
pushq $0xb
popq %rdx
movq %r14, %rcx
callq 0xe2d2
cmpl $0xe, (%r12)
jne 0x36a31
leaq 0x2ef7fa(%rip), %rdi    # 0x326220
leaq 0xca09e(%rip), %rsi     # 0x100acb
pushq $0x49
jmp 0x36a5f
leaq 0x1f2506(%rip), %rax    # 0x228f3e
cmpb $0x0, (%rax)
je 0x36a4f
leaq 0x2ef7dc(%rip), %rdi    # 0x326220
leaq 0xca0c9(%rip), %rsi     # 0x100b14
pushq $0x51
jmp 0x36a5f
leaq 0x2ef7ca(%rip), %rdi    # 0x326220
leaq 0xca108(%rip), %rsi     # 0x100b65
pushq $0x58
popq %rdx
callq 0x92a0
movl (%rbx), %edi
incl %edi
movl (%r13), %esi
leaq 0x2ef7ac(%rip), %rcx    # 0x326220
pushq $0xb
popq %rdx
callq 0xe2d2
movl (%r12), %edi
callq 0x13376
testl %eax, %eax
je 0x36aa9
leaq 0x1cbe40(%rip), %rax    # 0x2028d0
cmpq $0x1000000, (%rax)      # imm = 0x1000000
jne 0x36abb
leaq 0x2ef780(%rip), %rdi    # 0x326220
leaq 0xca116(%rip), %rsi     # 0x100bbd
jmp 0x36ac9
leaq 0x2ef770(%rip), %rdi    # 0x326220
leaq 0xca1b4(%rip), %rsi     # 0x100c6b
pushq $0x47
jmp 0x36acb
leaq 0x2ef75e(%rip), %rdi    # 0x326220
leaq 0xca14b(%rip), %rsi     # 0x100c14
pushq $0x57
popq %rdx
callq 0x92a0
testl %r15d, %r15d
leaq 0xc9fa6(%rip), %rax     # 0x100a81
leaq 0xca315(%rip), %r14     # 0x100df7
cmoveq %rax, %r14
movl (%rbx), %edi
addl $0x2, %edi
movl (%r13), %esi
leaq 0x2ef72a(%rip), %r15    # 0x326220
pushq $0xb
popq %r12
movl %r12d, %edx
movq %r15, %rcx
callq 0xe2d2
leaq 0xca1a6(%rip), %rsi     # 0x100cb2
movq %r15, %rdi
movl -0x2c(%rbp), %edx
movq %r14, %rcx
xorl %eax, %eax
callq 0x9060
movl (%rbx), %edi
addl $0x3, %edi
movl (%r13), %esi
movl %r12d, %edx
movq %r15, %rcx
callq 0xe2d2
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xaa05