LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/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 0x4e3f
movq %rdi, %rbx
movl 0x4(%rdi), %eax
movq %rax, %r15
imulq %r12, %r15
movq %r15, %rcx
addq %rax, %rcx
jae 0x4e6d
movl $0x22, %edi
callq 0x47a0
leaq 0x620e(%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 0x4eca
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 0x47a0
leaq 0x617d(%rip), %rsi      # 0xb05e
movl %ebx, %edi
jmp 0x4e55
// File: /workspace/github_c_makefile_star2_O3/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 0x4f43
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 0x4f64
movq %rax, 0x8(%rbx)
jmp 0x4f69
movl $0x22, %edi
callq 0x47a0
leaq 0x610a(%rip), %rsi      # 0xb05e
movl $0xffffffde, %edi       # imm = 0xFFFFFFDE
movq %rax, %rdx
xorl %eax, %eax
popq %rbx
jmp 0x45d0
cmpl $0x0, (%rbx)
je 0x4f3d
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x4fbb
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 0x4fa4
incl %ebp
movl 0x4(%r15), %eax
addq %rax, %r12
jmp 0x4fae
movl %ebp, %esi
movq %r15, %rdi
callq 0x4540
cmpl (%r15), %ebp
jb 0x4f88
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x500a
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 0x4ff3
incl %ebp
movl 0x4(%r15), %eax
addq %rax, %r12
jmp 0x4ffd
movl %ebp, %esi
movq %r15, %rdi
callq 0x4540
cmpl (%r15), %ebp
jb 0x4fd7
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x50cd
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 0x50d1
movq %rbx, %rdi
callq 0x4460
xorl %ebx, %ebx
jmp 0x50f3
movq %rax, %rdi
testq %r15, %r15
je 0x50e6
movq %r15, %rsi
movq %r14, %rdx
callq 0x4470
jmp 0x50f0
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_O3/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 0x516c
movq 0x8(%r15), %rdi
testq %r14, %r14
je 0x5160
movq %r14, %rsi
movq %rbx, %rdx
callq 0x4470
xorl %ebp, %ebp
jmp 0x516c
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_O3/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 0x51ea
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 0x51cb
callq 0x40e0
movl (%rax), %edi
movl %edi, %ebx
negl %ebx
callq 0x47a0
leaq 0x5ea6(%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 0x51e7
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_O3/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 0x5232
movl $0x22, %edi
callq 0x47a0
leaq 0x5e46(%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 0x5253
movq %r12, %rdi
callq 0x4120
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %ecx, %ecx
jne 0x5268
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_O3/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 0x52d3
leaq 0x8(%rsp), %r14
movl $0x0, 0x8(%r14)
leaq 0x5b(%rip), %rax        # 0x5301
leaq 0x18(%rsp), %rdx
movq %rax, (%rdx)
movq %r14, 0x8(%rdx)
leaq 0x625(%rip), %rsi       # 0x58de
movq %rbx, %rdi
callq 0x4380
cmpl $0x0, 0x8(%r14)
movq (%r14), %rax
je 0x52d5
movq %rax, %rdi
callq 0x43d0
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x536c
testq %rbx, %rbx
je 0x536a
movq %rbx, %rdi
movq %r14, %rsi
callq 0x41a0
testl %eax, %eax
je 0x536c
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_O3/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 0x59ab(%rip), %r12      # 0xb0b9
cmoveq %r12, %rbx
movq %rbx, %rsi
callq 0x4560
testq %rax, %rax
je 0x5775
movq %rax, %rdi
movq %r14, %rsi
callq 0x4560
movq %rax, %r15
testq %rax, %rax
jne 0x57b9
cmpb $0x0, (%rbx)
leaq 0x5901(%rip), %r8       # 0xb041
cmovneq %r12, %r8
cmoveq %r12, %rbx
movq %rbx, (%rsp)
leaq 0x58d2(%rip), %rsi      # 0xb025
leaq 0x58d6(%rip), %rcx      # 0xb030
leaq 0x58e9(%rip), %r9       # 0xb04a
xorl %r15d, %r15d
movl $0x1, %edi
movq %r14, %rdx
xorl %eax, %eax
callq 0x45d0
jmp 0x57b9
cmpb $0x0, (%rbx)
je 0x579c
leaq 0x58aa(%rip), %rsi      # 0xb02b
leaq 0x588b(%rip), %rcx      # 0xb013
xorl %r15d, %r15d
movl $0x1, %edi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x45d0
jmp 0x57b9
leaq 0x58bb(%rip), %rsi      # 0xb05e
leaq 0x5856(%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_O3/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 0x58dc(%rip), %r13      # 0xb0b9
cmovneq %rsi, %r13
testq %rdx, %rdx
je 0x5829
movq %rcx, %r14
movq %rdx, %rbx
movq %rdi, %r12
movq %rdx, %rdi
callq 0x4330
testq %rax, %rax
je 0x5829
movq %r12, %rdi
movq %r13, %rsi
callq 0x4560
testq %rax, %rax
je 0x5857
movq %rax, %r15
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4560
movq %rax, %r12
xorl %ebp, %ebp
orq %r14, %rax
jne 0x5888
jmp 0x58cd
movl $0x16, %edi
callq 0x47a0
leaq 0x581a(%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 0x58cd
movq %rax, %r15
movq %r12, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x44a0
testl %eax, %eax
je 0x5885
movq %r15, %rdi
callq 0x4770
jmp 0x58cd
xorl %r12d, %r12d
testq %r14, %r14
je 0x589f
movq %r14, %rdi
callq 0x41f0
movq %rax, %r14
testq %rax, %rax
jne 0x58a2
jmp 0x58bc
xorl %r14d, %r14d
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x44a0
testl %eax, %eax
je 0x58c3
movq %r14, %rdi
callq 0x4260
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0x58cd
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_O3/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 0x5922
leaq 0x8(%rsp), %rdx
movq %r15, (%rdx)
movq %r14, 0x8(%rdx)
movq %rbx, 0x10(%rdx)
leaq 0x12(%rip), %rsi        # 0x592c
movq %rax, %rdi
callq 0x4380
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x5980
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x45a0
testl %eax, %eax
je 0x597e
cmpl $-0x2, %eax
jne 0x5980
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x5a31
movq %rcx, %r14
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %rbx
testq %rsi, %rsi
je 0x59db
leaq 0x56d2(%rip), %rsi      # 0xb088
movl $0x3, %edx
movq %r15, %rdi
callq 0x44b0
testl %eax, %eax
je 0x5a19
leaq 0x56be(%rip), %rsi      # 0xb08c
movq %r15, %rdi
callq 0x42d0
testq %rax, %rax
jne 0x5a19
leaq 0x56d7(%rip), %r13      # 0xb0b9
movq %r13, %r8
testq %r12, %r12
je 0x5a5a
leaq 0x5697(%rip), %rsi      # 0xb088
movl $0x3, %edx
movq %r12, %rdi
callq 0x44b0
testl %eax, %eax
je 0x5a19
leaq 0x5683(%rip), %rsi      # 0xb08c
movq %r12, %rdi
callq 0x42d0
movq %r12, %r8
testq %rax, %rax
je 0x5a5a
movl $0x1, %edi
callq 0x47a0
leaq 0x5634(%rip), %rsi      # 0xb05e
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
jmp 0x5a47
movl $0x16, %edi
callq 0x47a0
leaq 0x561c(%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 0x5628(%rip), %rdi      # 0xb090
leaq 0x561b(%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 0x5ab0
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_O3/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 0x5b69
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
testq %rsi, %rsi
je 0x5b0c
leaq 0x55a1(%rip), %rsi      # 0xb088
movl $0x3, %edx
movq %r12, %rdi
callq 0x44b0
testl %eax, %eax
je 0x5b51
leaq 0x558d(%rip), %rsi      # 0xb08c
movq %r12, %rdi
callq 0x42d0
testq %rax, %rax
jne 0x5b51
testq %r15, %r15
je 0x5b3d
leaq 0x5570(%rip), %rsi      # 0xb088
movl $0x3, %edx
movq %r15, %rdi
callq 0x44b0
testl %eax, %eax
je 0x5b51
leaq 0x555c(%rip), %rsi      # 0xb08c
movq %r15, %rdi
callq 0x42d0
testq %rax, %rax
jne 0x5b51
leaq 0x5546(%rip), %rsi      # 0xb08a
movq %r14, %rdi
callq 0x42d0
testq %rax, %rax
je 0x5b94
movl $0x1, %edi
callq 0x47a0
leaq 0x54fc(%rip), %rsi      # 0xb05e
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
jmp 0x5b7f
movl $0x16, %edi
callq 0x47a0
leaq 0x54e4(%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 0x5504(%rip), %rdi      # 0xb09f
callq 0x4060
testq %rax, %rax
je 0x5c0e
testq %r12, %r12
leaq 0x550a(%rip), %rcx      # 0xb0b9
cmoveq %rcx, %r12
testq %r15, %r15
cmoveq %rcx, %r15
leaq 0x54e3(%rip), %rsi      # 0xb0a4
leaq 0x54c2(%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 0x5c2c
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 0x47a0
leaq 0x5439(%rip), %rsi      # 0xb05e
movl %ebx, %edi
jmp 0x5b7f
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x43e0
// File: /workspace/github_c_makefile_star2_O3/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 0x5448(%rip), %rax      # 0xb0b9
movq %rax, 0x10(%rsp)
leaq 0x5431(%rip), %rsi      # 0xb0ae
movq %rbx, %rdi
callq 0x46d0
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x5cee
leaq 0xca(%rip), %rsi        # 0x5d60
leaq 0x8(%rsp), %r15
movq %r14, %rdi
movq %r15, %rdx
callq 0x4380
leaq 0xd1(%rip), %rsi        # 0x5d7e
movq %r14, %rdi
movq %r15, %rdx
callq 0x4380
movq (%r15), %rsi
testq %rsi, %rsi
je 0x5d2f
movq 0x10(%rsp), %rdi
cmpb $0x0, (%rdi)
je 0x5cde
callq 0x42f0
movq 0x8(%rsp), %rsi
cmpl $-0x1, %eax
je 0x5d1e
testq %rsi, %rsi
je 0x5d2f
movq %rsi, %rdi
callq 0x4240
testl %eax, %eax
jne 0x5d2f
xorl %eax, %eax
jmp 0x5d55
callq 0x40e0
movl (%rax), %edi
movl %edi, %ebp
negl %ebp
callq 0x47a0
leaq 0x535c(%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 0x45d0
movq %rsi, %rdi
callq 0x4240
movq $0x0, 0x8(%rsp)
callq 0x40e0
movl (%rax), %edi
movl %edi, %ebp
negl %ebp
callq 0x47a0
leaq 0x531b(%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
// File: /workspace/github_c_makefile_star2_O3/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 0x5de4
movq %rsi, %r8
cmpb $0x0, (%rsi)
je 0x5de4
movq %rcx, %rbx
movq %rdx, %r14
movq 0x8(%rcx), %rcx
leaq 0x5317(%rip), %rsi      # 0xb0ba
movq %rcx, %rdx
xorl %eax, %eax
callq 0x4430
testl %eax, %eax
js 0x5dd5
leaq 0x5300(%rip), %rax      # 0xb0b8
movq %rax, 0x8(%rbx)
leaq 0x1ec(%rip), %rsi       # 0x5faf
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_O3/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 0x5f31
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x528c(%rip), %rdi      # 0xb09f
callq 0x4060
testq %rax, %rax
je 0x5f49
testq %r12, %r12
leaq 0x528e(%rip), %rdx      # 0xb0b9
cmoveq %rdx, %r12
leaq 0x5254(%rip), %r9       # 0xb08a
movq %r9, %rcx
cmoveq %rdx, %rcx
testq %r15, %r15
cmoveq %rdx, %r15
cmoveq %rdx, %r9
leaq 0x5255(%rip), %rsi      # 0xb0a4
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 0x5f7a
movq %rax, %r14
movq %rax, %rdi
callq 0x4330
testq %rax, %rax
je 0x5f0b
movq %rax, %r15
xorl %r13d, %r13d
xorl %r12d, %r12d
cmpb $0x2f, (%r14,%r13)
jne 0x5f03
cmpq %r12, %r13
jne 0x5e9f
leaq 0x1(%r13), %r12
jmp 0x5f03
movb $0x0, (%r14,%r13)
cmpb $0x2e, (%r14,%r12)
jne 0x5eb7
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl $0x1, %edi
jmp 0x5edf
movq %r14, %rdi
movl $0x1ff, %esi            # imm = 0x1FF
callq 0x4170
testl %eax, %eax
je 0x5ed4
callq 0x40e0
movl (%rax), %edi
cmpl $0x11, %edi
jne 0x5edb
movb $0x2f, (%r14,%r13)
jmp 0x5f03
movl %edi, %ebp
negl %ebp
callq 0x47a0
movl %ebp, %edi
leaq 0x5174(%rip), %rsi      # 0xb061
movq %r14, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x45d0
movb $0x2f, (%r14,%r13)
testl %eax, %eax
jne 0x5f16
incq %r13
cmpq %r13, %r15
jne 0x5e8d
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 0x47a0
leaq 0x511c(%rip), %rsi      # 0xb05e
movl $0xffffffea, %edi       # imm = 0xFFFFFFEA
jmp 0x5f62
callq 0x40e0
movl (%rax), %edi
movl %edi, %ebx
negl %ebx
callq 0x47a0
leaq 0x50fe(%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_O3/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 0x5ffe
movq %rsi, %rcx
movq 0x8(%rbx), %rdx
leaq 0x50d9(%rip), %rsi      # 0xb0b0
xorl %eax, %eax
callq 0x4430
testl %eax, %eax
js 0x5fef
leaq 0x50cf(%rip), %rax      # 0xb0b8
movq %rax, 0x8(%rbx)
jmp 0x5ffe
movq (%rbx), %rdi
callq 0x4240
movq $0x0, (%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x61a9
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 0x4ee6(%rip), %rdx      # 0xb0b9
cmovneq %rsi, %rdx
leaq 0x9e42(%rip), %rdi      # 0x10020
movl $0x100, %esi            # imm = 0x100
callq 0x41b0
movl %ebx, 0x9f32(%rip)      # 0x10120
movl %ebx, %eax
addq $0xd0, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x63ab
movq %rax, %rbx
movl $0x8, %edi
callq 0x45b0
movq %rax, 0x118(%rbx)
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
movq %rax, (%rbx)
movq %rbx, %rdi
addq $0x8, %rdi
movl $0x100, %edx            # imm = 0x100
xorl %esi, %esi
callq 0x4310
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 0x63a3
cmpq $0x0, 0x108(%rbx)
sete %cl
testq %rax, %rax
sete %al
orb %cl, %al
cmpb $0x1, %al
jne 0x63ad
movq %rbx, %rdi
callq 0x4720
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x640f
movl $0x1, %ebp
xorl %r15d, %r15d
leaq 0x10(%rsp), %r14
movq 0x118(%rbx), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x4800
movq 0x10(%rsp), %rdi
callq 0x4460
movl %ebp, %r15d
movq 0x118(%rbx), %rdi
callq 0x4250
incl %ebp
cmpq %r15, %rax
ja 0x63dd
movq 0x118(%rbx), %rdi
callq 0x4480
movq 0x108(%rbx), %rdi
callq 0x4250
testq %rax, %rax
je 0x646b
movl $0x1, %ebp
xorl %r15d, %r15d
leaq 0x8(%rsp), %r14
movq 0x108(%rbx), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x4800
movq 0x8(%rsp), %rdi
callq 0x4460
movl %ebp, %r15d
movq 0x108(%rbx), %rdi
callq 0x4250
incl %ebp
cmpq %r15, %rax
ja 0x6439
movq 0x108(%rbx), %rdi
callq 0x4480
movq 0x110(%rbx), %rdi
callq 0x4250
testq %rax, %rax
je 0x64c7
movl $0x1, %ebp
xorl %r15d, %r15d
leaq 0x8(%rsp), %r14
movq 0x110(%rbx), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x4800
movq 0x8(%rsp), %rdi
callq 0x4460
movl %ebp, %r15d
movq 0x110(%rbx), %rdi
callq 0x4250
incl %ebp
cmpq %r15, %rax
ja 0x6495
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_O3/DeforaOS[P]libSystem/src/event.c
// Function: event_loop
int event_loop(Event * event)
{
	int ret;

	event->loop++;
	while(event->loop && (ret = _event_loop_once(event)) == 0);
	return ret;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
xorl %ebx, %ebx
incl (%rdi)
je 0x6509
movq %rdi, %r14
movq %r14, %rdi
callq 0x6513
testl %eax, %eax
jne 0x6507
cmpl $0x0, (%r14)
jne 0x64f3
jmp 0x6509
movl %eax, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
testq %rsi, %rsi
je 0x67be
xorl %ebx, %ebx
incl (%r14)
je 0x67cd
movq %rsi, %r15
cmpl $0x0, (%r15)
je 0x67cd
movq %r14, %rdi
callq 0x6513
testl %eax, %eax
jne 0x67cb
cmpl $0x0, (%r14)
jne 0x67a4
jmp 0x67cd
movq %r14, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x4690
movl %eax, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x6849
callq 0x40e0
movl (%rax), %edi
movl %edi, %ebx
negl %ebx
callq 0x47a0
leaq 0x482d(%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 0x68d8
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 0x689f
movq 0x8(%rsp), %rdi
callq 0x4460
jmp 0x68d8
movq 0x120(%rbx), %rcx
movq (%r14), %rax
cmpq %rax, %rcx
jle 0x68c4
movq 0x8(%r14), %rcx
movq %rax, 0x120(%rbx)
movq %rcx, 0x128(%rbx)
xorl %ebp, %ebp
jmp 0x68d8
xorl %ebp, %ebp
cmpq %rax, %rcx
jne 0x68d8
movq 0x8(%r14), %rcx
cmpq %rcx, 0x128(%rbx)
jg 0x68b2
movl %ebp, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x6972
movq %rcx, %r15
movq %rdx, %r12
movl %esi, %ebx
movq %rdi, %r14
movl $0x18, %edi
callq 0x45e0
movq %rax, (%rsp)
testq %rax, %rax
je 0x694b
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 0x6952
movq (%rsp), %rdi
callq 0x4460
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x6966
movl $0x1, %eax
jmp 0x6966
movl $0x1, %eax
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 0x475b(%rip), %rdi      # 0xb0d4
leaq 0x475c(%rip), %rsi      # 0xb0dc
leaq 0x475d(%rip), %rcx      # 0xb0e4
movl $0xcb, %edx
callq 0x42e0
// File: /workspace/github_c_makefile_star2_O3/DeforaOS[P]libSystem/src/event.c
// Function: event_register_io_write
int event_register_io_write(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->writes, &eventio) != 0)
	{
		object_delete(eventio);
		return -1;
	}
	FD_SET(fd, &event->wfds);
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testl %esi, %esi
js 0x6a23
movq %rcx, %r15
movq %rdx, %r12
movl %esi, %ebx
movq %rdi, %r14
movl $0x18, %edi
callq 0x45e0
movq %rax, (%rsp)
testq %rax, %rax
je 0x69f9
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 0x110(%r14), %rdi
movq %rsp, %rsi
callq 0x4290
testl %eax, %eax
je 0x6a00
movq (%rsp), %rdi
callq 0x4460
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x6a17
movl $0x1, %eax
jmp 0x6a17
movl $0x1, %eax
movl %ebx, %ecx
shlq %cl, %rax
shrl $0x6, %ebx
orq %rax, 0x88(%r14,%rbx,8)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x46aa(%rip), %rdi      # 0xb0d4
leaq 0x46ab(%rip), %rsi      # 0xb0dc
leaq 0x46ea(%rip), %rcx      # 0xb122
movl $0xe2, %edx
callq 0x42e0
// File: /workspace/github_c_makefile_star2_O3/DeforaOS[P]libSystem/src/event.c
// Function: event_unregister_io_read
int event_unregister_io_read(Event * event, int fd)
{
	event->fdmax = _unregister_io(event->reads, &event->rfds, fd);
	event->fdmax = max(event->fdmax, _unregister_io(event->writes, NULL,
				-1));
	return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %edx
movq %rdi, %rbx
movq 0x108(%rdi), %rdi
leaq 0x8(%rbx), %rsi
callq 0x6a9a
movl %eax, %ebp
movl %eax, 0x4(%rbx)
movq 0x110(%rbx), %rdi
xorl %esi, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x6a9a
cmpl %eax, %ebp
jge 0x6a8b
movq 0x110(%rbx), %rdi
xorl %esi, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x6a9a
jmp 0x6a8e
movl 0x4(%rbx), %eax
movl %eax, 0x4(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/DeforaOS[P]libSystem/src/event.c
// Function: unregister_io
static int _unregister_io(eventioArray * eios, fd_set * fds, int fd)
{
	unsigned int i = 0;
	EventIO * eio;
	int fdmax = -1;

	while(i < array_count(eios))
	{
		array_get_copy(eios, i, &eio);
		if(eio->fd != fd)
		{
			fdmax = max(fdmax, eio->fd);
			i++;
			continue;
		}
		FD_CLR(fd, fds);
		array_remove_pos(eios, i);
		object_delete(eio);
	}
	return fdmax;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
callq 0x4250
testq %rax, %rax
je 0x6b34
movq $-0x2, %rbp
movl %ebx, %ecx
rolq %cl, %rbp
leal 0x3f(%rbx), %eax
testl %ebx, %ebx
cmovnsl %ebx, %eax
sarl $0x6, %eax
movslq %eax, %r13
xorl %r12d, %r12d
movl $0xffffffff, 0xc(%rsp)  # imm = 0xFFFFFFFF
movq %r15, %rdi
movq %r12, %rsi
leaq 0x10(%rsp), %rdx
callq 0x4800
movq 0x10(%rsp), %rax
movl (%rax), %eax
cmpl %ebx, %eax
jne 0x6b22
andq %rbp, (%r14,%r13,8)
movq %r15, %rdi
movq %r12, %rsi
callq 0x4540
movq 0x10(%rsp), %rdi
callq 0x4460
movq %r15, %rdi
callq 0x4250
cmpq %r12, %rax
ja 0x6adf
jmp 0x6b3c
movl 0xc(%rsp), %ecx
cmpl %eax, %ecx
cmovlel %eax, %ecx
movl %ecx, 0xc(%rsp)
incl %r12d
jmp 0x6b13
movl $0xffffffff, 0xc(%rsp)  # imm = 0xFFFFFFFF
movl 0xc(%rsp), %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/DeforaOS[P]libSystem/src/event.c
// Function: event_unregister_io_write
int event_unregister_io_write(Event * event, int fd)
{
	event->fdmax = _unregister_io(event->writes, &event->wfds, fd);
	event->fdmax = max(event->fdmax, _unregister_io(event->reads, NULL,
				-1));
	return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %edx
movq %rdi, %rbx
movq 0x110(%rdi), %rdi
leaq 0x88(%rbx), %rsi
callq 0x6a9a
movl %eax, %ebp
movl %eax, 0x4(%rbx)
movq 0x108(%rbx), %rdi
xorl %esi, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x6a9a
cmpl %eax, %ebp
jge 0x6b9b
movq 0x108(%rbx), %rdi
xorl %esi, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x6a9a
jmp 0x6b9e
movl 0x4(%rbx), %eax
movl %eax, 0x4(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/DeforaOS[P]libSystem/src/event.c
// Function: event_unregister_timeout
int event_unregister_timeout(Event * event, EventTimeoutFunc func)
{
	unsigned int i = 0;
	EventTimeout * et;
	struct timeval now;

	while(i < array_count(event->timeouts))
	{
		array_get_copy(event->timeouts, i, &et);
		if(et->func != func)
		{
			i++;
			continue;
		}
		array_remove_pos(event->timeouts, i);
		object_delete(et);
	}
	if(gettimeofday(&now, NULL) != 0)
		return error_set_code(-errno, "%s", strerror(errno));
	/* XXX will fail in 2038 on 32-bit platforms */
	event->timeout.tv_sec = (time_t)LONG_MAX;
	event->timeout.tv_usec = (suseconds_t)LONG_MAX;
	for(i = 0; i < array_count(event->timeouts); i++)
	{
		array_get_copy(event->timeouts, i, &et);
		if(et->timeout.tv_sec < event->timeout.tv_sec
				|| (et->timeout.tv_sec == event->timeout.tv_sec
					&& et->timeout.tv_usec
					< event->timeout.tv_usec))
		{
			if((event->timeout.tv_sec = et->timeout.tv_sec
						- now.tv_sec) < 0)
			{
				event->timeout.tv_sec = 0;
				event->timeout.tv_usec = 0;
				break;
			}
			event->timeout.tv_usec = et->timeout.tv_usec
				- now.tv_usec;
			if(event->timeout.tv_usec >= 0)
				continue;
			event->timeout.tv_sec = max(0, event->timeout.tv_sec-1);
			event->timeout.tv_usec = -event->timeout.tv_usec;
		}
	}
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x118(%rdi), %rdi
callq 0x4250
testq %rax, %rax
je 0x6c21
xorl %r15d, %r15d
movq %rsp, %r12
movq 0x118(%rbx), %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x4800
movq (%rsp), %rax
cmpq %r14, 0x20(%rax)
jne 0x6c1c
movq 0x118(%rbx), %rdi
movq %r15, %rsi
callq 0x4540
movq (%rsp), %rdi
callq 0x4460
movq 0x118(%rbx), %rdi
callq 0x4250
cmpq %r15, %rax
ja 0x6bd5
jmp 0x6c21
incl %r15d
jmp 0x6c09
xorl %r14d, %r14d
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
callq 0x42c0
testl %eax, %eax
je 0x6c5f
callq 0x40e0
movl (%rax), %edi
movl %edi, %ebx
negl %ebx
callq 0x47a0
leaq 0x4413(%rip), %rsi      # 0xb05e
movl %ebx, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0x45d0
movl %eax, %r14d
jmp 0x6d3d
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
movq %rax, 0x120(%rbx)
movq %rax, 0x128(%rbx)
movq 0x118(%rbx), %rdi
callq 0x4250
testq %rax, %rax
je 0x6d3d
leaq 0x120(%rbx), %r12
movq 0x8(%rsp), %r13
movq 0x10(%rsp), %rbp
movl $0x1, %r14d
xorl %r15d, %r15d
movq 0x118(%rbx), %rdi
movq %r15, %rsi
movq %rsp, %rdx
callq 0x4800
movq (%rsp), %rcx
movq 0x10(%rcx), %rax
cmpq 0x120(%rbx), %rax
jge 0x6d06
subq %r13, %rax
movq %rax, (%r12)
js 0x6d32
movq 0x18(%rcx), %rcx
subq %rbp, %rcx
movq %rcx, 0x128(%rbx)
jns 0x6d15
leaq -0x1(%rax), %rdx
cmpq $0x2, %rax
movl $0x0, %eax
cmovaeq %rdx, %rax
movq %rax, 0x120(%rbx)
negq %rcx
movq %rcx, 0x128(%rbx)
jmp 0x6d15
jne 0x6d15
movq 0x18(%rcx), %rdx
cmpq 0x128(%rbx), %rdx
jl 0x6cc9
movl %r14d, %r15d
movq 0x118(%rbx), %rdi
callq 0x4250
incl %r14d
cmpq %r15, %rax
ja 0x6ca6
jmp 0x6d3a
xorps %xmm0, %xmm0
movups %xmm0, (%r12)
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/DeforaOS[P]libSystem/src/event.c
// Function: loop_io
static void _loop_io(Event * event, eventioArray * eios, fd_set * fds)
{
	unsigned int i = 0;
	EventIO * eio;
	int fd;

	while(i < array_count(eios))
	{
		array_get_copy(eios, i, &eio);
		if((fd = eio->fd) <= event->fdmax && FD_ISSET(fd, fds)
				&& eio->func(fd, eio->data) != 0)
		{
			if(eios == event->reads)
				event_unregister_io_read(event, fd);
			else if(eios == event->writes)
				event_unregister_io_write(event, fd);
#ifdef DEBUG
			else
				fprintf(stderr, "DEBUG: %s%s", __func__,
						"(): should not happen\n");
#endif
		}
		else
			i++;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq %rsi, %rdi
callq 0x4250
testq %rax, %rax
je 0x6e00
xorl %r13d, %r13d
movq %rsp, %r12
xorl %ebp, %ebp
movq %r14, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x4800
movq (%rsp), %rax
movl (%rax), %r13d
cmpl 0x4(%r15), %r13d
jg 0x6ddf
leal 0x3f(%r13), %ecx
testl %r13d, %r13d
cmovnsl %r13d, %ecx
sarl $0x6, %ecx
movslq %ecx, %rcx
movq (%rbx,%rcx,8), %rcx
btq %r13, %rcx
jae 0x6ddf
movq 0x10(%rax), %rsi
movl %r13d, %edi
callq *0x8(%rax)
testl %eax, %eax
je 0x6ddf
cmpq %r14, 0x108(%r15)
je 0x6df3
cmpq %r14, 0x110(%r15)
jne 0x6de1
movq %r15, %rdi
movl %r13d, %esi
callq 0x4600
jmp 0x6de1
incl %ebp
movl %ebp, %r13d
movq %r14, %rdi
callq 0x4250
cmpq %r13, %rax
ja 0x6d7c
jmp 0x6e00
movq %r15, %rdi
movl %r13d, %esi
callq 0x4420
jmp 0x6de1
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop