// File: 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
subq $0x170, %rsp            # imm = 0x170
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
xorl %esi, %esi
movl %esi, -0xb8(%rbp)
callq 0x9ca0
movl -0xb8(%rbp), %edx
movq -0x8(%rbp), %rdi
movl %edx, %esi
callq 0x9a10
leaq -0x50(%rbp), %rdi
callq 0x9a50
movq -0x18(%rbp), %rdi
callq 0x33d80
movl %eax, -0xb4(%rbp)
jmp 0x34301
movl -0xb4(%rbp), %eax
cmpl $0x0, %eax
je 0x3449f
jmp 0x34312
movq -0x8(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x9160
movq %rax, -0xc0(%rbp)
jmp 0x34328
movq -0xc0(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x9950
movb %al, -0xc1(%rbp)
jmp 0x34346
movb -0xc1(%rbp), %al
testb $0x1, %al
jne 0x34355
jmp 0x3449d
leaq -0x50(%rbp), %rdi
callq 0x92b0
movq %rax, %rdi
callq 0x92e0
movq %rax, -0xd0(%rbp)
movq -0x18(%rbp), %rdi
callq 0x92e0
movq -0xd0(%rbp), %rcx
movq %rax, %rdx
movb $0x0, -0x81(%rbp)
xorl %eax, %eax
cmpq %rdx, %rcx
movb %al, -0xc2(%rbp)
jb 0x34434
movq -0x18(%rbp), %rdi
callq 0x92e0
movq %rax, %rcx
leaq -0x80(%rbp), %rdi
leaq -0x50(%rbp), %rsi
movl $0x1, %edx
callq 0x97a0
jmp 0x343b8
movb $0x1, -0x81(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x92b0
movq %rax, -0xe0(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0x18(%rbp), %rdi
callq 0x92e0
movq -0xe0(%rbp), %rdi
movq -0xd8(%rbp), %rsi
movq %rax, %rdx
callq 0x9360
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0xc2(%rbp)
jne 0x34434
xorl %eax, %eax
movl %eax, %esi
leaq -0x50(%rbp), %rdi
callq 0x9eb0
movq %rax, -0xe8(%rbp)
jmp 0x3441e
movq -0xe8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2b, %eax
sete %al
movb %al, -0xc2(%rbp)
movb -0xc2(%rbp), %al
movb %al, -0xe9(%rbp)
testb $0x1, -0x81(%rbp)
jne 0x3444b
jmp 0x34454
leaq -0x80(%rbp), %rdi
callq 0x9480
movb -0xe9(%rbp), %al
testb $0x1, %al
jne 0x34460
jmp 0x34498
jmp 0x3449d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x3483d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
testb $0x1, -0x81(%rbp)
jne 0x3448a
jmp 0x34493
leaq -0x80(%rbp), %rdi
callq 0x9480
jmp 0x3483d
jmp 0x34312
jmp 0x3449f
movq -0x20(%rbp), %rdi
leaq 0x88e18(%rip), %rsi     # 0xbd2c2
callq 0x96f0
movq -0x8(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x9160
movq %rax, -0xf8(%rbp)
jmp 0x344c5
movq -0xf8(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x9950
movb %al, -0xf9(%rbp)
jmp 0x344e3
movb -0xf9(%rbp), %al
testb $0x1, %al
jne 0x344f2
jmp 0x34821
xorl %eax, %eax
movl %eax, %esi
leaq -0x50(%rbp), %rdi
callq 0x9eb0
movq %rax, -0x108(%rbp)
jmp 0x34508
movq -0x108(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x23, %eax
je 0x3453c
xorl %eax, %eax
movl %eax, %esi
leaq -0x50(%rbp), %rdi
callq 0x9eb0
movq %rax, -0x110(%rbp)
jmp 0x3452d
movq -0x110(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2a, %eax
jne 0x34541
jmp 0x344af
movq -0x18(%rbp), %rdi
movb $0x0, -0xa9(%rbp)
callq 0x33d80
movl %eax, -0x114(%rbp)
jmp 0x34559
movl -0x114(%rbp), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x115(%rbp)
je 0x3464e
leaq -0x50(%rbp), %rdi
callq 0x92b0
movq %rax, %rdi
callq 0x92e0
movq %rax, -0x120(%rbp)
movq -0x18(%rbp), %rdi
callq 0x92e0
movq -0x120(%rbp), %rcx
movq %rax, %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
movb %al, -0x115(%rbp)
jb 0x3464e
movq -0x18(%rbp), %rdi
callq 0x92e0
movq %rax, %rcx
leaq -0xa8(%rbp), %rdi
leaq -0x50(%rbp), %rsi
movl $0x1, %edx
callq 0x97a0
jmp 0x345cf
movb $0x1, -0xa9(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x92b0
movq %rax, -0x130(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x128(%rbp)
movq -0x18(%rbp), %rdi
callq 0x92e0
movq -0x130(%rbp), %rdi
movq -0x128(%rbp), %rsi
movq %rax, %rdx
callq 0x9360
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x115(%rbp)
jne 0x3464e
xorl %eax, %eax
movl %eax, %esi
leaq -0x50(%rbp), %rdi
callq 0x9eb0
movq %rax, -0x138(%rbp)
jmp 0x34638
movq -0x138(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
sete %al
movb %al, -0x115(%rbp)
movb -0x115(%rbp), %al
movb %al, -0x139(%rbp)
testb $0x1, -0xa9(%rbp)
jne 0x34665
jmp 0x34671
leaq -0xa8(%rbp), %rdi
callq 0x9480
movb -0x139(%rbp), %al
testb $0x1, %al
jne 0x3467d
jmp 0x346b4
movl $0x1, -0xb0(%rbp)
jmp 0x3482b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
testb $0x1, -0xa9(%rbp)
jne 0x346a3
jmp 0x346af
leaq -0xa8(%rbp), %rdi
callq 0x9480
jmp 0x3483d
leaq -0x50(%rbp), %rdi
callq 0x92b0
movq %rax, %rdi
movq -0x10(%rbp), %rsi
callq 0x91b0
cmpq $0x0, %rax
je 0x3481c
leaq -0x50(%rbp), %rdi
movl $0x3d, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x94a0
movl %eax, -0x24(%rbp)
leaq -0x50(%rbp), %rdi
movl $0x21, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x94a0
movl %eax, -0x28(%rbp)
leaq -0x50(%rbp), %rdi
movl $0x23, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x94a0
movl %eax, -0x2c(%rbp)
cmpl $-0x1, -0x28(%rbp)
je 0x3473f
cmpl $-0x1, -0x2c(%rbp)
je 0x3473f
movl -0x28(%rbp), %edi
movl -0x2c(%rbp), %esi
callq 0x38f10
movl %eax, -0x140(%rbp)
jmp 0x34731
movl -0x140(%rbp), %eax
movl %eax, -0x144(%rbp)
jmp 0x34765
cmpl $-0x1, -0x28(%rbp)
je 0x34750
movl -0x28(%rbp), %eax
movl %eax, -0x148(%rbp)
jmp 0x34759
movl -0x2c(%rbp), %eax
movl %eax, -0x148(%rbp)
movl -0x148(%rbp), %eax
movl %eax, -0x144(%rbp)
movl -0x144(%rbp), %eax
movl %eax, -0x30(%rbp)
cmpl $-0x1, -0x30(%rbp)
je 0x347b2
movq -0x20(%rbp), %rax
movq %rax, -0x150(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x92b0
movq -0x150(%rbp), %rdi
movq %rax, %rsi
movl -0x24(%rbp), %edx
addl $0x1, %edx
movl -0x30(%rbp), %ecx
subl -0x24(%rbp), %ecx
subl $0x1, %ecx
callq 0x33e20
movl $0x1, -0xb0(%rbp)
jmp 0x3482b
movq -0x20(%rbp), %rax
movq %rax, -0x168(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x92b0
movq %rax, -0x160(%rbp)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x154(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x92b0
movq %rax, %rdi
callq 0x92e0
movq -0x168(%rbp), %rdi
movq -0x160(%rbp), %rsi
movl -0x154(%rbp), %edx
movslq -0x24(%rbp), %rcx
subq %rcx, %rax
subq $0x1, %rax
movl %eax, %ecx
callq 0x33e20
movl $0x1, -0xb0(%rbp)
jmp 0x3482b
jmp 0x344af
movl $0x0, -0xb0(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x9480
addq $0x170, %rsp            # imm = 0x170
popq %rbp
retq
leaq -0x50(%rbp), %rdi
callq 0x9480
movq -0x58(%rbp), %rdi
callq 0x9d20
nop