// File: /workspace/github_cpp_makefile_star2_O1/manikandan5[P]Image-Matching-Stitching-Warping/./CImg.h
// Function: void cimg_library::CImgDisplay::_render_resize<unsigned short, unsigned short>(unsigned short const*, unsigned int, unsigned int, unsigned short*, 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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r9d, %ebx
movl %r8d, %ebp
movq %rcx, %r14
movl %edx, 0x8(%rsp)
movl %esi, %r13d
movq %rdi, 0x10(%rsp)
movl %r8d, %r15d
leaq (,%r15,4), %rdi
callq 0x4040
movq %rax, %r12
movq %rbx, (%rsp)
leal 0x1(%rbx), %edi
shlq $0x2, %rdi
callq 0x4040
movq %r15, %r8
movl %ebp, 0x1c(%rsp)
testl %ebp, %ebp
je 0x291f7
movl %r13d, %ecx
cvtsi2ss %rcx, %xmm0
cvtsi2ss %r8, %xmm1
divss %xmm1, %xmm0
xorps %xmm1, %xmm1
xorl %esi, %esi
movaps %xmm0, %xmm2
addss %xmm1, %xmm2
cvttss2si %xmm2, %rcx
cvttss2si %xmm1, %rdx
subl %edx, %ecx
movl %ecx, (%r12,%rsi,4)
incq %rsi
movaps %xmm2, %xmm1
cmpl %esi, %r8d
jne 0x291d5
movq %rax, %rdi
cmpl $0x0, (%rsp)
je 0x29248
movl 0x8(%rsp), %ecx
xorps %xmm0, %xmm0
cvtsi2ss %rcx, %xmm0
movq (%rsp), %rcx
movl %ecx, %edx
xorps %xmm1, %xmm1
cvtsi2ss %rdx, %xmm1
divss %xmm1, %xmm0
xorps %xmm1, %xmm1
movq %rax, %rdi
movaps %xmm0, %xmm2
addss %xmm1, %xmm2
cvttss2si %xmm2, %rdx
cvttss2si %xmm1, %rsi
subl %esi, %edx
imull %r13d, %edx
movl %edx, (%rdi)
addq $0x4, %rdi
movaps %xmm2, %xmm1
decl %ecx
jne 0x29224
movq %rax, 0x8(%rsp)
movl $0x0, (%rdi)
cmpl $0x0, (%rsp)
movq 0x10(%rsp), %rdi
je 0x292ee
leaq (%r8,%r8), %r13
movq %r13, %r15
negq %r15
xorl %ebx, %ebx
movq 0x8(%rsp), %rbp
movq %r8, 0x20(%rsp)
cmpl $0x0, 0x1c(%rsp)
je 0x292a5
xorl %eax, %eax
xorl %ecx, %ecx
movq %rdi, %rdx
movzwl (%rdx), %esi
movw %si, (%r14,%rcx,2)
movl (%r12,%rcx,4), %esi
leaq (%rdx,%rsi,2), %rdx
incq %rcx
addq $-0x2, %rax
cmpl %ecx, %r8d
jne 0x29286
subq %rax, %r14
movq %rdi, 0x10(%rsp)
movl (%rbp), %eax
addq $0x4, %rbp
incl %ebx
testl %eax, %eax
jne 0x292d9
cmpl (%rsp), %ebx
jae 0x292d9
leaq (%r14,%r15), %rsi
movq %r14, %rdi
movq %r13, %rdx
callq 0x4430
movl (%rbp), %eax
addq $0x4, %rbp
incl %ebx
addq %r13, %r14
jmp 0x292b3
movl %eax, %eax
movq 0x10(%rsp), %rdi
leaq (%rdi,%rax,2), %rdi
cmpl (%rsp), %ebx
movq 0x20(%rsp), %r8
jb 0x29278
movq %r12, %rdi
callq 0x4680
movq 0x8(%rsp), %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4680