.class public Lf8/c;
.super Ljava/lang/Object;
.source ""

# interfaces
.implements Lf8/d;


# static fields
.field public static final m:Ljava/lang/Object;

.field public static final n:Ljava/util/concurrent/ThreadFactory;


# instance fields
.field public final a:Lcom/google/firebase/a;

.field public final b:Li8/c;

.field public final c:Lh8/c;

.field public final d:Lf8/k;

.field public final e:Lh8/b;

.field public final f:Lf8/i;

.field public final g:Ljava/lang/Object;

.field public final h:Ljava/util/concurrent/ExecutorService;

.field public final i:Ljava/util/concurrent/ExecutorService;

.field public j:Ljava/lang/String;

.field public k:Ljava/util/Set;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Set<",
            "Lg8/a;",
            ">;"
        }
    .end annotation
.end field

.field public final l:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Lf8/j;",
            ">;"
        }
    .end annotation
.end field


# direct methods
.method public static constructor <clinit>()V
    .registers 1

    new-instance v0, Ljava/lang/Object;

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

    sput-object v0, Lf8/c;->m:Ljava/lang/Object;

    new-instance v0, Lf8/c$a;

    invoke-direct {v0}, Lf8/c$a;-><init>()V

    sput-object v0, Lf8/c;->n:Ljava/util/concurrent/ThreadFactory;

    return-void
.end method

.method public constructor <init>(Lcom/google/firebase/a;Le8/a;Le8/a;)V
    .registers 15
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lcom/google/firebase/a;",
            "Le8/a<",
            "Lm8/h;",
            ">;",
            "Le8/a<",
            "Lc8/e;",
            ">;)V"
        }
    .end annotation

    new-instance v8, Ljava/util/concurrent/ThreadPoolExecutor;

    sget-object v9, Ljava/util/concurrent/TimeUnit;->SECONDS:Ljava/util/concurrent/TimeUnit;

    new-instance v6, Ljava/util/concurrent/LinkedBlockingQueue;

    invoke-direct {v6}, Ljava/util/concurrent/LinkedBlockingQueue;-><init>()V

    sget-object v10, Lf8/c;->n:Ljava/util/concurrent/ThreadFactory;

    const/4 v1, 0x0

    const/4 v2, 0x1

    const-wide/16 v3, 0x1e

    move-object v0, v8

    move-object v5, v9

    move-object v7, v10

    invoke-direct/range {v0 .. v7}, Ljava/util/concurrent/ThreadPoolExecutor;-><init>(IIJLjava/util/concurrent/TimeUnit;Ljava/util/concurrent/BlockingQueue;Ljava/util/concurrent/ThreadFactory;)V

    new-instance v0, Li8/c;

    .line 1
    invoke-virtual {p1}, Lcom/google/firebase/a;->a()V

    iget-object v1, p1, Lcom/google/firebase/a;->a:Landroid/content/Context;

    .line 2
    invoke-direct {v0, v1, p2, p3}, Li8/c;-><init>(Landroid/content/Context;Le8/a;Le8/a;)V

    new-instance p2, Lh8/c;

    invoke-direct {p2, p1}, Lh8/c;-><init>(Lcom/google/firebase/a;)V

    invoke-static {}, Lf8/k;->c()Lf8/k;

    move-result-object p3

    new-instance v1, Lh8/b;

    invoke-direct {v1, p1}, Lh8/b;-><init>(Lcom/google/firebase/a;)V

    new-instance v2, Lf8/i;

    invoke-direct {v2}, Lf8/i;-><init>()V

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

    new-instance v3, Ljava/lang/Object;

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

    iput-object v3, p0, Lf8/c;->g:Ljava/lang/Object;

    new-instance v3, Ljava/util/HashSet;

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

    iput-object v3, p0, Lf8/c;->k:Ljava/util/Set;

    new-instance v3, Ljava/util/ArrayList;

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

    iput-object v3, p0, Lf8/c;->l:Ljava/util/List;

    iput-object p1, p0, Lf8/c;->a:Lcom/google/firebase/a;

    iput-object v0, p0, Lf8/c;->b:Li8/c;

    iput-object p2, p0, Lf8/c;->c:Lh8/c;

    iput-object p3, p0, Lf8/c;->d:Lf8/k;

    iput-object v1, p0, Lf8/c;->e:Lh8/b;

    iput-object v2, p0, Lf8/c;->f:Lf8/i;

    iput-object v8, p0, Lf8/c;->h:Ljava/util/concurrent/ExecutorService;

    new-instance p1, Ljava/util/concurrent/ThreadPoolExecutor;

    new-instance v6, Ljava/util/concurrent/LinkedBlockingQueue;

    invoke-direct {v6}, Ljava/util/concurrent/LinkedBlockingQueue;-><init>()V

    const/4 v1, 0x0

    const/4 v2, 0x1

    const-wide/16 v3, 0x1e

    move-object v0, p1

    move-object v5, v9

    move-object v7, v10

    invoke-direct/range {v0 .. v7}, Ljava/util/concurrent/ThreadPoolExecutor;-><init>(IIJLjava/util/concurrent/TimeUnit;Ljava/util/concurrent/BlockingQueue;Ljava/util/concurrent/ThreadFactory;)V

    iput-object p1, p0, Lf8/c;->i:Ljava/util/concurrent/ExecutorService;

    return-void
.end method

.method public static f(Lcom/google/firebase/a;)Lf8/c;
    .registers 3

    const/4 v0, 0x1

    const-string v1, "Null is not a valid value of FirebaseApp."

    invoke-static {v0, v1}, Lcom/google/android/gms/common/internal/d;->b(ZLjava/lang/Object;)V

    const-class v0, Lf8/d;

    .line 1
    invoke-virtual {p0}, Lcom/google/firebase/a;->a()V

    iget-object p0, p0, Lcom/google/firebase/a;->d:Lv7/k;

    invoke-virtual {p0, v0}, Lv7/a;->a(Ljava/lang/Class;)Ljava/lang/Object;

    move-result-object p0

    .line 2
    check-cast p0, Lf8/c;

    return-object p0
.end method


# virtual methods
.method public a(Z)Ln6/i;
    .registers 6
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(Z)",
            "Ln6/i<",
            "Lcom/google/firebase/installations/a;",
            ">;"
        }
    .end annotation

    invoke-virtual {p0}, Lf8/c;->h()V

    .line 1
    new-instance v0, Ln6/j;

    invoke-direct {v0}, Ln6/j;-><init>()V

    new-instance v1, Lf8/g;

    iget-object v2, p0, Lf8/c;->d:Lf8/k;

    invoke-direct {v1, v2, v0}, Lf8/g;-><init>(Lf8/k;Ln6/j;)V

    .line 2
    iget-object v2, p0, Lf8/c;->g:Ljava/lang/Object;

    monitor-enter v2

    :try_start_12
    iget-object v3, p0, Lf8/c;->l:Ljava/util/List;

    invoke-interface {v3, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    monitor-exit v2
    :try_end_18
    .catchall {:try_start_12 .. :try_end_18} :catchall_26

    .line 3
    iget-object v0, v0, Ln6/j;->a:Ln6/u;

    .line 4
    iget-object v1, p0, Lf8/c;->h:Ljava/util/concurrent/ExecutorService;

    new-instance v2, Lf8/b;

    const/4 v3, 0x0

    invoke-direct {v2, p0, p1, v3}, Lf8/b;-><init>(Lf8/c;ZI)V

    invoke-interface {v1, v2}, Ljava/util/concurrent/ExecutorService;->execute(Ljava/lang/Runnable;)V

    return-object v0

    :catchall_26
    move-exception p1

    .line 5
    :try_start_27
    monitor-exit v2
    :try_end_28
    .catchall {:try_start_27 .. :try_end_28} :catchall_26

    throw p1
.end method

.method public final b(Z)V
    .registers 7

    .line 1
    sget-object v0, Lf8/c;->m:Ljava/lang/Object;

    monitor-enter v0

    :try_start_3
    iget-object v1, p0, Lf8/c;->a:Lcom/google/firebase/a;

    .line 2
    invoke-virtual {v1}, Lcom/google/firebase/a;->a()V

    iget-object v1, v1, Lcom/google/firebase/a;->a:Landroid/content/Context;

    const-string v2, "generatefid.lock"

    .line 3
    invoke-static {v1, v2}, Lm3/t;->d(Landroid/content/Context;Ljava/lang/String;)Lm3/t;

    move-result-object v1
    :try_end_10
    .catchall {:try_start_3 .. :try_end_10} :catchall_61

    :try_start_10
    iget-object v2, p0, Lf8/c;->c:Lh8/c;

    invoke-virtual {v2}, Lh8/c;->b()Lh8/d;

    move-result-object v2

    invoke-virtual {v2}, Lh8/d;->i()Z

    move-result v3

    if-eqz v3, :cond_36

    invoke-virtual {p0, v2}, Lf8/c;->i(Lh8/d;)Ljava/lang/String;

    move-result-object v3

    iget-object v4, p0, Lf8/c;->c:Lh8/c;

    .line 4
    invoke-virtual {v2}, Lh8/d;->k()Lh8/d$a;

    move-result-object v2

    check-cast v2, Lh8/a$b;

    .line 5
    iput-object v3, v2, Lh8/a$b;->a:Ljava/lang/String;

    .line 6
    sget-object v3, Lh8/c$a;->t:Lh8/c$a;

    invoke-virtual {v2, v3}, Lh8/a$b;->b(Lh8/c$a;)Lh8/d$a;

    invoke-virtual {v2}, Lh8/a$b;->a()Lh8/d;

    move-result-object v2

    .line 7
    invoke-virtual {v4, v2}, Lh8/c;->a(Lh8/d;)Lh8/d;
    :try_end_36
    .catchall {:try_start_10 .. :try_end_36} :catchall_5a

    :cond_36
    if-eqz v1, :cond_3b

    :try_start_38
    invoke-virtual {v1}, Lm3/t;->f()V

    :cond_3b
    monitor-exit v0
    :try_end_3c
    .catchall {:try_start_38 .. :try_end_3c} :catchall_61

    if-eqz p1, :cond_4b

    .line 8
    invoke-virtual {v2}, Lh8/d;->k()Lh8/d$a;

    move-result-object v0

    check-cast v0, Lh8/a$b;

    const/4 v1, 0x0

    .line 9
    iput-object v1, v0, Lh8/a$b;->c:Ljava/lang/String;

    .line 10
    invoke-virtual {v0}, Lh8/a$b;->a()Lh8/d;

    move-result-object v2

    .line 11
    :cond_4b
    invoke-virtual {p0, v2}, Lf8/c;->l(Lh8/d;)V

    iget-object v0, p0, Lf8/c;->i:Ljava/util/concurrent/ExecutorService;

    new-instance v1, Lf8/b;

    const/4 v2, 0x1

    invoke-direct {v1, p0, p1, v2}, Lf8/b;-><init>(Lf8/c;ZI)V

    invoke-interface {v0, v1}, Ljava/util/concurrent/ExecutorService;->execute(Ljava/lang/Runnable;)V

    return-void

    :catchall_5a
    move-exception p1

    if-eqz v1, :cond_60

    .line 12
    :try_start_5d
    invoke-virtual {v1}, Lm3/t;->f()V

    :cond_60
    throw p1

    :catchall_61
    move-exception p1

    monitor-exit v0
    :try_end_63
    .catchall {:try_start_5d .. :try_end_63} :catchall_61

    throw p1
.end method

.method public final c(Lh8/d;)Lh8/d;
    .registers 16

    iget-object v0, p0, Lf8/c;->b:Li8/c;

    invoke-virtual {p0}, Lf8/c;->d()Ljava/lang/String;

    move-result-object v1

    move-object v2, p1

    check-cast v2, Lh8/a;

    .line 1
    iget-object v3, v2, Lh8/a;->b:Ljava/lang/String;

    .line 2
    invoke-virtual {p0}, Lf8/c;->g()Ljava/lang/String;

    move-result-object v4

    .line 3
    iget-object v2, v2, Lh8/a;->e:Ljava/lang/String;

    .line 4
    iget-object v5, v0, Li8/c;->d:Li8/e;

    invoke-virtual {v5}, Li8/e;->a()Z

    move-result v5

    const-string v6, "Firebase Installations Service is unavailable. Please try again later."

    const/4 v7, 0x2

    if-eqz v5, :cond_138

    new-array v5, v7, [Ljava/lang/Object;

    const/4 v8, 0x0

    aput-object v4, v5, v8

    const/4 v9, 0x1

    aput-object v3, v5, v9

    const-string v3, "projects/%s/installations/%s/authTokens:generate"

    invoke-static {v3, v5}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v0, v3}, Li8/c;->a(Ljava/lang/String;)Ljava/net/URL;

    move-result-object v3

    move v5, v8

    :goto_2f
    if-gt v5, v9, :cond_132

    const v10, 0x8003

    invoke-static {v10}, Landroid/net/TrafficStats;->setThreadStatsTag(I)V

    invoke-virtual {v0, v3, v1}, Li8/c;->c(Ljava/net/URL;Ljava/lang/String;)Ljava/net/HttpURLConnection;

    move-result-object v10

    :try_start_3b
    const-string v11, "POST"

    invoke-virtual {v10, v11}, Ljava/net/HttpURLConnection;->setRequestMethod(Ljava/lang/String;)V

    const-string v11, "Authorization"

    new-instance v12, Ljava/lang/StringBuilder;

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

    const-string v13, "FIS_v2 "

    invoke-virtual {v12, v13}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v12, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

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

    move-result-object v12

    invoke-virtual {v10, v11, v12}, Ljava/net/HttpURLConnection;->addRequestProperty(Ljava/lang/String;Ljava/lang/String;)V

    invoke-virtual {v10, v9}, Ljava/net/HttpURLConnection;->setDoOutput(Z)V

    invoke-virtual {v0, v10}, Li8/c;->h(Ljava/net/HttpURLConnection;)V

    invoke-virtual {v10}, Ljava/net/HttpURLConnection;->getResponseCode()I

    move-result v11

    iget-object v12, v0, Li8/c;->d:Li8/e;

    invoke-virtual {v12, v11}, Li8/e;->b(I)V

    const/16 v12, 0xc8

    if-lt v11, v12, :cond_6f

    const/16 v12, 0x12c

    if-ge v11, v12, :cond_6f

    move v12, v9

    goto :goto_70

    :cond_6f
    move v12, v8

    :goto_70
    const/4 v13, 0x0

    if-eqz v12, :cond_78

    invoke-virtual {v0, v10}, Li8/c;->f(Ljava/net/HttpURLConnection;)Li8/f;

    move-result-object v0

    goto :goto_b8

    :cond_78
    invoke-static {v10, v13, v1, v4}, Li8/c;->b(Ljava/net/HttpURLConnection;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    const/16 v12, 0x191

    if-eq v11, v12, :cond_ab

    const/16 v12, 0x194

    if-ne v11, v12, :cond_84

    goto :goto_ab

    :cond_84
    const/16 v12, 0x1ad

    if-eq v11, v12, :cond_a2

    const/16 v12, 0x1f4

    if-lt v11, v12, :cond_92

    const/16 v12, 0x258

    if-ge v11, v12, :cond_92

    goto/16 :goto_128

    :cond_92
    const-string v11, "Firebase-Installations"

    const-string v12, "Firebase Installations can not communicate with Firebase server APIs due to invalid configuration. Please update your Firebase initialization process and set valid Firebase options (API key, Project ID, Application ID) when initializing Firebase."

    .line 5
    invoke-static {v11, v12}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    .line 6
    invoke-static {}, Li8/f;->a()Li8/f$a;

    move-result-object v11

    sget-object v12, Li8/f$b;->s:Li8/f$b;

    :goto_9f
    check-cast v11, Li8/b$b;

    goto :goto_b2

    :cond_a2
    new-instance v11, Lf8/e;

    const-string v12, "Firebase servers have received too many requests from this client in a short period of time. Please try again later."

    const/4 v13, 0x3

    invoke-direct {v11, v12, v13}, Lf8/e;-><init>(Ljava/lang/String;I)V

    throw v11

    :cond_ab
    :goto_ab
    invoke-static {}, Li8/f;->a()Li8/f$a;

    move-result-object v11

    sget-object v12, Li8/f$b;->t:Li8/f$b;

    goto :goto_9f

    .line 7
    :goto_b2
    iput-object v12, v11, Li8/b$b;->c:Li8/f$b;

    .line 8
    invoke-virtual {v11}, Li8/b$b;->a()Li8/f;

    move-result-object v0
    :try_end_b8
    .catch Ljava/lang/AssertionError; {:try_start_3b .. :try_end_b8} :catch_128
    .catch Ljava/io/IOException; {:try_start_3b .. :try_end_b8} :catch_128
    .catchall {:try_start_3b .. :try_end_b8} :catchall_120

    :goto_b8
    invoke-virtual {v10}, Ljava/net/HttpURLConnection;->disconnect()V

    invoke-static {}, Landroid/net/TrafficStats;->clearThreadStatsTag()V

    .line 9
    check-cast v0, Li8/b;

    .line 10
    iget-object v1, v0, Li8/b;->c:Li8/f$b;

    .line 11
    invoke-virtual {v1}, Ljava/lang/Enum;->ordinal()I

    move-result v1

    if-eqz v1, :cond_fd

    if-eq v1, v9, :cond_e9

    if-ne v1, v7, :cond_e1

    .line 12
    monitor-enter p0

    :try_start_cd
    iput-object v13, p0, Lf8/c;->j:Ljava/lang/String;
    :try_end_cf
    .catchall {:try_start_cd .. :try_end_cf} :catchall_de

    monitor-exit p0

    .line 13
    invoke-virtual {p1}, Lh8/d;->k()Lh8/d$a;

    move-result-object p1

    sget-object v0, Lh8/c$a;->s:Lh8/c$a;

    invoke-virtual {p1, v0}, Lh8/d$a;->b(Lh8/c$a;)Lh8/d$a;

    invoke-virtual {p1}, Lh8/d$a;->a()Lh8/d;

    move-result-object p1

    return-object p1

    :catchall_de
    move-exception p1

    .line 14
    monitor-exit p0

    throw p1

    .line 15
    :cond_e1
    new-instance p1, Lf8/e;

    const-string v0, "Firebase Installations Service is unavailable. Please try again later."

    invoke-direct {p1, v0, v7}, Lf8/e;-><init>(Ljava/lang/String;I)V

    throw p1

    :cond_e9
    const-string v0, "BAD CONFIG"

    .line 16
    invoke-virtual {p1}, Lh8/d;->k()Lh8/d$a;

    move-result-object p1

    check-cast p1, Lh8/a$b;

    .line 17
    iput-object v0, p1, Lh8/a$b;->g:Ljava/lang/String;

    .line 18
    sget-object v0, Lh8/c$a;->v:Lh8/c$a;

    invoke-virtual {p1, v0}, Lh8/a$b;->b(Lh8/c$a;)Lh8/d$a;

    invoke-virtual {p1}, Lh8/a$b;->a()Lh8/d;

    move-result-object p1

    return-object p1

    .line 19
    :cond_fd
    iget-object v1, v0, Li8/b;->a:Ljava/lang/String;

    .line 20
    iget-wide v2, v0, Li8/b;->b:J

    .line 21
    iget-object v0, p0, Lf8/c;->d:Lf8/k;

    invoke-virtual {v0}, Lf8/k;->b()J

    move-result-wide v4

    .line 22
    invoke-virtual {p1}, Lh8/d;->k()Lh8/d$a;

    move-result-object p1

    check-cast p1, Lh8/a$b;

    .line 23
    iput-object v1, p1, Lh8/a$b;->c:Ljava/lang/String;

    .line 24
    invoke-static {v2, v3}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v0

    iput-object v0, p1, Lh8/a$b;->e:Ljava/lang/Long;

    .line 25
    invoke-static {v4, v5}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v0

    iput-object v0, p1, Lh8/a$b;->f:Ljava/lang/Long;

    .line 26
    invoke-virtual {p1}, Lh8/a$b;->a()Lh8/d;

    move-result-object p1

    return-object p1

    :catchall_120
    move-exception p1

    .line 27
    invoke-virtual {v10}, Ljava/net/HttpURLConnection;->disconnect()V

    invoke-static {}, Landroid/net/TrafficStats;->clearThreadStatsTag()V

    throw p1

    :catch_128
    :goto_128
    invoke-virtual {v10}, Ljava/net/HttpURLConnection;->disconnect()V

    invoke-static {}, Landroid/net/TrafficStats;->clearThreadStatsTag()V

    add-int/lit8 v5, v5, 0x1

    goto/16 :goto_2f

    :cond_132
    new-instance p1, Lf8/e;

    invoke-direct {p1, v6, v7}, Lf8/e;-><init>(Ljava/lang/String;I)V

    throw p1

    :cond_138
    new-instance p1, Lf8/e;

    invoke-direct {p1, v6, v7}, Lf8/e;-><init>(Ljava/lang/String;I)V

    throw p1
.end method

.method public d()Ljava/lang/String;
    .registers 2

    iget-object v0, p0, Lf8/c;->a:Lcom/google/firebase/a;

    .line 1
    invoke-virtual {v0}, Lcom/google/firebase/a;->a()V

    iget-object v0, v0, Lcom/google/firebase/a;->c:Lr7/d;

    .line 2
    iget-object v0, v0, Lr7/d;->a:Ljava/lang/String;

    return-object v0
.end method

.method public e()Ljava/lang/String;
    .registers 2

    iget-object v0, p0, Lf8/c;->a:Lcom/google/firebase/a;

    .line 1
    invoke-virtual {v0}, Lcom/google/firebase/a;->a()V

    iget-object v0, v0, Lcom/google/firebase/a;->c:Lr7/d;

    .line 2
    iget-object v0, v0, Lr7/d;->b:Ljava/lang/String;

    return-object v0
.end method

.method public g()Ljava/lang/String;
    .registers 2

    iget-object v0, p0, Lf8/c;->a:Lcom/google/firebase/a;

    .line 1
    invoke-virtual {v0}, Lcom/google/firebase/a;->a()V

    iget-object v0, v0, Lcom/google/firebase/a;->c:Lr7/d;

    .line 2
    iget-object v0, v0, Lr7/d;->g:Ljava/lang/String;

    return-object v0
.end method

.method public getId()Ln6/i;
    .registers 5
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Ln6/i<",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation

    invoke-virtual {p0}, Lf8/c;->h()V

    .line 1
    monitor-enter p0

    :try_start_4
    iget-object v0, p0, Lf8/c;->j:Ljava/lang/String;
    :try_end_6
    .catchall {:try_start_4 .. :try_end_6} :catchall_31

    monitor-exit p0

    if-eqz v0, :cond_e

    .line 2
    invoke-static {v0}, Ln6/l;->e(Ljava/lang/Object;)Ln6/i;

    move-result-object v0

    return-object v0

    .line 3
    :cond_e
    new-instance v0, Ln6/j;

    invoke-direct {v0}, Ln6/j;-><init>()V

    new-instance v1, Lf8/h;

    invoke-direct {v1, v0}, Lf8/h;-><init>(Ln6/j;)V

    .line 4
    iget-object v2, p0, Lf8/c;->g:Ljava/lang/Object;

    monitor-enter v2

    :try_start_1b
    iget-object v3, p0, Lf8/c;->l:Ljava/util/List;

    invoke-interface {v3, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    monitor-exit v2
    :try_end_21
    .catchall {:try_start_1b .. :try_end_21} :catchall_2e

    .line 5
    iget-object v0, v0, Ln6/j;->a:Ln6/u;

    .line 6
    iget-object v1, p0, Lf8/c;->h:Ljava/util/concurrent/ExecutorService;

    new-instance v2, Landroidx/appcompat/widget/i1;

    invoke-direct {v2, p0}, Landroidx/appcompat/widget/i1;-><init>(Lf8/c;)V

    invoke-interface {v1, v2}, Ljava/util/concurrent/ExecutorService;->execute(Ljava/lang/Runnable;)V

    return-object v0

    :catchall_2e
    move-exception v0

    .line 7
    :try_start_2f
    monitor-exit v2
    :try_end_30
    .catchall {:try_start_2f .. :try_end_30} :catchall_2e

    throw v0

    :catchall_31
    move-exception v0

    .line 8
    monitor-exit p0

    throw v0
.end method

.method public final h()V
    .registers 5

    invoke-virtual {p0}, Lf8/c;->e()Ljava/lang/String;

    move-result-object v0

    const-string v1, "Please set your Application ID. A valid Firebase App ID is required to communicate with Firebase server APIs: It identifies your application with Firebase.Please refer to https://firebase.google.com/support/privacy/init-options."

    invoke-static {v0, v1}, Lcom/google/android/gms/common/internal/d;->f(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/String;

    invoke-virtual {p0}, Lf8/c;->g()Ljava/lang/String;

    move-result-object v0

    const-string v2, "Please set your Project ID. A valid Firebase Project ID is required to communicate with Firebase server APIs: It identifies your application with Firebase.Please refer to https://firebase.google.com/support/privacy/init-options."

    invoke-static {v0, v2}, Lcom/google/android/gms/common/internal/d;->f(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/String;

    invoke-virtual {p0}, Lf8/c;->d()Ljava/lang/String;

    move-result-object v0

    const-string v2, "Please set a valid API key. A Firebase API key is required to communicate with Firebase server APIs: It authenticates your project with Google.Please refer to https://firebase.google.com/support/privacy/init-options."

    invoke-static {v0, v2}, Lcom/google/android/gms/common/internal/d;->f(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/String;

    invoke-virtual {p0}, Lf8/c;->e()Ljava/lang/String;

    move-result-object v0

    sget-object v3, Lf8/k;->c:Ljava/util/regex/Pattern;

    const-string v3, ":"

    .line 1
    invoke-virtual {v0, v3}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v0

    .line 2
    invoke-static {v0, v1}, Lcom/google/android/gms/common/internal/d;->b(ZLjava/lang/Object;)V

    invoke-virtual {p0}, Lf8/c;->d()Ljava/lang/String;

    move-result-object v0

    .line 3
    sget-object v1, Lf8/k;->c:Ljava/util/regex/Pattern;

    invoke-virtual {v1, v0}, Ljava/util/regex/Pattern;->matcher(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;

    move-result-object v0

    invoke-virtual {v0}, Ljava/util/regex/Matcher;->matches()Z

    move-result v0

    .line 4
    invoke-static {v0, v2}, Lcom/google/android/gms/common/internal/d;->b(ZLjava/lang/Object;)V

    return-void
.end method

.method public final i(Lh8/d;)Ljava/lang/String;
    .registers 7

    iget-object v0, p0, Lf8/c;->a:Lcom/google/firebase/a;

    .line 1
    invoke-virtual {v0}, Lcom/google/firebase/a;->a()V

    iget-object v0, v0, Lcom/google/firebase/a;->b:Ljava/lang/String;

    const-string v1, "CHIME_ANDROID_SDK"

    .line 2
    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_17

    iget-object v0, p0, Lf8/c;->a:Lcom/google/firebase/a;

    invoke-virtual {v0}, Lcom/google/firebase/a;->g()Z

    move-result v0

    if-eqz v0, :cond_24

    .line 3
    :cond_17
    check-cast p1, Lh8/a;

    .line 4
    iget-object p1, p1, Lh8/a;->c:Lh8/c$a;

    .line 5
    sget-object v0, Lh8/c$a;->r:Lh8/c$a;

    if-ne p1, v0, :cond_21

    const/4 p1, 0x1

    goto :goto_22

    :cond_21
    const/4 p1, 0x0

    :goto_22
    if-nez p1, :cond_2b

    .line 6
    :cond_24
    iget-object p1, p0, Lf8/c;->f:Lf8/i;

    invoke-virtual {p1}, Lf8/i;->a()Ljava/lang/String;

    move-result-object p1

    return-object p1

    :cond_2b
    iget-object p1, p0, Lf8/c;->e:Lh8/b;

    .line 7
    iget-object v0, p1, Lh8/b;->a:Landroid/content/SharedPreferences;

    monitor-enter v0

    .line 8
    :try_start_30
    iget-object v1, p1, Lh8/b;->a:Landroid/content/SharedPreferences;

    monitor-enter v1
    :try_end_33
    .catchall {:try_start_30 .. :try_end_33} :catchall_55

    :try_start_33
    iget-object v2, p1, Lh8/b;->a:Landroid/content/SharedPreferences;

    const-string v3, "|S|id"

    const/4 v4, 0x0

    invoke-interface {v2, v3, v4}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    monitor-exit v1
    :try_end_3d
    .catchall {:try_start_33 .. :try_end_3d} :catchall_52

    if-eqz v2, :cond_40

    goto :goto_44

    .line 9
    :cond_40
    :try_start_40
    invoke-virtual {p1}, Lh8/b;->a()Ljava/lang/String;

    move-result-object v2

    :goto_44
    monitor-exit v0
    :try_end_45
    .catchall {:try_start_40 .. :try_end_45} :catchall_55

    .line 10
    invoke-static {v2}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result p1

    if-eqz p1, :cond_51

    iget-object p1, p0, Lf8/c;->f:Lf8/i;

    invoke-virtual {p1}, Lf8/i;->a()Ljava/lang/String;

    move-result-object v2

    :cond_51
    return-object v2

    :catchall_52
    move-exception p1

    .line 11
    :try_start_53
    monitor-exit v1
    :try_end_54
    .catchall {:try_start_53 .. :try_end_54} :catchall_52

    :try_start_54
    throw p1

    :catchall_55
    move-exception p1

    .line 12
    monitor-exit v0
    :try_end_57
    .catchall {:try_start_54 .. :try_end_57} :catchall_55

    throw p1
.end method

.method public final j(Lh8/d;)Lh8/d;
    .registers 25

    move-object/from16 v1, p0

    move-object/from16 v0, p1

    check-cast v0, Lh8/a;

    .line 1
    iget-object v2, v0, Lh8/a;->b:Ljava/lang/String;

    const/4 v3, 0x0

    const/4 v4, 0x0

    if-eqz v2, :cond_67

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

    move-result v2

    const/16 v5, 0xb

    if-ne v2, v5, :cond_67

    iget-object v2, v1, Lf8/c;->e:Lh8/b;

    .line 3
    iget-object v5, v2, Lh8/b;->a:Landroid/content/SharedPreferences;

    monitor-enter v5

    :try_start_19
    sget-object v6, Lh8/b;->c:[Ljava/lang/String;

    array-length v7, v6

    move v8, v4

    :goto_1d
    if-ge v8, v7, :cond_5f

    aget-object v9, v6, v8

    iget-object v10, v2, Lh8/b;->b:Ljava/lang/String;

    .line 4
    new-instance v11, Ljava/lang/StringBuilder;

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

    const-string v12, "|T|"

    invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v11, v10}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v10, "|"

    invoke-virtual {v11, v10}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

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

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

    move-result-object v9

    .line 5
    iget-object v10, v2, Lh8/b;->a:Landroid/content/SharedPreferences;

    invoke-interface {v10, v9, v3}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v9

    if-eqz v9, :cond_61

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

    move-result v10

    if-nez v10, :cond_61

    const-string v2, "{"

    invoke-virtual {v9, v2}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v2
    :try_end_50
    .catchall {:try_start_19 .. :try_end_50} :catchall_64

    if-eqz v2, :cond_5e

    .line 6
    :try_start_52
    new-instance v2, Lorg/json/JSONObject;

    invoke-direct {v2, v9}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V

    const-string v6, "token"

    invoke-virtual {v2, v6}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v3
    :try_end_5d
    .catch Lorg/json/JSONException; {:try_start_52 .. :try_end_5d} :catch_5f
    .catchall {:try_start_52 .. :try_end_5d} :catchall_64

    goto :goto_5f

    :cond_5e
    move-object v3, v9

    .line 7
    :catch_5f
    :cond_5f
    :goto_5f
    :try_start_5f
    monitor-exit v5

    goto :goto_67

    :cond_61
    add-int/lit8 v8, v8, 0x1

    goto :goto_1d

    :catchall_64
    move-exception v0

    monitor-exit v5
    :try_end_66
    .catchall {:try_start_5f .. :try_end_66} :catchall_64

    throw v0

    .line 8
    :cond_67
    :goto_67
    iget-object v2, v1, Lf8/c;->b:Li8/c;

    invoke-virtual/range {p0 .. p0}, Lf8/c;->d()Ljava/lang/String;

    move-result-object v5

    .line 9
    iget-object v0, v0, Lh8/a;->b:Ljava/lang/String;

    .line 10
    invoke-virtual/range {p0 .. p0}, Lf8/c;->g()Ljava/lang/String;

    move-result-object v6

    invoke-virtual/range {p0 .. p0}, Lf8/c;->e()Ljava/lang/String;

    move-result-object v7

    .line 11
    iget-object v8, v2, Li8/c;->d:Li8/e;

    invoke-virtual {v8}, Li8/e;->a()Z

    move-result v8

    const-string v9, "Firebase Installations Service is unavailable. Please try again later."

    const/4 v10, 0x2

    if-eqz v8, :cond_185

    const/4 v8, 0x1

    new-array v11, v8, [Ljava/lang/Object;

    aput-object v6, v11, v4

    const-string v12, "projects/%s/installations"

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

    move-result-object v11

    invoke-virtual {v2, v11}, Li8/c;->a(Ljava/lang/String;)Ljava/net/URL;

    move-result-object v11

    move v12, v4

    :goto_92
    if-gt v12, v8, :cond_17f

    const v13, 0x8001

    invoke-static {v13}, Landroid/net/TrafficStats;->setThreadStatsTag(I)V

    invoke-virtual {v2, v11, v5}, Li8/c;->c(Ljava/net/URL;Ljava/lang/String;)Ljava/net/HttpURLConnection;

    move-result-object v13

    :try_start_9e
    const-string v14, "POST"

    invoke-virtual {v13, v14}, Ljava/net/HttpURLConnection;->setRequestMethod(Ljava/lang/String;)V

    invoke-virtual {v13, v8}, Ljava/net/HttpURLConnection;->setDoOutput(Z)V

    if-eqz v3, :cond_ad

    const-string v14, "x-goog-fis-android-iid-migration-auth"

    invoke-virtual {v13, v14, v3}, Ljava/net/HttpURLConnection;->addRequestProperty(Ljava/lang/String;Ljava/lang/String;)V

    :cond_ad
    invoke-virtual {v2, v13, v0, v7}, Li8/c;->g(Ljava/net/HttpURLConnection;Ljava/lang/String;Ljava/lang/String;)V

    invoke-virtual {v13}, Ljava/net/HttpURLConnection;->getResponseCode()I

    move-result v14

    iget-object v15, v2, Li8/c;->d:Li8/e;

    invoke-virtual {v15, v14}, Li8/e;->b(I)V

    const/16 v15, 0xc8

    if-lt v14, v15, :cond_c3

    const/16 v15, 0x12c

    if-ge v14, v15, :cond_c3

    move v15, v8

    goto :goto_c4

    :cond_c3
    move v15, v4

    :goto_c4
    if-eqz v15, :cond_d1

    invoke-virtual {v2, v13}, Li8/c;->e(Ljava/net/HttpURLConnection;)Li8/d;

    move-result-object v0
    :try_end_ca
    .catch Ljava/lang/AssertionError; {:try_start_9e .. :try_end_ca} :catch_174
    .catch Ljava/io/IOException; {:try_start_9e .. :try_end_ca} :catch_174
    .catchall {:try_start_9e .. :try_end_ca} :catchall_16c

    invoke-virtual {v13}, Ljava/net/HttpURLConnection;->disconnect()V

    invoke-static {}, Landroid/net/TrafficStats;->clearThreadStatsTag()V

    goto :goto_103

    :cond_d1
    :try_start_d1
    invoke-static {v13, v7, v5, v6}, Li8/c;->b(Ljava/net/HttpURLConnection;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    const/16 v15, 0x1ad

    if-eq v14, v15, :cond_163

    const/16 v15, 0x1f4

    if-lt v14, v15, :cond_e2

    const/16 v15, 0x258

    if-ge v14, v15, :cond_e2

    goto/16 :goto_174

    :cond_e2
    const-string v14, "Firebase-Installations"

    const-string v15, "Firebase Installations can not communicate with Firebase server APIs due to invalid configuration. Please update your Firebase initialization process and set valid Firebase options (API key, Project ID, Application ID) when initializing Firebase."

    .line 12
    invoke-static {v14, v15}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    const/16 v20, 0x0

    const/16 v19, 0x0

    const/16 v18, 0x0

    const/16 v17, 0x0

    .line 13
    sget-object v21, Li8/d$a;->s:Li8/d$a;

    .line 14
    new-instance v14, Li8/a;

    const/16 v22, 0x0

    move-object/from16 v16, v14

    invoke-direct/range {v16 .. v22}, Li8/a;-><init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Li8/f;Li8/d$a;Li8/a$a;)V
    :try_end_fc
    .catch Ljava/lang/AssertionError; {:try_start_d1 .. :try_end_fc} :catch_174
    .catch Ljava/io/IOException; {:try_start_d1 .. :try_end_fc} :catch_174
    .catchall {:try_start_d1 .. :try_end_fc} :catchall_16c

    .line 15
    invoke-virtual {v13}, Ljava/net/HttpURLConnection;->disconnect()V

    invoke-static {}, Landroid/net/TrafficStats;->clearThreadStatsTag()V

    move-object v0, v14

    .line 16
    :goto_103
    check-cast v0, Li8/a;

    .line 17
    iget-object v2, v0, Li8/a;->e:Li8/d$a;

    .line 18
    invoke-virtual {v2}, Ljava/lang/Enum;->ordinal()I

    move-result v2

    if-eqz v2, :cond_12b

    if-ne v2, v8, :cond_123

    const-string v0, "BAD CONFIG"

    .line 19
    invoke-virtual/range {p1 .. p1}, Lh8/d;->k()Lh8/d$a;

    move-result-object v2

    check-cast v2, Lh8/a$b;

    .line 20
    iput-object v0, v2, Lh8/a$b;->g:Ljava/lang/String;

    .line 21
    sget-object v0, Lh8/c$a;->v:Lh8/c$a;

    invoke-virtual {v2, v0}, Lh8/a$b;->b(Lh8/c$a;)Lh8/d$a;

    invoke-virtual {v2}, Lh8/a$b;->a()Lh8/d;

    move-result-object v0

    return-object v0

    .line 22
    :cond_123
    new-instance v0, Lf8/e;

    const-string v2, "Firebase Installations Service is unavailable. Please try again later."

    invoke-direct {v0, v2, v10}, Lf8/e;-><init>(Ljava/lang/String;I)V

    throw v0

    .line 23
    :cond_12b
    iget-object v2, v0, Li8/a;->b:Ljava/lang/String;

    .line 24
    iget-object v3, v0, Li8/a;->c:Ljava/lang/String;

    .line 25
    iget-object v4, v1, Lf8/c;->d:Lf8/k;

    invoke-virtual {v4}, Lf8/k;->b()J

    move-result-wide v4

    .line 26
    iget-object v6, v0, Li8/a;->d:Li8/f;

    .line 27
    invoke-virtual {v6}, Li8/f;->c()Ljava/lang/String;

    move-result-object v6

    .line 28
    iget-object v0, v0, Li8/a;->d:Li8/f;

    .line 29
    invoke-virtual {v0}, Li8/f;->d()J

    move-result-wide v7

    .line 30
    invoke-virtual/range {p1 .. p1}, Lh8/d;->k()Lh8/d$a;

    move-result-object v0

    check-cast v0, Lh8/a$b;

    .line 31
    iput-object v2, v0, Lh8/a$b;->a:Ljava/lang/String;

    .line 32
    sget-object v2, Lh8/c$a;->u:Lh8/c$a;

    invoke-virtual {v0, v2}, Lh8/a$b;->b(Lh8/c$a;)Lh8/d$a;

    .line 33
    iput-object v6, v0, Lh8/a$b;->c:Ljava/lang/String;

    .line 34
    iput-object v3, v0, Lh8/a$b;->d:Ljava/lang/String;

    .line 35
    invoke-static {v7, v8}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v2

    iput-object v2, v0, Lh8/a$b;->e:Ljava/lang/Long;

    .line 36
    invoke-static {v4, v5}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v2

    iput-object v2, v0, Lh8/a$b;->f:Ljava/lang/Long;

    .line 37
    invoke-virtual {v0}, Lh8/a$b;->a()Lh8/d;

    move-result-object v0

    return-object v0

    .line 38
    :cond_163
    :try_start_163
    new-instance v14, Lf8/e;

    const-string v15, "Firebase servers have received too many requests from this client in a short period of time. Please try again later."

    const/4 v4, 0x3

    invoke-direct {v14, v15, v4}, Lf8/e;-><init>(Ljava/lang/String;I)V

    throw v14
    :try_end_16c
    .catch Ljava/lang/AssertionError; {:try_start_163 .. :try_end_16c} :catch_174
    .catch Ljava/io/IOException; {:try_start_163 .. :try_end_16c} :catch_174
    .catchall {:try_start_163 .. :try_end_16c} :catchall_16c

    :catchall_16c
    move-exception v0

    invoke-virtual {v13}, Ljava/net/HttpURLConnection;->disconnect()V

    invoke-static {}, Landroid/net/TrafficStats;->clearThreadStatsTag()V

    throw v0

    :catch_174
    :goto_174
    invoke-virtual {v13}, Ljava/net/HttpURLConnection;->disconnect()V

    invoke-static {}, Landroid/net/TrafficStats;->clearThreadStatsTag()V

    add-int/lit8 v12, v12, 0x1

    const/4 v4, 0x0

    goto/16 :goto_92

    :cond_17f
    new-instance v0, Lf8/e;

    invoke-direct {v0, v9, v10}, Lf8/e;-><init>(Ljava/lang/String;I)V

    throw v0

    :cond_185
    new-instance v0, Lf8/e;

    invoke-direct {v0, v9, v10}, Lf8/e;-><init>(Ljava/lang/String;I)V

    throw v0
.end method

.method public final k(Ljava/lang/Exception;)V
    .registers 5

    iget-object v0, p0, Lf8/c;->g:Ljava/lang/Object;

    monitor-enter v0

    :try_start_3
    iget-object v1, p0, Lf8/c;->l:Ljava/util/List;

    invoke-interface {v1}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v1

    :cond_9
    :goto_9
    invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z

    move-result v2

    if-eqz v2, :cond_1f

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

    move-result-object v2

    check-cast v2, Lf8/j;

    invoke-interface {v2, p1}, Lf8/j;->b(Ljava/lang/Exception;)Z

    move-result v2

    if-eqz v2, :cond_9

    invoke-interface {v1}, Ljava/util/Iterator;->remove()V

    goto :goto_9

    :cond_1f
    monitor-exit v0

    return-void

    :catchall_21
    move-exception p1

    monitor-exit v0
    :try_end_23
    .catchall {:try_start_3 .. :try_end_23} :catchall_21

    throw p1
.end method

.method public final l(Lh8/d;)V
    .registers 5

    iget-object v0, p0, Lf8/c;->g:Ljava/lang/Object;

    monitor-enter v0

    :try_start_3
    iget-object v1, p0, Lf8/c;->l:Ljava/util/List;

    invoke-interface {v1}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v1

    :cond_9
    :goto_9
    invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z

    move-result v2

    if-eqz v2, :cond_1f

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

    move-result-object v2

    check-cast v2, Lf8/j;

    invoke-interface {v2, p1}, Lf8/j;->a(Lh8/d;)Z

    move-result v2

    if-eqz v2, :cond_9

    invoke-interface {v1}, Ljava/util/Iterator;->remove()V

    goto :goto_9

    :cond_1f
    monitor-exit v0

    return-void

    :catchall_21
    move-exception p1

    monitor-exit v0
    :try_end_23
    .catchall {:try_start_3 .. :try_end_23} :catchall_21

    throw p1
.end method
