LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/supragya[P]DirectorySync/DirectorySync.cpp
// Function: TransactionHistory_t::is_recorded(message)
bool is_recorded(message m){
        mtx.lock();
        bool FoundRecord = false;
        // Pass 1: Hard
        for(int i=0; i<MAXTRANSACTIONS; i++){
            if(!ValidTransactionHistory[i])
                continue;
            if( strcmp(m.FileName, TransactionHistory[i].FileName) == 0 &&
                m.FType == TransactionHistory[i].FType &&
                m.FileSize == TransactionHistory[i].FileSize &&
                m.FCType == TransactionHistory[i].FCType){
                    FoundRecord = true;
                    ValidTransactionHistory[i] = false;
                    break;
            }
        }
        // Pass 2: Soft
        if(!FoundRecord){
            for(int i=0; i<MAXTRANSACTIONS; i++){
                if(!ValidTransactionHistory[i])
                    continue;
                if( strcmp(m.FileName, TransactionHistory[i].FileName) == 0 &&
                    m.FType == TransactionHistory[i].FType ){
                    FoundRecord = true;
                    break;
                }
            }
        }
        mtx.unlock();
        return FoundRecord;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r13
addq $0x19068, %rdi          # imm = 0x19068
movq %rdi, -0x38(%rbp)
callq 0x394e
leaq 0x14(%rbp), %r15
movl 0x3e8(%r15), %eax
movl %eax, -0x30(%rbp)
movl 0x3ec(%r15), %eax
movl %eax, -0x2c(%rbp)
movq 0x3f4(%r15), %rax
movq %rax, -0x40(%rbp)
leaq 0x6c(%r13), %r12
xorl %ebx, %ebx
movq %r13, %r14
cmpq $0x19000, %rbx          # imm = 0x19000
je 0x3a11
cmpb $0x1, (%r14)
jne 0x3a05
leaq (%r12,%rbx), %rsi
movq %r15, %rdi
callq 0x2220
testl %eax, %eax
jne 0x3a05
movl -0x2c(%rbp), %eax
cmpl 0x458(%r13,%rbx), %eax
jne 0x3a05
movq -0x40(%rbp), %rax
cmpq 0x460(%r13,%rbx), %rax
jne 0x3a05
movl -0x30(%rbp), %eax
cmpl 0x454(%r13,%rbx), %eax
je 0x3a53
incq %r14
addq $0x400, %rbx            # imm = 0x400
jmp 0x39be
leaq 0x458(%r13), %rbx
xorl %r14d, %r14d
cmpq $0x64, %r14
setne %r12b
je 0x3a5a
cmpb $0x1, (%r13,%r14)
jne 0x3a47
leaq -0x3ec(%rbx), %rsi
movq %r15, %rdi
callq 0x2220
testl %eax, %eax
jne 0x3a47
movl -0x2c(%rbp), %eax
cmpl (%rbx), %eax
je 0x3a5a
incq %r14
addq $0x400, %rbx            # imm = 0x400
jmp 0x3a1b
movb $0x0, (%r14)
movb $0x1, %r12b
movq -0x38(%rbp), %rdi
callq 0x2120
movl %r12d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/DimitriFourny[P]uaf_replacer/main.cc
// Function: map_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long&)
char* map_file(const std::string& filepath, size_t& filesize) {
  FILE* hfile = fopen(filepath.c_str(), "rb");
  if (!hfile) {
    fprintf(stderr, "ERR: Failed to open '%s'\n", filepath.c_str());
    return nullptr;
  }

  fseek(hfile, 0, SEEK_END);
  filesize = ftell(hfile);
  fseek(hfile, 0, SEEK_SET);

  char* memfile = reinterpret_cast<char*>(malloc(filesize+1));
  size_t nb_read = fread(memfile, filesize, 1, hfile);
  fclose(hfile);
  if (nb_read != 1) {
    fprintf(stderr, "ERR: Failed to read '%s'\n", filepath.c_str());
    return nullptr;
  }

  return reinterpret_cast<char*>(memfile);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
movq (%rdi), %rdi
leaq 0x3c84(%rip), %rsi      # 0x6058
callq 0x2190
testq %rax, %rax
je 0x2446
movq %rax, %r14
pushq $0x2
popq %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0x2160
movq %r14, %rdi
callq 0x2030
movq %rax, (%r15)
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2160
movq (%r15), %r12
leaq 0x1(%r12), %rdi
callq 0x21d0
movq %rax, %r15
pushq $0x1
popq %rdx
movq %rax, %rdi
movq %r12, %rsi
movq %r14, %rcx
callq 0x2200
movq %rax, %r12
movq %r14, %rdi
callq 0x2120
cmpq $0x1, %r12
jne 0x244f
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x3c0e(%rip), %rsi      # 0x605b
jmp 0x2456
leaq 0x3c1f(%rip), %rsi      # 0x6075
movq 0x9b7b(%rip), %rax      # 0xbfd8
movq (%rax), %rdi
movq (%rbx), %rdx
xorl %r15d, %r15d
xorl %eax, %eax
callq 0x21e0
jmp 0x2437
// File: /workspace/github_cpp_makefile_star2_O2/DimitriFourny[P]uaf_replacer/main.cc
// Function: dump_parent(rapidjson::GenericDocument<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>, rapidjson::CrtAllocator> const&, char const*, unsigned long, unsigned int)
void dump_parent(const rapidjson::Document& document, const char* parent_id, 
                 uint64_t base_offset, unsigned int deep_size) {
  printf("    +0x%-3lx ", base_offset);
  for (size_t j = 0; j < deep_size; j++) {
    printf("    ");
  }

  if (!document.HasMember(parent_id) || 
      !document[parent_id].HasMember("name")) {
    printf(": unknown_parent\n");
    return;
  }

  const char* type = "";
  if (document[parent_id].HasMember("type")) {
    type = document[parent_id]["type"].GetString();
  }

  printf(": %s %s\n", type, document[parent_id]["name"].GetString());

  if (document[parent_id].HasMember("members")) {
    dump_members(document, document[parent_id], document[parent_id]["members"],
      base_offset, deep_size+1);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebx
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
leaq 0x3288(%rip), %rdi      # 0x60d2
movq %rdx, %rsi
xorl %eax, %eax
callq 0x2050
movl %ebx, %ebp
leaq 0x3283(%rip), %r13      # 0x60e0
subq $0x1, %rbp
jb 0x2e6f
movq %r13, %rdi
xorl %eax, %eax
callq 0x2050
jmp 0x2e5d
movq %r15, %rdi
movq %r12, %rsi
callq 0x37c6
testb %al, %al
je 0x2ee1
movq %r15, %rdi
movq %r12, %rsi
callq 0x3ef6
leaq 0x3201(%rip), %rsi      # 0x6091
movq %rax, %rdi
callq 0x37c6
testb %al, %al
je 0x2ee1
movq %r15, %rdi
movq %r12, %rsi
callq 0x3ef6
leaq 0x31e8(%rip), %rsi      # 0x6096
movq %rax, %rdi
callq 0x37c6
testb %al, %al
je 0x2efb
movq %r15, %rdi
movq %r12, %rsi
callq 0x3ef6
leaq 0x31ca(%rip), %rsi      # 0x6096
movq %rax, %rdi
callq 0x3ef6
movq %rax, %rdi
callq 0x37ec
movq %rax, %r13
jmp 0x2f02
leaq 0x55ca(%rip), %rdi      # 0x84b2
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2220
leaq 0x318c(%rip), %r13      # 0x608e
movq %r15, %rdi
movq %r12, %rsi
callq 0x3ef6
leaq 0x317d(%rip), %rsi      # 0x6091
movq %rax, %rdi
callq 0x3ef6
movq %rax, %rdi
callq 0x37ec
leaq 0x31c2(%rip), %rdi      # 0x60ed
movq %r13, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x2050
movq %r15, %rdi
movq %r12, %rsi
callq 0x3ef6
leaq 0x319b(%rip), %rsi      # 0x60e5
movq %rax, %rdi
callq 0x37c6
testb %al, %al
je 0x2fa2
movq %r15, %rdi
movq %r12, %rsi
callq 0x3ef6
movq %rax, %r13
movq %r15, %rdi
movq %r12, %rsi
callq 0x3ef6
leaq 0x316f(%rip), %rsi      # 0x60e5
movq %rax, %rdi
callq 0x3ef6
incl %ebx
movq %r15, %rdi
movq %r13, %rsi
movq %rax, %rdx
movq %r14, %rcx
movl %ebx, %r8d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2a86
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/SNUCSE-CTA[P]GI/src/program.cpp
// Function: printExample()
void printExample() 
{
	cout << "*******************************" << endl;
	cout << "iGraph format example: Triangle" << endl;
	cout << "*******************************" << endl;
	cout << "t 0 3" << endl;
	cout << "v 0 20" << endl;
	cout << "v 0 10" << endl;
	cout << "v 0 14" << endl;
	cout << "e 0 1 0" << endl;
	cout << "e 0 2 0" << endl;
	cout << "e 1 2 0" << endl;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0xd7fd(%rip), %rbx      # 0xffd0
leaq 0x892b(%rip), %r14      # 0xb105
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2170
movq %rax, %rdi
callq 0x20e0
leaq 0x8931(%rip), %rsi      # 0xb125
movq %rbx, %rdi
callq 0x2170
movq %rax, %rdi
callq 0x20e0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2170
movq %rax, %rdi
callq 0x20e0
leaq 0x8927(%rip), %rsi      # 0xb145
movq %rbx, %rdi
callq 0x2170
movq %rax, %rdi
callq 0x20e0
leaq 0x8916(%rip), %rsi      # 0xb14b
movq %rbx, %rdi
callq 0x2170
movq %rax, %rdi
callq 0x20e0
leaq 0x8906(%rip), %rsi      # 0xb152
movq %rbx, %rdi
callq 0x2170
movq %rax, %rdi
callq 0x20e0
leaq 0x88f6(%rip), %rsi      # 0xb159
movq %rbx, %rdi
callq 0x2170
movq %rax, %rdi
callq 0x20e0
leaq 0x88e6(%rip), %rsi      # 0xb160
movq %rbx, %rdi
callq 0x2170
movq %rax, %rdi
callq 0x20e0
leaq 0x88d7(%rip), %rsi      # 0xb168
movq %rbx, %rdi
callq 0x2170
movq %rax, %rdi
callq 0x20e0
leaq 0x88c8(%rip), %rsi      # 0xb170
movq %rbx, %rdi
callq 0x2170
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x20e0
nop
// File: /workspace/github_cpp_makefile_star2_O2/SNUCSE-CTA[P]GI/src/global.cpp
// Function: Context::init(int)
void Context::init(int32_t aNumNode)
{
	#ifdef DEBUG
	cout << __PRETTY_FUNCTION__ << endl;
	#endif

	clear(); //avoid double allocation

	int32_t n2 = aNumNode * 2;

	markCell = new int32_t[n2];
	markNode = new int32_t[n2];

	memset(markCell, 0, sizeof(int32_t) * n2);
	memset(markNode, 0, sizeof(int32_t) * n2);

	global_mark = 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %rbx
callq 0x2e1e
leal (%r14,%r14), %eax
movslq %eax, %r15
shlq $0x2, %r15
testl %r14d, %r14d
pushq $-0x1
popq %r14
cmovnsq %r15, %r14
movq %r14, %rdi
callq 0x2030
movq %rax, %r12
movq %rax, (%rbx)
movq %r14, %rdi
callq 0x2030
movq %rax, %r14
movq %rax, 0x8(%rbx)
movq %r12, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x2100
movq %r14, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x2100
movl $0x1, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/SNUCSE-CTA[P]GI/src/graph.cpp
// Function: Graph::clear()
void Graph::clear()
{
	#ifdef DEBUG
	cout << __PRETTY_FUNCTION__ << endl;
	#endif

	if(d != NULL) {
		delete[] d;
		d = NULL;
	}
	if(l != NULL) {
		delete[] l;
		l = NULL;
	}
	if(one != NULL) {
		delete[] one;
		one = NULL;
	}
	if(e != NULL) {
		for(int32_t i = 0; i < numNode; ++i) {
			if(e[i] != NULL) {
				delete[] e[i];
			}
		}
		delete[] e;
		e = NULL;
	}
	if(adjPos != NULL) {
		delete[] adjPos;
		adjPos = NULL;
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x20(%rdi), %rdi
testq %rdi, %rdi
je 0x3a70
callq 0x21e0
andq $0x0, 0x20(%rbx)
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x3a83
callq 0x21e0
andq $0x0, 0x28(%rbx)
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x3a96
callq 0x21e0
andq $0x0, 0x30(%rbx)
cmpq $0x0, 0x38(%rbx)
je 0x3acf
xorl %r14d, %r14d
movslq 0xc(%rbx), %rax
movq 0x38(%rbx), %rdi
cmpq %rax, %r14
jge 0x3ac0
movq (%rdi,%r14,8), %rdi
testq %rdi, %rdi
je 0x3abb
callq 0x21e0
incq %r14
jmp 0x3aa0
testq %rdi, %rdi
je 0x3aca
callq 0x21e0
andq $0x0, 0x38(%rbx)
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0x3ae2
callq 0x21e0
andq $0x0, 0x40(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/SNUCSE-CTA[P]GI/src/graph.cpp
// Function: DAG::clear()
void DAG::clear()
{
	#ifdef DEBUG
	cout << __PRETTY_FUNCTION__ << endl;
	#endif 

	if(childSize != NULL) {
		delete[] childSize;
		childSize = NULL;
	}
	if(parentSize != NULL) {
		delete[] parentSize;
		parentSize = NULL;
	}
	if(dagArr != NULL) {
		delete[] dagArr;
		dagArr = NULL;
	}
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0x3bb9
callq 0x21e0
andq $0x0, 0x10(%rbx)
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x3bcc
callq 0x21e0
andq $0x0, 0x18(%rbx)
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x3bdf
callq 0x21e0
andq $0x0, 0x20(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/SNUCSE-CTA[P]GI/src/memory.cpp
// Function: Memory::~Memory()
Memory::~Memory()
{
	for(int32_t i = 0; i < (int32_t)createdArray.size(); ++i) {
		delete[] createdArray[i];
	}
	createdArray.clear();
	llPool.clear();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
movq %rcx, %rdx
subq %rax, %rdx
shrq $0x3, %rdx
movslq %edx, %rdx
cmpq %rdx, %r14
jge 0x3eea
movq (%rax,%r14,8), %rdi
testq %rdi, %rdi
je 0x3ee5
callq 0x21e0
incq %r14
jmp 0x3ebe
cmpq %rax, %rcx
je 0x3ef3
movq %rax, 0x8(%rbx)
leaq 0x18(%rbx), %rdi
movq 0x18(%rbx), %rax
cmpq %rax, 0x20(%rbx)
je 0x3f05
movq %rax, 0x20(%rbx)
callq 0x4066
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x4032
nop
// File: /workspace/github_cpp_makefile_star2_O2/SNUCSE-CTA[P]GI/src/memory.cpp
// Function: Memory::getLLArray(int)
int32_t* Memory::getLLArray(int32_t aSize)
{
	#ifdef DEBUG
	cout << __PRETTY_FUNCTION__ << endl;
	#endif

	int32_t exact = -1; 	//an array of size aSize
	int32_t bigger = -1;	//an array bigger than aSize
	int32_t* p = NULL;	//output

	//find the reusable array in the pool
	for(int32_t i = llPool.size() - 1; i >= 0; --i) {
		auto slot = llPool[i];
		if( slot.second == aSize ) {
			exact = i;
			break;
		}
		else if( slot.second > aSize ) {
			bigger = i;
		}
	}

	if(exact == -1 && bigger == -1) { //if there is no array reusable
		p = new int32_t[aSize];
		createdArray.push_back(p);

		//cout << "Case: create " << aSize << endl;
	}
	else if(exact != -1) { //if there is an array of size aSize
		p = llPool[exact].first;
		llPool.erase(llPool.begin() + exact);

		//cout << "Case: exact " << aSize << " is erased" << endl;
	}
	else if(bigger != -1) { //if there is a bigger array
		//split the array
		p = llPool[bigger].first;
		int32_t rest = llPool[bigger].second - aSize;
		int32_t* restP = p + aSize;
		llPool.erase(llPool.begin() + bigger);
		llPool.push_back(make_pair(restP, rest));

		//cout << "Case: bigger " << aSize << " is erased, " << rest << " is added" << endl;
	}
	
	return p;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r14
leaq 0x18(%rdi), %rbx
movq 0x18(%rdi), %rcx
movq 0x20(%rdi), %rax
subq %rcx, %rax
shrq $0x4, %rax
movl %eax, %eax
pushq $-0x1
popq %rdx
decq %rax
testl %eax, %eax
js 0x3f76
movl %eax, %edi
andl $0x7fffffff, %edi       # imm = 0x7FFFFFFF
shlq $0x4, %rdi
cmpl %esi, 0x8(%rcx,%rdi)
cmovgl %eax, %edx
jne 0x3f3f
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
shlq $0x4, %rax
leaq (%rcx,%rax), %rsi
movq (%rcx,%rax), %r14
movq %rbx, %rdi
callq 0x402c
jmp 0x3fe0
cmpl $-0x1, %edx
je 0x3fb6
movl %edx, %edx
shlq $0x4, %rdx
leaq (%rcx,%rdx), %rax
movq (%rcx,%rdx), %r14
movl 0x8(%rcx,%rdx), %ebp
subl %esi, %ebp
movslq %esi, %rcx
leaq (%r14,%rcx,4), %r15
movq %rbx, %rdi
movq %rax, %rsi
callq 0x402c
leaq 0x8(%rsp), %rsi
movq %r15, (%rsi)
movl %ebp, 0x8(%rsi)
movq %rbx, %rdi
callq 0x4246
jmp 0x3fe0
movl %esi, %eax
shlq $0x2, %rax
testl %esi, %esi
pushq $-0x1
popq %rdi
cmovnsq %rax, %rdi
callq 0x2030
leaq 0x8(%rsp), %rbx
movq %rax, (%rbx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x400e
movq (%rbx), %r14
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/SNUCSE-CTA[P]GI/src/algorithm.cpp
// Function: Algorithm::run(Graph*, Graph*)
bool Algorithm::run(Graph* aG1, Graph* aG2)
{
	#ifdef DEBUG
	cout << __PRETTY_FUNCTION__ << endl;
	#endif

	// Context cont;
	cont.init(aG1->numNode);

	Refinement cr(cont);
	bool result = cr.run(aG1, aG2);
	if (result == false) {
		return false;
	}

	Coloring* coloring = cr.getStableColoring();

	Backtrack bt(cont);
	result = bt.run(coloring, aG1, aG2, cr.getNumTreeNode());
    setSearchTime(bt.getSearchTime());
    setNumRecur(bt.getNumRecur());

	if(result) //if isomorphic
		computeIso(aG1, aG2, bt.mapping, coloring);

	cont.clear();
	return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x160, %rsp            # imm = 0x160
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq (%rdi), %rdi
movl 0xc(%rsi), %esi
callq 0x2daa
movq (%rbx), %rsi
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x8210
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x836c
testb %al, %al
je 0x451a
leaq 0x8(%rsp), %rdi
callq 0x9924
movq %rax, %r12
movq (%rbx), %rsi
leaq 0x90(%rsp), %rdi
callq 0x4fc4
leaq 0x8(%rsp), %rdi
callq 0x9928
leaq 0x90(%rsp), %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
movl %eax, %r8d
callq 0x522e
movl %eax, %ebp
leaq 0x90(%rsp), %rdi
callq 0x521a
movsd %xmm0, 0x8(%rbx)
leaq 0x90(%rsp), %rdi
callq 0x5220
movl %eax, 0x10(%rbx)
testb %bpl, %bpl
je 0x4503
movq 0xe0(%rsp), %rcx
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %r12, %r8
callq 0x4564
movq (%rbx), %rdi
callq 0x2e1e
leaq 0x90(%rsp), %rdi
callq 0x5028
jmp 0x451c
xorl %ebp, %ebp
leaq 0x8(%rsp), %rdi
callq 0x8258
movl %ebp, %eax
addq $0x160, %rsp            # imm = 0x160
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x453c
jmp 0x453c
movq %rax, %rbx
jmp 0x4551
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
callq 0x5028
leaq 0x8(%rsp), %rdi
callq 0x8258
movq %rbx, %rdi
callq 0x22e0
nop
// File: /workspace/github_cpp_makefile_star2_O2/SNUCSE-CTA[P]GI/src/algorithm.cpp
// Function: Algorithm::printIso(char const*, char const*, char const*)
void Algorithm::printIso(const char* ifname1, const char* ifname2, const char* ofname)
{
	ofstream outfile(ofname);

	outfile << "V(" << ifname1 << ") : V(" << ifname2 << ")" << endl;
	for(int32_t vid = 0; vid < numNode; ++vid)
		outfile << vid << ":" << mapping[vid] << endl;

	outfile.close();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x8(%rsp), %r12
pushq $0x10
popq %rdx
movq %r12, %rdi
movq %rcx, %rsi
callq 0x21b0
leaq 0x6a9f(%rip), %rsi      # 0xb36c
movq %r12, %rdi
callq 0x2170
movq %rax, %rdi
movq %r15, %rsi
callq 0x2170
leaq 0x6a81(%rip), %rsi      # 0xb368
movq %rax, %rdi
callq 0x2170
movq %rax, %rdi
movq %r14, %rsi
callq 0x2170
leaq 0x6734(%rip), %rsi      # 0xb035
movq %rax, %rdi
callq 0x2170
movq %rax, %rdi
callq 0x20e0
xorl %r14d, %r14d
leaq 0x8(%rsp), %r15
leaq 0x6724(%rip), %r12      # 0xb044
movslq 0x20(%rbx), %rax
cmpq %rax, %r14
jge 0x495c
movq %r15, %rdi
movl %r14d, %esi
callq 0x22c0
movq %rax, %rdi
movq %r12, %rsi
callq 0x2170
movq 0x18(%rbx), %rcx
movl (%rcx,%r14,4), %esi
movq %rax, %rdi
callq 0x22c0
movq %rax, %rdi
callq 0x20e0
incq %r14
jmp 0x4920
leaq 0x8(%rsp), %rdi
callq 0x2220
leaq 0x8(%rsp), %rdi
callq 0x2240
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x4981
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x2240
movq %rbx, %rdi
callq 0x22e0
// File: /workspace/github_cpp_makefile_star2_O2/SNUCSE-CTA[P]GI/src/backtrack.cpp
// Function: Backtrack::Backtrack(Context&)
Backtrack::Backtrack(Context& aContext)
{
    searchTime = 0.0;
    numRecur = 0;
	global_memory = &(aContext.global_memory);
	markNode = aContext.markNode;
	markCell = aContext.markCell;
	global_mark = aContext.global_mark;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
addq $0x40, %rdi
andq $0x0, (%r14)
andl $0x0, 0x8(%r14)
leaq 0x18(%rsi), %r15
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r14)
movups %xmm0, 0x20(%r14)
movups %xmm0, 0x2c(%r14)
movl $0x8c, %edx
xorl %esi, %esi
callq 0x2100
movq %r15, 0xb0(%r14)
movdqu (%rbx), %xmm0
pshufd $0x4e, %xmm0, %xmm0     # xmm0 = xmm0[2,3,0,1]
movdqu %xmm0, 0xb8(%r14)
movl 0x10(%rbx), %eax
movl %eax, 0xc8(%r14)
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/SNUCSE-CTA[P]GI/src/backtrack.cpp
// Function: Backtrack::~Backtrack()
Backtrack::~Backtrack()
{
	if( dag != NULL ) {
		delete dag;
		dag = NULL;
	}

	if( cs != NULL ) {
		delete cs;
		cs = NULL;
	}

	if( mapping != NULL ) {
		global_memory->returnLLArray(mapping, n2);
		mapping = NULL;
	}

	clearWorkspace();

	if( failingset != NULL ) {
		delete[] failingset;
		failingset = NULL;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x40(%rdi), %r14
testq %r14, %r14
je 0x5055
movq %r14, %rdi
callq 0x3b9c
pushq $0x28
popq %rsi
movq %r14, %rdi
callq 0x2190
andq $0x0, 0x40(%rbx)
movq 0x48(%rbx), %r14
testq %r14, %r14
je 0x5076
movq %r14, %rdi
callq 0x7fe8
pushq $0x20
popq %rsi
movq %r14, %rdi
callq 0x2190
andq $0x0, 0x48(%rbx)
movq 0x50(%rbx), %rsi
testq %rsi, %rsi
je 0x5093
movq 0xb0(%rbx), %rdi
movl 0x34(%rbx), %edx
callq 0x3fee
andq $0x0, 0x50(%rbx)
movq %rbx, %rdi
callq 0x50fe
movq 0x58(%rbx), %r15
testq %r15, %r15
je 0x50dd
leaq -0x8(%r15), %r14
movq -0x8(%r15), %r12
testq %r12, %r12
je 0x50c8
addq $-0x18, %r15
imulq $0x18, %r12, %r13
leaq (%r15,%r13), %rdi
callq 0x7806
addq $-0x18, %r13
jne 0x50b9
imulq $0x18, %r12, %rsi
addq $0x8, %rsi
movq %r14, %rdi
callq 0x2300
andq $0x0, 0x58(%rbx)
addq $0x98, %rbx
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x7806
movq %rax, %rdi
callq 0x2c37
nop
// File: /workspace/github_cpp_makefile_star2_O2/SNUCSE-CTA[P]GI/src/backtrack.cpp
// Function: Backtrack::clearWorkspace()
void Backtrack::clearWorkspace()
{
	#ifdef DEBUG
	cout << __PRETTY_FUNCTION__ << endl;
	#endif

	if( extCand != NULL ) {
		delete[] extCand;
		extCand = NULL;
	}
	if( heap != NULL ) {
		delete heap;
		heap = NULL;
	}
	if( weight != NULL ) {
		global_memory->returnLLArray(weight, n);
		weight = NULL;
	}
	if( numMappedParent != NULL ) {
		global_memory->returnLLArray(numMappedParent, n);
		numMappedParent = NULL;
	}
	if( candPos != NULL ) {
		global_memory->returnLLArray(candPos, n);
		candPos = NULL;
	}
	if( matchingOrder != NULL ) {
		global_memory->returnLLArray(matchingOrder, n);
		matchingOrder = NULL;
	}
	if( isBinary != NULL ) {
		global_memory->returnLLArray((int32_t*)isBinary, n);
		isBinary = NULL;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x60(%rdi), %r15
testq %r15, %r15
je 0x514c
leaq -0x8(%r15), %r14
movq -0x8(%r15), %r12
testq %r12, %r12
je 0x5137
addq $-0x18, %r15
imulq $0x18, %r12, %r13
leaq (%r15,%r13), %rdi
callq 0x7806
addq $-0x18, %r13
jne 0x5128
imulq $0x18, %r12, %rsi
addq $0x8, %rsi
movq %r14, %rdi
callq 0x2300
andq $0x0, 0x60(%rbx)
movq 0x68(%rbx), %r14
testq %r14, %r14
je 0x516d
movq %r14, %rdi
callq 0x8040
pushq $0x18
popq %rsi
movq %r14, %rdi
callq 0x2190
andq $0x0, 0x68(%rbx)
movq 0x70(%rbx), %rsi
testq %rsi, %rsi
je 0x518a
movq 0xb0(%rbx), %rdi
movl 0x2c(%rbx), %edx
callq 0x3fee
andq $0x0, 0x70(%rbx)
movq 0x78(%rbx), %rsi
testq %rsi, %rsi
je 0x51a7
movq 0xb0(%rbx), %rdi
movl 0x2c(%rbx), %edx
callq 0x3fee
andq $0x0, 0x78(%rbx)
movq 0x80(%rbx), %rsi
testq %rsi, %rsi
je 0x51ca
movq 0xb0(%rbx), %rdi
movl 0x2c(%rbx), %edx
callq 0x3fee
andq $0x0, 0x80(%rbx)
movq 0x88(%rbx), %rsi
testq %rsi, %rsi
je 0x51ed
movq 0xb0(%rbx), %rdi
movl 0x2c(%rbx), %edx
callq 0x3fee
andq $0x0, 0x88(%rbx)
movq 0x90(%rbx), %rsi
testq %rsi, %rsi
je 0x5210
movq 0xb0(%rbx), %rdi
movl 0x2c(%rbx), %edx
callq 0x3fee
andq $0x0, 0x90(%rbx)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/SNUCSE-CTA[P]GI/src/backtrack.cpp
// Function: Backtrack::initWorkspace()
void Backtrack::initWorkspace()
{
	#ifdef DEBUG
	cout << __PRETTY_FUNCTION__ << endl;
	#endif

	clearWorkspace();

	extCand = new vector<int32_t>[n];
	heap = new Heap(n);
	weight = global_memory->getLLArray(n);
	numMappedParent = global_memory->getLLArray(n);
	candPos = global_memory->getLLArray(n);
	matchingOrder = global_memory->getLLArray(n);
	isBinary = (char*)global_memory->getLLArray(n);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x50fe
movl 0x2c(%rbx), %ebp
movslq %ebp, %r12
pushq $0x18
popq %r13
movq %r12, %rax
mulq %r13
movq %rax, %r14
seto %al
movq %r14, %rdi
addq $0x8, %rdi
pushq $-0x1
popq %rcx
cmovbq %rcx, %rdi
testb %al, %al
cmovneq %rcx, %rdi
callq 0x2030
movq %rax, %r15
movq %r12, (%rax)
addq $0x8, %r15
testl %r12d, %r12d
je 0x54ad
addq $-0x18, %r14
movq %r14, %rax
xorl %edx, %edx
divq %r13
subq %rdx, %r14
addq $0x18, %r14
movq %r15, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x2100
movq %r15, 0x60(%rbx)
pushq $0x18
popq %rdi
callq 0x2180
movq %rax, %r14
movq %rax, %rdi
movl %ebp, %esi
callq 0x7fec
movq %r14, 0x68(%rbx)
movq 0xb0(%rbx), %rdi
movl 0x2c(%rbx), %esi
callq 0x3f1a
movq %rax, 0x70(%rbx)
movq 0xb0(%rbx), %rdi
movl 0x2c(%rbx), %esi
callq 0x3f1a
movq %rax, 0x78(%rbx)
movq 0xb0(%rbx), %rdi
movl 0x2c(%rbx), %esi
callq 0x3f1a
movq %rax, 0x80(%rbx)
movq 0xb0(%rbx), %rdi
movl 0x2c(%rbx), %esi
callq 0x3f1a
movq %rax, 0x88(%rbx)
movq 0xb0(%rbx), %rdi
movl 0x2c(%rbx), %esi
callq 0x3f1a
movq %rax, 0x90(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
pushq $0x18
popq %rsi
movq %r14, %rdi
callq 0x2190
movq %rbx, %rdi
callq 0x22e0
nop
// File: /workspace/github_cpp_makefile_star2_O2/SNUCSE-CTA[P]GI/src/backtrack.cpp
// Function: Backtrack::selectRoot()
int32_t Backtrack::selectRoot()
{
	#ifdef DEBUG
	cout << __PRETTY_FUNCTION__ << endl;
	#endif

	int32_t root = 0;
	int32_t v, size;
	double value;
	double minValue = (double)n;
	char* one1 = g1->one;
	int32_t* d1 = g1->d;
	int32_t* perm = coloring->perm;
	int32_t* cellSize = coloring->cellSize;
	int32_t numNode = coloring->numNode;

	//for each cell
	for(int32_t i = 0; i < numNode; i += cellSize[i]) {
		size = cellSize[i];
		//for each element in the cell
		for(int32_t j = 0; j < size; ++j) {
			v = perm[i + j];
			if( v < n && one1[v] == 0 ) { //if v is in aG1
				value = size/((double)d1[v]);
				if( value < minValue ) {
					root = v;
					minValue = value;
				}
			} // if
		} //for (j)
	} //for (i)

	return root;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl 0x2c(%rdi), %ecx
cvtsi2sd %ecx, %xmm0
movq 0x10(%rdi), %rax
movq 0x20(%rdi), %r9
movq 0x20(%rax), %rdx
movq 0x30(%rax), %rsi
movq 0x10(%r9), %rdi
movq 0x20(%r9), %r8
movl (%r9), %r9d
xorl %eax, %eax
xorl %r10d, %r10d
cmpl %r9d, %r10d
jge 0x66ea
movslq %r10d, %r14
movl (%r8,%r14,4), %r11d
cvtsi2sd %r11d, %xmm1
testl %r11d, %r11d
movl $0x0, %ebx
cmovgl %r11d, %ebx
leaq (%rdi,%r14,4), %r14
xorl %r15d, %r15d
cmpq %r15, %rbx
je 0x66e5
movl (%r14,%r15,4), %ebp
cmpl %ecx, %ebp
jge 0x66e0
movslq %ebp, %r12
cmpb $0x0, (%rsi,%r12)
jne 0x66e0
cvtsi2sdl (%rdx,%r12,4), %xmm3
movapd %xmm1, %xmm2
divsd %xmm3, %xmm2
ucomisd %xmm2, %xmm0
jbe 0x66e0
movapd %xmm2, %xmm0
movl %ebp, %eax
incq %r15
jmp 0x66af
addl %r11d, %r10d
jmp 0x668b
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/SNUCSE-CTA[P]GI/src/backtrack.cpp
// Function: Backtrack::binarySearch(int*, int, int)
int32_t Backtrack::binarySearch(int32_t* aArray, int32_t aSize, int32_t aValue)
{
	#ifdef DEBUG
	cout << __PRETTY_FUNCTION__ << endl;
	#endif

	int32_t l, r, m;

	//do linear search when aSize is small
	if( aSize < 10 ) { 
		for(l = 0; l < aSize; ++l) {
			if( aArray[l] == aValue )
				return l;
		}
		return -1;
	}

	//binary search
	l = 0;
	r = aSize - 1;
	while( l <= r ) {
		m = l + (r - l)/2;
		if( aArray[m] < aValue )
			l = m + 1;
		else if( aArray[m] > aValue )
			r = m - 1;
		else //aArray[m] == aValue
			return m;
	}
	return -1;
}

// Assembly:
movl %edx, %edi
cmpl $0x9, %edx
jg 0x6715
xorl %eax, %eax
testl %edi, %edi
cmovlel %eax, %edi
pushq $-0x1
popq %r8
cmpq %rax, %rdi
je 0x674f
cmpl %ecx, (%rsi,%rax,4)
je 0x6747
incq %rax
jmp 0x6706
decl %edi
xorl %r10d, %r10d
pushq $-0x1
popq %r8
pushq $0x2
popq %r9
movl %edi, %eax
subl %r10d, %eax
jl 0x674f
cltd
idivl %r9d
addl %r10d, %eax
movslq %eax, %rdx
cmpl %ecx, (%rsi,%rdx,4)
jl 0x6740
jle 0x674c
decl %eax
movl %eax, %edi
jmp 0x6722
incl %eax
movl %eax, %r10d
jmp 0x6722
movl %eax, %r8d
jmp 0x674f
movl %eax, %r8d
movl %r8d, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/SNUCSE-CTA[P]GI/src/backtrack.cpp
// Function: Backtrack::getMinExtVertex()
int32_t Backtrack::getMinExtVertex()
{
	#ifdef DEBUG
	cout << __PRETTY_FUNCTION__ << endl;
	#endif

	if( heap->size == 0 ) {
		cout << "ERROR in " << __FUNCTION__ << "(): numExtVertex == 0" << endl;
		return -1;
	}
	return heap->extractMin(weight);
}

// Assembly:
movq %rdi, %rax
movq 0x68(%rdi), %rdi
cmpl $0x0, 0x10(%rdi)
je 0x6a3c
movq 0x70(%rax), %rsi
jmp 0x81c8
pushq %rax
movq 0x958c(%rip), %rdi      # 0xffd0
leaq 0x4924(%rip), %rsi      # 0xb36f
callq 0x2170
leaq 0x4922(%rip), %rsi      # 0xb379
movq %rax, %rdi
callq 0x2170
leaq 0x4923(%rip), %rsi      # 0xb389
movq %rax, %rdi
callq 0x2170
movq %rax, %rdi
callq 0x20e0
pushq $-0x1
popq %rax
popq %rcx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/SNUCSE-CTA[P]GI/src/heap.cpp
// Function: Heap::Heap(int)
Heap::Heap(int32_t aSize)
{
	#ifdef DEBUG
	cout << __PRETTY_FUNCTION__ << endl;
	#endif

	heap = new int32_t[aSize];
	locate = new int32_t[aSize];
	memset(locate, -1, sizeof(int32_t) * aSize);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movslq %esi, %rax
leaq (,%rax,4), %r14
testl %eax, %eax
pushq $-0x1
popq %r15
cmovnsq %r14, %r15
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
andl $0x0, 0x10(%rdi)
movq %r15, %rdi
callq 0x2030
movq %rax, (%rbx)
movq %r15, %rdi
callq 0x2030
movq %rax, 0x8(%rbx)
movq %rax, %rdi
movl $0xff, %esi
movq %r14, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x2100
nop
// File: /workspace/github_cpp_makefile_star2_O2/SNUCSE-CTA[P]GI/src/heap.cpp
// Function: Heap::~Heap()
Heap::~Heap()
{
	if( heap != NULL) {
		delete[] heap;
		heap = NULL;
	}
	if( locate != NULL) {
		delete[] locate;
		locate = NULL;
	}
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x8055
callq 0x21e0
andq $0x0, (%rbx)
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x8068
callq 0x21e0
andq $0x0, 0x8(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/SNUCSE-CTA[P]GI/src/heap.cpp
// Function: Heap::minHeapify(int*, int)
void Heap::minHeapify(int32_t* aValue, int32_t aIndex)
{
	#ifdef DEBUG
	cout << __PRETTY_FUNCTION__ << endl;
	#endif

	int32_t l, r, s, t;
	int32_t i = aIndex;

	while(true) {
		s = i;	//smaller one's index
		l = LEFT(i);	//left child's index
		r = RIGHT(i);	//right child's index
		if( l <= size && aValue[heap[l]] < aValue[heap[s]] )
			s = l;
		if( r <= size && aValue[heap[r]] < aValue[heap[s]] )
			s = r;
		if( s != i ) { // if one of the children is smaller than i
			t = heap[s];
			heap[s] = heap[i];
			heap[i] = t;

			locate[ heap[s] ] = s;
			locate[ heap[i] ] = i;

			i = s;
		}
		else {
			break;
		}
	} //while(true)
}

// Assembly:
pushq %r14
pushq %rbx
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
leal (%rdx,%rdx), %r10d
movl 0x10(%rdi), %r11d
movslq %edx, %r8
movl %edx, %r9d
cmpl %r11d, %r10d
jg 0x80a2
movslq %r10d, %r9
movslq (%rax,%r9,4), %r9
movl (%rsi,%r9,4), %ebx
movslq (%rax,%r8,4), %r14
movl %r10d, %r9d
cmpl (%rsi,%r14,4), %ebx
jl 0x80a2
movl %edx, %r9d
cmpl %r11d, %r10d
jge 0x80cd
leal 0x1(,%rdx,2), %r10d
movslq %r10d, %r11
movslq (%rax,%r11,4), %r11
movl (%rsi,%r11,4), %r11d
movslq %r9d, %rbx
movslq (%rax,%rbx,4), %rbx
cmpl (%rsi,%rbx,4), %r11d
jl 0x80ca
movl %r9d, %r10d
movl %r10d, %r9d
cmpl %edx, %r9d
je 0x80fd
movslq %r9d, %r10
movl (%rax,%r10,4), %r11d
movl (%rax,%r8,4), %ebx
movl %ebx, (%rax,%r10,4)
movl %r11d, (%rax,%r8,4)
movslq (%rax,%r10,4), %r10
movl %r9d, (%rcx,%r10,4)
movslq (%rax,%r8,4), %r8
movl %edx, (%rcx,%r8,4)
movl %r9d, %edx
jmp 0x8074
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/SNUCSE-CTA[P]GI/src/heap.cpp
// Function: Heap::insert(int*, int)
void Heap::insert(int32_t* aValue, int32_t aVertex)
{
	#ifdef DEBUG
	cout << __PRETTY_FUNCTION__ << endl;
	#endif

	int32_t i, p, t;
	++size;
	heap[size] = aVertex;
	locate[aVertex] = size;
	i = size;
	while( i > 1 ) {
		p = PARENT(i);
		if( aValue[heap[p]] > aValue[heap[i]] ) {
			t = heap[p];
			heap[p] = heap[i];
			heap[i] = t;

			locate[ heap[p] ] = p;
			locate[ heap[i] ] = i;

			i = p;
		}
		else {
			break;
		}
	}
}

// Assembly:
movslq 0x10(%rdi), %rcx
leaq 0x1(%rcx), %rax
movl %eax, 0x10(%rdi)
movq (%rdi), %rax
movl %edx, 0x4(%rax,%rcx,4)
movl 0x10(%rdi), %r9d
movq 0x8(%rdi), %rcx
movl %r9d, %edi
movslq %edx, %rdx
movl %r9d, (%rcx,%rdx,4)
cmpl $0x2, %edi
jl 0x818a
movl %edi, %r8d
shrl %r8d
movslq (%rax,%r8,4), %r9
movl (%rsi,%r9,4), %r11d
movl %edi, %edx
movslq (%rax,%rdx,4), %r10
cmpl (%rsi,%r10,4), %r11d
jle 0x818a
movl %r10d, (%rax,%r8,4)
movl %r9d, (%rax,%rdx,4)
movslq (%rax,%r8,4), %r9
movl %r8d, (%rcx,%r9,4)
movl (%rax,%rdx,4), %edx
movl %edi, %r9d
movl %r8d, %edi
jmp 0x8149
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/SNUCSE-CTA[P]GI/src/heap.cpp
// Function: Heap::erase(int*, int)
void Heap::erase(int32_t* aValue, int32_t aVertex)
{
	#ifdef DEBUG
	cout << __PRETTY_FUNCTION__ << endl;
	#endif

	int32_t i = locate[aVertex];
	if( i < 0 )
		return;
	
	locate[aVertex] = -1;
	heap[i] = heap[size];
	locate[ heap[i] ] = i;
	--size;
	if( size > 0 )
		minHeapify(aValue, i);
}

// Assembly:
movq 0x8(%rdi), %rax
movslq %edx, %rcx
movslq (%rax,%rcx,4), %rdx
testq %rdx, %rdx
js 0x81c6
orl $-0x1, (%rax,%rcx,4)
movq (%rdi), %rcx
movslq 0x10(%rdi), %r8
movslq (%rcx,%r8,4), %r8
movl %r8d, (%rcx,%rdx,4)
movl %edx, (%rax,%r8,4)
movl 0x10(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rdi)
cmpl $0x2, %eax
jl 0x81c6
jmp 0x806a
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/SNUCSE-CTA[P]GI/src/heap.cpp
// Function: Heap::extractMin(int*)
int32_t Heap::extractMin(int32_t* aValue)
{
	#ifdef DEBUG
	cout << __PRETTY_FUNCTION__ << endl;
	#endif

	if( size < 1 ) {
		return -1;
	}
	
	int32_t min = heap[1];
	locate[min] = -1;
	heap[1] = heap[size];
	locate[ heap[1] ] = 1;
	--size;

	if( size > 0 )
		minHeapify(aValue, 1);
	
	return min;
}

// Assembly:
pushq %rbx
cmpl $0x0, 0x10(%rdi)
jle 0x8208
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
movslq 0x4(%rax), %rbx
orl $-0x1, (%rcx,%rbx,4)
movslq 0x10(%rdi), %rdx
movslq (%rax,%rdx,4), %rdx
movl %edx, 0x4(%rax)
movl $0x1, (%rcx,%rdx,4)
movl 0x10(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rdi)
cmpl $0x2, %eax
jl 0x820b
pushq $0x1
popq %rdx
callq 0x806a
jmp 0x820b
pushq $-0x1
popq %rbx
movl %ebx, %eax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/SNUCSE-CTA[P]GI/src/refine.cpp
// Function: Refinement::~Refinement()
Refinement::~Refinement()
{
	if (stableColoring != NULL) {
		delete stableColoring;
		stableColoring = NULL;
	}
	clearWorkspace();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %r14
testq %r14, %r14
je 0x827e
movq %r14, %rdi
callq 0xa05e
pushq $0x28
popq %rsi
movq %r14, %rdi
callq 0x2190
andq $0x0, (%rbx)
movq %rbx, %rdi
callq 0x8296
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rdi
callq 0x2c37
// File: /workspace/github_cpp_makefile_star2_O2/SNUCSE-CTA[P]GI/src/refine.cpp
// Function: Refinement::clearWorkspace()
void Refinement::clearWorkspace()
{
	#ifdef DEBUG
	cout << __PRETTY_FUNCTION__ << endl;
	#endif

	if (cellStack != NULL) {
		global_memory->returnLLArray(cellStack, n2);
		cellStack = NULL;
	}
	if (neighCount != NULL) {
		global_memory->returnLLArray(neighCount, n2);
		neighCount = NULL;
	}
	if (visitCell != NULL) {
		global_memory->returnLLArray(visitCell, n2);
		visitCell = NULL;
	}
	if (visitNode != NULL) {
		global_memory->returnLLArray(visitNode, n2);
		visitNode = NULL;
	}
	if (numVisitNode != NULL) {
		global_memory->returnLLArray(numVisitNode, n2);
		numVisitNode = NULL;
	}
	if (splitCell != NULL) {
		global_memory->returnLLArray(splitCell, n2);
		splitCell = NULL;
	}
	if (splitCount != NULL) {
		global_memory->returnLLArray(splitCount, n2);
		splitCount = NULL;
	}
	if (splitPos != NULL) {
		global_memory->returnLLArray(splitPos, n2);
		splitPos = NULL;
	}
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x20(%rdi), %rsi
testq %rsi, %rsi
je 0x82b4
movq 0x68(%rbx), %rdi
movl 0x10(%rbx), %edx
callq 0x3fee
andq $0x0, 0x20(%rbx)
movq 0x30(%rbx), %rsi
testq %rsi, %rsi
je 0x82ce
movq 0x68(%rbx), %rdi
movl 0x10(%rbx), %edx
callq 0x3fee
andq $0x0, 0x30(%rbx)
movq 0x38(%rbx), %rsi
testq %rsi, %rsi
je 0x82e8
movq 0x68(%rbx), %rdi
movl 0x10(%rbx), %edx
callq 0x3fee
andq $0x0, 0x38(%rbx)
movq 0x40(%rbx), %rsi
testq %rsi, %rsi
je 0x8302
movq 0x68(%rbx), %rdi
movl 0x10(%rbx), %edx
callq 0x3fee
andq $0x0, 0x40(%rbx)
movq 0x48(%rbx), %rsi
testq %rsi, %rsi
je 0x831c
movq 0x68(%rbx), %rdi
movl 0x10(%rbx), %edx
callq 0x3fee
andq $0x0, 0x48(%rbx)
movq 0x50(%rbx), %rsi
testq %rsi, %rsi
je 0x8336
movq 0x68(%rbx), %rdi
movl 0x10(%rbx), %edx
callq 0x3fee
andq $0x0, 0x50(%rbx)
movq 0x58(%rbx), %rsi
testq %rsi, %rsi
je 0x8350
movq 0x68(%rbx), %rdi
movl 0x10(%rbx), %edx
callq 0x3fee
andq $0x0, 0x58(%rbx)
movq 0x60(%rbx), %rsi
testq %rsi, %rsi
je 0x836a
movq 0x68(%rbx), %rdi
movl 0x10(%rbx), %edx
callq 0x3fee
andq $0x0, 0x60(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/SNUCSE-CTA[P]GI/src/refine.cpp
// Function: Refinement::run(Graph*, Graph*)
bool Refinement::run(Graph* aG1, Graph* aG2)
{
	#ifdef DEBUG
	cout << __PRETTY_FUNCTION__ << endl;
	#endif

	n = aG1->numNode;
	e = aG1->numEdge;
	n2 = n * 2;
	e2 = e * 2;

	if (stableColoring != NULL) {
		delete stableColoring;
	}
	stableColoring = new Coloring(n2);
	// Allocate workspace variables
	initWorkspace();

	// Initial coloring
	bool ret = colorByDegreeAndLabel(stableColoring, aG1, aG2);
	if (ret) {
		// Process coreness-1 vertices
		numTreeNode = prepCoreOne(stableColoring, aG1, aG2);

		// Refine coloring
		ret = refine(stableColoring, aG1, aG2);
	}

	// Free workspace variables
	clearWorkspace();

	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movl 0xc(%rsi), %ebp
movl %ebp, 0xc(%rdi)
movl 0x10(%rsi), %eax
movl %eax, 0x14(%rdi)
addl %ebp, %ebp
movl %ebp, 0x10(%rdi)
addl %eax, %eax
movl %eax, 0x18(%rdi)
movq (%rdi), %r12
testq %r12, %r12
je 0x83b1
movq %r12, %rdi
callq 0xa05e
pushq $0x28
popq %rsi
movq %r12, %rdi
callq 0x2190
movl 0x10(%rbx), %ebp
pushq $0x28
popq %rdi
callq 0x2180
movq %rax, %r12
movq %rax, %rdi
movl %ebp, %esi
callq 0x9f9c
movq %r12, (%rbx)
movq %rbx, %rdi
callq 0x8438
movq (%rbx), %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x84c8
testb %al, %al
je 0x840c
movq (%rbx), %rsi
movq %rbx, %rdi
movq %r15, %rdx
movq %r14, %rcx
callq 0x86e4
movl %eax, 0x8(%rbx)
movq (%rbx), %rsi
movq %rbx, %rdi
movq %r15, %rdx
movq %r14, %rcx
callq 0x8f02
movl %eax, %ebp
jmp 0x840e
xorl %ebp, %ebp
movq %rbx, %rdi
callq 0x8296
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
pushq $0x28
popq %rsi
movq %r12, %rdi
callq 0x2190
movq %rbx, %rdi
callq 0x22e0
nop
// File: /workspace/github_cpp_makefile_star2_O2/SNUCSE-CTA[P]GI/src/refine.cpp
// Function: Refinement::initWorkspace()
void Refinement::initWorkspace()
{
	#ifdef DEBUG
	cout << __PRETTY_FUNCTION__ << endl;
	#endif

	clearWorkspace(); //avoid double allocation

	cellStack = global_memory->getLLArray(n2);
	stackSize = 0;
	neighCount = global_memory->getLLArray(n2);
	visitCell = global_memory->getLLArray(n2);
	visitNode = global_memory->getLLArray(n2);
	numVisitNode = global_memory->getLLArray(n2);
	splitCell = global_memory->getLLArray(n2);
	splitCount = global_memory->getLLArray(n2);
	splitPos = global_memory->getLLArray(n2);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x8296
movq 0x68(%rbx), %rdi
movl 0x10(%rbx), %esi
callq 0x3f1a
movq %rax, 0x20(%rbx)
andl $0x0, 0x28(%rbx)
movq 0x68(%rbx), %rdi
movl 0x10(%rbx), %esi
callq 0x3f1a
movq %rax, 0x30(%rbx)
movq 0x68(%rbx), %rdi
movl 0x10(%rbx), %esi
callq 0x3f1a
movq %rax, 0x38(%rbx)
movq 0x68(%rbx), %rdi
movl 0x10(%rbx), %esi
callq 0x3f1a
movq %rax, 0x40(%rbx)
movq 0x68(%rbx), %rdi
movl 0x10(%rbx), %esi
callq 0x3f1a
movq %rax, 0x48(%rbx)
movq 0x68(%rbx), %rdi
movl 0x10(%rbx), %esi
callq 0x3f1a
movq %rax, 0x50(%rbx)
movq 0x68(%rbx), %rdi
movl 0x10(%rbx), %esi
callq 0x3f1a
movq %rax, 0x58(%rbx)
movq 0x68(%rbx), %rdi
movl 0x10(%rbx), %esi
callq 0x3f1a
movq %rax, 0x60(%rbx)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/SNUCSE-CTA[P]GI/src/refine.cpp
// Function: Refinement::checkColoring(Coloring*)
bool Refinement::checkColoring(Coloring* coloring)
{
	#ifdef DEBUG
	cout << __PRETTY_FUNCTION__ << endl;
	#endif

	for (int32_t i = 0; i < coloring->numNode; i += coloring->cellSize[i]) {
		int32_t acc = 0;
		for (int32_t j = 0; j < coloring->cellSize[i]; ++j) {
			acc += (coloring->perm[i+j] < n) ? 1 : -1;
		}

		if (acc != 0) return false;
	}

	return true;
}

// Assembly:
pushq %rbx
movl (%rsi), %eax
movl 0xc(%rdi), %ecx
xorl %edi, %edi
movl %edi, %edx
cmpl %eax, %edi
jge 0x9980
movq 0x20(%rsi), %rdi
movslq %edx, %r9
movl (%rdi,%r9,4), %edi
xorl %r8d, %r8d
testl %edi, %edi
movl $0x0, %r10d
cmovgl %edi, %r10d
subq $0x1, %r10
jb 0x9979
movq 0x10(%rsi), %r11
xorl %ebx, %ebx
cmpl %ecx, (%r11,%r9,4)
setl %bl
leal (%r8,%rbx,2), %r8d
decl %r8d
incq %r9
jmp 0x995a
addl %edx, %edi
testl %r8d, %r8d
je 0x993a
cmpl %eax, %edx
setge %al
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/SNUCSE-CTA[P]GI/src/refine.cpp
// Function: Refinement::selectFromStack(Coloring*)
int32_t Refinement::selectFromStack(Coloring* coloring)
{
	int32_t ret = stackSize - 1;
	int32_t idx = stackSize - 2;
	while (idx >= 0) {
		if (coloring->cellSize[cellStack[idx]] < coloring->cellSize[cellStack[ret]]) {
			ret = idx;
		}

		if (coloring->cellSize[cellStack[ret]] == 2 || idx < stackSize - 13) {
			break;
		}

		--idx;
	}

	return ret;
}

// Assembly:
movl 0x28(%rdi), %ecx
leal -0x1(%rcx), %r9d
leal -0x2(%rcx), %r8d
movq 0x20(%rdi), %rdx
addl $-0xd, %ecx
testl %r8d, %r8d
js 0x99df
movq 0x20(%rsi), %rdi
movl %r8d, %eax
movslq (%rdx,%rax,4), %rax
movl (%rdi,%rax,4), %r10d
movslq %r9d, %rax
movslq (%rdx,%rax,4), %r11
movl %r8d, %eax
cmpl (%rdi,%r11,4), %r10d
jl 0x99c1
movl %r9d, %eax
movslq %eax, %r9
movslq (%rdx,%r9,4), %r9
cmpl $0x2, (%rdi,%r9,4)
je 0x99de
leal -0x1(%r8), %edi
movl %eax, %r9d
cmpl %ecx, %r8d
movl %edi, %r8d
jge 0x999a
retq
movl %r9d, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/SNUCSE-CTA[P]GI/src/refine.cpp
// Function: Refinement::deleteEdge(int, int, Graph*, Graph*)
void Refinement::deleteEdge(int32_t aVertex, int32_t aNumDegOne, Graph* aG1, Graph* aG2)
{
	Graph* g1 = aG1;
	Graph* g2 = aG2;
	int32_t n = g1->numNode;
	int32_t* d1 = g1->d;
	int32_t* d2 = g2->d;

	int32_t du = (aVertex < n) ? d1[aVertex] : d2[aVertex - n];
	if( du < 2 )
		return;

	int32_t i, newDegree, temp, lastInd;
	int32_t* edge = NULL;
	char* one = NULL;

	newDegree = du - aNumDegOne;
	if( aVertex < n ) {
		lastInd = newDegree;
		edge = g1->e[aVertex];
		one = g1->one;
		for(i = 0; i < newDegree; ++i) {
			if( one[edge[i]] ) {
				while( d1[ edge[lastInd] ] == -1 )
					++lastInd;
				temp = edge[i];
				edge[i] = edge[lastInd];
				edge[lastInd] = temp;
			}
		}
		d1[aVertex] = newDegree;
	}
	else {
		lastInd = newDegree;
		edge = g2->e[aVertex - n];
		one = g2->one;
		for(i = 0; i < newDegree; ++i) {
			if( one[edge[i]] ) {
				while( d2[ edge[lastInd] ] == -1 )
					++lastInd;
				temp = edge[i];
				edge[i] = edge[lastInd];
				edge[lastInd] = temp;
			}
		}
		d2[aVertex - n] = newDegree;
	} //if-else (aVertex < n)
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl 0xc(%rcx), %ebp
movq 0x20(%rcx), %rdi
movq 0x20(%r8), %r10
movl %esi, %eax
subl %ebp, %eax
movslq %esi, %rbx
leaq (%rdi,%rbx,4), %r11
movslq %eax, %r14
leaq (%r10,%r14,4), %r9
movq %r9, %rax
cmovlq %r11, %rax
movl (%rax), %eax
cmpl $0x2, %eax
jl 0x9af1
subl %edx, %eax
xorl %edx, %edx
testl %eax, %eax
cmovgl %eax, %edx
cmpl %ebp, %esi
jge 0x9aa2
movq 0x30(%rcx), %rsi
movq 0x38(%rcx), %rcx
movq (%rcx,%rbx,8), %rcx
xorl %r8d, %r8d
movl %eax, %r9d
cmpq %rdx, %r8
je 0x9aeb
movslq (%rcx,%r8,4), %r10
cmpb $0x0, (%rsi,%r10)
je 0x9a9d
movslq %r9d, %r9
leaq (%rcx,%r9,4), %rbx
decl %r9d
movslq (%rbx), %r14
addq $0x4, %rbx
incl %r9d
cmpl $-0x1, (%rdi,%r14,4)
je 0x9a84
movl %r14d, (%rcx,%r8,4)
movl %r10d, -0x4(%rbx)
incq %r8
jmp 0x9a6a
movq 0x30(%r8), %rcx
movq 0x38(%r8), %rsi
movq (%rsi,%r14,8), %rsi
xorl %edi, %edi
movl %eax, %r8d
cmpq %rdx, %rdi
je 0x9aee
movslq (%rsi,%rdi,4), %r11
cmpb $0x0, (%rcx,%r11)
je 0x9ae6
movslq %r8d, %r8
leaq (%rsi,%r8,4), %rbx
decl %r8d
movslq (%rbx), %r14
addq $0x4, %rbx
incl %r8d
cmpl $-0x1, (%r10,%r14,4)
je 0x9acd
movl %r14d, (%rsi,%rdi,4)
movl %r11d, -0x4(%rbx)
incq %rdi
jmp 0x9ab3
movq %r11, %r9
movl %eax, (%r9)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/SNUCSE-CTA[P]GI/src/coloring.cpp
// Function: Coloring::init(int)
void Coloring::init(int32_t aNumNode)
{
	#ifdef DEBUG
	cout << __PRETTY_FUNCTION__ << endl;
	#endif

	numNode = aNumNode;
	numCell = 1;

	color = new int32_t[numNode];
	perm = new int32_t[numNode];
	inv = new int32_t[numNode];
	cellSize = new int32_t[numNode];

	for (int32_t i = 0; i < numNode; ++i) {
		color[i] = 0;
		perm[i] = inv[i] = i;
		cellSize[i] = 0;
	}
	cellSize[0] = numNode;

	return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, (%rdi)
movl $0x1, 0x4(%rdi)
movq %rdi, %r13
movq %rdi, 0x10(%rsp)
movl %esi, %eax
shlq $0x2, %rax
xorl %ebx, %ebx
testl %esi, %esi
pushq $-0x1
popq %rbp
cmovnsq %rax, %rbp
movl $0x0, %r15d
movl %esi, 0xc(%rsp)
cmovgl %esi, %r15d
movq %rbp, %rdi
callq 0x2030
movq %rax, %r14
movq %rax, 0x8(%r13)
movq %rbp, %rdi
callq 0x2030
movq %rax, %r12
movq %rax, 0x10(%r13)
movq %rbp, %rdi
callq 0x2030
movq %rax, %r13
movq 0x10(%rsp), %rax
movq %r13, 0x18(%rax)
movq %rbp, %rdi
callq 0x2030
movq 0x10(%rsp), %rcx
movq %rax, 0x20(%rcx)
cmpq %rbx, %r15
je 0xa049
andl $0x0, (%r14,%rbx,4)
movl %ebx, (%r13,%rbx,4)
movl %ebx, (%r12,%rbx,4)
andl $0x0, (%rax,%rbx,4)
incq %rbx
jmp 0xa02d
movl 0xc(%rsp), %ecx
movl %ecx, (%rax)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/SNUCSE-CTA[P]GI/src/coloring.cpp
// Function: Coloring::clear()
void Coloring::clear()
{
	#ifdef DEBUG
	cout << __PRETTY_FUNCTION__ << endl;
	#endif

	if (color != NULL) {
		delete[] color;
		color = NULL;
	}
	if (perm != NULL) {
		delete[] perm;
		perm = NULL;
	}
	if (inv != NULL) {
		delete[] inv;
		inv = NULL;
	}
	if (cellSize != NULL) {
		delete[] cellSize;
		cellSize = NULL;
	}
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0xa07b
callq 0x21e0
andq $0x0, 0x8(%rbx)
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0xa08e
callq 0x21e0
andq $0x0, 0x10(%rbx)
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0xa0a1
callq 0x21e0
andq $0x0, 0x18(%rbx)
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0xa0b4
callq 0x21e0
andq $0x0, 0x20(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/syzcch[P]FEC_C_version/fec_rs.cpp
// Function: main
int main()
{

    const int NUM = 8;
    printf("starting");
//  rscode *rsItem = new rscode();

    //all original data is 8, checksum data is 3, data stripe length is 1024
    rscode *rsItem = new rscode(11,3,1024);
    int *err = new int[NUM];

    // 1 means fault data
    for(int i=0; i<NUM; i++)
    {
        err[i] = 0;
    }

    rsItem->setData();
    rsItem->encoding();
    rsItem->outputData();


    // testing 3 errors, error disk sequence number is 0,1,3
    err[0]=1;
    err[1]=1;
    err[3]=1;
    rsItem->setErrData(err);
    rsItem->decoding();
    rsItem->outputOrigin();

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x1d6a(%rip), %rdi      # 0x3004
xorl %eax, %eax
callq 0x1040
pushq $0x30
popq %rdi
callq 0x10b0
movq %rax, %rbx
pushq $0xb
popq %rsi
pushq $0x3
popq %rdx
movq %rax, %rdi
movl $0x400, %ecx            # imm = 0x400
callq 0x1346
pushq $0x20
popq %rdi
callq 0x1030
movq %rax, %r14
xorl %eax, %eax
cmpq $0x8, %rax
je 0x12dc
andl $0x0, (%r14,%rax,4)
incq %rax
jmp 0x12cc
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x8(%rax)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x18(%rax)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x30(%rax)
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, (%r14)
movl $0x1, 0xc(%r14)
movq (%rbx), %rax
movq %rbx, %rdi
movq %r14, %rsi
callq *(%rax)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x20(%rax)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x28(%rax)
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
pushq $0x30
popq %rsi
movq %rbx, %rdi
callq 0x10c0
movq %r14, %rdi
callq 0x1130