// File: /workspace/github_cpp_makefile_star2_O2/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, 0x21029b(%rip)    # 0x228f58
je 0x18cc6
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movl %edi, %ebx
cmpl $0x0, 0x1e9b09(%rip)    # 0x2027d8
jne 0x18d9f
cmpq $0x400, 0x1e9bf0(%rip) # imm = 0x400
je 0x18d9f
cmpl $0x0, 0x31107b(%rip)    # 0x329d68
jne 0x18d9f
movq 0x1ec626(%rip), %rcx    # 0x205320
movq 0x1ec647(%rip), %rax    # 0x205348
addq %rcx, %rax
addq 0x1ec625(%rip), %rax    # 0x205330
subq %rcx, %rax
cmpq %rcx, %rax
jge 0x18d0b
movq %rax, 0x1ec54e(%rip)    # 0x205268
movzbl 0x2dda87(%rip), %eax    # 0x2f67a8
testl %eax, %eax
je 0x18d2f
cmpl $0x50, %eax
je 0x18d2f
cmpl $0x46, %eax
jne 0x18cbf
cmpq $0x0, 0x1ec661(%rip)    # 0x205398
jle 0x18de3
cmpl $0x0, 0x12fcb4(%rip)    # 0x1489f8
setne %cl
cmpb $0x0, 0x1ec6dc(%rip)    # 0x20542a
setne %dl
andb %cl, %dl
movb 0x1ec6d2(%rip), %cl     # 0x20542b
cmpb $0xe, %cl
setne %sil
andb %dl, %sil
cmpb $0x1, %sil
jne 0x18d77
movzbl %cl, %edi
callq 0xf1c2d
movb 0x2dda31(%rip), %al     # 0x2f67a8
cmpb $0x46, %al
je 0x18cbf
pushq $0x1
popq %rdi
callq 0x1846f
callq 0x1785f
callq 0x1776e
callq 0x18b39
cmpb $0x2, %bl
je 0x18dba
pushq $0xb
jmp 0x18db4
callq 0x1776e
cmpb $0x2, %bl
je 0x18dba
cmpb $0x0, 0x20df8e(%rip)    # 0x226d3e
je 0x18dba
pushq $0xa
popq %rdi
callq 0xea4e4
cmpl $0x0, 0x2f6f13(%rip)    # 0x30fcd4
jne 0x18dd0
callq 0x53e55
pushq $0x1
popq %rdi
callq 0x6de0d
testb %bl, %bl
je 0x18cbf
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xaa05
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1776e