package com.google.android.gms.ads.nonagon.signalgeneration;

import android.os.Bundle;
import android.util.JsonReader;
import androidx.annotation.Nullable;
import com.google.android.gms.internal.ads.ao;
import com.google.android.gms.internal.ads.tz;
import com.google.android.gms.internal.ads.zzdxh;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

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

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

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

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final long f8007d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public final long f8008e;

    @Nullable
    public tz zzd;

    @Nullable
    public Bundle zze;

    @Nullable
    public String zzc = null;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final Bundle f8006c = new Bundle();

    /* JADX WARN: Can't fix incorrect switch cases order, some code will duplicate */
    /* JADX WARN: Failed to restore switch over string. Please report as a decompilation issue */
    /* JADX WARN: Removed duplicated region for block: B:23:0x0060  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public c0(JsonReader jsonReader, @Nullable tz tzVar) throws IOException {
        Bundle bundle;
        byte b10;
        this.f8007d = -1L;
        this.f8008e = -1L;
        this.zzd = tzVar;
        HashMap map = new HashMap();
        jsonReader.beginObject();
        String strNextString = "";
        while (jsonReader.hasNext()) {
            String strNextName = jsonReader.nextName();
            strNextName = strNextName == null ? "" : strNextName;
            switch (strNextName.hashCode()) {
                case -1573145462:
                    b10 = strNextName.equals("start_time") ? (byte) 2 : (byte) -1;
                    break;
                case -995427962:
                    if (strNextName.equals("params")) {
                        b10 = 0;
                        break;
                    }
                    break;
                case -271442291:
                    if (strNextName.equals("signal_dictionary")) {
                        b10 = 1;
                        break;
                    }
                    break;
                case 1725551537:
                    if (strNextName.equals("end_time")) {
                        b10 = 3;
                        break;
                    }
                    break;
            }
            if (b10 == 0) {
                strNextString = jsonReader.nextString();
            } else if (b10 == 1) {
                map = new HashMap();
                jsonReader.beginObject();
                while (jsonReader.hasNext()) {
                    map.put(jsonReader.nextName(), jsonReader.nextString());
                }
                jsonReader.endObject();
            } else if (b10 == 2) {
                this.f8007d = jsonReader.nextLong();
            } else if (b10 != 3) {
                jsonReader.skipValue();
            } else {
                this.f8008e = jsonReader.nextLong();
            }
        }
        this.f8004a = strNextString;
        jsonReader.endObject();
        for (Map.Entry entry : map.entrySet()) {
            if (entry.getKey() != null && entry.getValue() != null) {
                this.f8006c.putString((String) entry.getKey(), (String) entry.getValue());
            }
        }
        if (!((Boolean) n7.y.f31093e.f31096c.b(ao.B2)).booleanValue() || tzVar == null || (bundle = tzVar.f17040j) == null) {
            return;
        }
        bundle.putLong(zzdxh.GET_SIGNALS_SDKCORE_START.a(), this.f8007d);
        bundle.putLong(zzdxh.GET_SIGNALS_SDKCORE_END.a(), this.f8008e);
    }
}
