LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/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 0x48a1
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 0x48f4
movq %rbx, %rdi
callq 0x4330
testq %rax, %rax
je 0x48f4
movq 0xb71e(%rip), %r14      # 0xfff8
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x42f0
movq (%r14), %rsi
leaq 0x67d4(%rip), %rdi      # 0xb0c3
callq 0x42f0
movl 0xb826(%rip), %ebx      # 0x10120
leaq 0xb71f(%rip), %r14      # 0x10020
movq %r14, %rdi
callq 0x4330
testq %rax, %rax
leaq 0x67b3(%rip), %rdi      # 0xb0c6
cmovneq %r14, %rdi
movq 0xb6da(%rip), %r14      # 0xfff8
movq (%r14), %rsi
callq 0x42f0
movq (%r14), %rsi
pushq $0xa
popq %rdi
callq 0x43c0
movl %ebx, %eax
addq $0xd8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O1/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 0x4a2d
movl $0x22, %edi
callq 0x4790
leaq 0x6644(%rip), %rsi      # 0xb05e
xorl %ebx, %ebx
movl $0xffffffde, %edi       # imm = 0xFFFFFFDE
movq %rax, %rdx
xorl %eax, %eax
callq 0x45d0
jmp 0x4a58
movq %rdi, %r14
movl $0x10, %edi
callq 0x45e0
testq %rax, %rax
je 0x4a56
movq %rax, %rbx
movl $0x0, (%rax)
movl %r14d, 0x4(%rax)
movq $0x0, 0x8(%rax)
jmp 0x4a58
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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
movl $0x10, %edi
callq 0x45e0
testq %rax, %rax
je 0x4aa4
movq %rax, %rbx
movq $0x0, 0x8(%rax)
movq %rax, %rdi
movq %r14, %rsi
callq 0x4340
testl %eax, %eax
je 0x4aa6
movq 0x8(%rbx), %rdi
callq 0x4090
movq %rbx, %rdi
callq 0x4460
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x45c0
testq %rax, %rax
je 0x4af8
movl (%rbx), %ecx
movl %ecx, (%r14)
movl 0x4(%rbx), %edx
movl %edx, 0x4(%r14)
movq %rax, 0x8(%r14)
movq 0x8(%rbx), %rsi
imull %ecx, %edx
movq %rax, %rdi
callq 0x4470
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
cmpl $0x0, (%rbx)
je 0x4acf
cmpl $0x0, 0x4(%rbx)
je 0x4acf
callq 0x40e0
movl (%rax), %edi
movl %edi, %ebx
negl %ebx
callq 0x4790
leaq 0x6544(%rip), %rsi      # 0xb05e
movl %ebx, %edi
movq %rax, %rdx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x45d0
// File: /workspace/github_c_makefile_star2_O1/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 0x45b0
testq %rax, %rax
je 0x4bb9
movq %rax, %rbx
cmpl $0x0, (%r12)
je 0x4bbb
xorl %ebp, %ebp
movl 0x4(%r12), %r13d
imulq %rbp, %r13
addq 0x8(%r12), %r13
movq %r13, %rdi
movq %r14, %rsi
callq *%r15
testb %al, %al
je 0x4b9a
movq %rbx, %rdi
movq %r13, %rsi
callq 0x4290
testl %eax, %eax
jne 0x4ba8
incq %rbp
movl (%r12), %eax
cmpq %rax, %rbp
jb 0x4b70
jmp 0x4bbb
movq 0x8(%rbx), %rdi
callq 0x4090
movq %rbx, %rdi
callq 0x4460
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_O1/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 0x45c0
testq %rax, %rax
je 0x4c12
movq %rax, 0x8(%rbx)
addq %rax, %r15
movl 0x4(%rbx), %edx
movq %r15, %rdi
movq %r14, %rsi
callq 0x4470
incl (%rbx)
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
callq 0x40e0
movl (%rax), %edi
movl %edi, %ebx
negl %ebx
callq 0x4790
leaq 0x6435(%rip), %rsi      # 0xb05e
movl %ebx, %edi
movq %rax, %rdx
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x45d0
// File: /workspace/github_c_makefile_star2_O1/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 0x45b0
testq %rax, %rax
je 0x4cb0
movq %rax, %rbx
cmpl $0x0, (%r12)
je 0x4cb2
xorl %ebp, %ebp
movl 0x4(%r12), %r13d
imulq %rbp, %r13
addq 0x8(%r12), %r13
movq %r14, %rdi
movq %r13, %rsi
callq *%r15
testb %al, %al
je 0x4c91
movq %rbx, %rdi
movq %r13, %rsi
callq 0x4290
testl %eax, %eax
jne 0x4c9f
incq %rbp
movl (%r12), %eax
cmpq %rax, %rbp
jb 0x4c67
jmp 0x4cb2
movq 0x8(%rbx), %rdi
callq 0x4090
movq %rbx, %rdi
callq 0x4460
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_O1/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 0x4cff
movl 0x4(%rdi), %eax
imulq %rax, %rsi
addq 0x8(%rdi), %rsi
movq %rdx, %rdi
movq %rax, %rdx
callq 0x4470
xorl %eax, %eax
popq %rcx
retq
movl $0x22, %edi
callq 0x4790
leaq 0x634e(%rip), %rsi      # 0xb05e
movl $0xffffffde, %edi       # imm = 0xFFFFFFDE
movq %rax, %rdx
xorl %eax, %eax
popq %rcx
jmp 0x45d0
// File: /workspace/github_c_makefile_star2_O1/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 %rbx
pushq %rax
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rax, %rsi
jb 0x4d5f
movl $0x22, %edi
callq 0x4790
leaq 0x6318(%rip), %rsi      # 0xb05e
movl $0xffffffde, %edi       # imm = 0xFFFFFFDE
movq %rax, %rdx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x45d0
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leal 0x1(%rsi), %ebp
movl 0x4(%rdi), %esi
imulq %rsi, %r14
cmpl %ebp, (%rdi)
jae 0x4da9
addq %r14, %rsi
movq 0x8(%r15), %rdi
callq 0x45c0
testq %rax, %rax
je 0x4dc9
movq %rax, 0x8(%r15)
movl 0x4(%r15), %ecx
imull (%r15), %ecx
addq %rcx, %rax
movq %r14, %rdx
subq %rcx, %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0x4310
movl %ebp, (%r15)
addq 0x8(%r15), %r14
movl 0x4(%r15), %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4470
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x40e0
movl (%rax), %edi
movl %edi, %ebx
negl %ebx
callq 0x4790
leaq 0x627e(%rip), %rsi      # 0xb05e
movl %ebx, %edi
jmp 0x4d4b
// File: /workspace/github_c_makefile_star2_O1/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 0x4e11
movq %rdi, %rbx
movl 0x4(%rdi), %eax
movq %rax, %r15
imulq %r12, %r15
movq %r15, %rcx
addq %rax, %rcx
jae 0x4e3f
movl $0x22, %edi
callq 0x4790
leaq 0x623c(%rip), %rsi      # 0xb05e
movl $0xffffffde, %edi       # imm = 0xFFFFFFDE
movq %rax, %rdx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x45d0
movq %rdx, %r14
incl %esi
imull %eax, %esi
movq 0x8(%rbx), %rdi
callq 0x45c0
testq %rax, %rax
je 0x4e9c
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 0x4640
movq %r15, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x4470
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 0x4790
leaq 0x61ab(%rip), %rsi      # 0xb05e
movl %ebx, %edi
jmp 0x4e27
// File: /workspace/github_c_makefile_star2_O1/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 0x4f15
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 0x4640
movq 0x8(%rbx), %rdi
movl (%rbx), %esi
imull 0x4(%rbx), %esi
callq 0x45c0
testq %rax, %rax
je 0x4f36
movq %rax, 0x8(%rbx)
jmp 0x4f3b
movl $0x22, %edi
callq 0x4790
leaq 0x6138(%rip), %rsi      # 0xb05e
movl $0xffffffde, %edi       # imm = 0xFFFFFFDE
movq %rax, %rdx
xorl %eax, %eax
popq %rbx
jmp 0x45d0
cmpl $0x0, (%rbx)
je 0x4f0f
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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:
cmpl $0x0, (%rdi)
je 0x4f8d
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
xorl %r12d, %r12d
xorl %ebp, %ebp
movq 0x8(%r15), %rdi
addq %r12, %rdi
movq %rbx, %rsi
callq *%r14
testb %al, %al
je 0x4f76
incl %ebp
movl 0x4(%r15), %eax
addq %rax, %r12
jmp 0x4f80
movl %ebp, %esi
movq %r15, %rdi
callq 0x4540
cmpl (%r15), %ebp
jb 0x4f5a
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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:
cmpl $0x0, (%rdi)
je 0x4fdc
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
xorl %r12d, %r12d
xorl %ebp, %ebp
movq 0x8(%r15), %rsi
addq %r12, %rsi
movq %rbx, %rdi
callq *%r14
testb %al, %al
je 0x4fc5
incl %ebp
movl 0x4(%r15), %eax
addq %rax, %r12
jmp 0x4fcf
movl %ebp, %esi
movq %r15, %rdi
callq 0x4540
cmpl (%r15), %ebp
jb 0x4fa9
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
movl $0x10, %edi
callq 0x45e0
testq %rax, %rax
je 0x509d
movq %rax, %rbx
movq %r14, %rdi
callq 0x45e0
movq %rax, 0x8(%rbx)
testq %rax, %rax
setne %cl
testq %r14, %r14
sete %dl
orb %cl, %dl
jne 0x50a1
movq %rbx, %rdi
callq 0x4460
xorl %ebx, %ebx
jmp 0x50c3
movq %rax, %rdi
testq %r15, %r15
je 0x50b6
movq %r15, %rsi
movq %r14, %rdx
callq 0x4470
jmp 0x50c0
xorl %esi, %esi
movq %r14, %rdx
callq 0x4310
movq %r14, (%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testl %eax, %eax
jne 0x513c
movq 0x8(%r15), %rdi
testq %r14, %r14
je 0x5130
movq %r14, %rsi
movq %rbx, %rdx
callq 0x4470
xorl %ebp, %ebp
jmp 0x513c
xorl %ebp, %ebp
xorl %esi, %esi
movq %rbx, %rdx
callq 0x4310
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x51ba
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %rdi
callq 0x45c0
testq %rax, %rax
setne %cl
testq %rbx, %rbx
sete %dl
orb %cl, %dl
jne 0x519b
callq 0x40e0
movl (%rax), %edi
movl %edi, %ebx
negl %ebx
callq 0x4790
leaq 0x5ed6(%rip), %rsi      # 0xb05e
movl %ebx, %edi
movq %rax, %rdx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x45d0
movq %rax, 0x8(%r14)
movq (%r14), %rcx
movq %rbx, %rdx
subq %rcx, %rdx
jbe 0x51b7
addq %rcx, %rax
movq %rax, %rdi
xorl %esi, %esi
callq 0x4310
movq %rbx, (%r14)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x5202
movl $0x22, %edi
callq 0x4790
leaq 0x5e76(%rip), %rsi      # 0xb05e
movl $0xffffffde, %edi       # imm = 0xFFFFFFDE
movq %rax, %rdx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x45d0
movq %rcx, %rbx
movq %rdx, %r14
movq %rdi, %r12
cmpq (%rdi), %rsi
jbe 0x5223
movq %r12, %rdi
callq 0x4120
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %ecx, %ecx
jne 0x5238
addq 0x8(%r12), %r15
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x4470
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 $0x28, %rsp
movq %rdi, %rbx
callq 0x4370
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x52a3
leaq 0x8(%rsp), %r14
movl $0x0, 0x8(%r14)
leaq 0x5b(%rip), %rax        # 0x52d1
leaq 0x18(%rsp), %rdx
movq %rax, (%rdx)
movq %r14, 0x8(%rdx)
leaq 0x5fe(%rip), %rsi       # 0x5887
movq %rbx, %rdi
callq 0x4380
cmpl $0x0, 0x8(%r14)
movq (%r14), %rax
je 0x52a5
movq %rax, %rdi
callq 0x43d0
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x4370
movq %rax, %rbx
testq %r14, %r14
je 0x533c
testq %rbx, %rbx
je 0x533a
movq %rbx, %rdi
movq %r14, %rsi
callq 0x41a0
testl %eax, %eax
je 0x533c
movq %rbx, %rdi
callq 0x43d0
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x5a02(%rip), %r12      # 0xb0b9
cmoveq %r12, %rbx
movq %rbx, %rsi
callq 0x4560
testq %rax, %rax
je 0x571e
movq %rax, %rdi
movq %r14, %rsi
callq 0x4560
movq %rax, %r15
testq %rax, %rax
jne 0x5762
cmpb $0x0, (%rbx)
leaq 0x5958(%rip), %r8       # 0xb041
cmovneq %r12, %r8
cmoveq %r12, %rbx
movq %rbx, (%rsp)
leaq 0x5929(%rip), %rsi      # 0xb025
leaq 0x592d(%rip), %rcx      # 0xb030
leaq 0x5940(%rip), %r9       # 0xb04a
xorl %r15d, %r15d
movl $0x1, %edi
movq %r14, %rdx
xorl %eax, %eax
callq 0x45d0
jmp 0x5762
cmpb $0x0, (%rbx)
je 0x5745
leaq 0x5901(%rip), %rsi      # 0xb02b
leaq 0x58e2(%rip), %rcx      # 0xb013
xorl %r15d, %r15d
movl $0x1, %edi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x45d0
jmp 0x5762
leaq 0x5912(%rip), %rsi      # 0xb05e
leaq 0x58ad(%rip), %rdx      # 0xb000
xorl %r15d, %r15d
movl $0x1, %edi
xorl %eax, %eax
callq 0x45d0
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x5933(%rip), %r13      # 0xb0b9
cmovneq %rsi, %r13
testq %rdx, %rdx
je 0x57d2
movq %rcx, %r14
movq %rdx, %rbx
movq %rdi, %r12
movq %rdx, %rdi
callq 0x4330
testq %rax, %rax
je 0x57d2
movq %r12, %rdi
movq %r13, %rsi
callq 0x4560
testq %rax, %rax
je 0x5800
movq %rax, %r15
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4560
movq %rax, %r12
xorl %ebp, %ebp
orq %r14, %rax
jne 0x5831
jmp 0x5876
movl $0x16, %edi
callq 0x4790
leaq 0x5871(%rip), %rsi      # 0xb054
movl $0xffffffea, %edi       # imm = 0xFFFFFFEA
movq %rax, %rdx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x45d0
callq 0x4370
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x5876
movq %rax, %r15
movq %r12, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x44a0
testl %eax, %eax
je 0x582e
movq %r15, %rdi
callq 0x4760
jmp 0x5876
xorl %r12d, %r12d
testq %r14, %r14
je 0x5848
movq %r14, %rdi
callq 0x41f0
movq %rax, %r14
testq %rax, %rax
jne 0x584b
jmp 0x5865
xorl %r14d, %r14d
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x44a0
testl %eax, %eax
je 0x586c
movq %r14, %rdi
callq 0x4260
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0x5876
movq %r12, %rdi
callq 0x4260
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x4560
testq %rax, %rax
je 0x58cb
leaq 0x8(%rsp), %rdx
movq %r15, (%rdx)
movq %r14, 0x8(%rdx)
movq %rbx, 0x10(%rdx)
leaq 0x12(%rip), %rsi        # 0x58d5
movq %rax, %rdi
callq 0x4380
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x4680
leal -0x1(%rax), %ecx
cmpl $-0x3, %ecx
jb 0x5929
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x45a0
testl %eax, %eax
je 0x5927
cmpl $-0x2, %eax
jne 0x5929
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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
testq %rcx, %rcx
je 0x59da
movq %rcx, %r14
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %rbx
testq %rsi, %rsi
je 0x5984
leaq 0x5729(%rip), %rsi      # 0xb088
movl $0x3, %edx
movq %r15, %rdi
callq 0x44b0
testl %eax, %eax
je 0x59c2
leaq 0x5715(%rip), %rsi      # 0xb08c
movq %r15, %rdi
callq 0x42d0
testq %rax, %rax
jne 0x59c2
leaq 0x572e(%rip), %r13      # 0xb0b9
movq %r13, %r8
testq %r12, %r12
je 0x5a03
leaq 0x56ee(%rip), %rsi      # 0xb088
movl $0x3, %edx
movq %r12, %rdi
callq 0x44b0
testl %eax, %eax
je 0x59c2
leaq 0x56da(%rip), %rsi      # 0xb08c
movq %r12, %rdi
callq 0x42d0
movq %r12, %r8
testq %rax, %rax
je 0x5a03
movl $0x1, %edi
callq 0x4790
leaq 0x568b(%rip), %rsi      # 0xb05e
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
jmp 0x59f0
movl $0x16, %edi
callq 0x4790
leaq 0x5673(%rip), %rsi      # 0xb05e
movl $0xffffffea, %edi       # imm = 0xFFFFFFEA
movq %rax, %rdx
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x45d0
testq %r15, %r15
cmovneq %r15, %r13
leaq 0x567f(%rip), %rdi      # 0xb090
leaq 0x5672(%rip), %rcx      # 0xb08a
movq %rcx, %rsi
movq %r13, %rdx
movq %rcx, %r9
xorl %eax, %eax
pushq $0x0
pushq %r14
callq 0x4220
addq $0x10, %rsp
testq %rax, %rax
je 0x5a59
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
callq 0x41a0
movl %eax, %ebx
movq %r14, %rdi
callq 0x4260
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x43e0
// File: /workspace/github_c_makefile_star2_O1/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
pushq %rax
testq %rcx, %rcx
je 0x5b12
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
testq %rsi, %rsi
je 0x5ab5
leaq 0x55f8(%rip), %rsi      # 0xb088
movl $0x3, %edx
movq %r12, %rdi
callq 0x44b0
testl %eax, %eax
je 0x5afa
leaq 0x55e4(%rip), %rsi      # 0xb08c
movq %r12, %rdi
callq 0x42d0
testq %rax, %rax
jne 0x5afa
testq %r15, %r15
je 0x5ae6
leaq 0x55c7(%rip), %rsi      # 0xb088
movl $0x3, %edx
movq %r15, %rdi
callq 0x44b0
testl %eax, %eax
je 0x5afa
leaq 0x55b3(%rip), %rsi      # 0xb08c
movq %r15, %rdi
callq 0x42d0
testq %rax, %rax
jne 0x5afa
leaq 0x559d(%rip), %rsi      # 0xb08a
movq %r14, %rdi
callq 0x42d0
testq %rax, %rax
je 0x5b3d
movl $0x1, %edi
callq 0x4790
leaq 0x5553(%rip), %rsi      # 0xb05e
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
jmp 0x5b28
movl $0x16, %edi
callq 0x4790
leaq 0x553b(%rip), %rsi      # 0xb05e
movl $0xffffffea, %edi       # imm = 0xFFFFFFEA
movq %rax, %rdx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x45d0
leaq 0x555b(%rip), %rdi      # 0xb09f
callq 0x4060
testq %rax, %rax
je 0x5bb7
testq %r12, %r12
leaq 0x5561(%rip), %rcx      # 0xb0b9
cmoveq %rcx, %r12
testq %r15, %r15
cmoveq %rcx, %r15
leaq 0x553a(%rip), %rsi      # 0xb0a4
leaq 0x5519(%rip), %rcx      # 0xb08a
movq %rax, %rdi
movq %r12, %rdx
movq %r15, %r8
movq %rcx, %r9
xorl %eax, %eax
pushq $0x0
pushq %r14
callq 0x4220
addq $0x10, %rsp
testq %rax, %rax
je 0x5bd5
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
callq 0x41a0
movl %eax, %ebx
movq %r14, %rdi
callq 0x4260
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
callq 0x40e0
movl (%rax), %edi
movl %edi, %ebx
negl %ebx
callq 0x4790
leaq 0x5490(%rip), %rsi      # 0xb05e
movl %ebx, %edi
jmp 0x5b28
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x43e0
// File: /workspace/github_c_makefile_star2_O1/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 0x549f(%rip), %rax      # 0xb0b9
movq %rax, 0x10(%rsp)
leaq 0x5488(%rip), %rsi      # 0xb0ae
movq %rbx, %rdi
callq 0x46c0
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x5ca3
leaq 0x99(%rip), %rsi        # 0x5cd8
leaq 0x8(%rsp), %r15
movq %r14, %rdi
movq %r15, %rdx
callq 0x4380
leaq 0xa0(%rip), %rsi        # 0x5cf6
movq %r14, %rdi
movq %r15, %rdx
callq 0x4380
movq (%r15), %rsi
testq %rsi, %rsi
je 0x5c90
movq 0x10(%rsp), %rdi
cmpb $0x0, (%rdi)
je 0x5c90
callq 0x42f0
cmpl $-0x1, %eax
jne 0x5c90
movq 0x8(%rsp), %rdi
callq 0x4240
movq $0x0, 0x8(%rsp)
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x5ca3
callq 0x4240
testl %eax, %eax
je 0x5cd4
callq 0x40e0
movl (%rax), %edi
movl %edi, %ebp
negl %ebp
callq 0x4790
leaq 0x53a7(%rip), %rsi      # 0xb061
movl %ebp, %edi
movq %rbx, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x45d0
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
jmp 0x5cc9
// File: /workspace/github_c_makefile_star2_O1/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 0x5d5c
movq %rsi, %r8
cmpb $0x0, (%rsi)
je 0x5d5c
movq %rcx, %rbx
movq %rdx, %r14
movq 0x8(%rcx), %rcx
leaq 0x539f(%rip), %rsi      # 0xb0ba
movq %rcx, %rdx
xorl %eax, %eax
callq 0x4430
testl %eax, %eax
js 0x5d4d
leaq 0x5388(%rip), %rax      # 0xb0b8
movq %rax, 0x8(%rbx)
leaq 0x1f0(%rip), %rsi       # 0x5f2b
movq %r14, %rdi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x4380
movq (%rbx), %rdi
callq 0x4240
movq $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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
pushq %rax
testq %rcx, %rcx
je 0x5ead
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x5314(%rip), %rdi      # 0xb09f
callq 0x4060
testq %rax, %rax
je 0x5ec5
testq %r12, %r12
leaq 0x5316(%rip), %rdx      # 0xb0b9
cmoveq %rdx, %r12
leaq 0x52dc(%rip), %r9       # 0xb08a
movq %r9, %rcx
cmoveq %rdx, %rcx
testq %r15, %r15
cmoveq %rdx, %r15
cmoveq %rdx, %r9
leaq 0x52dd(%rip), %rsi      # 0xb0a4
xorl %ebp, %ebp
movq %rax, %rdi
movq %r12, %rdx
movq %r15, %r8
xorl %eax, %eax
pushq $0x0
pushq %r14
callq 0x4220
addq $0x10, %rsp
testq %rax, %rax
je 0x5ef6
movq %rax, %r14
movq %rax, %rdi
callq 0x4330
testq %rax, %rax
je 0x5e83
movq %rax, %r15
xorl %r13d, %r13d
xorl %r12d, %r12d
cmpb $0x2f, (%r14,%r13)
jne 0x5e79
cmpq %r12, %r13
jne 0x5e18
incq %r12
jmp 0x5e79
movb $0x0, (%r14,%r13)
cmpb $0x2e, (%r14,%r12)
jne 0x5e30
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl $0x1, %edi
jmp 0x5e53
movq %r14, %rdi
movl $0x1ff, %esi            # imm = 0x1FF
callq 0x4170
xorl %ebp, %ebp
testl %eax, %eax
je 0x5e70
callq 0x40e0
movl (%rax), %edi
cmpl $0x11, %edi
je 0x5e70
movl %edi, %ebp
negl %ebp
callq 0x4790
movl %ebp, %edi
leaq 0x5200(%rip), %rsi      # 0xb061
movq %r14, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x45d0
movl %eax, %ebp
movb $0x2f, (%r14,%r13)
testl %ebp, %ebp
jne 0x5e83
incq %r13
cmpq %r13, %r15
jne 0x5e07
xorl %ebp, %ebp
testl %ebp, %ebp
jne 0x5e94
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4550
movl %eax, %ebp
movq %r14, %rdi
callq 0x4260
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x16, %edi
callq 0x4790
leaq 0x51a0(%rip), %rsi      # 0xb05e
movl $0xffffffea, %edi       # imm = 0xFFFFFFEA
jmp 0x5ede
callq 0x40e0
movl (%rax), %edi
movl %edi, %ebx
negl %ebx
callq 0x4790
leaq 0x5182(%rip), %rsi      # 0xb05e
movl %ebx, %edi
movq %rax, %rdx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x45d0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x43e0
// File: /workspace/github_c_makefile_star2_O1/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 0x5f7a
movq %rsi, %rcx
movq 0x8(%rbx), %rdx
leaq 0x515d(%rip), %rsi      # 0xb0b0
xorl %eax, %eax
callq 0x4430
testl %eax, %eax
js 0x5f6b
leaq 0x5153(%rip), %rax      # 0xb0b8
movq %rax, 0x8(%rbx)
jmp 0x5f7a
movq (%rbx), %rdi
callq 0x4240
movq $0x0, (%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/DeforaOS[P]libSystem/src/error.c
// Function: get_do
static String const * _get_do(ErrorCode * code, ...)
{
	String const * ret;
	va_list args;

	va_start(args, code);
	ret = _error_do(code, NULL, args);
	va_end(args);
	return ret;
}

// Assembly:
subq $0x58, %rsp
leaq -0x60(%rsp), %r10
movq %rsi, 0x8(%r10)
movq %rdx, 0x10(%r10)
movq %rcx, 0x18(%r10)
movq %r8, 0x20(%r10)
movq %r9, 0x28(%r10)
testb %al, %al
je 0x5fd5
movaps %xmm0, -0x30(%rsp)
movaps %xmm1, -0x20(%rsp)
movaps %xmm2, -0x10(%rsp)
movaps %xmm3, (%rsp)
movaps %xmm4, 0x10(%rsp)
movaps %xmm5, 0x20(%rsp)
movaps %xmm6, 0x30(%rsp)
movaps %xmm7, 0x40(%rsp)
movq %r10, -0x70(%rsp)
leaq 0x60(%rsp), %rax
movq %rax, -0x78(%rsp)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, -0x80(%rsp)
testq %rdi, %rdi
je 0x6000
movl 0xa122(%rip), %eax      # 0x10120
movl %eax, (%rdi)
addq $0x58, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/DeforaOS[P]libSystem/src/error.c
// Function: error_set_code
ErrorCode error_set_code(ErrorCode code, String const * format, ...)
{
	ErrorCode ret;
	va_list ap;

	va_start(ap, format);
	ret = error_set_codev(code, format, ap);
	va_end(ap);
	return ret;
}

// Assembly:
pushq %rbx
subq $0xd0, %rsp
movl %edi, %ebx
leaq 0x20(%rsp), %rdi
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0x6125
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 %rsp, %rcx
movq %rdi, 0x10(%rcx)
leaq 0xe0(%rsp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rcx)
testq %rsi, %rsi
leaq 0x4f6a(%rip), %rdx      # 0xb0b9
cmovneq %rsi, %rdx
leaq 0x9ec6(%rip), %rdi      # 0x10020
movl $0x100, %esi            # imm = 0x100
callq 0x41b0
movl %ebx, 0x9fb6(%rip)      # 0x10120
movl %ebx, %eax
addq $0xd0, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/DeforaOS[P]libSystem/src/error.c
// Function: error_set_codev
ErrorCode error_set_codev(ErrorCode code, String const * format, va_list ap)
{
	if(format == NULL)
		format = "";
	_error_do(&code, format, ap);
	return code;
}

// Assembly:
pushq %rbx
movq %rdx, %rcx
movl %edi, %ebx
testq %rsi, %rsi
leaq 0x4f34(%rip), %rdx      # 0xb0b9
cmovneq %rsi, %rdx
leaq 0x9e90(%rip), %rdi      # 0x10020
movl $0x100, %esi            # imm = 0x100
callq 0x41b0
movl %ebx, 0x9f80(%rip)      # 0x10120
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x45e0
testq %rax, %rax
je 0x6353
movq %rax, %rbx
movl $0x8, %edi
callq 0x45b0
movq %rax, 0x118(%rbx)
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
movq %rax, (%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rbx)
movups %xmm0, 0x18(%rbx)
movups %xmm0, 0x28(%rbx)
movups %xmm0, 0x38(%rbx)
movups %xmm0, 0x48(%rbx)
movups %xmm0, 0x58(%rbx)
movups %xmm0, 0x68(%rbx)
movups %xmm0, 0x78(%rbx)
movups %xmm0, 0x88(%rbx)
movups %xmm0, 0x98(%rbx)
movups %xmm0, 0xa8(%rbx)
movups %xmm0, 0xb8(%rbx)
movups %xmm0, 0xc8(%rbx)
movups %xmm0, 0xd8(%rbx)
movups %xmm0, 0xe8(%rbx)
movups %xmm0, 0xf8(%rbx)
movl $0x8, %edi
callq 0x45b0
movq %rax, 0x108(%rbx)
movl $0x8, %edi
callq 0x45b0
movq %rax, 0x110(%rbx)
movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF
movq %rcx, 0x120(%rbx)
movq %rcx, 0x128(%rbx)
cmpq $0x0, 0x118(%rbx)
je 0x634b
cmpq $0x0, 0x108(%rbx)
sete %cl
testq %rax, %rax
sete %al
orb %cl, %al
cmpb $0x1, %al
jne 0x6355
movq %rbx, %rdi
callq 0x4710
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0x118(%rdi), %rdi
callq 0x4250
testq %rax, %rax
je 0x63b7
movl $0x1, %ebp
xorl %r15d, %r15d
leaq 0x10(%rsp), %r14
movq 0x118(%rbx), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x47f0
movq 0x10(%rsp), %rdi
callq 0x4460
movl %ebp, %r15d
movq 0x118(%rbx), %rdi
callq 0x4250
incl %ebp
cmpq %r15, %rax
ja 0x6385
movq 0x118(%rbx), %rdi
callq 0x4480
movq 0x108(%rbx), %rdi
callq 0x4250
testq %rax, %rax
je 0x6413
movl $0x1, %ebp
xorl %r15d, %r15d
leaq 0x8(%rsp), %r14
movq 0x108(%rbx), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x47f0
movq 0x8(%rsp), %rdi
callq 0x4460
movl %ebp, %r15d
movq 0x108(%rbx), %rdi
callq 0x4250
incl %ebp
cmpq %r15, %rax
ja 0x63e1
movq 0x108(%rbx), %rdi
callq 0x4480
movq 0x110(%rbx), %rdi
callq 0x4250
testq %rax, %rax
je 0x646f
movl $0x1, %ebp
xorl %r15d, %r15d
leaq 0x8(%rsp), %r14
movq 0x110(%rbx), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x47f0
movq 0x8(%rsp), %rdi
callq 0x4460
movl %ebp, %r15d
movq 0x110(%rbx), %rdi
callq 0x4250
incl %ebp
cmpq %r15, %rax
ja 0x643d
movq 0x110(%rbx), %rdi
callq 0x4480
movq %rbx, %rdi
callq 0x4460
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x67cf
callq 0x40e0
movl (%rax), %edi
movl %edi, %ebx
negl %ebx
callq 0x4790
leaq 0x48a7(%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 0x45d0
movl $0x30, %edi
callq 0x45e0
movq %rax, 0x8(%rsp)
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x6875
movq (%r14), %rcx
movq %rcx, (%rax)
movq 0x8(%r14), %rcx
movq %rcx, 0x8(%rax)
movq (%r14), %rcx
addq 0x10(%rsp), %rcx
movq %rcx, 0x10(%rax)
movq 0x8(%r14), %rcx
addq 0x18(%rsp), %rcx
movq %rcx, 0x18(%rax)
movq %r12, 0x20(%rax)
movq %r15, 0x28(%rax)
movq 0x118(%rbx), %rdi
leaq 0x8(%rsp), %rsi
callq 0x4290
testl %eax, %eax
je 0x683c
movq 0x8(%rsp), %rdi
callq 0x4460
jmp 0x6875
movq 0x120(%rbx), %rcx
movq (%r14), %rax
cmpq %rax, %rcx
jle 0x6861
movq %rax, 0x120(%rbx)
movq 0x8(%r14), %rax
movq %rax, 0x128(%rbx)
xorl %ebp, %ebp
jmp 0x6875
xorl %ebp, %ebp
cmpq %rax, %rcx
jne 0x6875
movq 0x128(%rbx), %rcx
cmpq 0x8(%r14), %rcx
jg 0x684b
movl %ebp, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq