// File: /workspace/github_c_makefile_star2_O1/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, 0x28(%rsp)
movq %rsi, %r15
movq %rdi, 0x8(%rsp)
leaq 0x559d3(%rip), %rsi     # 0x113d34
leaq 0x90(%rsp), %rdi
callq 0x579f0
leaq 0x10(%rsp), %rdi
callq 0x56c50
leaq 0x60(%rsp), %rdi
leaq 0x90(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x56800
leaq 0x10(%rsp), %rdi
callq 0x59200
leaq 0x90(%rsp), %rdi
callq 0x59200
leaq 0x60(%rsp), %rdi
callq 0x56ef0
testb %al, %al
je 0xbe62a
leaq 0x10(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x58fa0
leaq 0x90(%rsp), %rdi
leaq 0x10(%rsp), %rdx
movl $0x3, %esi
movl $0x2, %ecx
callq 0x58730
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x59200
leaq 0x30(%rsp), %r13
leaq 0x5f472(%rip), %rbp     # 0x11d86e
leaq 0x48(%rsp), %r14
movzwl 0x98(%rsp), %ecx
testw %cx, %cx
je 0xbe418
movq 0xd8(%rsp), %rax
jmp 0xbe429
movw $0x5, 0x188(%rsp)
movq $-0x1, %rax
testw %cx, %cx
je 0xbe438
movq 0xa0(%rsp), %rcx
jmp 0xbe449
movw $0x5, 0x188(%rsp)
movq $-0x1, %rcx
cmpq %rcx, %rax
jge 0xbe4c0
movq %rbx, %rdi
leaq 0x90(%rsp), %rsi
callq 0x57310
movq %r13, %rdi
leaq 0x35ded(%rip), %rsi     # 0xf4255
callq 0x579f0
movq %r13, %rdi
movq %r15, %rsi
callq 0x562f0
movq %rax, %r12
movq %r14, %rdi
movq %rbp, %rsi
callq 0x579f0
movq %r12, %rdi
movq %r14, %rsi
callq 0x562f0
movq %rbx, %rdi
movq %rax, %rsi
callq 0x55900
movl %eax, %r12d
movq %r14, %rdi
callq 0x59200
movq %r13, %rdi
callq 0x59200
movq %rbx, %rdi
callq 0x59200
testb %r12b, %r12b
je 0xbe401
leaq 0x10(%rsp), %r15
leaq 0x35d89(%rip), %r13     # 0xf4255
leaq 0x30(%rsp), %rbp
leaq 0x48(%rsp), %rbx
movzwl 0x98(%rsp), %ecx
testw %cx, %cx
je 0xbe4ed
movq 0xd8(%rsp), %rax
jmp 0xbe4fe
movw $0x5, 0x188(%rsp)
movq $-0x1, %rax
testw %cx, %cx
je 0xbe50d
movq 0xa0(%rsp), %rcx
jmp 0xbe51e
movw $0x5, 0x188(%rsp)
movq $-0x1, %rcx
cmpq %rcx, %rax
jge 0xbe60f
movq %r15, %rdi
leaq 0x90(%rsp), %rsi
callq 0x57310
movq %rbp, %rdi
movq %r13, %rsi
callq 0x579f0
movq %r15, %rdi
movq %rbp, %rsi
callq 0x577d0
movl %eax, %r14d
movq %rbp, %rdi
callq 0x59200
movl $0x5, %r12d
testb %r14b, %r14b
jne 0xbe5f7
movq %rbx, %rdi
leaq 0x54bfc(%rip), %rsi     # 0x11316d
callq 0x579f0
movq %rbp, %rdi
movq 0x28(%rsp), %rsi
movq %rbx, %rdx
callq 0x58460
movq %r15, %rdi
movq %rbp, %rsi
callq 0x577d0
movl %eax, %r14d
movq %rbp, %rdi
callq 0x59200
movq %rbx, %rdi
callq 0x59200
movl $0x4, %r12d
testb %r14b, %r14b
je 0xbe5f7
movq %r15, %rdi
callq 0x57180
movl %eax, %r14d
movq %rbp, %rdi
leaq 0x54ba9(%rip), %rsi     # 0x11316d
callq 0x579f0
movq %r15, %rdi
movq %rbp, %rsi
callq 0x57610
notl %eax
addl %eax, %r14d
movq 0x8(%rsp), %rdi
movq %r15, %rsi
movl %r14d, %edx
callq 0x57f90
movq %rbp, %rdi
callq 0x59200
movl $0x1, %r12d
movq %r15, %rdi
callq 0x59200
cmpl $0x4, %r12d
je 0xbe4d6
cmpl $0x5, %r12d
jne 0xbe61b
movq 0x8(%rsp), %rdi
xorl %esi, %esi
callq 0x58e20
leaq 0x90(%rsp), %rdi
callq 0x555b0
jmp 0xbe636
movq 0x8(%rsp), %rdi
xorl %esi, %esi
callq 0x58e20
leaq 0x60(%rsp), %rdi
callq 0x59178
movq 0x8(%rsp), %rax
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xbe6ba
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x59200
jmp 0xbe6f9
jmp 0xbe692
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x59200
jmp 0xbe67f
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
callq 0x59200
jmp 0xbe703
jmp 0xbe6c1
jmp 0xbe6c1
movq %rax, %rbx
jmp 0xbe6f9
jmp 0xbe6c6
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x59200
jmp 0xbe6ab
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
jmp 0xbe6dd
jmp 0xbe6c1
jmp 0xbe6c6
jmp 0xbe6c1
jmp 0xbe6ba
movq %rax, %rbx
jmp 0xbe6ec
jmp 0xbe6c6
movq %rax, %rbx
jmp 0xbe6e2
movq %rax, %rbx
jmp 0xbe6d8
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x59200
leaq 0x30(%rsp), %rdi
callq 0x59200
leaq 0x10(%rsp), %rdi
callq 0x59200
leaq 0x90(%rsp), %rdi
callq 0x555b0
leaq 0x60(%rsp), %rdi
callq 0x59178
movq %rbx, %rdi
callq 0x57090
nop