// File: /workspace/github_cpp_makefile_star2_O1/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 0x306387(%rip), %r15    # 0x33fd58
movl (%r15), %eax
leaq 0x306381(%rip), %rcx    # 0x33fd5c
movl %eax, (%rcx)
cmpl $0xe, %edi
jne 0x399e7
movl %edi, (%r15)
jmp 0x399fd
leaq 0x306376(%rip), %rax    # 0x33fd64
movl %edi, (%rax)
movl %edi, (%r15)
leaq 0x1e1a31(%rip), %rax    # 0x21b42b
movb %dil, (%rax)
movl %esi, 0x308f39(%rip)    # 0x34293c
leaq 0x20554e(%rip), %rax    # 0x23ef58
movl $0x7b, (%rax)
leaq 0x1e1741(%rip), %rax    # 0x21b158
movb $0x0, (%rax)
movslq (%r15), %rax
imulq $0xe8, %rax, %rax
leaq 0x124305(%rip), %r14    # 0x15dd30
movsd 0x38(%r14,%rax), %xmm0
mulsd 0xcf6c6(%rip), %xmm0    # 0x109100
movsd %xmm0, 0x308f16(%rip)   # 0x342958
movq $0x0, 0x308f13(%rip) # 0x342960
movsd 0x10(%r14,%rax), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x39a60
jnp 0x39a7c
addq %r14, %rax
movsd 0x38(%rax), %xmm1
mulsd 0xcf638(%rip), %xmm0    # 0x1090a8
divsd %xmm0, %xmm1
movsd %xmm1, 0x308ee4(%rip)   # 0x342960
movl %esi, -0x2c(%rbp)
leaq 0x1ded52(%rip), %rax    # 0x2187d8
cmpl $0x0, (%rax)
je 0x39a92
callq 0xed5e
jmp 0x39a97
callq 0xed2c
movslq (%r15), %rax
imulq $0xe8, %rax, %rax
movl 0x18(%r14,%rax), %ebx
leaq 0x1e1927(%rip), %rcx    # 0x21b3d4
cmpb $0x0, (%rcx)
leaq 0xd8f64(%rip), %rdx     # 0x112a1b
leaq 0xdfb85(%rip), %rcx     # 0x119643
cmoveq %rdx, %rcx
movq (%r14,%rax), %rdx
leaq 0x302753(%rip), %r14    # 0x33c220
leaq 0xdce9e(%rip), %rsi     # 0x116972
movq %r14, %rdi
movq %rdx, %r8
xorl %eax, %eax
callq 0x9060
leaq 0x305b24(%rip), %r13    # 0x33f60c
movl (%r13), %edi
leaq 0x305b1d(%rip), %r12    # 0x33f610
movl (%r12), %esi
movl $0xb, %edx
movq %r14, %rcx
callq 0xe7d0
cmpl $0xe, (%r15)
jne 0x39b1f
leaq 0x30270f(%rip), %rdi    # 0x33c220
leaq 0xdce9f(%rip), %rsi     # 0x1169b7
movl $0x49, %edx
jmp 0x39b53
leaq 0x205418(%rip), %rax    # 0x23ef3e
cmpb $0x0, (%rax)
je 0x39b40
leaq 0x3026ee(%rip), %rdi    # 0x33c220
leaq 0xdcec7(%rip), %rsi     # 0x116a00
movl $0x51, %edx
jmp 0x39b53
leaq 0x3026d9(%rip), %rdi    # 0x33c220
leaq 0xdcf03(%rip), %rsi     # 0x116a51
movl $0x58, %edx
callq 0x92b0
movl (%r13), %edi
incl %edi
movl (%r12), %esi
leaq 0x3026b7(%rip), %rcx    # 0x33c220
movl $0xb, %edx
callq 0xe7d0
movl (%r15), %edi
callq 0x13ccd
testl %eax, %eax
je 0x39b9f
leaq 0x1ded4a(%rip), %rax    # 0x2188d0
cmpq $0x1000000, (%rax)      # imm = 0x1000000
jne 0x39bb4
leaq 0x30268a(%rip), %rdi    # 0x33c220
leaq 0xdcf0c(%rip), %rsi     # 0x116aa9
jmp 0x39bc2
leaq 0x30267a(%rip), %rdi    # 0x33c220
leaq 0xdcfaa(%rip), %rsi     # 0x116b57
movl $0x47, %edx
jmp 0x39bc7
leaq 0x302665(%rip), %rdi    # 0x33c220
leaq 0xdcf3e(%rip), %rsi     # 0x116b00
movl $0x57, %edx
callq 0x92b0
testl %ebx, %ebx
leaq 0xdcd98(%rip), %rax     # 0x11696d
leaq 0xdd107(%rip), %r14     # 0x116ce3
cmoveq %rax, %r14
movl (%r13), %edi
addl $0x2, %edi
movl (%r12), %esi
leaq 0x30262e(%rip), %r15    # 0x33c220
movl $0xb, %edx
movq %r15, %rcx
callq 0xe7d0
leaq 0xdcf98(%rip), %rsi     # 0x116b9e
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 0xe7d0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xab5f