// File: manikandan5[P]Image-Matching-Stitching-Warping/./CImg.h
// Function: cimg_library::CImgList<double>::_save_yuv(_IO_FILE*, char const*, bool) const
const CImgList<T>& _save_yuv(std::FILE *const file, const char *const filename, const bool is_rgb) const {
      if (!file && !filename)
        throw CImgArgumentException(_cimglist_instance
                                    "save_yuv(): Specified filename is (null).",
                                    cimglist_instance);
      if (is_empty()) { cimg::fempty(file,filename); return *this; }
      if ((*this)[0].width()%2 || (*this)[0].height()%2)
        throw CImgInstanceException(_cimglist_instance
                                    "save_yuv(): Invalid odd instance dimensions (%u,%u) for file '%s'.",
                                    cimglist_instance,
                                    (*this)[0].width(),(*this)[0].height(),
                                    filename?filename:"(FILE*)");

      std::FILE *const nfile = file?file:cimg::fopen(filename,"wb");
      cimglist_for(*this,l) {
        CImg<ucharT> YCbCr((*this)[l]);
        if (is_rgb) YCbCr.RGBtoYCbCr();
        cimg::fwrite(YCbCr._data,(unsigned long)YCbCr._width*YCbCr._height,nfile);
        cimg::fwrite(YCbCr.get_resize(YCbCr._width/2, YCbCr._height/2,1,3,3).data(0,0,0,1),
                     (unsigned long)YCbCr._width*YCbCr._height/2,nfile);
      }
      if (!file) cimg::fclose(nfile);
      return *this;
    }

// Assembly:
subq $0x108, %rsp            # imm = 0x108
movb %cl, %al
movq %rdi, 0xf8(%rsp)
movq %rsi, 0xf0(%rsp)
movq %rdx, 0xe8(%rsp)
andb $0x1, %al
movb %al, 0xe7(%rsp)
movq 0xf8(%rsp), %rax
movq %rax, 0x78(%rsp)
cmpq $0x0, 0xf0(%rsp)
jne 0xb2f3c
cmpq $0x0, 0xe8(%rsp)
jne 0xb2f3c
movl $0x4008, %edi           # imm = 0x4008
callq 0x5240
movq %rax, %rcx
movq 0x78(%rsp), %rax
movq %rcx, 0x60(%rsp)
movq %rcx, 0x58(%rsp)
movl (%rax), %ecx
movl %ecx, 0x68(%rsp)
movl 0x4(%rax), %ecx
movl %ecx, 0x6c(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x70(%rsp)
callq 0x7c860
movq 0x60(%rsp), %rdi
movl 0x68(%rsp), %edx
movl 0x6c(%rsp), %ecx
movq 0x70(%rsp), %r8
movq %rax, %r9
leaq 0x39c48(%rip), %rsi     # 0xecb40
xorl %eax, %eax
callq 0x12220
jmp 0xb2f01
movq 0x58(%rsp), %rdi
leaq 0x4cc53(%rip), %rsi     # 0xffb60
leaq -0xa0ab4(%rip), %rdx    # 0x12460
callq 0x5920
movq 0x58(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xd8(%rsp)
movl %eax, 0xd4(%rsp)
callq 0x53a0
jmp 0xb32cc
movq 0x78(%rsp), %rdi
callq 0x5ce60
testb $0x1, %al
jne 0xb2f4c
jmp 0xb2f73
movq 0xf0(%rsp), %rdi
movq 0xe8(%rsp), %rsi
callq 0x9c310
movq 0x78(%rsp), %rax
movq %rax, 0x100(%rsp)
jmp 0xb32bc
movq 0x78(%rsp), %rdi
callq 0x5cea0
movq %rax, %rdi
callq 0x89c0
movl $0x2, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0xb2fb5
movq 0x78(%rsp), %rdi
callq 0x5cea0
movq %rax, %rdi
callq 0x89d0
movl $0x2, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
je 0xb30bd
movl $0x4008, %edi           # imm = 0x4008
callq 0x5240
movq %rax, %rcx
movq 0x78(%rsp), %rax
movq %rcx, 0x30(%rsp)
movl (%rax), %ecx
movl %ecx, 0x38(%rsp)
movl 0x4(%rax), %ecx
movl %ecx, 0x3c(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x40(%rsp)
callq 0x7c860
movq 0x78(%rsp), %rdi
movq %rax, 0x48(%rsp)
callq 0x5cea0
movq %rax, %rdi
callq 0x89c0
movq 0x78(%rsp), %rdi
movl %eax, 0x50(%rsp)
callq 0x5cea0
movq %rax, %rdi
callq 0x89d0
movl %eax, 0x54(%rsp)
cmpq $0x0, 0xe8(%rsp)
je 0xb3032
movq 0xe8(%rsp), %rax
movq %rax, 0x28(%rsp)
jmp 0xb3040
leaq 0x36451(%rip), %rax     # 0xe948a
movq %rax, 0x28(%rsp)
jmp 0xb3040
movq 0x48(%rsp), %r9
movq 0x40(%rsp), %r8
movl 0x3c(%rsp), %ecx
movl 0x38(%rsp), %edx
movq 0x30(%rsp), %rdi
movl 0x50(%rsp), %esi
movl 0x54(%rsp), %r10d
movq 0x28(%rsp), %r11
movq %rsp, %rax
movq %r11, 0x10(%rax)
movl %r10d, 0x8(%rax)
movl %esi, (%rax)
leaq 0x39b14(%rip), %rsi     # 0xecb8d
xorl %eax, %eax
callq 0x11fd0
jmp 0xb3082
movq 0x30(%rsp), %rdi
leaq 0x4caba(%rip), %rsi     # 0xffb48
leaq -0xa0e85(%rip), %rdx    # 0x12210
callq 0x5920
movq 0x30(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xd8(%rsp)
movl %eax, 0xd4(%rsp)
callq 0x53a0
jmp 0xb32cc
cmpq $0x0, 0xf0(%rsp)
je 0xb30d7
movq 0xf0(%rsp), %rax
movq %rax, 0x20(%rsp)
jmp 0xb30f0
movq 0xe8(%rsp), %rdi
leaq 0x35e1a(%rip), %rsi     # 0xe8f00
callq 0x654a0
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0xc8(%rsp)
movl $0x0, 0xc4(%rsp)
movq 0x78(%rsp), %rcx
movl 0xc4(%rsp), %eax
cmpl (%rcx), %eax
jge 0xb3297
movq 0x78(%rsp), %rdi
callq 0x5cea0
movq %rax, %rsi
movslq 0xc4(%rsp), %rax
shlq $0x5, %rax
addq %rax, %rsi
leaq 0xa0(%rsp), %rdi
callq 0xb32e0
testb $0x1, 0xe7(%rsp)
je 0xb3179
leaq 0xa0(%rsp), %rdi
callq 0xb3670
jmp 0xb315e
jmp 0xb3179
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xd8(%rsp)
movl %eax, 0xd4(%rsp)
jmp 0xb3288
movq 0xb8(%rsp), %rdi
movl 0xa0(%rsp), %ecx
movl 0xa4(%rsp), %eax
movl %ecx, %esi
imulq %rax, %rsi
movq 0xc8(%rsp), %rdx
callq 0x9d390
jmp 0xb31a4
movl 0xa0(%rsp), %edx
movl 0xa4(%rsp), %ecx
shrl %edx
shrl %ecx
movq %rsp, %rax
movl $0x0, 0x8(%rax)
movl $0x3, (%rax)
leaq 0x80(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
movl $0x1, %r8d
movl $0x3, %r9d
xorps %xmm3, %xmm3
movaps %xmm3, %xmm0
movaps %xmm3, %xmm1
movaps %xmm3, %xmm2
callq 0x259a0
jmp 0xb31f5
leaq 0x80(%rsp), %rdi
xorl %ecx, %ecx
movl $0x1, %r8d
movl %ecx, %esi
movl %ecx, %edx
callq 0x21a70
movq %rax, %rdi
movl 0xa0(%rsp), %ecx
movl 0xa4(%rsp), %eax
movl %ecx, %esi
imulq %rax, %rsi
shrq %rsi
movq 0xc8(%rsp), %rdx
callq 0x9d390
jmp 0xb3237
leaq 0x80(%rsp), %rdi
callq 0x15650
leaq 0xa0(%rsp), %rdi
callq 0x15650
movl 0xc4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc4(%rsp)
jmp 0xb3108
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xd8(%rsp)
movl %eax, 0xd4(%rsp)
leaq 0x80(%rsp), %rdi
callq 0x15650
leaq 0xa0(%rsp), %rdi
callq 0x15650
jmp 0xb32cc
cmpq $0x0, 0xf0(%rsp)
jne 0xb32af
movq 0xc8(%rsp), %rdi
callq 0x5c6f0
movq 0x78(%rsp), %rax
movq %rax, 0x100(%rsp)
movq 0x100(%rsp), %rax
addq $0x108, %rsp            # imm = 0x108
retq
movq 0xd8(%rsp), %rdi
callq 0x5970
nopl (%rax)