package o; import java.io.IOException; /* loaded from: classes.dex */ public final class lzU { public static void b(shM shm, long j, sAQ saq, TZV tzv) { while (true) { if (j != -1) { try { if (shm.c >= j) { return; } } catch (IOException e) { String message = e.getMessage(); T t = saq.a; BrP.b(new Object[]{t, message}, -1786863991, 1786863992, System.identityHashCode(t)); return; } } mEu meu = new mEu(shm); if (meu.e > 2147483647L) { T t2 = saq.a; BrP.b(new Object[]{t2, "Atom size too large."}, -1786863991, 1786863992, System.identityHashCode(t2)); return; } if (meu.e >= 8) { if (saq.a(meu)) { b(shm, (meu.e + shm.c) - 8, saq.b(meu, tzv), tzv); } else if (saq.e(meu)) { saq = saq.a(meu, shm.a(((int) meu.e) - 8), tzv); } else if (meu.e > 8) { shm.b(meu.e - 8); } else if (meu.e == -1) { return; } } else { T t3 = saq.a; BrP.b(new Object[]{t3, "Atom size too small."}, -1786863991, 1786863992, System.identityHashCode(t3)); return; } } } }