LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/crossassemblers/macro11/rept_irpc.c
// Function: expand_irp
STREAM         *expand_irp(
    STACK *stack,
    char *cp)
{
    char           *label,
                   *items;
    BUFFER         *gb;
    int             levelmod = 0;
    IRP_STREAM     *str;

    label = get_symbol(cp, &cp, NULL);
    if (!label) {
        report(stack->top, "Illegal .IRP syntax\n");
        return NULL;
    }

    cp = skipdelim(cp);

    items = getstring(cp, &cp);
    if (!items) {
        report(stack->top, "Illegal .IRP syntax\n");
        free(label);
        return NULL;
    }

    gb = new_buffer();

    levelmod = 0;
    if (!list_md) {
        list_level--;
        levelmod++;
    }

    read_body(stack, gb, NULL, FALSE);

    list_level += levelmod;

    str = memcheck(malloc(sizeof(IRP_STREAM))); {
        char           *name = memcheck(malloc(strlen(stack->top->name) + 32));

        sprintf(name, "%s:%d->.IRP", stack->top->name, stack->top->line);
        buffer_stream_construct(&str->bstr, NULL, name);
        free(name);
    }

    str->bstr.stream.vtbl = &irp_stream_vtbl;

    str->body = gb;
    str->items = items;
    str->offset = 0;
    str->label = label;
    str->savecond = last_cond;

    return &str->bstr.stream;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rax
movq %rdi, %r14
movq %rsp, %rsi
movq %rax, (%rsi)
movq %rax, %rdi
xorl %edx, %edx
callq 0x8c1a
testq %rax, %rax
je 0x9c3d
movq %rax, %rbx
movq %rsp, %r15
movq (%r15), %rdi
callq 0x88b6
movq %rax, (%r15)
movq %rax, %rdi
movq %r15, %rsi
callq 0x8913
testq %rax, %rax
je 0x9c53
movq %rax, %r15
callq 0xdd0c
movq %rax, %r12
leaq 0xbef7(%rip), %rax      # 0x15a74
xorl %ebp, %ebp
cmpl $0x0, (%rax)
jne 0x9b92
leaq 0xbef5(%rip), %rax      # 0x15a80
decl (%rax)
movl $0x1, %ebp
movq %r14, %rdi
movq %r12, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x7d55
leaq 0xbed8(%rip), %rax      # 0x15a80
addl %ebp, (%rax)
movl $0x58, %edi
callq 0x2230
movq %rax, %rdi
callq 0xe34f
movq %rax, %r13
movq (%r14), %rax
movq 0x8(%rax), %rdi
callq 0x20e0
leaq 0x20(%rax), %rdi
callq 0x2230
movq %rax, %rdi
callq 0xe34f
movq %rax, %rbp
movq (%r14), %rax
movq 0x8(%rax), %rdx
movl 0x10(%rax), %ecx
leaq 0x6a95(%rip), %rsi      # 0x10685
movq %rbp, %rdi
xorl %eax, %eax
callq 0x22b0
movq %r13, %rdi
xorl %esi, %esi
movq %rbp, %rdx
callq 0xdf18
movq %rbp, %rdi
callq 0x2050
leaq 0xbea2(%rip), %rax      # 0x15ab8
movq %rax, (%r13)
movq %r12, 0x48(%r13)
movq %r15, 0x38(%r13)
movl $0x0, 0x40(%r13)
movq %rbx, 0x30(%r13)
leaq 0xd87b(%rip), %rax      # 0x174b0
movl (%rax), %eax
movl %eax, 0x50(%r13)
jmp 0x9c6f
movq (%r14), %rdi
leaq 0x6a29(%rip), %rsi      # 0x10670
xorl %r13d, %r13d
xorl %eax, %eax
callq 0x7b5a
jmp 0x9c6f
movq (%r14), %rdi
leaq 0x6a13(%rip), %rsi      # 0x10670
xorl %r13d, %r13d
xorl %eax, %eax
callq 0x7b5a
movq %rbx, %rdi
callq 0x2050
movq %r13, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/crossassemblers/macro11/rept_irpc.c
// Function: irpc_stream_gets
char           *irpc_stream_gets(
    STREAM *str)
{
    IRPC_STREAM    *istr = (IRPC_STREAM *) str;
    char           *cp;
    BUFFER         *buf;
    ARG            *arg;

    for (;;) {
        if ((cp = buffer_stream_gets(str)) != NULL)
            return cp;

        cp = istr->items + istr->offset;

        if (!*cp)
            return NULL;               /* No more items.  EOF. */

        arg = new_arg();
        arg->next = NULL;
        arg->locsym = 0;
        arg->label = istr->label;
        arg->value = memcheck(malloc(2));
        arg->value[0] = *cp++;
        arg->value[1] = 0;
        istr->offset = (int) (cp - istr->items);

        buf = subst_args(istr->body, arg);

        free(arg->value);
        free(arg);
        buffer_stream_set_buffer(&istr->bstr, buf);
        buffer_free(buf);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0xde89
testq %rax, %rax
jne 0x9d46
xorl %ebx, %ebx
movq 0x38(%r14), %r12
movslq 0x40(%r14), %rax
cmpb $0x0, (%r12,%rax)
je 0x9d49
addq %rax, %r12
callq 0x81d7
movq %rax, %r15
movq $0x0, (%rax)
movl $0x0, 0x8(%rax)
movq 0x30(%r14), %rax
movq %rax, 0x10(%r15)
movl $0x2, %edi
callq 0x2230
movq %rax, %rdi
callq 0xe34f
movq %rax, 0x18(%r15)
movb (%r12), %cl
movb %cl, (%rax)
movq 0x18(%r15), %rax
movb $0x0, 0x1(%rax)
movl 0x38(%r14), %eax
subl %eax, %r12d
incl %r12d
movl %r12d, 0x40(%r14)
movq 0x48(%r14), %rdi
movq %r15, %rsi
callq 0x8201
movq %rax, %r12
movq 0x18(%r15), %rdi
callq 0x2050
movq %r15, %rdi
callq 0x2050
movq %r14, %rdi
movq %r12, %rsi
callq 0xdf5d
movq %r12, %rdi
callq 0xdd78
movq %r14, %rdi
callq 0xde89
testq %rax, %rax
je 0x9c9c
movq %rax, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/crossassemblers/macro11/rept_irpc.c
// Function: expand_irpc
STREAM         *expand_irpc(
    STACK *stack,
    char *cp)
{
    char           *label,
                   *items;
    BUFFER         *gb;
    int             levelmod = 0;
    IRPC_STREAM    *str;

    label = get_symbol(cp, &cp, NULL);
    if (!label) {
        report(stack->top, "Illegal .IRPC syntax\n");
        return NULL;
    }

    cp = skipdelim(cp);

    items = getstring(cp, &cp);
    if (!items) {
        report(stack->top, "Illegal .IRPC syntax\n");
        free(label);
        return NULL;
    }

    gb = new_buffer();

    levelmod = 0;
    if (!list_md) {
        list_level--;
        levelmod++;
    }

    read_body(stack, gb, NULL, FALSE);

    list_level += levelmod;

    str = memcheck(malloc(sizeof(IRPC_STREAM))); {
        char           *name = memcheck(malloc(strlen(stack->top->name) + 32));

        sprintf(name, "%s:%d->.IRPC", stack->top->name, stack->top->line);
        buffer_stream_construct(&str->bstr, NULL, name);
        free(name);
    }

    str->bstr.stream.vtbl = &irpc_stream_vtbl;
    str->body = gb;
    str->items = items;
    str->offset = 0;
    str->label = label;
    str->savecond = last_cond;

    return &str->bstr.stream;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rax
movq %rdi, %r14
movq %rsp, %rsi
movq %rax, (%rsi)
movq %rax, %rdi
xorl %edx, %edx
callq 0x8c1a
testq %rax, %rax
je 0x9ea9
movq %rax, %rbx
movq %rsp, %r15
movq (%r15), %rdi
callq 0x88b6
movq %rax, (%r15)
movq %rax, %rdi
movq %r15, %rsi
callq 0x8913
testq %rax, %rax
je 0x9ebf
movq %rax, %r15
callq 0xdd0c
movq %rax, %r12
leaq 0xbc8b(%rip), %rax      # 0x15a74
xorl %ebp, %ebp
cmpl $0x0, (%rax)
jne 0x9dfe
leaq 0xbc89(%rip), %rax      # 0x15a80
decl (%rax)
movl $0x1, %ebp
movq %r14, %rdi
movq %r12, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x7d55
leaq 0xbc6c(%rip), %rax      # 0x15a80
addl %ebp, (%rax)
movl $0x58, %edi
callq 0x2230
movq %rax, %rdi
callq 0xe34f
movq %rax, %r13
movq (%r14), %rax
movq 0x8(%rax), %rdi
callq 0x20e0
leaq 0x20(%rax), %rdi
callq 0x2230
movq %rax, %rdi
callq 0xe34f
movq %rax, %rbp
movq (%r14), %rax
movq 0x8(%rax), %rdx
movl 0x10(%rax), %ecx
leaq 0x684b(%rip), %rsi      # 0x106a7
movq %rbp, %rdi
xorl %eax, %eax
callq 0x22b0
movq %r13, %rdi
xorl %esi, %esi
movq %rbp, %rdx
callq 0xdf18
movq %rbp, %rdi
callq 0x2050
leaq 0xbc4e(%rip), %rax      # 0x15ad0
movq %rax, (%r13)
movq %r12, 0x48(%r13)
movq %r15, 0x38(%r13)
movl $0x0, 0x40(%r13)
movq %rbx, 0x30(%r13)
leaq 0xd60f(%rip), %rax      # 0x174b0
movl (%rax), %eax
movl %eax, 0x50(%r13)
jmp 0x9edb
movq (%r14), %rdi
leaq 0x67de(%rip), %rsi      # 0x10691
xorl %r13d, %r13d
xorl %eax, %eax
callq 0x7b5a
jmp 0x9edb
movq (%r14), %rdi
leaq 0x67c8(%rip), %rsi      # 0x10691
xorl %r13d, %r13d
xorl %eax, %eax
callq 0x7b5a
movq %rbx, %rdi
callq 0x2050
movq %r13, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/crossassemblers/macro11/symbols.c
// Function: hash_name
int hash_name(
    char *label)
{
    unsigned        accum = 0;

    while (*label)
        accum = (accum << 1) ^ *label++;

    accum %= HASH_SIZE;

    return accum;
}

// Assembly:
movb (%rdi), %al
testb %al, %al
je 0x9f2f
incq %rdi
xorl %ecx, %ecx
movl %ecx, %edx
addl %ecx, %edx
movsbl %al, %ecx
xorl %edx, %ecx
movb (%rdi), %al
incq %rdi
testb %al, %al
jne 0x9efb
movl %ecx, %eax
imulq $0x401005, %rax, %rdx   # imm = 0x401005
shrq $0x20, %rdx
movl %ecx, %eax
subl %edx, %eax
shrl %eax
addl %edx, %eax
shrl $0x9, %eax
movl %eax, %edx
shll $0xa, %edx
subl %edx, %eax
addl %ecx, %eax
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/crossassemblers/macro11/symbols.c
// Function: symflags
char           *symflags(
    SYMBOL *sym)
{
    static char     temp[8];
    char           *fp = temp;

    if (sym->flags & SYMBOLFLAG_GLOBAL)
        *fp++ = 'G';
    if (sym->flags & SYMBOLFLAG_PERMANENT)
        *fp++ = 'P';
    if (sym->flags & SYMBOLFLAG_DEFINITION)
        *fp++ = 'D';
    *fp = 0;
    return fp;
}

// Assembly:
movl 0x10(%rdi), %ecx
testb $0x2, %cl
jne 0x9f43
leaq 0xd743(%rip), %rax      # 0x17684
jmp 0x9f51
movb $0x47, 0xd73a(%rip)     # 0x17684
leaq 0xd734(%rip), %rax      # 0x17685
testb $0x1, %cl
je 0x9f5c
movb $0x50, (%rax)
incq %rax
testb $0x8, %cl
je 0x9f67
movb $0x44, (%rax)
incq %rax
movb $0x0, (%rax)
retq
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/crossassemblers/macro11/symbols.c
// Function: free_sym
void free_sym(
    SYMBOL *sym)
{
    if (sym->label) {
        free(sym->label);
        sym->label = NULL;
    }
    free(sym);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x9f83
callq 0x2050
movq $0x0, (%rbx)
movq %rbx, %rdi
popq %rbx
jmp 0x2050
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/crossassemblers/macro11/symbols.c
// Function: remove_sym
void remove_sym(
    SYMBOL *sym,
    SYMBOL_TABLE *table)
{
    SYMBOL        **prevp,
                   *symp;
    int             hash;

    hash = hash_name(sym->label);
    prevp = &table->hash[hash];
    while (symp = *prevp, symp != NULL && symp != sym)
        prevp = &symp->next;

    if (symp)
        *prevp = sym->next;
}

// Assembly:
movq (%rdi), %rcx
movb (%rcx), %dl
xorl %eax, %eax
testb %dl, %dl
je 0x9fd0
incq %rcx
movl %eax, %r8d
addl %eax, %r8d
movsbl %dl, %eax
xorl %r8d, %eax
movb (%rcx), %dl
incq %rcx
testb %dl, %dl
jne 0x9f9a
movl %eax, %ecx
imulq $0x401005, %rcx, %rcx   # imm = 0x401005
shrq $0x20, %rcx
movl %eax, %edx
subl %ecx, %edx
shrl %edx
addl %ecx, %edx
shrl $0x9, %edx
movl %edx, %ecx
shll $0xa, %ecx
subl %ecx, %edx
addl %edx, %eax
leaq (%rsi,%rax,8), %rdx
movq %rdx, %rax
movq (%rdx), %rcx
testq %rcx, %rcx
je 0x9fe8
leaq 0x20(%rcx), %rdx
cmpq %rdi, %rcx
jne 0x9fd4
testq %rcx, %rcx
je 0x9ff4
movq 0x20(%rdi), %rcx
movq %rcx, (%rax)
retq
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/crossassemblers/macro11/symbols.c
// Function: lookup_sym
SYMBOL         *lookup_sym(
    char *label,
    SYMBOL_TABLE *table)
{
    unsigned        hash;
    SYMBOL         *sym;

    hash = hash_name(label);

    sym = table->hash[hash];
    while (sym && strcmp(sym->label, label) != 0)
        sym = sym->next;

    return sym;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movb (%rdi), %cl
xorl %eax, %eax
testb %cl, %cl
je 0xa03b
leaq 0x1(%rbx), %rdx
movl %eax, %edi
addl %eax, %edi
movsbl %cl, %eax
xorl %edi, %eax
movb (%rdx), %cl
incq %rdx
testb %cl, %cl
jne 0xa008
movl %eax, %ecx
imulq $0x401005, %rcx, %rcx   # imm = 0x401005
shrq $0x20, %rcx
movl %eax, %edx
subl %ecx, %edx
shrl %edx
addl %ecx, %edx
shrl $0x9, %edx
movl %edx, %ecx
shll $0xa, %ecx
subl %ecx, %edx
addl %edx, %eax
movq (%rsi,%rax,8), %r14
testq %r14, %r14
je 0xa059
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x21d0
testl %eax, %eax
je 0xa059
movq 0x20(%r14), %r14
jmp 0xa03f
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/crossassemblers/macro11/symbols.c
// Function: next_sym
SYMBOL         *next_sym(
    SYMBOL_TABLE *table,
    SYMBOL_ITER *iter)
{
    if (iter->current)
        iter->current = iter->current->next;

    while (iter->current == NULL) {
        if (iter->subscript >= HASH_SIZE)
            return NULL;               /* No more symbols. */
        iter->current = table->hash[iter->subscript];
        iter->subscript++;
    }

    return iter->current;              /* Got a symbol. */
}

// Assembly:
movq 0x8(%rsi), %rax
testq %rax, %rax
je 0xa075
movq 0x20(%rax), %rax
movq %rax, 0x8(%rsi)
movq 0x8(%rsi), %rax
testq %rax, %rax
jne 0xa0b7
movslq (%rsi), %rax
cmpl $0x400, %eax            # imm = 0x400
movl $0x3ff, %ecx            # imm = 0x3FF
cmovgel %eax, %ecx
subq %rax, %rcx
leaq (%rdi,%rax,8), %rdx
leal 0x1(%rax), %edi
xorl %r8d, %r8d
cmpq %r8, %rcx
je 0xa0b8
movq (%rdx,%r8,8), %rax
movq %rax, 0x8(%rsi)
leal (%rdi,%r8), %r9d
movl %r9d, (%rsi)
incq %r8
testq %rax, %rax
je 0xa09b
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/crossassemblers/macro11/symbols.c
// Function: sym_hist
void sym_hist(
    SYMBOL_TABLE *st,
    char *name)
{
    int             i;
    SYMBOL         *sym;

    fprintf(lstfile, "Histogram for symbol table %s\n", name);
    for (i = 0; i < 1023; i++) {
        fprintf(lstfile, "%4d: ", i);
        for (sym = st->hash[i]; sym != NULL; sym = sym->next)
            fputc('#', lstfile);
        fputc('\n', lstfile);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rdx
movq %rdi, %rbx
leaq 0xbcec(%rip), %r12      # 0x17660
movq (%r12), %rdi
leaq 0x5137(%rip), %rsi      # 0x10ab6
xorl %eax, %eax
callq 0x21e0
leaq 0x5148(%rip), %r14      # 0x10ad5
xorl %r15d, %r15d
movq (%r12), %rdi
movq %r14, %rsi
movl %r15d, %edx
xorl %eax, %eax
callq 0x21e0
movq (%rbx,%r15,8), %r13
testq %r13, %r13
je 0xb9be
movq (%r12), %rsi
movl $0x23, %edi
callq 0x2170
movq 0x20(%r13), %r13
jmp 0xb9a5
movq (%r12), %rsi
movl $0xa, %edi
callq 0x2170
incq %r15
cmpq $0x3ff, %r15            # imm = 0x3FF
jne 0xb990
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/crossassemblers/macro11/symbols.c
// Function: list_section
void list_section(
    SECTION *sec)
{
    if (sec == NULL) {
        fprintf(lstfile, "(null)\n");
        return;
    }

    int flags = sec->flags;

    fprintf(lstfile, "%-6s  %06o    %03d   ",
        sec->label, sec->size & 0177777, sec->sector);
    fprintf(lstfile, "(%s,%s,%s,%s,%s,%s)\n",
        (flags & PSECT_RO)   ? "RO"  : "RW",
        (flags & PSECT_DATA) ? "D"   : "I",
        (flags & PSECT_GBL)  ? "GBL" : "LCL",
        (flags & PSECT_REL)  ? "REL" : "ABS",
        (flags & PSECT_COM)  ? "OVR" : "CON",
        (flags & PSECT_SAV)  ? "SAV" : "NOSAV");
}

// Assembly:
testq %rdi, %rdi
je 0xbe82
pushq %r14
pushq %rbx
pushq %rax
movl 0xc(%rdi), %ebx
leaq 0xb897(%rip), %r14      # 0x17660
movq (%r14), %rax
movq (%rdi), %rdx
movzwl 0x14(%rdi), %ecx
movl 0x18(%rdi), %r8d
leaq 0x4d4c(%rip), %rsi      # 0x10b2a
movq %rax, %rdi
xorl %eax, %eax
callq 0x21e0
testb $0x10, %bl
leaq 0x40d0(%rip), %rax      # 0xfec2
leaq 0x4a17(%rip), %rdx      # 0x10810
cmoveq %rax, %rdx
testb %bl, %bl
leaq 0x4c71(%rip), %rax      # 0x10a77
leaq 0x4c98(%rip), %rcx      # 0x10aa5
cmovnsq %rax, %rcx
testb $0x40, %bl
leaq 0x40aa(%rip), %rax      # 0xfec5
leaq 0x3b64(%rip), %r8       # 0xf986
cmoveq %rax, %r8
movq (%r14), %rdi
testb $0x20, %bl
leaq 0x4079(%rip), %rax      # 0xfeac
leaq 0x4076(%rip), %r9       # 0xfeb0
cmoveq %rax, %r9
testb $0x4, %bl
leaq 0x4076(%rip), %rax      # 0xfebe
leaq 0x406b(%rip), %r10      # 0xfeba
cmoveq %rax, %r10
testb $0x1, %bl
leaq 0x4057(%rip), %rax      # 0xfeb4
leaq 0x4052(%rip), %r11      # 0xfeb6
cmoveq %rax, %r11
leaq 0x4cd1(%rip), %rsi      # 0x10b40
xorl %eax, %eax
pushq %r11
pushq %r10
callq 0x21e0
addq $0x18, %rsp
popq %rbx
popq %r14
retq
leaq 0xb7d7(%rip), %rax      # 0x17660
movq (%rax), %rcx
leaq 0x4c8f(%rip), %rdi      # 0x10b22
movl $0x7, %esi
movl $0x1, %edx
jmp 0x22d0
nop
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/crossassemblers/macro11/mlb-rsx.c
// Function: mlb_close
void mlb_close(
    MLB *mlb)
{
    if (mlb) {
        int             i;

        if (mlb->directory) {
            for (i = 0; i < mlb->nentries; i++)
                if (mlb->directory[i].label)
                    free(mlb->directory[i].label);
            free(mlb->directory);
        }
        if (mlb->fp)
            fclose(mlb->fp);

        free(mlb);
    }
}

// Assembly:
testq %rdi, %rdi
je 0xc28a
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpq $0x0, 0x8(%rdi)
je 0xc270
cmpl $0x0, 0x10(%rbx)
jle 0xc267
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x8(%rbx), %rax
movq (%rax,%r14), %rdi
testq %rdi, %rdi
je 0xc257
callq 0x2050
incq %r15
movslq 0x10(%rbx), %rax
addq $0x18, %r14
cmpq %rax, %r15
jl 0xc245
movq 0x8(%rbx), %rdi
callq 0x2050
movq (%rbx), %rdi
testq %rdi, %rdi
je 0xc27d
callq 0x20d0
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2050
retq
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/crossassemblers/macro11/mlb-rsx.c
// Function: mlb_extract
void mlb_extract(
    MLB *mlb)
{
    int             i;
    FILE           *fp;
    BUFFER         *buf;

    for (i = 0; i < mlb->nentries; i++) {
        char            name[32];

        buf = mlb_entry(mlb, mlb->directory[i].label);
        if (buf != NULL) {
            char *suffix = mlb->is_objlib ? "OBJ" : "MAC";
            sprintf(name, "%s.%s", mlb->directory[i].label, suffix);
            fp = fopen(name, "w");
            int length = buf->length;
            fwrite(buf->buffer, 1, length, fp);
            fclose(fp);
            buffer_free(buf);
        }
    }
}

// Assembly:
cmpl $0x0, 0x10(%rdi)
jle 0xc5ad
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq %rsp, %r15
xorl %r14d, %r14d
xorl %r12d, %r12d
movq 0x8(%rbx), %rax
movq (%rax,%r14), %rsi
movq %rbx, %rdi
callq 0xc28b
testq %rax, %rax
je 0xc58b
movq %rax, %r13
cmpl $0x0, 0x14(%rbx)
leaq 0x46e5(%rip), %rcx      # 0x10c15
leaq 0x38d0(%rip), %rax      # 0xfe07
cmoveq %rax, %rcx
movq 0x8(%rbx), %rax
movq (%rax,%r14), %rdx
movq %r15, %rdi
leaq 0x46cc(%rip), %rsi      # 0x10c19
xorl %eax, %eax
callq 0x22b0
movq %r15, %rdi
leaq 0x2c3b(%rip), %rsi      # 0xf199
callq 0x2270
movq %rax, %rbp
movslq 0xc(%r13), %rdx
movq (%r13), %rdi
movl $0x1, %esi
movq %rax, %rcx
callq 0x22d0
movq %rbp, %rdi
callq 0x20d0
movq %r13, %rdi
callq 0xdd78
incq %r12
movslq 0x10(%rbx), %rax
addq $0x18, %r14
cmpq %rax, %r12
jl 0xc50d
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/crossassemblers/macro11/object.c
// Function: gsd_flush
int gsd_flush(
    GSD * gsd)
{
    if (gsd->offset > 2) {
        if (!writerec(gsd->fp, gsd->buf, gsd->offset))
            return 0;
        gsd_init(gsd, gsd->fp);
    }
    return 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl 0x84(%rdi), %edx
movl $0x1, %ebx
cmpl $0x3, %edx
jl 0xc601
movq %rdi, %r14
movq (%rdi), %rdi
leaq 0x8(%r14), %rsi
callq 0xc60b
testl %eax, %eax
je 0xc5ff
movw $0x1, 0x8(%r14)
movl $0x2, 0x84(%r14)
jmp 0xc601
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/crossassemblers/macro11/object.c
// Function: gsd_write
static int gsd_write(
    GSD * gsd,
    char *name,
    int flags,
    int type,
    int value)
{
    char           *cp;
    unsigned        radtbl[2];

    if (gsd->offset > (int)sizeof(gsd->buf) - 8) {
        if (!gsd_flush(gsd))
            return 0;
    }

    rad50x2(name, radtbl);

    cp = gsd->buf + gsd->offset;
    *cp++ = radtbl[0] & 0xff;
    *cp++ = (radtbl[0] >> 8) & 0xff;
    *cp++ = radtbl[1] & 0xff;
    *cp++ = (radtbl[1] >> 8) & 0xff;

    *cp++ = flags;
    *cp++ = type;

    *cp++ = value & 0xff;
    *cp = (value >> 8) & 0xff;

    gsd->offset += 8;

    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %r13d
movl %ecx, %ebp
movl %edx, %r14d
movq %rsi, %r15
movq %rdi, %rbx
cmpl $0x73, 0x84(%rdi)
jl 0xc6b8
movq %rbx, %rdi
callq 0xc5c4
testl %eax, %eax
je 0xc714
movq %rsp, %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0xe63f
movslq 0x84(%rbx), %rax
movzwl (%r12), %ecx
movw %cx, 0x8(%rbx,%rax)
movl 0x4(%r12), %ecx
movb %cl, 0xa(%rbx,%rax)
movb %ch, 0xb(%rbx,%rax)
movb %r14b, 0xc(%rbx,%rax)
movb %bpl, 0xd(%rbx,%rax)
movl %r13d, %ecx
movb %cl, 0xe(%rbx,%rax)
movb %ch, 0xf(%rbx,%rax)
addl $0x8, 0x84(%rbx)
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
jmp 0xc705
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/crossassemblers/macro11/object.c
// Function: text_flush
int text_flush(
    TEXT_RLD *tr)
{
    if (tr->txt_offset > 4) {
        if (!writerec(tr->fp, tr->text, tr->txt_offset))
            return 0;
    }

    if (tr->rld_offset > 2) {
        if (!writerec(tr->fp, tr->rld, tr->rld_offset))
            return 0;
    }

    return 1;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0x8c(%rdi), %edx
cmpl $0x5, %edx
jl 0xc7e9
movq (%rbx), %rdi
leaq 0x8(%rbx), %rsi
callq 0xc60b
testl %eax, %eax
je 0xc811
movl 0x110(%rbx), %edx
cmpl $0x3, %edx
jl 0xc80a
movq (%rbx), %rdi
addq $0x90, %rbx
movq %rbx, %rsi
callq 0xc60b
testl %eax, %eax
je 0xc811
movl $0x1, %eax
jmp 0xc813
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/crossassemblers/macro11/object.c
// Function: text_word
int text_word(
    TEXT_RLD *tr,
    unsigned *addr,
    int size,
    unsigned word)
{
    if (!text_fit(tr, *addr, size, 0))
        return 0;

    text_word_i(tr, word, size);

    *addr += size;                     /* Update the caller's DOT */
    return 1;                          /* say "ok". */
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %r12d
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %rbp
movl (%rsi), %esi
xorl %r15d, %r15d
xorl %ecx, %ecx
callq 0xc87d
testl %eax, %eax
je 0xc871
movslq 0x8c(%rbp), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x8c(%rbp)
movl %r12d, %edx
movb %dl, 0x8(%rbp,%rax)
cmpl $0x2, %ebx
jl 0xc868
movslq 0x8c(%rbp), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x8c(%rbp)
movb %dh, 0x8(%rbp,%rax)
addl %ebx, (%r14)
movl $0x1, %r15d
movl %r15d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/crossassemblers/macro11/object.c
// Function: text_fit
static int text_fit(
    TEXT_RLD *tr,
    unsigned addr,
    int txtsize,
    int rldsize)
{
    if (tr->txt_offset + txtsize <= (int)sizeof(tr->text) &&
        tr->rld_offset + rldsize <= (int)sizeof(tr->rld) &&
        (txtsize == 0 || tr->txt_addr + tr->txt_offset - 4 == addr))
        return 1;                      /* All's well. */

    if (!text_flush(tr))
        return 0;
    text_init(tr, tr->fp, addr);

    return 1;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movl 0x8c(%rdi), %esi
leal (%rsi,%rdx), %eax
cmpl $0x80, %eax
jg 0xc8bb
addl 0x110(%rbx), %ecx
cmpl $0x80, %ecx
jg 0xc8bb
movl $0x1, %eax
testl %edx, %edx
je 0xc901
movl 0x88(%rbx), %ecx
addl %esi, %ecx
addl $-0x4, %ecx
cmpl %ebp, %ecx
je 0xc901
movq %rbx, %rdi
callq 0xc7ca
testl %eax, %eax
je 0xc8ff
movw $0x3, 0x8(%rbx)
movl %ebp, %eax
movb %al, 0xa(%rbx)
movb %ah, 0xb(%rbx)
movl $0x4, 0x8c(%rbx)
movw $0x4, 0x90(%rbx)
movl %ebp, 0x88(%rbx)
movl $0x2, 0x110(%rbx)
movl $0x1, %eax
jmp 0xc901
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/crossassemblers/macro11/object.c
// Function: text_internal_word
int text_internal_word(
    TEXT_RLD *tr,
    unsigned *addr,
    int size,
    unsigned word)
{
    if (!text_fit(tr, *addr, size, 4))
        return 0;

    text_word_i(tr, word, size);
    rld_code(tr, RLD_INT, *addr, size);
    rld_word(tr, word);

    *addr += size;

    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %r15d
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %rbp
movl (%rsi), %esi
movl $0x4, %ecx
callq 0xc87d
testl %eax, %eax
je 0xc9e1
movslq 0x8c(%rbp), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x8c(%rbp)
movl %r15d, %ecx
movb %cl, 0x8(%rbp,%rax)
cmpl $0x2, %ebx
jl 0xc961
movslq 0x8c(%rbp), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x8c(%rbp)
movl %r15d, %ecx
movb %ch, 0x8(%rbp,%rax)
movl (%r14), %eax
subl 0x88(%rbp), %eax
cmpl $0x1, %ebx
setne %cl
shlb $0x7, %cl
addb $-0x7f, %cl
movslq 0x110(%rbp), %rdx
leal 0x1(%rdx), %esi
movl %esi, 0x110(%rbp)
movb %cl, 0x90(%rbp,%rdx)
addb $0x4, %al
movslq 0x110(%rbp), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x110(%rbp)
movb %al, 0x90(%rbp,%rcx)
movslq 0x110(%rbp), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x110(%rbp)
movl %r15d, %edx
movb %dl, 0x90(%rbp,%rax)
movslq 0x110(%rbp), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x110(%rbp)
movb %dh, 0x90(%rbp,%rax)
addl %ebx, (%r14)
movl $0x1, %eax
jmp 0xc9e3
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/crossassemblers/macro11/object.c
// Function: text_global_word
int text_global_word(
    TEXT_RLD *tr,
    unsigned *addr,
    int size,
    unsigned word,
    char *global)
{
    unsigned        radtbl[2];

    if (!text_fit(tr, *addr, size, 6))
        return 0;

    text_word_i(tr, word, size);
    rld_code(tr, RLD_GLOBAL, *addr, size);

    rad50x2(global, radtbl);
    rld_word(tr, radtbl[0]);
    rld_word(tr, radtbl[1]);

    *addr += size;

    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %r8, %r15
movl %ecx, %ebx
movl %edx, %r12d
movq %rsi, %r14
movq %rdi, %rbp
movl (%rsi), %esi
movl $0x6, %ecx
callq 0xc87d
testl %eax, %eax
je 0xcb0b
movslq 0x8c(%rbp), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x8c(%rbp)
movb %bl, 0x8(%rbp,%rax)
cmpl $0x2, %r12d
jl 0xca4a
movslq 0x8c(%rbp), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x8c(%rbp)
movb %bh, 0x8(%rbp,%rax)
movl (%r14), %eax
subl 0x88(%rbp), %eax
cmpl $0x1, %r12d
setne %cl
shlb $0x7, %cl
addb $-0x7e, %cl
movslq 0x110(%rbp), %rdx
leal 0x1(%rdx), %esi
movl %esi, 0x110(%rbp)
movb %cl, 0x90(%rbp,%rdx)
addb $0x4, %al
movslq 0x110(%rbp), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x110(%rbp)
movb %al, 0x90(%rbp,%rcx)
leaq 0x8(%rsp), %rbx
movq %r15, %rdi
movq %rbx, %rsi
callq 0xe63f
movl (%rbx), %eax
movslq 0x110(%rbp), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x110(%rbp)
movb %al, 0x90(%rbp,%rcx)
movslq 0x110(%rbp), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x110(%rbp)
movb %ah, 0x90(%rbp,%rcx)
movl 0x4(%rbx), %eax
movslq 0x110(%rbp), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x110(%rbp)
movb %al, 0x90(%rbp,%rcx)
movslq 0x110(%rbp), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x110(%rbp)
movb %ah, 0x90(%rbp,%rcx)
addl %r12d, (%r14)
movl $0x1, %eax
jmp 0xcb0d
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/crossassemblers/macro11/object.c
// Function: text_displaced_word
int text_displaced_word(
    TEXT_RLD *tr,
    unsigned *addr,
    int size,
    unsigned word)
{
    if (!text_fit(tr, *addr, size, 4))
        return 0;

    text_word_i(tr, word, size);
    rld_code(tr, RLD_INT_DISP, *addr, size);
    rld_word(tr, word);

    *addr += size;

    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %r15d
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %rbp
movl (%rsi), %esi
movl $0x4, %ecx
callq 0xc87d
testl %eax, %eax
je 0xcbf3
movslq 0x8c(%rbp), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x8c(%rbp)
movl %r15d, %ecx
movb %cl, 0x8(%rbp,%rax)
cmpl $0x2, %ebx
jl 0xcb73
movslq 0x8c(%rbp), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x8c(%rbp)
movl %r15d, %ecx
movb %ch, 0x8(%rbp,%rax)
movl (%r14), %eax
subl 0x88(%rbp), %eax
cmpl $0x1, %ebx
setne %cl
shlb $0x7, %cl
addb $-0x7d, %cl
movslq 0x110(%rbp), %rdx
leal 0x1(%rdx), %esi
movl %esi, 0x110(%rbp)
movb %cl, 0x90(%rbp,%rdx)
addb $0x4, %al
movslq 0x110(%rbp), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x110(%rbp)
movb %al, 0x90(%rbp,%rcx)
movslq 0x110(%rbp), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x110(%rbp)
movl %r15d, %edx
movb %dl, 0x90(%rbp,%rax)
movslq 0x110(%rbp), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x110(%rbp)
movb %dh, 0x90(%rbp,%rax)
addl %ebx, (%r14)
movl $0x1, %eax
jmp 0xcbf5
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/crossassemblers/macro11/object.c
// Function: text_global_displaced_word
int text_global_displaced_word(
    TEXT_RLD *tr,
    unsigned *addr,
    int size,
    unsigned word,
    char *global)
{
    unsigned        radtbl[2];

    if (!text_fit(tr, *addr, size, 6))
        return 0;

    text_word_i(tr, word, size);
    rld_code(tr, RLD_GLOBAL_DISP, *addr, size);

    rad50x2(global, radtbl);
    rld_word(tr, radtbl[0]);
    rld_word(tr, radtbl[1]);

    *addr += size;

    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %r8, %r15
movl %ecx, %ebx
movl %edx, %r12d
movq %rsi, %r14
movq %rdi, %rbp
movl (%rsi), %esi
movl $0x6, %ecx
callq 0xc87d
testl %eax, %eax
je 0xcd1d
movslq 0x8c(%rbp), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x8c(%rbp)
movb %bl, 0x8(%rbp,%rax)
cmpl $0x2, %r12d
jl 0xcc5c
movslq 0x8c(%rbp), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x8c(%rbp)
movb %bh, 0x8(%rbp,%rax)
movl (%r14), %eax
subl 0x88(%rbp), %eax
cmpl $0x1, %r12d
setne %cl
shlb $0x7, %cl
addb $-0x7c, %cl
movslq 0x110(%rbp), %rdx
leal 0x1(%rdx), %esi
movl %esi, 0x110(%rbp)
movb %cl, 0x90(%rbp,%rdx)
addb $0x4, %al
movslq 0x110(%rbp), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x110(%rbp)
movb %al, 0x90(%rbp,%rcx)
leaq 0x8(%rsp), %rbx
movq %r15, %rdi
movq %rbx, %rsi
callq 0xe63f
movl (%rbx), %eax
movslq 0x110(%rbp), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x110(%rbp)
movb %al, 0x90(%rbp,%rcx)
movslq 0x110(%rbp), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x110(%rbp)
movb %ah, 0x90(%rbp,%rcx)
movl 0x4(%rbx), %eax
movslq 0x110(%rbp), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x110(%rbp)
movb %al, 0x90(%rbp,%rcx)
movslq 0x110(%rbp), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x110(%rbp)
movb %ah, 0x90(%rbp,%rcx)
addl %r12d, (%r14)
movl $0x1, %eax
jmp 0xcd1f
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/crossassemblers/macro11/object.c
// Function: text_global_offset_word
int text_global_offset_word(
    TEXT_RLD *tr,
    unsigned *addr,
    int size,
    unsigned word,
    char *global)
{
    unsigned        radtbl[2];

    if (word == 0)
        return text_global_word(tr, addr, size, word, global);

    if (!text_fit(tr, *addr, size, 8))
        return 0;

    text_word_i(tr, word, size);

    rld_code(tr, RLD_GLOBAL_OFFSET, *addr, size);

    rad50x2(global, radtbl);
    rld_word(tr, radtbl[0]);
    rld_word(tr, radtbl[1]);
    rld_word(tr, word);

    *addr += size;

    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r12
movl %edx, %r15d
movq %rsi, %r14
movq %rdi, %rbp
testl %ecx, %ecx
je 0xce86
movl %ecx, %ebx
movl (%r14), %esi
movq %rbp, %rdi
movl %r15d, %edx
movl $0x8, %ecx
callq 0xc87d
testl %eax, %eax
je 0xcea7
movslq 0x8c(%rbp), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x8c(%rbp)
movb %bl, 0x8(%rbp,%rax)
cmpl $0x2, %r15d
jl 0xcd96
movslq 0x8c(%rbp), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x8c(%rbp)
movb %bh, 0x8(%rbp,%rax)
movl (%r14), %eax
subl 0x88(%rbp), %eax
cmpl $0x1, %r15d
setne %cl
shlb $0x7, %cl
addb $-0x7b, %cl
movslq 0x110(%rbp), %rdx
leal 0x1(%rdx), %esi
movl %esi, 0x110(%rbp)
movb %cl, 0x90(%rbp,%rdx)
addb $0x4, %al
movslq 0x110(%rbp), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x110(%rbp)
movb %al, 0x90(%rbp,%rcx)
movq %rsp, %r13
movq %r12, %rdi
movq %r13, %rsi
callq 0xe63f
movl (%r13), %eax
movslq 0x110(%rbp), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x110(%rbp)
movb %al, 0x90(%rbp,%rcx)
movslq 0x110(%rbp), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x110(%rbp)
movb %ah, 0x90(%rbp,%rcx)
movl 0x4(%r13), %eax
movslq 0x110(%rbp), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x110(%rbp)
movb %al, 0x90(%rbp,%rcx)
movslq 0x110(%rbp), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x110(%rbp)
movb %ah, 0x90(%rbp,%rcx)
movslq 0x110(%rbp), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x110(%rbp)
movb %bl, 0x90(%rbp,%rax)
movslq 0x110(%rbp), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x110(%rbp)
movb %bh, 0x90(%rbp,%rax)
addl %r15d, (%r14)
movl $0x1, %eax
jmp 0xcea9
movq %rbp, %rdi
movq %r14, %rsi
movl %r15d, %edx
xorl %ecx, %ecx
movq %r12, %r8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xc9ee
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/crossassemblers/macro11/object.c
// Function: text_global_displaced_offset_word
int text_global_displaced_offset_word(
    TEXT_RLD *tr,
    unsigned *addr,
    int size,
    unsigned word,
    char *global)
{
    unsigned        radtbl[2];

    if (word == 0)
        return text_global_displaced_word(tr, addr, size, word, global);

    if (!text_fit(tr, *addr, size, 8))
        return 0;

    text_word_i(tr, word, size);
    rld_code(tr, RLD_GLOBAL_OFFSET_DISP, *addr, size);

    rad50x2(global, radtbl);
    rld_word(tr, radtbl[0]);
    rld_word(tr, radtbl[1]);
    rld_word(tr, word);

    *addr += size;

    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r12
movl %edx, %r15d
movq %rsi, %r14
movq %rdi, %rbp
testl %ecx, %ecx
je 0xd012
movl %ecx, %ebx
movl (%r14), %esi
movq %rbp, %rdi
movl %r15d, %edx
movl $0x8, %ecx
callq 0xc87d
testl %eax, %eax
je 0xd033
movslq 0x8c(%rbp), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x8c(%rbp)
movb %bl, 0x8(%rbp,%rax)
cmpl $0x2, %r15d
jl 0xcf22
movslq 0x8c(%rbp), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x8c(%rbp)
movb %bh, 0x8(%rbp,%rax)
movl (%r14), %eax
subl 0x88(%rbp), %eax
cmpl $0x1, %r15d
setne %cl
shlb $0x7, %cl
addb $-0x7a, %cl
movslq 0x110(%rbp), %rdx
leal 0x1(%rdx), %esi
movl %esi, 0x110(%rbp)
movb %cl, 0x90(%rbp,%rdx)
addb $0x4, %al
movslq 0x110(%rbp), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x110(%rbp)
movb %al, 0x90(%rbp,%rcx)
movq %rsp, %r13
movq %r12, %rdi
movq %r13, %rsi
callq 0xe63f
movl (%r13), %eax
movslq 0x110(%rbp), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x110(%rbp)
movb %al, 0x90(%rbp,%rcx)
movslq 0x110(%rbp), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x110(%rbp)
movb %ah, 0x90(%rbp,%rcx)
movl 0x4(%r13), %eax
movslq 0x110(%rbp), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x110(%rbp)
movb %al, 0x90(%rbp,%rcx)
movslq 0x110(%rbp), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x110(%rbp)
movb %ah, 0x90(%rbp,%rcx)
movslq 0x110(%rbp), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x110(%rbp)
movb %bl, 0x90(%rbp,%rax)
movslq 0x110(%rbp), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x110(%rbp)
movb %bh, 0x90(%rbp,%rax)
addl %r15d, (%r14)
movl $0x1, %eax
jmp 0xd035
movq %rbp, %rdi
movq %r14, %rsi
movl %r15d, %edx
xorl %ecx, %ecx
movq %r12, %r8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xcc00
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/crossassemblers/macro11/object.c
// Function: text_define_location
int text_define_location(
    TEXT_RLD *tr,
    char *name,
    unsigned *addr)
{
    unsigned        radtbl[2];

    if (!text_fit(tr, *addr, 0, 8))    /* No text space used */
        return 0;

    rld_code_naddr(tr, RLD_LOCDEF, 2); /* RLD code for "location
                                          counter def" with no offset */

    rad50x2(name, radtbl);
    rld_word(tr, radtbl[0]);           /* Set current section name */
    rld_word(tr, radtbl[1]);
    rld_word(tr, *addr);               /* Set current location addr */

    if (!text_flush(tr))               /* Flush that block out. */
        return 0;

    text_init(tr, tr->fp, *addr);      /* Set new text address */

    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movl (%rdx), %esi
xorl %ebp, %ebp
xorl %edx, %edx
movl $0x8, %ecx
callq 0xc87d
testl %eax, %eax
je 0xd18a
movslq 0x110(%rbx), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x110(%rbx)
movb $0x7, 0x90(%rbx,%rax)
movslq 0x110(%rbx), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x110(%rbx)
movb $0x0, 0x90(%rbx,%rax)
leaq 0x8(%rsp), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0xe63f
movl (%r12), %eax
movslq 0x110(%rbx), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x110(%rbx)
movb %al, 0x90(%rbx,%rcx)
movslq 0x110(%rbx), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x110(%rbx)
movb %ah, 0x90(%rbx,%rcx)
movl 0x4(%r12), %eax
movslq 0x110(%rbx), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x110(%rbx)
movb %al, 0x90(%rbx,%rcx)
movslq 0x110(%rbx), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x110(%rbx)
movb %ah, 0x90(%rbx,%rcx)
movl (%r14), %eax
movslq 0x110(%rbx), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x110(%rbx)
movb %al, 0x90(%rbx,%rcx)
movslq 0x110(%rbx), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x110(%rbx)
movb %ah, 0x90(%rbx,%rcx)
movq %rbx, %rdi
callq 0xc7ca
testl %eax, %eax
je 0xd18a
movl (%r14), %eax
movw $0x3, 0x8(%rbx)
movb %al, 0xa(%rbx)
movb %ah, 0xb(%rbx)
movl $0x4, 0x8c(%rbx)
movw $0x4, 0x90(%rbx)
movl %eax, 0x88(%rbx)
movl $0x2, 0x110(%rbx)
movl $0x1, %ebp
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/crossassemblers/macro11/object.c
// Function: text_modify_location
int text_modify_location(
    TEXT_RLD *tr,
    unsigned *addr)
{
    if (!text_fit(tr, *addr, 0, 4))    /* No text space used */
        return 0;

    rld_code_naddr(tr, RLD_LOCMOD, 2); /* RLD code for "location
                                          counter mod" with no offset */
    rld_word(tr, *addr);               /* Set current location addr */

    if (!text_flush(tr))               /* Flush that block out. */
        return 0;
    text_init(tr, tr->fp, *addr);      /* Set new text address */

    return 1;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movl (%rsi), %esi
xorl %ebp, %ebp
xorl %edx, %edx
movl $0x4, %ecx
callq 0xc87d
testl %eax, %eax
je 0xd25f
movslq 0x110(%rbx), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x110(%rbx)
movb $0x8, 0x90(%rbx,%rax)
movslq 0x110(%rbx), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x110(%rbx)
movb $0x0, 0x90(%rbx,%rax)
movl (%r14), %eax
movslq 0x110(%rbx), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x110(%rbx)
movb %al, 0x90(%rbx,%rcx)
movslq 0x110(%rbx), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x110(%rbx)
movb %ah, 0x90(%rbx,%rcx)
movq %rbx, %rdi
callq 0xc7ca
testl %eax, %eax
je 0xd25f
movl (%r14), %eax
movw $0x3, 0x8(%rbx)
movb %al, 0xa(%rbx)
movb %ah, 0xb(%rbx)
movl $0x4, 0x8c(%rbx)
movw $0x4, 0x90(%rbx)
movl %eax, 0x88(%rbx)
movl $0x2, 0x110(%rbx)
movl $0x1, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/crossassemblers/macro11/object.c
// Function: text_limits
int text_limits(
    TEXT_RLD *tr,
    unsigned *addr)
{
    if (!text_fit(tr, *addr, 4, 2))
        return 0;

    text_word_i(tr, 0, 2);
    text_word_i(tr, 0, 2);
    rld_code(tr, RLD_LIMITS, *addr, 2);

    *addr += 4;

    return 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl (%rsi), %esi
movl $0x4, %edx
movl $0x2, %ecx
callq 0xc87d
testl %eax, %eax
je 0xd32b
movslq 0x8c(%r14), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x8c(%r14)
xorl %ecx, %ecx
movb %cl, 0x8(%r14,%rax)
movslq 0x8c(%r14), %rax
leal 0x1(%rax), %edx
movl %edx, 0x8c(%r14)
movb %cl, 0x8(%r14,%rax)
movslq 0x8c(%r14), %rax
leal 0x1(%rax), %edx
movl %edx, 0x8c(%r14)
movb %cl, 0x8(%r14,%rax)
movslq 0x8c(%r14), %rax
leal 0x1(%rax), %edx
movl %edx, 0x8c(%r14)
movb %cl, 0x8(%r14,%rax)
movl (%rbx), %eax
subl 0x88(%r14), %eax
movslq 0x110(%r14), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x110(%r14)
movb $0x9, 0x90(%r14,%rcx)
addb $0x4, %al
movslq 0x110(%r14), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x110(%r14)
movb %al, 0x90(%r14,%rcx)
addl $0x4, (%rbx)
movl $0x1, %eax
jmp 0xd32d
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/crossassemblers/macro11/object.c
// Function: text_psect_offset_word
int text_psect_offset_word(
    TEXT_RLD *tr,
    unsigned *addr,
    int size,
    unsigned word,
    char *name)
{
    unsigned        radtbl[2];

#if OPTIMIZE_ZERO_OFFSET
    if (word == 0)
        return text_psect_word(tr, addr, size, word, name);
#endif

    if (!text_fit(tr, *addr, size, 8))
        return 0;

    text_word_i(tr, word, size);

    rld_code(tr, RLD_PSECT_OFFSET, *addr, size);

    rad50x2(name, radtbl);
    rld_word(tr, radtbl[0]);
    rld_word(tr, radtbl[1]);
    rld_word(tr, word);

    *addr += size;

    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r15
movl %ecx, %r13d
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %rbp
movl (%rsi), %esi
movl $0x8, %ecx
callq 0xc87d
testl %eax, %eax
je 0xd5b4
movslq 0x8c(%rbp), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x8c(%rbp)
movl %r13d, %ecx
movb %cl, 0x8(%rbp,%rax)
cmpl $0x2, %ebx
jl 0xd4c1
movslq 0x8c(%rbp), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x8c(%rbp)
movl %r13d, %ecx
movb %ch, 0x8(%rbp,%rax)
movl (%r14), %eax
subl 0x88(%rbp), %eax
cmpl $0x1, %ebx
setne %cl
shlb $0x7, %cl
addb $-0x73, %cl
movslq 0x110(%rbp), %rdx
leal 0x1(%rdx), %esi
movl %esi, 0x110(%rbp)
movb %cl, 0x90(%rbp,%rdx)
addb $0x4, %al
movslq 0x110(%rbp), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x110(%rbp)
movb %al, 0x90(%rbp,%rcx)
movq %rsp, %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0xe63f
movl (%r12), %eax
movslq 0x110(%rbp), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x110(%rbp)
movb %al, 0x90(%rbp,%rcx)
movslq 0x110(%rbp), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x110(%rbp)
movb %ah, 0x90(%rbp,%rcx)
movl 0x4(%r12), %eax
movslq 0x110(%rbp), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x110(%rbp)
movb %al, 0x90(%rbp,%rcx)
movslq 0x110(%rbp), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x110(%rbp)
movb %ah, 0x90(%rbp,%rcx)
movslq 0x110(%rbp), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x110(%rbp)
movl %r13d, %edx
movb %dl, 0x90(%rbp,%rax)
movslq 0x110(%rbp), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x110(%rbp)
movb %dh, 0x90(%rbp,%rax)
addl %ebx, (%r14)
movl $0x1, %eax
jmp 0xd5b6
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/crossassemblers/macro11/object.c
// Function: text_psect_displaced_word
int text_psect_displaced_word(
    TEXT_RLD *tr,
    unsigned *addr,
    int size,
    unsigned word,
    char *name)
{
    unsigned        radtbl[2];

    if (!text_fit(tr, *addr, size, 6))
        return 0;

    text_word_i(tr, word, size);

    rld_code(tr, RLD_PSECT_DISP, *addr, size);

    rad50x2(name, radtbl);
    rld_word(tr, radtbl[0]);
    rld_word(tr, radtbl[1]);

    *addr += size;

    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %r8, %r15
movl %ecx, %ebx
movl %edx, %r12d
movq %rsi, %r14
movq %rdi, %rbp
movl (%rsi), %esi
movl $0x6, %ecx
callq 0xc87d
testl %eax, %eax
je 0xd6e2
movslq 0x8c(%rbp), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x8c(%rbp)
movb %bl, 0x8(%rbp,%rax)
cmpl $0x2, %r12d
jl 0xd621
movslq 0x8c(%rbp), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x8c(%rbp)
movb %bh, 0x8(%rbp,%rax)
movl (%r14), %eax
subl 0x88(%rbp), %eax
cmpl $0x1, %r12d
setne %cl
shlb $0x7, %cl
addb $-0x74, %cl
movslq 0x110(%rbp), %rdx
leal 0x1(%rdx), %esi
movl %esi, 0x110(%rbp)
movb %cl, 0x90(%rbp,%rdx)
addb $0x4, %al
movslq 0x110(%rbp), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x110(%rbp)
movb %al, 0x90(%rbp,%rcx)
leaq 0x8(%rsp), %rbx
movq %r15, %rdi
movq %rbx, %rsi
callq 0xe63f
movl (%rbx), %eax
movslq 0x110(%rbp), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x110(%rbp)
movb %al, 0x90(%rbp,%rcx)
movslq 0x110(%rbp), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x110(%rbp)
movb %ah, 0x90(%rbp,%rcx)
movl 0x4(%rbx), %eax
movslq 0x110(%rbp), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x110(%rbp)
movb %al, 0x90(%rbp,%rcx)
movslq 0x110(%rbp), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x110(%rbp)
movb %ah, 0x90(%rbp,%rcx)
addl %r12d, (%r14)
movl $0x1, %eax
jmp 0xd6e4
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/crossassemblers/macro11/object.c
// Function: text_psect_displaced_offset_word
int text_psect_displaced_offset_word(
    TEXT_RLD *tr,
    unsigned *addr,
    int size,
    unsigned word,
    char *name)
{
    unsigned        radtbl[2];

#if OPTIMIZE_ZERO_OFFSET
    if (word == 0)
        return text_psect_displaced_word(tr, addr, size, word, name);
#endif

    if (!text_fit(tr, *addr, size, 8))
        return 0;

    text_word_i(tr, word, size);

    rld_code(tr, RLD_PSECT_OFFSET_DISP, *addr, size);

    rad50x2(name, radtbl);
    rld_word(tr, radtbl[0]);
    rld_word(tr, radtbl[1]);
    rld_word(tr, word);

    *addr += size;

    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r15
movl %ecx, %r13d
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %rbp
movl (%rsi), %esi
movl $0x8, %ecx
callq 0xc87d
testl %eax, %eax
je 0xd844
movslq 0x8c(%rbp), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x8c(%rbp)
movl %r13d, %ecx
movb %cl, 0x8(%rbp,%rax)
cmpl $0x2, %ebx
jl 0xd751
movslq 0x8c(%rbp), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x8c(%rbp)
movl %r13d, %ecx
movb %ch, 0x8(%rbp,%rax)
movl (%r14), %eax
subl 0x88(%rbp), %eax
cmpl $0x1, %ebx
setne %cl
shlb $0x7, %cl
addb $-0x72, %cl
movslq 0x110(%rbp), %rdx
leal 0x1(%rdx), %esi
movl %esi, 0x110(%rbp)
movb %cl, 0x90(%rbp,%rdx)
addb $0x4, %al
movslq 0x110(%rbp), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x110(%rbp)
movb %al, 0x90(%rbp,%rcx)
movq %rsp, %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0xe63f
movl (%r12), %eax
movslq 0x110(%rbp), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x110(%rbp)
movb %al, 0x90(%rbp,%rcx)
movslq 0x110(%rbp), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x110(%rbp)
movb %ah, 0x90(%rbp,%rcx)
movl 0x4(%r12), %eax
movslq 0x110(%rbp), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x110(%rbp)
movb %al, 0x90(%rbp,%rcx)
movslq 0x110(%rbp), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x110(%rbp)
movb %ah, 0x90(%rbp,%rcx)
movslq 0x110(%rbp), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x110(%rbp)
movl %r13d, %edx
movb %dl, 0x90(%rbp,%rax)
movslq 0x110(%rbp), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x110(%rbp)
movb %dh, 0x90(%rbp,%rax)
addl %ebx, (%r14)
movl $0x1, %eax
jmp 0xd846
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/crossassemblers/macro11/object.c
// Function: text_complex_add
static char    *text_complex_fit(
    TEXT_COMPLEX *tx,
    int size)
{
    int             len;

    if (tx->len + size > (int)sizeof(tx->accum))
        return NULL;                   /* Expression has grown too complex. */

    len = tx->len;

    tx->len += size;

    return tx->accum + len;
}

// Assembly:
movslq 0x80(%rdi), %rcx
xorl %eax, %eax
cmpq $0x7d, %rcx
jle 0xd873
xorl %edi, %edi
jmp 0xd87f
leal 0x1(%rcx), %edx
movl %edx, 0x80(%rdi)
addq %rcx, %rdi
testq %rdi, %rdi
je 0xd88c
movb $0x1, (%rdi)
movl $0x1, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/crossassemblers/macro11/object.c
// Function: text_complex_lit
int text_complex_lit(
    TEXT_COMPLEX *tx,
    unsigned word)
{
    char           *cp = text_complex_fit(tx, 3);

    if (!cp)
        return 0;
    *cp++ = CPLX_CONST;
    *cp++ = word & 0xff;
    *cp = (word >> 8) & 0xff;
    return 1;
}

// Assembly:
movl %esi, %ecx
movslq 0x80(%rdi), %rdx
xorl %eax, %eax
cmpq $0x7b, %rdx
jle 0xda0a
xorl %edi, %edi
jmp 0xda16
leal 0x3(%rdx), %esi
movl %esi, 0x80(%rdi)
addq %rdx, %rdi
testq %rdi, %rdi
je 0xda29
movb $0x10, (%rdi)
movb %cl, 0x1(%rdi)
movb %ch, 0x2(%rdi)
movl $0x1, %eax
retq