// File: /workspace/github_cpp_makefile_star2_O2/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 0xe8b01
callq 0xe8b5f
callq 0xe8bbd
callq 0xe8c1b
leaq 0x13e040(%rip), %rax    # 0x226cd8
movq (%rax), %rax
cmpq $0xb, %rax
jge 0xe8ca8
pushq $0x2
jmp 0xe8d9c
cmpq $0x15, %rax
jae 0xe8cb5
pushq $0x3
jmp 0xe8d9c
cmpq $0x29, %rax
jae 0xe8cc2
pushq $0x4
jmp 0xe8d9c
cmpq $0x65, %rax
jae 0xe8ccf
pushq $0x5
jmp 0xe8d9c
cmpq $0xc9, %rax
jae 0xe8cde
pushq $0x6
jmp 0xe8d9c
cmpq $0x191, %rax            # imm = 0x191
jae 0xe8ced
pushq $0x7
jmp 0xe8d9c
cmpq $0x3e9, %rax            # imm = 0x3E9
jae 0xe8cfc
pushq $0x8
jmp 0xe8d9c
cmpq $0x7d1, %rax            # imm = 0x7D1
jae 0xe8d0b
pushq $0x9
jmp 0xe8d9c
cmpq $0xfa1, %rax            # imm = 0xFA1
jae 0xe8d1a
pushq $0xa
jmp 0xe8d9c
cmpq $0x2711, %rax           # imm = 0x2711
jae 0xe8d26
pushq $0xb
jmp 0xe8d9c
cmpq $0x4e21, %rax           # imm = 0x4E21
jae 0xe8d32
pushq $0xc
jmp 0xe8d9c
cmpq $0x9c41, %rax           # imm = 0x9C41
jae 0xe8d3e
pushq $0xd
jmp 0xe8d9c
cmpq $0x186a1, %rax          # imm = 0x186A1
jae 0xe8d4a
pushq $0xe
jmp 0xe8d9c
cmpq $0x30d41, %rax          # imm = 0x30D41
jae 0xe8d56
pushq $0xf
jmp 0xe8d9c
cmpq $0x61a81, %rax          # imm = 0x61A81
jae 0xe8d62
pushq $0x10
jmp 0xe8d9c
cmpq $0xf4241, %rax          # imm = 0xF4241
jae 0xe8d6e
pushq $0x11
jmp 0xe8d9c
cmpq $0x1e8481, %rax         # imm = 0x1E8481
jae 0xe8d7a
pushq $0x12
jmp 0xe8d9c
cmpq $0x3d0901, %rax         # imm = 0x3D0901
jae 0xe8d86
pushq $0x13
jmp 0xe8d9c
cmpq $0x989681, %rax         # imm = 0x989681
jae 0xe8d92
pushq $0x14
jmp 0xe8d9c
cmpq $0x1312d01, %rax        # imm = 0x1312D01
jae 0xe8dce
pushq $0x15
popq %rax
leaq 0x1261dc(%rip), %rcx    # 0x20ef80
movl %eax, (%rcx)
leaq 0x13df91(%rip), %rax    # 0x226d3e
xorl %ecx, %ecx
cmpb $0x0, (%rax)
sete %cl
leaq 0x1199ec(%rip), %rax    # 0x2027a8
movl (%rax), %eax
leal (%rax,%rcx,2), %eax
incl %eax
leaq 0x1199ee(%rip), %rcx    # 0x2027b8
movl %eax, (%rcx)
popq %rbp
retq
cmpq $0x2625a01, %rax        # imm = 0x2625A01
pushq $0x17
popq %rax
sbbl $0x0, %eax
jmp 0xe8d9d