LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/abaheti95[P]HMM-LDA/Models/cpp_hmm_lda/model.cpp
// Function: HMMLDA::~HMMLDA()
HMMLDA::~HMMLDA() {
	// Free up the 2d vectors
	int n_documents = documents.size();
	for(int document_idx = 0; document_idx < n_documents; document_idx++){
		documents[document_idx].clear();
		class_assignments[document_idx].clear();
		topic_assignments[document_idx].clear();
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0xa8(%rdi), %r14
movq 0xa8(%rdi), %rcx
movq 0xb0(%rdi), %rax
subq %rcx, %rax
pushq $0x18
popq %rsi
cqto
idivq %rsi
leaq 0xd8(%rdi), %r12
movq 0xd8(%rdi), %rdx
leaq 0xc0(%rdi), %r15
movq 0xc0(%rdi), %rsi
xorl %edi, %edi
testl %eax, %eax
cmovlel %edi, %eax
imulq $0x18, %rax, %rax
cmpq %rdi, %rax
je 0x2968
movq (%rcx,%rdi), %r8
cmpq %r8, 0x8(%rcx,%rdi)
je 0x2942
movq %r8, 0x8(%rcx,%rdi)
movq (%rdx,%rdi), %r8
cmpq %r8, 0x8(%rdx,%rdi)
je 0x2952
movq %r8, 0x8(%rdx,%rdi)
movq (%rsi,%rdi), %r8
cmpq %r8, 0x8(%rsi,%rdi)
je 0x2962
movq %r8, 0x8(%rsi,%rdi)
addq $0x18, %rdi
jmp 0x292d
leaq 0x168(%rbx), %rdi
callq 0x571a
leaq 0x150(%rbx), %rdi
callq 0x571a
leaq 0x138(%rbx), %rdi
callq 0x4e0a
leaq 0x120(%rbx), %rdi
callq 0x4e0a
leaq 0x108(%rbx), %rdi
callq 0x4e0a
leaq 0xf0(%rbx), %rdi
callq 0x4e0a
movq %r12, %rdi
callq 0x4e0a
movq %r15, %rdi
callq 0x4e0a
movq %r14, %rdi
callq 0x4e0a
leaq 0x70(%rbx), %rdi
callq 0x53f4
leaq 0x58(%rbx), %rdi
callq 0x4e36
addq $0x38, %rbx
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x20f0
// File: /workspace/github_cpp_makefile_star2_O2/abaheti95[P]HMM-LDA/Models/cpp_hmm_lda/model.cpp
// Function: HMMLDA::add_document(std::vector<int, std::allocator<int>>)
void HMMLDA::add_document(vector<int> document) {
	documents.push_back(document);
	// Sample random topics and classes for the words
	vector<int> topic_assignment(document.size(), 0);
	vector<int> class_assignment(document.size(), 0);
	int doc_size = document.size();
	for(int i = 0; i < doc_size; i++) {
		topic_assignment[i] = topic_dist(rng);
		if(document[i] == start_word_id)
			class_assignment[i] = START_WORD_CLASS;
		else if(document[i] ==  end_word_id)
			class_assignment[i] = END_WORD_CLASS;
		else
			class_assignment[i] = class_dist(rng);
	}
	// cout << "Printing topic assignments of a document" << endl;
	// print_vector<int>(topic_assignment);
	topic_assignments.push_back(topic_assignment);
	class_assignments.push_back(class_assignment);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
addq $0xa8, %rdi
callq 0x4f08
movq 0x8(%r14), %rsi
subq (%r14), %rsi
sarq $0x2, %rsi
leaq -0x58(%rbp), %rdx
andl $0x0, (%rdx)
leaq -0x70(%rbp), %rdi
leaq -0x30(%rbp), %r15
movq %r15, %rcx
callq 0x4f44
movq 0x8(%r14), %rsi
subq (%r14), %rsi
sarq $0x2, %rsi
andl $0x0, (%r15)
leaq -0x58(%rbp), %rdi
leaq -0x30(%rbp), %rdx
leaq -0x29(%rbp), %rcx
callq 0x4f44
movq 0x8(%r14), %r13
movq %r14, -0x40(%rbp)
subq (%r14), %r13
shrq $0x2, %r13
leaq 0x1508(%rbx), %r15
leaq 0x180(%rbx), %r12
leaq 0x1510(%rbx), %rax
movq %rax, -0x38(%rbp)
xorl %r14d, %r14d
testl %r13d, %r13d
cmovlel %r14d, %r13d
cmpq %r14, %r13
je 0x2b13
movq %r15, %rdi
movq %r12, %rsi
callq 0x4fa4
movq -0x70(%rbp), %rcx
movl %eax, (%rcx,%r14,4)
movq -0x40(%rbp), %rax
movq (%rax), %rax
movl (%rax,%r14,4), %eax
cmpl 0x8(%rbx), %eax
jne 0x2af0
movl 0x10(%rbx), %eax
jmp 0x2b06
cmpl 0xc(%rbx), %eax
jne 0x2afa
movl 0x14(%rbx), %eax
jmp 0x2b06
movq -0x38(%rbp), %rdi
movq %r12, %rsi
callq 0x4fa4
movq -0x58(%rbp), %rcx
movl %eax, (%rcx,%r14,4)
incq %r14
jmp 0x2ac3
leaq 0xc0(%rbx), %rdi
leaq -0x70(%rbp), %rsi
callq 0x4f08
addq $0xd8, %rbx
leaq -0x58(%rbp), %rsi
movq %rbx, %rdi
callq 0x4f08
leaq -0x58(%rbp), %rdi
callq 0x571a
leaq -0x70(%rbp), %rdi
callq 0x571a
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x2b6a
jmp 0x2b5e
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x571a
leaq -0x70(%rbp), %rdi
callq 0x571a
movq %rbx, %rdi
callq 0x2380
nop
// File: /workspace/github_cpp_makefile_star2_O2/abaheti95[P]HMM-LDA/Models/cpp_hmm_lda/model.cpp
// Function: HMMLDA::load_class_assignments(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
void HMMLDA::load_class_assignments(string &class_file) {
	cout << "Loading class assingments from " << class_file << endl;string str;
	ifstream file(class_file, ios::in);
	// Check if file is open
	if(!file.is_open()) {
		cout << "Couldn't open file: " << class_file << endl;
		exit(1);
	}
	getline(file, str);			// remove first line
	int n_documents = documents.size();
	for(int i = 0; i < n_documents; i++) {
		getline(file, str);
		stringstream ss(str);
		int doc_size = class_assignments[i].size();
		for(int j = 0; j < doc_size; j++) {
			int num;
			ss >> num;
			class_assignments[i][j] = num;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3c8, %rsp            # imm = 0x3C8
movq %rsi, %r14
movq %rdi, %rbx
movq 0x843b(%rip), %rdi      # 0xafd8
leaq 0x44ac(%rip), %rsi      # 0x7050
callq 0x2200
movq %rax, %rdi
movq %r14, %rsi
callq 0x21d0
movq %rax, %rdi
callq 0x2100
leaq -0x50(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq -0x268(%rbp), %rdi
pushq $0x8
popq %rdx
movq %r14, %rsi
callq 0x2330
leaq -0x1f0(%rbp), %rdi
callq 0x2070
testb %al, %al
je 0x2cea
leaq -0x268(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x2060
movq 0xb0(%rbx), %rax
subq 0xa8(%rbx), %rax
pushq $0x18
popq %rcx
cqto
idivq %rcx
xorl %ecx, %ecx
testl %eax, %eax
cmovlel %ecx, %eax
movq %rax, -0x40(%rbp)
leaq -0x60(%rbp), %r14
leaq -0x3f0(%rbp), %r13
xorl %eax, %eax
movq %rax, -0x38(%rbp)
cmpq -0x40(%rbp), %rax
je 0x2cc3
leaq -0x268(%rbp), %rdi
movq %r14, %rsi
callq 0x2060
movq %r13, %rdi
movq %r14, %rsi
pushq $0x18
popq %rdx
callq 0x2300
movq 0xd8(%rbx), %rax
imulq $0x18, -0x38(%rbp), %r14
movq 0x8(%rax,%r14), %r12
subq (%rax,%r14), %r12
shrq $0x2, %r12
testl %r12d, %r12d
movl $0x0, %eax
cmovlel %eax, %r12d
xorl %r15d, %r15d
cmpq %r15, %r12
je 0x2cab
movq %r13, %rdi
leaq -0x2c(%rbp), %rsi
callq 0x2140
movl -0x2c(%rbp), %eax
movq 0xd8(%rbx), %rcx
movq (%rcx,%r14), %rcx
movl %eax, (%rcx,%r15,4)
incq %r15
jmp 0x2c83
movq %r13, %rdi
callq 0x2190
movq -0x38(%rbp), %rax
incq %rax
leaq -0x60(%rbp), %r14
jmp 0x2c30
leaq -0x268(%rbp), %rdi
callq 0x2090
leaq -0x60(%rbp), %rdi
callq 0x20f0
addq $0x3c8, %rsp            # imm = 0x3C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x82e7(%rip), %rdi      # 0xafd8
leaq 0x4378(%rip), %rsi      # 0x7070
callq 0x2200
movq %rax, %rdi
movq %r14, %rsi
callq 0x21d0
movq %rax, %rdi
callq 0x2100
pushq $0x1
popq %rdi
callq 0x2250
movq %rax, %rbx
jmp 0x2d41
jmp 0x2d21
jmp 0x2d21
movq %rax, %rbx
jmp 0x2d35
movq %rax, %rbx
leaq -0x3f0(%rbp), %rdi
callq 0x2190
leaq -0x268(%rbp), %rdi
callq 0x2090
leaq -0x60(%rbp), %rdi
callq 0x20f0
movq %rbx, %rdi
callq 0x2380
// File: /workspace/github_cpp_makefile_star2_O2/abaheti95[P]HMM-LDA/Models/cpp_hmm_lda/model.cpp
// Function: HMMLDA::load_topic_assignments(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
void HMMLDA::load_topic_assignments(string &topic_file) {
	cout << "Loading topic assingments from " << topic_file << endl;string str;
	ifstream file(topic_file, ios::in);
	// Check if file is open
	if(!file.is_open()) {
		cout << "Couldn't open file: " << topic_file << endl;
		exit(1);
	}
	getline(file, str);			// remove first line
	int n_documents = documents.size();
	for(int i = 0; i < n_documents; i++) {
		getline(file, str);
		stringstream ss(str);
		int doc_size = topic_assignments[i].size();
		for(int j = 0; j < doc_size; j++) {
			int num;
			ss >> num;
			topic_assignments[i][j] = num;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3c8, %rsp            # imm = 0x3C8
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8265(%rip), %rdi      # 0xafd8
leaq 0x430b(%rip), %rsi      # 0x7085
callq 0x2200
movq %rax, %rdi
movq %r14, %rsi
callq 0x21d0
movq %rax, %rdi
callq 0x2100
leaq -0x50(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq -0x268(%rbp), %rdi
pushq $0x8
popq %rdx
movq %r14, %rsi
callq 0x2330
leaq -0x1f0(%rbp), %rdi
callq 0x2070
testb %al, %al
je 0x2ec0
leaq -0x268(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x2060
movq 0xb0(%rbx), %rax
subq 0xa8(%rbx), %rax
pushq $0x18
popq %rcx
cqto
idivq %rcx
xorl %ecx, %ecx
testl %eax, %eax
cmovlel %ecx, %eax
movq %rax, -0x40(%rbp)
leaq -0x60(%rbp), %r14
leaq -0x3f0(%rbp), %r13
xorl %eax, %eax
movq %rax, -0x38(%rbp)
cmpq -0x40(%rbp), %rax
je 0x2e99
leaq -0x268(%rbp), %rdi
movq %r14, %rsi
callq 0x2060
movq %r13, %rdi
movq %r14, %rsi
pushq $0x18
popq %rdx
callq 0x2300
movq 0xc0(%rbx), %rax
imulq $0x18, -0x38(%rbp), %r14
movq 0x8(%rax,%r14), %r12
subq (%rax,%r14), %r12
shrq $0x2, %r12
testl %r12d, %r12d
movl $0x0, %eax
cmovlel %eax, %r12d
xorl %r15d, %r15d
cmpq %r15, %r12
je 0x2e81
movq %r13, %rdi
leaq -0x2c(%rbp), %rsi
callq 0x2140
movl -0x2c(%rbp), %eax
movq 0xc0(%rbx), %rcx
movq (%rcx,%r14), %rcx
movl %eax, (%rcx,%r15,4)
incq %r15
jmp 0x2e59
movq %r13, %rdi
callq 0x2190
movq -0x38(%rbp), %rax
incq %rax
leaq -0x60(%rbp), %r14
jmp 0x2e06
leaq -0x268(%rbp), %rdi
callq 0x2090
leaq -0x60(%rbp), %rdi
callq 0x20f0
addq $0x3c8, %rsp            # imm = 0x3C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8111(%rip), %rdi      # 0xafd8
leaq 0x41a2(%rip), %rsi      # 0x7070
callq 0x2200
movq %rax, %rdi
movq %r14, %rsi
callq 0x21d0
movq %rax, %rdi
callq 0x2100
pushq $0x1
popq %rdi
callq 0x2250
movq %rax, %rbx
jmp 0x2f17
jmp 0x2ef7
jmp 0x2ef7
movq %rax, %rbx
jmp 0x2f0b
movq %rax, %rbx
leaq -0x3f0(%rbp), %rdi
callq 0x2190
leaq -0x268(%rbp), %rdi
callq 0x2090
leaq -0x60(%rbp), %rdi
callq 0x20f0
movq %rbx, %rdi
callq 0x2380
// File: /workspace/github_cpp_makefile_star2_O2/abaheti95[P]HMM-LDA/Models/cpp_hmm_lda/model.cpp
// Function: HMMLDA::train(int, int)
void HMMLDA::train(int iterations, int save_freq) {
	save_assignments(0);
	// Run Gibbs sampling
	// iterations = number of full samplings of the corpus
	int n_documents = documents.size();
	for(int i = 1; i <= iterations; i++) {
		std::clock_t start = std::clock();
		for(int document_idx = 0; document_idx < n_documents; document_idx++) {
			int doc_size = documents[document_idx].size();
			for(int word_idx = 0; word_idx < doc_size; word_idx++) {
				draw_class(document_idx, word_idx, doc_size);
				draw_topic(document_idx, word_idx, doc_size);
			}
		}
		std::cout << "Time for iteration " << i <<": " << (std::clock() - start) / (double)(CLOCKS_PER_SEC) << " s" << endl;
		if((i%save_freq) == 0)
			save_assignments(i);
		// cout << endl << endl << endl << endl;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, -0x2c(%rbp)
movl %esi, %r14d
movq %rdi, %r15
xorl %ebx, %ebx
xorl %esi, %esi
callq 0x3344
movq 0xb0(%r15), %rax
subq 0xa8(%r15), %rax
pushq $0x18
popq %rcx
cqto
idivq %rcx
testl %eax, %eax
cmovlel %ebx, %eax
movq %rax, -0x48(%rbp)
testl %r14d, %r14d
cmovlel %ebx, %r14d
incl %r14d
movl %r14d, -0x30(%rbp)
pushq $0x1
popq %r14
cmpl -0x30(%rbp), %r14d
je 0x3335
movl %r14d, -0x34(%rbp)
callq 0x2150
movq %rax, -0x40(%rbp)
xorl %r14d, %r14d
cmpq -0x48(%rbp), %r14
je 0x32ae
movq 0xa8(%r15), %rax
imulq $0x18, %r14, %rcx
movq 0x8(%rax,%rcx), %rbx
subq (%rax,%rcx), %rbx
shrq $0x2, %rbx
xorl %r13d, %r13d
testl %ebx, %ebx
movl $0x0, %r12d
cmovgl %ebx, %r12d
cmpl %r13d, %r12d
je 0x32a9
movq %r15, %rdi
movl %r14d, %esi
movl %r13d, %edx
movl %ebx, %ecx
callq 0x379e
movq %r15, %rdi
movl %r14d, %esi
movl %r13d, %edx
callq 0x3dd0
incl %r13d
jmp 0x3281
incq %r14
jmp 0x3254
movq 0x7d23(%rip), %rdi      # 0xafd8
leaq 0x3de9(%rip), %rsi      # 0x70a5
callq 0x2200
movq %rax, %rdi
movl -0x34(%rbp), %r14d
movl %r14d, %esi
callq 0x2370
movq %rax, %rdi
leaq 0x3da8(%rip), %rsi      # 0x7082
callq 0x2200
movq %rax, %rbx
callq 0x2150
subq -0x40(%rbp), %rax
cvtsi2sd %rax, %xmm0
divsd 0x3d10(%rip), %xmm0     # 0x7008
movq %rbx, %rdi
callq 0x2320
movq %rax, %rdi
leaq 0x3daf(%rip), %rsi      # 0x70b9
callq 0x2200
movq %rax, %rdi
callq 0x2100
movl %r14d, %eax
cltd
idivl -0x2c(%rbp)
testl %edx, %edx
jne 0x332d
movq %r15, %rdi
movl %r14d, %esi
callq 0x3344
incl %r14d
jmp 0x323a
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/abaheti95[P]HMM-LDA/Models/cpp_hmm_lda/model.cpp
// Function: HMMLDA::add_counts_for_new_document(std::vector<int, std::allocator<int>>&, std::vector<int, std::allocator<int>>&, std::vector<int, std::allocator<int>>&, std::vector<int, std::allocator<int>>&, int)
void HMMLDA::add_counts_for_new_document(vector<int> &document, vector<int> &topic_assignment, vector<int> &class_assignment, vector<int> &num_words_in_document_assigned_to_topic, int doc_size) {
	int previous_class = -1;
	for(int word_idx = 0; word_idx < doc_size; word_idx++) {
		int word = document[word_idx];
		if(class_assignment[word_idx] == 0) {		// Count the topic only when the class is 0
			//TODO: Think about how to implement num_words_in_doc_assigned_to_topic for a new document
			num_words_in_document_assigned_to_topic[topic_assignment[word_idx]]++;
			num_same_words_assigned_to_topic[word][topic_assignment[word_idx]]++;
			num_words_assigned_to_topic[topic_assignment[word_idx]]++;
		}
		num_same_words_assigned_to_class[word][class_assignment[word_idx]]++;
		num_words_assigned_to_class[class_assignment[word_idx]]++;
		int current_class = class_assignment[word_idx];
		if(previous_class != -1)
			num_transitions[previous_class][current_class]++;
		previous_class = current_class;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq (%rsi), %rax
movq (%rcx), %rcx
movq (%rdx), %rdx
movq (%r8), %rsi
movq %rsi, -0x30(%rbp)
movq 0x108(%rdi), %r8
movq 0x120(%rdi), %r10
movq 0x150(%rdi), %r11
movq 0x168(%rdi), %rbx
movq 0x138(%rdi), %rdi
xorl %r14d, %r14d
testl %r9d, %r9d
cmovlel %r14d, %r9d
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
cmpq %r14, %r9
je 0x40bb
movslq (%rax,%r14,4), %r12
movl (%rcx,%r14,4), %r13d
testl %r13d, %r13d
jne 0x4081
movslq (%rdx,%r14,4), %r13
movq -0x30(%rbp), %rsi
incl (%rsi,%r13,4)
imulq $0x18, %r12, %r13
movslq (%rdx,%r14,4), %rsi
movq (%r8,%r13), %r13
incl (%r13,%rsi,4)
movslq (%rdx,%r14,4), %rsi
incl (%r11,%rsi,4)
movl (%rcx,%r14,4), %r13d
imulq $0x18, %r12, %rsi
movslq %r13d, %r12
movq (%r10,%rsi), %rsi
incl (%rsi,%r12,4)
movslq (%rcx,%r14,4), %rsi
incl (%rbx,%rsi,4)
movl (%rcx,%r14,4), %r12d
cmpl $-0x1, %r15d
je 0x40b3
movslq %r12d, %rsi
movslq %r15d, %r15
imulq $0x18, %r15, %r15
movq (%rdi,%r15), %r15
incl (%r15,%rsi,4)
incq %r14
movl %r12d, %r15d
jmp 0x4046
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/abaheti95[P]HMM-LDA/Models/cpp_hmm_lda/model.cpp
// Function: HMMLDA::remove_counts_for_new_document(std::vector<int, std::allocator<int>>&, std::vector<int, std::allocator<int>>&, std::vector<int, std::allocator<int>>&, std::vector<int, std::allocator<int>>&, int)
void HMMLDA::remove_counts_for_new_document(vector<int> &document, vector<int> &topic_assignment, vector<int> &class_assignment, vector<int> &num_words_in_document_assigned_to_topic, int doc_size) {
	int previous_class = -1;
	for(int word_idx = 0; word_idx < doc_size; word_idx++) {
		int word = document[word_idx];
		if(class_assignment[word_idx] == 0) {		// Count the topic only when the class is 0
			num_words_in_document_assigned_to_topic[topic_assignment[word_idx]]--;
			num_same_words_assigned_to_topic[word][topic_assignment[word_idx]]--;
			num_words_assigned_to_topic[topic_assignment[word_idx]]--;
		}
		num_same_words_assigned_to_class[word][class_assignment[word_idx]]--;
		num_words_assigned_to_class[class_assignment[word_idx]]--;
		int current_class = class_assignment[word_idx];
		if(previous_class != -1)
			num_transitions[previous_class][current_class]--;
		previous_class = current_class;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq (%rsi), %rax
movq (%rcx), %rcx
movq (%rdx), %rdx
movq (%r8), %rsi
movq %rsi, -0x30(%rbp)
movq 0x108(%rdi), %r8
movq 0x120(%rdi), %r10
movq 0x150(%rdi), %r11
movq 0x168(%rdi), %rbx
movq 0x138(%rdi), %rdi
xorl %r14d, %r14d
testl %r9d, %r9d
cmovlel %r14d, %r9d
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
cmpq %r14, %r9
je 0x418b
movslq (%rax,%r14,4), %r12
movl (%rcx,%r14,4), %r13d
testl %r13d, %r13d
jne 0x4151
movslq (%rdx,%r14,4), %r13
movq -0x30(%rbp), %rsi
decl (%rsi,%r13,4)
imulq $0x18, %r12, %r13
movslq (%rdx,%r14,4), %rsi
movq (%r8,%r13), %r13
decl (%r13,%rsi,4)
movslq (%rdx,%r14,4), %rsi
decl (%r11,%rsi,4)
movl (%rcx,%r14,4), %r13d
imulq $0x18, %r12, %rsi
movslq %r13d, %r12
movq (%r10,%rsi), %rsi
decl (%rsi,%r12,4)
movslq (%rcx,%r14,4), %rsi
decl (%rbx,%rsi,4)
movl (%rcx,%r14,4), %r12d
cmpl $-0x1, %r15d
je 0x4183
movslq %r12d, %rsi
movslq %r15d, %r15
imulq $0x18, %r15, %r15
movq (%rdi,%r15), %r15
decl (%r15,%rsi,4)
incq %r14
movl %r12d, %r15d
jmp 0x4116
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/abaheti95[P]HMM-LDA/Models/cpp_hmm_lda/model.cpp
// Function: HMMLDA::input_to_document(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&, std::vector<int, std::allocator<int>>&, std::vector<int, std::allocator<int>>&, std::vector<int, std::allocator<int>>&)
int HMMLDA::input_to_document(vector<string> &words, vector<int> &document, vector<int> &topic_assignment, vector<int> &class_assignment) {
	for(int i = 0; i < (int)words.size(); i++) {
		document[i] = vocab_dict[words[i]];
		topic_assignment[i] = topic_dist(rng);
		if(document[i] == start_word_id)
			class_assignment[i] = START_WORD_CLASS;
		else if(document[i] ==  end_word_id)
			class_assignment[i] = END_WORD_CLASS;
		else
			class_assignment[i] = class_dist(rng);
	}
	return words.size();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, -0x58(%rbp)
movq %rcx, -0x50(%rbp)
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
leaq 0x70(%rdi), %rax
movq %rax, -0x48(%rbp)
leaq 0x1508(%rdi), %rax
movq %rax, -0x40(%rbp)
leaq 0x180(%rdi), %rax
movq %rax, -0x30(%rbp)
leaq 0x1510(%rdi), %rax
movq %rax, -0x38(%rbp)
xorl %r14d, %r14d
xorl %ebx, %ebx
movq (%r12), %rsi
movq 0x8(%r12), %rax
subq %rsi, %rax
shrq $0x5, %rax
movslq %eax, %rcx
cmpq %rcx, %rbx
jge 0x426a
addq %r14, %rsi
movq -0x48(%rbp), %rdi
callq 0x4e9e
movl (%rax), %eax
movq (%r15), %rcx
movl %eax, (%rcx,%rbx,4)
movq -0x40(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x4fa4
movq -0x50(%rbp), %rcx
movq (%rcx), %rcx
movl %eax, (%rcx,%rbx,4)
movq (%r15), %rax
movl (%rax,%rbx,4), %eax
cmpl 0x8(%r13), %eax
jne 0x423b
movl 0x10(%r13), %eax
jmp 0x4254
cmpl 0xc(%r13), %eax
jne 0x4247
movl 0x14(%r13), %eax
jmp 0x4254
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x4fa4
movq -0x58(%rbp), %rcx
movq (%rcx), %rcx
movl %eax, (%rcx,%rbx,4)
incq %rbx
addq $0x20, %r14
jmp 0x41e6
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/abaheti95[P]HMM-LDA/Models/cpp_hmm_lda/model.cpp
// Function: void split<std::back_insert_iterator<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char, std::back_insert_iterator<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>)
void split(const std::string &s, char delim, Out result) {
	std::stringstream ss;
	ss.str(s);
	std::string item;
	while (std::getline(ss, item, delim)) {
		*(result++) = item;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1b0, %rsp            # imm = 0x1B0
movq %rdx, %rbx
movl %esi, %r14d
movq %rdi, %r15
leaq -0x1c8(%rbp), %rdi
callq 0x2170
leaq -0x1b0(%rbp), %rdi
movq %r15, %rsi
callq 0x22d0
leaq -0x30(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movsbl %r14b, %r14d
leaq -0x1c8(%rbp), %r15
leaq -0x40(%rbp), %r12
movq %r15, %rdi
movq %r12, %rsi
movl %r14d, %edx
callq 0x2390
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x539a
movq %rbx, %rdi
movq %r12, %rsi
callq 0x4e62
jmp 0x5371
leaq -0x40(%rbp), %rdi
callq 0x20f0
leaq -0x1c8(%rbp), %rdi
callq 0x2190
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x53d2
jmp 0x53c6
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x20f0
leaq -0x1c8(%rbp), %rdi
callq 0x2190
movq %rbx, %rdi
callq 0x2380
// File: /workspace/github_cpp_makefile_star2_O2/abaheti95[P]HMM-LDA/cpp_hmm_lda_trainer.cpp
// Function: load_documents_to_model(HMMLDA&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
void load_documents_to_model(HMMLDA &model, string &documents_filename) {
	ifstream file(documents_filename, ios::in);
	string str;
	int counter = 0;
	while(getline(file, str)) {
		stringstream ss(str);
		int num;
		vector<int> document;
		while(ss >> num) {
			document.push_back(num);
		}
		model.add_document(document);
		counter ++;
		// if(counter == 10000) break;
		if(counter%1000000 == 0) {
			cout << counter << endl;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3f8, %rsp            # imm = 0x3F8
movq %rdi, -0x30(%rbp)
leaq -0x290(%rbp), %rdi
pushq $0x8
popq %rdx
callq 0x2330
leaq -0x60(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
xorl %r15d, %r15d
leaq -0x418(%rbp), %r13
leaq -0x34(%rbp), %r14
leaq -0x50(%rbp), %rbx
leaq -0x88(%rbp), %r12
leaq -0x290(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x2060
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x6c11
movq %r13, %rdi
leaq -0x70(%rbp), %rsi
pushq $0x18
popq %rdx
callq 0x2300
xorps %xmm0, %xmm0
movaps %xmm0, -0x50(%rbp)
andq $0x0, -0x40(%rbp)
movq %r13, %rdi
movq %r14, %rsi
callq 0x2140
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x6bb3
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6e54
jmp 0x6b8d
movq %r12, %rdi
movq %rbx, %rsi
callq 0x5e12
movq -0x30(%rbp), %rdi
movq %r12, %rsi
callq 0x2a2c
movq %r12, %rdi
callq 0x571a
incl %r15d
movl %r15d, %eax
xorl %edx, %edx
movl $0xf4240, %ecx          # imm = 0xF4240
divl %ecx
testl %edx, %edx
jne 0x6bfc
movq 0x43ec(%rip), %rdi      # 0xafd8
movl %r15d, %esi
callq 0x2370
movq %rax, %rdi
callq 0x2100
movq %rbx, %rdi
callq 0x571a
movq %r13, %rdi
callq 0x2190
jmp 0x6b50
leaq -0x70(%rbp), %rdi
callq 0x20f0
leaq -0x290(%rbp), %rdi
callq 0x2090
addq $0x3f8, %rsp            # imm = 0x3F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x88(%rbp), %rdi
callq 0x571a
jmp 0x6c55
jmp 0x6c4b
movq %rax, %rbx
jmp 0x6c6a
jmp 0x6c52
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x571a
leaq -0x418(%rbp), %rdi
callq 0x2190
leaq -0x70(%rbp), %rdi
callq 0x20f0
leaq -0x290(%rbp), %rdi
callq 0x2090
movq %rbx, %rdi
callq 0x2380
// File: /workspace/github_cpp_makefile_star2_O2/iZhangHui[P]CppPrimer/CH06_Functions/examples/wdebug.cc
// Function: main
int main()
{
    string word = "foo";
    const string::size_type threshold = 5;
    if (word.size() < threshold) 
        cerr << "Error: " << __FILE__
             << " : in function " << __func__ 
             << " at line " << __LINE__ << endl
             << "       Compiled on " << __DATE__ 
             << " at " << __TIME__ << endl
             << "       Word read was \"" << word 
             << "\":  Length too short" << endl;
    word = "something longer than five chars";
    assert(word.size() > threshold);

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x28, %rsp
leaq 0xd9b(%rip), %rsi       # 0x201b
leaq -0x30(%rbp), %rbx
leaq -0x9(%rbp), %rdx
movq %rbx, %rdi
callq 0x1030
cmpq $0x4, 0x8(%rbx)
ja 0x1373
movq 0x2d4e(%rip), %rdi      # 0x3ff0
leaq 0xd76(%rip), %rsi       # 0x201f
callq 0x10a0
leaq 0xd72(%rip), %rsi       # 0x2027
movq %rax, %rdi
callq 0x10a0
leaq 0xd6d(%rip), %rsi       # 0x2031
movq %rax, %rdi
callq 0x10a0
leaq 0xd6e(%rip), %rsi       # 0x2041
movq %rax, %rdi
callq 0x10a0
leaq 0xd64(%rip), %rsi       # 0x2046
movq %rax, %rdi
callq 0x10a0
pushq $0x3f
popq %rsi
movq %rax, %rdi
callq 0x10c0
movq %rax, %rdi
callq 0x1050
leaq 0xd4c(%rip), %rsi       # 0x2050
movq %rax, %rdi
callq 0x10a0
leaq 0xd51(%rip), %rsi       # 0x2064
movq %rax, %rdi
callq 0x10a0
leaq 0xd4e(%rip), %rsi       # 0x2070
movq %rax, %rdi
callq 0x10a0
leaq 0xd44(%rip), %rsi       # 0x2075
movq %rax, %rdi
callq 0x10a0
movq %rax, %rdi
callq 0x1050
leaq 0xd36(%rip), %rsi       # 0x207e
movq %rax, %rdi
callq 0x10a0
leaq -0x30(%rbp), %rsi
movq %rax, %rdi
callq 0x1090
leaq 0xd32(%rip), %rsi       # 0x2095
movq %rax, %rdi
callq 0x10a0
movq %rax, %rdi
callq 0x1050
leaq 0xd30(%rip), %rsi       # 0x20aa
leaq -0x30(%rbp), %rdi
callq 0x10e0
cmpq $0x5, -0x28(%rbp)
jbe 0x139c
leaq -0x30(%rbp), %rdi
callq 0x1040
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %rbp
retq
leaq 0xd28(%rip), %rdi       # 0x20cb
leaq 0xc7d(%rip), %rsi       # 0x2027
leaq 0xd32(%rip), %rcx       # 0x20e3
pushq $0x45
popq %rdx
callq 0x1060
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
callq 0x1040
movq %rbx, %rdi
callq 0x10d0
// File: /workspace/github_cpp_makefile_star2_O2/Doug0855[P]TigerZone/main.cpp
// Function: printToTextFile(Board)
void printToTextFile(Board gameboard) //Prints the game board to a text file
{
	std::ofstream out_data("Levels/level.txt");
	out_data << "Level:" << std::endl;
	for (auto& inner : gameboard.m_board)
	{
		for (auto& item : inner)
		{
			if (item != NULL)
				out_data << item->getRotations() << item->getType();
			else
				out_data << '0' << '.';

		}
		out_data << std::endl;
	}
	out_data.close();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rdi, %rbx
leaq 0xe8aa(%rip), %rsi      # 0x12004
leaq -0x230(%rbp), %r14
pushq $0x10
popq %rdx
movq %r14, %rdi
callq 0x3230
leaq 0xe8a2(%rip), %rsi      # 0x12015
movq %r14, %rdi
callq 0x3200
movq %rax, %rdi
callq 0x3140
movq (%rbx), %r15
movq 0x8(%rbx), %rax
movq %rax, -0x30(%rbp)
leaq -0x230(%rbp), %rbx
pushq $0x30
popq %r14
cmpq -0x30(%rbp), %r15
je 0x37f3
movq (%r15), %r13
movq 0x8(%r15), %r12
cmpq %r12, %r13
je 0x37e5
movq (%r13), %rax
testq %rax, %rax
je 0x37c7
movl (%rax), %esi
movq %rbx, %rdi
callq 0x3390
movq (%r13), %rcx
movb 0x8(%rcx), %cl
jmp 0x37d4
movq %rbx, %rdi
movl %r14d, %esi
callq 0x3260
movb $0x2e, %cl
movsbl %cl, %esi
movq %rax, %rdi
callq 0x3260
addq $0x8, %r13
jmp 0x37a6
movq %rbx, %rdi
callq 0x3140
addq $0x18, %r15
jmp 0x3799
leaq -0x230(%rbp), %rdi
callq 0x32d0
leaq -0x230(%rbp), %rdi
callq 0x3310
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3821
jmp 0x3821
movq %rax, %rbx
leaq -0x230(%rbp), %rdi
callq 0x3310
movq %rbx, %rdi
callq 0x33c0
// File: /workspace/github_cpp_makefile_star2_O2/Doug0855[P]TigerZone/main.cpp
// Function: printBoard(Board)
void printBoard(Board gameBoard) //debugging
{
	std::cout<<"in print board"<<std::endl;
	// Print out gameboard
	std::cout << "size of gameBoard is: " << gameBoard.m_board.size() << " x " << gameBoard.m_board[0].size() << std::endl;
	for(int i = 0; i < gameBoard.m_board.size(); i++)
	{
		std::cout << std::setw(3) << i << ' ';
		for(int j = 0; j < gameBoard.m_board[i].size(); j++)
		{
				if (gameBoard.m_board[i][j] != NULL)
					std::cout << GREEN <<  gameBoard.m_board[i][j]->getRotations() << gameBoard.m_board[i][j]->getType() << WHITE << RESET;
				else
					std::cout << std::setw(2) << '.';
		}
		std::cout<<std::endl;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x15770(%rip), %r14     # 0x18fc0
leaq 0xe7c5(%rip), %rsi      # 0x1201c
movq %r14, %rdi
callq 0x3200
movq %rax, %rdi
callq 0x3140
leaq 0xe7bd(%rip), %rsi      # 0x1202b
movq %r14, %rdi
callq 0x3200
movq %rax, %rdi
movq 0x8(%rbx), %rax
subq (%rbx), %rax
pushq $0x18
popq %rcx
cqto
idivq %rcx
movq %rax, %rsi
callq 0x3190
leaq 0xe7ab(%rip), %rsi      # 0x12042
movq %rax, %rdi
callq 0x3200
movq (%rbx), %rcx
movq 0x8(%rcx), %rsi
subq (%rcx), %rsi
sarq $0x3, %rsi
movq %rax, %rdi
callq 0x3190
movq %rax, %rdi
callq 0x3140
xorl %r15d, %r15d
leaq 0xe78b(%rip), %r13      # 0x12052
movq 0x8(%rbx), %rax
subq (%rbx), %rax
cqto
pushq $0x18
popq %rcx
idivq %rcx
cmpq %r15, %rax
jbe 0x39c1
movq (%r14), %rax
movq -0x18(%rax), %rax
movq $0x3, 0x10(%r14,%rax)
movq %r14, %rdi
movl %r15d, %esi
callq 0x3390
movq %rax, %rdi
pushq $0x20
popq %rsi
callq 0x3260
movq %r15, -0x30(%rbp)
imulq $0x18, %r15, %r12
xorl %r15d, %r15d
movq (%rbx), %rcx
movq (%rcx,%r12), %rax
movq 0x8(%rcx,%r12), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r15, %rcx
jbe 0x39ad
cmpq $0x0, (%rax,%r15,8)
je 0x398a
movq %r14, %rdi
leaq 0xe709(%rip), %rsi      # 0x12046
callq 0x3200
movq (%rbx), %rcx
movq (%rcx,%r12), %rcx
movq (%rcx,%r15,8), %rcx
movl (%rcx), %esi
movq %rax, %rdi
callq 0x3390
movq (%rbx), %rcx
movq (%rcx,%r12), %rcx
movq (%rcx,%r15,8), %rcx
movsbl 0x8(%rcx), %esi
movq %rax, %rdi
callq 0x3260
movq %rax, %rdi
leaq 0xe6d4(%rip), %rsi      # 0x1204c
callq 0x3200
movq %rax, %rdi
movq %r13, %rsi
callq 0x3200
jmp 0x39a5
movq (%r14), %rax
movq -0x18(%rax), %rax
movq $0x2, 0x10(%r14,%rax)
movq %r14, %rdi
pushq $0x2e
popq %rsi
callq 0x3260
incq %r15
jmp 0x3910
movq %r14, %rdi
callq 0x3140
movq -0x30(%rbp), %r15
incq %r15
jmp 0x38c7
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Doug0855[P]TigerZone/main.cpp
// Function: printStack(TileStack)
void printStack(TileStack stack) //debugging
{
	/*print tile stack content for debugging*/
	std::cout << "TileStack content(" << stack.tiles.size() << "): ";
	for(int i = 0; i < stack.tiles.size(); i++) {
		Tile tile = stack.tiles[i];
		std::cout << tile.getType() << ' ';
	}
	std::cout << std::endl;/**/
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rdi, %rbx
movq 0x155d2(%rip), %rdi     # 0x18fc0
leaq 0xe662(%rip), %rsi      # 0x12057
callq 0x3200
movq %rax, %rdi
movq 0x8(%rbx), %rax
subq (%rbx), %rax
movl $0xe8, %ecx
cqto
idivq %rcx
movq %rax, %rsi
callq 0x3190
leaq 0xe64d(%rip), %rsi      # 0x1206a
movq %rax, %rdi
callq 0x3200
xorl %r14d, %r14d
leaq -0x110(%rbp), %r15
pushq $0x20
popq %r12
xorl %r13d, %r13d
movq (%rbx), %rsi
movq 0x8(%rbx), %rax
subq %rsi, %rax
cqto
movl $0xe8, %ecx
idivq %rcx
cmpq %r13, %rax
jbe 0x3a8c
addq %r14, %rsi
movq %r15, %rdi
callq 0x60b0
movsbl -0x108(%rbp), %esi
movq 0x15558(%rip), %rdi     # 0x18fc0
callq 0x3260
movq %rax, %rdi
movl %r12d, %esi
callq 0x3260
movq %r15, %rdi
callq 0x10e3c
incq %r13
addq $0xe8, %r14
jmp 0x3a36
movq 0x1552d(%rip), %rdi     # 0x18fc0
callq 0x3140
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x110(%rbp), %rdi
callq 0x10e3c
movq %rbx, %rdi
callq 0x33c0
// File: /workspace/github_cpp_makefile_star2_O2/Doug0855[P]TigerZone/main.cpp
// Function: parseMessageList(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
std::string parseMessageList(std::string &msg) //finds and returns the first message in the message list
{
	std::string token;
	std::string delimiter = "\r\n";
	size_t pos = 0;

	pos = msg.find(delimiter);
	token = msg.substr(0, pos);
	msg.erase(0, pos + delimiter.length());

	return token;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
leaq 0xec26(%rip), %rsi      # 0x12713
leaq -0x40(%rbp), %rdi
leaq -0x60(%rbp), %rdx
callq 0x30e0
leaq -0x40(%rbp), %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x3440
movq %rax, %r15
leaq -0x60(%rbp), %rdi
movq %r14, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x3220
leaq -0x60(%rbp), %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x3280
movq %r12, %rdi
callq 0x3120
addq -0x38(%rbp), %r15
movq %r14, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x3060
leaq -0x40(%rbp), %rdi
callq 0x3120
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3b5f
movq %rax, %r14
leaq -0x40(%rbp), %rdi
callq 0x3120
jmp 0x3b70
movq %rax, %r14
movq %rbx, %rdi
callq 0x3120
movq %r14, %rdi
callq 0x33c0
// File: /workspace/github_cpp_makefile_star2_O2/Doug0855[P]TigerZone/main.cpp
// Function: getMesssage(Client&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
std::string getMesssage(Client &client, std::string &msg_list) //Updates the message list and then parses for the first message to return.
{
	std::string msg;
	if (msg_list.empty())
	{
		msg_list = client.receiveMessage();
		//msg_list = "NEW CHALLENGE 1 YOU WILL PLAY 1 MATCH\r\nBEGIN ROUND 1 OF 1\r\nYOUR OPPONENT IS PLAYER Blue";
		msg = parseMessageList(msg_list);
	}
	else msg = parseMessageList(msg_list);
	/*#ifdef DEBUG
		std::cout << "Message got: " << msg << std::endl;
	#endif*/

	return msg;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
cmpq $0x0, 0x8(%rdx)
je 0x3bb8
leaq -0x38(%rbp), %rdi
movq %r14, %rsi
callq 0x3ac1
jmp 0x3be4
leaq -0x38(%rbp), %rdi
callq 0xafe0
leaq -0x38(%rbp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x3280
movq %r15, %rdi
callq 0x3120
leaq -0x38(%rbp), %rdi
movq %r14, %rsi
callq 0x3ac1
leaq -0x38(%rbp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3280
movq %r14, %rdi
callq 0x3120
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3c0d
jmp 0x3c0d
movq %rax, %r14
movq %rbx, %rdi
callq 0x3120
movq %r14, %rdi
callq 0x33c0
// File: /workspace/github_cpp_makefile_star2_O2/Doug0855[P]TigerZone/Adapter.cpp
// Function: Adapter::numRotations(int)
int Adapter::numRotations(const int x) {
	int numRotations = 0;
	if (x == 90)
		return numRotations = 1;
	if (x == 180)
		return numRotations = 2;
	if (x == 270)
		return numRotations = 3;

	return numRotations;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpl $0x5a, %esi
je 0x7e45
cmpl $0x10e, %esi            # imm = 0x10E
je 0x7e3e
cmpl $0xb4, %esi
jne 0x7e4c
movl $0x2, %eax
jmp 0x7e4e
movl $0x3, %eax
jmp 0x7e4e
movl $0x1, %eax
jmp 0x7e4e
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Doug0855[P]TigerZone/Adapter.cpp
// Function: Adapter::convertExpression(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
std::vector<std::string> Adapter::convertExpression(const std::string& expr) {
	// Convert to stream
	std::istringstream buf(expr);
	std::istream_iterator<std::string> begin(buf), end;

	// Store in vector and return
	std::vector<std::string> myV(begin, end);
	return myV;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x250, %rsp            # imm = 0x250
movq %rdi, %r14
leaq -0x258(%rbp), %rbx
pushq $0x8
popq %rax
movq %rbx, %rdi
movq %rdx, %rsi
movl %eax, %edx
callq 0x3380
leaq -0xa8(%rbp), %rdi
movq %rbx, %rsi
callq 0x8f14
leaq -0xd0(%rbp), %rbx
andq $0x0, -0x8(%rbx)
leaq -0xc0(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
xorl %ecx, %ecx
movb %cl, (%rax)
movb %cl, 0x10(%rax)
leaq -0x78(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x8f54
leaq -0x48(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
callq 0x8f54
leaq -0x78(%rbp), %rsi
leaq -0x48(%rbp), %rdx
leaq -0x11(%rbp), %rcx
movq %r14, %rdi
callq 0x8f80
leaq -0x40(%rbp), %rdi
callq 0x3120
leaq -0x70(%rbp), %rdi
callq 0x3120
movq %rbx, %rdi
callq 0x3120
leaq -0xa0(%rbp), %rdi
callq 0x3120
leaq -0x258(%rbp), %rdi
callq 0x3130
movq %r14, %rax
addq $0x250, %rsp            # imm = 0x250
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
leaq -0x40(%rbp), %rdi
callq 0x3120
jmp 0x7f30
movq %rax, %r14
leaq -0x70(%rbp), %rdi
callq 0x3120
jmp 0x7f3e
movq %rax, %r14
movq %rbx, %rdi
callq 0x3120
leaq -0xa0(%rbp), %rdi
callq 0x3120
jmp 0x7f57
movq %rax, %r14
leaq -0x258(%rbp), %rdi
callq 0x3130
movq %r14, %rdi
callq 0x33c0
nop
// File: /workspace/github_cpp_makefile_star2_O2/Doug0855[P]TigerZone/Adapter.cpp
// Function: Adapter::get(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
std::string Adapter::get(const std::string& prop) {
	if (prop == "pid")
		return this->playerID;
	if (prop == "rid")
		return this->roundID;
	if (prop == "score")
		return this->score;
	if (prop == "challenges")
		return this->numChallenges;
	if (prop == "rounds")
		return this->numRounds;
	if (prop == "ptime")
		return this->planTime;
	if (prop == "mtime")
		return this->moveTime;

	return "Error";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xa57b(%rip), %rsi      # 0x12501
movq %rdx, %rdi
callq 0x6261
testb %al, %al
jne 0x8033
leaq 0xa568(%rip), %rsi      # 0x12505
movq %r15, %rdi
callq 0x6261
testb %al, %al
je 0x7fb2
addq $0x20, %r14
jmp 0x8033
leaq 0xa550(%rip), %rsi      # 0x12509
movq %r15, %rdi
callq 0x6261
testb %al, %al
je 0x7fcb
addq $0x40, %r14
jmp 0x8033
leaq 0xa53d(%rip), %rsi      # 0x1250f
movq %r15, %rdi
callq 0x6261
testb %al, %al
je 0x7fe4
addq $0x60, %r14
jmp 0x8033
leaq 0xa52f(%rip), %rsi      # 0x1251a
movq %r15, %rdi
callq 0x6261
testb %al, %al
je 0x7ffd
subq $-0x80, %r14
jmp 0x8033
leaq 0xa51d(%rip), %rsi      # 0x12521
movq %r15, %rdi
callq 0x6261
testb %al, %al
je 0x8019
addq $0xa0, %r14
jmp 0x8033
leaq 0xa507(%rip), %rsi      # 0x12527
movq %r15, %rdi
callq 0x6261
testb %al, %al
je 0x804c
addq $0xc0, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x32c0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0xa4da(%rip), %rsi      # 0x1252d
leaq -0x19(%rbp), %rdx
movq %rbx, %rdi
callq 0x30e0
jmp 0x803e
nop
// File: /workspace/github_cpp_makefile_star2_O2/Doug0855[P]TigerZone/Adapter.cpp
// Function: Adapter::set(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Adapter::set(const std::string& prop, const std::string value) {
	if (prop == "pid")
		this->playerID = value;
	if (prop == "rid")
		this->roundID = value;
	if (prop == "score")
		this->score = value;
	if (prop == "challenges")
		this->numChallenges = value;
	if (prop == "rounds")
		this->numRounds = value;
	if (prop == "ptime")
		this->planTime = value;
	if (prop == "mtime")
		this->moveTime = value;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
leaq 0xa485(%rip), %rsi      # 0x12501
movq %r15, %rdi
callq 0x6261
testb %al, %al
je 0x8093
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3160
leaq 0xa46b(%rip), %rsi      # 0x12505
movq %r15, %rdi
callq 0x6261
testb %al, %al
je 0x80b2
leaq 0x20(%r14), %rdi
movq %rbx, %rsi
callq 0x3160
leaq 0xa450(%rip), %rsi      # 0x12509
movq %r15, %rdi
callq 0x6261
testb %al, %al
je 0x80d1
leaq 0x40(%r14), %rdi
movq %rbx, %rsi
callq 0x3160
leaq 0xa437(%rip), %rsi      # 0x1250f
movq %r15, %rdi
callq 0x6261
testb %al, %al
je 0x80f0
leaq 0x60(%r14), %rdi
movq %rbx, %rsi
callq 0x3160
leaq 0xa423(%rip), %rsi      # 0x1251a
movq %r15, %rdi
callq 0x6261
testb %al, %al
je 0x8112
leaq 0x80(%r14), %rdi
movq %rbx, %rsi
callq 0x3160
leaq 0xa408(%rip), %rsi      # 0x12521
movq %r15, %rdi
callq 0x6261
testb %al, %al
je 0x8134
leaq 0xa0(%r14), %rdi
movq %rbx, %rsi
callq 0x3160
leaq 0xa3ec(%rip), %rsi      # 0x12527
movq %r15, %rdi
callq 0x6261
testb %al, %al
je 0x8163
addq $0xc0, %r14
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x3160
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Doug0855[P]TigerZone/Adapter.cpp
// Function: Adapter::getTileString[abi:cxx11](int const&)
std::string Adapter::getTileString(const int& index) {
	// Error check
	if (index < 0 || index > this->tileList.size())
		return "Error";

	return this->tileList[index];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movslq (%rdx), %rcx
testq %rcx, %rcx
js 0x819c
movq %rsi, %rax
movq 0xe0(%rsi), %rsi
movq 0xe8(%rax), %rax
subq %rsi, %rax
sarq $0x5, %rax
cmpq %rcx, %rax
jae 0x81b1
leaq 0xa38a(%rip), %rsi      # 0x1252d
leaq -0x9(%rbp), %rdx
movq %rbx, %rdi
callq 0x30e0
jmp 0x81c0
shlq $0x5, %rcx
addq %rcx, %rsi
movq %rbx, %rdi
callq 0x32c0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Doug0855[P]TigerZone/Adapter.cpp
// Function: Adapter::convertZone(std::pair<int, int>)
int Adapter::convertZone(std::pair<int, int> location)
{
	int i = location.first;
	int j = location.second;

	if(i == 0)
	{
		if(j == 0) return 1;
		else if(j == 1) return 2;
		else if(j == 2) return 3;
	}
	else if(i == 1)
	{
		if(j == 0) return 4;
		else if(j == 1) return 5;
		else if(j == 2) return 6;
	}
	else if(i == 2)
	{
		if(j == 0) return 7;
		else if(j == 1) return 8;
		else if(j == 2) return 9;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rsi, %rcx
shrq $0x20, %rcx
cmpl $0x1, %esi
je 0x8226
testl %esi, %esi
jne 0x8232
testq %rcx, %rcx
jne 0x823e
movl $0x1, %eax
jmp 0x8263
testq %rcx, %rcx
jne 0x824b
movl $0x4, %eax
jmp 0x8263
testq %rcx, %rcx
jne 0x8258
movl $0x7, %eax
jmp 0x8263
xorl %eax, %eax
cmpl $0x1, %ecx
sete %al
xorl $0x3, %eax
jmp 0x8263
xorl %eax, %eax
cmpl $0x1, %ecx
setne %al
addl $0x5, %eax
jmp 0x8263
xorl %eax, %eax
cmpl $0x1, %ecx
sete %al
xorl $0x9, %eax
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/Doug0855[P]TigerZone/Adapter.cpp
// Function: Adapter::parseTileStack(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
values_t Adapter::parseTileStack(std::string message)
{
  std::string token, substr;
  std::string delimiter = " "; //delimiter between tiles
  size_t pos = 0;
  std::vector<int> tile_stack;
  int tile_num;
  values_t out;

  substr = message.substr(14,message.find(" TILE")-14); //get first string integer
  out.number_of_tiles = stoi(substr);
  substr = message.erase(0, message.find("[")+1); //get string starting with the first tile to start tokeninzing tiles
  for (int i = 0; i < out.number_of_tiles; i++)
  {
  	pos = substr.find(" ");
  	token = substr.substr(0, pos);
  	substr.erase(0, pos + 1);
  	tile_num = exprToTile(token);
  	tile_stack.push_back(tile_num);
  }
  return out;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdx, %r14
movq %rdi, %r12
leaq -0xa0(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
xorl %ecx, %ecx
movb %cl, (%rax)
leaq -0x60(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb %cl, (%rax)
leaq 0x9f11(%rip), %rsi      # 0x1264f
leaq -0xd0(%rbp), %rdi
leaq -0x90(%rbp), %rdx
callq 0x30e0
xorps %xmm0, %xmm0
movaps %xmm0, -0x50(%rbp)
andq $0x0, -0x40(%rbp)
movq %r12, %rdi
callq 0x900c
leaq 0x9de2(%rip), %rsi      # 0x1254e
movq %r14, %rdi
xorl %edx, %edx
callq 0x3430
leaq -0xe(%rax), %rcx
leaq -0x90(%rbp), %rdi
pushq $0xe
popq %rdx
movq %r14, %rsi
movq %r12, -0x30(%rbp)
callq 0x3220
leaq -0x70(%rbp), %rbx
leaq -0x90(%rbp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3280
movq %r15, %rdi
callq 0x3120
pushq $0xa
popq %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x64cc
movl %eax, (%r12)
leaq 0x9d8e(%rip), %rsi      # 0x12554
movq %r14, %rdi
xorl %edx, %edx
callq 0x3430
leaq 0x1(%rax), %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x3060
leaq -0x70(%rbp), %rdi
movq %rax, %rsi
callq 0x3160
xorl %r14d, %r14d
leaq -0x70(%rbp), %r15
leaq -0x90(%rbp), %r12
leaq -0xb0(%rbp), %r13
movq -0x30(%rbp), %rax
cmpl (%rax), %r14d
jge 0x886c
movq %r15, %rdi
leaq 0x9e3d(%rip), %rsi      # 0x1264f
xorl %edx, %edx
callq 0x3430
movq %rax, %rbx
movq %r12, %rdi
movq %r15, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x3220
movq %r13, %rdi
movq %r12, %rsi
callq 0x3280
movq %r12, %rdi
callq 0x3120
incq %rbx
movq %r15, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x3060
movq %r13, %rsi
callq 0x7b20
movl %eax, -0x34(%rbp)
leaq -0x50(%rbp), %rdi
leaq -0x34(%rbp), %rsi
callq 0x90f8
incl %r14d
jmp 0x87ff
leaq -0x50(%rbp), %rdi
callq 0x75ce
leaq -0xd0(%rbp), %rdi
callq 0x3120
leaq -0x70(%rbp), %rdi
callq 0x3120
leaq -0xb0(%rbp), %rdi
callq 0x3120
movq -0x30(%rbp), %rax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x88bc
movq %rax, %rbx
jmp 0x88c8
movq %rax, %rbx
jmp 0x88dd
jmp 0x88bc
jmp 0x88bc
movq %rax, %rbx
movq -0x30(%rbp), %rdi
callq 0x6228
leaq -0x50(%rbp), %rdi
callq 0x75ce
leaq -0xd0(%rbp), %rdi
callq 0x3120
leaq -0x70(%rbp), %rdi
callq 0x3120
leaq -0xb0(%rbp), %rdi
callq 0x3120
movq %rbx, %rdi
callq 0x33c0
// File: /workspace/github_cpp_makefile_star2_O2/Doug0855[P]TigerZone/Adapter.cpp
// Function: Adapter::parseMakeMove(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
values_t Adapter::parseMakeMove(std::string message)
{
  std::istringstream buffer(message);
  std::istream_iterator<std::string> beg(buffer), end;

  std::vector<std::string> messageWords(beg,end);   //Put all the words from the message into a vector

  std::string gameId = messageWords[5];       // Get the gameId from the string
  std::string tileType = messageWords[messageWords.size()-1]; //get the tileType that we are about to place
  std::string moveNum = messageWords[messageWords.size()-3];  //get the move number

  values_t out;
  out.gameId = gameId;
  out.tile_num = exprToTile(tileType);
  out.moveNumber = moveNum;

  return out;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x2b8, %rsp            # imm = 0x2B8
movq %rdi, %r14
leaq -0x2d0(%rbp), %rbx
pushq $0x8
popq %rax
movq %rbx, %rdi
movq %rdx, %rsi
movl %eax, %edx
callq 0x3380
leaq -0x120(%rbp), %rdi
movq %rbx, %rsi
callq 0x8f14
leaq -0x148(%rbp), %rbx
andq $0x0, -0x8(%rbx)
leaq -0x138(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
xorl %ecx, %ecx
movb %cl, (%rax)
movb %cl, 0x10(%rax)
leaq -0xf0(%rbp), %rdi
leaq -0x120(%rbp), %rsi
callq 0x8f54
leaq -0xc0(%rbp), %rdi
leaq -0x150(%rbp), %rsi
callq 0x8f54
leaq -0x30(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
leaq -0xc0(%rbp), %rdx
leaq -0x50(%rbp), %rcx
callq 0x8f80
leaq -0xb8(%rbp), %rdi
callq 0x3120
leaq -0xe8(%rbp), %rdi
callq 0x3120
movl $0xa0, %esi
addq -0x30(%rbp), %rsi
leaq -0x50(%rbp), %rdi
callq 0x32c0
movq -0x28(%rbp), %rsi
addq $-0x20, %rsi
leaq -0x90(%rbp), %rdi
callq 0x32c0
movq -0x28(%rbp), %rsi
addq $-0x60, %rsi
leaq -0x70(%rbp), %rdi
callq 0x32c0
movq %r14, %rdi
callq 0x900c
leaq 0x40(%r14), %rdi
leaq -0x50(%rbp), %rsi
callq 0x3160
leaq -0x90(%rbp), %rsi
callq 0x7b20
movl %eax, 0x4(%r14)
leaq 0x60(%r14), %rdi
leaq -0x70(%rbp), %rsi
callq 0x3160
leaq -0x70(%rbp), %rdi
callq 0x3120
leaq -0x90(%rbp), %rdi
callq 0x3120
leaq -0x50(%rbp), %rdi
callq 0x3120
leaq -0x30(%rbp), %rdi
callq 0x8ee8
movq %rbx, %rdi
callq 0x3120
leaq -0x118(%rbp), %rdi
callq 0x3120
leaq -0x2d0(%rbp), %rdi
callq 0x3130
movq %r14, %rax
addq $0x2b8, %rsp            # imm = 0x2B8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
jmp 0x8ad3
movq %rax, %r15
jmp 0x8adc
movq %rax, %r15
jmp 0x8ae8
movq %rax, %r15
jmp 0x8af1
movq %rax, %r15
leaq -0xb8(%rbp), %rdi
callq 0x3120
jmp 0x8ab0
movq %rax, %r15
leaq -0xe8(%rbp), %rdi
callq 0x3120
jmp 0x8afa
movq %rax, %r15
jmp 0x8afa
movq %rax, %r15
jmp 0x8b0e
movq %rax, %r15
movq %r14, %rdi
callq 0x6228
leaq -0x70(%rbp), %rdi
callq 0x3120
leaq -0x90(%rbp), %rdi
callq 0x3120
leaq -0x50(%rbp), %rdi
callq 0x3120
leaq -0x30(%rbp), %rdi
callq 0x8ee8
movq %rbx, %rdi
callq 0x3120
leaq -0x118(%rbp), %rdi
callq 0x3120
leaq -0x2d0(%rbp), %rdi
callq 0x3130
movq %r15, %rdi
callq 0x33c0