// File: /workspace/github_c_makefile_star2_O1/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 0x181f4(%rip), %rbx     # 0x1ce20
movq %rbx, 0x182ed(%rip)     # 0x1cf20
movl $0x100, %edx            # imm = 0x100
movq %rbx, %rdi
xorl %esi, %esi
callq 0x30d0
xorps %xmm0, %xmm0
leaq 0xf9bc(%rip), %rbp      # 0x14608
movups %xmm0, 0x28(%rbp)
movups %xmm0, 0x38(%rbp)
movups %xmm0, 0x48(%rbp)
movups %xmm0, 0x58(%rbp)
movups %xmm0, 0x68(%rbp)
movups %xmm0, 0x78(%rbp)
callq 0x4b14
testl %eax, %eax
je 0x4ea2
leaq 0x181a8(%rip), %rbx     # 0x1ce20
leaq 0x18f31(%rip), %r12     # 0x1dbb0
leaq 0x1911a(%rip), %r15     # 0x1dda0
xorl %r14d, %r14d
cmpl $0x0, 0x8(%rbp)
je 0x4e88
cmpl $0x2e, %r14d
je 0x4e88
cmpl $0x5c, 0x1816c(%rip)    # 0x1ce10
jne 0x4e88
movl 0x18164(%rip), %eax     # 0x1ce14
leal -0x30(%rax), %ecx
cmpl $0x9, %ecx
ja 0x4d53
callq 0x4b14
movl 0x18149(%rip), %eax     # 0x1ce10
leal -0x30(%rax), %ecx
leal -0x31(%rax), %r13d
cmpl $0x31, %eax
movl $0x9, %eax
cmovll %eax, %r13d
cmpl $0x0, (%r12)
cmovel %ecx, %r13d
movl 0x1812b(%rip), %eax     # 0x1ce14
addl $-0x30, %eax
cmpl $0x5, %eax
ja 0x4d09
callq 0x4b14
leal (%r13,%r13,4), %eax
movl 0x1810f(%rip), %ecx     # 0x1ce10
leal (%rcx,%rax,2), %r13d
addl $-0x30, %r13d
movslq 0x8(%rbp), %rax
leaq (%rax,%rax,4), %rcx
shlq $0x8, %rcx
movslq %r13d, %rax
leaq (%rax,%rax,4), %rdx
shlq $0x4, %rdx
leaq (%rcx,%r15), %rax
movb -0x500(%rdx,%rax), %al
testb %al, %al
je 0x4e95
addq %rdx, %rcx
addq %r15, %rcx
addq $-0x4ff, %rcx           # imm = 0xFB01
movb %al, (%rbx)
incq %rbx
movb (%rcx), %al
incq %rcx
testb %al, %al
jne 0x4d40
jmp 0x4e95
cmpl $0x23, %eax
jne 0x4d94
callq 0x4b14
movl 0x20(%rbp), %edx
movq %rsp, %rdi
leaq 0x8374(%rip), %rsi      # 0xd0de
xorl %eax, %eax
callq 0x31b0
movb (%rsp), %al
testb %al, %al
je 0x4e95
leaq 0x1(%rsp), %rcx
movb %al, (%rbx)
incq %rbx
movb (%rcx), %al
incq %rcx
testb %al, %al
jne 0x4d81
jmp 0x4e95
movl %eax, %edx
xorl $0x3f, %edx
movl (%r12), %ecx
orl %ecx, %edx
setne %dl
cmpl $0x5e, %eax
je 0x4e10
testb %dl, %dl
je 0x4e10
cmpl $0x7e, %eax
jne 0x4e36
movl $0xa, %edi
movl $0x1, %esi
callq 0x3100
movq %rax, %r13
callq 0x4b14
cmpl $0x0, (%r12)
je 0x4dd8
movb $0x4d, (%rbx)
incq %rbx
movl 0x24(%rbp), %edx
movq %r13, %rdi
leaq 0x82fc(%rip), %rsi      # 0xd0e1
xorl %eax, %eax
callq 0x31b0
movb (%r13), %al
testb %al, %al
je 0x4e95
incq %r13
movb %al, (%rbx)
incq %rbx
movb (%r13), %al
incq %r13
testb %al, %al
jne 0x4dfb
jmp 0x4e95
movq 0x18(%rbp), %r13
callq 0x4b14
movb (%r13), %al
testb %al, %al
je 0x4e95
incq %r13
movb %al, (%rbx)
incq %rbx
movb (%r13), %al
incq %r13
testb %al, %al
jne 0x4e24
jmp 0x4e95
cmpl $0x3f, %eax
jne 0x4e88
testl %ecx, %ecx
je 0x4e88
callq 0x4b14
callq 0x4b14
movl 0x17fc1(%rip), %eax     # 0x1ce10
leal -0x31(%rax), %ecx
cmpl $0x31, %eax
movl $0x9, %eax
cmovll %eax, %ecx
movslq 0x8(%rbp), %rax
leaq (%rax,%rax,4), %rax
shlq $0x8, %rax
movslq %ecx, %rcx
leaq (%rcx,%rcx,4), %rcx
shlq $0x4, %rcx
addq %r15, %rax
cmpb $0x0, -0x500(%rcx,%rax)
sete %al
xorb $0x31, %al
movb %al, (%rbx)
jmp 0x4e92
movl 0x17f81(%rip), %r14d    # 0x1ce10
movb %r14b, (%rbx)
incq %rbx
callq 0x4b14
testl %eax, %eax
jne 0x4c89
movq 0x18077(%rip), %rcx     # 0x1cf20
cmpb $0x0, 0xff(%rcx)
jne 0x4f0b
cmpl $-0x1, 0x17f57(%rip)    # 0x1ce10
jne 0x4ec2
xorl %eax, %eax
cmpq %rcx, %rbx
je 0x4efc
movl 0x18068(%rip), %eax     # 0x1cf30
movl %eax, 0x18066(%rip)     # 0x1cf34
leaq 0x1(%rcx), %rax
movq %rax, 0x18047(%rip)     # 0x1cf20
movsbl (%rcx), %edx
movl %edx, 0x1804e(%rip)     # 0x1cf30
movsbl 0x1(%rcx), %eax
movl %eax, 0x1804c(%rip)     # 0x1cf38
movl $0x1, %eax
testl %edx, %edx
jne 0x4efc
movq %rcx, 0x18024(%rip)     # 0x1cf20
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, %edi
callq 0x31c0