// File: /workspace/github_cpp_makefile_star2_O3/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 0x13c704(%rip), %rax    # 0x23cd38
xorl %ecx, %ecx
movl %ecx, (%rax)
leaq 0x13c645(%rip), %rax    # 0x23cc84
movl %ecx, (%rax)
movl $0x1, %edi
callq 0xd8c0d
testl %eax, %eax
je 0x100928
leaq 0x13e8e4(%rip), %rax    # 0x23ef3e
cmpb $0x0, (%rax)
jne 0x100928
leaq 0x13c6d4(%rip), %rax    # 0x23cd3e
cmpb $0x0, (%rax)
je 0x1006c1
leaq 0x13c6c7(%rip), %rax    # 0x23cd3d
movb (%rax), %bl
callq 0x10346a
cmpb $0x2, %bl
jne 0x100928
leaq 0x122f8b(%rip), %rbx    # 0x223618
movl (%rbx), %eax
btl $0x8, %eax
jae 0x1006ad
leaq 0x122f84(%rip), %rdi    # 0x223620
movl $0x9, %esi
movl $0xffff, %edx           # imm = 0xFFFF
callq 0x102b5e
movl (%rbx), %eax
movl $0xffff, %ebx           # imm = 0xFFFF
btl $0x9, %eax
jae 0x100928
jmp 0x100933
callq 0xd872b
leaq 0x13c46b(%rip), %r14    # 0x23cb38
movq (%r14), %rax
leaq 0x13c4b1(%rip), %r15    # 0x23cb88
testq %rax, %rax
je 0x1006e2
cmpq $0x0, (%r15)
jne 0x100704
leaq 0x1180cf(%rip), %rcx    # 0x2187b8
movl (%rcx), %ecx
decl %ecx
leaq 0x1180cc(%rip), %rdx    # 0x2187c0
movl %ecx, (%rdx)
leaq 0x1180bf(%rip), %rdx    # 0x2187bc
movl %ecx, (%rdx)
testq %rax, %rax
je 0x100754
leaq 0x11acbd(%rip), %rax    # 0x21b3c8
movl $0xffff, %ebx           # imm = 0xFFFF
cmpb $0x0, (%rax)
je 0x1007b9
leaq 0x122ef0(%rip), %rax    # 0x223610
movl (%rax), %eax
cmpq $0x9, %rax
ja 0x1007b9
leaq 0x2abf5(%rip), %rcx     # 0x12b328
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x122edd(%rip), %rsi    # 0x223620
movl $0x5, %edi
callq 0x10128d
movl $0x1, %ebx
jmp 0x1007b9
movl $0xffff, %ebx           # imm = 0xFFFF
jmp 0x1007f1
leaq 0x122ebb(%rip), %rsi    # 0x223620
movl $0x7, %edi
callq 0x10128d
movl $0x4, %ebx
jmp 0x1007b9
leaq 0x122ea3(%rip), %rsi    # 0x223620
movl $0x6, %edi
callq 0x10128d
movl $0x2, %ebx
jmp 0x1007b9
leaq 0x122e8b(%rip), %rsi    # 0x223620
movl $0x8, %ebx
movl $0x8, %edi
callq 0x10128d
jmp 0x1007b9
leaq 0x122e73(%rip), %rsi    # 0x223620
xorl %edi, %edi
callq 0xfe5b0
movl $0x10, %ebx
leaq 0x122e60(%rip), %rdi    # 0x223620
xorl %esi, %esi
movl $0x4f, %edx
movl $0x9, %ecx
callq 0x101d01
leaq 0x122e40(%rip), %rax    # 0x223618
testb $0x1, 0x1(%rax)
je 0x1007f1
leaq 0x122e3b(%rip), %rdi    # 0x223620
movl $0x9, %esi
movl %ebx, %edx
callq 0x102b5e
cmpq $0x0, (%r14)
setne %cl
movq (%r15), %rax
testq %rax, %rax
setne %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x100850
leaq 0x117fa9(%rip), %rax    # 0x2187b8
movl (%rax), %eax
movl %eax, %r14d
shrl $0x1f, %r14d
addl %eax, %r14d
sarl %r14d
subl %r14d, %eax
leaq 0x117f9c(%rip), %rcx    # 0x2187c4
movl (%rcx), %ecx
cmpl %eax, %ecx
movl %eax, %edx
cmovll %ecx, %edx
testl %ecx, %ecx
cmovel %eax, %edx
andl $-0x2, %edx
leaq 0x117f7c(%rip), %rcx    # 0x2187bc
movl %edx, (%rcx)
andl $-0x2, %eax
leaq 0x117f74(%rip), %rcx    # 0x2187c0
movl %eax, (%rcx)
jmp 0x10085c
xorl %r14d, %r14d
testq %rax, %rax
je 0x100928
leaq 0x11ab65(%rip), %rax    # 0x21b3c8
cmpb $0x0, (%rax)
je 0x100902
leaq 0x122d9d(%rip), %rax    # 0x223610
movl (%rax), %eax
cmpq $0x9, %rax
ja 0x100902
leaq 0x2aaca(%rip), %rcx     # 0x12b350
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x1233e2(%rip), %rsi    # 0x223c78
xorl %edi, %edi
callq 0x10128d
movl $0x1, %ebx
jmp 0x100902
leaq 0x1233cd(%rip), %rsi    # 0x223c78
movl $0x2, %edi
callq 0x10128d
movl $0x4, %ebx
jmp 0x100902
leaq 0x1233b5(%rip), %rsi    # 0x223c78
movl $0x1, %edi
callq 0x10128d
movl $0x2, %ebx
jmp 0x100902
leaq 0x12339d(%rip), %rsi    # 0x223c78
movl $0x3, %edi
callq 0x10128d
movl $0x8, %ebx
jmp 0x100902
leaq 0x123385(%rip), %rsi    # 0x223c78
movl $0x1, %edi
callq 0xfe5b0
movl $0x10, %ebx
leaq 0x12336f(%rip), %rdi    # 0x223c78
movl %r14d, %esi
movl $0x4f, %edx
movl $0x6, %ecx
callq 0x101d01
leaq 0x122cf6(%rip), %rax    # 0x223618
testb $0x2, 0x1(%rax)
jne 0x100933
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x12333e(%rip), %rdi    # 0x223c78
movl $0x6, %esi
movl %ebx, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x102b5e