// File: manikandan5[P]Image-Matching-Stitching-Warping/./CImg.h
// Function: void cimg_library::CImgDisplay::_render_resize<unsigned char, unsigned char>(unsigned char const*, unsigned int, unsigned int, unsigned char*, unsigned int, unsigned int)
static void _render_resize(const T *ptrs, const unsigned int ws, const unsigned int hs,
                               t *ptrd, const unsigned int wd, const unsigned int hd) {
      unsigned int *const offx = new unsigned int[wd], *const offy = new unsigned int[hd+1], *poffx, *poffy;
      float s, curr, old;
      s = (float)ws/wd;
      poffx = offx; curr = 0; for (unsigned int x = 0; x<wd; ++x) {
        old = curr; curr+=s; *(poffx++) = (unsigned int)curr - (unsigned int)old;
      }
      s = (float)hs/hd;
      poffy = offy; curr = 0; for (unsigned int y = 0; y<hd; ++y) {
        old = curr; curr+=s; *(poffy++) = ws*((unsigned int)curr - (unsigned int)old);
      }
      *poffy = 0;
      poffy = offy;
      for (unsigned int y = 0; y<hd; ) {
        const T *ptr = ptrs;
        poffx = offx;
        for (unsigned int x = 0; x<wd; ++x) { *(ptrd++) = *ptr; ptr+=*(poffx++); }
        ++y;
        unsigned int dy = *(poffy++);
        for ( ; !dy && y<hd; std::memcpy(ptrd,ptrd - wd,sizeof(t)*wd), ++y, ptrd+=wd, dy = *(poffy++)) {}
        ptrs+=dy;
      }
      delete[] offx; delete[] offy;
    }

// Assembly:
subq $0x88, %rsp
movq %rdi, 0x80(%rsp)
movl %esi, 0x7c(%rsp)
movl %edx, 0x78(%rsp)
movq %rcx, 0x70(%rsp)
movl %r8d, 0x6c(%rsp)
movl %r9d, 0x68(%rsp)
movl 0x6c(%rsp), %eax
movl %eax, %edi
shlq $0x2, %rdi
callq 0x5040
movq %rax, 0x60(%rsp)
movl 0x68(%rsp), %eax
incl %eax
movl %eax, %edi
shlq $0x2, %rdi
callq 0x5040
movq %rax, 0x58(%rsp)
movl 0x7c(%rsp), %eax
cvtsi2ss %rax, %xmm0
movl 0x6c(%rsp), %eax
cvtsi2ss %rax, %xmm1
divss %xmm1, %xmm0
movss %xmm0, 0x44(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x50(%rsp)
xorps %xmm0, %xmm0
movss %xmm0, 0x40(%rsp)
movl $0x0, 0x38(%rsp)
movl 0x38(%rsp), %eax
cmpl 0x6c(%rsp), %eax
jae 0x43575
movss 0x40(%rsp), %xmm0
movss %xmm0, 0x3c(%rsp)
movss 0x44(%rsp), %xmm1
movss 0x40(%rsp), %xmm0
addss %xmm1, %xmm0
movss %xmm0, 0x40(%rsp)
cvttss2si 0x40(%rsp), %rax
movl %eax, %ecx
cvttss2si 0x3c(%rsp), %rax
subl %eax, %ecx
movq 0x50(%rsp), %rax
movq %rax, %rdx
addq $0x4, %rdx
movq %rdx, 0x50(%rsp)
movl %ecx, (%rax)
movl 0x38(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x38(%rsp)
jmp 0x43517
movl 0x78(%rsp), %eax
cvtsi2ss %rax, %xmm0
movl 0x68(%rsp), %eax
cvtsi2ss %rax, %xmm1
divss %xmm1, %xmm0
movss %xmm0, 0x44(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x48(%rsp)
xorps %xmm0, %xmm0
movss %xmm0, 0x40(%rsp)
movl $0x0, 0x34(%rsp)
movl 0x34(%rsp), %eax
cmpl 0x68(%rsp), %eax
jae 0x4360f
movss 0x40(%rsp), %xmm0
movss %xmm0, 0x3c(%rsp)
movss 0x44(%rsp), %xmm1
movss 0x40(%rsp), %xmm0
addss %xmm1, %xmm0
movss %xmm0, 0x40(%rsp)
movl 0x7c(%rsp), %ecx
cvttss2si 0x40(%rsp), %rax
cvttss2si 0x3c(%rsp), %rdx
subl %edx, %eax
imull %eax, %ecx
movq 0x48(%rsp), %rax
movq %rax, %rdx
addq $0x4, %rdx
movq %rdx, 0x48(%rsp)
movl %ecx, (%rax)
movl 0x34(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x34(%rsp)
jmp 0x435ac
movq 0x48(%rsp), %rax
movl $0x0, (%rax)
movq 0x58(%rsp), %rax
movq %rax, 0x48(%rsp)
movl $0x0, 0x30(%rsp)
movl 0x30(%rsp), %eax
cmpl 0x68(%rsp), %eax
jae 0x43775
movq 0x80(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x50(%rsp)
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
cmpl 0x6c(%rsp), %eax
jae 0x436ac
movq 0x28(%rsp), %rax
movb (%rax), %cl
movq 0x70(%rsp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x70(%rsp)
movb %cl, (%rax)
movq 0x50(%rsp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, 0x50(%rsp)
movl (%rax), %ecx
movq 0x28(%rsp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, 0x28(%rsp)
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x43659
movl 0x30(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x30(%rsp)
movq 0x48(%rsp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, 0x48(%rsp)
movl (%rax), %eax
movl %eax, 0x20(%rsp)
xorl %eax, %eax
cmpl $0x0, 0x20(%rsp)
movb %al, 0x1f(%rsp)
jne 0x436ea
movl 0x30(%rsp), %eax
cmpl 0x68(%rsp), %eax
setb %al
movb %al, 0x1f(%rsp)
movb 0x1f(%rsp), %al
testb $0x1, %al
jne 0x436f4
jmp 0x43757
jmp 0x436f6
movq 0x70(%rsp), %rdi
movq 0x70(%rsp), %rsi
movl 0x6c(%rsp), %eax
movl %eax, %ecx
xorl %eax, %eax
subq %rcx, %rax
addq %rax, %rsi
movl 0x6c(%rsp), %eax
movl %eax, %edx
shlq $0x0, %rdx
callq 0x5420
movl 0x30(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x30(%rsp)
movl 0x6c(%rsp), %ecx
movq 0x70(%rsp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, 0x70(%rsp)
movq 0x48(%rsp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, 0x48(%rsp)
movl (%rax), %eax
movl %eax, 0x20(%rsp)
jmp 0x436ce
movl 0x20(%rsp), %ecx
movq 0x80(%rsp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, 0x80(%rsp)
jmp 0x4362c
movq 0x60(%rsp), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, %rax
je 0x4378f
movq 0x10(%rsp), %rdi
callq 0x5680
movq 0x58(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
je 0x437a9
movq 0x8(%rsp), %rdi
callq 0x5680
addq $0x88, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)