code: @Nullable
      private ScopeBlock findScopeBlock(ScopeBlock sb, int pc) {
  
          if ((pc <= sb.getStart()) || (pc >= sb.getFinish())) {
              return null;
          }
  
          List<ScopeBlock> children = sb.getChildren();
          if (children != null) {
              for (ScopeBlock child : children) {
                  ScopeBlock foundSb = findScopeBlock(child, pc);
                  if (foundSb != null) {
                      return foundSb;
                  }
              }
          }
          return sb;
      }
docs: returns the scope block in which this register was assigned, by traversing the scope block tree
  
  @param sb
  the scope block to start searching in
  @param pc
  the current program counter
  @return the scope block or null if not found