// File: /workspace/github_cpp_makefile_star2_O2/btbujiangjun[P]abcdl/include/utils/RNNHelper.h
// Function: abcdl::utils::RNNHelper::read_word2index(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, unsigned long, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, unsigned long>>>&)
bool RNNHelper::read_word2index(const std::string& data_file, std::map<std::string, size_t>& dict){
	std::ifstream in_file(data_file.data());;
	if(!in_file.is_open()){
		LOG(FATAL) << "Open file  failed:" << data_file.c_str();
		return false;
	}

    abcdl::utils::StringHelper helper;
	std::string data;
	while(getline(in_file, data)){
        auto line_data = helper.split(data, "\t");
        if(line_data.size() == 2){
			size_t value = helper.str2int(line_data[1]);
			if(value < _feature_dim){
				dict.insert(std::map<std::string, size_t>::value_type(line_data[0], value));
			}
        }
	}
	in_file.close();
	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3e8, %rsp            # imm = 0x3E8
movq %rdx, 0x10(%rsp)
movq %rsi, %rbx
movq %rdi, 0x18(%rsp)
movq (%rsi), %rsi
leaq 0x1e0(%rsp), %rdi
pushq $0x8
popq %rdx
callq 0xa800
leaq 0x258(%rsp), %rdi
callq 0xa0e0
movb %al, 0xe(%rsp)
testb %al, %al
je 0xb154
leaq 0x48(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x38(%rsp), %r13
leaq 0x58(%rsp), %rbx
leaq 0xf(%rsp), %r14
leaq 0x20(%rsp), %r15
leaq 0x1e0(%rsp), %rdi
movq %r13, %rsi
callq 0xa0a0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0xb195
movq %rbx, %rdi
leaq 0x31122(%rip), %rsi     # 0x3c1fd
movq %r14, %rdx
callq 0xa180
movq %r15, %rdi
movq %r13, %rdx
movq %rbx, %rcx
callq 0xacdc
movq %rbx, %rdi
callq 0xa1d0
movq 0x20(%rsp), %rbp
movq 0x28(%rsp), %rax
subq %rbp, %rax
cmpq $0x40, %rax
jne 0xb147
movq 0x20(%rbp), %rdi
callq 0xa6b0
movslq %eax, %r12
movq 0x18(%rsp), %rax
cmpq %r12, (%rax)
jbe 0xb147
movq %rbx, %rdi
movq %rbp, %rsi
callq 0xa5e0
movq %r12, 0x78(%rsp)
movq 0x10(%rsp), %rdi
movq %rbx, %rsi
callq 0x1fd82
movq %rbx, %rdi
callq 0xa1d0
movq %r15, %rdi
callq 0x116b0
jmp 0xb0af
leaq 0x31075(%rip), %rsi     # 0x3c1d0
leaq 0x58(%rsp), %rdi
pushq $0x36
popq %rdx
pushq $0x3
popq %rcx
callq 0x3a600
leaq 0x31078(%rip), %rsi     # 0x3c1ea
leaq 0x58(%rsp), %rdi
callq 0xa480
movq (%rbx), %rsi
leaq 0x58(%rsp), %rdi
callq 0xa480
leaq 0x58(%rsp), %rdi
callq 0x3a83c
jmp 0xb1ac
leaq 0x1e0(%rsp), %rdi
callq 0xa0b0
leaq 0x38(%rsp), %rdi
callq 0xa1d0
leaq 0x1e0(%rsp), %rdi
callq 0xa0f0
movb 0xe(%rsp), %al
addq $0x3e8, %rsp            # imm = 0x3E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xb216
jmp 0xb1d3
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x3a83c
jmp 0xb223
movq %rax, %rbx
jmp 0xb223
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0xa1d0
jmp 0xb1f9
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x116b0
jmp 0xb219
jmp 0xb216
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0xa1d0
jmp 0xb219
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0xa1d0
leaq 0x1e0(%rsp), %rdi
callq 0xa0f0
movq %rbx, %rdi
callq 0xa7a0