// File: /workspace/github_cpp_makefile_star2_O3/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 $0x38, %rsp
movl %r9d, %ebx
movl %r8d, %r15d
movq %rcx, %r14
movl %edx, 0x10(%rsp)
movl %esi, %ebp
movq %rdi, 0x18(%rsp)
movl %r8d, %r13d
leaq (,%r13,4), %rdi
callq 0x4040
movq %rax, %r12
movq %rbx, 0x8(%rsp)
leal 0x1(%rbx), %edi
shlq $0x2, %rdi
callq 0x4040
movq %r13, %r8
movq %rax, 0x28(%rsp)
movl %r15d, 0x24(%rsp)
testl %r15d, %r15d
je 0x275e3
movl %ebp, %eax
cvtsi2ss %rax, %xmm0
cvtsi2ss %r8, %xmm1
divss %xmm1, %xmm0
xorps %xmm1, %xmm1
xorl %eax, %eax
movaps %xmm0, %xmm2
addss %xmm1, %xmm2
cvttss2si %xmm2, %rcx
cvttss2si %xmm1, %rdx
subl %edx, %ecx
movl %ecx, (%r12,%rax,4)
incq %rax
movaps %xmm2, %xmm1
cmpl %eax, %r8d
jne 0x275c1
cmpl $0x0, 0x8(%rsp)
movq 0x18(%rsp), %rdi
je 0x276e3
movl 0x10(%rsp), %eax
xorps %xmm0, %xmm0
cvtsi2ss %rax, %xmm0
movl 0x8(%rsp), %esi
xorps %xmm1, %xmm1
cvtsi2ss %rsi, %xmm1
divss %xmm1, %xmm0
xorps %xmm1, %xmm1
xorl %eax, %eax
movq 0x28(%rsp), %r13
movaps %xmm0, %xmm2
addss %xmm1, %xmm2
cvttss2si %xmm2, %rcx
cvttss2si %xmm1, %rdx
subl %edx, %ecx
imull %ebp, %ecx
movl %ecx, (%r13,%rax,4)
incq %rax
movaps %xmm2, %xmm1
cmpl %eax, %esi
jne 0x27619
movq %rsi, 0x10(%rsp)
movl $0x0, (%r13,%rax,4)
leaq (%r8,%r8), %rbp
movq %rbp, %r15
negq %r15
xorl %ebx, %ebx
movq %r8, 0x30(%rsp)
cmpl $0x0, 0x24(%rsp)
je 0x2768a
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 0x2766b
subq %rax, %r14
movq %rdi, 0x18(%rsp)
movl (%r13), %eax
addq $0x4, %r13
incl %ebx
testl %eax, %eax
jne 0x276c9
cmpl 0x10(%rsp), %ebx
jae 0x276c9
leaq (%r14,%r15), %rsi
movq %r14, %rdi
movq %rbp, %rdx
callq 0x4440
movl (%r13), %eax
addq $0x4, %r13
incl %ebx
addq %rbp, %r14
testl %eax, %eax
jne 0x276c9
cmpl 0x8(%rsp), %ebx
jb 0x276a3
movl %eax, %eax
movq 0x18(%rsp), %rdi
leaq (%rdi,%rax,2), %rdi
cmpl 0x8(%rsp), %ebx
movq 0x30(%rsp), %r8
jb 0x2765d
movq %r12, %rdi
callq 0x4690
movq 0x28(%rsp), %rdi
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4690
nop