// File: /workspace/github_cpp_makefile_star2_O2/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
movss %xmm0, 0x14(%rsp)
movq %r9, 0x48(%rsp)
movq %r8, 0x50(%rsp)
movq %rdx, 0x8(%rsp)
movq %rdi, (%rsp)
testq %rcx, %rcx
je 0xd646
movq 0xc0(%rsp), %r12
cmpq $0x0, 0x8(%r12)
je 0xd65c
movq %rcx, %r15
movl %esi, %ebp
movq %rcx, %rdi
callq 0x41e0
movq %rax, %rbx
movq (%rsp), %rdi
callq 0xfd1c
testb %al, %al
je 0xd3cc
pushq $0x1
popq %r8
movq 0x8(%r12), %rax
movl (%r12), %edi
movl %ebx, %r11d
xorl %r9d, %r9d
xorl %ecx, %ecx
xorl %edx, %edx
xorl %esi, %esi
xorl %r10d, %r10d
movq %r11, %rbx
cmpq %r9, %r11
je 0xd3d0
movzbl (%r15,%r9), %r10d
cmpl $0x9, %r10d
je 0xd3a7
cmpl $0xa, %r10d
jne 0xd3b4
addl 0x4(%rax), %edx
cmpl %esi, %ecx
cmovgl %ecx, %esi
xorl %ecx, %ecx
jmp 0xd3c7
movl 0x400(%rax), %r11d
leal (%rcx,%r11,4), %ecx
jmp 0xd3c4
cmpl %r10d, %edi
jbe 0xd3c7
movl %r10d, %r11d
shll $0x5, %r11d
addl (%rax,%r11), %ecx
movq %rbx, %r11
incq %r9
jmp 0xd385
movl %ebx, %edx
jmp 0xd408
testl %ecx, %ecx
jne 0xd3da
cmpb $0xa, %r10b
jne 0xd3e2
cmpl %esi, %ecx
cmovgl %ecx, %esi
addl 0x4(%rax), %edx
addl %ebp, %esi
addl 0x8(%rsp), %edx
cmpb $0x0, 0xc8(%rsp)
jne 0xd3f6
movl 0xc(%rax), %r8d
pushq $0x1
popq %rcx
movq (%rsp), %rdi
xorl %r9d, %r9d
callq 0xe93a
movq %rbx, %rdx
xorl %r13d, %r13d
movl %ebp, %ecx
movq %r15, 0x58(%rsp)
movl %ebp, 0x24(%rsp)
movq %rdx, 0x60(%rsp)
cmpq %rdx, %r13
je 0xd646
movzbl (%r15,%r13), %ebx
cmpl $0x9, %ebx
je 0xd44c
cmpl $0xa, %ebx
jne 0xd45f
movq 0x8(%r12), %rax
movq 0x8(%rsp), %rcx
addl 0x4(%rax), %ecx
movq %rcx, 0x8(%rsp)
movl %ebp, %ecx
jmp 0xd63e
movq 0x8(%r12), %rax
movl 0x400(%rax), %eax
leal (%rcx,%rax,4), %ecx
jmp 0xd63e
cmpl %ebx, (%r12)
jbe 0xd63e
movq %rcx, 0x18(%rsp)
movl %ebx, %esi
shll $0x5, %esi
addq 0x8(%r12), %rsi
leaq 0x28(%rsp), %rdi
callq 0xc2e0
cmpq $0x0, 0x40(%rsp)
je 0xd62a
movq (%rsp), %rax
movl 0xc(%rax), %r8d
movl 0x34(%rsp), %eax
cmpl %eax, %r8d
seta %cl
andb 0xc8(%rsp), %cl
cmpb $0x1, %cl
jne 0xd4e1
subq $0x8, %rsp
xorps %xmm0, %xmm0
xorps %xmm1, %xmm1
xorps %xmm2, %xmm2
xorps %xmm3, %xmm3
leaq 0x30(%rsp), %rdi
pushq $-0x64
popq %rdx
movl %edx, %esi
pushq $0x1
popq %rcx
xorl %r9d, %r9d
pushq $0x2
callq 0xba08
popq %rcx
popq %rdx
movq (%rsp), %rax
movl 0xc(%rax), %r8d
movl 0x34(%rsp), %eax
cmpl %eax, %r8d
cmovbl %r8d, %eax
movl %eax, %r15d
cmpq $0x0, 0x50(%rsp)
je 0xd538
xorl %r12d, %r12d
cmpq %r12, %r15
je 0xd538
movq 0x50(%rsp), %rax
movb (%rax,%r12), %bpl
cmpb $0x1, %bpl
je 0xd533
leaq 0x68(%rsp), %r14
movq %r14, %rdi
leaq 0x28(%rsp), %rsi
movl %r12d, %edx
callq 0x116cc
movzbl %bpl, %esi
movq %r14, %rdi
callq 0x116dc
movq %r14, %rdi
callq 0xb8ae
incq %r12
jmp 0xd4f6
orq $0x100, %rbx            # imm = 0x100
movq 0xc0(%rsp), %r12
cmpl (%r12), %ebx
jge 0xd5b8
cmpq $0x0, 0x48(%rsp)
je 0xd5db
movq 0x18(%rsp), %rax
leal -0x1(%rax), %r14d
movq 0x8(%rsp), %rax
leal -0x1(%rax), %ebp
xorl %r12d, %r12d
cmpq %r12, %r15
je 0xd5db
movl 0x28(%rsp), %r9d
addl %r14d, %r9d
movl 0x2c(%rsp), %eax
addl %ebp, %eax
movq 0x48(%rsp), %rcx
movzbl (%rcx,%r12), %r10d
movq (%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x8(%rsp), %rdx
xorl %ecx, %ecx
movl %r12d, %r8d
movss 0x14(%rsp), %xmm0
pushq %r10
pushq %r12
pushq $0x0
pushq %rax
callq 0x1172e
addq $0x20, %rsp
incq %r12
jmp 0xd56d
movq (%rsp), %rdi
movq 0x18(%rsp), %r14
movl %r14d, %esi
movq 0x8(%rsp), %rdx
leaq 0x28(%rsp), %rcx
movss 0x14(%rsp), %xmm0
callq 0xc48e
jmp 0xd617
shll $0x5, %ebx
movq 0xc0(%rsp), %r12
addq 0x8(%r12), %rbx
movq (%rsp), %rdi
movq 0x18(%rsp), %r14
movl %r14d, %esi
movq 0x8(%rsp), %rdx
leaq 0x28(%rsp), %rcx
movq %rbx, %r8
movss 0x14(%rsp), %xmm0
movss 0x46c22(%rip), %xmm1    # 0x54234
callq 0x119fe
addl 0x28(%rsp), %r14d
movq %r14, 0x18(%rsp)
movq 0x58(%rsp), %r15
movl 0x24(%rsp), %ebp
leaq 0x28(%rsp), %rdi
callq 0xb8ae
movq 0x60(%rsp), %rdx
movq 0x18(%rsp), %rcx
incq %r13
jmp 0xd41b
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, %rbx
movq (%rsp), %r14
movl (%r14), %edx
movl 0x4(%r14), %ecx
movl 0x8(%r14), %r8d
movl 0xc(%r14), %r9d
leaq 0x47165(%rip), %rax     # 0x547e8
leaq 0x48538(%rip), %r10     # 0x55bc2
cmpb $0x0, 0x10(%r14)
cmovneq %rax, %r10
subq $0x8, %rsp
leaq 0x530e9(%rip), %r11     # 0x60787
leaq 0x66bf5(%rip), %rsi     # 0x7429a
movq %rbx, %rdi
xorl %eax, %eax
pushq %r11
pushq %r10
pushq 0x18(%r14)
callq 0x9d52
addq $0x20, %rsp
leaq 0x8259e(%rip), %rsi     # 0x8fc60
movq 0x8290f(%rip), %rdx     # 0x8ffd8
movq %rbx, %rdi
callq 0x4910
movq %rax, %r14
movq %rbx, %rdi
callq 0x4390
jmp 0xd6f1
jmp 0xd6e4
jmp 0xd6e4
jmp 0xd6e4
movq %rax, %r14
leaq 0x28(%rsp), %rdi
callq 0xb8ae
movq %r14, %rdi
callq 0x4950
nop