// File: abaheti95[P]HMM-LDA/Models/cpp_hmm_lda/model.cpp
// Function: HMMLDA::HMMLDA(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, int, int, int, int, double, double, double, double, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
HMMLDA::HMMLDA(string &vocab_filename, int topics, int classes, int start_word, int end_word, 
	double n_alpha, double n_beta, double n_gamma, double n_delta, string save_directory): 
	num_topics(topics), num_classes(classes), start_word_id(start_word), end_word_id(end_word), alpha(n_alpha),
	beta(n_beta), gamma(n_gamma), delta(n_delta), save_dir(save_directory), rng(rd()), topic_dist(0,topics-1), 
	class_dist(0, classes-3) {
	// All 2D vectors are empty at the moment
	START_WORD_CLASS = num_classes - 2;
	END_WORD_CLASS = num_classes - 1;
	vocab_size = this->read_vocabulary(vocab_filename);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rsi, %rax
movq 0x10(%rbp), %rsi
movq %rdi, -0x8(%rbp)
movq %rax, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl %r8d, -0x1c(%rbp)
movl %r9d, -0x20(%rbp)
movsd %xmm0, -0x28(%rbp)
movsd %xmm1, -0x30(%rbp)
movsd %xmm2, -0x38(%rbp)
movsd %xmm3, -0x40(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x60(%rbp)
movl -0x14(%rbp), %eax
movl %eax, (%rdi)
movl -0x18(%rbp), %eax
movl %eax, 0x4(%rdi)
movl -0x1c(%rbp), %eax
movl %eax, 0x8(%rdi)
movl -0x20(%rbp), %eax
movl %eax, 0xc(%rdi)
movsd -0x28(%rbp), %xmm0
movsd %xmm0, 0x18(%rdi)
movsd -0x30(%rbp), %xmm0
movsd %xmm0, 0x20(%rdi)
movsd -0x38(%rbp), %xmm0
movsd %xmm0, 0x28(%rdi)
movsd -0x40(%rbp), %xmm0
movsd %xmm0, 0x30(%rdi)
addq $0x38, %rdi
movq %rdi, -0xc0(%rbp)
callq 0x30f0
movq -0x60(%rbp), %rdi
addq $0x58, %rdi
movq %rdi, -0xb8(%rbp)
callq 0x89c0
movq -0x60(%rbp), %rdi
addq $0x70, %rdi
movq %rdi, -0xb0(%rbp)
callq 0x89e0
movq -0x60(%rbp), %rdi
addq $0xa8, %rdi
movq %rdi, -0xa8(%rbp)
callq 0x8a00
movq -0x60(%rbp), %rdi
addq $0xc0, %rdi
movq %rdi, -0xa0(%rbp)
callq 0x8a00
movq -0x60(%rbp), %rdi
addq $0xd8, %rdi
movq %rdi, -0x98(%rbp)
callq 0x8a00
movq -0x60(%rbp), %rdi
addq $0xf0, %rdi
movq %rdi, -0x90(%rbp)
callq 0x8a00
movq -0x60(%rbp), %rdi
addq $0x108, %rdi            # imm = 0x108
movq %rdi, -0x88(%rbp)
callq 0x8a00
movq -0x60(%rbp), %rdi
addq $0x120, %rdi            # imm = 0x120
movq %rdi, -0x80(%rbp)
callq 0x8a00
movq -0x60(%rbp), %rdi
addq $0x138, %rdi            # imm = 0x138
movq %rdi, -0x78(%rbp)
callq 0x8a00
movq -0x60(%rbp), %rdi
addq $0x150, %rdi            # imm = 0x150
movq %rdi, -0x70(%rbp)
callq 0x8a20
movq -0x60(%rbp), %rdi
addq $0x168, %rdi            # imm = 0x168
movq %rdi, -0x68(%rbp)
callq 0x8a20
movq -0x60(%rbp), %rax
addq $0x180, %rax            # imm = 0x180
movq %rax, -0x58(%rbp)
leaq 0x1693d(%rip), %rdi     # 0x1a260
callq 0x87d0
movl %eax, -0x50(%rbp)
jmp 0x392d
movq -0x58(%rbp), %rdi
movl -0x50(%rbp), %eax
movl %eax, %eax
movl %eax, %esi
callq 0x8a40
jmp 0x393f
movq -0x60(%rbp), %rdi
addq $0x1508, %rdi           # imm = 0x1508
movl -0x14(%rbp), %edx
decl %edx
xorl %esi, %esi
callq 0x8a70
jmp 0x3958
movq -0x60(%rbp), %rdi
addq $0x1510, %rdi           # imm = 0x1510
movl -0x18(%rbp), %edx
addl $-0x3, %edx
xorl %esi, %esi
callq 0x8a70
jmp 0x3972
movq -0x60(%rbp), %rdi
movl 0x4(%rdi), %eax
addl $-0x2, %eax
movl %eax, 0x10(%rdi)
movl 0x4(%rdi), %eax
decl %eax
movl %eax, 0x14(%rdi)
movq -0x10(%rbp), %rsi
callq 0x3a50
movl %eax, -0xc4(%rbp)
jmp 0x3998
movq -0x60(%rbp), %rax
movl -0xc4(%rbp), %ecx
movl %ecx, 0xa0(%rax)
addq $0xd0, %rsp
popq %rbp
retq
movq -0x68(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
callq 0x8aa0
movq -0x70(%rbp), %rdi
callq 0x8aa0
movq -0x78(%rbp), %rdi
callq 0x8b00
movq -0x80(%rbp), %rdi
callq 0x8b00
movq -0x88(%rbp), %rdi
callq 0x8b00
movq -0x90(%rbp), %rdi
callq 0x8b00
movq -0x98(%rbp), %rdi
callq 0x8b00
movq -0xa0(%rbp), %rdi
callq 0x8b00
movq -0xa8(%rbp), %rdi
callq 0x8b00
movq -0xb0(%rbp), %rdi
callq 0x8b60
movq -0xb8(%rbp), %rdi
callq 0x8b80
movq -0xc0(%rbp), %rdi
callq 0x3160
movq -0x48(%rbp), %rdi
callq 0x3400
nopw (%rax,%rax)