private int gatherFlags(int curflags, InstructionContext context, int secnum)
			throws MemoryAccessException, UnknownContextException {
		List<FlowRecord> curlist = null;
		if (secnum < 0) {
			curlist = flowStateList;
		}
		else if ((flowStateListNamed != null) && (secnum < flowStateListNamed.size())) {
			curlist = flowStateListNamed.get(secnum);
		}

		if (curlist == null) {
			return curflags;
		}

		for (FlowRecord rec : curlist) {
			if ((rec.flowFlags & CROSSBUILD) != 0) {
				ParserWalker walker =
					new ParserWalker((SleighParserContext) context.getParserContext());
				walker.subTreeState(rec.addressnode);

				VarnodeTpl vn = rec.op.getInput()[0];
				AddressSpace spc = vn.getSpace().fixSpace(walker);
				Address addr = spc.getTruncatedAddress(vn.getOffset().fix(walker), false);
				addr = handleOverlayAddress(context, addr);
				SleighParserContext crosscontext =
					(SleighParserContext) context.getParserContext(addr);
				int newsecnum = (int) rec.op.getInput()[1].getOffset().getReal();
				SleighInstructionPrototype crossproto = crosscontext.getPrototype();
				curflags = crossproto.gatherFlags(curflags, context, newsecnum);
			}
			else {
				curflags &= ~(CROSSBUILD | LABEL | NO_FALLTHRU);
				curflags |= rec.flowFlags;
			}
		}
		return curflags;
	}
Walk the Constructor tree gathering ConstructStates which are flow destinations
(flowStateList) flowFlags and delayslot directives
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/app/plugin/processors/sleigh/SleighInstructionPrototype.java