// File: manikandan5[P]Image-Matching-Stitching-Warping/./CImg.h
// Function: cimg_library::CImg<double>::_save_pnm(_IO_FILE*, char const*, unsigned int) const
const CImg<T>& _save_pnm(std::FILE *const file, const char *const filename,
                             const unsigned int bytes_per_pixel=0) const {
      if (!file && !filename)
        throw CImgArgumentException(_cimg_instance
                                    "save_pnm(): Specified filename is (null).",
                                    cimg_instance);
      if (is_empty()) { cimg::fempty(file,filename); return *this; }

      double stmin, stmax = (double)max_min(stmin);
      if (_depth>1)
        cimg::warn(_cimg_instance
                   "save_pnm(): Instance is volumetric, only the first slice will be saved in file '%s'.",
                   cimg_instance,
                   filename?filename:"(FILE*)");
      if (_spectrum>3)
        cimg::warn(_cimg_instance
                   "save_pnm(): Instance is multispectral, only the three first channels will be saved in file '%s'.",
                   cimg_instance,
                   filename?filename:"(FILE*)");
      if (stmin<0 || (bytes_per_pixel==1 && stmax>=256) || stmax>=65536)
        cimg::warn(_cimg_instance
                   "save_pnm(): Instance has pixel values in [%g,%g], probable type overflow in file '%s'.",
                   cimg_instance,
                   stmin,stmax,filename?filename:"(FILE*)");

      std::FILE *const nfile = file?file:cimg::fopen(filename,"wb");
      const T
        *ptr_r = data(0,0,0,0),
        *ptr_g = (_spectrum>=2)?data(0,0,0,1):0,
        *ptr_b = (_spectrum>=3)?data(0,0,0,2):0;
      const unsigned long buf_size = cimg::min(1024*1024UL,_width*_height*(_spectrum==1?1UL:3UL));

      std::fprintf(nfile,"P%c\n%u %u\n%u\n",
                   (_spectrum==1?'5':'6'),_width,_height,stmax<256?255:(stmax<4096?4095:65535));

      switch (_spectrum) {
      case 1 : { // Scalar image
        if (bytes_per_pixel==1 || (!bytes_per_pixel && stmax<256)) { // Binary PGM 8 bits
          CImg<ucharT> buf(buf_size);
          for (long to_write = (long)_width*_height; to_write>0; ) {
            const unsigned long N = cimg::min((unsigned long)to_write,buf_size);
            unsigned char *ptrd = buf._data;
            for (unsigned long i = N; i>0; --i) *(ptrd++) = (unsigned char)*(ptr_r++);
            cimg::fwrite(buf._data,N,nfile);
            to_write-=N;
          }
        } else { // Binary PGM 16 bits
          CImg<ushortT> buf(buf_size);
          for (long to_write = (long)_width*_height; to_write>0; ) {
            const unsigned long N = cimg::min((unsigned long)to_write,buf_size);
            unsigned short *ptrd = buf._data;
            for (unsigned long i = N; i>0; --i) *(ptrd++) = (unsigned short)*(ptr_r++);
            if (!cimg::endianness()) cimg::invert_endianness(buf._data,buf_size);
            cimg::fwrite(buf._data,N,nfile);
            to_write-=N;
          }
        }
      } break;
      case 2 : { // RG image
        if (bytes_per_pixel==1 || (!bytes_per_pixel && stmax<256)) { // Binary PPM 8 bits
          CImg<ucharT> buf(buf_size);
          for (long to_write = (long)_width*_height; to_write>0; ) {
            const unsigned long N = cimg::min((unsigned long)to_write,buf_size/3);
            unsigned char *ptrd = buf._data;
            for (unsigned long i = N; i>0; --i) {
              *(ptrd++) = (unsigned char)*(ptr_r++);
              *(ptrd++) = (unsigned char)*(ptr_g++);
              *(ptrd++) = 0;
            }
            cimg::fwrite(buf._data,3*N,nfile);
            to_write-=N;
          }
        } else {             // Binary PPM 16 bits
          CImg<ushortT> buf(buf_size);
          for (long to_write = (long)_width*_height; to_write>0; ) {
            const unsigned long N = cimg::min((unsigned long)to_write,buf_size/3);
            unsigned short *ptrd = buf._data;
            for (unsigned long i = N; i>0; --i) {
              *(ptrd++) = (unsigned short)*(ptr_r++);
              *(ptrd++) = (unsigned short)*(ptr_g++);
              *(ptrd++) = 0;
            }
            if (!cimg::endianness()) cimg::invert_endianness(buf._data,buf_size);
            cimg::fwrite(buf._data,3*N,nfile);
            to_write-=N;
          }
        }
      } break;
      default : { // RGB image
        if (bytes_per_pixel==1 || (!bytes_per_pixel && stmax<256)) { // Binary PPM 8 bits
          CImg<ucharT> buf(buf_size);
          for (long to_write = (long)_width*_height; to_write>0; ) {
            const unsigned long N = cimg::min((unsigned long)to_write,buf_size/3);
            unsigned char *ptrd = buf._data;
            for (unsigned long i = N; i>0; --i) {
              *(ptrd++) = (unsigned char)*(ptr_r++);
              *(ptrd++) = (unsigned char)*(ptr_g++);
              *(ptrd++) = (unsigned char)*(ptr_b++);
            }
            cimg::fwrite(buf._data,3*N,nfile);
            to_write-=N;
          }
        } else {             // Binary PPM 16 bits
          CImg<ushortT> buf(buf_size);
          for (long to_write = (long)_width*_height; to_write>0; ) {
            const unsigned long N = cimg::min((unsigned long)to_write,buf_size/3);
            unsigned short *ptrd = buf._data;
            for (unsigned long i = N; i>0; --i) {
              *(ptrd++) = (unsigned short)*(ptr_r++);
              *(ptrd++) = (unsigned short)*(ptr_g++);
              *(ptrd++) = (unsigned short)*(ptr_b++);
            }
            if (!cimg::endianness()) cimg::invert_endianness(buf._data,buf_size);
            cimg::fwrite(buf._data,3*N,nfile);
            to_write-=N;
          }
        }
      }
      }
      if (!file) cimg::fclose(nfile);
      return *this;
    }

// Assembly:
subq $0x3b8, %rsp            # imm = 0x3B8
movq %rdi, 0x3a8(%rsp)
movq %rsi, 0x3a0(%rsp)
movq %rdx, 0x398(%rsp)
movl %ecx, 0x394(%rsp)
movq 0x3a8(%rsp), %rax
movq %rax, 0x160(%rsp)
cmpq $0x0, 0x3a0(%rsp)
jne 0x9ec80
cmpq $0x0, 0x398(%rsp)
jne 0x9ec80
movl $0x4008, %edi           # imm = 0x4008
callq 0x5240
movq %rax, %rcx
movq 0x160(%rsp), %rax
movq %rcx, 0x130(%rsp)
movl (%rax), %ecx
movl %ecx, 0x138(%rsp)
movl 0x4(%rax), %ecx
movl %ecx, 0x13c(%rsp)
movl 0x8(%rax), %ecx
movl %ecx, 0x140(%rsp)
movl 0xc(%rax), %ecx
movl %ecx, 0x144(%rsp)
movq 0x18(%rax), %rcx
movq %rcx, 0x148(%rsp)
movb 0x10(%rax), %dl
leaq 0x49e14(%rip), %rcx     # 0xe89d2
leaq 0x2af1c(%rip), %rax     # 0xc9ae1
testb $0x1, %dl
cmovneq %rcx, %rax
movq %rax, 0x150(%rsp)
callq 0x118f0
movq %rax, 0x158(%rsp)
jmp 0x9ebe3
movl 0x144(%rsp), %r9d
movl 0x140(%rsp), %r8d
movl 0x13c(%rsp), %ecx
movl 0x138(%rsp), %edx
movq 0x130(%rsp), %rdi
movq 0x148(%rsp), %rsi
movq 0x150(%rsp), %r10
movq 0x158(%rsp), %r11
movq %rsp, %rax
movq %r11, 0x10(%rax)
movq %r10, 0x8(%rax)
movq %rsi, (%rax)
leaq 0x4d255(%rip), %rsi     # 0xebe8b
xorl %eax, %eax
callq 0x12220
jmp 0x9ec3f
movq 0x130(%rsp), %rdi
leaq 0x60f12(%rip), %rsi     # 0xffb60
leaq -0x8c7f5(%rip), %rdx    # 0x12460
callq 0x5920
movq 0x130(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x388(%rsp)
movl %eax, 0x384(%rsp)
callq 0x53a0
jmp 0x9fe86
movq 0x160(%rsp), %rdi
callq 0x10320
testb $0x1, %al
jne 0x9ec93
jmp 0x9ecbd
movq 0x3a0(%rsp), %rdi
movq 0x398(%rsp), %rsi
callq 0x9c310
movq 0x160(%rsp), %rax
movq %rax, 0x3b0(%rsp)
jmp 0x9fe76
movq 0x160(%rsp), %rdi
leaq 0x378(%rsp), %rsi
callq 0x9fea0
movq %rax, %rcx
movq 0x160(%rsp), %rax
movsd (%rcx), %xmm0
movsd %xmm0, 0x370(%rsp)
cmpl $0x1, 0x8(%rax)
jbe 0x9ede3
movq 0x160(%rsp), %rax
movl (%rax), %ecx
movl %ecx, 0x108(%rsp)
movl 0x4(%rax), %ecx
movl %ecx, 0x10c(%rsp)
movl 0x8(%rax), %ecx
movl %ecx, 0x110(%rsp)
movl 0xc(%rax), %ecx
movl %ecx, 0x114(%rsp)
movq 0x18(%rax), %rcx
movq %rcx, 0x118(%rsp)
movb 0x10(%rax), %dl
leaq 0x2ada8(%rip), %rax     # 0xc9ae1
leaq 0x49c92(%rip), %rcx     # 0xe89d2
testb $0x1, %dl
cmovneq %rcx, %rax
movq %rax, 0x120(%rsp)
callq 0x118f0
movq %rax, 0x128(%rsp)
cmpq $0x0, 0x398(%rsp)
je 0x9ed79
movq 0x398(%rsp), %rax
movq %rax, 0x100(%rsp)
jmp 0x9ed8a
leaq 0x4a70a(%rip), %rax     # 0xe948a
movq %rax, 0x100(%rsp)
jmp 0x9ed8a
movq 0x128(%rsp), %r10
movq 0x120(%rsp), %r11
movq 0x118(%rsp), %r9
movl 0x114(%rsp), %r8d
movl 0x110(%rsp), %ecx
movl 0x10c(%rsp), %edx
movl 0x108(%rsp), %esi
movq 0x100(%rsp), %rax
leaq 0x4d115(%rip), %rdi     # 0xebee3
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
movb $0x0, %al
callq 0x117e0
movq 0x160(%rsp), %rax
cmpl $0x3, 0xc(%rax)
jbe 0x9eee4
movq 0x160(%rsp), %rax
movl (%rax), %ecx
movl %ecx, 0xd8(%rsp)
movl 0x4(%rax), %ecx
movl %ecx, 0xdc(%rsp)
movl 0x8(%rax), %ecx
movl %ecx, 0xe0(%rsp)
movl 0xc(%rax), %ecx
movl %ecx, 0xe4(%rsp)
movq 0x18(%rax), %rcx
movq %rcx, 0xe8(%rsp)
movb 0x10(%rax), %dl
leaq 0x2aca7(%rip), %rax     # 0xc9ae1
leaq 0x49b91(%rip), %rcx     # 0xe89d2
testb $0x1, %dl
cmovneq %rcx, %rax
movq %rax, 0xf0(%rsp)
callq 0x118f0
movq %rax, 0xf8(%rsp)
cmpq $0x0, 0x398(%rsp)
je 0x9ee7a
movq 0x398(%rsp), %rax
movq %rax, 0xd0(%rsp)
jmp 0x9ee8b
leaq 0x4a609(%rip), %rax     # 0xe948a
movq %rax, 0xd0(%rsp)
jmp 0x9ee8b
movq 0xf8(%rsp), %r10
movq 0xf0(%rsp), %r11
movq 0xe8(%rsp), %r9
movl 0xe4(%rsp), %r8d
movl 0xe0(%rsp), %ecx
movl 0xdc(%rsp), %edx
movl 0xd8(%rsp), %esi
movq 0xd0(%rsp), %rax
leaq 0x4d097(%rip), %rdi     # 0xebf66
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
movb $0x0, %al
callq 0x117e0
xorps %xmm0, %xmm0
ucomisd 0x378(%rsp), %xmm0
ja 0x9ef2e
cmpl $0x1, 0x394(%rsp)
jne 0x9ef13
movsd 0x370(%rsp), %xmm0
movsd 0x29183(%rip), %xmm1    # 0xc8090
ucomisd %xmm1, %xmm0
jae 0x9ef2e
movsd 0x370(%rsp), %xmm0
movsd 0x29174(%rip), %xmm1    # 0xc8098
ucomisd %xmm1, %xmm0
jb 0x9f053
movq 0x160(%rsp), %rax
movl (%rax), %ecx
movl %ecx, 0x98(%rsp)
movl 0x4(%rax), %ecx
movl %ecx, 0x9c(%rsp)
movl 0x8(%rax), %ecx
movl %ecx, 0xa0(%rsp)
movl 0xc(%rax), %ecx
movl %ecx, 0xa4(%rsp)
movq 0x18(%rax), %rcx
movq %rcx, 0xa8(%rsp)
movb 0x10(%rax), %dl
leaq 0x2ab6e(%rip), %rax     # 0xc9ae1
leaq 0x49a58(%rip), %rcx     # 0xe89d2
testb $0x1, %dl
cmovneq %rcx, %rax
movq %rax, 0xb0(%rsp)
callq 0x118f0
movq %rax, 0xb8(%rsp)
movsd 0x378(%rsp), %xmm0
movsd %xmm0, 0xc0(%rsp)
movsd 0x370(%rsp), %xmm0
movsd %xmm0, 0xc8(%rsp)
cmpq $0x0, 0x398(%rsp)
je 0x9efd7
movq 0x398(%rsp), %rax
movq %rax, 0x90(%rsp)
jmp 0x9efe8
leaq 0x4a4ac(%rip), %rax     # 0xe948a
movq %rax, 0x90(%rsp)
jmp 0x9efe8
movsd 0xc8(%rsp), %xmm1
movsd 0xc0(%rsp), %xmm0
movq 0xb8(%rsp), %r10
movq 0xb0(%rsp), %r11
movq 0xa8(%rsp), %r9
movl 0xa4(%rsp), %r8d
movl 0xa0(%rsp), %ecx
movl 0x9c(%rsp), %edx
movl 0x98(%rsp), %esi
movq 0x90(%rsp), %rax
leaq 0x4cfb7(%rip), %rdi     # 0xebff5
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
movb $0x2, %al
callq 0x117e0
cmpq $0x0, 0x3a0(%rsp)
je 0x9f070
movq 0x3a0(%rsp), %rax
movq %rax, 0x88(%rsp)
jmp 0x9f08c
movq 0x398(%rsp), %rdi
leaq 0x49e81(%rip), %rsi     # 0xe8f00
callq 0x654a0
movq %rax, 0x88(%rsp)
movq 0x160(%rsp), %rdi
movq 0x88(%rsp), %rax
movq %rax, 0x368(%rsp)
xorl %r8d, %r8d
movl %r8d, %esi
movl %r8d, %edx
movl %r8d, %ecx
callq 0x73790
movq %rax, %rcx
movq 0x160(%rsp), %rax
movq %rcx, 0x360(%rsp)
cmpl $0x2, 0xc(%rax)
jb 0x9f0f1
movq 0x160(%rsp), %rdi
xorl %ecx, %ecx
movl $0x1, %r8d
movl %ecx, %esi
movl %ecx, %edx
callq 0x73790
movq %rax, 0x80(%rsp)
jmp 0x9f0fd
xorl %eax, %eax
movq %rax, 0x80(%rsp)
jmp 0x9f0fd
movq 0x160(%rsp), %rax
movq 0x80(%rsp), %rcx
movq %rcx, 0x358(%rsp)
cmpl $0x3, 0xc(%rax)
jb 0x9f13b
movq 0x160(%rsp), %rdi
xorl %ecx, %ecx
movl $0x2, %r8d
movl %ecx, %esi
movl %ecx, %edx
callq 0x73790
movq %rax, 0x78(%rsp)
jmp 0x9f144
xorl %eax, %eax
movq %rax, 0x78(%rsp)
jmp 0x9f144
movq 0x160(%rsp), %rcx
movq 0x78(%rsp), %rax
movq %rax, 0x350(%rsp)
movq $0x100000, 0x340(%rsp) # imm = 0x100000
movl (%rcx), %eax
imull 0x4(%rcx), %eax
movl %eax, %eax
movl 0xc(%rcx), %esi
movl $0x3, %ecx
movl $0x1, %edx
cmpl $0x1, %esi
cmoveq %rdx, %rcx
imulq %rcx, %rax
movq %rax, 0x338(%rsp)
leaq 0x340(%rsp), %rdi
leaq 0x338(%rsp), %rsi
callq 0xa00b0
movq %rax, %rcx
movq 0x160(%rsp), %rax
movq %rcx, 0x348(%rsp)
movq 0x368(%rsp), %rcx
movq %rcx, 0x68(%rsp)
movl 0xc(%rax), %ecx
movb $0x35, %al
movb $0x36, %dl
movb %dl, 0x76(%rsp)
cmpl $0x1, %ecx
movb %al, 0x77(%rsp)
je 0x9f1de
movb 0x76(%rsp), %al
movb %al, 0x77(%rsp)
movq 0x160(%rsp), %rax
movb 0x77(%rsp), %cl
movsbl %cl, %ecx
movl %ecx, 0x5c(%rsp)
movl (%rax), %ecx
movl %ecx, 0x60(%rsp)
movl 0x4(%rax), %eax
movl %eax, 0x64(%rsp)
movsd 0x28e8a(%rip), %xmm0    # 0xc8090
ucomisd 0x370(%rsp), %xmm0
jbe 0x9f21c
movl $0xff, %eax
movl %eax, 0x58(%rsp)
jmp 0x9f242
movsd 0x370(%rsp), %xmm1
movsd 0x28e73(%rip), %xmm0    # 0xc80a0
movl $0xffff, %eax           # imm = 0xFFFF
movl $0xfff, %ecx            # imm = 0xFFF
ucomisd %xmm1, %xmm0
cmoval %ecx, %eax
movl %eax, 0x58(%rsp)
movl 0x64(%rsp), %r8d
movl 0x60(%rsp), %ecx
movl 0x5c(%rsp), %edx
movq 0x68(%rsp), %rdi
movl 0x58(%rsp), %r9d
leaq 0x4ce1a(%rip), %rsi     # 0xec07a
xorl %eax, %eax
callq 0x5750
movq 0x160(%rsp), %rax
movl 0xc(%rax), %eax
movl %eax, 0x54(%rsp)
subl $0x1, %eax
je 0x9f28f
jmp 0x9f27d
movl 0x54(%rsp), %eax
subl $0x2, %eax
je 0x9f5c2
jmp 0x9f9ee
cmpl $0x1, 0x394(%rsp)
je 0x9f2be
cmpl $0x0, 0x394(%rsp)
jne 0x9f430
movsd 0x28de1(%rip), %xmm0    # 0xc8090
ucomisd 0x370(%rsp), %xmm0
jbe 0x9f430
movq 0x348(%rsp), %rax
movl %eax, %esi
leaq 0x318(%rsp), %rdi
movl $0x1, %r8d
movl %r8d, %edx
movl %r8d, %ecx
callq 0x15df0
movq 0x160(%rsp), %rcx
movl (%rcx), %eax
movl 0x4(%rcx), %ecx
imulq %rcx, %rax
movq %rax, 0x310(%rsp)
cmpq $0x0, 0x310(%rsp)
jle 0x9f41e
movq 0x310(%rsp), %rax
movq %rax, 0x300(%rsp)
leaq 0x300(%rsp), %rdi
leaq 0x348(%rsp), %rsi
callq 0xa00b0
movq %rax, 0x48(%rsp)
jmp 0x9f335
movq 0x48(%rsp), %rax
movq %rax, 0x308(%rsp)
movq 0x330(%rsp), %rax
movq %rax, 0x2f8(%rsp)
movq 0x308(%rsp), %rax
movq %rax, 0x2f0(%rsp)
cmpq $0x0, 0x2f0(%rsp)
jbe 0x9f3df
movq 0x360(%rsp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, 0x360(%rsp)
cvttsd2si (%rax), %eax
movb %al, %cl
movq 0x2f8(%rsp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x2f8(%rsp)
movb %cl, (%rax)
movq 0x2f0(%rsp), %rax
addq $-0x1, %rax
movq %rax, 0x2f0(%rsp)
jmp 0x9f362
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x388(%rsp)
movl %eax, 0x384(%rsp)
leaq 0x318(%rsp), %rdi
callq 0x15650
jmp 0x9fe86
movq 0x330(%rsp), %rdi
movq 0x308(%rsp), %rsi
movq 0x368(%rsp), %rdx
callq 0x9d390
jmp 0x9f3fe
movq 0x308(%rsp), %rcx
movq 0x310(%rsp), %rax
subq %rcx, %rax
movq %rax, 0x310(%rsp)
jmp 0x9f2fa
leaq 0x318(%rsp), %rdi
callq 0x15650
jmp 0x9f5bd
movq 0x348(%rsp), %rax
movl %eax, %esi
leaq 0x2d0(%rsp), %rdi
movl $0x1, %r8d
movl %r8d, %edx
movl %r8d, %ecx
callq 0x80eb0
movq 0x160(%rsp), %rcx
movl (%rcx), %eax
movl 0x4(%rcx), %ecx
imulq %rcx, %rax
movq %rax, 0x2c8(%rsp)
cmpq $0x0, 0x2c8(%rsp)
jle 0x9f5b0
movq 0x2c8(%rsp), %rax
movq %rax, 0x2b8(%rsp)
leaq 0x2b8(%rsp), %rdi
leaq 0x348(%rsp), %rsi
callq 0xa00b0
movq %rax, 0x40(%rsp)
jmp 0x9f4a7
movq 0x40(%rsp), %rax
movq %rax, 0x2c0(%rsp)
movq 0x2e8(%rsp), %rax
movq %rax, 0x2b0(%rsp)
movq 0x2c0(%rsp), %rax
movq %rax, 0x2a8(%rsp)
cmpq $0x0, 0x2a8(%rsp)
jbe 0x9f553
movq 0x360(%rsp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, 0x360(%rsp)
cvttsd2si (%rax), %eax
movw %ax, %cx
movq 0x2b0(%rsp), %rax
movq %rax, %rdx
addq $0x2, %rdx
movq %rdx, 0x2b0(%rsp)
movw %cx, (%rax)
movq 0x2a8(%rsp), %rax
addq $-0x1, %rax
movq %rax, 0x2a8(%rsp)
jmp 0x9f4d4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x388(%rsp)
movl %eax, 0x384(%rsp)
leaq 0x2d0(%rsp), %rdi
callq 0x79530
jmp 0x9fe86
callq 0x43af0
testb $0x1, %al
jne 0x9f571
movq 0x2e8(%rsp), %rdi
movq 0x348(%rsp), %rsi
callq 0x794c0
movq 0x2e8(%rsp), %rdi
movq 0x2c0(%rsp), %rsi
movq 0x368(%rsp), %rdx
callq 0xa00f0
jmp 0x9f590
movq 0x2c0(%rsp), %rcx
movq 0x2c8(%rsp), %rax
subq %rcx, %rax
movq %rax, 0x2c8(%rsp)
jmp 0x9f46c
leaq 0x2d0(%rsp), %rdi
callq 0x79530
jmp 0x9fe4e
cmpl $0x1, 0x394(%rsp)
je 0x9f5f1
cmpl $0x0, 0x394(%rsp)
jne 0x9f7dd
movsd 0x28aae(%rip), %xmm0    # 0xc8090
ucomisd 0x370(%rsp), %xmm0
jbe 0x9f7dd
movq 0x348(%rsp), %rax
movl %eax, %esi
leaq 0x288(%rsp), %rdi
movl $0x1, %r8d
movl %r8d, %edx
movl %r8d, %ecx
callq 0x15df0
movq 0x160(%rsp), %rcx
movl (%rcx), %eax
movl 0x4(%rcx), %ecx
imulq %rcx, %rax
movq %rax, 0x280(%rsp)
cmpq $0x0, 0x280(%rsp)
jle 0x9f7cb
movq 0x280(%rsp), %rax
movq %rax, 0x270(%rsp)
movq 0x348(%rsp), %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
mulq %rcx
shrq %rdx
movq %rdx, 0x268(%rsp)
leaq 0x270(%rsp), %rdi
leaq 0x268(%rsp), %rsi
callq 0xa00b0
movq %rax, 0x38(%rsp)
jmp 0x9f688
movq 0x38(%rsp), %rax
movq %rax, 0x278(%rsp)
movq 0x2a0(%rsp), %rax
movq %rax, 0x260(%rsp)
movq 0x278(%rsp), %rax
movq %rax, 0x258(%rsp)
cmpq $0x0, 0x258(%rsp)
jbe 0x9f788
movq 0x360(%rsp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, 0x360(%rsp)
cvttsd2si (%rax), %eax
movb %al, %cl
movq 0x260(%rsp), %rax
movq %rax, %rdx
incq %rdx
movq %rdx, 0x260(%rsp)
movb %cl, (%rax)
movq 0x358(%rsp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, 0x358(%rsp)
cvttsd2si (%rax), %eax
movb %al, %cl
movq 0x260(%rsp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x260(%rsp)
movb %cl, (%rax)
movq 0x260(%rsp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0x260(%rsp)
movb $0x0, (%rax)
movq 0x258(%rsp), %rax
addq $-0x1, %rax
movq %rax, 0x258(%rsp)
jmp 0x9f6b5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x388(%rsp)
movl %eax, 0x384(%rsp)
leaq 0x288(%rsp), %rdi
callq 0x15650
jmp 0x9fe86
movq 0x2a0(%rsp), %rdi
movq 0x278(%rsp), %rax
leaq (%rax,%rax,2), %rsi
movq 0x368(%rsp), %rdx
callq 0x9d390
jmp 0x9f7ab
movq 0x278(%rsp), %rcx
movq 0x280(%rsp), %rax
subq %rcx, %rax
movq %rax, 0x280(%rsp)
jmp 0x9f62d
leaq 0x288(%rsp), %rdi
callq 0x15650
jmp 0x9f9e9
movq 0x348(%rsp), %rax
movl %eax, %esi
leaq 0x238(%rsp), %rdi
movl $0x1, %r8d
movl %r8d, %edx
movl %r8d, %ecx
callq 0x80eb0
movq 0x160(%rsp), %rcx
movl (%rcx), %eax
movl 0x4(%rcx), %ecx
imulq %rcx, %rax
movq %rax, 0x230(%rsp)
cmpq $0x0, 0x230(%rsp)
jle 0x9f9dc
movq 0x230(%rsp), %rax
movq %rax, 0x220(%rsp)
movq 0x348(%rsp), %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
mulq %rcx
shrq %rdx
movq %rdx, 0x218(%rsp)
leaq 0x220(%rsp), %rdi
leaq 0x218(%rsp), %rsi
callq 0xa00b0
movq %rax, 0x30(%rsp)
jmp 0x9f874
movq 0x30(%rsp), %rax
movq %rax, 0x228(%rsp)
movq 0x250(%rsp), %rax
movq %rax, 0x210(%rsp)
movq 0x228(%rsp), %rax
movq %rax, 0x208(%rsp)
cmpq $0x0, 0x208(%rsp)
jbe 0x9f97b
movq 0x360(%rsp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, 0x360(%rsp)
cvttsd2si (%rax), %eax
movw %ax, %cx
movq 0x210(%rsp), %rax
movq %rax, %rdx
addq $0x2, %rdx
movq %rdx, 0x210(%rsp)
movw %cx, (%rax)
movq 0x358(%rsp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, 0x358(%rsp)
cvttsd2si (%rax), %eax
movw %ax, %cx
movq 0x210(%rsp), %rax
movq %rax, %rdx
addq $0x2, %rdx
movq %rdx, 0x210(%rsp)
movw %cx, (%rax)
movq 0x210(%rsp), %rax
movq %rax, %rcx
addq $0x2, %rcx
movq %rcx, 0x210(%rsp)
movw $0x0, (%rax)
movq 0x208(%rsp), %rax
addq $-0x1, %rax
movq %rax, 0x208(%rsp)
jmp 0x9f8a1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x388(%rsp)
movl %eax, 0x384(%rsp)
leaq 0x238(%rsp), %rdi
callq 0x79530
jmp 0x9fe86
callq 0x43af0
testb $0x1, %al
jne 0x9f999
movq 0x250(%rsp), %rdi
movq 0x348(%rsp), %rsi
callq 0x794c0
movq 0x250(%rsp), %rdi
movq 0x228(%rsp), %rax
leaq (%rax,%rax,2), %rsi
movq 0x368(%rsp), %rdx
callq 0xa00f0
jmp 0x9f9bc
movq 0x228(%rsp), %rcx
movq 0x230(%rsp), %rax
subq %rcx, %rax
movq %rax, 0x230(%rsp)
jmp 0x9f819
leaq 0x238(%rsp), %rdi
callq 0x79530
jmp 0x9fe4e
cmpl $0x1, 0x394(%rsp)
je 0x9fa1d
cmpl $0x0, 0x394(%rsp)
jne 0x9fc24
movsd 0x28682(%rip), %xmm0    # 0xc8090
ucomisd 0x370(%rsp), %xmm0
jbe 0x9fc24
movq 0x348(%rsp), %rax
movl %eax, %esi
leaq 0x1e8(%rsp), %rdi
movl $0x1, %r8d
movl %r8d, %edx
movl %r8d, %ecx
callq 0x15df0
movq 0x160(%rsp), %rcx
movl (%rcx), %eax
movl 0x4(%rcx), %ecx
imulq %rcx, %rax
movq %rax, 0x1e0(%rsp)
cmpq $0x0, 0x1e0(%rsp)
jle 0x9fc12
movq 0x1e0(%rsp), %rax
movq %rax, 0x1d0(%rsp)
movq 0x348(%rsp), %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
mulq %rcx
shrq %rdx
movq %rdx, 0x1c8(%rsp)
leaq 0x1d0(%rsp), %rdi
leaq 0x1c8(%rsp), %rsi
callq 0xa00b0
movq %rax, 0x28(%rsp)
jmp 0x9fab4
movq 0x28(%rsp), %rax
movq %rax, 0x1d8(%rsp)
movq 0x200(%rsp), %rax
movq %rax, 0x1c0(%rsp)
movq 0x1d8(%rsp), %rax
movq %rax, 0x1b8(%rsp)
cmpq $0x0, 0x1b8(%rsp)
jbe 0x9fbcf
movq 0x360(%rsp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, 0x360(%rsp)
cvttsd2si (%rax), %eax
movb %al, %cl
movq 0x1c0(%rsp), %rax
movq %rax, %rdx
incq %rdx
movq %rdx, 0x1c0(%rsp)
movb %cl, (%rax)
movq 0x358(%rsp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, 0x358(%rsp)
cvttsd2si (%rax), %eax
movb %al, %cl
movq 0x1c0(%rsp), %rax
movq %rax, %rdx
incq %rdx
movq %rdx, 0x1c0(%rsp)
movb %cl, (%rax)
movq 0x350(%rsp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, 0x350(%rsp)
cvttsd2si (%rax), %eax
movb %al, %cl
movq 0x1c0(%rsp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x1c0(%rsp)
movb %cl, (%rax)
movq 0x1b8(%rsp), %rax
addq $-0x1, %rax
movq %rax, 0x1b8(%rsp)
jmp 0x9fae1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x388(%rsp)
movl %eax, 0x384(%rsp)
leaq 0x1e8(%rsp), %rdi
callq 0x15650
jmp 0x9fe86
movq 0x200(%rsp), %rdi
movq 0x1d8(%rsp), %rax
leaq (%rax,%rax,2), %rsi
movq 0x368(%rsp), %rdx
callq 0x9d390
jmp 0x9fbf2
movq 0x1d8(%rsp), %rcx
movq 0x1e0(%rsp), %rax
subq %rcx, %rax
movq %rax, 0x1e0(%rsp)
jmp 0x9fa59
leaq 0x1e8(%rsp), %rdi
callq 0x15650
jmp 0x9fe4c
movq 0x348(%rsp), %rax
movl %eax, %esi
leaq 0x198(%rsp), %rdi
movl $0x1, %r8d
movl %r8d, %edx
movl %r8d, %ecx
callq 0x80eb0
movq 0x160(%rsp), %rcx
movl (%rcx), %eax
movl 0x4(%rcx), %ecx
imulq %rcx, %rax
movq %rax, 0x190(%rsp)
cmpq $0x0, 0x190(%rsp)
jle 0x9fe3f
movq 0x190(%rsp), %rax
movq %rax, 0x180(%rsp)
movq 0x348(%rsp), %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
mulq %rcx
shrq %rdx
movq %rdx, 0x178(%rsp)
leaq 0x180(%rsp), %rdi
leaq 0x178(%rsp), %rsi
callq 0xa00b0
movq %rax, 0x20(%rsp)
jmp 0x9fcbb
movq 0x20(%rsp), %rax
movq %rax, 0x188(%rsp)
movq 0x1b0(%rsp), %rax
movq %rax, 0x170(%rsp)
movq 0x188(%rsp), %rax
movq %rax, 0x168(%rsp)
cmpq $0x0, 0x168(%rsp)
jbe 0x9fdde
movq 0x360(%rsp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, 0x360(%rsp)
cvttsd2si (%rax), %eax
movw %ax, %cx
movq 0x170(%rsp), %rax
movq %rax, %rdx
addq $0x2, %rdx
movq %rdx, 0x170(%rsp)
movw %cx, (%rax)
movq 0x358(%rsp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, 0x358(%rsp)
cvttsd2si (%rax), %eax
movw %ax, %cx
movq 0x170(%rsp), %rax
movq %rax, %rdx
addq $0x2, %rdx
movq %rdx, 0x170(%rsp)
movw %cx, (%rax)
movq 0x350(%rsp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, 0x350(%rsp)
cvttsd2si (%rax), %eax
movw %ax, %cx
movq 0x170(%rsp), %rax
movq %rax, %rdx
addq $0x2, %rdx
movq %rdx, 0x170(%rsp)
movw %cx, (%rax)
movq 0x168(%rsp), %rax
addq $-0x1, %rax
movq %rax, 0x168(%rsp)
jmp 0x9fce8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x388(%rsp)
movl %eax, 0x384(%rsp)
leaq 0x198(%rsp), %rdi
callq 0x79530
jmp 0x9fe86
callq 0x43af0
testb $0x1, %al
jne 0x9fdfc
movq 0x1b0(%rsp), %rdi
movq 0x348(%rsp), %rsi
callq 0x794c0
movq 0x1b0(%rsp), %rdi
movq 0x188(%rsp), %rax
leaq (%rax,%rax,2), %rsi
movq 0x368(%rsp), %rdx
callq 0xa00f0
jmp 0x9fe1f
movq 0x188(%rsp), %rcx
movq 0x190(%rsp), %rax
subq %rcx, %rax
movq %rax, 0x190(%rsp)
jmp 0x9fc60
leaq 0x198(%rsp), %rdi
callq 0x79530
jmp 0x9fe4e
cmpq $0x0, 0x3a0(%rsp)
jne 0x9fe66
movq 0x368(%rsp), %rdi
callq 0x5c6f0
movq 0x160(%rsp), %rax
movq %rax, 0x3b0(%rsp)
movq 0x3b0(%rsp), %rax
addq $0x3b8, %rsp            # imm = 0x3B8
retq
movq 0x388(%rsp), %rdi
callq 0x5970
nopw %cs:(%rax,%rax)
nopl (%rax)