// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heather.cpp
// Function: draw_plot(unsigned char)
void draw_plot(u08 refresh_ok)
{
   // draw everything related to the data plots
   if(first_key) return;   // plot area is in use for help/warning message

   if(text_mode || (rcvr_type == NO_RCVR) || no_plots) {   // plot area is not available,  only draw text stuff
      plot_axes();
      #ifdef ADEV_STUFF
         if(all_adevs && (refresh_ok != 2)) {
            show_adev_info(10);
         }
      #endif
      if(com[RCVR_PORT].process_com == 0) {
         show_satinfo();
         show_param_values(1); //simeof
      }
      if(refresh_ok) refresh_page();
      return;   // no plotting in text modes
   }

   // locate the first queue entry we will be plotting
   plot_q_col0 = plot_q_out + plot_start;
   while(plot_q_col0 >= plot_q_size) plot_q_col0 -= plot_q_size;

   if(zoom_screen == 'P') ;
   else if(zoom_screen == 'F') ; // FFT waterfall
   else if(zoom_screen) return;

   if(queue_interval <= 0) {
      plot_axes();
      return;  // we have no queued data to plot
   }

   #ifdef FFT_STUFF
      if(plot[FFT].show_plot && show_live_fft && (live_fft != FFT)) {    // calc FFT over the live data
         calc_fft(live_fft);
      }
   #endif
   if(zoom_screen == 'F') return;

   calc_queue_stats(STOP_AT_PLOT_END);  // calc stat info data that will be displayed

   scale_plots();       // find scale factors and the values to center the graphs around
   plot_axes();         // draw and label the plot grid
   plot_queue_data();   // plot the queue data

   #ifdef ADEV_STUFF
      if(refresh_ok != 2) {   // draw the adev info
         show_adev_info(11);
      }
   #endif

   if(com[RCVR_PORT].process_com == 0) {
      show_satinfo();
      show_param_values(1); //simeof
   }
   if(refresh_ok) {     // copy buffered screen image to the screen
      refresh_page();
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
cmpl $0x0, 0x22579d(%rip)    # 0x23ef58
je 0x197c4
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movl %edi, %ebx
cmpl $0x0, 0x1ff00b(%rip)    # 0x2187d8
jne 0x198a2
cmpq $0x400, 0x1ff0f2(%rip) # imm = 0x400
je 0x198a2
cmpl $0x0, 0x32657d(%rip)    # 0x33fd68
jne 0x198a2
movq 0x201b28(%rip), %rcx    # 0x21b320
movq 0x201b49(%rip), %rax    # 0x21b348
addq %rcx, %rax
addq 0x201b27(%rip), %rax    # 0x21b330
subq %rcx, %rax
cmpq %rcx, %rax
jge 0x19809
movq %rax, 0x201a50(%rip)    # 0x21b268
movzbl 0x2f2f89(%rip), %eax    # 0x30c7a8
testl %eax, %eax
je 0x1982d
cmpl $0x50, %eax
je 0x1982d
cmpl $0x46, %eax
jne 0x197bd
cmpq $0x0, 0x201b63(%rip)    # 0x21b398
jle 0x198ea
cmpl $0x0, 0x1451b6(%rip)    # 0x15e9f8
setne %cl
cmpb $0x0, 0x201bde(%rip)    # 0x21b42a
setne %dl
andb %cl, %dl
movb 0x201bd4(%rip), %cl     # 0x21b42b
cmpb $0xe, %cl
setne %sil
andb %dl, %sil
cmpb $0x1, %sil
jne 0x19875
movzbl %cl, %edi
callq 0x10881f
movb 0x2f2f33(%rip), %al     # 0x30c7a8
cmpb $0x46, %al
je 0x197bd
movl $0x1, %edi
callq 0x18f42
callq 0x182ab
callq 0x181bc
callq 0x1963a
cmpb $0x2, %bl
je 0x198bf
movl $0xb, %edi
jmp 0x198ba
callq 0x181bc
cmpb $0x2, %bl
je 0x198bf
cmpb $0x0, 0x22348b(%rip)    # 0x23cd3e
je 0x198bf
movl $0xa, %edi
callq 0x100623
cmpl $0x0, 0x30c40e(%rip)    # 0x325cd4
jne 0x198d7
callq 0x5afd1
movl $0x1, %edi
callq 0x78349
testb %bl, %bl
je 0x197bd
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xab54
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x181bc