// File: /workspace/github_cpp_makefile_star2_O1/manikandan5[P]Image-Matching-Stitching-Warping/./CImg.h
// Function: cimg_library::CImg<unsigned char>::RGBtoYCbCr()
CImg<T>& RGBtoYCbCr() {
      if (_spectrum!=3)
        throw CImgInstanceException(_cimg_instance
                                    "RGBtoYCbCr(): Instance is not a RGB image.",
                                    cimg_instance);

      T *p1 = data(0,0,0,0), *p2 = data(0,0,0,1), *p3 = data(0,0,0,2);
      for (unsigned long N = (unsigned long)_width*_height*_depth; N; --N) {
        const Tfloat
          R = (Tfloat)*p1,
          G = (Tfloat)*p2,
          B = (Tfloat)*p3,
          Y = (66*R + 129*G + 25*B + 128)/256 + 16,
          Cb = (-38*R - 74*G + 112*B + 128)/256 + 128,
          Cr = (112*R - 94*G - 18*B + 128)/256 + 128;
        *(p1++) = (T)(Y<0?0:(Y>255?255:Y));
        *(p2++) = (T)(Cb<0?0:(Cb>255?255:Cb));
        *(p3++) = (T)(Cr<0?0:(Cr>255?255:Cr));
      }
      return *this;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x3, 0xc(%rdi)
jne 0x66782
movl (%rbx), %eax
movl 0x4(%rbx), %ecx
imulq %rax, %rcx
movl 0x8(%rbx), %eax
imulq %rcx, %rax
testq %rax, %rax
je 0x66777
movq 0x18(%rbx), %rcx
leaq (%rax,%rax), %rdx
xorl %esi, %esi
movss 0xacf8(%rip), %xmm3     # 0x71320
movss 0xacf4(%rip), %xmm4     # 0x71324
movss 0xacf8(%rip), %xmm7     # 0x71330
movss 0xacf3(%rip), %xmm8     # 0x71334
movss 0xacee(%rip), %xmm9     # 0x71338
movss 0xace9(%rip), %xmm10    # 0x7133c
xorps %xmm11, %xmm11
movss 0xac65(%rip), %xmm6     # 0x712c4
movzbl (%rcx), %edi
xorps %xmm1, %xmm1
cvtsi2ss %edi, %xmm1
movzbl (%rcx,%rax), %edi
xorps %xmm2, %xmm2
cvtsi2ss %edi, %xmm2
movzbl (%rcx,%rdx), %edi
xorps %xmm0, %xmm0
cvtsi2ss %edi, %xmm0
movaps %xmm2, %xmm5
mulss 0xac8a(%rip), %xmm5     # 0x71314
movaps %xmm1, %xmm13
mulss 0xac81(%rip), %xmm13    # 0x71318
addss %xmm5, %xmm13
movaps %xmm0, %xmm15
mulss 0xac73(%rip), %xmm15    # 0x7131c
addss %xmm13, %xmm15
addss %xmm3, %xmm15
mulss %xmm4, %xmm15
addss 0xac67(%rip), %xmm15    # 0x71328
movaps %xmm2, %xmm14
mulss 0xac5e(%rip), %xmm14    # 0x7132c
movaps %xmm1, %xmm13
mulss %xmm7, %xmm13
mulss %xmm9, %xmm2
movaps %xmm0, %xmm5
mulss %xmm10, %xmm5
ucomiss %xmm15, %xmm11
jbe 0x666ee
xorl %edi, %edi
jmp 0x666fc
movaps %xmm6, %xmm12
minss %xmm15, %xmm12
cvttss2si %xmm12, %edi
addss %xmm14, %xmm13
mulss %xmm8, %xmm0
addss %xmm13, %xmm0
addss %xmm3, %xmm0
mulss %xmm4, %xmm0
addss %xmm3, %xmm0
movb %dil, (%rcx)
ucomiss %xmm0, %xmm11
jbe 0x66724
xorl %edi, %edi
jmp 0x66732
movaps %xmm6, %xmm12
minss %xmm0, %xmm12
cvttss2si %xmm12, %edi
mulss %xmm8, %xmm1
addss %xmm2, %xmm1
addss %xmm1, %xmm5
addss %xmm3, %xmm5
mulss %xmm4, %xmm5
addss %xmm3, %xmm5
movb %dil, (%rcx,%rax)
ucomiss %xmm5, %xmm11
jbe 0x66759
xorl %edi, %edi
jmp 0x66764
movaps %xmm6, %xmm0
minss %xmm5, %xmm0
cvttss2si %xmm0, %edi
movb %dil, (%rcx,%rdx)
incq %rcx
incq %rsi
cmpq %rsi, %rax
jne 0x6665f
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
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 0xcb95(%rip), %rax      # 0x73338
leaq 0xdf68(%rip), %r10      # 0x74712
cmpb $0x0, 0x10(%rbx)
cmovneq %rax, %r10
subq $0x8, %rsp
leaq 0x18b1a(%rip), %r11     # 0x7f2d7
leaq 0x30fbb(%rip), %rsi     # 0x9777f
movq %r14, %rdi
xorl %eax, %eax
pushq %r11
pushq %r10
pushq 0x18(%rbx)
callq 0xbfd8
addq $0x20, %rsp
leaq 0x46428(%rip), %rsi     # 0xacc08
movq 0x467e9(%rip), %rdx     # 0xacfd0
movq %r14, %rdi
callq 0x4900
movq %rax, %rbx
movq %r14, %rdi
callq 0x43b0
movq %rbx, %rdi
callq 0x4950