// File: /workspace/github_c_makefile_star2_O2/nkanaev[P]tipsy/src/tigr.c
// Function: tigrCircle
void tigrCircle(Tigr* bmp, int x0, int y0, int r, TPixel color) {
    int E = 1 - r;
    int dx = 0;
    int dy = -2 * r;
    int x = 0;
    int y = r;

    tigrPlot(bmp, x0, y0 + r, color);
    tigrPlot(bmp, x0, y0 - r, color);
    tigrPlot(bmp, x0 + r, y0, color);
    tigrPlot(bmp, x0 - r, y0, color);

    while (x < y - 1) {
        x++;

        if (E >= 0) {
            y--;
            dy += 2;
            E += dy;
        }

        dx += 2;
        E += dx + 1;

        tigrPlot(bmp, x0 + x, y0 + y, color);
        tigrPlot(bmp, x0 - x, y0 + y, color);
        tigrPlot(bmp, x0 + x, y0 - y, color);
        tigrPlot(bmp, x0 - x, y0 - y, color);

        if (x != y) {
            tigrPlot(bmp, x0 + y, y0 + x, color);
            tigrPlot(bmp, x0 - y, y0 + x, color);
            tigrPlot(bmp, x0 + y, y0 - x, color);
            tigrPlot(bmp, x0 - y, y0 - x, color);
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %r8d, %ebx
movl %ecx, %r14d
movl %edx, %r15d
movl %esi, %r12d
movq %rdi, %r13
pushq $0x1
popq %rbp
subl %ecx, %ebp
leal (%r14,%r14), %eax
negl %eax
movq %rax, 0x28(%rsp)
leal (%r14,%r15), %edx
movl %r8d, %ecx
callq 0x3c2e
movl %r15d, %edx
subl %r14d, %edx
movq %r13, %rdi
movl %r12d, %esi
movl %ebx, %ecx
callq 0x3c2e
leal (%r14,%r12), %esi
movq %r13, %rdi
movl %r15d, %edx
movl %ebx, %ecx
callq 0x3c2e
movl %r12d, %esi
subl %r14d, %esi
movq %r13, 0x18(%rsp)
movq %r13, %rdi
movq %r14, %r13
movl %r15d, %edx
movl %ebx, 0x8(%rsp)
movl %ebx, %ecx
callq 0x3c2e
leal 0x1(%r15), %eax
movl %eax, 0x4(%rsp)
movq %r15, 0x38(%rsp)
leal -0x1(%r15), %eax
movl %eax, (%rsp)
pushq $0x1
popq %r15
movq %r12, 0x20(%rsp)
leal -0x1(%r12), %eax
movl %eax, 0xc(%rsp)
xorl %edx, %edx
leal -0x1(%r15), %ecx
leal -0x1(%r13), %eax
cmpl %eax, %ecx
jge 0x42b7
movl %edx, 0x14(%rsp)
movq 0x28(%rsp), %rdx
leal 0x2(%rdx), %ecx
movq %rbp, 0x48(%rsp)
testl %ebp, %ebp
movl $0x0, %esi
cmovnsl %ecx, %esi
movq %rsi, 0x40(%rsp)
cmovnsl %ecx, %edx
movq %rdx, 0x28(%rsp)
cmovnsl %eax, %r13d
movq %r13, 0x30(%rsp)
movq 0x20(%rsp), %rax
leal (%rax,%r15), %ebp
movq 0x38(%rsp), %rbx
leal (%r13,%rbx), %r12d
movq 0x18(%rsp), %r14
movq %r14, %rdi
movl %ebp, %esi
movl %r12d, %edx
movq %r15, 0x50(%rsp)
movl 0x8(%rsp), %r13d
movl %r13d, %ecx
callq 0x3c2e
movq %r14, %rdi
movl 0xc(%rsp), %r15d
movl %r15d, %esi
movl %r12d, %edx
movl %r13d, %ecx
callq 0x3c2e
movl %ebx, %r12d
subl 0x30(%rsp), %r12d
movq %r14, %rdi
movl %ebp, %esi
movl %r12d, %edx
movl %r13d, %ecx
callq 0x3c2e
movq %r14, %rdi
movl %r15d, %esi
movl %r12d, %edx
movl %r13d, %ecx
movq 0x30(%rsp), %r13
movq 0x50(%rsp), %r15
callq 0x3c2e
cmpl %r13d, %r15d
je 0x428c
movq 0x20(%rsp), %r12
leal (%r12,%r13), %esi
movl %esi, 0x10(%rsp)
movq 0x18(%rsp), %r14
movq %r14, %rdi
movl 0x4(%rsp), %ebp
movl %ebp, %edx
movl 0x8(%rsp), %ebx
movl %ebx, %ecx
callq 0x3c2e
subl %r13d, %r12d
movq %r14, %rdi
movl %r12d, %esi
movl %ebp, %edx
movl %ebx, %ecx
callq 0x3c2e
movq %r14, %rdi
movl 0x10(%rsp), %esi
movl (%rsp), %ebp
movl %ebp, %edx
movl %ebx, %ecx
callq 0x3c2e
movq %r14, %rdi
movl %r12d, %esi
movl %ebp, %edx
movl %ebx, %ecx
callq 0x3c2e
movq 0x48(%rsp), %rbp
movl 0x14(%rsp), %edx
addl %edx, %ebp
movq 0x40(%rsp), %rax
addl %eax, %ebp
addl $0x3, %ebp
incl 0x4(%rsp)
decl (%rsp)
incl %r15d
decl 0xc(%rsp)
addl $0x2, %edx
jmp 0x4171
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq