package com.bytedance.sdk.component.YFl;

import com.bytedance.sdk.component.YFl.Ne;
import com.bytedance.sdk.component.YFl.eT;
import com.bytedance.sdk.component.YFl.wXo;
import java.util.LinkedHashSet;
import java.util.Set;
/* JADX INFO: Access modifiers changed from: package-private */
/* loaded from: classes2.dex */
public class aIu {
    private final wXo AlY;
    private final Set<String> Sg;
    private final Set<String> YFl;
    private final Ne tN = lG.YFl;
    private eT.YFl wN;

    /* JADX INFO: Access modifiers changed from: package-private */
    public void YFl(eT.YFl yFl) {
        this.wN = yFl;
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public aIu(wXo wxo, Set<String> set, Set<String> set2) {
        this.AlY = wxo;
        if (set == null || set.isEmpty()) {
            this.YFl = new LinkedHashSet();
        } else {
            this.YFl = new LinkedHashSet(set);
        }
        if (set2 == null || set2.isEmpty()) {
            this.Sg = new LinkedHashSet();
        } else {
            this.Sg = new LinkedHashSet(set2);
        }
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    /* JADX WARN: Removed duplicated region for block: B:15:0x002a A[Catch: all -> 0x0079, TryCatch #0 {, blocks: (B:3:0x0001, B:8:0x000e, B:10:0x001a, B:12:0x001e, B:13:0x0024, B:15:0x002a, B:17:0x003a, B:19:0x004a, B:21:0x004e, B:23:0x0052, B:25:0x0058, B:29:0x0066, B:31:0x006a, B:32:0x006f), top: B:41:0x0001 }] */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final synchronized com.bytedance.sdk.component.YFl.VOe YFl(boolean r8, java.lang.String r9, com.bytedance.sdk.component.YFl.Sg r10) throws com.bytedance.sdk.component.YFl.wXo.YFl {
        /*
            r7 = this;
            monitor-enter(r7)
            android.net.Uri r0 = android.net.Uri.parse(r9)     // Catch: java.lang.Throwable -> L79
            java.lang.String r1 = r0.getHost()     // Catch: java.lang.Throwable -> L79
            r2 = 0
            if (r1 != 0) goto Le
            monitor-exit(r7)
            return r2
        Le:
            java.util.Set<java.lang.String> r3 = r7.Sg     // Catch: java.lang.Throwable -> L79
            java.lang.String r4 = r10.YFl()     // Catch: java.lang.Throwable -> L79
            boolean r3 = r3.contains(r4)     // Catch: java.lang.Throwable -> L79
            if (r3 == 0) goto L1d
            com.bytedance.sdk.component.YFl.VOe r3 = com.bytedance.sdk.component.YFl.VOe.PUBLIC     // Catch: java.lang.Throwable -> L79
            goto L1e
        L1d:
            r3 = r2
        L1e:
            java.util.Set<java.lang.String> r4 = r7.YFl     // Catch: java.lang.Throwable -> L79
            java.util.Iterator r4 = r4.iterator()     // Catch: java.lang.Throwable -> L79
        L24:
            boolean r5 = r4.hasNext()     // Catch: java.lang.Throwable -> L79
            if (r5 == 0) goto L4c
            java.lang.Object r5 = r4.next()     // Catch: java.lang.Throwable -> L79
            java.lang.String r5 = (java.lang.String) r5     // Catch: java.lang.Throwable -> L79
            java.lang.String r6 = r0.getHost()     // Catch: java.lang.Throwable -> L79
            boolean r6 = r6.equals(r5)     // Catch: java.lang.Throwable -> L79
            if (r6 != 0) goto L4a
            java.lang.String r6 = "."
            java.lang.String r5 = java.lang.String.valueOf(r5)     // Catch: java.lang.Throwable -> L79
            java.lang.String r5 = r6.concat(r5)     // Catch: java.lang.Throwable -> L79
            boolean r5 = r1.endsWith(r5)     // Catch: java.lang.Throwable -> L79
            if (r5 == 0) goto L24
        L4a:
            com.bytedance.sdk.component.YFl.VOe r3 = com.bytedance.sdk.component.YFl.VOe.PRIVATE     // Catch: java.lang.Throwable -> L79
        L4c:
            if (r3 != 0) goto L68
            com.bytedance.sdk.component.YFl.eT$YFl r0 = r7.wN     // Catch: java.lang.Throwable -> L79
            if (r0 == 0) goto L68
            boolean r0 = r0.YFl(r9)     // Catch: java.lang.Throwable -> L79
            if (r0 == 0) goto L68
            com.bytedance.sdk.component.YFl.eT$YFl r0 = r7.wN     // Catch: java.lang.Throwable -> L79
            java.lang.String r1 = r10.YFl()     // Catch: java.lang.Throwable -> L79
            boolean r0 = r0.YFl(r9, r1)     // Catch: java.lang.Throwable -> L79
            if (r0 == 0) goto L66
            monitor-exit(r7)
            return r2
        L66:
            com.bytedance.sdk.component.YFl.VOe r3 = com.bytedance.sdk.component.YFl.VOe.PRIVATE     // Catch: java.lang.Throwable -> L79
        L68:
            if (r8 == 0) goto L6f
            com.bytedance.sdk.component.YFl.VOe r8 = r7.YFl(r9, r10)     // Catch: java.lang.Throwable -> L79
            goto L73
        L6f:
            com.bytedance.sdk.component.YFl.VOe r8 = r7.Sg(r9, r10)     // Catch: java.lang.Throwable -> L79
        L73:
            if (r8 == 0) goto L77
            monitor-exit(r7)
            return r8
        L77:
            monitor-exit(r7)
            return r3
        L79:
            r8 = move-exception
            monitor-exit(r7)
            throw r8
        */
        throw new UnsupportedOperationException("Method not decompiled: com.bytedance.sdk.component.YFl.aIu.YFl(boolean, java.lang.String, com.bytedance.sdk.component.YFl.Sg):com.bytedance.sdk.component.YFl.VOe");
    }

    final synchronized VOe YFl(String str, Sg sg) throws wXo.YFl {
        return YFl(str, sg, true);
    }

    final synchronized VOe Sg(String str, Sg sg) {
        return YFl(str, sg, false);
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public void YFl(Ne.YFl yFl) {
        if (this.tN != null) {
            throw null;
        }
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public void Sg(Ne.YFl yFl) {
        if (this.tN != null) {
            throw null;
        }
    }

    private VOe YFl(String str, Sg sg, boolean z) {
        if (!z || this.AlY == null) {
            return null;
        }
        throw null;
    }
}
