// File: /workspace/github_cpp_makefile_star2_O1/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, 0x20(%rsp)
movq %r9, 0x48(%rsp)
movq %r8, 0x50(%rsp)
movq %rdx, 0x10(%rsp)
movq %rdi, (%rsp)
testq %rcx, %rcx
je 0x10393
movl %esi, 0x1c(%rsp)
movq 0xc0(%rsp), %rax
movq 0x8(%rax), %rbx
testq %rbx, %rbx
je 0x103a9
movq %rcx, %r15
movq %rcx, %rdi
callq 0x41e0
movq %rax, %r14
movq (%rsp), %rax
cmpq $0x0, 0x18(%rax)
je 0x1003a
movq (%rsp), %rax
movdqu (%rax), %xmm0
pxor %xmm1, %xmm1
pcmpeqd %xmm0, %xmm1
movmskps %xmm1, %eax
testb %al, %al
je 0x100ec
testl %r14d, %r14d
je 0x100a0
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 0x10072
cmpl $0xa, %r9d
jne 0x1007f
addl 0x4(%rbx), %edx
cmpl %esi, %eax
cmovgl %eax, %esi
xorl %eax, %eax
jmp 0x1008f
movl 0x400(%rbx), %r10d
leal (%rax,%r10,4), %eax
jmp 0x1008f
cmpl %r9d, %ecx
jbe 0x1008f
movl %r9d, %r10d
shll $0x5, %r10d
addl (%rbx,%r10), %eax
incq %r8
cmpq %r8, %rdi
jne 0x10055
cmpl $0xa, %r9d
sete %cl
jmp 0x100a8
xorl %eax, %eax
xorl %edx, %edx
xorl %esi, %esi
xorl %ecx, %ecx
testl %eax, %eax
jne 0x100b0
testb %cl, %cl
je 0x100b8
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 0x100d4
movl 0xc(%rbx), %r8d
movq (%rsp), %rdi
movl $0x1, %ecx
callq 0x10470
movq %rax, %rdi
xorl %esi, %esi
callq 0x13aaa
testl %r14d, %r14d
movl 0x1c(%rsp), %ebx
je 0x10393
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 0x10145
cmpl $0xa, %r12d
movq 0xc0(%rsp), %rax
jne 0x10169
movq 0x8(%rax), %rax
movq 0x10(%rsp), %rcx
addl 0x4(%rax), %ecx
movq %rcx, 0x10(%rsp)
movl %ebx, %eax
movq %rax, 0x8(%rsp)
jmp 0x10387
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 0x10387
cmpl %r12d, (%rax)
jbe 0x10387
movl %r12d, %esi
shll $0x5, %esi
addq 0x8(%rax), %rsi
leaq 0x28(%rsp), %rdi
callq 0xecec
cmpq $0x0, 0x40(%rsp)
je 0x10371
cmpb $0x0, 0xc8(%rsp)
je 0x101de
movq (%rsp), %rax
movl 0xc(%rax), %r8d
cmpl 0x34(%rsp), %r8d
jbe 0x101de
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 0xe344
addq $0x10, %rsp
cmpq $0x0, 0x50(%rsp)
sete %al
movq (%rsp), %rcx
movl 0xc(%rcx), %ecx
movl 0x34(%rsp), %edx
cmpl %edx, %ecx
cmovbl %ecx, %edx
movl %edx, 0x24(%rsp)
testl %edx, %edx
sete %cl
orb %al, %cl
jne 0x1025d
movl 0x24(%rsp), %r15d
xorl %ebx, %ebx
movq 0x50(%rsp), %rax
movb (%rax,%rbx), %r14b
cmpb $0x1, %r14b
je 0x10255
leaq 0x68(%rsp), %r13
movq %r13, %rdi
leaq 0x28(%rsp), %rsi
movl %ebx, %edx
movl %ebx, %ecx
callq 0x1525c
movzbl %r14b, %esi
movq %r13, %rdi
callq 0x14ebe
cmpb $0x0, 0x78(%rsp)
jne 0x10255
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0x10255
callq 0x4680
incq %rbx
cmpq %rbx, %r15
jne 0x1020b
orq $0x100, %r12            # imm = 0x100
movq 0xc0(%rsp), %rax
cmpl (%rax), %r12d
jge 0x10335
cmpq $0x0, 0x48(%rsp)
sete %al
movl 0x24(%rsp), %edx
testl %edx, %edx
sete %cl
orb %al, %cl
jne 0x102eb
movq 0x8(%rsp), %rax
leal -0x1(%rax), %r15d
movq 0x10(%rsp), %rax
leal -0x1(%rax), %r13d
movl %edx, %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 0x20(%rsp), %xmm0
pushq %r10
pushq %rbx
pushq $0x0
pushq %rax
callq 0x14f1e
addq $0x20, %rsp
incq %rbx
cmpq %rbx, %r14
jne 0x102a2
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 0x28(%rsp), %xmm0
movss 0x60f9c(%rip), %xmm1    # 0x712c4
pushq %r12
callq 0x153a6
addq $0x10, %rsp
jmp 0x1035a
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 0x20(%rsp), %xmm0
callq 0x13afe
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 0x10387
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x10387
callq 0x4680
incq %rbp
cmpq %r14, %rbp
jne 0x1010f
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 0x62f6a(%rip), %rax     # 0x73338
leaq 0x6433d(%rip), %r10     # 0x74712
cmpb $0x0, 0x10(%rbx)
cmovneq %rax, %r10
subq $0x8, %rsp
leaq 0x6eeef(%rip), %r11     # 0x7f2d7
leaq 0x829fb(%rip), %rsi     # 0x92dea
movq %r14, %rdi
xorl %eax, %eax
pushq %r11
pushq %r10
pushq 0x18(%rbx)
callq 0xc196
addq $0x20, %rsp
leaq 0x9c815(%rip), %rsi     # 0xacc20
movq 0x9cbbe(%rip), %rdx     # 0xacfd0
movq %r14, %rdi
callq 0x4900
movq %rax, %rbx
movq %r14, %rdi
callq 0x43b0
jmp 0x10446
jmp 0x1042d
jmp 0x1042d
jmp 0x1042d
movq %rax, %rbx
cmpb $0x0, 0x38(%rsp)
jne 0x10446
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x10446
callq 0x4680
movq %rbx, %rdi
callq 0x4950