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

591 lines
18 KiB
Java

package o;
import android.view.ViewGroup;
import androidx.recyclerview.widget.RecyclerView;
import io.flutter.embedding.android.KeyboardMap;
import java.util.List;
import o.C16148leh;
import org.bouncycastle.asn1.cmp.PKIFailureInfo;
/* loaded from: classes2.dex */
public final class kIT extends DDX<RecyclerView.zJl> implements iIq<RecyclerView.zJl> {
public Qpt a;
public C16148leh.IeS b;
C16148leh c;
public C16148leh.HBt e;
private int f;
public C15174gjB g;
private int h;
private int i;
private int j;
private int k;
private int m;
private int n;
/* renamed from: o, reason: collision with root package name */
private int f9189o;
public kIT(C16148leh c16148leh, RecyclerView.Sts<RecyclerView.zJl> sts, long[] jArr) {
super(sts);
Object cast;
this.h = -1;
this.j = -1;
this.f = -1;
this.i = -1;
this.k = -1;
this.f9189o = -1;
this.n = -1;
this.m = -1;
while (true) {
if (Qpt.class.isInstance(sts)) {
cast = Qpt.class.cast(sts);
break;
} else {
if (!(sts instanceof DDX)) {
cast = null;
break;
}
sts = ((DDX) sts).d;
}
}
Qpt qpt = (Qpt) cast;
this.a = qpt;
if (qpt == null) {
throw new IllegalArgumentException("adapter does not implement ExpandableItemAdapter");
}
this.c = c16148leh;
C15174gjB c15174gjB = new C15174gjB();
this.g = c15174gjB;
Qpt qpt2 = this.a;
boolean z = this.c.d;
c15174gjB.d(qpt2, 0, false);
if (jArr != null) {
this.g.a(jArr);
}
}
@Override // o.DDX
public final void a() {
super.a();
this.a = null;
this.c = null;
this.e = null;
this.b = null;
}
@Override // o.DDX, androidx.recyclerview.widget.RecyclerView.Sts
public final long getItemId(int i) {
if (this.a == null) {
return -1L;
}
long c = this.g.c(i);
int i2 = (int) c;
int i3 = (int) (c >>> 32);
if (i3 == -1) {
long d = this.a.d(i2);
if (d >= -134217728 && d <= 134217727) {
return ((d << 28) & 72057593769492480L) | 268435455;
}
StringBuilder sb = new StringBuilder("Group ID value is out of range. (groupId = ");
sb.append(d);
sb.append(")");
throw new IllegalArgumentException(sb.toString());
}
long d2 = this.a.d(i2);
long a = this.a.a(i3);
if (d2 < -134217728 || d2 > 134217727) {
StringBuilder sb2 = new StringBuilder("Group ID value is out of range. (groupId = ");
sb2.append(d2);
sb2.append(")");
throw new IllegalArgumentException(sb2.toString());
}
if (a >= -134217728 && a <= 134217727) {
return ((d2 << 28) & 72057593769492480L) | (a & 268435455);
}
StringBuilder sb3 = new StringBuilder("Child ID value is out of range. (childId = ");
sb3.append(a);
sb3.append(")");
throw new IllegalArgumentException(sb3.toString());
}
@Override // o.DDX, androidx.recyclerview.widget.RecyclerView.Sts
public final int getItemViewType(int i) {
int b;
if (this.a == null) {
return 0;
}
long c = this.g.c(i);
int i2 = (int) c;
int i3 = (int) (c >>> 32);
if (i3 == -1) {
b = this.a.c(i2);
} else {
b = this.a.b();
}
if ((b & PKIFailureInfo.systemUnavail) == 0) {
return i3 == -1 ? b | PKIFailureInfo.systemUnavail : b;
}
StringBuilder sb = new StringBuilder("Illegal view type (type = ");
sb.append(Integer.toHexString(b));
sb.append(")");
throw new IllegalStateException(sb.toString());
}
@Override // o.DDX, androidx.recyclerview.widget.RecyclerView.Sts
public final RecyclerView.zJl onCreateViewHolder(ViewGroup viewGroup, int i) {
RecyclerView.zJl anW_;
Qpt qpt = this.a;
if (qpt == null) {
throw new IllegalStateException();
}
int i2 = Integer.MAX_VALUE & i;
if ((i & PKIFailureInfo.systemUnavail) != 0) {
anW_ = qpt.anX_(viewGroup, i2);
} else {
anW_ = qpt.anW_(viewGroup, i2);
}
if (anW_ instanceof InterfaceC9756dpr) {
((InterfaceC9756dpr) anW_).d(-1);
}
return anW_;
}
/* JADX WARN: Multi-variable type inference failed */
@Override // o.DDX, androidx.recyclerview.widget.RecyclerView.Sts
public final void onBindViewHolder(RecyclerView.zJl zjl, int i, List<Object> list) {
if (this.a == null) {
return;
}
long c = this.g.c(i);
int i2 = (int) c;
int i3 = (int) (c >>> 32);
zjl.getItemViewType();
int i4 = i3 == -1 ? 1 : 2;
if ((this.g.c[i2] & 2147483648L) != 0) {
i4 |= 4;
}
if (zjl instanceof InterfaceC9756dpr) {
InterfaceC9756dpr interfaceC9756dpr = (InterfaceC9756dpr) zjl;
int e = interfaceC9756dpr.e();
if (e != -1 && ((e ^ i4) & 4) != 0) {
i4 |= 8;
}
if (e == -1 || ((e ^ i4) & Integer.MAX_VALUE) != 0) {
i4 |= PKIFailureInfo.systemUnavail;
}
interfaceC9756dpr.d(i4);
}
if (zjl instanceof YNE) {
YNE yne = (YNE) zjl;
int i5 = this.h;
boolean z = (i5 == -1 || this.j == -1) ? false : true;
int i6 = this.f;
boolean z2 = (i6 == -1 || this.i == -1) ? false : true;
boolean z3 = i2 >= i5 && i2 <= this.j;
boolean z4 = i2 != -1 && i3 >= i6 && i3 <= this.i;
int a = yne.a();
if ((a & 1) != 0 && (a & 4) == 0 && ((!z || z3) && (!z2 || (z2 && z4)))) {
yne.b((-2147483644) | a);
}
}
if (i3 == -1) {
this.a.b(zjl, i2);
} else {
this.a.e(zjl, i2, i3);
}
}
private void b() {
C15174gjB c15174gjB = this.g;
if (c15174gjB != null) {
long[] d = c15174gjB.d();
C15174gjB c15174gjB2 = this.g;
Qpt qpt = this.a;
boolean z = this.c.d;
c15174gjB2.d(qpt, 0, false);
this.g.a(d);
}
}
/* JADX WARN: Multi-variable type inference failed */
@Override // o.DDX, o.InterfaceC7784cup
public final void b(RecyclerView.zJl zjl, int i) {
if (zjl instanceof InterfaceC9756dpr) {
((InterfaceC9756dpr) zjl).d(-1);
}
super.b((kIT) zjl, i);
}
@Override // o.DDX
public final void e() {
b();
super.e();
}
@Override // o.DDX
public final void b(int i, int i2) {
super.b(i, i2);
}
@Override // o.DDX
public final void f(int i, int i2) {
b();
super.f(i, i2);
}
@Override // o.DDX
public final void j(int i, int i2) {
int i3;
if (i2 == 1) {
long c = this.g.c(i);
int i4 = (int) c;
int i5 = (int) (c >>> 32);
if (i5 == -1) {
C15174gjB c15174gjB = this.g;
for (int i6 = 0; i6 <= 0; i6++) {
long j = c15174gjB.c[i4];
if ((j & 2147483648L) != 0) {
c15174gjB.e -= (int) (j & 2147483647L);
c15174gjB.b--;
}
}
c15174gjB.j--;
int i7 = i4;
while (true) {
i3 = c15174gjB.j;
if (i7 >= i3) {
break;
}
long[] jArr = c15174gjB.c;
int i8 = i7 + 1;
jArr[i7] = jArr[i8];
int[] iArr = c15174gjB.a;
iArr[i7] = iArr[i8];
i7 = i8;
}
c15174gjB.d = Math.min(c15174gjB.d, i3 != 0 ? (-1) + i4 : -1);
} else {
C15174gjB c15174gjB2 = this.g;
long[] jArr2 = c15174gjB2.c;
long j2 = jArr2[i4];
int i9 = (int) (2147483647L & j2);
if (i5 < 0 || i5 + 1 > i9) {
StringBuilder sb = new StringBuilder("Invalid child position removeChildItems(groupPosition = ");
sb.append(i4);
sb.append(", childPosition = ");
sb.append(i5);
sb.append(", count = 1)");
throw new IllegalStateException(sb.toString());
}
if ((2147483648L & j2) != 0) {
c15174gjB2.e--;
}
jArr2[i4] = (i9 - 1) | ((-2147483648L) & j2);
c15174gjB2.d = Math.min(c15174gjB2.d, i4 - 1);
}
} else {
b();
}
super.j(i, i2);
}
@Override // o.DDX
public final void d(int i, int i2, int i3) {
b();
super.d(i, i2, i3);
}
@Override // o.iIq
public final boolean c(RecyclerView.zJl zjl, int i) {
boolean b;
Qpt qpt = this.a;
if (!(qpt instanceof FXQ)) {
return false;
}
FXQ fxq = (FXQ) qpt;
if (((int) (this.g.c(i) >>> 32)) == -1) {
b = fxq.c();
} else {
b = fxq.b();
}
this.h = -1;
this.j = -1;
this.f = -1;
this.i = -1;
return b;
}
@Override // o.iIq
public final JuK e(RecyclerView.zJl zjl, int i) {
Qpt qpt = this.a;
if (!(qpt instanceof FXQ) || qpt.d() <= 0) {
return null;
}
FXQ fxq = (FXQ) this.a;
long c = this.g.c(i);
int i2 = (int) c;
if (((int) (c >>> 32)) == -1) {
JuK i3 = fxq.i();
if (i3 == null) {
int max = Math.max(0, this.a.d() - 1);
C15174gjB c15174gjB = this.g;
return new JuK(0, Math.max(0, ((c15174gjB.j + c15174gjB.e) - this.g.a(max)) - 1));
}
if (!i3.getClass().equals(cFN.class) && !i3.getClass().equals(JuK.class)) {
throw new IllegalStateException("Invalid range specified: ".concat(String.valueOf(i3)));
}
long j = (i3.c & KeyboardMap.kValueMask) | (-4294967296L);
long j2 = (i3.b & KeyboardMap.kValueMask) | (-4294967296L);
int e = this.g.e(j);
int e2 = this.g.e(j2);
if (i3.b > i2) {
e2 += this.g.a(i3.b);
}
this.h = i3.c;
this.j = i3.b;
return new JuK(e, e2);
}
JuK d = fxq.d();
if (d == null) {
C15174gjB c15174gjB2 = this.g;
return new JuK(1, Math.max(1, (c15174gjB2.j + c15174gjB2.e) - 1));
}
if (d.getClass().equals(cFN.class) || d.getClass().equals(JuK.class)) {
long j3 = (d.c & KeyboardMap.kValueMask) | (-4294967296L);
int e3 = this.g.e((d.b & KeyboardMap.kValueMask) | (-4294967296L)) + this.g.a(d.b);
int min = Math.min(this.g.e(j3) + 1, e3);
this.h = d.c;
this.j = d.b;
return new JuK(min, e3);
}
if (d.getClass().equals(C15710hts.class)) {
int max2 = Math.max(this.g.a(i2) - 1, 0);
int min2 = Math.min(d.c, max2);
int min3 = Math.min(d.b, max2);
long j4 = i2 & KeyboardMap.kValueMask;
int e4 = this.g.e((min2 << 32) | j4);
int e5 = this.g.e(j4 | (min3 << 32));
this.f = min2;
this.i = min3;
return new JuK(e4, e5);
}
throw new IllegalStateException("Invalid range specified: ".concat(String.valueOf(d)));
}
/* JADX WARN: Code restructure failed: missing block: B:24:0x0063, code lost:
if (r9 == (r2 - 1)) goto L31;
*/
/* JADX WARN: Code restructure failed: missing block: B:25:0x006d, code lost:
return false;
*/
/* JADX WARN: Code restructure failed: missing block: B:27:0x006c, code lost:
return r3.e();
*/
/* JADX WARN: Code restructure failed: missing block: B:29:0x0066, code lost:
if (r10 != false) goto L31;
*/
@Override // o.iIq
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final boolean e(int r18, int r19) {
/*
r17 = this;
r0 = r17
r1 = r18
r2 = r19
o.Qpt r3 = r0.a
boolean r4 = r3 instanceof o.FXQ
r5 = 1
if (r4 != 0) goto Le
return r5
Le:
int r3 = r3.d()
r4 = 0
if (r3 > 0) goto L16
return r4
L16:
o.Qpt r3 = r0.a
o.FXQ r3 = (o.FXQ) r3
o.gjB r6 = r0.g
long r6 = r6.c(r1)
int r8 = (int) r6
r9 = 32
long r6 = r6 >>> r9
int r6 = (int) r6
o.gjB r7 = r0.g
long r10 = r7.c(r2)
int r7 = (int) r10
long r9 = r10 >>> r9
int r9 = (int) r9
r10 = -1
if (r6 != r10) goto L34
r6 = r5
goto L35
L34:
r6 = r4
L35:
if (r9 != r10) goto L39
r10 = r5
goto L3a
L39:
r10 = r4
L3a:
r11 = 0
r13 = 2147483648(0x80000000, double:1.0609978955E-314)
if (r6 == 0) goto L6e
if (r8 != r7) goto L46
goto L66
L46:
if (r1 >= r2) goto L66
o.gjB r1 = r0.g
long[] r1 = r1.c
r15 = r1[r7]
long r1 = r15 & r13
int r1 = (r1 > r11 ? 1 : (r1 == r11 ? 0 : -1))
if (r1 == 0) goto L56
r1 = r5
goto L57
L56:
r1 = r4
L57:
o.gjB r2 = r0.g
int r2 = r2.a(r7)
if (r10 == 0) goto L62
r10 = r1 ^ 1
goto L66
L62:
int r2 = r2 - r5
if (r9 != r2) goto L6d
goto L68
L66:
if (r10 == 0) goto L6d
L68:
boolean r1 = r3.e()
return r1
L6d:
return r4
L6e:
o.gjB r6 = r0.g
long[] r6 = r6.c
r8 = r6[r7]
long r8 = r8 & r13
int r6 = (r8 > r11 ? 1 : (r8 == r11 ? 0 : -1))
if (r6 == 0) goto L7b
r6 = r5
goto L7c
L7b:
r6 = r4
L7c:
if (r1 >= r2) goto L8a
if (r10 == 0) goto L97
if (r6 == 0) goto L83
goto L97
L83:
o.gjB r1 = r0.g
long[] r1 = r1.c
r4 = r1[r7]
goto L97
L8a:
if (r10 == 0) goto L97
if (r7 <= 0) goto L96
int r7 = r7 - r5
o.gjB r1 = r0.g
long[] r1 = r1.c
r4 = r1[r7]
goto L97
L96:
return r4
L97:
boolean r1 = r3.a()
return r1
*/
throw new UnsupportedOperationException("Method not decompiled: o.kIT.e(int, int):boolean");
}
@Override // o.iIq
public final void b(int i) {
Qpt qpt = this.a;
if (qpt instanceof FXQ) {
this.g.c(i);
}
}
@Override // o.iIq
public final void d(int i) {
int i2 = this.k;
int i3 = this.f9189o;
this.h = -1;
this.j = -1;
this.f = -1;
this.i = -1;
this.k = -1;
this.f9189o = -1;
this.n = -1;
this.m = -1;
if (this.a instanceof FXQ) {
if (i2 == -1 && i3 == -1) {
this.g.c(i);
}
}
}
/* JADX WARN: Removed duplicated region for block: B:33:0x0096 */
/* JADX WARN: Removed duplicated region for block: B:35:0x00ae A[ADDED_TO_REGION] */
/* JADX WARN: Removed duplicated region for block: B:40:0x00c0 */
/* JADX WARN: Removed duplicated region for block: B:42:0x00ab */
@Override // o.iIq
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final void c(int r21, int r22) {
/*
Method dump skipped, instructions count: 244
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: o.kIT.c(int, int):void");
}
public final boolean e(int i, boolean z) {
if ((this.g.c[i] & 2147483648L) == 0) {
return false;
}
if (this.g.d(i)) {
notifyItemRangeRemoved(this.g.e((i & KeyboardMap.kValueMask) | (-4294967296L)) + 1, (int) (this.g.c[i] & 2147483647L));
}
notifyItemChanged(this.g.e((-4294967296L) | (KeyboardMap.kValueMask & i)), null);
C16148leh.IeS ieS = this.b;
if (ieS != null) {
ieS.e(i);
}
return true;
}
public final boolean a(int i, boolean z) {
if ((this.g.c[i] & 2147483648L) != 0) {
return false;
}
if (this.g.e(i)) {
notifyItemRangeInserted(this.g.e((i & KeyboardMap.kValueMask) | (-4294967296L)) + 1, (int) (this.g.c[i] & 2147483647L));
}
notifyItemChanged(this.g.e((-4294967296L) | (KeyboardMap.kValueMask & i)), null);
C16148leh.HBt hBt = this.e;
if (hBt != null) {
hBt.d(i);
}
return true;
}
@Override // o.DDX, androidx.recyclerview.widget.RecyclerView.Sts
public final int getItemCount() {
C15174gjB c15174gjB = this.g;
return c15174gjB.j + c15174gjB.e;
}
}