// File: /workspace/github_c_makefile_star2_O0/Edilbert[P]BS9/bs9.c
// Function: Phase2
void Phase2(void)
{
   int i,l,Eof;

   pc        =   -1;
   EnumValue =   -1;
   ForcedEnd =    0;
   ListOn    =    1;
   CPU       = 6309;
   Scope[0]  =    0;
   ModuleStart =  0;

   for (i=0 ; i < 11 ; ++i) minlab[i] = UNDEF;

   if (IfLevel)
   {
      printf("\n*** Error in conditional assembly ***\n");
      if (IfLevel == 1)
         printf("*** an #endif statement is missing\n");
      else
         printf("*** %d #endif statements are missing\n",IfLevel);
      exit(1);
   }
   rewind(sf);
   LiNo = 0; TotalLiNo = 0;
   fgets(Line,sizeof(Line),sf);
   Eof = feof(sf);
   while (!Eof || IncludeLevel > 0)
   {
      ++LiNo; ++TotalLiNo;
      l = strlen(Line);
      if (l && Line[l-1] == 10) Line[--l] = 0; // Remove linefeed
      if (l && Line[l-1] == 13) Line[--l] = 0; // Remove return
      ParseLine(Line);
      if (MacLev)
      {
         NextMacLine(Line);
         ListOn = MacList;
      }
      else
      {
         fgets(Line,sizeof(Line),sf);
         ListOn = ListGlobal;
      }
      Eof = feof(sf) || ForcedEnd;
      if (Eof && IncludeLevel > 0) Eof = CloseInclude();
      if (GenEnd < pc) GenEnd = pc; // Remember highest assenble address
      if (ErrNum >= ERRMAX)
      {
         printf("\n*** Error count reached maximum of %d ***\n",ErrNum);
         printf("Assembly stopped\n");
         return;
      }
   }
}

// Assembly:
subq $0x18, %rsp
movl $0xffffffff, 0x9c86(%rip) # imm = 0xFFFFFFFF
movl $0xffffffff, 0x9c6c(%rip) # imm = 0xFFFFFFFF
movl $0x0, 0x7a9ee(%rip)     # 0x88490
movl $0x1, 0x76ec(%rip)      # 0x15198
movl $0x18a5, 0x76da(%rip)   # imm = 0x18A5
movb $0x0, 0x1a2c3(%rip)     # 0x27d80
movl $0x0, 0x7a689(%rip)     # 0x88150
movl $0x0, 0x14(%rsp)
cmpl $0xb, 0x14(%rsp)
jge 0xdaf6
movslq 0x14(%rsp), %rcx
leaq 0x7aa0e(%rip), %rax     # 0x884f0
movl $0xff0000, (%rax,%rcx,4) # imm = 0xFF0000
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0xdacf
cmpl $0x0, 0x7a9a7(%rip)     # 0x884a4
je 0xdb44
leaq 0x3a41(%rip), %rdi      # 0x11547
movb $0x0, %al
callq 0x2110
cmpl $0x1, 0x7a990(%rip)     # 0x884a4
jne 0xdb26
leaq 0x3a52(%rip), %rdi      # 0x1156f
movb $0x0, %al
callq 0x2110
jmp 0xdb3a
movl 0x7a978(%rip), %esi     # 0x884a4
leaq 0x3a60(%rip), %rdi      # 0x11593
movb $0x0, %al
callq 0x2110
movl $0x1, %edi
callq 0x22b0
movq 0x7a60d(%rip), %rdi     # 0x88158
callq 0x2120
movl $0x0, 0x1a1de(%rip)     # 0x27d38
movl $0x0, 0x1a1dc(%rip)     # 0x27d40
movq 0x7a5ed(%rip), %rdx     # 0x88158
leaq 0x1a30e(%rip), %rdi     # 0x27e80
movl $0x100, %esi            # imm = 0x100
callq 0x2190
movq 0x7a5d5(%rip), %rdi     # 0x88158
callq 0x2200
movl %eax, 0xc(%rsp)
movb $0x1, %al
cmpl $0x0, 0xc(%rsp)
movb %al, 0xb(%rsp)
je 0xdba7
cmpl $0x0, 0x1ae40(%rip)     # 0x289e0
setg %al
movb %al, 0xb(%rsp)
movb 0xb(%rsp), %al
testb $0x1, %al
jne 0xdbb4
jmp 0xdd47
movl 0x1a17e(%rip), %eax     # 0x27d38
addl $0x1, %eax
movl %eax, 0x1a175(%rip)     # 0x27d38
movl 0x1a177(%rip), %eax     # 0x27d40
addl $0x1, %eax
movl %eax, 0x1a16e(%rip)     # 0x27d40
leaq 0x1a2a7(%rip), %rdi     # 0x27e80
callq 0x20f0
movl %eax, 0x10(%rsp)
cmpl $0x0, 0x10(%rsp)
je 0xdc1c
movl 0x10(%rsp), %eax
subl $0x1, %eax
movslq %eax, %rcx
leaq 0x1a286(%rip), %rax     # 0x27e80
movsbl (%rax,%rcx), %eax
cmpl $0xa, %eax
jne 0xdc1c
movl 0x10(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x10(%rsp)
movslq %eax, %rcx
leaq 0x1a268(%rip), %rax     # 0x27e80
movb $0x0, (%rax,%rcx)
cmpl $0x0, 0x10(%rsp)
je 0xdc56
movl 0x10(%rsp), %eax
subl $0x1, %eax
movslq %eax, %rcx
leaq 0x1a24c(%rip), %rax     # 0x27e80
movsbl (%rax,%rcx), %eax
cmpl $0xd, %eax
jne 0xdc56
movl 0x10(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x10(%rsp)
movslq %eax, %rcx
leaq 0x1a22e(%rip), %rax     # 0x27e80
movb $0x0, (%rax,%rcx)
leaq 0x1a223(%rip), %rdi     # 0x27e80
callq 0xcf30
cmpl $0x0, 0x7cc7f(%rip)     # 0x8a8e8
je 0xdc85
leaq 0x1a20e(%rip), %rdi     # 0x27e80
callq 0xcca0
movl 0x9a8b(%rip), %eax      # 0x17708
movl %eax, 0x7515(%rip)      # 0x15198
jmp 0xdca9
movq 0x7a4cc(%rip), %rdx     # 0x88158
leaq 0x1a1ed(%rip), %rdi     # 0x27e80
movl $0x100, %esi            # imm = 0x100
callq 0x2190
movl 0x74f1(%rip), %eax      # 0x15194
movl %eax, 0x74ef(%rip)      # 0x15198
movq 0x7a4a8(%rip), %rdi     # 0x88158
callq 0x2200
movl %eax, %ecx
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, 0xa(%rsp)
jne 0xdcd0
cmpl $0x0, 0x7a7c7(%rip)     # 0x88490
setne %al
movb %al, 0xa(%rsp)
movb 0xa(%rsp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, 0xc(%rsp)
cmpl $0x0, 0xc(%rsp)
je 0xdcf6
cmpl $0x0, 0x1acf5(%rip)     # 0x289e0
jle 0xdcf6
callq 0xd750
movl %eax, 0xc(%rsp)
movl 0x1a050(%rip), %eax     # 0x27d4c
cmpl 0x9a12(%rip), %eax      # 0x17714
jge 0xdd10
movl 0x9a0a(%rip), %eax      # 0x17714
movl %eax, 0x1a03c(%rip)     # 0x27d4c
movl 0x1acf6(%rip), %eax     # 0x28a0c
cmpl 0x99e4(%rip), %eax      # 0x17700
jl 0xdd42
movl 0x1ace8(%rip), %esi     # 0x28a0c
leaq 0x388e(%rip), %rdi      # 0x115b9
movb $0x0, %al
callq 0x2110
leaq 0x38ac(%rip), %rdi      # 0x115e5
movb $0x0, %al
callq 0x2110
jmp 0xdd47
jmp 0xdb8c
addq $0x18, %rsp
retq
nopl (%rax)