// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/crossassemblers/macro11/dumpobj.c
// Function: got_rld
void got_rld(
    char *cp,
    int len)
{
    int             i;

    printf("RLD\n");

    for (i = 2; i < len;) {
        unsigned        addr;
        unsigned        word;
        unsigned        disp = cp[i + 1] & 0xff;
        char            name[8];
        char           *byte;

        addr = last_text_addr + disp - 4;

        byte = "";
        if (cp[i] & 0200)
            byte = " byte";

        switch (cp[i] & 0x7f) {
        case 01:
            printf("\tInternal%s %o=%o\n", byte, addr, WORD(cp + i + 2));
            i += 4;
            break;
        case 02:
            rad50name(cp + i + 2, name);
            printf("\tGlobal%s %o=%s\n", byte, addr, name);
            i += 6;
            break;
        case 03:
            printf("\tInternal displaced%s %o=%o\n", byte, addr, WORD(cp + i + 2));
            i += 4;
            badbin = 1;
            break;
        case 04:
            rad50name(cp + i + 2, name);
            printf("\tGlobal displaced%s %o=%s\n", byte, addr, name);
            i += 6;
            badbin = 1;
            break;
        case 05:
            rad50name(cp + i + 2, name);
            word = WORD(cp + i + 6);
            printf("\tGlobal plus offset%s %o=%s+%o\n", byte, addr, name, word);
            i += 8;
            badbin = 1;
            break;
        case 06:
            rad50name(cp + i + 2, name);
            word = WORD(cp + i + 6);
            printf("\tGlobal plus offset displaced%s %o=%s+%o\n", byte, addr, name, word);
            i += 8;
            badbin = 1;
            break;
        case 07:
            rad50name(cp + i + 2, name);
            word = WORD(cp + i + 6);
            printf("\tLocation counter definition %s+%o\n", name, word);
            i += 8;

            last_text_addr = word;
            break;
        case 010:
            word = WORD(cp + i + 2);
            printf("\tLocation counter modification %o\n", word);
            i += 4;

            last_text_addr = word;
            break;
        case 011:
            printf("\t.LIMIT %o\n", addr);
            i += 2;
            break;

        case 012:
            rad50name(cp + i + 2, name);
            printf("\tPSECT%s %o=%s\n", byte, addr, name);
            i += 6;
            badbin = 1;
            break;
        case 014:
            rad50name(cp + i + 2, name);

            printf("\tPSECT displaced%s %o=%s\n", byte, addr, name);
            i += 6;
            badbin = 1;
            break;
        case 015:
            rad50name(cp + i + 2, name);
            word = WORD(cp + i + 6);
            printf("\tPSECT plus offset%s %o=%s+%o\n", byte, addr, name, word);
            i += 8;
            badbin = 1;
            break;
        case 016:
            rad50name(cp + i + 2, name);
            word = WORD(cp + i + 6);
            printf("\tPSECT plus offset displaced%s %o=%s+%o\n", byte, addr, name, word);
            i += 8;
            badbin = 1;
            break;

        case 017:
            badbin = 1;
            printf("\tComplex%s %o=", byte, addr);
            i += 2; {
                char           *xp = cp + i;
                int             size;

                for (;;) {
                    size = 1;
                    switch (*xp) {
                    case 000:
                        fputs("nop ", stdout);
                        break;
                    case 001:
                        fputs("+ ", stdout);
                        break;
                    case 002:
                        fputs("- ", stdout);
                        break;
                    case 003:
                        fputs("* ", stdout);
                        break;
                    case 004:
                        fputs("/ ", stdout);
                        break;
                    case 005:
                        fputs("& ", stdout);
                        break;
                    case 006:
                        fputs("! ", stdout);
                        break;
                    case 010:
                        fputs("neg ", stdout);
                        break;
                    case 011:
                        fputs("^C ", stdout);
                        break;
                    case 012:
                        fputs("store ", stdout);
                        break;
                    case 013:
                        fputs("store{disp} ", stdout);
                        break;

                    case 016:
                        rad50name(xp + 1, name);
                        printf("%s ", name);
                        size = 5;
                        break;

                    case 017:
                        assert((xp[1] & 0377) < psectid);
                        printf("%s:%o ", psects[xp[1] & 0377], WORD(xp + 2));
                        size = 4;
                        break;

                    case 020:
                        printf("%o ", WORD(xp + 1));
                        size = 3;
                        break;
                    default:
                        printf("**UNKNOWN COMPLEX CODE** %o\n", *xp & 0377);
                        return;
                    }
                    i += size;
                    if (*xp == 012 || *xp == 013)
                        break;
                    xp += size;
                }
                fputc('\n', stdout);
                break;
            }

        default:
            printf("\t***Unknown RLD code %o\n", cp[i] & 0xff);
            return;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
leaq 0x1211(%rip), %rdi      # 0x3337
movb $0x0, %al
callq 0x10b0
movl $0x2, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x2965
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
andl $0xff, %eax
movl %eax, -0x1c(%rbp)
movl 0x3801(%rip), %eax      # 0x5960
addl -0x1c(%rbp), %eax
subl $0x4, %eax
movl %eax, -0x14(%rbp)
leaq 0xf7b(%rip), %rax       # 0x30ea
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rcx
movsbl (%rax,%rcx), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x2194
leaq 0x11ac(%rip), %rax      # 0x333c
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rcx
movzbl (%rax,%rcx), %eax
andl $0x7f, %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x48(%rbp)
subl $0xe, %eax
ja 0x293e
movq -0x48(%rbp), %rax
leaq 0xe69(%rip), %rcx       # 0x3028
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x30(%rbp), %rsi
movl -0x14(%rbp), %edx
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rcx
movsbl 0x2(%rax,%rcx), %ecx
andl $0xff, %ecx
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rdi
movsbl 0x3(%rax,%rdi), %eax
andl $0xff, %eax
shll $0x8, %eax
addl %eax, %ecx
leaq 0x1142(%rip), %rdi      # 0x3342
movb $0x0, %al
callq 0x10b0
movl -0x10(%rbp), %eax
addl $0x4, %eax
movl %eax, -0x10(%rbp)
jmp 0x2960
movq -0x8(%rbp), %rdi
movslq -0x10(%rbp), %rax
addq %rax, %rdi
addq $0x2, %rdi
leaq -0x24(%rbp), %rsi
callq 0x2090
movq -0x30(%rbp), %rsi
movl -0x14(%rbp), %edx
leaq -0x24(%rbp), %rcx
leaq 0x1116(%rip), %rdi      # 0x3355
movb $0x0, %al
callq 0x10b0
movl -0x10(%rbp), %eax
addl $0x6, %eax
movl %eax, -0x10(%rbp)
jmp 0x2960
movq -0x30(%rbp), %rsi
movl -0x14(%rbp), %edx
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rcx
movsbl 0x2(%rax,%rcx), %ecx
andl $0xff, %ecx
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rdi
movsbl 0x3(%rax,%rdi), %eax
andl $0xff, %eax
shll $0x8, %eax
addl %eax, %ecx
leaq 0x10da(%rip), %rdi      # 0x3366
movb $0x0, %al
callq 0x10b0
movl -0x10(%rbp), %eax
addl $0x4, %eax
movl %eax, -0x10(%rbp)
movl $0x1, 0x2e9a(%rip)      # 0x5140
jmp 0x2960
movq -0x8(%rbp), %rdi
movslq -0x10(%rbp), %rax
addq %rax, %rdi
addq $0x2, %rdi
leaq -0x24(%rbp), %rsi
callq 0x2090
movq -0x30(%rbp), %rsi
movl -0x14(%rbp), %edx
leaq -0x24(%rbp), %rcx
leaq 0x10ae(%rip), %rdi      # 0x3383
movb $0x0, %al
callq 0x10b0
movl -0x10(%rbp), %eax
addl $0x6, %eax
movl %eax, -0x10(%rbp)
movl $0x1, 0x2e51(%rip)      # 0x5140
jmp 0x2960
movq -0x8(%rbp), %rdi
movslq -0x10(%rbp), %rax
addq %rax, %rdi
addq $0x2, %rdi
leaq -0x24(%rbp), %rsi
callq 0x2090
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rcx
movsbl 0x6(%rax,%rcx), %eax
andl $0xff, %eax
movq -0x8(%rbp), %rcx
movslq -0x10(%rbp), %rdx
movsbl 0x7(%rcx,%rdx), %ecx
andl $0xff, %ecx
shll $0x8, %ecx
addl %ecx, %eax
movl %eax, -0x18(%rbp)
movq -0x30(%rbp), %rsi
movl -0x14(%rbp), %edx
leaq -0x24(%rbp), %rcx
movl -0x18(%rbp), %r8d
leaq 0x104f(%rip), %rdi      # 0x339e
movb $0x0, %al
callq 0x10b0
movl -0x10(%rbp), %eax
addl $0x8, %eax
movl %eax, -0x10(%rbp)
movl $0x1, 0x2dd7(%rip)      # 0x5140
jmp 0x2960
movq -0x8(%rbp), %rdi
movslq -0x10(%rbp), %rax
addq %rax, %rdi
addq $0x2, %rdi
leaq -0x24(%rbp), %rsi
callq 0x2090
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rcx
movsbl 0x6(%rax,%rcx), %eax
andl $0xff, %eax
movq -0x8(%rbp), %rcx
movslq -0x10(%rbp), %rdx
movsbl 0x7(%rcx,%rdx), %ecx
andl $0xff, %ecx
shll $0x8, %ecx
addl %ecx, %eax
movl %eax, -0x18(%rbp)
movq -0x30(%rbp), %rsi
movl -0x14(%rbp), %edx
leaq -0x24(%rbp), %rcx
movl -0x18(%rbp), %r8d
leaq 0xff5(%rip), %rdi       # 0x33be
movb $0x0, %al
callq 0x10b0
movl -0x10(%rbp), %eax
addl $0x8, %eax
movl %eax, -0x10(%rbp)
movl $0x1, 0x2d5d(%rip)      # 0x5140
jmp 0x2960
movq -0x8(%rbp), %rdi
movslq -0x10(%rbp), %rax
addq %rax, %rdi
addq $0x2, %rdi
leaq -0x24(%rbp), %rsi
callq 0x2090
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rcx
movsbl 0x6(%rax,%rcx), %eax
andl $0xff, %eax
movq -0x8(%rbp), %rcx
movslq -0x10(%rbp), %rdx
movsbl 0x7(%rcx,%rdx), %ecx
andl $0xff, %ecx
shll $0x8, %ecx
addl %ecx, %eax
movl %eax, -0x18(%rbp)
leaq -0x24(%rbp), %rsi
movl -0x18(%rbp), %edx
leaq 0xfad(%rip), %rdi       # 0x33e8
movb $0x0, %al
callq 0x10b0
movl -0x10(%rbp), %eax
addl $0x8, %eax
movl %eax, -0x10(%rbp)
movl -0x18(%rbp), %eax
movl %eax, 0x350c(%rip)      # 0x5960
jmp 0x2960
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rcx
movsbl 0x2(%rax,%rcx), %eax
andl $0xff, %eax
movq -0x8(%rbp), %rcx
movslq -0x10(%rbp), %rdx
movsbl 0x3(%rcx,%rdx), %ecx
andl $0xff, %ecx
shll $0x8, %ecx
addl %ecx, %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %esi
leaq 0xf7c(%rip), %rdi       # 0x340c
movb $0x0, %al
callq 0x10b0
movl -0x10(%rbp), %eax
addl $0x4, %eax
movl %eax, -0x10(%rbp)
movl -0x18(%rbp), %eax
movl %eax, 0x34b7(%rip)      # 0x5960
jmp 0x2960
movl -0x14(%rbp), %esi
leaq 0xf77(%rip), %rdi       # 0x342f
movb $0x0, %al
callq 0x10b0
movl -0x10(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x10(%rbp)
jmp 0x2960
movq -0x8(%rbp), %rdi
movslq -0x10(%rbp), %rax
addq %rax, %rdi
addq $0x2, %rdi
leaq -0x24(%rbp), %rsi
callq 0x2090
movq -0x30(%rbp), %rsi
movl -0x14(%rbp), %edx
leaq -0x24(%rbp), %rcx
leaq 0xf44(%rip), %rdi       # 0x343b
movb $0x0, %al
callq 0x10b0
movl -0x10(%rbp), %eax
addl $0x6, %eax
movl %eax, -0x10(%rbp)
movl $0x1, 0x2c2f(%rip)      # 0x5140
jmp 0x2960
movq -0x8(%rbp), %rdi
movslq -0x10(%rbp), %rax
addq %rax, %rdi
addq $0x2, %rdi
leaq -0x24(%rbp), %rsi
callq 0x2090
movq -0x30(%rbp), %rsi
movl -0x14(%rbp), %edx
leaq -0x24(%rbp), %rcx
leaq 0xf0b(%rip), %rdi       # 0x344b
movb $0x0, %al
callq 0x10b0
movl -0x10(%rbp), %eax
addl $0x6, %eax
movl %eax, -0x10(%rbp)
movl $0x1, 0x2be6(%rip)      # 0x5140
jmp 0x2960
movq -0x8(%rbp), %rdi
movslq -0x10(%rbp), %rax
addq %rax, %rdi
addq $0x2, %rdi
leaq -0x24(%rbp), %rsi
callq 0x2090
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rcx
movsbl 0x6(%rax,%rcx), %eax
andl $0xff, %eax
movq -0x8(%rbp), %rcx
movslq -0x10(%rbp), %rdx
movsbl 0x7(%rcx,%rdx), %ecx
andl $0xff, %ecx
shll $0x8, %ecx
addl %ecx, %eax
movl %eax, -0x18(%rbp)
movq -0x30(%rbp), %rsi
movl -0x14(%rbp), %edx
leaq -0x24(%rbp), %rcx
movl -0x18(%rbp), %r8d
leaq 0xeab(%rip), %rdi       # 0x3465
movb $0x0, %al
callq 0x10b0
movl -0x10(%rbp), %eax
addl $0x8, %eax
movl %eax, -0x10(%rbp)
movl $0x1, 0x2b6c(%rip)      # 0x5140
jmp 0x2960
movq -0x8(%rbp), %rdi
movslq -0x10(%rbp), %rax
addq %rax, %rdi
addq $0x2, %rdi
leaq -0x24(%rbp), %rsi
callq 0x2090
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rcx
movsbl 0x6(%rax,%rcx), %eax
andl $0xff, %eax
movq -0x8(%rbp), %rcx
movslq -0x10(%rbp), %rdx
movsbl 0x7(%rcx,%rdx), %ecx
andl $0xff, %ecx
shll $0x8, %ecx
addl %ecx, %eax
movl %eax, -0x18(%rbp)
movq -0x30(%rbp), %rsi
movl -0x14(%rbp), %edx
leaq -0x24(%rbp), %rcx
movl -0x18(%rbp), %r8d
leaq 0xe50(%rip), %rdi       # 0x3484
movb $0x0, %al
callq 0x10b0
movl -0x10(%rbp), %eax
addl $0x8, %eax
movl %eax, -0x10(%rbp)
movl $0x1, 0x2af2(%rip)      # 0x5140
jmp 0x2960
movl $0x1, 0x2ae3(%rip)      # 0x5140
movq -0x30(%rbp), %rsi
movl -0x14(%rbp), %edx
leaq 0xe42(%rip), %rdi       # 0x34ad
movb $0x0, %al
callq 0x10b0
movl -0x10(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movl $0x1, -0x3c(%rbp)
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
movl %eax, %ecx
movq %rcx, -0x50(%rbp)
subl $0x10, %eax
ja 0x28d2
movq -0x50(%rbp), %rax
leaq 0x9b2(%rip), %rcx       # 0x3064
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x2916(%rip), %rax      # 0x4fd8
movq (%rax), %rsi
leaq 0xdf0(%rip), %rdi       # 0x34bc
callq 0x10d0
jmp 0x28ef
movq 0x28fb(%rip), %rax      # 0x4fd8
movq (%rax), %rsi
leaq 0xdda(%rip), %rdi       # 0x34c1
callq 0x10d0
jmp 0x28ef
movq 0x28e0(%rip), %rax      # 0x4fd8
movq (%rax), %rsi
leaq 0xdc2(%rip), %rdi       # 0x34c4
callq 0x10d0
jmp 0x28ef
movq 0x28c5(%rip), %rax      # 0x4fd8
movq (%rax), %rsi
leaq 0xdaa(%rip), %rdi       # 0x34c7
callq 0x10d0
jmp 0x28ef
movq 0x28aa(%rip), %rax      # 0x4fd8
movq (%rax), %rsi
leaq 0xd92(%rip), %rdi       # 0x34ca
callq 0x10d0
jmp 0x28ef
movq 0x288f(%rip), %rax      # 0x4fd8
movq (%rax), %rsi
leaq 0xd7a(%rip), %rdi       # 0x34cd
callq 0x10d0
jmp 0x28ef
movq 0x2874(%rip), %rax      # 0x4fd8
movq (%rax), %rsi
leaq 0xd62(%rip), %rdi       # 0x34d0
callq 0x10d0
jmp 0x28ef
movq 0x2859(%rip), %rax      # 0x4fd8
movq (%rax), %rsi
leaq 0xd4a(%rip), %rdi       # 0x34d3
callq 0x10d0
jmp 0x28ef
movq 0x283e(%rip), %rax      # 0x4fd8
movq (%rax), %rsi
leaq 0xd34(%rip), %rdi       # 0x34d8
callq 0x10d0
jmp 0x28ef
movq 0x2823(%rip), %rax      # 0x4fd8
movq (%rax), %rsi
leaq 0xd1d(%rip), %rdi       # 0x34dc
callq 0x10d0
jmp 0x28ef
movq 0x2808(%rip), %rax      # 0x4fd8
movq (%rax), %rsi
leaq 0xd09(%rip), %rdi       # 0x34e3
callq 0x10d0
jmp 0x28ef
movq -0x38(%rbp), %rdi
addq $0x1, %rdi
leaq -0x24(%rbp), %rsi
callq 0x2090
leaq -0x24(%rbp), %rsi
leaq 0xcf0(%rip), %rdi       # 0x34f0
movb $0x0, %al
callq 0x10b0
movl $0x5, -0x3c(%rbp)
jmp 0x28ef
movq -0x38(%rbp), %rax
movsbl 0x1(%rax), %eax
andl $0xff, %eax
cmpl 0x290a(%rip), %eax      # 0x5130
jge 0x282a
jmp 0x2849
leaq 0xcc3(%rip), %rdi       # 0x34f4
leaq 0xcd5(%rip), %rsi       # 0x350d
movl $0x268, %edx            # imm = 0x268
leaq 0xcd3(%rip), %rcx       # 0x3517
callq 0x10c0
movq -0x38(%rbp), %rax
movsbl 0x1(%rax), %eax
andl $0xff, %eax
movslq %eax, %rcx
leaq 0x2900(%rip), %rax      # 0x5160
movq (%rax,%rcx,8), %rsi
movq -0x38(%rbp), %rax
movsbl 0x2(%rax), %edx
andl $0xff, %edx
movq -0x38(%rbp), %rax
movsbl 0x3(%rax), %eax
andl $0xff, %eax
shll $0x8, %eax
addl %eax, %edx
leaq 0xca6(%rip), %rdi       # 0x3531
movb $0x0, %al
callq 0x10b0
movl $0x4, -0x3c(%rbp)
jmp 0x28ef
movq -0x38(%rbp), %rax
movsbl 0x1(%rax), %esi
andl $0xff, %esi
movq -0x38(%rbp), %rax
movsbl 0x2(%rax), %eax
andl $0xff, %eax
shll $0x8, %eax
addl %eax, %esi
leaq 0xc72(%rip), %rdi       # 0x3534
movb $0x0, %al
callq 0x10b0
movl $0x3, -0x3c(%rbp)
jmp 0x28ef
movq -0x38(%rbp), %rax
movsbl (%rax), %esi
andl $0xff, %esi
leaq 0xc52(%rip), %rdi       # 0x3538
movb $0x0, %al
callq 0x10b0
jmp 0x2965
movl -0x3c(%rbp), %eax
addl -0x10(%rbp), %eax
movl %eax, -0x10(%rbp)
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0xa, %eax
je 0x2910
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0xb, %eax
jne 0x2912
jmp 0x2928
movl -0x3c(%rbp), %ecx
movq -0x38(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
jmp 0x268a
movq 0x26a9(%rip), %rax      # 0x4fd8
movq (%rax), %rsi
movl $0xa, %edi
callq 0x10f0
jmp 0x2960
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rcx
movsbl (%rax,%rcx), %esi
andl $0xff, %esi
leaq 0xbfe(%rip), %rdi       # 0x3555
movb $0x0, %al
callq 0x10b0
jmp 0x2965
jmp 0x2134
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)