package defpackage;

/* JADX INFO: renamed from: ᵹˉᵟᵡ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes3.dex */
public final class C5052 {

    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    public final InterfaceC4978 f19094;

    /* JADX INFO: renamed from: ːˏᵟᵯ, reason: contains not printable characters */
    public C1629 f19095;

    /* JADX INFO: renamed from: ᵲᵶᵳˈ, reason: contains not printable characters */
    public final C1614 f19096;

    /* JADX INFO: renamed from: ᵷᵺʾᵖ, reason: contains not printable characters */
    public final int f19097;

    public C5052(InterfaceC3386 interfaceC3386, InterfaceC4978 interfaceC4978, long j, long j2, long j3, long j4, long j5, int i) {
        this.f19094 = interfaceC4978;
        this.f19097 = i;
        this.f19096 = new C1614(interfaceC3386, j, j2, j3, j4, j5);
    }

    /* JADX INFO: renamed from: ːˏᵟᵯ, reason: contains not printable characters */
    public static int m10388(InterfaceC5206 interfaceC5206, long j, C2669 c2669) {
        if (j == interfaceC5206.getPosition()) {
            return 0;
        }
        c2669.f10317 = j;
        return 1;
    }

    /* JADX INFO: renamed from: ᵲᵶᵳˈ, reason: contains not printable characters */
    public static int m10389(int i, byte[] bArr) {
        return (bArr[i + 3] & 255) | ((bArr[i] & 255) << 24) | ((bArr[i + 1] & 255) << 16) | ((bArr[i + 2] & 255) << 8);
    }

    /* JADX WARN: Code restructure failed: missing block: B:32:0x00cb, code lost:
    
        return m10388(r28, r8, r29);
     */
    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final int m10390(InterfaceC5206 interfaceC5206, C2669 c2669) {
        while (true) {
            C1629 c1629 = this.f19095;
            c1629.getClass();
            long j = c1629.f6517;
            long j2 = c1629.f6515;
            long j3 = c1629.f6511;
            long j4 = j2 - j;
            long j5 = this.f19097;
            InterfaceC4978 interfaceC4978 = this.f19094;
            if (j4 <= j5) {
                this.f19095 = null;
                interfaceC4978.mo2718();
                return m10388(interfaceC5206, j, c2669);
            }
            long position = j3 - interfaceC5206.getPosition();
            if (position < 0 || position > 262144) {
                break;
            }
            interfaceC5206.mo4700((int) position);
            interfaceC5206.mo4698();
            C2744 c2744Mo2729 = interfaceC4978.mo2729(interfaceC5206, c1629.f6510);
            int i = c2744Mo2729.f10553;
            long j6 = c2744Mo2729.f10550;
            long j7 = c2744Mo2729.f10551;
            if (i == -3) {
                this.f19095 = null;
                interfaceC4978.mo2718();
                return m10388(interfaceC5206, j3, c2669);
            }
            if (i == -2) {
                c1629.f6516 = j6;
                c1629.f6517 = j7;
                c1629.f6511 = C1629.m4486(c1629.f6510, j6, c1629.f6513, j7, c1629.f6515, c1629.f6512);
            } else {
                if (i != -1) {
                    if (i != 0) {
                        ᵕᵩʽᵲ.ᵪᵹᵥᵻ("Invalid case");
                        return 0;
                    }
                    long position2 = j7 - interfaceC5206.getPosition();
                    if (position2 >= 0 && position2 <= 262144) {
                        interfaceC5206.mo4700((int) position2);
                    }
                    this.f19095 = null;
                    interfaceC4978.mo2718();
                    return m10388(interfaceC5206, j7, c2669);
                }
                c1629.f6513 = j6;
                c1629.f6515 = j7;
                c1629.f6511 = C1629.m4486(c1629.f6510, c1629.f6516, j6, c1629.f6517, j7, c1629.f6512);
            }
        }
    }

    /* JADX INFO: renamed from: ᵷᵺʾᵖ, reason: contains not printable characters */
    public final void m10391(long j) {
        C1629 c1629 = this.f19095;
        if (c1629 == null || c1629.f6514 != j) {
            C1614 c1614 = this.f19096;
            this.f19095 = new C1629(j, c1614.f6463.m7745(j), c1614.f6461, c1614.f6464, c1614.f6462, c1614.f6465);
        }
    }
}
