// File: /workspace/github_cpp_makefile_star2_O3/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 0x63a66
movl (%rbx), %eax
movl 0x4(%rbx), %ecx
imulq %rax, %rcx
movl 0x8(%rbx), %eax
imulq %rcx, %rax
testq %rax, %rax
je 0x63a5b
movq 0x18(%rbx), %rcx
leaq (%rax,%rax), %rdx
xorl %esi, %esi
movss 0xaa14(%rip), %xmm3     # 0x6e320
movss 0xaa10(%rip), %xmm4     # 0x6e324
movss 0xaa14(%rip), %xmm7     # 0x6e330
movss 0xaa0f(%rip), %xmm8     # 0x6e334
movss 0xaa0a(%rip), %xmm9     # 0x6e338
movss 0xaa05(%rip), %xmm10    # 0x6e33c
xorps %xmm11, %xmm11
movss 0xa981(%rip), %xmm6     # 0x6e2c4
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 0xa9a6(%rip), %xmm5     # 0x6e314
movaps %xmm1, %xmm13
mulss 0xa99d(%rip), %xmm13    # 0x6e318
addss %xmm5, %xmm13
movaps %xmm0, %xmm15
mulss 0xa98f(%rip), %xmm15    # 0x6e31c
addss %xmm13, %xmm15
addss %xmm3, %xmm15
mulss %xmm4, %xmm15
addss 0xa983(%rip), %xmm15    # 0x6e328
movaps %xmm2, %xmm14
mulss 0xa97a(%rip), %xmm14    # 0x6e32c
movaps %xmm1, %xmm13
mulss %xmm7, %xmm13
mulss %xmm9, %xmm2
movaps %xmm0, %xmm5
mulss %xmm10, %xmm5
ucomiss %xmm15, %xmm11
jbe 0x639d2
xorl %edi, %edi
jmp 0x639e0
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 0x63a08
xorl %edi, %edi
jmp 0x63a16
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 0x63a3d
xorl %edi, %edi
jmp 0x63a48
movaps %xmm6, %xmm0
minss %xmm5, %xmm0
cvttss2si %xmm0, %edi
movb %dil, (%rcx,%rdx)
incq %rcx
incq %rsi
cmpq %rsi, %rax
jne 0x63943
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 0xade1(%rip), %rax      # 0x6e868
leaq 0xc1b4(%rip), %r10      # 0x6fc42
cmpb $0x0, 0x10(%rbx)
cmovneq %rax, %r10
subq $0x8, %rsp
leaq 0x16d66(%rip), %r11     # 0x7a807
leaq 0x2f111(%rip), %rsi     # 0x92bb9
movq %r14, %rdi
xorl %eax, %eax
pushq %r11
pushq %r10
pushq 0x18(%rbx)
callq 0xbfac
addq $0x20, %rsp
leaq 0x44174(%rip), %rsi     # 0xa7c38
movq 0x44505(%rip), %rdx     # 0xa7fd0
movq %r14, %rdi
callq 0x4910
movq %rax, %rbx
movq %r14, %rdi
callq 0x43c0
movq %rbx, %rdi
callq 0x4960