// File: /workspace/github_c_makefile_star2_O2/AK6DN[P]dec-utilities-for-pdp/palbart/palbart.c
// Function: printCrossReference
void printCrossReference()
{
  int    ix;
  int    symbol_base;
  int    xc;
  int    xc_index;
  int    xc_refcount;
  int    xc_cols;

  /* Force top of form for first page.                                        */
  page_lineno = LIST_LINES_PER_PAGE;

  list_lineno = 0;
  symbol_base = number_of_fixed_symbols;

  for( ix = symbol_base; ix < symbol_top; ix++ )
  {
    list_lineno++;
    page_lineno++;
    if( page_lineno >= LIST_LINES_PER_PAGE )
    {
      topOfForm( list_title, s_xref );
    }

    fprintf( listfile, "%5d", list_lineno );

    /* Get reference count & index into concordance table for this symbol.    */
    xc_refcount = symtab[ix].xref_count;
    xc_index = symtab[ix].xref_index;
    /* Determine how to label symbol on concordance.                          */
    switch( symtab[ix].type & ( DEFINED | REDEFINED ))
    {
    case UNDEFINED:
      fprintf( listfile, " U         ");
      break;

    case REDEFINED:
      fprintf( listfile, " M  %5d  ", xreftab[xc_index] );
      break;

    default:
      fprintf( listfile, " A  %5d  ", xreftab[xc_index] );
      break;
    }
    fprintf( listfile, "%-6.6s  ", symtab[ix].name );

    /* Output the references, 8 numbers per line after symbol name.           */
    for( xc_cols = 0, xc = 1; xc < xc_refcount + 1; xc++, xc_cols++ )
    {
      if( xc_cols >= XREF_COLUMNS )
      {
        xc_cols = 0;
        page_lineno++;
        if( page_lineno >= LIST_LINES_PER_PAGE )
        {
          topOfForm( list_title, s_xref);
        }
        list_lineno++;
        fprintf( listfile, "\n%5d%-19s", list_lineno, " " );
      }
      fprintf( listfile, "  %5d", xreftab[xc_index + xc] );
    }
    fprintf( listfile, "\n" );
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
andl $0x0, 0xa1b1(%rip)      # 0xd764
movl $0x37, 0x7e47(%rip)     # 0xb404
movslq 0x7e30(%rip), %rbx      # 0xb3f4
leaq 0x4432(%rip), %r12      # 0x79fd
leaq 0x432b(%rip), %r15      # 0x78fd
leaq 0x442e(%rip), %r13      # 0x7a07
movslq 0x7e10(%rip), %rax      # 0xb3f0
cmpq %rax, %rbx
jge 0x3774
movl 0xa175(%rip), %edx      # 0xd764
incl %edx
movl %edx, 0xa16d(%rip)      # 0xd764
movl 0x7e07(%rip), %eax      # 0xb404
leal 0x1(%rax), %ecx
movl %ecx, 0x7dfe(%rip)      # 0xb404
cmpl $0x36, %eax
jl 0x3624
leaq 0xa22e(%rip), %rdi      # 0xd840
leaq 0x7ac7(%rip), %rsi      # 0xb0e0
callq 0x5caf
movl 0xa140(%rip), %edx      # 0xd764
movq 0x7f05(%rip), %rdi      # 0xb530
leaq 0x43d7(%rip), %rsi      # 0x7a09
xorl %eax, %eax
callq 0x2110
movq 0x7da8(%rip), %rcx      # 0xb3e8
movq %rbx, (%rsp)
imulq $0x18, %rbx, %r14
movl (%rcx,%r14), %eax
movl 0x14(%rcx,%r14), %ebp
movslq 0x10(%rcx,%r14), %rbx
andl $0x11, %eax
movq 0x7ed0(%rip), %rcx      # 0xb530
cmpl $0x11, %eax
je 0x367d
testl %eax, %eax
jne 0x3694
leaq 0x4364(%rip), %rdi      # 0x79d4
pushq $0xb
popq %rsi
pushq $0x1
popq %rdx
callq 0x2180
jmp 0x36b0
movq 0x7ebc(%rip), %rax      # 0xb540
movswl (%rax,%rbx,2), %edx
movq %rcx, %rdi
leaq 0x434e(%rip), %rsi      # 0x79e0
jmp 0x36a9
movq 0x7ea5(%rip), %rax      # 0xb540
movswl (%rax,%rbx,2), %edx
movq %rcx, %rdi
leaq 0x4341(%rip), %rsi      # 0x79ea
xorl %eax, %eax
callq 0x2110
movq 0x7e79(%rip), %rdi      # 0xb530
movq 0x7d2a(%rip), %rax      # 0xb3e8
leaq (%rax,%r14), %rdx
addq $0x4, %rdx
xorl %r14d, %r14d
leaq 0x4324(%rip), %rsi      # 0x79f4
xorl %eax, %eax
callq 0x2110
testl %ebp, %ebp
cmovlel %r14d, %ebp
incq %rbx
subq $0x1, %rbp
jb 0x3759
cmpl $0x8, %r14d
jl 0x3738
movl 0x7d12(%rip), %eax      # 0xb404
leal 0x1(%rax), %ecx
movl %ecx, 0x7d09(%rip)      # 0xb404
cmpl $0x36, %eax
jl 0x3713
leaq 0xa139(%rip), %rdi      # 0xd840
leaq 0x79d2(%rip), %rsi      # 0xb0e0
callq 0x5caf
movl 0xa04b(%rip), %edx      # 0xd764
incl %edx
movl %edx, 0xa043(%rip)      # 0xd764
movq 0x7e08(%rip), %rdi      # 0xb530
xorl %r14d, %r14d
movq %r12, %rsi
movq %r15, %rcx
xorl %eax, %eax
callq 0x2110
movq 0x7df1(%rip), %rdi      # 0xb530
movq 0x7dfa(%rip), %rax      # 0xb540
movswl (%rax,%rbx,2), %edx
movq %r13, %rsi
xorl %eax, %eax
callq 0x2110
incl %r14d
jmp 0x36dd
movq 0x7dd0(%rip), %rsi      # 0xb530
pushq $0xa
popq %rdi
callq 0x20d0
movq (%rsp), %rbx
incq %rbx
jmp 0x35d9
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq