LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/DeforaOS[P]libSystem/src/array.c
// Function: array_new
Array * array_new(size_t size)
{
	Array * array;

	/* check for overflows */
	if(UINT32_MAX < SIZE_MAX && size > UINT32_MAX)
	{
		error_set_code(-ERANGE, "%s", strerror(ERANGE));
		return NULL;
	}
	if((array = (Array *)object_new(sizeof(*array))) == NULL)
		return NULL;
	array->count = 0;
	array->size = size;
	array->value = NULL;
	return array;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rax
shrq $0x20, %rax
je 0x4999
pushq $0x22
popq %rdi
callq 0x47f0
leaq 0x66d6(%rip), %rsi      # 0xb05e
xorl %ebx, %ebx
pushq $-0x22
popq %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x4610
jmp 0x49bc
movq %rdi, %r14
pushq $0x10
popq %rdi
callq 0x4620
testq %rax, %rax
je 0x49ba
movq %rax, %rbx
andl $0x0, (%rax)
movl %r14d, 0x4(%rax)
andq $0x0, 0x8(%rax)
jmp 0x49bc
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/DeforaOS[P]libSystem/src/array.c
// Function: array_new_copy
Array * array_new_copy(Array const * from)
{
	Array * array;

	if((array = (Array *)object_new(sizeof(*array))) == NULL)
		return NULL;
	array->value = NULL;
	if(array_copy(array, from) != 0)
	{
		array_delete(array);
		return NULL;
	}
	return array;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
pushq $0x10
popq %rdi
callq 0x4620
testq %rax, %rax
je 0x49fa
movq %rax, %rbx
andq $0x0, 0x8(%rax)
movq %rax, %rdi
movq %r14, %rsi
callq 0x4360
testl %eax, %eax
je 0x49fc
movq %rbx, %rdi
callq 0x44c0
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/DeforaOS[P]libSystem/src/array.c
// Function: array_copy
ArrayError array_copy(Array * array, Array const * from)
{
	char * p;

	if((p = (char *)realloc(array->value, from->count * from->size)) == NULL
			&& from->count != 0 && from->size != 0)
		return error_set_code(-errno, "%s", strerror(errno));
	array->count = from->count;
	array->size = from->size;
	array->value = p;
	memcpy(array->value, from->value, array->count * array->size);
	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %rdi
movl 0x4(%rsi), %esi
imull (%rbx), %esi
callq 0x4600
movl (%rbx), %ecx
testq %rax, %rax
je 0x4a4e
movl 0x4(%rbx), %edx
movl %ecx, (%r14)
movl %edx, 0x4(%r14)
movq %rax, 0x8(%r14)
movq 0x8(%rbx), %rsi
imull %ecx, %edx
movq %rax, %rdi
callq 0x44b0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl 0x4(%rbx), %edx
testl %ecx, %ecx
je 0x4a2a
testl %edx, %edx
je 0x4a83
callq 0x40e0
movl (%rax), %edi
movl %edi, %ebx
negl %ebx
callq 0x47f0
leaq 0x65ee(%rip), %rsi      # 0xb05e
movl %ebx, %edi
movq %rax, %rdx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x4610
xorl %edx, %edx
jmp 0x4a2a
// File: /workspace/github_c_makefile_star2_O2/DeforaOS[P]libSystem/src/array.c
// Function: array_new_filter
Array * array_new_filter(Array const * from, ArrayFilter func, UserData * data)
{
	Array * array;
	size_t i;
	char * value;

	if((array = array_new(from->size)) == NULL)
		return NULL;
	for(i = 0; i < from->count; i++)
	{
		value = from->value + (from->size * i);
		if(func(value, data) == true)
			if(array_append(array, value) != 0)
			{
				array_delete(array);
				return NULL;
			}
	}
	return array;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movl 0x4(%rdi), %edi
callq 0x45f0
testq %rax, %rax
je 0x4b03
movq %rax, %rbx
xorl %ebp, %ebp
movl (%r12), %eax
cmpq %rax, %rbp
jae 0x4b05
movl 0x4(%r12), %r13d
imulq %rbp, %r13
addq 0x8(%r12), %r13
movq %r13, %rdi
movq %r14, %rsi
callq *%r15
testb %al, %al
je 0x4af6
movq %rbx, %rdi
movq %r13, %rsi
callq 0x4290
testl %eax, %eax
jne 0x4afb
incq %rbp
jmp 0x4ac3
movq %rbx, %rdi
callq 0x44c0
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/DeforaOS[P]libSystem/src/array.c
// Function: array_append
ArrayError array_append(Array * array, ArrayData * value)
{
	char * p;
	uint64_t offset = array->size * array->count;

	/* check for overflows */
	if(UINT64_MAX - offset < array->size
			|| offset + array->size > SIZE_MAX)
		return error_set_code(-ERANGE, "%s", strerror(ERANGE));
	if((p = (char *)realloc(array->value, offset + array->size)) == NULL)
		return error_set_code(-errno, "%s", strerror(errno));
	array->value = p;
	memcpy(&p[offset], value, array->size);
	array->count++;
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movl 0x4(%rdi), %esi
movl (%rdi), %r15d
imull %esi, %r15d
addq %r15, %rsi
movq 0x8(%rdi), %rdi
callq 0x4600
testq %rax, %rax
je 0x4b5c
movq %rax, 0x8(%rbx)
addq %rax, %r15
movl 0x4(%rbx), %edx
movq %r15, %rdi
movq %r14, %rsi
callq 0x44b0
incl (%rbx)
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
callq 0x40e0
movl (%rax), %edi
movl %edi, %ebx
negl %ebx
callq 0x47f0
leaq 0x64eb(%rip), %rsi      # 0xb05e
movl %ebx, %edi
movq %rax, %rdx
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x4610
// File: /workspace/github_c_makefile_star2_O2/DeforaOS[P]libSystem/src/array.c
// Function: array_new_filter_swap
Array * array_new_filter_swap(Array const * from, ArrayFilterSwap func,
		UserData * data)
{
	Array * array;
	size_t i;
	char * value;

	if((array = array_new(from->size)) == NULL)
		return NULL;
	for(i = 0; i < from->count; i++)
	{
		value = from->value + (from->size * i);
		if(func(data, value) == true)
			if(array_append(array, value) != 0)
			{
				array_delete(array);
				return NULL;
			}
	}
	return array;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movl 0x4(%rdi), %edi
callq 0x45f0
testq %rax, %rax
je 0x4bea
movq %rax, %rbx
xorl %ebp, %ebp
movl (%r12), %eax
cmpq %rax, %rbp
jae 0x4bec
movl 0x4(%r12), %r13d
imulq %rbp, %r13
addq 0x8(%r12), %r13
movq %r14, %rdi
movq %r13, %rsi
callq *%r15
testb %al, %al
je 0x4bdd
movq %rbx, %rdi
movq %r13, %rsi
callq 0x4290
testl %eax, %eax
jne 0x4be2
incq %rbp
jmp 0x4baa
movq %rbx, %rdi
callq 0x44c0
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/DeforaOS[P]libSystem/src/array.c
// Function: array_get_copy
ArrayError array_get_copy(Array const * array, size_t pos, ArrayData * value)
{
	uint64_t offset;

	if(pos >= array->count)
		return error_set_code(-ERANGE, "%s", strerror(ERANGE));
	offset = pos * array->size;
	memcpy(value, &array->value[offset], array->size);
	return 0;
}

// Assembly:
pushq %rax
movl (%rdi), %eax
cmpq %rsi, %rax
jbe 0x4c39
movl 0x4(%rdi), %eax
imulq %rax, %rsi
addq 0x8(%rdi), %rsi
movq %rdx, %rdi
movq %rax, %rdx
callq 0x44b0
xorl %eax, %eax
popq %rcx
retq
pushq $0x22
popq %rdi
callq 0x47f0
leaq 0x6416(%rip), %rsi      # 0xb05e
pushq $-0x22
popq %rdi
movq %rax, %rdx
xorl %eax, %eax
popq %rcx
jmp 0x4610
// File: /workspace/github_c_makefile_star2_O2/DeforaOS[P]libSystem/src/array.c
// Function: array_set
ArrayError array_set(Array * array, size_t pos, ArrayData * value)
{
	uint32_t p = pos + 1;
	uint64_t offset;
	uint64_t curpos;
	void * q;

	/* check for overflows */
	if(pos >= UINT32_MAX)
		return error_set_code(-ERANGE, "%s", strerror(ERANGE));
	offset = pos * array->size;
	if(array->count < p)
	{
		/* grow the array */
		if(UINT64_MAX - offset < array->size
				|| offset + array->size > SIZE_MAX)
			return error_set_code(-ERANGE, "%s", strerror(ERANGE));
		if((q = realloc(array->value, offset + array->size)) == NULL)
			return error_set_code(-errno, "%s", strerror(errno));
		array->value = (char *)q;
		curpos = array->count * array->size;
		memset(&array->value[curpos], 0, offset - curpos);
		array->count = pos + 1;
	}
	/* set the value */
	memcpy(&array->value[offset], value, array->size);
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rax, %rsi
jb 0x4c99
pushq $0x22
popq %rdi
callq 0x47f0
leaq 0x63e0(%rip), %rsi      # 0xb05e
pushq $-0x22
popq %rdi
movq %rax, %rdx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4610
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leal 0x1(%rsi), %ebp
movl 0x4(%rdi), %r12d
imulq %r12, %r14
cmpl %ebp, (%rdi)
jae 0x4cef
addq %r14, %r12
movq 0x8(%r15), %rdi
movq %r12, %rsi
callq 0x4600
testq %rax, %rax
je 0x4d15
movq %rax, %r13
movq %rax, 0x8(%r15)
movl 0x4(%r15), %r12d
movl (%r15), %eax
imull %r12d, %eax
movq %r13, %rdi
addq %rax, %rdi
movq %r14, %rdx
subq %rax, %rdx
xorl %esi, %esi
callq 0x4320
movl %ebp, (%r15)
jmp 0x4cf3
movq 0x8(%r15), %r13
addq %r14, %r13
movq %r13, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x44b0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x40e0
movl (%rax), %edi
movl %edi, %ebx
negl %ebx
callq 0x47f0
leaq 0x6332(%rip), %rsi      # 0xb05e
movl %ebx, %edi
jmp 0x4c81
// File: /workspace/github_c_makefile_star2_O2/DeforaOS[P]libSystem/src/array.c
// Function: array_insert
ArrayError array_insert(Array * array, size_t pos, ArrayData * value)
{
	char * p;
	uint64_t offset = array->size * pos;
	uint64_t size = array->size * (array->count + 1);

	/* check for errors */
	if(pos > array->count)
		return error_set_code(-ERANGE, "%s", strerror(ERANGE));
	/* check for overflows */
	if(UINT64_MAX - offset < array->size
			|| offset + array->size > SIZE_MAX)
		return error_set_code(-ERANGE, "%s", strerror(ERANGE));
	if((p = (char *)realloc(array->value, size)) == NULL)
		return error_set_code(-errno, "%s", strerror(errno));
	array->value = p;
	memmove(&p[offset + array->size], &p[offset], array->size
			* (array->count - pos));
	memcpy(&p[offset], value, array->size);
	array->count++;
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r12
movl (%rdi), %esi
cmpq %r12, %rsi
jb 0x4d5d
movq %rdi, %rbx
movl 0x4(%rdi), %eax
movq %rax, %r15
imulq %r12, %r15
movq %r15, %rcx
addq %rax, %rcx
jae 0x4d87
pushq $0x22
popq %rdi
callq 0x47f0
leaq 0x62f2(%rip), %rsi      # 0xb05e
pushq $-0x22
popq %rdi
movq %rax, %rdx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4610
movq %rdx, %r14
incl %esi
imull %eax, %esi
movq 0x8(%rbx), %rdi
callq 0x4600
testq %rax, %rax
je 0x4de4
movq %rax, 0x8(%rbx)
movl (%rbx), %ebp
movl 0x4(%rbx), %r13d
addq %rax, %r15
leaq (%r15,%r13), %rdi
movq %rbp, %rdx
subq %r12, %rdx
imulq %r13, %rdx
movq %r15, %rsi
callq 0x4680
movq %r15, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x44b0
leal 0x1(%rbp), %eax
movl %eax, (%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x40e0
movl (%rax), %edi
movl %edi, %ebx
negl %ebx
callq 0x47f0
leaq 0x6263(%rip), %rsi      # 0xb05e
movl %ebx, %edi
jmp 0x4d6f
// File: /workspace/github_c_makefile_star2_O2/DeforaOS[P]libSystem/src/array.c
// Function: array_remove_pos
ArrayError array_remove_pos(Array * array, size_t pos)
{
	void * p;

	if(pos >= array->count)
		return error_set_code(-ERANGE, "%s", strerror(ERANGE));
	array->count--;
	memmove(&array->value[pos * array->size],
			&array->value[(pos + 1) * array->size],
			(array->count - pos) * array->size);
	if((p = realloc(array->value, array->size * array->count)) == NULL
			&& array->count != 0)
		/* XXX ignore the error */
		return 0;
	array->value = (char *)p;
	return 0;
}

// Assembly:
pushq %rbx
movl (%rdi), %edx
cmpq %rsi, %rdx
jbe 0x4e5d
movq %rdi, %rbx
decl %edx
movl %edx, (%rdi)
movq 0x8(%rdi), %rcx
movl 0x4(%rdi), %edi
leaq 0x1(%rsi), %rax
imulq %rdi, %rax
subq %rsi, %rdx
imulq %rdi, %rdx
imulq %rsi, %rdi
addq %rcx, %rdi
addq %rcx, %rax
movq %rax, %rsi
callq 0x4680
movq 0x8(%rbx), %rdi
movl (%rbx), %esi
imull 0x4(%rbx), %esi
callq 0x4600
testq %rax, %rax
je 0x4e7a
movq %rax, 0x8(%rbx)
jmp 0x4e7f
pushq $0x22
popq %rdi
callq 0x47f0
leaq 0x61f2(%rip), %rsi      # 0xb05e
pushq $-0x22
popq %rdi
movq %rax, %rdx
xorl %eax, %eax
popq %rbx
jmp 0x4610
cmpl $0x0, (%rbx)
je 0x4e57
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/DeforaOS[P]libSystem/src/array.c
// Function: array_filter
void array_filter(Array * array, ArrayFilter func, UserData * data)
{
	uint32_t i;
	uint64_t offset;

	for(i = 0, offset = 0; i < array->count;)
		if(func(array->value + offset, data) == false)
			/* cannot fail */
			array_remove_pos(array, i);
		else
		{
			i++;
			offset += array->size;
		}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
xorl %r12d, %r12d
xorl %r13d, %r13d
movl %r12d, %r12d
cmpl (%r15), %r12d
jae 0x4ecd
movq 0x8(%r15), %rdi
addq %r13, %rdi
movq %rbx, %rsi
callq *%r14
testb %al, %al
jne 0x4ec1
movq %r15, %rdi
movq %r12, %rsi
callq 0x4580
jmp 0x4e9e
incl %r12d
movl 0x4(%r15), %eax
addq %rax, %r13
jmp 0x4e9b
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/DeforaOS[P]libSystem/src/array.c
// Function: array_filter_swap
void array_filter_swap(Array * array, ArrayFilterSwap func, UserData * data)
{
	uint32_t i;
	uint64_t offset;

	for(i = 0, offset = 0; i < array->count;)
		if(func(data, array->value + offset) == false)
			/* cannot fail */
			array_remove_pos(array, i);
		else
		{
			i++;
			offset += array->size;
		}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
xorl %r12d, %r12d
xorl %r13d, %r13d
movl %r12d, %r12d
cmpl (%r15), %r12d
jae 0x4f21
movq 0x8(%r15), %rsi
addq %r13, %rsi
movq %rbx, %rdi
callq *%r14
testb %al, %al
jne 0x4f15
movq %r15, %rdi
movq %r12, %rsi
callq 0x4580
jmp 0x4ef2
incl %r12d
movl 0x4(%r15), %eax
addq %rax, %r13
jmp 0x4eef
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/DeforaOS[P]libSystem/src/buffer.c
// Function: buffer_new
Buffer * buffer_new(size_t size, BufferData const * data)
{
	Buffer * buffer;

	if((buffer = (Buffer *)object_new(sizeof(*buffer))) == NULL)
		return NULL;
	if((buffer->data = (BufferData *)object_new(size)) == NULL && size != 0)
	{
		object_delete(buffer);
		return NULL;
	}
	if(data == NULL)
		memset(buffer->data, 0, size);
	else
		memcpy(buffer->data, data, size);
	buffer->size = size;
	return buffer;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %r14
pushq $0x10
popq %rdi
callq 0x4620
testq %rax, %rax
je 0x4feb
movq %rax, %rbx
movq %r14, %rdi
callq 0x4620
movq %rax, 0x8(%rbx)
testq %rax, %rax
setne %cl
testq %r14, %r14
sete %dl
orb %cl, %dl
jne 0x4fef
movq %rbx, %rdi
callq 0x44a0
xorl %ebx, %ebx
jmp 0x5011
movq %rax, %rdi
testq %r15, %r15
je 0x5004
movq %r15, %rsi
movq %r14, %rdx
callq 0x44b0
jmp 0x500e
xorl %esi, %esi
movq %r14, %rdx
callq 0x4320
movq %r14, (%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/DeforaOS[P]libSystem/src/buffer.c
// Function: buffer_set
int buffer_set(Buffer * buffer, size_t size, BufferData const * data)
{
	if(buffer_set_size(buffer, size) != 0)
		return -1;
	if(data == NULL)
		memset(buffer->data, 0, size);
	else
		memcpy(buffer->data, data, size);
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
callq 0x4120
testl %eax, %eax
je 0x5066
pushq $-0x1
popq %rbp
jmp 0x508a
movq 0x8(%r15), %rdi
testq %r14, %r14
je 0x507e
movq %r14, %rsi
movq %rbx, %rdx
callq 0x44b0
xorl %ebp, %ebp
jmp 0x508a
xorl %ebp, %ebp
xorl %esi, %esi
movq %rbx, %rdx
callq 0x4320
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/DeforaOS[P]libSystem/src/buffer.c
// Function: buffer_set_size
int buffer_set_size(Buffer * buffer, size_t size)
{
	BufferData * p;

	if(size == buffer->size)
		return 0;
	if((p = (BufferData *)realloc(buffer->data, size)) == NULL && size != 0)
		return error_set_code(-errno, "%s", strerror(errno));
	buffer->data = p;
	if(size > buffer->size)
		memset(&buffer->data[buffer->size], 0, size - buffer->size);
	buffer->size = size;
	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpq %rsi, (%rdi)
je 0x5108
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %rdi
callq 0x4600
testq %rax, %rax
setne %cl
testq %rbx, %rbx
sete %dl
orb %cl, %dl
jne 0x50e9
callq 0x40e0
movl (%rax), %edi
movl %edi, %ebx
negl %ebx
callq 0x47f0
leaq 0x5f88(%rip), %rsi      # 0xb05e
movl %ebx, %edi
movq %rax, %rdx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x4610
movq %rax, 0x8(%r14)
movq (%r14), %rcx
movq %rbx, %rdx
subq %rcx, %rdx
jbe 0x5105
addq %rcx, %rax
movq %rax, %rdi
xorl %esi, %esi
callq 0x4320
movq %rbx, (%r14)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/DeforaOS[P]libSystem/src/buffer.c
// Function: buffer_set_data
int buffer_set_data(Buffer * buffer, size_t offset, BufferData const * data,
		size_t size)
{
	size_t s = offset + size;

	if(s < offset && s < size)
		return error_set_code(-ERANGE, "%s", strerror(ERANGE));
	if(offset + size > buffer->size)
		if(buffer_set_size(buffer, offset + size) != 0)
			return -1;
	memcpy(&buffer->data[offset], data, size);
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rcx, %rsi
addq %r15, %rsi
jae 0x514c
pushq $0x22
popq %rdi
callq 0x47f0
leaq 0x5f2a(%rip), %rsi      # 0xb05e
pushq $-0x22
popq %rdi
movq %rax, %rdx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x4610
movq %rcx, %rbx
movq %rdx, %r14
movq %rdi, %r12
cmpq (%rdi), %rsi
jbe 0x516b
movq %r12, %rdi
callq 0x4120
testl %eax, %eax
je 0x516b
pushq $-0x1
popq %rax
jmp 0x5180
addq 0x8(%r12), %r15
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x44b0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/DeforaOS[P]libSystem/src/config.c
// Function: config_new_copy
Config * config_new_copy(Config const * from)
{
	ConfigError ce;

	if((ce.config = mutator_new()) == NULL)
		return NULL;
	ce.code = 0;
	config_foreach(from, _new_copy_foreach, &ce);
	if(ce.code != 0)
	{
		config_delete(ce.config);
		return NULL;
	}
	return ce.config;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
callq 0x4390
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x51d8
leaq 0x8(%rsp), %r14
andl $0x0, 0x8(%r14)
leaq 0x4b(%rip), %rsi        # 0x5206
movq %rbx, %rdi
movq %r14, %rdx
callq 0x4310
cmpl $0x0, 0x8(%r14)
movq (%r14), %rax
je 0x51da
movq %rax, %rdi
callq 0x4400
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/DeforaOS[P]libSystem/src/config.c
// Function: config_new_load
Config * config_new_load(String const * filename)
{
	Config * config;

	if(filename == NULL)
		return config_new();
	if((config = config_new()) == NULL)
		return NULL;
	if(config_load(config, filename) != 0)
	{
		config_delete(config);
		return NULL;
	}
	return config;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x4390
movq %rax, %rbx
testq %r14, %r14
je 0x5260
testq %rbx, %rbx
je 0x525e
movq %rbx, %rdi
movq %r14, %rsi
callq 0x41a0
testl %eax, %eax
je 0x5260
movq %rbx, %rdi
callq 0x4400
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/DeforaOS[P]libSystem/src/config.c
// Function: config_get
String const * config_get(Config const * config, String const * section,
		String const * variable)
{
	Mutator * mutator;
	String const * value;

	if(section == NULL)
		section = "";
	if((mutator = (Mutator *)mutator_get(config, section)) == NULL)
	{
		/* the section does not exist */
		if(section[0] == '\0')
			error_set_code(1, "%s", "No default section");
		else
			error_set_code(1, "%s%s", section, ": No such section");
		return NULL;
	}
	if((value = (String const *)mutator_get(mutator, variable)) == NULL)
	{
		/* the variable is not defined */
		error_set_code(1, "%s%s%s%s%s", variable, ": Not defined in",
				(section[0] == '\0') ? " default" : "",
				" section ",
				(section[0] != '\0') ? section : "");
		return NULL;
	}
	return value;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %rbx
testq %rsi, %rsi
leaq 0x5ac4(%rip), %r12      # 0xb0b9
cmoveq %r12, %rbx
movq %rbx, %rsi
callq 0x45a0
testq %rax, %rax
je 0x5656
movq %rax, %rdi
movq %r14, %rsi
callq 0x45a0
movq %rax, %r15
testq %rax, %rax
jne 0x5696
cmpb $0x0, (%rbx)
leaq 0x5a1e(%rip), %r8       # 0xb041
cmovneq %r12, %r8
cmoveq %r12, %rbx
movq %rbx, (%rsp)
leaq 0x59ef(%rip), %rsi      # 0xb025
leaq 0x59f3(%rip), %rcx      # 0xb030
leaq 0x5a06(%rip), %r9       # 0xb04a
xorl %r15d, %r15d
pushq $0x1
popq %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x4610
jmp 0x5696
cmpb $0x0, (%rbx)
je 0x567b
leaq 0x59c9(%rip), %rsi      # 0xb02b
leaq 0x59aa(%rip), %rcx      # 0xb013
xorl %r15d, %r15d
pushq $0x1
popq %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x4610
jmp 0x5696
leaq 0x59dc(%rip), %rsi      # 0xb05e
leaq 0x5977(%rip), %rdx      # 0xb000
xorl %r15d, %r15d
pushq $0x1
popq %rdi
xorl %eax, %eax
callq 0x4610
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/DeforaOS[P]libSystem/src/config.c
// Function: config_set
int config_set(Config * config, String const * section, String const * variable,
		String const * value)
{
	Mutator * mutator;
	String * p;
	String * newvalue = NULL;

#ifdef DEBUG
	fprintf(stderr, "DEBUG: %s(\"%s\", \"%s\", \"%s\")\n", __func__,
			section, variable, value);
#endif
	if(section == NULL)
		section = "";
	if(variable == NULL || string_get_length(variable) == 0)
		return error_set_code(-EINVAL, "variable: %s",
				strerror(EINVAL));
	if((mutator = (Mutator *)mutator_get(config, section)) == NULL)
	{
		/* create a new section */
		if((mutator = mutator_new()) == NULL)
			return -1;
		if(mutator_set(config, section, mutator) != 0)
		{
			mutator_delete(mutator);
			return -1;
		}
		p = NULL;
	}
	else if((p = (String *)mutator_get(mutator, variable)) == NULL
			&& value == NULL)
		/* there is nothing to do */
		return 0;
	if(value != NULL && (newvalue = string_new(value)) == NULL)
		return -1;
	if(mutator_set(mutator, variable, newvalue) != 0)
	{
		string_delete(newvalue);
		return -1;
	}
	/* free the former value */
	string_delete(p);
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rsi, %rsi
leaq 0x59ff(%rip), %r13      # 0xb0b9
cmovneq %rsi, %r13
testq %rdx, %rdx
je 0x570c
movq %rcx, %r14
movq %rdx, %rbx
movq %rdi, %r12
movq %rdx, %rdi
callq 0x4350
testq %rax, %rax
je 0x570c
movq %r12, %rdi
movq %r13, %rsi
callq 0x45a0
pushq $-0x1
popq %rbp
testq %rax, %rax
je 0x5736
movq %rax, %r15
movq %rax, %rdi
movq %rbx, %rsi
callq 0x45a0
movq %rax, %r12
xorl %eax, %eax
movq %r12, %rcx
orq %r14, %rcx
jne 0x5762
jmp 0x5798
pushq $0x16
popq %rdi
callq 0x47f0
leaq 0x5939(%rip), %rsi      # 0xb054
pushq $-0x16
popq %rdi
movq %rax, %rdx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4610
callq 0x4390
testq %rax, %rax
je 0x5796
movq %rax, %r15
movq %r12, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x44e0
testl %eax, %eax
je 0x575f
movq %r15, %rdi
callq 0x47c0
jmp 0x5796
xorl %r12d, %r12d
testq %r14, %r14
je 0x5779
movq %r14, %rdi
callq 0x41f0
movq %rax, %r14
testq %rax, %rax
jne 0x577c
jmp 0x5796
xorl %r14d, %r14d
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x44e0
testl %eax, %eax
je 0x57a7
movq %r14, %rdi
callq 0x4260
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r12, %rdi
callq 0x4260
xorl %eax, %eax
jmp 0x5798
// File: /workspace/github_c_makefile_star2_O2/DeforaOS[P]libSystem/src/config.c
// Function: config_foreach_section
void config_foreach_section(Config const * config, String const * section,
		ConfigForeachSectionCallback callback, void * priv)
{
	Mutator * mutator;
	ConfigForeachSectionData data;

	if((mutator = (Mutator *)mutator_get(config, section)) == NULL)
		return; /* could not find section */
	data.callback = callback;
	data.section = section;
	data.priv = priv;
	mutator_foreach(mutator, _foreach_section_callback, &data);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r14
callq 0x45a0
testq %rax, %rax
je 0x57f7
leaq 0x8(%rsp), %rdx
movq %r15, (%rdx)
movq %r14, 0x8(%rdx)
movq %rbx, 0x10(%rdx)
leaq 0x12(%rip), %rsi        # 0x5801
movq %rax, %rdi
callq 0x43a0
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/DeforaOS[P]libSystem/src/config.c
// Function: config_load_preferences
int config_load_preferences(Config * config, String const * vendor,
		String const * package, String const * filename)
{
	int ret;

	if((ret = config_load_preferences_system(config, vendor, package,
					filename)) != 0
			&& ret != -ENOENT && ret != -EPERM)
		return ret;
	if((ret = config_load_preferences_user(config, vendor, package,
					filename)) != 0
			&& ret != -ENOENT)
		return ret;
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
callq 0x46d0
leal -0x1(%rax), %ecx
cmpl $-0x3, %ecx
jb 0x5855
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x45e0
testl %eax, %eax
je 0x5853
cmpl $-0x2, %eax
jne 0x5855
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/DeforaOS[P]libSystem/src/config.c
// Function: config_load_preferences_system
int config_load_preferences_system(Config * config, String const * vendor,
		String const * package, String const * filename)
{
	int ret;
	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((f = string_new_append(SYSCONFDIR, "/",
					(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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
testq %rcx, %rcx
je 0x5901
movq %rcx, %r14
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %rbx
testq %rsi, %rsi
je 0x58b2
leaq 0x57f9(%rip), %rsi      # 0xb088
pushq $0x3
popq %rdx
movq %r15, %rdi
callq 0x44f0
testl %eax, %eax
je 0x58ee
leaq 0x57e7(%rip), %rsi      # 0xb08c
movq %r15, %rdi
callq 0x42d0
testq %rax, %rax
jne 0x58ee
leaq 0x5800(%rip), %r13      # 0xb0b9
movq %r13, %r8
testq %r12, %r12
je 0x592a
leaq 0x57c0(%rip), %rsi      # 0xb088
pushq $0x3
popq %rdx
movq %r12, %rdi
callq 0x44f0
testl %eax, %eax
je 0x58ee
leaq 0x57ae(%rip), %rsi      # 0xb08c
movq %r12, %rdi
callq 0x42d0
movq %r12, %r8
testq %rax, %rax
je 0x592a
pushq $0x1
popq %rdi
callq 0x47f0
leaq 0x5761(%rip), %rsi      # 0xb05e
pushq $-0x1
jmp 0x5912
pushq $0x16
popq %rdi
callq 0x47f0
leaq 0x574e(%rip), %rsi      # 0xb05e
pushq $-0x16
popq %rdi
movq %rax, %rdx
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x4610
testq %r15, %r15
cmovneq %r15, %r13
movq %r14, (%rsp)
andq $0x0, 0x8(%rsp)
leaq 0x574e(%rip), %rdi      # 0xb090
leaq 0x5741(%rip), %rcx      # 0xb08a
movq %rcx, %rsi
movq %r13, %rdx
movq %rcx, %r9
xorl %eax, %eax
callq 0x4220
testq %rax, %rax
je 0x5986
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
callq 0x41a0
movl %eax, %ebx
movq %r14, %rdi
callq 0x4260
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x4410
// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
testq %rcx, %rcx
je 0x5a3d
movq %rcx, %r12
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
testq %rsi, %rsi
je 0x59e7
leaq 0x56c4(%rip), %rsi      # 0xb088
pushq $0x3
popq %rdx
movq %r15, %rdi
callq 0x44f0
testl %eax, %eax
je 0x5a2a
leaq 0x56b2(%rip), %rsi      # 0xb08c
movq %r15, %rdi
callq 0x42d0
testq %rax, %rax
jne 0x5a2a
testq %r14, %r14
je 0x5a16
leaq 0x5695(%rip), %rsi      # 0xb088
pushq $0x3
popq %rdx
movq %r14, %rdi
callq 0x44f0
testl %eax, %eax
je 0x5a2a
leaq 0x5683(%rip), %rsi      # 0xb08c
movq %r14, %rdi
callq 0x42d0
testq %rax, %rax
jne 0x5a2a
leaq 0x566d(%rip), %rsi      # 0xb08a
movq %r12, %rdi
callq 0x42d0
testq %rax, %rax
je 0x5a64
pushq $0x1
popq %rdi
callq 0x47f0
leaq 0x5625(%rip), %rsi      # 0xb05e
pushq $-0x1
jmp 0x5a4e
pushq $0x16
popq %rdi
callq 0x47f0
leaq 0x5612(%rip), %rsi      # 0xb05e
pushq $-0x16
popq %rdi
movq %rax, %rdx
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x4610
leaq 0x5634(%rip), %rdi      # 0xb09f
callq 0x4060
testq %rax, %rax
je 0x5ae0
testq %r15, %r15
leaq 0x563a(%rip), %rcx      # 0xb0b9
cmoveq %rcx, %r15
testq %r14, %r14
cmoveq %rcx, %r14
movq %r12, (%rsp)
andq $0x0, 0x8(%rsp)
leaq 0x5609(%rip), %rsi      # 0xb0a4
leaq 0x55e8(%rip), %rcx      # 0xb08a
movq %rax, %rdi
movq %r15, %rdx
movq %r14, %r8
movq %rcx, %r9
xorl %eax, %eax
callq 0x4220
testq %rax, %rax
je 0x5afe
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
callq 0x41a0
movl %eax, %ebx
movq %r14, %rdi
callq 0x4260
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
callq 0x40e0
movl (%rax), %edi
movl %edi, %ebx
negl %ebx
callq 0x47f0
leaq 0x5567(%rip), %rsi      # 0xb05e
movl %ebx, %edi
jmp 0x5a4f
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x4410
// File: /workspace/github_c_makefile_star2_O2/DeforaOS[P]libSystem/src/config.c
// Function: config_save
int config_save(Config const * config, String const * filename)
{
	ConfigSave save;

	save.sep = "";
	if((save.fp = fopen(filename, "w")) == NULL)
		return error_set_code(-errno, "%s: %s", filename,
				strerror(errno));
	mutator_foreach(config, _save_foreach_default, &save);
	mutator_foreach(config, _save_foreach, &save);
	if(save.fp != NULL && save.sep[0] != '\0'
			&& fputs(save.sep, save.fp) == EOF)
	{
		fclose(save.fp);
		save.fp = NULL;
	}
	if(save.fp == NULL || fclose(save.fp) != 0)
		return error_set_code(-errno, "%s: %s", filename,
				strerror(errno));
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x5576(%rip), %rax      # 0xb0b9
movq %rax, 0x10(%rsp)
leaq 0x555f(%rip), %rsi      # 0xb0ae
movq %rbx, %rdi
callq 0x4720
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x5bc0
leaq 0xc7(%rip), %rsi        # 0x5c2f
leaq 0x8(%rsp), %r15
movq %r14, %rdi
movq %r15, %rdx
callq 0x43a0
leaq 0xce(%rip), %rsi        # 0x5c4d
movq %r14, %rdi
movq %r15, %rdx
callq 0x43a0
movq (%r15), %rsi
testq %rsi, %rsi
je 0x5bfe
movq 0x10(%rsp), %rdi
cmpb $0x0, (%rdi)
je 0x5bb0
callq 0x42f0
movq 0x8(%rsp), %rsi
cmpl $-0x1, %eax
je 0x5bf0
testq %rsi, %rsi
je 0x5bfe
movq %rsi, %rdi
callq 0x4240
testl %eax, %eax
jne 0x5bfe
xorl %eax, %eax
jmp 0x5c24
callq 0x40e0
movl (%rax), %edi
movl %edi, %ebp
negl %ebp
callq 0x47f0
leaq 0x548a(%rip), %rsi      # 0xb061
movl %ebp, %edi
movq %rbx, %rdx
movq %rax, %rcx
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x4610
movq %rsi, %rdi
callq 0x4240
andq $0x0, 0x8(%rsp)
callq 0x40e0
movl (%rax), %edi
movl %edi, %ebp
negl %ebp
callq 0x47f0
leaq 0x544c(%rip), %rsi      # 0xb061
movl %ebp, %edi
movq %rbx, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x4610
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/DeforaOS[P]libSystem/src/config.c
// Function: save_foreach
static void _save_foreach(Mutator const * mutator, String const * section,
		void * value, void * data)
{
	ConfigSave * save = (ConfigSave *)data;
	Mutator * m = (Mutator *)value;
	(void) mutator;

	if(save->fp == NULL)
		return;
	if(section[0] == '\0')
		return;
	if(fprintf(save->fp, "%s%s[%s]", save->sep, save->sep, section) < 0)
	{
		fclose(save->fp);
		save->fp = NULL;
		return;
	}
	save->sep = "\n";
	mutator_foreach(m, _save_foreach_section, save);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq (%rcx), %rdi
testq %rdi, %rdi
je 0x5cb0
movq %rsi, %r8
cmpb $0x0, (%rsi)
je 0x5cb0
movq %rcx, %rbx
movq %rdx, %r14
movq 0x8(%rcx), %rcx
leaq 0x5448(%rip), %rsi      # 0xb0ba
movq %rcx, %rdx
xorl %eax, %eax
callq 0x4460
testl %eax, %eax
js 0x5ca4
leaq 0x5431(%rip), %rax      # 0xb0b8
movq %rax, 0x8(%rbx)
leaq 0x1ea(%rip), %rsi       # 0x5e7c
movq %r14, %rdi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x43a0
movq (%rbx), %rdi
callq 0x4240
andq $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/DeforaOS[P]libSystem/src/config.c
// Function: config_save_preferences_user
int config_save_preferences_user(Config const * 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((homedir = getenv("HOME")) == NULL)
		return error_set_code(-errno, "%s", strerror(errno));
	if((f = string_new_append(homedir, "/.config/",
					(vendor != NULL) ? vendor : "",
					(vendor != NULL) ? "/" : "",
					(package != NULL) ? package : "",
					(package != NULL) ? "/" : "",
					filename, NULL)) == NULL)
		return error_get_code();
	if((ret = _save_preferences_user_mkdir(f)) == 0)
		ret = config_save(config, f);
	string_delete(f);
	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
testq %rcx, %rcx
je 0x5dda
movq %rcx, %r12
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x53bd(%rip), %rdi      # 0xb09f
callq 0x4060
testq %rax, %rax
je 0x5dee
testq %r15, %r15
leaq 0x53bf(%rip), %rdx      # 0xb0b9
cmoveq %rdx, %r15
leaq 0x5385(%rip), %r9       # 0xb08a
movq %r9, %rcx
cmoveq %rdx, %rcx
testq %r14, %r14
cmoveq %rdx, %r14
cmoveq %rdx, %r9
movq %r12, (%rsp)
andq $0x0, 0x8(%rsp)
leaq 0x537c(%rip), %rsi      # 0xb0a4
movq %rax, %rdi
movq %r15, %rdx
movq %r14, %r8
xorl %eax, %eax
callq 0x4220
testq %rax, %rax
je 0x5e47
movq %rax, %r14
movq %rbx, 0x10(%rsp)
movq %rax, %rdi
callq 0x4350
movq %rax, %r15
pushq $0x1
popq %r12
xorl %ebx, %ebx
xorl %r13d, %r13d
cmpq %r13, %r15
je 0x5e1f
cmpb $0x2f, (%r14,%r13)
jne 0x5dd5
cmpq %rbx, %r13
jne 0x5d77
incq %rbx
jmp 0x5dd5
movb $0x0, (%r14,%r13)
cmpb $0x2e, (%r14,%rbx)
movl %r12d, %edi
pushq $-0x1
popq %rbp
je 0x5db1
movq %r14, %rdi
movl $0x1ff, %esi            # imm = 0x1FF
callq 0x4170
testl %eax, %eax
je 0x5da6
callq 0x40e0
movl (%rax), %edi
cmpl $0x11, %edi
jne 0x5dad
movb $0x2f, (%r14,%r13)
jmp 0x5dd5
movl %edi, %ebp
negl %ebp
callq 0x47f0
movl %ebp, %edi
leaq 0x52a2(%rip), %rsi      # 0xb061
movq %r14, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x4610
movb $0x2f, (%r14,%r13)
testl %eax, %eax
jne 0x5e2c
incq %r13
jmp 0x5d5d
pushq $0x16
popq %rdi
callq 0x47f0
leaq 0x5275(%rip), %rsi      # 0xb05e
pushq $-0x16
popq %rdi
jmp 0x5e07
callq 0x40e0
movl (%rax), %edi
movl %edi, %ebx
negl %ebx
callq 0x47f0
leaq 0x5259(%rip), %rsi      # 0xb05e
movl %ebx, %edi
movq %rax, %rdx
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4610
movq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0x4590
movl %eax, %ebp
movq %r14, %rdi
callq 0x4260
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4410
// File: /workspace/github_c_makefile_star2_O2/DeforaOS[P]libSystem/src/config.c
// Function: save_foreach_section
static void _save_foreach_section(Mutator const * mutator, String const * key,
		void * value, void * data)
{
	ConfigSave * save = (ConfigSave *)data;
	String const * val = (String const *)value;
	(void) mutator;

	if(save->fp == NULL)
		return;
	if(val == NULL)
		return;
	if(fprintf(save->fp, "%s%s=%s", save->sep, key, val) < 0)
	{
		fclose(save->fp);
		save->fp = NULL;
		return;
	}
	save->sep = "\n";
}

// Assembly:
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r8
movq (%rcx), %rdi
testq %rdi, %rdi
sete %al
testq %rdx, %rdx
sete %dl
orb %al, %dl
jne 0x5ec8
movq %rsi, %rcx
movq 0x8(%rbx), %rdx
leaq 0x520c(%rip), %rsi      # 0xb0b0
xorl %eax, %eax
callq 0x4460
testl %eax, %eax
js 0x5ebc
leaq 0x5202(%rip), %rax      # 0xb0b8
movq %rax, 0x8(%rbx)
jmp 0x5ec8
movq (%rbx), %rdi
callq 0x4240
andq $0x0, (%rbx)
popq %rbx
retq
nop
// File: /workspace/github_c_makefile_star2_O2/DeforaOS[P]libSystem/src/error.c
// Function: error_do
static String const * _error_do(ErrorCode * code, String const * format,
		va_list ap)
{
	static String buf[256] = "";

	if(format != NULL) /* setting the error */
	{
		vsnprintf(buf, sizeof(buf), format, ap);
		if(code != NULL)
			_error_do_code(code);
	}
	else if(code != NULL)
		*code = _error_do_code(NULL);
	return buf;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
testq %rsi, %rsi
je 0x601f
movq %rdx, %rcx
movq %rsi, %rdx
leaq 0xa01c(%rip), %rdi      # 0x10020
movl $0x100, %esi            # imm = 0x100
callq 0x41b0
testq %rbx, %rbx
je 0x602f
movq %rbx, %rax
leaq 0xa103(%rip), %rbx      # 0x10120
jmp 0x602b
testq %rbx, %rbx
je 0x602f
leaq 0xa0f5(%rip), %rax      # 0x10120
movl (%rax), %eax
movl %eax, (%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/DeforaOS[P]libSystem/src/error.c
// Function: print_do
static ErrorCode _print_do(String const * program, ...)
{
	ErrorCode ret = 0;
	va_list args;
	String const * error;

	va_start(args, program);
	if(program != NULL && string_get_length(program) > 0)
	{
		fputs(program, stderr);
		fputs(": ", stderr);
	}
	if((error = _error_do(&ret, NULL, args)) == NULL
			|| string_get_length(error) == 0)
		error = "Unknown error";
	fputs(error, stderr);
	fputc('\n', stderr);
	va_end(args);
	return ret;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xd8, %rsp
movq %rdi, %rbx
leaq 0x20(%rsp), %rdi
movq %rsi, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0x61ee
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rdi, 0x10(%rsp)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rsp)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rsp)
testq %rbx, %rbx
je 0x6241
movq %rbx, %rdi
callq 0x4350
testq %rax, %rax
je 0x6241
movq 0x9dc9(%rip), %r14      # 0xfff0
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x42f0
movq (%r14), %rsi
leaq 0x4e87(%rip), %rdi      # 0xb0c3
callq 0x42f0
movl 0x9ed9(%rip), %ebx      # 0x10120
leaq 0x9dd2(%rip), %r14      # 0x10020
movq %r14, %rdi
callq 0x4350
testq %rax, %rax
leaq 0x4e66(%rip), %rdi      # 0xb0c6
cmovneq %r14, %rdi
movq 0x9d85(%rip), %r14      # 0xfff0
movq (%r14), %rsi
callq 0x42f0
movq (%r14), %rsi
pushq $0xa
popq %rdi
callq 0x43f0
movl %ebx, %eax
addq $0xd8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O2/DeforaOS[P]libSystem/src/event.c
// Function: event_new
Event * event_new(void)
{
	Event * event;

	if((event = (Event *)object_new(sizeof(*event))) == NULL)
		return NULL;
	event->timeouts = eventtimeoutarray_new();
	event->loop = 0;
	event->fdmax = -1;
	FD_ZERO(&event->rfds);
	FD_ZERO(&event->wfds);
	event->reads = eventioarray_new();
	event->writes = eventioarray_new();
	event->timeout.tv_sec = (time_t)LONG_MAX;
	event->timeout.tv_usec = (suseconds_t)LONG_MAX;
	if(event->timeouts == NULL || event->reads == NULL
			|| event->writes == NULL)
	{
		event_delete(event);
		return NULL;
	}
	return event;
}

// Assembly:
pushq %rbx
movl $0x130, %edi            # imm = 0x130
callq 0x4620
testq %rax, %rax
je 0x633e
movq %rax, %rbx
pushq $0x8
popq %rdi
callq 0x45f0
movq %rax, 0x118(%rbx)
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
movq %rax, (%rbx)
pushq $0x1
popq %rax
cmpq $0x11, %rax
je 0x62d2
andq $0x0, (%rbx,%rax,8)
incq %rax
jmp 0x62c2
pushq $0x11
popq %rax
cmpq $0x21, %rax
je 0x62e5
andq $0x0, (%rbx,%rax,8)
incq %rax
jmp 0x62d5
callq 0x6345
movq %rax, 0x108(%rbx)
callq 0x6345
movq %rax, 0x110(%rbx)
movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF
movq %rcx, 0x120(%rbx)
movq %rcx, 0x128(%rbx)
cmpq $0x0, 0x118(%rbx)
je 0x6336
cmpq $0x0, 0x108(%rbx)
sete %cl
testq %rax, %rax
sete %al
orb %cl, %al
cmpb $0x1, %al
jne 0x6340
movq %rbx, %rdi
callq 0x4770
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/DeforaOS[P]libSystem/src/event.c
// Function: event_delete
void event_delete(Event * event)
{
	unsigned int i;
	EventTimeout * et;
	EventIO * eio;

	for(i = 0; i < array_count(event->timeouts); i++)
	{
		array_get_copy(event->timeouts, i, &et);
		object_delete(et);
	}
	array_delete(event->timeouts);
	for(i = 0; i < array_count(event->reads); i++)
	{
		array_get_copy(event->reads, i, &eio);
		object_delete(eio);
	}
	array_delete(event->reads);
	for(i = 0; i < array_count(event->writes); i++)
	{
		array_get_copy(event->writes, i, &eio);
		object_delete(eio);
	}
	array_delete(event->writes);
	object_delete(event);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
xorl %eax, %eax
leaq 0x8(%rsp), %r14
movl %eax, %r15d
movq 0x118(%rbx), %rdi
callq 0x4250
movq 0x118(%rbx), %rdi
cmpq %r15, %rax
jbe 0x6396
movq %r15, %rsi
movq %r14, %rdx
callq 0x4860
movq 0x8(%rsp), %rdi
callq 0x44a0
leal 0x1(%r15), %eax
jmp 0x6360
callq 0x44c0
xorl %eax, %eax
movq %rsp, %r14
movl %eax, %r15d
movq 0x108(%rbx), %rdi
callq 0x4250
movq 0x108(%rbx), %rdi
cmpq %r15, %rax
jbe 0x63d5
movq %r15, %rsi
movq %r14, %rdx
callq 0x4860
movq (%rsp), %rdi
callq 0x44a0
leal 0x1(%r15), %eax
jmp 0x63a0
callq 0x44c0
xorl %eax, %eax
movq %rsp, %r14
movl %eax, %r15d
movq 0x110(%rbx), %rdi
callq 0x4250
movq 0x110(%rbx), %rdi
cmpq %r15, %rax
jbe 0x6414
movq %r15, %rsi
movq %r14, %rdx
callq 0x4860
movq (%rsp), %rdi
callq 0x44a0
leal 0x1(%r15), %eax
jmp 0x63df
callq 0x44c0
movq %rbx, %rdi
callq 0x44a0
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/DeforaOS[P]libSystem/src/event.c
// Function: event_loop_while
int event_loop_while(Event * event, const int * flag)
{
	int ret;

	if(flag == NULL)
		return event_loop(event);
	event->loop++;
	while(event->loop && *flag && (ret = _event_loop_once(event)) == 0);
	return ret;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rsi, %rsi
je 0x66ed
movq %rsi, %r14
movl (%rbx), %ecx
incl %ecx
movl %ecx, (%rbx)
xorl %eax, %eax
testl %ecx, %ecx
je 0x66e5
cmpl $0x0, (%r14)
je 0x66e5
movq %rbx, %rdi
callq 0x644d
testl %eax, %eax
jne 0x66e5
movl (%rbx), %ecx
jmp 0x66c9
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x46e0
// File: /workspace/github_c_makefile_star2_O2/DeforaOS[P]libSystem/src/event.c
// Function: event_register_timeout
int event_register_timeout(Event * event, struct timeval * timeout,
		EventTimeoutFunc func, void * data)
{
	EventTimeout * eventtimeout;
	struct timeval now;

	if(gettimeofday(&now, NULL) != 0)
		return error_set_code(-errno, "%s", strerror(errno));
	if((eventtimeout = (EventTimeout *)object_new(sizeof(*eventtimeout)))
			== NULL)
		return -1;
	eventtimeout->initial.tv_sec = timeout->tv_sec;
	eventtimeout->initial.tv_usec = timeout->tv_usec;
	eventtimeout->timeout.tv_sec = now.tv_sec + timeout->tv_sec;
	eventtimeout->timeout.tv_usec = now.tv_usec + timeout->tv_usec;
	eventtimeout->func = func;
	eventtimeout->data = data;
	if(array_append(event->timeouts, &eventtimeout) != 0)
	{
		object_delete(eventtimeout);
		return -1;
	}
	if(event->timeout.tv_sec > timeout->tv_sec
			|| (event->timeout.tv_sec == timeout->tv_sec
				&& event->timeout.tv_usec > timeout->tv_usec))
	{
#ifdef DEBUG
		fprintf(stderr, "DEBUG: %s%s%lld%s%ld%s", __func__, "() tv_sec=",
				(long long)timeout->tv_sec, ", tv_usec=",
				(long)timeout->tv_usec, "\n");
#endif
		event->timeout.tv_sec = timeout->tv_sec;
		event->timeout.tv_usec = timeout->tv_usec;
	}
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
callq 0x42c0
testl %eax, %eax
je 0x6770
callq 0x40e0
movl (%rax), %edi
movl %edi, %ebx
negl %ebx
callq 0x47f0
leaq 0x4906(%rip), %rsi      # 0xb05e
movl %ebx, %edi
movq %rax, %rdx
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x4610
pushq $0x30
popq %rdi
callq 0x4620
movq %rax, 0x8(%rsp)
pushq $-0x1
popq %rbp
testq %rax, %rax
je 0x67fb
movdqu (%r14), %xmm0
movdqu %xmm0, (%rax)
paddq 0x10(%rsp), %xmm0
movdqu %xmm0, 0x10(%rax)
movq %r12, 0x20(%rax)
movq %r15, 0x28(%rax)
movq 0x118(%rbx), %rdi
leaq 0x8(%rsp), %rsi
callq 0x4290
testl %eax, %eax
je 0x67c2
movq 0x8(%rsp), %rdi
callq 0x44a0
jmp 0x67fb
movq 0x120(%rbx), %rcx
movq (%r14), %rax
cmpq %rax, %rcx
jle 0x67e7
movq 0x8(%r14), %rcx
movq %rax, 0x120(%rbx)
movq %rcx, 0x128(%rbx)
xorl %ebp, %ebp
jmp 0x67fb
xorl %ebp, %ebp
cmpq %rax, %rcx
jne 0x67fb
movq 0x8(%r14), %rcx
cmpq %rcx, 0x128(%rbx)
jg 0x67d5
movl %ebp, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/DeforaOS[P]libSystem/src/event.c
// Function: event_register_io_read
int event_register_io_read(Event * event, int fd, EventIOFunc func,
		void * userdata)
{
	EventIO * eventio;

	assert(fd >= 0);
	if((eventio = (EventIO *)object_new(sizeof(*eventio))) == NULL)
		return 1;
	eventio->fd = fd;
	eventio->func = func;
	eventio->data = userdata;
	event->fdmax = max(event->fdmax, fd);
	if(array_append(event->reads, &eventio) != 0)
	{
		object_delete(eventio);
		return -1;
	}
	FD_SET(fd, &event->rfds);
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testl %esi, %esi
js 0x688c
movq %rcx, %r15
movq %rdx, %r12
movl %esi, %ebx
movq %rdi, %r14
pushq $0x18
popq %rdi
callq 0x4620
movq %rax, (%rsp)
testq %rax, %rax
je 0x6869
movl %ebx, (%rax)
movq %r12, 0x8(%rax)
movq %r15, 0x10(%rax)
movl 0x4(%r14), %eax
cmpl %ebx, %eax
cmovlel %ebx, %eax
movl %eax, 0x4(%r14)
movq 0x108(%r14), %rdi
movq %rsp, %rsi
callq 0x4290
testl %eax, %eax
je 0x686e
movq (%rsp), %rdi
callq 0x44a0
pushq $-0x1
jmp 0x686b
pushq $0x1
popq %rax
jmp 0x6880
pushq $0x1
popq %rax
movl %ebx, %ecx
shlq %cl, %rax
shrl $0x6, %ebx
orq %rax, 0x8(%r14,%rbx,8)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x4841(%rip), %rdi      # 0xb0d4
leaq 0x4842(%rip), %rsi      # 0xb0dc
leaq 0x4843(%rip), %rcx      # 0xb0e4
movl $0xcb, %edx
callq 0x42e0