private void gatherFlows(ArrayList<Address> res, SleighParserContext parsecontext,
			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;
		}

		for (FlowRecord rec : curlist) {
			if ((rec.flowFlags & CROSSBUILD) != 0) {
				ParserWalker walker = new ParserWalker(parsecontext);
				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();
				crossproto.gatherFlows(res, crosscontext, context, newsecnum);
			}
			else if ((rec.flowFlags & (JUMPOUT | CALL)) != 0) {
				FixedHandle hand = parsecontext.getFixedHandle(rec.addressnode);
				if (!hand.isInvalid() && hand.offset_space == null) {
					Address addr = getHandleAddr(hand, parsecontext.getAddr().getAddressSpace());
					res.add(addr);
				}
				else if (rec.op.getInput()[0].getOffset().getType() == ConstTpl.J_NEXT2) {
					res.add(parsecontext.getN2addr());
				}
			}
		}
	}
Gather all the flow records (perhaps across multiple InstructionPrototypes via crossbuilds)
and convert to Addresses

@param res is the resulting flow Addresses
@param parsecontext is the parsing context for the current instruction
@param context is the context for the particular address so crossbuilds can be resolved
@throws MemoryAccessException if a memory error occurred while resolving instruction details
@throws UnknownContextException if the gather encounters an instruction not previously parsed
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/app/plugin/processors/sleigh/SleighInstructionPrototype.java