// File: /workspace/github_c_makefile_star2_O2/AK6DN[P]dec-utilities-for-pdp/palbart/palbart.c
// Function: printSymbolTable
void printSymbolTable()
{
  int    col;
  int    cx;
  char  *fmt;
  int    ix;
  char   mark;
  int    page;
  int    row;
  int    symbol_base;
  int    symbol_lines;

  symbol_base = number_of_fixed_symbols;

  for( page=0, list_lineno=0, col=0, ix=symbol_base; ix < symbol_top; page++ )
  {
    topOfForm( list_title, s_symtable );
    symbol_lines = LIST_LINES_PER_PAGE - page_lineno;

    for( row = 0; page_lineno < LIST_LINES_PER_PAGE && ix < symbol_top; row++)
    {
      list_lineno++;
      page_lineno++;
      fprintf( listfile, "%5d", list_lineno );

      for( col = 0; col < SYMBOL_COLUMNS && ix < symbol_top; col++ )
      {
        /* Get index of symbol for the current line and column                         */
        cx = symbol_lines * ( SYMBOL_COLUMNS * page + col ) + row;
        cx += symbol_base;

        /* Make sure that there is a symbol to be printed.                    */
        if( number_of_fixed_symbols <= cx && cx < symbol_top )
        {
          switch( symtab[cx].type & LABEL )
          {
          case LABEL:
            fmt = " %c%-6.6s %5.5o ";
            break;

          default:
            fmt = " %c%-6.6s  %4.4o ";
            break;
          }

          switch( symtab[cx].type & ( DEFINED | REDEFINED ))
          {
          case UNDEFINED:
            mark = '?';
            break;

          case REDEFINED:
            mark = '#';
            break;

          default:
            mark = ' ';
            break;
          }
          fprintf( listfile, fmt, mark, symtab[cx].name, symtab[cx].val );
          ix++;
        }
      }
      fprintf( listfile, "\n" );
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
andl $0x0, 0xa486(%rip)      # 0xd764
movl 0x810f(%rip), %r12d     # 0xb3f4
movl 0x8105(%rip), %ecx      # 0xb3f0
leaq 0x4679(%rip), %r14      # 0x796b
pushq $0x3f
popq %r13
movl $0x0, 0xc(%rsp)
movl %r12d, 0x10(%rsp)
cmpl %ecx, %r12d
jge 0x3444
leaq 0xa52d(%rip), %rdi      # 0xd840
leaq 0x7dac(%rip), %rsi      # 0xb0c6
callq 0x5caf
movl 0x80df(%rip), %eax      # 0xb404
pushq $0x37
popq %r15
subl %eax, %r15d
movl 0xc(%rsp), %ebp
imull %r15d, %ebp
addl 0x10(%rsp), %ebp
movl 0x80b2(%rip), %ecx      # 0xb3f0
cmpl $0x36, %eax
jg 0x343a
cmpl %ecx, %r12d
jge 0x343a
movl 0xa40e(%rip), %edx      # 0xd764
incl %edx
movl %edx, 0xa406(%rip)      # 0xd764
incl %eax
movl %eax, 0x809e(%rip)      # 0xb404
movq 0x81c3(%rip), %rdi      # 0xb530
leaq 0x4695(%rip), %rsi      # 0x7a09
xorl %eax, %eax
callq 0x2110
movl 0x806f(%rip), %eax      # 0xb3f0
movl %ebp, 0x14(%rsp)
xorl %ebx, %ebx
cmpq $0x4, %rbx
ja 0x341a
cmpl %eax, %r12d
jge 0x341a
cmpl %ebp, 0x8054(%rip)      # 0xb3f4
setle %cl
cmpl %eax, %ebp
setl %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x340f
movq 0x8032(%rip), %rax      # 0xb3e8
movslq %ebp, %rcx
imulq $0x18, %rcx, %rcx
addq %rax, %rcx
addq $0x4, %rcx
movl -0x4(%rcx), %eax
movl %eax, %edx
notl %edx
testb $0x9, %dl
movq %r14, %rsi
leaq 0x4582(%rip), %rdx      # 0x795a
cmoveq %rdx, %rsi
andl $0x11, %eax
xorl %edx, %edx
cmpl $0x11, %eax
sete %dl
leal (%rdx,%rdx,2), %edx
addl $0x20, %edx
testl %eax, %eax
cmovel %r13d, %edx
movq 0x8136(%rip), %rdi      # 0xb530
movswl 0x8(%rcx), %r8d
xorl %eax, %eax
callq 0x2110
incl %r12d
movl 0x7fe1(%rip), %eax      # 0xb3f0
incq %rbx
addl %r15d, %ebp
jmp 0x3387
movq 0x810f(%rip), %rsi      # 0xb530
pushq $0xa
popq %rdi
callq 0x20d0
movl 0x7fd5(%rip), %eax      # 0xb404
movl 0x14(%rsp), %ebp
incl %ebp
jmp 0x3338
addl $0x5, 0xc(%rsp)
jmp 0x3303
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq