LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: UTSASRG[P]Guarder/libguarder.cpp
// Function: xxcalloc
void * xxcalloc(size_t nelem, size_t elsize) {
	void * ptr = NULL;
	ptr = malloc(nelem * elsize);
	if(ptr != NULL) {
		memset(ptr, 0, nelem * elsize);
	}
	return ptr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rdi
imulq -0x10(%rbp), %rdi
callq 0x5550
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x6055
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rdx
imulq -0x10(%rbp), %rdx
xorl %esi, %esi
callq 0x5240
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: UTSASRG[P]Guarder/libguarder.cpp
// Function: xxrealloc
void * xxrealloc(void * ptr, size_t sz) {
		// We can't really support this library call when the allocator
		// is uninitialized; this is because there is no way for us to
		// determine the actual size of an object given only its
		// starting address using the temporary allocator.
    if(heapInitStatus != E_HEAP_INIT_DONE) {
        heapinitialize();
    }

		// If the pointer is null, call is equivalent to malloc(sz).
		if(ptr == NULL) {
				return xxmalloc(sz);
		}

		// If the pointer is non-null and size is zero, call is equivalent
		// to free(ptr).
		if(sz == 0) {
				xxfree(ptr);
				return NULL;
		}

		// If the object is unknown to us, return NULL to indicate error.
		size_t oldSize = -1;
    if(BibopHeap::getInstance().isSmallObject(ptr)) {
        oldSize = BibopHeap::getInstance().getObjectSize(ptr);
    } else if(BigHeap::getInstance().isLargeObject(ptr)) {
        oldSize = BigHeap::getInstance().getObjectSize(ptr);
    }

		if(oldSize == -1) {
				PRERR("realloc called with unknown object");
				return NULL;
		}

		// If the requested new size is less than
		// or equal to the old size, simply return the object as-is.
		if(oldSize >= sz) {
				return ptr;
		}

		void * newObject = xxmalloc(sz);
		memcpy(newObject, ptr, oldSize);
		xxfree(ptr);
		return newObject;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq 0xaed9(%rip), %rax      # 0x10f50
cmpl $0x2, (%rax)
je 0x6081
callq 0x54b0
cmpq $0x0, -0x10(%rbp)
jne 0x609a
movq -0x18(%rbp), %rdi
callq 0x5420
movq %rax, -0x8(%rbp)
jmp 0x61cb
cmpq $0x0, -0x18(%rbp)
jne 0x60b7
movq -0x10(%rbp), %rdi
callq 0x5280
movq $0x0, -0x8(%rbp)
jmp 0x61cb
movq $-0x1, -0x20(%rbp)
callq 0x5170
movq %rax, %rdi
movq -0x10(%rbp), %rsi
callq 0x50d0
testb $0x1, %al
jne 0x60d6
jmp 0x60ed
callq 0x5170
movq %rax, %rdi
movq -0x10(%rbp), %rsi
callq 0x51f0
movq %rax, -0x20(%rbp)
jmp 0x611b
callq 0x5130
movq %rax, %rdi
movq -0x10(%rbp), %rsi
callq 0x5650
testb $0x1, %al
jne 0x6104
jmp 0x6119
callq 0x5130
movq %rax, %rdi
movq -0x10(%rbp), %rsi
callq 0x58c0
movq %rax, -0x20(%rbp)
jmp 0x611b
cmpq $-0x1, -0x20(%rbp)
jne 0x6188
callq 0x52d0
movq %rax, -0x38(%rbp)
callq 0x5400
movq -0x38(%rbp), %rdi
movq %rax, %rcx
movl $0x1000, %esi           # imm = 0x1000
leaq 0x62c4(%rip), %rdx      # 0xc407
leaq 0x5faf(%rip), %r8       # 0xc0f9
movl $0x141, %r9d            # imm = 0x141
movb $0x0, %al
callq 0x57e0
callq 0x52d0
movq %rax, -0x30(%rbp)
callq 0x52d0
movq %rax, %rdi
callq 0x51e0
movq -0x30(%rbp), %rsi
movq %rax, %rdx
movl $0x2, %edi
callq 0x5160
movq $0x0, -0x8(%rbp)
jmp 0x61cb
movq -0x20(%rbp), %rax
cmpq -0x18(%rbp), %rax
jb 0x619c
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x61cb
movq -0x18(%rbp), %rdi
callq 0x5420
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x53a0
movq -0x10(%rbp), %rdi
callq 0x5280
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: UTSASRG[P]Guarder/libguarder.cpp
// Function: xxmemalign
void * xxmemalign(size_t alignment, size_t size) {
		if(size == 0) {
			return NULL;
		}

		// Calculate the proper bag size needed to fulfill this request
		if(size > LARGE_OBJECT_THRESHOLD) {
			numLargeObjects++;
			return BigHeap::getInstance().allocateAlignedAtBigHeap(alignment, size);
		} else {
			size_t allocObjectSize = alignment + size;
			uintptr_t object = (uintptr_t)BibopHeap::getInstance().allocateSmallObject(allocObjectSize);
			unsigned long residualBytes = alignment - (object % alignment);
			void * alignedObject = (void *)(object + residualBytes);
			PRDBG("memalign: original object @ 0x%lx, residual bytes=%lu, aligned object @ %p",
							object, residualBytes, alignedObject);
			return alignedObject;
		}

		return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x6304
movq $0x0, -0x8(%rbp)
jmp 0x640e
cmpq $0x80000, -0x18(%rbp)   # imm = 0x80000
jbe 0x6344
movq 0xabdb(%rip), %rax      # 0x10ef0
movq (%rax), %rcx
addq $0x1, %rcx
movq 0xabcd(%rip), %rax      # 0x10ef0
movq %rcx, (%rax)
callq 0x5130
movq %rax, %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x56e0
movq %rax, -0x8(%rbp)
jmp 0x640e
movq -0x10(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
callq 0x5170
movq %rax, %rdi
movq -0x20(%rbp), %rsi
callq 0x56f0
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x28(%rbp), %rax
xorl %ecx, %ecx
movl %ecx, %edx
divq -0x10(%rbp)
movq -0x50(%rbp), %rax
subq %rdx, %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
addq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
callq 0x52d0
movq %rax, -0x48(%rbp)
callq 0x5400
movq -0x48(%rbp), %rdi
movq %rax, %rcx
movq -0x28(%rbp), %r11
movq -0x30(%rbp), %r10
movq -0x38(%rbp), %rax
movl $0x1000, %esi           # imm = 0x1000
leaq 0x60e1(%rip), %rdx      # 0xc49e
leaq 0x5d35(%rip), %r8       # 0xc0f9
movl $0x176, %r9d            # imm = 0x176
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
movb $0x0, %al
callq 0x57e0
callq 0x52d0
movq %rax, -0x40(%rbp)
callq 0x52d0
movq %rax, %rdi
callq 0x51e0
movq -0x40(%rbp), %rsi
movq %rax, %rdx
movl $0x2, %edi
callq 0x5160
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: UTSASRG[P]Guarder/./xthread.hh
// Function: xthread::initialize()
void initialize() {
		_aliveThreads = 0;
    _threadIndex = 0;

		// Initialize the spin_lock
		pthread_spin_init(&_spin_lock, PTHREAD_PROCESS_PRIVATE);

    thread_t * thread;

    // Shared the threads information.
    memset(&_threads, 0, sizeof(_threads));

		// Initialize all 
    for(int i = 0; i < MAX_ALIVE_THREADS; i++) {
				thread = &_threads[i];

				// Those information that are only initialized once.
				thread->available = true;
				thread->index = i;
		}

		// Now we will intialize the initial thread
		initializeInitialThread();

		_xmap.initialize(HashFuncs::hashAddr, HashFuncs::compareAddr, THREAD_MAP_SIZE);
		_xmap.insert((void*)pthread_self(), sizeof(void*), 0);
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x28(%rbp)
movl $0x0, 0x38(%rdi)
movl $0x0, 0x4(%rdi)
xorl %esi, %esi
callq 0x5470
movq -0x28(%rbp), %rdi
addq $0x40, %rdi
xorl %esi, %esi
movl $0x81400, %edx          # imm = 0x81400
callq 0x5240
movl $0x0, -0x14(%rbp)
cmpl $0x80, -0x14(%rbp)
jge 0x7763
movq -0x28(%rbp), %rax
addq $0x40, %rax
movslq -0x14(%rbp), %rcx
imulq $0x1028, %rcx, %rcx     # imm = 0x1028
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movb $0x1, (%rax)
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x10(%rax)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x7724
movq -0x28(%rbp), %rdi
callq 0x5660
movq -0x28(%rbp), %rdi
addq $0x8, %rdi
movq 0x9765(%rip), %rsi      # 0x10ee0
movq 0x97f6(%rip), %rdx      # 0x10f78
movl $0x500, %ecx            # imm = 0x500
callq 0x5490
movq -0x28(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x30(%rbp)
callq 0x5400
movq -0x30(%rbp), %rdi
movq %rax, -0x20(%rbp)
leaq -0x20(%rbp), %rsi
movl $0x8, %edx
xorl %ecx, %ecx
callq 0x5570
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: UTSASRG[P]Guarder/./bibopheap.hh
// Function: BibopHeap::allocateSmallObject(unsigned long)
void * allocateSmallObject(size_t sz) {
		//PRDBG("allocateSmallObject(%zu)", sz);

		#ifdef CUSTOMIZED_STACK
		int threadIndex = getThreadIndex(&sz);
		#else
		int threadIndex = getThreadIndex();
		#endif

    #ifdef USE_CANARY
    sz++;   // make room for the buffer overflow canary
    #endif

		unsigned classSizePower;
    if(sz <= BIBOP_MIN_BLOCK_SIZE) {
      classSizePower = LOG2(BIBOP_MIN_BLOCK_SIZE);
    } else {
      classSizePower = N_64BITS - __builtin_clzl(sz - 1);
    }

		PerThreadMap& curMap = _threadMap[threadIndex]; 
		unsigned bagNum = curMap.getBagNum(classSizePower);
		BibopObjCache& curCache = _bagCache[threadIndex][bagNum]; 

		PRDBG("allocateSmallObject(%zu): threadIndex = %d, bagNum = %d, class size = %u",
						sz, threadIndex, bagNum, curCache.getClassSize());

		void * object = curCache.malloc();

		return object;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x88, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
xorl %eax, %eax
movl %eax, %edi
callq 0x53d0
movl %eax, -0x1c(%rbp)
cmpq $0x10, -0x18(%rbp)
ja 0x7918
movl $0x4, -0x20(%rbp)
jmp 0x7934
movq -0x18(%rbp), %rax
subq $0x1, %rax
bsrq %rax, %rax
xorq $0x3f, %rax
movl %eax, %ecx
movl $0x40, %eax
subl %ecx, %eax
movl %eax, -0x20(%rbp)
movq -0x48(%rbp), %rax
addq $0x4c, %rax
movslq -0x1c(%rbp), %rcx
imulq $0x32, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movl -0x20(%rbp), %esi
callq 0x5100
movl %eax, %ecx
movq -0x48(%rbp), %rax
movl %ecx, -0x2c(%rbp)
addq $0x41980, %rax          # imm = 0x41980
movslq -0x1c(%rbp), %rcx
shlq $0xb, %rcx
addq %rcx, %rax
movl -0x2c(%rbp), %ecx
shlq $0x7, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
callq 0x52d0
movq %rax, -0x68(%rbp)
callq 0x5400
movq %rax, -0x60(%rbp)
movq -0x18(%rbp), %rbx
movl -0x1c(%rbp), %eax
movl %eax, -0x58(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, -0x54(%rbp)
movq -0x38(%rbp), %rdi
callq 0x5540
movq -0x68(%rbp), %rdi
movq -0x60(%rbp), %rcx
movl -0x58(%rbp), %r11d
movl -0x54(%rbp), %r10d
movl $0x1000, %esi           # imm = 0x1000
leaq 0x5371(%rip), %rdx      # 0xcd37
leaq 0x4b95(%rip), %r8       # 0xc562
movl $0x3fa, %r9d            # imm = 0x3FA
movq %rbx, (%rsp)
movl %r11d, 0x8(%rsp)
movl %r10d, 0x10(%rsp)
movl %eax, 0x18(%rsp)
movb $0x0, %al
callq 0x57e0
callq 0x52d0
movq %rax, -0x50(%rbp)
callq 0x52d0
movq %rax, %rdi
callq 0x51e0
movq -0x50(%rbp), %rsi
movq %rax, %rdx
movl $0x2, %edi
callq 0x5160
movq -0x38(%rbp), %rdi
callq 0x5800
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
addq $0x88, %rsp
popq %rbx
popq %rbp
retq
nop
// File: UTSASRG[P]Guarder/./bigheap.hh
// Function: BigHeap::deallocateToBigHeap(void*)
void deallocateToBigHeap(void * ptr) {
    bigObjectStatus * objStatus;
		if(!_xmap.find(ptr, sizeof(void *), &objStatus)) {
			PRINT("invalid or double free on address %p", ptr);
      printCallStack();
      exit(-1);
		}

		//PRDBG("BigHeap freed %p (begins @ %p), size %zu (actual %zu), objStatus @ %p",
		//				ptr, objStatus->start, objStatus->size, objStatus->pageUpSize, objStatus);
		acquireGlobalLock();
		_xmap.erase(ptr, sizeof(void *));
		releaseGlobalLock();
		MM::mmapDeallocate(objStatus->actualStart, objStatus->pageUpSize);
		HeapAllocator::deallocate(objStatus);
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
addq $0x10, %rdi
leaq -0x10(%rbp), %rsi
movl $0x8, %edx
leaq -0x18(%rbp), %rcx
callq 0x52b0
testb $0x1, %al
jne 0x7d07
callq 0x52d0
movq %rax, %rdi
movq -0x10(%rbp), %rcx
movl $0x1000, %esi           # imm = 0x1000
leaq 0x59c0(%rip), %rdx      # 0xd68a
movb $0x0, %al
callq 0x57e0
callq 0x52d0
movq %rax, -0x28(%rbp)
callq 0x52d0
movq %rax, %rdi
callq 0x51e0
movq -0x28(%rbp), %rsi
movq %rax, %rdx
movl $0x2, %edi
callq 0x5160
callq 0x5920
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x55b0
movq -0x20(%rbp), %rdi
callq 0x51d0
movq -0x20(%rbp), %rdi
addq $0x10, %rdi
leaq -0x10(%rbp), %rsi
movl $0x8, %edx
callq 0x5070
movq -0x20(%rbp), %rdi
callq 0x5040
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rsi
callq 0x5080
movq -0x18(%rbp), %rdi
callq 0x5330
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: UTSASRG[P]Guarder/./bibopheap.hh
// Function: BibopHeap::getObjectSize(void*)
size_t getObjectSize(void * addr) {
    void * objectStartAddr;
    PerThreadBag * bag;
    (void)getShadowObjectInfo(addr, &bag, &objectStartAddr);

    size_t classSize = bag->classSize;

    if(objectStartAddr != addr) {
        ptrdiff_t offset = (uintptr_t)addr - (uintptr_t)objectStartAddr;
        classSize -= offset;
    }

    #ifdef USE_CANARY
    return (classSize - 1);
    #else
    return classSize;
    #endif
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x20(%rbp), %rdx
leaq -0x18(%rbp), %rcx
xorl %eax, %eax
movl %eax, %r8d
callq 0x58d0
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x10(%rbp), %rax
je 0x7dbe
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rcx
movq -0x28(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: UTSASRG[P]Guarder/./xthread.hh
// Function: xthread::thread_join(unsigned long, void**)
int thread_join(pthread_t tid, void ** retval) {
		int joinretval;
		if((joinretval = Real::pthread_join(tid, retval)) == 0) {
				int joinee = -1;

				acquireGlobalLock();
				if(!_xmap.find((void *)tid, sizeof(void *), &joinee)) {
						PRERR("Cannot find joinee index for thread %p", (void *)tid);
				} else {
						_threads[joinee].available = true;
				}
				_aliveThreads--;
				releaseGlobalLock();
		}
		return joinretval;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq 0x8e85(%rip), %rax      # 0x10fd8
movq (%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq *%rax
movl %eax, -0x1c(%rbp)
cmpl $0x0, %eax
jne 0x8237
movq -0x30(%rbp), %rdi
movl $0xffffffff, -0x20(%rbp) # imm = 0xFFFFFFFF
callq 0x51c0
movq -0x30(%rbp), %rdi
addq $0x8, %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
leaq -0x28(%rbp), %rsi
movl $0x8, %edx
leaq -0x20(%rbp), %rcx
callq 0x5610
xorb $-0x1, %al
testb $0x1, %al
jne 0x81a6
jmp 0x820c
callq 0x52d0
movq %rax, -0x40(%rbp)
callq 0x5400
movq -0x40(%rbp), %rdi
movq %rax, %rcx
movq -0x10(%rbp), %rax
movl $0x1000, %esi           # imm = 0x1000
leaq 0x580c(%rip), %rdx      # 0xd9d7
leaq 0x4a21(%rip), %r8       # 0xcbf3
movl $0xf2, %r9d
movq %rax, (%rsp)
movb $0x0, %al
callq 0x57e0
callq 0x52d0
movq %rax, -0x38(%rbp)
callq 0x52d0
movq %rax, %rdi
callq 0x51e0
movq -0x38(%rbp), %rsi
movq %rax, %rdx
movl $0x2, %edi
callq 0x5160
jmp 0x8225
movq -0x30(%rbp), %rax
addq $0x40, %rax
movslq -0x20(%rbp), %rcx
imulq $0x1028, %rcx, %rcx     # imm = 0x1028
addq %rcx, %rax
movb $0x1, (%rax)
movq -0x30(%rbp), %rdi
movl 0x38(%rdi), %eax
addl $-0x1, %eax
movl %eax, 0x38(%rdi)
callq 0x5380
movl -0x1c(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
// File: UTSASRG[P]Guarder/./bibopheap.hh
// Function: BibopHeap::BibopFreeCache::getNext()
inline void * getNext() {
							if(_numFreeObjects == 0) {
									#ifdef USE_GLOBAL_FREE_CACHE
									// Repopulate from the global free cache, if possible
									if(_myGlobalFreeCache) {
											if(repopulate() == 0) {
													return NULL;
											}
									} else {
											return NULL;
									}
									#else
									return NULL;
									#endif
							}

							void ** oldTail = (void **)_tail;

							_tail += POINTER_SIZE;
							if(_tail == _endaddr) {
									// do wrap-around on _tail
									_tail = _startaddr;
							}

							_numFreeObjects--;
							if(_head == _tail) {
									PRDBG("free cache is now empty");
							}

							PRDBG("freeCache->getNext(): retval=%p, this=%p, _numFreeObjects=%lu, _capacity=%lu, _start=0x%lx, _end=0x%lx",
											*oldTail, this, _numFreeObjects, _capacity, _startaddr, _endaddr);
							return *oldTail;
					}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x78, %rsp
movq %rdi, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, 0x38(%rax)
jne 0x861d
movq $0x0, -0x20(%rbp)
jmp 0x8760
movq -0x38(%rbp), %rcx
movq 0x20(%rcx), %rax
movq %rax, -0x30(%rbp)
movq 0x20(%rcx), %rax
addq $0x8, %rax
movq %rax, 0x20(%rcx)
movq 0x20(%rcx), %rax
cmpq 0x10(%rcx), %rax
jne 0x864b
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rcx
movq %rcx, 0x20(%rax)
movq -0x38(%rbp), %rcx
movq 0x38(%rcx), %rax
addq $-0x1, %rax
movq %rax, 0x38(%rcx)
movq 0x18(%rcx), %rax
cmpq 0x20(%rcx), %rax
jne 0x86c1
callq 0x52d0
movq %rax, -0x48(%rbp)
callq 0x5400
movq -0x48(%rbp), %rdi
movq %rax, %rcx
movl $0x1000, %esi           # imm = 0x1000
leaq 0x3eeb(%rip), %rdx      # 0xc571
leaq 0x3ed5(%rip), %r8       # 0xc562
movl $0xde, %r9d
movb $0x0, %al
callq 0x57e0
callq 0x52d0
movq %rax, -0x40(%rbp)
callq 0x52d0
movq %rax, %rdi
callq 0x51e0
movq -0x40(%rbp), %rsi
movq %rax, %rdx
movl $0x2, %edi
callq 0x5160
movq -0x38(%rbp), %r14
callq 0x52d0
movq %rax, -0x58(%rbp)
callq 0x5400
movq -0x58(%rbp), %rdi
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq (%rax), %r15
movq 0x38(%r14), %rbx
movq 0x28(%r14), %r11
movq 0x8(%r14), %r10
movq 0x10(%r14), %rax
movl $0x1000, %esi           # imm = 0x1000
leaq 0x3eac(%rip), %rdx      # 0xc5a9
leaq 0x3e5e(%rip), %r8       # 0xc562
movl $0xe2, %r9d
movq %r15, (%rsp)
movq %r14, 0x8(%rsp)
movq %rbx, 0x10(%rsp)
movq %r11, 0x18(%rsp)
movq %r10, 0x20(%rsp)
movq %rax, 0x28(%rsp)
movb $0x0, %al
callq 0x57e0
callq 0x52d0
movq %rax, -0x50(%rbp)
callq 0x52d0
movq %rax, %rdi
callq 0x51e0
movq -0x50(%rbp), %rsi
movq %rax, %rdx
movl $0x2, %edi
callq 0x5160
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
addq $0x78, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: UTSASRG[P]Guarder/./bibopheap.hh
// Function: BibopHeap::allocShadowMem(unsigned long)
void allocShadowMem(size_t numObjectsInHeap) {
			// Use one byte for each heap object
      size_t totalShadowMemSize = numObjectsInHeap;
      _shadowMemBegin = (char *)MM::mmapAllocatePrivate(totalShadowMemSize);
      _shadowMemEnd = _shadowMemBegin + totalShadowMemSize;
			madvise(_shadowMemBegin, totalShadowMemSize, MADV_NOHUGEPAGE);
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x55d0
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
movq 0x10(%rax), %rcx
addq -0x18(%rbp), %rcx
movq %rcx, 0x18(%rax)
movq 0x10(%rax), %rdi
movq -0x18(%rbp), %rsi
movl $0xf, %edx
callq 0x55a0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: UTSASRG[P]Guarder/./bibopheap.hh
// Function: BibopHeap::allocFreeArea(unsigned long)
void allocFreeArea(size_t numObjectsInHeap) {
			// Use eight bytes for each heap object
      size_t totalFreeAreaSize = numObjectsInHeap * sizeof(void *);
      _freeAreaBegin = (char *)MM::mmapAllocatePrivate(totalFreeAreaSize);
      _freeAreaEnd = _freeAreaBegin + totalFreeAreaSize;
			madvise(_freeAreaBegin, totalFreeAreaSize, MADV_NOHUGEPAGE);
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
shlq $0x3, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x55d0
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x20(%rax)
movq 0x20(%rax), %rcx
addq -0x18(%rbp), %rcx
movq %rcx, 0x28(%rax)
movq 0x20(%rax), %rdi
movq -0x18(%rbp), %rsi
movl $0xf, %edx
callq 0x55a0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: UTSASRG[P]Guarder/./bibopheap.hh
// Function: BibopHeap::allocGlobalFreeCache(unsigned int)
void allocGlobalFreeCache(unsigned numObjectsInHeap) {
			unsigned minClassSizePower = LOG2(BIBOP_MIN_BLOCK_SIZE);
			unsigned numClassSizePowers = BIBOP_NUM_BAGS + minClassSizePower - 1;
			unsigned long approxNumObjectsInSubHeap = (_bibopBagSize / (BIBOP_MIN_BLOCK_SIZE >> 1)) -
					(_bibopBagSize / (1U << numClassSizePowers));
			unsigned shiftBits;

			size_t globalFreeCacheSize = approxNumObjectsInSubHeap * sizeof(uintptr_t);
			uintptr_t myFreeCacheStart = (uintptr_t)MM::mmapAllocatePrivate(globalFreeCacheSize);

      unsigned long numObjectsInClass = _bibopBagSize / BIBOP_MIN_BLOCK_SIZE;
			for(shiftBits = minClassSizePower; shiftBits <= numClassSizePowers; shiftBits++) {
					_globalFreeCache[shiftBits].initialize(myFreeCacheStart, numObjectsInClass);
					myFreeCacheStart += (numObjectsInClass * POINTER_SIZE);
					numObjectsInClass >>= 1;
			}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x50(%rbp)
movl $0x4, -0x10(%rbp)
movl -0x10(%rbp), %eax
addl $0x10, %eax
subl $0x1, %eax
movl %eax, -0x14(%rbp)
movq 0x86c7(%rip), %rax      # 0x10fa8
movq (%rax), %rax
shrq $0x3, %rax
movq %rax, -0x48(%rbp)
movq 0x86b5(%rip), %rax      # 0x10fa8
movq (%rax), %rax
movl -0x14(%rbp), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
movl %ecx, %ecx
xorl %edx, %edx
divq %rcx
movq %rax, %rcx
movq -0x48(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
shlq $0x3, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x55d0
movq %rax, -0x38(%rbp)
movq 0x8668(%rip), %rax      # 0x10fa8
movq (%rax), %rax
shrq $0x4, %rax
movq %rax, -0x40(%rbp)
movl -0x10(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x14(%rbp), %eax
ja 0x89a1
movq -0x50(%rbp), %rdi
addq $0xa1980, %rdi          # imm = 0xA1980
movl -0x24(%rbp), %eax
shlq $0x7, %rax
addq %rax, %rdi
movq -0x38(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq 0x5580
movq -0x40(%rbp), %rax
shlq $0x3, %rax
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x40(%rbp), %rax
shrq %rax
movq %rax, -0x40(%rbp)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x8951
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: UTSASRG[P]Guarder/./bibopheap.hh
// Function: BibopHeap::BibopFreeCache::initialize(unsigned long, unsigned long, BibopHeap::BibopGlobalFreeCache*)
void initialize(uintptr_t startaddr, unsigned long capacity, BibopGlobalFreeCache * globalFreeCache) {
							_startaddr = startaddr;
							_endaddr = _startaddr + (capacity << PTR_SIZE_SHIFT_BITS);
							_head = _startaddr;
							_tail = _head;
							_capacity = capacity;
							_numFreeObjects = 0;
							_myGlobalFreeCache = globalFreeCache;
					}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq 0x8(%rax), %rcx
movq -0x18(%rbp), %rdx
shlq $0x3, %rdx
addq %rdx, %rcx
movq %rcx, 0x10(%rax)
movq 0x8(%rax), %rcx
movq %rcx, 0x18(%rax)
movq 0x18(%rax), %rcx
movq %rcx, 0x20(%rax)
movq -0x18(%rbp), %rcx
movq %rcx, 0x28(%rax)
movq $0x0, 0x38(%rax)
movq -0x20(%rbp), %rcx
movq %rcx, 0x30(%rax)
popq %rbp
retq
nopl (%rax)
// File: UTSASRG[P]Guarder/./mm.hh
// Function: MM::allocate(bool, unsigned long, int, void*)
static void* allocate(bool isShared, size_t sz, int fd, void* startaddr) {
    int protInfo = PROT_READ | PROT_WRITE;
    int sharedInfo = isShared ? MAP_SHARED : MAP_PRIVATE;
    sharedInfo |= ((fd == -1) ? MAP_ANONYMOUS : 0);
    sharedInfo |= ((startaddr != (void*)0) ? MAP_FIXED : 0);
    sharedInfo |= MAP_NORESERVE;

    void* ptr = mmap(startaddr, sz, protInfo, sharedInfo, fd, 0);
    if(ptr == MAP_FAILED) {
      FATAL("Couldn't do mmap (%s) : startaddr %p, sz %lx, protInfo=%d, sharedInfo=%d",
            strerror(errno), startaddr, sz, protInfo, sharedInfo);
    }

    return ptr;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x70, %rsp
movb %dil, %al
andb $0x1, %al
movb %al, -0x11(%rbp)
movq %rsi, -0x20(%rbp)
movl %edx, -0x24(%rbp)
movq %rcx, -0x30(%rbp)
movl $0x3, -0x34(%rbp)
movb -0x11(%rbp), %dl
movl $0x2, %eax
movl $0x1, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x38(%rbp)
movl -0x24(%rbp), %edx
xorl %eax, %eax
movl $0x20, %ecx
cmpl $-0x1, %edx
cmovel %ecx, %eax
orl -0x38(%rbp), %eax
movl %eax, -0x38(%rbp)
movq -0x30(%rbp), %rdx
xorl %eax, %eax
movl $0x10, %ecx
cmpq $0x0, %rdx
cmovnel %ecx, %eax
orl -0x38(%rbp), %eax
movl %eax, -0x38(%rbp)
movl -0x38(%rbp), %eax
orl $0x4000, %eax           # imm = 0x4000
movl %eax, -0x38(%rbp)
movq -0x30(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl -0x34(%rbp), %edx
movl -0x38(%rbp), %ecx
movl -0x24(%rbp), %r8d
xorl %eax, %eax
movl %eax, %r9d
callq 0x58a0
movq %rax, -0x40(%rbp)
movq $-0x1, %rax
cmpq %rax, -0x40(%rbp)
jne 0x93c5
callq 0x52d0
movq %rax, -0x58(%rbp)
callq 0x5400
movq %rax, -0x50(%rbp)
callq 0x5030
movl (%rax), %edi
callq 0x5140
movq -0x58(%rbp), %rdi
movq -0x50(%rbp), %rcx
movq %rax, %r14
movq -0x30(%rbp), %rbx
movq -0x20(%rbp), %r11
movl -0x34(%rbp), %r10d
movl -0x38(%rbp), %eax
movl $0x1000, %esi           # imm = 0x1000
leaq 0x355b(%rip), %rdx      # 0xc8c4
leaq 0x35c8(%rip), %r8       # 0xc938
movl $0x3c, %r9d
movq %r14, (%rsp)
movq %rbx, 0x8(%rsp)
movq %r11, 0x10(%rsp)
movl %r10d, 0x18(%rsp)
movl %eax, 0x20(%rsp)
movb $0x0, %al
callq 0x57e0
callq 0x52d0
movq %rax, -0x48(%rbp)
callq 0x52d0
movq %rax, %rdi
callq 0x51e0
movq -0x48(%rbp), %rsi
movq %rax, %rdx
movl $0x2, %edi
callq 0x5160
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x55b0
movq -0x40(%rbp), %rax
addq $0x70, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: UTSASRG[P]Guarder/./xthread.hh
// Function: xthread::initializeInitialThread()
void initializeInitialThread(void) {
		int tindex = allocThreadIndex();
   	assert(tindex == 0);

		thread_t * thread = getThread(tindex);
	
		// Initial myself, like threadIndex, tid
		initializeCurrentThread(thread);
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
callq 0x52a0
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jne 0x9404
jmp 0x9423
leaq 0x37dc(%rip), %rdi      # 0xcbe7
leaq 0x37e1(%rip), %rsi      # 0xcbf3
movl $0x57, %edx
leaq 0x37e2(%rip), %rcx      # 0xcc00
callq 0x5300
movq -0x20(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x5780
movq -0x20(%rbp), %rdi
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rsi
callq 0x5090
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: UTSASRG[P]Guarder/./hashmap.hh
// Function: HashMap<void*, int, HeapAllocator>::initialize(unsigned long (*)(void*, unsigned long), bool (*)(void*, void*, unsigned long), unsigned long)
void initialize(hashFuncPtr hfunc, keycmpFuncPtr kcmp, const size_t size = 4096) {
    _entries = NULL;
    _bucketsUsed = 0;
    _buckets = size;

    if(hfunc == NULL || kcmp == NULL) {
      //PRINF("Hashfunc or kcmp should not be null\n");
      abort();
    }

    // Initialize those functions.
    _hashfunc = hfunc;
    _keycmp = kcmp;

    // Allocated predefined size.
    _entries = (struct HashEntry*)SourceHeap::allocate(size * sizeof(struct HashEntry));
    //    PRINF("hashmap initialization at %p pid %d index %d\n", &_initialized,getpid(),
    // getThreadIndex());
    //    PRINF("hashmap initialization _entries %p\n", _entries);

    // Initialize all of these _entries.
    struct HashEntry* entry;
    for(size_t i = 0; i < size; i++) {
      entry = getHashEntry(i);
      entry->initialize();
    }
    _initialized = true;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movq $0x0, 0x8(%rax)
movq $0x0, 0x18(%rax)
movq -0x20(%rbp), %rcx
movq %rcx, 0x10(%rax)
cmpq $0x0, -0x10(%rbp)
je 0x9496
cmpq $0x0, -0x18(%rbp)
jne 0x949b
callq 0x5250
movq -0x38(%rbp), %rax
movq -0x10(%rbp), %rcx
movq %rcx, 0x28(%rax)
movq -0x18(%rbp), %rcx
movq %rcx, 0x20(%rax)
imulq $0x18, -0x20(%rbp), %rdi
callq 0x5530
movq %rax, %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x8(%rax)
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x94fe
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x56d0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x56a0
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x94cc
movq -0x38(%rbp), %rax
movb $0x1, (%rax)
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: UTSASRG[P]Guarder/./hashfuncs.hh
// Function: HashFuncs::hashAddr(void*, unsigned long)
static size_t hashAddr(void* addr, size_t) {
    unsigned long key = (unsigned long)addr;
    key ^= (key << 15) ^ 0xcd7dcd7d;
    key ^= (key >> 10);
    key ^= (key << 3);
    key ^= (key >> 6);
    key ^= (key << 2) + (key << 14);
    key ^= (key >> 16);
    return key;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
shlq $0xf, %rax
movabsq $0xcd7dcd7d, %rcx       # imm = 0xCD7DCD7D
xorq %rcx, %rax
xorq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
shrq $0xa, %rax
xorq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
shlq $0x3, %rax
xorq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
shrq $0x6, %rax
xorq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
shlq $0x2, %rax
movq -0x18(%rbp), %rcx
shlq $0xe, %rcx
addq %rcx, %rax
xorq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
shrq $0x10, %rax
xorq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: UTSASRG[P]Guarder/./hashmap.hh
// Function: HashMap<void*, int, HeapAllocator>::insert(void* const&, unsigned long, int)
void insert(const KeyType& key, size_t keylen, ValueType value) {
    if(_initialized != true) {
      //PRINT("process %d index %d: initialized at  %p hashmap is not true\n", getpid(),
      //      getThreadIndex(), &_initialized);
    }

    assert(_initialized == true);
    size_t hindex = hashIndex(key, keylen);
    // PRINF("Insert entry:  before inserting\n");
    struct HashEntry* first = getHashEntry(hindex);

    // PRINF("Insert entry: key %p\n", key);
    insertEntry(first, key, keylen, value);
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movb (%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
je 0x95fd
jmp 0x95fd
movq -0x38(%rbp), %rax
movb (%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x960f
jmp 0x962e
leaq 0x366a(%rip), %rdi      # 0xcc80
leaq 0x3678(%rip), %rsi      # 0xcc95
movl $0x9f, %edx
leaq 0x3679(%rip), %rcx      # 0xcca2
callq 0x5300
movq -0x38(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x5740
movq -0x38(%rbp), %rdi
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rsi
callq 0x56d0
movq -0x38(%rbp), %rdi
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rsi
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rcx
movl -0x1c(%rbp), %r8d
callq 0x5480
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: UTSASRG[P]Guarder/./xthread.hh
// Function: xthread::allocThreadIndex()
int allocThreadIndex() {
    int index = -1;

		if(_aliveThreads == MAX_ALIVE_THREADS) {
				FATAL("maximum concurrent thread limit reached (%d)", MAX_ALIVE_THREADS);
		}

    thread_t* thread;
		if(_aliveThreads++ == _threadIndex) {
			index = _threadIndex++;
      thread = getThread(index);
			thread->available = false;
		} else {
			for(int i = 0; i <= _threadIndex; i++) {
      	thread = getThread(i);
      	if(thread->available) {
        	thread->available = false;
					index = i;
					break;
				}
			}
		}
    return index;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0xffffffff, -0xc(%rbp) # imm = 0xFFFFFFFF
cmpl $0x80, 0x38(%rax)
jne 0x9711
callq 0x52d0
movq %rax, -0x38(%rbp)
callq 0x5400
movq -0x38(%rbp), %rdi
movq %rax, %rcx
movl $0x1000, %esi           # imm = 0x1000
leaq 0x3563(%rip), %rdx      # 0xcc28
leaq 0x3527(%rip), %r8       # 0xcbf3
movl $0x90, %r9d
movl $0x80, (%rsp)
movb $0x0, %al
callq 0x57e0
callq 0x52d0
movq %rax, -0x30(%rbp)
callq 0x52d0
movq %rax, %rdi
callq 0x51e0
movq -0x30(%rbp), %rsi
movq %rax, %rdx
movl $0x2, %edi
callq 0x5160
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x55b0
movq -0x28(%rbp), %rcx
movl 0x38(%rcx), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, 0x38(%rcx)
cmpl 0x4(%rcx), %eax
jne 0x974c
movq -0x28(%rbp), %rdi
movl 0x4(%rdi), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x4(%rdi)
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %esi
callq 0x5780
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movb $0x0, (%rax)
jmp 0x9796
movl $0x0, -0x1c(%rbp)
movq -0x28(%rbp), %rcx
movl -0x1c(%rbp), %eax
cmpl 0x4(%rcx), %eax
jg 0x9794
movq -0x28(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x5780
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
testb $0x1, (%rax)
je 0x9787
movq -0x18(%rbp), %rax
movb $0x0, (%rax)
movl -0x1c(%rbp), %eax
movl %eax, -0xc(%rbp)
jmp 0x9794
jmp 0x9789
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x9753
jmp 0x9796
movl -0xc(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nop
// File: UTSASRG[P]Guarder/./xthread.hh
// Function: xthread::initializeCurrentThread(thread*)
void initializeCurrentThread(thread_t * thread) {
		SRAND(time(NULL));
		thread->tid = syscall(__NR_gettid);
		#ifndef CUSTOMIZED_STACK
		setThreadIndex(thread->index);
		#endif
		// Adding the thread's pthreadt.
		thread->pthreadt = pthread_self();
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
xorl %eax, %eax
movl %eax, %edi
callq 0x5440
movl %eax, %edi
callq 0x54a0
movl $0xba, %edi
movb $0x0, %al
callq 0x5060
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rax
movl 0x10(%rax), %edi
callq 0x5910
callq 0x5400
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: UTSASRG[P]Guarder/./hashheapallocator.hh
// Function: HeapAllocator::allocate(unsigned long)
static void* allocate(size_t sz) {
    void* ptr = Real::malloc(sz);
    if(!ptr) {
      return NULL;
    }
    return ptr;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq 0x76ad(%rip), %rax      # 0x10f20
movq (%rax), %rax
movq -0x10(%rbp), %rdi
callq *%rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x9891
movq $0x0, -0x8(%rbp)
jmp 0x9899
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: UTSASRG[P]Guarder/./hashmap.hh
// Function: HashMap<void*, int, HeapAllocator>::getHashEntry(unsigned long)
inline struct HashEntry* getHashEntry(size_t index) {
    if(index < _buckets) {
      return &_entries[index];
    } else {
      return NULL;
    }
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rcx
movq %rcx, -0x20(%rbp)
movq -0x18(%rbp), %rax
cmpq 0x10(%rcx), %rax
jae 0x98e4
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
imulq $0x18, -0x18(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x98ec
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: UTSASRG[P]Guarder/./hashmap.hh
// Function: HashMap<void*, int, HeapAllocator>::insertEntry(HashMap<void*, int, HeapAllocator>::HashEntry*, void* const&, unsigned long, int)
void insertEntry(struct HashEntry* head, const KeyType& key, size_t keylen, ValueType value) {
    // Check whether the first entry is empty or not.
    // Create an entry
    struct Entry* entry = createNewEntry(key, keylen, value);
    listInsertTail(&entry->list, &head->list);
    head->count++;
    /*
		PRINF("insertEntry entry %p at head %p, headcount %ld\n", entry, head, head->count);
    PRINF("insertEntry entry %p, entrynext %p, at head %p hear->list %p headlist->next %p\n", entry,
          entry->list.next, head, &head->list, head->list.next);
	*/
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movl -0x24(%rbp), %ecx
callq 0x5860
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x5980
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x10(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: UTSASRG[P]Guarder/./hashmap.hh
// Function: HashMap<void*, int, HeapAllocator>::createNewEntry(void* const&, unsigned long, int)
struct Entry* createNewEntry(const KeyType& key, size_t keylen, ValueType value) {
    struct Entry* entry = (struct Entry*)SourceHeap::allocate(sizeof(struct Entry));

    // Initialize this new entry.
    entry->initialize(key, keylen, value);
    return entry;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl $0x28, %edi
callq 0x5530
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movq -0x18(%rbp), %rax
movl %eax, %edx
movl -0x1c(%rbp), %ecx
callq 0x5880
movq -0x28(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: UTSASRG[P]Guarder/./hashmap.hh
// Function: HashMap<void*, int, HeapAllocator>::Entry::initialize(void*, int, int)
void initialize(KeyType ikey = 0, int ikeylen = 0, ValueType ivalue = 0) {
      listInit(&list);
      key = ikey;
      keylen = ikeylen;
      value = ivalue;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
callq 0x5220
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movq %rcx, 0x10(%rax)
movslq -0x14(%rbp), %rcx
movq %rcx, 0x18(%rax)
movl -0x18(%rbp), %ecx
movl %ecx, 0x20(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: UTSASRG[P]Guarder/./list.hh
// Function: _insert_between(list*, list*, list*)
inline void __insert_between(list_t* node, list_t* prev, list_t* next) {
  // fprintf(stderr, "line %d: prev %p next %p\n", __LINE__, prev, next);
  // fprintf(stderr, "line %d: prev now %lx next %p\n", __LINE__, *((unsigned long *)prev), next);
  // fprintf(stderr, "line %d: prev->next %lx next %p\n", __LINE__, *((unsigned long *)((unsigned
  // long)prev + 0x8)), next);
  node->next = next;
  node->prev = prev;
  prev->next = node;
  next->prev = node;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
popq %rbp
retq
// File: UTSASRG[P]Guarder/./bibopheap.hh
// Function: BibopHeap::BibopObjCache::malloc()
void * malloc() {
					// TODO: change how this repopulation threshold is calculated
					// Ex: cache size = 256, half cache size = 128, bag size = 32MB (yes, very small);
					// only 64 objects exist in each 512KB class; thus, we would never reach the cache
					// allowance of used objects until something bad has happened (segfault, doubly-
					// allocated objects, etc.)   -- SAS
					if(_numUsedObjects > BIBOP_HALF_CACHE_SIZE) {
							// Pull in free objects from the free cache
							//PRDBG("out of objects in the cache; need to repopulate from free cache");
							repopulate();
					}

					//#pragma message "doReplacement turned off"
					//bool doReplacement = false;
					bool doReplacement = true;
					uintptr_t object = getRandomObject(doReplacement);

    			#ifdef USE_CANARY
					// We must install the canary prior to marking the object as in-use,
					// otherwise another thread performing neighbor checking could
					// identify the object as in-use, but will raise a false alarm
					// due to the missing canary value.
					char * canary = (char *)object + _classSize - 1;
					*canary = CANARY_SENTINEL;
    			#endif

					// Mark the object as in-use in the shadow memory
					if(!markObjectUsed(object)) {
							FATAL("object 0x%lx already set as in-use", object);
					}

					PRDBG("...returning object 0x%lx", object);
					return (void *)object;
			}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movl 0x2c(%rax), %eax
movq 0x71da(%rip), %rcx      # 0x10f18
movl 0x8(%rcx), %ecx
shrl %ecx
cmpl %ecx, %eax
jbe 0x9d50
movq -0x20(%rbp), %rdi
callq 0x5680
movq -0x20(%rbp), %rdi
movb $0x1, -0x9(%rbp)
movb -0x9(%rbp), %al
andb $0x1, %al
movzbl %al, %esi
callq 0x5840
movq -0x20(%rbp), %rdi
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rsi
callq 0x5700
testb $0x1, %al
jne 0x9de8
callq 0x52d0
movq %rax, -0x30(%rbp)
callq 0x5400
movq -0x30(%rbp), %rdi
movq %rax, %rcx
movq -0x18(%rbp), %rax
movl $0x1000, %esi           # imm = 0x1000
leaq 0x3001(%rip), %rdx      # 0xcda0
leaq 0x27bc(%rip), %r8       # 0xc562
movl $0x1ab, %r9d            # imm = 0x1AB
movq %rax, (%rsp)
movb $0x0, %al
callq 0x57e0
callq 0x52d0
movq %rax, -0x28(%rbp)
callq 0x52d0
movq %rax, %rdi
callq 0x51e0
movq -0x28(%rbp), %rsi
movq %rax, %rdx
movl $0x2, %edi
callq 0x5160
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x55b0
callq 0x52d0
movq %rax, -0x40(%rbp)
callq 0x5400
movq -0x40(%rbp), %rdi
movq %rax, %rcx
movq -0x18(%rbp), %rax
movl $0x1000, %esi           # imm = 0x1000
leaq 0x2fe1(%rip), %rdx      # 0xcdee
leaq 0x274e(%rip), %r8       # 0xc562
movl $0x1ae, %r9d            # imm = 0x1AE
movq %rax, (%rsp)
movb $0x0, %al
callq 0x57e0
callq 0x52d0
movq %rax, -0x38(%rbp)
callq 0x52d0
movq %rax, %rdi
callq 0x51e0
movq -0x38(%rbp), %rsi
movq %rax, %rdx
movl $0x2, %edi
callq 0x5160
movq -0x18(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: UTSASRG[P]Guarder/./bibopheap.hh
// Function: BibopHeap::BibopObjCache::markObjectUsed(unsigned long)
bool markObjectUsed(uintptr_t object) {
					shadowObjectInfo * shadowMemAddr = BibopHeap::getInstance().getShadowObjectInfo((void *)object);
					shadowObjectInfo oldSmValue = *shadowMemAddr;
					*shadowMemAddr = ALLOC_SENTINEL;

					return (oldSmValue == FREE_SENTINEL);
			}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
callq 0x5170
movq %rax, %rdi
movq -0x10(%rbp), %rsi
xorl %eax, %eax
movl %eax, %r8d
movq %r8, %rdx
movq %r8, %rcx
callq 0x58d0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movb (%rax), %al
movb %al, -0x19(%rbp)
movq -0x18(%rbp), %rax
movb $0x1, (%rax)
movsbl -0x19(%rbp), %eax
cmpl $0x0, %eax
sete %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: UTSASRG[P]Guarder/./bibopheap.hh
// Function: BibopHeap::BibopObjCache::initialPopulate()
void initialPopulate() {
					unsigned i;

					// Initialize each of the cache region object
					// counters to indicate a full buffer
					for(i = 0; i < NUM_CACHE_REGIONS; i++) {
							_regionCounters[i] = CACHE_REGION_SIZE;
					}

					// Initialize the cache with new objects from top of current subheap
					for(i = 0; i < BibopHeap::_cacheSize; i++) {
							_objects[i] = getNext();

							assert(_objects[i] != NULL);
					}

					// If we decide to place the object cache in mmap'd memory rather than
					// global memory we MUST ensure that unused entries are initialized to
					// zero
					for(i = BibopHeap::_cacheSize; i < BibopHeap::_cacheSize; i++) {
							_objects[i] = NULL;
					}
			}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x0, -0xc(%rbp)
cmpl $0x8, -0xc(%rbp)
jae 0xa9f4
movq -0x18(%rbp), %rax
movq 0x653c(%rip), %rcx      # 0x10f18
movl 0x8(%rcx), %edx
shrl $0x3, %edx
movl -0xc(%rbp), %ecx
movl %edx, 0x34(%rax,%rcx,4)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xa9cb
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq 0x656b(%rip), %rcx      # 0x10f70
cmpl (%rcx), %eax
jae 0xaa60
movq -0x18(%rbp), %rdi
movq (%rdi), %rax
callq *(%rax)
movq %rax, %rsi
movq -0x18(%rbp), %rax
movq 0x58(%rax), %rcx
movl -0xc(%rbp), %edx
movq %rsi, (%rcx,%rdx,8)
movq 0x58(%rax), %rax
movl -0xc(%rbp), %ecx
cmpq $0x0, (%rax,%rcx,8)
je 0xaa34
jmp 0xaa53
leaq 0x2946(%rip), %rdi      # 0xd381
leaq 0x1b20(%rip), %rsi      # 0xc562
movl $0x1c1, %edx            # imm = 0x1C1
leaq 0x2947(%rip), %rcx      # 0xd395
callq 0x5300
jmp 0xaa55
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xa9fb
movq 0x6509(%rip), %rax      # 0x10f70
movl (%rax), %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq 0x64fa(%rip), %rcx      # 0x10f70
cmpl (%rcx), %eax
jae 0xaa98
movq -0x18(%rbp), %rax
movq 0x58(%rax), %rax
movl -0xc(%rbp), %ecx
movq $0x0, (%rax,%rcx,8)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xaa6c
addq $0x20, %rsp
popq %rbp
retq
nop
// File: UTSASRG[P]Guarder/./hashmap.hh
// Function: HashMap<void*, BigHeap::bigObjectStatus*, HeapAllocator>::find(void* const&, unsigned long, BigHeap::bigObjectStatus**)
bool find(const KeyType& key, size_t keylen, ValueType* value) {
    assert(_initialized == true);
    size_t hindex = hashIndex(key, keylen);
    struct HashEntry* first = getHashEntry(hindex);
    struct Entry* entry = getEntry(first, key, keylen);
    bool isFound = false;

    if(entry) {
      *value = entry->value;
      isFound = true;
    }

    return isFound;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
movb (%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0xaeae
jmp 0xaecd
leaq 0x1dcb(%rip), %rdi      # 0xcc80
leaq 0x1dd9(%rip), %rsi      # 0xcc95
movl $0x8b, %edx
leaq 0x26ff(%rip), %rcx      # 0xd5c7
callq 0x5300
movq -0x48(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x54e0
movq -0x48(%rbp), %rdi
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rsi
callq 0x5770
movq -0x48(%rbp), %rdi
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rsi
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rcx
callq 0x5710
movq %rax, -0x38(%rbp)
movb $0x0, -0x39(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0xaf2a
movq -0x38(%rbp), %rax
movq 0x20(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movb $0x1, -0x39(%rbp)
movb -0x39(%rbp), %al
andb $0x1, %al
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop