LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/Enes1313[P]DataStructures/DS/eaDSDynamicArray.c
// Function: eaDSDynamicArrayAdd
int eaDSDynamicArrayAdd(eaDSDynamicArray * dynamicArray, const void * data)
{
	void * item = dynamicArray->dataCreateAndCopy(data);

	if (NULL == item)
	{
		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;
	}

	dynamicArray->Data[dynamicArray->Count] = item;
	dynamicArray->Count++;

	return EXIT_SUCCESS;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rsi, %rdi
callq *0x20(%rbx)
testq %rax, %rax
je 0x186c
movq %rax, %r14
movq (%rbx), %rax
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
jne 0x1857
movzwl 0x18(%rbx), %ecx
imulq %rcx, %rsi
movq %rsi, 0x10(%rbx)
shlq $0x3, %rsi
movq %rax, %rdi
callq 0x10a0
testq %rax, %rax
je 0x1875
movq %rax, (%rbx)
movq 0x8(%rbx), %rsi
movq %r14, (%rax,%rsi,8)
incq %rsi
movq %rsi, 0x8(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
xorl %edi, %edi
callq 0x10b0
jmp 0x1885
leaq 0x10(%rbx), %rsi
addq $0x18, %rbx
movq %rbx, %rdi
callq 0x10f0
movl $0x1, %eax
jmp 0x1864
// File: /workspace/github_c_makefile_star2_O3/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 %r12
pushq %rbx
movq 0x8(%rdi), %r12
movl $0x1, %ebp
cmpq %rdx, %r12
jb 0x190c
movq %rdx, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq *0x20(%rbx)
testq %rax, %rax
je 0x1917
movq %rax, %r15
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
jne 0x18e0
movzwl 0x18(%rbx), %eax
imulq %rax, %rsi
movq %rsi, 0x10(%rbx)
movq (%rbx), %rdi
shlq $0x3, %rsi
callq 0x10a0
testq %rax, %rax
je 0x1920
movq %rax, (%rbx)
testq %r12, %r12
je 0x18ff
decq %r12
cmpq %r14, %r12
jb 0x18ff
movq (%rbx), %rax
movq (%rax,%r12,8), %rcx
movq %rcx, 0x8(%rax,%r12,8)
addq $-0x1, %r12
jb 0x18e8
movq (%rbx), %rax
movq %r15, (%rax,%r14,8)
incq 0x8(%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
xorl %edi, %edi
callq 0x10b0
jmp 0x190c
leaq 0x10(%rbx), %rsi
addq $0x18, %rbx
movq %rbx, %rdi
callq 0x1118
jmp 0x190c
// File: /workspace/github_c_makefile_star2_O3/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 0x19e0
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 0x196b
incq %r12
cmpq %r12, %r15
jne 0x1950
jmp 0x19e0
movq 0x10(%rbx), %rax
cmpq $0x5, %rax
jb 0x19b1
movq 0x8(%rbx), %rcx
movzwl 0x18(%rbx), %esi
xorl %edx, %edx
divq %rsi
cmpq %rax, %rcx
jae 0x19b1
movq %rax, 0x10(%rbx)
movq (%rbx), %rdi
shlq $0x3, %rax
movq %rax, %rsi
callq 0x10a0
testq %rax, %rax
je 0x19a4
movq %rax, (%rbx)
jmp 0x19b1
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 0x19e0
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 0x19c7
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x1ae4
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 0x1ae0
incq %r14
movq (%rbx), %rax
movq (%rax,%r14,8), %rcx
movq %rcx, -0x8(%rax,%r14,8)
incq %r14
cmpq %r14, %r15
jne 0x1acc
decq 0x8(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x1b60
movq %rsi, %r14
movq %rdi, %rbx
movq 0x10(%rdi), %rax
cmpq $0x5, %rax
jb 0x1b40
movzwl 0x18(%rbx), %ecx
xorl %edx, %edx
divq %rcx
cmpq %rax, %r15
jae 0x1b40
movq %rax, 0x10(%rbx)
movq (%rbx), %rdi
shlq $0x3, %rax
movq %rax, %rsi
callq 0x10a0
testq %rax, %rax
je 0x1b33
movq %rax, (%rbx)
jmp 0x1b40
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 0x1b5c
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_O3/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, %r12
movq %rdi, %r15
movl $0x28, %edi
callq 0x1090
movq %rax, %rbx
testq %rax, %rax
je 0x1c26
movq %r12, %xmm0
movq %r15, %xmm1
punpcklqdq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0]
pxor %xmm0, %xmm0
movdqa %xmm1, %xmm2
pcmpeqd %xmm0, %xmm2
pshufd $0xb1, %xmm2, %xmm3     # xmm3 = xmm2[1,0,3,2]
pand %xmm2, %xmm3
movdqu %xmm0, (%rbx)
leaq 0x52(%rip), %rax        # 0x1c33
movq %rax, %xmm0
leaq 0x42(%rip), %rax        # 0x1c2f
movq %rax, %xmm2
punpcklqdq %xmm0, %xmm2    # xmm2 = xmm2[0],xmm0[0]
pand %xmm3, %xmm2
pandn %xmm1, %xmm3
por %xmm2, %xmm3
movdqu %xmm3, 0x10(%rbx)
testq %r14, %r14
jne 0x1c13
movq 0x43bd(%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 0x1c17
// File: /workspace/github_c_makefile_star2_O3/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 0x1c65
movq 0x8(%r14), %rax
movq %rax, (%rbx)
movq (%r14), %rdi
callq *0x20(%rbx)
movq %r14, %rdi
callq 0x10e0
movq (%rbx), %r14
jmp 0x1c46
movq $0x0, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x1d03
movq %rax, %r14
movq %r15, %rdi
callq *0x10(%rbx)
movq %rax, (%r14)
testq %rax, %rax
je 0x1cfb
movq %rbx, %rax
testq %r12, %r12
je 0x1cde
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 0x1cef
// File: /workspace/github_c_makefile_star2_O3/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 0x1dcb
movq %rsi, %r14
movq %rdi, %rbx
cmpq 0x8(%rdi), %r15
je 0x1d7d
movq %r15, %r12
movq (%r15), %rsi
movq %r14, %rdi
callq *0x18(%rbx)
testl %eax, %eax
je 0x1da0
movq 0x8(%r12), %r15
cmpq 0x8(%rbx), %r15
jne 0x1d31
movq (%r15), %rsi
movq %r14, %rdi
callq *0x18(%rbx)
testl %eax, %eax
jne 0x1dcb
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 0x1dcb
movq (%r15), %rsi
movq %r14, %rdi
callq *0x18(%rbx)
testl %eax, %eax
jne 0x1dcb
movq (%r15), %rdi
callq *0x20(%rbx)
movq %r15, %rdi
callq 0x10e0
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
jmp 0x1dcb
movq (%r12), %rdi
callq *0x20(%rbx)
movq 0x8(%r12), %rdi
cmpq 0x8(%rbx), %rdi
jne 0x1db6
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_O3/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 0x1ecf
movq %rax, %r14
movq %r12, %rdi
callq *0x10(%rbx)
testq %rax, %rax
je 0x1ec7
testq %r15, %r15
je 0x1ea1
testq %r13, %r13
je 0x1ed6
movq 0x8(%r13), %r13
decq %r15
jne 0x1e7b
testq %r13, %r13
je 0x1eb4
movups (%r13), %xmm0
movups %xmm0, (%r14)
movq %r14, 0x8(%r13)
movq %rax, (%r13)
jmp 0x1ec3
movq %r13, 0x8(%r14)
movq %r14, (%rbx)
xorl %ecx, %ecx
movq %rax, (%r14)
testq %r13, %r13
jne 0x1edb
jmp 0x1ebf
movq $0x0, 0x8(%r14)
movq %rax, (%r14)
movq %r14, 0x8(%rbx)
xorl %ecx, %ecx
jmp 0x1edb
movq %r14, %rdi
callq 0x10e0
xorl %edi, %edi
callq 0x10b0
movl $0x1, %ecx
movl %ecx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x1f08
movq %rdi, %rax
incq %rsi
xorl %ebx, %ebx
decq %rsi
je 0x1f0c
movq 0x8(%rcx), %rcx
testq %rcx, %rcx
jne 0x1ef8
jmp 0x1f1a
xorl %ebx, %ebx
jmp 0x1f1a
movq (%rcx), %rdi
callq *0x10(%rax)
movq %rax, %rbx
testq %rax, %rax
je 0x1f1f
movq %rbx, %rax
popq %rbx
retq
xorl %ebx, %ebx
xorl %edi, %edi
callq 0x10b0
jmp 0x1f1a
// File: /workspace/github_c_makefile_star2_O3/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 0x1f46
incq %rsi
xorl %eax, %eax
decq %rsi
je 0x1f49
movq 0x8(%rcx), %rcx
testq %rcx, %rcx
jne 0x1f37
retq
xorl %eax, %eax
retq
movq (%rcx), %rax
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/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, %r15
movq %rdi, %r14
movl $0x20, %edi
callq 0x1090
movq %rax, %rbx
testq %rax, %rax
je 0x1fc6
movq %r15, %xmm0
movq %r14, %xmm1
punpcklqdq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0]
pxor %xmm0, %xmm0
movdqa %xmm1, %xmm2
pcmpeqd %xmm0, %xmm2
pshufd $0xb1, %xmm2, %xmm3     # xmm3 = xmm2[1,0,3,2]
pand %xmm2, %xmm3
movdqu %xmm0, (%rbx)
leaq 0x34(%rip), %rax        # 0x1fcf
movq %rax, %xmm0
movq 0x4028(%rip), %xmm2     # 0x5fd0
punpcklqdq %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0]
pand %xmm3, %xmm0
pandn %xmm1, %xmm3
por %xmm0, %xmm3
movdqu %xmm3, 0x10(%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
xorl %edi, %edi
callq 0x10b0
jmp 0x1fbd
// File: /workspace/github_c_makefile_star2_O3/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 0x1ffc
movq 0x8(%r14), %rax
movq %rax, (%rbx)
movq (%r14), %rdi
callq *0x18(%rbx)
movq %r14, %rdi
callq 0x10e0
movq (%rbx), %r14
jmp 0x1fdd
movq $0x0, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x206f
movq %rdi, %r14
movq (%rax), %rdi
callq *0x10(%r14)
movq %rax, %rbx
testq %rax, %rax
je 0x207c
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 0x2071
movq $0x0, 0x8(%r14)
jmp 0x2071
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
xorl %edi, %edi
callq 0x10b0
jmp 0x2046
// File: /workspace/github_c_makefile_star2_O3/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 0x20e0
movq %rax, %r14
movq $0x0, 0x8(%rax)
movq %r15, %rdi
callq *0x10(%rbx)
movq %rax, (%r14)
testq %rax, %rax
je 0x20d8
cmpq $0x0, (%rbx)
movq %rbx, %rax
je 0x20c9
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 0x20d2
// File: /workspace/github_c_makefile_star2_O3/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 0x2113
movq %rdi, %rax
movq (%rcx), %rdi
callq *0x10(%rax)
movq %rax, %rbx
testq %rax, %rax
jne 0x2115
xorl %ebx, %ebx
xorl %edi, %edi
callq 0x10b0
jmp 0x2115
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x21d4
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 0x21df
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        # 0x21f2
cmovneq %r15, %rax
movq %rax, 0x20(%rbx)
testq %r14, %r14
jne 0x21c4
movq 0x3e0c(%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 0x21c8
xorl %edi, %edi
callq 0x10b0
movq %rbx, %rdi
callq 0x10e0
xorl %ebx, %ebx
jmp 0x21c8
// File: /workspace/github_c_makefile_star2_O3/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 0x2253
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x2220
movq (%rbx), %rcx
leaq -0x1(%rax), %rdx
movq %rdx, 0x8(%rbx)
movq -0x8(%rcx,%rax,8), %rdi
callq *0x30(%rbx)
jmp 0x2202
movzwl 0x1a(%rbx), %eax
xorl %ebp, %ebp
cmpq %rax, 0x10(%rbx)
jbe 0x226a
movq (%rbx), %rdi
callq 0x10e0
movq 0x10(%rbx), %rdi
shlq $0x3, %rdi
callq 0x1090
movq %rax, (%rbx)
testq %rax, %rax
je 0x2273
movzwl 0x1a(%rbx), %eax
movq %rax, 0x10(%rbx)
jmp 0x226a
movq 0x10(%rbx), %rdi
shlq $0x3, %rdi
callq 0x1090
movq %rax, (%rbx)
xorl %ebp, %ebp
testq %rax, %rax
je 0x2273
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
xorl %edi, %edi
callq 0x10b0
movl $0x1, %ebp
jmp 0x226a
// File: /workspace/github_c_makefile_star2_O3/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
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x22ba
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x22b5
movq (%rbx), %rcx
leaq -0x1(%rax), %rdx
movq %rdx, 0x8(%rbx)
movq -0x8(%rcx,%rax,8), %rdi
callq *0x30(%rbx)
movq 0x8(%rbx), %rax
testq %rax, %rax
jne 0x2296
movq (%rbx), %rdi
callq 0x10e0
movq %rbx, %rdi
popq %rbx
jmp 0x10e0
// File: /workspace/github_c_makefile_star2_O3/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 0x2312
movq %rdi, %rbx
movq 0x10(%rdi), %rax
cmpq $0x5, %rax
jb 0x2324
movzwl 0x18(%rbx), %esi
xorl %edx, %edx
divq %rsi
cmpq %rax, %rcx
jae 0x2324
movq %rax, 0x10(%rbx)
movq (%rbx), %rdi
shlq $0x3, %rax
movq %rax, %rsi
callq 0x10a0
testq %rax, %rax
je 0x2317
movq %rax, (%rbx)
jmp 0x2324
xorl %r14d, %r14d
jmp 0x2352
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 0x235d
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 0x2352
// File: /workspace/github_c_makefile_star2_O3/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rsi, %rdi
callq *0x20(%rbx)
testq %rax, %rax
je 0x23c4
movq %rax, %r14
movq (%rbx), %rax
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
jne 0x23af
movzwl 0x18(%rbx), %ecx
imulq %rcx, %rsi
movq %rsi, 0x10(%rbx)
shlq $0x3, %rsi
movq %rax, %rdi
callq 0x10a0
testq %rax, %rax
je 0x23cd
movq %rax, (%rbx)
movq 0x8(%rbx), %rsi
movq %r14, (%rax,%rsi,8)
incq %rsi
movq %rsi, 0x8(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
xorl %edi, %edi
callq 0x10b0
jmp 0x23dd
leaq 0x10(%rbx), %rsi
addq $0x18, %rbx
movq %rbx, %rdi
callq 0x1140
movl $0x1, %eax
jmp 0x23bc
// File: /workspace/github_c_makefile_star2_O3/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 0x240f
movq %rdi, %rax
movq (%rdi), %rdx
movq -0x8(%rdx,%rcx,8), %rdi
callq *0x20(%rax)
movq %rax, %rbx
testq %rax, %rax
jne 0x2411
xorl %ebx, %ebx
xorl %edi, %edi
callq 0x10b0
jmp 0x2411
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x13f3
leaq -0xb8(%rbp), %rsi
movq %r14, %rdi
callq 0x1090
testl %eax, %eax
js 0x1407
movl $0xf000, %eax           # imm = 0xF000
andl -0xa0(%rbp), %eax
cmpl $0x4000, %eax           # imm = 0x4000
je 0x1366
cmpl $0x8000, %eax           # imm = 0x8000
jne 0x141a
movq %r14, %rdi
callq 0x1030
jmp 0x13f3
movq %r14, %rdi
callq 0x1040
movq %rax, %r15
movq %rax, %rdi
callq 0x10a0
testq %rax, %rax
je 0x13e3
leaq 0xc90(%rip), %r12       # 0x2015
leaq -0x1c0(%rbp), %r13
movzbl 0x13(%rax), %edx
cmpl $0x2e, %edx
jne 0x13ac
cmpb $0x0, 0x14(%rax)
je 0x13d6
movzbl 0x14(%rax), %ecx
subl $0x2e, %ecx
jne 0x13a8
movzbl 0x15(%rax), %ecx
negl %ecx
jmp 0x13b3
movl $0x2e, %ecx
subl %edx, %ecx
testl %ecx, %ecx
je 0x13d6
addq $0x13, %rax
movq %r13, %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x10d0
movq %r13, %rdi
callq 0x12fd
movq %r15, %rdi
callq 0x10a0
testq %rax, %rax
jne 0x138c
movq %r15, %rdi
callq 0x1070
movq %r14, %rdi
callq 0x1050
movl %ebx, %eax
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xbf6(%rip), %rdi       # 0x2004
callq 0x10c0
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x13f3
leaq 0xbfa(%rip), %rdi       # 0x201b
callq 0x10c0
jmp 0x13f3
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edi, %r14d
leal 0x1(%r14), %eax
movq %rax, %rcx
shlq $0x8, %rcx
subq %rax, %rcx
addq $0xf, %rcx
movabsq $0x1fffffffff0, %r15    # imm = 0x1FFFFFFFFF0
andq %rcx, %r15
movq %rsp, %r12
movq %r12, %rbx
subq %r15, %rbx
negq %r15
movq %rbx, %rsp
movq %rbx, %rdx
callq 0x11fc
movzbl (%r12,%r15), %eax
subl $0x72, %eax
jne 0x1483
movzbl 0x1(%rbx), %eax
subl $0x64, %eax
jne 0x1483
movzbl 0x2(%rbx), %eax
negl %eax
testl %eax, %eax
je 0x149c
leaq 0xb93(%rip), %rdi       # 0x2023
movq %rbx, %rsi
callq 0x1080
testl %eax, %eax
jne 0x14d2
cmpl $0x2, %r14d
jl 0x14c3
movl %r14d, %r14d
addq $0xff, %rbx
decq %r14
movq %rbx, %rdi
callq 0x12fd
addq $0xff, %rbx
decq %r14
jne 0x14af
xorl %eax, %eax
leaq -0x20(%rbp), %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0xb50(%rip), %rdi       # 0x2029
callq 0x10c0
jmp 0x14c3
// File: /workspace/github_c_makefile_star2_O3/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 0x1703
movl %ecx, %ecx
addq $0x4, %rdx
xorl %r8d, %r8d
cmpl %edi, -0x4(%rdx)
jne 0x16f4
cmpl %esi, (%rdx)
je 0x1704
incq %r8
addq $0x108, %rdx            # imm = 0x108
cmpq %r8, %rcx
jne 0x16eb
retq
movl %r8d, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/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, %ebx
movl %edi, %ebp
movl $0x20, %edi
callq 0x1100
movq %rax, %r14
movslq 0x29c4(%rip), %rax      # 0x40e8
testq %rax, %rax
jle 0x174a
movq 0x29a8(%rip), %rsi      # 0x40d8
addq $0x8, %rsi
cmpl %ebp, -0x8(%rsi)
jne 0x173e
cmpl %ebx, -0x4(%rsi)
je 0x1767
addq $0x108, %rsi            # imm = 0x108
decq %rax
jne 0x1734
leaq 0x9c0(%rip), %rsi       # 0x2111
movq %r14, %rdi
movl %ebp, %edx
movl %ebx, %ecx
xorl %eax, %eax
callq 0x1160
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
movq %r14, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x1050
// File: /workspace/github_c_makefile_star2_O3/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 0x5347(%rip), %rsi      # 0x77a5
callq 0x21b0
testq %rax, %rax
je 0x2518
movq %rax, %rbx
movq %rsp, %rdi
movl $0x64, %esi
movq %rax, %rdx
callq 0x2110
testq %rax, %rax
je 0x2510
movq %rax, %r13
xorl %r12d, %r12d
callq 0x2220
movq %rax, %r14
leaq 0x7f13(%rip), %rbp      # 0xa3b0
movq %rsp, %r15
movq (%r14), %rcx
movsbq (%r13), %rax
incq %r13
testb $0x20, 0x1(%rcx,%rax,2)
jne 0x24a3
cmpb $0x3a, %al
jne 0x24cf
movq %r13, %rdi
xorl %esi, %esi
movl $0x8, %edx
callq 0x2130
movq %rax, %r12
shrl %r12d
movb -0x1(%r13), %al
andb $-0x8, %al
cmpb $0x30, %al
jne 0x24f8
decq %r13
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 0x24a0
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_O3/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 0x27c4
movslq %ebp, %r15
addq %r15, %r15
addl %ebp, %ebp
leaq 0x7c16(%rip), %r12      # 0xa3b0
leaq 0x4875(%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 0x27a4
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x2c17
movq 0x8(%rbx), %rdi
callq *0x38(%rbx)
movq (%rbx), %rbx
jmp 0x2c06
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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, 0x110a0(%rip)     # 0x13cc8
je 0x2c3c
movzwl 0x22(%rbx), %esi
leaq 0x45b8(%rip), %rdi      # 0x71ed
xorl %eax, %eax
callq 0x20a0
testl %ebp, %ebp
setne %cl
movzwl 0x22(%rbx), %eax
testb $0x1, %al
sete %dl
orb %cl, %dl
cmpb $0x1, %dl
jne 0x2ca0
movzwl %ax, %eax
cmpl $0xff00, %eax           # imm = 0xFF00
jb 0x2c7a
movzbl %al, %ecx
leal -0xfe(%rcx), %edx
cmpl $0x2, %edx
jb 0x2cbf
addl $-0x78, %ecx
cmpl $0x1, %ecx
ja 0x2c7a
movzwl 0x88(%rbx), %eax
jmp 0x2cc3
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 0x2392
testl %eax, %eax
je 0x2ccb
cmpl $0x0, 0x11021(%rip)     # 0x13cc8
je 0x2cb5
leaq 0x47c0(%rip), %rdi      # 0x7470
callq 0x2040
incl 0x38(%rbx)
movl $0x1, %eax
jmp 0x2cf3
movzbl 0x30(%rbx), %eax
movq 0x28(%rbx), %rcx
movw %ax, 0xc(%rcx)
cmpl $0x0, 0x10ff6(%rip)     # 0x13cc8
je 0x2cea
movq 0x28(%rbx), %rax
movzwl 0xc(%rax), %esi
leaq 0x4339(%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_O3/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, 0x10fbf(%rip)     # 0x13cc8
je 0x2d27
movzwl 0x22(%rbx), %esi
movq 0x28(%rbx), %rax
movzwl 0xc(%rax), %edx
leaq 0x44db(%rip), %rdi      # 0x71f9
movl %ebp, %ecx
xorl %eax, %eax
callq 0x20a0
testl %ebp, %ebp
setne %cl
movzwl 0x22(%rbx), %eax
testb $0x1, %al
sete %dl
orb %cl, %dl
cmpb $0x1, %dl
jne 0x2da0
movzwl %ax, %eax
cmpl $0xff00, %eax           # imm = 0xFF00
jb 0x2d68
movzbl %al, %ecx
leal -0x78(%rcx), %edx
cmpl $0x2, %edx
jb 0x2daa
addl $0xffffff02, %ecx       # imm = 0xFFFFFF02
cmpl $0x1, %ecx
ja 0x2d68
movq 0x28(%rbx), %rax
movb 0xc(%rax), %al
movb %al, 0x30(%rbx)
jmp 0x2daa
movl %eax, %edx
notl %edx
leal 0x30000(%rax), %ecx
testl $0xe000, %edx           # imm = 0xE000
cmovnel %eax, %ecx
testl %ebp, %ebp
je 0x2d8d
movq 0x28(%rbx), %rdi
movl %ecx, 0x8(%rdi)
callq 0x23f6
jmp 0x2d9c
andl $-0x2, %ecx
movq 0x28(%rbx), %rdi
movl %ecx, 0x8(%rdi)
callq 0x23c4
testl %eax, %eax
je 0x2daa
incl 0x38(%rbx)
movl $0x1, %eax
jmp 0x2db3
movl $0x0, 0x38(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r14
pushq %rbx
movl %ecx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
testb $0x38, %dl
je 0x4b77
movq %rbx, %rdi
movl %ebp, %esi
callq 0x2c19
movl %eax, %ecx
movl $0x1, %eax
testl %ecx, %ecx
jne 0x4b99
movq 0x28(%rbx), %rax
movzwl 0xc(%rax), %eax
movl %r14d, %r14d
movw %ax, (%rbx,%r14,2)
testl %ebp, %ebp
je 0x4b97
testb $0x1, 0x22(%rbx)
je 0x4b8a
movzwl %ax, %eax
shrl $0x8, %eax
movw %ax, (%rbx,%r14,2)
jmp 0x4b8a
andl $0x7, %edx
movzwl (%rbx,%rdx,2), %eax
movl %r14d, %r14d
movw %ax, (%rbx,%r14,2)
testl %ebp, %ebp
je 0x4b97
movzbl %al, %edi
callq 0x2444
movw %ax, (%rbx,%r14,2)
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x4bd2
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 0x2cfa
movl %eax, %ecx
movl $0x1, %eax
testl %ecx, %ecx
leaq 0x8(%rsp), %rsp
je 0x4beb
retq
andl $0x7, %eax
testl %edx, %edx
je 0x4be7
movzbl 0x1(%rdi,%rax,2), %ecx
shll $0x8, %ecx
movzbl %sil, %esi
orl %ecx, %esi
movw %si, (%rdi,%rax,2)
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/aap[P]pdp11/ka11.c
// Function: addrop
static int
addrop(KA11 *cpu, int m, int b)
{
	int r;
	int ai;
	r = m&7;
	m >>= 3;
	ai = 1 + (!b || (r&6)==6 || m&1);
	if(m == 0){
//		assert(0);
		return 0;
	}
	switch(m&6){
	case 0:		// REG
		cpu->b = cpu->ba = cpu->r[r];
		return 0;	// this already is mode 1
	case 2:		// INC
		cpu->ba = cpu->r[r];
		cpu->b = cpu->r[r] = cpu->r[r] + ai;
		break;
	case 4:		// DEC
		cpu->b = cpu->ba = cpu->r[r]-ai;
		if(r == 6 && (cpu->ba&~0377) == 0) cpu->traps |= TRAP_STACK;
		cpu->r[r] = cpu->ba;
		break;
	case 6:		// INDEX
		cpu->ba = cpu->r[7];
		cpu->r[7] += 2;
		if(dati(cpu, 0)) return 1;
		cpu->b = cpu->ba = cpu->bus->data + cpu->r[r];
		break;
	}
	if(m&1){
		if(dati(cpu, 0)) return 1;
		cpu->b = cpu->ba = cpu->bus->data;
	}
	return 0;

}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ecx
notl %ecx
xorl %eax, %eax
btl $0x3, %esi
adcw $0x1, %ax
testb $0x6, %cl
movl $0x2, %ecx
cmovel %ecx, %eax
testl %edx, %edx
cmovel %ecx, %eax
cmpl $0x8, %esi
jb 0x4cf8
movl %esi, %ebp
movq %rdi, %rbx
movl %esi, %r14d
andl $0x7, %r14d
movl %esi, %ecx
shrl $0x3, %ecx
andl $0x6, %ecx
leaq 0x2500(%rip), %rdx      # 0x7134
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movl %r14d, %eax
leaq (%rbx,%rax,2), %rax
jmp 0x4ced
movzwl 0xe(%rbx), %eax
movw %ax, 0x22(%rbx)
addl $0x2, %eax
movw %ax, 0xe(%rbx)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2c19
movl %eax, %ecx
movl $0x1, %eax
testl %ecx, %ecx
jne 0x4cfa
movq 0x28(%rbx), %rax
movl %r14d, %ecx
movzwl (%rbx,%rcx,2), %ecx
addw 0xc(%rax), %cx
movw %cx, 0x22(%rbx)
movw %cx, 0x20(%rbx)
jmp 0x4cca
movl %r14d, %ecx
movzwl (%rbx,%rcx,2), %edx
movw %dx, 0x22(%rbx)
addl %edx, %eax
movw %ax, (%rbx,%rcx,2)
movw %ax, 0x20(%rbx)
jmp 0x4cca
movl %r14d, %ecx
movzwl (%rbx,%rcx,2), %edx
subl %eax, %edx
movw %dx, 0x22(%rbx)
movw %dx, 0x20(%rbx)
cmpl $0x6, %r14d
jne 0x4cc6
movzwl %dx, %eax
cmpl $0xff, %eax
ja 0x4cc6
orb $0x1, 0x34(%rbx)
movw %dx, (%rbx,%rcx,2)
testb $0x8, %bpl
je 0x4cf8
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2c19
movl %eax, %ecx
movl $0x1, %eax
testl %ecx, %ecx
jne 0x4cfa
movq 0x28(%rbx), %rax
addq $0xc, %rax
movzwl (%rax), %eax
movw %ax, 0x22(%rbx)
movw %ax, 0x20(%rbx)
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/aap[P]pdp11/ka11.c
// Function: run
void
run(KA11 *cpu)
{
	int count;

	count = 0;
	cpu->state = STATE_RUNNING;
	while(cpu->state != STATE_HALTED){
		svc(cpu, cpu->bus);

#ifdef AUTODIAG
	extern int diagpassed;
	if(diagpassed)
		return;
#endif

		if(cpu->state == STATE_RUNNING ||
		   cpu->state == STATE_WAITING && cpu->traps){
			cpu->state = STATE_RUNNING;
			step(cpu);
		}

		if (count++ == 1000) {
			sleep_ms(cpu->throttle);
			count = 0;
		}
	}

	printstate(cpu);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, 0x3c(%rdi)
leaq 0x48(%rdi), %r15
xorl %ebp, %ebp
movl $0x1, %eax
leaq 0x276a(%rip), %r12      # 0x7490
movq 0x28(%rbx), %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%r15)
movups %xmm0, 0x20(%r15)
movups %xmm0, 0x10(%r15)
movups %xmm0, (%r15)
andb $-0x6d, 0x34(%rbx)
movq (%r14), %r13
testq %r13, %r13
je 0x4d97
movq 0x8(%r13), %rsi
movq %r14, %rdi
callq *0x28(%r13)
movl %eax, %ecx
andl $-0x4, %ecx
cmpl $0x4, %ecx
jne 0x4d8b
addl $-0x4, %eax
movq %rax, %rcx
shlq $0x4, %rcx
cmpq $0x0, (%r15,%rcx)
jne 0x4d8b
addq %r15, %rcx
movq 0x30(%r13), %rdx
movq %rdx, (%rcx)
movq 0x8(%r13), %rdx
movq %rdx, 0x8(%rcx)
movl (%r12,%rax,4), %eax
orl %eax, 0x34(%rbx)
movq (%r13), %r13
testq %r13, %r13
jne 0x4d4c
movl 0x3c(%rbx), %eax
cmpl $0x1, %eax
je 0x4da7
cmpl $0x2, %eax
jne 0x4db6
cmpl $0x0, 0x34(%rbx)
je 0x4db6
movl $0x1, 0x3c(%rbx)
movq %rbx, %rdi
callq 0x2dba
cmpl $0x3e8, %ebp            # imm = 0x3E8
je 0x4dc2
incl %ebp
jmp 0x4dcc
movl 0x40(%rbx), %edi
callq 0x6b70
xorl %ebp, %ebp
movl 0x3c(%rbx), %eax
testl %eax, %eax
jne 0x4d26
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2b2c
nopl (%rax)