// File: besm6[P]pascal-re/dtran.cc
// Function: Dtran::get_literal[abi:cxx11](unsigned int)
std::string get_literal(uint32 addr) {
    uint64 val = memory[addr + 3];
    std::string ret;
    if ((val >> 24) == 064000000) {
        uint d = val & 077777777;
        if (d > 10000)
            ret = strprintf("%08oB", d);
        else
            ret = strprintf("(%d)", d);
    } else if (is_likely_iso(val)) {
        ret = strprintf("iso('%s')", get_iso_word(val).c_str());
    } else if (is_likely_text(val)) {
        ret = strprintf("%lloC(*\"%s\"*)", val, get_text_word(val).c_str());
    } else if (val >= 0101 && val < 96) {
        ret = strprintf("char('%c')", char(val));
    } else {
        ret = strprintf("(%lloC)", val);
    }
    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x160, %rsp            # imm = 0x160
movq %rdi, -0x150(%rbp)
movq %rdi, %rax
movq %rax, -0x148(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x140(%rbp)
movl -0x14(%rbp), %ecx
addl $0x3, %ecx
movl %ecx, %ecx
movq 0x48(%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
movb $0x0, -0x21(%rbp)
callq 0x32b0
movq -0x20(%rbp), %rax
shrq $0x18, %rax
cmpq $0xd00000, %rax         # imm = 0xD00000
jne 0x70be
movq -0x20(%rbp), %rax
andq $0xffffff, %rax         # imm = 0xFFFFFF
movl %eax, -0x28(%rbp)
cmpl $0x2710, -0x28(%rbp)    # imm = 0x2710
jbe 0x7089
movl -0x28(%rbp), %edx
leaq 0x1652(%rip), %rsi      # 0x86a2
xorl %eax, %eax
leaq -0x48(%rbp), %rdi
callq 0x34c0
jmp 0x705d
movq -0x150(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x3260
leaq -0x48(%rbp), %rdi
callq 0x3110
jmp 0x70b9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x72e2
movl -0x28(%rbp), %edx
leaq 0x1615(%rip), %rsi      # 0x86a8
xorl %eax, %eax
leaq -0x78(%rbp), %rdi
callq 0x34c0
jmp 0x70a0
movq -0x150(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x3260
leaq -0x78(%rbp), %rdi
callq 0x3110
jmp 0x72bc
movq -0x140(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x7300
movb %al, -0x151(%rbp)
jmp 0x70d6
movb -0x151(%rbp), %al
testb $0x1, %al
jne 0x70e5
jmp 0x7171
movq -0x140(%rbp), %rsi
movq -0x20(%rbp), %rdx
leaq -0xb8(%rbp), %rdi
callq 0x7360
jmp 0x70fe
leaq -0xb8(%rbp), %rdi
callq 0x30c0
movq %rax, %rdx
leaq 0x1599(%rip), %rsi      # 0x86ad
xorl %eax, %eax
leaq -0x98(%rbp), %rdi
callq 0x34c0
jmp 0x7124
movq -0x150(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x3260
leaq -0x98(%rbp), %rdi
callq 0x3110
leaq -0xb8(%rbp), %rdi
callq 0x3110
jmp 0x72ba
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0xb8(%rbp), %rdi
callq 0x3110
jmp 0x72e2
movq -0x140(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x7430
movb %al, -0x152(%rbp)
jmp 0x7189
movb -0x152(%rbp), %al
testb $0x1, %al
jne 0x7198
jmp 0x7232
movq -0x140(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq %rdx, -0x160(%rbp)
leaq -0xf8(%rbp), %rdi
callq 0x4d80
jmp 0x71b8
leaq -0xf8(%rbp), %rdi
callq 0x30c0
movq -0x160(%rbp), %rdx
movq %rax, %rcx
leaq 0x14e2(%rip), %rsi      # 0x86b7
xorl %eax, %eax
leaq -0xd8(%rbp), %rdi
callq 0x34c0
jmp 0x71e5
movq -0x150(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
callq 0x3260
leaq -0xd8(%rbp), %rdi
callq 0x3110
leaq -0xf8(%rbp), %rdi
callq 0x3110
jmp 0x72b8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0xf8(%rbp), %rdi
callq 0x3110
jmp 0x72e2
cmpq $0x41, -0x20(%rbp)
jb 0x727c
cmpq $0x60, -0x20(%rbp)
jae 0x727c
movsbl -0x20(%rbp), %edx
leaq 0x147a(%rip), %rsi      # 0x86c5
xorl %eax, %eax
leaq -0x118(%rbp), %rdi
callq 0x34c0
jmp 0x725b
movq -0x150(%rbp), %rdi
leaq -0x118(%rbp), %rsi
callq 0x3260
leaq -0x118(%rbp), %rdi
callq 0x3110
jmp 0x72b6
movq -0x20(%rbp), %rdx
leaq 0x1449(%rip), %rsi      # 0x86d0
xorl %eax, %eax
leaq -0x138(%rbp), %rdi
callq 0x34c0
jmp 0x7297
movq -0x150(%rbp), %rdi
leaq -0x138(%rbp), %rsi
callq 0x3260
leaq -0x138(%rbp), %rdi
callq 0x3110
jmp 0x72b8
jmp 0x72ba
jmp 0x72bc
movb $0x1, -0x21(%rbp)
testb $0x1, -0x21(%rbp)
jne 0x72d2
movq -0x150(%rbp), %rdi
callq 0x3110
movq -0x148(%rbp), %rax
addq $0x160, %rsp            # imm = 0x160
popq %rbp
retq
movq -0x150(%rbp), %rdi
callq 0x3110
movq -0x50(%rbp), %rdi
callq 0x3370
nopw (%rax,%rax)