LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/DeforaOS[P]libSystem/src/string.c
// Function: string_rindex
ssize_t string_rindex(String const * string, String const * key)
{
	size_t len;
	size_t keylen;
	ssize_t i;

	len = string_get_length(string);
	if((keylen = string_get_length(key)) == 0)
		return len;
	if(keylen > len)
		return -1;
	for(i = len - keylen; i >= 0; i--)
		if(string_compare_length(&string[i], key, keylen) == 0)
			return i;
	return -1;
}

// Assembly:
xorl %edx, %edx
movq %rdi, %rcx
movq %rdx, %rax
incq %rdx
incq %rcx
cmpb $0x0, (%rdi,%rax)
jne 0x8805
xorl %r8d, %r8d
cmpb $0x0, (%rsi,%r8)
leaq 0x1(%r8), %r8
jne 0x8817
cmpq $0x1, %r8
je 0x88bb
leaq -0x1(%r8), %r9
cmpq %rax, %r9
ja 0x88b4
subq %r8, %rdx
js 0x88b4
pushq %rbp
pushq %r14
pushq %rbx
subq %r8, %rcx
leaq -0x2(%r8), %rax
leaq (%r8,%rsi), %r9
addq $-0x2, %r9
leaq (%rdi,%rdx), %r10
cmpq $0x2, %r8
jne 0x885c
movq %rsi, %r11
jmp 0x8894
leaq (%r10,%rax), %r14
xorl %ebx, %ebx
movq %rsi, %r11
movb (%rcx,%rbx), %bpl
testb %bpl, %bpl
je 0x8894
cmpb (%rsi,%rbx), %bpl
jne 0x888a
incq %r10
incq %r11
incq %rbx
cmpq %rbx, %rax
jne 0x8865
movq %r14, %r10
movq %r9, %r11
jmp 0x8894
leaq (%rsi,%rbx), %r11
addq %rcx, %rbx
movq %rbx, %r10
movb (%r10), %r10b
cmpb (%r11), %r10b
je 0x88bc
leaq -0x1(%rdx), %r10
decq %rcx
testq %rdx, %rdx
movq %r10, %rdx
jg 0x884d
movq $-0x1, %rax
jmp 0x88bf
movq $-0x1, %rax
retq
movq %rdx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/DeforaOS[P]libSystem/src/string.c
// Function: string_rtrim
size_t string_rtrim(String * string, String const * which)
{
	size_t ret = 0;
	size_t i;
	size_t j;

	for(i = string_get_length(string); i > 0; i--)
		if(which == NULL)
		{
			if(!isspace((unsigned char)string[i - 1]))
				return ret;
			string[i - 1] = '\0';
			ret++;
		}
		else
		{
			for(j = 0; which[j] != '\0'; j++)
				if(string[i - 1] == which[j])
				{
					string[i - 1] = '\0';
					ret++;
					break;
				}
			if(which[j] == '\0')
				break;
		}
	return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq $-0x1, %r12
cmpb $0x0, 0x1(%r14,%r12)
leaq 0x1(%r12), %r12
jne 0x88da
testq %r12, %r12
je 0x894b
leaq 0x1(%rbx), %r13
xorl %r15d, %r15d
testq %rbx, %rbx
je 0x8915
movb (%rbx), %dl
testb %dl, %dl
je 0x894e
movb -0x1(%r14,%r12), %cl
movq %r13, %rax
cmpb %dl, %cl
je 0x8935
movb (%rax), %dl
incq %rax
testb %dl, %dl
jne 0x8906
jmp 0x894e
callq 0x4810
movq (%rax), %rax
movzbl -0x1(%r14,%r12), %ecx
testb $0x20, 0x1(%rax,%rcx,2)
je 0x894e
movb $0x0, -0x1(%r14,%r12)
incq %r15
jmp 0x8944
movb $0x0, -0x1(%r14,%r12)
incq %r15
cmpb $0x0, -0x1(%rax)
je 0x894e
decq %r12
jne 0x88f3
jmp 0x894e
xorl %r15d, %r15d
movq %r15, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/DeforaOS[P]libSystem/src/token.c
// Function: token_new
Token * token_new(String const * filename, unsigned int line, unsigned int col)
{
	Token * token;

#ifdef DEBUG
	fprintf(stderr, "DEBUG: %s(%u, %u)\n", __func__, line, col);
#endif
	if((token = (Token *)object_new(sizeof(*token))) == NULL)
		return NULL;
	token->code = 0;
	token->string = NULL;
	token->filename = (filename != NULL) ? string_new(filename) : NULL;
	token->line = line;
	token->col = col;
	token->data = NULL;
	if(filename != NULL && token->filename == NULL)
	{
		error_set_code(1, "%s", strerror(errno));
		object_delete(token);
		return NULL;
	}
	return token;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %r15
movl $0x28, %edi
callq 0x45e0
testq %rax, %rax
je 0x8a86
movq %rax, %rbx
movl $0x0, (%rax)
movq $0x0, 0x8(%rax)
testq %r15, %r15
je 0x8a8a
movq %r15, %rdi
callq 0x41f0
movq %rax, 0x10(%rbx)
movl %r14d, 0x18(%rbx)
movl %ebp, 0x1c(%rbx)
movq $0x0, 0x20(%rbx)
testq %rax, %rax
jne 0x8a9b
callq 0x40e0
movl (%rax), %edi
callq 0x47a0
leaq 0x25ef(%rip), %rsi      # 0xb05e
movl $0x1, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0x45d0
movq %rbx, %rdi
callq 0x4460
xorl %ebx, %ebx
jmp 0x8a9b
xorl %eax, %eax
movq %rax, 0x10(%rbx)
movl %r14d, 0x18(%rbx)
movl %ebp, 0x1c(%rbx)
movq %rax, 0x20(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/DeforaOS[P]libSystem/src/token.c
// Function: token_in_set
int token_in_set(Token * token, TokenSet set)
{
	TokenCode * code;

	for(code = set; *code != TC_NULL; code++)
		if(token->code == *code)
			return 1;
	return 0;
}

// Assembly:
movl (%rsi), %ecx
xorl %eax, %eax
testl %ecx, %ecx
je 0x8b70
movl (%rdi), %edx
addq $0x4, %rsi
cmpl %ecx, %edx
je 0x8b71
movl (%rsi), %ecx
addq $0x4, %rsi
testl %ecx, %ecx
jne 0x8b62
retq
movl $0x1, %eax
retq
nop
// File: /workspace/github_c_makefile_star2_O3/DeforaOS[P]libSystem/src/variable.c
// Function: variable_newv
Variable * variable_newv(VariableType type, va_list ap)
{
	Variable * variable;

	if((variable = (Variable *)object_new(sizeof(*variable))) == NULL)
		return NULL;
	variable->type = VT_NULL;
	if(variable_set_typev(variable, type, ap) != 0)
	{
		object_delete(variable);
		return NULL;
	}
	return variable;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movl %edi, %ebp
movl $0x20, %edi
callq 0x45e0
testq %rax, %rax
je 0x8c3a
movq %rax, %rbx
movl $0x0, (%rax)
movq %rax, %rdi
movl %ebp, %esi
movq %r14, %rdx
callq 0x4130
testl %eax, %eax
je 0x8c3c
movq %rbx, %rdi
callq 0x4460
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/DeforaOS[P]libSystem/src/variable.c
// Function: variable_new_arrayv
Variable * variable_new_arrayv(VariableType type, size_t size, va_list ap)
{
	Variable * variable;
	size_t i;
	void * p;

	if((variable = variable_new(VT_ARRAY, type, size)) == NULL)
		return NULL;
	for(i = 0; i < size; i++)
	{
		p = va_arg(ap, void *);
		if(array_set(variable->u.array.array, i, p) != 0)
		{
			variable_delete(variable);
			return NULL;
		}
	}
	return variable;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movl %edi, %esi
movl $0xe, %edi
movq %r15, %rdx
xorl %eax, %eax
callq 0x4670
testq %rax, %rax
je 0x9097
movq %rax, %rbx
testq %r15, %r15
je 0x9099
xorl %r12d, %r12d
movl (%r14), %ecx
cmpq $0x28, %rcx
ja 0x905e
movq %rcx, %rax
addq 0x10(%r14), %rax
addl $0x8, %ecx
movl %ecx, (%r14)
jmp 0x906a
movq 0x8(%r14), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%r14)
movq (%rax), %rdx
movq 0x10(%rbx), %rdi
movq %r12, %rsi
callq 0x44f0
testl %eax, %eax
jne 0x9087
incq %r12
cmpq %r12, %r15
jne 0x9046
jmp 0x9099
movq %rbx, %rdi
callq 0x97f5
movq %rbx, %rdi
callq 0x4460
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/DeforaOS[P]libSystem/src/variable.c
// Function: variable_new_compoundv
Variable * variable_new_compoundv(String const * name, va_list ap)
{
	Variable * variable;
	VariableType type;
	Mutator * m;
	Variable * v;

	if((variable = variable_new(VT_COMPOUND, name)) == NULL)
		return NULL;
	m = variable->u.compound.members;
	for(;;)
	{
		type = (VariableType)va_arg(ap, unsigned int);
		if(type == VT_NULL)
			return variable;
		name = va_arg(ap, String const *);
		if(name == NULL)
			break;
		if((v = (Variable *)mutator_get(m, name)) != NULL)
			variable_delete(v);
		if((v = variable_newv(type, ap)) == NULL
				|| mutator_set(m, name, v) != 0)
		{
			variable_delete(v);
			break;
		}
	}
	variable_delete(variable);
	return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rsi
movl $0xf, %edi
xorl %eax, %eax
callq 0x4670
testq %rax, %rax
je 0x9235
movq %rax, %rbx
movq 0x18(%rax), %r15
movl (%r14), %eax
cmpq $0x28, %rax
ja 0x918d
movq %rax, %rcx
addq 0x10(%r14), %rcx
addl $0x8, %eax
movl %eax, (%r14)
jmp 0x9199
movq 0x8(%r14), %rcx
leaq 0x8(%rcx), %rdx
movq %rdx, 0x8(%r14)
movl (%rcx), %ebp
testl %ebp, %ebp
je 0x9237
cmpl $0x28, %eax
ja 0x91b6
movl %eax, %ecx
addq 0x10(%r14), %rcx
addl $0x8, %eax
movl %eax, (%r14)
jmp 0x91c2
movq 0x8(%r14), %rcx
leaq 0x8(%rcx), %rax
movq %rax, 0x8(%r14)
movq (%rcx), %r12
testq %r12, %r12
je 0x9225
movq %r15, %rdi
movq %r12, %rsi
callq 0x4560
testq %rax, %rax
je 0x91ed
movq %rax, %r13
movq %rax, %rdi
callq 0x97f5
movq %r13, %rdi
callq 0x4460
movl %ebp, %edi
movq %r14, %rsi
callq 0x4350
testq %rax, %rax
je 0x9225
movq %rax, %r13
movq %r15, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x44a0
testl %eax, %eax
je 0x9175
movq %r13, %rdi
callq 0x97f5
movq %r13, %rdi
callq 0x4460
movq %rbx, %rdi
callq 0x97f5
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_O3/DeforaOS[P]libSystem/src/variable.c
// Function: variable_new_compound_variables
Variable * variable_new_compound_variables(String const * name, size_t members,
		String const ** names, Variable const ** variables)
{
	Variable * variable;
	Mutator * m;
	size_t i;
	Variable * v;

	if((variable = variable_new(VT_COMPOUND, name)) == NULL)
		return NULL;
	m = variable->u.compound.members;
	for(i = 0; i < members; i++)
	{
		if(names[i] == NULL)
		{
			error_set_code(-EINVAL, "%s", strerror(EINVAL));
			break;
		}
		if((v = (Variable *)mutator_get(m, names[i])) != NULL)
		{
			mutator_set(m, names[i], NULL);
			variable_delete(v);
		}
		if((v = variable_new_copy(variables[i])) == NULL
				|| mutator_set(m, names[i], v) != 0)
			break;
	}
	if(i != members)
	{
		variable_delete(variable);
		return NULL;
	}
	return variable;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %rsi
movl $0xf, %edi
xorl %eax, %eax
callq 0x4670
testq %rax, %rax
je 0x932a
movq %rax, %r13
testq %r14, %r14
je 0x92ed
movq %r13, (%rsp)
movq 0x18(%r13), %r13
xorl %ebx, %ebx
movq (%r12,%rbx,8), %rsi
testq %rsi, %rsi
je 0x92f1
movq %r13, %rdi
callq 0x4560
testq %rax, %rax
je 0x92be
movq %rax, %rbp
movq (%r12,%rbx,8), %rsi
movq %r13, %rdi
xorl %edx, %edx
callq 0x44a0
movq %rbp, %rdi
callq 0x97f5
movq %rbp, %rdi
callq 0x4460
movq (%r15,%rbx,8), %rdi
callq 0x40a0
testq %rax, %rax
je 0x9311
movq (%r12,%rbx,8), %rsi
movq %r13, %rdi
movq %rax, %rdx
callq 0x44a0
testl %eax, %eax
jne 0x9311
incq %rbx
cmpq %rbx, %r14
jne 0x9287
movq (%rsp), %r13
jmp 0x932d
xorl %ebx, %ebx
jmp 0x9315
movl $0x16, %edi
callq 0x47a0
leaq 0x1d5c(%rip), %rsi      # 0xb05e
movl $0xffffffea, %edi       # imm = 0xFFFFFFEA
movq %rax, %rdx
xorl %eax, %eax
callq 0x45d0
movq (%rsp), %r13
cmpq %r14, %rbx
je 0x932d
movq %r13, %rdi
callq 0x97f5
movq %r13, %rdi
callq 0x4460
xorl %r13d, %r13d
movq %r13, %rax
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/variable.c
// Function: variable_new_deserialize
Variable * variable_new_deserialize(size_t * size, char const * data)
{
	Variable * variable;
	uint8_t u8;
	VariableType type;
	size_t s;

	/* check the arguments */
	if(size == NULL || *size < sizeof(u8) || data == NULL)
	{
		error_set_code(-EINVAL, "%s", strerror(EINVAL));
		return NULL;
	}
	/* obtain the type from the data */
	u8 = data[0];
	type = (VariableType)u8;
	s = *size - sizeof(u8);
	/* deserialize according to the type */
	variable = variable_new_deserialize_type(type, &s, &data[sizeof(u8)]);
	*size = s + sizeof(u8);
	return variable;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
testq %rdi, %rdi
je 0x953c
movq %rsi, %rdx
movq %rdi, %rbx
movq (%rdi), %rax
testq %rax, %rax
setne %cl
testq %rsi, %rsi
setne %sil
testb %cl, %sil
jne 0x9561
movl $0x16, %edi
callq 0x47a0
leaq 0x1b11(%rip), %rsi      # 0xb05e
xorl %r14d, %r14d
movl $0xffffffea, %edi       # imm = 0xFFFFFFEA
movq %rax, %rdx
xorl %eax, %eax
callq 0x45d0
jmp 0x9586
movzbl (%rdx), %edi
decq %rax
leaq 0x8(%rsp), %r15
movq %rax, (%r15)
incq %rdx
movq %r15, %rsi
callq 0x40f0
movq %rax, %r14
movq (%r15), %rax
incq %rax
movq %rax, (%rbx)
movq %r14, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/DeforaOS[P]libSystem/src/variable.c
// Function: variable_destroy
static void _variable_destroy(Variable * variable)
{
	switch(variable->type)
	{
		case VT_NULL:
		case VT_BOOL:
		case VT_INT8:
		case VT_UINT8:
		case VT_INT16:
		case VT_UINT16:
		case VT_INT32:
		case VT_UINT32:
		case VT_INT64:
		case VT_UINT64:
		case VT_FLOAT:
		case VT_DOUBLE:
		case VT_POINTER:
			break;
		case VT_BUFFER:
			buffer_delete(variable->u.buffer);
			break;
		case VT_STRING:
			string_delete(variable->u.string);
			break;
		case VT_ARRAY:
			array_delete(variable->u.array.array);
			break;
		case VT_COMPOUND:
			_variable_destroy_compound(variable);
			break;
	}
}

// Assembly:
pushq %rbx
movl (%rdi), %eax
addl $-0xc, %eax
cmpl $0x3, %eax
ja 0x9858
movq %rdi, %rbx
leaq 0x1a86(%rip), %rcx      # 0xb290
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x8(%rbx), %rdi
popq %rbx
jmp 0x4630
movq 0x10(%rbx), %rdi
popq %rbx
jmp 0x4480
movq 0x10(%rbx), %rdi
callq 0x4260
movq 0x18(%rbx), %rbx
leaq 0xe88(%rip), %rsi       # 0xa6c3
movq %rbx, %rdi
xorl %edx, %edx
callq 0x4380
movq %rbx, %rdi
popq %rbx
jmp 0x4770
movq 0x8(%rbx), %rdi
popq %rbx
jmp 0x4260
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/DeforaOS[P]libSystem/src/variable.c
// Function: get_as_pointer
static int _get_as_pointer(size_t * size)
{
	size_t sz;

	sz = _variable_sizes[VT_POINTER];
	if(size != NULL)
	{
		if(sz > *size)
			return error_set_code(-ENOSPC, "%s", strerror(ENOSPC));
		*size = sz;
	}
	return 0;
}

// Assembly:
testq %rdi, %rdi
je 0x9f3e
cmpq $0x7, (%rdi)
ja 0x9f37
pushq %rax
movl $0x1c, %edi
callq 0x47a0
leaq 0x1137(%rip), %rsi      # 0xb05e
movl $0xffffffe4, %edi       # imm = 0xFFFFFFE4
movq %rax, %rdx
xorl %eax, %eax
popq %rcx
jmp 0x45d0
movq $0x8, (%rdi)
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/DeforaOS[P]libSystem/src/variable.c
// Function: variable_is_instance
bool variable_is_instance(Variable const * variable, String const * name)
{
	if(!variable_is_type(variable, VT_COMPOUND)
			|| variable->u.compound.name == NULL)
		return false;
	return (string_compare(variable->u.compound.name, name) == 0)
		? true : false;
}

// Assembly:
cmpl $0xf, (%rdi)
jne 0x9f96
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0x9f96
pushq %rax
callq 0x4230
testl %eax, %eax
sete %al
addq $0x8, %rsp
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/DeforaOS[P]libSystem/src/variable.c
// Function: variable_copy
VariableError variable_copy(Variable * variable, Variable const * from)
{
	Buffer * b;
	String * s;
	Array * a;

	switch(from->type)
	{
		case VT_NULL:
		case VT_BOOL:
		case VT_INT8:
		case VT_UINT8:
		case VT_INT16:
		case VT_UINT16:
		case VT_INT32:
		case VT_UINT32:
		case VT_INT64:
		case VT_UINT64:
		case VT_FLOAT:
		case VT_DOUBLE:
		case VT_POINTER:
			_variable_destroy(variable);
			memcpy(&variable->u, &from->u, sizeof(from->u));
			break;
		case VT_BUFFER:
			if((b = buffer_new_copy(from->u.buffer)) == NULL)
				return -1;
			_variable_destroy(variable);
			variable->u.buffer = b;
			break;
		case VT_STRING:
			if((s = string_new(from->u.string)) == NULL)
				return -1;
			_variable_destroy(variable);
			variable->u.string = s;
			break;
		case VT_ARRAY:
			if((a = array_new_copy(from->u.array.array)) == NULL)
				return -1;
			_variable_destroy(variable);
			variable->u.array.type = from->u.array.type;
			variable->u.array.array = a;
			break;
		case VT_COMPOUND:
			return _copy_compound(variable, from);
		default:
			/* TODO implement */
			return error_set_code(-ENOSYS, "%s", strerror(ENOSYS));
	}
	variable->type = from->type;
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl (%rsi), %eax
cmpl $0xc, %eax
jae 0xa10d
movq %rbx, %rdi
callq 0x97f5
movq 0x18(%r14), %rax
movq %rax, 0x18(%rbx)
movups 0x8(%r14), %xmm0
movups %xmm0, 0x8(%rbx)
movl (%r14), %eax
movl %eax, (%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
addl $-0xc, %eax
cmpl $0x4, %eax
ja 0xa1a7
leaq 0x1338(%rip), %rcx      # 0xb458
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x8(%r14), %rdi
callq 0x4740
jmp 0xa160
movq 0x10(%r14), %rdi
testq %rdi, %rdi
je 0xa1d2
callq 0x41f0
movq %rax, %r15
testq %rax, %rax
jne 0xa1d5
jmp 0xa238
movq 0x8(%r14), %rdi
callq 0x41f0
testq %rax, %rax
je 0xa238
movq %rax, %r15
movq %rbx, %rdi
callq 0x97f5
movq %r15, 0x8(%rbx)
jmp 0xa0fa
movq 0x10(%r14), %rdi
callq 0x46f0
testq %rax, %rax
je 0xa238
movq %rax, %r15
movq %rbx, %rdi
callq 0x97f5
movl 0x8(%r14), %eax
movl %eax, 0x8(%rbx)
movq %r15, 0x10(%rbx)
jmp 0xa0fa
movl $0x26, %edi
callq 0x47a0
leaq 0xea6(%rip), %rsi       # 0xb05e
movl $0xffffffda, %edi       # imm = 0xFFFFFFDA
movq %rax, %rdx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x45d0
xorl %r15d, %r15d
callq 0x4370
movq %rax, (%rsp)
testq %rax, %rax
je 0xa230
movq %rax, %r12
movq 0x18(%r14), %rdi
leaq 0x47d(%rip), %rsi       # 0xa66e
movq %rsp, %r14
movq %r14, %rdx
callq 0x4380
cmpq $0x0, (%r14)
je 0xa217
movq %rbx, %rdi
callq 0x97f5
movq %r15, 0x10(%rbx)
movq %r12, 0x18(%rbx)
jmp 0xa0ff
leaq 0x4a5(%rip), %rsi       # 0xa6c3
movq %r12, %rdi
xorl %edx, %edx
callq 0x4380
movq %r12, %rdi
callq 0x4770
movq %r15, %rdi
callq 0x4260
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0xa101
// File: /workspace/github_c_makefile_star2_O3/DeforaOS[P]libSystem/src/variable.c
// Function: new_copy_compound_foreach
static void _new_copy_compound_foreach(Mutator const * mutator,
		String const * key, void * value, void * data)
{
	Mutator ** m = (Mutator **)data;
	Variable const * from = (Variable const *)value;
	Variable * v;
	(void) mutator;

	if(*m == NULL)
		return;
	if((v = (Variable *)mutator_get(*m, key)) != NULL)
	{
		mutator_set(*m, key, NULL);
		variable_delete(v);
	}
	if((v = variable_new_copy(from)) == NULL
			|| mutator_set(*m, key, v) != 0)
	{
		variable_delete(v);
		*m = NULL;
	}
}

// Assembly:
movq (%rcx), %rdi
testq %rdi, %rdi
je 0xa625
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r14
callq 0x4560
testq %rax, %rax
je 0xa5e1
movq %rax, %r12
movq (%rbx), %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x44a0
movq %r12, %rdi
callq 0x97f5
movq %r12, %rdi
callq 0x4460
movq %r15, %rdi
callq 0x40a0
testq %rax, %rax
je 0xa613
movq %rax, %r15
movq (%rbx), %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x44a0
testl %eax, %eax
je 0xa61a
movq %r15, %rdi
callq 0x97f5
movq %r15, %rdi
callq 0x4460
movq $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/DeforaOS[P]libSystem/src/variable.c
// Function: get_as_compound_callback
static void _get_as_compound_callback(Mutator const * mutator,
		String const * key, void * value, void * data)
{
	VariableCompoundCallbackData * vccd = data;
	Variable const * from = value;
	VariableType type;
	size_t size;
	int res;
	(void) mutator;
	(void) key;

	/* XXX assumes alignment on byte boundary */
	type = variable_get_type(from);
	size = *(vccd->size);
	size = (size >= vccd->pos) ? size - vccd->pos : 0;
	if((res = variable_get_as(from, type, &vccd->result[vccd->pos], &size))
			!= 0)
		vccd->ret = res;
	vccd->pos += size;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rcx, %rbx
movq %rdx, %rdi
movl (%rdx), %esi
movq (%rcx), %rax
movq 0x10(%rcx), %rdx
movq (%rax), %rax
xorl %r8d, %r8d
subq %rdx, %rax
cmovaeq %rax, %r8
leaq 0x8(%rsp), %rcx
movq %r8, (%rcx)
addq 0x8(%rbx), %rdx
callq 0x4620
testl %eax, %eax
je 0xa65f
movl %eax, 0x18(%rbx)
movq 0x8(%rsp), %rax
addq %rax, 0x10(%rbx)
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/DeforaOS[P]libSystem/src/variable.c
// Function: copy_compound_foreach
static void _copy_compound_foreach(Mutator const * mutator, String const * key,
		void * value, void * data)
{
	Mutator ** m = (Mutator **)data;
	Variable * v = (Variable *)value;
	(void) mutator;

	if(*m == NULL)
		return;
	if(v == NULL)
		return;
	if((v = variable_new_copy(v)) == NULL
			|| mutator_set(*m, key, v) != 0)
	{
		variable_delete(v);
		*m = NULL;
	}
}

// Assembly:
testq %rdx, %rdx
je 0xa6c2
pushq %r15
pushq %r14
pushq %rbx
movq %rcx, %rbx
cmpq $0x0, (%rcx)
je 0xa6bd
movq %rsi, %r15
movq %rdx, %rdi
callq 0x40a0
testq %rax, %rax
je 0xa6b6
movq %rax, %r14
movq (%rbx), %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x44a0
testl %eax, %eax
je 0xa6bd
movq %r14, %rdi
callq 0x97f5
movq %r14, %rdi
callq 0x4460
movq $0x0, (%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/LeoFu9487[P]push_swap/srcs/push_swap/push_swap.c
// Function: display_instructions
void	display_instructions(t_deque *instructions, int *arr,
int arr_size, int fd)
{
	t_deque			*stack[2];
	t_double_list	*iter;

	stack[0] = deque_init();
	stack[1] = deque_init();
	if (!stack[0] || !stack[1])
		error_exit();
	init_stack(stack[0], arr, arr_size);
	if (DEBUG == 1)
		display_stacks(stack, "Init a and b");
	iter = instructions->head;
	while (iter)
	{
		assigned_operation(iter->content, stack);
		if (DEBUG == 1)
			display_stacks(stack, iter->content);
		else
			ft_putendl_fd(iter->content, fd);
		iter = iter->next;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %ecx, %ebx
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %r14
callq 0x2838
movq %rax, %r12
movq %rax, (%rsp)
callq 0x2838
movq %rax, 0x8(%rsp)
testq %r12, %r12
setne %cl
testq %rax, %rax
setne %al
testb %al, %cl
jne 0x11e4
callq 0x1db6
movq %r12, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x2016
movq (%r14), %r15
testq %r15, %r15
je 0x121a
movq %rsp, %r14
movq (%r15), %rdi
movq %r14, %rsi
callq 0x2042
movq (%r15), %rdi
movl %ebx, %esi
callq 0x2540
movq 0x8(%r15), %r15
testq %r15, %r15
jne 0x11fc
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/LeoFu9487[P]push_swap/srcs/push_swap/push_swap.c
// Function: push_swap
t_deque	*push_swap(t_deque *stack[2])
{
	t_deque	*instructions;

	instructions = deque_init();
	if (check_order(stack))
		return (instructions);
	if (stack[0]->size <= 5)
		easy_solve(stack, instructions);
	else if (stack[0]->size <= 100)
		medium_solve(stack, instructions);
	else
		hard_solve(stack, instructions);
	return (instructions);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x2838
movq %rax, %rbx
movq %r14, %rdi
callq 0x12ad
testl %eax, %eax
jne 0x126b
movq (%r14), %rax
movl 0x10(%rax), %eax
movq %r14, %rdi
movq %rbx, %rsi
cmpl $0x5, %eax
jg 0x125a
callq 0x12e8
jmp 0x126b
cmpl $0x64, %eax
ja 0x1266
callq 0x17ec
jmp 0x126b
callq 0x1628
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O3/LeoFu9487[P]push_swap/srcs/push_swap/utils.c
// Function: descretize_stack
void	descretize_stack(t_deque *stack, int *arr, int arr_size)
{
	t_double_list	*temp;

	temp = stack->head;
	while (temp)
	{
		*((int *)temp->content) = binary_search(arr, arr_size,
				*((int *)temp->content));
		temp = temp->next;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq (%rdi), %r15
testq %r15, %r15
je 0x12a7
movl %edx, %ebx
movq %rsi, %r14
movq (%r15), %rax
movl (%rax), %edx
movq %r14, %rdi
movl %ebx, %esi
callq 0x2b18
movq (%r15), %rcx
movl %eax, (%rcx)
movq 0x8(%r15), %r15
testq %r15, %r15
jne 0x128a
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/LeoFu9487[P]push_swap/srcs/push_swap/utils.c
// Function: check_order
int	check_order(t_deque *stack[2])
{
	int				ct;
	t_double_list	*temp;

	if (stack[1]->size != 0)
		return (0);
	ct = -1;
	temp = stack[0]->tail;
	while (++ct < stack[0]->size)
	{
		if (*((int *)temp->content) != ct)
			return (0);
		temp = temp->last;
	}
	return (1);
}

// Assembly:
movq 0x8(%rdi), %rcx
xorl %eax, %eax
cmpl $0x0, 0x10(%rcx)
je 0x12ba
retq
movq (%rdi), %rcx
movl 0x10(%rcx), %edx
movl $0x1, %eax
testl %edx, %edx
jle 0x12b9
addq $0x8, %rcx
xorl %esi, %esi
movq (%rcx), %rcx
movq (%rcx), %rdi
cmpl (%rdi), %esi
jne 0x12e5
addq $0x10, %rcx
incl %esi
cmpl %esi, %edx
jne 0x12cf
jmp 0x12b9
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/LeoFu9487[P]push_swap/srcs/push_swap/easy_solve.c
// Function: easy_solve
void	easy_solve(t_deque *stack[2], t_deque *instructions)
{
	char	*operation[11];

	assigned_operations(operation);
	if (exception(stack, instructions))
		return ;
	if (recursive(stack, instructions, operation, -1) == 0)
	{
		ft_putendl_fd("Unexpected error !!", 2);
		error_exit();
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x1d44(%rip), %rdi      # 0x3044
callq 0x2474
movq %rax, (%rsp)
leaq 0x1d37(%rip), %rdi      # 0x3047
callq 0x2474
movq %rax, 0x8(%rsp)
leaq 0x1d29(%rip), %rdi      # 0x304a
callq 0x2474
movq %rax, 0x10(%rsp)
leaq 0x1d1b(%rip), %rdi      # 0x304d
callq 0x2474
movq %rax, 0x18(%rsp)
leaq 0x1d0d(%rip), %rdi      # 0x3050
callq 0x2474
movq %rax, 0x20(%rsp)
leaq 0x1d00(%rip), %rdi      # 0x3054
callq 0x2474
movq %rax, 0x28(%rsp)
leaq 0x1cf3(%rip), %rdi      # 0x3058
callq 0x2474
movq %rax, 0x30(%rsp)
leaq 0x1ce6(%rip), %rdi      # 0x305c
callq 0x2474
movq %rax, 0x38(%rsp)
leaq 0x1ccc(%rip), %rdi      # 0x3053
callq 0x2474
movq %rax, 0x40(%rsp)
leaq 0x1cbf(%rip), %rdi      # 0x3057
callq 0x2474
movq %rax, 0x48(%rsp)
leaq 0x1cb2(%rip), %rdi      # 0x305b
callq 0x2474
movq %rax, 0x50(%rsp)
movq (%r14), %rax
cmpl $0x5, 0x10(%rax)
jne 0x1490
movq (%rax), %rax
movq (%rax), %rcx
cmpl $0x4, (%rcx)
jne 0x1490
movq 0x8(%rax), %rax
movq (%rax), %rcx
cmpl $0x0, (%rcx)
jne 0x1490
movq 0x8(%rax), %rax
movq (%rax), %rcx
cmpl $0x1, (%rcx)
jne 0x1490
movq 0x8(%rax), %rax
movq (%rax), %rax
cmpl $0x2, (%rax)
jne 0x1490
leaq 0x1c3e(%rip), %r15      # 0x3044
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x117c
leaq 0x1c35(%rip), %rsi      # 0x3050
movq %r14, %rdi
movq %rbx, %rdx
callq 0x117c
leaq 0x1c26(%rip), %r12      # 0x3053
movq %r14, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x117c
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x117c
leaq 0x1bfd(%rip), %rsi      # 0x304d
movq %r14, %rdi
movq %rbx, %rdx
callq 0x117c
movq %r14, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x117c
movq %r14, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x117c
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x117c
movq %rsp, %rdx
movq %r14, %rdi
movq %rbx, %rsi
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
callq 0x14d4
testl %eax, %eax
je 0x14b3
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x1b76(%rip), %rdi      # 0x3030
movl $0x2, %esi
callq 0x2540
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1db6
// File: /workspace/github_c_makefile_star2_O3/LeoFu9487[P]push_swap/srcs/push_swap/easy_solve.c
// Function: recursive
static int	recursive(t_deque *stack[2],
t_deque *instructions, char *operation[11], int avoid)
{
	int	ct;

	if (check_order(stack))
		return (1);
	if (stack[0]->size + stack[1]->size == 3 && instructions->size >= 3)
		return (0);
	if (stack[0]->size + stack[1]->size == 4 && instructions->size >= 5)
		return (0);
	if (stack[0]->size + stack[1]->size == 5 && instructions->size >= 7)
		return (0);
	ct = -1;
	while (++ct < 11)
	{
		if (ct == avoid || (ct == 3 && stack[1]->size == 0)
			|| (ct == 4 && stack[0]->size == 0))
			continue ;
		generate_instructions(stack, operation[ct], instructions);
		if (recursive(stack, instructions, operation, inverse_operation(ct)))
			return (1);
		deque_pop_back(instructions, NULL);
		assigned_operation(operation[inverse_operation(ct)], stack);
	}
	return (0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
callq 0x12ad
movl $0x1, %ecx
testl %eax, %eax
jne 0x1610
movq (%r12), %rcx
movq 0x8(%r12), %rax
movl 0x10(%rax), %eax
addl 0x10(%rcx), %eax
cmpl $0x5, %eax
je 0x1535
cmpl $0x4, %eax
je 0x1529
cmpl $0x3, %eax
jne 0x1540
cmpl $0x2, 0x10(%r15)
jle 0x1540
jmp 0x160e
cmpl $0x4, 0x10(%r15)
jle 0x1540
jmp 0x160e
cmpl $0x6, 0x10(%r15)
jg 0x160e
movl %ebp, %r13d
xorl %ebp, %ebp
movabsq $0x600000005, %rbx      # imm = 0x600000005
cmpq %rbp, %r13
je 0x1601
leaq -0x1(%rbp), %rax
cmpl $0x3, %eax
je 0x156d
cmpl $0x2, %eax
jne 0x157b
movq 0x8(%r12), %rax
jmp 0x1571
movq (%r12), %rax
cmpl $0x0, 0x10(%rax)
je 0x1601
movq (%r14,%rbp,8), %rsi
movq %r12, %rdi
movq %r15, %rdx
callq 0x117c
movaps 0x1a7f(%rip), %xmm0     # 0x3010
movaps %xmm0, (%rsp)
movaps 0x1a84(%rip), %xmm0     # 0x3020
movaps %xmm0, 0x10(%rsp)
movq %rbx, 0x20(%rsp)
movl $0x7, 0x28(%rsp)
movl (%rsp,%rbp,4), %ecx
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x14d4
testl %eax, %eax
jne 0x1621
movq %r15, %rdi
xorl %esi, %esi
callq 0x28de
movaps 0x1a3c(%rip), %xmm0     # 0x3010
movaps %xmm0, (%rsp)
movaps 0x1a41(%rip), %xmm0     # 0x3020
movaps %xmm0, 0x10(%rsp)
movq %rbx, 0x20(%rsp)
movl $0x7, 0x28(%rsp)
movslq (%rsp,%rbp,4), %rax
movq (%r14,%rax,8), %rdi
movq %r12, %rsi
callq 0x2042
incq %rbp
cmpq $0xb, %rbp
jne 0x154f
xorl %ecx, %ecx
movl %ecx, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, %ecx
jmp 0x1610
// File: /workspace/github_c_makefile_star2_O3/LeoFu9487[P]push_swap/srcs/push_swap/hard_solve.c
// Function: hard_solve
void	hard_solve(t_deque *stack[2], t_deque *instructions)
{
	int	move;
	int	now_move;

	move = 0;
	while ((1 << move) < stack[0]->size)
		++move;
	now_move = 0;
	while (now_move++ < move)
	{
		if (now_move == move && now_move % 2)
			final_move(stack, instructions, now_move - 1);
		else
			normal_move(stack, instructions, now_move - 1);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rax
movl 0x10(%rax), %eax
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
incl %r15d
movl $0x1, %edx
movl %r15d, %ecx
shll %cl, %edx
cmpl %eax, %edx
jl 0x1648
testl %r15d, %r15d
je 0x17dc
leal 0x1(%r15), %eax
movl %eax, 0x14(%rsp)
xorl %r13d, %r13d
movl $0x1, %eax
leaq 0x19d7(%rip), %r12      # 0x3050
movl %r13d, %ecx
movl %eax, %r13d
cmpl %eax, %r15d
setne %al
movq (%r14), %rdx
movl 0x10(%rdx), %ebp
movl %ecx, %edx
orb %al, %dl
testb $0x1, %dl
movq %r13, 0x8(%rsp)
jne 0x1702
testl %ebp, %ebp
jle 0x16ce
movl $0x1, %r13d
shll %cl, %r13d
movq (%r14), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movq %r12, %rsi
testl %r13d, (%rax)
je 0x16bf
leaq 0x1995(%rip), %rsi      # 0x3054
movq %r14, %rdi
movq %rbx, %rdx
callq 0x117c
decl %ebp
jne 0x16a6
movq 0x8(%r14), %rax
cmpl $0x0, 0x10(%rax)
movq 0x8(%rsp), %r13
jle 0x17ce
movq %r14, %rdi
leaq 0x1962(%rip), %rsi      # 0x304d
movq %rbx, %rdx
callq 0x117c
movq 0x8(%r14), %rax
cmpl $0x0, 0x10(%rax)
jg 0x16e1
jmp 0x17ce
testl %ebp, %ebp
jle 0x1762
movl $0x1, %r13d
shll %cl, %r13d
movq (%r14), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movq %r12, %rsi
testl %r13d, (%rax)
je 0x1728
leaq 0x192c(%rip), %rsi      # 0x3054
movq %r14, %rdi
movq %rbx, %rdx
callq 0x117c
decl %ebp
jne 0x170f
movq (%r14), %rax
cmpl $0x0, 0x10(%rax)
movq 0x8(%rsp), %r13
jle 0x17ce
movq %r14, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x117c
movq (%r14), %rax
cmpl $0x0, 0x10(%rax)
jg 0x1749
jmp 0x17ce
movq 0x8(%r14), %rax
movl 0x10(%rax), %ebp
testl %ebp, %ebp
jle 0x17ce
movl $0x1, %r13d
shll %cl, %r13d
movq 0x8(%r14), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
leaq 0x18d0(%rip), %rsi      # 0x3058
testl %r13d, (%rax)
je 0x1794
leaq 0x18b9(%rip), %rsi      # 0x304d
movq %r14, %rdi
movq %rbx, %rdx
callq 0x117c
decl %ebp
jne 0x1776
movq 0x8(%r14), %rax
cmpl $0x0, 0x10(%rax)
movq 0x8(%rsp), %r13
jle 0x17ce
movq %r14, %rdi
leaq 0x1891(%rip), %rsi      # 0x304d
movq %rbx, %rdx
callq 0x117c
movq 0x8(%r14), %rax
cmpl $0x0, 0x10(%rax)
jg 0x17b2
leal 0x1(%r13), %eax
cmpl %eax, 0x14(%rsp)
jne 0x1679
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/LeoFu9487[P]push_swap/srcs/push_swap/medium_solve.c
// Function: medium_solve
void	medium_solve(t_deque *stack[2], t_deque *instructions)
{
	int	group_size;
	int	idx;
	int	size;

	size = stack[0]->size;
	group_size = ft_sqrt(8 * size);
	idx = size;
	while (idx > 0)
	{
		solve(ft_max(0, idx - group_size), idx, stack, instructions);
		idx = ft_max(0, idx - group_size);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rax
movl 0x10(%rax), %r15d
leal (,%r15,8), %edi
callq 0x2b5c
movl %eax, (%rsp)
testl %r15d, %r15d
jle 0x19d1
leaq 0x1834(%rip), %r13      # 0x3058
movl %r15d, %esi
subl (%rsp), %esi
xorl %edi, %edi
movl %esi, 0x4(%rsp)
callq 0x280d
movl %eax, %r12d
movl %r15d, %ebp
subl %eax, %ebp
movq 0x8(%r14), %rax
movl 0x10(%rax), %ecx
cmpl %ebp, %ecx
jge 0x1882
movq (%r14), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movl (%rax), %eax
leaq 0x17f5(%rip), %rsi      # 0x3050
cmpl %r15d, %eax
jl 0x1867
leaq 0x17ed(%rip), %rsi      # 0x3054
cmpl %r12d, %eax
leaq 0x17e3(%rip), %rax      # 0x3054
cmovlq %rax, %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x117c
jmp 0x183d
movq (%r14), %rdx
movl 0x10(%rdx), %eax
addl %eax, %ecx
cmpl %r15d, %ecx
leaq 0x17bf(%rip), %rbp      # 0x3053
jle 0x190d
movq 0x8(%rdx), %rcx
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
testq %rcx, %rcx
je 0x18bf
xorl %edx, %edx
movq (%rcx), %rsi
cmpl %r15d, (%rsi)
je 0x18bc
incl %edx
movq 0x10(%rcx), %rcx
testq %rcx, %rcx
jne 0x18a7
jmp 0x18bf
movl %edx, %r12d
movl %eax, %ecx
subl %r12d, %ecx
cmpl %ecx, %r12d
jle 0x18ea
cmpl %r12d, %eax
jle 0x190d
incl %r12d
movq %r14, %rdi
movq %rbp, %rsi
movq %rbx, %rdx
callq 0x117c
movq (%r14), %rax
cmpl %r12d, 0x10(%rax)
jg 0x18ce
jmp 0x190d
testl %r12d, %r12d
jle 0x190d
incl %r12d
movq %r14, %rdi
leaq 0x1758(%rip), %rsi      # 0x3054
movq %rbx, %rdx
callq 0x117c
decl %r12d
cmpl $0x1, %r12d
ja 0x18f2
movq 0x8(%r14), %rcx
movl 0x10(%rcx), %eax
testl %eax, %eax
leaq 0x173a(%rip), %rbp      # 0x3057
jle 0x19bb
decl %r15d
movq 0x8(%rcx), %rcx
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
testq %rcx, %rcx
je 0x194f
xorl %edx, %edx
movq (%rcx), %rsi
cmpl %r15d, (%rsi)
je 0x194c
incl %edx
movq 0x10(%rcx), %rcx
testq %rcx, %rcx
jne 0x1937
jmp 0x194f
movl %edx, %r12d
movl %eax, %ecx
subl %r12d, %ecx
cmpl %ecx, %r12d
jle 0x197b
cmpl %r12d, %eax
jle 0x199a
incl %r12d
movq %r14, %rdi
movq %rbp, %rsi
movq %rbx, %rdx
callq 0x117c
movq 0x8(%r14), %rax
cmpl %r12d, 0x10(%rax)
jg 0x195e
jmp 0x199a
testl %r12d, %r12d
jle 0x199a
incl %r12d
movq %r14, %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x117c
decl %r12d
cmpl $0x1, %r12d
ja 0x1983
movq %r14, %rdi
leaq 0x16a9(%rip), %rsi      # 0x304d
movq %rbx, %rdx
callq 0x117c
movq 0x8(%r14), %rcx
movl 0x10(%rcx), %eax
testl %eax, %eax
jg 0x1923
xorl %edi, %edi
movl 0x4(%rsp), %esi
callq 0x280d
movl %eax, %r15d
testl %eax, %eax
jg 0x1824
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/LeoFu9487[P]push_swap/srcs/push_swap/main.c
// Function: main
int	main(int argc, char **argv)
{
	int				*arr[3];
	t_deque			*stack[2];
	int				ct[2];
	t_deque			*instructions;

	ct[1] = get_nbr_in_line(arr, argc, argv);
	sub(ct, stack, arr);
	while (++ct[0] < ct[1])
		arr[1][ct[0]] = arr[0][ct[0]];
	arr[2] = ft_malloc(ct[1], sizeof(int));
	if (!arr[2])
		error_exit();
	ct[0] = -1;
	while (++ct[0] < ct[1])
		arr[2][ct[0]] = arr[0][ct[0]];
	ft_sort(arr[1], arr[1] + ct[1], ft_ascending);
	descretize_stack(stack[0], arr[1], ct[1]);
	instructions = push_swap(stack);
	display_instructions(instructions, arr[2], ct[1], 1);
	normal_exit();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %rdx
movl %edi, %esi
movq %rsp, %rdi
callq 0x1a23
movl %eax, %ebx
cmpl $0x1, %eax
jg 0x2368
callq 0x1dd7
callq 0x2838
movq %rax, %r14
movq %rax, 0x20(%rsp)
callq 0x2838
movq %rax, 0x28(%rsp)
testq %r14, %r14
sete %cl
testq %rax, %rax
sete %al
orb %cl, %al
cmpb $0x1, %al
jne 0x2396
callq 0x1db6
movq (%rsp), %rsi
movq %r14, %rdi
movl %ebx, %edx
callq 0x2016
movslq %ebx, %r15
movl $0x4, %esi
movq %r15, %rdi
callq 0x27c4
movq %rax, 0x8(%rsp)
testq %rax, %rax
jne 0x23c3
callq 0x1db6
movl %ebx, %r12d
testl %ebx, %ebx
jle 0x23e3
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
xorl %edx, %edx
movl (%rax,%rdx,4), %esi
movl %esi, (%rcx,%rdx,4)
incq %rdx
cmpq %rdx, %r12
jne 0x23d5
movl $0x4, %esi
movq %r15, %rdi
callq 0x27c4
movq %rax, 0x10(%rsp)
testq %rax, %rax
jne 0x23ff
callq 0x1db6
testl %ebx, %ebx
jle 0x241c
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
xorl %edx, %edx
movl (%rax,%rdx,4), %esi
movl %esi, (%rcx,%rdx,4)
incq %rdx
cmpq %rdx, %r12
jne 0x240e
movq 0x8(%rsp), %rdi
leaq (%rdi,%r15,4), %rsi
leaq 0x5a8(%rip), %rdx       # 0x29d4
callq 0x29ee
movq 0x8(%rsp), %rsi
movq %r14, %rdi
movl %ebx, %edx
callq 0x1278
leaq 0x20(%rsp), %rdi
callq 0x1227
movq 0x10(%rsp), %rsi
movq %rax, %rdi
movl %ebx, %edx
movl $0x1, %ecx
callq 0x11a3
callq 0x1dd7
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/LeoFu9487[P]push_swap/libft/ft_sort.c
// Function: ft_sort
void	ft_sort(int *head, int *tail, int (*cmp)(int, int))
{
	int		*arr;
	int		nbr;
	int		ct;

	if (!cmp)
		cmp = ft_ascending;
	arr = head;
	nbr = (int)(tail - head);
	ct = nbr;
	while (--ct >= 0)
		ft_deep(arr, ct, nbr, cmp);
	while (--nbr >= 1)
	{
		ft_swap(arr + nbr, arr);
		ft_deep(arr, 0, nbr, cmp);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
testq %rdx, %rdx
leaq -0x32(%rip), %r14       # 0x29d4
cmovneq %rdx, %r14
subq %rdi, %rbx
shrq $0x2, %rbx
testl %ebx, %ebx
jle 0x2a72
movq %rdi, %r15
leal 0x1(%rbx), %r12d
leal -0x2(%r12), %esi
movq %r15, %rdi
movl %ebx, %edx
movq %r14, %rcx
callq 0x2a7b
decl %r12d
cmpl $0x1, %r12d
ja 0x2a1c
cmpl $0x1, %ebx
je 0x2a72
andl $0x7fffffff, %ebx       # imm = 0x7FFFFFFF
decq %rbx
movl (%r15,%rbx,4), %eax
movl (%r15), %ecx
movl %ecx, (%r15,%rbx,4)
movl %eax, (%r15)
movq %r15, %rdi
xorl %esi, %esi
movl %ebx, %edx
movq %r14, %rcx
callq 0x2a7b
leaq -0x1(%rbx), %rax
incq %rbx
cmpq $0x2, %rbx
movq %rax, %rbx
ja 0x2a45
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/LeoFu9487[P]push_swap/libft/ft_sort.c
// Function: ft_deep
static void	ft_deep(int *arr, int index, int nbr, int (*cmp)(int, int))
{
	int	temp_index;

	if (index * 2 + 1 >= nbr)
		return ;
	if (index * 2 + 2 >= nbr)
		temp_index = index * 2 + 1;
	else
	{
		if (cmp(arr[index * 2 + 1], arr[index * 2 + 2]))
			temp_index = index * 2 + 2;
		else
			temp_index = index * 2 + 1;
	}
	if (cmp(arr[temp_index], arr[index]))
		return ;
	ft_swap(arr + index, arr + temp_index);
	ft_deep(arr, temp_index, nbr, cmp);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, -0x38(%rbp)
movl %esi, %r14d
leal 0x1(,%r14,2), %ebx
cmpl %edx, %ebx
jge 0x2b06
movq %rdi, %r15
leal (%r14,%r14), %r13d
movl %edx, -0x2c(%rbp)
addl $0x2, %r13d
cmpl %edx, %r13d
jge 0x2ac9
movl %ebx, %eax
movl (%r15,%rax,4), %edi
movl %r13d, %eax
movl (%r15,%rax,4), %esi
callq *-0x38(%rbp)
testl %eax, %eax
je 0x2ac9
movl %r13d, %ebx
movl %ebx, %r12d
movl %ebx, %ebx
movl (%r15,%rbx,4), %edi
movl %r14d, %r14d
movl (%r15,%r14,4), %esi
callq *-0x38(%rbp)
testl %eax, %eax
movl -0x2c(%rbp), %edx
jne 0x2b06
movl (%r15,%r14,4), %eax
movl (%r15,%rbx,4), %ecx
movl %ecx, (%r15,%r14,4)
movl %eax, (%r15,%rbx,4)
leal (%r12,%r12), %r13d
leal 0x1(,%r12,2), %ebx
movl %r12d, %r14d
cmpl %edx, %ebx
jl 0x2aa9
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/LeoFu9487[P]push_swap/libft/binary_search.c
// Function: binary_search
int	binary_search(int *arr, int arr_size, int target)
{
	int	lb;
	int	ub;
	int	mid;

	lb = -1;
	ub = arr_size;
	while (ub - lb > 1)
	{
		mid = (ub + lb) / 2;
		if (arr[mid] < target)
			lb = mid;
		else if (arr[mid] > target)
			ub = mid;
		else
			return (mid);
	}
	return (-1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testl %esi, %esi
jle 0x2b53
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
leal (%rsi,%rcx), %r8d
movl %r8d, %eax
shrl $0x1f, %eax
addl %r8d, %eax
sarl %eax
movslq %eax, %r8
cmpl %edx, (%rdi,%r8,4)
jge 0x2b43
movl %eax, %ecx
movl %esi, %eax
jmp 0x2b45
jle 0x2b58
movl %eax, %r8d
subl %ecx, %r8d
movl %eax, %esi
cmpl $0x1, %r8d
jg 0x2b25
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/LeoFu9487[P]push_swap/libft/ft_sqrt.c
// Function: ft_sqrt
int	ft_sqrt(int n)
{
	long long	lb;
	long long	ub;
	long long	mid;

	if (n <= 1LL)
		return (n);
	lb = 0LL;
	ub = (long long)n;
	while (ub - lb > 1LL)
	{
		mid = (lb + ub) / 2LL;
		if (mid * mid <= (long long)n)
			lb = mid;
		else
			ub = mid;
	}
	return ((int)lb);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, %eax
cmpl $0x2, %edi
jl 0x2ba0
movslq %eax, %rcx
xorl %eax, %eax
movq %rcx, %rdx
leaq (%rdx,%rax), %rdi
movq %rdi, %rsi
shrq $0x3f, %rsi
addq %rdi, %rsi
sarq %rsi
movq %rsi, %rdi
imulq %rsi, %rdi
cmpq %rcx, %rdi
jg 0x2b91
movq %rsi, %rax
jmp 0x2b94
movq %rsi, %rdx
movq %rdx, %rsi
subq %rax, %rsi
cmpq $0x1, %rsi
jg 0x2b6f
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/ch6/track_memory.c
// Function: alloc
void *alloc(void *ud,
            void *ptr,
            size_t osize,
            size_t nsize) {
  bytes_alloced += nsize - (ptr ? osize : 0);
  if (nsize) return realloc(ptr, nsize);
  free(ptr);
  return NULL;
}

// Assembly:
movq %rsi, %rdi
testq %rsi, %rsi
cmoveq %rsi, %rdx
movq %rcx, %rax
subq %rdx, %rax
addq %rax, 0x29abd(%rip)     # 0x2e2c0
testq %rcx, %rcx
je 0x4810
movq %rcx, %rsi
jmp 0x43c0
pushq %rbp
movq %rsp, %rbp
callq 0x4050
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/albinoloverats[P]hide/src/jpeg.c
// Function: init
extern image_type_t *init(void)
{
	static image_type_t jpeg;
	jpeg.type = "JPEG";
	jpeg.is_type = is_jpeg;
	jpeg.read = read_jpeg;
	jpeg.write = write_jpeg;
	jpeg.info = info_jpeg;
	jpeg.free = free_jpeg;
	return &jpeg;
}

// Assembly:
leaq 0x3bbd(%rip), %rax      # 0x5000
movq %rax, 0x5c8e(%rip)      # 0x70d8
leaq 0x5c87(%rip), %rax      # 0x70d8
leaq 0x40(%rip), %rcx        # 0x1498
movq %rcx, 0x5c81(%rip)      # 0x70e0
leaq 0x92(%rip), %rcx        # 0x14f8
movq %rcx, 0x5c7b(%rip)      # 0x70e8
leaq 0x22b(%rip), %rcx       # 0x169f
movq %rcx, 0x5c75(%rip)      # 0x70f0
leaq 0x381(%rip), %rcx       # 0x1803
movq %rcx, 0x5c6f(%rip)      # 0x70f8
leaq 0x3b1(%rip), %rcx       # 0x1841
movq %rcx, 0x5c69(%rip)      # 0x7100
retq
// File: /workspace/github_c_makefile_star2_O3/albinoloverats[P]hide/src/jpeg.c
// Function: write_jpeg
static int write_jpeg(image_info_t image_info, void (*progress_update)(uint64_t, uint64_t))
{
	errno = EXIT_SUCCESS;

	FILE *fp = fopen(image_info.file, "wb");
	if (!fp)
		return errno;

	jpeg_message_t msg = { image_info.width, NULL };
	msg.data = malloc(msg.size); // total capacity

	/* retrieve the image data */
	jpeg_image_t *image = image_info.extra;

	/* copy message from image_info.buffer to message.data */
	for (uint64_t x = 0, i = 0; x < image_info.width * image_info.bpp; x += image_info.bpp, i++)
	{
		msg.data[i]  = (image_info.buffer[0][x + 0] & 0x07) << 5;
		msg.data[i] |= (image_info.buffer[0][x + 1] & 0x03) << 3;
		msg.data[i] |= (image_info.buffer[0][x + 2] & 0x07);
		if (progress_update)
			progress_update(x, image_info.width);
	}
	free(image_info.buffer[0]);
	free(image_info.buffer);

	/* get actual message length from data */
	memcpy(&msg.size, msg.data, sizeof msg.size);
	msg.size = ntohll(msg.size);

	/* write the message to the image */
	jpeg_encode_data(fp, &msg, image);

	free(msg.data);
	for (uint64_t i = 0; i < image->height; i++)
		free(image->rgb[i]);
	free(image->rgb);
	free(image);

	fclose(fp);

	return errno;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %r12
callq 0x1050
movq %rax, %rbx
movl $0x0, (%rax)
movq 0x70(%rsp), %rdi
leaq 0x393e(%rip), %rsi      # 0x5008
callq 0x10f0
testq %rax, %rax
je 0x17f2
movq %rax, 0x8(%rsp)
movq %rbx, 0x10(%rsp)
leaq 0x70(%rsp), %r14
movq 0x30(%r14), %rbp
movq %rbp, %rdi
callq 0x1110
movq %rax, (%rsp)
movq %rax, 0x30(%rsp)
movq 0x40(%r14), %rbx
movq 0x48(%r14), %r15
movzwl 0x38(%r14), %eax
movq %rbp, 0x18(%rsp)
movq %rax, 0x20(%rsp)
imulq %rax, %rbp
testq %rbp, %rbp
je 0x1772
xorl %r14d, %r14d
movq (%rsp), %r13
movq (%rbx), %rax
movb (%rax,%r14), %al
shlb $0x5, %al
movb %al, (%r13)
movq (%rbx), %rcx
movb 0x1(%rcx,%r14), %cl
shlb $0x3, %cl
andb $0x18, %cl
orb %al, %cl
movb %cl, (%r13)
movq (%rbx), %rax
movb 0x2(%rax,%r14), %al
andb $0x7, %al
orb %cl, %al
movb %al, (%r13)
testq %r12, %r12
je 0x1765
movq %r14, %rdi
movq 0x18(%rsp), %rsi
callq *%r12
addq 0x20(%rsp), %r14
incq %r13
cmpq %rbp, %r14
jb 0x1723
movq (%rbx), %rdi
callq 0x1040
movq %rbx, %rdi
callq 0x1040
movq (%rsp), %rax
movq (%rax), %rax
bswapq %rax
leaq 0x28(%rsp), %rbx
movq %rax, (%rbx)
movq 0x8(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x1120
movq 0x8(%rbx), %rdi
callq 0x1040
cmpl $0x0, 0xc(%r15)
je 0x17d1
xorl %ebx, %ebx
movq (%r15), %rax
movq (%rax,%rbx,8), %rdi
callq 0x1040
incq %rbx
movl 0xc(%r15), %eax
cmpq %rax, %rbx
jb 0x17b9
movq (%r15), %rdi
callq 0x1040
movq %r15, %rdi
callq 0x1040
movq %r14, %rdi
callq 0x1070
movq 0x10(%rsp), %rax
movl (%rax), %eax
jmp 0x17f4
movl (%rbx), %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/albinoloverats[P]hide/src/jpeg.c
// Function: info_jpeg
extern uint64_t info_jpeg(image_info_t *image_info)
#endif
{
	data_info_t extra = { NULL, 0, true, false };
	image_info->extra = &extra;
	read_jpeg(image_info, NULL);
	return HIDE_CAPACITY;
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movq 0x3816(%rip), %rax      # 0x5028
movq %rsp, %rcx
movq %rax, 0x10(%rcx)
movups 0x37f8(%rip), %xmm0     # 0x5018
movaps %xmm0, (%rcx)
movq %rcx, 0x48(%rdi)
xorl %esi, %esi
callq 0x14f8
movq 0x28(%rbx), %rax
imulq 0x30(%rbx), %rax
addq $-0x8, %rax
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/albinoloverats[P]hide/src/jpeg.c
// Function: free_jpeg
extern void free_jpeg(image_info_t image_info)
#endif
{
	free(image_info.buffer[0]);
	free(image_info.buffer);
	jpeg_image_t *image = image_info.extra;
	for (uint64_t i = 0; i < image->height; i++)
		free(image->rgb[i]);
	free(image->rgb);
	free(image);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x60(%rsp), %rbx
movq (%rbx), %rdi
callq 0x1040
movq %rbx, %rdi
callq 0x1040
movq 0x68(%rsp), %rbx
cmpl $0x0, 0xc(%rbx)
je 0x187f
xorl %r14d, %r14d
movq (%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x1040
incq %r14
movl 0xc(%rbx), %eax
cmpq %rax, %r14
jb 0x1868
movq (%rbx), %rdi
callq 0x1040
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1040
nop
// File: /workspace/github_c_makefile_star2_O3/albinoloverats[P]hide/src/jpeg-save.c
// Function: writebits
static void writebits(bitstring bs)
{
	// bit position in the bitstring we read, should be<=15 and >=0
	for (int posval = bs.length - 1; posval >= 0; )
	{
		if (bs.value & mask[posval])
			bytenew |= mask[bytepos];
		posval--;
		bytepos--;
		if (bytepos < 0)
		{
			if (bytenew == 0xFF)
			{
				writebyte(0xFF);
				writebyte(0);
			}
			else
				writebyte(bytenew);
			bytepos = 7;
			bytenew = 0;
		}
	}
}

// Assembly:
testb %dil, %dil
je 0x3ba6
pushq %r15
pushq %r14
pushq %rbx
movl %edi, %ebx
shrl $0x10, %ebx
movzbl %dil, %r14d
movb 0x3584(%rip), %al       # 0x70b2
incq %r14
leaq 0x1a68(%rip), %r15      # 0x55a0
movzwl -0x4(%r15,%r14,2), %ecx
testl %ecx, %ebx
je 0x3b50
movsbq %al, %rcx
movb (%r15,%rcx,2), %cl
orb %cl, 0x3614(%rip)       # 0x7164
decb %al
movb %al, 0x355a(%rip)       # 0x70b2
jns 0x3b98
movzbl 0x3603(%rip), %edi      # 0x7164
cmpl $0xff, %edi
jne 0x3b7c
movq 0x35e8(%rip), %rsi      # 0x7158
movl $0xff, %edi
callq 0x10b0
xorl %edi, %edi
movq 0x35d5(%rip), %rsi      # 0x7158
callq 0x10b0
movb $0x7, 0x3523(%rip)      # 0x70b2
movb $0x0, 0x35ce(%rip)      # 0x7164
movb $0x7, %al
decq %r14
cmpq $0x1, %r14
ja 0x3b38
popq %rbx
popq %r14
popq %r15
retq