def _trim_disassembly(stdout):
    if not stdout:
        return stdout
    start_loc = stdout.find("Dump of assembler code")
    end_loc = stdout.find("End of assembler dump.", start_loc)
    if start_loc == -1 or end_loc == -1:
        return "%s\nError trimming assembler dump. start_loc = %d, end_loc = %d" % (stdout,
                                                                                    start_loc,
                                                                                    end_loc)
    try:
        a, b = stdout[start_loc:end_loc].split("\n=>")
    except __HOLE__:
        return "%s\nError trimming assembler dump. Could not find '=>'" % (stdout)
    a = a.splitlines()
    start_loc += len(a.pop(0))
    return "%s\n%s\n=>%s\n%s" % (stdout[:start_loc],
                                 "\n".join(a[-15:]),
                                 "\n".join(b.splitlines()[:15]),
                                 stdout[end_loc:])
dataset/ETHPy150Open blackberry/ALF/alf/debug/_gdb.py/_trim_disassembly