// File: /workspace/github_cpp_makefile_star2_O1/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, 0x2257b9(%rip)    # 0x23ef58
je 0x197a8
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movl %edi, %ebx
cmpl $0x0, 0x1ff027(%rip)    # 0x2187d8
jne 0x19881
cmpq $0x400, 0x1ff10e(%rip) # imm = 0x400
je 0x19881
cmpl $0x0, 0x326599(%rip)    # 0x33fd68
jne 0x19881
movq 0x201b44(%rip), %rcx    # 0x21b320
movq 0x201b65(%rip), %rax    # 0x21b348
addq %rcx, %rax
addq 0x201b43(%rip), %rax    # 0x21b330
subq %rcx, %rax
cmpq %rcx, %rax
jge 0x197ed
movq %rax, 0x201a6c(%rip)    # 0x21b268
movzbl 0x2f2fa5(%rip), %eax    # 0x30c7a8
testl %eax, %eax
je 0x19811
cmpl $0x50, %eax
je 0x19811
cmpl $0x46, %eax
jne 0x197a1
cmpq $0x0, 0x201b7f(%rip)    # 0x21b398
jle 0x198c9
cmpl $0x0, 0x1451d2(%rip)    # 0x15e9f8
setne %al
cmpb $0x0, 0x201bfa(%rip)    # 0x21b42a
setne %cl
andb %al, %cl
movb 0x201bf0(%rip), %al     # 0x21b42b
cmpb $0xe, %al
setne %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x1984f
movzbl %al, %edi
callq 0x108102
cmpb $0x46, 0x2f2f52(%rip)   # 0x30c7a8
je 0x197a1
movl $0x1, %edi
callq 0x18f2e
callq 0x1826e
callq 0x1817f
callq 0x1961e
cmpb $0x2, %bl
je 0x1989e
movl $0xb, %edi
jmp 0x19899
callq 0x1817f
cmpb $0x2, %bl
je 0x1989e
cmpb $0x0, 0x2234ac(%rip)    # 0x23cd3e
je 0x1989e
movl $0xa, %edi
callq 0xfff83
cmpl $0x0, 0x30c42f(%rip)    # 0x325cd4
jne 0x198b6
callq 0x5b097
movl $0x1, %edi
callq 0x785ce
testb %bl, %bl
je 0x197a1
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xab5f
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1817f