// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x128, %rsp            # imm = 0x128
movq %rdi, 0x120(%rsp)
movq 0x120(%rsp), %rdi
callq 0x2830
movq %rax, 0x120(%rsp)
movl $0x0, 0x114(%rsp)
movq 0x120(%rsp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, 0xe(%rsp)
je 0x7e7a
movq 0x120(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x3b, %eax
setne %al
movb %al, 0xe(%rsp)
movb 0xe(%rsp), %al
testb $0x1, %al
jne 0x7e87
jmp 0x817c
cmpl $0x1, 0x800a6(%rip)     # 0x87f34
jne 0x7ea5
movq 0x120(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x20, %eax
jne 0x7ea5
jmp 0x817c
movq 0x120(%rsp), %rdi
callq 0x2830
movq %rax, 0x120(%rsp)
movq 0x120(%rsp), %rax
movb (%rax), %al
movb %al, 0xf(%rsp)
movq 0x120(%rsp), %rdi
leaq 0x8ab2(%rip), %rsi      # 0x10989
movl $0x5, %edx
callq 0x2060
cmpl $0x0, %eax
jne 0x7f3c
leaq 0x10(%rsp), %rdi
movslq 0x114(%rsp), %rax
addq %rax, %rdi
leaq 0x80543(%rip), %rsi     # 0x88440
callq 0x2070
leaq 0x80537(%rip), %rdi     # 0x88440
callq 0x20f0
movq %rax, %rcx
movslq 0x114(%rsp), %rax
addq %rcx, %rax
movl %eax, 0x114(%rsp)
movq 0x120(%rsp), %rax
addq $0x5, %rax
movq %rax, 0x120(%rsp)
jmp 0x8123
movsbl 0xf(%rsp), %eax
cmpl $0x22, %eax
je 0x7f54
movsbl 0xf(%rsp), %eax
cmpl $0x27, %eax
jne 0x802b
movl 0x114(%rsp), %eax
movl %eax, 0x11c(%rsp)
movq 0x120(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0x114(%rsp), %rdx
callq 0x7b90
movq %rax, 0x120(%rsp)
cmpq $0x0, 0x20a64(%rip)     # 0x289f0
je 0x8026
movq 0x20a57(%rip), %rdi     # 0x289f0
movl 0xf775(%rip), %edx      # 0x17714
leaq 0x89e9(%rip), %rsi      # 0x1098f
movb $0x0, %al
callq 0x21e0
movl 0x11c(%rsp), %eax
movl %eax, 0x118(%rsp)
movl 0x118(%rsp), %eax
cmpl 0x114(%rsp), %eax
jge 0x8003
movq 0x20a1e(%rip), %rdi     # 0x289f0
movslq 0x118(%rsp), %rax
movzbl 0x10(%rsp,%rax), %edx
andl $0x7f, %edx
leaq 0x89b6(%rip), %rsi      # 0x1099f
movb $0x0, %al
callq 0x21e0
movl 0x118(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x118(%rsp)
jmp 0x7fbb
movq 0x209e6(%rip), %rdi     # 0x289f0
movl 0x114(%rsp), %edx
subl 0x11c(%rsp), %edx
leaq 0x8983(%rip), %rsi      # 0x109a2
movb $0x0, %al
callq 0x21e0
jmp 0x8121
movl $0xff0000, 0x110(%rsp) # imm = 0xFF0000
movq 0x120(%rsp), %rdi
leaq 0x110(%rsp), %rsi
xorl %edx, %edx
callq 0x4740
movq %rax, 0x120(%rsp)
cmpl $0xff0000, 0x110(%rsp) # imm = 0xFF0000
jne 0x8090
cmpl $0x0, 0x2098f(%rip)     # 0x289f8
jne 0x8090
leaq 0x8938(%rip), %rdi      # 0x109aa
movb $0x0, %al
callq 0x3150
movq 0x120(%rsp), %rdi
callq 0x3040
movl $0x1, %edi
callq 0x22b0
cmpl $0xff, 0x110(%rsp)
jg 0x80a7
cmpl $-0x7f, 0x110(%rsp)
jge 0x80cc
movl 0x110(%rsp), %eax
sarl $0x8, %eax
movb %al, %cl
movl 0x114(%rsp), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, 0x114(%rsp)
cltq
movb %cl, 0x10(%rsp,%rax)
movl 0x110(%rsp), %eax
andl $0xff, %eax
movb %al, %cl
movl 0x114(%rsp), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, 0x114(%rsp)
cltq
movb %cl, 0x10(%rsp,%rax)
cmpq $0x0, 0x208f5(%rip)     # 0x289f0
je 0x811f
movq 0x208ec(%rip), %rdi     # 0x289f0
movl 0xf60a(%rip), %edx      # 0x17714
movl 0x110(%rsp), %ecx
leaq 0x88b1(%rip), %rsi      # 0x109c9
movb $0x0, %al
callq 0x21e0
jmp 0x8121
jmp 0x8123
cmpl $0x1, 0x7fe0a(%rip)     # 0x87f34
jne 0x813e
movq 0x120(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x20, %eax
jne 0x813e
jmp 0x817c
movq 0x120(%rsp), %rdi
callq 0x5b50
movq %rax, 0x120(%rsp)
movq 0x120(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x2c, %eax
jne 0x8177
movq 0x120(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x120(%rsp)
jmp 0x7e4f
cmpl $0x1, 0x114(%rsp)
jge 0x81ab
leaq 0x8852(%rip), %rdi      # 0x109df
movb $0x0, %al
callq 0x3150
movq 0x120(%rsp), %rdi
callq 0x3040
movl $0x1, %edi
callq 0x22b0
movl 0xf563(%rip), %edi      # 0x17714
callq 0x3a60
movl %eax, 0x118(%rsp)
cmpl $0x0, 0x118(%rsp)
jl 0x8230
jmp 0x81c9
movl 0x118(%rsp), %eax
cmpl 0x2083e(%rip), %eax     # 0x28a14
jge 0x822e
movslq 0x118(%rsp), %rcx
leaq 0x20839(%rip), %rax     # 0x28a20
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
cmpl 0xf51d(%rip), %eax      # 0x17714
jne 0x8219
movl 0x114(%rsp), %ecx
movslq 0x118(%rsp), %rdx
leaq 0x20811(%rip), %rax     # 0x28a20
imulq $0x30, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x10(%rax)
jmp 0x821b
movl 0x118(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x118(%rsp)
jmp 0x81c9
jmp 0x8230
cmpl $0x0, 0x118(%rsp)
jl 0x829a
cmpq $0x0, 0x207ae(%rip)     # 0x289f0
je 0x829a
movq 0x207a5(%rip), %rdi     # 0x289f0
movslq 0x118(%rsp), %rcx
leaq 0x207c6(%rip), %rax     # 0x28a20
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rdx
movslq 0x118(%rsp), %rcx
leaq 0x207ad(%rip), %rax     # 0x28a20
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %ecx
movl 0xf490(%rip), %r8d      # 0x17714
movl 0x114(%rsp), %r9d
leaq 0x82d1(%rip), %rsi      # 0x10564
movb $0x0, %al
callq 0x21e0
cmpl $0x0, 0x20757(%rip)     # 0x289f8
jne 0x8392
movl $0x0, 0x11c(%rsp)
movl 0x11c(%rsp), %eax
cmpl 0x114(%rsp), %eax
jge 0x832b
movl 0xf44c(%rip), %edi      # 0x17714
addl 0x11c(%rsp), %edi
movslq 0x11c(%rsp), %rax
movzbl 0x10(%rsp,%rax), %esi
callq 0x23f0
cmpl $0x0, 0xceb0(%rip)      # 0x15198
je 0x8316
cmpl $0x4, 0x11c(%rsp)
jge 0x8316
movq 0x206ed(%rip), %rdi     # 0x289e8
movslq 0x11c(%rsp), %rax
movzbl 0x10(%rsp,%rax), %edx
leaq 0x7e87(%rip), %rsi      # 0x10196
movb $0x0, %al
callq 0x21e0
jmp 0x8318
movl 0x11c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x11c(%rsp)
jmp 0x82b2
cmpl $0x0, 0xce66(%rip)      # 0x15198
je 0x8390
movl 0x114(%rsp), %eax
movl %eax, 0x11c(%rsp)
cmpl $0x4, 0x11c(%rsp)
jge 0x8374
movq 0x20695(%rip), %rdi     # 0x289e8
leaq 0x92d2(%rip), %rsi      # 0x1162c
movb $0x0, %al
callq 0x21e0
movl 0x11c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x11c(%rsp)
jmp 0x8342
movq 0x2066d(%rip), %rdi     # 0x289e8
leaq 0x7e08(%rip), %rsi      # 0x1018a
leaq 0x1faf7(%rip), %rdx     # 0x27e80
movb $0x0, %al
callq 0x21e0
jmp 0x8392
movl 0x114(%rsp), %eax
addl 0xf375(%rip), %eax      # 0x17714
movl %eax, 0xf36f(%rip)      # 0x17714
movq 0x120(%rsp), %rax
addq $0x128, %rsp            # imm = 0x128
retq
nopw %cs:(%rax,%rax)