private void fixupSegment(SegmentCommand segment) throws IOException {
		long adjustment = packedSegmentAdjustments.getOrDefault(segment, 0);
		boolean is64bit = !segment.is32bit();

		set(segment.getStartIndex() + (is64bit ? 0x18 : 0x18), segment.getVMaddress(),
			is64bit ? 8 : 4);
		set(segment.getStartIndex() + (is64bit ? 0x20 : 0x1c), segment.getVMsize(),
			is64bit ? 8 : 4);
		fixup(segment.getStartIndex() + (is64bit ? 0x28 : 0x20), adjustment, is64bit ? 8 : 4,
			segment);
		set(segment.getStartIndex() + (is64bit ? 0x30 : 0x24), segment.getFileSize(),
			is64bit ? 8 : 4);

		long sectionStartIndex = segment.getStartIndex() + (is64bit ? 0x48 : 0x38);
		for (Section section : segment.getSections()) {
			if (monitor.isCancelled()) {
				break;
			}

			// For some reason the section file offsets in the iOS 10 DYLD cache do not want
			// the adjustment despite the segment needed it.  We can expect to see warnings
			// in that particular version.
			if (section.getOffset() > 0 && section.getSize() > 0) {
				fixup(sectionStartIndex + (is64bit ? 0x30 : 0x28), adjustment, 4, segment);
			}
			if (section.getRelocationOffset() > 0) {
				fixup(sectionStartIndex + (is64bit ? 0x38 : 0x30), adjustment, 4, segment);
			}
			sectionStartIndex += is64bit ? 0x50 : 0x44;
		}
	}
Fixes-up the old Mach-O's file offsets and size in the given segment so they are correct
for the newly packed Mach-O

@param segment The segment to fix-up
@throws IOException If there was an IO-related issue performing the fix-up
Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/ios/ExtractedMacho.java