package com.google.android.gms.internal.measurement;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/* JADX INFO: loaded from: classes.dex */
public final class n4 extends AbstractC0641h {

    /* JADX INFO: renamed from: s, reason: collision with root package name */
    public final boolean f9929s;

    /* JADX INFO: renamed from: t, reason: collision with root package name */
    public final boolean f9930t;

    /* JADX INFO: renamed from: u, reason: collision with root package name */
    public final /* synthetic */ H1 f9931u;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public n4(H1 h12, boolean z8, boolean z9) {
        super("log");
        this.f9931u = h12;
        this.f9929s = z8;
        this.f9930t = z9;
    }

    /* JADX WARN: Removed duplicated region for block: B:20:0x007b  */
    /* JADX WARN: Removed duplicated region for block: B:22:0x008a  */
    @Override // com.google.android.gms.internal.measurement.AbstractC0641h
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final InterfaceC0671n d(C2.a aVar, List list) {
        int i;
        int i5;
        AbstractC0707u1.z("log", 1, list);
        int size = list.size();
        r rVar = InterfaceC0671n.f9919g;
        H1 h12 = this.f9931u;
        if (size == 1) {
            ((P.g) h12.f9597t).x(3, ((C0700t) aVar.f1157r).a(aVar, (InterfaceC0671n) list.get(0)).c(), Collections.EMPTY_LIST, this.f9929s, this.f9930t);
            return rVar;
        }
        int iS = AbstractC0707u1.s(((C0700t) aVar.f1157r).a(aVar, (InterfaceC0671n) list.get(0)).a().doubleValue());
        if (iS != 2) {
            i = 3;
            if (iS == 3) {
                i5 = 1;
            } else if (iS == 5) {
                i5 = 5;
            } else if (iS == 6) {
                i5 = 2;
            }
            InterfaceC0671n interfaceC0671n = (InterfaceC0671n) list.get(1);
            C0700t c0700t = (C0700t) aVar.f1157r;
            String strC = c0700t.a(aVar, interfaceC0671n).c();
            if (list.size() != 2) {
                ((P.g) h12.f9597t).x(i5, strC, Collections.EMPTY_LIST, this.f9929s, this.f9930t);
                return rVar;
            }
            ArrayList arrayList = new ArrayList();
            for (int i8 = 2; i8 < Math.min(list.size(), 5); i8++) {
                arrayList.add(c0700t.a(aVar, (InterfaceC0671n) list.get(i8)).c());
            }
            ((P.g) h12.f9597t).x(i5, strC, arrayList, this.f9929s, this.f9930t);
            return rVar;
        }
        i = 4;
        i5 = i;
        InterfaceC0671n interfaceC0671n2 = (InterfaceC0671n) list.get(1);
        C0700t c0700t2 = (C0700t) aVar.f1157r;
        String strC2 = c0700t2.a(aVar, interfaceC0671n2).c();
        if (list.size() != 2) {
        }
    }
}
