// File: /workspace/github_cpp_makefile_star2_O2/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 %r12
pushq %rbx
subq $0x10, %rsp
movq 0x20(%rdi), %rax
cmpq 0x18(%rdi), %rax
jae 0x6429
movq %rdi, %rbx
movl 0x28(%rdi), %r12d
movq 0x7c0a(%rip), %r14      # 0xdf98
movl (%r14), %ecx
movq 0x60(%rdi), %rsi
movq 0x7b84(%rip), %r15      # 0xdf20
cmpl %ecx, %r12d
jae 0x63ba
movl %r12d, %eax
leal 0x1(%r12), %edx
movl %edx, 0x28(%rbx)
movq (%rsi,%rax,8), %rax
movl %edx, %r12d
testq %rax, %rax
je 0x639c
jmp 0x641c
movl %ecx, %eax
xorl %edx, %edx
cmpq %rdx, %rax
je 0x63d8
movq 0x20(%rbx), %rdi
movq %rdi, (%rsi,%rdx,8)
addq 0x10(%rbx), %rdi
movq %rdi, 0x20(%rbx)
incq %rdx
jmp 0x63be
xorl %r12d, %r12d
xorl %ebp, %ebp
movl 0x8(%r15), %edx
movl 0xc(%r15), %edi
shrl %edx
movl %edi, %eax
subl 0x10(%r15), %eax
imull %edx, %eax
xorl %edx, %edx
divl %edi
cmpl %eax, %ebp
jae 0x63a1
callq 0x40b0
movl (%r14), %ecx
movq 0x60(%rbx), %rsi
xorl %edx, %edx
divl %ecx
movl %edx, %eax
incl %eax
cmpq $0x0, (%rsi,%rdx,8)
je 0x6404
andq $0x0, (%rsi,%rdx,8)
incl %ebp
jmp 0x63dd
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x4200
movq %rax, %rbx
callq 0x4280
movq 0x7b6b(%rip), %rcx      # 0xdfa8
movq (%rcx), %rcx
movq %rcx, (%rsp)
leaq 0x30e0(%rip), %rdx      # 0x952b
leaq 0x3128(%rip), %r8       # 0x957a
movl $0x1000, %esi           # imm = 0x1000
movq %rbx, %rdi
movq %rax, %rcx
movl $0x1ce, %r9d            # imm = 0x1CE
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
pushq $-0x1
popq %rdi
callq 0x43e0
nop