// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: reset_adev_bins()
void reset_adev_bins()
{
   // reset the incremental adev bins
   reset_pps_bins();
   reset_osc_bins();
   reset_chc_bins();
   reset_chd_bins();

   // !!!!! This code works for 1-2-5 adev decades.  Should be generalized to
   //       work with any bin density. !!!!!!    aaaahhhh
   if     (adev_q_size <= 10L)       max_adev_rows = 2;
   else if(adev_q_size <= 20L)       max_adev_rows = 3;
   else if(adev_q_size <= 40L)       max_adev_rows = 4;
   else if(adev_q_size <= 100L)      max_adev_rows = 5;
   else if(adev_q_size <= 200L)      max_adev_rows = 6;
   else if(adev_q_size <= 400L)      max_adev_rows = 7;
   else if(adev_q_size <= 1000L)     max_adev_rows = 8;
   else if(adev_q_size <= 2000L)     max_adev_rows = 9; 
   else if(adev_q_size <= 4000L)     max_adev_rows = 10;
   else if(adev_q_size <= 10000L)    max_adev_rows = 11;
   else if(adev_q_size <= 20000L)    max_adev_rows = 12;
   else if(adev_q_size <= 40000L)    max_adev_rows = 13;
   else if(adev_q_size <= 100000L)   max_adev_rows = 14;
   else if(adev_q_size <= 200000L)   max_adev_rows = 15;
   else if(adev_q_size <= 400000L)   max_adev_rows = 16;
   else if(adev_q_size <= 1000000L)  max_adev_rows = 17;
   else if(adev_q_size <= 2000000L)  max_adev_rows = 18;
   else if(adev_q_size <= 4000000L)  max_adev_rows = 19;
   else if(adev_q_size <= 10000000L) max_adev_rows = 20;
   else if(adev_q_size <= 20000000L) max_adev_rows = 21;
   else if(adev_q_size <= 40000000L) max_adev_rows = 22;
   else                              max_adev_rows = 23;

   calc_adev_display_size();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0xfeaab
callq 0xfeb0c
callq 0xfeb6d
callq 0xfebce
leaq 0x13e08a(%rip), %rax    # 0x23ccd8
movq (%rax), %rax
movl $0x2, %ecx
cmpq $0xb, %rax
jl 0xfed87
movl $0x3, %ecx
cmpq $0x15, %rax
jb 0xfed87
movl $0x4, %ecx
cmpq $0x29, %rax
jb 0xfed87
movl $0x5, %ecx
cmpq $0x65, %rax
jb 0xfed87
movl $0x6, %ecx
cmpq $0xc9, %rax
jb 0xfed87
movl $0x7, %ecx
cmpq $0x191, %rax            # imm = 0x191
jb 0xfed87
movl $0x8, %ecx
cmpq $0x3e9, %rax            # imm = 0x3E9
jb 0xfed87
movl $0x9, %ecx
cmpq $0x7d1, %rax            # imm = 0x7D1
jb 0xfed87
movl $0xa, %ecx
cmpq $0xfa1, %rax            # imm = 0xFA1
jb 0xfed87
movl $0xb, %ecx
cmpq $0x2711, %rax           # imm = 0x2711
jb 0xfed87
movl $0xc, %ecx
cmpq $0x4e21, %rax           # imm = 0x4E21
jb 0xfed87
movl $0xd, %ecx
cmpq $0x9c41, %rax           # imm = 0x9C41
jb 0xfed87
movl $0xe, %ecx
cmpq $0x186a1, %rax          # imm = 0x186A1
jb 0xfed87
movl $0xf, %ecx
cmpq $0x30d41, %rax          # imm = 0x30D41
jb 0xfed87
movl $0x10, %ecx
cmpq $0x61a81, %rax          # imm = 0x61A81
jb 0xfed87
movl $0x11, %ecx
cmpq $0xf4241, %rax          # imm = 0xF4241
jb 0xfed87
movl $0x12, %ecx
cmpq $0x1e8481, %rax         # imm = 0x1E8481
jb 0xfed87
movl $0x13, %ecx
cmpq $0x3d0901, %rax         # imm = 0x3D0901
jb 0xfed87
movl $0x14, %ecx
cmpq $0x989681, %rax         # imm = 0x989681
jb 0xfed87
movl $0x15, %ecx
cmpq $0x1312d01, %rax        # imm = 0x1312D01
jb 0xfed87
cmpq $0x2625a01, %rax        # imm = 0x2625A01
movl $0x17, %ecx
sbbl $0x0, %ecx
leaq 0x1261f2(%rip), %rax    # 0x224f80
movl %ecx, (%rax)
leaq 0x13dfa7(%rip), %rax    # 0x23cd3e
xorl %ecx, %ecx
cmpb $0x0, (%rax)
sete %cl
leaq 0x119a02(%rip), %rax    # 0x2187a8
movl (%rax), %eax
leal (%rax,%rcx,2), %eax
incl %eax
leaq 0x119a04(%rip), %rcx    # 0x2187b8
movl %eax, (%rcx)
popq %rbp
retq