LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/Enes1313[P]DataStructures/DS/eaDSDynamicArray.c
// Function: eaDSDynamicArrayInsert
int eaDSDynamicArrayInsert(eaDSDynamicArray * dynamicArray, const void * data, size_t index)
{
	size_t j, cnt = dynamicArray->Count;

	if (index <= cnt)
	{
		void * item;

		if (NULL == (item = dynamicArray->dataCreateAndCopy(data)))
		{
			perror(NULL);

			return EXIT_FAILURE;
		}

		if (dynamicArray->Count == dynamicArray->Capacity)
		{
			void ** tmp;

			dynamicArray->Capacity *= dynamicArray->ExpFactor;
			tmp = (void **) realloc(dynamicArray->Data, dynamicArray->Capacity * sizeof(void *));

			if (NULL == tmp)
			{
				perror(NULL);
				dynamicArray->Capacity /= dynamicArray->ExpFactor;

				return EXIT_FAILURE;
			}

			dynamicArray->Data = tmp;
		}

		if (cnt)
		{
			for (j = cnt - 1; j >= index; j--)
			{
				dynamicArray->Data[j + 1] = dynamicArray->Data[j];

				if (!j)
				{
					break;
				}
			}
		}

		dynamicArray->Data[index] = item;
		dynamicArray->Count++;

		return EXIT_SUCCESS;
	}

	return EXIT_FAILURE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x8(%rdi), %r13
movl $0x1, %ebp
cmpq %rdx, %r13
jb 0x18e2
movq %rdx, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq *0x20(%r14)
testq %rax, %rax
je 0x18f3
movq %rax, %r15
movq 0x10(%r14), %rsi
cmpq %rsi, 0x8(%r14)
jne 0x18b6
movzwl 0x18(%r14), %eax
imulq %rax, %rsi
movq %rsi, 0x10(%r14)
movq (%r14), %rdi
shlq $0x3, %rsi
callq 0x10a0
movq %rax, %r12
testq %rax, %rax
je 0x18fc
movq %r12, (%r14)
testq %r12, %r12
je 0x18e2
testq %r13, %r13
je 0x18d5
decq %r13
cmpq %rbx, %r13
jb 0x18d5
movq (%r14), %rax
movq (%rax,%r13,8), %rcx
movq %rcx, 0x8(%rax,%r13,8)
addq $-0x1, %r13
jb 0x18be
movq (%r14), %rax
movq %r15, (%rax,%rbx,8)
incq 0x8(%r14)
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %edi, %edi
callq 0x10b0
jmp 0x18e2
leaq 0x10(%r14), %rsi
leaq 0x18(%r14), %rdi
callq 0x1118
jmp 0x18b1
// File: /workspace/github_c_makefile_star2_O1/Enes1313[P]DataStructures/DS/eaDSDynamicArray.c
// Function: eaDSDynamicArrayRemove
void eaDSDynamicArrayRemove(eaDSDynamicArray * dynamicArray, const void * data)
{
	size_t i, cnt = dynamicArray->Count;

	for (i = 0; i < cnt; i++)
	{
		if (!dynamicArray->dataCompare(data, dynamicArray->Data[i]))
		{
			if ((DEFAULT_STARTING_CAPACITY < dynamicArray->Capacity) && (dynamicArray->Count < dynamicArray->Capacity / dynamicArray->ExpFactor))
			{
				void ** tmp;

				dynamicArray->Capacity /= dynamicArray->ExpFactor;
				tmp = (void **) realloc(dynamicArray->Data, dynamicArray->Capacity * sizeof(void *));

				if (NULL != tmp)
				{
					dynamicArray->Data = tmp;
				}
				else
				{
					dynamicArray->Capacity *= dynamicArray->ExpFactor;
				}
				
			}

			dynamicArray->Count--;
			dynamicArray->dataClear(dynamicArray->Data[i]);

			for (; i < (cnt - 1); i++)
			{
				dynamicArray->Data[i] = dynamicArray->Data[i + 1];
			}

			break;
		}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq 0x8(%rdi), %r15
testq %r15, %r15
je 0x19b9
movq %rsi, %r14
movq %rdi, %rbx
xorl %r12d, %r12d
movq (%rbx), %rax
movq (%rax,%r12,8), %rsi
movq %r14, %rdi
callq *0x28(%rbx)
testl %eax, %eax
je 0x1944
incq %r12
cmpq %r12, %r15
jne 0x1929
jmp 0x19b9
movq 0x10(%rbx), %rax
cmpq $0x5, %rax
jb 0x198a
movq 0x8(%rbx), %rcx
movzwl 0x18(%rbx), %esi
xorl %edx, %edx
divq %rsi
cmpq %rax, %rcx
jae 0x198a
movq %rax, 0x10(%rbx)
movq (%rbx), %rdi
shlq $0x3, %rax
movq %rax, %rsi
callq 0x10a0
testq %rax, %rax
je 0x197d
movq %rax, (%rbx)
jmp 0x198a
movzwl 0x18(%rbx), %eax
imulq 0x10(%rbx), %rax
movq %rax, 0x10(%rbx)
decq 0x8(%rbx)
movq (%rbx), %rax
movq (%rax,%r12,8), %rdi
callq *0x30(%rbx)
decq %r15
cmpq %r15, %r12
jae 0x19b9
movq (%rbx), %rax
movq 0x8(%rax,%r12,8), %rcx
movq %rcx, (%rax,%r12,8)
leaq 0x1(%r12), %rax
movq %rax, %r12
cmpq %r15, %rax
jb 0x19a0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/Enes1313[P]DataStructures/DS/eaDSDynamicArray.c
// Function: eaDSDynamicArrayRemoveAt
void eaDSDynamicArrayRemoveAt(eaDSDynamicArray * dynamicArray, size_t index)
{
	size_t cnt = dynamicArray->Count;

	if (cnt && (index < cnt))
	{
		size_t j = index;

		dynamicArray->dataClear(dynamicArray->Data[index]);

		for (; j < cnt - 1; j++)
		{
			dynamicArray->Data[j] = dynamicArray->Data[j + 1];
		}

		dynamicArray->Count--;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq 0x8(%rdi), %r15
cmpq %rsi, %r15
jbe 0x1abd
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rax
movq (%rax,%rsi,8), %rdi
callq *0x30(%rbx)
leaq -0x1(%r15), %rax
cmpq %r14, %rax
jbe 0x1ab9
incq %r14
movq (%rbx), %rax
movq (%rax,%r14,8), %rcx
movq %rcx, -0x8(%rax,%r14,8)
incq %r14
cmpq %r14, %r15
jne 0x1aa5
decq 0x8(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/Enes1313[P]DataStructures/DS/eaDSDynamicArray.c
// Function: eaDSDynamicArrayRemoveAtCopyLastItem
void eaDSDynamicArrayRemoveAtCopyLastItem(eaDSDynamicArray * dynamicArray, size_t index)
{
	size_t cnt = dynamicArray->Count;

	if (cnt && (index < cnt))
	{
		if ((DEFAULT_STARTING_CAPACITY < dynamicArray->Capacity) && (dynamicArray->Count < dynamicArray->Capacity / dynamicArray->ExpFactor))
		{
			void ** tmp;

			dynamicArray->Capacity /= dynamicArray->ExpFactor;
			tmp = (void **) realloc(dynamicArray->Data, dynamicArray->Capacity * sizeof(void *));

			if (NULL != tmp)
			{
				dynamicArray->Data = tmp;
			}
			else
			{
				dynamicArray->Capacity *= dynamicArray->ExpFactor;
			}
		}
		
		dynamicArray->dataClear(dynamicArray->Data[index]);

		if (cnt - 1)
		{
			dynamicArray->Data[index] = dynamicArray->Data[cnt - 1];
		}

		dynamicArray->Count--;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq 0x8(%rdi), %r15
cmpq %rsi, %r15
jbe 0x1b39
movq %rsi, %r14
movq %rdi, %rbx
movq 0x10(%rdi), %rax
cmpq $0x5, %rax
jb 0x1b19
movzwl 0x18(%rbx), %ecx
xorl %edx, %edx
divq %rcx
cmpq %rax, %r15
jae 0x1b19
movq %rax, 0x10(%rbx)
movq (%rbx), %rdi
shlq $0x3, %rax
movq %rax, %rsi
callq 0x10a0
testq %rax, %rax
je 0x1b0c
movq %rax, (%rbx)
jmp 0x1b19
movzwl 0x18(%rbx), %eax
imulq 0x10(%rbx), %rax
movq %rax, 0x10(%rbx)
movq (%rbx), %rax
movq (%rax,%r14,8), %rdi
callq *0x30(%rbx)
cmpq $0x1, %r15
je 0x1b35
movq (%rbx), %rax
movq -0x8(%rax,%r15,8), %rcx
movq %rcx, (%rax,%r14,8)
decq 0x8(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/Enes1313[P]DataStructures/DS/eaDSLinkedList.c
// Function: eaDSLinkedListInit
eaDSLinkedList eaDSLinkedListInit(void * (*dataCreateAndCopy)(const void *), int (*dataCompare)(const void *, const void *), void (*dataClear)(void *))
{
	eaDSLinkedList linkedList = (eaDSLinkedList) malloc(sizeof(struct _eaDSLinkedList));

	if (NULL == linkedList)
	{
		perror(NULL);
	}
	else
	{
		linkedList->Head = NULL;
		linkedList->Tail = NULL;
		linkedList->dataCreateAndCopy = (NULL == dataCreateAndCopy) ? copyAddress : dataCreateAndCopy;
		linkedList->dataCompare = (NULL == dataCompare) ? compareAddress : dataCompare;
		linkedList->dataClear = (NULL == dataClear) ? free : dataClear;
	}

	return linkedList;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movl $0x28, %edi
callq 0x1090
movq %rax, %rbx
testq %rax, %rax
je 0x1bd4
testq %r12, %r12
leaq 0x48(%rip), %rax        # 0x1bdd
cmovneq %r12, %rax
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq %rax, 0x10(%rbx)
testq %r15, %r15
leaq 0x34(%rip), %rax        # 0x1be1
cmovneq %r15, %rax
movq %rax, 0x18(%rbx)
testq %r14, %r14
jne 0x1bc1
movq 0x440f(%rip), %r14      # 0x5fd0
movq %r14, 0x20(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
xorl %edi, %edi
callq 0x10b0
jmp 0x1bc5
// File: /workspace/github_c_makefile_star2_O1/Enes1313[P]DataStructures/DS/eaDSLinkedList.c
// Function: eaDSLinkedListReset
void eaDSLinkedListReset(eaDSLinkedList linkedList)
{
	while(NULL != linkedList->Head)
	{
		ItemLL * tmp = linkedList->Head;
		linkedList->Head = tmp->Next;
		linkedList->dataClear(tmp->Data);

		free(tmp);
	}

	linkedList->Tail = NULL;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %r14
testq %r14, %r14
je 0x1c13
movq 0x8(%r14), %rax
movq %rax, (%rbx)
movq (%r14), %rdi
callq *0x20(%rbx)
movq %r14, %rdi
callq 0x10e0
movq (%rbx), %r14
jmp 0x1bf4
movq $0x0, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/Enes1313[P]DataStructures/DS/eaDSLinkedList.c
// Function: eaDSLinkedListAdd
int eaDSLinkedListAdd(eaDSLinkedList linkedList, const void * data)
{
	ItemLL * iter = linkedList->Head, * tmp;

	if(NULL == (tmp = (ItemLL *) malloc(sizeof(ItemLL))))
	{
		perror(NULL);

		return EXIT_FAILURE;
	}

	if (NULL == (tmp->Data = linkedList->dataCreateAndCopy(data)))
	{
		free(tmp);
		perror(NULL);

		return EXIT_FAILURE;
	}

	if (NULL == iter)
	{
		linkedList->Head = tmp;
	}
	else
	{
		linkedList->Tail->Next = tmp;
	}

	tmp->Next = NULL;
	linkedList->Tail = tmp;

	return EXIT_SUCCESS;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
movq (%rdi), %r12
movl $0x10, %edi
callq 0x1090
testq %rax, %rax
je 0x1cb1
movq %rax, %r14
movq %r15, %rdi
callq *0x10(%rbx)
movq %rax, (%r14)
testq %rax, %rax
je 0x1ca9
movq %rbx, %rax
testq %r12, %r12
je 0x1c8c
movq 0x8(%rbx), %rax
addq $0x8, %rax
movq %r14, (%rax)
movq $0x0, 0x8(%r14)
movq %r14, 0x8(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %r14, %rdi
callq 0x10e0
xorl %edi, %edi
callq 0x10b0
movl $0x1, %eax
jmp 0x1c9d
// File: /workspace/github_c_makefile_star2_O1/Enes1313[P]DataStructures/DS/eaDSLinkedList.c
// Function: eaDSLinkedListRemove
void eaDSLinkedListRemove(eaDSLinkedList linkedList, const void * data)
{
	ItemLL * iter = linkedList->Head, * p;

	if (NULL == iter)
	{
		return;
	}

	if (iter == linkedList->Tail)
	{
		if (!linkedList->dataCompare(data, iter->Data))
		{
			linkedList->dataClear(iter->Data);
			free(iter);
			linkedList->Head = NULL;
			linkedList->Tail = NULL;
		}

		return;
	}

	while (0 != linkedList->dataCompare(data, iter->Data))
	{
		if (iter->Next == linkedList->Tail)
		{
			if (!linkedList->dataCompare(data, iter->Next->Data))
			{
				linkedList->dataClear(iter->Next->Data);
				free(iter->Next);
				iter->Next = NULL;
				linkedList->Tail = iter;
			}

			return;
		}

		iter = iter->Next;
	}

	linkedList->dataClear(iter->Data);

	if (iter->Next == linkedList->Tail)
	{
		linkedList->Tail = iter;
	}

	p = iter->Next->Next;
	iter->Data = iter->Next->Data;

	free(iter->Next);
	iter->Next = p;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq (%rdi), %r15
testq %r15, %r15
je 0x1d79
movq %rsi, %r14
movq %rdi, %rbx
cmpq 0x8(%rdi), %r15
je 0x1d2b
movq %r15, %r12
movq (%r15), %rsi
movq %r14, %rdi
callq *0x18(%rbx)
testl %eax, %eax
je 0x1d4e
movq 0x8(%r12), %r15
cmpq 0x8(%rbx), %r15
jne 0x1cdf
movq (%r15), %rsi
movq %r14, %rdi
callq *0x18(%rbx)
testl %eax, %eax
jne 0x1d79
movq 0x8(%r12), %rax
movq (%rax), %rdi
callq *0x20(%rbx)
movq 0x8(%r12), %rdi
callq 0x10e0
movq $0x0, 0x8(%r12)
movq %r12, 0x8(%rbx)
jmp 0x1d79
movq (%r15), %rsi
movq %r14, %rdi
callq *0x18(%rbx)
testl %eax, %eax
jne 0x1d79
movq (%r15), %rdi
callq *0x20(%rbx)
movq %r15, %rdi
callq 0x10e0
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
jmp 0x1d79
movq (%r12), %rdi
callq *0x20(%rbx)
movq 0x8(%r12), %rdi
cmpq 0x8(%rbx), %rdi
jne 0x1d64
movq %r12, 0x8(%rbx)
movq (%rdi), %rax
movq 0x8(%rdi), %rbx
movq %rax, (%r12)
callq 0x10e0
movq %rbx, 0x8(%r12)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/Enes1313[P]DataStructures/DS/eaDSLinkedList.c
// Function: eaDSLinkedListInsert
int eaDSLinkedListInsert(eaDSLinkedList linkedList, const void * data, size_t index)
{
	size_t i;
	void * p;
	ItemLL * iter = linkedList->Head, * tmp = (ItemLL *) malloc(sizeof(ItemLL));

	if(NULL == tmp)
	{
		perror(NULL);

		return EXIT_FAILURE;
	}

	if (NULL == (p = linkedList->dataCreateAndCopy(data)))
	{
		free(tmp);
		perror(NULL);

		return EXIT_FAILURE;
	}

	for (i = 0; i < index; i++)
	{
		if (NULL == iter)
		{
			return EXIT_FAILURE;
		}
		iter = iter->Next;
	}

	if (0 == index || NULL == iter)
	{
		tmp->Next = iter;
		iter = tmp;

		if (0 == index)
		{
			linkedList->Head = tmp;
		}
	}
	else
	{
		tmp->Data = iter->Data;
		tmp->Next = iter->Next;
		iter->Next = tmp;
	}

	iter->Data = p;

	if (NULL == iter->Next)
	{
		linkedList->Tail = iter;
	}

	return EXIT_SUCCESS;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq (%rdi), %r13
movl $0x10, %edi
callq 0x1090
testq %rax, %rax
je 0x1e91
movq %rax, %r14
movq %r12, %rdi
callq *0x10(%rbx)
testq %rax, %rax
je 0x1e89
testq %r15, %r15
je 0x1e3a
movq %r15, %rcx
testq %r13, %r13
je 0x1e98
movq 0x8(%r13), %r13
decq %rcx
jne 0x1e2c
testq %r15, %r15
sete %cl
testq %r13, %r13
sete %dl
orb %cl, %dl
cmpb $0x1, %dl
jne 0x1e5e
movq %r13, 0x8(%r14)
movq %rbx, %rcx
movq %r14, %r13
testq %r15, %r15
jne 0x1e77
jmp 0x1e71
movq (%r13), %rcx
movq %rcx, (%r14)
leaq 0x8(%r13), %rcx
movq 0x8(%r13), %rdx
movq %rdx, 0x8(%r14)
movq %r14, (%rcx)
movq %r13, %r14
movq %rax, (%r14)
xorl %eax, %eax
cmpq $0x0, 0x8(%r14)
jne 0x1e9d
movq %r14, 0x8(%rbx)
jmp 0x1e9d
movq %r14, %rdi
callq 0x10e0
xorl %edi, %edi
callq 0x10b0
movl $0x1, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/Enes1313[P]DataStructures/DS/eaDSLinkedList.c
// Function: eaDSLinkedListGetFrom
void * eaDSLinkedListGetFrom(const eaDSLinkedList linkedList, size_t index)
{
	size_t i = 0;
	void * data = NULL;
	ItemLL * iter = linkedList->Head;

	while (NULL != iter)
	{
		if (index == i++)
		{
			if (NULL == (data = linkedList->dataCreateAndCopy(iter->Data)))
			{
				perror(NULL);
			}

			break;
		}

		iter = iter->Next;
	}

	return data;
}

// Assembly:
pushq %rbx
movq (%rdi), %rcx
testq %rcx, %rcx
je 0x1ec8
movq %rdi, %rax
incq %rsi
xorl %ebx, %ebx
decq %rsi
je 0x1ecc
movq 0x8(%rcx), %rcx
testq %rcx, %rcx
jne 0x1eb8
jmp 0x1eda
xorl %ebx, %ebx
jmp 0x1eda
movq (%rcx), %rdi
callq *0x10(%rax)
movq %rax, %rbx
testq %rax, %rax
je 0x1edf
movq %rbx, %rax
popq %rbx
retq
xorl %ebx, %ebx
xorl %edi, %edi
callq 0x10b0
jmp 0x1eda
// File: /workspace/github_c_makefile_star2_O1/Enes1313[P]DataStructures/DS/eaDSLinkedList.c
// Function: eaDSLinkedListGetAddressFrom
void * eaDSLinkedListGetAddressFrom(const eaDSLinkedList linkedList, size_t index)
{
	size_t i = 0;
	ItemLL * iter = linkedList->Head;

	while (NULL != iter)
	{
		if (index == i++)
		{
			return iter->Data;
		}

		iter = iter->Next;
	}

	return NULL;
}

// Assembly:
movq (%rdi), %rcx
testq %rcx, %rcx
je 0x1f06
incq %rsi
xorl %eax, %eax
decq %rsi
je 0x1f09
movq 0x8(%rcx), %rcx
testq %rcx, %rcx
jne 0x1ef7
retq
xorl %eax, %eax
retq
movq (%rcx), %rax
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/Enes1313[P]DataStructures/DS/eaDSQueue.c
// Function: eaDSQueueInit
eaDSQueue eaDSQueueInit(void * (*dataCreateAndCopy)(const void *), void (*dataClear)(void *))
{
	eaDSQueue queue = (eaDSQueue) malloc(sizeof(struct _eaDSQueue));

	if (NULL == queue)
	{
		perror(NULL);
	}
	else
	{
		queue->Front = NULL;
		queue->Rear = NULL;
		queue->dataCreateAndCopy = (NULL == dataCreateAndCopy) ? copyAddress : dataCreateAndCopy;
		queue->dataClear = (NULL == dataClear) ? free : dataClear;
	}

	return queue;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
movl $0x20, %edi
callq 0x1090
movq %rax, %rbx
testq %rax, %rax
je 0x1f5e
testq %r15, %r15
leaq 0x30(%rip), %rax        # 0x1f67
cmovneq %r15, %rax
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq %rax, 0x10(%rbx)
testq %r14, %r14
jne 0x1f51
movq 0x407f(%rip), %r14      # 0x5fd0
movq %r14, 0x18(%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
xorl %edi, %edi
callq 0x10b0
jmp 0x1f55
// File: /workspace/github_c_makefile_star2_O1/Enes1313[P]DataStructures/DS/eaDSQueue.c
// Function: eaDSQueueReset
void eaDSQueueReset(eaDSQueue queue)
{
	while (NULL != queue->Front)
	{
		ItemQue * tmp = queue->Front;
		queue->Front = tmp->Next;
		queue->dataClear(tmp->Data);

		free(tmp);
	}

	queue->Rear = NULL;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %r14
testq %r14, %r14
je 0x1f94
movq 0x8(%r14), %rax
movq %rax, (%rbx)
movq (%r14), %rdi
callq *0x18(%rbx)
movq %r14, %rdi
callq 0x10e0
movq (%rbx), %r14
jmp 0x1f75
movq $0x0, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/Enes1313[P]DataStructures/DS/eaDSQueue.c
// Function: eaDSQueueDequeue
void * eaDSQueueDequeue(eaDSQueue queue)
{
	void * p, * data;

	if (NULL == queue->Front)
	{
		return NULL;
	}

	data = queue->dataCreateAndCopy(queue->Front->Data);

	if (NULL == data)
	{
		perror(NULL);
	}

	queue->dataClear(queue->Front->Data);

	p = queue->Front;
	queue->Front = queue->Front->Next;
	free(p);

	if (NULL == queue->Front)
	{
		queue->Rear = NULL;
	}

	return data;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq (%rdi), %rax
testq %rax, %rax
je 0x2007
movq %rdi, %r14
movq (%rax), %rdi
callq *0x10(%r14)
movq %rax, %rbx
testq %rax, %rax
je 0x2014
movq (%r14), %rax
movq (%rax), %rdi
callq *0x18(%r14)
movq (%r14), %rdi
movq 0x8(%rdi), %rax
movq %rax, (%r14)
callq 0x10e0
cmpq $0x0, (%r14)
jne 0x2009
movq $0x0, 0x8(%r14)
jmp 0x2009
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
xorl %edi, %edi
callq 0x10b0
jmp 0x1fde
// File: /workspace/github_c_makefile_star2_O1/Enes1313[P]DataStructures/DS/eaDSQueue.c
// Function: eaDSQueueEnqueue
int eaDSQueueEnqueue(eaDSQueue queue, const void * data)
{
	ItemQue * tmp = (ItemQue *) malloc(sizeof(ItemQue));

	if (NULL == tmp)
	{
		perror(NULL);
		return EXIT_FAILURE;
	}

	tmp->Next = NULL;
	tmp->Data = queue->dataCreateAndCopy(data);

	if (NULL == tmp->Data)
	{
		free(tmp);
		perror(NULL);

		return EXIT_FAILURE;
	}

	if (NULL == queue->Front)
	{
		queue->Front = tmp;
	}
	else
	{
		queue->Rear->Next = tmp;
	}

	queue->Rear = tmp;
	
	return EXIT_SUCCESS;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
movl $0x10, %edi
callq 0x1090
testq %rax, %rax
je 0x2078
movq %rax, %r14
movq $0x0, 0x8(%rax)
movq %r15, %rdi
callq *0x10(%rbx)
movq %rax, (%r14)
testq %rax, %rax
je 0x2070
cmpq $0x0, (%rbx)
movq %rbx, %rax
je 0x2061
movq 0x8(%rbx), %rax
addq $0x8, %rax
movq %r14, (%rax)
movq %r14, 0x8(%rbx)
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
movq %r14, %rdi
callq 0x10e0
xorl %edi, %edi
callq 0x10b0
movl $0x1, %eax
jmp 0x206a
// File: /workspace/github_c_makefile_star2_O1/Enes1313[P]DataStructures/DS/eaDSQueue.c
// Function: eaDSQueuePeekValue
void * eaDSQueuePeekValue(const eaDSQueue queue)
{
	void * data = NULL;

	if (NULL == queue->Front)
	{
		return NULL;
	}

	data = queue->dataCreateAndCopy(queue->Front->Data);

	if (NULL == data)
	{
		perror(NULL);
	}

	return data;
}

// Assembly:
pushq %rbx
movq (%rdi), %rcx
testq %rcx, %rcx
je 0x20a9
movq %rdi, %rax
movq (%rcx), %rdi
callq *0x10(%rax)
movq %rax, %rbx
testq %rax, %rax
jne 0x20ab
xorl %edi, %edi
callq 0x10b0
jmp 0x20ab
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/Enes1313[P]DataStructures/DS/eaDSStack.c
// Function: eaDSStackInitWithDetails
eaDSStack eaDSStackInitWithDetails(void * (*dataCreateAndCopy)(const void *), void (*dataClear)(void *), unsigned short expFactor, unsigned short startingCapacity)
{
	eaDSStack stack = (eaDSStack) malloc(sizeof(struct _eaDSStack));

	if (NULL == stack)
	{
		perror(NULL);
	}
	else
	{
		stack->StartingCapacity = startingCapacity ? startingCapacity : DEFAULT_STARTING_CAPACITY;
		stack->Data = (void **)malloc(stack->StartingCapacity * sizeof(void *));

		if (NULL == stack->Data)
		{
			perror(NULL);
			free(stack);
			stack = NULL;
		}
		else
		{
			stack->Count = 0;
			stack->Capacity = stack->StartingCapacity;
			stack->ExpFactor = (expFactor < 2) ? DEFAULT_EXP_FACTOR : expFactor;
			stack->dataCreateAndCopy = (NULL == dataCreateAndCopy) ? copyAddress : dataCreateAndCopy;
			stack->dataClear = (NULL == dataClear) ? free : dataClear;
		}
	}

	return stack;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %r12d
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r15
movl $0x38, %edi
callq 0x1090
testq %rax, %rax
je 0x2168
movq %rax, %rbx
testw %r12w, %r12w
movl $0x4, %eax
cmovnel %r12d, %eax
movw %ax, 0x1a(%rbx)
movzwl %ax, %r12d
leal (,%r12,8), %edi
callq 0x1090
movq %rax, (%rbx)
testq %rax, %rax
je 0x2173
cmpw $0x3, %bp
movl $0x2, %eax
cmovael %ebp, %eax
movq $0x0, 0x8(%rbx)
movq %r12, 0x10(%rbx)
movw %ax, 0x18(%rbx)
testq %r15, %r15
leaq 0x42(%rip), %rax        # 0x2186
cmovneq %r15, %rax
movq %rax, 0x20(%rbx)
testq %r14, %r14
jne 0x2158
movq 0x3e78(%rip), %r14      # 0x5fd0
movq %r14, 0x30(%rbx)
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
xorl %ebx, %ebx
xorl %edi, %edi
callq 0x10b0
jmp 0x215c
xorl %edi, %edi
callq 0x10b0
movq %rbx, %rdi
callq 0x10e0
xorl %ebx, %ebx
jmp 0x215c
// File: /workspace/github_c_makefile_star2_O1/Enes1313[P]DataStructures/DS/eaDSStack.c
// Function: eaDSStackReset
int eaDSStackReset(eaDSStack stack)
{
	if (NULL == stack->Data)
	{
		stack->Data = (void **) malloc(stack->Capacity * sizeof(void *));

		if (NULL == stack->Data)
		{
			perror(NULL);

			return EXIT_FAILURE;
		}
	}
	else
	{
		while (stack->Count)
		{
			stack->dataClear(stack->Data[--stack->Count]);
		}

		if (stack->StartingCapacity < stack->Capacity)
		{
			free(stack->Data);
			stack->Data = (void **) malloc(stack->Capacity * sizeof(void *));

			if (NULL == stack->Data)
			{
				perror(NULL);

				return EXIT_FAILURE;
			}

			stack->Capacity = stack->StartingCapacity;
		}
	}

	return EXIT_SUCCESS;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x0, (%rdi)
je 0x21e7
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x21b4
movq (%rbx), %rcx
leaq -0x1(%rax), %rdx
movq %rdx, 0x8(%rbx)
movq -0x8(%rcx,%rax,8), %rdi
callq *0x30(%rbx)
jmp 0x2196
movzwl 0x1a(%rbx), %eax
xorl %ebp, %ebp
cmpq %rax, 0x10(%rbx)
jbe 0x21fe
movq (%rbx), %rdi
callq 0x10e0
movq 0x10(%rbx), %rdi
shlq $0x3, %rdi
callq 0x1090
movq %rax, (%rbx)
testq %rax, %rax
je 0x2207
movzwl 0x1a(%rbx), %eax
movq %rax, 0x10(%rbx)
jmp 0x21fe
movq 0x10(%rbx), %rdi
shlq $0x3, %rdi
callq 0x1090
movq %rax, (%rbx)
xorl %ebp, %ebp
testq %rax, %rax
je 0x2207
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
xorl %edi, %edi
callq 0x10b0
movl $0x1, %ebp
jmp 0x21fe
// File: /workspace/github_c_makefile_star2_O1/Enes1313[P]DataStructures/DS/eaDSStack.c
// Function: eaDSStackClear
void eaDSStackClear(eaDSStack stack)
{
	if (NULL != stack->Data)
	{
		while(stack->Count)
		{
			stack->dataClear(stack->Data[--stack->Count]);
		}

		free(stack->Data);
	}

	free(stack);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpq $0x0, (%rdi)
je 0x2245
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x223d
movq (%rbx), %rcx
leaq -0x1(%rax), %rdx
movq %rdx, 0x8(%rbx)
movq -0x8(%rcx,%rax,8), %rdi
callq *0x30(%rbx)
jmp 0x221f
movq (%rbx), %rdi
callq 0x10e0
movq %rbx, %rdi
popq %rbx
jmp 0x10e0
// File: /workspace/github_c_makefile_star2_O1/Enes1313[P]DataStructures/DS/eaDSStack.c
// Function: eaDSStackPop
void * eaDSStackPop(eaDSStack stack)
{
	void * data = NULL;

	if (stack->Count)
	{
		if ((DEFAULT_STARTING_CAPACITY < stack->Capacity) && (stack->Count < stack->Capacity / stack->ExpFactor))
		{
			void ** tmp;

			stack->Capacity /= stack->ExpFactor;
			tmp = (void **) realloc(stack->Data, stack->Capacity * sizeof(void *));

			if (NULL != tmp)
			{
				stack->Data = tmp;
			}
			else 
			{
				stack->Capacity *= stack->ExpFactor;
			}
		}

		data = stack->dataCreateAndCopy(stack->Data[stack->Count - 1]);

		if (NULL != data)
		{
			stack->dataClear(stack->Data[--stack->Count]);
		}
		else
		{
			perror(NULL);
		}
	}

	return data;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x8(%rdi), %rcx
testq %rcx, %rcx
je 0x229d
movq %rdi, %rbx
movq 0x10(%rdi), %rax
cmpq $0x5, %rax
jb 0x22af
movzwl 0x18(%rbx), %esi
xorl %edx, %edx
divq %rsi
cmpq %rax, %rcx
jae 0x22af
movq %rax, 0x10(%rbx)
movq (%rbx), %rdi
shlq $0x3, %rax
movq %rax, %rsi
callq 0x10a0
testq %rax, %rax
je 0x22a2
movq %rax, (%rbx)
jmp 0x22af
xorl %r14d, %r14d
jmp 0x22dd
movzwl 0x18(%rbx), %eax
imulq 0x10(%rbx), %rax
movq %rax, 0x10(%rbx)
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
movq -0x8(%rax,%rcx,8), %rdi
callq *0x20(%rbx)
testq %rax, %rax
je 0x22e8
movq %rax, %r14
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
leaq -0x1(%rcx), %rdx
movq %rdx, 0x8(%rbx)
movq -0x8(%rax,%rcx,8), %rdi
callq *0x30(%rbx)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
xorl %r14d, %r14d
xorl %edi, %edi
callq 0x10b0
jmp 0x22dd
// File: /workspace/github_c_makefile_star2_O1/Enes1313[P]DataStructures/DS/eaDSStack.c
// Function: eaDSStackPush
int eaDSStackPush(eaDSStack stack, const void * data)
{
	void * item = stack->dataCreateAndCopy(data);

	if (NULL == item)
	{
		perror(NULL);

		return EXIT_FAILURE;
	}

	if (stack->Count == stack->Capacity)
	{
		void ** tmp;

		stack->Capacity *= stack->ExpFactor;
		tmp = (void **) realloc(stack->Data, stack->Capacity * sizeof(void *));

		if (NULL == tmp)
		{
			perror(NULL);
			stack->Capacity /= stack->ExpFactor;

			return EXIT_FAILURE;
		}

		stack->Data = tmp;
	}

	stack->Data[stack->Count] = item;
	stack->Count++;

	return EXIT_SUCCESS;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq %rsi, %rdi
callq *0x20(%rbx)
testq %rax, %rax
je 0x2352
movq %rax, %r14
movq 0x10(%rbx), %rsi
cmpq %rsi, 0x8(%rbx)
jne 0x233c
movzwl 0x18(%rbx), %eax
imulq %rax, %rsi
movq %rsi, 0x10(%rbx)
movq (%rbx), %rdi
shlq $0x3, %rsi
callq 0x10a0
movq %rax, %r15
testq %rax, %rax
je 0x2364
movq %r15, (%rbx)
testq %r15, %r15
je 0x2359
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
movq %r14, (%rax,%rcx,8)
incq %rcx
movq %rcx, 0x8(%rbx)
xorl %eax, %eax
jmp 0x235e
xorl %edi, %edi
callq 0x10b0
movl $0x1, %eax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x10(%rbx), %rsi
leaq 0x18(%rbx), %rdi
callq 0x1140
jmp 0x2337
// File: /workspace/github_c_makefile_star2_O1/Enes1313[P]DataStructures/DS/eaDSStack.c
// Function: eaDSStackPeekStack
void * eaDSStackPeekStack(const eaDSStack stack)
{
	void * data = NULL;

	if (stack->Count)
	{
		data = stack->dataCreateAndCopy(stack->Data[stack->Count - 1]);

		if (NULL == data)
		{
			perror(NULL);
		}
	}

	return data;
}

// Assembly:
pushq %rbx
movq 0x8(%rdi), %rcx
testq %rcx, %rcx
je 0x239e
movq %rdi, %rax
movq (%rdi), %rdx
movq -0x8(%rdx,%rcx,8), %rdi
callq *0x20(%rax)
movq %rax, %rbx
testq %rax, %rax
jne 0x23a0
xorl %ebx, %ebx
xorl %edi, %edi
callq 0x10b0
jmp 0x23a0
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/CSerxzm[P]WindowstoLinuxInterface/src/RD.c
// Function: remove_dir
int remove_dir(const char *dir){
    DIR* dirp;
    struct dirent *dp;
    struct stat dir_stat;
    char dir_name[255];

    if(access(dir,F_OK)!=0){
        return 0;
    } 
    if(stat(dir, &dir_stat)<0){
        perror("dir stat errpr!\n");
        return -1;
    }
    if(S_ISREG(dir_stat.st_mode)){
        remove(dir);
    }
    else if(S_ISDIR(dir_stat.st_mode)){
        dirp=opendir(dir);
        while((dp=readdir(dirp))!=NULL){
            if((0==strcmp(".", dp->d_name))||(0==strcmp("..",dp->d_name))) 
                continue;
            
            sprintf(dir_name, "%s/%s", dir, dp->d_name);
            remove_dir(dir_name);
        }
        closedir(dirp);
        rmdir(dir);
    }
    else{
        perror("error!\n");
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x198, %rsp            # imm = 0x198
movq %rdi, %r14
xorl %ebx, %ebx
xorl %esi, %esi
callq 0x10b0
testl %eax, %eax
jne 0x13f2
leaq -0xb8(%rbp), %rsi
movq %r14, %rdi
callq 0x1090
testl %eax, %eax
js 0x1406
movl $0xf000, %eax           # imm = 0xF000
andl -0xa0(%rbp), %eax
cmpl $0x4000, %eax           # imm = 0x4000
je 0x1362
cmpl $0x8000, %eax           # imm = 0x8000
jne 0x1419
movq %r14, %rdi
callq 0x1030
jmp 0x13f2
movq %r14, %rdi
callq 0x1040
movq %rax, %r15
movq %rax, %rdi
callq 0x10a0
testq %rax, %rax
je 0x13e0
movq %rax, %r13
leaq 0xc92(%rip), %r12       # 0x2016
leaq -0x1c0(%rbp), %rbx
addq $0x13, %r13
movq %r12, %rdi
movq %r13, %rsi
callq 0x1080
testl %eax, %eax
je 0x13d0
leaq 0xc70(%rip), %rdi       # 0x2015
movq %r13, %rsi
callq 0x1080
testl %eax, %eax
je 0x13d0
movq %rbx, %rdi
leaq 0xc5d(%rip), %rsi       # 0x2018
movq %r14, %rdx
movq %r13, %rcx
xorl %eax, %eax
callq 0x10d0
movq %rbx, %rdi
callq 0x12f9
movq %r15, %rdi
callq 0x10a0
movq %rax, %r13
testq %rax, %rax
jne 0x138b
movq %r15, %rdi
callq 0x1070
movq %r14, %rdi
callq 0x1050
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xbf7(%rip), %rdi       # 0x2004
callq 0x10c0
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x13f2
leaq 0xbfe(%rip), %rdi       # 0x201e
callq 0x10c0
jmp 0x13f2
// File: /workspace/github_c_makefile_star2_O1/CSerxzm[P]WindowstoLinuxInterface/src/RD.c
// Function: main
int main(int argc, char** argv){
    char lines[argc+1][255];
    predealLine(argc, argv, lines);
    if((strcmp("rd",lines[0])==0)||(strcmp("rmdir",lines[0])==0)){
        for(int i=1;i<argc;i++){
            remove_dir(lines[i]);
        }
    }
    else{
        perror("error after lines\n");
    }

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edi, %r14d
leal 0x1(%r14), %eax
movq %rax, %rcx
shlq $0x8, %rcx
subq %rax, %rcx
addq $0xf, %rcx
movabsq $0x1fffffffff0, %rax    # imm = 0x1FFFFFFFFF0
andq %rcx, %rax
movq %rsp, %rbx
subq %rax, %rbx
movq %rbx, %rsp
movq %rbx, %rdx
callq 0x11fc
leaq 0xbbe(%rip), %rdi       # 0x2026
movq %rbx, %rsi
callq 0x1080
testl %eax, %eax
je 0x1487
leaq 0xbae(%rip), %rdi       # 0x2029
movq %rbx, %rsi
callq 0x1080
testl %eax, %eax
jne 0x14b9
cmpl $0x2, %r14d
jl 0x14ae
movl %r14d, %r14d
addq $0xff, %rbx
decq %r14
movq %rbx, %rdi
callq 0x12f9
addq $0xff, %rbx
decq %r14
jne 0x149a
xorl %eax, %eax
leaq -0x10(%rbp), %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0xb6f(%rip), %rdi       # 0x202f
callq 0x10c0
jmp 0x14ae
// File: /workspace/github_c_makefile_star2_O1/Joy-Division[P]tools-mgs/dar-extract_psx.c
// Function: matchhash
unsigned int matchhash( uint32_t hash, uint32_t extension, dicentry *dictionary, int numentries ) {
	int i;
	for( i = 0; i < numentries; i++ ) {
		if((dictionary[i].hash == hash) && (dictionary[i].extension == extension)) return i;
	}
	return 0xFFFFFFFF;
}

// Assembly:
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %ecx, %ecx
jle 0x16f5
movl %ecx, %ecx
addq $0x4, %rdx
xorl %r8d, %r8d
cmpl %edi, -0x4(%rdx)
jne 0x16e6
cmpl %esi, (%rdx)
je 0x16f6
incq %r8
addq $0x108, %rdx            # imm = 0x108
cmpq %r8, %rcx
jne 0x16dd
retq
movl %r8d, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/Joy-Division[P]tools-mgs/dar-extract_psx.c
// Function: getNameFromDetails
char *getNameFromDetails(uint16_t hash, uint16_t extension) {
	char *retstring = malloc(32);
	unsigned int result;
	result = matchhash(hash, extension, commondic, numcommondic);
	if(result != 0xFFFFFFFF) sprintf(retstring, "%s", commondic[result].name);
	else {
		sprintf( retstring, "%04x.%c", hash, extension );
	}
	return retstring;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movl %edi, %r14d
movl $0x20, %edi
callq 0x1100
movq %rax, %rbx
movq 0x29c1(%rip), %rax      # 0x40d8
movslq 0x29ca(%rip), %rdx      # 0x40e8
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
testq %rdx, %rdx
jle 0x174b
leaq 0x4(%rax), %rdi
xorl %esi, %esi
cmpl %r14d, -0x4(%rdi)
jne 0x1738
cmpl %ebp, (%rdi)
je 0x1749
incq %rsi
addq $0x108, %rdi            # imm = 0x108
cmpq %rsi, %rdx
jne 0x172e
jmp 0x174b
movl %esi, %ecx
cmpl $-0x1, %ecx
je 0x1771
movl %ecx, %ecx
movq %rcx, %rdx
shlq $0x8, %rdx
leaq (%rdx,%rcx,8), %rcx
leaq (%rax,%rcx), %rsi
addq $0x8, %rsi
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x1050
leaq 0x999(%rip), %rsi       # 0x2111
movq %rbx, %rdi
movl %r14d, %edx
movl %ebp, %ecx
xorl %eax, %eax
callq 0x1160
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/kilobyte[P]colormatch/riemersma-256.c
// Function: main
int main()
{
    for (int c = 0; c < 16777216; ++c)
    {
        nt[c] = closest(c);
        if (!(c&0xff))
            printf("%06X\n", c);
    }

    int fd = creat("riemersma.rgb", 0666);
    write(fd, nt, sizeof(nt));
    close(fd);

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl $0xff, %r15d
xorl %r14d, %r14d
movl %r14d, %r13d
shrl $0x10, %r13d
movl %r14d, %ebx
shrl $0x8, %ebx
andl %r15d, %ebx
movq %r14, 0x10(%rsp)
movl %r14d, %eax
andl %r15d, %eax
movl %eax, 0xc(%rsp)
movl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
xorl %r14d, %r14d
xorl %ebp, %ebp
movl %ebp, %edi
callq 0x12a0
movl %eax, %ecx
sarl $0x10, %ecx
movl %eax, %esi
shrl $0x8, %esi
leal (%rcx,%r13), %edi
movl %edi, %edx
shrl $0x1f, %edx
addl %edi, %edx
sarl %edx
andl %r15d, %ecx
subl %r13d, %ecx
imull %ecx, %ecx
andl %r15d, %esi
subl %ebx, %esi
imull %esi, %esi
andl %r15d, %eax
subl 0xc(%rsp), %eax
imull %eax, %eax
leal (%rax,%rax,2), %edi
leal (%rdi,%rsi,4), %esi
leal (%rsi,%rcx,2), %esi
subl %eax, %ecx
imull %edx, %ecx
leal (%rcx,%r15), %eax
testl %ecx, %ecx
cmovnsl %ecx, %eax
sarl $0x8, %eax
addl %eax, %esi
cmpl %r12d, %esi
cmovll %esi, %r12d
cmovll %ebp, %r14d
incl %ebp
cmpl $0x100, %ebp            # imm = 0x100
jne 0x11bd
leaq 0x2e32(%rip), %rax      # 0x4060
movq 0x10(%rsp), %rcx
movb %r14b, (%rcx,%rax)
movq %rcx, %r14
cmpl $0x0, 0xc(%rsp)
jne 0x1252
leaq 0xdbc(%rip), %rdi       # 0x2004
movl %r14d, %esi
xorl %eax, %eax
callq 0x1050
incq %r14
cmpq $0x1000000, %r14        # imm = 0x1000000
jne 0x1193
leaq 0xda1(%rip), %rdi       # 0x200a
movl $0x1b6, %esi            # imm = 0x1B6
callq 0x1070
movl %eax, %ebx
leaq 0x2de4(%rip), %rsi      # 0x4060
movl $0x1000000, %edx        # imm = 0x1000000
movl %eax, %edi
callq 0x1040
movl %ebx, %edi
callq 0x1060
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/kobolt[P]curses-collection/storage/storage.c
// Function: box_draw
static void box_draw(int pattern, int start_y, int start_x,
  int size_y, int size_x)
{
  int y, x;
  for (y = 0; y < size_y; y++) {
    for (x = 0; x < size_x; x++) {
      if ((pattern % 14) > 6) {
        wattrset(stdscr, A_BOLD | COLOR_PAIR((pattern % 7) + 1));
      } else {
        wattrset(stdscr, COLOR_PAIR((pattern % 7) + 1));
      }
      mvaddch(start_y + y, start_x + x, pattern + 0x41);
    }
  }
  refresh();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r8d, 0xc(%rsp)
movl %edx, 0x18(%rsp)
movq %rsi, 0x20(%rsp)
movl %ecx, 0x1c(%rsp)
testl %ecx, %ecx
jle 0x1746
movslq %edi, %r12
imulq $-0x6db6db6d, %r12, %rax # imm = 0x92492493
shrq $0x20, %rax
addl %r12d, %eax
movl %eax, %ecx
sarl $0x3, %ecx
movl %eax, %edx
shrl $0x1f, %edx
addl %edx, %ecx
movl %ecx, %esi
shll $0x4, %esi
addl %ecx, %ecx
subl %esi, %ecx
addl %r12d, %ecx
sarl $0x2, %eax
addl %edx, %eax
leal (,%rax,8), %edx
subl %edx, %eax
addl %r12d, %eax
shll $0x8, %eax
addl $0x100, %eax            # imm = 0x100
movzwl %ax, %eax
leal 0x200000(%rax), %r13d
addl $0x41, %r12d
cmpl $0x7, %ecx
cmovll %eax, %r13d
movq $0x0, 0x10(%rsp)
movq 0x28f2(%rip), %rbx      # 0x3fd8
cmpl $0x0, 0xc(%rsp)
jle 0x1734
movq 0x20(%rsp), %rax
movq 0x10(%rsp), %rcx
leal (%rcx,%rax), %r14d
movl 0x18(%rsp), %r15d
movl 0xc(%rsp), %ebp
movq (%rbx), %rdi
movl %r13d, %esi
callq 0x1040
movq (%rbx), %rdi
movl %r14d, %esi
movl %r15d, %edx
callq 0x1100
cmpl $-0x1, %eax
je 0x172d
movq (%rbx), %rdi
movl %r12d, %esi
callq 0x1120
incl %r15d
decl %ebp
jne 0x1704
movq 0x10(%rsp), %rax
incl %eax
movq %rax, 0x10(%rsp)
cmpl 0x1c(%rsp), %eax
jne 0x16e6
movq 0x288b(%rip), %rax      # 0x3fd8
movq (%rax), %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x10a0
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/aap[P]pdp11/util.c
// Function: serve
void
serve(int port, void (*handlecon)(int, void*), void *arg)
{
	int sockfd, confd;
	socklen_t len;
	struct sockaddr_in server, client;
	int x;

	sockfd = socket(AF_INET, SOCK_STREAM, 0);
	if(sockfd < 0){
		perror("error: socket");
		return;
	}

	x = 1;
	setsockopt (sockfd, SOL_SOCKET, SO_REUSEADDR, (void *)&x, sizeof x);

	memset(&server, 0, sizeof(server));
	server.sin_family = AF_INET;
	server.sin_addr.s_addr = INADDR_ANY;
	server.sin_port = htons(port);
	if(bind(sockfd, (struct sockaddr*)&server, sizeof(server)) < 0){
		perror("error: bind");
		return;
	}
	listen(sockfd, 5);
	len = sizeof(client);
	while(confd = accept(sockfd, (struct sockaddr*)&client, &len),
	      confd >= 0)
		handlecon(confd, arg);
	perror("error: accept");
	return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movl %edi, %r15d
pushq $0x2
popq %rdi
pushq $0x1
popq %rsi
xorl %edx, %edx
callq 0x2240
testl %eax, %eax
jns 0x22bb
leaq 0x54f1(%rip), %r15      # 0x77a7
jmp 0x235d
movl %eax, %ebp
leaq 0xc(%rsp), %rcx
movl $0x1, (%rcx)
pushq $0x1
popq %rsi
pushq $0x2
popq %rdx
pushq $0x4
popq %r8
movl %eax, %edi
callq 0x2060
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %rsi
movaps %xmm0, (%rsi)
movw $0x2, (%rsi)
andl $0x0, 0x4(%rsi)
rolw $0x8, %r15w
movw %r15w, 0x2(%rsi)
pushq $0x10
popq %rdx
movl %ebp, %edi
callq 0x2180
testl %eax, %eax
jns 0x230e
leaq 0x54a9(%rip), %r15      # 0x77b5
jmp 0x235d
pushq $0x5
popq %rsi
movl %ebp, %edi
callq 0x2160
leaq 0x8(%rsp), %rdx
movl $0x10, (%rdx)
leaq 0x10(%rsp), %rsi
movl %ebp, %edi
callq 0x21d0
leaq 0x548b(%rip), %r15      # 0x77c1
testl %eax, %eax
js 0x235d
leaq 0x10(%rsp), %r12
leaq 0x8(%rsp), %r13
movl %eax, %edi
movq %rbx, %rsi
callq *%r14
movl %ebp, %edi
movq %r12, %rsi
movq %r13, %rdx
callq 0x21d0
testl %eax, %eax
jns 0x2344
movq %r15, %rdi
callq 0x21c0
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/aap[P]pdp11/1120.c
// Function: loadmem
void
loadmem(char *filename)
{
	FILE *f;
	char line[100], *s;
	word w;

	w = 0;
	f = fopen(filename, "r");
	if(f == nil)
		return;
	while(s = fgets(line, 100, f), s != nil){
		while(isspace(*s)) s++;
		if(*s == ':')
			w = strtol(s+1, nil, 8)>>1;
		if(*s >= '0' && *s <= '7')
			memory[w++] = strtol(s, nil, 8);
	}
	fclose(f);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
leaq 0x5247(%rip), %rsi      # 0x77a5
callq 0x21b0
testq %rax, %rax
je 0x2619
movq %rax, %rbx
movq %rsp, %rdi
movl $0x64, %esi
movq %rax, %rdx
callq 0x2110
testq %rax, %rax
je 0x2611
movq %rax, %r13
xorl %r12d, %r12d
callq 0x2220
movq %rax, %r14
leaq 0x7e13(%rip), %rbp      # 0xa3b0
movq %rsp, %r15
movq (%r14), %rax
movsbq (%r13), %rcx
incq %r13
testb $0x20, 0x1(%rax,%rcx,2)
jne 0x25a3
cmpb $0x3a, %cl
jne 0x25cc
movq %r13, %rdi
xorl %esi, %esi
movl $0x8, %edx
callq 0x2130
movq %rax, %r12
shrl %r12d
decq %r13
movb (%r13), %al
andb $-0x8, %al
cmpb $0x30, %al
jne 0x25f9
movq %r13, %rdi
xorl %esi, %esi
movl $0x8, %edx
callq 0x2130
movzwl %r12w, %ecx
leal 0x1(%r12), %edx
movw %ax, (%rbp,%rcx,2)
movl %edx, %r12d
movq %r15, %rdi
movl $0x64, %esi
movq %rbx, %rdx
callq 0x2110
movq %rax, %r13
testq %rax, %rax
jne 0x25a0
movq %rbx, %rdi
callq 0x2090
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/aap[P]pdp11/1120.c
// Function: dumpmem
void
dumpmem(int start, int end)
{
	start >>= 1;
	end >>= 1;
	for(; start != end; start++)
		printf("%06o: %06o\n", start<<1, memory[start]);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movl %edi, %ebp
sarl %ebp
sarl %ebx
subl %ebp, %ebx
je 0x28c5
movslq %ebp, %r15
addq %r15, %r15
addl %ebp, %ebp
leaq 0x7b15(%rip), %r12      # 0xa3b0
leaq 0x4774(%rip), %r14      # 0x7016
xorl %r13d, %r13d
leaq (%r15,%r13,2), %rax
movzwl (%r12,%rax), %edx
movq %r14, %rdi
movl %ebp, %esi
xorl %eax, %eax
callq 0x20a0
incq %r13
addl $0x2, %ebp
cmpl %r13d, %ebx
jne 0x28a5
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/aap[P]pdp11/ka11.c
// Function: tracestate
void
tracestate(KA11 *cpu)
{
	(void)cpu;
	trace(" R0 %06o R1 %06o R2 %06o R3 %06o R4 %06o R5 %06o R6 %06o R7 %06o\n"
		" 10 %06o 11 %06o 12 %06o 13 %06o 14 %06o 15 %06o 16 %06o 17 %06o\n"
		" BA %06o IR %06o PSW %03o\n"
		,
		cpu->r[0], cpu->r[1], cpu->r[2], cpu->r[3],
		cpu->r[4], cpu->r[5], cpu->r[6], cpu->r[7],
		cpu->r[8], cpu->r[9], cpu->r[10], cpu->r[11],
		cpu->r[12], cpu->r[13], cpu->r[14], cpu->r[15],
		cpu->ba, cpu->ir, cpu->psw);
}

// Assembly:
cmpl $0x0, 0x11151(%rip)     # 0x13cc8
je 0x2c47
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movzwl (%rdi), %esi
movzwl 0x2(%rdi), %edx
movzwl 0x4(%rdi), %ecx
movzwl 0x6(%rdi), %r8d
movzwl 0x8(%rdi), %r9d
movzwl 0xa(%rdi), %eax
movq %rax, 0x30(%rsp)
movzwl 0xc(%rdi), %eax
movq %rax, 0x28(%rsp)
movzwl 0xe(%rdi), %eax
movq %rax, 0x20(%rsp)
movzwl 0x10(%rdi), %eax
movq %rax, 0x18(%rsp)
movzwl 0x12(%rdi), %eax
movq %rax, 0x10(%rsp)
movzwl 0x14(%rdi), %eax
movq %rax, 0x8(%rsp)
movzwl 0x16(%rdi), %r13d
movzwl 0x18(%rdi), %ebp
movzwl 0x1a(%rdi), %r10d
movzwl 0x1c(%rdi), %r11d
movzwl 0x1e(%rdi), %ebx
movzwl 0x22(%rdi), %r14d
movzwl 0x24(%rdi), %r15d
movzbl 0x30(%rdi), %r12d
leaq 0x454d(%rip), %rdi      # 0x7150
xorl %eax, %eax
pushq %r12
pushq %r15
pushq %r14
pushq %rbx
pushq %r11
pushq %r10
pushq %rbp
pushq %r13
pushq 0x48(%rsp)
pushq 0x58(%rsp)
pushq 0x68(%rsp)
pushq 0x78(%rsp)
pushq 0x88(%rsp)
pushq 0x98(%rsp)
callq 0x20a0
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/aap[P]pdp11/ka11.c
// Function: reset
void
reset(KA11 *cpu)
{
	Busdev *bd;

	cpu->traps = 0;

	for(bd = cpu->bus->devs; bd; bd = bd->next)
		bd->reset(bd->dev);
}

// Assembly:
pushq %rbx
movl $0x0, 0x34(%rdi)
movq 0x28(%rdi), %rax
movq (%rax), %rbx
testq %rbx, %rbx
je 0x2d33
movq 0x8(%rbx), %rdi
callq *0x38(%rbx)
movq (%rbx), %rbx
jmp 0x2d22
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/aap[P]pdp11/ka11.c
// Function: dati
int
dati(KA11 *cpu, int b)
{
trace("dati %06o: ", cpu->ba);
	if(!b && cpu->ba&1)
		goto be;

	/* internal registers */
	if((cpu->ba&0177400) == 0177400){
		switch(cpu->ba&0377){
		case 0170: case 0171:
			cpu->bus->data = cpu->sw;
			goto ok;
		case 0376: case 0377:
			cpu->bus->data = cpu->psw;
			goto ok;
		}
	}

	cpu->bus->addr = ubxt(cpu->ba)&~1;
	if(dati_bus(cpu->bus))
		goto be;
ok:
	trace("%06o\n", cpu->bus->data);
	cpu->be = 0;
	return 0;
be:
	trace("BE\n");
	cpu->be++;
	return 1;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
cmpl $0x0, 0x10f84(%rip)     # 0x13cc8
je 0x2d58
movzwl 0x22(%rbx), %esi
leaq 0x449c(%rip), %rdi      # 0x71ed
xorl %eax, %eax
callq 0x20a0
testl %ebp, %ebp
jne 0x2d62
testb $0x1, 0x22(%rbx)
jne 0x2db2
movzwl 0x22(%rbx), %eax
cmpl $0xff00, %eax           # imm = 0xFF00
jb 0x2d8c
movzbl %al, %ecx
leal -0xfe(%rcx), %edx
cmpl $0x2, %edx
jb 0x2dd1
addl $-0x78, %ecx
cmpl $0x1, %ecx
ja 0x2d8c
movzwl 0x88(%rbx), %eax
jmp 0x2dd5
movl %eax, %ecx
notl %ecx
leal 0x30000(%rax), %edx
testl $0xe000, %ecx           # imm = 0xE000
cmovnel %eax, %edx
andl $-0x2, %edx
movq 0x28(%rbx), %rdi
movl %edx, 0x8(%rdi)
callq 0x2492
testl %eax, %eax
je 0x2ddd
cmpl $0x0, 0x10f0f(%rip)     # 0x13cc8
je 0x2dc7
leaq 0x46ae(%rip), %rdi      # 0x7470
callq 0x2040
incl 0x38(%rbx)
movl $0x1, %eax
jmp 0x2e05
movzbl 0x30(%rbx), %eax
movq 0x28(%rbx), %rcx
movw %ax, 0xc(%rcx)
cmpl $0x0, 0x10ee4(%rip)     # 0x13cc8
je 0x2dfc
movq 0x28(%rbx), %rax
movzwl 0xc(%rax), %esi
leaq 0x4227(%rip), %rdi      # 0x701c
xorl %eax, %eax
callq 0x20a0
movl $0x0, 0x38(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/aap[P]pdp11/ka11.c
// Function: dato
int
dato(KA11 *cpu, int b)
{
trace("dato %06o %06o %d\n", cpu->ba, cpu->bus->data, b);
	if(!b && cpu->ba&1)
		goto be;

	/* internal registers */
	if((cpu->ba&0177400) == 0177400){
		switch(cpu->ba&0377){
		case 0170: case 0171:
			/* can't write switches */
			goto ok;
		case 0376: case 0377:
			/* writes 0 for the odd byte.
			   I think this is correct. */
			cpu->psw = cpu->bus->data;
			goto ok;
		}
	}

	if(b){
		cpu->bus->addr = ubxt(cpu->ba);
		if(datob_bus(cpu->bus))
			goto be;
	}else{
		cpu->bus->addr = ubxt(cpu->ba)&~1;
		if(dato_bus(cpu->bus))
			goto be;
	}
ok:
	cpu->be = 0;
	return 0;
be:
	cpu->be++;
	return 1;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
cmpl $0x0, 0x10ead(%rip)     # 0x13cc8
je 0x2e39
movzwl 0x22(%rbx), %esi
movq 0x28(%rbx), %rax
movzwl 0xc(%rax), %edx
leaq 0x43c9(%rip), %rdi      # 0x71f9
movl %ebp, %ecx
xorl %eax, %eax
callq 0x20a0
testl %ebp, %ebp
jne 0x2e43
testb $0x1, 0x22(%rbx)
jne 0x2ea8
movzwl 0x22(%rbx), %eax
cmpl $0xff00, %eax           # imm = 0xFF00
jb 0x2e70
movzbl %al, %ecx
leal -0x78(%rcx), %edx
cmpl $0x2, %edx
jb 0x2eb2
addl $0xffffff02, %ecx       # imm = 0xFFFFFF02
cmpl $0x1, %ecx
ja 0x2e70
movq 0x28(%rbx), %rax
movb 0xc(%rax), %al
movb %al, 0x30(%rbx)
jmp 0x2eb2
movl %eax, %edx
notl %edx
leal 0x30000(%rax), %ecx
testl $0xe000, %edx           # imm = 0xE000
cmovnel %eax, %ecx
testl %ebp, %ebp
je 0x2e95
movq 0x28(%rbx), %rdi
movl %ecx, 0x8(%rdi)
callq 0x24f6
jmp 0x2ea4
andl $-0x2, %ecx
movq 0x28(%rbx), %rdi
movl %ecx, 0x8(%rdi)
callq 0x24c4
testl %eax, %eax
je 0x2eb2
incl 0x38(%rbx)
movl $0x1, %eax
jmp 0x2ebb
movl $0x0, 0x38(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/aap[P]pdp11/ka11.c
// Function: fetchop
static int
fetchop(KA11 *cpu, int t, int m, int b)
{
	int r;
	r = m&7;
	if((m&070) == 0)
		cpu->r[t] = cpu->r[r];
	else{
		if(dati(cpu, b)) return 1;
		cpu->r[t] = cpu->bus->data;
		if(b && cpu->ba&1) cpu->r[t] = cpu->r[t]>>8;
	}
	if(b) cpu->r[t] = sxt(cpu->r[t]);
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %r14d
movl %esi, %ebp
movq %rdi, %rbx
testb $0x38, %dl
je 0x4b65
movq %rbx, %rdi
movl %r14d, %esi
callq 0x2d35
movl $0x1, %r15d
testl %eax, %eax
jne 0x4b91
movq 0x28(%rbx), %rax
movzwl 0xc(%rax), %ecx
movl %ebp, %eax
movw %cx, (%rbx,%rax,2)
testl %r14d, %r14d
je 0x4b8e
testb $0x1, 0x22(%rbx)
je 0x4b72
movzwl %cx, %ecx
shrl $0x8, %ecx
movw %cx, (%rbx,%rax,2)
jmp 0x4b72
andl $0x7, %edx
movzwl (%rbx,%rdx,2), %eax
movl %ebp, %ecx
movw %ax, (%rbx,%rcx,2)
xorl %r15d, %r15d
testl %r14d, %r14d
je 0x4b91
movl %ebp, %r14d
movzbl (%rbx,%r14,2), %edi
callq 0x2544
movw %ax, (%rbx,%r14,2)
jmp 0x4b91
xorl %r15d, %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/aap[P]pdp11/ka11.c
// Function: writedest
static int
writedest(KA11 *cpu, word v, int b)
{
	int d;
	if((cpu->ir & 070) == 0){
		d = cpu->ir & 7;
		if(b) SETMASK(cpu->r[d], v, 0377);
		else cpu->r[d] = v;
	}else{
		if(cpu->ba&1) v <<= 8;
		cpu->bus->data = v;
		if(dato(cpu, b)) return 1;
	}
	return 0;
}

// Assembly:
movzwl 0x24(%rdi), %eax
testb $0x38, %al
je 0x4bd3
pushq %rax
movb 0x22(%rdi), %cl
shlb $0x3, %cl
andb $0x8, %cl
shll %cl, %esi
movq 0x28(%rdi), %rax
movw %si, 0xc(%rax)
movl %edx, %esi
callq 0x2e0c
movl %eax, %ecx
movl $0x1, %eax
testl %ecx, %ecx
leaq 0x8(%rsp), %rsp
je 0x4bec
retq
andl $0x7, %eax
testl %edx, %edx
je 0x4be8
movzbl 0x1(%rdi,%rax,2), %ecx
shll $0x8, %ecx
movzbl %sil, %esi
orl %ecx, %esi
movw %si, (%rdi,%rax,2)
xorl %eax, %eax
retq