// File: /workspace/github_cpp_makefile_star2_O1/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 0xfe424
callq 0xfe485
callq 0xfe4e6
callq 0xfe547
leaq 0x13e711(%rip), %rax    # 0x23ccd8
movq (%rax), %rax
movl $0x2, %ecx
cmpq $0xb, %rax
jl 0xfe700
movl $0x3, %ecx
cmpq $0x15, %rax
jl 0xfe700
movl $0x4, %ecx
cmpq $0x29, %rax
jl 0xfe700
movl $0x5, %ecx
cmpq $0x65, %rax
jl 0xfe700
movl $0x6, %ecx
cmpq $0xc9, %rax
jl 0xfe700
movl $0x7, %ecx
cmpq $0x191, %rax            # imm = 0x191
jl 0xfe700
movl $0x8, %ecx
cmpq $0x3e9, %rax            # imm = 0x3E9
jl 0xfe700
movl $0x9, %ecx
cmpq $0x7d1, %rax            # imm = 0x7D1
jl 0xfe700
movl $0xa, %ecx
cmpq $0xfa1, %rax            # imm = 0xFA1
jl 0xfe700
movl $0xb, %ecx
cmpq $0x2711, %rax           # imm = 0x2711
jl 0xfe700
movl $0xc, %ecx
cmpq $0x4e21, %rax           # imm = 0x4E21
jl 0xfe700
movl $0xd, %ecx
cmpq $0x9c41, %rax           # imm = 0x9C41
jl 0xfe700
movl $0xe, %ecx
cmpq $0x186a1, %rax          # imm = 0x186A1
jl 0xfe700
movl $0xf, %ecx
cmpq $0x30d41, %rax          # imm = 0x30D41
jl 0xfe700
movl $0x10, %ecx
cmpq $0x61a81, %rax          # imm = 0x61A81
jl 0xfe700
movl $0x11, %ecx
cmpq $0xf4241, %rax          # imm = 0xF4241
jl 0xfe700
movl $0x12, %ecx
cmpq $0x1e8481, %rax         # imm = 0x1E8481
jl 0xfe700
movl $0x13, %ecx
cmpq $0x3d0901, %rax         # imm = 0x3D0901
jl 0xfe700
movl $0x14, %ecx
cmpq $0x989681, %rax         # imm = 0x989681
jl 0xfe700
movl $0x15, %ecx
cmpq $0x1312d01, %rax        # imm = 0x1312D01
jl 0xfe700
xorl %ecx, %ecx
cmpq $0x2625a01, %rax        # imm = 0x2625A01
setl %cl
xorl $0x17, %ecx
leaq 0x126879(%rip), %rax    # 0x224f80
movl %ecx, (%rax)
popq %rbp
jmp 0xfe169