// File: /workspace/github_c_makefile_star2_O1/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 0x6796
incl 0x9cfd(%rip)            # 0xd76c
xorl %eax, %eax
movb %al, 0x9db1(%rip)       # 0xd828
movb %al, 0x9ceb(%rip)       # 0xd768
movl %eax, 0x9da9(%rip)      # 0xd82c
movl %eax, 0x9d9b(%rip)      # 0xd824
movb %al, 0x9d89(%rip)       # 0xd818
movq 0x798a(%rip), %rdx      # 0xb420
movq %rsp, %rdi
movl $0x83, %esi
callq 0x20f0
testq %rax, %rax
jne 0x3ac3
movw $0xa24, (%rsp)          # imm = 0xA24
movb $0x0, 0x2(%rsp)
cmpb $0x0, 0x7894(%rip)      # 0xb34e
jne 0x3ac3
movb $0x1, 0x9d55(%rip)      # 0xd818
movb (%rsp), %al
testb %al, %al
je 0x3b2e
movl 0x7a8c(%rip), %edi      # 0xb55c
xorl %esi, %esi
leaq 0x9cb7(%rip), %r8       # 0xd790
xorl %r9d, %r9d
cmpb $0xd, %al
je 0x3b13
movzbl %al, %ecx
cmpl $0x9, %ecx
jne 0x3b09
movswq %si, %rax
movb $0x20, (%rax,%r8)
incl %esi
movswl %si, %ecx
movl %ecx, %eax
cltd
idivl %edi
cmpl $0x81, %ecx
jg 0x3b13
testl %edx, %edx
jne 0x3ae8
jmp 0x3b13
movswq %si, %rcx
movb %al, (%rcx,%r8)
incl %esi
incl %r9d
movswq %r9w, %rax
movb (%rsp,%rax), %al
testb %al, %al
je 0x3b30
movswl %si, %ecx
cmpl $0x82, %ecx
jl 0x3adc
jmp 0x3b30
xorl %esi, %esi
movswl %si, %eax
cmpl $0x82, %eax
jl 0x3b4a
movzwl %si, %eax
leaq 0x9c4c(%rip), %rcx      # 0xd790
movb $0xa, (%rax,%rcx)
incl %esi
movswq %si, %rax
leaq 0x9c3b(%rip), %rcx      # 0xd790
movb $0x0, (%rax,%rcx)
cwtl
movl %eax, 0x9cd0(%rip)      # 0xd830
cmpl $0x1, 0x9c05(%rip)      # 0xd76c
jne 0x3b7c
leaq 0x9ce0(%rip), %rdi      # 0xd850
leaq 0x9c19(%rip), %rsi      # 0xd790
callq 0x2070
addq $0x88, %rsp
retq