// File: /workspace/github_c_makefile_star2_O2/42Bastian[P]lyxass/parser.c
// Function: GetLine
int GetLine()
{
  extern int mac_mode;
  char *ptr;

  int last_ch = 0;

  srcLinePtr = ptr = srcLine;
  memset((char *)ptr,0,256);

  memset((char *)&Current.Label, 0, sizeof(label_t));

  while ( GetChar() ){

    if ( Current.Macro.Processing ){
      if ( (last_ch != '.') && (ch == '\\') ){
        if ( last_ch == '.' ){
          *ptr++ = '\\';
        }
        if ( next_ch >= '0' && next_ch <= '9' ){
          int var;
          GetChar();
          var = ch - '0';
          if ( mac_mode ){
            if ( --var < 0 ){
              var = 9;
            }
          }
          if ( (next_ch >= '0' && next_ch <= '5')){
            GetChar();
            var = 10*var + ch-'0';
          }
          ptr = InsertMacroVar(ptr,var);
          continue;

          //
          // insert number of parameters
          //
        }else if ( next_ch == '#' ){
          char help[20];
          char *ptr1 = help;

          GetChar();
          sprintf(help,"%d",Current.Macro.NPara);
          while ( *ptr1 ){
            *ptr++ = *ptr1++;
          }
          continue;

          //
          // insert macro-name
          //
        } else if ( (next_ch == '?' && !mac_mode) || next_ch == '^' ){
          char *ptr1 = Current.Macro.Name;
          GetChar();
          while ( *ptr1 ){
            *ptr++ = *ptr1++;
          }
          continue;
        } else if ( next_ch == '~' ){
          char *ptr1 = (char *)calloc(10,1);

          GetChar();
          if ( mac_mode ){
            *ptr++='M';
          }
          sprintf(ptr1,"%04X",Current.Macro.invoked);

          while(*ptr1)
            *ptr++=*ptr1++;
          continue;
        } else if ( mac_mode && next_ch == '?' ){
          int var;
          GetChar();
          GetChar();
          var = ch - '1';
          if ( var < 0 ) {
            var = 9;
          }
          if ( macrovars[Current.Macro.Processing-1][var][0] ){
            *ptr++ = '1';
          } else {
            *ptr++ = '0';
          }
          continue;
        }

      }
    }
    last_ch = ch;
    *ptr++ = ch;

  }

  if ( srcLinePtr[255] ) exit(1);

  if ( ch == EOF && ptr == srcLinePtr ){
    return 0;
  } else {
    GetAtom();
    return 1;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
leaq 0x1831c(%rip), %rbx     # 0x1ce20
movq %rbx, 0x18415(%rip)     # 0x1cf20
movl $0x100, %edx            # imm = 0x100
movq %rbx, %rdi
xorl %esi, %esi
callq 0x30d0
xorps %xmm0, %xmm0
leaq 0xfae4(%rip), %r13      # 0x14608
movups %xmm0, 0x28(%r13)
movups %xmm0, 0x38(%r13)
movups %xmm0, 0x48(%r13)
movups %xmm0, 0x58(%r13)
movups %xmm0, 0x68(%r13)
movups %xmm0, 0x78(%r13)
leaq 0x19067(%rip), %rbp     # 0x1dbb0
pushq $0x9
popq %r14
xorl %eax, %eax
movl %eax, %r15d
callq 0x4a1d
testl %eax, %eax
je 0x4d05
cmpl $0x0, 0x8(%r13)
movl 0x182a6(%rip), %eax     # 0x1ce10
je 0x4cfb
cmpl $0x2e, %r15d
je 0x4cfb
cmpl $0x5c, %eax
jne 0x4cfb
movl 0x1828b(%rip), %ecx     # 0x1ce14
leal -0x30(%rcx), %edx
cmpl $0x9, %edx
ja 0x4bea
callq 0x4a1d
movl 0x18274(%rip), %eax     # 0x1ce10
leal -0x30(%rax), %ecx
leal -0x31(%rax), %r12d
cmpl $0x31, %eax
cmovll %r14d, %r12d
cmpl $0x0, (%rbp)
cmovel %ecx, %r12d
movl 0x1825c(%rip), %eax     # 0x1ce14
addl $-0x30, %eax
cmpl $0x5, %eax
ja 0x4bd7
callq 0x4a1d
imull $0xa, %r12d, %eax
movl 0x18241(%rip), %ecx     # 0x1ce10
leal (%rax,%rcx), %r12d
addl $-0x30, %r12d
movq %rbx, %rdi
movl %r12d, %esi
callq 0x4ab1
movq %rax, %rbx
jmp 0x4b52
cmpl $0x23, %ecx
jne 0x4c1a
callq 0x4a1d
movl 0x20(%r13), %edx
movq %rsp, %rdi
leaq 0x74dc(%rip), %rsi      # 0xc0de
xorl %eax, %eax
callq 0x31b0
xorl %eax, %eax
movb (%rsp,%rax), %cl
testb %cl, %cl
je 0x4c81
movb %cl, (%rbx,%rax)
incq %rax
jmp 0x4c0b
movl %ecx, %esi
xorl $0x3f, %esi
movl (%rbp), %edx
orl %edx, %esi
setne %sil
cmpl $0x5e, %ecx
je 0x4c89
testb %sil, %sil
je 0x4c89
cmpl $0x7e, %ecx
jne 0x4ca8
pushq $0xa
popq %rdi
pushq $0x1
popq %rsi
callq 0x3100
movq %rax, %r12
callq 0x4a1d
cmpl $0x0, (%rbp)
je 0x4c56
movb $0x4d, (%rbx)
incq %rbx
movl 0x24(%r13), %edx
movq %r12, %rdi
leaq 0x747d(%rip), %rsi      # 0xc0e1
xorl %eax, %eax
callq 0x31b0
movb (%r12), %al
testb %al, %al
je 0x4b52
incq %r12
movb %al, (%rbx)
incq %rbx
jmp 0x4c6b
addq %rax, %rbx
jmp 0x4b52
movq 0x18(%r13), %r12
callq 0x4a1d
movb (%r12), %al
testb %al, %al
je 0x4b52
incq %r12
movb %al, (%rbx)
incq %rbx
jmp 0x4c92
cmpl $0x3f, %ecx
jne 0x4cfb
testl %edx, %edx
je 0x4cfb
callq 0x4a1d
callq 0x4a1d
movl 0x1814f(%rip), %eax     # 0x1ce10
leal -0x31(%rax), %ecx
cmpl $0x31, %eax
cmovll %r14d, %ecx
movslq 0x8(%r13), %rax
imulq $0x500, %rax, %rax      # imm = 0x500
movslq %ecx, %rcx
imulq $0x50, %rcx, %rcx
addq 0xe304(%rip), %rax      # 0x12fe8
cmpb $0x0, -0x500(%rcx,%rax)
sete %al
xorb $0x31, %al
movb %al, (%rbx)
incq %rbx
jmp 0x4b52
movb %al, (%rbx)
incq %rbx
jmp 0x4b4f
movq 0x18214(%rip), %rcx     # 0x1cf20
cmpb $0x0, 0xff(%rcx)
jne 0x4d3c
cmpl $-0x1, 0x180f4(%rip)    # 0x1ce10
jne 0x4d25
xorl %eax, %eax
cmpq %rcx, %rbx
je 0x4d2d
callq 0x4d44
pushq $0x1
popq %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x1
popq %rdi
callq 0x31c0