// File: /workspace/github_cpp_makefile_star2_O1/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 0xb66e
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 0xb6c1
leaq 0x68(%rsp), %rax
movq %rax, 0x58(%rsp)
movq %r14, %rdi
leaq 0x3bc35(%rip), %rsi     # 0x471fd
leaq 0x3bc2f(%rip), %rdx     # 0x471fe
callq 0x14914
movq %rbp, %rdi
movq %r15, %rdx
movq %r14, %rcx
callq 0xb0ac
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0xb5f6
callq 0xa440
movq 0x40(%rsp), %rbx
movq 0x48(%rsp), %rax
subq %rbx, %rax
cmpq $0x40, %rax
jne 0xb661
movq 0x20(%rbx), %rdi
callq 0xa680
movslq %eax, %r13
movq 0x18(%rsp), %rax
cmpq %r13, (%rax)
jbe 0xb661
leaq 0x68(%rsp), %rax
movq %rax, 0x58(%rsp)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0x12b94
movq %r13, 0x78(%rsp)
movq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0x2281a
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0xb661
callq 0xa440
movq %rbp, %rdi
callq 0x125ba
jmp 0xb57b
leaq 0x3bb5b(%rip), %rsi     # 0x471d0
leaq 0x58(%rsp), %rdi
movl $0x36, %edx
movl $0x3, %ecx
callq 0x45a82
leaq 0x3bb5a(%rip), %rsi     # 0x471ea
leaq 0x58(%rsp), %rdi
movl $0x12, %edx
callq 0xa4d0
movq (%rbx), %rbx
testq %rbx, %rbx
je 0xb6e9
movq %rbx, %rdi
callq 0xa1b0
leaq 0x58(%rsp), %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0xa4d0
jmp 0xb705
leaq 0x1e0(%rsp), %rdi
callq 0xa0b0
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
movb 0xf(%rsp), %bpl
je 0xb70f
callq 0xa440
jmp 0xb70f
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 0x45caa
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 0xb78b
jmp 0xb734
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x45caa
jmp 0xb7a2
movq %rax, %rbx
jmp 0xb7a2
movq %rax, %rbx
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0xb764
callq 0xa440
jmp 0xb764
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x125ba
jmp 0xb78e
jmp 0xb78b
movq %rax, %rbx
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0xb78e
callq 0xa440
jmp 0xb78e
movq %rax, %rbx
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0xb7a2
callq 0xa440
leaq 0x1e0(%rsp), %rdi
callq 0xa0e0
movq %rbx, %rdi
callq 0xa780
nop