private List<Address> handleOffsetSwitchOperation(PcodeOp op, VarnodeOperation destAddOp,
			ContextState currentState, ResultsState results, TaskMonitor monitor) {
		
//		Varnode baseOffset;
//		VarnodeOperation offsetExpr;
//		Varnode[] inputs = destAddOp.getInputValues();
//		if (!inputs[0].isConstant()) {
//			if (!inputs[1].isConstant() || !(inputs[0] instanceof VarnodeOperation)) {
//				return null;
//			}
//			baseOffset = inputs[1];
//			offsetExpr = (VarnodeOperation)inputs[0];
//		}
//		else if (inputs[1] instanceof VarnodeOperation) {
//			baseOffset = inputs[0];
//			offsetExpr = (VarnodeOperation)inputs[1];
//		}
//		else {
//			return null;
//		}
//		
//		Address tableBaseAddr = getAddress(baseOffset.getOffset());
//		Err.debug(this, "Switch base offset: " + tableBaseAddr);
//		
//		if (offsetExpr.getPCodeOp().getOpcode() == PcodeOp.INT_SEXT) {
//			
//		}
//		
//		Register indexReg = null;
//		try {
//			indexReg = findSingleRegister(offsetExpr);
//		} catch (MultipleRegInputsException e) {
//			return null;
//		}
//		if (indexReg == null) {
//			return null;
//		}
//		Err.debug(this, "Switch index register: " + indexReg);
		
		Msg.debug(this, "State-entry: " + currentState.getEntryPoint());
		
		for (SequenceNumber seq : currentState.getFlowFroms()) {
			Msg.debug(this, "State-flowFrom: " + seq);
		}
//		
//// TODO: Disable for performance benchmark	
//if (true) return null;		
//		
		
		
		Switch s = Switch.getIndirectJumpSwitch(program, destAddOp);
		if (s == null) {
			Msg.debug(this, "Unsupported indirect call at: " + op.getSeqnum().getTarget());
			return null;
		}
		
		Msg.debug(this, "Processing switch at: " + op.getSeqnum().getTarget());
		Msg.debug(this, "Switch class: " + s.getClass().getName());
		
		Varnode indexValue = s.getIndexValue();
		Varnode indexValueVarnode = indexValue;	// index value storage container
		SequenceNumber indexValueAssignedAt = null;
		Msg.debug(this, "Switch index expression: " + indexValue);
		if (indexValue instanceof VarnodeOperation) {
			
			// Index value is computed

// NOTE: Value may be constrained by its computation - can we bound expression to a value range ?
			
			VarnodeOperation indexValueOp = (VarnodeOperation)indexValue;
			// I expect that the indexValueVarnode should always be a register in this case
			// since it will be used in subsequent computations and switch guard(s)
			indexValueVarnode = indexValueOp.getPCodeOp().getOutput();
			Msg.debug(this, "Switch index variable: " + indexValueVarnode);
			indexValueAssignedAt = indexValueOp.getPCodeOp().getSeqnum();
			Msg.debug(this, "Switch index variable assigned at: " + indexValueAssignedAt);
			
		}
		else {
			

			Msg.debug(this, "Switch index is input parameter!");
			
			// TODO: How should we identify switch guard ??
			
		}
			
		// Rewind state - obtain state prior to index value assignment instruction and build flowList leading to switch
		LinkedList<SequenceNumber> flowList = new LinkedList<SequenceNumber>();
		flowList.addFirst(currentState.getEntryPoint());
		ContextState state = currentState;
		boolean stopRewind = false;
		while (state != null && !stopRewind) {
			flowList.addFirst(state.getEntryPoint());
			stopRewind = ( indexValueAssignedAt != null && state.getSequenceRange().contains(indexValueAssignedAt) );
			state = state.getPreviousContextState();
		}	
		if (state == null) {
			// Create function entry state
			state = new ContextState(results.getEntryPoint().getTarget(), program);
		}
		Msg.debug(this, "Rewind state to: " + state.getEntryPoint());
		
/// Objects instantiated below are specific to a single test case (i.e., testIndexValue)
		
//		int testIndexValue = 0;
		
		// Establish ResultsState for evaluating test case
// TODO:
//		ResultsState testState = new ResultsState(flowList, null, state, true, monitor);
//		testState.forcePcodeResult(indexValueAssignedAt, new Varnode(addrFactory.getConstantAddress(testIndexValue), indexValue.getSize()));
//		testState.setFlowInterruptAt(op.getSeqnum());
		

			
		
		
		
		
		// TODO: Examine changing ResultsState to work maintain instruction results instead of block results ??
		
		
		
		

//		try {
//			Err.debug(this, "Case 0: " + s.getCaseAddress(0));
//			Err.debug(this, "Case 1: " + s.getCaseAddress(1));
//			
//			
//		} catch (MemoryAccessException e) {
//			// TODO Auto-generated catch block
//			e.printStackTrace();
//		} catch (AddressOutOfBoundsException e) {
//			// TODO Auto-generated catch block
//			e.printStackTrace();
//		}
		
		
		
		
		
		return null;
	}
@param op
@param dest
@param currentState
@param monitor
@return
Ghidra/Features/Base/src/main/java/ghidra/util/state/analysis/MySwitchAnalyzer.java