// File: /workspace/github_c_makefile_star2_O0/wjdready[P]arduboy2/./src/arduboy2/graph.cpp
// Function: graph::drawRoundRect(short, short, unsigned char, unsigned char, unsigned char, unsigned char)
void graph::drawRoundRect(int16_t x, int16_t y, uint8_t w, uint8_t h, uint8_t r, uint8_t color)
{
  // smarter version
  drawFastHLine(x+r, y, w-2*r, color); // Top
  drawFastHLine(x+r, y+h-1, w-2*r, color); // Bottom
  drawFastVLine(x, y+r, h-2*r, color); // Left
  drawFastVLine(x+w-1, y+r, h-2*r, color); // Right
  // draw four corners
  drawCircleHelper(x+r, y+r, r, 1, color);
  drawCircleHelper(x+w-r-1, y+r, r, 2, color);
  drawCircleHelper(x+w-r-1, y+h-r-1, r, 4, color);
  drawCircleHelper(x+r, y+h-r-1, r, 8, color);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %r8d, -0x28(%rbp)
movl %ecx, %eax
movl -0x28(%rbp), %ecx
movl %eax, -0x24(%rbp)
movl %edx, %eax
movl -0x24(%rbp), %edx
movl %eax, -0x20(%rbp)
movl %esi, %eax
movl -0x20(%rbp), %esi
movl %eax, -0x1c(%rbp)
movq %rdi, %r8
movl -0x1c(%rbp), %edi
movb %r9b, %al
movb 0x10(%rbp), %r9b
movq %r8, -0x8(%rbp)
movw %di, -0xa(%rbp)
movw %si, -0xc(%rbp)
movb %dl, -0xd(%rbp)
movb %cl, -0xe(%rbp)
movb %al, -0xf(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
movswl -0xa(%rbp), %eax
movzbl -0xf(%rbp), %ecx
addl %ecx, %eax
movw %ax, %dx
movw -0xc(%rbp), %cx
movzbl -0xd(%rbp), %eax
movzbl -0xf(%rbp), %esi
shll %esi
subl %esi, %eax
movswl %dx, %esi
movswl %cx, %edx
movzbl %al, %ecx
movzbl 0x10(%rbp), %r8d
callq 0x1a20
movq -0x18(%rbp), %rdi
movswl -0xa(%rbp), %eax
movzbl -0xf(%rbp), %ecx
addl %ecx, %eax
movw %ax, %dx
movswl -0xc(%rbp), %eax
movzbl -0xe(%rbp), %ecx
addl %ecx, %eax
subl $0x1, %eax
movw %ax, %cx
movzbl -0xd(%rbp), %eax
movzbl -0xf(%rbp), %esi
shll %esi
subl %esi, %eax
movswl %dx, %esi
movswl %cx, %edx
movzbl %al, %ecx
movzbl 0x10(%rbp), %r8d
callq 0x1a20
movq -0x18(%rbp), %rdi
movw -0xa(%rbp), %dx
movswl -0xc(%rbp), %eax
movzbl -0xf(%rbp), %ecx
addl %ecx, %eax
movw %ax, %cx
movzbl -0xe(%rbp), %eax
movzbl -0xf(%rbp), %esi
shll %esi
subl %esi, %eax
movswl %dx, %esi
movswl %cx, %edx
movzbl %al, %ecx
movzbl 0x10(%rbp), %r8d
callq 0x19b0
movq -0x18(%rbp), %rdi
movswl -0xa(%rbp), %eax
movzbl -0xd(%rbp), %ecx
addl %ecx, %eax
subl $0x1, %eax
movw %ax, %dx
movswl -0xc(%rbp), %eax
movzbl -0xf(%rbp), %ecx
addl %ecx, %eax
movw %ax, %cx
movzbl -0xe(%rbp), %eax
movzbl -0xf(%rbp), %esi
shll %esi
subl %esi, %eax
movswl %dx, %esi
movswl %cx, %edx
movzbl %al, %ecx
movzbl 0x10(%rbp), %r8d
callq 0x19b0
movq -0x18(%rbp), %rdi
movswl -0xa(%rbp), %eax
movzbl -0xf(%rbp), %ecx
addl %ecx, %eax
movw %ax, %dx
movswl -0xc(%rbp), %eax
movzbl -0xf(%rbp), %ecx
addl %ecx, %eax
movw %ax, %cx
movb -0xf(%rbp), %al
movl $0x1, %r8d
movswl %dx, %esi
movswl %cx, %edx
movzbl %al, %ecx
movzbl 0x10(%rbp), %r9d
callq 0x1c10
movq -0x18(%rbp), %rdi
movswl -0xa(%rbp), %eax
movzbl -0xd(%rbp), %ecx
addl %ecx, %eax
movzbl -0xf(%rbp), %ecx
subl %ecx, %eax
subl $0x1, %eax
movw %ax, %dx
movswl -0xc(%rbp), %eax
movzbl -0xf(%rbp), %ecx
addl %ecx, %eax
movw %ax, %cx
movb -0xf(%rbp), %al
movl $0x2, %r8d
movswl %dx, %esi
movswl %cx, %edx
movzbl %al, %ecx
movzbl 0x10(%rbp), %r9d
callq 0x1c10
movq -0x18(%rbp), %rdi
movswl -0xa(%rbp), %eax
movzbl -0xd(%rbp), %ecx
addl %ecx, %eax
movzbl -0xf(%rbp), %ecx
subl %ecx, %eax
subl $0x1, %eax
movw %ax, %dx
movswl -0xc(%rbp), %eax
movzbl -0xe(%rbp), %ecx
addl %ecx, %eax
movzbl -0xf(%rbp), %ecx
subl %ecx, %eax
subl $0x1, %eax
movw %ax, %cx
movb -0xf(%rbp), %al
movl $0x4, %r8d
movswl %dx, %esi
movswl %cx, %edx
movzbl %al, %ecx
movzbl 0x10(%rbp), %r9d
callq 0x1c10
movq -0x18(%rbp), %rdi
movswl -0xa(%rbp), %eax
movzbl -0xf(%rbp), %ecx
addl %ecx, %eax
movw %ax, %dx
movswl -0xc(%rbp), %eax
movzbl -0xe(%rbp), %ecx
addl %ecx, %eax
movzbl -0xf(%rbp), %ecx
subl %ecx, %eax
subl $0x1, %eax
movw %ax, %cx
movb -0xf(%rbp), %al
movl $0x8, %r8d
movswl %dx, %esi
movswl %cx, %edx
movzbl %al, %ecx
movzbl 0x10(%rbp), %r9d
callq 0x1c10
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)