public static List<DyldFixup> processPointerChain(BinaryReader reader, long chainStart,
			long nextOffSize, long imagebase, MessageLog log, TaskMonitor monitor)
			throws IOException, CancelledException {
		final long BIT63 = (0x1L << 63);
		final long BIT62 = (0x1L << 62);

		List<DyldFixup> fixups = new ArrayList<>();

		while (true) {
			monitor.checkCancelled();

			long chainValue = reader.readLong(chainStart);
			long fixedPointerValue = 0;

			// Bad chain value
			if ((chainValue & BIT62) != 0) {
				// this is a pointer, but is good now
			}

			// Pointer checked value
			if ((chainValue & BIT63) != 0) {
				//long tagType = (pointerValue >> 49L) & 0x3L;
				//long pacMod = ((pointerValue >> 32) & 0xffff);
				fixedPointerValue = imagebase + (chainValue & 0xffffffffL);
			}
			else {
				fixedPointerValue =
					((chainValue << 13) & 0xff000_0000_0000_000L) | (chainValue & 0x7ff_ffff_ffffL);
				if ((chainValue & 0x0400_0000_0000L) != 0) {
					fixedPointerValue |= 0x00ff_fc00_0000_0000L;
				}
			}

			fixups.add(new DyldFixup(chainStart, fixedPointerValue, 8, null, null));

			long nextValueOff = ((chainValue >> 51L) & 0x7ff) * nextOffSize;
			if (nextValueOff == 0) {
				break;
			}
			chainStart = chainStart + nextValueOff;
		}

		return fixups;
	}
Fixes up any chained pointers, starting at the given address.

@param reader A {@link BinaryReader} that can read the image
@param chainStart The starting of address of the pointer chain to fix.
@param nextOffSize The size of the next offset.
@param imagebase The image base
@param log The log
@param monitor A cancellable monitor
@return A list of addresses where pointer fixes were performed.
@throws IOException If there was an IO-related issue
@throws CancelledException If the user cancelled the operation
Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/macho/commands/chained/DyldChainedFixups.java