// File: /workspace/github_c_makefile_star2_O1/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
movl $0x37, 0x7c02(%rip)     # 0xb414
movl $0x0, 0x9f58(%rip)      # 0xd774
movslq 0x7be1(%rip), %r13      # 0xb404
cmpl 0x7bd6(%rip), %r13d     # 0xb400
jge 0x39d4
leaq 0x40c6(%rip), %r12      # 0x78fd
leaq 0x41c9(%rip), %r15      # 0x7a07
incl 0x9f30(%rip)            # 0xd774
movl 0x7bca(%rip), %eax      # 0xb414
leal 0x1(%rax), %ecx
movl %ecx, 0x7bc1(%rip)      # 0xb414
cmpl $0x36, %eax
jl 0x386b
leaq 0x9ff1(%rip), %rdi      # 0xd850
leaq 0x788a(%rip), %rsi      # 0xb0f0
callq 0x681a
movq 0x7cce(%rip), %rdi      # 0xb540
movl 0x9efc(%rip), %edx      # 0xd774
leaq 0x418a(%rip), %rsi      # 0x7a09
xorl %eax, %eax
callq 0x2120
movq 0x7b6b(%rip), %rcx      # 0xb3f8
leaq (,%r13,2), %rbp
addq %r13, %rbp
movl (%rcx,%rbp,8), %eax
movl 0x14(%rcx,%rbp,8), %ebx
movslq 0x10(%rcx,%rbp,8), %r14
andl $0x11, %eax
movq 0x7c92(%rip), %rcx      # 0xb540
cmpl $0x11, %eax
je 0x38cf
testl %eax, %eax
jne 0x38e7
movl $0xb, %esi
movl $0x1, %edx
leaq 0x410c(%rip), %rdi      # 0x79d4
callq 0x21a0
jmp 0x3904
movq 0x7c7a(%rip), %rax      # 0xb550
movswl (%rax,%r14,2), %edx
movq %rcx, %rdi
leaq 0x40fb(%rip), %rsi      # 0x79e0
jmp 0x38fd
movq 0x7c62(%rip), %rax      # 0xb550
movswl (%rax,%r14,2), %edx
movq %rcx, %rdi
leaq 0x40ed(%rip), %rsi      # 0x79ea
xorl %eax, %eax
callq 0x2120
movq 0x7c35(%rip), %rdi      # 0xb540
movq 0x7ae6(%rip), %rax      # 0xb3f8
leaq (%rax,%rbp,8), %rdx
addq $0x4, %rdx
leaq 0x40d3(%rip), %rsi      # 0x79f4
xorl %eax, %eax
callq 0x2120
testl %ebx, %ebx
jle 0x39b0
incq %r14
xorl %ebp, %ebp
cmpl $0x8, %ebp
jl 0x3989
movl 0x7ad4(%rip), %eax      # 0xb414
leal 0x1(%rax), %ecx
movl %ecx, 0x7acb(%rip)      # 0xb414
cmpl $0x36, %eax
jl 0x3961
leaq 0x9efb(%rip), %rdi      # 0xd850
leaq 0x7794(%rip), %rsi      # 0xb0f0
callq 0x681a
movl 0x9e0d(%rip), %edx      # 0xd774
incl %edx
movl %edx, 0x9e05(%rip)      # 0xd774
movq 0x7bca(%rip), %rdi      # 0xb540
xorl %ebp, %ebp
leaq 0x407e(%rip), %rsi      # 0x79fd
movq %r12, %rcx
xorl %eax, %eax
callq 0x2120
movq 0x7bb0(%rip), %rdi      # 0xb540
movq 0x7bb9(%rip), %rax      # 0xb550
movswl (%rax,%r14,2), %edx
movq %r15, %rsi
xorl %eax, %eax
callq 0x2120
incl %ebp
incq %r14
decq %rbx
jne 0x3935
movq 0x7b89(%rip), %rsi      # 0xb540
movl $0xa, %edi
callq 0x20e0
incq %r13
movslq 0x7a35(%rip), %rax      # 0xb400
cmpq %rax, %r13
jl 0x383e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq