if (insn.getType() != InsnType.PHI) {
for (InsnArg arg : insn.getArguments()) {
if (arg.isRegister()) {
RegisterArg reg = (RegisterArg) arg;
int regNum = reg.getRegNum();
SSAVar var = vars[regNum];
if (var == null) {
var = mth.makeNewSVar(regNum, vers, null);
vars[regNum] = var;
}
var.use(reg);
}
}
}
RegisterArg result = insn.getResult();
if (result != null) {
int regNum = result.getRegNum();
vars[regNum] = mth.makeNewSVar(regNum, vers, result);
}
}
for (BlockNode s : block.getSuccessors()) {
PhiListAttr phiList = s.get(AType.PHI_LIST);
if (phiList != null) {
int j = s.getPredecessors().indexOf(block);
if (j == -1) {
throw new JadxRuntimeException("Can't find predecessor for " + block + " " + s);
}
for (PhiInsn phiInsn : phiList.getList()) {
if (j >= phiInsn.getArgsCount()) {
continue;
}
int regNum = phiInsn.getResult().getRegNum();
SSAVar var = vars[regNum];
if (var == null) {
var = mth.makeNewSVar(regNum, vers, null);
vars[regNum] = var;
}
var.use(phiInsn.getArg(j));
var.setUsedInPhi(phiInsn);
}
}
}
for (BlockNode domOn : block.getDominatesOn()) {
renameVar(mth, vars, vers, domOn);