// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heather.cpp
// Function: vchar(int, int, unsigned char, unsigned char, unsigned char)
void vchar(int xoffset,int yoffset, u08 erase, u08 color, u08 c)  // draw a vector character
{
int x1,y1, x2,y2;
u08 VByte;
u08 *VIndex;  // char gen table offset

   // draw a vector graphics character

   if(erase) erase_vchar(xoffset, yoffset);
   if(c == ' ') return;
if(c == DEG_CODE) c = 0xF8;
else if(c == PLUS_MINUS) c = 0xF1;

   x2 = y2 = 0;

   VIndex = vgen[c];  // pointer to strokes for the char

   while(1) {  // draw the character strokes
      VByte = *VIndex;
      if(VByte == 0xFF) break;
      ++VIndex;

      x1 = (VByte >> 4) & 0x07;
      y1 = (VByte & 0x07);

      x1 *= VCharWidth;
      if((c >= 0xB0) && (c <= 0xDF)) {  // make sure line drawing chars touch
         if(((VByte>>4) & 0x07) == (VCHAR_W-1)) x1 += (VCharWidth-1);
      }
      x1 /= VCHAR_W;

      y1 *= VCharHeight;
      if((c >= 0xB0) && (c <= 0xDF)) { // make sure line drawing chars touch
         if((VByte & 0x07) == (VCHAR_H-1)) y1 += (VCharHeight-1);
      }
      y1 /= VCHAR_H;

      if((VByte & 0x80) == 0x00) {  // move to point and draw a dot
         x2 = x1;   // we do dots as a single point line
         y2 = y1;
      }

/////      thick_line(x1+xoffset,y1+yoffset, x2+xoffset,y2+yoffset, color, VCharThickness);
      xthick_line(x1+xoffset,y1+yoffset, x2+xoffset,y2+yoffset, color, VCharThickness);

      if(VByte & 0x08) break;  // end of list

      x2 = x1;  // prepare for next stroke in the character
      y2 = y1;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r8d, %ebx
movl %ecx, %r15d
movl %esi, %r14d
movl %edi, %r12d
testl %edx, %edx
je 0xdd73
movl %r12d, %edi
movl %r14d, %esi
callq 0xe584
movl %r12d, -0x30(%rbp)
movq %r14, -0x48(%rbp)
cmpb $0x1, %bl
je 0xdd99
movzbl %bl, %eax
cmpl $0x20, %eax
je 0xde9f
cmpb $0x1f, %bl
movl $0xf1, %ecx
cmovel %ecx, %eax
jmp 0xdd9b
movb $-0x8, %al
movzbl %al, %ecx
leaq 0x13beeb(%rip), %rax    # 0x149c90
movq (%rax,%rcx,8), %rdx
addb $0x50, %cl
movq %rcx, -0x40(%rbp)
movzbl %r15b, %eax
movl %eax, -0x2c(%rbp)
xorl %r12d, %r12d
xorl %r13d, %r13d
movzbl (%rdx), %r14d
cmpl $0xff, %r14d
je 0xde9f
movl 0x1ff768(%rip), %esi    # 0x20d53c
cmpl $0x2, %esi
jge 0xdde7
movl 0x1f4a31(%rip), %eax    # 0x202810
movl 0x1f4a2f(%rip), %esi    # 0x202814
jmp 0xddf1
leal (,%rsi,8), %eax
shll $0x4, %esi
incq %rdx
movq %rdx, -0x50(%rbp)
movl %r14d, %edx
shrl $0x4, %edx
andl $0x7, %edx
movl %r14d, %ecx
andl $0x7, %ecx
movl %eax, %edi
imull %edx, %edi
decl %eax
cmpl $0x7, %edx
movl $0x0, %edx
cmovnel %edx, %eax
leal -0x1(%rsi), %r8d
cmpl $0x7, %ecx
cmovnel %edx, %r8d
cmpb $0x30, -0x40(%rbp)
cmovael %edx, %eax
cmovael %edx, %r8d
addl %edi, %eax
cltd
pushq $0x8
popq %rdi
idivl %edi
movl %eax, %r15d
imull %esi, %ecx
addl %r8d, %ecx
movl %ecx, %eax
cltd
idivl %edi
movl %eax, %ebx
testb %r14b, %r14b
movl %r15d, -0x38(%rbp)
cmovnsl %r15d, %r12d
cmovnsl %eax, %r13d
movl -0x30(%rbp), %ecx
addl %ecx, %r15d
movq -0x48(%rbp), %rax
leal (%rbx,%rax), %edx
movl %edx, -0x34(%rbp)
addl %ecx, %r12d
addl %eax, %r13d
callq 0xdeae
movzbl %al, %r9d
movl %r15d, %edi
movl -0x34(%rbp), %esi
movl %r12d, %edx
movl %r13d, %ecx
movl -0x2c(%rbp), %r8d
callq 0xe5ca
movq -0x50(%rbp), %rdx
movl -0x38(%rbp), %r12d
movl %ebx, %r13d
testb $0x8, %r14b
je 0xddbd
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq