public final RegisterSpec getLocalAssignment() {
    RegisterSpec assignment;
    if (opcode.getOpcode() == RegOps.MARK_LOCAL) {
      assignment = sources.get(0);
    } else {
      assignment = result;
    }

    if (assignment == null) {
      return null;
    }

    LocalItem localItem = assignment.getLocalItem();

    if (localItem == null) {
      return null;
    }

    return assignment;
  }
Gets the spec of a local variable assignment that occurs at this instruction, or null if no
local variable assignment occurs. This may be the result register, or for {@code mark-local}
insns it may be the source.

@return {@code null-ok;} a named register spec or null
android/android_framework/dex-maker/src/main/java/com/android/dx/rop/code/Insn.java