// File: /workspace/github_cpp_makefile_star2_O3/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), %r12
movq %r12, %rdi
movl $0x8, %edx
callq 0xa7e0
leaq 0x258(%rsp), %rdi
callq 0xa0d0
movl %eax, %ebp
testb %al, %al
je 0xb63e
movb %bpl, 0xf(%rsp)
leaq 0x30(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x20(%rsp), %r15
leaq 0x58(%rsp), %r14
leaq 0x40(%rsp), %rbp
movq 0x1e0(%rsp), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0xa450
movsbl %al, %edx
movq %r12, %rdi
movq %r15, %rsi
callq 0xa7f0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0xb691
leaq 0x68(%rsp), %rax
movq %rax, 0x58(%rsp)
movq %r14, %rdi
leaq 0x3bc65(%rip), %rsi     # 0x471fd
leaq 0x3bc5f(%rip), %rdx     # 0x471fe
callq 0x1453a
movq %rbp, %rdi
movq %r15, %rdx
movq %r14, %rcx
callq 0xb07c
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0xb5c6
callq 0xa440
movq 0x40(%rsp), %rbx
movq 0x48(%rsp), %rax
subq %rbx, %rax
cmpq $0x40, %rax
jne 0xb631
movq 0x20(%rbx), %rdi
callq 0xa680
movslq %eax, %r13
movq 0x18(%rsp), %rax
cmpq %r13, (%rax)
jbe 0xb631
leaq 0x68(%rsp), %rax
movq %rax, 0x58(%rsp)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0x127a4
movq %r13, 0x78(%rsp)
movq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0x2247a
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0xb631
callq 0xa440
movq %rbp, %rdi
callq 0x122b4
jmp 0xb54b
leaq 0x3bb8b(%rip), %rsi     # 0x471d0
leaq 0x58(%rsp), %rdi
movl $0x36, %edx
movl $0x3, %ecx
callq 0x457ae
leaq 0x3bb8a(%rip), %rsi     # 0x471ea
leaq 0x58(%rsp), %rdi
movl $0x12, %edx
callq 0xa4d0
movq (%rbx), %rbx
testq %rbx, %rbx
je 0xb6b9
movq %rbx, %rdi
callq 0xa1b0
leaq 0x58(%rsp), %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0xa4d0
jmp 0xb6d5
leaq 0x1e0(%rsp), %rdi
callq 0xa0b0
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
movb 0xf(%rsp), %bpl
je 0xb6df
callq 0xa440
jmp 0xb6df
movq 0x58(%rsp), %rax
movq -0x18(%rax), %rax
leaq (%rsp,%rax), %rdi
addq $0x58, %rdi
movl 0x20(%rdi), %esi
orl $0x1, %esi
callq 0xa730
leaq 0x58(%rsp), %rdi
callq 0x459d6
leaq 0x1e0(%rsp), %rdi
callq 0xa0e0
movl %ebp, %eax
addq $0x3e8, %rsp            # imm = 0x3E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xb75b
jmp 0xb704
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x459d6
jmp 0xb772
movq %rax, %rbx
jmp 0xb772
movq %rax, %rbx
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0xb734
callq 0xa440
jmp 0xb734
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x122b4
jmp 0xb75e
jmp 0xb75b
movq %rax, %rbx
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0xb75e
callq 0xa440
jmp 0xb75e
movq %rax, %rbx
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0xb772
callq 0xa440
leaq 0x1e0(%rsp), %rdi
callq 0xa0e0
movq %rbx, %rdi
callq 0xa780
nop