a.smali

.class public final Llg/a;
.super Ljava/lang/Object;
.source "ChatCursor.kt"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Llg/a$b;,
        Llg/a$a;
    }
.end annotation

.annotation runtime Lkotlin/Metadata;
    bv = {
        0x1,
        0x0,
        0x3
    }
    d1 = {
        "\u0000V\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0008\u0002\n\u0002\u0010\u000b\n\u0000\n\u0002\u0018\u0002\n\u0002\u0008\u0004\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010#\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\u0002\n\u0002\u0008\u0003\n\u0002\u0010\t\n\u0002\u0008\u0004\n\u0002\u0010\u0008\n\u0002\u0008\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0008\u0008\u0018\u0000 \'2\u00020\u0001:\u0002\'(B\u0005\u00a2\u0006\u0002\u0010\u0002J\u0019\u0010\u0011\u001a\u00020\u00122\u0006\u0010\u0013\u001a\u00020\u0010H\u0086@\u00f8\u0001\u0000\u00a2\u0006\u0002\u0010\u0014J\u0006\u0010\u0015\u001a\u00020\u0016J\u0006\u0010\u0017\u001a\u00020\u0004J\u0006\u0010\u0018\u001a\u00020\u0004J\u000e\u0010\u0019\u001a\u00020\u00122\u0006\u0010\u001a\u001a\u00020\u001bJ\u000e\u0010\u001c\u001a\u00020\u00122\u0006\u0010\u001a\u001a\u00020\u001bJ!\u0010\u001d\u001a\u00020\u00122\u0006\u0010\u001e\u001a\u00020\u001f2\u0006\u0010 \u001a\u00020!H\u0086@\u00f8\u0001\u0000\u00a2\u0006\u0002\u0010\"J\u0019\u0010#\u001a\u00020\u00122\u0006\u0010\u0013\u001a\u00020\u0010H\u0086@\u00f8\u0001\u0000\u00a2\u0006\u0002\u0010\u0014J\u0006\u0010$\u001a\u00020\u0012J\u000e\u0010%\u001a\u00020\u00122\u0006\u0010&\u001a\u00020\u0004R\u000e\u0010\u0003\u001a\u00020\u0004X\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u001e\u0010\u0007\u001a\u00020\u00062\u0006\u0010\u0005\u001a\u00020\u0006@BX\u0086\u000e\u00a2\u0006\u0008\n\u0000\u001a\u0004\u0008\u0008\u0010\tR\u000e\u0010\n\u001a\u00020\u000bX\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u000c\u001a\u00020\rX\u0082\u0004\u00a2\u0006\u0002\n\u0000R\u0014\u0010\u000e\u001a\u0008\u0012\u0004\u0012\u00020\u00100\u000fX\u0082\u0004\u00a2\u0006\u0002\n\u0000\u0082\u0002\u0004\n\u0002\u0008\u0019\u00a8\u0006)"
    }
    d2 = {
        "Lcom/shopee/foody/driver/im/business/ChatCursor;",
        "",
        "()V",
        "hasMoreLocalMessage",
        "",
        "<set-?>",
        "Ljava/util/concurrent/atomic/AtomicInteger;",
        "localMessageSize",
        "getLocalMessageSize",
        "()Ljava/util/concurrent/atomic/AtomicInteger;",
        "messageSyncInfo",
        "Lcom/shopee/foody/driver/im/business/ChatCursor$SyncInfo;",
        "mutex",
        "Lkotlinx/coroutines/sync/Mutex;",
        "validSyncRequestIds",
        "",
        "",
        "addValidRequestId",
        "",
        "requestId",
        "(Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;",
        "getSyncCursor",
        "",
        "hasLoadAllMessage",
        "hasMoreMessageToSync",
        "onAddNewItem",
        "increase",
        "",
        "onLoadMoreLocalMessages",
        "onReceivedSyncMessageIdData",
        "req",
        "Lcom/shopee/foody/driver/im/business/network/model/GetChatMessageIdsRequest;",
        "resp",
        "Lcom/shopee/foody/driver/im/business/network/model/proto/action/ResponseChatMsgid;",
        "(Lcom/shopee/foody/driver/im/business/network/model/GetChatMessageIdsRequest;Lcom/shopee/foody/driver/im/business/network/model/proto/action/ResponseChatMsgid;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;",
        "removeValidRequestId",
        "reset",
        "setHasMoreLocalMsg",
        "hasMoreLocal",
        "Companion",
        "SyncInfo",
        "driver_indonesiaRelease"
    }
    k = 0x1
    mv = {
        0x1,
        0x1,
        0x10
    }
.end annotation


# instance fields
.field public a:Llg/a$b;

.field public final b:Lkotlinx/coroutines/sync/Mutex;

.field public c:Ljava/util/concurrent/atomic/AtomicInteger;

.field public d:Z

.field public final e:Ljava/util/Set;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Set<",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation
.end field


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

    new-instance v0, Llg/a$a;

    const/4 v1, 0x0

    invoke-direct {v0, v1}, Llg/a$a;-><init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V

    return-void
.end method

.method public constructor <init>()V
    .registers 5

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

    const/4 v0, 0x1

    const/4 v1, 0x0

    const/4 v2, 0x0

    invoke-static {v1, v0, v2}, Lkotlinx/coroutines/sync/MutexKt;->Mutex$default(ZILjava/lang/Object;)Lkotlinx/coroutines/sync/Mutex;

    move-result-object v1

    iput-object v1, p0, Llg/a;->b:Lkotlinx/coroutines/sync/Mutex;

    new-instance v1, Ljava/util/concurrent/atomic/AtomicInteger;

    const/16 v2, 0x14

    invoke-direct {v1, v2}, Ljava/util/concurrent/atomic/AtomicInteger;-><init>(I)V

    iput-object v1, p0, Llg/a;->c:Ljava/util/concurrent/atomic/AtomicInteger;

    new-instance v1, Ljava/util/LinkedHashSet;

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

    iput-object v1, p0, Llg/a;->e:Ljava/util/Set;

    new-instance v1, Llg/a$b$a;

    const-wide/16 v2, 0x0

    invoke-direct {v1, v2, v3}, Llg/a$b$a;-><init>(J)V

    iput-object v1, p0, Llg/a;->a:Llg/a$b;

    iput-boolean v0, p0, Llg/a;->d:Z

    return-void
.end method


# virtual methods
.method public final a(Lcom/shopee/foody/driver/im/business/network/model/GetChatMessageIdsRequest;Lcom/shopee/foody/driver/im/business/network/model/proto/action/ResponseChatMsgid;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
    .registers 9
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lcom/shopee/foody/driver/im/business/network/model/GetChatMessageIdsRequest;",
            "Lcom/shopee/foody/driver/im/business/network/model/proto/action/ResponseChatMsgid;",
            "Lkotlin/coroutines/Continuation<",
            "-",
            "Lkotlin/Unit;",
            ">;)",
            "Ljava/lang/Object;"
        }
    .end annotation

    instance-of v0, p3, Llg/a$d;

    if-eqz v0, :cond_13

    move-object v0, p3

    check-cast v0, Llg/a$d;

    iget v1, v0, Llg/a$d;->b:I

    const/high16 v2, -0x80000000

    and-int v3, v1, v2

    if-eqz v3, :cond_13

    sub-int/2addr v1, v2

    iput v1, v0, Llg/a$d;->b:I

    goto :goto_18

    :cond_13
    new-instance v0, Llg/a$d;

    invoke-direct {v0, p0, p3}, Llg/a$d;-><init>(Llg/a;Lkotlin/coroutines/Continuation;)V

    :goto_18
    iget-object p3, v0, Llg/a$d;->a:Ljava/lang/Object;

    invoke-static {}, Lkotlin/coroutines/intrinsics/IntrinsicsKt__IntrinsicsKt;->getCOROUTINE_SUSPENDED()Ljava/lang/Object;

    move-result-object v1

    iget v2, v0, Llg/a$d;->b:I

    const/4 v3, 0x1

    const/4 v4, 0x0

    if-eqz v2, :cond_44

    if-ne v2, v3, :cond_3c

    iget-object p1, v0, Llg/a$d;->g:Ljava/lang/Object;

    check-cast p1, Lkotlinx/coroutines/sync/Mutex;

    iget-object p2, v0, Llg/a$d;->f:Ljava/lang/Object;

    check-cast p2, Lcom/shopee/foody/driver/im/business/network/model/proto/action/ResponseChatMsgid;

    iget-object v1, v0, Llg/a$d;->e:Ljava/lang/Object;

    check-cast v1, Lcom/shopee/foody/driver/im/business/network/model/GetChatMessageIdsRequest;

    iget-object v0, v0, Llg/a$d;->d:Ljava/lang/Object;

    check-cast v0, Llg/a;

    invoke-static {p3}, Lkotlin/ResultKt;->throwOnFailure(Ljava/lang/Object;)V

    move-object p3, p1

    move-object p1, v1

    goto :goto_5b

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

    const-string p2, "call to \'resume\' before \'invoke\' with coroutine"

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

    throw p1

    :cond_44
    invoke-static {p3}, Lkotlin/ResultKt;->throwOnFailure(Ljava/lang/Object;)V

    iget-object p3, p0, Llg/a;->b:Lkotlinx/coroutines/sync/Mutex;

    iput-object p0, v0, Llg/a$d;->d:Ljava/lang/Object;

    iput-object p1, v0, Llg/a$d;->e:Ljava/lang/Object;

    iput-object p2, v0, Llg/a$d;->f:Ljava/lang/Object;

    iput-object p3, v0, Llg/a$d;->g:Ljava/lang/Object;

    iput v3, v0, Llg/a$d;->b:I

    invoke-interface {p3, v4, v0}, Lkotlinx/coroutines/sync/Mutex;->lock(Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;

    move-result-object v0

    if-ne v0, v1, :cond_5a

    return-object v1

    :cond_5a
    move-object v0, p0

    :goto_5b
    :try_start_5b
    iget-object v1, v0, Llg/a;->e:Ljava/util/Set;

    invoke-virtual {p1}, Lmc/b;->c()Lfc/g;

    move-result-object p1

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

    move-result-object p1

    invoke-interface {v1, p1}, Ljava/util/Set;->remove(Ljava/lang/Object;)Z

    move-result p1

    if-nez p1, :cond_71

    sget-object p1, Lkotlin/Unit;->INSTANCE:Lkotlin/Unit;
    :try_end_6d
    .catchall {:try_start_5b .. :try_end_6d} :catchall_ba

    invoke-interface {p3, v4}, Lkotlinx/coroutines/sync/Mutex;->unlock(Ljava/lang/Object;)V

    return-object p1

    :cond_71
    :try_start_71
    iget-object p1, p2, Lcom/shopee/foody/driver/im/business/network/model/proto/action/ResponseChatMsgid;->msgid:Ljava/util/List;

    invoke-interface {p1}, Ljava/util/List;->isEmpty()Z

    move-result p1

    if-eqz p1, :cond_7c

    sget-object p1, Llg/a$b$b;->a:Llg/a$b$b;

    goto :goto_97

    :cond_7c
    new-instance p1, Llg/a$b$a;

    iget-object p2, p2, Lcom/shopee/foody/driver/im/business/network/model/proto/action/ResponseChatMsgid;->msgid:Ljava/util/List;

    const-string v1, "resp.msgid"

    invoke-static {p2, v1}, Lkotlin/jvm/internal/Intrinsics;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V

    invoke-static {p2}, Lkotlin/collections/CollectionsKt___CollectionsKt;->last(Ljava/util/List;)Ljava/lang/Object;

    move-result-object p2

    const-string v1, "resp.msgid.last()"

    invoke-static {p2, v1}, Lkotlin/jvm/internal/Intrinsics;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V

    check-cast p2, Ljava/lang/Number;

    invoke-virtual {p2}, Ljava/lang/Number;->longValue()J

    move-result-wide v1

    invoke-direct {p1, v1, v2}, Llg/a$b$a;-><init>(J)V

    :goto_97
    iput-object p1, v0, Llg/a;->a:Llg/a$b;

    sget-object p1, Llg/c;->a:Llg/c;

    new-instance p2, Ljava/lang/StringBuilder;

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

    const-string v1, "Update messageSyncInfo to : "

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

    iget-object v0, v0, Llg/a;->a:Llg/a$b;

    invoke-virtual {p2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

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

    move-result-object p2

    const/4 v0, 0x2

    invoke-static {p1, p2, v4, v0, v4}, Llg/c;->b(Llg/c;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)V

    sget-object p1, Lkotlin/Unit;->INSTANCE:Lkotlin/Unit;
    :try_end_b4
    .catchall {:try_start_71 .. :try_end_b4} :catchall_ba

    invoke-interface {p3, v4}, Lkotlinx/coroutines/sync/Mutex;->unlock(Ljava/lang/Object;)V

    sget-object p1, Lkotlin/Unit;->INSTANCE:Lkotlin/Unit;

    return-object p1

    :catchall_ba
    move-exception p1

    invoke-interface {p3, v4}, Lkotlinx/coroutines/sync/Mutex;->unlock(Ljava/lang/Object;)V

    throw p1
.end method

.method public final a(Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
    .registers 8
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/lang/String;",
            "Lkotlin/coroutines/Continuation<",
            "-",
            "Lkotlin/Unit;",
            ">;)",
            "Ljava/lang/Object;"
        }
    .end annotation

    instance-of v0, p2, Llg/a$c;

    if-eqz v0, :cond_13

    move-object v0, p2

    check-cast v0, Llg/a$c;

    iget v1, v0, Llg/a$c;->b:I

    const/high16 v2, -0x80000000

    and-int v3, v1, v2

    if-eqz v3, :cond_13

    sub-int/2addr v1, v2

    iput v1, v0, Llg/a$c;->b:I

    goto :goto_18

    :cond_13
    new-instance v0, Llg/a$c;

    invoke-direct {v0, p0, p2}, Llg/a$c;-><init>(Llg/a;Lkotlin/coroutines/Continuation;)V

    :goto_18
    iget-object p2, v0, Llg/a$c;->a:Ljava/lang/Object;

    invoke-static {}, Lkotlin/coroutines/intrinsics/IntrinsicsKt__IntrinsicsKt;->getCOROUTINE_SUSPENDED()Ljava/lang/Object;

    move-result-object v1

    iget v2, v0, Llg/a$c;->b:I

    const/4 v3, 0x0

    const/4 v4, 0x1

    if-eqz v2, :cond_40

    if-ne v2, v4, :cond_38

    iget-object p1, v0, Llg/a$c;->f:Ljava/lang/Object;

    check-cast p1, Lkotlinx/coroutines/sync/Mutex;

    iget-object v1, v0, Llg/a$c;->e:Ljava/lang/Object;

    check-cast v1, Ljava/lang/String;

    iget-object v0, v0, Llg/a$c;->d:Ljava/lang/Object;

    check-cast v0, Llg/a;

    invoke-static {p2}, Lkotlin/ResultKt;->throwOnFailure(Ljava/lang/Object;)V

    move-object p2, p1

    move-object p1, v1

    goto :goto_55

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

    const-string p2, "call to \'resume\' before \'invoke\' with coroutine"

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

    throw p1

    :cond_40
    invoke-static {p2}, Lkotlin/ResultKt;->throwOnFailure(Ljava/lang/Object;)V

    iget-object p2, p0, Llg/a;->b:Lkotlinx/coroutines/sync/Mutex;

    iput-object p0, v0, Llg/a$c;->d:Ljava/lang/Object;

    iput-object p1, v0, Llg/a$c;->e:Ljava/lang/Object;

    iput-object p2, v0, Llg/a$c;->f:Ljava/lang/Object;

    iput v4, v0, Llg/a$c;->b:I

    invoke-interface {p2, v3, v0}, Lkotlinx/coroutines/sync/Mutex;->lock(Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;

    move-result-object v0

    if-ne v0, v1, :cond_54

    return-object v1

    :cond_54
    move-object v0, p0

    :goto_55
    :try_start_55
    iget-object v0, v0, Llg/a;->e:Ljava/util/Set;

    invoke-interface {v0, p1}, Ljava/util/Set;->add(Ljava/lang/Object;)Z

    move-result p1

    invoke-static {p1}, Lkotlin/coroutines/jvm/internal/Boxing;->boxBoolean(Z)Ljava/lang/Boolean;
    :try_end_5e
    .catchall {:try_start_55 .. :try_end_5e} :catchall_64

    invoke-interface {p2, v3}, Lkotlinx/coroutines/sync/Mutex;->unlock(Ljava/lang/Object;)V

    sget-object p1, Lkotlin/Unit;->INSTANCE:Lkotlin/Unit;

    return-object p1

    :catchall_64
    move-exception p1

    invoke-interface {p2, v3}, Lkotlinx/coroutines/sync/Mutex;->unlock(Ljava/lang/Object;)V

    throw p1
.end method

.method public final a()Ljava/util/concurrent/atomic/AtomicInteger;
    .registers 2

    iget-object v0, p0, Llg/a;->c:Ljava/util/concurrent/atomic/AtomicInteger;

    return-object v0
.end method

.method public final a(I)V
    .registers 3

    iget-object v0, p0, Llg/a;->c:Ljava/util/concurrent/atomic/AtomicInteger;

    invoke-virtual {v0, p1}, Ljava/util/concurrent/atomic/AtomicInteger;->getAndAdd(I)I

    return-void
.end method

.method public final a(Z)V
    .registers 5

    iput-boolean p1, p0, Llg/a;->d:Z

    sget-object p1, Llg/c;->a:Llg/c;

    new-instance v0, Ljava/lang/StringBuilder;

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

    const-string v1, "Update hasMoreLocalMessage to "

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

    iget-boolean v1, p0, Llg/a;->d:Z

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

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

    move-result-object v0

    const/4 v1, 0x0

    const/4 v2, 0x2

    invoke-static {p1, v0, v1, v2, v1}, Llg/c;->b(Llg/c;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)V

    return-void
.end method

.method public final b()J
    .registers 3

    iget-object v0, p0, Llg/a;->a:Llg/a$b;

    instance-of v1, v0, Llg/a$b$a;

    if-nez v1, :cond_7

    const/4 v0, 0x0

    :cond_7
    check-cast v0, Llg/a$b$a;

    if-eqz v0, :cond_10

    invoke-virtual {v0}, Llg/a$b$a;->a()J

    move-result-wide v0

    goto :goto_12

    :cond_10
    const-wide/16 v0, 0x0

    :goto_12
    return-wide v0
.end method

.method public final b(Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
    .registers 8
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/lang/String;",
            "Lkotlin/coroutines/Continuation<",
            "-",
            "Lkotlin/Unit;",
            ">;)",
            "Ljava/lang/Object;"
        }
    .end annotation

    instance-of v0, p2, Llg/a$e;

    if-eqz v0, :cond_13

    move-object v0, p2

    check-cast v0, Llg/a$e;

    iget v1, v0, Llg/a$e;->b:I

    const/high16 v2, -0x80000000

    and-int v3, v1, v2

    if-eqz v3, :cond_13

    sub-int/2addr v1, v2

    iput v1, v0, Llg/a$e;->b:I

    goto :goto_18

    :cond_13
    new-instance v0, Llg/a$e;

    invoke-direct {v0, p0, p2}, Llg/a$e;-><init>(Llg/a;Lkotlin/coroutines/Continuation;)V

    :goto_18
    iget-object p2, v0, Llg/a$e;->a:Ljava/lang/Object;

    invoke-static {}, Lkotlin/coroutines/intrinsics/IntrinsicsKt__IntrinsicsKt;->getCOROUTINE_SUSPENDED()Ljava/lang/Object;

    move-result-object v1

    iget v2, v0, Llg/a$e;->b:I

    const/4 v3, 0x0

    const/4 v4, 0x1

    if-eqz v2, :cond_40

    if-ne v2, v4, :cond_38

    iget-object p1, v0, Llg/a$e;->f:Ljava/lang/Object;

    check-cast p1, Lkotlinx/coroutines/sync/Mutex;

    iget-object v1, v0, Llg/a$e;->e:Ljava/lang/Object;

    check-cast v1, Ljava/lang/String;

    iget-object v0, v0, Llg/a$e;->d:Ljava/lang/Object;

    check-cast v0, Llg/a;

    invoke-static {p2}, Lkotlin/ResultKt;->throwOnFailure(Ljava/lang/Object;)V

    move-object p2, p1

    move-object p1, v1

    goto :goto_55

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

    const-string p2, "call to \'resume\' before \'invoke\' with coroutine"

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

    throw p1

    :cond_40
    invoke-static {p2}, Lkotlin/ResultKt;->throwOnFailure(Ljava/lang/Object;)V

    iget-object p2, p0, Llg/a;->b:Lkotlinx/coroutines/sync/Mutex;

    iput-object p0, v0, Llg/a$e;->d:Ljava/lang/Object;

    iput-object p1, v0, Llg/a$e;->e:Ljava/lang/Object;

    iput-object p2, v0, Llg/a$e;->f:Ljava/lang/Object;

    iput v4, v0, Llg/a$e;->b:I

    invoke-interface {p2, v3, v0}, Lkotlinx/coroutines/sync/Mutex;->lock(Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;

    move-result-object v0

    if-ne v0, v1, :cond_54

    return-object v1

    :cond_54
    move-object v0, p0

    :goto_55
    :try_start_55
    iget-object v0, v0, Llg/a;->e:Ljava/util/Set;

    invoke-interface {v0, p1}, Ljava/util/Set;->remove(Ljava/lang/Object;)Z

    move-result p1

    invoke-static {p1}, Lkotlin/coroutines/jvm/internal/Boxing;->boxBoolean(Z)Ljava/lang/Boolean;
    :try_end_5e
    .catchall {:try_start_55 .. :try_end_5e} :catchall_64

    invoke-interface {p2, v3}, Lkotlinx/coroutines/sync/Mutex;->unlock(Ljava/lang/Object;)V

    sget-object p1, Lkotlin/Unit;->INSTANCE:Lkotlin/Unit;

    return-object p1

    :catchall_64
    move-exception p1

    invoke-interface {p2, v3}, Lkotlinx/coroutines/sync/Mutex;->unlock(Ljava/lang/Object;)V

    throw p1
.end method

.method public final b(I)V
    .registers 3

    iget-boolean v0, p0, Llg/a;->d:Z

    if-nez v0, :cond_5

    return-void

    :cond_5
    iget-object v0, p0, Llg/a;->c:Ljava/util/concurrent/atomic/AtomicInteger;

    invoke-virtual {v0, p1}, Ljava/util/concurrent/atomic/AtomicInteger;->getAndAdd(I)I

    return-void
.end method

.method public final c()Z
    .registers 2

    invoke-virtual {p0}, Llg/a;->d()Z

    move-result v0

    if-nez v0, :cond_c

    iget-boolean v0, p0, Llg/a;->d:Z

    if-nez v0, :cond_c

    const/4 v0, 0x1

    goto :goto_d

    :cond_c
    const/4 v0, 0x0

    :goto_d
    return v0
.end method

.method public final d()Z
    .registers 2

    iget-object v0, p0, Llg/a;->a:Llg/a$b;

    instance-of v0, v0, Llg/a$b$b;

    xor-int/lit8 v0, v0, 0x1

    return v0
.end method

.method public final e()V
    .registers 4

    new-instance v0, Llg/a$b$a;

    const-wide/16 v1, 0x0

    invoke-direct {v0, v1, v2}, Llg/a$b$a;-><init>(J)V

    iput-object v0, p0, Llg/a;->a:Llg/a$b;

    const/4 v0, 0x1

    iput-boolean v0, p0, Llg/a;->d:Z

    iget-object v0, p0, Llg/a;->c:Ljava/util/concurrent/atomic/AtomicInteger;

    const/16 v1, 0x14

    invoke-virtual {v0, v1}, Ljava/util/concurrent/atomic/AtomicInteger;->set(I)V

    return-void
.end method