function getOriginalPosition(maps, parsedMappings, sourcesCache, source, line, column) {
	let originalLine = line;
	let originalColumn = column;
	let originalSource = source;

	// Traverse maps backwards, but skip last map as that's the
	// one we requested the position from
	for (let i = parsedMappings.length - 1; i >= 0; i--) {
		const map = parsedMappings[i];

		const segments = map[originalLine];
		if (!segments) break;

		// TODO: Binary search
		let lastFound;
		for (let j = 0; j < segments.length; j++) {
			const segment = segments[j];
			if (segment[0] === originalColumn) {
				if (segment.length === 1) {
					break;
				}

				const sourceName = maps[i].sources[segment[1]];
				const mappedName = sourcesCache.get(sourceName);
				if (!mappedName) {
					originalSource = 0;
				} else {
					originalSource = mappedName.index;
				}

				originalLine = segment[2];
				originalColumn = segment[3];
				break;
			} else if (segment[0] < originalColumn) {
				lastFound = segment;
			}
		}

		if (lastFound !== undefined) {
			if (lastFound.length === 1) {
				break;
			}

			const sourceName = maps[i].sources[lastFound[1]];
			const mappedName = sourcesCache.get(sourceName);
			if (!mappedName) {
				originalSource = 0;
			} else {
				originalSource = mappedName.index;
			}

			originalLine = lastFound[2];
			originalColumn = lastFound[3] + (originalColumn - lastFound[3]);
		}
	}

	return {
		line: originalLine,
		column: originalColumn,
		source: originalSource
	};
}
@param {SourceMap[]} maps
@param {import('sourcemap-codec').SourceMapMappings[]} parsedMappings
@param {Map<string, { index: number, content: string | null}>} sourcesCache
@param {number} source
@param {number} line
@param {number} column
@returns {{ line: number, column: number, source: number }}