// File: /workspace/github_cpp_makefile_star2_O2/btbujiangjun[P]abcdl/include/utils/RNNHelper.h
// Function: abcdl::utils::RNNHelper::read_data(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, abcdl::algebra::MatrixSet<float>&, int)
bool RNNHelper::read_data(const std::string& data_file,
                          abcdl::algebra::MatSet& matset,
                          int limit){
	std::ifstream in_file(data_file.c_str());
	if(!in_file.is_open()){
		LOG(FATAL) << "Open file failed:" << data_file.c_str();
		return false;
	}
		
	std::string data;
    abcdl::utils::StringHelper helper;
	while(getline(in_file, data)){
		auto line_data = helper.split(data, "\t");
        size_t rows = line_data.size();
        abcdl::algebra::Mat mat(rows, _feature_dim);
        for(size_t i = 0; i != rows ; i++){
            mat.set_data(1, i, helper.str2int(line_data[i]));
        }
        matset.push_back(mat);
        if(limit > 0 && (int)matset.size() >= limit){
            break;
        }
	}
	in_file.close();
	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x408, %rsp            # imm = 0x408
movl %ecx, %ebp
movq %rdx, 0x8(%rsp)
movq %rsi, %rbx
movq %rdi, 0x28(%rsp)
movq (%rsi), %rsi
leaq 0x200(%rsp), %rdi
pushq $0x8
popq %rdx
callq 0xa800
leaq 0x278(%rsp), %rdi
callq 0xa0e0
movb %al, 0x3(%rsp)
testb %al, %al
je 0xb3fe
leaq 0x40(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x30(%rsp), %r14
leaq 0x78(%rsp), %rbx
leaq 0x4(%rsp), %r12
leaq 0x10(%rsp), %r15
leaq 0x200(%rsp), %rdi
movq %r14, %rsi
callq 0xa0a0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0xb453
movq %rbx, %rdi
leaq 0x30ede(%rip), %rsi     # 0x3c1fd
movq %r12, %rdx
callq 0xa180
movq %r15, %rdi
movq %r14, %rdx
movq %rbx, %rcx
callq 0xacdc
movl %ebp, %r14d
movq %rbx, %rdi
callq 0xa1d0
movq 0x18(%rsp), %r13
subq 0x10(%rsp), %r13
sarq $0x5, %r13
movq 0x28(%rsp), %rax
movq (%rax), %rdx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x23822
xorl %r15d, %r15d
xorl %ebp, %ebp
cmpq %rbp, %r13
je 0xb39b
movl $0x3f800000, 0x4(%rsp)  # imm = 0x3F800000
movq 0x10(%rsp), %rax
movq (%rax,%r15), %rdi
callq 0xa6b0
movslq %eax, %rcx
movq %rbx, %rdi
movq %r12, %rsi
movq %rbp, %rdx
callq 0x116d2
incq %rbp
addq $0x20, %r15
jmp 0xb366
leaq 0x50(%rsp), %r13
movq %r13, %rdi
movq %rbx, %rsi
callq 0x1175e
movq 0x8(%rsp), %rdi
movq %r13, %rsi
callq 0x1ff96
movl %r14d, %ebp
leaq 0x30(%rsp), %r14
leaq 0x10(%rsp), %r15
movq %r13, %rdi
callq 0x23a32
testl %ebp, %ebp
jle 0xb3e9
movq 0x8(%rsp), %rcx
movq 0x8(%rcx), %rax
subq (%rcx), %rax
cqto
pushq $0x28
popq %rcx
idivq %rcx
cmpl %ebp, %eax
jge 0xb43f
movq %rbx, %rdi
callq 0x23a32
movq %r15, %rdi
callq 0x116b0
jmp 0xb2f3
leaq 0x30dcb(%rip), %rsi     # 0x3c1d0
leaq 0x78(%rsp), %rdi
pushq $0x56
popq %rdx
pushq $0x3
popq %rcx
callq 0x3a600
leaq 0x30de3(%rip), %rsi     # 0x3c1ff
leaq 0x78(%rsp), %rdi
callq 0xa480
movq (%rbx), %rsi
leaq 0x78(%rsp), %rdi
callq 0xa480
leaq 0x78(%rsp), %rdi
callq 0x3a83c
jmp 0xb46a
leaq 0x78(%rsp), %rdi
callq 0x23a32
leaq 0x10(%rsp), %rdi
callq 0x116b0
leaq 0x200(%rsp), %rdi
callq 0xa0b0
leaq 0x30(%rsp), %rdi
callq 0xa1d0
leaq 0x200(%rsp), %rdi
callq 0xa0f0
movb 0x3(%rsp), %al
addq $0x408, %rsp            # imm = 0x408
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xb4cc
jmp 0xb491
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
callq 0x3a83c
jmp 0xb4f2
movq %rax, %rbx
jmp 0xb4f2
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x23a32
jmp 0xb4d4
jmp 0xb4d1
jmp 0xb4cc
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
callq 0xa1d0
jmp 0xb4e8
movq %rax, %rbx
jmp 0xb4de
movq %rax, %rbx
jmp 0xb4e8
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
callq 0x23a32
leaq 0x10(%rsp), %rdi
callq 0x116b0
leaq 0x30(%rsp), %rdi
callq 0xa1d0
leaq 0x200(%rsp), %rdi
callq 0xa0f0
movq %rbx, %rdi
callq 0xa7a0