// File: /workspace/github_cpp_makefile_star2_O2/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 0x4b1b0
movq 0x18(%rbx), %rax
movl (%rbx), %ecx
movl 0x4(%rbx), %edx
imulq %rcx, %rdx
movl 0x8(%rbx), %ecx
imulq %rdx, %rcx
leaq (%rax,%rcx), %rdx
leaq (%rax,%rcx,2), %rsi
negq %rcx
xorl %edi, %edi
movss 0x9246(%rip), %xmm3     # 0x54294
movss 0x9242(%rip), %xmm4     # 0x54298
movss 0x9246(%rip), %xmm7     # 0x542a4
movss 0x9241(%rip), %xmm8     # 0x542a8
movss 0x923c(%rip), %xmm9     # 0x542ac
movss 0x9237(%rip), %xmm10    # 0x542b0
xorps %xmm11, %xmm11
movss 0x91af(%rip), %xmm6     # 0x54234
movq %rcx, %r8
addq %rdi, %r8
je 0x4b1a5
movzbl (%rax,%rdi), %r8d
cvtsi2ss %r8d, %xmm1
movzbl (%rdx,%rdi), %r8d
cvtsi2ss %r8d, %xmm2
movzbl (%rsi,%rdi), %r8d
cvtsi2ss %r8d, %xmm0
movaps %xmm2, %xmm5
mulss 0x91ce(%rip), %xmm5     # 0x54288
movaps %xmm1, %xmm13
mulss 0x91c5(%rip), %xmm13    # 0x5428c
addss %xmm5, %xmm13
movaps %xmm0, %xmm15
mulss 0x91b7(%rip), %xmm15    # 0x54290
addss %xmm13, %xmm15
addss %xmm3, %xmm15
mulss %xmm4, %xmm15
addss 0x91ab(%rip), %xmm15    # 0x5429c
movaps %xmm2, %xmm14
mulss 0x91a2(%rip), %xmm14    # 0x542a0
movaps %xmm1, %xmm13
mulss %xmm7, %xmm13
mulss %xmm9, %xmm2
movaps %xmm0, %xmm5
mulss %xmm10, %xmm5
ucomiss %xmm15, %xmm11
jbe 0x4b11f
xorl %r8d, %r8d
jmp 0x4b12d
movaps %xmm6, %xmm12
minss %xmm15, %xmm12
cvttss2si %xmm12, %r8d
addss %xmm14, %xmm13
mulss %xmm8, %xmm0
addss %xmm13, %xmm0
addss %xmm3, %xmm0
mulss %xmm4, %xmm0
addss %xmm3, %xmm0
movb %r8b, (%rax,%rdi)
ucomiss %xmm0, %xmm11
jbe 0x4b157
xorl %r8d, %r8d
jmp 0x4b165
movaps %xmm6, %xmm12
minss %xmm0, %xmm12
cvttss2si %xmm12, %r8d
mulss %xmm8, %xmm1
addss %xmm2, %xmm1
addss %xmm1, %xmm5
addss %xmm3, %xmm5
mulss %xmm4, %xmm5
addss %xmm3, %xmm5
movb %r8b, (%rdx,%rdi)
ucomiss %xmm5, %xmm11
jbe 0x4b18d
xorl %r8d, %r8d
jmp 0x4b199
movaps %xmm6, %xmm0
minss %xmm5, %xmm0
cvttss2si %xmm0, %r8d
movb %r8b, (%rsi,%rdi)
incq %rdi
jmp 0x4b085
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 0x9617(%rip), %rax      # 0x547e8
leaq 0xa9ea(%rip), %r10      # 0x55bc2
cmpb $0x0, 0x10(%rbx)
cmovneq %rax, %r10
subq $0x8, %rsp
leaq 0x1559c(%rip), %r11     # 0x60787
leaq 0x2da7d(%rip), %rsi     # 0x78c6f
movq %r14, %rdi
xorl %eax, %eax
pushq %r11
pushq %r10
pushq 0x18(%rbx)
callq 0x9bf8
addq $0x20, %rsp
leaq 0x44a3a(%rip), %rsi     # 0x8fc48
movq 0x44dc3(%rip), %rdx     # 0x8ffd8
movq %r14, %rdi
callq 0x4910
movq %rax, %rbx
movq %r14, %rdi
callq 0x4390
movq %rbx, %rdi
callq 0x4950