// File: /workspace/github_cpp_makefile_star2_O2/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 0x8860
leaq -0x40(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq %r14, %rdi
callq 0x1a3ea
testl %eax, %eax
je 0x1a7b4
leaq -0x50(%rbp), %rbx
leaq -0x78(%rbp), %r13
movq %r12, %rdi
movq %rbx, %rsi
callq 0x8120
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x1a7b4
movq -0x50(%rbp), %rdi
callq 0x8290
movq %rax, %r15
movq %r14, %rdi
callq 0x8290
cmpq %rax, %r15
jb 0x1a734
movq %r13, %rdi
movq %rbx, %rsi
pushq $0x1
popq %rdx
movq %rax, %rcx
callq 0x8650
movq -0x78(%rbp), %r15
movq %r14, %rdi
callq 0x8290
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x8300
testl %eax, %eax
je 0x1a79f
movq %r13, %rdi
callq 0x82c0
jmp 0x1a734
movq -0x50(%rbp), %rax
movb (%rax), %r15b
movq %r13, %rdi
callq 0x82c0
cmpb $0x2b, %r15b
jne 0x1a734
movq -0x30(%rbp), %rax
movw $0x59, 0x4(%rax)
movl $0x54504d45, (%rax)     # imm = 0x54504D45
leaq -0x50(%rbp), %r13
leaq -0x78(%rbp), %rbx
movq %r12, %rdi
movq %r13, %rsi
callq 0x8120
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x1a8f5
movq -0x50(%rbp), %r15
movzbl (%r15), %eax
cmpl $0x23, %eax
je 0x1a7cc
cmpl $0x2a, %eax
je 0x1a7cc
movq %r14, %rdi
callq 0x1a3ea
testl %eax, %eax
je 0x1a871
movq %r15, %rdi
callq 0x8290
movq %rax, %r15
movq %r14, %rdi
callq 0x8290
cmpq %rax, %r15
jb 0x1a871
movq %rbx, %rdi
movq %r13, %rsi
pushq $0x1
popq %rdx
movq %rax, %rcx
callq 0x8650
movq -0x78(%rbp), %r15
movq %r14, %rdi
callq 0x8290
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x8300
testl %eax, %eax
je 0x1a858
movq %rbx, %rdi
callq 0x82c0
jmp 0x1a871
movq -0x50(%rbp), %rax
movb (%rax), %r15b
movq %rbx, %rdi
callq 0x82c0
cmpb $0x2d, %r15b
je 0x1a8f5
movq -0x50(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0x8170
testq %rax, %rax
je 0x1a7cc
leaq -0x50(%rbp), %r15
pushq $0x3d
popq %rsi
movq %r15, %rdi
xorl %edx, %edx
callq 0x8820
movq %rax, %rbx
pushq $0x21
popq %rsi
movq %r15, %rdi
xorl %edx, %edx
callq 0x8820
movq %rax, %r14
pushq $0x23
popq %rsi
movq %r15, %rdi
xorl %edx, %edx
callq 0x8820
cmpl $-0x1, %r14d
sete %cl
cmpl $-0x1, %eax
sete %dl
orb %cl, %dl
jne 0x1a8d2
cmpl %eax, %r14d
cmovll %r14d, %eax
jmp 0x1a8df
cmpl $-0x1, %r14d
cmovnel %r14d, %eax
cmpl $-0x1, %eax
je 0x1a90d
movq -0x50(%rbp), %rsi
leal 0x1(%rbx), %edx
notl %ebx
addl %eax, %ebx
movq -0x30(%rbp), %rdi
movl %ebx, %ecx
callq 0x1a42f
leaq -0x50(%rbp), %rdi
callq 0x82c0
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 0x1a8ee
jmp 0x1a933
jmp 0x1a933
jmp 0x1a933
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x82c0
movq %rbx, %rdi
callq 0x8b30