// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathmsc.cpp
// Function: show_adev_info(int)
void show_adev_info(int why)
{
int row;
int mask;

   // draw the adev tables and graphs
   adev_show_time = 0;
   adevs_shown = 0;
   if(adevs_active(1) == 0) return;
   if(luxor) return;

   mask = 0xFFFF;
   if(all_adevs) {
      if(mixed_adevs == MIXED_REGULAR) {  // show 4 adev tables, PPS and OSC curves
         show_all_adevs();
         if(adev_display_mask & DISPLAY_CHA) plot_adev_curve(&pps_bins, PPS_ADEV_COLOR, mask);
         if(adev_display_mask & DISPLAY_CHB) plot_adev_curve(&osc_bins, OSC_ADEV_COLOR, mask);
      }
      else {  // show all 4 adev tables and matching curves
         show_all_adevs();
      }
   }
   else {  // show OSC and PPS tables and curves
      find_global_max();
      row = ADEV_ROW+0;
      if(pps_adev_q_count && osc_adev_q_count) ;
      else adev_page_size = adev_table_rows = (adev_bottom_row - row) - 1;

      if(pps_adev_q_count) {  // we have pps adevs
         if(continuous_scroll) {
            if     (ATYPE == OSC_ADEV) { fetch_adev_info(PPS_ADEV, &pps_bins); mask = DISPLAY_ADEV; }
            else if(ATYPE == OSC_HDEV) { fetch_adev_info(PPS_HDEV, &pps_bins); mask = DISPLAY_HDEV; } 
            else if(ATYPE == OSC_MDEV) { fetch_adev_info(PPS_MDEV, &pps_bins); mask = DISPLAY_MDEV; } 
            else if(ATYPE == OSC_TDEV) { fetch_adev_info(PPS_TDEV, &pps_bins); mask = DISPLAY_TDEV; } 
            else if(ATYPE == A_MTIE)   { fetch_adev_info(A_MTIE, &pps_bins); mask = DISPLAY_MTIE; } 
         }
         show_adev_table(&pps_bins, row, ADEV_COL, PPS_ADEV_COLOR, 9);
         if(adev_display_mask & DISPLAY_CHA) plot_adev_curve(&pps_bins, PPS_ADEV_COLOR, mask);
      }


      if(pps_adev_q_count && osc_adev_q_count) {  // we have osc and pps adevs
         row = (adev_bottom_row - ADEV_ROW);  // split the adev area in half adev_page_size
         row = ADEV_ROW + (row/2);
         adev_page_size = adev_table_rows = (adev_bottom_row - row);
         if(adev_decades_shown && (adev_decades_shown < adev_page_size)) adev_page_size = adev_decades_shown;
         adev_page_size &= (~1);
         adev_table_rows &= (~1);
      }
//sprintf(debug_text, "arow:%d  abr:%d  aps:%d  ads:%d", ADEV_ROW, adev_bottom_row, adev_page_size, adev_decades_shown);

      if(osc_adev_q_count) {  // we have osc adevs to show
         if(continuous_scroll) {
            if     (ATYPE == OSC_ADEV) { fetch_adev_info(OSC_ADEV, &osc_bins); mask = DISPLAY_ADEV; }  
            else if(ATYPE == OSC_HDEV) { fetch_adev_info(OSC_HDEV, &osc_bins); mask = DISPLAY_HDEV; }  
            else if(ATYPE == OSC_MDEV) { fetch_adev_info(OSC_MDEV, &osc_bins); mask = DISPLAY_MDEV; }  
            else if(ATYPE == OSC_TDEV) { fetch_adev_info(OSC_TDEV, &osc_bins); mask = DISPLAY_TDEV; }  
            else if(ATYPE == A_MTIE)   { fetch_adev_info(B_MTIE,   &osc_bins); mask = DISPLAY_MTIE; }  
         }
         show_adev_table(&osc_bins, row, ADEV_COL, OSC_ADEV_COLOR, 10);
         if(adev_display_mask & DISPLAY_CHB) plot_adev_curve(&osc_bins, OSC_ADEV_COLOR, mask);
      }
   }
//sprintf(debug_text, "gamax:%g  gamin:%g    ", global_adev_max,global_adev_min);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0x13cda4(%rip), %rax    # 0x23cd38
xorl %ecx, %ecx
movl %ecx, (%rax)
leaq 0x13cce5(%rip), %rax    # 0x23cc84
movl %ecx, (%rax)
movl $0x1, %edi
callq 0xd84d7
testl %eax, %eax
je 0x100285
leaq 0x13ef84(%rip), %rax    # 0x23ef3e
cmpb $0x0, (%rax)
jne 0x100285
leaq 0x13cd74(%rip), %rax    # 0x23cd3e
cmpb $0x0, (%rax)
je 0x10001f
leaq 0x13cd67(%rip), %rax    # 0x23cd3d
movb (%rax), %bl
callq 0x102dc2
cmpb $0x2, %bl
jne 0x100285
leaq 0x12362b(%rip), %r14    # 0x223618
testb $0x1, 0x1(%r14)
je 0x10000a
leaq 0x123625(%rip), %rdi    # 0x223620
movl $0x9, %esi
movl $0xffff, %edx           # imm = 0xFFFF
callq 0x1024ca
movl $0xffff, %ebx           # imm = 0xFFFF
testb $0x2, 0x1(%r14)
je 0x100285
jmp 0x100290
callq 0xd801e
leaq 0x13cb0d(%rip), %r14    # 0x23cb38
movq (%r14), %rax
leaq 0x13cb53(%rip), %r15    # 0x23cb88
testq %rax, %rax
je 0x100040
cmpq $0x0, (%r15)
jne 0x10005d
leaq 0x118771(%rip), %rcx    # 0x2187b8
movl (%rcx), %ecx
decl %ecx
leaq 0x11876e(%rip), %rdx    # 0x2187c0
movl %ecx, (%rdx)
leaq 0x118761(%rip), %rdx    # 0x2187bc
movl %ecx, (%rdx)
testq %rax, %rax
je 0x1000b2
leaq 0x11b35f(%rip), %rax    # 0x21b3c8
movl $0xffff, %ebx           # imm = 0xFFFF
cmpb $0x0, (%rax)
je 0x100117
leaq 0x123592(%rip), %rax    # 0x223610
movl (%rax), %eax
cmpq $0x9, %rax
ja 0x100117
leaq 0x2b1c7(%rip), %rcx     # 0x12b258
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x12357f(%rip), %rsi    # 0x223620
movl $0x5, %edi
callq 0x100c0d
movl $0x1, %ebx
jmp 0x100117
movl $0xffff, %ebx           # imm = 0xFFFF
jmp 0x10014f
leaq 0x12355d(%rip), %rsi    # 0x223620
movl $0x7, %edi
callq 0x100c0d
movl $0x4, %ebx
jmp 0x100117
leaq 0x123545(%rip), %rsi    # 0x223620
movl $0x6, %edi
callq 0x100c0d
movl $0x2, %ebx
jmp 0x100117
leaq 0x12352d(%rip), %rsi    # 0x223620
movl $0x8, %ebx
movl $0x8, %edi
callq 0x100c0d
jmp 0x100117
leaq 0x123515(%rip), %rsi    # 0x223620
xorl %edi, %edi
callq 0xfdee3
movl $0x10, %ebx
leaq 0x123502(%rip), %rdi    # 0x223620
xorl %esi, %esi
movl $0x4f, %edx
movl $0x9, %ecx
callq 0x1016b5
leaq 0x1234e2(%rip), %rax    # 0x223618
testb $0x1, 0x1(%rax)
je 0x10014f
leaq 0x1234dd(%rip), %rdi    # 0x223620
movl $0x9, %esi
movl %ebx, %edx
callq 0x1024ca
cmpq $0x0, (%r14)
setne %cl
movq (%r15), %rax
testq %rax, %rax
setne %dl
andb %cl, %dl
xorl %r14d, %r14d
cmpb $0x1, %dl
jne 0x1001b0
leaq 0x118648(%rip), %rcx    # 0x2187b8
movl (%rcx), %ecx
movl %ecx, %r14d
shrl $0x1f, %r14d
addl %ecx, %r14d
sarl %r14d
subl %r14d, %ecx
leaq 0x118637(%rip), %rdx    # 0x2187c0
leaq 0x118634(%rip), %rsi    # 0x2187c4
movl (%rsi), %esi
cmpl %ecx, %esi
movl %ecx, %edi
cmovll %esi, %edi
leaq 0x11861c(%rip), %r8     # 0x2187bc
testl %esi, %esi
cmovel %ecx, %edi
andl $-0x2, %edi
movl %edi, (%r8)
andl $-0x2, %ecx
movl %ecx, (%rdx)
testq %rax, %rax
je 0x100285
leaq 0x11b208(%rip), %rax    # 0x21b3c8
cmpb $0x0, (%rax)
je 0x10025f
leaq 0x123440(%rip), %rax    # 0x223610
movl (%rax), %eax
cmpq $0x9, %rax
ja 0x10025f
leaq 0x2b09d(%rip), %rcx     # 0x12b280
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x123a85(%rip), %rsi    # 0x223c78
xorl %edi, %edi
callq 0x100c0d
movl $0x1, %ebx
jmp 0x10025f
leaq 0x123a70(%rip), %rsi    # 0x223c78
movl $0x2, %edi
callq 0x100c0d
movl $0x4, %ebx
jmp 0x10025f
leaq 0x123a58(%rip), %rsi    # 0x223c78
movl $0x1, %edi
callq 0x100c0d
movl $0x2, %ebx
jmp 0x10025f
leaq 0x123a40(%rip), %rsi    # 0x223c78
movl $0x3, %edi
callq 0x100c0d
movl $0x8, %ebx
jmp 0x10025f
leaq 0x123a28(%rip), %rsi    # 0x223c78
movl $0x1, %edi
callq 0xfdee3
movl $0x10, %ebx
leaq 0x123a12(%rip), %rdi    # 0x223c78
movl %r14d, %esi
movl $0x4f, %edx
movl $0x6, %ecx
callq 0x1016b5
leaq 0x123399(%rip), %rax    # 0x223618
testb $0x2, 0x1(%rax)
jne 0x100290
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1239e1(%rip), %rdi    # 0x223c78
movl $0x6, %esi
movl %ebx, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1024ca