// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movl $0x37, 0x9652(%rip)     # 0xd474
movl $0x0, 0xb9a8(%rip)      # 0xf7d4
movl 0x9632(%rip), %eax      # 0xd464
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
cmpl 0x961c(%rip), %eax      # 0xd460
jge 0x4068
movl 0xb984(%rip), %eax      # 0xf7d4
addl $0x1, %eax
movl %eax, 0xb97b(%rip)      # 0xf7d4
movl 0x9615(%rip), %eax      # 0xd474
addl $0x1, %eax
movl %eax, 0x960c(%rip)      # 0xd474
cmpl $0x37, 0x9605(%rip)     # 0xd474
jl 0x3e84
leaq 0xba38(%rip), %rdi      # 0xf8b0
leaq 0x9261(%rip), %rsi      # 0xd0e0
callq 0x7fe0
movq 0x9715(%rip), %rdi      # 0xd5a0
movl 0xb943(%rip), %edx      # 0xf7d4
leaq 0x5cad(%rip), %rsi      # 0x9b45
xorl %eax, %eax
callq 0x2120
movq 0x95b2(%rip), %rax      # 0xd458
movslq -0x4(%rbp), %rcx
leaq (%rcx,%rcx,2), %rcx
movl 0x14(%rax,%rcx,8), %eax
movl %eax, -0x14(%rbp)
movq 0x959c(%rip), %rax      # 0xd458
movslq -0x4(%rbp), %rcx
leaq (%rcx,%rcx,2), %rcx
movl 0x10(%rax,%rcx,8), %eax
movl %eax, -0x10(%rbp)
movq 0x9586(%rip), %rax      # 0xd458
movslq -0x4(%rbp), %rcx
leaq (%rcx,%rcx,2), %rcx
movl (%rax,%rcx,8), %eax
andl $0x11, %eax
movl %eax, -0x1c(%rbp)
je 0x3ef1
jmp 0x3ee7
movl -0x1c(%rbp), %eax
subl $0x11, %eax
je 0x3f08
jmp 0x3f2e
movq 0x96a8(%rip), %rdi      # 0xd5a0
leaq 0x5c11(%rip), %rsi      # 0x9b10
movb $0x0, %al
callq 0x2120
jmp 0x3f52
movq 0x9691(%rip), %rdi      # 0xd5a0
movq 0x969a(%rip), %rax      # 0xd5b0
movslq -0x10(%rbp), %rcx
movswl (%rax,%rcx,2), %edx
leaq 0x5bf7(%rip), %rsi      # 0x9b1c
movb $0x0, %al
callq 0x2120
jmp 0x3f52
movq 0x966b(%rip), %rdi      # 0xd5a0
movq 0x9674(%rip), %rax      # 0xd5b0
movslq -0x10(%rbp), %rcx
movswl (%rax,%rcx,2), %edx
leaq 0x5bdb(%rip), %rsi      # 0x9b26
movb $0x0, %al
callq 0x2120
movq 0x9647(%rip), %rdi      # 0xd5a0
movq 0x94f8(%rip), %rdx      # 0xd458
movslq -0x4(%rbp), %rax
imulq $0x18, %rax, %rax
addq %rax, %rdx
addq $0x4, %rdx
leaq 0x5bba(%rip), %rsi      # 0x9b30
movb $0x0, %al
callq 0x2120
movl $0x0, -0x18(%rbp)
movl $0x1, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jge 0x4045
cmpl $0x8, -0x18(%rbp)
jl 0x4005
movl $0x0, -0x18(%rbp)
movl 0x94c5(%rip), %eax      # 0xd474
addl $0x1, %eax
movl %eax, 0x94bc(%rip)      # 0xd474
cmpl $0x37, 0x94b5(%rip)     # 0xd474
jl 0x3fd4
leaq 0xb8e8(%rip), %rdi      # 0xf8b0
leaq 0x9111(%rip), %rsi      # 0xd0e0
callq 0x7fe0
movl 0xb7fa(%rip), %eax      # 0xf7d4
addl $0x1, %eax
movl %eax, 0xb7f1(%rip)      # 0xf7d4
movq 0x95b6(%rip), %rdi      # 0xd5a0
movl 0xb7e4(%rip), %edx      # 0xf7d4
leaq 0x5b42(%rip), %rsi      # 0x9b39
leaq 0x5a3b(%rip), %rcx      # 0x9a39
movb $0x0, %al
callq 0x2120
movq 0x9594(%rip), %rdi      # 0xd5a0
movq 0x959d(%rip), %rax      # 0xd5b0
movl -0x10(%rbp), %ecx
addl -0xc(%rbp), %ecx
movslq %ecx, %rcx
movswl (%rax,%rcx,2), %edx
leaq 0x5b1c(%rip), %rsi      # 0x9b43
movb $0x0, %al
callq 0x2120
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x3f8b
movq 0x9554(%rip), %rdi      # 0xd5a0
leaq 0x57ce(%rip), %rsi      # 0x9821
movb $0x0, %al
callq 0x2120
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x3e3b
addq $0x20, %rsp
popq %rbp
retq
nop