// File: 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 0x15ec80
callq 0x15ecf0
callq 0x15ed60
callq 0x15edd0
leaq 0x13d059(%rip), %rax    # 0x29beb8
cmpq $0xa, (%rax)
jg 0x15ee77
leaq 0x1252f4(%rip), %rax    # 0x284160
movl $0x2, (%rax)
jmp 0x15f13f
leaq 0x13d03a(%rip), %rax    # 0x29beb8
cmpq $0x14, (%rax)
jg 0x15ee96
leaq 0x1252d5(%rip), %rax    # 0x284160
movl $0x3, (%rax)
jmp 0x15f13d
leaq 0x13d01b(%rip), %rax    # 0x29beb8
cmpq $0x28, (%rax)
jg 0x15eeb5
leaq 0x1252b6(%rip), %rax    # 0x284160
movl $0x4, (%rax)
jmp 0x15f13b
leaq 0x13cffc(%rip), %rax    # 0x29beb8
cmpq $0x64, (%rax)
jg 0x15eed4
leaq 0x125297(%rip), %rax    # 0x284160
movl $0x5, (%rax)
jmp 0x15f139
leaq 0x13cfdd(%rip), %rax    # 0x29beb8
cmpq $0xc8, (%rax)
jg 0x15eef6
leaq 0x125275(%rip), %rax    # 0x284160
movl $0x6, (%rax)
jmp 0x15f137
leaq 0x13cfbb(%rip), %rax    # 0x29beb8
cmpq $0x190, (%rax)          # imm = 0x190
jg 0x15ef18
leaq 0x125253(%rip), %rax    # 0x284160
movl $0x7, (%rax)
jmp 0x15f135
leaq 0x13cf99(%rip), %rax    # 0x29beb8
cmpq $0x3e8, (%rax)          # imm = 0x3E8
jg 0x15ef3a
leaq 0x125231(%rip), %rax    # 0x284160
movl $0x8, (%rax)
jmp 0x15f133
leaq 0x13cf77(%rip), %rax    # 0x29beb8
cmpq $0x7d0, (%rax)          # imm = 0x7D0
jg 0x15ef5c
leaq 0x12520f(%rip), %rax    # 0x284160
movl $0x9, (%rax)
jmp 0x15f131
leaq 0x13cf55(%rip), %rax    # 0x29beb8
cmpq $0xfa0, (%rax)          # imm = 0xFA0
jg 0x15ef7e
leaq 0x1251ed(%rip), %rax    # 0x284160
movl $0xa, (%rax)
jmp 0x15f12f
leaq 0x13cf33(%rip), %rax    # 0x29beb8
cmpq $0x2710, (%rax)         # imm = 0x2710
jg 0x15efa0
leaq 0x1251cb(%rip), %rax    # 0x284160
movl $0xb, (%rax)
jmp 0x15f12d
leaq 0x13cf11(%rip), %rax    # 0x29beb8
cmpq $0x4e20, (%rax)         # imm = 0x4E20
jg 0x15efc2
leaq 0x1251a9(%rip), %rax    # 0x284160
movl $0xc, (%rax)
jmp 0x15f12b
leaq 0x13ceef(%rip), %rax    # 0x29beb8
cmpq $0x9c40, (%rax)         # imm = 0x9C40
jg 0x15efe4
leaq 0x125187(%rip), %rax    # 0x284160
movl $0xd, (%rax)
jmp 0x15f129
leaq 0x13cecd(%rip), %rax    # 0x29beb8
cmpq $0x186a0, (%rax)        # imm = 0x186A0
jg 0x15f006
leaq 0x125165(%rip), %rax    # 0x284160
movl $0xe, (%rax)
jmp 0x15f127
leaq 0x13ceab(%rip), %rax    # 0x29beb8
cmpq $0x30d40, (%rax)        # imm = 0x30D40
jg 0x15f028
leaq 0x125143(%rip), %rax    # 0x284160
movl $0xf, (%rax)
jmp 0x15f125
leaq 0x13ce89(%rip), %rax    # 0x29beb8
cmpq $0x61a80, (%rax)        # imm = 0x61A80
jg 0x15f04a
leaq 0x125121(%rip), %rax    # 0x284160
movl $0x10, (%rax)
jmp 0x15f123
leaq 0x13ce67(%rip), %rax    # 0x29beb8
cmpq $0xf4240, (%rax)        # imm = 0xF4240
jg 0x15f06c
leaq 0x1250ff(%rip), %rax    # 0x284160
movl $0x11, (%rax)
jmp 0x15f121
leaq 0x13ce45(%rip), %rax    # 0x29beb8
cmpq $0x1e8480, (%rax)       # imm = 0x1E8480
jg 0x15f08e
leaq 0x1250dd(%rip), %rax    # 0x284160
movl $0x12, (%rax)
jmp 0x15f11f
leaq 0x13ce23(%rip), %rax    # 0x29beb8
cmpq $0x3d0900, (%rax)       # imm = 0x3D0900
jg 0x15f0ad
leaq 0x1250bb(%rip), %rax    # 0x284160
movl $0x13, (%rax)
jmp 0x15f11d
leaq 0x13ce04(%rip), %rax    # 0x29beb8
cmpq $0x989680, (%rax)       # imm = 0x989680
jg 0x15f0cc
leaq 0x12509c(%rip), %rax    # 0x284160
movl $0x14, (%rax)
jmp 0x15f11b
leaq 0x13cde5(%rip), %rax    # 0x29beb8
cmpq $0x1312d00, (%rax)      # imm = 0x1312D00
jg 0x15f0eb
leaq 0x12507d(%rip), %rax    # 0x284160
movl $0x15, (%rax)
jmp 0x15f119
leaq 0x13cdc6(%rip), %rax    # 0x29beb8
cmpq $0x2625a00, (%rax)      # imm = 0x2625A00
jg 0x15f10a
leaq 0x12505e(%rip), %rax    # 0x284160
movl $0x16, (%rax)
jmp 0x15f117
leaq 0x12504f(%rip), %rax    # 0x284160
movl $0x17, (%rax)
jmp 0x15f119
jmp 0x15f11b
jmp 0x15f11d
jmp 0x15f11f
jmp 0x15f121
jmp 0x15f123
jmp 0x15f125
jmp 0x15f127
jmp 0x15f129
jmp 0x15f12b
jmp 0x15f12d
jmp 0x15f12f
jmp 0x15f131
jmp 0x15f133
jmp 0x15f135
jmp 0x15f137
jmp 0x15f139
jmp 0x15f13b
jmp 0x15f13d
jmp 0x15f13f
callq 0x15e830
popq %rbp
retq
nopw %cs:(%rax,%rax)