// File: /workspace/github_cpp_makefile_star2_O3/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 $0x58, %rsp
movq %rcx, -0x30(%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 0x8ad0
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x8870
leaq -0x40(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq %r14, %rdi
callq 0x1d2ee
testl %eax, %eax
je 0x1d737
leaq -0x50(%rbp), %rbx
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x8600
movsbl %al, %edx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x8bd0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x1d737
movq -0x50(%rbp), %rdi
callq 0x8290
movq %rax, %r15
movq %r14, %rdi
callq 0x8290
cmpq %rax, %r15
jb 0x1d691
movl $0x1, %edx
leaq -0x78(%rbp), %rdi
movq %rbx, %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
testl %eax, %eax
je 0x1d712
xorl %r13d, %r13d
jmp 0x1d71d
movq -0x50(%rbp), %rax
cmpb $0x2b, (%rax)
sete %r13b
leaq -0x68(%rbp), %rax
cmpq %rax, %r15
je 0x1d72e
movq %r15, %rdi
callq 0x85d0
testb %r13b, %r13b
je 0x1d691
movq -0x30(%rbp), %rax
movw $0x59, 0x4(%rax)
movl $0x54504d45, (%rax)     # imm = 0x54504D45
leaq -0x50(%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 0x8bd0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x1d89e
movq -0x50(%rbp), %rbx
movzbl (%rbx), %eax
cmpl $0x23, %eax
je 0x1d74b
cmpl $0x2a, %eax
je 0x1d74b
movq %r14, %rdi
callq 0x1d2ee
testl %eax, %eax
je 0x1d815
movq %rbx, %rdi
callq 0x8290
movq %rax, %r15
movq %r14, %rdi
callq 0x8290
cmpq %rax, %r15
jb 0x1d815
movl $0x1, %edx
leaq -0x78(%rbp), %rdi
movq %r13, %rsi
movq %rax, %rcx
callq 0x8660
movq -0x78(%rbp), %rbx
movq %r14, %rdi
callq 0x8290
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x82f0
testl %eax, %eax
je 0x1d7ec
xorl %r15d, %r15d
jmp 0x1d7f7
movq -0x50(%rbp), %rax
cmpb $0x2d, (%rax)
sete %r15b
leaq -0x68(%rbp), %rax
cmpq %rax, %rbx
je 0x1d808
movq %rbx, %rdi
callq 0x85d0
testb %r15b, %r15b
jne 0x1d89e
movq -0x50(%rbp), %rbx
movq %rbx, %rdi
movq -0x58(%rbp), %rsi
callq 0x8160
testq %rax, %rax
je 0x1d74b
leaq -0x50(%rbp), %r15
movq %r15, %rdi
movl $0x3d, %esi
xorl %edx, %edx
callq 0x8830
movq %rax, %rbx
movq %r15, %rdi
movl $0x21, %esi
xorl %edx, %edx
callq 0x8830
movq %rax, %r14
movq %r15, %rdi
movl $0x23, %esi
xorl %edx, %edx
callq 0x8830
cmpl $-0x1, %r14d
sete %cl
cmpl $-0x1, %eax
sete %dl
orb %cl, %dl
jne 0x1d87b
cmpl %eax, %r14d
cmovll %r14d, %eax
jmp 0x1d888
cmpl $-0x1, %r14d
cmovnel %r14d, %eax
cmpl $-0x1, %eax
je 0x1d8bf
movq -0x50(%rbp), %rsi
leal 0x1(%rbx), %edx
notl %ebx
addl %eax, %ebx
movq -0x30(%rbp), %rdi
movl %ebx, %ecx
callq 0x1d336
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x1d8b0
callq 0x85d0
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq -0x50(%rbp), %r14
leal 0x1(%rbx), %r15d
movq %r14, %rdi
callq 0x8290
notl %ebx
addl %eax, %ebx
movq -0x30(%rbp), %rdi
movq %r14, %rsi
movl %r15d, %edx
jmp 0x1d897
jmp 0x1d8e5
jmp 0x1d8e5
jmp 0x1d8e5
movq %rax, %rbx
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x1d8fa
callq 0x85d0
movq %rbx, %rdi
callq 0x8b30