LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/crossassemblers/macro11/assemble_aux.c
// Function: eval_defined
int eval_defined(
    EX_TREE *value)
{
    switch (value->type) {
    case EX_LIT:
        return 1;
    case EX_SYM:
        return 1;
    case EX_UNDEFINED_SYM:
        return 0;
    case EX_AND:
        return eval_defined(value->data.child.left) && eval_defined(value->data.child.right);
    case EX_OR:
        return eval_defined(value->data.child.left) || eval_defined(value->data.child.right);
    default:
        return 0;
    }
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %ebp
movl (%rbx), %eax
cmpl $0xc, %eax
jg 0x6690
jne 0x66a8
movq 0x10(%rbx), %rdi
callq 0x666d
testl %eax, %eax
jne 0x66a2
jmp 0x66b3
cmpl $0xd, %eax
jne 0x66b3
movq 0x10(%rbx), %rdi
callq 0x666d
testl %eax, %eax
jne 0x66b5
movq 0x18(%rbx), %rbx
jmp 0x6678
leal -0x1(%rax), %ecx
cmpl $0x2, %ecx
jb 0x66b5
cmpl $0x3, %eax
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/crossassemblers/macro11/assemble_aux.c
// Function: eval_undefined
int eval_undefined(
    EX_TREE *value)
{
    switch (value->type) {
    case EX_UNDEFINED_SYM:
        return 1;
    case EX_SYM:
        return 0;
    case EX_AND:
        return eval_undefined(value->data.child.left) && eval_undefined(value->data.child.right);
    case EX_OR:
        return eval_undefined(value->data.child.left) || eval_undefined(value->data.child.right);
    default:
        return 0;
    }
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %ebp
movl (%rbx), %eax
cmpl $0xc, %eax
jg 0x66e1
jne 0x66f9
movq 0x10(%rbx), %rdi
callq 0x66be
testl %eax, %eax
jne 0x66f3
jmp 0x6703
cmpl $0xd, %eax
jne 0x6703
movq 0x10(%rbx), %rdi
callq 0x66be
testl %eax, %eax
jne 0x6705
movq 0x18(%rbx), %rbx
jmp 0x66c9
cmpl $0x2, %eax
je 0x6703
cmpl $0x3, %eax
je 0x6705
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/crossassemblers/macro11/assemble_aux.c
// Function: push_cond
void push_cond(
    int ok,
    STREAM *str)
{
    last_cond++;
    assert(last_cond < MAX_CONDS);
    conds[last_cond].ok = ok;
    conds[last_cond].file = memcheck(strdup(str->name));
    conds[last_cond].line = str->line;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
leaq 0x10d96(%rip), %r14     # 0x174b0
movslq (%r14), %rcx
leaq 0x1(%rcx), %rax
movl %eax, (%r14)
cmpq $0xff, %rcx
jge 0x676a
movq %rsi, %rbx
leaq (%rax,%rax,2), %rax
leaq 0xf575(%rip), %r15      # 0x15cb0
movl %edi, (%r15,%rax,8)
movq 0x8(%rsi), %rdi
callq 0x22e0
movq %rax, %rdi
callq 0xe34f
movslq (%r14), %rcx
leaq (%rcx,%rcx,2), %rcx
movq %rax, 0x8(%r15,%rcx,8)
movl 0x10(%rbx), %eax
movl %eax, 0x10(%r15,%rcx,8)
popq %rbx
popq %r14
popq %r15
retq
leaq 0x9a97(%rip), %rdi      # 0x10208
leaq 0x9aa6(%rip), %rsi      # 0x1021e
leaq 0x9aae(%rip), %rcx      # 0x1022d
movl $0x233, %edx            # imm = 0x233
callq 0x2120
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/crossassemblers/macro11/assemble_aux.c
// Function: store_value
void store_value(
    STACK *stack,
    TEXT_RLD *tr,
    int size,
    EX_TREE *value)
{
    SYMBOL         *sym;
    unsigned        offset;

    implicit_gbl(value);               /* turn undefined symbols into globals */

    if (value->type == EX_LIT) {
        store_word(stack->top, tr, size, value->data.lit);
    } else if (!express_sym_offset(value, &sym, &offset)) {
        store_complex(stack->top, tr, size, value);
    } else {
        if ((sym->flags & (SYMBOLFLAG_GLOBAL | SYMBOLFLAG_DEFINITION)) == SYMBOLFLAG_GLOBAL) {
            store_global_offset_word(stack->top, tr, size, sym->value + offset, sym->label);
        } else if (sym->section != current_pc->section) {
            store_psect_offset_word(stack->top, tr, size, sym->value + offset, sym->section->label);
        } else {
            store_internal_word(stack->top, tr, size, sym->value + offset);
        }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r12
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
movq %rcx, %rdi
callq 0x5e0f
cmpl $0x1, (%r12)
jne 0x682d
movq (%r15), %rdi
movl 0x10(%r12), %ecx
movq %r14, %rsi
movl %ebx, %edx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x5ceb
leaq 0x10(%rsp), %rsi
leaq 0xc(%rsp), %rdx
movq %r12, %rdi
callq 0x5f2d
testl %eax, %eax
je 0x6875
movq 0x10(%rsp), %rax
movl 0x10(%rax), %ecx
andl $0xa, %ecx
cmpl $0x2, %ecx
jne 0x6890
movq (%r15), %rdi
movl 0xc(%rsp), %ecx
addl 0x8(%rax), %ecx
movq (%rax), %r8
movq %r14, %rsi
movl %ebx, %edx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x6487
movq (%r15), %rdi
movq %r14, %rsi
movl %ebx, %edx
movq %r12, %rcx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x65b6
movq 0x18(%rax), %rdx
leaq 0x10dad(%rip), %rsi     # 0x17648
movl 0xc(%rsp), %ecx
addl 0x8(%rax), %ecx
movq (%rsi), %rax
movq (%r15), %rdi
cmpq 0x18(%rax), %rdx
je 0x68c6
movq (%rdx), %r8
movq %r14, %rsi
movl %ebx, %edx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x654b
movq %r14, %rsi
movl %ebx, %edx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x64f2
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/crossassemblers/macro11/assemble_aux.c
// Function: do_word
int do_word(
    STACK *stack,
    TEXT_RLD *tr,
    char *cp,
    int size)
{
    int comma;

    if (size == 2 && (DOT & 1)) {
        report(stack->top, ".WORD on odd boundary\n");
        store_word(stack->top, tr, 1, 0);       /* Align it */
    }

    cp = skipwhite(cp);

    do {
        if (cp[0] == ',') {
            /* Empty expressions count as 0 */
            store_word(stack->top, tr, size, 0);
        } else {
            EX_TREE        *value = parse_expr(cp, 0);

            if (value->cp > cp) {
                store_value(stack, tr, size, value);

                cp = value->cp;
            } else {
                report(stack->top, "Invalid expression in .WORD\n");
                cp = "";                /* force loop to end */
            }

            free_tree(value);
        }
    } while (cp = skipdelim_comma(cp, &comma), !EOL(*cp));

    if (comma) {
        /* Trailing empty expressions count as 0 */
        store_word(stack->top, tr, size, 0);
    }

    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebx
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %r15
cmpl $0x2, %ecx
jne 0x6929
leaq 0x10d4b(%rip), %rax     # 0x17648
movq (%rax), %rax
testb $0x1, 0x8(%rax)
je 0x6929
movq (%r15), %rdi
leaq 0x9601(%rip), %rsi      # 0xff11
xorl %eax, %eax
callq 0x7b5a
movq (%r15), %rdi
movq %r14, %rsi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x5ceb
movq %r12, %rdi
callq 0x88a0
movq %rax, %rbp
leaq 0x4(%rsp), %r12
cmpb $0x2c, (%rbp)
jne 0x6950
movq (%r15), %rdi
movq %r14, %rsi
movl %ebx, %edx
xorl %ecx, %ecx
callq 0x5ceb
jmp 0x6999
movq %rbp, %rdi
xorl %esi, %esi
callq 0x90f8
movq %rax, %r13
cmpq %rbp, 0x8(%rax)
jbe 0x6979
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
movq %r13, %rcx
callq 0x67eb
movq 0x8(%r13), %rbp
jmp 0x6991
movq (%r15), %rdi
leaq 0x98c8(%rip), %rsi      # 0x1024b
xorl %eax, %eax
callq 0x7b5a
leaq 0xa190(%rip), %rbp      # 0x10b21
movq %r13, %rdi
callq 0x6e73
movq %rbp, %rdi
movq %r12, %rsi
callq 0x88e1
movq %rax, %rbp
movzbl (%rax), %eax
cmpq $0x3b, %rax
ja 0x6939
movabsq $0x800000000000401, %rcx # imm = 0x800000000000401
btq %rax, %rcx
jae 0x6939
cmpl $0x0, 0x4(%rsp)
je 0x69da
movq (%r15), %rdi
movq %r14, %rsi
movl %ebx, %edx
xorl %ecx, %ecx
callq 0x5ceb
movl $0x1, %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/assemble_aux.c
// Function: check_branch
int check_branch(
    STACK *stack,
    unsigned offset,
    int min,
    int max)
{
    int             s_offset;

    /* Sign-extend */
    if (offset & 0100000)
        s_offset = offset | ~0177777;
    else
        s_offset = offset & 077777;
    if (s_offset > max || s_offset < min) {
        char            temp[16];

        /* printf can't do signed octal. */
        my_ltoa(s_offset, temp, 8);
        report(stack->top, "Branch target out of range (distance=%s)\n", temp);
        return 0;
    }
    return 1;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl %esi, %edi
orl $0xffff0000, %edi       # imm = 0xFFFF0000
movl %esi, %eax
andl $0x7fff, %eax           # imm = 0x7FFF
testw %si, %si
cmovsl %edi, %eax
cmpl %ecx, %eax
setle %cl
cmpl %edx, %eax
setge %dl
movl $0x1, %ebp
testb %dl, %cl
jne 0x6a4a
movslq %eax, %rdi
movq %rsp, %r14
movq %r14, %rsi
movl $0x8, %edx
callq 0xe1dc
movq (%rbx), %rdi
leaq 0x982a(%rip), %rsi      # 0x10268
xorl %ebp, %ebp
movq %r14, %rdx
xorl %eax, %eax
callq 0x7b5a
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/crossassemblers/macro11/extree.c
// Function: dup_symbol
SYMBOL *dup_symbol(
    SYMBOL *sym)
{
    SYMBOL *res;

    if (sym == NULL) {
        return NULL;
    }

    res = memcheck(malloc(sizeof(SYMBOL)));
    res->label = memcheck(strdup(sym->label));
    res->flags = sym->flags;
    res->stmtno = sym->stmtno;
    res->next = NULL;
    res->section = sym->section;
    res->value = sym->value;

    return res;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x6f2f
movq %rdi, %rbx
movl $0x28, %edi
callq 0x2230
movq %rax, %rdi
callq 0xe34f
movq %rax, %r14
movq (%rbx), %rdi
callq 0x22e0
movq %rax, %rdi
callq 0xe34f
movq %rax, (%r14)
movl 0x10(%rbx), %eax
movl %eax, 0x10(%r14)
movl 0xc(%rbx), %eax
movl %eax, 0xc(%r14)
movq $0x0, 0x20(%r14)
movq 0x18(%rbx), %rax
movq %rax, 0x18(%r14)
movl 0x8(%rbx), %eax
movl %eax, 0x8(%r14)
jmp 0x6f32
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/crossassemblers/macro11/extree.c
// Function: dup_tree
EX_TREE *dup_tree(
    EX_TREE *tp)
{
    EX_TREE *res = NULL;

    if (tp == NULL) {
        return NULL;
    }

    res = new_ex_tree();
    res->type = tp->type;
    res->cp = tp->cp;

    switch (tp->type) {
    case EX_UNDEFINED_SYM:
    case EX_TEMP_SYM:
        res->data.symbol = dup_symbol(tp->data.symbol);
        break;

    /* The symbol reference in EX_SYM is not freed in free_tree() */
    case EX_SYM:
        res->data.symbol = tp->data.symbol;
        break;

    case EX_LIT:
        res->data.lit = tp->data.lit;
        break;

    case EX_COM:
    case EX_NEG:
    case EX_ERR:
        res->data.child.left = dup_tree(tp->data.child.left);
        break;

    case EX_ADD:
    case EX_SUB:
    case EX_MUL:
    case EX_DIV:
    case EX_AND:
    case EX_OR:
        res->data.child.left = dup_tree(tp->data.child.left);
        res->data.child.right = dup_tree(tp->data.child.right);
        break;
    }

    return res;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x6fa1
movq %rdi, %r14
movl $0x20, %edi
callq 0x2230
movq %rax, %rdi
callq 0xe34f
movq %rax, %rbx
movl (%r14), %eax
movl %eax, (%rbx)
movq 0x8(%r14), %rax
movq %rax, 0x8(%rbx)
movl (%r14), %eax
decl %eax
cmpl $0xc, %eax
ja 0x6fcc
leaq 0x93b0(%rip), %rcx      # 0x1032c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x10(%r14), %rdi
callq 0x6f3d
movq %rax, 0x10(%rbx)
movq 0x18(%r14), %rdi
callq 0x6f3d
movq %rax, 0x18(%rbx)
jmp 0x6fcc
xorl %ebx, %ebx
jmp 0x6fcc
movq 0x10(%r14), %rdi
callq 0x6f3d
jmp 0x6fc8
movq 0x10(%r14), %rdi
callq 0x6ed4
jmp 0x6fc8
movl 0x10(%r14), %eax
movl %eax, 0x10(%rbx)
jmp 0x6fcc
movq 0x10(%r14), %rax
movq %rax, 0x10(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/crossassemblers/macro11/extree.c
// Function: new_temp_sym
static EX_TREE *new_temp_sym(
    char *label,
    SECTION *section,
    unsigned value)
{
    SYMBOL         *sym;
    EX_TREE        *tp;

    sym = memcheck(malloc(sizeof(SYMBOL)));
    sym->label = memcheck(strdup(label));
    sym->flags = 0;
    sym->stmtno = stmtno;
    sym->next = NULL;
    sym->section = section;
    sym->value = value;

    tp = new_ex_tree();
    tp->type = EX_TEMP_SYM;
    tp->data.symbol = sym;

    return tp;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
movl $0x28, %edi
callq 0x2230
movq %rax, %rdi
callq 0xe34f
movq %rax, %r12
movq %r15, %rdi
callq 0x22e0
movq %rax, %rdi
callq 0xe34f
movq %rax, (%r12)
movl $0x0, 0x10(%r12)
leaq 0xe440(%rip), %rax      # 0x15b64
movl (%rax), %eax
movl %eax, 0xc(%r12)
movq $0x0, 0x20(%r12)
movq %r14, 0x18(%r12)
movl %ebx, 0x8(%r12)
movl $0x20, %edi
callq 0x2230
movq %rax, %rdi
callq 0xe34f
movl $0x4, (%rax)
movq %r12, 0x10(%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/extree.c
// Function: new_ex_lit
EX_TREE        *new_ex_lit(
    unsigned value)
{
    EX_TREE        *tp;

    tp = new_ex_tree();
    tp->type = EX_LIT;
    tp->data.lit = value;

    return tp;
}

// Assembly:
pushq %rbx
movl %edi, %ebx
movl $0x20, %edi
callq 0x2230
movq %rax, %rdi
callq 0xe34f
movl $0x1, (%rax)
movl %ebx, 0x10(%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/crossassemblers/macro11/extree.c
// Function: new_ex_bin
EX_TREE        *new_ex_bin(
    int type,
    EX_TREE *left,
    EX_TREE *right)
{
    EX_TREE        *tp;

    tp = new_ex_tree();
    tp->type = type;
    tp->data.child.left = left;
    tp->data.child.right = right;

    return tp;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movl %edi, %ebp
movl $0x20, %edi
callq 0x2230
movq %rax, %rdi
callq 0xe34f
movl %ebp, (%rax)
movq %r14, 0x10(%rax)
movq %rbx, 0x18(%rax)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/crossassemblers/macro11/extree.c
// Function: ex_err
EX_TREE        *ex_err(
    EX_TREE *tp,
    char *cp)
{
    EX_TREE        *errtp;

    errtp = new_ex_tree();
    errtp->cp = cp;
    errtp->type = EX_ERR;
    errtp->data.child.left = tp;

    return errtp;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl $0x20, %edi
callq 0x2230
movq %rax, %rdi
callq 0xe34f
movq %rbx, 0x8(%rax)
movl $0x7, (%rax)
movq %r14, 0x10(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/crossassemblers/macro11/listing.c
// Function: list_source
void list_source(
    STREAM *str,
    char *cp)
{
    if (dolist()) {
        int             len = strcspn(cp, "\n");

        /* Save the line text away for later... */
        if (listline)
            free(listline);
        listline = memcheck(malloc(len + 1));
        memcpy(listline, cp, len);
        listline[len] = 0;

        if (!binline)
            binline = memcheck(malloc(sizeof(LSTFORMAT) + 16));

        sprintf(binline, "%*s%*d", (int)SIZEOF_MEMBER(LSTFORMAT, flag), "", (int)SIZEOF_MEMBER(LSTFORMAT, line_number),
                str->line);
    }
}

// Assembly:
cmpq $0x0, 0xfe70(%rip)      # 0x17660
je 0x78e0
leaq 0xe363(%rip), %rax      # 0x15b60
cmpl $0x0, (%rax)
setle %al
cmpl $0x0, 0xfe5e(%rip)      # 0x17668
sete %cl
testb %cl, %al
jne 0x78e0
cmpl $0x0, 0xe264(%rip)      # 0x15a80
jle 0x78e0
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x92e9(%rip), %rsi      # 0x10b20
movq %r14, %rdi
callq 0x2180
movq %rax, %r15
movq 0xfe27(%rip), %rdi      # 0x17670
testq %rdi, %rdi
je 0x7853
callq 0x2050
leal 0x1(%r15), %eax
movslq %eax, %rdi
callq 0x2230
movq %rax, %rdi
callq 0xe34f
movq %rax, %r12
movq %rax, 0xfdff(%rip)      # 0x17670
movslq %r15d, %r15
movq %rax, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x2220
movb $0x0, (%r12,%r15)
cmpq $0x0, 0xfde9(%rip)      # 0x17678
jne 0x78aa
movl $0x39, %edi
callq 0x2230
movq %rax, %rdi
callq 0xe34f
movq %rax, 0xfdce(%rip)      # 0x17678
movq 0xfdc7(%rip), %rdi      # 0x17678
movl 0x10(%rbx), %r9d
leaq 0x8b97(%rip), %rsi      # 0x10453
leaq 0x925e(%rip), %rcx      # 0x10b21
movl $0x2, %edx
movl $0x6, %r8d
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x22b0
retq
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/crossassemblers/macro11/listing.c
// Function: list_flush
void list_flush(
    void)
{
    if (dolist()) {
        padto(binline, offsetof(LSTFORMAT, source));
        fputs(binline, lstfile);
        fputs(listline, lstfile);
        fputc('\n', lstfile);
        listline[0] = 0;
        binline[0] = 0;
    }
}

// Assembly:
cmpq $0x0, 0xfd77(%rip)      # 0x17660
je 0x7974
leaq 0xe26a(%rip), %rax      # 0x15b60
cmpl $0x0, (%rax)
setle %al
cmpl $0x0, 0xfd65(%rip)      # 0x17668
sete %cl
testb %cl, %al
jne 0x7974
cmpl $0x0, 0xe16f(%rip)      # 0x15a80
jle 0x7974
pushq %rax
movq 0xfd5d(%rip), %rdi      # 0x17678
movl $0x28, %esi
callq 0xe3c8
movq 0xfd4c(%rip), %rdi      # 0x17678
movq 0xfd2d(%rip), %rsi      # 0x17660
callq 0x2130
movq 0xfd31(%rip), %rdi      # 0x17670
movq 0xfd1a(%rip), %rsi      # 0x17660
callq 0x2130
movq 0xfd0e(%rip), %rsi      # 0x17660
movl $0xa, %edi
callq 0x2170
movq 0xfd0d(%rip), %rax      # 0x17670
xorl %ecx, %ecx
movb %cl, (%rax)
movq 0xfd0a(%rip), %rax      # 0x17678
movb %cl, (%rax)
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/crossassemblers/macro11/listing.c
// Function: list_value
void list_value(
    STREAM *str,
    unsigned word)
{
    if (dolist()) {
        /* Print the value and go */
        binline[0] = 0;
        sprintf(binline, "%*s%*d        %6.6o", (int)SIZEOF_MEMBER(LSTFORMAT, flag), "",
                (int)SIZEOF_MEMBER(LSTFORMAT, line_number), str->line, word & 0177777);
    }
}

// Assembly:
cmpq $0x0, 0xfce3(%rip)      # 0x17660
je 0x79dc
leaq 0xe1da(%rip), %rax      # 0x15b60
cmpl $0x0, (%rax)
setle %al
cmpl $0x0, 0xfcd5(%rip)      # 0x17668
sete %cl
testb %cl, %al
jne 0x79dc
cmpl $0x0, 0xe0df(%rip)      # 0x15a80
jle 0x79dc
pushq %rax
movq 0xfccd(%rip), %rax      # 0x17678
movb $0x0, (%rax)
movl 0x10(%rdi), %r9d
movzwl %si, %ecx
movl %ecx, (%rsp)
leaq 0x8a9b(%rip), %rsi      # 0x1045a
leaq 0x915b(%rip), %rcx      # 0x10b21
movq %rax, %rdi
movl $0x2, %edx
movl $0x6, %r8d
xorl %eax, %eax
callq 0x22b0
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/crossassemblers/macro11/listing.c
// Function: list_word
static int dolist(
    void)
{
    int             ok = lstfile != NULL &&
                         (pass > 0 || list_pass_0) &&
                         list_level > 0;

    return ok;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
cmpq $0x0, 0xfc74(%rip)      # 0x17660
je 0x7a6d
movl %ecx, %r14d
leaq 0xe168(%rip), %rax      # 0x15b60
cmpl $0x0, (%rax)
setle %al
cmpl $0x0, 0xfc63(%rip)      # 0x17668
sete %cl
testb %cl, %al
jne 0x7a6d
cmpl $0x0, 0xe06d(%rip)      # 0x15a80
jle 0x7a6d
movq %r8, %rbx
movl %edx, %ebp
callq 0x7a78
movq 0xfc52(%rip), %r15      # 0x17678
movq %r15, %rdi
callq 0x20e0
addq %rax, %r15
cmpl $0x1, %r14d
movl $0xff, %eax
movl $0xffff, %edx           # imm = 0xFFFF
cmovel %eax, %edx
leaq 0x8a25(%rip), %rax      # 0x1046e
leaq 0x8a2d(%rip), %rsi      # 0x1047d
cmoveq %rax, %rsi
andl %ebp, %edx
movq %r15, %rdi
movq %rbx, %rcx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x22b0
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/crossassemblers/macro11/listing.c
// Function: list_fit
static void list_fit(
    STREAM *str,
    unsigned addr)
{
    size_t          col1 = offsetof(LSTFORMAT, source);
    size_t          col2 = offsetof(LSTFORMAT, pc);

    if (strlen(binline) >= col1) {
        list_flush();
        listline[0] = 0;
        binline[0] = 0;
        sprintf(binline, "%*s %6.6o", (int)offsetof(LSTFORMAT, pc), "", addr);
        padto(binline, offsetof(LSTFORMAT, words));
    } else if (strlen(binline) <= col2) {
        sprintf(binline, "%*s%*d %6.6o", (int)SIZEOF_MEMBER(LSTFORMAT, flag), "",
                (int)SIZEOF_MEMBER(LSTFORMAT, line_number), str->line, addr);
        padto(binline, offsetof(LSTFORMAT, words));
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebx
movq %rdi, %r15
movq 0xfbeb(%rip), %r14      # 0x17678
movq %r14, %rdi
callq 0x20e0
cmpq $0x28, %rax
jb 0x7ad3
callq 0x78e1
movq 0xfbc9(%rip), %rax      # 0x17670
xorl %ecx, %ecx
movb %cl, (%rax)
movq 0xfbc6(%rip), %rdi      # 0x17678
movb %cl, (%rdi)
leaq 0x89df(%rip), %rsi      # 0x1049a
leaq 0x905f(%rip), %rcx      # 0x10b21
movl $0x8, %edx
movl %ebx, %r8d
xorl %eax, %eax
callq 0x22b0
jmp 0x7b03
cmpq $0x8, %rax
ja 0x7b1d
movl 0x10(%r15), %r9d
movl %ebx, (%rsp)
leaq 0x89bd(%rip), %rsi      # 0x104a4
leaq 0x9033(%rip), %rcx      # 0x10b21
movq %r14, %rdi
movl $0x2, %edx
movl $0x6, %r8d
xorl %eax, %eax
callq 0x22b0
movq 0xfb6e(%rip), %rdi      # 0x17678
movl $0x10, %esi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0xe3c8
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/crossassemblers/macro11/listing.c
// Function: report
void report(
    STREAM *str,
    char *fmt,
    ...)
{
    va_list         ap;
    char           *name = "**";
    int             line = 0;

    if (!pass && list_pass_0 < 2)
        return;                        /* Don't report now. */

    if (str) {
        name = str->name;
        line = str->line;
    }

    fprintf(stderr, "%s:%d: ***ERROR ", name, line);
    va_start(ap, fmt);
    vfprintf(stderr, fmt, ap);
    va_end(ap);

    if (lstfile) {
        fprintf(lstfile, "%s:%d: ***ERROR ", name, line);
        va_start(ap, fmt);
        vfprintf(lstfile, fmt, ap);
        va_end(ap);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rsi, %rbx
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x7bbd
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
leaq 0xdf9c(%rip), %rax      # 0x15b60
cmpl $0x0, (%rax)
jne 0x7be4
cmpl $0x2, 0xfa98(%rip)      # 0x17668
jge 0x7be4
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testq %rdi, %rdi
jne 0x7bf4
xorl %ebp, %ebp
leaq 0x8f03(%rip), %r14      # 0x10af5
jmp 0x7bfb
movq 0x8(%rdi), %r14
movl 0x10(%rdi), %ebp
movq 0xd3f6(%rip), %r15      # 0x14ff8
movq (%r15), %rdi
leaq 0x887d(%rip), %rsi      # 0x10489
movq %r14, %rdx
movl %ebp, %ecx
xorl %eax, %eax
callq 0x21e0
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rsp, %rdx
movq %rax, (%rdx)
leaq 0x110(%rsp), %r12
movq %r12, 0x8(%rdx)
leaq 0x20(%rsp), %r13
movq %r13, 0x10(%rdx)
movq (%r15), %rdi
movq %rbx, %rsi
callq 0x2280
movq 0xfa11(%rip), %rdi      # 0x17660
testq %rdi, %rdi
je 0x7bd2
leaq 0x882a(%rip), %rsi      # 0x10489
movq %r14, %rdx
movl %ebp, %ecx
xorl %eax, %eax
callq 0x21e0
movq %rsp, %rdx
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rdx)
movq %r12, 0x8(%rdx)
movq %r13, 0x10(%rdx)
movq 0xf9d6(%rip), %rdi      # 0x17660
movq %rbx, %rsi
callq 0x2280
jmp 0x7bd2
nop
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/crossassemblers/macro11/macros.c
// Function: new_macro_stream
STREAM         *new_macro_stream(
    STREAM *refstr,
    BUFFER *buf,
    MACRO *mac,
    int nargs)
{
    MACRO_STREAM   *mstr = memcheck(malloc(sizeof(MACRO_STREAM))); {
        char           *name = memcheck(malloc(strlen(refstr->name) + 32));

        sprintf(name, "%s:%d->%s", refstr->name, refstr->line, mac->sym.label);
        buffer_stream_construct(&mstr->bstr, buf, name);
        free(name);
    }

    mstr->bstr.stream.vtbl = &macro_stream_vtbl;
    mstr->nargs = nargs;  /* for .NARG directive: nonkeyword arguments in call*/
    mstr->cond = last_cond;
    return &mstr->bstr.stream;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebx
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %r13
movl $0x38, %edi
callq 0x2230
movq %rax, %rdi
callq 0xe34f
movq %rax, %r14
movq 0x8(%r13), %rdi
callq 0x20e0
leaq 0x20(%rax), %rdi
callq 0x2230
movq %rax, %rdi
callq 0xe34f
movq %rax, %rbp
movq 0x8(%r13), %rdx
movl 0x10(%r13), %ecx
movq (%r12), %r8
leaq 0x87c8(%rip), %rsi      # 0x104d0
movq %rax, %rdi
xorl %eax, %eax
callq 0x22b0
movq %r14, %rdi
movq %r15, %rsi
movq %rbp, %rdx
callq 0xdf18
movq %rbp, %rdi
callq 0x2050
leaq 0xdd59(%rip), %rax      # 0x15a88
movq %rax, (%r14)
movl %ebx, 0x30(%r14)
leaq 0xf773(%rip), %rax      # 0x174b0
movl (%rax), %eax
movl %eax, 0x34(%r14)
movq %r14, %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/macros.c
// Function: dumpmacro
void dumpmacro(
    MACRO *mac,
    FILE *fp)
{
    ARG            *arg;

    fprintf(fp, ".MACRO %s ", mac->sym.label);

    for (arg = mac->args; arg != NULL; arg = arg->next) {
        fputs(arg->label, fp);
        if (arg->value) {
            fputc('=', fp);
            fputs(arg->value, fp);
        }
        fputc(' ', fp);
    }
    fputc('\n', fp);

    fputs(mac->text->buffer, fp);

    fputs(".ENDM\n", fp);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rdx
leaq 0x8642(%rip), %rsi      # 0x10520
movq %rbx, %rdi
xorl %eax, %eax
callq 0x21e0
movq 0x28(%r14), %r15
testq %r15, %r15
je 0x7f2f
movq 0x10(%r15), %rdi
movq %rbx, %rsi
callq 0x2130
cmpq $0x0, 0x18(%r15)
je 0x7f1d
movl $0x3d, %edi
movq %rbx, %rsi
callq 0x2170
movq 0x18(%r15), %rdi
movq %rbx, %rsi
callq 0x2130
movl $0x20, %edi
movq %rbx, %rsi
callq 0x2170
movq (%r15), %r15
jmp 0x7eec
movl $0xa, %edi
movq %rbx, %rsi
callq 0x2170
movq 0x30(%r14), %rax
movq (%rax), %rdi
movq %rbx, %rsi
callq 0x2130
leaq 0x85d9(%rip), %rdi      # 0x1052b
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x2130
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/crossassemblers/macro11/macros.c
// Function: free_macro
void free_macro(
    MACRO *mac)
{
    if (mac->text) {
        free(mac->text);
    }
    free_args(mac->args);
    free_sym(&mac->sym);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x30(%rdi), %rdi
testq %rdi, %rdi
je 0x817c
callq 0x2050
movq 0x28(%rbx), %rdi
callq 0x87d1
movq %rbx, %rdi
popq %rbx
jmp 0x9f6b
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/crossassemblers/macro11/macros.c
// Function: new_macro
MACRO          *new_macro(
    char *label)
{
    MACRO          *mac = memcheck(malloc(sizeof(MACRO)));

    mac->sym.flags = 0;
    mac->sym.label = label;
    mac->sym.stmtno = stmtno;
    mac->sym.next = NULL;
    mac->sym.section = &macro_section;
    mac->sym.value = 0;
    mac->args = NULL;
    mac->text = NULL;

    return mac;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x38, %edi
callq 0x2230
movq %rax, %rdi
callq 0xe34f
xorl %ecx, %ecx
movl %ecx, 0x10(%rax)
movq %rbx, (%rax)
leaq 0xd9b1(%rip), %rdx      # 0x15b64
movl (%rdx), %edx
movl %edx, 0xc(%rax)
movq $0x0, 0x20(%rax)
leaq 0xd049(%rip), %rdx      # 0x15210
movq %rdx, 0x18(%rax)
movl %ecx, 0x8(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/crossassemblers/macro11/macros.c
// Function: new_arg
ARG            *new_arg(
    void)
{
    ARG            *arg = memcheck(malloc(sizeof(ARG)));

    arg->locsym = 0;
    arg->value = NULL;
    arg->next = NULL;
    arg->label = NULL;
    return arg;
}

// Assembly:
pushq %rax
movl $0x20, %edi
callq 0x2230
movq %rax, %rdi
callq 0xe34f
movl $0x0, 0x8(%rax)
movq $0x0, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/crossassemblers/macro11/macros.c
// Function: eval_str
char *eval_str(
    STREAM *refstr,
    char *arg)
{
    EX_TREE        *value = parse_expr(arg, 0);
    unsigned        word = 0;
    char            temp[10];

    if (value->type != EX_LIT) {
        report(refstr, "Constant value required\n");
    } else
        word = value->data.lit;

    free_tree(value);

    /* printf can't do base 2. */
    my_ultoa(word & 0177777, temp, radix);
    free(arg);
    arg = memcheck(strdup(temp));
    return arg;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r12
movq %rsi, %rdi
xorl %esi, %esi
callq 0x90f8
movq %rax, %r14
cmpl $0x1, (%rax)
jne 0x83a0
movzwl 0x10(%r14), %r15d
jmp 0x83b4
leaq 0x81bd(%rip), %rsi      # 0x10564
xorl %r15d, %r15d
movq %r12, %rdi
xorl %eax, %eax
callq 0x7b5a
movq %r14, %rdi
callq 0x6e73
leaq 0xcddd(%rip), %rax      # 0x151a0
movl (%rax), %edx
leaq 0xe(%rsp), %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0xe184
movq %rbx, %rdi
callq 0x2050
movq %r14, %rdi
callq 0x22e0
movq %rax, %rdi
callq 0xe34f
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/crossassemblers/macro11/macros.c
// Function: getstring_macarg
char           *getstring_macarg(
    STREAM *refstr,
    char *cp,
    char **endp)
{
    if (cp[0] == '\\') {
        char *str = getstring(cp + 1, endp);
        return eval_str(refstr, str);         /* Perform expression evaluation */
    } else {
        return getstring(cp, endp);
    }
}

// Assembly:
cmpb $0x5c, (%rsi)
jne 0x841c
pushq %rbx
movq %rdi, %rbx
incq %rsi
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x8913
movq %rbx, %rdi
movq %rax, %rsi
popq %rbx
jmp 0x8376
movq %rsi, %rdi
movq %rdx, %rsi
jmp 0x8913
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/crossassemblers/macro11/macros.c
// Function: free_args
static void free_args(
    ARG *arg)
{
    ARG            *next;

    while (arg) {
        next = arg->next;
        if (arg->label) {
            free(arg->label);
            arg->label = NULL;
        }
        if (arg->value) {
            free(arg->value);
            arg->value = NULL;
        }
        free(arg);
        arg = next;
    }
}

// Assembly:
testq %rdi, %rdi
je 0x8823
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rbx), %r14
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x87f6
callq 0x2050
movq $0x0, 0x10(%rbx)
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x880c
callq 0x2050
movq $0x0, 0x18(%rbx)
movq %rbx, %rdi
callq 0x2050
movq %r14, %rbx
testq %r14, %r14
jne 0x87dd
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/crossassemblers/macro11/macros.c
// Function: dump_all_macros
void dump_all_macros(
    void)
{
    MACRO          *mac;
    SYMBOL_ITER     iter;

    for (mac = (MACRO *) first_sym(&macro_st, &iter); mac != NULL; mac = (MACRO *) next_sym(&macro_st, &iter)) {
        dumpmacro(mac, lstfile);

        fprintf(lstfile, "\n\n");
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
leaq 0x14e82(%rip), %rdi     # 0x1d6b8
leaq 0x8(%rsp), %rsi
callq 0xa0bb
testq %rax, %rax
je 0x8891
leaq 0xee14(%rip), %r12      # 0x17660
leaq 0x82cc(%rip), %rbx      # 0x10b1f
leaq 0x14e5e(%rip), %r14     # 0x1d6b8
leaq 0x8(%rsp), %r15
movq (%r12), %rsi
movq %rax, %rdi
callq 0x7ec9
movq (%r12), %rcx
movl $0x2, %esi
movl $0x1, %edx
movq %rbx, %rdi
callq 0x22d0
movq %r14, %rdi
movq %r15, %rsi
callq 0xa064
testq %rax, %rax
jne 0x885f
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/crossassemblers/macro11/parse.c
// Function: skipdelim
char           *skipdelim(
    char *cp)
{
    cp = skipwhite(cp);
    if (*cp == ',')
        cp = skipwhite(cp + 1);
    return cp;
}

// Assembly:
movq %rdi, %rax
movzbl (%rax), %ecx
cmpl $0x9, %ecx
je 0x88c6
cmpl $0x20, %ecx
jne 0x88cb
incq %rax
jmp 0x88b9
cmpl $0x2c, %ecx
jne 0x88e0
incq %rax
movzbl (%rax), %ecx
cmpl $0x20, %ecx
je 0x88d0
cmpl $0x9, %ecx
je 0x88d0
retq
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/crossassemblers/macro11/parse.c
// Function: skipdelim_comma
char           *skipdelim_comma(
    char *cp,
    int  *comma)
{
    cp = skipwhite(cp);
    if ((*comma = (*cp == ','))) {
        cp = skipwhite(cp + 1);
    }
    return cp;
}

// Assembly:
movq %rdi, %rax
movzbl (%rax), %ecx
cmpl $0x20, %ecx
je 0x88f1
cmpl $0x9, %ecx
jne 0x88f6
incq %rax
jmp 0x88e4
xorl %edx, %edx
cmpb $0x2c, %cl
sete %dl
movl %edx, (%rsi)
jne 0x8912
incq %rax
movzbl (%rax), %ecx
cmpl $0x20, %ecx
je 0x8902
cmpl $0x9, %ecx
je 0x8902
retq
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/crossassemblers/macro11/parse.c
// Function: getstring
char           *getstring(
    char *cp,
    char **endp)
{
    int             len;
    int             start;
    char           *str;

    if (!brackrange(cp, &start, &len, endp)) {
        start = 0;
        len = strcspn(cp, " \t\n,;");
        if (endp)
            *endp = cp + len;
    }

    str = memcheck(malloc(len + 1));
    memcpy(str, cp + start, len);
    str[len] = 0;

    return str;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %rsi
leaq 0xc(%rsp), %rdx
movq %r14, %rcx
callq 0x89a1
testl %eax, %eax
jne 0x8960
movl $0x0, 0x8(%rsp)
leaq 0x7cd9(%rip), %rsi      # 0x10620
movq %rbx, %rdi
callq 0x2180
movl %eax, 0xc(%rsp)
testq %r14, %r14
je 0x8960
cltq
addq %rbx, %rax
movq %rax, (%r14)
movslq 0xc(%rsp), %r14
leaq 0x1(%r14), %rdi
callq 0x2230
movq %rax, %rdi
callq 0xe34f
movq %rax, %r15
movslq 0x8(%rsp), %rax
addq %rax, %rbx
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x2220
movb $0x0, (%r15,%r14)
movq %r15, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/crossassemblers/macro11/parse.c
// Function: brackrange
int brackrange(
    char *cp,
    int *start,
    int *length,
    char **endp)
{
    char            endstr[6];
    int             endlen;
    int             nest;
    int             len;

    switch (*cp) {
    case '^':
        endstr[0] = cp[1];
        strcpy(endstr + 1, "\n");
        *start = 2;
        endlen = 1;
        break;
    case '<':
        strcpy(endstr, "<>\n");
        endlen = 1;
        *start = 1;
        break;
    default:
        return FALSE;
    }

    cp += *start;

    len = 0;
    if (endstr[1] == '>') { /* <>\n */
        nest = 1;
        while (nest) {
            int             sublen;

            sublen = strcspn(cp + len, endstr);
            if (cp[len + sublen] == '<') {
                nest++;
                sublen++;  /* avoid infinite loop when sublen == 0 */
            } else {
                nest--;
                if (nest > 0 && cp[len + sublen] == '>')
                    sublen++;  /* avoid infinite loop when sublen == 0 */
            }
            len += sublen;
            if (sublen == 0)
                break;
        }
    } else {
        int             sublen;

        sublen = strcspn(cp + len, endstr);
        len += sublen;
    }

    *length = len;
    if (endp)
        *endp = cp + len + endlen;

    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
movq %rdi, %r14
movzbl (%rdi), %ecx
cmpl $0x3c, %ecx
je 0x89de
xorl %eax, %eax
cmpl $0x5e, %ecx
jne 0x8a86
movb 0x1(%r14), %al
movb %al, 0x8(%rsp)
movw $0xa, 0x9(%rsp)
movl $0x2, %eax
jmp 0x89eb
movl $0xa3e3c, 0x8(%rsp)     # imm = 0xA3E3C
movl $0x1, %eax
movq %rdx, 0x10(%rsp)
movl %eax, (%rsi)
movl %eax, %eax
addq %rax, %r14
cmpb $0x3e, 0x9(%rsp)
jne 0x8a58
xorl %r12d, %r12d
movl $0x1, %ebp
leaq 0x8(%rsp), %r13
testl %ebp, %ebp
je 0x8a68
movslq %r12d, %r15
leaq (%r14,%r15), %rdi
movq %r13, %rsi
callq 0x2180
addl %eax, %r15d
movslq %r15d, %rcx
movb (%r14,%rcx), %cl
cmpb $0x3c, %cl
jne 0x8a33
incl %ebp
incl %eax
jmp 0x8a4f
cmpl $0x2, %ebp
leal -0x1(%rbp), %edx
setge %sil
cmpb $0x3e, %cl
sete %cl
andb %sil, %cl
movzbl %cl, %ecx
addl %eax, %ecx
movl %edx, %ebp
movl %ecx, %eax
addl %eax, %r12d
testl %eax, %eax
jne 0x8a0b
jmp 0x8a68
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x2180
movq %rax, %r12
movq 0x10(%rsp), %rax
movl %r12d, (%rax)
movl $0x1, %eax
testq %rbx, %rbx
je 0x8a86
movslq %r12d, %rcx
addq %r14, %rcx
incq %rcx
movq %rcx, (%rbx)
addq $0x18, %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/parse.c
// Function: getstring_fn
char           *getstring_fn(
    char *cp,
    char **endp)
{
    char            endstr[4];
    int             len;
    char           *str;

    switch (*cp) {
    case '<':
    case ':':
        return NULL;
    }

    if (!ispunct((unsigned char)*cp)) {
        return NULL;
    }

    endstr[0] = *cp;
    endstr[1] = '\n';
    endstr[2] = '\0';
    cp++;

    len = strcspn(cp, endstr);

    if (endp)
        *endp = cp + len + 1;

    str = memcheck(malloc(len + 1));
    memcpy(str, cp, len);
    str[len] = 0;

    return str;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movzbl (%rdi), %r12d
xorl %r15d, %r15d
cmpl $0x3a, %r12d
je 0x8b25
cmpl $0x3c, %r12d
je 0x8b25
movq %rsi, %r14
movq %rdi, %rbx
callq 0x2300
movq (%rax), %rax
testb $0x4, (%rax,%r12,2)
jne 0x8aca
xorl %r15d, %r15d
jmp 0x8b25
leaq 0x4(%rsp), %rsi
movb %r12b, (%rsi)
movw $0xa, 0x1(%rsi)
incq %rbx
movq %rbx, %rdi
callq 0x2180
movq %rax, %r12
testq %r14, %r14
je 0x8af7
movslq %r12d, %rax
addq %rbx, %rax
incq %rax
movq %rax, (%r14)
leal 0x1(%r12), %eax
movslq %eax, %rdi
callq 0x2230
movq %rax, %rdi
callq 0xe34f
movq %rax, %r15
movslq %r12d, %r14
movq %rax, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x2220
movb $0x0, (%r15,%r14)
movq %r15, %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/parse.c
// Function: get_op
SYMBOL         *get_op(
    char *cp,
    char **endp)
{
    int             local;
    char           *label;
    SYMBOL         *op;

    cp = skipwhite(cp);
    if (EOL(*cp))
        return NULL;

    label = get_symbol(cp, &cp, &local);
    if (label == NULL)
        return NULL;                   /* No operation code. */

    cp = skipwhite(cp);
    if (*cp == ':') {                  /* A label definition? */
        cp++;
        if (*cp == ':')
            cp++;                      /* Skip it */
        free(label);
        label = get_symbol(cp, &cp, NULL);
        if (label == NULL)
            return NULL;
    }

    op = lookup_sym(label, &system_st);
    free(label);

    if (endp)
        *endp = cp;

    return op;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, (%rsp)
movzbl (%rdi), %eax
cmpl $0x20, %eax
je 0x8b51
cmpl $0x9, %eax
jne 0x8b56
incq %rdi
jmp 0x8b44
movq %rdi, (%rsp)
cmpl $0x3b, %eax
ja 0x8b81
movl %eax, %eax
movabsq $0x800000000000401, %rcx # imm = 0x800000000000401
btq %rax, %rcx
jae 0x8b81
xorl %r15d, %r15d
movq %r15, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rsp, %rsi
leaq 0xc(%rsp), %rdx
callq 0x8c1a
testq %rax, %rax
je 0x8b71
movq %rax, %r14
movq (%rsp), %rax
movzbl (%rax), %ecx
cmpl $0x20, %ecx
je 0x8ba7
cmpl $0x9, %ecx
jne 0x8bac
incq %rax
jmp 0x8b9a
movq %rax, (%rsp)
cmpb $0x3a, (%rax)
jne 0x8beb
leaq 0x1(%rax), %rcx
movq %rcx, (%rsp)
cmpb $0x3a, 0x1(%rax)
jne 0x8bcb
addq $0x2, %rax
movq %rax, (%rsp)
movq %r14, %rdi
callq 0x2050
movq %rsp, %rsi
movq (%rsi), %rdi
xorl %r15d, %r15d
xorl %edx, %edx
callq 0x8c1a
movq %rax, %r14
testq %rax, %rax
je 0x8b74
leaq 0x10a96(%rip), %rsi     # 0x19688
movq %r14, %rdi
callq 0x9ff5
movq %rax, %r15
movq %r14, %rdi
callq 0x2050
testq %rbx, %rbx
je 0x8b74
movq (%rsp), %rax
movq %rax, (%rbx)
jmp 0x8b74
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/crossassemblers/macro11/parse.c
// Function: parse_expr
EX_TREE        *parse_expr(
    char *cp,
    int undef)
{
    EX_TREE        *expr;
    EX_TREE        *value;

    expr = parse_binary(cp, 0, 0);     /* Parse into a tree */
    value = evaluate(expr, undef);     /* Perform the arithmetic */
    value->cp = expr->cp;              /* Pointer to end of text is part of
                                          the rootmost node  */
    free_tree(expr);                   /* Discard parse in favor of
                                          evaluation */

    return value;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
xorl %esi, %esi
xorl %edx, %edx
callq 0x9275
movq %rax, %r14
movq %rax, %rdi
movl %ebx, %esi
callq 0x6feb
movq %rax, %rbx
movq 0x8(%r14), %rax
movq %rax, 0x8(%rbx)
movq %r14, %rdi
callq 0x6e73
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/crossassemblers/macro11/parse.c
// Function: parse_unary_expr
EX_TREE        *parse_unary_expr(
    char *cp,
    int undef)
{
    EX_TREE        *expr;
    EX_TREE        *value;

    expr = parse_unary(cp);            /* Parse into a tree */
    value = evaluate(expr, undef);     /* Perform the arithmetic */
    value->cp = expr->cp;              /* Pointer to end of text is part of
                                          the rootmost node  */
    free_tree(expr);                   /* Discard parse in favor of
                                          evaluation */

    return value;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
callq 0x9342
movq %rax, %r14
movq %rax, %rdi
movl %ebx, %esi
callq 0x6feb
movq %rax, %rbx
movq 0x8(%r14), %rax
movq %rax, 0x8(%rbx)
movq %r14, %rdi
callq 0x6e73
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/crossassemblers/macro11/rept_irpc.c
// Function: rept_stream_gets
char           *rept_stream_gets(
    STREAM *str)
{
    REPT_STREAM    *rstr = (REPT_STREAM *) str;
    char           *cp;

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

        if (--rstr->count <= 0)
            return NULL;

        buffer_stream_rewind(str);
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0xde89
testq %rax, %rax
jne 0x98bc
xorl %ebx, %ebx
movl 0x30(%r14), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x30(%r14)
cmpl $0x2, %eax
jl 0x98bf
movq %r14, %rdi
callq 0xdf0f
movq %r14, %rdi
callq 0xde89
testq %rax, %rax
je 0x9897
movq %rax, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/crossassemblers/macro11/rept_irpc.c
// Function: expand_rept
STREAM         *expand_rept(
    STACK *stack,
    char *cp)
{
    EX_TREE        *value;
    BUFFER         *gb;
    REPT_STREAM    *rstr;
    int             levelmod;

    value = parse_expr(cp, 0);
    if (value->type != EX_LIT) {
        report(stack->top, ".REPT value must be constant\n");
        free_tree(value);
        return NULL;
    }

    gb = new_buffer();

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

    read_body(stack, gb, NULL, FALSE);

    list_level += levelmod;

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

        sprintf(name, "%s:%d->.REPT", stack->top->name, stack->top->line);
        buffer_stream_construct(&rstr->bstr, gb, name);
        free(name);
    }

    rstr->count = value->data.lit;
    rstr->bstr.stream.vtbl = &rept_stream_vtbl;
    rstr->savecond = last_cond;

    buffer_free(gb);
    free_tree(value);

    return &rstr->bstr.stream;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r15
xorl %ebp, %ebp
movq %rsi, %rdi
xorl %esi, %esi
callq 0x90f8
movq %rax, %rbx
cmpl $0x1, (%rax)
jne 0x99d0
callq 0xdd0c
movq %rax, %r14
leaq 0xc160(%rip), %rax      # 0x15a74
cmpl $0x0, (%rax)
jne 0x9927
leaq 0xc160(%rip), %rax      # 0x15a80
decl (%rax)
movl $0x1, %ebp
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x7d55
leaq 0xc143(%rip), %rax      # 0x15a80
addl %ebp, (%rax)
movl $0x38, %edi
callq 0x2230
movq %rax, %rdi
callq 0xe34f
movq %rax, %r12
movq (%r15), %rax
movq 0x8(%rax), %rdi
callq 0x20e0
leaq 0x20(%rax), %rdi
callq 0x2230
movq %rax, %rdi
callq 0xe34f
movq %rax, %r13
movq (%r15), %rax
movq 0x8(%rax), %rdx
movl 0x10(%rax), %ecx
leaq 0x6cde(%rip), %rsi      # 0x10663
movq %r13, %rdi
xorl %eax, %eax
callq 0x22b0
movq %r12, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0xdf18
movq %r13, %rdi
callq 0x2050
movl 0x10(%rbx), %eax
movl %eax, 0x30(%r12)
leaq 0xc0ec(%rip), %rax      # 0x15aa0
movq %rax, (%r12)
leaq 0xdaf1(%rip), %rax      # 0x174b0
movl (%rax), %eax
movl %eax, 0x34(%r12)
movq %r14, %rdi
callq 0xdd78
jmp 0x99e4
movq (%r15), %rdi
leaq 0x6c6b(%rip), %rsi      # 0x10645
xorl %r12d, %r12d
xorl %eax, %eax
callq 0x7b5a
movq %rbx, %rdi
callq 0x6e73
movq %r12, %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: irp_stream_gets
char           *irp_stream_gets(
    STREAM *str)
{
    IRP_STREAM     *istr = (IRP_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 = getstring_macarg(str, cp, &cp);
        cp = skipdelim(cp);
        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 %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
callq 0xde89
movq %rax, 0x8(%rsp)
testq %rax, %rax
jne 0x9ad8
xorl %ebx, %ebx
leaq 0x8(%rsp), %r15
movq 0x38(%r14), %rax
movslq 0x40(%r14), %rcx
leaq (%rax,%rcx), %rdx
movq %rdx, 0x8(%rsp)
cmpb $0x0, (%rax,%rcx)
je 0x9adb
callq 0x81d7
movq %rax, %r12
movq $0x0, (%rax)
movl $0x0, 0x8(%rax)
movq 0x30(%r14), %rax
movq %rax, 0x10(%r12)
movq 0x8(%rsp), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x83f9
movq %rax, 0x18(%r12)
movq 0x8(%rsp), %rdi
callq 0x88b6
movq %rax, 0x8(%rsp)
subl 0x38(%r14), %eax
movl %eax, 0x40(%r14)
movq 0x48(%r14), %rdi
movq %r12, %rsi
callq 0x8201
movq %rax, %r13
movq 0x18(%r12), %rdi
callq 0x2050
movq %r12, %rdi
callq 0x2050
movq %r14, %rdi
movq %r13, %rsi
callq 0xdf5d
movq %r13, %rdi
callq 0xdd78
movq %r14, %rdi
callq 0xde89
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x9a28
movq %rax, %rbx
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/crossassemblers/macro11/rept_irpc.c
// Function: irp_stream_delete
void irp_stream_delete(
    STREAM *str)
{
    IRP_STREAM     *istr = (IRP_STREAM *) str;

    pop_cond(istr->savecond);          /* complete unterminated
                                          conditionals */

    buffer_free(istr->body);
    free(istr->items);
    free(istr->label);
    buffer_stream_delete(str);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0x50(%rdi), %edi
callq 0x6789
movq 0x48(%rbx), %rdi
callq 0xdd78
movq 0x38(%rbx), %rdi
callq 0x2050
movq 0x30(%rbx), %rdi
callq 0x2050
movq %rbx, %rdi
popq %rbx
jmp 0xdef0