// File: /workspace/github_c_makefile_star2_O3/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, 0x7ba0(%rip)     # 0xb414
movl $0x0, 0x9ef6(%rip)      # 0xd774
movslq 0x7b7f(%rip), %r13      # 0xb404
cmpl 0x7b74(%rip), %r13d     # 0xb400
jge 0x3a3e
leaq 0x4064(%rip), %r12      # 0x78fd
leaq 0x4167(%rip), %r15      # 0x7a07
movl 0x9ece(%rip), %edx      # 0xd774
incl %edx
movl %edx, 0x9ec6(%rip)      # 0xd774
movl 0x7b60(%rip), %eax      # 0xb414
leal 0x1(%rax), %ecx
movl %ecx, 0x7b57(%rip)      # 0xb414
cmpl $0x36, %eax
jl 0x38db
leaq 0x9f87(%rip), %rdi      # 0xd850
leaq 0x7820(%rip), %rsi      # 0xb0f0
callq 0x680d
movl 0x9e99(%rip), %edx      # 0xd774
movq 0x7c5e(%rip), %rdi      # 0xb540
leaq 0x4120(%rip), %rsi      # 0x7a09
xorl %eax, %eax
callq 0x2120
movq 0x7b01(%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 0x7c28(%rip), %rcx      # 0xb540
cmpl $0x11, %eax
je 0x3939
testl %eax, %eax
jne 0x3951
movl $0xb, %esi
movl $0x1, %edx
leaq 0x40a2(%rip), %rdi      # 0x79d4
callq 0x21a0
jmp 0x396e
movq 0x7c10(%rip), %rax      # 0xb550
movswl (%rax,%r14,2), %edx
movq %rcx, %rdi
leaq 0x4091(%rip), %rsi      # 0x79e0
jmp 0x3967
movq 0x7bf8(%rip), %rax      # 0xb550
movswl (%rax,%r14,2), %edx
movq %rcx, %rdi
leaq 0x4083(%rip), %rsi      # 0x79ea
xorl %eax, %eax
callq 0x2120
movq 0x7bcb(%rip), %rdi      # 0xb540
movq 0x7a7c(%rip), %rax      # 0xb3f8
leaq (%rax,%rbp,8), %rdx
addq $0x4, %rdx
leaq 0x4069(%rip), %rsi      # 0x79f4
xorl %eax, %eax
callq 0x2120
testl %ebx, %ebx
jle 0x3a1a
incq %r14
xorl %ebp, %ebp
cmpl $0x8, %ebp
jl 0x39f3
movl 0x7a6a(%rip), %eax      # 0xb414
leal 0x1(%rax), %ecx
movl %ecx, 0x7a61(%rip)      # 0xb414
cmpl $0x36, %eax
jl 0x39cb
leaq 0x9e91(%rip), %rdi      # 0xd850
leaq 0x772a(%rip), %rsi      # 0xb0f0
callq 0x680d
movl 0x9da3(%rip), %edx      # 0xd774
incl %edx
movl %edx, 0x9d9b(%rip)      # 0xd774
movq 0x7b60(%rip), %rdi      # 0xb540
xorl %ebp, %ebp
leaq 0x4014(%rip), %rsi      # 0x79fd
movq %r12, %rcx
xorl %eax, %eax
callq 0x2120
movq 0x7b46(%rip), %rdi      # 0xb540
movq 0x7b4f(%rip), %rax      # 0xb550
movswl (%rax,%r14,2), %edx
movq %r15, %rsi
xorl %eax, %eax
callq 0x2120
incl %ebp
incq %r14
decq %rbx
jne 0x399f
movq 0x7b1f(%rip), %rsi      # 0xb540
movl $0xa, %edi
callq 0x20e0
incq %r13
movslq 0x79cb(%rip), %rax      # 0xb400
cmpq %rax, %r13
jl 0x38a0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq