package okhttp3.internal.cache;

import java.util.Date;
import kotlin.jvm.internal.o;
import okhttp3.Request;
import okhttp3.Response;

/* JADX INFO: loaded from: classes3.dex */
public final class CacheStrategy {

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public static final Companion f22194c = new Companion(0);

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final Request f22195a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final Response f22196b;

    public static final class Companion {
        public /* synthetic */ Companion(int i6) {
            this();
        }

        /* JADX WARN: Removed duplicated region for block: B:24:0x0038  */
        /*
            Code decompiled incorrectly, please refer to instructions dump.
        */
        public static boolean a(Request request, Response response) {
            o.h(response, "response");
            o.h(request, "request");
            int i6 = response.f22143d;
            if (i6 != 200 && i6 != 410 && i6 != 414 && i6 != 501 && i6 != 203 && i6 != 204) {
                if (i6 == 307) {
                    if (Response.b("Expires", response) == null && response.a().f21932c == -1 && !response.a().f21935f && !response.a().f21934e) {
                        return false;
                    }
                } else if (i6 != 308 && i6 != 404 && i6 != 405) {
                    switch (i6) {
                        case 300:
                        case 301:
                            break;
                        case 302:
                            break;
                        default:
                            return false;
                    }
                }
            }
            return (response.a().f21931b || request.a().f21931b) ? false : true;
        }

        private Companion() {
        }
    }

    public static final class Factory {

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

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

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

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

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

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

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

        /* JADX INFO: renamed from: h, reason: collision with root package name */
        public String f22204h;

        /* JADX INFO: renamed from: i, reason: collision with root package name */
        public int f22205i;
    }

    public CacheStrategy(Request request, Response response) {
        this.f22195a = request;
        this.f22196b = response;
    }
}
