// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/build.c
// Function: drawcircle16
void drawcircle16(int x1, int y1, int r, unsigned char col)
{
	int xp, yp, xpbpl, ypbpl, d, de, dse, patc=0;
	intptr_t p;

	if (r < 0) r = -r;
	if (x1+r < 0 || x1-r >= xres) return;
	if (y1+r < 0 || y1-r >= ydim16) return;

	/*
	 *      d
	 *    6 | 7
	 *   \  |  /
	 *  5  \|/  8
	 * c----+----a
	 *  4  /|\  1
	 *   /  |  \
	 *    3 | 2
	 *      b
	 */

	xp = 0;
	yp = r;
	d = 1 - r;
	de = 2;
	dse = 5 - (r << 1);

	p = ((ytop16+y1)*bytesperline)+x1+frameplace;

	if (drawlinepat & pow2long[(patc++)&31]) {
		if ((unsigned int)y1 < (unsigned int)ydim16 && (unsigned int)(x1+r) < (unsigned int)xres  )
			drawpixel((void *)(p+r), col);			// a
		if ((unsigned int)x1 < (unsigned int)xres   && (unsigned int)(y1+r) < (unsigned int)ydim16)
			drawpixel((void *)(p+(r*bytesperline)), col);	// b
		if ((unsigned int)y1 < (unsigned int)ydim16 && (unsigned int)(x1-r) < (unsigned int)xres  )
			drawpixel((void *)(p-r), col);			// c
		if ((unsigned int)x1 < (unsigned int)xres   && (unsigned int)(y1-r) < (unsigned int)ydim16)
			drawpixel((void *)(p-(r*bytesperline)), col);	// d
	}

	while (yp > xp) {
		if (d < 0) {
			d += de;
			de += 2;
			dse += 2;
			xp++;
		} else {
			d += dse;
			de += 2;
			dse += 4;
			xp++;
			yp--;
		}

		ypbpl = yp*bytesperline;
		xpbpl = xp*bytesperline;
		if (drawlinepat & pow2long[(patc++)&31]) {
			if ((unsigned int)(x1+yp) < (unsigned int)xres && (unsigned int)(y1+xp) < (unsigned int)ydim16)
				drawpixel((void *)(p+yp+xpbpl), col);	// 1
			if ((unsigned int)(x1+xp) < (unsigned int)xres && (unsigned int)(y1+yp) < (unsigned int)ydim16)
				drawpixel((void *)(p+xp+ypbpl), col);	// 2
			if ((unsigned int)(x1-xp) < (unsigned int)xres && (unsigned int)(y1+yp) < (unsigned int)ydim16)
				drawpixel((void *)(p-xp+ypbpl), col);	// 3
			if ((unsigned int)(x1-yp) < (unsigned int)xres && (unsigned int)(y1+xp) < (unsigned int)ydim16)
				drawpixel((void *)(p-yp+xpbpl), col);	// 4
			if ((unsigned int)(x1-yp) < (unsigned int)xres && (unsigned int)(y1-xp) < (unsigned int)ydim16)
				drawpixel((void *)(p-yp-xpbpl), col);	// 5
			if ((unsigned int)(x1-xp) < (unsigned int)xres && (unsigned int)(y1-yp) < (unsigned int)ydim16)
				drawpixel((void *)(p-xp-ypbpl), col);	// 6
			if ((unsigned int)(x1+xp) < (unsigned int)xres && (unsigned int)(y1-yp) < (unsigned int)ydim16)
				drawpixel((void *)(p+xp-ypbpl), col);	// 7
			if ((unsigned int)(x1+yp) < (unsigned int)xres && (unsigned int)(y1-xp) < (unsigned int)ydim16)
				drawpixel((void *)(p+yp-xpbpl), col);	// 8
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movb %cl, %al
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
movb %al, -0xd(%rbp)
movl $0x0, -0x30(%rbp)
cmpl $0x0, -0xc(%rbp)
jge 0x2bc0b
xorl %eax, %eax
subl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0x4(%rbp), %eax
addl -0xc(%rbp), %eax
cmpl $0x0, %eax
jl 0x2bc27
movl -0x4(%rbp), %eax
subl -0xc(%rbp), %eax
leaq 0xb47d1(%rip), %rcx     # 0xe03f4
cmpl (%rcx), %eax
jl 0x2bc2c
jmp 0x2c028
movl -0x8(%rbp), %eax
addl -0xc(%rbp), %eax
cmpl $0x0, %eax
jl 0x2bc45
movl -0x8(%rbp), %eax
subl -0xc(%rbp), %eax
cmpl 0x13e885(%rip), %eax    # 0x16a4c8
jl 0x2bc4a
jmp 0x2c028
movl $0x0, -0x14(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x18(%rbp)
movl $0x1, %eax
subl -0xc(%rbp), %eax
movl %eax, -0x24(%rbp)
movl $0x2, -0x28(%rbp)
movl -0xc(%rbp), %ecx
shll %ecx
movl $0x5, %eax
subl %ecx, %eax
movl %eax, -0x2c(%rbp)
movl 0x13e84e(%rip), %eax    # 0x16a4cc
addl -0x8(%rbp), %eax
leaq 0x18f15c(%rip), %rcx    # 0x1bade4
imull (%rcx), %eax
addl -0x4(%rbp), %eax
cltq
leaq 0x18ef79(%rip), %rcx    # 0x1bac10
addq (%rcx), %rax
movq %rax, -0x38(%rbp)
movl 0xb4314(%rip), %eax     # 0xdffb8
movl -0x30(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x30(%rbp)
andl $0x1f, %ecx
movslq %ecx, %rdx
leaq 0xb4fe4(%rip), %rcx     # 0xe0ca0
andl (%rcx,%rdx,4), %eax
cmpl $0x0, %eax
je 0x2bda0
movl -0x8(%rbp), %eax
cmpl 0x13e7f7(%rip), %eax    # 0x16a4c8
jae 0x2bcf8
movl -0x4(%rbp), %eax
addl -0xc(%rbp), %eax
leaq 0xb4714(%rip), %rcx     # 0xe03f4
cmpl (%rcx), %eax
jae 0x2bcf8
movq -0x38(%rbp), %rdi
movslq -0xc(%rbp), %rax
addq %rax, %rdi
movsbl -0xd(%rbp), %esi
callq 0x2bbc0
movl -0x4(%rbp), %eax
leaq 0xb46f2(%rip), %rcx     # 0xe03f4
cmpl (%rcx), %eax
jae 0x2bd33
movl -0x8(%rbp), %eax
addl -0xc(%rbp), %eax
cmpl 0x13e7b6(%rip), %eax    # 0x16a4c8
jae 0x2bd33
movq -0x38(%rbp), %rdi
movl -0xc(%rbp), %eax
leaq 0x18f0c2(%rip), %rcx    # 0x1bade4
imull (%rcx), %eax
cltq
addq %rax, %rdi
movsbl -0xd(%rbp), %esi
callq 0x2bbc0
movl -0x8(%rbp), %eax
cmpl 0x13e78c(%rip), %eax    # 0x16a4c8
jae 0x2bd63
movl -0x4(%rbp), %eax
subl -0xc(%rbp), %eax
leaq 0xb46a9(%rip), %rcx     # 0xe03f4
cmpl (%rcx), %eax
jae 0x2bd63
movq -0x38(%rbp), %rdi
movslq -0xc(%rbp), %rax
subq %rax, %rdi
movsbl -0xd(%rbp), %esi
callq 0x2bbc0
movl -0x4(%rbp), %eax
leaq 0xb4687(%rip), %rcx     # 0xe03f4
cmpl (%rcx), %eax
jae 0x2bd9e
movl -0x8(%rbp), %eax
subl -0xc(%rbp), %eax
cmpl 0x13e74b(%rip), %eax    # 0x16a4c8
jae 0x2bd9e
movq -0x38(%rbp), %rdi
movl -0xc(%rbp), %eax
leaq 0x18f057(%rip), %rcx    # 0x1bade4
imull (%rcx), %eax
cltq
subq %rax, %rdi
movsbl -0xd(%rbp), %esi
callq 0x2bbc0
jmp 0x2bda0
jmp 0x2bda2
movl -0x18(%rbp), %eax
cmpl -0x14(%rbp), %eax
jle 0x2c028
cmpl $0x0, -0x24(%rbp)
jge 0x2bdda
movl -0x28(%rbp), %eax
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x28(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x28(%rbp)
movl -0x2c(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x2c(%rbp)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x2be07
movl -0x2c(%rbp), %eax
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x28(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x28(%rbp)
movl -0x2c(%rbp), %eax
addl $0x4, %eax
movl %eax, -0x2c(%rbp)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
movl -0x18(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
leaq 0x18efd3(%rip), %rcx    # 0x1bade4
imull (%rcx), %eax
movl %eax, -0x20(%rbp)
movl -0x14(%rbp), %eax
leaq 0x18efc3(%rip), %rcx    # 0x1bade4
imull (%rcx), %eax
movl %eax, -0x1c(%rbp)
movl 0xb418b(%rip), %eax     # 0xdffb8
movl -0x30(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x30(%rbp)
andl $0x1f, %ecx
movslq %ecx, %rdx
leaq 0xb4e5b(%rip), %rcx     # 0xe0ca0
andl (%rcx,%rdx,4), %eax
cmpl $0x0, %eax
je 0x2c023
movl -0x4(%rbp), %eax
addl -0x18(%rbp), %eax
leaq 0xb4596(%rip), %rcx     # 0xe03f4
cmpl (%rcx), %eax
jae 0x2be8b
movl -0x8(%rbp), %eax
addl -0x14(%rbp), %eax
cmpl 0x13e65a(%rip), %eax    # 0x16a4c8
jae 0x2be8b
movq -0x38(%rbp), %rdi
movslq -0x18(%rbp), %rax
addq %rax, %rdi
movslq -0x1c(%rbp), %rax
addq %rax, %rdi
movsbl -0xd(%rbp), %esi
callq 0x2bbc0
movl -0x4(%rbp), %eax
addl -0x14(%rbp), %eax
leaq 0xb455c(%rip), %rcx     # 0xe03f4
cmpl (%rcx), %eax
jae 0x2bec5
movl -0x8(%rbp), %eax
addl -0x18(%rbp), %eax
cmpl 0x13e620(%rip), %eax    # 0x16a4c8
jae 0x2bec5
movq -0x38(%rbp), %rdi
movslq -0x14(%rbp), %rax
addq %rax, %rdi
movslq -0x20(%rbp), %rax
addq %rax, %rdi
movsbl -0xd(%rbp), %esi
callq 0x2bbc0
movl -0x4(%rbp), %eax
subl -0x14(%rbp), %eax
leaq 0xb4522(%rip), %rcx     # 0xe03f4
cmpl (%rcx), %eax
jae 0x2beff
movl -0x8(%rbp), %eax
addl -0x18(%rbp), %eax
cmpl 0x13e5e6(%rip), %eax    # 0x16a4c8
jae 0x2beff
movq -0x38(%rbp), %rdi
movslq -0x14(%rbp), %rax
subq %rax, %rdi
movslq -0x20(%rbp), %rax
addq %rax, %rdi
movsbl -0xd(%rbp), %esi
callq 0x2bbc0
movl -0x4(%rbp), %eax
subl -0x18(%rbp), %eax
leaq 0xb44e8(%rip), %rcx     # 0xe03f4
cmpl (%rcx), %eax
jae 0x2bf39
movl -0x8(%rbp), %eax
addl -0x14(%rbp), %eax
cmpl 0x13e5ac(%rip), %eax    # 0x16a4c8
jae 0x2bf39
movq -0x38(%rbp), %rdi
movslq -0x18(%rbp), %rax
subq %rax, %rdi
movslq -0x1c(%rbp), %rax
addq %rax, %rdi
movsbl -0xd(%rbp), %esi
callq 0x2bbc0
movl -0x4(%rbp), %eax
subl -0x18(%rbp), %eax
leaq 0xb44ae(%rip), %rcx     # 0xe03f4
cmpl (%rcx), %eax
jae 0x2bf73
movl -0x8(%rbp), %eax
subl -0x14(%rbp), %eax
cmpl 0x13e572(%rip), %eax    # 0x16a4c8
jae 0x2bf73
movq -0x38(%rbp), %rdi
movslq -0x18(%rbp), %rax
subq %rax, %rdi
movslq -0x1c(%rbp), %rax
subq %rax, %rdi
movsbl -0xd(%rbp), %esi
callq 0x2bbc0
movl -0x4(%rbp), %eax
subl -0x14(%rbp), %eax
leaq 0xb4474(%rip), %rcx     # 0xe03f4
cmpl (%rcx), %eax
jae 0x2bfad
movl -0x8(%rbp), %eax
subl -0x18(%rbp), %eax
cmpl 0x13e538(%rip), %eax    # 0x16a4c8
jae 0x2bfad
movq -0x38(%rbp), %rdi
movslq -0x14(%rbp), %rax
subq %rax, %rdi
movslq -0x20(%rbp), %rax
subq %rax, %rdi
movsbl -0xd(%rbp), %esi
callq 0x2bbc0
movl -0x4(%rbp), %eax
addl -0x14(%rbp), %eax
leaq 0xb443a(%rip), %rcx     # 0xe03f4
cmpl (%rcx), %eax
jae 0x2bfe7
movl -0x8(%rbp), %eax
subl -0x18(%rbp), %eax
cmpl 0x13e4fe(%rip), %eax    # 0x16a4c8
jae 0x2bfe7
movq -0x38(%rbp), %rdi
movslq -0x14(%rbp), %rax
addq %rax, %rdi
movslq -0x20(%rbp), %rax
subq %rax, %rdi
movsbl -0xd(%rbp), %esi
callq 0x2bbc0
movl -0x4(%rbp), %eax
addl -0x18(%rbp), %eax
leaq 0xb4400(%rip), %rcx     # 0xe03f4
cmpl (%rcx), %eax
jae 0x2c021
movl -0x8(%rbp), %eax
subl -0x14(%rbp), %eax
cmpl 0x13e4c4(%rip), %eax    # 0x16a4c8
jae 0x2c021
movq -0x38(%rbp), %rdi
movslq -0x18(%rbp), %rax
addq %rax, %rdi
movslq -0x1c(%rbp), %rax
subq %rax, %rdi
movsbl -0xd(%rbp), %esi
callq 0x2bbc0
jmp 0x2c023
jmp 0x2bda2
addq $0x40, %rsp
popq %rbp
retq
nop