// File: 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
subq $0x410, %rsp            # imm = 0x410
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x3f0(%rbp)
movq 0x15c13(%rip), %rdi     # 0x19fd8
leaq 0xdcb9(%rip), %rsi      # 0x12085
callq 0x3240
movq %rax, %rdi
movq -0x10(%rbp), %rsi
callq 0x3210
movq %rax, %rdi
movq 0x15be1(%rip), %rsi     # 0x19fc8
callq 0x3270
leaq -0x30(%rbp), %rdi
callq 0x3300
movq -0x10(%rbp), %rsi
leaq -0x238(%rbp), %rdi
movl $0x8, %edx
callq 0x33a0
jmp 0x440c
leaq -0x238(%rbp), %rdi
callq 0x3390
movb %al, -0x3f1(%rbp)
jmp 0x4420
movb -0x3f1(%rbp), %al
testb $0x1, %al
jne 0x44b2
jmp 0x4430
movq 0x15ba1(%rip), %rdi     # 0x19fd8
leaq 0xdc32(%rip), %rsi      # 0x12070
callq 0x3240
movq %rax, -0x400(%rbp)
jmp 0x444c
movq -0x400(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x3210
movq %rax, -0x408(%rbp)
jmp 0x4465
movq -0x408(%rbp), %rdi
movq 0x15b55(%rip), %rsi     # 0x19fc8
callq 0x3270
jmp 0x447a
movl $0x1, %edi
callq 0x32b0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x240(%rbp)
movl %eax, -0x244(%rbp)
jmp 0x464b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x240(%rbp)
movl %eax, -0x244(%rbp)
jmp 0x463f
leaq -0x238(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x3070
jmp 0x44c4
movq -0x3f0(%rbp), %rdi
addq $0xa8, %rdi
callq 0x8be0
movl %eax, -0x248(%rbp)
movl $0x0, -0x24c(%rbp)
movl -0x24c(%rbp), %eax
cmpl -0x248(%rbp), %eax
jge 0x4621
leaq -0x238(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x3070
jmp 0x450b
movl $0x10, %edi
movl $0x8, %esi
callq 0x8f80
movl %eax, -0x40c(%rbp)
jmp 0x4522
movl -0x40c(%rbp), %edx
leaq -0x3d8(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x3370
jmp 0x453a
movq -0x3f0(%rbp), %rdi
addq $0xc0, %rdi
movslq -0x24c(%rbp), %rsi
callq 0x8c10
movq %rax, %rdi
callq 0x8e50
movl %eax, -0x3dc(%rbp)
movl $0x0, -0x3e0(%rbp)
movl -0x3e0(%rbp), %eax
cmpl -0x3dc(%rbp), %eax
jge 0x4601
leaq -0x3d8(%rbp), %rdi
leaq -0x3e4(%rbp), %rsi
callq 0x3150
jmp 0x4593
movq -0x3f0(%rbp), %rdi
movl -0x3e4(%rbp), %eax
movl %eax, -0x410(%rbp)
addq $0xc0, %rdi
movslq -0x24c(%rbp), %rsi
callq 0x8c10
movq %rax, %rdi
movslq -0x3e0(%rbp), %rsi
callq 0x8f60
movl -0x410(%rbp), %ecx
movl %ecx, (%rax)
movl -0x3e0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3e0(%rbp)
jmp 0x456c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x240(%rbp)
movl %eax, -0x244(%rbp)
leaq -0x3d8(%rbp), %rdi
callq 0x31d0
jmp 0x463f
leaq -0x3d8(%rbp), %rdi
callq 0x31d0
movl -0x24c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24c(%rbp)
jmp 0x44e7
leaq -0x238(%rbp), %rdi
callq 0x3090
leaq -0x30(%rbp), %rdi
callq 0x3160
addq $0x410, %rsp            # imm = 0x410
popq %rbp
retq
leaq -0x238(%rbp), %rdi
callq 0x3090
leaq -0x30(%rbp), %rdi
callq 0x3160
movq -0x240(%rbp), %rdi
callq 0x3400