// File: /workspace/github_c_makefile_star2_O0/AK6DN[P]dec-utilities-for-pdp/macro8x/macro8x.c
// Function: printMemoryMap
void printMemoryMap()
{
  WORD32 loc;
  int i, j, k;

  page_lineno = 0;
  list_lineno = 0;

  /* loop from loc 0 to maximum address used */
  for( loc = 0; loc <= memory_max; )
  {

    /* force a new page halfway thru the field */
    if( (loc & 03777) == 00000 ) page_lineno = LIST_LINES_PER_PAGE;
    if( page_lineno >= LIST_LINES_PER_PAGE )
    {
      topOfForm( list_title, s_memmap );
    }

    /* print two halves of a page over two lines */
    for( i = 0; i < 2; ++i )
    {
      page_lineno++;
      list_lineno++;
      fprintf( listfile, "%5d %05o/", list_lineno, (unsigned)loc );
      /* print 8 groups per line */
      for( j = 0; j < 8; ++j )
      {
	fprintf( listfile, " " );
	/* print 8 words per group */
	for( k = 0; k < 8; ++k )
	{
	  fprintf( listfile, "%c", memory_map[loc++] ? 'X' : '.');
	}
      }
      fprintf( listfile, "\n" );
    }

    page_lineno++;
    list_lineno++;
    fprintf( listfile, "%5d\n", list_lineno );
  }

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl $0x0, 0x16a3a(%rip)     # 0x1a8ac
movl $0x0, 0x16a28(%rip)     # 0x1a8a4
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq 0x14f69(%rip), %rax     # 0x18df8
jg 0x4002
movq -0x8(%rbp), %rax
andq $0x7ff, %rax            # imm = 0x7FF
cmpq $0x0, %rax
jne 0x3eaf
movl $0x3c, 0x169fd(%rip)    # 0x1a8ac
cmpl $0x3c, 0x169f6(%rip)    # 0x1a8ac
jl 0x3ecb
leaq 0x17241(%rip), %rdi     # 0x1b100
leaq 0xaa9a(%rip), %rsi      # 0xe960
callq 0x86e0
movl $0x0, -0xc(%rbp)
cmpl $0x2, -0xc(%rbp)
jge 0x3fc4
movl 0x169ca(%rip), %eax     # 0x1a8ac
addl $0x1, %eax
movl %eax, 0x169c1(%rip)     # 0x1a8ac
movl 0x169b3(%rip), %eax     # 0x1a8a4
addl $0x1, %eax
movl %eax, 0x169aa(%rip)     # 0x1a8a4
movq 0x1501f(%rip), %rdi     # 0x18f20
movl 0x1699d(%rip), %edx     # 0x1a8a4
movq -0x8(%rbp), %rax
movl %eax, %ecx
leaq 0x6a42(%rip), %rsi      # 0xa956
movb $0x0, %al
callq 0x2110
movl $0x0, -0x10(%rbp)
cmpl $0x8, -0x10(%rbp)
jge 0x3fa1
movq 0x14ff1(%rip), %rdi     # 0x18f20
leaq 0x6904(%rip), %rsi      # 0xa83a
movb $0x0, %al
callq 0x2110
movl $0x0, -0x14(%rbp)
cmpl $0x8, -0x14(%rbp)
jge 0x3f94
movq 0x14fcf(%rip), %rdi     # 0x18f20
movq -0x8(%rbp), %rcx
movq %rcx, %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
leaq 0xce89(%rip), %rax      # 0x10df0
movzbl (%rax,%rcx), %ecx
movl $0x2e, %edx
movl $0x58, %eax
cmpl $0x0, %ecx
cmovnel %eax, %edx
leaq 0x69de(%rip), %rsi      # 0xa960
movb $0x0, %al
callq 0x2110
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x3f44
jmp 0x3f96
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x3f22
movq 0x14f78(%rip), %rdi     # 0x18f20
leaq 0x687a(%rip), %rsi      # 0xa829
movb $0x0, %al
callq 0x2110
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x3ed2
movl 0x168e2(%rip), %eax     # 0x1a8ac
addl $0x1, %eax
movl %eax, 0x168d9(%rip)     # 0x1a8ac
movl 0x168cb(%rip), %eax     # 0x1a8a4
addl $0x1, %eax
movl %eax, 0x168c2(%rip)     # 0x1a8a4
movq 0x14f37(%rip), %rdi     # 0x18f20
movl 0x168b5(%rip), %edx     # 0x1a8a4
leaq 0x696d(%rip), %rsi      # 0xa963
movb $0x0, %al
callq 0x2110
jmp 0x3e84
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)