// File: /workspace/github_c_makefile_star2_O2/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
callq 0x2675
movq %rax, %r14
xorl %ebx, %ebx
leaq 0xc(%rsp), %r15
movzbl (%r14), %eax
testl %eax, %eax
je 0x46d1
cmpl $0x3b, %eax
je 0x46d1
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x37d5
movl 0xc(%rsp), %ecx
bswapl %ecx
movl %ecx, 0x10(%rsp,%rbx)
addq $0x4, %rbx
movq %rax, %rdi
callq 0x4266
xorl %r14d, %r14d
cmpb $0x2c, (%rax)
sete %r14b
addq %rax, %r14
jmp 0x4692
testq %rbx, %rbx
je 0x481e
movl 0xf053(%rip), %r15d     # 0x13734
movl %r15d, %edi
callq 0x3119
movl %eax, %ebp
testl %eax, %eax
setns %al
movq 0x20319(%rip), %rdi     # 0x24a10
testq %rdi, %rdi
setne %cl
andb %al, %cl
movl %ebp, %r12d
leaq 0x20337(%rip), %r13     # 0x24a40
cmpb $0x1, %cl
jne 0x4731
imulq $0x30, %r12, %rax
movq (%rax,%r13), %rdx
movl 0xc(%rax,%r13), %ecx
leaq 0x6f1c(%rip), %rsi      # 0xb63e
movl %r15d, %r8d
movl %ebx, %r9d
xorl %eax, %eax
callq 0x2210
jmp 0x4735
testl %ebp, %ebp
js 0x475f
movl 0x202f9(%rip), %eax     # 0x24a34
movl 0xeff3(%rip), %ecx      # 0x13734
imulq $0x30, %r12, %rdx
addq %r13, %rdx
addq $0x10, %rdx
cmpl %ebp, %eax
jle 0x475f
cmpl %ecx, -0x4(%rdx)
jne 0x4757
movl %ebx, (%rdx)
addq $0x30, %rdx
incl %ebp
jmp 0x474c
cmpl $0x0, 0x202b2(%rip)     # 0x24a18
jne 0x4803
leaq 0xf4dd(%rip), %r12      # 0x13c50
leaq 0x6ea5(%rip), %r15      # 0xb61f
xorl %r13d, %r13d
cmpq %r13, %rbx
je 0x47c5
movl 0xefac(%rip), %eax      # 0x13734
addl %r13d, %eax
movzbl 0x10(%rsp,%r13), %edx
cltq
movb %dl, (%rax,%r12)
testl $0x7ffffffd, %r13d      # imm = 0x7FFFFFFD
jne 0x47c0
cmpl $0x0, 0xca11(%rip)      # 0x111b8
je 0x47c0
movq 0x20258(%rip), %rdi     # 0x24a08
movzbl 0x11(%rsp,%r13), %ecx
movq %r15, %rsi
xorl %eax, %eax
callq 0x2210
incq %r13
jmp 0x477d
cmpl $0x0, 0xc9ec(%rip)      # 0x111b8
je 0x4803
movq 0x20233(%rip), %rcx     # 0x24a08
leaq 0x7e68(%rip), %rdi      # 0xc644
pushq $0x3
popq %rsi
pushq $0x1
popq %rdx
callq 0x2300
movq 0x2021a(%rip), %rdi     # 0x24a08
leaq 0x6a2b(%rip), %rsi      # 0xb220
leaq 0x1f6a4(%rip), %rdx     # 0x23ea0
xorl %eax, %eax
callq 0x2210
addl %ebx, 0xef2b(%rip)      # 0x13734
movq %r14, %rax
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x6e06(%rip), %rdi      # 0xb62b
xorl %eax, %eax
callq 0x2af7
movq %r14, %rdi
callq 0x2a71
pushq $0x1
popq %rdi
callq 0x22f0