package com.strmr.ps.ui.player;

import com.strmr.ps.data.event.PlaybackStateManager;
import com.strmr.ps.data.event.a;
import defpackage.ak1;
import defpackage.ck1;
import defpackage.cr4;
import defpackage.e6a;
import defpackage.gr3;
import defpackage.s38;
import kotlin.Metadata;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;

/* JADX INFO: loaded from: classes3.dex */
@Metadata(d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\u0010\u0002\u001a\u00020\u0001*\u00020\u0000H\n¢\u0006\u0004\b\u0002\u0010\u0003"}, d2 = {"Lak1;", "Le6a;", "<anonymous>", "(Lak1;)V"}, k = 3, mv = {2, 0, 0})
@DebugMetadata(c = "com.strmr.ps.ui.player.VideoPlayerActivity$onDestroy$1", f = "VideoPlayerActivity.kt", i = {}, l = {6925, 6927}, m = "invokeSuspend", n = {}, s = {})
final class x extends SuspendLambda implements gr3<ak1, Continuation<? super e6a>, Object> {
    public int a;
    public final /* synthetic */ VideoPlayerActivity b;
    public final /* synthetic */ int c;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public x(VideoPlayerActivity videoPlayerActivity, int i, Continuation continuation) {
        super(2, continuation);
        this.b = videoPlayerActivity;
        this.c = i;
    }

    @Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
    public final Continuation create(Object obj, Continuation continuation) {
        return new x(this.b, this.c, continuation);
    }

    @Override // defpackage.gr3
    public final Object invoke(Object obj, Object obj2) {
        return ((x) create((ak1) obj, (Continuation) obj2)).invokeSuspend(e6a.a);
    }

    /* JADX WARN: Removed duplicated region for block: B:31:0x0061 A[RETURN] */
    /* JADX WARN: Removed duplicated region for block: B:32:0x0062 A[RETURN] */
    @Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final Object invokeSuspend(Object obj) throws Throwable {
        ck1 ck1Var = ck1.a;
        int i = this.a;
        e6a e6aVar = e6a.a;
        if (i != 0) {
            if (i == 1) {
                s38.b(obj);
                return e6aVar;
            }
            if (i != 2) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            s38.b(obj);
            return e6aVar;
        }
        s38.b(obj);
        VideoPlayerActivity videoPlayerActivity = this.b;
        boolean z = videoPlayerActivity.cb;
        int i2 = this.c;
        if (z) {
            PlaybackStateManager playbackStateManager = videoPlayerActivity.m;
            if (playbackStateManager == null) {
                cr4.n("playbackStateManager");
                throw null;
            }
            this.a = 1;
            Object objEmit = playbackStateManager.a.emit(new a.C0099a(i2), this);
            if (objEmit != ck1Var) {
                objEmit = e6aVar;
            }
            return objEmit == ck1Var ? ck1Var : e6aVar;
        }
        PlaybackStateManager playbackStateManager2 = videoPlayerActivity.m;
        if (playbackStateManager2 == null) {
            cr4.n("playbackStateManager");
            throw null;
        }
        double d = videoPlayerActivity.cd;
        this.a = 2;
        Object objEmit2 = playbackStateManager2.a.emit(new a.b(i2, d), this);
        if (objEmit2 != ck1Var) {
            objEmit2 = e6aVar;
        }
        if (objEmit2 == ck1Var) {
        }
    }
}
