def _parse_idxref_index_origin(lp_file_lines):
    """Parse the LP file for the possible index origin etc."""
    origins = {}
    i = 0
    while i < len(lp_file_lines):
        line = lp_file_lines[i]
        i += 1
        if 'INDEX_' in line and 'QUALITY' in line and 'DELTA' in line:
            while not 'SELECTED' in line:
                line = lp_file_lines[i]
                i += 1
                try:
                    hkl = tuple(map(int, line.split()[:3]))
                    quality, delta, xd, yd = tuple(map(float, line.split()[
                        3:7]))
                    origins[hkl] = quality, delta, xd, yd
                except Exception:
                    pass
            return origins
    raise RuntimeError('should never reach this point')
