// File: /workspace/github_cpp_makefile_star2_O2/besm6[P]pascal-re/dtran.cc
// Function: Dtran::prdata()
void prdata() {
    /*
     * Print data initializations in the form of assignments
     * if the source reference allows it.
     */
    for (uint cur = table_off - set_len; cur < table_off; ++cur) {
        uint64 word = memory[cur];
        uint len = word >> 36;
        uint from = (word >> 24) & 03777;
        uint cnt = (word >> 12) & 07777;
        uint to = word & 03777;
        std::string src = symtab[from];
        uint off = ~0;

        if (src[0] == '*') {
            char * end;
            off = strtol(src.c_str()+1, &end, 8);
            do {
                switch (*end) {
                case '\0': break;
                case '+':
                    if (isdigit(end[1]))
                        off += atoi(end+1);
                    else
                        off = ~0;
                    break;
                case 'B':
                    ++end;
                    continue;
                default:
                    off = ~0;
                    break;
                }
                break;
            } while (1);
        }
        if (off != ~0u) {
            for (uint tocnt = 0; tocnt < cnt; ++tocnt) {
                for (uint fromcnt = 0; fromcnt < len; ++fromcnt) {
                    printf(" ,XTA,%s\n", get_literal(off+fromcnt).c_str());
                    std::string temp;
                    size_t plus = symtab[to].find('+');
                    if (plus != std::string::npos && (tocnt || fromcnt)) {
                        uint was = atoi(symtab[to].c_str() + plus + 1);
                        temp = strprintf("%.*s+%d", plus, symtab[to].c_str(),
                                         was+ tocnt*len+fromcnt);
                    } else if (tocnt || fromcnt) {
                        temp = symtab[to] + strprintf("%+d", tocnt*len+fromcnt);
                    } else {
                        temp = symtab[to];
                    }
                    printf(" ,ATX,%s\n", temp.c_str());
                }
            }
        } else {
            printf(" %d,SET,%s\n", len, src.c_str());
            printf(" %d,   ,%s\n", cnt, symtab[to].c_str());
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movl 0x24(%rdi), %eax
movl %eax, %ecx
movq %rdi, (%rsp)
subl 0x10(%rdi), %ecx
leaq 0x30(%rsp), %r15
pushq $0x2b
popq %r13
movl %eax, %eax
cmpq %rax, %rcx
jae 0x2f13
movq %rcx, 0x50(%rsp)
movq (%rsp), %rdx
movq 0x48(%rdx,%rcx,8), %r12
movq %r12, %rax
shrq $0x24, %rax
movq %rax, 0x20(%rsp)
movq %r12, %rsi
shrq $0x18, %rsi
andl $0x7ff, %esi            # imm = 0x7FF
movl %r12d, %eax
shrl $0xc, %eax
andl $0xfff, %eax            # imm = 0xFFF
movl %eax, 0x8(%rsp)
andl $0x7ff, %r12d           # imm = 0x7FF
shll $0x5, %esi
addq 0x40048(%rdx), %rsi
leaq 0x58(%rsp), %rdi
callq 0x21d0
movq 0x58(%rsp), %rdi
cmpb $0x2a, (%rdi)
jne 0x2eb8
incq %rdi
movq %r15, %rsi
pushq $0x8
popq %rdx
callq 0x21f0
movq %rax, 0x18(%rsp)
movq 0x30(%rsp), %rdi
incq %rdi
movzbl -0x1(%rdi), %eax
cmpl $0x42, %eax
je 0x2c9c
testl %eax, %eax
je 0x2cdb
cmpl $0x2b, %eax
jne 0x2eb8
leaq -0x1(%rdi), %rax
movq %rax, 0x30(%rsp)
movsbl (%rdi), %eax
addl $-0x30, %eax
cmpl $0x9, %eax
ja 0x2eb8
callq 0x2240
addl 0x18(%rsp), %eax
movq %rax, 0x18(%rsp)
cmpl $-0x1, 0x18(%rsp)
je 0x2eb8
movq $0x0, 0x10(%rsp)
xorl %ebp, %ebp
movq %r12, 0x28(%rsp)
cmpl 0x8(%rsp), %ebp
je 0x2ef5
xorl %ebx, %ebx
movl %ebp, 0xc(%rsp)
cmpl %ebx, 0x20(%rsp)
je 0x2ea3
movq 0x18(%rsp), %rax
leal (%rax,%rbx), %edx
movq %r15, %rdi
movq (%rsp), %rsi
callq 0x4194
movq 0x30(%rsp), %rsi
leaq 0x29f1(%rip), %rdi      # 0x5721
xorl %eax, %eax
callq 0x2030
movq %r15, %rdi
callq 0x20b0
leaq 0x40(%rsp), %rax
movq %rax, 0x30(%rsp)
andq $0x0, 0x38(%rsp)
movb $0x0, 0x40(%rsp)
movl %r12d, %edi
shll $0x5, %edi
movq (%rsp), %rax
addq 0x40048(%rax), %rdi
movl %r13d, %esi
xorl %edx, %edx
callq 0x21c0
movq %rax, %r14
movl %ebx, %eax
orl %ebp, %eax
movq %rbx, %rcx
je 0x2dec
cmpq $-0x1, %r14
je 0x2dec
movq (%rsp), %rax
movq 0x40048(%rax), %rax
movq %rcx, %r13
movl %r12d, %ecx
shll $0x5, %ecx
movq (%rax,%rcx), %rbp
leaq (%r14,%rbp), %rdi
incq %rdi
callq 0x2240
movq 0x10(%rsp), %rcx
movq %r13, %rbx
leal (%rcx,%r13), %r8d
addl %eax, %r8d
leaq 0x98(%rsp), %r12
movq %r12, %rdi
leaq 0x2965(%rip), %rsi      # 0x572b
movq %r14, %rdx
movq %rbp, %rcx
xorl %eax, %eax
callq 0x23cc
movq %r15, %rdi
movq %r12, %rsi
callq 0x21a0
movq %r12, %rdi
callq 0x20b0
pushq $0x2b
popq %r13
jmp 0x2e5a
testl %eax, %eax
je 0x2e85
movq (%rsp), %rax
movq 0x40048(%rax), %r14
movq 0x10(%rsp), %rax
movq %rcx, %rbx
leal (%rax,%rcx), %edx
leaq 0x78(%rsp), %rbp
movq %rbp, %rdi
leaq 0x289f(%rip), %rsi      # 0x56b8
xorl %eax, %eax
callq 0x23cc
movl %r12d, %eax
shll $0x5, %eax
addq %rax, %r14
leaq 0x98(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
movq %rbp, %rdx
callq 0x4574
movq %r15, %rdi
movq %r12, %rsi
callq 0x21a0
movq %r12, %rdi
callq 0x20b0
movq %rbp, %rdi
callq 0x20b0
movq 0x28(%rsp), %r12
movl 0xc(%rsp), %ebp
movq 0x30(%rsp), %rsi
leaq 0x28c4(%rip), %rdi      # 0x5733
xorl %eax, %eax
callq 0x2030
movq %r15, %rdi
callq 0x20b0
incl %ebx
jmp 0x2d06
movq %rcx, %rbx
movl %r12d, %esi
shll $0x5, %esi
movq (%rsp), %rax
addq 0x40048(%rax), %rsi
movq %r15, %rdi
callq 0x20d0
jmp 0x2e63
incl %ebp
movq 0x10(%rsp), %rax
addl 0x20(%rsp), %eax
movq %rax, 0x10(%rsp)
jmp 0x2cf6
movq 0x58(%rsp), %rdx
leaq 0x2879(%rip), %rdi      # 0x573d
movq 0x20(%rsp), %rsi
xorl %eax, %eax
callq 0x2030
movq (%rsp), %rax
movq 0x40048(%rax), %rax
shll $0x5, %r12d
movq (%rax,%r12), %rdx
leaq 0x285f(%rip), %rdi      # 0x5749
movl 0x8(%rsp), %esi
xorl %eax, %eax
callq 0x2030
leaq 0x58(%rsp), %rdi
callq 0x20b0
movq 0x50(%rsp), %rcx
incq %rcx
movq (%rsp), %rax
movl 0x24(%rax), %eax
jmp 0x2c1a
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2f38
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
callq 0x20b0
jmp 0x2f3b
jmp 0x2f38
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x20b0
jmp 0x2f4a
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x20b0
movq %rbx, %rdi
callq 0x2280