// File: /workspace/github_c_makefile_star2_O0/nkanaev[P]tipsy/src/tigr.c
// Function: tigrPlot
void tigrPlot(Tigr* bmp, int x, int y, TPixel pix) {
    int xa, i, a;

    int cx = bmp->cx;
    int cy = bmp->cy;
    int cw = bmp->cw >= 0 ? bmp->cw : bmp->w;
    int ch = bmp->ch >= 0 ? bmp->ch : bmp->h;

    if (x >= cx && y >= cy && x < cx + cw && y < cy + ch) {
        xa = EXPAND(pix.a);
        a = xa * xa;
        i = y * bmp->w + x;

        bmp->pix[i].r += (unsigned char)((pix.r - bmp->pix[i].r) * a >> 16);
        bmp->pix[i].g += (unsigned char)((pix.g - bmp->pix[i].g) * a >> 16);
        bmp->pix[i].b += (unsigned char)((pix.b - bmp->pix[i].b) * a >> 16);
        bmp->pix[i].a += (bmp->blitMode) * (unsigned char)((pix.a - bmp->pix[i].a) * a >> 16);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %ecx, -0x4(%rbp)
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x10(%rax)
jl 0x3ecb
movq -0x10(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x38(%rbp)
jmp 0x3ed4
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x38(%rbp)
movl -0x38(%rbp), %eax
movl %eax, -0x30(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x14(%rax)
jl 0x3ef0
movq -0x10(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, -0x3c(%rbp)
jmp 0x3efa
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movl %eax, -0x34(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x28(%rbp), %eax
jl 0x4054
movl -0x18(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jl 0x4054
movl -0x14(%rbp), %eax
movl -0x28(%rbp), %ecx
addl -0x30(%rbp), %ecx
cmpl %ecx, %eax
jge 0x4054
movl -0x18(%rbp), %eax
movl -0x2c(%rbp), %ecx
addl -0x34(%rbp), %ecx
cmpl %ecx, %eax
jge 0x4054
movzbl -0x1(%rbp), %eax
movzbl -0x1(%rbp), %ecx
cmpl $0x0, %ecx
setg %cl
andb $0x1, %cl
movzbl %cl, %ecx
addl %ecx, %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
imull -0x1c(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x18(%rbp), %eax
movq -0x10(%rbp), %rcx
imull (%rcx), %eax
addl -0x14(%rbp), %eax
movl %eax, -0x20(%rbp)
movzbl -0x4(%rbp), %eax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rcx
movslq -0x20(%rbp), %rdx
movzbl (%rcx,%rdx,4), %ecx
subl %ecx, %eax
imull -0x24(%rbp), %eax
sarl $0x10, %eax
movzbl %al, %esi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x20(%rbp), %rcx
movzbl (%rax,%rcx,4), %edx
addl %esi, %edx
movb %dl, (%rax,%rcx,4)
movzbl -0x3(%rbp), %eax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rcx
movslq -0x20(%rbp), %rdx
movzbl 0x1(%rcx,%rdx,4), %ecx
subl %ecx, %eax
imull -0x24(%rbp), %eax
sarl $0x10, %eax
movzbl %al, %esi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x20(%rbp), %rcx
movzbl 0x1(%rax,%rcx,4), %edx
addl %esi, %edx
movb %dl, 0x1(%rax,%rcx,4)
movzbl -0x2(%rbp), %eax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rcx
movslq -0x20(%rbp), %rdx
movzbl 0x2(%rcx,%rdx,4), %ecx
subl %ecx, %eax
imull -0x24(%rbp), %eax
sarl $0x10, %eax
movzbl %al, %esi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x20(%rbp), %rcx
movzbl 0x2(%rax,%rcx,4), %edx
addl %esi, %edx
movb %dl, 0x2(%rax,%rcx,4)
movq -0x10(%rbp), %rax
movl 0x28(%rax), %esi
movzbl -0x1(%rbp), %eax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rcx
movslq -0x20(%rbp), %rdx
movzbl 0x3(%rcx,%rdx,4), %ecx
subl %ecx, %eax
imull -0x24(%rbp), %eax
sarl $0x10, %eax
movzbl %al, %eax
imull %eax, %esi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x20(%rbp), %rcx
movzbl 0x3(%rax,%rcx,4), %edx
addl %esi, %edx
movb %dl, 0x3(%rax,%rcx,4)
popq %rbp
retq
nopw %cs:(%rax,%rax)