// File: /workspace/github_c_makefile_star2_O0/AK6DN[P]dec-utilities-for-pdp/macro8x/macro8x.c
// Function: readLine
void readLine()
{
  BOOL    ffseen;
  WORD32  ix;
  WORD32  iy;
  char    mc;
  char    inpline[4*LINELEN];

  listLine();                   /* List previous line if needed.              */
  indirect_generated = FALSE;   /* Mark no indirect address generated.        */
  error_in_line = FALSE;        /* No error in line.                          */

  if( mac_ptr && ( *mac_ptr == '\0' )) /* End of macro?                       */
  {
    mac_ptr = NULL;
    for( ix = 0; ix < LINELEN; ix++ )
    {
      line[ix] = mac_line[ix];  /* Restore invoking line.                     */
    }
    cc = lexstartprev = mac_cc; /* Restore cc.                                */
    maxcc = strlen( line );     /* Restore maxcc.                             */
    listed = TRUE;              /* Already listed.                            */
    return;
  }

  cc = 0;                       /* Initialize column counter.                 */
  lexstartprev = 0;
  if( mac_ptr )                 /* Inside macro? */
  {
    maxcc = 0;
    do
    {
      mc = *mac_ptr++;          /* Next character.                            */
      if( is_lower( mc ))        /* Encoded argument number?                   */
      {
        ix = mc - 'a';          /* Convert to index.                          */
	iy = mac_arg_pos[ix];
        if( iy )
        {
          do                    /* Copy argument string.                      */
            {
              line[maxcc++] = mac_line[iy++];
            } while(( mac_line[iy] != ',' ) && ( !is_blank( mac_line[iy] )) &&
                    ( !is_end( mac_line[iy] )));
        }
      }
      else                      /* Ordinary character, just copy.             */
      {
      line[maxcc++] = mc;
      }
    } while( !is_end( mc ));
    line[maxcc] = '\0';
    listed = nomac_exp;
    return;
  }

  lineno++;                         /* Count lines read.                      */
  listed = FALSE;                   /* Mark as not listed.                    */
READ_LINE:
  if(( fgets( inpline, LINELEN - 1, infile )) == NULL )
  {
    filix_curr++;                   /* Advance to next file.                  */
    if( filix_curr < save_argc )    /* More files?                            */
    {
      fclose( infile );
      if(( infile = fopen( save_argv[filix_curr], "r" )) == NULL )
      {
        fprintf( stderr, "%s: cannot open \"%s\"\n", save_argv[0],
          save_argv[filix_curr] );
        exit( -1 );
      }
      goto READ_LINE;
    }
    else
    {
      inpline[0] = '$';
      inpline[1] = '\n';
      inpline[2] = '\0';
    }
  }

  /* Remove any tabs from the input line by inserting the required number     */
  /* of spaces to simulate 8 character tab stops.                             */
  ffseen = FALSE;
  for( ix = 0, iy = 0; inpline[ix] != '\0'; ix++ )
  {
    switch( inpline[ix] )
    {
    case '\t':
      do
      {
        line[iy] = ' ';
        iy++;
      }
      while(( iy % 8 ) != 0 );
      break;

    case '\f':
      if( !ffseen && list_title_set ) topOfForm( list_title, NULL );
      ffseen = TRUE;
      break;
      
    default:
      line[iy] = inpline[ix];
      iy++;
      break;
    }
  }
  line[iy] = '\0';

  /* If the line is terminated by CR-LF, remove, the CR.                      */
  if( iy >= 2 && line[iy - 2] == '\r' )
  {
    iy--;
    line[iy - 1] = line[iy - 0];
    line[iy] = '\0';
  }
  maxcc = iy;                   /* Save the current line length.              */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x420, %rsp            # imm = 0x420
callq 0x86b0
movb $0x0, 0x170a9(%rip)     # 0x1b0d0
movb $0x0, 0x16c82(%rip)     # 0x1acb0
cmpq $0x0, 0x16042(%rip)     # 0x1a078
je 0x40ca
movq 0x16035(%rip), %rax     # 0x1a078
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x40ca
movq $0x0, 0x16022(%rip) # 0x1a078
movq $0x0, -0x10(%rbp)
cmpq $0xfa, -0x10(%rbp)
jge 0x4092
movq -0x10(%rbp), %rcx
leaq 0x16c6d(%rip), %rax     # 0x1ace0
movb (%rax,%rcx), %dl
movq -0x10(%rbp), %rcx
leaq 0x1683f(%rip), %rax     # 0x1a8c0
movb %dl, (%rax,%rcx)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x405e
movq 0x1702f(%rip), %rax     # 0x1b0c8
movq %rax, 0x16c28(%rip)     # 0x1acc8
movq %rax, 0x16c29(%rip)     # 0x1acd0
leaq 0x16812(%rip), %rdi     # 0x1a8c0
callq 0x20b0
movq %rax, 0x1701e(%rip)     # 0x1b0d8
movq $0x1, 0x167cb(%rip) # 0x1a890
jmp 0x4542
movq $0x0, 0x16bfb(%rip) # 0x1acd0
movq $0x0, 0x16be8(%rip) # 0x1acc8
cmpq $0x0, 0x15f90(%rip)     # 0x1a078
je 0x42fe
movq $0x0, 0x16fdf(%rip) # 0x1b0d8
movq 0x15f78(%rip), %rax     # 0x1a078
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0x15f6a(%rip)     # 0x1a078
movb (%rax), %al
movb %al, -0x19(%rbp)
callq 0x2190
movq (%rax), %rax
movsbl -0x19(%rbp), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x200, %eax            # imm = 0x200
cmpl $0x0, %eax
je 0x4284
movsbl -0x19(%rbp), %eax
subl $0x61, %eax
cltq
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rcx
leaq 0xab44(%rip), %rax      # 0xec90
movslq (%rax,%rcx,4), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x4282
jmp 0x4161
movq -0x18(%rbp), %rcx
movq %rcx, %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
leaq 0x16b69(%rip), %rax     # 0x1ace0
movb (%rax,%rcx), %dl
movq 0x16f57(%rip), %rcx     # 0x1b0d8
movq %rcx, %rax
addq $0x1, %rax
movq %rax, 0x16f49(%rip)     # 0x1b0d8
leaq 0x1672a(%rip), %rax     # 0x1a8c0
movb %dl, (%rax,%rcx)
movq -0x18(%rbp), %rcx
leaq 0x16b3c(%rip), %rax     # 0x1ace0
movsbl (%rax,%rcx), %ecx
xorl %eax, %eax
cmpl $0x2c, %ecx
movb %al, -0x411(%rbp)
je 0x4272
movq -0x18(%rbp), %rcx
leaq 0x16b1c(%rip), %rax     # 0x1ace0
movsbl (%rax,%rcx), %ecx
xorl %eax, %eax
cmpl $0x20, %ecx
movb %al, -0x411(%rbp)
je 0x4272
movq -0x18(%rbp), %rcx
leaq 0x16afc(%rip), %rax     # 0x1ace0
movsbl (%rax,%rcx), %ecx
xorl %eax, %eax
cmpl $0x9, %ecx
movb %al, -0x411(%rbp)
je 0x4272
movq -0x18(%rbp), %rcx
leaq 0x16ae0(%rip), %rax     # 0x1ace0
movsbl (%rax,%rcx), %ecx
xorl %eax, %eax
cmpl $0xc, %ecx
movb %al, -0x411(%rbp)
je 0x4272
movq -0x18(%rbp), %rcx
leaq 0x16ac4(%rip), %rax     # 0x1ace0
movsbl (%rax,%rcx), %ecx
xorl %eax, %eax
cmpl $0x3e, %ecx
movb %al, -0x411(%rbp)
je 0x4272
movq -0x18(%rbp), %rcx
leaq 0x16aa8(%rip), %rax     # 0x1ace0
movsbl (%rax,%rcx), %ecx
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0x412(%rbp)
je 0x4264
movq -0x18(%rbp), %rcx
leaq 0x16a8c(%rip), %rax     # 0x1ace0
movsbl (%rax,%rcx), %eax
cmpl $0xa, %eax
sete %al
movb %al, -0x412(%rbp)
movb -0x412(%rbp), %al
xorb $-0x1, %al
movb %al, -0x411(%rbp)
movb -0x411(%rbp), %al
testb $0x1, %al
jne 0x4161
jmp 0x4282
jmp 0x42a6
movb -0x19(%rbp), %dl
movq 0x16e4a(%rip), %rcx     # 0x1b0d8
movq %rcx, %rax
addq $0x1, %rax
movq %rax, 0x16e3c(%rip)     # 0x1b0d8
leaq 0x1661d(%rip), %rax     # 0x1a8c0
movb %dl, (%rax,%rcx)
jmp 0x42a8
movsbl -0x19(%rbp), %ecx
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0x413(%rbp)
je 0x42c9
movsbl -0x19(%rbp), %eax
cmpl $0xa, %eax
sete %al
movb %al, -0x413(%rbp)
movb -0x413(%rbp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x40f9
movq 0x16df8(%rip), %rcx     # 0x1b0d8
leaq 0x165d9(%rip), %rax     # 0x1a8c0
movb $0x0, (%rax,%rcx)
movzbl 0xaa40(%rip), %eax      # 0xed32
movq %rax, 0x16597(%rip)     # 0x1a890
jmp 0x4542
movl 0x16598(%rip), %eax     # 0x1a89c
addl $0x1, %eax
movl %eax, 0x1658f(%rip)     # 0x1a89c
movq $0x0, 0x16578(%rip) # 0x1a890
leaq -0x410(%rbp), %rdi
movq 0x14c12(%rip), %rdx     # 0x18f38
movl $0xf9, %esi
callq 0x20e0
cmpq $0x0, %rax
jne 0x43e8
movl 0x16578(%rip), %eax     # 0x1a8b8
addl $0x1, %eax
movl %eax, 0x1656f(%rip)     # 0x1a8b8
movl 0x16569(%rip), %eax     # 0x1a8b8
cmpl 0xa9cb(%rip), %eax      # 0xed20
jge 0x43d1
movq 0x14bda(%rip), %rdi     # 0x18f38
callq 0x20a0
movq 0xa9be(%rip), %rax      # 0xed28
movslq 0x16547(%rip), %rcx     # 0x1a8b8
movq (%rax,%rcx,8), %rdi
leaq 0x5ec8(%rip), %rsi      # 0xa244
callq 0x2150
movq %rax, 0x14bb0(%rip)     # 0x18f38
cmpq $0x0, %rax
jne 0x43cc
movq 0x8c63(%rip), %rax      # 0xcff8
movq (%rax), %rdi
movq 0xa989(%rip), %rax      # 0xed28
movq (%rax), %rdx
movq 0xa97f(%rip), %rax      # 0xed28
movslq 0x16508(%rip), %rcx     # 0x1a8b8
movq (%rax,%rcx,8), %rcx
leaq 0x645a(%rip), %rsi      # 0xa815
movb $0x0, %al
callq 0x2110
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x2180
jmp 0x4318
movb $0x24, -0x410(%rbp)
movb $0xa, -0x40f(%rbp)
movb $0x0, -0x40e(%rbp)
jmp 0x43e8
movb $0x0, -0x1(%rbp)
movq $0x0, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x10(%rbp), %rax
movsbl -0x410(%rbp,%rax), %eax
cmpl $0x0, %eax
je 0x44ca
movq -0x10(%rbp), %rax
movsbl -0x410(%rbp,%rax), %eax
movl %eax, -0x418(%rbp)
subl $0x9, %eax
je 0x4437
jmp 0x442a
movl -0x418(%rbp), %eax
subl $0xc, %eax
je 0x446a
jmp 0x4492
jmp 0x4439
movq -0x18(%rbp), %rcx
leaq 0x1647c(%rip), %rax     # 0x1a8c0
movb $0x20, (%rax,%rcx)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl $0x8, %ecx
cqto
idivq %rcx
cmpq $0x0, %rdx
jne 0x4439
jmp 0x44b7
cmpb $0x0, -0x1(%rbp)
jne 0x448c
movzbl 0x16431(%rip), %eax     # 0x1a8a8
cmpl $0x0, %eax
je 0x448c
leaq 0x16c7d(%rip), %rdi     # 0x1b100
xorl %eax, %eax
movl %eax, %esi
callq 0x86e0
movb $0x1, -0x1(%rbp)
jmp 0x44b7
movq -0x10(%rbp), %rax
movb -0x410(%rbp,%rax), %dl
movq -0x18(%rbp), %rcx
leaq 0x16418(%rip), %rax     # 0x1a8c0
movb %dl, (%rax,%rcx)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x44b9
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x43fc
movq -0x18(%rbp), %rcx
leaq 0x163eb(%rip), %rax     # 0x1a8c0
movb $0x0, (%rax,%rcx)
cmpq $0x2, -0x18(%rbp)
jl 0x4537
movq -0x18(%rbp), %rcx
subq $0x2, %rcx
leaq 0x163d1(%rip), %rax     # 0x1a8c0
movsbl (%rax,%rcx), %eax
cmpl $0xd, %eax
jne 0x4537
movq -0x18(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rcx
subq $0x0, %rcx
leaq 0x163ad(%rip), %rax     # 0x1a8c0
movb (%rax,%rcx), %dl
movq -0x18(%rbp), %rcx
subq $0x1, %rcx
leaq 0x1639b(%rip), %rax     # 0x1a8c0
movb %dl, (%rax,%rcx)
movq -0x18(%rbp), %rcx
leaq 0x1638d(%rip), %rax     # 0x1a8c0
movb $0x0, (%rax,%rcx)
movq -0x18(%rbp), %rax
movq %rax, 0x16b96(%rip)     # 0x1b0d8
addq $0x420, %rsp            # imm = 0x420
popq %rbp
retq
nopl (%rax,%rax)