package n7;

import android.content.Context;
import android.os.Bundle;
import com.google.ads.mediation.admob.AdMobAdapter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Set;

/* JADX INFO: loaded from: classes2.dex */
public final class e4 {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public static final e4 f30941a = new e4();

    /* JADX WARN: Removed duplicated region for block: B:12:0x0044  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public static a4 a(Context context, u2 u2Var) {
        boolean z10;
        String str = u2Var.f31049a;
        Set set = u2Var.f31051c;
        List listUnmodifiableList = !set.isEmpty() ? Collections.unmodifiableList(new ArrayList(set)) : null;
        g7.t tVar = b3.c().f30915f;
        q7.e eVar = x.f31085g.f31086a;
        String strZzD = q7.e.zzD(context);
        if (!u2Var.f31056h.contains(strZzD)) {
            tVar.getClass();
            z10 = new ArrayList(tVar.f26311d).contains(strZzD);
        }
        Bundle bundleZzd = u2Var.zzd(AdMobAdapter.class);
        String str2 = u2Var.f31053e;
        Context applicationContext = context.getApplicationContext();
        String strZzv = applicationContext != null ? q7.e.zzv(Thread.currentThread().getStackTrace(), applicationContext.getPackageName()) : null;
        boolean z11 = u2Var.f31059k;
        g7.t tVar2 = b3.c().f30915f;
        int iMax = Math.max(u2Var.f31055g, tVar2.f26308a);
        String[] strArr = new String[2];
        strArr[0] = null;
        String str3 = tVar2.f26310c;
        if (str3 == null) {
            str3 = "";
        }
        strArr[1] = str3;
        return new a4(8, -1L, bundleZzd, -1, listUnmodifiableList, z10, iMax, false, str2, null, null, str, u2Var.f31052d, u2Var.f31057i, Collections.unmodifiableList(new ArrayList(u2Var.f31058j)), u2Var.f31054f, strZzv, z11, null, tVar2.f26309b, (String) Collections.max(Arrays.asList(strArr), d4.f30936a), new ArrayList(u2Var.f31050b), u2Var.f31061m, u2Var.zzn(), tVar2.f26312e.a(), u2Var.f31062n, 0L);
    }
}
