apkfuckery/com.discord/smali_classes2/k0/q/a$c.smali
2020-09-29 21:44:44 +00:00

472 lines
8.6 KiB
Smali

.class public final Lk0/q/a$c;
.super Ljava/util/concurrent/atomic/AtomicReference;
.source "ReplaySubject.java"
# interfaces
.implements Lrx/Observable$a;
.implements Lk0/g;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lk0/q/a;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = "c"
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">",
"Ljava/util/concurrent/atomic/AtomicReference<",
"[",
"Lk0/q/a$b<",
"TT;>;>;",
"Lrx/Observable$a<",
"TT;>;",
"Lk0/g<",
"TT;>;"
}
.end annotation
# static fields
.field public static final d:[Lk0/q/a$b;
.field public static final e:[Lk0/q/a$b;
.field public static final serialVersionUID:J = 0x529b0a217109d450L
# instance fields
.field public final buffer:Lk0/q/a$a;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lk0/q/a$a<",
"TT;>;"
}
.end annotation
.end field
# direct methods
.method public static constructor <clinit>()V
.locals 2
const/4 v0, 0x0
new-array v1, v0, [Lk0/q/a$b;
sput-object v1, Lk0/q/a$c;->d:[Lk0/q/a$b;
new-array v0, v0, [Lk0/q/a$b;
sput-object v0, Lk0/q/a$c;->e:[Lk0/q/a$b;
return-void
.end method
.method public constructor <init>(Lk0/q/a$a;)V
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lk0/q/a$a<",
"TT;>;)V"
}
.end annotation
invoke-direct {p0}, Ljava/util/concurrent/atomic/AtomicReference;-><init>()V
iput-object p1, p0, Lk0/q/a$c;->buffer:Lk0/q/a$a;
sget-object p1, Lk0/q/a$c;->d:[Lk0/q/a$b;
invoke-virtual {p0, p1}, Ljava/util/concurrent/atomic/AtomicReference;->lazySet(Ljava/lang/Object;)V
return-void
.end method
# virtual methods
.method public a(Lk0/q/a$b;)V
.locals 6
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lk0/q/a$b<",
"TT;>;)V"
}
.end annotation
:cond_0
invoke-virtual {p0}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;
move-result-object v0
check-cast v0, [Lk0/q/a$b;
sget-object v1, Lk0/q/a$c;->e:[Lk0/q/a$b;
if-eq v0, v1, :cond_6
sget-object v1, Lk0/q/a$c;->d:[Lk0/q/a$b;
if-ne v0, v1, :cond_1
goto :goto_3
:cond_1
array-length v1, v0
const/4 v2, 0x0
const/4 v3, 0x0
:goto_0
if-ge v3, v1, :cond_3
aget-object v4, v0, v3
if-ne v4, p1, :cond_2
goto :goto_1
:cond_2
add-int/lit8 v3, v3, 0x1
goto :goto_0
:cond_3
const/4 v3, -0x1
:goto_1
if-gez v3, :cond_4
return-void
:cond_4
const/4 v4, 0x1
if-ne v1, v4, :cond_5
sget-object v1, Lk0/q/a$c;->d:[Lk0/q/a$b;
goto :goto_2
:cond_5
add-int/lit8 v5, v1, -0x1
new-array v5, v5, [Lk0/q/a$b;
invoke-static {v0, v2, v5, v2, v3}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
add-int/lit8 v2, v3, 0x1
sub-int/2addr v1, v3
sub-int/2addr v1, v4
invoke-static {v0, v2, v5, v3, v1}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
move-object v1, v5
:goto_2
invoke-virtual {p0, v0, v1}, Ljava/util/concurrent/atomic/AtomicReference;->compareAndSet(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_0
:cond_6
:goto_3
return-void
.end method
.method public call(Ljava/lang/Object;)V
.locals 4
check-cast p1, Lrx/Subscriber;
new-instance v0, Lk0/q/a$b;
invoke-direct {v0, p1, p0}, Lk0/q/a$b;-><init>(Lrx/Subscriber;Lk0/q/a$c;)V
invoke-virtual {p1, v0}, Lrx/Subscriber;->add(Lrx/Subscription;)V
invoke-virtual {p1, v0}, Lrx/Subscriber;->setProducer(Lrx/Producer;)V
:cond_0
invoke-virtual {p0}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;
move-result-object p1
check-cast p1, [Lk0/q/a$b;
sget-object v1, Lk0/q/a$c;->e:[Lk0/q/a$b;
const/4 v2, 0x0
if-ne p1, v1, :cond_1
goto :goto_0
:cond_1
array-length v1, p1
add-int/lit8 v3, v1, 0x1
new-array v3, v3, [Lk0/q/a$b;
invoke-static {p1, v2, v3, v2, v1}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
aput-object v0, v3, v1
invoke-virtual {p0, p1, v3}, Ljava/util/concurrent/atomic/AtomicReference;->compareAndSet(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result p1
if-eqz p1, :cond_0
const/4 v2, 0x1
:goto_0
if-eqz v2, :cond_2
invoke-virtual {v0}, Lk0/q/a$b;->isUnsubscribed()Z
move-result p1
if-eqz p1, :cond_2
invoke-virtual {p0, v0}, Lk0/q/a$c;->a(Lk0/q/a$b;)V
goto :goto_1
:cond_2
iget-object p1, p0, Lk0/q/a$c;->buffer:Lk0/q/a$a;
check-cast p1, Lk0/q/a$d;
invoke-virtual {p1, v0}, Lk0/q/a$d;->a(Lk0/q/a$b;)V
:goto_1
return-void
.end method
.method public onCompleted()V
.locals 6
iget-object v0, p0, Lk0/q/a$c;->buffer:Lk0/q/a$a;
move-object v1, v0
check-cast v1, Lk0/q/a$d;
const/4 v2, 0x1
iput-boolean v2, v1, Lk0/q/a$d;->f:Z
sget-object v1, Lk0/q/a$c;->e:[Lk0/q/a$b;
invoke-virtual {p0, v1}, Ljava/util/concurrent/atomic/AtomicReference;->getAndSet(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v1
check-cast v1, [Lk0/q/a$b;
array-length v2, v1
const/4 v3, 0x0
:goto_0
if-ge v3, v2, :cond_0
aget-object v4, v1, v3
move-object v5, v0
check-cast v5, Lk0/q/a$d;
invoke-virtual {v5, v4}, Lk0/q/a$d;->a(Lk0/q/a$b;)V
add-int/lit8 v3, v3, 0x1
goto :goto_0
:cond_0
return-void
.end method
.method public onError(Ljava/lang/Throwable;)V
.locals 6
iget-object v0, p0, Lk0/q/a$c;->buffer:Lk0/q/a$a;
move-object v1, v0
check-cast v1, Lk0/q/a$d;
iget-boolean v2, v1, Lk0/q/a$d;->f:Z
if-eqz v2, :cond_0
invoke-static {p1}, Lk0/o/l;->b(Ljava/lang/Throwable;)V
goto :goto_0
:cond_0
iput-object p1, v1, Lk0/q/a$d;->g:Ljava/lang/Throwable;
const/4 p1, 0x1
iput-boolean p1, v1, Lk0/q/a$d;->f:Z
:goto_0
const/4 p1, 0x0
sget-object v1, Lk0/q/a$c;->e:[Lk0/q/a$b;
invoke-virtual {p0, v1}, Ljava/util/concurrent/atomic/AtomicReference;->getAndSet(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v1
check-cast v1, [Lk0/q/a$b;
array-length v2, v1
const/4 v3, 0x0
:goto_1
if-ge v3, v2, :cond_2
aget-object v4, v1, v3
move-object v5, v0
check-cast v5, Lk0/q/a$d;
:try_start_0
invoke-virtual {v5, v4}, Lk0/q/a$d;->a(Lk0/q/a$b;)V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
goto :goto_2
:catchall_0
move-exception v4
if-nez p1, :cond_1
new-instance p1, Ljava/util/ArrayList;
invoke-direct {p1}, Ljava/util/ArrayList;-><init>()V
:cond_1
invoke-interface {p1, v4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
:goto_2
add-int/lit8 v3, v3, 0x1
goto :goto_1
:cond_2
invoke-static {p1}, Lb0/j/a;->W(Ljava/util/List;)V
return-void
.end method
.method public onNext(Ljava/lang/Object;)V
.locals 7
.annotation system Ldalvik/annotation/Signature;
value = {
"(TT;)V"
}
.end annotation
iget-object v0, p0, Lk0/q/a$c;->buffer:Lk0/q/a$a;
move-object v1, v0
check-cast v1, Lk0/q/a$d;
iget-boolean v2, v1, Lk0/q/a$d;->f:Z
const/4 v3, 0x0
if-eqz v2, :cond_0
goto :goto_1
:cond_0
iget v2, v1, Lk0/q/a$d;->e:I
iget-object v4, v1, Lk0/q/a$d;->d:[Ljava/lang/Object;
array-length v5, v4
const/4 v6, 0x1
sub-int/2addr v5, v6
if-ne v2, v5, :cond_1
array-length v5, v4
new-array v5, v5, [Ljava/lang/Object;
aput-object p1, v5, v3
iput v6, v1, Lk0/q/a$d;->e:I
aput-object v5, v4, v2
iput-object v5, v1, Lk0/q/a$d;->d:[Ljava/lang/Object;
goto :goto_0
:cond_1
aput-object p1, v4, v2
add-int/2addr v2, v6
iput v2, v1, Lk0/q/a$d;->e:I
:goto_0
iget p1, v1, Lk0/q/a$d;->b:I
add-int/2addr p1, v6
iput p1, v1, Lk0/q/a$d;->b:I
:goto_1
invoke-virtual {p0}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;
move-result-object p1
check-cast p1, [Lk0/q/a$b;
array-length v1, p1
:goto_2
if-ge v3, v1, :cond_2
aget-object v2, p1, v3
move-object v4, v0
check-cast v4, Lk0/q/a$d;
invoke-virtual {v4, v2}, Lk0/q/a$d;->a(Lk0/q/a$b;)V
add-int/lit8 v3, v3, 0x1
goto :goto_2
:cond_2
return-void
.end method