package P0;

import V4.C;
import android.graphics.Rect;
import android.view.ScrollCaptureSession;
import java.util.function.Consumer;
import m3.AbstractC2467b;
import p0.AbstractC2686D;
import w4.C3137A;

/* JADX INFO: loaded from: classes.dex */
public final class b extends C4.j implements J4.e {

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

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final /* synthetic */ f f5600b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final /* synthetic */ ScrollCaptureSession f5601c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final /* synthetic */ Rect f5602d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public final /* synthetic */ Consumer f5603e;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public b(f fVar, ScrollCaptureSession scrollCaptureSession, Rect rect, Consumer consumer, A4.d dVar) {
        super(2, dVar);
        this.f5600b = fVar;
        this.f5601c = scrollCaptureSession;
        this.f5602d = rect;
        this.f5603e = consumer;
    }

    @Override // C4.a
    public final A4.d create(Object obj, A4.d dVar) {
        return new b(this.f5600b, this.f5601c, this.f5602d, this.f5603e, dVar);
    }

    @Override // J4.e
    public final Object invoke(Object obj, Object obj2) {
        return ((b) create((C) obj, (A4.d) obj2)).invokeSuspend(C3137A.f25453a);
    }

    @Override // C4.a
    public final Object invokeSuspend(Object obj) {
        B4.a aVar = B4.a.f492a;
        int i6 = this.f5599a;
        if (i6 == 0) {
            AbstractC2467b.l(obj);
            ScrollCaptureSession scrollCaptureSession = this.f5601c;
            Rect rect = this.f5602d;
            h1.k kVar = new h1.k(rect.left, rect.top, rect.right, rect.bottom);
            this.f5599a = 1;
            obj = f.a(this.f5600b, scrollCaptureSession, kVar, this);
            if (obj == aVar) {
                return aVar;
            }
        } else {
            if (i6 != 1) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            AbstractC2467b.l(obj);
        }
        this.f5603e.accept(AbstractC2686D.F((h1.k) obj));
        return C3137A.f25453a;
    }
}
