def get_block_objects(disasm, nodes, func_addr):
    """
    Get a list of objects to be displayed in a block in disassembly view. Objects may include instructions, stack
    variables, and labels.

    :param angr.analyses.Disassembly disasm:    The angr Disassembly Analysis instance.
    :param iterable nodes:                      A collection of CFG nodes.
    :param int func_addr:                       The function address of the current block.
    :return:                                    a list of Instruction objects and label names (strings).
    :rtype:                                     list
    """

    block_addrs = [node.addr for node in nodes]
    block_addr = block_addrs[0]
    insn_addrs = list(itertools.chain.from_iterable(disasm.block_to_insn_addrs[addr] for addr in block_addrs))

    lst = []

    variable_manager = disasm.kb.variables[func_addr]

    # function beginning
    if block_addr == func_addr:
        # function header
        try:
            func = disasm.kb.functions.get_by_addr(func_addr)
        except KeyError:
            func = None
        if func is not None and func.calling_convention is not None and func.prototype is not None:
            args = func.calling_convention.arg_locs(func.prototype)
            func_header = FunctionHeader(func.demangled_name, func.prototype, args)
            lst.append(func_header)

        # stack variables
        # filter out all stack variables
        variables = variable_manager.get_unified_variables(sort="stack")
        variables = sorted(variables, key=lambda v: v.offset)
        lst.append(Variables(variables))

    # phi variables
    phi_variables = variable_manager.get_phi_variables(block_addr)
    if phi_variables:
        for phi, variables in phi_variables.items():
            lst.append(PhiVariable(phi, variables))

    # instructions and labels
    for insn_addr in insn_addrs:
        if insn_addr != func_addr and insn_addr in disasm.kb.labels:
            lst.append(Label(insn_addr, get_label_text(insn_addr, disasm.kb)))
        lst.append(disasm.raw_result_map["instructions"][insn_addr])
        lst.extend(disasm.raw_result_map["ir"][insn_addr])

    # initial label, if there is any
    # FIXME: all labels should be generated during CFG recovery, and this step should not be necessary.
    if lst and not isinstance(lst[0], FunctionHeader | Label):
        # the first element should be a label
        lst.insert(0, Label(block_addrs[0], get_label_text(block_addrs[0], disasm.kb)))

    return lst

    Get a list of objects to be displayed in a block in disassembly view. Objects may include instructions, stack
    variables, and labels.

    :param angr.analyses.Disassembly disasm:    The angr Disassembly Analysis instance.
    :param iterable nodes:                      A collection of CFG nodes.
    :param int func_addr:                       The function address of the current block.
    :return:                                    a list of Instruction objects and label names (strings).
    :rtype:                                     list
    
angrmanagement/utils/__init__.py