// File: /workspace/github_cpp_makefile_star2_O1/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, -0x58(%rbp)
leaq -0x420(%rbp), %rdi
movl $0x8, %edx
callq 0x2340
leaq -0x68(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
xorl %r15d, %r15d
leaq -0x218(%rbp), %r12
leaq -0x2c(%rbp), %rbx
leaq -0x50(%rbp), %r14
movq -0x420(%rbp), %rax
movq -0x18(%rax), %rdi
leaq -0x420(%rbp), %r13
addq %r13, %rdi
movl $0xa, %esi
callq 0x2220
movsbl %al, %edx
movq %r13, %rdi
leaq -0x78(%rbp), %rsi
callq 0x23b0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x7824
movq %r12, %rdi
leaq -0x78(%rbp), %rsi
movl $0x18, %edx
callq 0x2320
xorps %xmm0, %xmm0
movaps %xmm0, -0x50(%rbp)
movq $0x0, -0x40(%rbp)
movq %r12, %rdi
movq %rbx, %rsi
callq 0x2130
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x7779
movq -0x48(%rbp), %rsi
cmpq -0x40(%rbp), %rsi
je 0x776c
movl -0x2c(%rbp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, -0x48(%rbp)
jmp 0x773a
movq %r14, %rdi
movq %rbx, %rdx
callq 0x7b42
jmp 0x773a
leaq -0x90(%rbp), %rdi
movq %r14, %rsi
callq 0x6b24
movq -0x58(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x2bea
movq -0x90(%rbp), %rdi
testq %rdi, %rdi
je 0x77a9
callq 0x2210
incl %r15d
imull $0x68c26139, %r15d, %eax # imm = 0x68C26139
rorl $0x6, %eax
cmpl $0x10c6, %eax           # imm = 0x10C6
ja 0x77f6
movq 0x3814(%rip), %rdi      # 0xafd8
movl %r15d, %esi
callq 0x2380
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x2220
movsbl %al, %esi
movq %r13, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2150
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0x7804
callq 0x2210
movq %r12, %rdi
movq 0x37aa(%rip), %rsi      # 0xafb8
callq 0x21a0
leaq -0x198(%rbp), %rdi
callq 0x20b0
jmp 0x76da
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x7836
callq 0x2210
leaq -0x420(%rbp), %rdi
callq 0x2080
addq $0x3f8, %rsp            # imm = 0x3F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x90(%rbp), %rdi
testq %rdi, %rdi
je 0x7876
callq 0x2210
jmp 0x7876
jmp 0x786c
movq %rax, %rbx
jmp 0x78a3
jmp 0x7873
movq %rax, %rbx
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0x7884
callq 0x2210
movq 0x372d(%rip), %rsi      # 0xafb8
leaq -0x218(%rbp), %rdi
callq 0x21a0
leaq -0x198(%rbp), %rdi
callq 0x20b0
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x78b5
callq 0x2210
leaq -0x420(%rbp), %rdi
callq 0x2080
movq %rbx, %rdi
callq 0x2390