// File: besm6[P]pascal-re/dtran.cc
// Function: Dtran::dump_sym(unsigned int, unsigned int)
void dump_sym(uint i, uint offset) {
        uint64 word = memory[i+offset];
        if ((word >> 15) == 0400) {
            uint val = word & 077777;
            // printf("C %5o: absolute %05o\n", i, (uint)word & 077777);
            if (val > 0100000-100)
                symtab[i] = strprintf("-%d", 0100000-val);
            else
                symtab[i] = strprintf(nooctal ? "%d" : "%oB", val);
        } else if ((word >> 15) == 0410) {
            uint off = word & 077777;
            // printf("C %5o: local offset %05o\n", i, off);
            symtab[i] = off < 010000 ?
                              strprintf("*%04oB", off)
                              : strprintf("*%05o", off);
            labels[off] = symtab[i];
        } else {
            if (word >> 42) {
                // The first char is not a space
                symtab[i] = get_text_word(word & 07777777700000000LL);
            } else if ((word & 00000400020000000LL) == 00000400020000000LL) {
                // Long ID
                uint loff = (word >> 24) & 03777;
                symtab[i] = get_text_word(memory[table_off + loff]);
            }
            if ((word & 057777777) == 043000000) {
                printf(" %s:,SUBP,\n", symtab[i].c_str());
            } else if ((word & 057000000) == 047000000) {
                printf(" %s:,LC,%d\n", symtab[i].c_str(),
                       (uint)word & 0777777);
            } else if (((word >> 24) & 077774000) == 04000 &&
                       (word & 077777777) < 0100000) {
                uint sym = (word >> 24) & 03777;
                uint off = word & 077777;
                int ioff = off >= 040000 ? -off : off;
                if (noequs) {
                    symtab[i] = strprintf("%s%+d",
                                          symtab[sym].c_str(), ioff);
                } else {
                    symtab[i] = gak(i);
                    printf(" %s:,EQU,%s%+d\n", symtab[i].c_str(),
                           symtab[sym].c_str(), ioff);
                }
            } else  {
                printf("C %5o: %016llo (%s) dunno\n", i, word, gak(i).c_str());
            }
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x190, %rsp            # imm = 0x190
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x158(%rbp)
movl -0xc(%rbp), %ecx
addl -0x10(%rbp), %ecx
movl %ecx, %ecx
movq 0x48(%rax,%rcx,8), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
shrq $0xf, %rax
cmpq $0x100, %rax            # imm = 0x100
jne 0x5ea3
movq -0x18(%rbp), %rax
andq $0x7fff, %rax           # imm = 0x7FFF
movl %eax, -0x1c(%rbp)
cmpl $0x7f9c, -0x1c(%rbp)    # imm = 0x7F9C
jbe 0x5e44
movl $0x8000, %edx           # imm = 0x8000
subl -0x1c(%rbp), %edx
leaq -0x40(%rbp), %rdi
leaq 0x272b(%rip), %rsi      # 0x8539
movb $0x0, %al
callq 0x34c0
movq -0x158(%rbp), %rdi
addq $0x40048, %rdi          # imm = 0x40048
movl -0xc(%rbp), %eax
movl %eax, %esi
callq 0x6380
movq %rax, %rdi
leaq -0x40(%rbp), %rsi
callq 0x3260
leaq -0x40(%rbp), %rdi
callq 0x3110
jmp 0x5e9e
movq -0x158(%rbp), %rax
movb 0x42(%rax), %cl
leaq 0x28e7(%rip), %rsi      # 0x873c
leaq 0x28db(%rip), %rax      # 0x8737
testb $0x1, %cl
cmovneq %rax, %rsi
movl -0x1c(%rbp), %edx
leaq -0x60(%rbp), %rdi
movb $0x0, %al
callq 0x34c0
movq -0x158(%rbp), %rdi
addq $0x40048, %rdi          # imm = 0x40048
movl -0xc(%rbp), %eax
movl %eax, %esi
callq 0x6380
movq %rax, %rdi
leaq -0x60(%rbp), %rsi
callq 0x3260
leaq -0x60(%rbp), %rdi
callq 0x3110
jmp 0x635d
movq -0x18(%rbp), %rax
shrq $0xf, %rax
cmpq $0x108, %rax            # imm = 0x108
jne 0x5f7d
movq -0x18(%rbp), %rax
andq $0x7fff, %rax           # imm = 0x7FFF
movl %eax, -0x64(%rbp)
cmpl $0x1000, -0x64(%rbp)    # imm = 0x1000
jae 0x5ee7
movl -0x64(%rbp), %edx
leaq -0x88(%rbp), %rdi
leaq 0x265f(%rip), %rsi      # 0x853d
movb $0x0, %al
callq 0x34c0
jmp 0x5eff
movl -0x64(%rbp), %edx
leaq -0x88(%rbp), %rdi
leaq 0x264c(%rip), %rsi      # 0x8544
movb $0x0, %al
callq 0x34c0
movq -0x158(%rbp), %rdi
addq $0x40048, %rdi          # imm = 0x40048
movl -0xc(%rbp), %eax
movl %eax, %esi
callq 0x6380
movq %rax, %rdi
leaq -0x88(%rbp), %rsi
callq 0x3260
leaq -0x88(%rbp), %rdi
callq 0x3110
movq -0x158(%rbp), %rdi
addq $0x40048, %rdi          # imm = 0x40048
movl -0xc(%rbp), %eax
movl %eax, %esi
callq 0x6380
movq -0x158(%rbp), %rdi
movq %rax, -0x160(%rbp)
addq $0x40060, %rdi          # imm = 0x40060
movl -0x64(%rbp), %eax
movl %eax, %esi
callq 0x6380
movq -0x160(%rbp), %rsi
movq %rax, %rdi
callq 0x3030
jmp 0x635b
movq -0x18(%rbp), %rax
shrq $0x2a, %rax
cmpq $0x0, %rax
je 0x5fe4
movq -0x158(%rbp), %rsi
movabsq $0xffffff000000, %rdx   # imm = 0xFFFFFF000000
andq -0x18(%rbp), %rdx
leaq -0xa8(%rbp), %rdi
callq 0x4d80
movq -0x158(%rbp), %rdi
addq $0x40048, %rdi          # imm = 0x40048
movl -0xc(%rbp), %eax
movl %eax, %esi
callq 0x6380
movq %rax, %rdi
leaq -0xa8(%rbp), %rsi
callq 0x3260
leaq -0xa8(%rbp), %rdi
callq 0x3110
jmp 0x606d
movabsq $0x800400000, %rax      # imm = 0x800400000
andq -0x18(%rbp), %rax
movabsq $0x800400000, %rcx      # imm = 0x800400000
cmpq %rcx, %rax
jne 0x606b
movq -0x158(%rbp), %rsi
movq -0x18(%rbp), %rax
shrq $0x18, %rax
andq $0x7ff, %rax            # imm = 0x7FF
movl %eax, -0xac(%rbp)
movl 0x24(%rsi), %eax
addl -0xac(%rbp), %eax
movl %eax, %eax
movq 0x48(%rsi,%rax,8), %rdx
leaq -0xd0(%rbp), %rdi
callq 0x4d80
movq -0x158(%rbp), %rdi
addq $0x40048, %rdi          # imm = 0x40048
movl -0xc(%rbp), %eax
movl %eax, %esi
callq 0x6380
movq %rax, %rdi
leaq -0xd0(%rbp), %rsi
callq 0x3260
leaq -0xd0(%rbp), %rdi
callq 0x3110
jmp 0x606d
movq -0x18(%rbp), %rax
andq $0xbfffff, %rax         # imm = 0xBFFFFF
cmpq $0x8c0000, %rax         # imm = 0x8C0000
jne 0x60b5
movq -0x158(%rbp), %rdi
addq $0x40048, %rdi          # imm = 0x40048
movl -0xc(%rbp), %eax
movl %eax, %esi
callq 0x6380
movq %rax, %rdi
callq 0x30c0
movq %rax, %rsi
leaq 0x24a1(%rip), %rdi      # 0x854a
movb $0x0, %al
callq 0x3040
jmp 0x6359
movq -0x18(%rbp), %rax
andq $0xbc0000, %rax         # imm = 0xBC0000
cmpq $0x9c0000, %rax         # imm = 0x9C0000
jne 0x6109
movq -0x158(%rbp), %rdi
addq $0x40048, %rdi          # imm = 0x40048
movl -0xc(%rbp), %eax
movl %eax, %esi
callq 0x6380
movq %rax, %rdi
callq 0x30c0
movq %rax, %rsi
movq -0x18(%rbp), %rax
movl %eax, %edx
andl $0x3ffff, %edx          # imm = 0x3FFFF
leaq 0x2459(%rip), %rdi      # 0x8556
movb $0x0, %al
callq 0x3040
jmp 0x6357
movq -0x18(%rbp), %rax
shrq $0x18, %rax
andq $0xfff800, %rax         # imm = 0xFFF800
cmpq $0x800, %rax            # imm = 0x800
jne 0x62cd
movq -0x18(%rbp), %rax
andq $0xffffff, %rax         # imm = 0xFFFFFF
cmpq $0x8000, %rax           # imm = 0x8000
jae 0x62cd
movq -0x18(%rbp), %rax
shrq $0x18, %rax
andq $0x7ff, %rax            # imm = 0x7FF
movl %eax, -0xd4(%rbp)
movq -0x18(%rbp), %rax
andq $0x7fff, %rax           # imm = 0x7FFF
movl %eax, -0xd8(%rbp)
cmpl $0x4000, -0xd8(%rbp)    # imm = 0x4000
jb 0x6179
xorl %eax, %eax
subl -0xd8(%rbp), %eax
movl %eax, -0x164(%rbp)
jmp 0x6185
movl -0xd8(%rbp), %eax
movl %eax, -0x164(%rbp)
movq -0x158(%rbp), %rax
movl -0x164(%rbp), %ecx
movl %ecx, -0xdc(%rbp)
testb $0x1, 0x41(%rax)
je 0x6217
movq -0x158(%rbp), %rdi
addq $0x40048, %rdi          # imm = 0x40048
movl -0xd4(%rbp), %eax
movl %eax, %esi
callq 0x6380
movq %rax, %rdi
callq 0x30c0
movq %rax, %rdx
movl -0xdc(%rbp), %ecx
leaq -0x100(%rbp), %rdi
leaq 0x238a(%rip), %rsi      # 0x8562
movb $0x0, %al
callq 0x34c0
movq -0x158(%rbp), %rdi
addq $0x40048, %rdi          # imm = 0x40048
movl -0xc(%rbp), %eax
movl %eax, %esi
callq 0x6380
movq %rax, %rdi
leaq -0x100(%rbp), %rsi
callq 0x3260
leaq -0x100(%rbp), %rdi
callq 0x3110
jmp 0x62c8
movq -0x158(%rbp), %rsi
movl -0xc(%rbp), %edx
leaq -0x120(%rbp), %rdi
callq 0x63a0
movq -0x158(%rbp), %rdi
addq $0x40048, %rdi          # imm = 0x40048
movl -0xc(%rbp), %eax
movl %eax, %esi
callq 0x6380
movq %rax, %rdi
leaq -0x120(%rbp), %rsi
callq 0x3260
leaq -0x120(%rbp), %rdi
callq 0x3110
movq -0x158(%rbp), %rdi
addq $0x40048, %rdi          # imm = 0x40048
movl -0xc(%rbp), %eax
movl %eax, %esi
callq 0x6380
movq %rax, %rdi
callq 0x30c0
movq -0x158(%rbp), %rdi
movq %rax, -0x170(%rbp)
addq $0x40048, %rdi          # imm = 0x40048
movl -0xd4(%rbp), %eax
movl %eax, %esi
callq 0x6380
movq %rax, %rdi
callq 0x30c0
movq -0x170(%rbp), %rsi
movq %rax, %rdx
movl -0xdc(%rbp), %ecx
leaq 0x22a7(%rip), %rdi      # 0x8568
movb $0x0, %al
callq 0x3040
jmp 0x6355
movq -0x158(%rbp), %rsi
movl -0xc(%rbp), %edx
movl %edx, -0x17c(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x178(%rbp)
leaq -0x140(%rbp), %rdi
movq %rdi, -0x188(%rbp)
callq 0x63a0
movq -0x188(%rbp), %rdi
callq 0x30c0
movl -0x17c(%rbp), %esi
movq -0x178(%rbp), %rdx
movq %rax, %rcx
leaq 0x225a(%rip), %rdi      # 0x8578
xorl %eax, %eax
callq 0x3040
jmp 0x6327
leaq -0x140(%rbp), %rdi
callq 0x3110
jmp 0x6355
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x148(%rbp)
movl %eax, -0x14c(%rbp)
leaq -0x140(%rbp), %rdi
callq 0x3110
jmp 0x6366
jmp 0x6357
jmp 0x6359
jmp 0x635b
jmp 0x635d
addq $0x190, %rsp            # imm = 0x190
popq %rbp
retq
movq -0x148(%rbp), %rdi
callq 0x3370
nopw %cs:(%rax,%rax)
nopl (%rax)