package com.ironsource; import com.ironsource.lg; import java.util.HashMap; import java.util.List; import java.util.Map; import kotlin.Unit; import kotlin.jvm.internal.Intrinsics; /* loaded from: classes2.dex */ public final class hr implements lg, lg.a { private final Map a = new HashMap(); private final Map b = new HashMap(); @Override // com.ironsource.lg.a public void a(lg.b smash) { Intrinsics.checkNotNullParameter(smash, "smash"); synchronized (this) { try { String c = smash.c(); if (this.a.containsKey(c)) { Map map = this.a; Integer num = map.get(c); Intrinsics.checkNotNull(num); map.put(c, Integer.valueOf(num.intValue() + 1)); } Unit unit = Unit.INSTANCE; } catch (Throwable th) { throw th; } } } @Override // com.ironsource.lg.a public void a(List smashes) { Intrinsics.checkNotNullParameter(smashes, "smashes"); for (lg.b bVar : smashes) { this.a.put(bVar.c(), 0); this.b.put(bVar.c(), Integer.valueOf(bVar.b())); } } @Override // com.ironsource.lg public boolean a() { for (String str : this.b.keySet()) { Integer num = this.a.get(str); Intrinsics.checkNotNull(num); int intValue = num.intValue(); Integer num2 = this.b.get(str); Intrinsics.checkNotNull(num2); if (intValue < num2.intValue()) { return false; } } return true; } @Override // com.ironsource.lg public boolean b(lg.b smash) { boolean z; Intrinsics.checkNotNullParameter(smash, "smash"); synchronized (this) { String c = smash.c(); if (this.a.containsKey(c)) { Integer num = this.a.get(c); Intrinsics.checkNotNull(num); z = num.intValue() >= smash.b(); } } return z; } }