// File: /workspace/github_c_makefile_star2_O1/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 0x5ef9
callq 0x2320
movq (%rax), %rax
decq %rbx
movsbq 0x1(%rbx), %rcx
incq %rbx
testb $0x20, 0x1(%rax,%rcx,2)
jne 0x5eea
leaq 0x8(%rsp), %rbp
movl $0x0, (%rbp)
leaq 0x6b94(%rip), %r15      # 0xcaa0
movabsq $0x800100000000001, %r13 # imm = 0x800100000000001
movzbl (%rbx), %eax
testl %eax, %eax
je 0x60f9
cmpl $0x3b, %eax
je 0x60f9
cmpb $0x20, %al
jne 0x5f3b
cmpl $0x1, 0x7f01f(%rip)     # 0x84f54
je 0x60f9
testb %al, %al
je 0x5f59
callq 0x2320
movq (%rax), %rax
decq %rbx
movsbq 0x1(%rbx), %rcx
incq %rbx
testb $0x20, 0x1(%rax,%rcx,2)
jne 0x5f4a
movl $0x5, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2080
testl %eax, %eax
je 0x6014
movzbl (%rbx), %eax
cmpl $0x27, %eax
je 0x5f82
cmpl $0x22, %eax
jne 0x6048
movslq 0x8(%rsp), %r12
movq %rbx, %rdi
leaq 0x10(%rsp), %rsi
movq %rbp, %rdx
callq 0x5dda
movq %rax, %rbx
movq 0x1fa6f(%rip), %rdi     # 0x25a10
testq %rdi, %rdi
je 0x60c8
movq %rbp, %r15
movl 0xe781(%rip), %edx      # 0x14734
leaq 0x6aec(%rip), %rsi      # 0xcaa6
xorl %eax, %eax
callq 0x2210
movslq 0x8(%rsp), %rbp
cmpl %r12d, %ebp
jle 0x5feb
movq %r12, %r14
movq 0x1fa3b(%rip), %rsi     # 0x25a10
movzbl 0x10(%rsp,%r14), %edi
andl $0x7f, %edi
callq 0x21a0
incq %r14
cmpq %r14, %rbp
jne 0x5fce
movq 0x1fa1e(%rip), %rdi     # 0x25a10
subl %r12d, %ebp
leaq 0x6aba(%rip), %rsi      # 0xcab6
movl %ebp, %edx
xorl %eax, %eax
callq 0x2210
movq %r15, %rbp
leaq 0x6a91(%rip), %r15      # 0xcaa0
jmp 0x60c8
movslq 0x8(%rsp), %r14
leaq (%rsp,%r14), %rdi
addq $0x10, %rdi
leaq 0x7f438(%rip), %r12     # 0x85460
movq %r12, %rsi
callq 0x2090
movq %r12, %rdi
callq 0x2110
addl %r14d, %eax
movl %eax, 0x8(%rsp)
addq $0x5, %rbx
jmp 0x60c8
movl $0xff0000, %r14d        # imm = 0xFF0000
movl %r14d, 0xc(%rsp)
movq %rbx, %rdi
leaq 0xc(%rsp), %rsi
xorl %edx, %edx
callq 0x3daa
movq %rax, %rbx
movl 0xc(%rsp), %ecx
cmpl %r14d, %ecx
jne 0x607b
cmpl $0x0, 0x1f9a3(%rip)     # 0x25a18
je 0x629f
leal -0x100(%rcx), %eax
cmpl $0xfffffe80, %eax       # imm = 0xFFFFFE80
ja 0x6098
movslq 0x8(%rsp), %rax
leal 0x1(%rax), %edx
movl %edx, 0x8(%rsp)
movb %ch, 0x10(%rsp,%rax)
movslq 0x8(%rsp), %rax
leal 0x1(%rax), %edx
movl %edx, 0x8(%rsp)
movb %cl, 0x10(%rsp,%rax)
movq 0x1f961(%rip), %rdi     # 0x25a10
testq %rdi, %rdi
je 0x60c8
movl 0xe67a(%rip), %edx      # 0x14734
leaq 0x6a1c(%rip), %rsi      # 0xcadd
xorl %eax, %eax
callq 0x2210
cmpl $0x1, 0x7ee85(%rip)     # 0x84f54
jne 0x60db
cmpb $0x20, (%rbx)
jne 0x60db
jmp 0x60f9
incq %rbx
movzbl (%rbx), %eax
cmpq $0x3b, %rax
ja 0x60d8
btq %rax, %r13
jae 0x60d8
xorl %ecx, %ecx
cmpb $0x2c, %al
sete %cl
addq %rcx, %rbx
jmp 0x5f16
movl 0x8(%rsp), %r14d
testl %r14d, %r14d
jle 0x62a8
movl 0xe626(%rip), %r8d      # 0x14734
movslq 0x1f91f(%rip), %rcx     # 0x25a34
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testq %rcx, %rcx
jle 0x613d
leaq 0x1f926(%rip), %rsi     # 0x25a4c
xorl %edx, %edx
cmpl %r8d, (%rsi)
je 0x613b
incq %rdx
addq $0x30, %rsi
cmpq %rdx, %rcx
jne 0x6128
jmp 0x613d
movl %edx, %eax
testl %eax, %eax
sets %dl
cmpl %ecx, %eax
setge %sil
orb %dl, %sil
jne 0x6186
movl %eax, %eax
movl %ecx, %ecx
leaq (%rax,%rax,2), %rdx
shlq $0x4, %rdx
leaq 0x1f8e0(%rip), %rsi     # 0x25a40
addq %rsi, %rdx
addq $0x10, %rdx
movq %rax, %rsi
subq %rcx, %rsi
xorl %ecx, %ecx
cmpl %r8d, -0x4(%rdx)
jne 0x6178
movl %r14d, (%rdx)
addq $0x30, %rdx
decq %rcx
cmpq %rcx, %rsi
jne 0x616f
subl %ecx, %eax
testl %eax, %eax
setns %cl
movq 0x1f87e(%rip), %rdi     # 0x25a10
testq %rdi, %rdi
setne %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x61c9
movl %eax, %eax
leaq (%rax,%rax,2), %rax
shlq $0x4, %rax
leaq 0x1f890(%rip), %rcx     # 0x25a40
movq (%rax,%rcx), %rdx
movl 0xc(%rax,%rcx), %ecx
leaq 0x64bc(%rip), %rsi      # 0xc67b
movl %r14d, %r9d
xorl %eax, %eax
callq 0x2210
cmpl $0x0, 0x1f848(%rip)     # 0x25a18
jne 0x6283
cmpl $0x2, %r14d
movl $0x1, %r12d
cmovgel %r14d, %r12d
leaq 0xea65(%rip), %r13      # 0x14c50
leaq 0x60bd(%rip), %r15      # 0xc2af
xorl %ebp, %ebp
movslq 0xe539(%rip), %rax      # 0x14734
movzbl 0x10(%rsp,%rbp), %edx
addq %rbp, %rax
movb %dl, (%r13,%rax)
cmpq $0x3, %rbp
ja 0x6228
cmpl $0x0, 0xbfa3(%rip)      # 0x121b8
je 0x6228
movq 0x1f7ea(%rip), %rdi     # 0x25a08
movq %r15, %rsi
xorl %eax, %eax
callq 0x2210
incq %rbp
cmpq %rbp, %r12
jne 0x61f4
cmpl $0x0, 0xbf81(%rip)      # 0x121b8
je 0x6283
cmpl $0x3, %r14d
jg 0x6267
leal -0x4(%r14), %ebp
leaq 0x7484(%rip), %r15      # 0xd6ce
movq 0x1f7b7(%rip), %rcx     # 0x25a08
movl $0x3, %esi
movl $0x1, %edx
movq %r15, %rdi
callq 0x2300
incl %ebp
jne 0x624a
movq 0x1f79a(%rip), %rdi     # 0x25a08
leaq 0x602e(%rip), %rsi      # 0xc2a3
leaq 0x1ec24(%rip), %rdx     # 0x24ea0
xorl %eax, %eax
callq 0x2210
addl %r14d, 0xe4aa(%rip)     # 0x14734
movq %rbx, %rax
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x6818(%rip), %rdi      # 0xcabe
jmp 0x62af
leaq 0x6844(%rip), %rdi      # 0xcaf3
xorl %eax, %eax
callq 0x2e63
movq %rbx, %rdi
callq 0x2dcf
movl $0x1, %edi
callq 0x22f0