// File: /workspace/github_cpp_makefile_star2_O2/UTSASRG[P]Guarder/./bibopheap.hh
// Function: BibopHeap::BibopObjCache::repopulate()
void repopulate() {
					// Perform an O(n) repopulation of this object cache using
					// freed objects located in the freeCache
					// If there are not enough objects in freeCache to fully perform
					// the repopulation, we should shift to using new objects from the
					// top of the heap (pointed to by _heapTop)

					PRDBG("*** beginning repopulation ***");

					ObjectSource * objSource;
					if(_freeCache->getNumObjects() > 0) {
							PRDBG("\tusing free cache as object source");
							objSource = _freeCache;
					} else {
							PRDBG("\tusing heap top as object source");
							objSource = this;
					}

					unsigned position = 0;
					#pragma message "allocation buffer refill level set to 75%"
					// Fills the cache back up to 75% available (25% used)
					unsigned refill_level = BIBOP_CACHE_SIZE >> 2;
					while(_numUsedObjects > refill_level) {
							if(_objects[position] == NULL) {
									//if((_objects[position] = objSource->getNext()) == NULL) {
									void * popObject = objSource->getNext();
									PRDBG("\t\tfree object %p -> _objects[%d] (cache entry %p, obj src = %p)",
											popObject, position, &_objects[position], objSource);
									// Write the next object from the free cache into this position.
									// If the free cache returned NULL then it is out of objects.
									if((_objects[position] = popObject) == NULL) {
											PRDBG("\t*** switching back to heap top as object source");
											objSource = this;
											// We do not increment position in this case because we want
											// the loop to attempt to fill this position again, but using
											// the heap as the object source instead of the free cache.
									} else {
											// Our object source returned a valid object -- decrement the
											// number of used objects, and increment the array position
											// to proceed with the next item
											//unsigned currentRegion = position & NUM_CACHE_REGIONS_MASK;
											unsigned currentRegion = position >> CACHE_REGION_SIZE_SHIFT_BITS;
											PRDBG("_regionCounters[%d]++ (index = %d)", currentRegion, position);
											_regionCounters[currentRegion]++;
											_numUsedObjects--;
											position++;
									}
							} else {
									// If the object at this position is alive,
									// simply move to the next object...
									position++;
							}
					}
			}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r14
callq 0x4200
movq %rax, %rbx
callq 0x4280
movq %rax, %r12
leaq 0x2c24(%rip), %rdx      # 0x9e2c
leaq 0x236b(%rip), %r8       # 0x957a
movl $0x1000, %esi           # imm = 0x1000
movq %rbx, %rdi
movq %rax, %rcx
movl $0x223, %r9d            # imm = 0x223
xorl %eax, %eax
callq 0x4560
callq 0x4200
movq %rax, %rbx
callq 0x4200
movq %rax, %rdi
callq 0x4130
pushq $0x2
popq %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x4100
movq 0x8(%r14), %rax
movq 0x38(%rax), %rbx
callq 0x4200
testq %rbx, %rbx
je 0x72ab
leaq 0x2c08(%rip), %rdx      # 0x9e6b
leaq 0x2310(%rip), %r8       # 0x957a
movl $0x1000, %esi           # imm = 0x1000
movq %rax, %rdi
movq %r12, %rcx
movl $0x227, %r9d            # imm = 0x227
xorl %eax, %eax
callq 0x4560
callq 0x4200
movq %rax, %rbx
callq 0x4200
movq %rax, %rdi
callq 0x4130
pushq $0x2
popq %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x4100
movq 0x8(%r14), %r13
jmp 0x72f7
leaq 0x2bfc(%rip), %rdx      # 0x9eae
leaq 0x22c1(%rip), %r8       # 0x957a
movl $0x1000, %esi           # imm = 0x1000
movq %rax, %rdi
movq %r12, %rcx
movl $0x22a, %r9d            # imm = 0x22A
xorl %eax, %eax
callq 0x4560
callq 0x4200
movq %rax, %rbx
callq 0x4200
movq %rax, %rdi
callq 0x4130
pushq $0x2
popq %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x4100
movq %r14, %r13
movq 0x6c22(%rip), %rax      # 0xdf20
movl 0x8(%rax), %eax
shrl $0x2, %eax
movl %eax, 0x4(%rsp)
xorl %ebp, %ebp
leaq 0x2269(%rip), %rbx      # 0x957a
movl %ebp, %ebp
leaq (,%rbp,8), %rax
movq %rax, 0x10(%rsp)
movl 0x4(%rsp), %eax
cmpl %eax, 0x2c(%r14)
jbe 0x74ab
movq 0x58(%r14), %rax
cmpq $0x0, (%rax,%rbp,8)
jne 0x74a4
movq (%r13), %rax
movq %r13, %rdi
callq *(%rax)
movq %rbx, %r15
movq %rax, %rbx
callq 0x4200
movq 0x58(%r14), %r10
addq 0x10(%rsp), %r10
movl $0x1000, %esi           # imm = 0x1000
movq %rax, %rdi
leaq 0x2b86(%rip), %rdx      # 0x9eef
movq %r12, %rcx
movq %r15, %r8
movl $0x237, %r9d            # imm = 0x237
xorl %eax, %eax
movq %r13, 0x8(%rsp)
pushq %r13
pushq %r10
pushq %rbp
pushq %rbx
callq 0x4560
addq $0x20, %rsp
callq 0x4200
movq %r12, %r13
movq %rax, %r12
callq 0x4200
movq %rax, %rdi
callq 0x4130
pushq $0x2
popq %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x4100
movq 0x58(%r14), %rax
movq %rbp, %r15
movq %rbx, (%rax,%rbp,8)
testq %rbx, %rbx
jne 0x7423
callq 0x4200
movl $0x1000, %esi           # imm = 0x1000
movq %rax, %rdi
leaq 0x2b7a(%rip), %rdx      # 0x9f4f
movq %r13, %rcx
leaq 0x219b(%rip), %rbp      # 0x957a
movq %rbp, %r8
movl $0x23b, %r9d            # imm = 0x23B
xorl %eax, %eax
callq 0x4560
callq 0x4200
movq %rax, %rbx
callq 0x4200
movq %rax, %rdi
callq 0x4130
pushq $0x2
popq %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x4100
movq %r13, %r12
movq %r14, %r13
movq %rbp, %rbx
movq %r15, %rbp
jmp 0x7320
movq 0x6af6(%rip), %rax      # 0xdf20
movl 0x8(%rax), %eax
shrl $0x3, %eax
bsrl %eax, %ecx
movl %r15d, %r12d
shrl %cl, %r12d
callq 0x4200
movl $0x1000, %esi           # imm = 0x1000
movq %rax, %rdi
leaq 0x2b53(%rip), %rdx      # 0x9fa0
movq %r13, %rcx
leaq 0x2123(%rip), %rbx      # 0x957a
movq %rbx, %r8
movl $0x246, %r9d            # imm = 0x246
xorl %eax, %eax
pushq %r15
pushq %r12
callq 0x4560
popq %rcx
popq %rdx
callq 0x4200
movq %rax, %rbp
callq 0x4200
movq %rax, %rdi
callq 0x4130
pushq $0x2
popq %rdi
movq %rbp, %rsi
movq %rax, %rdx
callq 0x4100
incl 0x34(%r14,%r12,4)
decl 0x2c(%r14)
movq %r13, %r12
movq %r15, %rbp
movq 0x8(%rsp), %r13
incl %ebp
jmp 0x7311
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq