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

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

   rewind(sf);
   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);
         if (df) fprintf(df,"Macro: %s\n",Line);
      }
      else
      {
         fgets(Line,sizeof(Line),sf);
      }
      Eof = feof(sf) || ForcedEnd;;
      if (Eof && IncludeLevel > 0) Eof = CloseInclude();
   }
}

// Assembly:
xorl %eax, %eax
movl %eax, 0x7b725(%rip)     # 0x854b0
movl %eax, 0x7b2cf(%rip)     # 0x85060
movdqa 0x2297(%rip), %xmm0     # 0xc030
movdqa 0x229f(%rip), %xmm1     # 0xc040
movl $0x3, %eax
movdqa 0x22a2(%rip), %xmm2     # 0xc050
movdqa 0x22aa(%rip), %xmm3     # 0xc060
pshufd $0xf5, %xmm3, %xmm4     # xmm4 = xmm3[1,1,3,3]
leaq 0x7b74e(%rip), %rcx     # 0x85510
movdqa 0x22a6(%rip), %xmm5     # 0xc070
movdqa %xmm1, %xmm6
pxor %xmm2, %xmm6
movdqa %xmm3, %xmm7
pcmpgtd %xmm6, %xmm7
pshufd $0xf5, %xmm6, %xmm6     # xmm6 = xmm6[1,1,3,3]
pcmpeqd %xmm4, %xmm6
pand %xmm7, %xmm6
movd %xmm6, %edx
testb $0x1, %dl
je 0x9df8
movl $0xff0000, -0xc(%rcx,%rax,4) # imm = 0xFF0000
pextrw $0x4, %xmm6, %edx
testb $0x1, %dl
je 0x9e0a
movl $0xff0000, -0x8(%rcx,%rax,4) # imm = 0xFF0000
movdqa %xmm0, %xmm6
pxor %xmm2, %xmm6
movdqa %xmm3, %xmm7
pcmpgtd %xmm6, %xmm7
pshufd $0xf5, %xmm6, %xmm6     # xmm6 = xmm6[1,1,3,3]
pcmpeqd %xmm4, %xmm6
pand %xmm7, %xmm6
pextrw $0x0, %xmm6, %edx
testb $0x1, %dl
je 0x9e39
movl $0xff0000, -0x4(%rcx,%rax,4) # imm = 0xFF0000
pextrw $0x4, %xmm6, %edx
testb $0x1, %dl
je 0x9e4a
movl $0xff0000, (%rcx,%rax,4) # imm = 0xFF0000
paddq %xmm5, %xmm1
paddq %xmm5, %xmm0
addq $0x4, %rax
cmpq $0xf, %rax
jne 0x9dca
pushq %r14
pushq %rbx
pushq %rax
movq 0x7b30d(%rip), %rdi     # 0x85178
callq 0x2140
movq 0x7b301(%rip), %rdx     # 0x85178
leaq 0x1b022(%rip), %rbx     # 0x24ea0
movq %rbx, %rdi
movl $0x100, %esi            # imm = 0x100
callq 0x21c0
movq 0x7b2e6(%rip), %rdi     # 0x85178
callq 0x2230
testl %eax, %eax
je 0x9ea8
cmpl $0x0, 0x1bb5e(%rip)     # 0x25a00
jle 0x9f81
leaq 0x378d(%rip), %r14      # 0xd63c
incl 0x1aea3(%rip)           # 0x24d58
incl 0x1aea5(%rip)           # 0x24d60
movq %rbx, %rdi
callq 0x2110
movl $0x0, %ecx
testl %eax, %eax
je 0x9ee8
movl %eax, %ecx
decl %ecx
movslq %ecx, %rcx
cmpb $0xa, (%rcx,%rbx)
jne 0x9ee6
movslq %eax, %rcx
movb $0x0, -0x1(%rcx,%rbx)
decq %rcx
jmp 0x9ee8
movl %eax, %ecx
testl %ecx, %ecx
je 0x9efb
movslq %ecx, %rax
cmpb $0xd, -0x1(%rax,%rbx)
jne 0x9efb
movb $0x0, -0x1(%rax,%rbx)
movq %rbx, %rdi
callq 0x95ef
cmpl $0x0, 0x7d9fe(%rip)     # 0x87908
je 0x9f2f
movq %rbx, %rdi
callq 0x94d3
movq 0x1baf5(%rip), %rdi     # 0x25a10
testq %rdi, %rdi
je 0x9f43
movq %r14, %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x2210
jmp 0x9f43
movq 0x7b242(%rip), %rdx     # 0x85178
movq %rbx, %rdi
movl $0x100, %esi            # imm = 0x100
callq 0x21c0
movq 0x7b22e(%rip), %rdi     # 0x85178
callq 0x2230
movl %eax, %ecx
xorl %eax, %eax
orl 0x7b557(%rip), %ecx     # 0x854b0
setne %al
je 0x9f6c
cmpl $0x0, 0x1ba9b(%rip)     # 0x25a00
jle 0x9f6c
callq 0x9c85
testl %eax, %eax
je 0x9eaf
cmpl $0x0, 0x1ba85(%rip)     # 0x25a00
jg 0x9eaf
addq $0x8, %rsp
popq %rbx
popq %r14
retq