// File: /workspace/github_c_makefile_star2_O0/Enes1313[P]DataStructures/Test/main.c
// Function: testLinkedList
void testLinkedList()
{
	size_t i, x;
	eaDSLinkedList linkedList;

	puts("********************************************");
	puts("Linked List");
	puts("********************************************");

	if (NULL == (linkedList = eaDSLinkedListInit(intCreateAndCopy, intCompare, free)))
	{
		puts("linkedList olusmadi!");
		return;
	}

	for(i = 0; i < 13; i++)
	{
		x = (unsigned int) rand() % 50;

		if(EXIT_SUCCESS == eaDSLinkedListAdd(linkedList, &x))
		{
			printf("LinkedList'e eleman eklendi : %d \n", (int)x);
		}
		else
		{
			puts("LinkedList'e eleman eklenemedi!");
		}
	}

	x = 10;

	printf("LinkedList'den siliniyor : %d\n", (int)x);
	eaDSLinkedListRemove(linkedList, &x);

	printf("LinkedList'den 12. eleman atiliyor!\n");
	eaDSLinkedListRemoveAt(linkedList, 11);

	for(i = 0; ; i++)
	{
		void * data = eaDSLinkedListGetFrom(linkedList, i);

		if (NULL != data)
		{
			printf("LinkedList'den %d. eleman alindi : %d\n", (int)i + 1, *(int *)data);
			free(data);
		}
		else
		{
			break;
		}
	}
	/*
	printf("LinkedList siralaniyor...\n");
	eaDSLinkedListSort(linkedList);

	for(i = 0; EXIT_SUCCESS == eaDSLinkedListGetFrom(linkedList, &x, i); i++)
	{
		printf("LinkedList'den %d. eleman alindi : %d\n", (int)i + 1, (int)x);
	}
	*/

	printf("LinkedList resetleniyor.\n");
	eaDSLinkedListReset(linkedList);

	x = (unsigned int) rand() % 50;

	if(EXIT_SUCCESS == eaDSLinkedListAdd(linkedList, &x))
	{
		printf("LinkedList'e eleman eklendi : %d\n", (int)x);
	}
	else
	{
		puts("LinkedList'e eleman eklenemedi!");
	}

	printf("LinkedList siliniyor.\n");
	eaDSLinkedListClear(linkedList);

	puts("********************************************");
	puts("Linked List");
	puts("********************************************");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
leaq 0xe90(%rip), %rdi       # 0x506f
callq 0x1030
leaq 0x114c(%rip), %rdi      # 0x5337
callq 0x1030
leaq 0xe78(%rip), %rdi       # 0x506f
callq 0x1030
leaq -0x413(%rip), %rdi      # 0x3df0
leaq -0x3ea(%rip), %rsi      # 0x3e20
movq 0x3da7(%rip), %rdx      # 0x7fb8
callq 0x2750
movq %rax, %rcx
movq %rcx, -0x18(%rbp)
xorl %eax, %eax
cmpq %rcx, %rax
jne 0x4235
leaq 0x1118(%rip), %rdi      # 0x5343
callq 0x1030
jmp 0x43dc
movq $0x0, -0x8(%rbp)
cmpq $0xd, -0x8(%rbp)
jae 0x429f
callq 0x10c0
movl $0x32, %ecx
xorl %edx, %edx
divl %ecx
movl %edx, %eax
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rdi
leaq -0x10(%rbp), %rsi
callq 0x2940
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x4283
movq -0x10(%rbp), %rax
movl %eax, %esi
leaq 0x10de(%rip), %rdi      # 0x5358
movb $0x0, %al
callq 0x1050
jmp 0x428f
leaq 0x10f1(%rip), %rdi      # 0x537b
callq 0x1030
jmp 0x4291
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0x423d
movq $0xa, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl %eax, %esi
leaq 0x10e7(%rip), %rdi      # 0x539b
movb $0x0, %al
callq 0x1050
movq -0x18(%rbp), %rdi
leaq -0x10(%rbp), %rsi
callq 0x2a10
leaq 0x10eb(%rip), %rdi      # 0x53ba
movb $0x0, %al
callq 0x1050
movq -0x18(%rbp), %rdi
movl $0xb, %esi
callq 0x2bb0
movq $0x0, -0x8(%rbp)
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x2e70
movq %rax, -0x20(%rbp)
xorl %eax, %eax
cmpq -0x20(%rbp), %rax
je 0x432d
movq -0x8(%rbp), %rax
movl %eax, %esi
addl $0x1, %esi
movq -0x20(%rbp), %rax
movl (%rax), %edx
leaq 0x10c4(%rip), %rdi      # 0x53df
movb $0x0, %al
callq 0x1050
movq -0x20(%rbp), %rdi
callq 0x10d0
jmp 0x432f
jmp 0x433f
jmp 0x4331
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0x42ec
leaq 0x10c0(%rip), %rdi      # 0x5406
movb $0x0, %al
callq 0x1050
movq -0x18(%rbp), %rdi
callq 0x2860
callq 0x10c0
movl $0x32, %ecx
xorl %edx, %edx
divl %ecx
movl %edx, %eax
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rdi
leaq -0x10(%rbp), %rsi
callq 0x2940
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x4395
movq -0x10(%rbp), %rax
movl %eax, %esi
leaq 0x1094(%rip), %rdi      # 0x5420
movb $0x0, %al
callq 0x1050
jmp 0x43a1
leaq 0xfdf(%rip), %rdi       # 0x537b
callq 0x1030
leaq 0x109a(%rip), %rdi      # 0x5442
movb $0x0, %al
callq 0x1050
movq -0x18(%rbp), %rdi
callq 0x28c0
leaq 0xcb0(%rip), %rdi       # 0x506f
callq 0x1030
leaq 0xf6c(%rip), %rdi       # 0x5337
callq 0x1030
leaq 0xc98(%rip), %rdi       # 0x506f
callq 0x1030
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)