// File: /workspace/github_cpp_makefile_star2_O1/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), %ecx
movl %ecx, %eax
subl 0x10(%rdi), %eax
cmpl %ecx, %eax
jae 0x3250
movq %rdi, %rbx
leaq 0x58(%rsp), %r14
movl %eax, %ecx
leaq 0x8(%rsp), %r13
movq %rcx, 0x88(%rsp)
movq 0x48(%rbx,%rcx,8), %rax
movq %rax, %r12
shrq $0x18, %rax
andl $0x7ff, %eax            # imm = 0x7FF
movq 0x40048(%rbx), %rcx
shll $0x5, %eax
movq %r14, 0x48(%rsp)
movq (%rcx,%rax), %rsi
movq 0x8(%rcx,%rax), %rdx
addq %rsi, %rdx
leaq 0x48(%rsp), %rdi
callq 0x49cc
movq 0x48(%rsp), %rdi
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpb $0x2a, (%rdi)
jne 0x2f17
incq %rdi
movq %r13, %rsi
movl $0x8, %edx
callq 0x21c0
movq %rax, %r15
movq 0x8(%rsp), %rdi
incq %rdi
movzbl -0x1(%rdi), %eax
cmpl $0x42, %eax
je 0x2ec5
testl %eax, %eax
je 0x2efd
cmpl $0x2b, %eax
jne 0x2f0a
leaq -0x1(%rdi), %rax
movq %rax, 0x8(%rsp)
movsbl (%rdi), %ecx
addl $-0x30, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl $0x9, %ecx
ja 0x2f17
callq 0x2210
addl %r15d, %eax
jmp 0x2f17
decq %rdi
movq %rdi, 0x8(%rsp)
movl %r15d, %eax
jmp 0x2f17
decq %rdi
movq %rdi, 0x8(%rsp)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %r12, %r14
shrq $0x24, %r12
movl %r14d, %ebp
shrl $0xc, %ebp
andl $0xfff, %ebp            # imm = 0xFFF
andl $0x7ff, %r14d           # imm = 0x7FF
cmpl $-0x1, %eax
je 0x31e8
testl %ebp, %ebp
je 0x321d
movq $0x0, 0x28(%rsp)
movl $0x0, 0x4(%rsp)
movq %r14, 0x30(%rsp)
movq %rax, 0x90(%rsp)
movl %ebp, 0x44(%rsp)
movq %r12, 0x38(%rsp)
testq %r12, %r12
je 0x31c3
xorl %r15d, %r15d
leal (%rax,%r15), %edx
movq %r13, %rdi
movq %rbx, %rsi
callq 0x456c
movq 0x8(%rsp), %rsi
leaq 0x2791(%rip), %rdi      # 0x5721
xorl %eax, %eax
callq 0x2030
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %r12
cmpq %r12, %rdi
je 0x2fb3
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2140
movq %r12, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movb $0x0, 0x18(%rsp)
movl %r14d, %edi
shll $0x5, %edi
addq 0x40048(%rbx), %rdi
movl $0x2b, %esi
xorl %edx, %edx
callq 0x21a0
movq %rax, %r12
movl %r15d, %eax
orl 0x4(%rsp), %eax
je 0x307a
cmpq $-0x1, %r12
je 0x307a
movq %r14, %rbp
movq 0x40048(%rbx), %r14
shll $0x5, %ebp
movq (%r14,%rbp), %rax
leaq (%rax,%r12), %rdi
incq %rdi
callq 0x2210
movq (%r14,%rbp), %rcx
movq 0x28(%rsp), %rdx
leal (%rdx,%r15), %r8d
addl %eax, %r8d
leaq 0x68(%rsp), %r14
movq %r14, %rdi
leaq 0x26f6(%rip), %rsi      # 0x572b
movq %r12, %rdx
xorl %eax, %eax
callq 0x254c
movq %r13, %rdi
movq %r14, %rsi
callq 0x2190
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %r14
cmpq %r14, %rdi
je 0x3066
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x2140
leaq 0x18(%rsp), %rbp
movq 0x30(%rsp), %r14
movq 0x38(%rsp), %r12
jmp 0x3185
testl %eax, %eax
je 0x30ec
movq 0x40048(%rbx), %r12
movq 0x28(%rsp), %rax
leal (%rax,%r15), %edx
leaq 0x98(%rsp), %r14
movq %r14, %rdi
leaq 0x2618(%rip), %rsi      # 0x56b8
xorl %eax, %eax
callq 0x254c
movq 0x30(%rsp), %rax
shll $0x5, %eax
movq (%r12,%rax), %rcx
movq 0x8(%r12,%rax), %r8
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2150
leaq 0x78(%rsp), %r12
movq %r12, 0x68(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x310d
movq %rdx, 0x68(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x78(%rsp)
jmp 0x3115
movl %r14d, %esi
shll $0x5, %esi
addq 0x40048(%rbx), %rsi
movq %r13, %rdi
leaq 0x18(%rsp), %rbp
callq 0x20b0
movq 0x38(%rsp), %r12
jmp 0x3185
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x30(%rsp), %r14
movq 0x8(%rax), %rdx
movq %rdx, 0x70(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r13, %rdi
leaq 0x68(%rsp), %rsi
callq 0x2190
movq 0x68(%rsp), %rdi
cmpq %r12, %rdi
je 0x3156
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x2140
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
movq 0x38(%rsp), %r12
je 0x3180
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x2140
leaq 0x18(%rsp), %rbp
movq 0x8(%rsp), %rsi
leaq 0x25a2(%rip), %rdi      # 0x5733
xorl %eax, %eax
callq 0x2030
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x31af
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2140
incl %r15d
cmpl %r15d, %r12d
movq 0x90(%rsp), %rax
jne 0x2f75
movl 0x4(%rsp), %edx
incl %edx
movq 0x28(%rsp), %rcx
addl %r12d, %ecx
movq %rcx, 0x28(%rsp)
movl 0x44(%rsp), %ebp
movl %edx, 0x4(%rsp)
cmpl %ebp, %edx
jne 0x2f69
jmp 0x321d
movq 0x48(%rsp), %rdx
leaq 0x2549(%rip), %rdi      # 0x573d
movl %r12d, %esi
xorl %eax, %eax
callq 0x2030
movq 0x40048(%rbx), %rax
shll $0x5, %r14d
movq (%rax,%r14), %rdx
leaq 0x2535(%rip), %rdi      # 0x5749
movl %ebp, %esi
xorl %eax, %eax
callq 0x2030
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %r14
cmpq %r14, %rdi
je 0x3239
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x2140
movq 0x88(%rsp), %rcx
incq %rcx
movl 0x24(%rbx), %eax
cmpq %rax, %rcx
jb 0x2e60
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
leaq 0x58(%rsp), %r14
jmp 0x32af
movq %rax, %r15
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
leaq 0x58(%rsp), %r14
leaq 0x18(%rsp), %rbp
je 0x32af
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x2140
jmp 0x32af
jmp 0x32a2
movq %rax, %r15
leaq 0x58(%rsp), %r14
leaq 0x18(%rsp), %rbp
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x32d0
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2140
jmp 0x32d0
movq %rax, %r15
leaq 0x58(%rsp), %r14
movq 0x48(%rsp), %rdi
cmpq %r14, %rdi
je 0x32e7
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x2140
movq %r15, %rdi
callq 0x2220
nop