// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x50, %rsp
movl $0x0, -0x14(%rbp)
leaq 0x1b7ba(%rip), %rax     # 0x20e10
movq %rax, -0x10(%rbp)
leaq 0x1b7af(%rip), %rax     # 0x20e10
movq %rax, 0x1b8a8(%rip)     # 0x20f10
movq -0x10(%rbp), %rdi
xorl %esi, %esi
movl $0x100, %edx            # imm = 0x100
callq 0x30c0
leaq 0x12f79(%rip), %rdi     # 0x185f8
addq $0x28, %rdi
xorl %esi, %esi
movl $0x60, %edx
callq 0x30c0
callq 0x54c0
cmpl $0x0, %eax
je 0x5983
leaq 0x12f54(%rip), %rax     # 0x185f8
cmpl $0x0, 0x8(%rax)
je 0x595c
cmpl $0x2e, -0x14(%rbp)
je 0x595a
cmpl $0x5c, 0x1b741(%rip)    # 0x20e00
jne 0x595a
cmpl $0x2e, -0x14(%rbp)
jne 0x56dd
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movb $0x5c, (%rax)
cmpl $0x30, 0x1b720(%rip)    # 0x20e04
jl 0x575f
cmpl $0x39, 0x1b717(%rip)    # 0x20e04
jg 0x575f
callq 0x54c0
movl 0x1b706(%rip), %eax     # 0x20e00
subl $0x30, %eax
movl %eax, -0x18(%rbp)
leaq 0x1c499(%rip), %rax     # 0x21ba0
cmpl $0x0, (%rax)
je 0x5723
movl -0x18(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x18(%rbp)
cmpl $0x0, %eax
jge 0x5721
movl $0x9, -0x18(%rbp)
jmp 0x5723
cmpl $0x30, 0x1b6da(%rip)    # 0x20e04
jl 0x574a
cmpl $0x35, 0x1b6d1(%rip)    # 0x20e04
jg 0x574a
callq 0x54c0
imull $0xa, -0x18(%rbp), %eax
addl 0x1b6bc(%rip), %eax     # 0x20e00
subl $0x30, %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movl -0x18(%rbp), %esi
callq 0x55d0
movq %rax, -0x10(%rbp)
jmp 0x568f
cmpl $0x23, 0x1b69e(%rip)    # 0x20e04
jne 0x57c3
leaq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
callq 0x54c0
leaq -0x30(%rbp), %rdi
leaq 0x12e78(%rip), %rax     # 0x185f8
movl 0x20(%rax), %edx
leaq 0xb9d6(%rip), %rsi      # 0x11160
movb $0x0, %al
callq 0x31a0
movq -0x38(%rbp), %rax
cmpb $0x0, (%rax)
je 0x57be
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x38(%rbp)
movb (%rax), %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
jmp 0x5791
jmp 0x568f
cmpl $0x3f, 0x1b63a(%rip)    # 0x20e04
jne 0x57d8
leaq 0x1c3cd(%rip), %rax     # 0x21ba0
cmpl $0x0, (%rax)
je 0x57e1
cmpl $0x5e, 0x1b625(%rip)    # 0x20e04
jne 0x5827
leaq 0x12e10(%rip), %rax     # 0x185f8
movq 0x18(%rax), %rax
movq %rax, -0x40(%rbp)
callq 0x54c0
movq -0x40(%rbp), %rax
cmpb $0x0, (%rax)
je 0x5822
movq -0x40(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x40(%rbp)
movb (%rax), %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
jmp 0x57f5
jmp 0x568f
cmpl $0x7e, 0x1b5d6(%rip)    # 0x20e04
jne 0x58b8
movl $0xa, %edi
movl $0x1, %esi
callq 0x30f0
movq %rax, -0x48(%rbp)
callq 0x54c0
leaq 0x1c34d(%rip), %rax     # 0x21ba0
cmpl $0x0, (%rax)
je 0x586a
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movb $0x4d, (%rax)
movq -0x48(%rbp), %rdi
leaq 0x12d83(%rip), %rax     # 0x185f8
movl 0x24(%rax), %edx
leaq 0xb8e4(%rip), %rsi      # 0x11163
movb $0x0, %al
callq 0x31a0
movq -0x48(%rbp), %rax
cmpb $0x0, (%rax)
je 0x58b3
movq -0x48(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x48(%rbp)
movb (%rax), %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
jmp 0x5886
jmp 0x568f
leaq 0x1c2e1(%rip), %rax     # 0x21ba0
cmpl $0x0, (%rax)
je 0x5950
cmpl $0x3f, 0x1b535(%rip)    # 0x20e04
jne 0x5950
callq 0x54c0
callq 0x54c0
movl 0x1b51f(%rip), %eax     # 0x20e00
subl $0x31, %eax
movl %eax, -0x4c(%rbp)
cmpl $0x0, -0x4c(%rbp)
jge 0x58f4
movl $0x9, -0x4c(%rbp)
leaq 0x12cfd(%rip), %rax     # 0x185f8
movl 0x8(%rax), %eax
subl $0x1, %eax
movslq %eax, %rcx
leaq 0x1c485(%rip), %rax     # 0x21d90
imulq $0x500, %rcx, %rcx      # imm = 0x500
addq %rcx, %rax
movslq -0x4c(%rbp), %rcx
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
cmpb $0x0, (%rax)
je 0x5939
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movb $0x31, (%rax)
jmp 0x594b
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movb $0x30, (%rax)
jmp 0x568f
jmp 0x5952
jmp 0x5954
jmp 0x5956
jmp 0x5958
jmp 0x595a
jmp 0x595c
movl 0x1b49e(%rip), %eax     # 0x20e00
movl %eax, -0x14(%rbp)
movl 0x1b495(%rip), %eax     # 0x20e00
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
jmp 0x568f
movq 0x1b586(%rip), %rax     # 0x20f10
cmpb $0x0, 0xff(%rax)
je 0x599d
movl $0x1, %edi
callq 0x31b0
cmpl $-0x1, 0x1b45c(%rip)    # 0x20e00
jne 0x59bc
movq -0x10(%rbp), %rax
cmpq 0x1b55f(%rip), %rax     # 0x20f10
jne 0x59bc
movl $0x0, -0x4(%rbp)
jmp 0x59c8
callq 0x59e0
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)