package B5;

import A6.n;
import O6.p;
import Z6.AbstractC0385z;
import Z6.J;
import android.widget.ImageView;
import com.google.android.gms.internal.measurement.C1;
import com.martsnew.tv.R;
import f2.C0911a;
import f2.C0920j;
import p2.C1418h;
import u5.AbstractC1636m;

/* JADX INFO: loaded from: classes.dex */
public final class d extends G6.i implements p {

    /* JADX INFO: renamed from: u, reason: collision with root package name */
    public z7.h f1001u;

    /* JADX INFO: renamed from: v, reason: collision with root package name */
    public int f1002v;

    /* JADX INFO: renamed from: w, reason: collision with root package name */
    public int f1003w;

    /* JADX INFO: renamed from: x, reason: collision with root package name */
    public /* synthetic */ Object f1004x;

    /* JADX INFO: renamed from: y, reason: collision with root package name */
    public final /* synthetic */ h f1005y;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public d(h hVar, E6.d dVar) {
        super(2, dVar);
        this.f1005y = hVar;
    }

    @Override // O6.p
    public final Object k(Object obj, Object obj2) {
        return ((d) m((E6.d) obj2, (String) obj)).p(n.f457a);
    }

    @Override // G6.a
    public final E6.d m(E6.d dVar, Object obj) {
        d dVar2 = new d(this.f1005y, dVar);
        dVar2.f1004x = obj;
        return dVar2;
    }

    /* JADX WARN: Code restructure failed: missing block: B:18:0x00b4, code lost:
    
        if (r14 == r0) goto L19;
     */
    @Override // G6.a
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final Object p(Object obj) throws Throwable {
        String str;
        int dimensionPixelSize;
        z7.h hVar;
        F6.a aVar = F6.a.f2580q;
        int i = this.f1003w;
        h hVar2 = this.f1005y;
        if (i == 0) {
            C1.N(obj);
            str = (String) this.f1004x;
            z7.h hVar3 = new z7.h();
            hVar3.f19394a = 25;
            hVar3.f19395b = -16777216;
            hVar3.f19396c = -1;
            hVar3.f19397d = hVar3.b();
            android.support.v4.media.session.a.s(((double) hVar3.f19394a) / 1.75d);
            z7.a aVar2 = z7.a.f19374r;
            hVar3.f19398e = aVar2;
            hVar3.f19399f = aVar2;
            hVar3.f19400g = aVar2;
            hVar3.f19401h = aVar2;
            hVar3.i = new C4.f(3);
            hVar3.f19402j = C7.a.VERY_HIGH;
            hVar3.f19403k = 6;
            hVar3.f19395b = -1;
            hVar3.f19396c = 0;
            hVar3.d(25);
            dimensionPixelSize = hVar2.s().getDimensionPixelSize(R.dimen.dp_150);
            g7.e eVar = J.f7474a;
            g7.d dVar = g7.d.f12985s;
            c cVar = new c(hVar2, dimensionPixelSize, null);
            this.f1004x = str;
            this.f1001u = hVar3;
            this.f1002v = dimensionPixelSize;
            this.f1003w = 1;
            Object objC = AbstractC0385z.C(dVar, cVar, this);
            if (objC != aVar) {
                hVar = hVar3;
                obj = objC;
            }
            return aVar;
        }
        if (i != 1) {
            if (i != 2) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            C1.N(obj);
            ImageView imageView = ((AbstractC1636m) hVar2.f0()).f17767K;
            P6.g.d(imageView, "imageQR");
            C0920j c0920jA = C0911a.a(imageView.getContext());
            C1418h c1418h = new C1418h(imageView.getContext());
            c1418h.f16053c = (byte[]) obj;
            c1418h.b(imageView);
            c0920jA.b(c1418h.a());
            return n.f457a;
        }
        dimensionPixelSize = this.f1002v;
        hVar = this.f1001u;
        str = (String) this.f1004x;
        C1.N(obj);
        byte[] bArr = (byte[]) obj;
        if (bArr != null) {
            z7.h.c(hVar, bArr, dimensionPixelSize, dimensionPixelSize);
        }
        z7.c cVarA = hVar.a(str);
        g7.e eVar2 = J.f7474a;
        g7.d dVar2 = g7.d.f12985s;
        b bVar = new b(cVarA, null);
        this.f1004x = null;
        this.f1001u = null;
        this.f1003w = 2;
        obj = AbstractC0385z.C(dVar2, bVar, this);
    }
}
