// File: /workspace/github_cpp_makefile_star2_O1/DoubleString[P]RtConverter/src/Rnxobs/Com.cpp
// Function: bamboo::findkey(std::basic_ifstream<char, std::char_traits<char>>&, char const*, char const*, char*)
void findkey(ifstream& in,const char* keyword,const char* sinex_bracket,char* value){
	int index_eq;
	int index_exf,index_exc,index_ex;
	in.clear();
	in.seekg(0,ios::beg);
	string line;
	if(len_trim(sinex_bracket)!=0){
		while(getline(in,line)){
			if(strlen(line.c_str()) >= strlen(sinex_bracket) && !strncmp(line.substr(1,strlen(sinex_bracket)).c_str(),sinex_bracket,strlen(sinex_bracket)) && line[0] == '+')
				break;
		}
	}
	strcpy(value, "EMPTY");
	while (getline(in,line)) {
		if (line[0] == '#' || line[0] == '*')
			continue;
		if (len_trim(sinex_bracket) != 0 && strlen(line.c_str()) >= strlen(sinex_bracket)  && !strncmp(line.substr(1,strlen(sinex_bracket)).c_str(),sinex_bracket,strlen(sinex_bracket))
				&& line[0] == '-')
			return;
		if (strstr(line.c_str(), keyword) != NULL) {
			index_eq = line.find_first_of('=');
			index_exf = line.find_first_of('!');
			index_exc = line.find_first_of('#');
			index_ex = index_exf != -1 && index_exc != -1 ? MIN(index_exf,index_exc) : (index_exf != -1 ? index_exf : index_exc);
			if (index_ex != -1) {
				substringEx(value, line.c_str(), index_eq + 1, index_ex - index_eq - 1);
				return;
			} else {
				substringEx(value, line.c_str(), index_eq + 1,
						strlen(line.c_str()) - index_eq - 1);
				return;
			}
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rcx, -0x50(%rbp)
movq %rdx, %r14
movq %rsi, -0x58(%rbp)
movq %rdi, %r12
movq (%rdi), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
xorl %esi, %esi
callq 0x8ae0
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x8880
leaq -0x38(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq %r14, %rdi
callq 0x1d95b
testl %eax, %eax
je 0x1dd92
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x8600
movsbl %al, %edx
movq %r12, %rdi
leaq -0x48(%rbp), %rsi
callq 0x8be0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x1dd92
movq -0x48(%rbp), %rdi
callq 0x8290
movq %rax, %r13
movq %r14, %rdi
callq 0x8290
movq %rax, %r15
cmpq %rax, %r13
jb 0x1dd5d
movl $0x1, %edx
leaq -0x98(%rbp), %rdi
leaq -0x48(%rbp), %rsi
movq %r15, %rcx
callq 0x8660
movq -0x98(%rbp), %rbx
movq %r14, %rdi
callq 0x8290
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x82f0
testl %eax, %eax
je 0x1dd86
xorl %ebx, %ebx
cmpq %r15, %r13
jb 0x1dd7c
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x1dd7c
callq 0x85d0
testb %bl, %bl
je 0x1dcd2
jmp 0x1dd92
movq -0x48(%rbp), %rax
cmpb $0x2b, (%rax)
sete %bl
jmp 0x1dd5f
movq -0x50(%rbp), %rax
movw $0x59, 0x4(%rax)
movl $0x54504d45, (%rax)     # imm = 0x54504D45
leaq -0x68(%rbp), %rbx
leaq -0x48(%rbp), %r13
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x8600
movsbl %al, %edx
movq %r12, %rdi
movq %r13, %rsi
callq 0x8be0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x1df08
movq -0x48(%rbp), %r15
movzbl (%r15), %eax
cmpl $0x23, %eax
je 0x1ddaa
cmpl $0x2a, %eax
je 0x1ddaa
movq %r14, %rdi
callq 0x1d95b
testl %eax, %eax
je 0x1de15
movq %r15, %rdi
callq 0x8290
movq %rax, %r15
movq %r14, %rdi
callq 0x8290
cmpq %rax, %r15
jae 0x1de19
xorl %ecx, %ecx
jmp 0x1de4d
movl $0x1, %edx
leaq -0x78(%rbp), %rdi
movq %r13, %rsi
movq %rax, %rcx
callq 0x8660
movq -0x78(%rbp), %r15
movq %r14, %rdi
callq 0x8290
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x82f0
movb $0x1, %cl
testl %eax, %eax
je 0x1de83
xorl %r15d, %r15d
testb %cl, %cl
je 0x1de62
movq -0x78(%rbp), %rdi
cmpq %rbx, %rdi
je 0x1de62
callq 0x85d0
testb %r15b, %r15b
jne 0x1df08
movq -0x48(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0x8160
testq %rax, %rax
je 0x1ddaa
jmp 0x1de90
movq -0x48(%rbp), %rax
cmpb $0x2d, (%rax)
sete %r15b
jmp 0x1de50
leaq -0x48(%rbp), %r14
movq %r14, %rdi
movl $0x3d, %esi
xorl %edx, %edx
callq 0x8840
movq %rax, %rbx
movq %r14, %rdi
movl $0x21, %esi
xorl %edx, %edx
callq 0x8840
movq %rax, %r15
movq %r14, %rdi
movl $0x23, %esi
xorl %edx, %edx
callq 0x8840
cmpl %eax, %r15d
movl %eax, %ecx
cmovll %r15d, %ecx
cmpl $-0x1, %eax
cmovel %r15d, %ecx
cmpl $-0x1, %r15d
cmovel %eax, %ecx
leal 0x1(%rbx), %r15d
movq (%r14), %r14
cmpl $-0x1, %ecx
jne 0x1def5
movq %r14, %rdi
callq 0x8290
movq %rax, %rcx
notl %ebx
addl %ebx, %ecx
movq -0x50(%rbp), %rdi
movq %r14, %rsi
movl %r15d, %edx
callq 0x1d9a3
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x1df1a
callq 0x85d0
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1df2f
jmp 0x1df2f
jmp 0x1df2f
movq %rax, %rbx
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x1df44
callq 0x85d0
movq %rbx, %rdi
callq 0x8b40