// File: besm6[P]pascal-re/dtran.cc
// Function: Dtran::prconst(unsigned int, unsigned int, bool)
void prconst (uint32 addr, uint32 len, bool litconst) {
    for (uint cur = addr; cur < addr + len; ++cur) {
        uint64 val = memory[cur+3];
        if (litconst) {
            printf(" /%d:", cur-cmd_len);
        } else if (labels[cur].empty()) {
            printf(" ");
        } else {
            printf(" %s:", labels[cur].c_str());
        }
        if ((val >> 24) == 064000000) {
            uint d = val & 077777777;
            if (d > 200000)
                printf(",INT,%08oB\n", d);
            else
                printf(",INT,%d\n", d);
        } else if (is_likely_iso(val)) {
            printf(",ISO, 6H%s . %s\n", get_iso_word(val).c_str(), get_bytes(val).c_str());
        } else if (is_likely_text(val)) {
            printf(",TEXT, 8H%s\n", get_text_word(val).c_str());
        } else {
            printf(",LOG,%llo\n", val);
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movb %cl, %al
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
andb $0x1, %al
movb %al, -0x11(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xa0(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
movl -0xc(%rbp), %ecx
addl -0x10(%rbp), %ecx
cmpl %ecx, %eax
jae 0x416a
movq -0xa0(%rbp), %rax
movl -0x18(%rbp), %ecx
addl $0x3, %ecx
movl %ecx, %ecx
movq 0x48(%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
testb $0x1, -0x11(%rbp)
je 0x3f49
movq -0xa0(%rbp), %rax
movl -0x18(%rbp), %esi
subl 0x18(%rax), %esi
leaq 0x480b(%rip), %rdi      # 0x874b
movb $0x0, %al
callq 0x3040
jmp 0x3fb2
movq -0xa0(%rbp), %rdi
addq $0x40060, %rdi          # imm = 0x40060
movl -0x18(%rbp), %eax
movl %eax, %esi
callq 0x6380
movq %rax, %rdi
callq 0x3360
testb $0x1, %al
jne 0x3f6f
jmp 0x3f7f
leaq 0x481d(%rip), %rdi      # 0x8793
movb $0x0, %al
callq 0x3040
jmp 0x3fb0
movq -0xa0(%rbp), %rdi
addq $0x40060, %rdi          # imm = 0x40060
movl -0x18(%rbp), %eax
movl %eax, %esi
callq 0x6380
movq %rax, %rdi
callq 0x30c0
movq %rax, %rsi
leaq 0x45f6(%rip), %rdi      # 0x859f
movb $0x0, %al
callq 0x3040
jmp 0x3fb2
movq -0x20(%rbp), %rax
shrq $0x18, %rax
cmpq $0xd00000, %rax         # imm = 0xD00000
jne 0x4001
movq -0x20(%rbp), %rax
andq $0xffffff, %rax         # imm = 0xFFFFFF
movl %eax, -0x24(%rbp)
cmpl $0x30d40, -0x24(%rbp)   # imm = 0x30D40
jbe 0x3feb
movl -0x24(%rbp), %esi
leaq 0x476f(%rip), %rdi      # 0x8751
movb $0x0, %al
callq 0x3040
jmp 0x3ffc
movl -0x24(%rbp), %esi
leaq 0x4768(%rip), %rdi      # 0x875d
movb $0x0, %al
callq 0x3040
jmp 0x415a
movq -0xa0(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x7300
testb $0x1, %al
jne 0x401a
jmp 0x40c9
movq -0xa0(%rbp), %rsi
movq -0x20(%rbp), %rdx
leaq -0x48(%rbp), %rdi
movq %rdi, -0xb0(%rbp)
callq 0x7360
movq -0xb0(%rbp), %rdi
callq 0x30c0
movq -0xa0(%rbp), %rsi
movq %rax, -0xa8(%rbp)
movq -0x20(%rbp), %rdx
leaq -0x68(%rbp), %rdi
callq 0x7610
jmp 0x405e
leaq -0x68(%rbp), %rdi
callq 0x30c0
movq -0xa8(%rbp), %rsi
movq %rax, %rdx
leaq 0x46ee(%rip), %rdi      # 0x8766
xorl %eax, %eax
callq 0x3040
jmp 0x4081
leaq -0x68(%rbp), %rdi
callq 0x3110
leaq -0x48(%rbp), %rdi
callq 0x3110
jmp 0x4158
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x40bb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x3110
leaq -0x48(%rbp), %rdi
callq 0x3110
jmp 0x4173
movq -0xa0(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x7430
testb $0x1, %al
jne 0x40df
jmp 0x4144
movq -0xa0(%rbp), %rsi
movq -0x20(%rbp), %rdx
leaq -0x98(%rbp), %rdi
movq %rdi, -0xb8(%rbp)
callq 0x4d80
movq -0xb8(%rbp), %rdi
callq 0x30c0
movq %rax, %rsi
leaq 0x4664(%rip), %rdi      # 0x8777
xorl %eax, %eax
callq 0x3040
jmp 0x411c
leaq -0x98(%rbp), %rdi
callq 0x3110
jmp 0x4156
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x3110
jmp 0x4173
movq -0x20(%rbp), %rsi
leaq 0x4635(%rip), %rdi      # 0x8784
movb $0x0, %al
callq 0x3040
jmp 0x4158
jmp 0x415a
jmp 0x415c
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x3efd
addq $0xc0, %rsp
popq %rbp
retq
movq -0x70(%rbp), %rdi
callq 0x3370
nopl (%rax)