// File: /workspace/github_c_makefile_star2_O3/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 0x55b5b(%rip), %rsi     # 0x112f34
leaq 0x90(%rsp), %rdi
callq 0x579f0
leaq 0x8(%rsp), %rdi
callq 0x56c50
leaq 0x60(%rsp), %rdi
leaq 0x90(%rsp), %rsi
leaq 0x8(%rsp), %rdx
callq 0x56800
leaq 0x8(%rsp), %rdi
callq 0x59200
leaq 0x90(%rsp), %rdi
callq 0x59200
leaq 0x60(%rsp), %rdi
callq 0x56ef0
testb %al, %al
je 0xbd511
leaq 0x8(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x58fa0
leaq 0x90(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movl $0x3, %esi
movl $0x2, %ecx
callq 0x58730
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x59200
leaq 0x28(%rsp), %rbx
leaq 0x5f60a(%rip), %r14     # 0x11ca7e
leaq 0x48(%rsp), %r13
cmpw $0x0, 0x98(%rsp)
je 0xbd650
movq 0xd8(%rsp), %rax
cmpq 0xa0(%rsp), %rax
jge 0xbd597
movq %r12, %rdi
leaq 0x90(%rsp), %rsi
callq 0x57310
movq %rbx, %rdi
leaq 0x35d9d(%rip), %rsi     # 0xf3255
callq 0x579f0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x562f0
movq %rax, %rbp
movq %r13, %rdi
movq %r14, %rsi
callq 0x579f0
movq %rbp, %rdi
movq %r13, %rsi
callq 0x562f0
movq %r12, %rdi
movq %rax, %rsi
callq 0x55900
movl %eax, %ebp
movq %r13, %rdi
callq 0x59200
movq %rbx, %rdi
callq 0x59200
movq %r12, %rdi
callq 0x59200
testb %bpl, %bpl
je 0xbd479
jmp 0xbd588
movq 0x20(%rsp), %rdi
xorl %esi, %esi
callq 0x58e20
jmp 0xbd673
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x59200
jmp 0xbd746
jmp 0xbd55a
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x59200
jmp 0xbd548
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
callq 0x59200
jmp 0xbd750
movq %rax, %rbx
jmp 0xbd746
jmp 0xbd758
jmp 0xbd71d
jmp 0xbd71d
jmp 0xbd72c
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x59200
jmp 0xbd720
cmpw $0x0, 0x98(%rsp)
je 0xbd650
movq 0xd8(%rsp), %rax
cmpq 0xa0(%rsp), %rax
jge 0xbd65a
leaq 0x8(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x57310
leaq 0x35c8f(%rip), %rsi     # 0xf3255
leaq 0x28(%rsp), %rdi
callq 0x579f0
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x577d0
movl %eax, %ebx
leaq 0x28(%rsp), %rdi
callq 0x59200
testb %bl, %bl
jne 0xbd694
leaq 0x54d23(%rip), %rsi     # 0x11231d
leaq 0x48(%rsp), %rdi
callq 0x579f0
leaq 0x28(%rsp), %rdi
leaq 0x48(%rsp), %rdx
movq 0x40(%rsp), %rsi
callq 0x58460
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x577d0
movl %eax, %ebx
leaq 0x28(%rsp), %rdi
callq 0x59200
leaq 0x48(%rsp), %rdi
callq 0x59200
testb %bl, %bl
jne 0xbd6a0
leaq 0x8(%rsp), %rdi
callq 0x59200
jmp 0xbd588
movw $0x5, 0x188(%rsp)
movq 0x20(%rsp), %rdi
xorl %esi, %esi
callq 0x58e20
leaq 0x90(%rsp), %rdi
callq 0x555b0
leaq 0x60(%rsp), %rdi
callq 0x59178
movq 0x20(%rsp), %rax
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8(%rsp), %rdi
callq 0x59200
jmp 0xbd65a
leaq 0x8(%rsp), %rdi
callq 0x57180
movl %eax, %ebx
leaq 0x54c6a(%rip), %rsi     # 0x11231d
leaq 0x28(%rsp), %rdi
callq 0x579f0
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x57610
notl %eax
addl %eax, %ebx
leaq 0x8(%rsp), %rsi
movq 0x20(%rsp), %rdi
movl %ebx, %edx
callq 0x57f90
leaq 0x28(%rsp), %rdi
callq 0x59200
leaq 0x8(%rsp), %rdi
callq 0x59200
jmp 0xbd666
jmp 0xbd72c
jmp 0xbd72c
jmp 0xbd71d
jmp 0xbd758
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x59200
jmp 0xbd714
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
jmp 0xbd725
jmp 0xbd72c
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x59200
jmp 0xbd72f
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x59200
leaq 0x90(%rsp), %rdi
callq 0x555b0
leaq 0x60(%rsp), %rdi
callq 0x59178
movq %rbx, %rdi
callq 0x57090
movq %rax, %rbx
jmp 0xbd739
nop