LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/EnderGed[P]fast-random-walk/HelperFunctions.cpp
// Function: countSort2D(std::vector<unsigned int*, std::allocator<unsigned int*>>, unsigned long)
void countSort2D(std::vector<uint *> const lists, size_t const rows)
{
	// Determine maximum index
	uint const maxIndex = maxValue(lists[0], rows);

	// Allocate adjacency list
	read_t * const adj = prepareAdjList(lists[0], rows, maxIndex);

	uint * const arrCpy = (uint*)malloc(rows * sizeof(*arrCpy));
	if(!arrCpy) printError("Memory allocation failed");

	// Sort all lists (except the first one) with respect to values in first list
	for(size_t i = 1; i < lists.size(); ++i)
	{
		// Copy arr
		memcpy(arrCpy, lists[i], rows * sizeof(*arrCpy));

		// Move rows back to arr but to the correct position
		for(register size_t pos = 0; pos < rows; ++pos)
		{
			uint const targetRow = adj[lists[0][pos]];
			lists[i][targetRow] = arrCpy[pos];
			++adj[lists[0][pos]];
		}

		memmove(adj + 1, adj, (maxIndex + 1) * sizeof(*adj));
		adj[0] = 0;
	}

	// Sort the first list
	memcpy(arrCpy, lists[0], rows * sizeof(*arrCpy));

	for(register size_t pos = 0; pos < rows; ++pos)
	{
		uint const targetRow = adj[arrCpy[pos]];
		lists[0][targetRow] = arrCpy[pos];
		++adj[arrCpy[pos]];
	}

	// Clean up
	free(arrCpy);
	free(adj);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, 0x10(%rsp)
movq (%rdi), %rax
movq (%rax), %rdi
testq %rsi, %rsi
jle 0x3f67
leaq (%rdi,%rbx,4), %rax
xorl %ebp, %ebp
movq %rdi, %rcx
movl (%rcx), %edx
cmpl %ebp, %edx
cmoval %edx, %ebp
addq $0x4, %rcx
cmpq %rax, %rcx
jb 0x3f55
jmp 0x3f69
xorl %ebp, %ebp
movq %rbx, %rsi
movl %ebp, %edx
callq 0x3cc7
movq %rax, %r14
leaq (,%rbx,4), %rdi
movq %rdi, 0x8(%rsp)
callq 0x21f0
testq %rax, %rax
je 0x4092
movq %rax, %r12
movq 0x10(%rsp), %rax
movq (%rax), %r13
movq 0x8(%rax), %rax
subq %r13, %rax
cmpq $0x9, %rax
jb 0x403c
movq %r14, %rax
addq $0x8, %rax
movq %rax, 0x18(%rsp)
incl %ebp
shlq $0x3, %rbp
movl $0x1, %r15d
movq %rbp, 0x20(%rsp)
movq (%r13,%r15,8), %rbp
movq %r12, %rdi
movq %rbp, %rsi
movq 0x8(%rsp), %rdx
callq 0x2140
testq %rbx, %rbx
je 0x4008
movq (%r13), %rax
xorl %ecx, %ecx
movl (%rax,%rcx,4), %edx
movl (%r14,%rdx,8), %edx
movl (%r12,%rcx,4), %esi
movl %esi, (%rbp,%rdx,4)
movl (%rax,%rcx,4), %edx
incq (%r14,%rdx,8)
incq %rcx
cmpq %rcx, %rbx
jne 0x3fea
movq 0x18(%rsp), %rdi
movq %r14, %rsi
movq 0x20(%rsp), %rdx
callq 0x2270
movq $0x0, (%r14)
incq %r15
movq 0x10(%rsp), %rax
movq (%rax), %r13
movq 0x8(%rax), %rax
subq %r13, %rax
sarq $0x3, %rax
cmpq %rax, %r15
jb 0x3fca
movq (%r13), %r15
movq %r12, %rdi
movq %r15, %rsi
movq 0x8(%rsp), %rdx
callq 0x2140
testq %rbx, %rbx
je 0x4074
xorl %eax, %eax
movl (%r12,%rax,4), %ecx
movq (%r14,%rcx,8), %rdx
movl %edx, %esi
movl %ecx, (%r15,%rsi,4)
incq %rdx
movq %rdx, (%r14,%rcx,8)
incq %rax
cmpq %rax, %rbx
jne 0x4057
movq %r12, %rdi
callq 0x21d0
movq %r14, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x21d0
leaq 0x2125(%rip), %rdi      # 0x61be
callq 0x390d
// File: /workspace/github_cpp_makefile_star2_O3/EnderGed[P]fast-random-walk/WeightedGraph.cpp
// Function: WeightedGraph::WeightedGraph(WeightedGraph&&)
WeightedGraph::WeightedGraph(WeightedGraph && other) : Graph(other.numNodes, other.nodes, other.transitions), weights(other.weights)
{
	other.numNodes = 0;
	other.nodes = 0;
	other.transitions = 0;
	other.weights = 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl 0x8(%rsi), %esi
movq 0x10(%rbx), %rdx
movq 0x18(%rbx), %rcx
callq 0x243c
leaq 0x4c05(%rip), %rax      # 0x8d80
movq %rax, (%r14)
movq 0x20(%rbx), %rax
movq %rax, 0x20(%r14)
movl $0x0, 0x8(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movq $0x0, 0x20(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/EnderGed[P]fast-random-walk/WeightedGraph.cpp
// Function: WeightedGraph::doWalk(unsigned int, unsigned int, FastPRNG&, char*) const
size_t WeightedGraph::doWalk(uint node, uint32_t walk_len, FastPRNG & prng, char * const out) const
{
	// Write start node to output string
	char * outPos = out;

	{
		unsigned const wrote = writeInt(outPos, node);
		outPos += wrote;
	}

	while(--walk_len)
	{
		// Determine the number of outgoing transitions (from the current node)
		uint const outgoingTransitions = getNumTransitions(node);
		if(!outgoingTransitions)
		{
			fprintf(stderr, "Node %d has no outgoing transitions\n", node);
			break;
		}

		// Choose a successor node
		uint const accWeight = weights[nodes[node + 1] - 1];
		node = getNodeByWeight(node, prng.uniformInRange<uint>(accWeight - 1));

		// Write node number to output
		{
			*(outPos++) = ',';
			unsigned const wrote = writeInt(outPos, node);
			outPos += wrote;
		}
	}

	*outPos = '\0';

	return outPos - out;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r15
movl %edx, %ebp
movl %esi, %r13d
movq %rdi, %r12
movq %r8, %rdi
callq 0x3ab5
movl %eax, %r14d
movq %rbx, (%rsp)
addq %rbx, %r14
decl %ebp
je 0x4257
cmpl %r13d, 0x8(%r12)
jbe 0x423c
movq 0x10(%r12), %rcx
movl %r13d, %ebx
movq 0x8(%rcx,%rbx,8), %rax
cmpl (%rcx,%rbx,8), %eax
je 0x423c
movq 0x20(%r12), %rcx
movl -0x4(%rcx,%rax,4), %esi
decl %esi
movq %r15, %rdi
callq 0x3008
movq 0x10(%r12), %rdx
movq 0x20(%r12), %rcx
movl (%rdx,%rbx,8), %edx
movl %edx, %esi
incl %edx
cmpl %eax, (%rcx,%rsi,4)
jbe 0x4210
movq 0x18(%r12), %rax
movl (%rax,%rsi,4), %r13d
leaq 0x1(%r14), %rdi
movb $0x2c, (%r14)
movl %r13d, %esi
callq 0x3ab5
movl %eax, %eax
addq %rax, %r14
incq %r14
jmp 0x41cf
movq 0x4d9d(%rip), %rax      # 0x8fe0
movq (%rax), %rdi
leaq 0x1e13(%rip), %rsi      # 0x6060
movl %r13d, %edx
xorl %eax, %eax
callq 0x2220
movb $0x0, (%r14)
subq (%rsp), %r14
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/EnderGed[P]fast-random-walk/walk.cpp
// Function: readParam(int, char const* const*, char const*)
char const * readParam(int argc, char const * const * const argv, char const * argName)
{
	size_t const argLen = strlen(argName);

	//    --argName <value>
	// or --argName=<value>
	if(!strcmp(argv[0] + 2, argName))
	{
		if(argc > 1) return argv[1];
		else
		{
			printf("Missing argument for option %s\n\n", argName);
			printHelp();
			exit(1);
		}
	}
	else if(!strncmp(argv[0] + 2, argName, argLen) && argv[0][argLen + 2] == '=') return argv[0] + argLen + 3;

	// If argument not found ... return NULL
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movl %edi, %ebp
movq %rdx, %rdi
callq 0x20a0
movq %rax, %r14
movq (%r15), %r13
leaq 0x2(%r13), %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0x2210
testl %eax, %eax
je 0x56c7
movq %r12, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x20b0
testl %eax, %eax
je 0x56d2
xorl %eax, %eax
jmp 0x56e3
cmpl $0x2, %ebp
jl 0x56f2
movq 0x8(%r15), %rax
jmp 0x56e3
xorl %eax, %eax
cmpb $0x3d, 0x2(%r13,%r14)
leaq 0x3(%r13,%r14), %rcx
cmoveq %rcx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xcd8(%rip), %rdi       # 0x63d1
movq %rbx, %rsi
xorl %eax, %eax
callq 0x2040
callq 0x5712
movl $0x1, %edi
callq 0x21e0
// File: /workspace/github_cpp_makefile_star2_O3/EnderGed[P]fast-random-walk/walk.cpp
// Function: printHelp()
void printHelp()
{
	printf("Usage:\n");
	printf("walk [options]\n\n");
	printf("Options (mandatory):\n");
	printf("--if <input file>\n");
	printf("--of <output file>\n");
	printf("--length <walk length>\n");
	printf("--walks <number of walks>\n");
	printf("\n");
	printf("Options (optional):\n");
	printf("-o, --optiTransOrder: Optimize order of transitions\n");
	printf("-p, --print: Print graph\n");
	printf("-r, --reflect: Reflects all transitions (even if counterpart exists)\n");
	printf("-u, --undirected: Converts the graph to an undirected graph\n");
	printf("-w, --weighted: Runs walks on weighted graph\n");
}

// Assembly:
pushq %rax
leaq 0xcd8(%rip), %rdi       # 0x63f2
callq 0x2250
leaq 0xcd3(%rip), %rdi       # 0x63f9
callq 0x2250
leaq 0xcd7(%rip), %rdi       # 0x6409
callq 0x2250
leaq 0xce0(%rip), %rdi       # 0x641e
callq 0x2250
leaq 0xce6(%rip), %rdi       # 0x6430
callq 0x2250
leaq 0xced(%rip), %rdi       # 0x6443
callq 0x2250
leaq 0xcf8(%rip), %rdi       # 0x645a
callq 0x2250
movl $0xa, %edi
callq 0x2200
leaq 0xcfc(%rip), %rdi       # 0x6474
callq 0x2250
leaq 0xd04(%rip), %rdi       # 0x6488
callq 0x2250
leaq 0xd2c(%rip), %rdi       # 0x64bc
callq 0x2250
leaq 0xd39(%rip), %rdi       # 0x64d5
callq 0x2250
leaq 0xd72(%rip), %rdi       # 0x651a
callq 0x2250
leaq 0xda2(%rip), %rdi       # 0x6556
popq %rax
jmp 0x2250
// File: /workspace/github_cpp_makefile_star2_O3/EnderGed[P]fast-random-walk/walk.cpp
// Function: doWalk(Graph const&, unsigned int, unsigned int, unsigned int, unsigned int, Out&)
void doWalk(Graph const & graph, uint from, uint const to, uint32_t const walk_len, uint32_t const numWalks, Out &out)
{
	FastPRNG prng;

	// Malloc array for output string
	unsigned const maxDigits = hasDigits(graph.getNumNodes() - 1);
	char * const walk = (char *) malloc((maxDigits + 1) * sizeof(*walk) * walk_len);

	for(uint startNode = from; startNode < to; ++startNode) // For every assigned start node
	{
		// Ensure that the node really exists (has outgoing transitions)
		if(graph.getNumTransitions(startNode) == 0) continue;

		for(uint32_t i = 0; i < numWalks; ++i)
		{
			size_t out_len = graph.doWalk(startNode, walk_len, prng, walk);

			walk[out_len++] = '\n';

			// Write output string to file
			out.write(walk, out_len);
		}
	}

	free(walk);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x13b8, %rsp           # imm = 0x13B8
movq %r9, %rbx
movl %r8d, 0x8(%rsp)
movl %ecx, %r14d
movl %edx, %r13d
movl %esi, %ebp
movq %rdi, %r15
xorl %edi, %edi
callq 0x2150
leaq 0x20(%rsp), %rdi
movq %rax, %rsi
callq 0x58fc
movl 0x8(%r15), %eax
decl %eax
cvtsi2sd %rax, %xmm0
callq 0x20c0
callq 0x2060
cvttsd2si %xmm0, %rax
incl %eax
movl %r14d, %edi
imulq %rax, %rdi
callq 0x21f0
movq %rax, %r12
cmpl %r13d, %ebp
jae 0x58e1
movl %ebp, %ebp
movl %r13d, %esi
leaq 0x20(%rsp), %rcx
movq %rsi, 0x10(%rsp)
movl %r14d, 0xc(%rsp)
movl 0x8(%r15), %eax
cmpq %rax, %rbp
jae 0x58cf
movl 0x8(%rsp), %r13d
testl %r13d, %r13d
sete %al
movq 0x10(%r15), %r8
leaq 0x1(%rbp), %r9
movl 0x8(%r8,%rbp,8), %edx
cmpl (%r8,%rbp,8), %edx
sete %dl
orb %al, %dl
jne 0x58d5
movq %r9, 0x18(%rsp)
movq %rbx, %r14
movq (%r15), %rax
movq %r15, %rdi
movl %ebp, %esi
movl 0xc(%rsp), %edx
movq %rcx, %rbx
movq %r12, %r8
callq *0x10(%rax)
movb $0xa, (%r12,%rax)
leaq 0x1(%rax), %rdx
movq %r14, %rdi
movq %r12, %rsi
callq 0x5986
movq %rbx, %rcx
decl %r13d
jne 0x588f
movq 0x10(%rsp), %rsi
movq %r14, %rbx
movq 0x18(%rsp), %r9
jmp 0x58d5
incq %rbp
movq %rbp, %r9
movq %r9, %rbp
cmpq %rsi, %r9
jne 0x585b
movq %r12, %rdi
callq 0x21d0
addq $0x13b8, %rsp           # imm = 0x13B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/ef-gy[P]libefgy/include/ef.gy/json.h
// Function: efgy::json::value<long double>::clear()
void clear(void) {
    if (payload) {
      switch (type) {
        case object:
          delete ((objectType *)payload);
          break;
        case array:
          delete ((arrayType *)payload);
          break;
        case string:
          delete ((stringType *)payload);
          break;
        case number:
          delete ((numberType *)payload);
          break;
        case yes:
        case no:
        case null:
        case comma:
        case colon:
        case error:
        case endObject:
        case endArray:
          break;
      }
      payload = 0;
    }
    type = null;
  }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %r14
testq %r14, %r14
je 0x13683
movl (%rbx), %eax
cmpq $0x3, %rax
ja 0x1367b
leaq 0x4b66(%rip), %rcx      # 0x18188
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %r14, %rdi
callq 0x132aa
movl $0x30, %r15d
jmp 0x13670
movq (%r14), %rdi
leaq 0x10(%r14), %rax
movl $0x20, %r15d
cmpq %rax, %rdi
je 0x13670
movq (%rax), %rsi
incq %rsi
callq 0x4270
jmp 0x13670
movl $0x10, %r15d
jmp 0x13670
movq %r14, %rdi
callq 0x799c
movl $0x18, %r15d
movq %r14, %rdi
movq %r15, %rsi
callq 0x4270
movq $0x0, 0x8(%rbx)
movl $0x6, (%rbx)
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/ef-gy[P]libefgy/include/ef.gy/json.h
// Function: efgy::json::value<long double>::operator=(efgy::json::value<long double> const&)
value &operator=(const value &b) {
    clear();
    switch (b.type) {
      case object:
        toObject() = b.asObject();
        break;
      case array:
        toArray() = b.asArray();
        break;
      case string:
        toString() = b.asString();
        break;
      case number:
        toNumber() = b.asNumber();
        break;
      case yes:
      case no:
      case null:
      case comma:
      case colon:
      case error:
      case endObject:
      case endArray:
        type = b.type;
        break;
    }
    return *this;
  }

// Assembly:
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x13602
movl (%r14), %eax
cmpq $0xb, %rax
ja 0x136bd
leaq 0x4ae6(%rip), %rcx      # 0x18198
movslq (%rcx,%rax,4), %rdx
addq %rcx, %rdx
jmpq *%rdx
movl %eax, (%rbx)
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r14
retq
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x138c4
movq %rbx, %rdi
callq 0x13852
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0x4150
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x136bd
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4270
jmp 0x136bd
movq 0x8(%r14), %rax
fldt (%rax)
fstpt 0x3c(%rsp)
movq %rbx, %rdi
callq 0x13892
fldt 0x3c(%rsp)
fstpt (%rax)
jmp 0x136bd
movq 0x8(%r14), %rsi
leaq 0x8(%rsp), %rdi
callq 0x13b1c
movq %rbx, %rdi
callq 0x137ca
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0x13d84
leaq 0x8(%rsp), %rdi
callq 0x132aa
jmp 0x136bd
movq 0x8(%r14), %rsi
leaq 0x8(%rsp), %rdi
callq 0x1404c
movq %rbx, %rdi
callq 0x13816
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0x139c0
leaq 0x8(%rsp), %rdi
callq 0x799c
jmp 0x136bd
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x799c
jmp 0x137c1
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x132aa
jmp 0x137c1
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x137c1
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4270
movq %rbx, %rdi
callq 0x4440
nop
// File: /workspace/github_cpp_makefile_star2_O3/ef-gy[P]libefgy/include/ef.gy/json.h
// Function: efgy::json::value<long double>::toObject[abi:cxx11]()
objectType &toObject(void) {
    if (!isObject()) {
      clear();
      type = object;
      payload = new objectType();
    }
    return *((objectType *)payload);
  }

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpl $0x0, (%rdi)
je 0x1380f
movq %rbx, %rdi
callq 0x13602
movl $0x0, (%rbx)
movl $0x30, %edi
callq 0x4260
leaq 0x8(%rax), %rcx
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rax)
movaps %xmm0, (%rax)
movq %rcx, 0x18(%rax)
movq %rcx, 0x20(%rax)
movq $0x0, 0x28(%rax)
movq %rax, 0x8(%rbx)
jmp 0x13813
movq 0x8(%rbx), %rax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/ef-gy[P]libefgy/include/ef.gy/json.h
// Function: efgy::json::value<long double>::toArray()
arrayType &toArray(void) {
    if (!isArray()) {
      clear();
      type = array;
      payload = new arrayType();
    }
    return *((arrayType *)payload);
  }

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpl $0x1, (%rdi)
jne 0x13825
movq 0x8(%rbx), %rax
jmp 0x1384f
movq %rbx, %rdi
callq 0x13602
movl $0x1, (%rbx)
movl $0x18, %edi
callq 0x4260
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movq %rax, 0x8(%rbx)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/ef-gy[P]libefgy/include/ef.gy/json.h
// Function: efgy::json::value<long double>::toString[abi:cxx11]()
stringType &toString(void) {
    if (!isString()) {
      clear();
      type = string;
      payload = new stringType();
    }
    return *((stringType *)payload);
  }

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpl $0x2, (%rdi)
jne 0x13861
movq 0x8(%rbx), %rax
jmp 0x13890
movq %rbx, %rdi
callq 0x13602
movl $0x2, (%rbx)
movl $0x20, %edi
callq 0x4260
leaq 0x10(%rax), %rcx
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %rax, 0x8(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/ef-gy[P]libefgy/include/ef.gy/json.h
// Function: efgy::json::value<long double>::toNumber()
numberType &toNumber(void) {
    if (!isNumber()) {
      clear();
      type = number;
      payload = new numberType();
    }
    return *((numberType *)payload);
  }

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpl $0x3, (%rdi)
jne 0x138a1
movq 0x8(%rbx), %rax
jmp 0x138c1
movq %rbx, %rdi
callq 0x13602
movl $0x3, (%rbx)
movl $0x10, %edi
callq 0x4260
fldz
fstpt (%rax)
movq %rax, 0x8(%rbx)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/JainamS1996[P]Btree_DataStructure/final.cpp
// Function: go(Node*)
void go(Node *curNode) {
    if (!curNode->isleaf) {
        go(curNode->children.at(0));
    }
    else {
        while (curNode!=NULL) {
            for (int i = 0; i<curNode->record.size();i++)
                cout << get<0>(curNode->record.at(i))<<endl;
            curNode = curNode->next;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpb $0x0, 0x88(%rdi)
jne 0x2f85
movq 0x70(%rdi), %rax
cmpq %rax, 0x78(%rdi)
je 0x3020
movq (%rax), %rdi
cmpb $0x1, 0x88(%rdi)
jne 0x2f6b
movq 0x604c(%rip), %r12      # 0x8fd8
movabsq $-0x3333333333333333, %rbx # imm = 0xCCCCCCCCCCCCCCCD
movq 0x40(%rdi), %rax
cmpq %rax, 0x48(%rdi)
je 0x3008
movl $0x20, %r13d
xorl %r14d, %r14d
movq %rdi, -0x30(%rbp)
movsd (%rax,%r13), %xmm0
movq %r12, %rdi
callq 0x2280
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2190
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2100
movq -0x30(%rbp), %rdi
incq %r14
movq 0x40(%rdi), %rax
movq 0x48(%rdi), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
imulq %rbx, %rcx
addq $0x28, %r13
cmpq %r14, %rcx
ja 0x2fad
movq 0x30(%rdi), %rdi
testq %rdi, %rdi
jne 0x2f96
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x304e(%rip), %rdi      # 0x6075
xorl %esi, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x2250
// File: /workspace/github_cpp_makefile_star2_O3/JainamS1996[P]Btree_DataStructure/final.cpp
// Function: Node::Node(bool)
Node(bool leaf = true){
            nNodes = 0;
            parentNode = NULL;
            next = NULL;
            prev = NULL;
            greeting = "alive";
            isleaf = leaf ;
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %r15d
movq %rdi, %rbx
leaq 0x10(%rdi), %r12
movq %r12, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
leaq 0x40(%rdi), %r14
movl $0x0, 0x20(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rdi)
movups %xmm0, 0x38(%rdi)
movups %xmm0, 0x48(%rdi)
movups %xmm0, 0x58(%rdi)
movups %xmm0, 0x68(%rdi)
movups %xmm0, 0x78(%rdi)
leaq 0x1ec5(%rip), %rcx      # 0x6040
movl $0x5, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x2270
movb %r15b, 0x88(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
movq 0x70(%rbx), %rdi
testq %rdi, %rdi
je 0x41ab
callq 0x2180
movq 0x58(%rbx), %rdi
testq %rdi, %rdi
je 0x41b9
callq 0x2180
movq %r14, %rdi
callq 0x423a
movq (%rbx), %rdi
cmpq %r12, %rdi
je 0x41ce
callq 0x2180
movq %r15, %rdi
callq 0x22c0
// File: /workspace/github_cpp_makefile_star2_O3/estwings57[P]CasHMC/sources/BankState.cpp
// Function: CasHMC::operator<<(std::ostream&, CasHMC::BankState const&)
ostream &operator<<(ostream &out, const BankState &bs)
{
	switch(bs.currentBankState) {
		case IDLE:
			out<<"Idle";
			break;
		case ROW_ACTIVE:
			out<<"Actv";
			break;
		case PRECHARGING:
			out<<"Prch";
			break;
		case REFRESHING:
			out<<"Refr";
			break;
		case POWERDOWN:
			out<<"Pwdw";
			break;
		case AWAKING:
			out<<"Awak";
			break;
		default:
			ERROR(" (BS) == Error - Trying to print unknown kind of bank state");
			ERROR("         Type : "<<bs.currentBankState);
			exit(0);
	}
	return out;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl 0x4(%rsi), %eax
cmpq $0x6, %rax
jae 0x63fe
movq %rdi, %r14
leaq 0x29cb9(%rip), %rcx     # 0x30094
movslq (%rcx,%rax,4), %rsi
addq %rcx, %rsi
movl $0x4, %edx
callq 0x4340
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rsi, %rbx
movq 0x34be8(%rip), %r14     # 0x3aff0
leaq 0x29c13(%rip), %r15     # 0x30022
movq %r14, %rdi
movq %r15, %rsi
callq 0x42e0
leaq 0x29c0a(%rip), %r12     # 0x3002b
movq %rax, %rdi
movq %r12, %rsi
callq 0x42e0
leaq 0x2a464(%rip), %r13     # 0x30897
movq %rax, %rdi
movq %r13, %rsi
callq 0x42e0
movq %rax, %rdi
movl $0x3d, %esi
callq 0x4500
leaq 0x29bef(%rip), %rbp     # 0x30041
movq %rax, %rdi
movq %rbp, %rsi
callq 0x42e0
leaq 0x29be2(%rip), %rsi     # 0x30046
movq %rax, %rdi
callq 0x42e0
movq %rax, %rdi
callq 0x4170
movq %r14, %rdi
movq %r15, %rsi
callq 0x42e0
movq %rax, %rdi
movq %r12, %rsi
callq 0x42e0
movq %rax, %rdi
movq %r13, %rsi
callq 0x42e0
movq %rax, %rdi
movl $0x3e, %esi
callq 0x4500
movq %rax, %rdi
movq %rbp, %rsi
callq 0x42e0
leaq 0x29bce(%rip), %rsi     # 0x30082
movq %rax, %rdi
callq 0x42e0
movl 0x4(%rbx), %esi
movq %rax, %rdi
callq 0x4500
movq %rax, %rdi
callq 0x4170
xorl %edi, %edi
callq 0x4360
nop
// File: /workspace/github_cpp_makefile_star2_O3/estwings57[P]CasHMC/sources/CasHMCWrapper.cpp
// Function: CasHMC::CasHMCWrapper::ReceiveTran(CasHMC::TransactionType, unsigned long, unsigned int)
bool CasHMCWrapper::ReceiveTran(TransactionType tranType, uint64_t addr, unsigned size)
{
	Transaction *newTran = new Transaction(tranType, addr, size, this);

	if(hmcCont->ReceiveDown(newTran)) {
		DE_CR(ALI(18)<<" (BUS)"<<ALI(15)<<*newTran<<"Down) SENDING transaction to HMC controller (HC)");
		return true;
	}
	else {
		newTran->ReductGlobalID();
		delete newTran->trace;
		delete newTran;
		return false;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %ebp
movq %rdx, %r15
movl %esi, %r12d
movq %rdi, %rbx
movl $0x30, %edi
callq 0x42f0
movq %rax, %r14
movq %rax, %rdi
movl %r12d, %esi
movq %r15, %rdx
movl %ebp, %ecx
movq %rbx, %r8
callq 0x2b6d0
movq 0x330(%rbx), %rdi
movq %r14, %rsi
callq 0x13494
movl %eax, %ebx
testb %al, %al
je 0x112f4
leaq 0x2a28b(%rip), %rax     # 0x3b488
cmpb $0x1, (%rax)
jne 0x11323
movq 0x29dc3(%rip), %r15     # 0x3afd0
movq (%r15), %rax
movq -0x18(%rax), %rcx
movq $0x12, 0x10(%r15,%rcx)
movq -0x18(%rax), %rax
leaq (%r15,%rax), %r12
cmpb $0x0, 0xe1(%r15,%rax)
jne 0x11246
movq %r12, %rdi
movl $0x20, %esi
callq 0x42d0
movb $0x1, 0xe1(%r12)
movb $0x20, 0xe0(%r12)
leaq 0x1f6a2(%rip), %rsi     # 0x308f8
movl $0x6, %edx
movq %r15, %rdi
callq 0x4340
movq (%r15), %rax
movq -0x18(%rax), %rcx
movq $0xf, 0x10(%r15,%rcx)
movq -0x18(%rax), %rax
leaq (%r15,%rax), %r12
cmpb $0x0, 0xe1(%r15,%rax)
jne 0x1129c
movq %r12, %rdi
movl $0x20, %esi
callq 0x42d0
movb $0x1, 0xe1(%r12)
movb $0x20, 0xe0(%r12)
movq 0x29d24(%rip), %rdi     # 0x3afd0
movq %r14, %rsi
callq 0x2b744
movq %rax, %r14
leaq 0x1f641(%rip), %rsi     # 0x308ff
movl $0x30, %edx
movq %rax, %rdi
callq 0x4340
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x42d0
movsbl %al, %esi
movq %r14, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x41f0
jmp 0x11323
movq %r14, %rdi
callq 0x2b73a
movq 0x8(%r14), %r15
testq %r15, %r15
je 0x1130d
movq %r15, %rdi
callq 0x13542
movl $0x20, %esi
movq %r15, %rdi
callq 0x4300
movq (%r14), %rax
movq %r14, %rdi
callq *0x8(%rax)
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movl $0x30, %esi
movq %r14, %rdi
callq 0x4300
movq %rbx, %rdi
callq 0x4540
// File: /workspace/github_cpp_makefile_star2_O3/estwings57[P]CasHMC/sources/CasHMCWrapper.cpp
// Function: CasHMC::CasHMCWrapper::ReceiveTran(CasHMC::Transaction*)
bool CasHMCWrapper::ReceiveTran(Transaction *tran)
{
	if(hmcCont->ReceiveDown(tran)) {
		DE_CR(ALI(18)<<" (BUS)"<<ALI(15)<<*tran<<"Down) SENDING transaction to HMC controller (HC)");
		return true;
	}
	else {
		return false;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq 0x330(%rdi), %rdi
callq 0x13494
movl %eax, %ebx
testb %al, %al
je 0x11463
leaq 0x2a11a(%rip), %rax     # 0x3b488
cmpb $0x1, (%rax)
jne 0x11463
movq 0x29c52(%rip), %r15     # 0x3afd0
movq (%r15), %rax
movq -0x18(%rax), %rcx
movq $0x12, 0x10(%r15,%rcx)
movq -0x18(%rax), %rax
leaq (%r15,%rax), %r12
cmpb $0x0, 0xe1(%r15,%rax)
jne 0x113b7
movq %r12, %rdi
movl $0x20, %esi
callq 0x42d0
movb $0x1, 0xe1(%r12)
movb $0x20, 0xe0(%r12)
leaq 0x1f531(%rip), %rsi     # 0x308f8
movl $0x6, %edx
movq %r15, %rdi
callq 0x4340
movq (%r15), %rax
movq -0x18(%rax), %rcx
movq $0xf, 0x10(%r15,%rcx)
movq -0x18(%rax), %rax
leaq (%r15,%rax), %r12
cmpb $0x0, 0xe1(%r15,%rax)
jne 0x1140d
movq %r12, %rdi
movl $0x20, %esi
callq 0x42d0
movb $0x1, 0xe1(%r12)
movb $0x20, 0xe0(%r12)
movq 0x29bb3(%rip), %rdi     # 0x3afd0
movq %r14, %rsi
callq 0x2b744
movq %rax, %r14
leaq 0x1f4d0(%rip), %rsi     # 0x308ff
movl $0x30, %edx
movq %rax, %rdi
callq 0x4340
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x42d0
movsbl %al, %esi
movq %r14, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x41f0
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/estwings57[P]CasHMC/sources/DualVectorObject.h
// Function: CasHMC::DualVectorObject<CasHMC::Packet, CasHMC::Packet>::ReceiveDown(CasHMC::Packet*)
bool ReceiveDown(DownT *downEle) {
		if(downBuffers.size() + downEle->LNG <= downBufferMax) {
			if(downBuffers.size() == 0) {
				bufPopDelay = (bufPopDelay>0) ? bufPopDelay : 1;
			}
			downBuffers.push_back(downEle);
			//If receiving packet is packet, add virtual tail packet in Buffers as long as packet length
			if(sizeof(*downEle) == sizeof(Packet)) {
				for(int i=1; i<downEle->LNG; i++) {
					downBuffers.push_back(NULL);
				}
			}
			CallbackReceiveDown(downEle, true);
			return true;
		}
		else {
			CallbackReceiveDown(downEle, false);
			return false;
		}
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq %rsi, 0x8(%rsp)
movq 0x1d0(%rdi), %rdx
movq 0x1d8(%rdi), %rax
movq %rax, %r12
subq %rdx, %r12
sarq $0x3, %r12
movl 0x430(%rsi), %ecx
addq %rcx, %r12
movslq 0x1c8(%rdi), %r13
cmpq %r13, %r12
ja 0x1a1a6
cmpq %rdx, %rax
jne 0x1a189
movl 0x200(%rbx), %edx
cmpl $0x2, %edx
movl $0x1, %edi
cmovgel %edx, %edi
movl %edi, 0x200(%rbx)
leaq 0x1d0(%rbx), %r14
cmpq 0x1e0(%rbx), %rax
je 0x1a1b0
movq %rsi, (%rax)
addq $0x8, 0x1d8(%rbx)
jmp 0x1a1cc
movq (%rbx), %rax
movq %rbx, %rdi
xorl %edx, %edx
jmp 0x1a209
leaq 0x8(%rsp), %r15
movq %r14, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x1a462
movq (%r15), %rsi
movl 0x430(%rsi), %ecx
cmpl $0x2, %ecx
jb 0x1a1fe
movl $0x1, %ebp
leaq 0x10(%rsp), %r15
movq $0x0, 0x10(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x1a6e8
incl %ebp
movq 0x8(%rsp), %rsi
cmpl 0x430(%rsi), %ebp
jb 0x1a1db
movq (%rbx), %rax
movq %rbx, %rdi
movl $0x1, %edx
callq *0x18(%rax)
cmpq %r13, %r12
setbe %al
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/estwings57[P]CasHMC/sources/TranTrace.h
// Function: CasHMC::TranTrace::~TranTrace()
~TranTrace() {
		if(tranFullLat==0 || linkFullLat==0 || vaultFullLat==0) {
			ERROR(" (Trace) == Error - Full latency is '0'  (tranFullLat : "<<tranFullLat
					<<", linkFullLat : "<<linkFullLat<<", vaultFullLat : "<<vaultFullLat<<")");
			exit(0);
		}
		else {
			statis->UpdateStatis(tranFullLat, linkFullLat, vaultFullLat);
		}
	}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0xc(%rdi), %esi
testl %esi, %esi
je 0x1356e
movl 0x14(%rbx), %edx
testl %edx, %edx
je 0x1356e
movl 0x1c(%rbx), %ecx
testl %ecx, %ecx
je 0x1356e
movq (%rbx), %rdi
callq 0x13d26
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x27a7b(%rip), %rdi     # 0x3aff0
leaq 0x1caa6(%rip), %rsi     # 0x30022
movl $0x8, %edx
callq 0x4340
movq 0x27a63(%rip), %rdi     # 0x3aff0
leaq 0x1e334(%rip), %rsi     # 0x318c8
movl $0x13, %edx
callq 0x4340
movq 0x27a4b(%rip), %rdi     # 0x3aff0
leaq 0x1d2eb(%rip), %rsi     # 0x30897
movl $0x1, %edx
callq 0x4340
movq 0x27a33(%rip), %rdi     # 0x3aff0
movl $0x28, %esi
callq 0x4500
movq %rax, %r14
leaq 0x1ca70(%rip), %rsi     # 0x30041
movl $0x4, %edx
movq %rax, %rdi
callq 0x4340
leaq 0x1e2f7(%rip), %rsi     # 0x318dc
movl $0x38, %edx
movq %r14, %rdi
callq 0x4340
movl 0xc(%rbx), %esi
movq %r14, %rdi
callq 0x41e0
movq %rax, %r14
leaq 0x1dacc(%rip), %rsi     # 0x310d3
movl $0x10, %edx
movq %rax, %rdi
callq 0x4340
movl 0x14(%rbx), %esi
movq %r14, %rdi
callq 0x41e0
movq %rax, %r14
leaq 0x1dabb(%rip), %rsi     # 0x310e4
movl $0x11, %edx
movq %rax, %rdi
callq 0x4340
movl 0x1c(%rbx), %esi
movq %r14, %rdi
callq 0x41e0
movq %rax, %rbx
leaq 0x1fe96(%rip), %rsi     # 0x334e1
movl $0x1, %edx
movq %rax, %rdi
callq 0x4340
movq %rbx, %rdi
callq 0x4170
xorl %edi, %edi
callq 0x4360
movq %rax, %rdi
callq 0x13489
nop
// File: /workspace/github_cpp_makefile_star2_O3/estwings57[P]CasHMC/sources/TranStatistic.h
// Function: CasHMC::TranStatistic::UpdateStatis(unsigned int, unsigned int, unsigned int)
void UpdateStatis(unsigned tranFull, unsigned linkFull, unsigned vaultFull) {
		tranFullLat.push_back(tranFull);
		linkFullLat.push_back(linkFull);
		vaultFullLat.push_back(vaultFull);
		
		tranFullSum += tranFull;
		linkFullSum += linkFull;
		vaultFullSum += vaultFull;
	}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %ecx, %ebp
movl %edx, %r14d
movl %esi, %eax
movq %rdi, %rbx
movl %esi, 0x8(%rsp)
movl %edx, 0x4(%rsp)
movl %ecx, 0xc(%rsp)
movq 0x10(%rdi), %rsi
cmpq 0x18(%rdi), %rsi
je 0x13d5a
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x10(%rbx)
jmp 0x13d68
leaq 0x8(%rbx), %rdi
leaq 0x8(%rsp), %rdx
callq 0x13de0
movq 0x28(%rbx), %rsi
cmpq 0x30(%rbx), %rsi
je 0x13d7f
movl %r14d, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x28(%rbx)
jmp 0x13d8d
leaq 0x20(%rbx), %rdi
leaq 0x4(%rsp), %rdx
callq 0x13de0
movq 0x40(%rbx), %rsi
cmpq 0x48(%rbx), %rsi
je 0x13da3
movl %ebp, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x40(%rbx)
jmp 0x13db7
leaq 0x38(%rbx), %rdi
leaq 0xc(%rsp), %r14
movq %r14, %rdx
callq 0x13de0
movl (%r14), %ebp
movl 0x8(%rsp), %eax
addq %rax, 0x190(%rbx)
movl 0x4(%rsp), %eax
addq %rax, 0x198(%rbx)
movl %ebp, %eax
addq %rax, 0x1a0(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/estwings57[P]CasHMC/sources/CommandQueue.cpp
// Function: CasHMC::CommandQueue::~CommandQueue()
CommandQueue::~CommandQueue()
{
	for(int b=0; b<NUM_BANKS; b++) {
		ACCESSQUE(b).clear();
		if(!QUE_PER_BANK)	break;
	}
	atomicLock.clear();
	atomicLockTag.clear();
	bufPopDelayPerBank.clear();
	queue.clear();
	tFAWCountdown.clear();
	rowAccessCounter.clear();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x2613c(%rip), %rax     # 0x3a968
movq %rax, (%rdi)
leaq 0x26d4a(%rip), %rax     # 0x3b580
movslq (%rax), %rax
testq %rax, %rax
jle 0x14885
leaq 0x26d4b(%rip), %rcx     # 0x3b590
movb (%rcx), %cl
decq %rax
xorl %edx, %edx
movq 0x238(%rbx), %rsi
testb %cl, %cl
movl $0x0, %edi
cmovneq %rdx, %rdi
leaq (%rdi,%rdi,2), %r8
movq (%rsi,%r8,8), %rdi
cmpq %rdi, 0x8(%rsi,%r8,8)
je 0x14875
leaq (%rsi,%r8,8), %rsi
movq %rdi, 0x8(%rsi)
testb %cl, %cl
je 0x14885
leaq 0x1(%rdx), %rsi
cmpq %rdx, %rax
movq %rsi, %rdx
jne 0x1484c
movq 0x1e0(%rbx), %rcx
movq 0x208(%rbx), %rax
movq %rcx, 0x1f0(%rbx)
movl $0x0, 0x1f8(%rbx)
cmpq %rax, 0x210(%rbx)
je 0x148b4
movq %rax, 0x210(%rbx)
movq 0x220(%rbx), %rax
cmpq %rax, 0x228(%rbx)
je 0x148cb
movq %rax, 0x228(%rbx)
leaq 0x238(%rbx), %r14
movq 0x238(%rbx), %rsi
movq %r14, %rdi
callq 0x1782a
movq 0x250(%rbx), %rdi
cmpq %rdi, 0x258(%rbx)
je 0x148f8
movq %rdi, 0x258(%rbx)
movq 0x268(%rbx), %rax
cmpq %rax, 0x270(%rbx)
je 0x1490f
movq %rax, 0x270(%rbx)
testq %rax, %rax
je 0x1492d
movq 0x278(%rbx), %rsi
subq %rax, %rsi
movq %rax, %rdi
callq 0x4300
movq 0x250(%rbx), %rdi
testq %rdi, %rdi
je 0x14941
movq 0x260(%rbx), %rsi
subq %rdi, %rsi
callq 0x4300
movq %r14, %rdi
callq 0x174be
movq 0x220(%rbx), %rdi
testq %rdi, %rdi
je 0x14964
movq 0x230(%rbx), %rsi
subq %rdi, %rsi
callq 0x4300
leaq 0x1e0(%rbx), %r14
movq 0x208(%rbx), %rdi
testq %rdi, %rdi
je 0x14986
movq 0x218(%rbx), %rsi
subq %rdi, %rsi
callq 0x4300
movq %r14, %rdi
callq 0x175f4
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x175ae
movq %rax, %rdi
callq 0x13489
nop
// File: /workspace/github_cpp_makefile_star2_O3/estwings57[P]CasHMC/sources/CommandQueue.cpp
// Function: CasHMC::CommandQueue::AvailableSpace(unsigned int, unsigned int)
bool CommandQueue::AvailableSpace(unsigned bank, unsigned cmdN)
{
	if(atomicLock[bank]) {
		cmdN += 1;
	}
		
	if(ACCESSQUE(bank).size()+cmdN <= MAX_CMD_QUE) {
		return true;
	}
	else {
/*		if(QUE_PER_BANK) {
			classID.str( string() );	classID.clear();
			classID << bank;
			DEBUG(ALI(39)<<(header+"-"+classID.str()+")")<<"Down) Command queue FULL");
		}
		else {
			DEBUG(ALI(39)<<(header+")")<<"Down) Command queue FULL");
		}*/
		return false;
	}
}

// Assembly:
movl %esi, %eax
movl %esi, %ecx
shrl $0x6, %ecx
movq 0x1e0(%rdi), %r8
movq 0x238(%rdi), %rdi
movq (%r8,%rcx,8), %rcx
btq %rsi, %rcx
adcl $0x0, %edx
leaq 0x26bab(%rip), %rcx     # 0x3b590
xorl %esi, %esi
cmpb $0x0, (%rcx)
cmovneq %rax, %rsi
leaq (%rsi,%rsi,2), %rax
movq 0x8(%rdi,%rax,8), %rcx
subq (%rdi,%rax,8), %rcx
sarq $0x3, %rcx
addq %rcx, %rdx
leaq 0x26abf(%rip), %rax     # 0x3b4c8
movslq (%rax), %rax
cmpq %rax, %rdx
setbe %al
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/estwings57[P]CasHMC/sources/CommandQueue.cpp
// Function: CasHMC::CommandQueue::isEmpty()
bool CommandQueue::isEmpty()
{
	for(int b=0; b<NUM_BANKS; b++) {
		if(!ACCESSQUE(b).empty()) {
			return false;
		}
	}
	return true;
}

// Assembly:
leaq 0x24be5(%rip), %rax     # 0x3b580
movslq (%rax), %rax
testq %rax, %rax
jle 0x169b6
movq 0x238(%rdi), %rcx
movq (%rcx), %rdx
cmpq 0x8(%rcx), %rdx
je 0x169b9
xorl %eax, %eax
retq
movb $0x1, %al
retq
leaq 0x24bd0(%rip), %rdx     # 0x3b590
movb (%rdx), %dl
movl $0x1, %edi
movq %rdi, %rsi
cmpq %rdi, %rax
je 0x169ed
testb %dl, %dl
movl $0x0, %edi
cmovneq %rsi, %rdi
leaq (%rdi,%rdi,2), %r8
movq (%rcx,%r8,8), %r9
leaq 0x1(%rsi), %rdi
cmpq 0x8(%rcx,%r8,8), %r9
je 0x169c7
cmpq %rax, %rsi
setae %al
retq
// File: /workspace/github_cpp_makefile_star2_O3/estwings57[P]CasHMC/sources/CommandQueue.cpp
// Function: CasHMC::CommandQueue::Update()
void CommandQueue::Update()
{
	for(int b=0; b<NUM_BANKS; b++){
		POPCYCLE(b) = (POPCYCLE(b)>0) ? POPCYCLE(b)-1 : 0;
		if(!QUE_PER_BANK)	break;	
	}

	Step();
}

// Assembly:
leaq 0x24b85(%rip), %rcx     # 0x3b580
cmpl $0x0, (%rcx)
jle 0x16a47
leaq 0x24b89(%rip), %rax     # 0x3b590
movb (%rax), %dl
movq 0x220(%rdi), %rax
xorl %esi, %esi
xorl %r8d, %r8d
testb %dl, %dl
je 0x16a39
movl (%rax,%r8,4), %r9d
leal -0x1(%r9), %r10d
testl %r9d, %r9d
cmovlel %esi, %r10d
movl %r10d, (%rax,%r8,4)
incq %r8
movslq (%rcx), %r9
cmpq %r9, %r8
jl 0x16a15
jmp 0x16a47
movl (%rax), %ecx
leal -0x1(%rcx), %edx
xorl %esi, %esi
testl %ecx, %ecx
cmovgl %edx, %esi
movl %esi, (%rax)
incq 0x8(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O3/estwings57[P]CasHMC/sources/CrossbarSwitch.cpp
// Function: CasHMC::CrossbarSwitch::CrossbarSwitch(std::basic_ofstream<char, std::char_traits<char>>&, std::basic_ofstream<char, std::char_traits<char>>&)
CrossbarSwitch::CrossbarSwitch(ofstream &debugOut_, ofstream &stateOut_):
	DualVectorObject<Packet, Packet>(debugOut_, stateOut_, MAX_CROSS_BUF, MAX_CROSS_BUF)
{
	header = "        (CS)";
	
	inServiceLink = -1;

	downBufferDest = vector<DualVectorObject<Packet, Packet> *>(NUM_VAULTS, NULL);
	upBufferDest = vector<LinkMaster *>(NUM_LINKS, NULL);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
leaq 0x22d99(%rip), %rax     # 0x3b4c4
movl (%rax), %ecx
movl %ecx, %r8d
callq 0x19d96
leaq 0x222a4(%rip), %rax     # 0x3a9e0
movq %rax, (%rbx)
leaq 0x20(%rbx), %rdi
xorps %xmm0, %xmm0
movups %xmm0, 0x208(%rbx)
movups %xmm0, 0x218(%rbx)
movups %xmm0, 0x228(%rbx)
movups %xmm0, 0x240(%rbx)
movups %xmm0, 0x250(%rbx)
movups %xmm0, 0x260(%rbx)
movq 0x28(%rbx), %rdx
leaq 0x196ad(%rip), %rcx     # 0x31e28
movl $0xc, %r8d
xorl %esi, %esi
callq 0x4440
movl $0xffffffff, 0x238(%rbx) # imm = 0xFFFFFFFF
leaq 0x22de3(%rip), %rax     # 0x3b57c
movslq (%rax), %rsi
leaq 0x28(%rsp), %rdx
movq $0x0, (%rdx)
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rcx
callq 0x19e4c
movq 0x208(%rbx), %rdi
movq 0x218(%rbx), %rsi
movaps 0x10(%rsp), %xmm0
movups %xmm0, 0x208(%rbx)
movq 0x20(%rsp), %rax
movq %rax, 0x218(%rbx)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
testq %rdi, %rdi
je 0x18812
subq %rdi, %rsi
callq 0x4300
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x18812
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x4300
leaq 0x22c8f(%rip), %rax     # 0x3b4a8
movslq (%rax), %rsi
leaq 0x28(%rsp), %rdx
movq $0x0, (%rdx)
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rcx
callq 0x19f7a
movq 0x220(%rbx), %rdi
movq 0x230(%rbx), %rsi
movaps 0x10(%rsp), %xmm0
movups %xmm0, 0x220(%rbx)
movq 0x20(%rsp), %rax
movq %rax, 0x230(%rbx)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
testq %rdi, %rdi
je 0x18892
subq %rdi, %rsi
callq 0x4300
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x18892
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x4300
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x188a0
jmp 0x188a0
movq %rax, %r14
leaq 0x240(%rbx), %r15
movq 0x258(%rbx), %rdi
testq %rdi, %rdi
je 0x188c5
movq 0x268(%rbx), %rsi
subq %rdi, %rsi
callq 0x4300
movq (%r15), %rdi
testq %rdi, %rdi
je 0x188dc
movq 0x250(%rbx), %rsi
subq %rdi, %rsi
callq 0x4300
leaq 0x208(%rbx), %r15
movq 0x220(%rbx), %rdi
testq %rdi, %rdi
je 0x188fe
movq 0x230(%rbx), %rsi
subq %rdi, %rsi
callq 0x4300
movq (%r15), %rdi
testq %rdi, %rdi
je 0x18915
movq 0x218(%rbx), %rsi
subq %rdi, %rsi
callq 0x4300
movq %rbx, %rdi
callq 0x1a396
movq %r14, %rdi
callq 0x4540
nop
// File: /workspace/github_cpp_makefile_star2_O3/estwings57[P]CasHMC/sources/CrossbarSwitch.cpp
// Function: CasHMC::CrossbarSwitch::~CrossbarSwitch()
CrossbarSwitch::~CrossbarSwitch()
{	
	downBufferDest.clear();
	upBufferDest.clear();
	pendingSegTag.clear(); 
	pendingSegPacket.clear(); 
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x220af(%rip), %rax     # 0x3a9e0
movq %rax, (%rdi)
movq 0x208(%rdi), %rax
cmpq %rax, 0x210(%rdi)
je 0x1894b
movq %rax, 0x210(%rbx)
movq 0x220(%rbx), %rax
cmpq %rax, 0x228(%rbx)
je 0x18962
movq %rax, 0x228(%rbx)
movq 0x240(%rbx), %rdi
cmpq %rdi, 0x248(%rbx)
je 0x18979
movq %rdi, 0x248(%rbx)
movq 0x258(%rbx), %rax
cmpq %rax, 0x260(%rbx)
je 0x18990
movq %rax, 0x260(%rbx)
testq %rax, %rax
je 0x189ae
movq 0x268(%rbx), %rsi
subq %rax, %rsi
movq %rax, %rdi
callq 0x4300
movq 0x240(%rbx), %rdi
testq %rdi, %rdi
je 0x189c2
movq 0x250(%rbx), %rsi
subq %rdi, %rsi
callq 0x4300
movq 0x220(%rbx), %rdi
testq %rdi, %rdi
je 0x189dd
movq 0x230(%rbx), %rsi
subq %rdi, %rsi
callq 0x4300
movq 0x208(%rbx), %rdi
testq %rdi, %rdi
je 0x189f8
movq 0x218(%rbx), %rsi
subq %rdi, %rsi
callq 0x4300
movq %rbx, %rdi
popq %rbx
jmp 0x1a396
nop
// File: /workspace/github_cpp_makefile_star2_O3/estwings57[P]CasHMC/sources/SingleVectorObject.h
// Function: CasHMC::SingleVectorObject<CasHMC::Packet>::Receive(CasHMC::Packet*)
bool Receive(BufT *ele) {
		if(Buffers.size() + ele->LNG <= bufferMax) {
			Buffers.push_back(ele);
			//If receiving packet is packet, add virtual tail packet in Buffers as long as packet length
			if(sizeof(*ele) == sizeof(Packet)) {
				for(int i=1; i<ele->LNG; i++) {
					Buffers.push_back(NULL);
				}
			}
			CallbackReceive(ele, true);
			return true;
		}
		else {
			CallbackReceive(ele, false);
			return false;
		}
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq %rsi, 0x8(%rsp)
movq 0x1d8(%rdi), %rax
movq %rax, %r12
subq 0x1d0(%rdi), %r12
sarq $0x3, %r12
movl 0x430(%rsi), %ecx
addq %rcx, %r12
movslq 0x1c8(%rdi), %r13
cmpq %r13, %r12
ja 0x1a27f
leaq 0x1d0(%rbx), %r14
cmpq 0x1e0(%rbx), %rax
je 0x1a289
movq %rsi, (%rax)
addq $0x8, 0x1d8(%rbx)
jmp 0x1a2a5
movq (%rbx), %rax
movq %rbx, %rdi
xorl %edx, %edx
jmp 0x1a2e2
leaq 0x8(%rsp), %r15
movq %r14, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x1a462
movq (%r15), %rsi
movl 0x430(%rsi), %ecx
cmpl $0x2, %ecx
jb 0x1a2d7
movl $0x1, %ebp
leaq 0x10(%rsp), %r15
movq $0x0, 0x10(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x1a6e8
incl %ebp
movq 0x8(%rsp), %rsi
cmpl 0x430(%rsi), %ebp
jb 0x1a2b4
movq (%rbx), %rax
movq %rbx, %rdi
movl $0x1, %edx
callq *0x18(%rax)
cmpq %r13, %r12
setbe %al
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/estwings57[P]CasHMC/sources/DRAM.cpp
// Function: CasHMC::DRAM::~DRAM()
DRAM::~DRAM()
{
	for(int i=0; i<readReturnDATA.size(); i++) {
		delete readReturnDATA[i];
	}
	readReturnDATA.clear();
	readReturnCountdown.clear();
	
	for(int b=0; b<NUM_BANKS; b++) {
		delete bankStates[b];
	}
	bankStates.clear();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x2000f(%rip), %rax     # 0x3aa80
movq %rax, (%rdi)
movq 0x218(%rdi), %rax
movq 0x220(%rdi), %rcx
cmpq %rax, %rcx
je 0x1aab9
xorl %r14d, %r14d
movq (%rax,%r14,8), %rdi
testq %rdi, %rdi
je 0x1aaa7
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x218(%rbx), %rax
movq 0x220(%rbx), %rcx
incq %r14
movq %rcx, %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq %r14, %rdx
ja 0x1aa8a
cmpq %rax, %rcx
je 0x1aac5
movq %rax, 0x220(%rbx)
movq 0x230(%rbx), %rax
cmpq %rax, 0x238(%rbx)
je 0x1aadc
movq %rax, 0x238(%rbx)
leaq 0x20a9d(%rip), %r14     # 0x3b580
cmpl $0x0, (%r14)
jle 0x1ab0c
xorl %r15d, %r15d
movq 0x1d8(%rbx), %rax
movq (%rax,%r15,8), %rdi
movl $0x40, %esi
callq 0x4300
incq %r15
movslq (%r14), %rax
cmpq %rax, %r15
jl 0x1aaec
movq 0x1d8(%rbx), %rax
cmpq %rax, 0x1e0(%rbx)
je 0x1ab23
movq %rax, 0x1e0(%rbx)
movq 0x230(%rbx), %rdi
testq %rdi, %rdi
je 0x1ab3e
movq 0x240(%rbx), %rsi
subq %rdi, %rsi
callq 0x4300
movq 0x218(%rbx), %rdi
testq %rdi, %rdi
je 0x1ab59
movq 0x228(%rbx), %rsi
subq %rdi, %rsi
callq 0x4300
movq 0x1f0(%rbx), %rdi
testq %rdi, %rdi
je 0x1ab74
movq 0x200(%rbx), %rsi
subq %rdi, %rsi
callq 0x4300
movq 0x1d8(%rbx), %rdi
testq %rdi, %rdi
je 0x1ab8f
movq 0x1e8(%rbx), %rsi
subq %rdi, %rsi
callq 0x4300
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x175ae
// File: /workspace/github_cpp_makefile_star2_O3/estwings57[P]CasHMC/sources/DRAM.cpp
// Function: CasHMC::DRAM::powerDown()
bool DRAM::powerDown()
{
	//check to make sure all banks are idle
	bool allIdle = true;
	for(int b=0; b<NUM_BANKS; b++) {
		if(bankStates[b]->currentBankState != IDLE) {
			allIdle = false;
			break;
		}
	}
	if(allIdle) {
		for(int b=0; b<NUM_BANKS; b++) {
			bankStates[b]->currentBankState = POWERDOWN;
			bankStates[b]->nextPowerUp = currentClockCycle + tCKE;
		}
		return true;
	}
	else {
		return false;
	}
}

// Assembly:
leaq 0x1fbd9(%rip), %rax     # 0x3b580
movslq (%rax), %rcx
movb $0x1, %al
testq %rcx, %rcx
jle 0x1b9c3
movq 0x1d8(%rdi), %rdx
movq (%rdx), %rsi
cmpl $0x0, 0x4(%rsi)
je 0x1b9c4
xorl %eax, %eax
retq
leaq -0x1(%rcx), %r8
xorl %esi, %esi
cmpq %rsi, %r8
je 0x1b9e5
movq 0x8(%rdx,%rsi,8), %r9
incq %rsi
cmpl $0x0, 0x4(%r9)
je 0x1b9ca
cmpq %rcx, %rsi
setae %al
retq
movq 0x1d8(%rdi), %rdx
leaq 0x1fbf1(%rip), %rsi     # 0x3b5e4
movl (%rsi), %esi
addq 0x8(%rdi), %rsi
xorl %edi, %edi
movq (%rdx,%rdi,8), %r8
movl $0x4, 0x4(%r8)
movq %rsi, 0x30(%r8)
incq %rdi
cmpq %rdi, %rcx
jne 0x1b9fb
jmp 0x1b9c3
nop
// File: /workspace/github_cpp_makefile_star2_O3/estwings57[P]CasHMC/sources/DRAM.cpp
// Function: CasHMC::DRAM::powerUp()
void DRAM::powerUp()
{
	for(int b=0; b<NUM_BANKS; b++) {
		bankStates[b]->lastCommand = POWERDOWN_EXIT;
		bankStates[b]->currentBankState = AWAKING;
		bankStates[b]->stateChangeCountdown = tXP;
		bankStates[b]->nextActivate = currentClockCycle + tXP;
	}
	DEBUG(ALI(39)<<header<<"AWAKE DRAM power down mode   nextActivate time : "<<bankStates[0]->nextActivate);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x1fb5c(%rip), %rax     # 0x3b580
movslq (%rax), %rax
testq %rax, %rax
jle 0x1ba69
movq 0x1d8(%rbx), %rcx
leaq 0x1fbae(%rip), %rdx     # 0x3b5e8
movl (%rdx), %edx
movq %rdx, %rsi
addq 0x8(%rbx), %rsi
xorl %edi, %edi
movq (%rcx,%rdi,8), %r8
movl $0xa, 0x38(%r8)
movl $0x5, 0x4(%r8)
movl %edx, 0x3c(%r8)
movq %rsi, 0x10(%r8)
incq %rdi
cmpq %rdi, %rax
jne 0x1ba45
leaq 0x1fa18(%rip), %rax     # 0x3b488
cmpb $0x0, (%rax)
je 0x1ba81
leaq 0x1fa0d(%rip), %rax     # 0x3b489
cmpb $0x0, (%rax)
je 0x1ba89
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x1f540(%rip), %rax     # 0x3afd0
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
movq $0x27, 0x10(%rax,%rdx)
movq -0x18(%rcx), %rcx
leaq (%rax,%rcx), %r14
cmpb $0x0, 0xe1(%rax,%rcx)
jne 0x1bac7
movq %r14, %rdi
movl $0x20, %esi
callq 0x42d0
movb $0x1, 0xe1(%r14)
movb $0x20, 0xe0(%r14)
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rdx
movq 0x1f4f2(%rip), %rdi     # 0x3afd0
callq 0x4340
movq %rax, %r14
leaq 0x16621(%rip), %rsi     # 0x3210e
movl $0x31, %edx
movq %rax, %rdi
callq 0x4340
movq 0x1d8(%rbx), %rax
movq (%rax), %rax
movq 0x10(%rax), %rsi
movq %r14, %rdi
callq 0x41e0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x42d0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4040
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x41f0
nop
// File: /workspace/github_cpp_makefile_star2_O3/estwings57[P]CasHMC/sources/DRAM.cpp
// Function: CasHMC::DRAM::Update()
void DRAM::Update()
{
	//update bank states
	for(int b=0; b<NUM_BANKS; b++) {
		if(bankStates[b]->stateChangeCountdown>0) {
			//decrement counters
			bankStates[b]->stateChangeCountdown--;

			//if counter has reached 0, change state
			if(bankStates[b]->stateChangeCountdown == 0) {
				switch(bankStates[b]->lastCommand) {
					//only these commands have an implicit state change
					case WRITE_P:
					case READ_P:
						bankStates[b]->currentBankState = PRECHARGING;
						bankStates[b]->lastCommand = PRECHARGE;
						bankStates[b]->stateChangeCountdown = tRP;
						break;
					case REFRESH:
					case PRECHARGE:
					case POWERDOWN_EXIT:
						bankStates[b]->currentBankState = IDLE;
						break;
					default:
						break;
				}
			}
		}
	}
	
	UpdateState();
	Step();
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x1fa33(%rip), %rax     # 0x3b580
movslq (%rax), %rax
testq %rax, %rax
jle 0x1bbc4
movq 0x1d8(%rbx), %rcx
leaq 0x1fa61(%rip), %rdx     # 0x3b5c4
movl (%rdx), %edx
xorl %esi, %esi
movl $0x580, %edi            # imm = 0x580
movl $0x14, %r8d
movq (%rcx,%rsi,8), %r9
movl 0x3c(%r9), %r10d
testl %r10d, %r10d
je 0x1bbbc
decl %r10d
movl %r10d, 0x3c(%r9)
jne 0x1bbbc
movl 0x38(%r9), %r10d
cmpl $0xa, %r10d
ja 0x1bbbc
btl %r10d, %edi
jae 0x1bba2
movl $0x0, 0x4(%r9)
jmp 0x1bbbc
btl %r10d, %r8d
jae 0x1bbbc
movl $0x2, 0x4(%r9)
movl $0x7, 0x38(%r9)
movl %edx, 0x3c(%r9)
incq %rsi
cmpq %rsi, %rax
jne 0x1bb72
movq %rbx, %rdi
callq 0x1bbd2
incq 0x8(%rbx)
popq %rbx
retq