// File: /workspace/github_cpp_makefile_star2_O3/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 0x662a
movq %rdi, %rbx
movl 0x28(%rdi), %esi
movq 0x6a28(%rip), %r14      # 0xcf98
movl (%r14), %ecx
movq 0x69a6(%rip), %r15      # 0xcf20
cmpl %ecx, %esi
jb 0x6607
testl %ecx, %ecx
je 0x65aa
movq 0x20(%rbx), %rdx
movq 0x60(%rbx), %rax
movl %ecx, %esi
xorl %edi, %edi
movq %rdx, (%rax,%rdi,8)
movq 0x20(%rbx), %rdx
addq 0x10(%rbx), %rdx
movq %rdx, 0x20(%rbx)
incq %rdi
cmpq %rdi, %rsi
jne 0x6592
movl 0x8(%r15), %eax
movl 0xc(%r15), %edx
movl %edx, %edi
subl 0x10(%r15), %edi
shrl %eax
imull %eax, %edi
xorl %esi, %esi
cmpl %edi, %edx
ja 0x6607
xorl %ebp, %ebp
callq 0x40a0
movl (%r14), %ecx
movq 0x60(%rbx), %rsi
xorl %edx, %edx
divl %ecx
movl %edx, %eax
incl %eax
cmpq $0x0, (%rsi,%rdx,8)
je 0x65d1
movq $0x0, (%rsi,%rdx,8)
incl %ebp
movl 0x8(%r15), %edx
movl 0xc(%r15), %edi
movl %edi, %eax
subl 0x10(%r15), %eax
shrl %edx
imull %edx, %eax
xorl %esi, %esi
xorl %edx, %edx
divl %edi
cmpl %eax, %ebp
jb 0x65c5
movq 0x60(%rbx), %rax
movl %esi, %edx
incl %esi
movl %esi, 0x28(%rbx)
movq (%rax,%rdx,8), %rax
testq %rax, %rax
je 0x657a
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x41e0
movq %rax, %rbx
callq 0x4250
movq 0x696a(%rip), %rcx      # 0xcfa8
movq (%rcx), %rcx
movq %rcx, (%rsp)
leaq 0x2eef(%rip), %rdx      # 0x953b
leaq 0x2f37(%rip), %r8       # 0x958a
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