// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/crossassemblers/macro11/dumpobj.c
// Function: dump_words
void dump_words(
    unsigned addr,
    char *buf,
    int len)
{
    int             i,
                    j;

    for (i = 0; i < len; i += 8) {
        printf("\t%6.6o: ", addr);

        for (j = i; j < len && j < i + 8; j += 2)
            if (len - j >= 2) {
                unsigned        word = WORD(buf + j);

                printf("%6.6o ", word);
            } else
                printf("%3.3o    ", buf[j] & 0xff);

        printf("%*s", (i + 8 - j) * 7 / 2, "");

        for (j = i; j < len && j < i + 8; j++) {
            int             c = buf[j] & 0xff;

            if (!isprint(c))
                c = '.';
            putchar(c);
        }

        putchar('\n');
        addr += 8;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x177e
movl -0x4(%rbp), %esi
leaq 0x1b7b(%rip), %rdi      # 0x318a
movb $0x0, %al
callq 0x10b0
movl -0x18(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %ecx
xorl %eax, %eax
cmpl -0x14(%rbp), %ecx
movb %al, -0x25(%rbp)
jge 0x163a
movl -0x1c(%rbp), %eax
movl -0x18(%rbp), %ecx
addl $0x8, %ecx
cmpl %ecx, %eax
setl %al
movb %al, -0x25(%rbp)
movb -0x25(%rbp), %al
testb $0x1, %al
jne 0x1643
jmp 0x16bd
movl -0x14(%rbp), %eax
subl -0x1c(%rbp), %eax
cmpl $0x2, %eax
jl 0x168d
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movsbl (%rax,%rcx), %eax
andl $0xff, %eax
movq -0x10(%rbp), %rcx
movslq -0x1c(%rbp), %rdx
movsbl 0x1(%rcx,%rdx), %ecx
andl $0xff, %ecx
shll $0x8, %ecx
addl %ecx, %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %esi
leaq 0x1b0f(%rip), %rdi      # 0x3193
movb $0x0, %al
callq 0x10b0
jmp 0x16ad
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movsbl (%rax,%rcx), %esi
andl $0xff, %esi
leaq 0x1af4(%rip), %rdi      # 0x319a
movb $0x0, %al
callq 0x10b0
jmp 0x16af
movl -0x1c(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x1c(%rbp)
jmp 0x161c
movl -0x18(%rbp), %eax
addl $0x8, %eax
subl -0x1c(%rbp), %eax
imull $0x7, %eax, %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %esi
leaq 0x1aac(%rip), %rdi      # 0x3186
leaq 0x1a09(%rip), %rdx      # 0x30ea
movb $0x0, %al
callq 0x10b0
movl -0x18(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %ecx
xorl %eax, %eax
cmpl -0x14(%rbp), %ecx
movb %al, -0x26(%rbp)
jge 0x170c
movl -0x1c(%rbp), %eax
movl -0x18(%rbp), %ecx
addl $0x8, %ecx
cmpl %ecx, %eax
setl %al
movb %al, -0x26(%rbp)
movb -0x26(%rbp), %al
testb $0x1, %al
jne 0x1715
jmp 0x175d
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movsbl (%rax,%rcx), %eax
andl $0xff, %eax
movl %eax, -0x24(%rbp)
callq 0x1190
movq (%rax), %rax
movslq -0x24(%rbp), %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x4000, %eax           # imm = 0x4000
cmpl $0x0, %eax
jne 0x174a
movl $0x2e, -0x24(%rbp)
movl -0x24(%rbp), %edi
callq 0x1040
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x16ee
movl $0xa, %edi
callq 0x1040
movl -0x4(%rbp), %eax
addl $0x8, %eax
movl %eax, -0x4(%rbp)
movl -0x18(%rbp), %eax
addl $0x8, %eax
movl %eax, -0x18(%rbp)
jmp 0x15f9
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)