package com.seewo.ota.update.device.model.vman;

import f.i;
import f.m;
import f.t;
import f.w.d;
import f.w.k.a.f;
import f.w.k.a.k;
import f.z.c.p;
import g.a.h0;

/* JADX INFO: compiled from: BaseVmanUpdateTask.kt */
/* JADX INFO: loaded from: classes.dex */
@i
@f(c = "com.seewo.ota.update.device.model.vman.BaseVmanUpdateTask$run$1$result$1$success$1", f = "BaseVmanUpdateTask.kt", l = {67}, m = "invokeSuspend")
final class BaseVmanUpdateTask$run$1$result$1$success$1 extends k implements p<h0, d<? super Boolean>, Object> {
    final /* synthetic */ T $entity;
    int label;
    final /* synthetic */ BaseVmanUpdateTask<T> this$0;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    BaseVmanUpdateTask$run$1$result$1$success$1(BaseVmanUpdateTask<T> baseVmanUpdateTask, T t, d<? super BaseVmanUpdateTask$run$1$result$1$success$1> dVar) {
        super(2, dVar);
        this.this$0 = baseVmanUpdateTask;
        this.$entity = t;
    }

    @Override // f.w.k.a.a
    public final d<t> create(Object obj, d<?> dVar) {
        return new BaseVmanUpdateTask$run$1$result$1$success$1(this.this$0, this.$entity, dVar);
    }

    @Override // f.z.c.p
    public final Object invoke(h0 h0Var, d<? super Boolean> dVar) {
        return ((BaseVmanUpdateTask$run$1$result$1$success$1) create(h0Var, dVar)).invokeSuspend(t.a);
    }

    /* JADX WARN: Type inference fix 'apply assigned field type' failed
    java.lang.UnsupportedOperationException: ArgType.getObject(), call class: class jadx.core.dex.instructions.args.ArgType$UnknownArg
    	at jadx.core.dex.instructions.args.ArgType.getObject(ArgType.java:593)
    	at jadx.core.dex.attributes.nodes.ClassTypeVarsAttr.getTypeVarsMapFor(ClassTypeVarsAttr.java:35)
    	at jadx.core.dex.nodes.utils.TypeUtils.replaceClassGenerics(TypeUtils.java:177)
    	at jadx.core.dex.visitors.typeinference.FixTypesVisitor.insertExplicitUseCast(FixTypesVisitor.java:397)
    	at jadx.core.dex.visitors.typeinference.FixTypesVisitor.tryFieldTypeWithNewCasts(FixTypesVisitor.java:359)
    	at jadx.core.dex.visitors.typeinference.FixTypesVisitor.applyFieldType(FixTypesVisitor.java:309)
    	at jadx.core.dex.visitors.typeinference.FixTypesVisitor.visit(FixTypesVisitor.java:94)
     */
    @Override // f.w.k.a.a
    public final Object invokeSuspend(Object obj) throws Throwable {
        Object objD = f.w.j.d.d();
        int i2 = this.label;
        if (i2 == 0) {
            m.b(obj);
            BaseVmanUpdateTask<T> baseVmanUpdateTask = this.this$0;
            T t = this.$entity;
            this.label = 1;
            obj = baseVmanUpdateTask.upgrade(t, this);
            if (obj == objD) {
                return objD;
            }
        } else {
            if (i2 != 1) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            m.b(obj);
        }
        return obj;
    }
}
