// File: /workspace/github_c_makefile_star2_O3/Edilbert[P]BS9/bs9.c
// Function: ParseByteData
char *ParseByteData(char *p)
{
   int i,j,l,v;
   unsigned char ByteBuffer[ML];
   char Delimiter;

   p = SkipSpace(p);
   l = 0;
   while (*p && *p != ';') // Parse data line
   {
      if (CodeStyle == 1 && *p == ' ') break;
      else p = SkipSpace(p);
      Delimiter = *p;
      if (!strncmp(p,"$DATE",5))
      {
         strcpy((char *)ByteBuffer+l,datebuffer);
         l += strlen(datebuffer);
         p += 5;
      }
      else if (Delimiter == '"' || Delimiter == '\'')
      {
         i = l; // remember start of string
         p = ParseASCII(p,ByteBuffer,&l);
         if (df)
         {
            fprintf(df,"String $%4.4x:<",pc);
            for (j=i ; j < l ; ++j) fprintf(df,"%c",ByteBuffer[j]&0x7f);
            fprintf(df,"> [%d]\n",l-i);
         }
      }
      else
      {
         v = UNDEF;
         p = EvalOperand(p,&v,0);
         if (v == UNDEF && !Pass)
         {
            ErrorMsg("Undefined symbol in BYTE data\n");
            ErrorLine(p);
            exit(1);
         }
         if (v > 255 || v < -127) ByteBuffer[l++] = v >> 8;
         ByteBuffer[l++] = v & 0xff;
         if (df)
         {
            fprintf(df,"BYTE   $%4.4x: %2.2x\n",pc,v);
         }
      }
      if (CodeStyle == 1 && *p == ' ') break;
      p = SkipToComma(p);
      if (*p == ',') ++p;
   }
   if (l < 1)
   {
      ErrorMsg("Missing byte data\n");
      ErrorLine(p);
      exit(1);
   }
   j = AddressIndex(pc);
   if (j >= 0)
   for ( ; j < Labels ; ++j) // There may be multiple lables on this address
   {
       if (lab[j].Address == pc) lab[j].Bytes = l;
   }
   if (j >= 0 && df) fprintf(df,"Byte label [%s] $%4.4x $%4.4x %d bytes\n",
                   lab[j].Name,lab[j].Address,pc,l);
   if (!Pass)
   {
      for (i=0 ; i < l ; ++i)
      {
         PutByte(pc+i,ByteBuffer[i]);
         if (ListOn && i < 4) fprintf(lf," %2.2x",ByteBuffer[i]);
      }
      if (ListOn)
      {
         for (i=l ; i < 4 ; ++i) fprintf(lf,"   ");
         fprintf(lf,"  %s\n",Line);
      }
   }
   pc += l;
   return p;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movq %rdi, %rbx
cmpb $0x0, (%rdi)
je 0x6012
callq 0x2320
movq (%rax), %rax
decq %rbx
movsbq 0x1(%rbx), %rcx
incq %rbx
testb $0x20, 0x1(%rax,%rcx,2)
jne 0x6003
leaq 0x8(%rsp), %rbp
movl $0x0, (%rbp)
leaq 0x6a67(%rip), %r15      # 0xca8c
movabsq $0x800100000000001, %r13 # imm = 0x800100000000001
movzbl (%rbx), %eax
testl %eax, %eax
je 0x6213
cmpl $0x3b, %eax
je 0x6213
cmpb $0x20, %al
jne 0x6054
cmpl $0x1, 0x7ef06(%rip)     # 0x84f54
je 0x6213
testb %al, %al
je 0x6075
callq 0x2320
movq (%rax), %rax
decq %rbx
movsbq 0x1(%rbx), %r14
incq %rbx
testb $0x20, 0x1(%rax,%r14,2)
jne 0x6063
jmp 0x6078
xorl %r14d, %r14d
movl $0x5, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2080
testl %eax, %eax
je 0x6135
cmpb $0x27, %r14b
je 0x60a3
movzbl %r14b, %eax
cmpl $0x22, %eax
jne 0x6166
movslq 0x8(%rsp), %r12
movq %rbx, %rdi
leaq 0x10(%rsp), %rsi
movq %rbp, %rdx
callq 0x5efd
movq %rax, %rbx
movq 0x1f94e(%rip), %rdi     # 0x25a10
testq %rdi, %rdi
je 0x61e2
movq %rbp, %r15
movl 0xe660(%rip), %edx      # 0x14734
leaq 0x69b7(%rip), %rsi      # 0xca92
xorl %eax, %eax
callq 0x2210
movslq 0x8(%rsp), %rbp
cmpl %r12d, %ebp
jle 0x610c
movq %r12, %r14
movq 0x1f91a(%rip), %rsi     # 0x25a10
movzbl 0x10(%rsp,%r14), %edi
andl $0x7f, %edi
callq 0x21a0
incq %r14
cmpq %r14, %rbp
jne 0x60ef
movq 0x1f8fd(%rip), %rdi     # 0x25a10
subl %r12d, %ebp
leaq 0x6985(%rip), %rsi      # 0xcaa2
movl %ebp, %edx
xorl %eax, %eax
callq 0x2210
movq %r15, %rbp
leaq 0x695c(%rip), %r15      # 0xca8c
jmp 0x61e2
movslq 0x8(%rsp), %r14
leaq (%rsp,%r14), %rdi
addq $0x10, %rdi
leaq 0x7f317(%rip), %r12     # 0x85460
movq %r12, %rsi
callq 0x2090
movq %r12, %rdi
callq 0x2110
addl %r14d, %eax
movl %eax, 0x8(%rsp)
addq $0x5, %rbx
jmp 0x61e2
movl $0xff0000, %r14d        # imm = 0xFF0000
movl %r14d, 0xc(%rsp)
movq %rbx, %rdi
leaq 0xc(%rsp), %rsi
xorl %edx, %edx
callq 0x3e17
movq %rax, %rbx
movl 0xc(%rsp), %ecx
cmpl %r14d, %ecx
jne 0x6199
cmpl $0x0, 0x1f885(%rip)     # 0x25a18
je 0x6384
leal -0x100(%rcx), %edx
movl 0x8(%rsp), %eax
cmpl $0xfffffe80, %edx       # imm = 0xFFFFFE80
ja 0x61b5
movslq %eax, %rdx
leal 0x1(%rdx), %eax
movb %ch, 0x10(%rsp,%rdx)
leal 0x1(%rax), %edx
movl %edx, 0x8(%rsp)
cltq
movb %cl, 0x10(%rsp,%rax)
movq 0x1f847(%rip), %rdi     # 0x25a10
testq %rdi, %rdi
je 0x61e2
movl 0xe560(%rip), %edx      # 0x14734
leaq 0x68ee(%rip), %rsi      # 0xcac9
xorl %eax, %eax
callq 0x2210
cmpl $0x1, 0x7ed6b(%rip)     # 0x84f54
jne 0x61f5
cmpb $0x20, (%rbx)
jne 0x61f5
jmp 0x6213
incq %rbx
movzbl (%rbx), %eax
cmpq $0x3b, %rax
ja 0x61f2
btq %rax, %r13
jae 0x61f2
xorl %ecx, %ecx
cmpb $0x2c, %al
sete %cl
addq %rcx, %rbx
jmp 0x602f
movl 0x8(%rsp), %r14d
testl %r14d, %r14d
jle 0x638d
movslq 0x1f80c(%rip), %rax     # 0x25a34
testq %rax, %rax
jle 0x62a7
movl 0xe500(%rip), %r8d      # 0x14734
leaq 0x1f815(%rip), %rcx     # 0x25a50
xorl %edx, %edx
cmpl %r8d, -0x4(%rcx)
je 0x6251
incq %rdx
addq $0x30, %rcx
cmpq %rdx, %rax
jne 0x623d
jmp 0x62a7
cmpl %edx, %eax
jle 0x626f
movq %rax, %rsi
subq %rdx, %rsi
cmpl %r8d, -0x4(%rcx)
jne 0x6264
movl %r14d, (%rcx)
addq $0x30, %rcx
decq %rsi
jne 0x625b
jmp 0x6271
movl %edx, %eax
movq 0x1f798(%rip), %rdi     # 0x25a10
testq %rdi, %rdi
je 0x62a7
movl %eax, %eax
leaq (%rax,%rax,2), %rax
shlq $0x4, %rax
leaq 0x1f7b2(%rip), %rcx     # 0x25a40
movq (%rax,%rcx), %rdx
movl 0xc(%rax,%rcx), %ecx
leaq 0x63ca(%rip), %rsi      # 0xc667
movl %r14d, %r9d
xorl %eax, %eax
callq 0x2210
cmpl $0x0, 0x1f76a(%rip)     # 0x25a18
jne 0x6368
movl 0xe47a(%rip), %eax      # 0x14734
movl 0xbef8(%rip), %ecx      # 0x121b8
leaq 0xe989(%rip), %r12      # 0x14c50
leaq 0x5fcd(%rip), %r15      # 0xc29b
xorl %r13d, %r13d
leal (%rax,%r13), %esi
movzbl 0x10(%rsp,%r13), %edx
movslq %esi, %rsi
movb %dl, (%rsi,%r12)
testl %ecx, %ecx
sete %sil
cmpq $0x4, %r13
setae %dil
orb %sil, %dil
jne 0x6312
movq 0x1f70c(%rip), %rdi     # 0x25a08
movq %r15, %rsi
xorl %eax, %eax
callq 0x2210
movl 0xe428(%rip), %eax      # 0x14734
movl 0xbea6(%rip), %ecx      # 0x121b8
incq %r13
cmpq %r13, %r14
jne 0x62d1
testl %ecx, %ecx
je 0x6368
cmpl $0x3, %r14d
jg 0x634c
leal -0x4(%r14), %ebp
leaq 0x7385(%rip), %r15      # 0xd6b4
movq 0x1f6d2(%rip), %rcx     # 0x25a08
movl $0x3, %esi
movl $0x1, %edx
movq %r15, %rdi
callq 0x2300
incl %ebp
jne 0x632f
movq 0x1f6b5(%rip), %rdi     # 0x25a08
leaq 0x5f35(%rip), %rsi      # 0xc28f
leaq 0x1eb3f(%rip), %rdx     # 0x24ea0
xorl %eax, %eax
callq 0x2210
addl %r14d, 0xe3c5(%rip)     # 0x14734
movq %rbx, %rax
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x671f(%rip), %rdi      # 0xcaaa
jmp 0x6394
leaq 0x674b(%rip), %rdi      # 0xcadf
xorl %eax, %eax
callq 0x2e72
movq %rbx, %rdi
callq 0x2dde
movl $0x1, %edi
callq 0x22f0