// File: /workspace/github_c_makefile_star2_O0/Enes1313[P]DataStructures/Test/main.c
// Function: testCircularBuffer
void testCircularBuffer()
{
	size_t len = 0;
	eaDSCircularBuffer circularBuffer;
	char data[] = {"{ \"Who\" : \"Enes\",{ \"Who\" : \"Enes\", \"Birth\" : 1994 }drgtfhyjg{ \"Who\" : \"Reis\", \"Birth\" : 8888 }"};

	puts("********************************************");
	puts("Circular Buffer");
	puts("********************************************");

	if (NULL == (circularBuffer = eaDSCircularBufferInit(sizeof(char), malloc, memcpy, memcmp, free)))
	{
		puts("circularBuffer olusmadi!");
		return;
	}

	while (EXIT_SUCCESS == eaDSCircularBufferAdd(circularBuffer, data, strlen(data)))
	{
		puts("circularBuffer'a veri eklendi!");
	}

	memset(data, 0, sizeof(data));

	if (EXIT_SUCCESS == eaDSCircularBufferGetWhereIsIt(circularBuffer, "{", 1, &len))
	{
		eaDSCircularBufferMoveHead(circularBuffer, len);

		if (EXIT_SUCCESS == eaDSCircularBufferGetWhereIsIt(circularBuffer, "}", 1, &len))
		{
			if (EXIT_SUCCESS == eaDSCircularBufferGet(circularBuffer, data, len + 1))
			{
				printf("circularBuffer'dan cekilen veri : %s\n", data);
			}
		}
		else
		{
			puts("Bo");
		}
	}

	if (EXIT_SUCCESS == eaDSCircularBufferAdd(circularBuffer, data, strlen(data)))
	{
		puts("circularBuffer'a veri eklendi!");
	}

	if (EXIT_SUCCESS == eaDSCircularBufferAdd(circularBuffer, data, strlen(data)))
	{
		puts("circularBuffer'a veri eklendi!");
	}

	if (EXIT_SUCCESS == eaDSCircularBufferAdd(circularBuffer, data, strlen(data)))
	{
		puts("circularBuffer'a veri eklendi!");
	}

	memset(data, 0, sizeof(data));

	if (EXIT_SUCCESS == eaDSCircularBufferGetWhereIsIt(circularBuffer, "{", 1, &len))
	{
		eaDSCircularBufferMoveHead(circularBuffer, len);

		if (EXIT_SUCCESS == eaDSCircularBufferGetWhereIsIt(circularBuffer, "}", 1, &len))
		{
			if (EXIT_SUCCESS == eaDSCircularBufferGet(circularBuffer, data, len + 1))
			{
				printf("circularBuffer'dan cekilen veri : %s\n", data);
			}
		}
		else
		{
			puts("Bo");
		}
	}

	if (EXIT_SUCCESS != eaDSCircularBufferAdd(circularBuffer, "dff", 3))
	{
		puts("circularBuffer'a veri eklenemedi!");
	}
	{
		memset(data, 0, sizeof(data));

		if (EXIT_SUCCESS == eaDSCircularBufferGet(circularBuffer, data, 1))
		{
			printf("circularBuffer'dan cekilen veri : %s\n", data);
			memset(data, 0, 1);
		}

		while (EXIT_SUCCESS == eaDSCircularBufferGetWhereIsIt(circularBuffer, "{", 1, &len))
		{
			eaDSCircularBufferMoveHead(circularBuffer, len);

			if (EXIT_SUCCESS == eaDSCircularBufferGetWhereIsIt(circularBuffer, "}", 1, &len))
			{
				if (EXIT_SUCCESS == eaDSCircularBufferGet(circularBuffer, data, len + 1))
				{
					printf("circularBuffer'dan cekilen veri : %s\n", data);
					memset(data, 0, sizeof(data));
				}
			}
			else
			{
				puts("Bo");
				break;
			}
		}
	}

	eaDSCircularBufferClear(circularBuffer);

	puts("********************************************");
	puts("Circular Buffer");
	puts("********************************************");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq $0x0, -0x8(%rbp)
leaq -0x70(%rbp), %rdi
leaq 0x1642(%rip), %rsi      # 0x5010
movl $0x5f, %edx
callq 0x10e0
leaq 0x1690(%rip), %rdi      # 0x506f
callq 0x1030
leaq 0x16b1(%rip), %rdi      # 0x509c
callq 0x1030
leaq 0x1678(%rip), %rdi      # 0x506f
callq 0x1030
movl $0x1, %edi
movq 0x45e0(%rip), %rsi      # 0x7fe8
movq 0x45d1(%rip), %rdx      # 0x7fe0
movq 0x45ba(%rip), %rcx      # 0x7fd0
movq 0x459b(%rip), %r8       # 0x7fb8
callq 0x11f0
movq %rax, %rcx
movq %rcx, -0x10(%rbp)
xorl %eax, %eax
cmpq %rcx, %rax
jne 0x3a41
leaq 0x1675(%rip), %rdi      # 0x50ac
callq 0x1030
jmp 0x3de4
jmp 0x3a43
movq -0x10(%rbp), %rax
movq %rax, -0x80(%rbp)
leaq -0x70(%rbp), %rax
movq %rax, -0x78(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x1040
movq -0x80(%rbp), %rdi
movq -0x78(%rbp), %rsi
movq %rax, %rdx
callq 0x1380
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x3a82
leaq 0x164a(%rip), %rdi      # 0x50c5
callq 0x1030
jmp 0x3a43
leaq -0x70(%rbp), %rdi
xorl %esi, %esi
movl $0x5f, %edx
callq 0x1060
movq -0x10(%rbp), %rdi
leaq 0x1647(%rip), %rsi      # 0x50e4
movl $0x1, %edx
leaq -0x8(%rbp), %rcx
callq 0x17f0
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x3b20
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x1990
movq -0x10(%rbp), %rdi
leaq 0x161b(%rip), %rsi      # 0x50e6
movl $0x1, %edx
leaq -0x8(%rbp), %rcx
callq 0x17f0
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x3b12
movq -0x10(%rbp), %rdi
leaq -0x70(%rbp), %rsi
movq -0x8(%rbp), %rdx
addq $0x1, %rdx
callq 0x15c0
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x3b10
leaq -0x70(%rbp), %rsi
leaq 0x15df(%rip), %rdi      # 0x50e8
movb $0x0, %al
callq 0x1050
jmp 0x3b1e
leaq 0x15f5(%rip), %rdi      # 0x510e
callq 0x1030
jmp 0x3b20
movq -0x10(%rbp), %rax
movq %rax, -0x90(%rbp)
leaq -0x70(%rbp), %rax
movq %rax, -0x88(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x1040
movq -0x90(%rbp), %rdi
movq -0x88(%rbp), %rsi
movq %rax, %rdx
callq 0x1380
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x3b69
leaq 0x1561(%rip), %rdi      # 0x50c5
callq 0x1030
movq -0x10(%rbp), %rax
movq %rax, -0xa0(%rbp)
leaq -0x70(%rbp), %rax
movq %rax, -0x98(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x1040
movq -0xa0(%rbp), %rdi
movq -0x98(%rbp), %rsi
movq %rax, %rdx
callq 0x1380
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x3bb2
leaq 0x1518(%rip), %rdi      # 0x50c5
callq 0x1030
movq -0x10(%rbp), %rax
movq %rax, -0xb0(%rbp)
leaq -0x70(%rbp), %rax
movq %rax, -0xa8(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x1040
movq -0xb0(%rbp), %rdi
movq -0xa8(%rbp), %rsi
movq %rax, %rdx
callq 0x1380
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x3bfb
leaq 0x14cf(%rip), %rdi      # 0x50c5
callq 0x1030
leaq -0x70(%rbp), %rdi
xorl %esi, %esi
movl $0x5f, %edx
callq 0x1060
movq -0x10(%rbp), %rdi
leaq 0x14ce(%rip), %rsi      # 0x50e4
movl $0x1, %edx
leaq -0x8(%rbp), %rcx
callq 0x17f0
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x3c99
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x1990
movq -0x10(%rbp), %rdi
leaq 0x14a2(%rip), %rsi      # 0x50e6
movl $0x1, %edx
leaq -0x8(%rbp), %rcx
callq 0x17f0
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x3c8b
movq -0x10(%rbp), %rdi
leaq -0x70(%rbp), %rsi
movq -0x8(%rbp), %rdx
addq $0x1, %rdx
callq 0x15c0
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x3c89
leaq -0x70(%rbp), %rsi
leaq 0x1466(%rip), %rdi      # 0x50e8
movb $0x0, %al
callq 0x1050
jmp 0x3c97
leaq 0x147c(%rip), %rdi      # 0x510e
callq 0x1030
jmp 0x3c99
movq -0x10(%rbp), %rdi
leaq 0x146d(%rip), %rsi      # 0x5111
movl $0x3, %edx
callq 0x1380
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
je 0x3cc2
leaq 0x1458(%rip), %rdi      # 0x5115
callq 0x1030
leaq -0x70(%rbp), %rdi
xorl %esi, %esi
movl $0x5f, %edx
callq 0x1060
movq -0x10(%rbp), %rdi
leaq -0x70(%rbp), %rsi
movl $0x1, %edx
callq 0x15c0
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x3d0e
leaq -0x70(%rbp), %rsi
leaq 0x13f1(%rip), %rdi      # 0x50e8
movb $0x0, %al
callq 0x1050
leaq -0x70(%rbp), %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0x1060
jmp 0x3d10
movq -0x10(%rbp), %rdi
leaq 0x13c9(%rip), %rsi      # 0x50e4
movl $0x1, %edx
leaq -0x8(%rbp), %rcx
callq 0x17f0
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x3db7
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x1990
movq -0x10(%rbp), %rdi
leaq 0x1399(%rip), %rsi      # 0x50e6
movl $0x1, %edx
leaq -0x8(%rbp), %rcx
callq 0x17f0
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x3da4
movq -0x10(%rbp), %rdi
leaq -0x70(%rbp), %rsi
movq -0x8(%rbp), %rdx
addq $0x1, %rdx
callq 0x15c0
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x3da2
leaq -0x70(%rbp), %rsi
leaq 0x135d(%rip), %rdi      # 0x50e8
movb $0x0, %al
callq 0x1050
leaq -0x70(%rbp), %rdi
xorl %esi, %esi
movl $0x5f, %edx
callq 0x1060
jmp 0x3db2
leaq 0x1363(%rip), %rdi      # 0x510e
callq 0x1030
jmp 0x3db7
jmp 0x3d10
movq -0x10(%rbp), %rdi
callq 0x1350
leaq 0x12a8(%rip), %rdi      # 0x506f
callq 0x1030
leaq 0x12c9(%rip), %rdi      # 0x509c
callq 0x1030
leaq 0x1290(%rip), %rdi      # 0x506f
callq 0x1030
addq $0xb0, %rsp
popq %rbp
retq
nopl (%rax)