what-the-bank/sources/o/Gbr.java

1083 lines
36 KiB
Java

package o;
import android.graphics.Color;
import android.os.Process;
import android.os.StrictMode;
import android.os.SystemClock;
import android.text.TextUtils;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.ViewConfiguration;
import android.widget.ExpandableListView;
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import java.io.BufferedWriter;
import java.io.Closeable;
import java.io.EOFException;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.PrintStream;
import java.io.Writer;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.concurrent.Callable;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import org.bouncycastle.crypto.tls.CipherSuite;
/* loaded from: classes.dex */
public final class Gbr implements Closeable {
private final File d;
private final File e;
private long f;
private final File g;
private final File i;
private Writer j;
private int m;
private static final byte[] $$a = {39, 47, 87, -72};
private static final int $$b = 30;
private static int $10 = 0;
private static int $11 = 1;
private static int r = 0;
private static int s = 1;
private static int k = 2015661726;
private long n = 0;
private final LinkedHashMap<String, IeS> h = new LinkedHashMap<>(0, 0.75f, true);
private long l = 0;
private ThreadPoolExecutor c = new ThreadPoolExecutor(0, 1, 60, TimeUnit.SECONDS, new LinkedBlockingQueue(), new HBt(0));
private final Callable<Void> b = new Callable<Void>(this) { // from class: o.Gbr.1
private Gbr d;
{
this.d = this;
}
/* JADX INFO: Access modifiers changed from: private */
@Override // java.util.concurrent.Callable
/* renamed from: c, reason: merged with bridge method [inline-methods] */
public Void call() throws Exception {
synchronized (this.d) {
if (Gbr.e(this.d) == null) {
return null;
}
Gbr.c(this.d);
if (((Boolean) Gbr.c(new Object[]{this.d}, -1156159845, 1156159848, (int) System.currentTimeMillis())).booleanValue()) {
Gbr.j(this.d);
Gbr.g(this.d);
}
return null;
}
}
};
private final int a = 1;
/* renamed from: o, reason: collision with root package name */
private final int f8182o = 1;
public static /* synthetic */ Object c(Object[] objArr, int i, int i2, int i3) {
int i4 = ~i;
int i5 = ~((~i3) | i4);
int i6 = (i * (-337)) + (i2 * 339) + (((~((~i2) | i)) | i5 | (~(i | i3))) * (-338)) + ((~(i4 | i2)) * 338) + (((~(i | i2 | i3)) | i5) * 338);
return i6 != 1 ? i6 != 2 ? i6 != 3 ? i6 != 4 ? b(objArr) : c(objArr) : a(objArr) : d(objArr) : e(objArr);
}
/* JADX WARN: Removed duplicated region for block: B:10:0x0025 */
/* JADX WARN: Removed duplicated region for block: B:7:0x001d */
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:10:0x0025 -> B:4:0x0030). Please report as a decompilation issue!!! */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
private static void p(int r6, byte r7, int r8, java.lang.Object[] r9) {
/*
int r8 = r8 + 4
int r6 = r6 * 7
int r6 = 76 - r6
byte[] r0 = o.Gbr.$$a
int r7 = r7 * 2
int r1 = 1 - r7
byte[] r1 = new byte[r1]
r2 = 0
int r7 = 0 - r7
if (r0 != 0) goto L17
r3 = r8
r4 = r2
r8 = r7
goto L30
L17:
r3 = r2
L18:
byte r4 = (byte) r6
r1[r3] = r4
if (r3 != r7) goto L25
java.lang.String r6 = new java.lang.String
r6.<init>(r1, r2)
r9[r2] = r6
return
L25:
int r3 = r3 + 1
int r8 = r8 + 1
r4 = r0[r8]
r5 = r8
r8 = r6
r6 = r4
r4 = r3
r3 = r5
L30:
int r6 = -r6
int r6 = r6 + r8
r8 = r3
r3 = r4
goto L18
*/
throw new UnsupportedOperationException("Method not decompiled: o.Gbr.p(int, byte, int, java.lang.Object[]):void");
}
static /* synthetic */ File a(Gbr gbr) {
int i = 2 % 2;
int i2 = s;
int i3 = i2 + 31;
r = i3 % 128;
int i4 = i3 % 2;
File file = gbr.d;
int i5 = i2 + 117;
r = i5 % 128;
int i6 = i5 % 2;
return file;
}
private static /* synthetic */ Object a(Object[] objArr) {
Gbr gbr = (Gbr) objArr[0];
int i = 2 % 2;
int i2 = r + 1;
s = i2 % 128;
if (i2 % 2 != 0) {
return Boolean.valueOf(gbr.e());
}
gbr.e();
Object obj = null;
obj.hashCode();
throw null;
}
public static /* synthetic */ void a(Gbr gbr, RVV rvv, boolean z) throws IOException {
int i = 2 % 2;
int i2 = r + 25;
s = i2 % 128;
int i3 = i2 % 2;
gbr.b(rvv, z);
int i4 = r + 89;
s = i4 % 128;
if (i4 % 2 != 0) {
return;
}
Object obj = null;
obj.hashCode();
throw null;
}
static /* synthetic */ void c(Gbr gbr) throws IOException {
int i = 2 % 2;
int i2 = r + 93;
s = i2 % 128;
int i3 = i2 % 2;
gbr.g();
if (i3 == 0) {
throw null;
}
}
static /* synthetic */ int d(Gbr gbr) {
int i = 2 % 2;
int i2 = r;
int i3 = i2 + 59;
s = i3 % 128;
int i4 = i3 % 2;
int i5 = gbr.f8182o;
int i6 = i2 + 11;
s = i6 % 128;
int i7 = i6 % 2;
return i5;
}
static /* synthetic */ Writer e(Gbr gbr) {
int i = 2 % 2;
int i2 = r + 39;
s = i2 % 128;
int i3 = i2 % 2;
Writer writer = gbr.j;
if (i3 != 0) {
return writer;
}
Object obj = null;
obj.hashCode();
throw null;
}
static /* synthetic */ int g(Gbr gbr) {
int i = 2 % 2;
int i2 = s + 125;
r = i2 % 128;
if (i2 % 2 != 0) {
gbr.m = 1;
} else {
gbr.m = 0;
}
return 0;
}
static /* synthetic */ void j(Gbr gbr) throws IOException {
int i = 2 % 2;
int i2 = s + 31;
r = i2 % 128;
if (i2 % 2 != 0) {
c(new Object[]{gbr}, 163434476, -163434475, System.identityHashCode(gbr));
int i3 = 20 / 0;
} else {
c(new Object[]{gbr}, 163434476, -163434475, System.identityHashCode(gbr));
}
int i4 = s + 99;
r = i4 % 128;
if (i4 % 2 == 0) {
return;
}
Object obj = null;
obj.hashCode();
throw null;
}
private static void q(int i, int i2, int i3, char[] cArr, boolean z, Object[] objArr) {
int i4 = 2 % 2;
zUI zui = new zUI();
char[] cArr2 = new char[i];
zui.d = 0;
while (zui.d < i) {
int i5 = $11 + 41;
$10 = i5 % 128;
int i6 = i5 % 2;
zui.c = cArr[zui.d];
cArr2[zui.d] = (char) (i3 + zui.c);
int i7 = zui.d;
try {
Object[] objArr2 = {Integer.valueOf(cArr2[i7]), Integer.valueOf(k)};
Object obj = xzZ.y.get(880493502);
if (obj == null) {
Class cls = (Class) xzZ.c((ViewConfiguration.getFadingEdgeLength() >> 16) + CipherSuite.TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA, TextUtils.indexOf("", "", 0, 0) + 7, (char) ((Process.getThreadPriority(0) + 20) >> 6));
byte b = (byte) 1;
byte b2 = (byte) (b - 1);
Object[] objArr3 = new Object[1];
p(b, b2, (byte) (b2 - 1), objArr3);
obj = cls.getMethod((String) objArr3[0], Integer.TYPE, Integer.TYPE);
xzZ.y.put(880493502, obj);
}
cArr2[i7] = ((Character) ((Method) obj).invoke(null, objArr2)).charValue();
Object[] objArr4 = {zui, zui};
Object obj2 = xzZ.y.get(1294990079);
if (obj2 == null) {
Class cls2 = (Class) xzZ.c((SystemClock.elapsedRealtime() > 0L ? 1 : (SystemClock.elapsedRealtime() == 0L ? 0 : -1)) + 341, Color.argb(0, 0, 0, 0) + 5, (char) (ViewConfiguration.getMaximumDrawingCacheSize() >> 24));
byte b3 = (byte) 0;
byte b4 = b3;
Object[] objArr5 = new Object[1];
p(b3, b4, (byte) (b4 - 1), objArr5);
obj2 = cls2.getMethod((String) objArr5[0], Object.class, Object.class);
xzZ.y.put(1294990079, obj2);
}
((Method) obj2).invoke(null, objArr4);
} catch (Throwable th) {
Throwable cause = th.getCause();
if (cause == null) {
throw th;
}
throw cause;
}
}
if (i2 > 0) {
int i8 = $10 + 33;
$11 = i8 % 128;
int i9 = i8 % 2;
zui.a = i2;
char[] cArr3 = new char[i];
System.arraycopy(cArr2, 0, cArr3, 0, i);
System.arraycopy(cArr3, 0, cArr2, i - zui.a, zui.a);
System.arraycopy(cArr3, zui.a, cArr2, 0, i - zui.a);
}
if (z) {
int i10 = $11 + 121;
$10 = i10 % 128;
int i11 = i10 % 2;
char[] cArr4 = new char[i];
zui.d = 0;
while (zui.d < i) {
int i12 = $11 + 57;
$10 = i12 % 128;
int i13 = i12 % 2;
cArr4[zui.d] = cArr2[(i - zui.d) - 1];
Object[] objArr6 = {zui, zui};
Object obj3 = xzZ.y.get(1294990079);
if (obj3 == null) {
Class cls3 = (Class) xzZ.c(342 - TextUtils.indexOf("", "", 0, 0), 5 - Color.red(0), (char) ExpandableListView.getPackedPositionType(0L));
byte b5 = (byte) 0;
byte b6 = b5;
Object[] objArr7 = new Object[1];
p(b5, b6, (byte) (b6 - 1), objArr7);
obj3 = cls3.getMethod((String) objArr7[0], Object.class, Object.class);
xzZ.y.put(1294990079, obj3);
}
((Method) obj3).invoke(null, objArr6);
}
cArr2 = cArr4;
}
objArr[0] = new String(cArr2);
}
private Gbr(File file, long j) {
this.d = file;
this.e = new File(file, "journal");
this.i = new File(file, "journal.tmp");
this.g = new File(file, "journal.bkp");
this.f = j;
}
public static Gbr c(File file, long j) throws IOException {
int i = 2 % 2;
if (j <= 0) {
throw new IllegalArgumentException("maxSize <= 0");
}
File file2 = new File(file, "journal.bkp");
if (file2.exists()) {
File file3 = new File(file, "journal");
if (file3.exists()) {
int i2 = r + 69;
s = i2 % 128;
if (i2 % 2 == 0) {
file2.delete();
int i3 = 62 / 0;
} else {
file2.delete();
}
} else {
c(new Object[]{file2, file3, false}, -562732347, 562732349, (int) System.currentTimeMillis());
}
}
Gbr gbr = new Gbr(file, j);
if (gbr.e.exists()) {
try {
c(new Object[]{gbr}, -560895636, 560895636, System.identityHashCode(gbr));
gbr.d();
return gbr;
} catch (IOException e) {
PrintStream printStream = System.out;
StringBuilder sb = new StringBuilder("DiskLruCache ");
sb.append(file);
sb.append(" is corrupt: ");
sb.append(e.getMessage());
sb.append(", removing");
printStream.println(sb.toString());
gbr.h();
}
}
file.mkdirs();
Gbr gbr2 = new Gbr(file, j);
c(new Object[]{gbr2}, 163434476, -163434475, System.identityHashCode(gbr2));
int i4 = r + 103;
s = i4 % 128;
int i5 = i4 % 2;
return gbr2;
}
private static /* synthetic */ Object b(Object[] objArr) {
Gbr gbr = (Gbr) objArr[0];
int i = 2 % 2;
C16809rRy c16809rRy = new C16809rRy(new FileInputStream(gbr.e), oSN.e);
try {
String e = c16809rRy.e();
String e2 = c16809rRy.e();
String e3 = c16809rRy.e();
String e4 = c16809rRy.e();
String e5 = c16809rRy.e();
if ("libcore.io.DiskLruCache".equals(e)) {
Object[] objArr2 = new Object[1];
q((KeyEvent.getMaxKeyCode() >> 16) + 1, -MotionEvent.axisFromString(""), (ViewConfiguration.getScrollFriction() > BitmapDescriptorFactory.HUE_RED ? 1 : (ViewConfiguration.getScrollFriction() == BitmapDescriptorFactory.HUE_RED ? 0 : -1)) + 233, new char[]{0}, true, objArr2);
if (((String) objArr2[0]).intern().equals(e2)) {
int i2 = r + 19;
s = i2 % 128;
Object obj = null;
if (i2 % 2 == 0) {
Integer.toString(gbr.a).equals(e3);
obj.hashCode();
throw null;
}
if (Integer.toString(gbr.a).equals(e3)) {
int i3 = r + 65;
s = i3 % 128;
if (i3 % 2 == 0) {
Integer.toString(gbr.f8182o).equals(e4);
throw null;
}
if (Integer.toString(gbr.f8182o).equals(e4)) {
int i4 = r + 7;
s = i4 % 128;
int i5 = i4 % 2;
if ("".equals(e5)) {
int i6 = s + 17;
r = i6 % 128;
int i7 = i6 % 2 != 0 ? 1 : 0;
while (true) {
try {
gbr.a(c16809rRy.e());
i7++;
} catch (EOFException unused) {
gbr.m = i7 - gbr.h.size();
if (c16809rRy.a == -1) {
int i8 = r + 41;
s = i8 % 128;
int i9 = i8 % 2;
c(new Object[]{gbr}, 163434476, -163434475, System.identityHashCode(gbr));
} else {
int i10 = r + 15;
s = i10 % 128;
int i11 = i10 % 2;
gbr.j = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(gbr.e, true), oSN.e));
}
oSN.b(c16809rRy);
return null;
}
}
}
}
}
}
}
StringBuilder sb = new StringBuilder("unexpected journal header: [");
sb.append(e);
sb.append(", ");
sb.append(e2);
sb.append(", ");
sb.append(e4);
sb.append(", ");
sb.append(e5);
sb.append("]");
throw new IOException(sb.toString());
} catch (Throwable th) {
oSN.b(c16809rRy);
throw th;
}
}
/* JADX WARN: Code restructure failed: missing block: B:13:0x003a, code lost:
if (r1 == 107) goto L18;
*/
/* JADX WARN: Code restructure failed: missing block: B:46:0x004a, code lost:
if (r12.startsWith("REMOVE") == false) goto L23;
*/
/* JADX WARN: Code restructure failed: missing block: B:47:0x004c, code lost:
r11.h.remove(r5);
*/
/* JADX WARN: Code restructure failed: missing block: B:48:0x0051, code lost:
return;
*/
/* JADX WARN: Code restructure failed: missing block: B:50:0x0042, code lost:
if (r1 == 6) goto L18;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
private void a(java.lang.String r12) throws java.io.IOException {
/*
Method dump skipped, instructions count: 232
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: o.Gbr.a(java.lang.String):void");
}
private void d() throws IOException {
int i = 2 % 2;
b(this.i);
Iterator<IeS> it = this.h.values().iterator();
while (it.hasNext()) {
int i2 = s + 117;
r = i2 % 128;
int i3 = i2 % 2;
IeS next = it.next();
int i4 = 0;
if (next.d == null) {
while (i4 < this.f8182o) {
int i5 = s + 119;
r = i5 % 128;
int i6 = i5 % 2;
this.n += next.a[i4];
i4++;
}
} else {
next.d = null;
int i7 = s + 7;
r = i7 % 128;
while (true) {
int i8 = i7 % 2;
if (i4 >= this.f8182o) {
break;
}
int i9 = r + 99;
s = i9 % 128;
int i10 = i9 % 2;
b(next.b[i4]);
b(next.e[i4]);
i4++;
i7 = r + 39;
s = i7 % 128;
}
it.remove();
int i11 = s + 79;
r = i11 % 128;
if (i11 % 2 != 0) {
int i12 = 2 % 5;
}
}
}
}
private static /* synthetic */ Object e(Object[] objArr) {
Gbr gbr = (Gbr) objArr[0];
synchronized (gbr) {
Writer writer = gbr.j;
if (writer != null) {
b(writer);
}
BufferedWriter bufferedWriter = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(gbr.i), oSN.e));
try {
bufferedWriter.write("libcore.io.DiskLruCache");
bufferedWriter.write("\n");
Object[] objArr2 = new Object[1];
q(ExpandableListView.getPackedPositionGroup(0L) + 1, 1 - TextUtils.indexOf("", "", 0, 0), 234 - (ViewConfiguration.getScrollBarSize() >> 8), new char[]{0}, true, objArr2);
bufferedWriter.write(((String) objArr2[0]).intern());
bufferedWriter.write("\n");
bufferedWriter.write(Integer.toString(gbr.a));
bufferedWriter.write("\n");
bufferedWriter.write(Integer.toString(gbr.f8182o));
bufferedWriter.write("\n");
bufferedWriter.write("\n");
for (IeS ieS : gbr.h.values()) {
if (ieS.d != null) {
StringBuilder sb = new StringBuilder();
sb.append("DIRTY ");
sb.append(ieS.c);
sb.append('\n');
bufferedWriter.write(sb.toString());
} else {
StringBuilder sb2 = new StringBuilder();
sb2.append("CLEAN ");
sb2.append(ieS.c);
sb2.append(ieS.a());
sb2.append('\n');
bufferedWriter.write(sb2.toString());
}
}
b(bufferedWriter);
if (gbr.e.exists()) {
c(new Object[]{gbr.e, gbr.g, true}, -562732347, 562732349, (int) System.currentTimeMillis());
}
c(new Object[]{gbr.i, gbr.e, false}, -562732347, 562732349, (int) System.currentTimeMillis());
gbr.g.delete();
gbr.j = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(gbr.e, true), oSN.e));
} catch (Throwable th) {
b(bufferedWriter);
throw th;
}
}
return null;
}
private static void b(File file) throws IOException {
int i = 2 % 2;
int i2 = r + 13;
s = i2 % 128;
if (i2 % 2 != 0) {
if (file.exists() && !file.delete()) {
throw new IOException();
}
int i3 = s + 119;
r = i3 % 128;
int i4 = i3 % 2;
return;
}
file.exists();
throw null;
}
private static /* synthetic */ Object d(Object[] objArr) {
File file = (File) objArr[0];
File file2 = (File) objArr[1];
boolean booleanValue = ((Boolean) objArr[2]).booleanValue();
int i = 2 % 2;
int i2 = s + 29;
r = i2 % 128;
Object obj = null;
if (i2 % 2 != 0) {
obj.hashCode();
throw null;
}
if (!(!booleanValue)) {
b(file2);
}
if (!file.renameTo(file2)) {
throw new IOException();
}
int i3 = r + 77;
s = i3 % 128;
if (i3 % 2 != 0) {
return null;
}
throw null;
}
public final LWm e(String str) throws IOException {
synchronized (this) {
b();
IeS ieS = this.h.get(str);
if (ieS == null) {
return null;
}
if (!ieS.j) {
return null;
}
for (File file : ieS.b) {
if (!file.exists()) {
return null;
}
}
this.m++;
this.j.append((CharSequence) "READ");
this.j.append(' ');
this.j.append((CharSequence) str);
this.j.append('\n');
if (e()) {
this.c.submit(this.b);
}
return new LWm(this, str, ieS.h, ieS.b, ieS.a, (byte) 0);
}
}
public final RVV d(String str) throws IOException {
int i = 2 % 2;
int i2 = s + 29;
r = i2 % 128;
int i3 = i2 % 2;
RVV b = b(str);
if (i3 != 0) {
int i4 = 13 / 0;
}
int i5 = r + 33;
s = i5 % 128;
if (i5 % 2 != 0) {
return b;
}
throw null;
}
private RVV b(String str) throws IOException {
synchronized (this) {
b();
IeS ieS = this.h.get(str);
byte b = 0;
if (ieS == null) {
ieS = new IeS(this, str, b);
this.h.put(str, ieS);
} else if (ieS.d != null) {
return null;
}
RVV rvv = new RVV(this, ieS, b);
ieS.d = rvv;
this.j.append((CharSequence) "DIRTY");
this.j.append(' ');
this.j.append((CharSequence) str);
this.j.append('\n');
d(this.j);
return rvv;
}
}
private boolean e() {
int i = 2 % 2;
int i2 = s + 115;
int i3 = i2 % 128;
r = i3;
int i4 = i2 % 2;
int i5 = this.m;
if (i5 >= 2000) {
int i6 = i3 + 113;
s = i6 % 128;
if (i6 % 2 == 0) {
this.h.size();
throw null;
}
if (i5 >= this.h.size()) {
return true;
}
}
return false;
}
private boolean c(String str) throws IOException {
synchronized (this) {
b();
IeS ieS = this.h.get(str);
if (ieS != null && ieS.d == null) {
for (int i = 0; i < this.f8182o; i++) {
File file = ieS.b[i];
if (file.exists() && !file.delete()) {
StringBuilder sb = new StringBuilder();
sb.append("failed to delete ");
sb.append(file);
throw new IOException(sb.toString());
}
this.n -= ieS.a[i];
ieS.a[i] = 0;
}
this.m++;
this.j.append((CharSequence) "REMOVE");
this.j.append(' ');
this.j.append((CharSequence) str);
this.j.append('\n');
this.h.remove(str);
if (e()) {
this.c.submit(this.b);
}
return true;
}
return false;
}
}
private void b() {
int i = 2 % 2;
int i2 = s;
int i3 = i2 + 69;
r = i3 % 128;
int i4 = i3 % 2;
if (this.j == null) {
throw new IllegalStateException("cache is closed");
}
int i5 = i2 + 49;
r = i5 % 128;
if (i5 % 2 == 0) {
return;
}
Object obj = null;
obj.hashCode();
throw null;
}
private static /* synthetic */ Object c(Object[] objArr) {
Gbr gbr = (Gbr) objArr[0];
synchronized (gbr) {
if (gbr.j == null) {
return null;
}
Iterator it = new ArrayList(gbr.h.values()).iterator();
while (it.hasNext()) {
IeS ieS = (IeS) it.next();
if (ieS.d != null) {
RVV rvv = ieS.d;
a(rvv.c, rvv, false);
}
}
gbr.g();
b(gbr.j);
gbr.j = null;
return null;
}
}
private void g() throws IOException {
int i = 2 % 2;
while (this.n > this.f) {
int i2 = r + 33;
s = i2 % 128;
if (i2 % 2 == 0) {
c(this.h.entrySet().iterator().next().getKey());
int i3 = 70 / 0;
} else {
c(this.h.entrySet().iterator().next().getKey());
}
}
int i4 = s + 39;
r = i4 % 128;
int i5 = i4 % 2;
}
private void h() throws IOException {
int i = 2 % 2;
int i2 = s + 75;
r = i2 % 128;
int i3 = i2 % 2;
c(new Object[]{this}, 2102650358, -2102650354, System.identityHashCode(this));
oSN.c(this.d);
int i4 = s + 105;
r = i4 % 128;
int i5 = i4 % 2;
}
private static void b(Writer writer) throws IOException {
int i = 2 % 2;
StrictMode.ThreadPolicy threadPolicy = StrictMode.getThreadPolicy();
StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder(threadPolicy).permitUnbufferedIo().build());
try {
writer.close();
StrictMode.setThreadPolicy(threadPolicy);
int i2 = s + 81;
r = i2 % 128;
int i3 = i2 % 2;
} catch (Throwable th) {
StrictMode.setThreadPolicy(threadPolicy);
throw th;
}
}
private static void d(Writer writer) throws IOException {
int i = 2 % 2;
StrictMode.ThreadPolicy threadPolicy = StrictMode.getThreadPolicy();
StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder(threadPolicy).permitUnbufferedIo().build());
try {
writer.flush();
StrictMode.setThreadPolicy(threadPolicy);
int i2 = s + 85;
r = i2 % 128;
int i3 = i2 % 2;
} catch (Throwable th) {
StrictMode.setThreadPolicy(threadPolicy);
throw th;
}
}
/* loaded from: classes.dex */
public final class LWm {
public final File[] a;
private final String b;
private final long[] c;
private Gbr d;
private final long e;
/* synthetic */ LWm(Gbr gbr, String str, long j, File[] fileArr, long[] jArr, byte b) {
this(gbr, str, j, fileArr, jArr);
}
private LWm(Gbr gbr, String str, long j, File[] fileArr, long[] jArr) {
this.d = gbr;
this.b = str;
this.e = j;
this.a = fileArr;
this.c = jArr;
}
}
/* loaded from: classes.dex */
public final class RVV {
final boolean[] a;
public boolean b;
public final Gbr c;
final IeS e;
/* synthetic */ RVV(Gbr gbr, IeS ieS, byte b) {
this(gbr, ieS);
}
private RVV(Gbr gbr, IeS ieS) {
this.c = gbr;
this.e = ieS;
this.a = ieS.j ? null : new boolean[Gbr.d(gbr)];
}
public final File e() throws IOException {
File file;
synchronized (this.c) {
if (this.e.d != this) {
throw new IllegalStateException();
}
if (!this.e.j) {
this.a[0] = true;
}
file = this.e.e[0];
Gbr.a(this.c).mkdirs();
}
return file;
}
}
/* JADX INFO: Access modifiers changed from: package-private */
/* loaded from: classes.dex */
public final class IeS {
final long[] a;
File[] b;
final String c;
RVV d;
File[] e;
long h;
private Gbr i;
boolean j;
/* synthetic */ IeS(Gbr gbr, String str, byte b) {
this(gbr, str);
}
private IeS(Gbr gbr, String str) {
this.i = gbr;
this.c = str;
this.a = new long[Gbr.d(gbr)];
this.b = new File[Gbr.d(gbr)];
this.e = new File[Gbr.d(gbr)];
StringBuilder sb = new StringBuilder(str);
sb.append('.');
int length = sb.length();
for (int i = 0; i < Gbr.d(gbr); i++) {
sb.append(i);
this.b[i] = new File(Gbr.a(gbr), sb.toString());
sb.append(".tmp");
this.e[i] = new File(Gbr.a(gbr), sb.toString());
sb.setLength(length);
}
}
public final String a() throws IOException {
StringBuilder sb = new StringBuilder();
for (long j : this.a) {
sb.append(' ');
sb.append(j);
}
return sb.toString();
}
final void b(String[] strArr) throws IOException {
if (strArr.length == Gbr.d(this.i)) {
for (int i = 0; i < strArr.length; i++) {
try {
this.a[i] = Long.parseLong(strArr[i]);
} catch (NumberFormatException unused) {
StringBuilder sb = new StringBuilder("unexpected journal line: ");
sb.append(Arrays.toString(strArr));
throw new IOException(sb.toString());
}
}
return;
}
StringBuilder sb2 = new StringBuilder("unexpected journal line: ");
sb2.append(Arrays.toString(strArr));
throw new IOException(sb2.toString());
}
}
/* loaded from: classes.dex */
static final class HBt implements ThreadFactory {
private HBt() {
}
/* synthetic */ HBt(byte b) {
this();
}
@Override // java.util.concurrent.ThreadFactory
public final Thread newThread(Runnable runnable) {
Thread thread;
synchronized (this) {
thread = new Thread(runnable, "glide-disk-lru-cache-thread");
thread.setPriority(1);
}
return thread;
}
}
private void b(RVV rvv, boolean z) throws IOException {
synchronized (this) {
IeS ieS = rvv.e;
if (ieS.d != rvv) {
throw new IllegalStateException();
}
if (z && !ieS.j) {
for (int i = 0; i < this.f8182o; i++) {
if (rvv.a[i]) {
if (!ieS.e[i].exists()) {
a(rvv.c, rvv, false);
return;
}
} else {
a(rvv.c, rvv, false);
StringBuilder sb = new StringBuilder();
sb.append("Newly created entry didn't create value for index ");
sb.append(i);
throw new IllegalStateException(sb.toString());
}
}
}
for (int i2 = 0; i2 < this.f8182o; i2++) {
File file = ieS.e[i2];
if (z) {
if (file.exists()) {
File file2 = ieS.b[i2];
file.renameTo(file2);
long j = ieS.a[i2];
long length = file2.length();
ieS.a[i2] = length;
this.n = (this.n - j) + length;
}
} else {
b(file);
}
}
this.m++;
ieS.d = null;
if (!(ieS.j | z)) {
this.h.remove(ieS.c);
this.j.append((CharSequence) "REMOVE");
this.j.append(' ');
this.j.append((CharSequence) ieS.c);
this.j.append('\n');
} else {
ieS.j = true;
this.j.append((CharSequence) "CLEAN");
this.j.append(' ');
this.j.append((CharSequence) ieS.c);
this.j.append((CharSequence) ieS.a());
this.j.append('\n');
if (z) {
long j2 = this.l;
this.l = 1 + j2;
ieS.h = j2;
}
}
d(this.j);
if (this.n > this.f || e()) {
this.c.submit(this.b);
}
}
}
@Override // java.io.Closeable, java.lang.AutoCloseable
public final void close() throws IOException {
c(new Object[]{this}, 2102650358, -2102650354, System.identityHashCode(this));
}
private static void a(File file, File file2, boolean z) throws IOException {
c(new Object[]{file, file2, Boolean.valueOf(z)}, -562732347, 562732349, (int) System.currentTimeMillis());
}
private void a() throws IOException {
c(new Object[]{this}, 163434476, -163434475, System.identityHashCode(this));
}
private void c() throws IOException {
c(new Object[]{this}, -560895636, 560895636, System.identityHashCode(this));
}
}