// File: /workspace/github_c_makefile_star2_O0/DeforaOS[P]libSystem/src/config.c
// Function: config_load_preferences_user
int config_load_preferences_user(Config * config, String const * vendor,
		String const * package, String const * filename)
{
	int ret;
	String const * homedir;
	String * f;

	if(filename == NULL)
		return error_set_code(-EINVAL, "%s", strerror(EINVAL));
	if(vendor != NULL && (string_compare_length(vendor, "../", 3) == 0
				|| string_find(vendor, "/..") != NULL))
		return error_set_code(-EPERM, "%s", strerror(EPERM));
	if(package != NULL && (string_compare_length(package, "../", 3) == 0
				|| string_find(package, "/..") != NULL))
		return error_set_code(-EPERM, "%s", strerror(EPERM));
	if(filename != NULL && string_find(filename, "/") != NULL)
		return error_set_code(-EPERM, "%s", strerror(EPERM));
	if((homedir = getenv("HOME")) == NULL)
		return error_set_code(-errno, "%s", strerror(errno));
	if((f = string_new_append(homedir, "/.config/",
					(vendor != NULL) ? vendor : "", "/",
					(package != NULL) ? package : "", "/",
					filename, NULL)) == NULL)
		return error_get_code();
	ret = config_load(config, f);
	string_delete(f);
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x666a
movl $0x16, %edi
callq 0x4840
movq %rax, %rdx
movl $0xffffffea, %edi       # imm = 0xFFFFFFEA
leaq 0x9a03(%rip), %rsi      # 0x1005e
movb $0x0, %al
callq 0x4630
movl %eax, -0x4(%rbp)
jmp 0x6870
cmpq $0x0, -0x18(%rbp)
je 0x66c9
movq -0x18(%rbp), %rdi
leaq 0x9a0c(%rip), %rsi      # 0x10088
movl $0x3, %edx
callq 0x44f0
cmpl $0x0, %eax
je 0x66a1
movq -0x18(%rbp), %rdi
leaq 0x99f6(%rip), %rsi      # 0x1008c
callq 0x42d0
cmpq $0x0, %rax
je 0x66c9
movl $0x1, %edi
callq 0x4840
movq %rax, %rdx
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
leaq 0x99a4(%rip), %rsi      # 0x1005e
movb $0x0, %al
callq 0x4630
movl %eax, -0x4(%rbp)
jmp 0x6870
cmpq $0x0, -0x20(%rbp)
je 0x6728
movq -0x20(%rbp), %rdi
leaq 0x99ad(%rip), %rsi      # 0x10088
movl $0x3, %edx
callq 0x44f0
cmpl $0x0, %eax
je 0x6700
movq -0x20(%rbp), %rdi
leaq 0x9997(%rip), %rsi      # 0x1008c
callq 0x42d0
cmpq $0x0, %rax
je 0x6728
movl $0x1, %edi
callq 0x4840
movq %rax, %rdx
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
leaq 0x9945(%rip), %rsi      # 0x1005e
movb $0x0, %al
callq 0x4630
movl %eax, -0x4(%rbp)
jmp 0x6870
cmpq $0x0, -0x28(%rbp)
je 0x676d
movq -0x28(%rbp), %rdi
leaq 0x9950(%rip), %rsi      # 0x1008a
callq 0x42d0
cmpq $0x0, %rax
je 0x676d
movl $0x1, %edi
callq 0x4840
movq %rax, %rdx
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
leaq 0x9900(%rip), %rsi      # 0x1005e
movb $0x0, %al
callq 0x4630
movl %eax, -0x4(%rbp)
jmp 0x6870
leaq 0x992b(%rip), %rdi      # 0x1009f
callq 0x4050
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
jne 0x67ba
callq 0x40d0
movq %rax, %rcx
xorl %eax, %eax
subl (%rcx), %eax
movl %eax, -0x44(%rbp)
callq 0x40d0
movl (%rax), %edi
callq 0x4840
movl -0x44(%rbp), %edi
movq %rax, %rdx
leaq 0x98b3(%rip), %rsi      # 0x1005e
movb $0x0, %al
callq 0x4630
movl %eax, -0x4(%rbp)
jmp 0x6870
movq -0x38(%rbp), %rax
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x67d3
movq -0x18(%rbp), %rax
movq %rax, -0x58(%rbp)
jmp 0x67e0
leaq 0x98df(%rip), %rax      # 0x100b9
movq %rax, -0x58(%rbp)
jmp 0x67e0
movq -0x58(%rbp), %rax
movq %rax, -0x60(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x67f9
movq -0x20(%rbp), %rax
movq %rax, -0x68(%rbp)
jmp 0x6806
leaq 0x98b9(%rip), %rax      # 0x100b9
movq %rax, -0x68(%rbp)
jmp 0x6806
movq -0x60(%rbp), %rdx
movq -0x50(%rbp), %rdi
movq -0x68(%rbp), %r8
movq -0x28(%rbp), %rax
leaq 0x9887(%rip), %rsi      # 0x100a4
leaq 0x9866(%rip), %r9       # 0x1008a
xorl %ecx, %ecx
movq %r9, %rcx
movq %rax, (%rsp)
movq $0x0, 0x8(%rsp)
movb $0x0, %al
callq 0x4220
movq %rax, -0x40(%rbp)
cmpq $0x0, %rax
jne 0x6851
callq 0x4410
movl %eax, -0x4(%rbp)
jmp 0x6870
movq -0x10(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x41a0
movl %eax, -0x2c(%rbp)
movq -0x40(%rbp), %rdi
callq 0x4260
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax)