// File: /workspace/github_c_makefile_star2_O0/adelciotto[P]scg/examples/../scg.h
// Function: scg_image_fill_circle
void scg_image_fill_circle(scg_image_t *image, int x, int y, int r,
                           scg_pixel_t color) {
    int f = 1 - r;
    int ddf_x = 0;
    int ddf_y = -2 * r;
    int xi = 0;
    int yi = r;

    scg_image_draw_line(image, x, y - r, x, y + r, color);
    scg_image_draw_line(image, x - r, y, x + r, y, color);

    while (xi < yi) {
        if (f >= 0) {
            yi--;
            ddf_y += 2;
            f += ddf_y;
        }

        xi++;
        ddf_x += 2;
        f += ddf_x + 1;

        scg_image_draw_line(image, x - xi, y + yi, x + xi, y + yi, color);
        scg_image_draw_line(image, x - xi, y - yi, x + xi, y - yi, color);
        scg_image_draw_line(image, x - yi, y + xi, x + yi, y + xi, color);
        scg_image_draw_line(image, x - yi, y - xi, x + yi, y - xi, color);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %r8d, -0x4(%rbp)
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl $0x1, %eax
subl -0x1c(%rbp), %eax
movl %eax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
imull $0xfffffffe, -0x1c(%rbp), %eax # imm = 0xFFFFFFFE
movl %eax, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movl -0x18(%rbp), %edx
subl -0x1c(%rbp), %edx
movl -0x14(%rbp), %ecx
movl -0x18(%rbp), %r8d
addl -0x1c(%rbp), %r8d
movl -0x4(%rbp), %r9d
callq 0x3a80
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
subl -0x1c(%rbp), %esi
movl -0x18(%rbp), %edx
movl -0x14(%rbp), %ecx
addl -0x1c(%rbp), %ecx
movl -0x18(%rbp), %r8d
movl -0x4(%rbp), %r9d
callq 0x3a80
movl -0x2c(%rbp), %eax
cmpl -0x30(%rbp), %eax
jge 0x407f
cmpl $0x0, -0x20(%rbp)
jl 0x3fc0
movl -0x30(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x30(%rbp)
movl -0x28(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
addl -0x20(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
movl -0x24(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
addl $0x1, %eax
addl -0x20(%rbp), %eax
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
subl -0x2c(%rbp), %esi
movl -0x18(%rbp), %edx
addl -0x30(%rbp), %edx
movl -0x14(%rbp), %ecx
addl -0x2c(%rbp), %ecx
movl -0x18(%rbp), %r8d
addl -0x30(%rbp), %r8d
movl -0x4(%rbp), %r9d
callq 0x3a80
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
subl -0x2c(%rbp), %esi
movl -0x18(%rbp), %edx
subl -0x30(%rbp), %edx
movl -0x14(%rbp), %ecx
addl -0x2c(%rbp), %ecx
movl -0x18(%rbp), %r8d
subl -0x30(%rbp), %r8d
movl -0x4(%rbp), %r9d
callq 0x3a80
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
subl -0x30(%rbp), %esi
movl -0x18(%rbp), %edx
addl -0x2c(%rbp), %edx
movl -0x14(%rbp), %ecx
addl -0x30(%rbp), %ecx
movl -0x18(%rbp), %r8d
addl -0x2c(%rbp), %r8d
movl -0x4(%rbp), %r9d
callq 0x3a80
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
subl -0x30(%rbp), %esi
movl -0x18(%rbp), %edx
subl -0x2c(%rbp), %edx
movl -0x14(%rbp), %ecx
addl -0x30(%rbp), %ecx
movl -0x18(%rbp), %r8d
subl -0x2c(%rbp), %r8d
movl -0x4(%rbp), %r9d
callq 0x3a80
jmp 0x3f93
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)