// File: /workspace/github_c_makefile_star2_O0/Edilbert[P]BS9/bs9.c
// Function: ParseLine
void ParseLine(char *cp)
{
   int i,l,v,m;
   char *start;

   am = -1;
   oc = -1;
   Label[0] = 0;
   OpText[0] = 0;
   Comment[0] = 0;
   cp = SkipHexCode(cp);        // Skip disassembly
   cp = SkipSpace(cp);          // Skip leading blanks
   start = cp;                  // Remember start of line
   if (df && *cp) fprintf(df,"%5d %4.4x Parse[%d]:%s\n",LiNo,pc&0xffff,Pass,cp);
   if (CheckCondition(cp)) return;
   if (Skipping)
   {
      PrintLiNo();
      if (ListOn && !Pass) fprintf(lf,"SKIP          %s\n",Line);
      if (df)         fprintf(df,"%5d SKIP          %s\n",LiNo,Line);
      return;
   }
   if (pf && !Pass && !MacLev)
   {
       fprintf(pf,"%s\n",Line); // write to preprocessed file
   }
   if (strncmp(cp,"/*",2) == 0 || strncmp(cp,"\\*",2) == 0) // SDDRIVE comment style
   {
      CodeStyle = 1;
      if (!Pass) PrintLine();
      return;
   }
   if (*cp == 0)  // Empty
   {
      if (!Pass)
      {
          PrintLiNo();
          fputc('\n',lf);
      }
      return;
   }
   if (*cp == ';')  // comment only
   {
      PrintLine();
      return;
   }

   if (*cp == '*')  // comment or setting of PC ?
   {
      if (!NeedChar(cp+1,'='))
      {
         PrintLine();  // no "* =" syntax
         return;
      }
   }

   // set local backward label

   if (*cp == '-')
   {
      l = strlen(cp);
      i = 0;
      while (*cp++ == '-' && i < 10 && i < l) ++i;
      minlab[i] = pc;
   }

   // set local forward label

   if (*cp == '+')
   {
      l = strlen(cp);
      i = 0;
      while (*cp++ == '+' && i < 10 && i < l) ++i;
      if (Pass)
      {
         plulab[i][plucnt[i]] = pc;
         if (++plucnt[i] > PLUMAX-2)
         {
            ++ErrNum;
            ErrorMsg("too many local labels\n");
            exit(1);
         }
      }
   }

   cp = CheckPseudo(cp);
   if (!cp) return;      // Pseudo Op successfull processed
   if (*cp == '.' || *cp == '_' || isalpha(*cp)) // Macro, Label or mnemonic
   {
      if (StrMatch(cp,"MACRO"))
      {
         RecordMacro(cp);
         return;
      }
      if ((MneIndex = IsInstruction(cp)) < 0)
      {
         m = ExpandMacro(cp);
         if (m < 0) // not a macro
         {
            if (cp == start) cp = DefineLabel(cp,&v,' ');
            else
            {
               if (StrKey(cp,"SET") || StrKey(cp,"ENUM") ||
                   StrKey(cp,"EQU") || strchr(cp,'='))
                  cp = DefineLabel(cp,&v,'C');
            }
            cp = SkipSpace(cp);         // Skip leading blanks
            if (*cp) m = ExpandMacro(cp);   // Macro after label
            if (m >= 0) cp += strlen(cp);         // advance to EOL
         }
         else cp += strlen(cp);         // advance to EOL
         if (m < 0 && (*cp == 0 || *cp == ';')) // no code or data
         {
            PrintLiNo();
            if (ListOn && !Pass)
               fprintf(lf,"%4.4x              %s\n",v&0xffff,Line);
            return;
         }
      }
   }
   if (ForcedEnd)  return;
   if (*cp ==  0 ) return;             // No code
   if (*cp == ';') return;             // No code
   if (*cp == '&') { cp = SetBSS(cp+1); return; }    // Set BSS counter
   if (*cp == '*') { cp = SetPC(cp+1) ; return; }    // Set PC
   cp = CheckPseudo(cp);
   if (!cp) return;      // Pseudo Op successfull processed
   if (MneIndex < 0) MneIndex = IsInstruction(cp); // Check for mnemonic after label
   if (MneIndex >= 0)
   {
      ExtractOpText(cp+strlen(Mat[MneIndex].Mne));
      cp += strlen(cp);
      GenerateCode(OpText);
   }
   if (ListOn && !Pass) fprintf(lf,"\n");
   if (*cp == 0 || *cp == ';' || *cp == '*') return; // end of code

   printf("<%s>\n",cp);
   ++ErrNum;
   ErrorLine(cp);
   ErrorMsg("Syntax error\n");
   exit(1);
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movl $0xffffffff, 0x7b101(%rip) # imm = 0xFFFFFFFF
movl $0xffffffff, 0x1baaf(%rip) # imm = 0xFFFFFFFF
movb $0x0, 0x7afec(%rip)     # 0x87f40
movb $0x0, 0x1b025(%rip)     # 0x27f80
movb $0x0, 0x7dfce(%rip)     # 0x8af30
movq 0x30(%rsp), %rdi
callq 0x2ee0
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rdi
callq 0x2830
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x1ba5e(%rip)     # 0x289f0
je 0xcfd4
movq 0x30(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0xcfd4
movq 0x1ba48(%rip), %rdi     # 0x289f0
movl 0x1ad8a(%rip), %edx     # 0x27d38
movl 0xa760(%rip), %ecx      # 0x17714
andl $0xffff, %ecx           # imm = 0xFFFF
movl 0x1ba37(%rip), %r8d     # 0x289f8
movq 0x30(%rsp), %r9
leaq 0x44a8(%rip), %rsi      # 0x11475
movb $0x0, %al
callq 0x21e0
movq 0x30(%rsp), %rdi
callq 0x8e30
cmpl $0x0, %eax
je 0xcfe8
jmp 0xd690
cmpl $0x0, 0x7b4b1(%rip)     # 0x884a0
je 0xd055
callq 0x3320
cmpl $0x0, 0x819b(%rip)      # 0x15198
je 0xd024
cmpl $0x0, 0x1b9f2(%rip)     # 0x289f8
jne 0xd024
movq 0x1b9d9(%rip), %rdi     # 0x289e8
leaq 0x447b(%rip), %rsi      # 0x11491
leaq 0x1ae63(%rip), %rdx     # 0x27e80
movb $0x0, %al
callq 0x21e0
cmpq $0x0, 0x1b9c4(%rip)     # 0x289f0
je 0xd050
movq 0x1b9bb(%rip), %rdi     # 0x289f0
movl 0x1acfd(%rip), %edx     # 0x27d38
leaq 0x444b(%rip), %rsi      # 0x1148d
leaq 0x1ae37(%rip), %rcx     # 0x27e80
movb $0x0, %al
callq 0x21e0
jmp 0xd690
cmpq $0x0, 0x7d75b(%rip)     # 0x8a7b8
je 0xd08d
cmpl $0x0, 0x1b992(%rip)     # 0x289f8
jne 0xd08d
cmpl $0x0, 0x7d879(%rip)     # 0x8a8e8
jne 0xd08d
movq 0x7d740(%rip), %rdi     # 0x8a7b8
leaq 0x310d(%rip), %rsi      # 0x1018c
leaq 0x1adfa(%rip), %rdx     # 0x27e80
movb $0x0, %al
callq 0x21e0
movq 0x30(%rsp), %rdi
leaq 0x440a(%rip), %rsi      # 0x114a3
movl $0x2, %edx
callq 0x2060
cmpl $0x0, %eax
je 0xd0c3
movq 0x30(%rsp), %rdi
leaq 0x43f2(%rip), %rsi      # 0x114a6
movl $0x2, %edx
callq 0x2060
cmpl $0x0, %eax
jne 0xd0e0
movl $0x1, 0x7ae67(%rip)     # 0x87f34
cmpl $0x0, 0x1b924(%rip)     # 0x289f8
jne 0xd0db
callq 0x34c0
jmp 0xd690
movq 0x30(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0xd111
cmpl $0x0, 0x1b904(%rip)     # 0x289f8
jne 0xd10c
callq 0x3320
movq 0x1b8e6(%rip), %rsi     # 0x289e8
movl $0xa, %edi
callq 0x2180
jmp 0xd690
movq 0x30(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x3b, %eax
jne 0xd128
callq 0x34c0
jmp 0xd690
movq 0x30(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x2a, %eax
jne 0xd15a
movq 0x30(%rsp), %rdi
addq $0x1, %rdi
movl $0x3d, %esi
callq 0x36a0
cmpq $0x0, %rax
jne 0xd158
callq 0x34c0
jmp 0xd690
jmp 0xd15a
movq 0x30(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0xd1e4
movq 0x30(%rsp), %rdi
callq 0x20f0
movl %eax, 0x28(%rsp)
movl $0x0, 0x2c(%rsp)
movq 0x30(%rsp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0x30(%rsp)
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x2d, %ecx
movb %al, 0x17(%rsp)
jne 0xd1b8
xorl %eax, %eax
cmpl $0xa, 0x2c(%rsp)
movb %al, 0x17(%rsp)
jge 0xd1b8
movl 0x2c(%rsp), %eax
cmpl 0x28(%rsp), %eax
setl %al
movb %al, 0x17(%rsp)
movb 0x17(%rsp), %al
testb $0x1, %al
jne 0xd1c2
jmp 0xd1cf
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0xd17d
movl 0xa53f(%rip), %edx      # 0x17714
movslq 0x2c(%rsp), %rcx
leaq 0x7b30f(%rip), %rax     # 0x884f0
movl %edx, (%rax,%rcx,4)
movq 0x30(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x2b, %eax
jne 0xd2e3
movq 0x30(%rsp), %rdi
callq 0x20f0
movl %eax, 0x28(%rsp)
movl $0x0, 0x2c(%rsp)
movq 0x30(%rsp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0x30(%rsp)
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x2b, %ecx
movb %al, 0x16(%rsp)
jne 0xd246
xorl %eax, %eax
cmpl $0xa, 0x2c(%rsp)
movb %al, 0x16(%rsp)
jge 0xd246
movl 0x2c(%rsp), %eax
cmpl 0x28(%rsp), %eax
setl %al
movb %al, 0x16(%rsp)
movb 0x16(%rsp), %al
testb $0x1, %al
jne 0xd250
jmp 0xd25d
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0xd20b
cmpl $0x0, 0x1b794(%rip)     # 0x289f8
je 0xd2e1
movl 0xa4a8(%rip), %edx      # 0x17714
movslq 0x2c(%rsp), %rcx
leaq 0x7b2d8(%rip), %rax     # 0x88550
imulq $0x320, %rcx, %rcx      # imm = 0x320
addq %rcx, %rax
movslq 0x2c(%rsp), %rsi
leaq 0x7b292(%rip), %rcx     # 0x88520
movslq (%rcx,%rsi,4), %rcx
movl %edx, (%rax,%rcx,4)
movslq 0x2c(%rsp), %rdx
leaq 0x7b27f(%rip), %rax     # 0x88520
movl (%rax,%rdx,4), %eax
addl $0x1, %eax
leaq 0x7b272(%rip), %rcx     # 0x88520
movl %eax, (%rcx,%rdx,4)
cmpl $0xc6, %eax
jle 0xd2df
movl 0x1b74e(%rip), %eax     # 0x28a0c
addl $0x1, %eax
movl %eax, 0x1b745(%rip)     # 0x28a0c
leaq 0x41db(%rip), %rdi      # 0x114a9
movb $0x0, %al
callq 0x3150
movl $0x1, %edi
callq 0x22b0
jmp 0xd2e1
jmp 0xd2e3
movq 0x30(%rsp), %rdi
callq 0x8cd0
movq %rax, 0x30(%rsp)
cmpq $0x0, 0x30(%rsp)
jne 0xd2ff
jmp 0xd690
movq 0x30(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x2e, %eax
je 0xd33e
movq 0x30(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x5f, %eax
je 0xd33e
callq 0x22e0
movq (%rax), %rax
movq 0x30(%rsp), %rcx
movsbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x400, %eax            # imm = 0x400
cmpl $0x0, %eax
je 0xd4f1
movq 0x30(%rsp), %rdi
leaq 0x4005(%rip), %rsi      # 0x1134f
callq 0x2880
cmpq $0x0, %rax
je 0xd364
movq 0x30(%rsp), %rdi
callq 0xc150
jmp 0xd690
movq 0x30(%rsp), %rdi
callq 0x3600
movl %eax, 0x7b164(%rip)     # 0x884d8
cmpl $0x0, %eax
jge 0xd4ef
movq 0x30(%rsp), %rdi
callq 0xca10
movl %eax, 0x20(%rsp)
cmpl $0x0, 0x20(%rsp)
jge 0xd476
movq 0x30(%rsp), %rax
cmpq 0x18(%rsp), %rax
jne 0xd3bd
movq 0x30(%rsp), %rdi
leaq 0x24(%rsp), %rsi
movl $0x20, %edx
callq 0x3de0
movq %rax, 0x30(%rsp)
jmp 0xd432
movq 0x30(%rsp), %rdi
leaq 0x40f7(%rip), %rsi      # 0x114c0
callq 0x2980
cmpq $0x0, %rax
jne 0xd417
movq 0x30(%rsp), %rdi
leaq 0x40e4(%rip), %rsi      # 0x114c4
callq 0x2980
cmpq $0x0, %rax
jne 0xd417
movq 0x30(%rsp), %rdi
leaq 0x40d2(%rip), %rsi      # 0x114c9
callq 0x2980
cmpq $0x0, %rax
jne 0xd417
movq 0x30(%rsp), %rdi
movl $0x3d, %esi
callq 0x2100
cmpq $0x0, %rax
je 0xd430
movq 0x30(%rsp), %rdi
leaq 0x24(%rsp), %rsi
movl $0x43, %edx
callq 0x3de0
movq %rax, 0x30(%rsp)
jmp 0xd432
movq 0x30(%rsp), %rdi
callq 0x2830
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
cmpb $0x0, (%rax)
je 0xd459
movq 0x30(%rsp), %rdi
callq 0xca10
movl %eax, 0x20(%rsp)
cmpl $0x0, 0x20(%rsp)
jl 0xd474
movq 0x30(%rsp), %rdi
callq 0x20f0
addq 0x30(%rsp), %rax
movq %rax, 0x30(%rsp)
jmp 0xd48a
movq 0x30(%rsp), %rdi
callq 0x20f0
addq 0x30(%rsp), %rax
movq %rax, 0x30(%rsp)
cmpl $0x0, 0x20(%rsp)
jge 0xd4ed
movq 0x30(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0xd4ab
movq 0x30(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x3b, %eax
jne 0xd4ed
callq 0x3320
cmpl $0x0, 0x7ce1(%rip)      # 0x15198
je 0xd4e8
cmpl $0x0, 0x1b538(%rip)     # 0x289f8
jne 0xd4e8
movq 0x1b51f(%rip), %rdi     # 0x289e8
movl 0x24(%rsp), %edx
andl $0xffff, %edx           # imm = 0xFFFF
leaq 0x2d27(%rip), %rsi      # 0x10201
leaq 0x1a99f(%rip), %rcx     # 0x27e80
movb $0x0, %al
callq 0x21e0
jmp 0xd690
jmp 0xd4ef
jmp 0xd4f1
cmpl $0x0, 0x7af98(%rip)     # 0x88490
je 0xd4ff
jmp 0xd690
movq 0x30(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0xd511
jmp 0xd690
movq 0x30(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x3b, %eax
jne 0xd523
jmp 0xd690
movq 0x30(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x26, %eax
jne 0xd548
movq 0x30(%rsp), %rdi
addq $0x1, %rdi
callq 0x3800
movq %rax, 0x30(%rsp)
jmp 0xd690
movq 0x30(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x2a, %eax
jne 0xd56d
movq 0x30(%rsp), %rdi
addq $0x1, %rdi
callq 0x8b40
movq %rax, 0x30(%rsp)
jmp 0xd690
movq 0x30(%rsp), %rdi
callq 0x8cd0
movq %rax, 0x30(%rsp)
cmpq $0x0, 0x30(%rsp)
jne 0xd589
jmp 0xd690
cmpl $0x0, 0x7af48(%rip)     # 0x884d8
jge 0xd5a2
movq 0x30(%rsp), %rdi
callq 0x3600
movl %eax, 0x7af36(%rip)     # 0x884d8
cmpl $0x0, 0x7af2f(%rip)     # 0x884d8
jl 0xd5fc
movq 0x30(%rsp), %rax
movq %rax, 0x8(%rsp)
movslq 0x7af1c(%rip), %rax     # 0x884d8
leaq 0x7bdd(%rip), %rdi      # 0x151a0
imulq $0x28, %rax, %rax
addq %rax, %rdi
callq 0x20f0
movq 0x8(%rsp), %rdi
addq %rax, %rdi
callq 0x3b70
movq 0x30(%rsp), %rdi
callq 0x20f0
addq 0x30(%rsp), %rax
movq %rax, 0x30(%rsp)
leaq 0x1a989(%rip), %rdi     # 0x27f80
callq 0xa1c0
cmpl $0x0, 0x7b95(%rip)      # 0x15198
je 0xd623
cmpl $0x0, 0x1b3ec(%rip)     # 0x289f8
jne 0xd623
movq 0x1b3d3(%rip), %rdi     # 0x289e8
leaq 0x46b5(%rip), %rsi      # 0x11cd1
movb $0x0, %al
callq 0x21e0
movq 0x30(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0xd64a
movq 0x30(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x3b, %eax
je 0xd64a
movq 0x30(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x2a, %eax
jne 0xd64c
jmp 0xd690
movq 0x30(%rsp), %rsi
leaq 0x3d1a(%rip), %rdi      # 0x11372
movb $0x0, %al
callq 0x2110
movl 0x1b3a7(%rip), %eax     # 0x28a0c
addl $0x1, %eax
movl %eax, 0x1b39e(%rip)     # 0x28a0c
movq 0x30(%rsp), %rdi
callq 0x3040
leaq 0x3e4e(%rip), %rdi      # 0x114cd
movb $0x0, %al
callq 0x3150
movl $0x1, %edi
callq 0x22b0
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)