private static Rop pickIf(TypeList types, Rop intZ, Rop objZ, Rop intInt, Rop objObj) {
    switch (types.size()) {
      case 1:
        {
          switch (types.getType(0).getBasicFrameType()) {
            case Type.BT_INT:
              {
                return intZ;
              }
            case Type.BT_OBJECT:
              {
                if (objZ != null) {
                  return objZ;
                }
              }
          }
          break;
        }
      case 2:
        {
          int bt = types.getType(0).getBasicFrameType();
          if (bt == types.getType(1).getBasicFrameType()) {
            switch (bt) {
              case Type.BT_INT:
                {
                  return intInt;
                }
              case Type.BT_OBJECT:
                {
                  if (objObj != null) {
                    return objObj;
                  }
                }
            }
          }
          break;
        }
    }

    return throwBadTypes(types);
  }
Helper for all the {@code if*}-related methods, which checks types and picks one of the four
variants, throwing if there's a problem.

@param types {@code non-null;} the types
@param intZ {@code non-null;} the int-to-0 comparison
@param objZ {@code null-ok;} the object-to-null comparison
@param intInt {@code non-null;} the int-to-int comparison
@param objObj {@code non-null;} the object-to-object comparison
@return {@code non-null;} the appropriate instance
android/android_framework/dex-maker/src/main/java/com/android/dx/rop/code/Rops.java