.class public final Lz5/gf;
.super Ljava/lang/Object;
.source ""


# instance fields
.field public final a:Lcom/google/android/gms/internal/ads/p;

.field public final b:I

.field public final c:I


# direct methods
.method public constructor <init>(III)V
    .registers 4

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    iput p1, p0, Lz5/gf;->b:I

    const/16 p1, 0x40

    if-gt p2, p1, :cond_b

    if-gez p2, :cond_c

    :cond_b
    move p2, p1

    :cond_c
    if-gtz p3, :cond_12

    const/4 p1, 0x1

    iput p1, p0, Lz5/gf;->c:I

    goto :goto_14

    :cond_12
    iput p3, p0, Lz5/gf;->c:I

    :goto_14
    new-instance p1, Lcom/google/android/gms/internal/ads/s;

    invoke-direct {p1, p2}, Lcom/google/android/gms/internal/ads/s;-><init>(I)V

    iput-object p1, p0, Lz5/gf;->a:Lcom/google/android/gms/internal/ads/p;

    return-void
.end method


# virtual methods
.method public final a(Ljava/util/ArrayList;Ljava/util/ArrayList;)Ljava/lang/String;
    .registers 19
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/ArrayList<",
            "Ljava/lang/String;",
            ">;",
            "Ljava/util/ArrayList<",
            "Lcom/google/android/gms/internal/ads/o;",
            ">;)",
            "Ljava/lang/String;"
        }
    .end annotation

    move-object/from16 v1, p0

    move-object/from16 v0, p2

    new-instance v2, Lz5/ff;

    invoke-direct {v2}, Lz5/ff;-><init>()V

    invoke-static {v0, v2}, Ljava/util/Collections;->sort(Ljava/util/List;Ljava/util/Comparator;)V

    new-instance v2, Ljava/util/HashSet;

    invoke-direct {v2}, Ljava/util/HashSet;-><init>()V

    const/4 v4, 0x0

    :goto_12
    invoke-virtual/range {p2 .. p2}, Ljava/util/ArrayList;->size()I

    move-result v5

    if-ge v4, v5, :cond_107

    invoke-virtual {v0, v4}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v5

    check-cast v5, Lcom/google/android/gms/internal/ads/o;

    .line 1
    iget v5, v5, Lcom/google/android/gms/internal/ads/o;->e:I

    move-object/from16 v6, p1

    .line 2
    invoke-virtual {v6, v5}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v5

    check-cast v5, Ljava/lang/CharSequence;

    sget-object v7, Ljava/text/Normalizer$Form;->NFKC:Ljava/text/Normalizer$Form;

    invoke-static {v5, v7}, Ljava/text/Normalizer;->normalize(Ljava/lang/CharSequence;Ljava/text/Normalizer$Form;)Ljava/lang/String;

    move-result-object v5

    sget-object v7, Ljava/util/Locale;->US:Ljava/util/Locale;

    invoke-virtual {v5, v7}, Ljava/lang/String;->toLowerCase(Ljava/util/Locale;)Ljava/lang/String;

    move-result-object v5

    const-string v7, "\n"

    invoke-virtual {v5, v7}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;

    move-result-object v5

    array-length v7, v5

    if-nez v7, :cond_3f

    goto/16 :goto_103

    :cond_3f
    const/4 v7, 0x0

    :goto_40
    array-length v8, v5

    if-ge v7, v8, :cond_103

    aget-object v8, v5, v7

    const-string v9, "\'"

    invoke-virtual {v8, v9}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v9

    const/4 v10, 0x1

    if-eqz v9, :cond_a3

    new-instance v9, Ljava/lang/StringBuilder;

    invoke-direct {v9, v8}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    move v11, v10

    const/4 v12, 0x0

    :goto_55
    add-int/lit8 v13, v11, 0x2

    invoke-virtual {v9}, Ljava/lang/StringBuilder;->length()I

    move-result v14

    if-gt v13, v14, :cond_98

    invoke-virtual {v9, v11}, Ljava/lang/StringBuilder;->charAt(I)C

    move-result v14

    const/16 v15, 0x27

    if-ne v14, v15, :cond_96

    add-int/lit8 v12, v11, -0x1

    invoke-virtual {v9, v12}, Ljava/lang/StringBuilder;->charAt(I)C

    move-result v12

    const/16 v14, 0x20

    if-eq v12, v14, :cond_92

    add-int/lit8 v12, v11, 0x1

    invoke-virtual {v9, v12}, Ljava/lang/StringBuilder;->charAt(I)C

    move-result v15

    const/16 v3, 0x73

    if-eq v15, v3, :cond_81

    invoke-virtual {v9, v12}, Ljava/lang/StringBuilder;->charAt(I)C

    move-result v3

    const/16 v12, 0x53

    if-ne v3, v12, :cond_92

    :cond_81
    invoke-virtual {v9}, Ljava/lang/StringBuilder;->length()I

    move-result v3

    if-eq v13, v3, :cond_8d

    invoke-virtual {v9, v13}, Ljava/lang/StringBuilder;->charAt(I)C

    move-result v3

    if-ne v3, v14, :cond_92

    :cond_8d
    invoke-virtual {v9, v11, v14}, Ljava/lang/StringBuilder;->insert(IC)Ljava/lang/StringBuilder;

    move v11, v13

    goto :goto_95

    :cond_92
    invoke-virtual {v9, v11, v14}, Ljava/lang/StringBuilder;->setCharAt(IC)V

    :goto_95
    move v12, v10

    :cond_96
    add-int/2addr v11, v10

    goto :goto_55

    :cond_98
    if-eqz v12, :cond_9f

    invoke-virtual {v9}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    goto :goto_a0

    :cond_9f
    const/4 v3, 0x0

    :goto_a0
    if-eqz v3, :cond_a3

    move-object v8, v3

    :cond_a3
    invoke-static {v8, v10}, Lcom/google/android/gms/internal/ads/q;->b(Ljava/lang/String;Z)[Ljava/lang/String;

    move-result-object v3

    array-length v8, v3

    iget v9, v1, Lz5/gf;->c:I

    if-ge v8, v9, :cond_ad

    goto :goto_ff

    :cond_ad
    const/4 v8, 0x0

    :goto_ae
    array-length v9, v3

    if-ge v8, v9, :cond_f6

    const-string v9, ""

    const/4 v10, 0x0

    :goto_b4
    iget v11, v1, Lz5/gf;->c:I

    if-ge v10, v11, :cond_e8

    add-int v11, v8, v10

    array-length v12, v3

    if-lt v11, v12, :cond_be

    goto :goto_f6

    :cond_be
    if-lez v10, :cond_ca

    invoke-static {v9}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v9

    const-string v12, " "

    invoke-virtual {v9, v12}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v9

    :cond_ca
    invoke-static {v9}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v9

    aget-object v11, v3, v11

    invoke-static {v11}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v11

    invoke-virtual {v11}, Ljava/lang/String;->length()I

    move-result v12

    if-eqz v12, :cond_df

    invoke-virtual {v9, v11}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v9

    goto :goto_e5

    :cond_df
    new-instance v11, Ljava/lang/String;

    invoke-direct {v11, v9}, Ljava/lang/String;-><init>(Ljava/lang/String;)V

    move-object v9, v11

    :goto_e5
    add-int/lit8 v10, v10, 0x1

    goto :goto_b4

    :cond_e8
    invoke-virtual {v2, v9}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z

    invoke-virtual {v2}, Ljava/util/HashSet;->size()I

    move-result v9

    iget v10, v1, Lz5/gf;->b:I

    if-ge v9, v10, :cond_107

    add-int/lit8 v8, v8, 0x1

    goto :goto_ae

    :cond_f6
    :goto_f6
    invoke-virtual {v2}, Ljava/util/HashSet;->size()I

    move-result v3

    iget v8, v1, Lz5/gf;->b:I

    if-lt v3, v8, :cond_ff

    goto :goto_107

    :cond_ff
    :goto_ff
    add-int/lit8 v7, v7, 0x1

    goto/16 :goto_40

    :cond_103
    :goto_103
    add-int/lit8 v4, v4, 0x1

    goto/16 :goto_12

    :cond_107
    :goto_107
    new-instance v3, Lcom/google/android/gms/internal/ads/k0;

    const/4 v0, 0x4

    invoke-direct {v3, v0}, Lcom/google/android/gms/internal/ads/k0;-><init>(I)V

    invoke-virtual {v2}, Ljava/util/HashSet;->iterator()Ljava/util/Iterator;

    move-result-object v0

    :goto_111
    invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z

    move-result v2

    if-eqz v2, :cond_131

    invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Ljava/lang/String;

    :try_start_11d
    iget-object v4, v1, Lz5/gf;->a:Lcom/google/android/gms/internal/ads/p;

    invoke-virtual {v4, v2}, Lcom/google/android/gms/internal/ads/p;->a(Ljava/lang/String;)[B

    move-result-object v2

    iget-object v4, v3, Lcom/google/android/gms/internal/ads/k0;->t:Ljava/lang/Object;

    check-cast v4, Landroid/util/Base64OutputStream;

    invoke-virtual {v4, v2}, Landroid/util/Base64OutputStream;->write([B)V
    :try_end_12a
    .catch Ljava/io/IOException; {:try_start_11d .. :try_end_12a} :catch_12b

    goto :goto_111

    :catch_12b
    move-exception v0

    const-string v2, "Error while writing hash to byteStream"

    invoke-static {v2, v0}, Lz5/d50;->zzg(Ljava/lang/String;Ljava/lang/Throwable;)V

    :cond_131
    invoke-virtual {v3}, Lcom/google/android/gms/internal/ads/k0;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method
