private static void addSetRegisters(Program program, Address entry,
			HashSet<Varnode> setRegisters) {
		Register[] regWithVals = program.getProgramContext().getRegistersWithValues();
		for (Register register : regWithVals) {
			if (register.isProcessorContext()) {
				continue;
			}

			RegisterValue regVal = program.getProgramContext().getRegisterValue(register, entry);
			if (regVal == null) {
				continue;
			}
			if (!regVal.hasValue()) {
				continue;
			}
			Register reg = regVal.getRegister();
			setRegisters.add(new Varnode(reg.getAddress(), reg.getMinimumByteSize()));
		}
	}
Get the address that this function would thunk if it is a valid thunk

@param program the program
@param entry location to check for a thunk
@param checkForSideEffects true if there should be no extra registers affected

@return address that the thunk thunks,Address.NO_ADDRESS if thunk but unknown addr, null otherwise
Ghidra/Features/Base/src/main/java/ghidra/app/cmd/function/CreateThunkFunctionCmd.java