package com.google.android.material.animation;

import android.animation.TypeEvaluator;
import com.google.android.material.progressindicator.BaseProgressIndicator;
import ඓ.K.K.K.C1293;

public class ArgbEvaluatorCompat implements TypeEvaluator<Integer> {
    public static final ArgbEvaluatorCompat instance = new ArgbEvaluatorCompat();

    public static ArgbEvaluatorCompat getInstance() {
        return instance;
    }

    public Integer evaluate(float f, Integer num, Integer num2) {
        int intValue = num.intValue();
        float f2 = ((float) ((intValue >> 24) & BaseProgressIndicator.MAX_ALPHA)) / 255.0f;
        int intValue2 = num2.intValue();
        float pow = (float) Math.pow((double) (((float) ((intValue >> 16) & BaseProgressIndicator.MAX_ALPHA)) / 255.0f), 2.2d);
        float pow2 = (float) Math.pow((double) (((float) ((intValue >> 8) & BaseProgressIndicator.MAX_ALPHA)) / 255.0f), 2.2d);
        float pow3 = (float) Math.pow((double) (((float) (intValue & BaseProgressIndicator.MAX_ALPHA)) / 255.0f), 2.2d);
        float pow4 = (float) Math.pow((double) (((float) ((intValue2 >> 16) & BaseProgressIndicator.MAX_ALPHA)) / 255.0f), 2.2d);
        float r0 = C1293.m3403(((float) ((intValue2 >> 24) & BaseProgressIndicator.MAX_ALPHA)) / 255.0f, f2, f, f2);
        float r2 = C1293.m3403(pow4, pow, f, pow);
        float r3 = C1293.m3403((float) Math.pow((double) (((float) ((intValue2 >> 8) & BaseProgressIndicator.MAX_ALPHA)) / 255.0f), 2.2d), pow2, f, pow2);
        float r12 = C1293.m3403((float) Math.pow((double) (((float) (intValue2 & BaseProgressIndicator.MAX_ALPHA)) / 255.0f), 2.2d), pow3, f, pow3);
        int round = Math.round(((float) Math.pow((double) r2, 0.45454545454545453d)) * 255.0f) << 16;
        return Integer.valueOf(Math.round(((float) Math.pow((double) r12, 0.45454545454545453d)) * 255.0f) | round | (Math.round(r0 * 255.0f) << 24) | (Math.round(((float) Math.pow((double) r3, 0.45454545454545453d)) * 255.0f) << 8));
    }
}
