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

   l = 0;
   p = SkipSpace(p);
   while (*p && *p != ';') // Parse data line
   {
      p = EvalOperand(p,&v,0);
      ByteBuffer[l++] = v >> 8;
      ByteBuffer[l++] = v;
      p = SkipToComma(p);
      if (*p == ',') ++p;
   }
   if (l < 1)
   {
      ErrorMsg("Missing WORD data\n");
      ErrorLine(p);
      exit(1);
   }
   j = AddressIndex(pc);
   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 (j >= 0)
   for ( ; j < Labels ; ++j) // There may be multiple lables on this address
   {
       if (lab[j].Address == pc) lab[j].Bytes = l;
   }
   if (!Pass)
   {
      for (i=0 ; i < l ; ++i)
      {
         PutByte(pc+i,ByteBuffer[i]);
         if (ListOn && (i == 0 || i == 2))
            fprintf(lf," %2.2x%2.2x",ByteBuffer[i],ByteBuffer[i+1]);
      }
      if (ListOn)
      {
         if (l == 2) fprintf(lf,"        ");
         else        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 0x4ccb
callq 0x2320
movq (%rax), %rcx
decq %rbx
movsbq 0x1(%rbx), %rax
incq %rbx
testb $0x20, 0x1(%rcx,%rax,2)
jne 0x4cba
jmp 0x4ccd
xorl %eax, %eax
xorl %r14d, %r14d
leaq 0xc(%rsp), %r15
movabsq $0x800100000000001, %r12 # imm = 0x800100000000001
testb %al, %al
je 0x4d30
movzbl %al, %eax
cmpl $0x3b, %eax
je 0x4d30
movq %rbx, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x3e17
movzwl 0xc(%rsp), %ecx
rolw $0x8, %cx
movw %cx, 0x10(%rsp,%r14)
addq $0x2, %r14
movzbl (%rax), %ecx
cmpq $0x3b, %rcx
ja 0x4d1a
btq %rcx, %r12
jb 0x4d1f
incq %rax
jmp 0x4d0b
xorl %edx, %edx
cmpb $0x2c, %cl
sete %dl
leaq (%rax,%rdx), %rbx
movb (%rax,%rdx), %al
jmp 0x4cdf
testq %r14, %r14
je 0x4eaa
movl 0xf9f4(%rip), %r8d      # 0x14734
movl 0x20cee(%rip), %eax     # 0x25a34
testl %eax, %eax
jle 0x4db6
leaq 0x20cff(%rip), %r15     # 0x25a50
xorl %r12d, %r12d
cmpl %r8d, -0x4(%r15)
je 0x4d68
incq %r12
addq $0x30, %r15
cmpq %r12, %rax
jne 0x4d54
jmp 0x4db6
movq 0x20ca1(%rip), %rdi     # 0x25a10
testq %rdi, %rdi
je 0x4d9a
movq -0x10(%r15), %rdx
movl -0x4(%r15), %ecx
leaq 0x78e4(%rip), %rsi      # 0xc667
movl %r14d, %r9d
xorl %eax, %eax
callq 0x2210
movl 0x20ca1(%rip), %eax     # 0x25a34
movl 0xf99a(%rip), %r8d      # 0x14734
cmpl %r12d, %eax
jle 0x4db6
movl %eax, %eax
cmpl %r8d, -0x4(%r15)
jne 0x4daa
movl %r14d, (%r15)
addq $0x30, %r15
decq %rax
cmpq %rax, %r12
jne 0x4da1
cmpl $0x0, 0x20c5b(%rip)     # 0x25a18
jne 0x4e8b
cmpq $0x1, %r14
movq %r14, %r12
adcq $0x0, %r12
movl 0xd3e4(%rip), %eax      # 0x121b8
leaq 0xfe75(%rip), %r13      # 0x14c50
leaq 0x78ad(%rip), %r15      # 0xc68f
xorl %ebp, %ebp
leal (%r8,%rbp), %ecx
movzbl 0x10(%rsp,%rbp), %edx
movslq %ecx, %rcx
movb %dl, (%rcx,%r13)
testl %eax, %eax
sete %cl
testl $0x7ffffffd, %ebp       # imm = 0x7FFFFFFD
setne %sil
orb %cl, %sil
jne 0x4e2b
movq 0x20bf9(%rip), %rdi     # 0x25a08
movzbl 0x11(%rsp,%rbp), %ecx
movq %r15, %rsi
xorl %eax, %eax
callq 0x2210
movl 0xf90f(%rip), %r8d      # 0x14734
movl 0xd38d(%rip), %eax      # 0x121b8
incq %rbp
cmpq %rbp, %r12
jne 0x4de4
testl %eax, %eax
je 0x4e8b
movq 0x20bca(%rip), %rcx     # 0x25a08
cmpq $0x2, %r14
jne 0x4e52
leaq 0x8864(%rip), %rdi      # 0xd6af
movl $0x8, %esi
jmp 0x4e5e
leaq 0x885b(%rip), %rdi      # 0xd6b4
movl $0x3, %esi
movl $0x1, %edx
callq 0x2300
movq 0x20b99(%rip), %rdi     # 0x25a08
leaq 0x741a(%rip), %rsi      # 0xc290
leaq 0x20023(%rip), %rdx     # 0x24ea0
xorl %eax, %eax
callq 0x2210
movl 0xf8a9(%rip), %r8d      # 0x14734
addl %r14d, %r8d
movl %r8d, 0xf89f(%rip)      # 0x14734
movq %rbx, %rax
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x77a3(%rip), %rdi      # 0xc654
xorl %eax, %eax
callq 0x2e72
movq %rbx, %rdi
callq 0x2dde
movl $0x1, %edi
callq 0x22f0