function removeIrrelevantComments(text) {
		const ast = parser.parse(text);

		if (ast.comments) {
			for (const comment of ast.comments) {
				for (const potentialSimplification of [
					// Try deleting the comment
					`${text.slice(0, comment.range[0])}${text.slice(comment.range[1])}`,

					// Try replacing the comment with a space
					`${text.slice(0, comment.range[0])} ${text.slice(comment.range[1])}`,

					// Try deleting the contents of the comment
					text.slice(0, comment.range[0] + 2) +
						text.slice(
							comment.type === "Block"
								? comment.range[1] - 2
								: comment.range[1],
						),
				]) {
					if (reproducesBadCase(potentialSimplification)) {
						return removeIrrelevantComments(
							potentialSimplification,
						);
					}
				}
			}
		}

		return text;
	}
Removes and simplifies comments from the source text
@param {string} text A piece of "bad" source text
@returns {string} A piece of "bad" source text with fewer and/or simpler comments.