// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/backends/xlib/backendxlib.cpp
// Function: smooth::Backends::BackendXLib::QueryKDESettings(smooth::String const&, smooth::String const&)
S::String S::Backends::BackendXLib::QueryKDESettings(const String &category, const String &key)
{
	File		 kdeConfig("kdeglobals", System::System::GetApplicationDataDirectory());

	if (!kdeConfig.Exists()) return NIL;

	IO::InStream	 in(IO::STREAM_FILE, kdeConfig, IO::IS_READ);

	/* Find category header.
	 */
	while (in.GetPos() < in.Size())
	{
		String	 line = in.InputLine();

		if (line == String("[").Append(category).Append("]")) break;
	}

	/* Find key.
	 */
	while (in.GetPos() < in.Size())
	{
		String	 line = in.InputLine();

		if ( line.StartsWith("["))	       break;
		if (!line.StartsWith(key.Append("="))) continue;

		return line.Tail(line.Length() - line.Find("=") - 1);
	}

	return NIL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x198, %rsp            # imm = 0x198
movq %rdx, 0x40(%rsp)
movq %rsi, %r15
movq %rdi, 0x20(%rsp)
leaq 0x4b8a3(%rip), %rsi     # 0x102dec
leaq 0x90(%rsp), %rdi
callq 0x58c40
leaq 0x8(%rsp), %rdi
callq 0x57dd0
leaq 0x60(%rsp), %rdi
leaq 0x90(%rsp), %rsi
leaq 0x8(%rsp), %rdx
callq 0x57940
leaq 0x8(%rsp), %rdi
callq 0x5a588
leaq 0x90(%rsp), %rdi
callq 0x5a588
leaq 0x60(%rsp), %rdi
callq 0x580a0
testb %al, %al
je 0xb767d
leaq 0x8(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x5a310
leaq 0x90(%rsp), %rdi
pushq $0x3
popq %rsi
leaq 0x8(%rsp), %rdx
pushq $0x2
popq %rcx
callq 0x59a20
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x5a588
leaq 0x28(%rsp), %rbx
leaq 0x5532e(%rip), %r14     # 0x10c90e
leaq 0x48(%rsp), %r13
cmpw $0x0, 0x98(%rsp)
je 0xb768e
movq 0xd8(%rsp), %rax
cmpq 0xa0(%rsp), %rax
jge 0xb7698
movq %r12, %rdi
leaq 0x90(%rsp), %rsi
callq 0x58500
movq %rbx, %rdi
leaq 0x2bc18(%rip), %rsi     # 0xe323c
callq 0x58c40
movq %rbx, %rdi
movq %r15, %rsi
callq 0x573e0
movq %rax, %rbp
movq %r13, %rdi
movq %r14, %rsi
callq 0x58c40
movq %rbp, %rdi
movq %r13, %rsi
callq 0x573e0
movq %r12, %rdi
movq %rax, %rsi
callq 0x56960
movl %eax, %ebp
movq %r13, %rdi
callq 0x5a588
movq %rbx, %rdi
callq 0x5a588
movq %r12, %rdi
callq 0x5a588
testb %bpl, %bpl
je 0xb75e5
jmp 0xb7698
movq 0x20(%rsp), %rdi
xorl %esi, %esi
callq 0x5a180
jmp 0xb77e2
movw $0x5, 0x188(%rsp)
cmpw $0x0, 0x98(%rsp)
je 0xb775c
movq 0xd8(%rsp), %rax
cmpq 0xa0(%rsp), %rax
jge 0xb7772
leaq 0x8(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x58500
leaq 0x2bb66(%rip), %rsi     # 0xe323c
leaq 0x28(%rsp), %rdi
callq 0x58c40
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x58a10
movl %eax, %ebx
leaq 0x28(%rsp), %rdi
callq 0x5a588
testb %bl, %bl
jne 0xb7768
leaq 0x4ab07(%rip), %rsi     # 0x10220d
leaq 0x48(%rsp), %rdi
callq 0x58c40
leaq 0x28(%rsp), %rdi
leaq 0x48(%rsp), %rdx
movq 0x40(%rsp), %rsi
callq 0x59750
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x58a10
movl %eax, %ebx
leaq 0x28(%rsp), %rdi
callq 0x5a588
leaq 0x48(%rsp), %rdi
callq 0x5a588
testb %bl, %bl
jne 0xb7780
leaq 0x8(%rsp), %rdi
callq 0x5a588
jmp 0xb7698
movw $0x5, 0x188(%rsp)
jmp 0xb7772
leaq 0x8(%rsp), %rdi
callq 0x5a588
movq 0x20(%rsp), %rdi
xorl %esi, %esi
callq 0x5a180
jmp 0xb77d5
leaq 0x8(%rsp), %rdi
callq 0x58370
movl %eax, %ebx
leaq 0x4aa7a(%rip), %rsi     # 0x10220d
leaq 0x28(%rsp), %rdi
callq 0x58c40
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x58830
notl %eax
addl %eax, %ebx
leaq 0x8(%rsp), %rsi
movq 0x20(%rsp), %rdi
movl %ebx, %edx
callq 0x59220
leaq 0x28(%rsp), %rdi
callq 0x5a588
leaq 0x8(%rsp), %rdi
callq 0x5a588
leaq 0x90(%rsp), %rdi
callq 0x565f0
leaq 0x60(%rsp), %rdi
callq 0x5a500
movq 0x20(%rsp), %rax
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xb7872
jmp 0xb7872
jmp 0xb786d
jmp 0xb7866
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x5a588
jmp 0xb78a5
jmp 0xb7840
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x5a588
jmp 0xb7831
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
callq 0x5a588
jmp 0xb78af
movq %rax, %rbx
jmp 0xb78a5
movq %rax, %rbx
jmp 0xb7859
jmp 0xb7872
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x5a588
leaq 0x48(%rsp), %rdi
jmp 0xb7889
jmp 0xb786d
jmp 0xb7872
jmp 0xb7866
movq %rax, %rbx
jmp 0xb7898
jmp 0xb786d
movq %rax, %rbx
jmp 0xb7884
movq %rax, %rbx
jmp 0xb788e
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x5a588
leaq 0x28(%rsp), %rdi
callq 0x5a588
leaq 0x8(%rsp), %rdi
callq 0x5a588
leaq 0x90(%rsp), %rdi
callq 0x565f0
leaq 0x60(%rsp), %rdi
callq 0x5a500
movq %rbx, %rdi
callq 0x58260
nop