// File: /workspace/github_cpp_makefile_star2_O3/manikandan5[P]Image-Matching-Stitching-Warping/./CImg.h
// Function: cimg_library::CImg<unsigned char>& cimg_library::CImg<unsigned char>::_draw_text<unsigned char, unsigned char, unsigned char>(int, int, char const*, unsigned char const*, unsigned char const*, float, cimg_library::CImgList<unsigned char> const&, bool)
CImg<T>& _draw_text(const int x0, const int y0,
                        const char *const text,
                        const tc1 *const foreground_color, const tc2 *const background_color,
                        const float opacity, const CImgList<t>& font,
                        const bool is_native_font) {
      if (!text) return *this;
      if (!font)
        throw CImgArgumentException(_cimg_instance
                                    "draw_text(): Empty specified font.",
                                    cimg_instance);

      const unsigned int text_length = (unsigned int)std::strlen(text);
      const bool _is_empty = is_empty();
      if (_is_empty) {
        // If needed, pre-compute necessary size of the image
        int x = 0, y = 0, w = 0;
        unsigned char c = 0;
        for (unsigned int i = 0; i<text_length; ++i) {
          c = text[i];
          switch (c) {
          case '\n' : y+=font[0]._height; if (x>w) w = x; x = 0; break;
          case '\t' : x+=4*font[' ']._width; break;
          default : if (c<font._width) x+=font[c]._width;
          }
        }
        if (x!=0 || c=='\n') {
          if (x>w) w=x;
          y+=font[0]._height;
        }
        assign(x0+w,y0+y,1,is_native_font?1:font[0]._spectrum,0);
      }

      int x = x0, y = y0;
      for (unsigned int i = 0; i<text_length; ++i) {
        const unsigned char c = text[i];
        switch (c) {
        case '\n' : y+=font[0]._height; x = x0; break;
        case '\t' : x+=4*font[' ']._width; break;
        default : if (c<font._width) {
            CImg<T> letter = font[c];
            if (letter) {
              if (is_native_font && _spectrum>letter._spectrum) letter.resize(-100,-100,1,_spectrum,0,2);
              const unsigned int cmin = cimg::min(_spectrum,letter._spectrum);
              if (foreground_color)
                for (unsigned int c = 0; c<cmin; ++c)
                  if (foreground_color[c]!=1) letter.get_shared_channel(c)*=foreground_color[c];
              if (c+256<font.width()) { // Letter has mask.
                if (background_color)
                  for (unsigned int c = 0; c<cmin; ++c)
                    draw_rectangle(x,y,0,c,x+letter._width-1,y+letter._height-1,0,c,background_color[c],opacity);
                draw_image(x,y,letter,font[c+256],opacity,(T)255);
              } else draw_image(x,y,letter,opacity); // Letter has no mask.
              x+=letter._width;
            }
          }
        }
      }
      return *this;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movd %xmm0, 0x24(%rsp)
movq %r9, 0x48(%rsp)
movq %r8, 0x50(%rsp)
movq %rdx, 0x10(%rsp)
movq %rdi, (%rsp)
testq %rcx, %rcx
je 0x10401
movl %esi, 0x1c(%rsp)
movq 0xc0(%rsp), %rax
movq 0x8(%rax), %rbx
testq %rbx, %rbx
je 0x10417
movq %rcx, %r15
movq %rcx, %rdi
callq 0x41e0
movq %rax, %r14
movq (%rsp), %rax
cmpq $0x0, 0x18(%rax)
je 0x100aa
movq (%rsp), %rax
movdqu (%rax), %xmm0
pxor %xmm1, %xmm1
pcmpeqd %xmm0, %xmm1
movmskps %xmm1, %eax
testb %al, %al
je 0x1015c
testl %r14d, %r14d
je 0x10110
movq 0xc0(%rsp), %rax
movl (%rax), %ecx
movl %r14d, %edi
xorl %r8d, %r8d
xorl %esi, %esi
xorl %edx, %edx
xorl %eax, %eax
movzbl (%r15,%r8), %r9d
cmpl $0x9, %r9d
je 0x100e2
cmpl $0xa, %r9d
jne 0x100ef
addl 0x4(%rbx), %edx
cmpl %esi, %eax
cmovgl %eax, %esi
xorl %eax, %eax
jmp 0x100ff
movl 0x400(%rbx), %r10d
leal (%rax,%r10,4), %eax
jmp 0x100ff
cmpl %r9d, %ecx
jbe 0x100ff
movl %r9d, %r10d
shll $0x5, %r10d
addl (%rbx,%r10), %eax
incq %r8
cmpq %r8, %rdi
jne 0x100c5
cmpl $0xa, %r9d
sete %cl
jmp 0x10118
xorl %eax, %eax
xorl %edx, %edx
xorl %esi, %esi
xorl %ecx, %ecx
testl %eax, %eax
jne 0x10120
testb %cl, %cl
je 0x10128
cmpl %esi, %eax
cmovgl %eax, %esi
addl 0x4(%rbx), %edx
addl 0x1c(%rsp), %esi
addl 0x10(%rsp), %edx
movl $0x1, %r8d
cmpb $0x0, 0xc8(%rsp)
jne 0x10144
movl 0xc(%rbx), %r8d
movq (%rsp), %rdi
movl $0x1, %ecx
callq 0x104de
movq %rax, %rdi
xorl %esi, %esi
callq 0x13b9c
testl %r14d, %r14d
movl 0x1c(%rsp), %ebx
je 0x10401
movl %r14d, %r14d
xorl %ebp, %ebp
movl %ebx, %eax
movq %rax, 0x8(%rsp)
movq %r15, 0x60(%rsp)
movq %r14, 0x58(%rsp)
movzbl (%r15,%rbp), %r12d
cmpl $0x9, %r12d
je 0x101b5
cmpl $0xa, %r12d
movq 0xc0(%rsp), %rax
jne 0x101d9
movq 0x8(%rax), %rax
movq 0x10(%rsp), %rcx
addl 0x4(%rax), %ecx
movq %rcx, 0x10(%rsp)
movl %ebx, %eax
movq %rax, 0x8(%rsp)
jmp 0x103f5
movq 0xc0(%rsp), %rax
movq 0x8(%rax), %rax
movl 0x400(%rax), %eax
movq 0x8(%rsp), %rcx
leal (%rcx,%rax,4), %ecx
movq %rcx, 0x8(%rsp)
jmp 0x103f5
cmpl %r12d, (%rax)
jbe 0x103f5
movl %r12d, %esi
shll $0x5, %esi
addq 0x8(%rax), %rsi
leaq 0x28(%rsp), %rdi
callq 0xed1e
cmpq $0x0, 0x40(%rsp)
je 0x103df
movq (%rsp), %rax
movl 0xc(%rax), %r8d
movl 0x34(%rsp), %ecx
cmpl %ecx, %r8d
seta %al
andb 0xc8(%rsp), %al
cmpb $0x1, %al
jne 0x1025e
subq $0x8, %rsp
pxor %xmm0, %xmm0
xorps %xmm1, %xmm1
xorps %xmm2, %xmm2
xorps %xmm3, %xmm3
leaq 0x30(%rsp), %rdi
movl $0xffffff9c, %esi       # imm = 0xFFFFFF9C
movl $0xffffff9c, %edx       # imm = 0xFFFFFF9C
movl $0x1, %ecx
xorl %r9d, %r9d
pushq $0x2
callq 0xe338
addq $0x10, %rsp
movq (%rsp), %rax
movl 0xc(%rax), %r8d
movl 0x34(%rsp), %ecx
cmpl %ecx, %r8d
cmovbl %r8d, %ecx
movl %ecx, 0x20(%rsp)
cmpq $0x0, 0x50(%rsp)
je 0x102d1
cmpl $0x0, 0x20(%rsp)
je 0x102d1
movl 0x20(%rsp), %r15d
xorl %ebx, %ebx
movq 0x50(%rsp), %rax
movb (%rax,%rbx), %r14b
cmpb $0x1, %r14b
je 0x102c9
leaq 0x68(%rsp), %r13
movq %r13, %rdi
leaq 0x28(%rsp), %rsi
movl %ebx, %edx
movl %ebx, %ecx
callq 0x1531c
movzbl %r14b, %esi
movq %r13, %rdi
callq 0x14fe8
cmpb $0x0, 0x78(%rsp)
jne 0x102c9
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0x102c9
callq 0x4690
incq %rbx
cmpq %rbx, %r15
jne 0x1027f
orq $0x100, %r12            # imm = 0x100
movq 0xc0(%rsp), %rax
cmpl (%rax), %r12d
jge 0x103a3
cmpq $0x0, 0x48(%rsp)
movl 0x20(%rsp), %ecx
je 0x10359
testl %ecx, %ecx
je 0x10359
movq 0x8(%rsp), %rax
leal -0x1(%rax), %r15d
movq 0x10(%rsp), %rax
leal -0x1(%rax), %r13d
movl %ecx, %r14d
xorl %ebx, %ebx
movl 0x28(%rsp), %r9d
addl %r15d, %r9d
movl 0x2c(%rsp), %eax
addl %r13d, %eax
movq 0x48(%rsp), %rcx
movzbl (%rcx,%rbx), %r10d
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
xorl %ecx, %ecx
movl %ebx, %r8d
movd 0x24(%rsp), %xmm0
pushq %r10
pushq %rbx
pushq $0x0
pushq %rax
callq 0x1505e
addq $0x20, %rsp
incq %rbx
cmpq %rbx, %r14
jne 0x10310
shll $0x5, %r12d
movq 0xc0(%rsp), %rax
addq 0x8(%rax), %r12
subq $0x8, %rsp
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rbx
movl %ebx, %esi
movq 0x18(%rsp), %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
leaq 0x30(%rsp), %r9
movd 0x2c(%rsp), %xmm0
movss 0x5df2e(%rip), %xmm1    # 0x6e2c4
pushq %r12
callq 0x15464
addq $0x10, %rsp
jmp 0x103c8
movq (%rsp), %rdi
movq 0x8(%rsp), %rbx
movl %ebx, %esi
movq 0x10(%rsp), %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
leaq 0x28(%rsp), %r9
movd 0x24(%rsp), %xmm0
callq 0x13c00
addl 0x28(%rsp), %ebx
movq %rbx, 0x8(%rsp)
movq 0x60(%rsp), %r15
movl 0x1c(%rsp), %ebx
movq 0x58(%rsp), %r14
cmpb $0x0, 0x38(%rsp)
jne 0x103f5
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x103f5
callq 0x4690
incq %rbp
cmpq %r14, %rbp
jne 0x1017f
movq (%rsp), %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x4008, %edi           # imm = 0x4008
callq 0x4210
movq %rax, %r14
movq (%rsp), %rbx
movl (%rbx), %edx
movl 0x4(%rbx), %ecx
movl 0x8(%rbx), %r8d
movl 0xc(%rbx), %r9d
leaq 0x5e42c(%rip), %rax     # 0x6e868
leaq 0x5f7ff(%rip), %r10     # 0x6fc42
cmpb $0x0, 0x10(%rbx)
cmovneq %rax, %r10
subq $0x8, %rsp
leaq 0x6a3b1(%rip), %r11     # 0x7a807
leaq 0x7debd(%rip), %rsi     # 0x8e31a
movq %r14, %rdi
xorl %eax, %eax
pushq %r11
pushq %r10
pushq 0x18(%rbx)
callq 0xc16a
addq $0x20, %rsp
leaq 0x977d7(%rip), %rsi     # 0xa7c50
movq 0x97b50(%rip), %rdx     # 0xa7fd0
movq %r14, %rdi
callq 0x4910
movq %rax, %rbx
movq %r14, %rdi
callq 0x43c0
jmp 0x104b4
jmp 0x1049b
jmp 0x1049b
jmp 0x1049b
movq %rax, %rbx
cmpb $0x0, 0x38(%rsp)
jne 0x104b4
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x104b4
callq 0x4690
movq %rbx, %rdi
callq 0x4960