// File: manikandan5[P]Image-Matching-Stitching-Warping/./CImg.h
// Function: cimg_library::CImg<double>::_save_pandore_header_length(unsigned int, unsigned int*, unsigned int) const
unsigned int _save_pandore_header_length(unsigned int id, unsigned int *dims, const unsigned int colorspace) const {
      unsigned int nbdims = 0;
      if (id==2 || id==3 || id==4) {
        dims[0] = 1; dims[1] = _width;  nbdims = 2;
      }
      if (id==5 || id==6 || id==7) {
        dims[0] = 1; dims[1] = _height; dims[2] = _width;  nbdims=3;
      }
      if (id==8 || id==9 || id==10) {
        dims[0] = _spectrum; dims[1] = _depth;  dims[2] = _height; dims[3] = _width; nbdims = 4;
      }
      if (id==16 || id==17 || id==18) {
        dims[0] = 3; dims[1] = _height; dims[2] = _width;  dims[3] = colorspace; nbdims = 4;
      }
      if (id==19 || id==20 || id==21) {
        dims[0] = 3; dims[1] = _depth;  dims[2] = _height; dims[3] = _width; dims[4] = colorspace; nbdims = 5;
      }
      if (id==22 || id==23 || id==25) {
        dims[0] = _spectrum; dims[1] = _width;  nbdims = 2;
      }
      if (id==26 || id==27 || id==29) {
        dims[0] = _spectrum; dims[1] = _height; dims[2] = _width;  nbdims=3;
      }
      if (id==30 || id==31 || id==33) {
        dims[0] = _spectrum; dims[1] = _depth;  dims[2] = _height; dims[3] = _width; nbdims = 4;
      }
      return nbdims;
    }

// Assembly:
movq %rdi, -0x8(%rsp)
movl %esi, -0xc(%rsp)
movq %rdx, -0x18(%rsp)
movl %ecx, -0x1c(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x28(%rsp)
movl $0x0, -0x20(%rsp)
cmpl $0x2, -0xc(%rsp)
je 0xb0289
cmpl $0x3, -0xc(%rsp)
je 0xb0289
cmpl $0x4, -0xc(%rsp)
jne 0xb02ab
movq -0x28(%rsp), %rax
movq -0x18(%rsp), %rcx
movl $0x1, (%rcx)
movl (%rax), %ecx
movq -0x18(%rsp), %rax
movl %ecx, 0x4(%rax)
movl $0x2, -0x20(%rsp)
cmpl $0x5, -0xc(%rsp)
je 0xb02c0
cmpl $0x6, -0xc(%rsp)
je 0xb02c0
cmpl $0x7, -0xc(%rsp)
jne 0xb02ed
movq -0x28(%rsp), %rax
movq -0x18(%rsp), %rcx
movl $0x1, (%rcx)
movl 0x4(%rax), %edx
movq -0x18(%rsp), %rcx
movl %edx, 0x4(%rcx)
movl (%rax), %ecx
movq -0x18(%rsp), %rax
movl %ecx, 0x8(%rax)
movl $0x3, -0x20(%rsp)
cmpl $0x8, -0xc(%rsp)
je 0xb0302
cmpl $0x9, -0xc(%rsp)
je 0xb0302
cmpl $0xa, -0xc(%rsp)
jne 0xb0339
movq -0x28(%rsp), %rax
movl 0xc(%rax), %edx
movq -0x18(%rsp), %rcx
movl %edx, (%rcx)
movl 0x8(%rax), %edx
movq -0x18(%rsp), %rcx
movl %edx, 0x4(%rcx)
movl 0x4(%rax), %edx
movq -0x18(%rsp), %rcx
movl %edx, 0x8(%rcx)
movl (%rax), %ecx
movq -0x18(%rsp), %rax
movl %ecx, 0xc(%rax)
movl $0x4, -0x20(%rsp)
cmpl $0x10, -0xc(%rsp)
je 0xb034e
cmpl $0x11, -0xc(%rsp)
je 0xb034e
cmpl $0x12, -0xc(%rsp)
jne 0xb0387
movq -0x28(%rsp), %rax
movq -0x18(%rsp), %rcx
movl $0x3, (%rcx)
movl 0x4(%rax), %edx
movq -0x18(%rsp), %rcx
movl %edx, 0x4(%rcx)
movl (%rax), %ecx
movq -0x18(%rsp), %rax
movl %ecx, 0x8(%rax)
movl -0x1c(%rsp), %ecx
movq -0x18(%rsp), %rax
movl %ecx, 0xc(%rax)
movl $0x4, -0x20(%rsp)
cmpl $0x13, -0xc(%rsp)
je 0xb039c
cmpl $0x14, -0xc(%rsp)
je 0xb039c
cmpl $0x15, -0xc(%rsp)
jne 0xb03e0
movq -0x28(%rsp), %rax
movq -0x18(%rsp), %rcx
movl $0x3, (%rcx)
movl 0x8(%rax), %edx
movq -0x18(%rsp), %rcx
movl %edx, 0x4(%rcx)
movl 0x4(%rax), %edx
movq -0x18(%rsp), %rcx
movl %edx, 0x8(%rcx)
movl (%rax), %ecx
movq -0x18(%rsp), %rax
movl %ecx, 0xc(%rax)
movl -0x1c(%rsp), %ecx
movq -0x18(%rsp), %rax
movl %ecx, 0x10(%rax)
movl $0x5, -0x20(%rsp)
cmpl $0x16, -0xc(%rsp)
je 0xb03f5
cmpl $0x17, -0xc(%rsp)
je 0xb03f5
cmpl $0x19, -0xc(%rsp)
jne 0xb0416
movq -0x28(%rsp), %rax
movl 0xc(%rax), %edx
movq -0x18(%rsp), %rcx
movl %edx, (%rcx)
movl (%rax), %ecx
movq -0x18(%rsp), %rax
movl %ecx, 0x4(%rax)
movl $0x2, -0x20(%rsp)
cmpl $0x1a, -0xc(%rsp)
je 0xb042b
cmpl $0x1b, -0xc(%rsp)
je 0xb042b
cmpl $0x1d, -0xc(%rsp)
jne 0xb0457
movq -0x28(%rsp), %rax
movl 0xc(%rax), %edx
movq -0x18(%rsp), %rcx
movl %edx, (%rcx)
movl 0x4(%rax), %edx
movq -0x18(%rsp), %rcx
movl %edx, 0x4(%rcx)
movl (%rax), %ecx
movq -0x18(%rsp), %rax
movl %ecx, 0x8(%rax)
movl $0x3, -0x20(%rsp)
cmpl $0x1e, -0xc(%rsp)
je 0xb046c
cmpl $0x1f, -0xc(%rsp)
je 0xb046c
cmpl $0x21, -0xc(%rsp)
jne 0xb04a3
movq -0x28(%rsp), %rax
movl 0xc(%rax), %edx
movq -0x18(%rsp), %rcx
movl %edx, (%rcx)
movl 0x8(%rax), %edx
movq -0x18(%rsp), %rcx
movl %edx, 0x4(%rcx)
movl 0x4(%rax), %edx
movq -0x18(%rsp), %rcx
movl %edx, 0x8(%rcx)
movl (%rax), %ecx
movq -0x18(%rsp), %rax
movl %ecx, 0xc(%rax)
movl $0x4, -0x20(%rsp)
movl -0x20(%rsp), %eax
retq
nopl (%rax,%rax)