package com.google.android.material.loadingindicator;

import android.animation.ObjectAnimator;
import androidx.annotation.Nullable;
import e1.m;
import kotlinx.coroutines.y;
import l.j3;
import y8.i;

/* JADX INFO: loaded from: classes2.dex */
public final class a {

    /* JADX INFO: renamed from: h, reason: collision with root package name */
    public static final j3 f22821h = new j3(12, Float.class, "animationFraction");

    /* JADX INFO: renamed from: i, reason: collision with root package name */
    public static final c5.d f22822i = new c5.d("morphFactor", 1);

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

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public float f22824b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public float f22825c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public ObjectAnimator f22826d;

    @Nullable
    b drawable;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public m f22827e;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public d f22828f;

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    public i f22829g;

    public final void a(float f10) {
        this.f22824b = f10;
        float f11 = this.f22823a - 1;
        float f12 = this.f22825c - f11;
        float f13 = ((int) (f10 * 650.0f)) / 650.0f;
        if (f13 == 1.0f) {
            f13 = 0.0f;
        }
        this.f22829g.f36882c = ((f12 * 90.0f) + ((f13 * 50.0f) + (f11 * 140.0f))) % 360.0f;
        b bVar = this.drawable;
        if (bVar != null) {
            bVar.invalidateSelf();
        }
    }

    public final void b(float f10) {
        this.f22825c = f10;
        i iVar = this.f22829g;
        iVar.f36881b = f10;
        int i10 = this.f22823a - 1;
        int[] iArr = this.f22828f.f22846d;
        int length = i10 % iArr.length;
        iVar.f36880a = y8.c.a(y.f(f10 - i10, 0.0f, 1.0f), Integer.valueOf(iArr[length]), Integer.valueOf(iArr[(length + 1) % iArr.length])).intValue();
        b bVar = this.drawable;
        if (bVar != null) {
            bVar.invalidateSelf();
        }
    }
}
