package com.applovin.impl; import com.applovin.impl.bf; import java.nio.ByteBuffer; /* loaded from: classes.dex */ public final class tk extends dk { private final bh a = new bh(); private final ah b = new ah(); private ho c; @Override // com.applovin.impl.dk public bf a(ef efVar, ByteBuffer byteBuffer) { bf.b vkVar; ho hoVar = this.c; if (hoVar == null || efVar.j != hoVar.c()) { ho hoVar2 = new ho(efVar.f); this.c = hoVar2; hoVar2.a(efVar.f - efVar.j); } byte[] array = byteBuffer.array(); int limit = byteBuffer.limit(); this.a.a(array, limit); this.b.a(array, limit); this.b.d(39); long a = (this.b.a(1) << 32) | this.b.a(32); this.b.d(20); int a2 = this.b.a(12); int a3 = this.b.a(8); this.a.g(14); if (a3 == 0) { vkVar = new vk(); } else if (a3 == 255) { vkVar = yh.a(this.a, a2, a); } else if (a3 == 4) { vkVar = wk.a(this.a); } else if (a3 != 5) { vkVar = a3 != 6 ? null : Cdo.a(this.a, a, this.c); } else { vkVar = uk.a(this.a, a, this.c); } return vkVar == null ? new bf(new bf.b[0]) : new bf(vkVar); } }