// File: /workspace/github_c_makefile_star2_O0/wjdready[P]arduboy2/./src/arduboy2/graph.cpp
// Function: graph::fillCircleHelper(short, short, unsigned char, unsigned char, short, unsigned char)
void graph::fillCircleHelper
(int16_t x0, int16_t y0, uint8_t r, uint8_t sides, int16_t delta,uint8_t color)
{
  int16_t f = 1 - r;
  int16_t ddF_x = 1;
  int16_t ddF_y = -2 * r;
  int16_t x = 0;
  int16_t y = r;

  while (x < y)
  {
    if (f >= 0)
    {
      y--;
      ddF_y += 2;
      f += ddF_y;
    }

    x++;
    ddF_x += 2;
    f += ddF_x;

    if (sides & 0x1) // right side
    {
      drawFastVLine(x0+x, y0-y, 2*y+1+delta, color);
      drawFastVLine(x0+y, y0-x, 2*x+1+delta, color);
    }

    if (sides & 0x2) // left side
    {
      drawFastVLine(x0-x, y0-y, 2*y+1+delta, color);
      drawFastVLine(x0-y, y0-x, 2*x+1+delta, color);
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %r8d, -0x38(%rbp)
movl %ecx, %eax
movl -0x38(%rbp), %ecx
movl %eax, -0x34(%rbp)
movl %edx, %eax
movl -0x34(%rbp), %edx
movl %eax, -0x30(%rbp)
movl %esi, %eax
movl -0x30(%rbp), %esi
movl %eax, -0x2c(%rbp)
movq %rdi, %r8
movl -0x2c(%rbp), %edi
movw %r9w, %ax
movb 0x10(%rbp), %r9b
movq %r8, -0x8(%rbp)
movw %di, -0xa(%rbp)
movw %si, -0xc(%rbp)
movb %dl, -0xd(%rbp)
movb %cl, -0xe(%rbp)
movw %ax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movzbl -0xd(%rbp), %ecx
movl $0x1, %eax
subl %ecx, %eax
movw %ax, -0x12(%rbp)
movw $0x1, -0x14(%rbp)
movzbl -0xd(%rbp), %eax
imull $0xfffffffe, %eax, %eax # imm = 0xFFFFFFFE
movw %ax, -0x16(%rbp)
movw $0x0, -0x18(%rbp)
movzbl -0xd(%rbp), %eax
movw %ax, -0x1a(%rbp)
movswl -0x18(%rbp), %eax
movswl -0x1a(%rbp), %ecx
cmpl %ecx, %eax
jge 0x2049
movswl -0x12(%rbp), %eax
cmpl $0x0, %eax
jl 0x1eff
movw -0x1a(%rbp), %ax
addw $-0x1, %ax
movw %ax, -0x1a(%rbp)
movswl -0x16(%rbp), %eax
addl $0x2, %eax
movw %ax, -0x16(%rbp)
movswl -0x16(%rbp), %ecx
movswl -0x12(%rbp), %eax
addl %ecx, %eax
movw %ax, -0x12(%rbp)
movw -0x18(%rbp), %ax
addw $0x1, %ax
movw %ax, -0x18(%rbp)
movswl -0x14(%rbp), %eax
addl $0x2, %eax
movw %ax, -0x14(%rbp)
movswl -0x14(%rbp), %ecx
movswl -0x12(%rbp), %eax
addl %ecx, %eax
movw %ax, -0x12(%rbp)
movzbl -0xe(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x1fb4
movq -0x28(%rbp), %rdi
movswl -0xa(%rbp), %eax
movswl -0x18(%rbp), %ecx
addl %ecx, %eax
movw %ax, %dx
movswl -0xc(%rbp), %eax
movswl -0x1a(%rbp), %ecx
subl %ecx, %eax
movw %ax, %cx
movswl -0x1a(%rbp), %eax
shll %eax
addl $0x1, %eax
movswl -0x10(%rbp), %esi
addl %esi, %eax
movswl %dx, %esi
movswl %cx, %edx
movzbl %al, %ecx
movzbl 0x10(%rbp), %r8d
callq 0x19b0
movq -0x28(%rbp), %rdi
movswl -0xa(%rbp), %eax
movswl -0x1a(%rbp), %ecx
addl %ecx, %eax
movw %ax, %dx
movswl -0xc(%rbp), %eax
movswl -0x18(%rbp), %ecx
subl %ecx, %eax
movw %ax, %cx
movswl -0x18(%rbp), %eax
shll %eax
addl $0x1, %eax
movswl -0x10(%rbp), %esi
addl %esi, %eax
movswl %dx, %esi
movswl %cx, %edx
movzbl %al, %ecx
movzbl 0x10(%rbp), %r8d
callq 0x19b0
movzbl -0xe(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x2044
movq -0x28(%rbp), %rdi
movswl -0xa(%rbp), %eax
movswl -0x18(%rbp), %ecx
subl %ecx, %eax
movw %ax, %dx
movswl -0xc(%rbp), %eax
movswl -0x1a(%rbp), %ecx
subl %ecx, %eax
movw %ax, %cx
movswl -0x1a(%rbp), %eax
shll %eax
addl $0x1, %eax
movswl -0x10(%rbp), %esi
addl %esi, %eax
movswl %dx, %esi
movswl %cx, %edx
movzbl %al, %ecx
movzbl 0x10(%rbp), %r8d
callq 0x19b0
movq -0x28(%rbp), %rdi
movswl -0xa(%rbp), %eax
movswl -0x1a(%rbp), %ecx
subl %ecx, %eax
movw %ax, %dx
movswl -0xc(%rbp), %eax
movswl -0x18(%rbp), %ecx
subl %ecx, %eax
movw %ax, %cx
movswl -0x18(%rbp), %eax
shll %eax
addl $0x1, %eax
movswl -0x10(%rbp), %esi
addl %esi, %eax
movswl %dx, %esi
movswl %cx, %edx
movzbl %al, %ecx
movzbl 0x10(%rbp), %r8d
callq 0x19b0
jmp 0x1ec1
addq $0x40, %rsp
popq %rbp
retq
nop