// File: /workspace/github_c_makefile_star2_O3/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 0x6789
incl 0x9c93(%rip)            # 0xd76c
xorl %eax, %eax
movb %al, 0x9d47(%rip)       # 0xd828
movb %al, 0x9c81(%rip)       # 0xd768
movl %eax, 0x9d3f(%rip)      # 0xd82c
movl %eax, 0x9d31(%rip)      # 0xd824
movb %al, 0x9d1f(%rip)       # 0xd818
movq 0x7920(%rip), %rdx      # 0xb420
movq %rsp, %rdi
movl $0x83, %esi
callq 0x20f0
testq %rax, %rax
je 0x3b20
movb (%rsp), %al
testb %al, %al
jne 0x3b3d
xorl %ecx, %ecx
jmp 0x3bae
movw $0xa24, (%rsp)          # imm = 0xA24
movb $0x0, 0x2(%rsp)
movb $0x24, %al
cmpb $0x0, 0x781a(%rip)      # 0xb34e
jne 0x3b3d
movb $0x1, 0x9cdb(%rip)      # 0xd818
movl 0x7a19(%rip), %edi      # 0xb55c
xorl %ecx, %ecx
leaq 0x9c44(%rip), %rsi      # 0xd790
xorl %r8d, %r8d
cmpb $0xd, %al
je 0x3b82
movzbl %al, %edx
movswq %cx, %rcx
cmpl $0x9, %edx
jne 0x3b7d
movq %rcx, %r9
movb $0x20, (%rcx,%rsi)
incq %rcx
movl %ecx, %eax
cltd
idivl %edi
cmpq $0x80, %r9
jg 0x3b82
testl %edx, %edx
jne 0x3b5f
jmp 0x3b82
movb %al, (%rcx,%rsi)
incl %ecx
incl %r8d
movswq %r8w, %rax
movb (%rsp,%rax), %al
movswl %cx, %edx
testb %al, %al
je 0x3b9b
cmpl $0x82, %edx
jl 0x3b4f
cmpl $0x82, %edx
jl 0x3bae
movzwl %cx, %eax
movb $0xa, (%rax,%rsi)
movw $0x83, %cx
movswq %cx, %rax
leaq 0x9bd7(%rip), %rcx      # 0xd790
movb $0x0, (%rax,%rcx)
cwtl
movl %eax, 0x9c6c(%rip)      # 0xd830
cmpl $0x1, 0x9ba1(%rip)      # 0xd76c
jne 0x3be0
leaq 0x9c7c(%rip), %rdi      # 0xd850
leaq 0x9bb5(%rip), %rsi      # 0xd790
callq 0x2070
addq $0x88, %rsp
retq