private static Pair<String,String> preIndexedROR(final long offset,final ITranslationEnvironment environment,final List<ReilInstruction> instructions,final String registerNodeValue1,final String registerNodeValue2,final String immediateNodeValue){
  final String address=environment.getNextVariableString();
  final String index=environment.getNextVariableString();
  final String tmpVar=environment.getNextVariableString();
  final String tmpVar1=environment.getNextVariableString();
  final String tmpVar2=environment.getNextVariableString();
  final String tmpVar3=environment.getNextVariableString();
  long baseOffset=offset;
  instructions.add(ReilHelpers.createBsh(baseOffset++,dw,registerNodeValue2,dw,"-" + Integer.decode(immediateNodeValue),dw,tmpVar1));
  instructions.add(ReilHelpers.createBsh(baseOffset++,dw,registerNodeValue2,dw,String.valueOf(32 - Integer.decode(immediateNodeValue)),dw,tmpVar2));
  instructions.add(ReilHelpers.createOr(baseOffset++,dw,tmpVar1,dw,tmpVar2,dw,tmpVar3));
  instructions.add(ReilHelpers.createAnd(baseOffset++,dw,tmpVar3,dw,dWordBitMask,dw,index));
  instructions.add(ReilHelpers.createAdd(baseOffset++,dw,registerNodeValue1,dw,index,dw,tmpVar));
  instructions.add(ReilHelpers.createAnd(baseOffset++,dw,tmpVar,dw,dWordBitMask,dw,address));
  instructions.add(ReilHelpers.createStr(baseOffset++,dw,address,dw,registerNodeValue1));
  return new Pair<String,String>(address,registerNodeValue1);
}

private static Pair < String , String > preIndexedROR ( final long offset , final ITranslationEnvironment environment , final List < ReilInstruction > instructions , final String registerNodeValue1 , final String registerNodeValue2 , final String immediateNodeValue ) { final String address = environment . getNextVariableString ( ) ; final String index = environment . getNextVariableString ( ) ; final String tmpVar = environment . getNextVariableString ( ) ; final String tmpVar1 = environment . getNextVariableString ( ) ; final String tmpVar2 = environment . getNextVariableString ( ) ; final String tmpVar3 = environment . getNextVariableString ( ) ; long baseOffset = offset ; instructions . add ( ReilHelpers . createBsh ( baseOffset ++ , dw , registerNodeValue2 , dw , "-" + Integer . decode ( immediateNodeValue ) , dw , tmpVar1 ) ) ; instructions . add ( ReilHelpers . createBsh ( baseOffset ++ , dw , registerNodeValue2 , dw , String . valueOf ( 32 - Integer . decode ( immediateNodeValue ) ) , dw , tmpVar2 ) ) ; instructions . add ( ReilHelpers . createOr ( baseOffset ++ , dw , tmpVar1 , dw , tmpVar2 , dw , tmpVar3 ) ) ; instructions . add ( ReilHelpers . createAnd ( baseOffset ++ , dw , tmpVar3 , dw , dWordBitMask , dw , index ) ) ; instructions . add ( ReilHelpers . createAdd ( baseOffset ++ , dw , registerNodeValue1 , dw , index , dw , tmpVar ) ) ; instructions . add ( ReilHelpers . createAnd ( baseOffset ++ , dw , tmpVar , dw , dWordBitMask , dw , address ) ) ; instructions . add ( ReilHelpers . createStr ( baseOffset ++ , dw , address , dw , registerNodeValue1 ) ) ; return new Pair < String , String > ( address , registerNodeValue1 ) ; }
[ < rn > , + / - < rm > , ror # < shift_imm > ] ! 0b11 / ror or rrx / if shift_imm = = 0 then / rrx / index = ( c flag logical_shift_left 31 ) or ( rm logical_shift_right 1 ) else / ror / index = rm rotate_right shift_imm if u = = 1 then address = rn + index else / u = = 0 / address = rn - index if conditionpassed ( cond ) then rn = address
