// File: 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
subq $0x410, %rsp            # imm = 0x410
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x3f0(%rbp)
movq 0x15ed3(%rip), %rdi     # 0x19fd8
leaq 0xdf44(%rip), %rsi      # 0x12050
callq 0x3240
movq %rax, %rdi
movq -0x10(%rbp), %rsi
callq 0x3210
movq %rax, %rdi
movq 0x15ea1(%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 0x414c
leaq -0x238(%rbp), %rdi
callq 0x3390
movb %al, -0x3f1(%rbp)
jmp 0x4160
movb -0x3f1(%rbp), %al
testb $0x1, %al
jne 0x41f2
jmp 0x4170
movq 0x15e61(%rip), %rdi     # 0x19fd8
leaq 0xdef2(%rip), %rsi      # 0x12070
callq 0x3240
movq %rax, -0x400(%rbp)
jmp 0x418c
movq -0x400(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x3210
movq %rax, -0x408(%rbp)
jmp 0x41a5
movq -0x408(%rbp), %rdi
movq 0x15e15(%rip), %rsi     # 0x19fc8
callq 0x3270
jmp 0x41ba
movl $0x1, %edi
callq 0x32b0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x240(%rbp)
movl %eax, -0x244(%rbp)
jmp 0x438b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x240(%rbp)
movl %eax, -0x244(%rbp)
jmp 0x437f
leaq -0x238(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x3070
jmp 0x4204
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 0x4361
leaq -0x238(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x3070
jmp 0x424b
movl $0x10, %edi
movl $0x8, %esi
callq 0x8f80
movl %eax, -0x40c(%rbp)
jmp 0x4262
movl -0x40c(%rbp), %edx
leaq -0x3d8(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x3370
jmp 0x427a
movq -0x3f0(%rbp), %rdi
addq $0xd8, %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 0x4341
leaq -0x3d8(%rbp), %rdi
leaq -0x3e4(%rbp), %rsi
callq 0x3150
jmp 0x42d3
movq -0x3f0(%rbp), %rdi
movl -0x3e4(%rbp), %eax
movl %eax, -0x410(%rbp)
addq $0xd8, %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 0x42ac
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x240(%rbp)
movl %eax, -0x244(%rbp)
leaq -0x3d8(%rbp), %rdi
callq 0x31d0
jmp 0x437f
leaq -0x3d8(%rbp), %rdi
callq 0x31d0
movl -0x24c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24c(%rbp)
jmp 0x4227
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