.class public Lk2/h;
.super Ljava/lang/Object;
.source ""


# instance fields
.field public a:Ljava/util/HashMap;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/HashMap<",
            "Ljava/lang/String;",
            "Lk2/b;",
            ">;"
        }
    .end annotation
.end field


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

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

    new-instance v0, Ljava/util/HashMap;

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

    iput-object v0, p0, Lk2/h;->a:Ljava/util/HashMap;

    return-void
.end method


# virtual methods
.method public final a(Lk2/i;Ljava/lang/ClassLoader;)Lk2/b;
    .registers 6

    iget-object p1, p1, Lk2/i;->r:Ljava/lang/StackTraceElement;

    invoke-virtual {p1}, Ljava/lang/StackTraceElement;->getClassName()Ljava/lang/String;

    move-result-object p1

    iget-object v0, p0, Lk2/h;->a:Ljava/util/HashMap;

    invoke-virtual {v0, p1}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lk2/b;

    if-eqz v0, :cond_11

    return-object v0

    :cond_11
    const/4 v0, 0x0

    if-nez p2, :cond_15

    goto :goto_1e

    .line 1
    :cond_15
    :try_start_15
    invoke-virtual {p2, p1}, Ljava/lang/ClassLoader;->loadClass(Ljava/lang/String;)Ljava/lang/Class;

    move-result-object v1
    :try_end_19
    .catch Ljava/lang/ClassNotFoundException; {:try_start_15 .. :try_end_19} :catch_1e
    .catch Ljava/lang/NoClassDefFoundError; {:try_start_15 .. :try_end_19} :catch_1e
    .catch Ljava/lang/Exception; {:try_start_15 .. :try_end_19} :catch_1a

    goto :goto_1f

    :catch_1a
    move-exception v1

    invoke-virtual {v1}, Ljava/lang/Exception;->printStackTrace()V

    :catch_1e
    :goto_1e
    move-object v1, v0

    :goto_1f
    if-eqz v1, :cond_23

    :goto_21
    move-object v0, v1

    goto :goto_46

    .line 2
    :cond_23
    invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/Thread;->getContextClassLoader()Ljava/lang/ClassLoader;

    move-result-object v2

    if-eq v2, p2, :cond_3a

    if-nez v2, :cond_30

    goto :goto_39

    .line 3
    :cond_30
    :try_start_30
    invoke-virtual {v2, p1}, Ljava/lang/ClassLoader;->loadClass(Ljava/lang/String;)Ljava/lang/Class;

    move-result-object v1
    :try_end_34
    .catch Ljava/lang/ClassNotFoundException; {:try_start_30 .. :try_end_34} :catch_39
    .catch Ljava/lang/NoClassDefFoundError; {:try_start_30 .. :try_end_34} :catch_39
    .catch Ljava/lang/Exception; {:try_start_30 .. :try_end_34} :catch_35

    goto :goto_3a

    :catch_35
    move-exception p2

    invoke-virtual {p2}, Ljava/lang/Exception;->printStackTrace()V

    :catch_39
    :goto_39
    move-object v1, v0

    :cond_3a
    :goto_3a
    if-eqz v1, :cond_3d

    goto :goto_21

    .line 4
    :cond_3d
    :try_start_3d
    invoke-static {p1}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class;

    move-result-object v0
    :try_end_41
    .catch Ljava/lang/ClassNotFoundException; {:try_start_3d .. :try_end_41} :catch_46
    .catch Ljava/lang/NoClassDefFoundError; {:try_start_3d .. :try_end_41} :catch_46
    .catch Ljava/lang/Exception; {:try_start_3d .. :try_end_41} :catch_42

    goto :goto_46

    :catch_42
    move-exception p2

    invoke-virtual {p2}, Ljava/lang/Exception;->printStackTrace()V

    :catch_46
    :goto_46
    const-string p2, "na"

    if-nez v0, :cond_4c

    :cond_4a
    :goto_4a
    move-object v1, p2

    goto :goto_59

    .line 5
    :cond_4c
    invoke-virtual {v0}, Ljava/lang/Class;->getPackage()Ljava/lang/Package;

    move-result-object v1

    if-eqz v1, :cond_4a

    invoke-virtual {v1}, Ljava/lang/Package;->getImplementationVersion()Ljava/lang/String;

    move-result-object v1

    if-nez v1, :cond_59

    goto :goto_4a

    :cond_59
    :goto_59
    if-eqz v0, :cond_7f

    .line 6
    :try_start_5b
    invoke-virtual {v0}, Ljava/lang/Class;->getProtectionDomain()Ljava/security/ProtectionDomain;

    move-result-object v0

    invoke-virtual {v0}, Ljava/security/ProtectionDomain;->getCodeSource()Ljava/security/CodeSource;

    move-result-object v0

    if-eqz v0, :cond_7f

    invoke-virtual {v0}, Ljava/security/CodeSource;->getLocation()Ljava/net/URL;

    move-result-object v0

    if-eqz v0, :cond_7f

    invoke-virtual {v0}, Ljava/net/URL;->toString()Ljava/lang/String;

    move-result-object v0

    const/16 v2, 0x2f

    invoke-virtual {p0, v0, v2}, Lk2/h;->b(Ljava/lang/String;C)Ljava/lang/String;

    move-result-object v2

    if-eqz v2, :cond_79

    move-object p2, v2

    goto :goto_7f

    :cond_79
    const/16 v2, 0x5c

    invoke-virtual {p0, v0, v2}, Lk2/h;->b(Ljava/lang/String;C)Ljava/lang/String;

    move-result-object p2
    :try_end_7f
    .catch Ljava/lang/Exception; {:try_start_5b .. :try_end_7f} :catch_7f

    .line 7
    :catch_7f
    :cond_7f
    :goto_7f
    new-instance v0, Lk2/b;

    const/4 v2, 0x0

    invoke-direct {v0, p2, v1, v2}, Lk2/b;-><init>(Ljava/lang/String;Ljava/lang/String;Z)V

    iget-object p2, p0, Lk2/h;->a:Ljava/util/HashMap;

    invoke-virtual {p2, p1, v0}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    return-object v0
.end method

.method public final b(Ljava/lang/String;C)Ljava/lang/String;
    .registers 7

    invoke-virtual {p1, p2}, Ljava/lang/String;->lastIndexOf(I)I

    move-result v0

    const/4 v1, -0x1

    const/4 v2, 0x1

    if-eq v0, v1, :cond_12

    add-int/lit8 v1, v0, 0x1

    .line 1
    invoke-virtual {p1}, Ljava/lang/String;->length()I

    move-result v3

    if-ne v1, v3, :cond_12

    move v1, v2

    goto :goto_13

    :cond_12
    const/4 v1, 0x0

    :goto_13
    if-eqz v1, :cond_20

    sub-int/2addr v0, v2

    .line 2
    invoke-virtual {p1, p2, v0}, Ljava/lang/String;->lastIndexOf(II)I

    move-result p2

    add-int/2addr p2, v2

    invoke-virtual {p1, p2}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object p1

    return-object p1

    :cond_20
    if-lez v0, :cond_28

    add-int/2addr v0, v2

    invoke-virtual {p1, v0}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object p1

    return-object p1

    :cond_28
    const/4 p1, 0x0

    return-object p1
.end method

.method public c([Lk2/i;)V
    .registers 10

    new-instance v0, Ljava/lang/Throwable;

    const-string v1, "local stack reference"

    invoke-direct {v0, v1}, Ljava/lang/Throwable;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0}, Ljava/lang/Throwable;->getStackTrace()[Ljava/lang/StackTraceElement;

    move-result-object v0

    const/4 v1, 0x0

    if-nez p1, :cond_10

    move v4, v1

    goto :goto_2e

    .line 1
    :cond_10
    array-length v2, v0

    add-int/lit8 v2, v2, -0x1

    array-length v3, p1

    add-int/lit8 v3, v3, -0x1

    move v4, v1

    :goto_17
    if-ltz v2, :cond_2e

    if-ltz v3, :cond_2e

    aget-object v5, v0, v2

    aget-object v6, p1, v3

    iget-object v6, v6, Lk2/i;->r:Ljava/lang/StackTraceElement;

    invoke-virtual {v5, v6}, Ljava/lang/StackTraceElement;->equals(Ljava/lang/Object;)Z

    move-result v5

    if-eqz v5, :cond_2e

    add-int/lit8 v4, v4, 0x1

    add-int/lit8 v2, v2, -0x1

    add-int/lit8 v3, v3, -0x1

    goto :goto_17

    .line 2
    :cond_2e
    :goto_2e
    array-length v0, p1

    sub-int/2addr v0, v4

    move v2, v1

    :goto_31
    const-string v3, "Packaging data has been already set"

    const/4 v5, 0x0

    if-ge v2, v4, :cond_4d

    add-int v6, v0, v2

    aget-object v6, p1, v6

    invoke-virtual {p0, v6, v5}, Lk2/h;->a(Lk2/i;Ljava/lang/ClassLoader;)Lk2/b;

    move-result-object v5

    .line 3
    iget-object v7, v6, Lk2/i;->t:Lk2/b;

    if-nez v7, :cond_47

    iput-object v5, v6, Lk2/i;->t:Lk2/b;

    add-int/lit8 v2, v2, 0x1

    goto :goto_31

    :cond_47
    new-instance p1, Ljava/lang/IllegalStateException;

    invoke-direct {p1, v3}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V

    throw p1

    .line 4
    :cond_4d
    array-length v0, p1

    sub-int/2addr v0, v4

    :goto_4f
    if-ge v1, v0, :cond_66

    aget-object v2, p1, v1

    invoke-virtual {p0, v2, v5}, Lk2/h;->a(Lk2/i;Ljava/lang/ClassLoader;)Lk2/b;

    move-result-object v4

    .line 5
    iget-object v6, v2, Lk2/i;->t:Lk2/b;

    if-nez v6, :cond_60

    iput-object v4, v2, Lk2/i;->t:Lk2/b;

    add-int/lit8 v1, v1, 0x1

    goto :goto_4f

    :cond_60
    new-instance p1, Ljava/lang/IllegalStateException;

    invoke-direct {p1, v3}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V

    throw p1

    :cond_66
    return-void
.end method
