// File: /workspace/github_c_makefile_star2_O0/nkanaev[P]tipsy/src/tigr.c
// Function: tigrBlit
void tigrBlit(Tigr* dst, Tigr* src, int dx, int dy, int sx, int sy, int w, int h) {
    int cw = dst->cw >= 0 ? dst->cw : dst->w;
    int ch = dst->ch >= 0 ? dst->ch : dst->h;

    CLIP();

    TPixel* ts = &src->pix[sy * src->w + sx];
    TPixel* td = &dst->pix[dy * dst->w + dx];
    int st = src->w;
    int dt = dst->w;
    do {
        memcpy(td, ts, w * sizeof(TPixel));
        ts += st;
        td += dt;
    } while (--h);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movl 0x18(%rbp), %eax
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl %r8d, -0x1c(%rbp)
movl %r9d, -0x20(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x10(%rax)
jl 0x47ea
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x54(%rbp)
jmp 0x47f3
movq -0x8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x54(%rbp)
movl -0x54(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x14(%rax)
jl 0x480f
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, -0x58(%rbp)
jmp 0x4819
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x58(%rbp)
movl -0x58(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x4855
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
subl -0x14(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %ecx
movl 0x10(%rbp), %eax
subl %ecx, %eax
movl %eax, 0x10(%rbp)
movl -0x2c(%rbp), %eax
addl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x2c(%rbp), %eax
addl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x18(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jge 0x488b
movq -0x8(%rbp), %rax
movl 0xc(%rax), %eax
subl -0x18(%rbp), %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %ecx
movl 0x18(%rbp), %eax
subl %ecx, %eax
movl %eax, 0x18(%rbp)
movl -0x30(%rbp), %eax
addl -0x20(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x30(%rbp), %eax
addl -0x18(%rbp), %eax
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x1c(%rbp)
jge 0x48b6
xorl %eax, %eax
subl -0x1c(%rbp), %eax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %ecx
movl 0x10(%rbp), %eax
subl %ecx, %eax
movl %eax, 0x10(%rbp)
movl -0x34(%rbp), %eax
addl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x34(%rbp), %eax
addl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x20(%rbp)
jge 0x48e1
xorl %eax, %eax
subl -0x20(%rbp), %eax
movl %eax, -0x38(%rbp)
movl -0x38(%rbp), %ecx
movl 0x18(%rbp), %eax
subl %ecx, %eax
movl %eax, 0x18(%rbp)
movl -0x38(%rbp), %eax
addl -0x18(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x38(%rbp), %eax
addl -0x20(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x14(%rbp), %eax
addl 0x10(%rbp), %eax
movq -0x8(%rbp), %rcx
movl 0x8(%rcx), %ecx
addl -0x24(%rbp), %ecx
cmpl %ecx, %eax
jle 0x4905
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
addl -0x24(%rbp), %eax
subl -0x14(%rbp), %eax
movl %eax, 0x10(%rbp)
movl -0x18(%rbp), %eax
addl 0x18(%rbp), %eax
movq -0x8(%rbp), %rcx
movl 0xc(%rcx), %ecx
addl -0x28(%rbp), %ecx
cmpl %ecx, %eax
jle 0x4929
movq -0x8(%rbp), %rax
movl 0xc(%rax), %eax
addl -0x28(%rbp), %eax
subl -0x18(%rbp), %eax
movl %eax, 0x18(%rbp)
movl -0x1c(%rbp), %eax
addl 0x10(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl (%rcx), %eax
jle 0x4943
movq -0x10(%rbp), %rax
movl (%rax), %eax
subl -0x1c(%rbp), %eax
movl %eax, 0x10(%rbp)
movl -0x20(%rbp), %eax
addl 0x18(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jle 0x495f
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
subl -0x20(%rbp), %eax
movl %eax, 0x18(%rbp)
cmpl $0x0, 0x10(%rbp)
jle 0x496b
cmpl $0x0, 0x18(%rbp)
jg 0x4970
jmp 0x4a15
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x20(%rbp), %ecx
movq -0x10(%rbp), %rdx
imull (%rdx), %ecx
addl -0x1c(%rbp), %ecx
movslq %ecx, %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x18(%rbp), %ecx
movq -0x8(%rbp), %rdx
imull (%rdx), %ecx
addl -0x14(%rbp), %ecx
movslq %ecx, %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x4c(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x50(%rbp)
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %rsi
movslq 0x10(%rbp), %rdx
shlq $0x2, %rdx
callq 0x32d0
movl -0x4c(%rbp), %ecx
movq -0x40(%rbp), %rax
movslq %ecx, %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movl -0x50(%rbp), %ecx
movq -0x48(%rbp), %rax
movslq %ecx, %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movl 0x18(%rbp), %eax
addl $-0x1, %eax
movl %eax, 0x18(%rbp)
cmpl $0x0, %eax
jne 0x49c8
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax,%rax)