// File: /workspace/github_cpp_makefile_star2_O3/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 0x8257(%rip), %r15      # 0xafd8
leaq 0x52d8(%rip), %rsi      # 0x8060
movl $0x1f, %edx
movq %r15, %rdi
callq 0x2270
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %r15, %rdi
callq 0x2270
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2220
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2150
leaq -0x50(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq -0x268(%rbp), %r15
movq %r15, %rdi
movq %r14, %rsi
movl $0x8, %edx
callq 0x2340
leaq -0x1f0(%rbp), %rdi
callq 0x2070
testb %al, %al
je 0x2f6c
movq -0x268(%rbp), %rax
addq -0x18(%rax), %r15
movq %r15, %rdi
movl $0xa, %esi
callq 0x2220
movsbl %al, %edx
leaq -0x268(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x23b0
movq 0xb0(%rbx), %rax
subq 0xa8(%rbx), %rax
sarq $0x3, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %rcx
movq %rcx, -0x30(%rbp)
testl %ecx, %ecx
jle 0x2f3c
movq -0x30(%rbp), %rax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movq %rax, -0x30(%rbp)
xorl %r15d, %r15d
leaq -0x60(%rbp), %r12
leaq -0x3f0(%rbp), %r13
movq -0x268(%rbp), %rax
movq -0x18(%rax), %rdi
leaq -0x268(%rbp), %r14
addq %r14, %rdi
movl $0xa, %esi
callq 0x2220
movsbl %al, %edx
movq %r14, %rdi
movq %r12, %rsi
callq 0x23b0
movq %r13, %rdi
movq %r12, %rsi
movl $0x18, %edx
callq 0x2320
movq 0xd8(%rbx), %rax
movq %r15, -0x40(%rbp)
leaq (%r15,%r15,2), %r14
movq 0x8(%rax,%r14,8), %r12
subq (%rax,%r14,8), %r12
shrq $0x2, %r12
testl %r12d, %r12d
jle 0x2f0c
andl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
xorl %r15d, %r15d
movq %r13, %rdi
leaq -0x34(%rbp), %rsi
callq 0x2130
movl -0x34(%rbp), %eax
movq 0xd8(%rbx), %rcx
movq (%rcx,%r14,8), %rcx
movl %eax, (%rcx,%r15,4)
incq %r15
cmpq %r15, %r12
jne 0x2ee6
movq %r13, %rdi
movq 0x80a2(%rip), %rsi      # 0xafb8
callq 0x21a0
leaq -0x370(%rbp), %rdi
callq 0x20b0
movq -0x40(%rbp), %r15
incq %r15
cmpq -0x30(%rbp), %r15
leaq -0x60(%rbp), %r12
jne 0x2e7e
leaq -0x268(%rbp), %rdi
callq 0x2080
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0x2f5a
callq 0x2210
addq $0x3c8, %rsp            # imm = 0x3C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8065(%rip), %rdi      # 0xafd8
leaq 0x5106(%rip), %rsi      # 0x8080
movl $0x14, %edx
callq 0x2270
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq 0x8046(%rip), %rdi      # 0xafd8
callq 0x2270
movq %rax, %rdi
callq 0x20f0
movl $0x1, %edi
callq 0x2290
movq %rax, %rbx
jmp 0x2fe5
jmp 0x2fb2
jmp 0x2fb2
movq %rax, %rbx
jmp 0x2fd9
movq %rax, %rbx
movq 0x7ff7(%rip), %rsi      # 0xafb8
leaq -0x3f0(%rbp), %rdi
callq 0x21a0
leaq -0x370(%rbp), %rdi
callq 0x20b0
leaq -0x268(%rbp), %rdi
callq 0x2080
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0x2ff7
callq 0x2210
movq %rbx, %rdi
callq 0x2390
nop