// File: /workspace/github_cpp_makefile_star2_O1/UTSASRG[P]Guarder/./bibopheap.hh
// Function: BibopHeap::BibopObjCache::getNext()
void * getNext() {
					if(_heapTop >= _bagEnd) {
							FATAL("heap out of memory (bag size = %lu)", _bibopBagSize);
					}

					uintptr_t foundNextObject = 0;
					do {
							// Repopulate the over provisioning buffer, if necessary...
							if(_nextUp >= BibopHeap::_overProvObjBufSize) {
									int i;
									for(i = 0; i < BibopHeap::_overProvObjBufSize; i++) {
											#ifdef RANDOM_GUARD
											if((_heapTop & PageMask) == 0) {
													tryRandomGuardPage(&_heapTop);
											}
											#endif

											// Use the top-of-bag pointer to satisfy this request
											_nextObjs[i] = _heapTop;
											// Bump the top-of-bag pointer to point to next object
											_heapTop += _classSize;
									}
									// Now kill a portion of these objects in accordance with
									// the over-provisioning ratio
									for(i = 0; i < NUM_DEAD_OBJS; i++) {
											unsigned randIndex = getRandomNumber() % BibopHeap::_overProvObjBufSize;

											// Perform a forward sequential search if the
											// object we selected for sacrifice is already dead
											while(_nextObjs[randIndex] == 0) {
													randIndex = (randIndex + 1) % BibopHeap::_overProvObjBufSize;
											}
											_nextObjs[randIndex] = 0;		// Mark selected index as a dead object
									}
									_nextUp = 0;
							}

							// Try the next object in the over-provisioning buffer...
							foundNextObject = _nextObjs[_nextUp++];
					} while(foundNextObject == 0);
					//PRDBG("\theap top returning object @ 0x%lx", foundNextObject);
		
					return (void *)foundNextObject;
			}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq 0x20(%rdi), %rax
cmpq 0x18(%rdi), %rax
jae 0x660c
movq %rdi, %rbx
movq 0x6a47(%rip), %r14      # 0xcf98
movq 0x69c8(%rip), %r15      # 0xcf20
movl (%r14), %eax
cmpl %eax, 0x28(%rbx)
jb 0x65e7
testq %rax, %rax
je 0x6587
movq 0x60(%rbx), %rcx
xorl %edx, %edx
movq 0x20(%rbx), %rsi
movq %rsi, (%rcx,%rdx,8)
movq 0x10(%rbx), %rsi
addq %rsi, 0x20(%rbx)
incq %rdx
cmpq %rdx, %rax
jne 0x656f
movl 0x8(%r15), %eax
movl 0xc(%r15), %ecx
shrl %eax
movl %ecx, %edx
subl 0x10(%r15), %edx
imull %eax, %edx
cmpl %edx, %ecx
ja 0x65e0
xorl %ebp, %ebp
callq 0x40a0
movl (%r14), %esi
movq 0x60(%rbx), %rcx
xorl %edx, %edx
divl %esi
movl %edx, %eax
incl %eax
cmpq $0x0, (%rcx,%rdx,8)
je 0x65ac
movq $0x0, (%rcx,%rdx,8)
incl %ebp
movl 0x8(%r15), %ecx
movl 0xc(%r15), %esi
shrl %ecx
movl %esi, %eax
subl 0x10(%r15), %eax
imull %ecx, %eax
xorl %edx, %edx
divl %esi
cmpl %eax, %ebp
jb 0x65a0
movl $0x0, 0x28(%rbx)
movq 0x60(%rbx), %rax
movl 0x28(%rbx), %ecx
leal 0x1(%rcx), %edx
movl %edx, 0x28(%rbx)
movq (%rax,%rcx,8), %rax
testq %rax, %rax
je 0x6558
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x41e0
movq %rax, %rbx
callq 0x4250
movq 0x6988(%rip), %rcx      # 0xcfa8
movq (%rcx), %rcx
movq %rcx, (%rsp)
leaq 0x2efd(%rip), %rdx      # 0x952b
leaq 0x2f45(%rip), %r8       # 0x957a
movl $0x1000, %esi           # imm = 0x1000
movq %rbx, %rdi
movq %rax, %rcx
movl $0x1ce, %r9d            # imm = 0x1CE
xorl %eax, %eax
callq 0x4490
callq 0x41e0
movq %rax, %rbx
callq 0x41e0
movq %rax, %rdi
callq 0x4120
movl $0x2, %edi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x40f0
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x4370