// File: /workspace/github_c_makefile_star2_O0/halcy[P]quasi_crystals_bot/Graphics/DrawingCircles.c
// Function: GenericDrawCircle
static inline void GenericDrawCircle(Bitmap *bitmap,int x,int y,int r,Pixel c,
CompositionMode comp,GenericDrawPixelFunction *pixelfunc)
{
	if(r==0)
	{
		GenericDrawPixel(bitmap,x,y,c,comp,pixelfunc);
		return;
	}

	int error=-r;
	int dx=r;
	int dy=0;

	GenericDrawPixel(bitmap,x,y-r,c,comp,pixelfunc);
	GenericDrawPixel(bitmap,x-r,y,c,comp,pixelfunc);
	GenericDrawPixel(bitmap,x+r,y,c,comp,pixelfunc);
	GenericDrawPixel(bitmap,x,y+r,c,comp,pixelfunc);

	for(;;)
	{
		error+=2*dy+1;
		dy++;
 
		if(error>=0)
		{
			error-=2*dx-1;
			dx--;
		}
		if(dx<=dy) break;

		GenericDrawPixel(bitmap,x-dx,y-dy,c,comp,pixelfunc);
		GenericDrawPixel(bitmap,x+dx,y-dy,c,comp,pixelfunc);
		GenericDrawPixel(bitmap,x-dx,y+dy,c,comp,pixelfunc);
		GenericDrawPixel(bitmap,x+dx,y+dy,c,comp,pixelfunc);
		GenericDrawPixel(bitmap,x-dy,y-dx,c,comp,pixelfunc);
		GenericDrawPixel(bitmap,x-dy,y+dx,c,comp,pixelfunc);
		GenericDrawPixel(bitmap,x+dy,y-dx,c,comp,pixelfunc);
		GenericDrawPixel(bitmap,x+dy,y+dx,c,comp,pixelfunc);
	}

	if(dx==dy)
	{
		GenericDrawPixel(bitmap,x-dx,y-dx,c,comp,pixelfunc);
		GenericDrawPixel(bitmap,x+dx,y-dx,c,comp,pixelfunc);
		GenericDrawPixel(bitmap,x-dx,y+dx,c,comp,pixelfunc);
		GenericDrawPixel(bitmap,x+dx,y+dx,c,comp,pixelfunc);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq -0x30(%rsp), %rsp
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movl %r8d, -0x18(%rbp)
movq %r9, -0x20(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0xa067
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
movl -0x18(%rbp), %ecx
movq -0x20(%rbp), %r8
movq 0x10(%rbp), %r9
callq 0xaa90
jmp 0xa2c4
xorl %eax, %eax
subl -0x14(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
subl -0x14(%rbp), %edx
movl -0x18(%rbp), %ecx
movq -0x20(%rbp), %r8
movq 0x10(%rbp), %r9
callq 0xaa90
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
subl -0x14(%rbp), %esi
movl -0x10(%rbp), %edx
movl -0x18(%rbp), %ecx
movq -0x20(%rbp), %r8
movq 0x10(%rbp), %r9
callq 0xaa90
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
addl -0x14(%rbp), %esi
movl -0x10(%rbp), %edx
movl -0x18(%rbp), %ecx
movq -0x20(%rbp), %r8
movq 0x10(%rbp), %r9
callq 0xaa90
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
addl -0x14(%rbp), %edx
movl -0x18(%rbp), %ecx
movq -0x20(%rbp), %r8
movq 0x10(%rbp), %r9
callq 0xaa90
movl -0x2c(%rbp), %eax
shll %eax
addl $0x1, %eax
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x24(%rbp)
jl 0xa126
movl -0x28(%rbp), %ecx
shll %ecx
subl $0x1, %ecx
movl -0x24(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x24(%rbp)
movl -0x28(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jg 0xa133
jmp 0xa238
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
subl -0x28(%rbp), %esi
movl -0x10(%rbp), %edx
subl -0x2c(%rbp), %edx
movl -0x18(%rbp), %ecx
movq -0x20(%rbp), %r8
movq 0x10(%rbp), %r9
callq 0xaa90
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
addl -0x28(%rbp), %esi
movl -0x10(%rbp), %edx
subl -0x2c(%rbp), %edx
movl -0x18(%rbp), %ecx
movq -0x20(%rbp), %r8
movq 0x10(%rbp), %r9
callq 0xaa90
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
subl -0x28(%rbp), %esi
movl -0x10(%rbp), %edx
addl -0x2c(%rbp), %edx
movl -0x18(%rbp), %ecx
movq -0x20(%rbp), %r8
movq 0x10(%rbp), %r9
callq 0xaa90
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
addl -0x28(%rbp), %esi
movl -0x10(%rbp), %edx
addl -0x2c(%rbp), %edx
movl -0x18(%rbp), %ecx
movq -0x20(%rbp), %r8
movq 0x10(%rbp), %r9
callq 0xaa90
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
subl -0x2c(%rbp), %esi
movl -0x10(%rbp), %edx
subl -0x28(%rbp), %edx
movl -0x18(%rbp), %ecx
movq -0x20(%rbp), %r8
movq 0x10(%rbp), %r9
callq 0xaa90
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
subl -0x2c(%rbp), %esi
movl -0x10(%rbp), %edx
addl -0x28(%rbp), %edx
movl -0x18(%rbp), %ecx
movq -0x20(%rbp), %r8
movq 0x10(%rbp), %r9
callq 0xaa90
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
addl -0x2c(%rbp), %esi
movl -0x10(%rbp), %edx
subl -0x28(%rbp), %edx
movl -0x18(%rbp), %ecx
movq -0x20(%rbp), %r8
movq 0x10(%rbp), %r9
callq 0xaa90
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
addl -0x2c(%rbp), %esi
movl -0x10(%rbp), %edx
addl -0x28(%rbp), %edx
movl -0x18(%rbp), %ecx
movq -0x20(%rbp), %r8
movq 0x10(%rbp), %r9
callq 0xaa90
jmp 0xa0f0
movl -0x28(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jne 0xa2c4
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
subl -0x28(%rbp), %esi
movl -0x10(%rbp), %edx
subl -0x28(%rbp), %edx
movl -0x18(%rbp), %ecx
movq -0x20(%rbp), %r8
movq 0x10(%rbp), %r9
callq 0xaa90
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
addl -0x28(%rbp), %esi
movl -0x10(%rbp), %edx
subl -0x28(%rbp), %edx
movl -0x18(%rbp), %ecx
movq -0x20(%rbp), %r8
movq 0x10(%rbp), %r9
callq 0xaa90
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
subl -0x28(%rbp), %esi
movl -0x10(%rbp), %edx
addl -0x28(%rbp), %edx
movl -0x18(%rbp), %ecx
movq -0x20(%rbp), %r8
movq 0x10(%rbp), %r9
callq 0xaa90
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
addl -0x28(%rbp), %esi
movl -0x10(%rbp), %edx
addl -0x28(%rbp), %edx
movl -0x18(%rbp), %ecx
movq -0x20(%rbp), %r8
movq 0x10(%rbp), %r9
callq 0xaa90
leaq 0x30(%rsp), %rsp
popq %rbp
retq
nopl (%rax,%rax)