package com.ss.android.ugc.aweme.discover.repo.fetcher;

import X.8bx;
import X.9Vg;
import X.9eE;
import X.9ef;
import X.9fP;
import X.PT5;
import com.bytedance.covode.number.Covode;
import com.bytedance.retrofit2.client.Request;

public final class DiscoveryTimeGapInterceptor implements 8bx {
    static {
        Covode.recordClassIndex(65308);
    }

    public final 9ef<?> intercept(9fP r6) {
        9ef<?> r3;
        Object obj;
        Object obj2;
        if (r6 == null) {
            return null;
        }
        try {
            Request LIZ = r6.LIZ();
            if (LIZ == null) {
                return null;
            }
            if (r6 != null) {
                r3 = r6.LIZ(LIZ);
                if (r3 != null) {
                    obj = r3.LIZIZ;
                    9eE r0 = r3.LIZ;
                    if (r0 != null) {
                        obj2 = r0.LJFF;
                        if ((obj instanceof PT5) && (obj2 instanceof 9Vg)) {
                            ((PT5) obj).setRequestInfo((9Vg) obj2);
                        }
                        return r3;
                    }
                    obj2 = null;
                    ((PT5) obj).setRequestInfo((9Vg) obj2);
                    return r3;
                }
            } else {
                r3 = null;
            }
            obj = null;
            obj2 = null;
            ((PT5) obj).setRequestInfo((9Vg) obj2);
            return r3;
        } catch (Throwable unused) {
            if (r6 != null) {
                return r6.LIZ(r6.LIZ());
            }
            return null;
        }
    }
}
