// File: /workspace/github_c_makefile_star2_O2/AK6DN[P]dec-utilities-for-pdp/palbart/palbart.c
// Function: readLine
void readLine()
{
  WORD16  ix;
  WORD16  iy;
  char   inpline[LINELEN];

  listLine();                   /* List previous line if needed.              */
  lineno++;                     /* Count lines read.                          */
  indirect_generated = FALSE;   /* Mark no indirect address generated.        */
  listed = FALSE;               /* Mark as not listed.                        */
  cc = 0;                       /* Initialize column counter.                 */
  lexstartprev = 0;

  error_in_line = FALSE;
  if(( fgets( inpline, LINELEN - 1, infile )) == NULL )
  {
    inpline[0] = '$';
    inpline[1] = '\n';
    inpline[2] = '\0';
    if (!dollar_not_required) {
       error_in_line = TRUE;
    }
  }

  /* Remove any tabs from the input line by inserting the required number     */
  /* of spaces to simulate N character tab stops, where N defaults to 8 and   */
  /* is set by the command line option -t. (RK 20071029)                      */
  /* Ignore \r if there is one.  (DPI 20150501)                               */
  for( ix = 0, iy = 0; inpline[ix] != '\0' && iy < (LINELEN - 2); ix++ )
  {
    switch( inpline[ix] )
    {
    case '\t':
      do
      {
        line[iy] = ' ';
        iy++;
      }
      while(( iy % tabstops ) != 0 && iy < (LINELEN - 2));
      break;

    case '\r':        /* dont copy the carriage return */
       break;

    default:
      line[iy] = inpline[ix];
      iy++;
      break;
    }
  }
  if (iy >= (LINELEN - 2)) {
  	line [iy] = '\n';
  	iy++;
  } 
  line[iy] = '\0';

  maxcc = iy;                   /* Save the current line length.              */
  /* Save the first line for possible use as the listing title.               */
  if( lineno == 1 )
  {
    strcpy( list_title, line );
  }
}

// Assembly:
subq $0x88, %rsp
callq 0x5c2b
incl 0x9f4d(%rip)            # 0xd75c
andl $0x0, 0xa006(%rip)      # 0xd81c
xorl %eax, %eax
andl $0x0, 0x9ff5(%rip)      # 0xd814
movb %al, 0x9ff3(%rip)       # 0xd818
movb %al, 0x9f2d(%rip)       # 0xd758
movb %al, 0x9fd7(%rip)       # 0xd808
movq 0x7bd8(%rip), %rdx      # 0xb410
movq %rsp, %rdi
movl $0x83, %esi
callq 0x20e0
testq %rax, %rax
jne 0x3865
movw $0xa24, (%rsp)          # imm = 0xA24
movb $0x0, 0x2(%rsp)
cmpb $0x0, 0x7ae2(%rip)      # 0xb33e
jne 0x3865
movb $0x1, 0x9fa3(%rip)      # 0xd808
movl 0x7ce1(%rip), %edi      # 0xb54c
xorl %r8d, %r8d
leaq 0x9f0b(%rip), %rsi      # 0xd780
xorl %eax, %eax
movswq %r8w, %rcx
movzbl (%rsp,%rcx), %edx
testl %edx, %edx
je 0x38c3
cmpw $0x81, %ax
jg 0x38c3
cmpl $0xd, %edx
je 0x38ba
movswq %ax, %rcx
cmpl $0x9, %edx
jne 0x38b5
movq %rcx, %r9
movb $0x20, (%rcx,%rsi)
incq %rcx
movl %ecx, %eax
cltd
idivl %edi
cmpq $0x80, %r9
jg 0x38bc
testl %edx, %edx
jne 0x3897
jmp 0x38bc
movb %dl, (%rcx,%rsi)
incl %eax
movl %eax, %ecx
incl %r8d
movl %ecx, %eax
jmp 0x3877
cmpw $0x82, %ax
jl 0x38d4
movzwl %ax, %eax
movb $0xa, (%rax,%rsi)
movw $0x83, %ax
movswq %ax, %rax
movb $0x0, (%rax,%rsi)
cwtl
movl %eax, 0x9f3d(%rip)      # 0xd820
cmpl $0x1, 0x9e72(%rip)      # 0xd75c
jne 0x38ff
leaq 0x9f4d(%rip), %rdi      # 0xd840
leaq 0x9e86(%rip), %rsi      # 0xd780
callq 0x2070
addq $0x88, %rsp
retq