// File: /workspace/github_cpp_makefile_star2_O2/manikandan5[P]Image-Matching-Stitching-Warping/./CImg.h
// Function: cimg_library::CImg<double>& cimg_library::CImg<double>::draw_line<double>(int, int, int, int, double const*, float, unsigned int, bool)
CImg<T>& draw_line(const int x0, const int y0,
                       const int x1, const int y1,
                       const tc *const color, const float opacity=1,
                       const unsigned int pattern=~0U, const bool init_hatch=true) {
      if (is_empty()) return *this;
      if (!color)
        throw CImgArgumentException(_cimg_instance
                                    "draw_line(): Specified color is (null).",
                                    cimg_instance);
      static unsigned int hatch = ~0U - (~0U>>1);
      if (init_hatch) hatch = ~0U - (~0U>>1);
      const bool xdir = x0<x1, ydir = y0<y1;
      int
        nx0 = x0, nx1 = x1, ny0 = y0, ny1 = y1,
        &xleft = xdir?nx0:nx1, &yleft = xdir?ny0:ny1,
        &xright = xdir?nx1:nx0, &yright = xdir?ny1:ny0,
        &xup = ydir?nx0:nx1, &yup = ydir?ny0:ny1,
        &xdown = ydir?nx1:nx0, &ydown = ydir?ny1:ny0;
      if (xright<0 || xleft>=width()) return *this;
      if (xleft<0) { yleft-=(int)((float)xleft*((float)yright - yleft)/((float)xright - xleft)); xleft = 0; }
      if (xright>=width()) {
        yright-=(int)(((float)xright - width())*((float)yright - yleft)/((float)xright - xleft));
        xright = width() - 1;
      }
      if (ydown<0 || yup>=height()) return *this;
      if (yup<0) { xup-=(int)((float)yup*((float)xdown - xup)/((float)ydown - yup)); yup = 0; }
      if (ydown>=height()) {
        xdown-=(int)(((float)ydown - height())*((float)xdown - xup)/((float)ydown - yup));
        ydown = height() - 1;
      }
      T *ptrd0 = data(nx0,ny0);
      int dx = xright - xleft, dy = ydown - yup;
      const bool steep = dy>dx;
      if (steep) cimg::swap(nx0,ny0,nx1,ny1,dx,dy);
      const long
        offx = (nx0<nx1?1:-1)*(steep?width():1),
        offy = (ny0<ny1?1:-1)*(steep?1:width());
      const unsigned long wh = (unsigned long)_width*_height;
      if (opacity>=1) {
        if (~pattern) for (int error = dx>>1, x = 0; x<=dx; ++x) {
          if (pattern&hatch) {
            T *ptrd = ptrd0; const tc* col = color;
            cimg_forC(*this,c) { *ptrd = (T)*(col++); ptrd+=wh; }
          }
          hatch>>=1; if (!hatch) hatch = ~0U - (~0U>>1);
          ptrd0+=offx;
          if ((error-=dy)<0) { ptrd0+=offy; error+=dx; }
        } else for (int error = dx>>1, x = 0; x<=dx; ++x) {
          T *ptrd = ptrd0; const tc* col = color; cimg_forC(*this,c) { *ptrd = (T)*(col++); ptrd+=wh; }
          ptrd0+=offx;
          if ((error-=dy)<0) { ptrd0+=offy; error+=dx; }
        }
      }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movaps %xmm0, (%rsp)
movq %r9, %r14
movl %r8d, %ebp
movl %ecx, %r12d
movl %edx, %r15d
movl %esi, %r13d
movq %rdi, %rbx
callq 0x8dc8
testb %al, %al
jne 0x8d35
testq %r14, %r14
je 0x8d47
cmpb $0x0, 0x58(%rsp)
je 0x884d
movl $0x80000000, 0x87d1b(%rip) # imm = 0x80000000
cmpl %r12d, %r13d
movl %r12d, %eax
cmovgl %r13d, %eax
testl %eax, %eax
js 0x8d35
cmpl %r12d, %r13d
movl %r12d, %ecx
cmovll %r13d, %ecx
movl (%rbx), %edx
cmpl %edx, %ecx
jge 0x8d35
movl %r12d, %edi
movl %r15d, %r10d
movl %ebp, %r8d
movl %r13d, %r9d
testl %ecx, %ecx
jns 0x88d6
cvtsi2ss %ecx, %xmm0
cmpl %r12d, %r13d
movl %r15d, %ecx
cmovll %ebp, %ecx
cvtsi2ss %ecx, %xmm1
movl %ebp, %r8d
cmovll %r15d, %r8d
cvtsi2ss %r8d, %xmm2
subss %xmm2, %xmm1
mulss %xmm0, %xmm1
cvtsi2ss %eax, %xmm2
subss %xmm0, %xmm2
divss %xmm2, %xmm1
cvttss2si %xmm1, %eax
subl %eax, %r8d
xorl %r9d, %r9d
cmpl %r12d, %r13d
jge 0x88ce
movl %r12d, %edi
movl %r8d, %r10d
movl %ebp, %r8d
jmp 0x88d6
xorl %edi, %edi
movl %r15d, %r10d
movl %r13d, %r9d
cmpl %r12d, %r13d
movl %r9d, %eax
cmovll %edi, %eax
cmpl %edx, %eax
jl 0x8940
cvtsi2ss %eax, %xmm0
cvtsi2ss %edx, %xmm1
cmpl %r12d, %r13d
movl %r10d, %eax
cmovll %r8d, %eax
cvtsi2ss %eax, %xmm2
movl %r8d, %ecx
cmovll %r10d, %ecx
movaps %xmm0, %xmm3
cvtsi2ss %ecx, %xmm4
subss %xmm1, %xmm3
movl %edi, %ecx
cmovll %r9d, %ecx
subss %xmm4, %xmm2
cvtsi2ss %ecx, %xmm1
leal -0x1(%rdx), %ecx
mulss %xmm3, %xmm2
subss %xmm1, %xmm0
divss %xmm0, %xmm2
cvttss2si %xmm2, %esi
cmovgel %ecx, %r9d
subl %esi, %eax
cmpl %r12d, %r13d
cmovll %ecx, %edi
cmovgel %eax, %r10d
cmovll %eax, %r8d
cmpl %ebp, %r15d
movl %r10d, %ecx
cmovll %r8d, %ecx
testl %ecx, %ecx
js 0x8d35
cmpl %ebp, %r15d
movl %r8d, %esi
cmovll %r10d, %esi
movl 0x4(%rbx), %eax
cmpl %eax, %esi
jge 0x8d35
testl %esi, %esi
jns 0x89b2
cvtsi2ss %esi, %xmm0
cmpl %ebp, %r15d
movl %r9d, %esi
cmovll %edi, %esi
cvtsi2ss %esi, %xmm1
movl %edi, %esi
cmovll %r9d, %esi
cvtsi2ss %esi, %xmm2
cvtsi2ss %ecx, %xmm3
subss %xmm2, %xmm1
mulss %xmm0, %xmm1
subss %xmm0, %xmm3
divss %xmm3, %xmm1
cvttss2si %xmm1, %ecx
subl %ecx, %esi
cmpl %ebp, %r15d
jge 0x89ad
xorl %r10d, %r10d
movl %esi, %r9d
jmp 0x89b2
xorl %r8d, %r8d
movl %esi, %edi
movaps (%rsp), %xmm3
cmpl %ebp, %r15d
movl %r10d, %esi
cmovll %r8d, %esi
cmpl %eax, %esi
jl 0x8a35
cmpl %ebp, %r15d
movl %r9d, %ecx
cmovll %edi, %ecx
movl %edi, %r11d
cmovll %r9d, %r11d
movd %ecx, %xmm0
movd %esi, %xmm1
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
cvtdq2ps %xmm1, %xmm0
movd %r11d, %xmm1
movd %eax, %xmm2
punpckldq %xmm1, %xmm2    # xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1]
cvtdq2ps %xmm2, %xmm1
movaps %xmm0, %xmm2
subps %xmm1, %xmm2
movaps %xmm2, %xmm1
shufps $0x55, %xmm2, %xmm1     # xmm1 = xmm1[1,1],xmm2[1,1]
movl %r8d, %esi
cmovll %r10d, %esi
mulss %xmm2, %xmm1
cvtsi2ss %esi, %xmm2
subss %xmm2, %xmm0
divss %xmm0, %xmm1
cvttss2si %xmm1, %esi
subl %esi, %ecx
cmpl %ebp, %r15d
cmovgel %ecx, %r9d
leal -0x1(%rax), %esi
cmpl %ebp, %r15d
cmovll %ecx, %edi
cmovgel %esi, %r10d
cmovll %esi, %r8d
movl %r9d, %r11d
shlq $0x3, %r11
addq 0x18(%rbx), %r11
movl %r10d, %ecx
imulq %rdx, %rcx
movq %rcx, (%rsp)
cmpl %r12d, %r13d
movl %r9d, %ecx
cmovll %edi, %ecx
movl %edi, %esi
cmovll %r9d, %esi
subl %esi, %ecx
cmpl %ebp, %r15d
movl %r10d, %r12d
cmovll %r8d, %r12d
movl %r8d, %esi
cmovll %r10d, %esi
subl %esi, %r12d
cmpl %ecx, %r12d
jle 0x8a8e
cmpl %r8d, %r10d
setl %r15b
pushq $0x1
popq %rbp
movl %ecx, %esi
movl %r12d, %ecx
movl %edi, %r8d
movl %r9d, %r10d
movl %edx, %edi
jmp 0x8a9d
cmpl %edi, %r9d
setl %r15b
pushq $0x1
popq %rdi
movl %edx, %ebp
movl %r12d, %esi
movl 0x50(%rsp), %r12d
movq (%rsp), %r9
leaq (%r11,%r9,8), %r13
movl %edi, %r9d
negl %r9d
testb %r15b, %r15b
cmovnel %edi, %r9d
movslq %r9d, %rdi
movl %ebp, %r9d
negl %r9d
cmpl %r8d, %r10d
cmovll %ebp, %r9d
movslq %r9d, %r8
ucomiss 0x4b74f(%rip), %xmm3    # 0x54220
jae 0x8baf
movaps 0x4b642(%rip), %xmm0    # 0x54120
andps %xmm3, %xmm0
xorps %xmm2, %xmm2
cmpless %xmm3, %xmm2
andps %xmm3, %xmm2
movss 0x4b72c(%rip), %xmm1    # 0x54220
subss %xmm2, %xmm1
movl %ecx, %r10d
sarl %r10d
cmpl $-0x1, %r12d
je 0x8c50
movl 0x87a5a(%rip), %ebp     # 0x90568
movl 0xc(%rbx), %r15d
cvtss2sd %xmm0, %xmm0
xorl %r12d, %r12d
testl %r15d, %r15d
cmovlel %r12d, %r15d
cvtss2sd %xmm1, %xmm1
imulq %rdx, %rax
shlq $0x3, %rax
movl $0x80000000, %edx       # imm = 0x80000000
cmpl %ecx, %r12d
jg 0x8d35
testl %ebp, 0x50(%rsp)
je 0x8b6f
xorl %r11d, %r11d
movq %r13, %r9
cmpl %r11d, %r15d
je 0x8b6f
movsd (%r9), %xmm2
mulsd %xmm1, %xmm2
movsd (%r14,%r11,8), %xmm3
mulsd %xmm0, %xmm3
addsd %xmm2, %xmm3
movsd %xmm3, (%r9)
addq %rax, %r9
incq %r11
jmp 0x8b46
movl %ebp, %r9d
shrl %r9d
cmpl $0x2, %ebp
cmovbl %edx, %r9d
movl %r9d, 0x879e5(%rip)     # 0x90568
subl %esi, %r10d
movl $0x0, %r11d
cmovsq %r8, %r11
leaq (%r13,%rdi,8), %r13
leaq (%r13,%r11,8), %r13
movl %r10d, %r11d
sarl $0x1f, %r11d
andl %ecx, %r11d
addl %r11d, %r10d
incl %r12d
movl %r9d, %ebp
jmp 0x8b31
movl %ecx, %r10d
sarl %r10d
cmpl $-0x1, %r12d
je 0x8cd1
movl 0xc(%rbx), %r15d
xorl %r12d, %r12d
testl %r15d, %r15d
cmovlel %r12d, %r15d
movl 0x87994(%rip), %r11d    # 0x90568
imulq %rdx, %rax
shlq $0x3, %rax
movl $0x80000000, %edx       # imm = 0x80000000
cmpl %ecx, %r12d
jg 0x8d35
testl %r11d, 0x50(%rsp)
je 0x8c0f
xorl %r9d, %r9d
movq %r13, %rbp
cmpl %r9d, %r15d
je 0x8c0f
movsd (%r14,%r9,8), %xmm0
movsd %xmm0, (%rbp)
addq %rax, %rbp
incq %r9
jmp 0x8bf7
movl %r11d, %r9d
shrl %r9d
cmpl $0x2, %r11d
cmovbl %edx, %r9d
movl %r9d, 0x87944(%rip)     # 0x90568
subl %esi, %r10d
movl $0x0, %r11d
cmovsq %r8, %r11
leaq (%r13,%rdi,8), %r13
leaq (%r13,%r11,8), %r13
movl %r10d, %r11d
sarl $0x1f, %r11d
andl %ecx, %r11d
addl %r11d, %r10d
incl %r12d
movl %r9d, %r11d
jmp 0x8be1
movl 0xc(%rbx), %r11d
cvtss2sd %xmm0, %xmm0
cvtss2sd %xmm1, %xmm1
xorl %r15d, %r15d
testl %r11d, %r11d
cmovlel %r15d, %r11d
imulq %rdx, %rax
shlq $0x3, %rax
cmpl %ecx, %r15d
jg 0x8d35
xorl %edx, %edx
movq %r13, %r9
cmpl %edx, %r11d
je 0x8ca5
movsd (%r9), %xmm2
mulsd %xmm1, %xmm2
movsd (%r14,%rdx,8), %xmm3
mulsd %xmm0, %xmm3
addsd %xmm2, %xmm3
movsd %xmm3, (%r9)
addq %rax, %r9
incq %rdx
jmp 0x8c7c
leaq (,%rdi,8), %rdx
addq %r13, %rdx
subl %esi, %r10d
movl $0x0, %r9d
cmovsq %r8, %r9
leaq (%rdx,%r9,8), %r13
movl %r10d, %edx
sarl $0x1f, %edx
andl %ecx, %edx
addl %edx, %r10d
incl %r15d
jmp 0x8c6e
movl 0xc(%rbx), %r11d
xorl %r15d, %r15d
testl %r11d, %r11d
cmovlel %r15d, %r11d
imulq %rdx, %rax
shlq $0x3, %rax
cmpl %ecx, %r15d
jg 0x8d35
xorl %edx, %edx
movq %r13, %r9
cmpl %edx, %r11d
je 0x8d09
movsd (%r14,%rdx,8), %xmm0
movsd %xmm0, (%r9)
addq %rax, %r9
incq %rdx
jmp 0x8cf1
leaq (,%rdi,8), %rdx
addq %r13, %rdx
subl %esi, %r10d
movl $0x0, %r9d
cmovsq %r8, %r9
leaq (%rdx,%r9,8), %r13
movl %r10d, %edx
sarl $0x1f, %edx
andl %ecx, %edx
addl %edx, %r10d
incl %r15d
jmp 0x8ce7
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x4008, %edi           # imm = 0x4008
callq 0x4210
movq %rax, %r14
movl (%rbx), %edx
movl 0x4(%rbx), %ecx
movl 0x8(%rbx), %r8d
movl 0xc(%rbx), %r9d
leaq 0x4ba80(%rip), %rax     # 0x547e8
leaq 0x4ce53(%rip), %r10     # 0x55bc2
cmpb $0x0, 0x10(%rbx)
cmovneq %rax, %r10
subq $0x8, %rsp
leaq 0x6c31d(%rip), %r11     # 0x7509f
leaq 0x6b830(%rip), %rsi     # 0x745b9
movq %r14, %rdi
xorl %eax, %eax
pushq %r11
pushq %r10
pushq 0x18(%rbx)
callq 0x9d52
addq $0x20, %rsp
leaq 0x86ebb(%rip), %rsi     # 0x8fc60
movq 0x8722c(%rip), %rdx     # 0x8ffd8
movq %r14, %rdi
callq 0x4910
movq %rax, %rbx
movq %r14, %rdi
callq 0x4390
movq %rbx, %rdi
callq 0x4950
nop