// File: /workspace/github_c_makefile_star2_O3/Edilbert[P]BS9/bs9.c
// Function: ParseLongData
char *ParseLongData(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 >> 24;
      ByteBuffer[l++] = v >> 16;
      ByteBuffer[l++] = v >>  8;
      ByteBuffer[l++] = v;
      p = SkipToComma(p);
      if (*p == ',') ++p;
   }
   if (l < 4)
   {
      ErrorMsg("Missing LONG data\n");
      ErrorLine(p);
      exit(1);
   }
   j = AddressIndex(pc);
   if (j >= 0 && df) fprintf(df,"LONG 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)
      {
         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 0x4eff
callq 0x2320
movq (%rax), %rcx
decq %rbx
movsbq 0x1(%rbx), %rax
incq %rbx
testb $0x20, 0x1(%rcx,%rax,2)
jne 0x4eee
jmp 0x4f01
xorl %eax, %eax
xorl %ebp, %ebp
leaq 0xc(%rsp), %r14
movabsq $0x800100000000001, %r15 # imm = 0x800100000000001
testb %al, %al
je 0x4f72
movzbl %al, %eax
cmpl $0x3b, %eax
je 0x4f72
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x3e17
movl 0xc(%rsp), %ecx
movl %ecx, %edx
shrl $0x18, %edx
movb %dl, 0x10(%rsp,%rbp)
movl %ecx, %edx
shrl $0x10, %edx
movb %dl, 0x11(%rsp,%rbp)
movb %ch, 0x12(%rsp,%rbp)
movb %cl, 0x13(%rsp,%rbp)
addq $0x4, %rbp
movzbl (%rax), %ecx
cmpq $0x3b, %rcx
ja 0x4f5c
btq %rcx, %r15
jb 0x4f61
incq %rax
jmp 0x4f4d
xorl %edx, %edx
cmpb $0x2c, %cl
sete %dl
leaq (%rax,%rdx), %rbx
movb (%rax,%rdx), %al
jmp 0x4f12
testq %rbp, %rbp
je 0x50e2
movl 0xf7b2(%rip), %r8d      # 0x14734
movl 0x20aac(%rip), %eax     # 0x25a34
testl %eax, %eax
jle 0x4ff8
leaq 0x20abd(%rip), %r14     # 0x25a50
xorl %r15d, %r15d
cmpl %r8d, -0x4(%r14)
je 0x4faa
incq %r15
addq $0x30, %r14
cmpq %r15, %rax
jne 0x4f96
jmp 0x4ff8
movq 0x20a5f(%rip), %rdi     # 0x25a10
testq %rdi, %rdi
je 0x4fdc
movq -0x10(%r14), %rdx
movl -0x4(%r14), %ecx
leaq 0x76e9(%rip), %rsi      # 0xc6ae
movl %ebp, %r9d
xorl %eax, %eax
callq 0x2210
movl 0x20a5f(%rip), %eax     # 0x25a34
movl 0xf758(%rip), %r8d      # 0x14734
cmpl %r15d, %eax
jle 0x4ff8
movl %eax, %eax
cmpl %r8d, -0x4(%r14)
jne 0x4fec
movl %ebp, (%r14)
addq $0x30, %r14
decq %rax
cmpq %rax, %r15
jne 0x4fe3
cmpl $0x0, 0x20a19(%rip)     # 0x25a18
jne 0x50c3
cmpq $0x1, %rbp
movq %rbp, %rdi
adcq $0x0, %rdi
movl 0xd1a2(%rip), %eax      # 0x121b8
leaq 0xfc33(%rip), %r15      # 0x14c50
leaq 0x766b(%rip), %r14      # 0xc68f
xorl %r12d, %r12d
leal (%r12,%r8), %ecx
movzbl 0x10(%rsp,%r12), %edx
movslq %ecx, %rcx
movb %dl, (%rcx,%r15)
testl %eax, %eax
sete %cl
testl $0x7ffffffd, %r12d      # imm = 0x7FFFFFFD
setne %sil
orb %cl, %sil
jne 0x5077
movq %rdi, %r13
movq 0x209b1(%rip), %rdi     # 0x25a08
movzbl 0x11(%rsp,%r12), %ecx
movq %r14, %rsi
xorl %eax, %eax
callq 0x2210
movq %r13, %rdi
movl 0xf6c3(%rip), %r8d      # 0x14734
movl 0xd141(%rip), %eax      # 0x121b8
incq %r12
cmpq %r12, %rdi
jne 0x5027
testl %eax, %eax
je 0x50c3
movq 0x2097e(%rip), %rcx     # 0x25a08
leaq 0x8623(%rip), %rdi      # 0xd6b4
movl $0x3, %esi
movl $0x1, %edx
callq 0x2300
movq 0x20961(%rip), %rdi     # 0x25a08
leaq 0x71e2(%rip), %rsi      # 0xc290
leaq 0x1fdeb(%rip), %rdx     # 0x24ea0
xorl %eax, %eax
callq 0x2210
movl 0xf671(%rip), %r8d      # 0x14734
addl %ebp, %r8d
movl %r8d, 0xf667(%rip)      # 0x14734
movq %rbx, %rax
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x75b2(%rip), %rdi      # 0xc69b
xorl %eax, %eax
callq 0x2e72
movq %rbx, %rdi
callq 0x2dde
movl $0x1, %edi
callq 0x22f0