// File: /workspace/github_c_makefile_star2_O0/AK6DN[P]dec-utilities-for-pdp/palbart/palbart.c
// Function: printPermanentSymbolTable
void printPermanentSymbolTable()
{
  int     ix;
  FILE   *permfile;
  char  *s_type;

  if(( permfile = fopen( permpathname, "w" )) == NULL )
  {
    exit( 2 );
  }

  fprintf( permfile, "/ PERMANENT SYMBOL TABLE\n/\n" );
  fprintf( permfile, "        EXPUNGE\n/\n" );
  /* Print the memory reference instructions first.                           */
  s_type = "FIXMRI";
  for( ix = 0; ix < symbol_top; ix++ )
  {
    if( M_MRI( symtab[ix].type ))
    {
      fprintf( permfile, "%-7s %s=%4.4o\n",
                                    s_type, symtab[ix].name, symtab[ix].val );
    }
  }

  s_type = " ";
  for( ix = 0; ix < symbol_top; ix++ )
  {
    if( M_FIXED( symtab[ix].type ))
    {
      if( !M_MRI( symtab[ix].type ) && !M_PSEUDO( symtab[ix].type ))
      {
        fprintf( permfile, "%-7s %s=%4.4o\n",
                                    s_type, symtab[ix].name, symtab[ix].val );
      }
    }
  }
  fprintf( permfile, "/\n        FIXTAB\n" );
  fclose( permfile );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
leaq 0x9971(%rip), %rdi      # 0xd5c0
leaq 0x58f0(%rip), %rsi      # 0x9546
callq 0x2150
movq %rax, -0x10(%rbp)
cmpq $0x0, %rax
jne 0x3c6f
movl $0x2, %edi
callq 0x2190
movq -0x10(%rbp), %rdi
leaq 0x5e3f(%rip), %rsi      # 0x9ab9
movb $0x0, %al
callq 0x2120
movq -0x10(%rbp), %rdi
leaq 0x5e49(%rip), %rsi      # 0x9ad5
movb $0x0, %al
callq 0x2120
leaq 0x5e4e(%rip), %rax      # 0x9ae8
movq %rax, -0x18(%rbp)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
cmpl 0x97b2(%rip), %eax      # 0xd460
jge 0x3d1c
movq 0x97a1(%rip), %rax      # 0xd458
movslq -0x4(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
andl $0x5, %eax
cmpl $0x5, %eax
jne 0x3d0f
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
movq 0x977d(%rip), %rcx      # 0xd458
movslq -0x4(%rbp), %rax
imulq $0x18, %rax, %rax
addq %rax, %rcx
addq $0x4, %rcx
movq 0x9767(%rip), %rax      # 0xd458
movslq -0x4(%rbp), %rsi
imulq $0x18, %rsi, %rsi
addq %rsi, %rax
movswl 0xc(%rax), %r8d
leaq 0x5de7(%rip), %rsi      # 0x9aef
movb $0x0, %al
callq 0x2120
jmp 0x3d11
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x3ca5
leaq 0x5d16(%rip), %rax      # 0x9a39
movq %rax, -0x18(%rbp)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
cmpl 0x9729(%rip), %eax      # 0xd460
jge 0x3de6
movq 0x9714(%rip), %rax      # 0xd458
movslq -0x4(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
andl $0x2, %eax
cmpl $0x2, %eax
jne 0x3dd6
movq 0x96f8(%rip), %rax      # 0xd458
movslq -0x4(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
andl $0x5, %eax
cmpl $0x5, %eax
je 0x3dd4
movq 0x96dc(%rip), %rax      # 0xd458
movslq -0x4(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
andl $0x43, %eax
cmpl $0x43, %eax
je 0x3dd4
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
movq 0x96b8(%rip), %rcx      # 0xd458
movslq -0x4(%rbp), %rax
imulq $0x18, %rax, %rax
addq %rax, %rcx
addq $0x4, %rcx
movq 0x96a2(%rip), %rax      # 0xd458
movslq -0x4(%rbp), %rsi
imulq $0x18, %rsi, %rsi
addq %rsi, %rax
movswl 0xc(%rax), %r8d
leaq 0x5d22(%rip), %rsi      # 0x9aef
movb $0x0, %al
callq 0x2120
jmp 0x3dd6
jmp 0x3dd8
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x3d2e
movq -0x10(%rbp), %rdi
leaq 0x5d0d(%rip), %rsi      # 0x9afe
movb $0x0, %al
callq 0x2120
movq -0x10(%rbp), %rdi
callq 0x2090
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)