private static Pair<String,String> immediateROR(final long offset,final ITranslationEnvironment environment,final List<ReilInstruction> instructions,final String immediateNodeValue1,final String immediateNodeValue2){
  final String shifterOperand=environment.getNextVariableString();
  final String shifterCarryOut=environment.getNextVariableString();
  final String tmpVar1=environment.getNextVariableString();
  final String tmpVar2=environment.getNextVariableString();
  final String tmpVar3=environment.getNextVariableString();
  final String tmpVar4=environment.getNextVariableString();
  long baseOffset=offset;
  instructions.add(ReilHelpers.createBsh(baseOffset++,dWordSize,immediateNodeValue1,wordSize,"-" + immediateNodeValue2,dWordSize,tmpVar1));
  instructions.add(ReilHelpers.createBsh(baseOffset++,dWordSize,immediateNodeValue1,wordSize,String.valueOf((32 - Integer.decode(immediateNodeValue2))),qWordSize,tmpVar2));
  instructions.add(ReilHelpers.createOr(baseOffset++,dWordSize,tmpVar1,qWordSize,tmpVar2,qWordSize,tmpVar3));
  instructions.add(ReilHelpers.createAnd(baseOffset++,qWordSize,tmpVar3,dWordSize,bitMaskAllBitsSet,dWordSize,shifterOperand));
  instructions.add(ReilHelpers.createBsh(baseOffset++,qWordSize,tmpVar3,dWordSize,minusThirtyOneSet,dWordSize,tmpVar4));
  instructions.add(ReilHelpers.createAnd(baseOffset++,dWordSize,tmpVar4,dWordSize,oneSet,byteSize,shifterCarryOut));
  return new Pair<String,String>(shifterOperand,shifterCarryOut);
}

private static Pair < String , String > immediateROR ( final long offset , final ITranslationEnvironment environment , final List < ReilInstruction > instructions , final String immediateNodeValue1 , final String immediateNodeValue2 ) { final String shifterOperand = environment . getNextVariableString ( ) ; final String shifterCarryOut = environment . getNextVariableString ( ) ; final String tmpVar1 = environment . getNextVariableString ( ) ; final String tmpVar2 = environment . getNextVariableString ( ) ; final String tmpVar3 = environment . getNextVariableString ( ) ; final String tmpVar4 = environment . getNextVariableString ( ) ; long baseOffset = offset ; instructions . add ( ReilHelpers . createBsh ( baseOffset ++ , dWordSize , immediateNodeValue1 , wordSize , "-" + immediateNodeValue2 , dWordSize , tmpVar1 ) ) ; instructions . add ( ReilHelpers . createBsh ( baseOffset ++ , dWordSize , immediateNodeValue1 , wordSize , String . valueOf ( ( 32 - Integer . decode ( immediateNodeValue2 ) ) ) , qWordSize , tmpVar2 ) ) ; instructions . add ( ReilHelpers . createOr ( baseOffset ++ , dWordSize , tmpVar1 , qWordSize , tmpVar2 , qWordSize , tmpVar3 ) ) ; instructions . add ( ReilHelpers . createAnd ( baseOffset ++ , qWordSize , tmpVar3 , dWordSize , bitMaskAllBitsSet , dWordSize , shifterOperand ) ) ; instructions . add ( ReilHelpers . createBsh ( baseOffset ++ , qWordSize , tmpVar3 , dWordSize , minusThirtyOneSet , dWordSize , tmpVar4 ) ) ; instructions . add ( ReilHelpers . createAnd ( baseOffset ++ , dWordSize , tmpVar4 , dWordSize , oneSet , byteSize , shifterCarryOut ) ) ; return new Pair < String , String > ( shifterOperand , shifterCarryOut ) ; }
# < immediate > case where rotate_imm ! = 0 operation : shifter_operand = immed_8 rotate_right ( rotate_imm * 2 ) if rotate_imm = = 0 then shifter_carry_out = c flag else / / rotate_imm ! = 0 shifter_carry_out = shifter_operand [ 31 ]
