diff --git a/analysis/apk/decomp.log b/analysis/apk/decomp.log new file mode 100644 index 0000000..e69de29 diff --git a/analysis/apk/decomp/a0_f0.java b/analysis/apk/decomp/a0_f0.java new file mode 100644 index 0000000..0f755f0 --- /dev/null +++ b/analysis/apk/decomp/a0_f0.java @@ -0,0 +1,1068 @@ +package a0; +public final class f0 extends kotlin.coroutines.jvm.internal.SuspendLambda implements a7.e { + public final synthetic int c; + public int d; + public Object e; + public Object f; + public final synthetic Object g; + + public f0(a7.f p2, kotlin.coroutines.Continuation p3, s.u p4) + { + this.c = 16; + this.f = ((kotlin.coroutines.jvm.internal.SuspendLambda) p2); + this.g = p4; + super(2, p3); + return; + } + + public synthetic f0(Object p1, Object p2, Object p3, kotlin.coroutines.Continuation p4, int p5) + { + this.c = p5; + this.e = p1; + this.f = p2; + this.g = p3; + super(2, p4); + return; + } + + public synthetic f0(Object p1, Object p2, kotlin.coroutines.Continuation p3, int p4) + { + this.c = p4; + this.f = p1; + this.g = p2; + super(2, p3); + return; + } + + public f0(kotlinx.coroutines.Job p2, a7.e p3, kotlin.coroutines.Continuation p4) + { + this.c = 25; + this.f = p2; + this.g = ((kotlin.coroutines.jvm.internal.SuspendLambda) p3); + super(2, p4); + return; + } + + public f0(kotlinx.coroutines.channels.Channel p2, kotlin.coroutines.Continuation p3) + { + this.c = 27; + this.g = p2; + super(2, p3); + return; + } + + public final kotlin.coroutines.Continuation create(Object p12, kotlin.coroutines.Continuation p13) + { + switch (this.c) { + case 0: + return new a0.f0(((a0.i0) this.e), ((n.z) this.f), ((e2.c) this.g), p13, 0); + case 1: + return new a0.f0(((kotlin.jvm.internal.f0) this.f), ((kotlin.jvm.internal.f0) this.g), p13, 1); + case 2: + return new a0.f0(((y.t) this.e), ((e1.j1) this.f), ((e1.q1) this.g), p13, 2); + case 3: + return new a0.f0(((d0.h) this.e), ((v2.f1) this.f), ((a3.b) this.g), p13, 3); + case 4: + kotlinx.coroutines.channels.Channel v13_21 = new a0.f0(((e1.i2) this.f), ((e1.a1) this.g), p13, 4); + v13_21.e = p12; + return v13_21; + case 5: + kotlinx.coroutines.channels.Channel v13_19 = new a0.f0(((kotlin.coroutines.CoroutineContext) this.f), ((kotlinx.coroutines.flow.Flow) this.g), p13, 5); + v13_19.e = p12; + return v13_19; + case 6: + kotlinx.coroutines.channels.Channel v13_17 = new a0.f0(((k9.a) this.f), ((kotlin.jvm.internal.c0) this.g), p13, 6); + v13_17.e = p12; + return v13_17; + case 7: + kotlinx.coroutines.channels.Channel v13_15 = new a0.f0(((n.m1) this.f), ((e1.j1) this.g), p13, 7); + v13_15.e = p12; + return v13_15; + case 8: + return new a0.f0(((n0.j) this.f), ((o0.e) this.g), p13, 8); + case 9: + return new a0.f0(((o8.e1) this.e), ((o8.e1) this.f), ((e1.j1) this.g), p13, 9); + case 10: + return new a0.f0(((u.l) this.e), ((u.m) this.f), ((kotlinx.coroutines.DisposableHandle) this.g), p13, 10); + case 11: + return new a0.f0(((u.l) this.e), ((u.j) this.f), ((kotlinx.coroutines.DisposableHandle) this.g), p13, 11); + case 12: + return new a0.f0(((b9.l) this.e), ((c.m) this.f), ((c.m) this.g), p13, 12); + case 13: + return new a0.f0(((b9.r) this.e), ((c.m) this.f), ((c.m) this.g), p13, 13); + case 14: + return new a0.f0(((a7.e) this.e), this.f, ((kotlinx.coroutines.CoroutineScope) this.g), p13, 14); + case 15: + kotlinx.coroutines.channels.Channel v13_8 = new a0.f0(((a7.a) this.f), ((a7.e) this.g), p13, 15); + v13_8.e = p12; + return v13_8; + case 16: + kotlinx.coroutines.channels.Channel v13_6 = new a0.f0(((kotlin.coroutines.jvm.internal.SuspendLambda) this.f), p13, ((s.u) this.g)); + v13_6.e = p12; + return v13_6; + case 17: + kotlinx.coroutines.channels.Channel v13_4 = new a0.f0(((a7.g) this.f), ((s.u) this.g), p13, 17); + v13_4.e = p12; + return v13_4; + case 18: + kotlinx.coroutines.channels.Channel v13_2 = new a0.f0(((s.l0) this.f), ((a7.e) this.g), p13, 18); + v13_2.e = p12; + return v13_2; + case 19: + return new a0.f0(((s.l0) this.e), ((p.i1) this.f), ((a7.e) this.g), p13, 19); + case 20: + kotlinx.coroutines.channels.Channel v13_34 = new a0.f0(((s.i1) this.f), ((s.o1) this.g), p13, 20); + v13_34.e = p12; + return v13_34; + case 21: + kotlinx.coroutines.channels.Channel v13_32 = new a0.f0(((s.o1) this.f), ((s.u0) this.g), p13, 21); + v13_32.e = p12; + return v13_32; + case 22: + kotlinx.coroutines.channels.Channel v13_30 = new a0.f0(((s.i1) this.f), ((s.m3) this.g), p13, 22); + v13_30.e = p12; + return v13_30; + case 23: + kotlinx.coroutines.channels.Channel v13_28 = new a0.f0(((s.m3) this.f), ((a7.e) this.g), p13, 23); + v13_28.e = p12; + return v13_28; + case 24: + return new a0.f0(((h0.b1) this.e), ((s.r2) this.f), ((p2.w) this.g), p13, 24); + case 25: + kotlinx.coroutines.channels.Channel v13_26 = new a0.f0(((kotlinx.coroutines.Job) this.f), ((kotlin.coroutines.jvm.internal.SuspendLambda) this.g), p13); + v13_26.e = p12; + return v13_26; + case 26: + kotlinx.coroutines.channels.Channel v13_22 = new a0.f0(((e1.a3) this.f), ((n.c) this.g), p13, 26); + v13_22.e = p12; + return v13_22; + case 27: + return new a0.f0(((kotlinx.coroutines.channels.Channel) this.g), p13); + case 28: + return new a0.f0(((e8.o) this.e), ((w7.v) this.f), ((String) this.g), p13, 28); + default: + e1.a3 v0_24 = new a0.f0(((a7.a) this.f), ((n.c) this.g), p13, 29); + v0_24.e = p12; + return v0_24; + } + } + + public final Object invoke(Object p2, Object p3) + { + switch (this.c) { + case 0: + return ((a0.f0) this.create(((kotlinx.coroutines.CoroutineScope) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + case 1: + return ((a0.f0) this.create(((kotlinx.coroutines.CoroutineScope) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + case 2: + return ((a0.f0) this.create(((kotlinx.coroutines.CoroutineScope) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + case 3: + return ((a0.f0) this.create(((kotlinx.coroutines.CoroutineScope) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + case 4: + return ((a0.f0) this.create(((kotlinx.coroutines.CoroutineScope) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + case 5: + return ((a0.f0) this.create(((e1.a2) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + case 6: + return ((a0.f0) this.create(((kotlinx.coroutines.CoroutineScope) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + case 7: + return ((a0.f0) this.create(((e1.a2) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + case 8: + return ((a0.f0) this.create(((kotlinx.coroutines.CoroutineScope) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + case 9: + return ((a0.f0) this.create(((kotlinx.coroutines.CoroutineScope) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + case 10: + return ((a0.f0) this.create(((kotlinx.coroutines.CoroutineScope) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + case 11: + return ((a0.f0) this.create(((kotlinx.coroutines.CoroutineScope) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + case 12: + return ((a0.f0) this.create(((kotlinx.coroutines.CoroutineScope) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + case 13: + return ((a0.f0) this.create(((kotlinx.coroutines.CoroutineScope) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + case 14: + return ((a0.f0) this.create(((kotlinx.coroutines.CoroutineScope) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + case 15: + return ((a0.f0) this.create(((kotlinx.coroutines.CoroutineScope) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + case 16: + return ((a0.f0) this.create(((s.f0) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + case 17: + return ((a0.f0) this.create(((p6.g) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + case 18: + return ((a0.f0) this.create(((s.t2) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + case 19: + return ((a0.f0) this.create(((kotlinx.coroutines.CoroutineScope) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + case 20: + return ((a0.f0) this.create(((s.g0) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + case 21: + return ((a0.f0) this.create(((kotlinx.coroutines.CoroutineScope) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + case 22: + return ((a0.f0) this.create(((s.k3) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + case 23: + return ((a0.f0) this.create(((s.t2) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + case 24: + return ((a0.f0) this.create(((kotlinx.coroutines.CoroutineScope) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + case 25: + return ((a0.f0) this.create(((kotlinx.coroutines.CoroutineScope) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + case 26: + return ((a0.f0) this.create(((kotlinx.coroutines.CoroutineScope) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + case 27: + return ((a0.f0) this.create(((kotlinx.coroutines.CoroutineScope) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + case 28: + return ((a0.f0) this.create(((kotlinx.coroutines.CoroutineScope) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + default: + return ((a0.f0) this.create(((kotlinx.coroutines.flow.Flow) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + } + } + + public final Object invokeSuspend(Object p17) + { + switch (this.c) { + case 0: + kotlinx.coroutines.CoroutineScope v6_19 = ((a0.i0) this.e); + p6.a0 v9_0 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + Throwable v0_1 = this.d; + try { + if (v0_1 == null) { + q6.y.Y(p17); + Throwable v0_2 = v6_19.p; + Object v1_0 = kotlin.coroutines.jvm.internal.Boxing.boxFloat(0); + Boolean v2_1 = ((n.z) this.f); + long v5_1 = new a0.d0(((e2.c) this.g), v6_19, 1); + this.d = 1; + if (n.c.b(v0_2, v1_0, v2_1, v5_1, this, 4) != v9_0) { + v6_19.k.setValue(Boolean.TRUE); + v6_19.f(0); + v9_0 = p6.a0.a; + } else { + } + } else { + if (v0_1 != 1) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + q6.y.Y(p17); + } + } + } catch (Throwable v0_6) { + v6_19.f(0); + throw v0_6; + } + return v9_0; + case 1: + Boolean v2_81; + boolean v3_70; + Boolean v2_78; + Throwable v0_140; + Object v1_141 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + Boolean v2_76 = this.d; + if (v2_76 == null) { + q6.y.Y(p17); + v2_78 = ((kotlin.jvm.internal.f0) this.f); + this.e = v2_78; + this.d = 1; + v3_70 = k8.h.c("https://qbsg.top/api/activation/firmware-list", "{}", this); + if (v3_70 != v1_141) { + v2_78.c = v3_70; + v2_81 = ((kotlin.jvm.internal.f0) this.g); + this.e = v2_81; + this.d = 2; + v0_140 = k8.h.c("https://qbsg.top/api/firmware/catalog", "{}", this); + if (v0_140 != v1_141) { + v2_81.c = v0_140; + v1_141 = p6.a0.a; + } + } + } else { + if (v2_76 == 1) { + v2_78 = ((kotlin.jvm.internal.f0) this.e); + q6.y.Y(p17); + v3_70 = p17; + } else { + if (v2_76 != 2) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + Throwable v0_144 = ((kotlin.jvm.internal.f0) this.e); + q6.y.Y(p17); + v2_81 = v0_144; + v0_140 = p17; + } + } + } + return v1_141; + case 2: + Throwable v0_135 = ((e1.q1) this.g); + Object v1_136 = ((e1.j1) this.f); + Boolean v2_75 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + boolean v3_62 = this.d; + if (!v3_62) { + q6.y.Y(p17); + if (((java.util.List) v1_136.getValue()).size() <= v0_135.h()) { + v0_135.i(((java.util.List) v1_136.getValue()).size()); + v2_75 = p6.a0.a; + } else { + boolean v3_67 = ((y.t) this.e); + this.d = 1; + if (v3_67.f(0, this) != v2_75) { + } + } + } else { + if (v3_62 != 1) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + q6.y.Y(p17); + } + } + return v2_75; + case 3: + Throwable v0_130 = p6.a0.a; + Object v1_127 = ((d0.h) this.e); + Boolean v2_74 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + boolean v3_54 = this.d; + if (!v3_54) { + Object v1_132; + q6.y.Y(p17); + p6.a0 v9_7 = v1_127.q; + boolean v3_56 = new d0.f(v1_127, ((v2.f1) this.f), ((a3.b) this.g)); + this.d = 1; + v9_7.getClass(); + f1.e v10_5 = ((a2.c) v3_56.invoke()); + if ((v10_5 == null) || (s.d0.s1(v9_7, v10_5, 0, 0, 3))) { + v1_132 = v0_130; + } else { + Object v1_131 = new kotlinx.coroutines.CancellableContinuationImpl(kotlin.coroutines.intrinsics.IntrinsicsKt.intercepted(this), 1); + v1_131.initCancellability(); + long v5_43 = new s.a0(v3_56, v1_131); + kotlinx.coroutines.CoroutineScope v6_13 = v9_7.v; + f1.e v10_6 = v6_13.a; + boolean v3_58 = ((a2.c) v3_56.invoke()); + if (v3_58) { + v1_131.invokeOnCancellation(new n.n1(15, v6_13, v5_43)); + kotlinx.coroutines.CoroutineScope v6_15 = a.a.Y(0, v10_6.e); + int v11_4 = v6_15.c; + kotlinx.coroutines.CoroutineScope v6_16 = v6_15.d; + if (v11_4 > v6_16) { + v10_6.a(0, v5_43); + } else { + while(true) { + java.util.concurrent.CancellationException v12_8 = ((a2.c) ((s.a0) v10_6.c[v6_16]).a.invoke()); + if (v12_8 != null) { + int v13_2 = v3_58.f(v12_8); + if (v13_2.equals(v3_58)) { + break; + } + if (!v13_2.equals(v12_8)) { + java.util.concurrent.CancellationException v12_11 = new java.util.concurrent.CancellationException("bringIntoView call interrupted by a newer, non-overlapping call"); + int v13_5 = (v10_6.e - 1); + if (v13_5 > v6_16) { + if (v6_16 == v11_4) { + } else { + v6_16--; + } + if (!v9_7.y) { + v9_7.t1(0); + } + v1_132 = v1_131.getResult(); + if (v1_132 == kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()) { + kotlin.coroutines.jvm.internal.DebugProbesKt.probeCoroutineSuspended(this); + } + if (v1_132 != kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()) { + } + if (v1_132 == v2_74) { + v0_130 = v2_74; + } + return v0_130; + } + while(true) { + ((s.a0) v10_6.c[v6_16]).b.cancel(v12_11); + if (v13_5 == v6_16) { + break; + } + v13_5++; + } + } + } + } + v10_6.a((v6_16 + 1), v5_43); + } + } else { + v1_131.resumeWith(v0_130); + } + } + } else { + if (v3_54 != 1) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + q6.y.Y(p17); + } + } + return v0_130; + case 4: + Throwable v0_127 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + Object v1_121 = this.d; + if (v1_121 == null) { + q6.y.Y(p17); + Object v1_123 = ((kotlinx.coroutines.CoroutineScope) this.e); + Boolean v2_73 = ((e1.i2) this.f); + boolean v3_53 = ((e1.a1) this.g); + this.d = 1; + if (v2_73.invoke(v1_123, v3_53, this) != v0_127) { + v0_127 = p6.a0.a; + } + } else { + if (v1_121 != 1) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + q6.y.Y(p17); + } + } + return v0_127; + case 5: + Throwable v0_122 = ((kotlinx.coroutines.flow.Flow) this.g); + Object v1_117 = ((kotlin.coroutines.CoroutineContext) this.f); + Boolean v2_71 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + p6.a0 v9_4 = this.d; + if (v9_4 == null) { + q6.y.Y(p17); + p6.a0 v9_6 = ((e1.a2) this.e); + if (!kotlin.jvm.internal.s.b(v1_117, kotlin.coroutines.EmptyCoroutineContext.INSTANCE)) { + s.n2 v7_9 = new b1.l(v0_122, v9_6, 0, 8); + this.d = 2; + if (kotlinx.coroutines.BuildersKt.withContext(v1_117, v7_9, this) != v2_71) { + v2_71 = p6.a0.a; + } + } else { + Object v1_119 = new e1.z2(v9_6, 0); + this.d = 1; + if (v0_122.collect(v1_119, this) != v2_71) { + } + } + } else { + if ((v9_4 != 1) && (v9_4 != 2)) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + q6.y.Y(p17); + } + } + return v2_71; + case 6: + Throwable v0_115 = ((k9.a) this.f); + Object v1_112 = ((kotlinx.coroutines.CoroutineScope) this.e); + s.n2 v7_6 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + Boolean v2_61 = this.d; + if (v2_61 == null) { + q6.y.Y(p17); + if (!kotlinx.coroutines.JobKt.isActive(v1_112.getCoroutineContext())) { + v7_6 = p6.a0.a; + } else { + Boolean v2_64 = v0_115.w; + if (v2_64 == null) { + Throwable v0_116 = v0_115.v; + Boolean v2_69 = kotlin.coroutines.jvm.internal.Boxing.boxFloat(((kotlin.jvm.internal.c0) this.g).c); + boolean v3_50 = n.d.p(120, 2, n.y.c); + this.e = kotlin.coroutines.jvm.internal.SpillingKt.nullOutSpilledVariable(v1_112); + this.d = 2; + if (n.c.b(v0_116, v2_69, v3_50, 0, this, 12) != v7_6) { + } + } else { + this.e = kotlin.coroutines.jvm.internal.SpillingKt.nullOutSpilledVariable(v1_112); + this.d = 1; + if (v2_64.join(this) != v7_6) { + } + } + } + } else { + if (v2_61 == 1) { + q6.y.Y(p17); + } else { + if (v2_61 != 2) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + q6.y.Y(p17); + } + } + } + return v7_6; + case 7: + Throwable v0_110 = ((n.m1) this.f); + Boolean v2_60 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + boolean v3_44 = this.d; + if (!v3_44) { + q6.y.Y(p17); + boolean v3_46 = ((e1.a2) this.e); + Object v1_109 = e1.t.w(new e3.b(4, v0_110)); + long v5_36 = new m.z(v3_46, v0_110, ((e1.j1) this.g), 0); + this.d = 1; + if (v1_109.collect(v5_36, this) != v2_60) { + v2_60 = p6.a0.a; + } + } else { + if (v3_44 != 1) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + q6.y.Y(p17); + } + } + return v2_60; + case 8: + Boolean v2_58 = ((n0.j) this.f); + boolean v3_42 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + Throwable v0_97 = this.d; + if (v0_97 == null) { + q6.y.Y(p17); + Throwable v0_98 = v2_58.t; + if (v0_98 == null) { + Throwable v0_101 = ((o0.e) this.g); + this.d = 2; + if (v0_101.a(v2_58, this) != v3_42) { + Throwable v0_104 = v2_58.u; + if (v0_104 == null) { + v3_42 = p6.a0.a; + return v3_42; + } else { + this.d = 3; + if (v0_104.invoke(this) != v3_42) { + } + } + } + } else { + this.d = 1; + if (v0_98.invoke(this) != v3_42) { + } else { + return v3_42; + } + } + } else { + if (v0_97 == 1) { + q6.y.Y(p17); + } else { + if (v0_97 == 2) { + q6.y.Y(p17); + } else { + if (v0_97 == 3) { + q6.y.Y(p17); + } else { + if (v0_97 == 4) { + Throwable v0_103 = ((Throwable) this.e); + q6.y.Y(p17); + } else { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } + } + } + } + } + throw v0_103; + case 9: + Throwable v0_93 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + Object v1_102 = this.d; + if (v1_102 == null) { + q6.y.Y(p17); + Object v1_104 = ((o8.e1) this.e); + Boolean v2_56 = ((o8.e1) this.f); + boolean v3_40 = ((a7.f) ((e1.j1) this.g).getValue()); + this.d = 1; + if (o8.w1.e(v1_104, v2_56, v3_40, this) != v0_93) { + v0_93 = p6.a0.a; + } + } else { + if (v1_102 != 1) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + q6.y.Y(p17); + } + } + return v0_93; + case 10: + Throwable v0_88 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + Object v1_97 = this.d; + if (v1_97 == null) { + q6.y.Y(p17); + Object v1_99 = ((u.l) this.e); + Boolean v2_54 = ((u.m) this.f); + this.d = 1; + if (v1_99.b(v2_54, this) != v0_88) { + Throwable v0_92 = ((kotlinx.coroutines.DisposableHandle) this.g); + if (v0_92 != null) { + v0_92.dispose(); + } + v0_88 = p6.a0.a; + } + } else { + if (v1_97 != 1) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + q6.y.Y(p17); + } + } + return v0_88; + case 11: + Throwable v0_83 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + Object v1_92 = this.d; + if (v1_92 == null) { + q6.y.Y(p17); + Object v1_94 = ((u.l) this.e); + Boolean v2_51 = ((u.j) this.f); + this.d = 1; + if (v1_94.b(v2_51, this) != v0_83) { + Throwable v0_87 = ((kotlinx.coroutines.DisposableHandle) this.g); + if (v0_87 != null) { + v0_87.dispose(); + } + v0_83 = p6.a0.a; + } + } else { + if (v1_92 != 1) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + q6.y.Y(p17); + } + } + return v0_83; + case 12: + Throwable v0_80 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + Object v1_85 = this.d; + if (v1_85 == null) { + q6.y.Y(p17); + Object v1_88 = ((b9.l) this.e).d; + Boolean v2_49 = new q8.d0(((c.m) this.f), ((c.m) this.g), 0); + this.d = 1; + if (v1_88.collect(v2_49, this) != v0_80) { + v0_80 = p6.a0.a; + } + } else { + if (v1_85 != 1) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + q6.y.Y(p17); + } + } + return v0_80; + case 13: + Throwable v0_75 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + Object v1_78 = this.d; + if (v1_78 == null) { + q6.y.Y(p17); + Object v1_81 = ((b9.r) this.e).f; + Boolean v2_47 = new q8.d0(((c.m) this.f), ((c.m) this.g), 1); + this.d = 1; + if (v1_81.collect(v2_47, this) != v0_75) { + v0_75 = p6.a0.a; + } + } else { + if (v1_78 != 1) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + q6.y.Y(p17); + } + } + return v0_75; + case 14: + Throwable v0_70 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + Object v1_70 = this.d; + if (v1_70 == null) { + q6.y.Y(p17); + Object v1_72 = ((a7.e) this.e); + Boolean v2_45 = this.f; + this.d = 1; + if (v1_72.invoke(v2_45, this) != v0_70) { + kotlinx.coroutines.CoroutineScopeKt.cancel(((kotlinx.coroutines.CoroutineScope) this.g), new s.a()); + v0_70 = p6.a0.a; + } + } else { + if (v1_70 != 1) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + q6.y.Y(p17); + } + } + return v0_70; + case 15: + Throwable v0_67 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + Object v1_65 = this.d; + if (v1_65 == null) { + q6.y.Y(p17); + Object v1_67 = ((kotlinx.coroutines.CoroutineScope) this.e); + Boolean v2_42 = new kotlin.jvm.internal.f0(); + boolean v3_30 = e1.t.w(((a7.a) this.f)); + long v5_26 = new m.z(v2_42, v1_67, ((a7.e) this.g), 1); + this.d = 1; + if (v3_30.collect(v5_26, this) != v0_67) { + v0_67 = p6.a0.a; + } + } else { + if (v1_65 != 1) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + q6.y.Y(p17); + } + } + return v0_67; + case 16: + Throwable v0_64 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + Object v1_59 = this.d; + if (v1_59 == null) { + q6.y.Y(p17); + Object v1_61 = ((s.f0) this.e); + Boolean v2_40 = ((kotlin.coroutines.jvm.internal.SuspendLambda) this.f); + boolean v3_27 = ((s.t) ((s.u) this.g).k); + this.d = 1; + if (v2_40.invoke(v3_27, v1_61, this) != v0_64) { + v0_64 = p6.a0.a; + } + } else { + if (v1_59 != 1) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + q6.y.Y(p17); + } + } + return v0_64; + case 17: + Throwable v0_60 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + Object v1_52 = this.d; + if (v1_52 == null) { + q6.y.Y(p17); + Object v1_54 = ((p6.g) this.e); + Boolean v2_38 = ((s.f0) v1_54.c); + Object v1_55 = v1_54.d; + boolean v3_22 = ((a7.g) this.f); + long v5_24 = ((s.t) ((s.u) this.g).k); + this.d = 1; + if (v3_22.invoke(v5_24, v2_38, v1_55, this) != v0_60) { + v0_60 = p6.a0.a; + } + } else { + if (v1_52 != 1) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + q6.y.Y(p17); + } + } + return v0_60; + case 18: + Object v1_49 = ((s.l0) this.f).d; + Throwable v0_54 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + Boolean v2_32 = this.d; + try { + if (v2_32 == null) { + q6.y.Y(p17); + Boolean v2_34 = ((s.t2) this.e); + v1_49.setValue(kotlin.coroutines.jvm.internal.Boxing.boxBoolean(1)); + boolean v3_20 = ((a7.e) this.g); + this.d = 1; + if (v3_20.invoke(v2_34, this) != v0_54) { + v1_49.setValue(kotlin.coroutines.jvm.internal.Boxing.boxBoolean(0)); + v0_54 = p6.a0.a; + } + } else { + if (v2_32 != 1) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + q6.y.Y(p17); + } + } + } catch (Throwable v0_58) { + v1_49.setValue(kotlin.coroutines.jvm.internal.Boxing.boxBoolean(0)); + throw v0_58; + } + return v0_54; + case 19: + Throwable v0_46 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + Object v1_44 = this.d; + if (v1_44 == null) { + q6.y.Y(p17); + Object v1_46 = ((s.l0) this.e); + int v11_0 = v1_46.c; + int v13_0 = v1_46.b; + f1.e v10_1 = ((p.i1) this.f); + java.util.concurrent.CancellationException v12_1 = new a0.f0(v1_46, ((a7.e) this.g), 0, 18); + this.d = 1; + v11_0.getClass(); + if (kotlinx.coroutines.CoroutineScopeKt.coroutineScope(new p.m1(v10_1, v11_0, v12_1, v13_0, 0), this) != v0_46) { + v0_46 = p6.a0.a; + } + } else { + if (v1_44 != 1) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + q6.y.Y(p17); + } + } + return v0_46; + case 20: + Throwable v0_43 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + Object v1_39 = this.d; + if (v1_39 == null) { + q6.y.Y(p17); + Boolean v2_27 = ((s.i1) this.f); + long v5_20 = new n.n1(16, ((s.g0) this.e), ((s.o1) this.g)); + this.d = 1; + if (v2_27.invoke(v5_20, this) != v0_43) { + v0_43 = p6.a0.a; + } + } else { + if (v1_39 != 1) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + q6.y.Y(p17); + } + } + return v0_43; + case 21: + Throwable v0_36 = ((s.o1) this.f); + Object v1_36 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + Boolean v2_23 = this.d; + if (v2_23 == null) { + s.n2 v7_4; + q6.y.Y(p17); + Boolean v2_25 = ((kotlinx.coroutines.CoroutineScope) this.e); + boolean v3_14 = v0_36.P; + if (!v0_36.Q) { + v7_4 = 1065353216; + } else { + v7_4 = -1082130432; + } + long v5_18 = s3.q.f(v7_4, ((s.u0) this.g).a); + Throwable v0_38; + if (v0_36.M != s.n2.c) { + v0_38 = s3.q.b(v5_18); + } else { + v0_38 = s3.q.c(v5_18); + } + Throwable v0_39 = kotlin.coroutines.jvm.internal.Boxing.boxFloat(v0_38); + this.d = 1; + if (v3_14.invoke(v2_25, v0_39, this) != v1_36) { + v1_36 = p6.a0.a; + } + } else { + if (v2_23 != 1) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + q6.y.Y(p17); + } + } + return v1_36; + case 22: + Throwable v0_32 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + Object v1_31 = this.d; + if (v1_31 == null) { + q6.y.Y(p17); + Boolean v2_21 = ((s.i1) this.f); + long v5_14 = new n.n1(17, ((s.k3) this.e), ((s.m3) this.g)); + this.d = 1; + if (v2_21.invoke(v5_14, this) != v0_32) { + v0_32 = p6.a0.a; + } + } else { + if (v1_31 != 1) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + q6.y.Y(p17); + } + } + return v0_32; + case 23: + Throwable v0_29 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + Object v1_23 = this.d; + if (v1_23 == null) { + q6.y.Y(p17); + Boolean v2_18 = ((s.m3) this.f); + v2_18.k = ((s.t2) this.e); + Object v1_28 = ((a7.e) this.g); + Boolean v2_19 = v2_18.l; + this.d = 1; + if (v1_28.invoke(v2_19, this) != v0_29) { + v0_29 = p6.a0.a; + } + } else { + if (v1_23 != 1) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + q6.y.Y(p17); + } + } + return v0_29; + case 24: + Throwable v0_26 = p6.a0.a; + Object v1_20 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + Boolean v2_11 = this.d; + if (v2_11 == null) { + q6.y.Y(p17); + Boolean v2_13 = ((h0.b1) this.e); + boolean v3_9 = ((s.r2) this.f); + long v5_10 = ((p2.w) this.g).c; + this.d = 1; + s.n2 v7_2 = new h0.b1(v2_13.f, v2_13.g, v2_13.h, this); + v7_2.d = v3_9; + v7_2.e = v5_10; + if (v7_2.invokeSuspend(v0_26) == v1_20) { + v0_26 = v1_20; + } + } else { + if (v2_11 != 1) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + q6.y.Y(p17); + } + } + return v0_26; + case 25: + Object v1_14; + Throwable v0_23 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + Object v1_12 = this.d; + if (v1_12 == null) { + q6.y.Y(p17); + v1_14 = ((kotlinx.coroutines.CoroutineScope) this.e); + Boolean v2_7 = ((kotlinx.coroutines.Job) this.f); + this.e = v1_14; + this.d = 1; + if (v2_7.join(this) != v0_23) { + Boolean v2_10 = ((kotlin.coroutines.jvm.internal.SuspendLambda) this.g); + this.e = 0; + this.d = 2; + if (v2_10.invoke(v1_14, this) != v0_23) { + v0_23 = p6.a0.a; + } + } + } else { + if (v1_12 == 1) { + v1_14 = ((kotlinx.coroutines.CoroutineScope) this.e); + q6.y.Y(p17); + } else { + if (v1_12 != 2) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + q6.y.Y(p17); + } + } + } + return v0_23; + case 26: + Throwable v0_22 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + Object v1_142 = this.d; + if (v1_142 == null) { + q6.y.Y(p17); + Object v1_2 = ((kotlinx.coroutines.CoroutineScope) this.e); + Boolean v2_5 = e1.t.w(new s0.w0(((e1.a3) this.f), 1)); + boolean v3_7 = new b1.n(1, ((n.c) this.g), v1_2); + this.d = 1; + if (v2_5.collect(v3_7, this) != v0_22) { + v0_22 = p6.a0.a; + } + } else { + if (v1_142 != 1) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + q6.y.Y(p17); + } + } + return v0_22; + case 27: + Boolean v2_44; + boolean v3_35; + Object v1_74; + Throwable v0_61 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + Object v1_58 = this.d; + try { + if (v1_58 == null) { + q6.y.Y(p17); + v2_44 = ((kotlinx.coroutines.channels.Channel) this.g); + v1_74 = v2_44.iterator(); + this.e = v2_44; + this.f = v1_74; + this.d = 1; + v3_35 = v1_74.hasNext(this); + if (v3_35 == v0_61) { + } else { + if (!((Boolean) v3_35).booleanValue()) { + kotlinx.coroutines.channels.ChannelsKt.cancelConsumed(v2_44, 0); + v0_61 = p6.a0.a; + } else { + v1_74.next(); + w2.q1.b.set(0); + kotlinx.coroutines.CoroutineScope v6_10; + kotlinx.coroutines.CoroutineScope v6_8 = s1.m.j.h; + if ((v6_8 == null) || (v6_8.h() != 1)) { + v6_10 = 0; + } else { + v6_10 = 1; + } + if (v6_10 == null) { + } else { + s1.m.a(); + } + } + } + } else { + if (v1_58 != 1) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + v1_74 = ((kotlinx.coroutines.channels.ChannelIterator) this.f); + v2_44 = ((kotlinx.coroutines.channels.ReceiveChannel) this.e); + q6.y.Y(p17); + v3_35 = p17; + } + } + } catch (Throwable v0_131) { + Object v1_133 = v0_131; + try { + throw v1_133; + } catch (Throwable v0_136) { + kotlinx.coroutines.channels.ChannelsKt.cancelConsumed(v2_44, v1_133); + throw v0_136; + } + } + return v0_61; + case 28: + Throwable v0_19 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + Object v1_11 = this.d; + if (v1_11 == null) { + q6.y.Y(p17); + Object v1_21 = ((e8.o) this.e).m; + Boolean v2_22 = new b1.n(2, ((w7.v) this.f), ((String) this.g)); + this.d = 1; + if (v1_21.collect(v2_22, this) == v0_19) { + return v0_19; + } + } else { + if (v1_11 == 1) { + q6.y.Y(p17); + } else { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } + } + throw new b3.e(); + default: + s.n2 v7_0 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + Throwable v0_8 = this.d; + try { + if (v0_8 == null) { + q6.y.Y(p17); + Throwable v0_10 = ((kotlinx.coroutines.flow.Flow) this.e); + Object v1_6 = new b9.k(8, ((n.c) this.g)); + this.d = 1; + if (v0_10.collect(v1_6, this) != v7_0) { + ((a7.a) this.f).invoke(); + v7_0 = p6.a0.a; + } else { + } + } else { + if (v0_8 == 1) { + q6.y.Y(p17); + } else { + if (v0_8 != 2) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + q6.y.Y(p17); + } + } + } + } catch (java.util.concurrent.CancellationException) { + Throwable v0_13 = ((n.c) this.g); + Object v1_7 = kotlin.coroutines.jvm.internal.Boxing.boxFloat(0); + this.d = 2; + if (n.c.b(v0_13, v1_7, 0, 0, this, 14) != v7_0) { + } + } + return v7_0; + } + } +} diff --git a/analysis/apk/decomp/a8_f.java b/analysis/apk/decomp/a8_f.java new file mode 100644 index 0000000..6a92b1f --- /dev/null +++ b/analysis/apk/decomp/a8_f.java @@ -0,0 +1,1533 @@ +package a8; +public final class f extends kotlin.coroutines.jvm.internal.SuspendLambda implements a7.e { + public final synthetic int c; + public int d; + public Object e; + public Object f; + public Object g; + public final synthetic Object h; + + public f(a7.c p2, java.util.concurrent.atomic.AtomicReference p3, a7.e p4, kotlin.coroutines.Continuation p5) + { + this.c = 17; + this.g = ((kotlin.jvm.internal.t) p2); + this.e = p3; + this.h = p4; + super(2, p5); + return; + } + + public synthetic f(Object p1, Object p2, Object p3, Object p4, kotlin.coroutines.Continuation p5, int p6) + { + this.c = p6; + this.f = p1; + this.g = p2; + this.e = p3; + this.h = p4; + super(2, p5); + return; + } + + public synthetic f(Object p1, Object p2, Object p3, Object p4, kotlin.coroutines.Continuation p5, int p6, boolean p7) + { + this.c = p6; + this.f = p1; + this.e = p2; + this.g = p3; + this.h = p4; + super(2, p5); + return; + } + + public synthetic f(Object p1, Object p2, Object p3, kotlin.coroutines.Continuation p4, int p5) + { + this.c = p5; + this.g = p1; + this.e = p2; + this.h = p3; + super(2, p4); + return; + } + + public synthetic f(Object p1, Object p2, kotlin.coroutines.Continuation p3, int p4) + { + this.c = p4; + this.e = p1; + this.h = p2; + super(2, p3); + return; + } + + public f(String p2, String p3, String p4, java.util.ArrayList p5, kotlin.coroutines.Continuation p6) + { + this.c = 24; + this.e = p2; + this.f = p3; + this.g = p4; + this.h = p5; + super(2, p6); + return; + } + + public f(String p2, w7.n p3, w7.f0 p4, kotlin.coroutines.Continuation p5) + { + this.c = 19; + this.e = p2; + this.g = p3; + this.h = p4; + super(2, p5); + return; + } + + public f(o8.c5 p2, String p3, kotlin.coroutines.Continuation p4) + { + this.c = 10; + this.g = p2; + this.h = p3; + super(2, p4); + return; + } + + public f(s.d4 p2, kotlin.coroutines.Continuation p3) + { + this.c = 13; + this.h = p2; + super(2, p3); + return; + } + + public f(s0.v p2, a7.e p3, kotlin.coroutines.Continuation p4) + { + this.c = 14; + this.e = p2; + this.h = ((kotlin.coroutines.jvm.internal.SuspendLambda) p3); + super(2, p4); + return; + } + + private final Object d(Object p10) + { + Object v10_1; + Object v1_4; + android.view.textclassifier.TextClassifier v4_3; + Object v1_1; + String v0_0 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + Object v1_2 = this.d; + try { + if (v1_2 == null) { + q6.y.Y(p10); + v1_1 = ((s0.v) this.e); + v10_1 = v1_1.e; + this.f = v10_1; + this.g = v1_1; + this.d = 1; + if (v10_1.lock(0, this) != v0_0) { + v4_3 = v1_1.f; + if (v4_3 != null) { + if (!s0.r.l(v4_3)) { + v10_1.unlock(0); + Object v10_3 = new s0.t(v4_3, ((kotlin.coroutines.jvm.internal.SuspendLambda) this.h), 0); + this.f = 0; + this.g = 0; + this.d = 3; + Object v10_4 = kotlinx.coroutines.TimeoutKt.withTimeoutOrNull(200, v10_3, this); + if (v10_4 != v0_0) { + return v10_4; + } + } else { + } + } + android.view.textclassifier.TextClassifier v4_5 = new a9.g4(v1_1, 0, 5); + this.f = v10_1; + this.g = 0; + this.d = 2; + Object v1_5 = kotlinx.coroutines.TimeoutKt.withTimeoutOrNull(300, v4_5, this); + if (v1_5 != v0_0) { + v1_4 = v10_1; + p10 = v1_5; + v4_3 = m0.p.k(p10); + v10_1 = v1_4; + } + } + } else { + if (v1_2 == 1) { + v1_1 = ((s0.v) this.g); + android.view.textclassifier.TextClassifier v4_2 = ((kotlinx.coroutines.sync.Mutex) this.f); + q6.y.Y(p10); + v10_1 = v4_2; + } else { + if (v1_2 == 2) { + v1_4 = ((kotlinx.coroutines.sync.Mutex) this.f); + q6.y.Y(p10); + } else { + if (v1_2 != 3) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + q6.y.Y(p10); + return p10; + } + } + } + } + } catch (Object v10_1) { + v1_4.unlock(0); + throw v10_1; + } + return v0_0; + } + + private final Object e(Object p18) + { + s0.z v7_6; + s0.z v7_2; + a7.c v1_2 = ((kotlin.jvm.internal.f0) this.e); + s0.a0 v2_1 = ((kotlin.jvm.internal.f0) this.g); + e1.t1 v3_2 = ((kotlin.jvm.internal.e0) this.h); + s0.b1 v4_1 = ((s0.b1) this.f); + s0.g1 v5 = v4_1.a; + p6.a0 v6_0 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + s0.z v7_0 = this.d; + if (v7_0 == null) { + q6.y.Y(p18); + s0.z v7_1 = v4_1.w; + if (v7_1 == null) { + v7_2 = 0; + } else { + CharSequence v14_1 = ((CharSequence) v2_1.c); + long v12_0 = ((g3.o0) v1_2.c).a; + this.d = 1; + s0.v v16_1 = ((s0.v) v7_1); + if ((v14_1.length() != 0) && (!g3.o0.c(v12_0))) { + s0.z v7_5 = v16_1; + v7_6 = kotlinx.coroutines.BuildersKt.withContext(v7_5.a, new a8.f(v7_5, new s0.u(v12_0, v14_1, 0, v16_1), 0), this); + } else { + v7_6 = 0; + } + if (v7_6 != v6_0) { + v7_2 = ((g3.o0) v7_6); + } else { + return v6_0; + } + } + } else { + if (v7_0 != 1) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + q6.y.Y(p18); + v7_6 = p18; + } + } + if (v7_2 != null) { + int v9_2 = v7_2.a; + if (!g3.o0.a(v9_2, v1_2.c)) { + a7.c v1_9 = ((s0.o) v5.c.e(v3_2.c)); + if ((v1_9 != null) && (v1_9.d() == v2_1.c)) { + a7.c v1_12 = ((g3.l0) v1_9.c.invoke()); + if (v1_12 != null) { + s0.z v11_5 = ((int) (v9_2 >> 32)); + int v9_4 = ((int) (v9_2 & 4294967295)); + long v12_3 = v3_2.c; + s0.a0 v2_5 = new s0.a0(new s0.z(s0.d1.u(v1_12, v11_5), v11_5, v3_2.c), new s0.z(s0.d1.u(v1_12, v9_4), v9_4, v12_3), 0); + a7.c v1_16 = new k.f0(); + v1_16.h(v12_3, v2_5); + v5.k.setValue(v1_16); + v4_1.d.invoke(v2_5); + v4_1.t = 0; + } + } + } + } + return p6.a0.a; + } + + private final Object f(Object p15) + { + java.util.Map v3_0; + q6.u v0_1 = ((e1.j1) this.e); + java.util.Set v1_1 = ((java.util.Set) this.g); + Object v2 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + java.util.Map v3_4 = this.d; + if (v3_4 == null) { + q6.y.Y(p15); + if (!v1_1.isEmpty()) { + v3_0 = 0; + } else { + ((a7.c) v0_1.getValue()).invoke(q6.u.c); + return p6.a0.a; + } + } else { + if (v3_4 != 1) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + v3_0 = ((java.util.Map) this.f); + q6.y.Y(p15); + java.util.Map v15_8 = ((Iterable) v1_1); + boolean v6_1 = ((s8.q0) this.h); + java.util.ArrayList v7_1 = new java.util.ArrayList(); + java.util.Map v15_9 = v15_8.iterator(); + while (v15_9.hasNext()) { + p6.g v9_3; + Object v8_1 = v15_9.next(); + p6.g v9_6 = ((s8.u0) v6_1.a.get(v8_1)); + if (v9_6 != null) { + v9_3 = new p6.g(v8_1, new s8.i0(c7.a.S(((Number) v9_6.b.d()).floatValue()), c7.a.S(((Number) v9_6.c.d()).floatValue()), c7.a.S(((Number) v9_6.d.d()).floatValue()), c7.a.S(((Number) v9_6.e.d()).floatValue()))); + } else { + v9_3 = 0; + } + if (v9_3 != null) { + v7_1.add(v9_3); + } + } + java.util.Map v15_10 = q6.y.a0(v7_1); + if (!v15_10.equals(v3_0)) { + ((a7.c) v0_1.getValue()).invoke(v15_10); + v3_0 = v15_10; + } + } + } + java.util.Map v15_12 = new okio.internal.b(3); + this.f = v3_0; + this.d = 1; + if (e1.c1.a(this.getContext()).e(v15_12, this) != v2) { + } else { + return v2; + } + } + + private final Object g(Object p9) + { + u1.t v1_1; + Object v2_1; + String v0_1 = ((java.util.concurrent.atomic.AtomicReference) this.e); + u1.t v1_0 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + Object v2_3 = this.d; + if (v2_3 == null) { + q6.y.Y(p9); + Throwable v9_2 = ((kotlinx.coroutines.CoroutineScope) this.f); + v2_1 = new u1.t(kotlinx.coroutines.JobKt.getJob(v9_2.getCoroutineContext()), ((kotlin.jvm.internal.t) this.g).invoke(v9_2)); + Throwable v9_5 = ((u1.t) v0_1.getAndSet(v2_1)); + if (v9_5 == null) { + try { + Throwable v9_9 = ((a7.e) this.h); + Object v5_0 = v2_1.b; + this.f = v2_1; + this.d = 2; + p9 = v9_9.invoke(v5_0, this); + } catch (Throwable v9_10) { + v1_1 = v2_1; + } + if (p9 != v1_0) { + v1_1 = v2_1; + } else { + return v1_0; + } + } else { + Throwable v9_6 = v9_5.a; + if (v9_6 == null) { + } else { + this.f = v2_1; + this.d = 1; + if (kotlinx.coroutines.JobKt.cancelAndJoin(v9_6, this) != v1_0) { + } + } + } + } else { + if (v2_3 == 1) { + v2_1 = ((u1.t) this.f); + q6.y.Y(p9); + } else { + if (v2_3 != 2) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + v1_1 = ((u1.t) this.f); + try { + q6.y.Y(p9); + } catch (Throwable v9_10) { + } + } + } + } + while (!v0_1.compareAndSet(v1_1, 0)) { + if (v0_1.get() != v1_1) { + break; + } + } + return p9; + } + + private final Object h(Object p11) + { + w2.z2 v1_1 = ((w2.z2) this.h); + androidx.lifecycle.u v2_1 = ((androidx.lifecycle.u) this.e); + e1.j2 v4_1 = ((e1.j2) this.g); + androidx.lifecycle.w v0_1 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + Object v3_0 = this.d; + p6.a0 v9 = p6.a0.a; + try { + if (v3_0 == null) { + q6.y.Y(p11); + p6.a0 v11_4 = ((w2.c2) ((kotlin.jvm.internal.f0) this.f).c); + if (v11_4 != null) { + v11_4.d = kotlinx.coroutines.CoroutineScopeKt.CoroutineScope(v4_1.x); + } + this.d = 1; + p6.a0 v11_7 = kotlinx.coroutines.BuildersKt.withContext(v4_1.a, new a9.b2(v4_1, new e1.i2(v4_1, 0), e1.c1.a(this.getContext()), 0, 1), this); + if (v11_7 != kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()) { + v11_7 = v9; + } else { + } + if (v11_7 != kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()) { + v11_7 = v9; + } + if (v11_7 == v0_1) { + return v0_1; + } + } else { + if (v3_0 != 1) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + q6.y.Y(p11); + } + } + } catch (androidx.lifecycle.w v0_4) { + p6.a0 v11_10 = v0_4; + v2_1.g().f(v1_1); + throw v11_10; + } + v2_1.g().f(v1_1); + return v9; + } + + private final Object i(Object p14) + { + Integer v3_0; + String v1_1 = ((String) this.e); + Boolean v0_3 = ((w7.n) this.g); + kotlinx.coroutines.flow.MutableStateFlow v2 = v0_3.d; + Integer v3_4 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + Object v4_7 = this.d; + try { + if (v4_7 == null) { + q6.y.Y(p14); + kotlinx.coroutines.flow.MutableStateFlow v14_1 = j8.c.d; + a.b.m(v14_1, v1_1); + kotlinx.coroutines.flow.MutableStateFlow v14_2 = a.b.A(v14_1, v1_1, 0); + String v6 = q6.y.T(((w7.f0) this.h).c); + s0.u0 v9_1 = new s0.u0(17); + m0.r v10_1 = new m0.r(27, v0_3); + i8.c v11_1 = new i8.c(v14_2, 1); + this.f = v14_2; + this.d = 1; + if (k8.h.b(v6, 0, v9_1, v10_1, v11_1, this) != v3_4) { + v3_0 = v14_2; + v3_0.a.flush(); + v3_0.a(); + v0_3.l = v1_1; + v0_3.j.setValue(kotlin.coroutines.jvm.internal.Boxing.boxInt(100)); + v2.setValue(w7.o.j); + v0_3.h.setValue(kotlin.coroutines.jvm.internal.Boxing.boxBoolean(1)); + } else { + return v3_4; + } + } else { + if (v4_7 != 1) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + v3_0 = ((j8.a) this.f); + q6.y.Y(p14); + } + } + } catch (Exception) { + a.b.m(j8.c.d, v1_1); + v2.setValue(w7.o.e); + } catch (Boolean v0_2) { + kotlinx.coroutines.flow.MutableStateFlow v14_6 = v0_2; + v3_0.a(); + throw v14_6; + } + return p6.a0.a; + } + + private final Object j(Object p11) + { + kotlinx.coroutines.channels.ChannelIterator v2_0; + kotlinx.coroutines.CoroutineScope v4_0; + String v0_1 = ((kotlinx.coroutines.channels.Channel) this.e); + Object v1 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + kotlinx.coroutines.channels.ChannelIterator v2_2 = this.d; + if (v2_2 == null) { + q6.y.Y(p11); + f0.f v11_9 = ((kotlinx.coroutines.CoroutineScope) this.g); + v2_0 = v0_1.iterator(); + v4_0 = v11_9; + } else { + if (v2_2 != 1) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + v2_0 = ((kotlinx.coroutines.channels.ChannelIterator) this.f); + v4_0 = ((kotlinx.coroutines.CoroutineScope) this.g); + q6.y.Y(p11); + if (!((Boolean) p11).booleanValue()) { + return p6.a0.a; + } else { + f0.f v11_7 = ((f0.f) v2_0.next()); + int v5_2 = ((f0.f) kotlinx.coroutines.channels.ChannelResult.getOrNull-impl(v0_1.tryReceive-PtdJZtk())); + if (v5_2 != 0) { + v11_7 = v5_2; + } + kotlinx.coroutines.BuildersKt.launch$default(v4_0, 0, 0, new z0.i(((z0.k) this.h), v11_7, 0, 0), 3, 0); + } + } + } + this.g = v4_0; + this.f = v2_0; + this.d = 1; + p11 = v2_0.hasNext(this); + if (p11 != v1) { + } else { + return v1; + } + } + + private final Object k(Object p11) + { + kotlinx.coroutines.CoroutineScope v4_0; + kotlinx.coroutines.channels.ChannelIterator v2_0; + String v0_1 = ((kotlinx.coroutines.channels.Channel) this.e); + Object v1 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + kotlinx.coroutines.channels.ChannelIterator v2_2 = this.d; + if (v2_2 == null) { + q6.y.Y(p11); + f0.f v11_9 = ((kotlinx.coroutines.CoroutineScope) this.g); + v2_0 = v0_1.iterator(); + v4_0 = v11_9; + } else { + if (v2_2 != 1) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + v2_0 = ((kotlinx.coroutines.channels.ChannelIterator) this.f); + v4_0 = ((kotlinx.coroutines.CoroutineScope) this.g); + q6.y.Y(p11); + if (!((Boolean) p11).booleanValue()) { + return p6.a0.a; + } else { + f0.f v11_7 = ((f0.f) v2_0.next()); + int v5_2 = ((f0.f) kotlinx.coroutines.channels.ChannelResult.getOrNull-impl(v0_1.tryReceive-PtdJZtk())); + if (v5_2 != 0) { + v11_7 = v5_2; + } + kotlinx.coroutines.BuildersKt.launch$default(v4_0, 0, 0, new z0.e(((z0.f) this.h), v11_7, 0, 4), 3, 0); + } + } + } + this.g = v4_0; + this.f = v2_0; + this.d = 1; + p11 = v2_0.hasNext(this); + if (p11 != v1) { + } else { + return v1; + } + } + + private final Object l(Object p12) + { + String v0_0 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + String v1_1 = this.d; + if (v1_1 == null) { + q6.y.Y(p12); + IllegalStateException v12_8 = w7.w.e(new p6.g[] {new p6.g("token", ((String) this.e)), new p6.g("provider_id", ((String) this.f)), new p6.g("firmware_id", ((String) this.g)), new p6.g("mac", q6.o.s0(((java.util.ArrayList) this.h), ",", 0, 0, 0, 62))})); + this.d = 1; + IllegalStateException v12_9 = k8.h.c("https://qbsg.top/api/activation/activate", v12_8, this); + if (v12_9 != v0_0) { + return v12_9; + } else { + return v0_0; + } + } else { + if (v1_1 != 1) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + q6.y.Y(p12); + return p12; + } + } + } + + private final Object m(Object p10) + { + n8.f0 v0_0 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + y0.jb v1_2 = this.d; + p6.a0 v2 = p6.a0.a; + if (v1_2 == null) { + q6.y.Y(p10); + kotlinx.coroutines.flow.MutableStateFlow v10_3 = ((n8.f0) ((e1.j1) this.h).getValue()).e; + if (v10_3 != null) { + y0.jb v1_1 = ((y0.jb) this.g); + this.f = kotlin.coroutines.jvm.internal.SpillingKt.nullOutSpilledVariable(v10_3); + this.d = 1; + if (y0.jb.b(v1_1, v10_3, this) == v0_0) { + return v0_0; + } + } else { + return v2; + } + } else { + if (v1_2 != 1) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + q6.y.Y(p10); + } + } + kotlinx.coroutines.flow.MutableStateFlow v10_9 = ((n8.i0) this.e).c; + v10_9.setValue(n8.f0.a(((n8.f0) v10_9.getValue()), 0, 0, 0, 0, 15)); + return v2; + } + + public final kotlin.coroutines.Continuation create(Object p11, kotlin.coroutines.Continuation p12) + { + switch (this.c) { + case 0: + return new a8.f(((a8.g) this.f), ((byte[]) this.g), ((String) this.e), ((qbsg.top.ble.GattOtaChannel) this.h), p12, 0); + case 1: + return new a8.f(((i7.g) this.f), ((String) this.e), ((b9.g) this.g), ((w7.d) this.h), p12, 1, 0); + case 2: + return new a8.f(((c3.d) this.f), ((android.view.ScrollCaptureSession) this.g), ((android.graphics.Rect) this.e), ((java.util.function.Consumer) this.h), p12, 2); + case 3: + return new a8.f(this.f, ((n.c) this.g), ((e1.j1) this.e), ((e1.j1) this.h), p12, 3); + case 4: + a8.f v12_23 = new a8.f(((e1.j1) this.e), ((n.h0) this.h), p12, 4); + v12_23.g = p11; + return v12_23; + case 5: + return new a8.f(((n8.l) this.e), ((n8.e0) this.h), p12, 5); + case 6: + a8.f v12_19 = new a8.f(((n8.e0) this.e), ((n8.l) this.h), p12, 6); + v12_19.g = p11; + return v12_19; + case 7: + a8.f v12_17 = new a8.f(((String) this.e), ((n8.l) this.h), p12, 7); + v12_17.g = p11; + return v12_17; + case 8: + return new a8.f(((p8.q) this.g), ((o8.q2) this.e), ((o8.c5) this.h), p12, 8); + case 9: + a8.f v12_15 = new a8.f(((o8.c5) this.e), ((o8.q2) this.h), p12, 9); + v12_15.g = p11; + return v12_15; + case 10: + return new a8.f(((o8.c5) this.g), ((String) this.h), p12); + case 11: + return new a8.f(((o8.c5) this.e), ((o8.e2) this.h), p12, 11); + case 12: + a8.f v2_10 = new a8.f(((a7.c) this.g), ((q0.b) this.e), ((q0.m) this.h), p12, 12); + v2_10.f = p11; + return v2_10; + case 13: + a8.f v12_6 = new a8.f(((s.d4) this.h), p12); + v12_6.e = p11; + return v12_6; + case 14: + return new a8.f(((s0.v) this.e), ((kotlin.coroutines.jvm.internal.SuspendLambda) this.h), p12); + case 15: + return new a8.f(((s0.b1) this.f), ((kotlin.jvm.internal.f0) this.g), ((kotlin.jvm.internal.f0) this.e), ((kotlin.jvm.internal.e0) this.h), p12, 15); + case 16: + return new a8.f(((java.util.Set) this.g), ((e1.j1) this.e), ((s8.q0) this.h), p12, 16); + case 17: + a8.f v12_2 = new a8.f(((kotlin.jvm.internal.t) this.g), ((java.util.concurrent.atomic.AtomicReference) this.e), ((a7.e) this.h), p12); + v12_2.f = p11; + return v12_2; + case 18: + return new a8.f(((kotlin.jvm.internal.f0) this.f), ((e1.j2) this.g), ((androidx.lifecycle.u) this.e), ((w2.z2) this.h), p12, 18); + case 19: + return new a8.f(((String) this.e), ((w7.n) this.g), ((w7.f0) this.h), p12); + case 20: + return new a8.f(((y.t) this.f), ((a7.c) this.g), ((z0.x) this.e), ((f7.d) this.h), p12, 20); + case 21: + a8.f v12_27 = new a8.f(((kotlinx.coroutines.channels.Channel) this.e), ((z0.k) this.h), p12, 21); + v12_27.g = p11; + return v12_27; + case 22: + a8.f v12_25 = new a8.f(((kotlinx.coroutines.channels.Channel) this.e), ((z0.f) this.h), p12, 22); + v12_25.g = p11; + return v12_25; + case 23: + return new a8.f(((qbsg.top.ble.RawGattHandle) this.f), ((z7.b0) this.e), ((byte[]) this.g), ((z7.f0) this.h), p12, 23, 0); + case 24: + return new a8.f(((String) this.e), ((String) this.f), ((String) this.g), ((java.util.ArrayList) this.h), p12); + case 25: + return new a8.f(((y0.jb) this.g), ((n8.i0) this.e), ((e1.j1) this.h), p12, 25); + default: + return new a8.f(((y0.jb) this.g), ((n8.e0) this.e), ((e1.j1) this.h), p12, 26); + } + } + + public final Object invoke(Object p2, Object p3) + { + switch (this.c) { + case 0: + return ((a8.f) this.create(((kotlinx.coroutines.CoroutineScope) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + case 1: + return ((a8.f) this.create(((kotlinx.coroutines.CoroutineScope) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + case 2: + return ((a8.f) this.create(((kotlinx.coroutines.CoroutineScope) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + case 3: + return ((a8.f) this.create(((kotlinx.coroutines.CoroutineScope) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + case 4: + return ((a8.f) this.create(((kotlinx.coroutines.CoroutineScope) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + case 5: + return ((a8.f) this.create(((kotlinx.coroutines.CoroutineScope) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + case 6: + return ((a8.f) this.create(((kotlinx.coroutines.CoroutineScope) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + case 7: + return ((a8.f) this.create(((kotlinx.coroutines.CoroutineScope) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + case 8: + return ((a8.f) this.create(((kotlinx.coroutines.CoroutineScope) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + case 9: + return ((a8.f) this.create(((kotlinx.coroutines.CoroutineScope) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + case 10: + return ((a8.f) this.create(((kotlinx.coroutines.CoroutineScope) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + case 11: + return ((a8.f) this.create(((kotlinx.coroutines.CoroutineScope) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + case 12: + return ((a8.f) this.create(((w2.o0) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + case 13: + return ((a8.f) this.create(((kotlinx.coroutines.CoroutineScope) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + case 14: + return ((a8.f) this.create(((kotlinx.coroutines.CoroutineScope) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + case 15: + return ((a8.f) this.create(((kotlinx.coroutines.CoroutineScope) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + case 16: + return ((a8.f) this.create(((kotlinx.coroutines.CoroutineScope) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + case 17: + return ((a8.f) this.create(((kotlinx.coroutines.CoroutineScope) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + case 18: + return ((a8.f) this.create(((kotlinx.coroutines.CoroutineScope) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + case 19: + return ((a8.f) this.create(((kotlinx.coroutines.CoroutineScope) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + case 20: + return ((a8.f) this.create(((kotlinx.coroutines.CoroutineScope) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + case 21: + return ((a8.f) this.create(((kotlinx.coroutines.CoroutineScope) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + case 22: + return ((a8.f) this.create(((kotlinx.coroutines.CoroutineScope) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + case 23: + return ((a8.f) this.create(((kotlinx.coroutines.CoroutineScope) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + case 24: + return ((a8.f) this.create(((kotlinx.coroutines.CoroutineScope) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + case 25: + return ((a8.f) this.create(((kotlinx.coroutines.CoroutineScope) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + default: + return ((a8.f) this.create(((kotlinx.coroutines.CoroutineScope) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + } + } + + public final Object invokeSuspend(Object p31) + { + int v7_5 = 0; + String v8_2 = 0; + switch (this.c) { + case 0: + o8.e v0_36 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + long v1_18 = this.d; + if (v1_18 == 0) { + q6.y.Y(p31); + long v1_20 = ((a8.g) this.f); + int v2_34 = ((byte[]) this.g); + j7.m v3_24 = ((String) this.e); + int v5_12 = ((qbsg.top.ble.GattOtaChannel) this.h); + this.d = 1; + if (v1_20.f(v2_34, v3_24, v5_12, this) != v0_36) { + v0_36 = p6.a0.a; + } + } else { + if (v1_18 != 1) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + q6.y.Y(p31); + } + } + return v0_36; + case 1: + int v2_27; + long v1_16 = ((b9.g) this.g); + o8.e v0_31 = v1_16.e; + int v2_25 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + j7.m v3_14 = this.d; + try { + if (v3_14 == null) { + q6.y.Y(p31); + j7.m v3_16 = ((i7.g) this.f); + int v5_4 = ((String) this.e); + this.d = 1; + j7.m v3_17 = v3_16.c(v5_4, this); + if (v3_17 != v2_25) { + v2_27 = v3_17; + if (!(v2_27 instanceof p6.i)) { + j7.m v3_20 = ((x7.i) v2_27); + v1_16.k(""); + v1_16.l(new b9.b(v3_20)); + } + j7.m v3_22 = ((w7.d) this.h); + int v2_30 = p6.j.a(v2_27); + if (v2_30 != 0) { + v1_16.l(b9.c.a); + v0_31.i((v0_31.h() + 1)); + o8.e v0_34 = v2_30.getMessage(); + if (v0_34 == null) { + v0_34 = "\u767b\u5f55\u5931\u8d25"; + } + v3_22.invoke(v0_34); + } + v1_16.j(0); + v2_25 = p6.a0.a; + } else { + } + } else { + if (v3_14 != 1) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + q6.y.Y(p31); + v2_27 = ((p6.j) p31).c; + } + } + } catch (o8.e v0_35) { + v1_16.j(0); + throw v0_35; + } + return v2_25; + case 2: + long v1_11; + o8.e v0_24 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + long v1_6 = this.d; + if (v1_6 == 0) { + q6.y.Y(p31); + long v1_8 = ((c3.d) this.f); + int v2_24 = ((android.view.ScrollCaptureSession) this.g); + j7.m v3_12 = ((android.graphics.Rect) this.e); + int v5_2 = new s3.k(v3_12.left, v3_12.top, v3_12.right, v3_12.bottom); + this.d = 1; + v1_11 = c3.d.a(v1_8, v2_24, v5_2, this); + if (v1_11 != v0_24) { + ((java.util.function.Consumer) this.h).accept(b2.h0.J(((s3.k) v1_11))); + v0_24 = p6.a0.a; + } + } else { + if (v1_6 != 1) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + q6.y.Y(p31); + v1_11 = p31; + } + } + return v0_24; + case 3: + int v6_2 = ((n.c) this.g); + int v7_0 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + o8.e v0_9 = this.d; + if (v0_9 == null) { + q6.y.Y(p31); + if (kotlin.jvm.internal.s.b(this.f, v6_2.e.getValue())) { + v7_0 = p6.a0.a; + } else { + o8.e v0_13 = ((n.c) this.g); + long v1_3 = this.f; + int v2_22 = ((n.k) ((e1.j1) this.e).getValue()); + this.d = 1; + if (n.c.b(v0_13, v1_3, v2_22, 0, this, 12) != v7_0) { + o8.e v0_22 = ((a7.c) ((e1.j1) this.h).getValue()); + if (v0_22 == null) { + } else { + v0_22.invoke(v6_2.d()); + } + } + } + } else { + if (v0_9 != 1) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + q6.y.Y(p31); + } + } + return v7_0; + case 4: + int v13_0; + int v14_0; + o8.e v0_132 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + int v2_113 = this.d; + if (v2_113 == 0) { + q6.y.Y(p31); + int v2_1 = ((kotlinx.coroutines.CoroutineScope) this.g); + j7.m v3_1 = new kotlin.jvm.internal.c0(); + v3_1.c = 1065353216; + v14_0 = v2_1; + v13_0 = v3_1; + String v10_1 = new c9.k0(((e1.j1) this.e), ((n.h0) this.h), v13_0, v14_0, 4); + this.g = v14_0; + this.f = v13_0; + this.d = 1; + if (this.getContext().get(w2.u1.c) != null) { + throw new ClassCastException(); + } else { + if (e1.c1.a(this.getContext()).e(v10_1, this) != v0_132) { + if (v13_0.c == 0) { + int v2_17 = e1.t.w(new a0.m0(23, v14_0)); + j7.m v3_9 = new n.g0(2, 0); + this.g = v14_0; + this.f = v13_0; + this.d = 2; + if (kotlinx.coroutines.flow.FlowKt.first(v2_17, v3_9, this) == v0_132) { + } + } + } + } + } else { + if (v2_113 == 1) { + int v2_3 = ((kotlin.jvm.internal.c0) this.f); + j7.m v3_3 = ((kotlinx.coroutines.CoroutineScope) this.g); + q6.y.Y(p31); + v13_0 = v2_3; + v14_0 = v3_3; + } else { + if (v2_113 != 2) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + int v2_5 = ((kotlin.jvm.internal.c0) this.f); + j7.m v3_5 = ((kotlinx.coroutines.CoroutineScope) this.g); + q6.y.Y(p31); + v13_0 = v2_5; + v14_0 = v3_5; + } + } + } + return v0_132; + case 5: + long v1_100; + o8.e v0_125; + o8.e v0_121 = ((n8.l) this.e); + String v8_7 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + int v2_108 = this.d; + if (v2_108 == 0) { + q6.y.Y(p31); + String v10_33 = new java.util.ArrayList(); + int v11_26 = new kotlin.jvm.internal.d0(); + int v2_110 = q6.y.T(v0_121.h); + j7.m v3_84 = ((n8.e0) this.h); + int v5_64 = new n.n1(3, v3_84, v0_121); + int v6_29 = new a0.q0(22, v3_84, v0_121); + j7.m v3_85 = v5_64; + int v5_66 = new a0.q0(23, v10_33, v11_26); + this.f = v10_33; + this.g = v11_26; + this.d = 1; + if (k8.h.b(v2_110, 0, v3_85, v6_29, v5_66, this) != v8_7) { + v1_100 = v10_33; + v0_125 = v11_26; + v4.a v9_7 = new byte[v0_125.c]; + o8.e v0_131 = v1_100.size(); + String v10_34 = 0; + while (v7_5 < v0_131) { + int v2_111 = v1_100.get(v7_5); + v7_5++; + String v8_9 = ((byte[]) v2_111); + q6.n.g0(v8_9, v9_7, v10_34, 0, 0, 12); + v10_34 += v8_9.length; + } + v8_7 = v9_7; + } + } else { + if (v2_108 != 1) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + v0_125 = ((kotlin.jvm.internal.d0) this.g); + v1_100 = ((java.util.ArrayList) this.f); + q6.y.Y(p31); + } + } + return v8_7; + case 6: + o8.e v0_105; + o8.e v0_103 = ((kotlinx.coroutines.CoroutineScope) this.g); + long v1_87 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + int v2_91 = this.d; + try { + if (v2_91 == 0) { + q6.y.Y(p31); + int v2_94 = ((n8.e0) this.e).d; + int v5_42 = ((n8.l) this.h); + v2_94.setValue(n8.w.a(((n8.w) v2_94.getValue()), 0, 0, 0, 0, 0, 0, 0, 0, 0, new n8.k(v5_42.a, v5_42.b, 0), 0, 0, 0, 0, 0, 0, 65023)); + int v6_23 = new a8.f(((n8.l) this.h), ((n8.e0) this.e), 0, 5); + this.g = kotlin.coroutines.jvm.internal.SpillingKt.nullOutSpilledVariable(v0_103); + this.f = kotlin.coroutines.jvm.internal.SpillingKt.nullOutSpilledVariable(v0_103); + this.d = 1; + v0_105 = kotlinx.coroutines.BuildersKt.withContext(w7.b.a, v6_23, this); + if (v0_105 != v1_87) { + o8.e v0_110 = ((byte[]) v0_105); + long v1_90 = ((n8.e0) this.e); + int v2_101 = ((n8.l) this.h); + if (!(v0_110 instanceof p6.i)) { + j7.m v3_70 = ((byte[]) v0_110); + v4.a v9_1 = v1_90.b; + int v13_11 = v2_101.a; + String v26_1; + kotlin.jvm.internal.s.f(v3_70, "zipBytes"); + int v11_17 = java.util.UUID.randomUUID().toString(); + kotlin.jvm.internal.s.e(v11_17, "toString(...)"); + if (((java.util.LinkedHashSet) v9_1.b).add(v11_17)) { + String v10_21 = java.util.UUID.randomUUID().toString(); + kotlin.jvm.internal.s.e(v10_21, "toString(...)"); + int v5_53 = g3.q.x(v10_21); + g3.q.x(v10_21).mkdirs(); + try { + String v10_26; + g3.q.z(v3_70, v10_21); + } catch (Exception) { + a8.f v12_17 = v11_17; + y6.k.t(v5_53); + ((java.util.LinkedHashSet) v9_1.b).remove(v12_17); + v9_1.u(); + v10_26 = 0; + v26_1 = v10_26; + } + if (g3.q.m(v5_53)) { + a8.f v12_16 = v11_17; + int v11_18 = v10_21; + j7.m v3_72 = new m8.f(v11_18, v12_16, v13_11, 0, 16); + v11_17 = v12_16; + v12_17 = 1; + g3.q.A(v9_1, v11_18, v11_17, 1, v13_11, 0, 16); + v12_17 = v11_17; + v9_1.u(); + v10_26 = v3_72; + } else { + y6.k.t(v5_53); + ((java.util.LinkedHashSet) v9_1.b).remove(v11_17); + v9_1.u(); + } + } else { + v26_1 = 0; + } + if (v26_1 == null) { + long v1_91 = v1_90.d; + v1_91.setValue(n8.w.a(((n8.w) v1_91.getValue()), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "\u6253\u5f00\u5931\u8d25", 32767)); + } else { + j7.m v3_78 = v1_90.d; + v3_78.setValue(n8.w.a(((n8.w) v3_78.getValue()), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, v26_1, 0, 49151)); + j7.m v3_82 = ((a0.m2) v1_90.c.d).z(); + if (i7.i.x0(v3_82)) { + v3_82 = 0; + } + if (v3_82 != null) { + kotlinx.coroutines.BuildersKt.launch$default(androidx.lifecycle.l0.g(v1_90), 0, 0, new a8.f(v3_82, v2_101, 0, 7), 3, 0); + } + } + } + long v1_94 = ((n8.e0) this.e); + o8.e v0_112 = p6.j.a(v0_110); + if (v0_112 != null) { + long v1_95 = v1_94.d; + int v5_60 = ((n8.w) v1_95.getValue()); + o8.e v0_113 = v0_112.getMessage(); + if (v0_113 == null) { + v0_113 = "\u4e0b\u8f7d\u5931\u8d25"; + } + v1_95.setValue(n8.w.a(v5_60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, v0_113, 32767)); + } + o8.e v0_119 = ((n8.e0) this.e).d; + v0_119.setValue(n8.w.a(((n8.w) v0_119.getValue()), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65023)); + v1_87 = p6.a0.a; + } else { + } + } else { + if (v2_91 != 1) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + q6.y.Y(p31); + v0_105 = p31; + } + } + } catch (o8.e v0_109) { + v0_110 = q6.y.s(v0_109); + } + return v1_87; + case 7: + o8.e v0_95 = ((kotlinx.coroutines.CoroutineScope) this.g); + long v1_85 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + int v2_86 = this.d; + try { + if (v2_86 == 0) { + q6.y.Y(p31); + int v6_20 = new b1.l(((String) this.e), ((n8.l) this.h), 0, 13); + this.g = kotlin.coroutines.jvm.internal.SpillingKt.nullOutSpilledVariable(v0_95); + this.f = kotlin.coroutines.jvm.internal.SpillingKt.nullOutSpilledVariable(v0_95); + this.d = 1; + if (kotlinx.coroutines.BuildersKt.withContext(w7.b.a, v6_20, this) != v1_85) { + v1_85 = p6.a0.a; + } + } else { + if (v2_86 != 1) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + q6.y.Y(p31); + } + } + } catch (o8.e v0_101) { + q6.y.s(v0_101); + } + return v1_85; + case 8: + long v1_81; + o8.e v0_91 = p6.a0.a; + long v1_80 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + int v2_80 = this.d; + if (v2_80 == 0) { + q6.y.Y(p31); + int v2_82 = ((p8.q) this.g); + if ((v2_82 != 0) && ((v2_82.i == p8.o.f) && ((v2_82.h > 0) && (((o8.q2) this.e) != null)))) { + this.f = v2_82; + this.d = 1; + if (kotlinx.coroutines.DelayKt.delay(500, this) != v1_80) { + v1_81 = v2_82; + ((o8.c5) this.h).Y(v1_81.e); + } else { + v0_91 = v1_80; + } + } + } else { + if (v2_80 != 1) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + v1_81 = ((p8.q) this.f); + q6.y.Y(p31); + } + } + return v0_91; + case 9: + o8.e v0_81; + o8.e v0_86; + String v10_18 = ((o8.c5) this.e); + long v1_77 = p6.a0.a; + int v2_77 = ((o8.q2) this.h); + o8.e v0_78 = ((kotlinx.coroutines.CoroutineScope) this.g); + j7.m v3_53 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + int v5_35 = this.d; + try { + if (v5_35 == 0) { + q6.y.Y(p31); + int v6_18 = new a9.b2(v10_18, v2_77, 0, 8); + this.g = kotlin.coroutines.jvm.internal.SpillingKt.nullOutSpilledVariable(v0_78); + this.f = kotlin.coroutines.jvm.internal.SpillingKt.nullOutSpilledVariable(v0_78); + this.d = 1; + v0_81 = kotlinx.coroutines.BuildersKt.withContext(w7.b.a, v6_18, this); + if (v0_81 != v3_53) { + v0_86 = kotlin.coroutines.jvm.internal.Boxing.boxBoolean(((Boolean) v0_81).booleanValue()); + j7.m v3_54 = kotlin.coroutines.jvm.internal.Boxing.boxBoolean(0); + if ((v0_86 instanceof p6.i)) { + v0_86 = v3_54; + } + if (((Boolean) v0_86).booleanValue()) { + o8.c5.M(v10_18, new o8.s3(1, v2_77, v10_18), 0, 0, 0, 0, 126); + } else { + o8.c5.M(v10_18, 0, 0, 0, 0, 0, 123); + } + } else { + v1_77 = v3_53; + } + } else { + if (v5_35 != 1) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + q6.y.Y(p31); + v0_81 = p31; + } + } + } catch (o8.e v0_85) { + v0_86 = q6.y.s(v0_85); + } + return v1_77; + case 10: + int v13_5; + int v6_14; + int v11_7; + o8.e v0_57 = ""; + long v1_74 = ((o8.c5) this.g); + int v5_24 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + int v6_12 = this.d; + if (v6_12 == 0) { + q6.y.Y(p31); + int v6_13 = qbsg.top.template.editor.LibEditor.a; + String v10_8 = v6_13.create(((String) this.h), v1_74.V(), v1_74.I()); + v1_74.e = v10_8; + if (v10_8 != 0) { + v6_14 = v6_13.toJson(v10_8); + v1_74.b0(v6_14); + } else { + v6_14 = ""; + } + if (i7.i.x0(v6_14)) { + v6_14 = v1_74.L(); + if (v6_14 == 0) { + v6_14 = ""; + } + } + String v10_10 = o8.c5.n(v1_74, v6_14); + int v11_6 = v10_10.e; + this.e = v6_14; + this.f = v10_10; + this.d = 1; + v11_7 = o8.c5.o(v1_74, v11_6); + if (v11_7 != v5_24) { + v13_5 = v10_10; + int v5_28 = ((java.util.List) v11_7).iterator(); + while (v5_28.hasNext()) { + String v10_15 = v5_28.next(); + int v11_9 = v1_74.e; + if (v11_9 != 0) { + qbsg.top.template.editor.LibEditor.a.markFontDirty(v11_9, ((String) v10_15)); + } + } + o8.e v0_63; + int v2_64 = j8.c.d; + if (!a.b.u(v2_64, v1_74.y("history.json"))) { + o8.e v0_62 = v1_74.Z(v6_14); + v0_63 = new o8.e(k3.t.K(v0_62), 0, v0_62); + } else { + try { + o8.e v0_65; + j7.m v3_48; + int v2_67 = a.b.B(v2_64, v1_74.y("history.json")); + } catch (o8.e v0_64) { + v0_65 = q6.y.s(v0_64); + int v2_72 = new o8.e(); + if ((v0_65 instanceof p6.i)) { + v0_65 = v2_72; + } + v0_63 = ((o8.e) v0_65); + } + if (v2_67 == 0) { + v3_48 = 0; + } else { + v3_48 = new String(v2_67, i7.a.a); + } + if (v3_48 == null) { + v3_48 = ""; + } + int v2_68 = w7.w.k(v3_48); + j7.m v3_50 = o8.d5.h(v3_48); + int v5_33 = v2_68.i(k3.t.y(v3_50), "currentIndex"); + String v10_13 = k3.t.y(v3_50); + if (v10_13 < null) { + v10_13 = 0; + } + int v5_34 = a.a.o(v5_33, 0, v10_13); + int v2_69 = v2_68.m("lastSavedFile"); + if (v2_69 != 0) { + v0_57 = v2_69; + } else { + } + if (!i7.i.x0(v0_57)) { + v8_2 = v0_57; + } + v0_65 = new o8.e(v3_50, v5_34, v8_2); + } + v1_74.f = v0_63; + if (v0_63.a.isEmpty()) { + o8.e v0_70 = v1_74.Z(v6_14); + v1_74.f = new o8.e(k3.t.K(v0_70), 0, v0_70); + } + int v15_4; + v1_74.a0(); + int v14_5 = o8.d5.f(); + o8.e v0_71 = v1_74.f; + int v2_75 = v0_71.b; + if (v2_75 <= 0) { + v15_4 = 0; + } else { + v15_4 = 1; + } + int v16_3; + if (v2_75 >= k3.t.y(v0_71.a)) { + v16_3 = 0; + } else { + v16_3 = 1; + } + v5_24 = new o8.b1(v13_5, v14_5, v15_4, v16_3, v1_74.t()); + } + } else { + if (v6_12 != 1) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + int v5_26 = ((o8.a2) this.f); + v6_14 = ((String) this.e); + q6.y.Y(p31); + v11_7 = p31; + v13_5 = v5_26; + } + } + return v5_24; + case 11: + long v1_42; + int v5_17; + o8.e v0_53 = ((o8.c5) this.e); + long v1_40 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + int v5_16 = this.d; + if (v5_16 == 0) { + q6.y.Y(p31); + v5_17 = v0_53.i; + this.f = v5_17; + this.g = v0_53; + this.d = 1; + if (v5_17.lock(0, this) != v1_40) { + v1_42 = v0_53; + try { + if (!v1_42.h) { + String v10_5 = v1_42.e; + if (v10_5 != 0) { + int v13_4 = qbsg.top.template.editor.LibEditor.a.toJson(v10_5); + v1_42.b0(v13_4); + v5_17.unlock(0); + if (!i7.i.x0(v13_4)) { + if (((o8.e2) this.h).c) { + long v1_49 = v0_53.f; + long v1_52 = ((String) q6.o.p0(v1_49.b, v1_49.a)); + if ((v1_52 == 0) || (!kotlin.jvm.internal.s.b(v0_53.K(v1_52), v13_4))) { + long v1_55 = v0_53.n; + if ((v1_55 == 0) || (j7.b.c(j7.m.a(v1_55.c), j7.h.m(1, j7.d.f)) >= 0)) { + long v1_59 = v0_53.f; + long v1_63 = q6.o.H0(q6.o.D0(v1_59.a, (v1_59.b + 1))); + int v2_55 = v0_53.f; + int v2_59 = q6.o.k0(v2_55.a, (v2_55.b + 1)).iterator(); + while (v2_59.hasNext()) { + v0_53.u(((String) v2_59.next())); + } + v1_63.add(v0_53.Z(v13_4)); + int v2_61 = k3.t.y(v1_63); + while (v1_63.size() > 64) { + v0_53.u(((String) v1_63.remove(0))); + v2_61--; + } + if (v2_61 < 0) { + v2_61 = 0; + } + v0_53.f = o8.e.a(v0_53.f, v1_63, v2_61, 0, 4); + v0_53.n = new j7.m(j7.l.a()); + v0_53.a0(); + } + } + } + int v15_3; + int v14_4 = o8.c5.n(v0_53, v13_4); + long v1_69 = v0_53.f; + int v2_63 = v1_69.b; + if (v2_63 <= 0) { + v15_3 = 0; + } else { + v15_3 = 1; + } + int v16_2; + if (v2_63 >= k3.t.y(v1_69.a)) { + v16_2 = 0; + } else { + v16_2 = 1; + } + v8_2 = new o8.d2(v13_4, v14_4, v15_3, v16_2, v0_53.t()); + return v8_2; + } + } else { + } + } + } catch (o8.e v0_56) { + v5_17.unlock(0); + throw v0_56; + } + v5_17.unlock(0); + } else { + v8_2 = v1_40; + } + } else { + if (v5_16 != 1) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + v1_42 = ((o8.c5) this.g); + v5_17 = ((kotlinx.coroutines.sync.Mutex) this.f); + q6.y.Y(p31); + } + } + return v8_2; + case 12: + o8.e v0_47 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + long v1_30 = this.d; + if (v1_30 == 0) { + q6.y.Y(p31); + String v10_4 = new a9.b2(((w2.o0) this.f), ((a7.c) this.g), ((q0.b) this.e), ((q0.m) this.h), 0, 12); + this.d = 1; + if (kotlinx.coroutines.CoroutineScopeKt.coroutineScope(v10_4, this) == v0_47) { + return v0_47; + } + } else { + if (v1_30 == 1) { + q6.y.Y(p31); + } else { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } + } + throw new b3.e(); + case 13: + int v2_32; + int v2_36; + j7.m v3_29; + int v7_3; + int v6_7; + long v1_10 = ((s.d4) this.h); + o8.e v0_30 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + int v2_26 = this.d; + try { + if (v2_26 == 0) { + q6.y.Y(p31); + v2_32 = ((kotlinx.coroutines.CoroutineScope) this.e); + if (!kotlinx.coroutines.JobKt.isActive(v2_32.getCoroutineContext())) { + v1_10.g = 0; + v0_30 = p6.a0.a; + } else { + j7.m v3_32 = v1_10.a; + int v6_8 = v1_10.f; + this.e = v2_32; + this.f = v1_10; + this.g = v3_32; + this.d = 1; + v6_7 = v6_8.receive(this); + if (v6_7 != v0_30) { + v3_29 = v2_32; + v2_36 = v3_32; + v7_3 = v1_10; + int v6_9 = ((s.b4) v6_7); + this.e = v3_29; + this.f = 0; + this.g = 0; + this.d = 2; + if (s.d4.c(v7_3, v2_36, v6_9, this) != v0_30) { + v2_32 = v3_29; + } + } else { + } + } + } else { + if (v2_26 == 1) { + v2_36 = ((s.m3) this.g); + j7.m v3_28 = ((s.d4) this.f); + int v6_5 = ((kotlinx.coroutines.CoroutineScope) this.e); + q6.y.Y(p31); + v7_3 = v3_28; + v3_29 = v6_5; + v6_7 = p31; + } else { + if (v2_26 != 2) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + v2_32 = ((kotlinx.coroutines.CoroutineScope) this.e); + q6.y.Y(p31); + } + } + } + } catch (o8.e v0_46) { + v1_10.g = 0; + throw v0_46; + } + return v0_30; + case 14: + return this.d(p31); + case 15: + return this.e(p31); + case 16: + return this.f(p31); + case 17: + return this.g(p31); + case 18: + return this.h(p31); + case 19: + return this.i(p31); + case 20: + o8.e v0_79 = p6.a0.a; + long v1_79 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + int v2_78 = this.d; + if (v2_78 == 0) { + q6.y.Y(p31); + int v11_15 = ((y.t) this.f); + a8.f v12_14 = ((a7.c) this.g); + int v13_9 = ((z0.x) this.e); + int v14_12 = ((f7.d) this.h); + this.d = 1; + int v2_105 = e1.t.w(new a9.k2(v11_15, 3)).collect(new g0.c(v11_15, v12_14, v13_9, v14_12, 4), this); + if (v2_105 != kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()) { + v2_105 = v0_79; + } + if (v2_105 == v1_79) { + v0_79 = v1_79; + } + } else { + if (v2_78 != 1) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + q6.y.Y(p31); + } + } + return v0_79; + case 21: + return this.j(p31); + case 22: + return this.k(p31); + case 23: + o8.e v0_45 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + long v1_32 = this.d; + if (v1_32 == 0) { + q6.y.Y(p31); + int v2_50 = ((z7.b0) this.e); + ((qbsg.top.ble.RawGattHandle) this.f).writeCharacteristic(v2_50.e, v2_50.f, ((byte[]) this.g), 1); + long v1_68 = ((z7.f0) this.h).c; + this.d = 1; + long v1_72 = v1_68.receive(this); + if (v1_72 != v0_45) { + v0_45 = v1_72; + } + } else { + if (v1_32 != 1) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + q6.y.Y(p31); + v0_45 = p31; + } + } + return v0_45; + case 24: + return this.l(p31); + case 25: + return this.m(p31); + default: + o8.e v0_39 = p6.a0.a; + long v1_23 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + int v2_37 = this.d; + if (v2_37 == 0) { + q6.y.Y(p31); + int v2_42 = ((n8.w) ((e1.j1) this.h).getValue()).p; + if (v2_42 != 0) { + j7.m v3_27 = ((y0.jb) this.g); + this.f = kotlin.coroutines.jvm.internal.SpillingKt.nullOutSpilledVariable(v2_42); + this.d = 1; + if (y0.jb.b(v3_27, v2_42, this) != v1_23) { + long v1_28 = ((n8.e0) this.e).d; + v1_28.setValue(n8.w.a(((n8.w) v1_28.getValue()), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32767)); + } else { + v0_39 = v1_23; + } + } + } else { + if (v2_37 != 1) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + q6.y.Y(p31); + } + } + return v0_39; + } + } +} diff --git a/analysis/apk/decomp/a8_g.java b/analysis/apk/decomp/a8_g.java new file mode 100644 index 0000000..09c46be --- /dev/null +++ b/analysis/apk/decomp/a8_g.java @@ -0,0 +1,1388 @@ +package a8; +public final class g implements a8.h { + public final kotlinx.coroutines.CoroutineScope a; + public final qbsg.top.ble.BleManagerFacade b; + public final kotlinx.coroutines.flow.MutableStateFlow c; + public final kotlinx.coroutines.flow.StateFlow d; + public final kotlinx.coroutines.flow.MutableStateFlow e; + public final kotlinx.coroutines.flow.StateFlow f; + public byte[] g; + public kotlinx.coroutines.Job h; + public String i; + public qbsg.top.ble.data.BleSessionFacade j; + public final int k; + public final int l; + public final int m; + public final int n; + + public g(kotlinx.coroutines.CoroutineScope p2, qbsg.top.ble.BleManagerFacade p3) + { + kotlin.jvm.internal.s.f(p2, "scope"); + kotlin.jvm.internal.s.f(p3, "bleManager"); + this.a = p2; + this.b = p3; + int v2_1 = kotlinx.coroutines.flow.StateFlowKt.MutableStateFlow(new a8.i()); + this.c = v2_1; + this.d = kotlinx.coroutines.flow.FlowKt.asStateFlow(v2_1); + int v2_4 = kotlinx.coroutines.flow.StateFlowKt.MutableStateFlow(0); + this.e = v2_4; + this.f = kotlinx.coroutines.flow.FlowKt.asStateFlow(v2_4); + this.k = 3; + this.l = 5; + this.m = 6; + this.n = 3; + return; + } + + public static byte[] c(int p3) + { + byte v3_3 = ((byte) ((p3 >> 8) & 255)); + byte[] v1_1 = new byte[2]; + v1_1[0] = ((byte) (p3 & 255)); + v1_1[1] = v3_3; + return v1_1; + } + + public static byte[] d(int p5) + { + byte v1_2 = ((byte) ((p5 >> 8) & 255)); + byte v2_2 = ((byte) ((p5 >> 16) & 255)); + byte v5_1 = ((byte) ((p5 >> 24) & 255)); + byte[] v3_1 = new byte[4]; + v3_1[0] = ((byte) (p5 & 255)); + v3_1[1] = v1_2; + v3_1[2] = v2_2; + v3_1[3] = v5_1; + return v3_1; + } + + public static int e(byte[] p4) + { + if (p4.length != 0) { + if (p4.length != 1) { + if (p4.length < 4) { + return (((p4[1] & 255) << 8) | (p4[0] & 255)); + } else { + return (((p4[3] & 255) << 24) | (((p4[0] & 255) | ((p4[1] & 255) << 8)) | ((p4[2] & 255) << 16))); + } + } else { + return (p4[0] & 255); + } + } else { + return -1; + } + } + + public final int a() + { + return ((((this.l & 255) << 24) | ((this.m & 255) << 16)) | ((this.n & 255) << 8)); + } + + public final int b() + { + int v1 = this.k; + if (v1 == 3) { + v1 = 19; + } else { + if (v1 == 4) { + v1 = 18; + } + } + return (v1 << 24); + } + + public final Object f(byte[] p48, String p49, qbsg.top.ble.GattOtaChannel p50, kotlin.coroutines.jvm.internal.ContinuationImpl p51) + { + String v9_0; + Object v1_0 = this; + long v0_0 = p50; + Exception v3_62 = "724249f0-5ec3-4b5f-8804-42345af08651"; + Object v4_43 = "61c8849c-f639-4765-946e-5c3419bebb2a"; + Throwable v5_20 = "b7de1eea-823d-43bb-a3af-c4903dfce23c"; + if (!(p51 instanceof a8.e)) { + v9_0 = new a8.e(this, p51); + } else { + v9_0 = ((a8.e) p51); + int v10_13 = ((a8.e) p51).t; + if ((v10_13 & -2147483648) == 0) { + } else { + ((a8.e) p51).t = (v10_13 - -2147483648); + } + } + try { + Object v6_0; + Object v4_11; + Exception v3_15; + long v0_15; + Object v6_2; + String v2_0; + int v8_0; + int v12_9; + Exception v3_17; + int v8_1; + Object v6_4; + int v8_3; + int v8_4; + Object v4_18; + int v13_0; + Object v6_9; + int v13_1; + int v10_0; + Exception v3_80; + Object v6_10; + String v15_0; + long v0_24; + Object v6_11; + long v0_25; + Object v6_12; + int v13_4; + int v20_0; + long v0_26; + int v10_5; + long v48_7; + String v15_5; + Exception v3_29; + int v8_13; + Object v6_16; + int v10_7; + Throwable v32_2; + String v15_8; + int v21_1; + Throwable v32_4; + int v21_2; + int v10_11; + Object v4_32; + Throwable v5_1; + Throwable v5_2; + Throwable v32_7; + int v10_14; + int v21_6; + Throwable v32_9; + Object v4_36; + int v7_0; + int v7_1; + Object v4_40; + int v7_2; + Object v4_41; + Object v4_42; + String v9_1; + long v11_0; + long v33_3; + int v7_5; + int v22_0; + long v11_1; + String v9_3; + Throwable v5_14; + int v7_7; + String v9_4; + int v34_0; + Throwable v5_15; + Throwable v5_16; + int v34_2; + int v12_6; + int v7_10; + long v24_1; + Throwable v5_18; + int v7_12; + long v14_1; + long v14_2; + int v23_0; + long v14_3; + int v38_0; + long v14_4; + long v0_10; + int v38_1; + Exception v3_1; + int v7_17; + int v7_18; + Exception v3_4; + Exception v3_61; + Object v4_2; + long v14_9; + long v0_13; + Exception v3_63; + long v0_2; + Object v4_4; + Exception v3_64; + long v14_11; + Object v4_6; + long v0_5; + String v2_23 = v9_0.r; + int v10_15 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + long v14_8 = "457871e8-d516-4ca1-9116-57d0b17b9cb2"; + int v51_1 = 0; + v20_0 = 8; + v13_1 = this.b; + int v23_1 = v2_23; + v2_0 = this.e; + Object v26 = "8082caa8-41a6-4021-91c6-56f9b954cc34"; + int v12_7 = "0000fef5-0000-1000-8000-00805f9b34fb"; + switch (v9_0.t) { + case 0: + q6.y.Y(v23_1); + try { + v11_0 = p50.hasService("0000fef5-0000-1000-8000-00805f9b34fb"); + try { + if (v11_0 == 0) { + v20_0 = v2_0; + v10_0 = v13_1; + try { + throw new Exception("\u8bbe\u5907\u4e0d\u652f\u6301 SUOTA \u670d\u52a1\uff08\u56fa\u4ef6\u7248\u672c\u53ef\u80fd\u4e0d\u652f\u6301 OTA\uff09"); + } catch (long v0_14) { + v11_0 = p49; + throw v0_14; + } catch (long v0_8) { + v11_0 = p49; + } catch (long v0_9) { + v11_0 = p49; + v10_0.closeOtaChannel(v11_0); + v1_0.i = 0; + throw v0_9; + } + } else { + try { + while(true) { + int v13_8; + v11_0 = v2_0.getValue(); + Throwable v32_11 = ((a8.j) v11_0); + int v23 = 4; + long v29 = 5000; + v13_1 = v23_0; + v14_8 = v38_1; + v51_1 = 0; + } + try { + if (!p50.hasCharacteristic("0000fef5-0000-1000-8000-00805f9b34fb", "64b4e8b5-0de5-401b-a21d-acc8db3b913a")) { + v11_0 = p48; + v7_18 = p49; + v13_1 = 23; + v14_11 = 20; + try { + if (!v0_0.hasCharacteristic("0000fef5-0000-1000-8000-00805f9b34fb", "42c3dfdd-77be-4d9c-8454-8f875267fb3b")) { + v33_3 = v3_62; + v32_7 = "9d84b9a3-000c-49d8-9183-855b673fda31"; + v15_8 = v14_11; + v6_12 = v0_0; + v0_26 = v13_1; + v3_64 = v11_0; + v11_0 = v7_18; + if (!v6_12.hasCharacteristic("0000fef5-0000-1000-8000-00805f9b34fb", v5_20)) { + v7_10 = v3_64; + v5_16 = v6_12; + if (!v5_16.hasCharacteristic("0000fef5-0000-1000-8000-00805f9b34fb", v4_43)) { + v6_10 = v5_16; + v5_15 = v15_8; + v4_41 = v0_26; + v0_25 = (v5_15 + 3); + if ((v4_41 >= v0_25) && (v4_41 != 23)) { + v3_80 = v6_10; + v6_9 = v5_15; + v5_14 = v4_41; + Object v4_47 = v7_10; + int v7_29 = Math.min(v6_9, (v5_14 - 3)); + int v13_24 = new z7.h0(v4_47, v7_29, 2); + v3_80.requestHighPriority(); + while(true) { + Object v4_49; + long v14_23 = v2_0.getValue(); + a8.j v39_1 = ((a8.j) v14_23); + if (v39_1 == null) { + v22_0 = v4_47; + if (v39_1 == null) { + v4_49 = 0; + } else { + v4_49 = a8.j.a(v39_1, 0, 0, "\u542f\u7528\u72b6\u6001\u901a\u77e5...", 0, 47); + } + } else { + v22_0 = v4_47; + if (v39_1.b() != 1) { + } else { + v4_49 = v39_1; + } + } + if (v2_0.compareAndSet(v14_23, v4_49)) { + break; + } + v23 = 4; + v29 = 5000; + v4_47 = v22_0; + v51_1 = 0; + } + if (!v3_80.hasCharacteristic("0000fef5-0000-1000-8000-00805f9b34fb", "5f78df94-798c-46f5-990a-b3eb6a065c88")) { + v20_0 = v2_0; + v10_0 = v23_0; + throw new Exception("SERV_STATUS \u7279\u5f81\u503c\u672a\u627e\u5230"); + } else { + v3_80.enableNotification("0000fef5-0000-1000-8000-00805f9b34fb", "5f78df94-798c-46f5-990a-b3eb6a065c88"); + v3_80.writeDescriptor("0000fef5-0000-1000-8000-00805f9b34fb", "5f78df94-798c-46f5-990a-b3eb6a065c88", "00002902-0000-1000-8000-00805f9b34fb", z7.k0.a); + Object v4_54 = new a8.d(v3_80, 0, 9); + v9_0.c = kotlin.coroutines.jvm.internal.SpillingKt.nullOutSpilledVariable(v22_0); + v9_0.d = v11_0; + v9_0.e = v3_80; + v9_0.f = v13_24; + v9_0.i = v6_9; + v9_0.j = v5_14; + v9_0.k = v0_25; + v9_0.l = v7_29; + v9_0.t = 6; + v4_40 = kotlinx.coroutines.TimeoutKt.withTimeout(8000, v4_54, v9_0); + if (v4_40 != v10_15) { + v8_13 = v3_80; + v3_61 = v0_25; + v0_24 = v7_29; + v7_7 = v13_24; + if (!((Boolean) v4_40).booleanValue()) { + v20_0 = v2_0; + v10_0 = v23_0; + throw new Exception("CCCD \u5199\u5165\u5931\u8d25"); + } else { + v14_9 = "8082caa8-41a6-4021-91c6-56f9b954cc34"; + if (!v8_13.hasCharacteristic("0000fef5-0000-1000-8000-00805f9b34fb", "8082caa8-41a6-4021-91c6-56f9b954cc34")) { + v20_0 = v2_0; + v10_0 = v23_0; + throw new Exception("SPOTA_MEM_DEV \u672a\u627e\u5230"); + } else { + v8_13.writeCharacteristic("0000fef5-0000-1000-8000-00805f9b34fb", "8082caa8-41a6-4021-91c6-56f9b954cc34", a8.g.d(this.b()), 1); + Object v4_61 = new a8.d(v8_13, 0, 10); + v9_0.c = kotlin.coroutines.jvm.internal.SpillingKt.nullOutSpilledVariable(v22_0); + v9_0.d = v11_0; + v9_0.e = v8_13; + v9_0.f = v7_7; + v9_0.i = v6_9; + v9_0.j = v5_14; + v9_0.k = v3_61; + v9_0.l = v0_24; + v9_0.t = 7; + v13_1 = v5_14; + String v15_13 = v6_9; + v4_36 = kotlinx.coroutines.TimeoutKt.withTimeout(8000, v4_61, v9_0); + if (v4_36 != v10_15) { + v5_2 = v15_13; + v6_4 = v7_7; + v7_5 = v8_13; + if (!((Boolean) v4_36).booleanValue()) { + v20_0 = v2_0; + v10_0 = v23_0; + throw new Exception("\u5199 MEM_DEV \u5931\u8d25"); + } else { + Object v4_64 = this.k; + if ((v4_64 != 3) && (v4_64 != 4)) { + while (!v7_5.getNotifyEvents().isEmpty()) { + v7_5.getNotifyEvents().tryReceive-PtdJZtk(); + } + v4_18 = v32_7; + if (!v7_5.hasCharacteristic("0000fef5-0000-1000-8000-00805f9b34fb", v4_18)) { + v20_0 = v2_0; + v10_0 = v23_0; + throw new Exception("SPOTA_PATCH_LEN \u672a\u627e\u5230"); + } else { + int v8_28 = v38_1; + if (!v7_5.hasCharacteristic("0000fef5-0000-1000-8000-00805f9b34fb", v8_28)) { + v20_0 = v2_0; + v10_0 = v23_0; + throw new Exception("SPOTA_PATCH_DATA \u672a\u627e\u5230"); + } else { + v9_3 = v3_61; + v3_29 = v6_4.c(); + v15_5 = v9_0; + v1_0 = v7_5; + v38_0 = v8_28; + v26 = v14_9; + v8_4 = -1; + v7_0 = v0_24; + v0_13 = v51_1; + v20_0 = v2_0; + v2_0 = v13_1; + v13_4 = a.b.k(); + if (v0_13 >= v3_29) { + v3_1 = v10_15; + Throwable v32_13 = v13_4; + v14_1 = v26; + v1_0.writeCharacteristic(v12_7, v14_1, a8.g.d(-33554432), 1); + long v0_55 = new a8.d(v1_0, 0, 3); + v15_5.c = kotlin.coroutines.jvm.internal.SpillingKt.nullOutSpilledVariable(v22_0); + v15_5.d = v11_0; + v15_5.e = v1_0; + v15_5.f = kotlin.coroutines.jvm.internal.SpillingKt.nullOutSpilledVariable(v6_4); + v15_5.i = v5_2; + v15_5.j = v2_0; + v15_5.k = v9_3; + v15_5.l = v7_0; + v13_0 = v1_0; + Object v4_1 = v2_0; + Object v1_1 = v32_13; + v15_5.q = v1_1; + v15_5.m = v8_4; + Throwable v32_0 = v1_1; + v15_5.t = 12; + v2_0 = kotlinx.coroutines.TimeoutKt.withTimeout(8000, v0_55, v15_5); + if (v2_0 != v3_1) { + v15_0 = v6_4; + v6_0 = v9_3; + v9_0 = v15_5; + v1_0 = v4_1; + v0_2 = v8_4; + v8_0 = v5_2; + v4_2 = v32_0; + v2_0 = ((Boolean) v2_0).booleanValue(); + if (v2_0 == null) { + v1_0 = this; + v10_0 = v23_0; + throw new Exception("\u5199 END_SIGNAL \u5931\u8d25"); + } else { + long v48_1 = v15_0; + String v2_4 = new a8.d(v13_0, 0, 11); + v9_0.c = kotlin.coroutines.jvm.internal.SpillingKt.nullOutSpilledVariable(v22_0); + v9_0.d = v11_0; + v9_0.e = v13_0; + v9_0.f = kotlin.coroutines.jvm.internal.SpillingKt.nullOutSpilledVariable(v48_1); + v9_0.i = v8_0; + v9_0.j = v1_0; + v9_0.k = v6_0; + v9_0.l = v7_0; + v9_0.q = v4_2; + v9_0.m = v0_2; + v9_0.t = 13; + long v27 = v4_2; + v2_0 = kotlinx.coroutines.TimeoutKt.withTimeout(60000, v2_4, v9_0); + if (v2_0 != v3_1) { + v10_5 = v9_0; + v4_4 = v27; + v9_1 = v8_0; + v8_1 = v1_0; + v1_0 = v0_2; + v0_5 = v13_0; + v13_1 = v48_1; + String v2_5 = ((p6.g) v2_0); + String v15_4 = a8.g.e(((byte[]) v2_5.d)); + long v48_2 = v2_5; + v2_0 = 2; + if (v15_4 != 2) { + v1_0 = this; + v10_0 = v23_0; + String v2_6 = z7.k0.a(v15_4); + Exception v3_3 = new StringBuilder(); + v3_3.append("CRC \u6821\u9a8c\u5931\u8d25: "); + v3_3.append(v2_6); + throw new Exception(v3_3.toString()); + } else { + int v49_1 = v13_1; + v0_5.writeCharacteristic(v12_7, v14_1, a8.g.d(-50331648), 1); + v2_0 = new a8.d(v0_5, 0, 4); + v10_5.c = kotlin.coroutines.jvm.internal.SpillingKt.nullOutSpilledVariable(v22_0); + v10_5.d = v11_0; + v10_5.e = v0_5; + v10_5.f = kotlin.coroutines.jvm.internal.SpillingKt.nullOutSpilledVariable(v49_1); + v10_5.g = kotlin.coroutines.jvm.internal.SpillingKt.nullOutSpilledVariable(v48_2); + v10_5.i = v9_1; + v10_5.j = v8_1; + v10_5.k = v6_0; + v10_5.l = v7_0; + v10_5.q = v4_4; + v10_5.m = v1_0; + v10_5.n = v15_4; + v10_5.t = 14; + if (kotlinx.coroutines.TimeoutKt.withTimeoutOrNull(5000, v2_0, v10_5) != v3_1) { + v3_4 = v4_4; + v1_0 = this; + try { + this.g(new a8.b((((double) (a.b.k() - v3_4)) / 4652007308841189376))); + v0_5.requestBalancedPriority(); + v10_0 = v23_0; + } catch (long v0_8) { + v10_0 = v23_0; + } + } else { + return v3_1; + } + } + } else { + return v3_1; + } + } + } else { + return v3_1; + } + } else { + int v21_0 = v10_15; + try { + int v10_6 = v6_4.b; + Throwable v32_1 = v3_29; + Exception v3_10 = Math.min(v10_6, (v6_4.a.length - (v0_13 * v10_6))); + } catch (kotlinx.coroutines.TimeoutCancellationException) { + v1_0 = this; + Object v4_12 = v20_0; + v10_0 = v23_0; + } + if (v3_10 == v8_4) { + v10_7 = v3_10; + v24_1 = v4_18; + v4_6 = v32_1; + v32_2 = v13_4; + v14_2 = v21_0; + v13_1 = v9_3; + v21_2 = v14_2; + v14_3 = v2_0; + v9_4 = v7_0; + v2_0 = v1_0; + v1_0 = v0_13; + v0_15 = v4_6; + v3_17 = v6_4.a(v0_13).iterator(); + v4_11 = v8_4; + v7_1 = v32_2; + if (!v3_17.hasNext()) { + long v33_0 = v10_7; + v34_0 = v12_7; + Exception v3_18 = v21_2; + int v10_12 = v1_0; + Exception v3_19; + int v21_3; + if (v10_12 != (v6_4.c() - 1)) { + v21_3 = v3_18; + v3_19 = 30000; + } else { + v21_3 = v3_18; + v3_19 = 60000; + } + long v48_4 = v4_11; + int v35_1 = v3_19; + Object v1_15 = new a8.d(v2_0, 0, 12); + v15_5.c = kotlin.coroutines.jvm.internal.SpillingKt.nullOutSpilledVariable(v22_0); + v15_5.d = v11_0; + v15_5.e = v2_0; + v15_5.f = v6_4; + v15_5.g = 0; + v15_5.h = 0; + v15_5.i = v5_2; + v15_5.j = v14_3; + v15_5.k = v13_1; + v15_5.l = v9_4; + v15_5.q = v7_1; + v12_6 = v48_4; + v15_5.m = v12_6; + v15_5.n = v10_12; + v15_5.o = v0_15; + v15_5.p = v33_0; + v15_5.t = 11; + Object v1_16 = kotlinx.coroutines.TimeoutKt.withTimeout(v35_1, v1_15, v15_5); + v3_1 = v21_3; + if (v1_16 != v3_1) { + int v21_4 = v2_0; + v2_0 = v1_16; + v1_0 = v21_4; + v14_4 = v11_0; + v11_1 = v14_3; + v21_6 = v5_2; + v32_4 = v7_1; + v7_2 = v6_4; + v6_2 = v10_12; + v10_14 = v9_4; + v2_0 = a8.g.e(((byte[]) ((p6.g) v2_0).d)); + if (v2_0 != 2) { + v5_2 = this; + Object v6_3 = (v6_2 + 1); + Object v1_17 = z7.k0.a(v2_0); + v2_0 = new StringBuilder(); + v2_0.append("\u5757 "); + v2_0.append(v6_3); + v2_0.append(" \u5931\u8d25: "); + v2_0.append(v1_17); + throw new Exception(v2_0.toString()); + } else { + String v2_16 = (v6_2 + 1); + this.g(new a8.a(((v2_16 * 100) / v7_2.c()), v6_2, v7_2, (((double) (a.b.k() - v32_4)) / 4652007308841189376))); + v6_4 = v7_2; + v7_0 = v10_14; + v8_4 = v12_6; + v9_3 = v13_1; + v5_2 = v21_6; + v4_18 = v24_1; + v12_7 = v34_0; + v51_1 = 0; + v10_15 = v3_1; + v3_29 = v0_15; + v0_13 = v2_16; + v2_0 = v11_1; + v11_0 = v14_4; + v13_4 = v32_4; + } + } + } else { + long v33_1 = v10_7; + int v10_17 = ((byte[]) v3_17.next()); + Throwable v32_6 = v1_0; + int v34_1 = v4_11; + Object v4_19 = v38_0; + v2_0.writeCharacteristic(v12_7, v4_19, v10_17, v51_1); + v38_0 = v4_19; + long v48_5 = v10_17; + Object v1_21 = new a8.d(v2_0, 0, 2); + v15_5.c = kotlin.coroutines.jvm.internal.SpillingKt.nullOutSpilledVariable(v22_0); + v15_5.d = v11_0; + v15_5.e = v2_0; + v15_5.f = v6_4; + v15_5.g = v3_17; + v15_5.h = kotlin.coroutines.jvm.internal.SpillingKt.nullOutSpilledVariable(v48_5); + v15_5.i = v5_2; + v15_5.j = v14_3; + v15_5.k = v13_1; + v15_5.l = v9_4; + v15_5.q = v7_1; + Object v4_23 = v34_1; + v15_5.m = v4_23; + int v10_19 = v32_6; + v15_5.n = v10_19; + v15_5.o = v0_15; + v48_7 = v3_17; + Exception v3_34 = v33_1; + v15_5.p = v3_34; + v34_2 = v12_7; + v15_5.t = 10; + v12_9 = v4_23; + v3_1 = v21_2; + if (kotlinx.coroutines.TimeoutKt.withTimeout(5000, v1_21, v15_5) != v3_1) { + v1_0 = v10_19; + v10_7 = v3_34; + while(true) { + v21_2 = v3_1; + v3_17 = v48_7; + v4_11 = v12_9; + v12_7 = v34_2; + v51_1 = 0; + } + } + } + } else { + long v48_3 = v3_10; + v1_0.writeCharacteristic(v12_7, v4_18, a8.g.c(v3_10), 1); + v24_1 = v4_18; + Exception v3_13 = new a8.d(v1_0, 0, 1); + v15_5.c = kotlin.coroutines.jvm.internal.SpillingKt.nullOutSpilledVariable(v22_0); + v15_5.d = v11_0; + v15_5.e = v1_0; + v15_5.f = v6_4; + v15_5.i = v5_2; + v15_5.j = v2_0; + v15_5.k = v9_3; + v15_5.l = v7_0; + v15_5.q = v13_4; + v15_5.m = v8_4; + v15_5.n = v0_13; + v4_6 = v32_1; + v15_5.o = v4_6; + int v10_10 = v48_3; + v15_5.p = v10_10; + v15_5.t = 9; + v32_2 = v13_4; + Exception v3_14 = kotlinx.coroutines.TimeoutKt.withTimeout(8000, v3_13, v15_5); + v14_2 = v21_0; + if (v3_14 != v14_2) { + v21_1 = v5_2; + v8_3 = v9_3; + v9_0 = v15_5; + v5_1 = v0_13; + v0_10 = v10_10; + v10_11 = v2_0; + v2_0 = v3_14; + v3_15 = v22_0; + v2_0 = ((Boolean) v2_0).booleanValue(); + if (v2_0 == null) { + throw new Exception("\u5199 PATCH_LEN \u5931\u8d25"); + } else { + v22_0 = v3_15; + v15_5 = v9_0; + v2_0 = v10_11; + v10_7 = v0_10; + v9_3 = v8_3; + v8_4 = v10_7; + v0_13 = v5_1; + v5_2 = v21_1; + } + } else { + v3_1 = v14_2; + return v3_1; + } + } + } + } + } + } else { + Object v4_65 = v33_3; + if (!v7_5.hasCharacteristic("0000fef5-0000-1000-8000-00805f9b34fb", v4_65)) { + v20_0 = v2_0; + v10_0 = v23_0; + throw new Exception("SPOTA_GPIO_MAP \u672a\u627e\u5230"); + } else { + v7_5.writeCharacteristic("0000fef5-0000-1000-8000-00805f9b34fb", v4_65, a8.g.d(this.a()), 1); + Object v4_67 = new a8.d(v7_5, 0, 0); + v9_0.c = kotlin.coroutines.jvm.internal.SpillingKt.nullOutSpilledVariable(v22_0); + v9_0.d = v11_0; + v9_0.e = v7_5; + v9_0.f = v6_4; + v9_0.i = v5_2; + v9_0.j = v13_1; + v9_0.k = v3_61; + v9_0.l = v0_24; + v9_0.t = v20_0; + int v8_26 = v5_2; + v20_0 = v6_4; + v4_32 = kotlinx.coroutines.TimeoutKt.withTimeout(8000, v4_67, v9_0); + if (v4_32 != v10_15) { + v5_2 = v8_26; + v6_4 = v20_0; + if (!((Boolean) v4_32).booleanValue()) { + v20_0 = v2_0; + v10_0 = v23_0; + throw new Exception("\u5199 GPIO_MAP \u5931\u8d25"); + } + } else { + v3_1 = v10_15; + return v3_1; + } + } + } + } + } else { + } + } + } + } else { + } + } + } else { + v6_10.requestMtu(v0_25); + Exception v3_77 = new a8.d(v6_10, 0, 13); + v9_0.c = v7_10; + v9_0.d = v11_0; + v9_0.e = v6_10; + v9_0.i = v5_15; + v9_0.j = v4_41; + v9_0.k = v0_25; + v9_0.t = 5; + v3_63 = kotlinx.coroutines.TimeoutKt.withTimeoutOrNull(8000, v3_77, v9_0); + if (v3_63 != v10_15) { + Exception v3_79 = ((Integer) v3_63); + if (v3_79 == null) { + } else { + v5_14 = v3_79.intValue(); + v3_80 = v6_10; + v6_9 = v5_15; + } + } else { + } + } + } else { + v5_16.readCharacteristic("0000fef5-0000-1000-8000-00805f9b34fb", v4_43); + Exception v3_73 = new a8.d(v5_16, 0, 8); + v9_0.c = v7_10; + v9_0.d = v11_0; + v9_0.e = v5_16; + v9_0.i = v15_8; + v9_0.j = v0_26; + v9_0.t = 4; + if (kotlinx.coroutines.TimeoutKt.withTimeout(5000, v3_73, v9_0) != v10_15) { + v6_11 = v11_0; + v4_42 = v15_8; + v11_0 = v6_11; + v6_10 = v5_16; + v5_15 = v4_42; + } + } + } else { + v6_12.readCharacteristic("0000fef5-0000-1000-8000-00805f9b34fb", v5_20); + Throwable v5_23 = new a8.d(v6_12, 0, 7); + v9_0.c = v3_64; + v9_0.d = v11_0; + v9_0.e = v6_12; + v9_0.i = v15_8; + v9_0.j = v0_26; + v9_0.t = 3; + v5_18 = kotlinx.coroutines.TimeoutKt.withTimeout(5000, v5_23, v9_0); + if (v5_18 != v10_15) { + Throwable v5_26 = ((byte[]) ((p6.g) v5_18).d); + if (v5_26.length < 2) { + } else { + v0_26 = ((v5_26[v51_1] & 255) | ((v5_26[1] & 255) << 8)); + } + } else { + } + } + } else { + try { + v0_0.readCharacteristic("0000fef5-0000-1000-8000-00805f9b34fb", "42c3dfdd-77be-4d9c-8454-8f875267fb3b"); + v32_7 = "9d84b9a3-000c-49d8-9183-855b673fda31"; + v33_3 = v3_62; + Object v6_20 = new a8.d(v0_0, 0, 6); + v9_0.c = v11_0; + v9_0.d = v7_18; + v9_0.e = v0_0; + v9_0.i = v14_11; + v9_0.j = v13_1; + v9_0.t = 2; + Exception v3_70 = v13_1; + v15_8 = v14_11; + v6_16 = kotlinx.coroutines.TimeoutKt.withTimeout(5000, v6_20, v9_0); + } catch (kotlinx.coroutines.TimeoutCancellationException) { + v4_12 = v2_0; + v11_0 = v7_18; + } catch (long v0_14) { + v11_0 = v7_18; + v10_0 = v23_0; + } catch (long v0_8) { + v20_0 = v2_0; + v11_0 = v7_18; + } catch (long v0_9) { + v11_0 = v7_18; + v10_0 = v23_0; + } + if (v6_16 != v10_15) { + v7_12 = v0_0; + v0_26 = v3_70; + v3_64 = v11_0; + v11_0 = v7_18; + Object v6_23 = ((byte[]) ((p6.g) v6_16).d); + if (v6_23.length >= 2) { + v15_8 = (((v6_23[1] & 255) << 8) | (v6_23[v51_1] & 255)); + } + v6_12 = v7_12; + } + } + } catch (kotlinx.coroutines.TimeoutCancellationException) { + v10_0 = v23_0; + v4_12 = v2_0; + v11_0 = v7_18; + } catch (long v0_14) { + v10_0 = v23_0; + v11_0 = v7_18; + } catch (long v0_8) { + v20_0 = v2_0; + v10_0 = v23_0; + v11_0 = v7_18; + } catch (long v0_9) { + v10_0 = v23_0; + v11_0 = v7_18; + } + v11_0 = p49; + v4_12 = v20_0; + } else { + try { + p50.readCharacteristic("0000fef5-0000-1000-8000-00805f9b34fb", "64b4e8b5-0de5-401b-a21d-acc8db3b913a"); + int v7_20 = new a8.d(p50, 0, 5); + v11_0 = p48; + v9_0.c = p48; + v9_0.d = p49; + v9_0.e = p50; + v9_0.i = 20; + v9_0.j = 23; + v9_0.t = 1; + } catch (kotlinx.coroutines.TimeoutCancellationException) { + v11_0 = p49; + v4_12 = v2_0; + } catch (long v0_14) { + v11_0 = p49; + } catch (long v0_8) { + v11_0 = p49; + v20_0 = v2_0; + } catch (long v0_9) { + v11_0 = p49; + } + if (kotlinx.coroutines.TimeoutKt.withTimeout(5000, v7_20, v9_0) != v10_15) { + v7_17 = p50; + v13_1 = 23; + v32_9 = 20; + v7_18 = p49; + v0_0 = v7_17; + v14_11 = v32_9; + } + } + } catch (kotlinx.coroutines.TimeoutCancellationException) { + v10_0 = v23_0; + v11_0 = p49; + v4_12 = v2_0; + } catch (long v0_14) { + } catch (long v0_8) { + v20_0 = v2_0; + v10_0 = v23_0; + } catch (long v0_9) { + v10_0 = v23_0; + } + v10_0 = v23_0; + } catch (kotlinx.coroutines.TimeoutCancellationException) { + v20_0 = v2_0; + v10_0 = v13_1; + } + if (v32_11 == null) { + v23_0 = v13_1; + v38_1 = v14_8; + if (v32_11 == null) { + v13_8 = 0; + if (!v2_0.compareAndSet(v11_0, v13_8)) { + } + } else { + v13_8 = a8.j.a(v32_11, 0, 0, "\u8bfb\u53d6 SUOTA \u8bbe\u5907\u4fe1\u606f...", 0, 47); + } + } else { + v23_0 = v13_1; + v38_1 = v14_8; + if (v32_11.b() != 1) { + } else { + v13_8 = v32_11; + } + } + } + } catch (kotlinx.coroutines.TimeoutCancellationException) { + } + } catch (long v0_8) { + v20_0 = v2_0; + v10_0 = v13_1; + } catch (long v0_9) { + v10_0 = v13_1; + } + case 1: + long v0_29 = v9_0.j; + long v11_12 = v9_0.e; + long v48_10 = v9_0.i; + p49 = v9_0.d; + int v7_16 = ((byte[]) v9_0.c); + try { + q6.y.Y(v23_1); + v11_0 = v7_16; + v7_17 = v11_12; + v32_9 = v48_10; + v23_0 = v13_1; + v38_1 = "457871e8-d516-4ca1-9116-57d0b17b9cb2"; + v13_1 = v0_29; + } catch (kotlinx.coroutines.TimeoutCancellationException) { + v11_0 = p49; + v4_12 = v2_0; + v10_0 = v13_1; + } catch (long v0_14) { + v11_0 = p49; + v10_0 = v13_1; + } catch (long v0_8) { + v11_0 = p49; + v20_0 = v2_0; + v10_0 = v13_1; + } catch (long v0_9) { + v11_0 = p49; + v10_0 = v13_1; + } + break; + case 2: + v0_26 = v9_0.j; + v7_12 = v9_0.e; + v11_0 = v9_0.d; + long v48_9 = v9_0.i; + Object v6_15 = ((byte[]) v9_0.c); + q6.y.Y(v23_1); + v33_3 = "724249f0-5ec3-4b5f-8804-42345af08651"; + v3_64 = v6_15; + v38_1 = "457871e8-d516-4ca1-9116-57d0b17b9cb2"; + v32_7 = "9d84b9a3-000c-49d8-9183-855b673fda31"; + v6_16 = v23_1; + v15_8 = v48_9; + v23_0 = v13_1; + break; + case 3: + v0_26 = v9_0.j; + Throwable v5_17 = v9_0.i; + v6_12 = v9_0.e; + v7_10 = v9_0.d; + long v11_11 = ((byte[]) v9_0.c); + q6.y.Y(v23_1); + v33_3 = "724249f0-5ec3-4b5f-8804-42345af08651"; + v3_64 = v11_11; + v38_1 = "457871e8-d516-4ca1-9116-57d0b17b9cb2"; + v32_7 = "9d84b9a3-000c-49d8-9183-855b673fda31"; + v15_8 = v5_17; + v11_0 = v7_10; + v5_18 = v23_1; + v23_0 = v13_1; + break; + case 4: + v0_26 = v9_0.j; + v4_42 = v9_0.i; + v5_16 = v9_0.e; + v6_11 = v9_0.d; + v7_10 = ((byte[]) v9_0.c); + try { + q6.y.Y(v23_1); + v33_3 = "724249f0-5ec3-4b5f-8804-42345af08651"; + v23_0 = v13_1; + v38_1 = "457871e8-d516-4ca1-9116-57d0b17b9cb2"; + v32_7 = "9d84b9a3-000c-49d8-9183-855b673fda31"; + } catch (kotlinx.coroutines.TimeoutCancellationException) { + v4_12 = v2_0; + v11_0 = v6_11; + } catch (long v0_14) { + v11_0 = v6_11; + } catch (long v0_8) { + v20_0 = v2_0; + v11_0 = v6_11; + } catch (long v0_9) { + v11_0 = v6_11; + } + break; + case 5: + v0_25 = v9_0.k; + v4_41 = v9_0.j; + v5_15 = v9_0.i; + v6_10 = v9_0.e; + int v7_9 = v9_0.d; + long v11_9 = ((byte[]) v9_0.c); + q6.y.Y(v23_1); + v11_0 = v7_9; + v7_10 = v11_9; + v33_3 = "724249f0-5ec3-4b5f-8804-42345af08651"; + v38_1 = "457871e8-d516-4ca1-9116-57d0b17b9cb2"; + v32_7 = "9d84b9a3-000c-49d8-9183-855b673fda31"; + v3_63 = v23_1; + v23_0 = v13_1; + break; + case 6: + v0_24 = v9_0.l; + v5_14 = v9_0.j; + v6_9 = v9_0.i; + v7_7 = ((z7.h0) v9_0.f); + v8_13 = v9_0.e; + v11_0 = v9_0.d; + int v22_6 = v9_0.k; + Object v4_39 = ((byte[]) v9_0.c); + q6.y.Y(v23_1); + v33_3 = "724249f0-5ec3-4b5f-8804-42345af08651"; + v38_1 = "457871e8-d516-4ca1-9116-57d0b17b9cb2"; + v32_7 = "9d84b9a3-000c-49d8-9183-855b673fda31"; + v3_61 = v22_6; + v22_0 = v4_39; + v4_40 = v23_1; + v23_0 = v13_1; + break; + case 7: + v0_24 = v9_0.l; + Throwable v5_13 = v9_0.j; + Object v6_8 = v9_0.i; + v7_7 = ((z7.h0) v9_0.f); + v8_13 = v9_0.e; + v11_0 = v9_0.d; + int v22_5 = v9_0.k; + Object v4_35 = ((byte[]) v9_0.c); + q6.y.Y(v23_1); + v33_3 = "724249f0-5ec3-4b5f-8804-42345af08651"; + v38_1 = "457871e8-d516-4ca1-9116-57d0b17b9cb2"; + v32_7 = "9d84b9a3-000c-49d8-9183-855b673fda31"; + v3_61 = v22_5; + v14_9 = "8082caa8-41a6-4021-91c6-56f9b954cc34"; + v22_0 = v4_35; + v4_36 = v23_1; + v23_0 = v13_1; + v13_1 = v5_13; + v5_2 = v6_8; + break; + case 8: + v0_24 = v9_0.l; + v3_61 = v9_0.k; + Object v4_31 = v9_0.j; + v5_2 = v9_0.i; + v6_4 = ((z7.h0) v9_0.f); + v7_5 = v9_0.e; + int v8_12 = v9_0.d; + long v11_7 = ((byte[]) v9_0.c); + try { + q6.y.Y(v23_1); + int v22_4 = v13_1; + v13_1 = v4_31; + v4_32 = v23_1; + v23_0 = v22_4; + v22_0 = v11_7; + v38_1 = "457871e8-d516-4ca1-9116-57d0b17b9cb2"; + v32_7 = "9d84b9a3-000c-49d8-9183-855b673fda31"; + v14_9 = "8082caa8-41a6-4021-91c6-56f9b954cc34"; + v11_0 = v8_12; + } catch (kotlinx.coroutines.TimeoutCancellationException) { + v4_12 = v2_0; + v11_0 = v8_12; + } catch (long v0_14) { + v11_0 = v8_12; + } catch (long v0_8) { + v20_0 = v2_0; + v11_0 = v8_12; + } catch (long v0_9) { + v11_0 = v8_12; + } + break; + case 9: + v0_10 = v9_0.p; + Object v4_30 = v9_0.n; + Throwable v5_12 = v9_0.q; + v7_0 = v9_0.l; + v8_3 = v9_0.k; + long v11_4 = v9_0.j; + int v20_3 = v9_0.o; + v21_1 = v9_0.i; + long v48_8 = ((z7.h0) v9_0.f); + int v22_3 = v9_0.e; + long v24_4 = v9_0.d; + v3_15 = ((byte[]) v9_0.c); + q6.y.Y(v23_1); + v32_2 = v5_12; + v38_0 = "457871e8-d516-4ca1-9116-57d0b17b9cb2"; + v1_0 = v22_3; + v6_4 = v48_8; + v5_1 = v4_30; + v14_2 = v10_15; + v10_11 = v11_4; + v4_6 = v20_3; + v11_0 = v24_4; + v20_0 = v2_0; + v24_1 = "9d84b9a3-000c-49d8-9183-855b673fda31"; + v2_0 = v23_1; + v23_0 = v13_1; + break; + case 10: + long v0_23 = v9_0.p; + Object v4_29 = v9_0.n; + Throwable v5_11 = v9_0.m; + Object v6_6 = v9_0.q; + int v8_11 = v9_0.l; + long v11_3 = v9_0.k; + int v20_2 = v9_0.o; + int v21_7 = v9_0.j; + int v22_2 = v9_0.i; + v48_7 = ((java.util.Iterator) v9_0.g); + int v49_2 = ((z7.h0) v9_0.f); + long v24_3 = v9_0.e; + String v50_1 = v9_0.d; + Exception v3_53 = ((byte[]) v9_0.c); + try { + q6.y.Y(v23_1); + v1_0 = v4_29; + v34_2 = "0000fef5-0000-1000-8000-00805f9b34fb"; + v23_0 = v13_1; + v38_0 = "457871e8-d516-4ca1-9116-57d0b17b9cb2"; + v14_3 = v21_7; + v12_9 = v5_11; + v13_1 = v11_3; + v5_2 = v22_2; + v11_0 = v50_1; + v22_0 = v3_53; + v3_1 = v10_15; + v10_7 = v0_23; + v0_15 = v20_2; + v20_0 = v2_0; + v2_0 = v24_3; + v24_1 = "9d84b9a3-000c-49d8-9183-855b673fda31"; + v15_5 = v9_0; + v9_4 = v8_11; + v7_1 = v6_6; + v6_4 = v49_2; + } catch (kotlinx.coroutines.TimeoutCancellationException) { + v11_0 = v50_1; + } catch (long v0_14) { + v11_0 = v50_1; + } catch (long v0_8) { + v11_0 = v50_1; + } catch (long v0_9) { + v11_0 = v50_1; + } + break; + case 11: + v0_15 = v9_0.o; + Object v4_13 = v9_0.m; + v5_2 = v9_0.q; + int v7_3 = v9_0.l; + int v8_5 = v9_0.k; + v11_1 = v9_0.j; + int v20_1 = v9_0.n; + v21_6 = v9_0.i; + long v48_6 = ((z7.h0) v9_0.f); + int v22_1 = v9_0.e; + long v24_2 = v9_0.d; + Exception v3_38 = ((byte[]) v9_0.c); + q6.y.Y(v23_1); + v32_4 = v5_2; + v34_0 = "0000fef5-0000-1000-8000-00805f9b34fb"; + v38_0 = "457871e8-d516-4ca1-9116-57d0b17b9cb2"; + v6_2 = v20_1; + v1_0 = v22_1; + v14_4 = v24_2; + v20_0 = v2_0; + v22_0 = v3_38; + v12_6 = v4_13; + v3_1 = v10_15; + v24_1 = "9d84b9a3-000c-49d8-9183-855b673fda31"; + v2_0 = v23_1; + v10_14 = v7_3; + v15_5 = v9_0; + v23_0 = v13_1; + v7_2 = v48_6; + v13_1 = v8_5; + break; + case 12: + v0_2 = v9_0.m; + Throwable v5_31 = v9_0.l; + v6_0 = v9_0.k; + int v7_30 = v9_0.j; + v8_0 = v9_0.i; + long v11_17 = ((z7.h0) v9_0.f); + long v14_27 = v9_0.e; + String v15_19 = v9_0.d; + int v20_5 = v9_0.q; + Exception v3_0 = ((byte[]) v9_0.c); + try { + q6.y.Y(v23_1); + v15_0 = v11_17; + v11_0 = v15_19; + v22_0 = v3_0; + v1_0 = v7_30; + v3_1 = v10_15; + v7_0 = v5_31; + v4_2 = v20_5; + v20_0 = v2_0; + v2_0 = v23_1; + v23_0 = v13_1; + v13_0 = v14_27; + v14_1 = "8082caa8-41a6-4021-91c6-56f9b954cc34"; + } catch (kotlinx.coroutines.TimeoutCancellationException) { + v4_12 = v2_0; + v10_0 = v13_0; + v11_0 = v15_0; + } catch (long v0_14) { + v10_0 = v13_0; + v11_0 = v15_0; + } catch (long v0_8) { + v20_0 = v2_0; + v10_0 = v13_0; + v11_0 = v15_0; + } catch (long v0_9) { + v10_0 = v13_0; + v11_0 = v15_0; + } + break; + case 13: + long v0_33 = v9_0.m; + Throwable v5_21 = v9_0.l; + v6_0 = v9_0.k; + int v7_22 = v9_0.j; + int v8_14 = v9_0.i; + long v14_18 = ((z7.h0) v9_0.f); + String v15_10 = v9_0.e; + v11_0 = v9_0.d; + Throwable v18_1 = v9_0.q; + Exception v3_78 = ((byte[]) v9_0.c); + q6.y.Y(v23_1); + v1_0 = v0_33; + v20_0 = v2_0; + v22_0 = v3_78; + v3_1 = v10_15; + v0_5 = v15_10; + v2_0 = v23_1; + v10_5 = v9_0; + v23_0 = v13_1; + v13_1 = v14_18; + v14_1 = "8082caa8-41a6-4021-91c6-56f9b954cc34"; + v9_1 = v8_14; + v8_1 = v7_22; + v7_0 = v5_21; + v4_4 = v18_1; + break; + case 14: + v3_4 = v9_0.q; + long v0 = ((z7.h0) v9_0.f); + v0_5 = v9_0.e; + Throwable v5_19 = v9_0.d; + try { + q6.y.Y(v23_1); + v20_0 = v2_0; + v11_0 = v5_19; + v23_0 = v13_1; + } catch (kotlinx.coroutines.TimeoutCancellationException) { + v4_12 = v2_0; + v11_0 = v5_19; + } catch (long v0_14) { + v11_0 = v5_19; + } catch (long v0_8) { + v20_0 = v2_0; + v11_0 = v5_19; + } catch (long v0_9) { + v11_0 = v5_19; + } + break; + default: + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } + } catch (kotlinx.coroutines.TimeoutCancellationException) { + } catch (long v0_14) { + } catch (long v0_8) { + } catch (long v0_9) { + } catch (kotlinx.coroutines.TimeoutCancellationException) { + v4_12 = v2_0; + v11_0 = v7_10; + } catch (long v0_14) { + v11_0 = v7_10; + } catch (long v0_8) { + v20_0 = v2_0; + v11_0 = v7_10; + } catch (long v0_9) { + v11_0 = v7_10; + } catch (kotlinx.coroutines.TimeoutCancellationException) { + v4_12 = v2_0; + v10_0 = v13_1; + v11_0 = v24_1; + } catch (long v0_14) { + v10_0 = v13_1; + v11_0 = v24_1; + } catch (long v0_8) { + v20_0 = v2_0; + v10_0 = v13_1; + v11_0 = v24_1; + } catch (long v0_9) { + v10_0 = v13_1; + v11_0 = v24_1; + } catch (kotlinx.coroutines.TimeoutCancellationException) { + } catch (long v0_14) { + } catch (long v0_8) { + } catch (long v0_9) { + } catch (kotlinx.coroutines.TimeoutCancellationException) { + v1_0 = this; + } catch (long v0_14) { + v1_0 = this; + } catch (long v0_8) { + v1_0 = this; + } catch (long v0_9) { + v1_0 = this; + } catch (kotlinx.coroutines.TimeoutCancellationException) { + v1_0 = this; + v10_0 = v23_0; + } catch (kotlinx.coroutines.TimeoutCancellationException) { + } catch (kotlinx.coroutines.TimeoutCancellationException) { + } catch (kotlinx.coroutines.TimeoutCancellationException) { + v20_0 = v2_0; + } catch (long v0_14) { + v1_0 = this; + } catch (long v0_8) { + v1_0 = this; + } catch (long v0_9) { + v1_0 = this; + } + v10_0.closeOtaChannel(v11_0); + v1_0.i = 0; + return p6.a0.a; + } + + public final void g(a7.c p6) + { + do { + boolean v0_0 = this.e; + Object v1 = v0_0.getValue(); + int v2_0 = ((a8.j) v1); + if ((v2_0 == 0) || (v2_0.b() != 1)) { + if (v2_0 == 0) { + v2_0 = 0; + } else { + v2_0 = ((a8.j) p6.invoke(v2_0)); + } + } + } while(!v0_0.compareAndSet(v1, v2_0)); + return; + } +} diff --git a/analysis/apk/decomp/a9_c2.java b/analysis/apk/decomp/a9_c2.java new file mode 100644 index 0000000..33fe60b --- /dev/null +++ b/analysis/apk/decomp/a9_c2.java @@ -0,0 +1,166 @@ +package a9; +public final class c2 extends kotlin.coroutines.jvm.internal.SuspendLambda implements a7.e { + public final synthetic int c; + public int d; + public final synthetic String e; + + public synthetic c2(String p1, kotlin.coroutines.Continuation p2, int p3) + { + this.c = p3; + this.e = p1; + super(2, p2); + return; + } + + public final kotlin.coroutines.Continuation create(Object p3, kotlin.coroutines.Continuation p4) + { + switch (this.c) { + case 0: + return new a9.c2(this.e, p4, 0); + case 1: + return new a9.c2(this.e, p4, 1); + case 2: + return new a9.c2(this.e, p4, 2); + case 3: + return new a9.c2(this.e, p4, 3); + case 4: + return new a9.c2(this.e, p4, 4); + default: + return new a9.c2(this.e, p4, 5); + } + } + + public final Object invoke(Object p2, Object p3) + { + switch (this.c) { + case 0: + return ((a9.c2) this.create(((kotlinx.coroutines.CoroutineScope) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + case 1: + return ((a9.c2) this.create(((kotlinx.coroutines.CoroutineScope) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + case 2: + return ((a9.c2) this.create(((kotlinx.coroutines.CoroutineScope) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + case 3: + return ((a9.c2) this.create(((kotlinx.coroutines.CoroutineScope) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + case 4: + return ((a9.c2) this.create(((kotlinx.coroutines.CoroutineScope) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + default: + return ((a9.c2) this.create(((kotlinx.coroutines.CoroutineScope) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + } + } + + public final Object invokeSuspend(Object p7) + { + k8.b v2_0 = n8.j.a; + int v3_0 = this.e; + switch (this.c) { + case 0: + Object v0_6 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + k8.b v2_4 = this.d; + if (v2_4 == null) { + q6.y.Y(p7); + this.d = 1; + p7 = k8.h.c("https://qbsg.top/api/activation/check", v3_0, this); + if (p7 == v0_6) { + p7 = v0_6; + } + } else { + if (v2_4 != 1) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + q6.y.Y(p7); + } + } + return p7; + case 1: + Object v0_4 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + k8.b v2_3 = this.d; + if (v2_3 == null) { + q6.y.Y(p7); + this.d = 1; + p7 = k8.h.c("https://qbsg.top/api/activation/check", v3_0, this); + if (p7 == v0_4) { + p7 = v0_4; + } + } else { + if (v2_3 != 1) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + q6.y.Y(p7); + } + } + return p7; + case 2: + Object v0_3 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + kotlinx.coroutines.CoroutineDispatcher v1_4 = this.d; + if (v1_4 == null) { + q6.y.Y(p7); + this.d = 1; + p7 = k8.h.c("https://qbsg.top/api/activation/activate", v3_0, this); + if (p7 == v0_3) { + p7 = v0_3; + } + } else { + if (v1_4 != 1) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + q6.y.Y(p7); + } + } + return p7; + case 3: + Object v0_2 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + kotlinx.coroutines.CoroutineDispatcher v1_2 = this.d; + if (v1_2 == null) { + q6.y.Y(p7); + this.d = 1; + p7 = kotlinx.coroutines.BuildersKt.withContext(kotlinx.coroutines.Dispatchers.getIO(), new k8.b(q6.y.T(v3_0), 0), this); + if (p7 == v0_2) { + p7 = v0_2; + } + } else { + if (v1_2 != 1) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + q6.y.Y(p7); + } + } + return p7; + case 4: + Object v0_5 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + kotlinx.coroutines.CoroutineDispatcher v1_5 = this.d; + if (v1_5 == null) { + q6.y.Y(p7); + this.d = 1; + p7 = v2_0.c(v3_0, this); + if (p7 == v0_5) { + p7 = v0_5; + } + } else { + if (v1_5 != 1) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + q6.y.Y(p7); + } + } + return p7; + default: + Object v0_1 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + kotlinx.coroutines.CoroutineDispatcher v1_1 = this.d; + if (v1_1 == null) { + q6.y.Y(p7); + this.d = 1; + p7 = v2_0.d(v3_0, this); + if (p7 == v0_1) { + p7 = v0_1; + } + } else { + if (v1_1 != 1) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + q6.y.Y(p7); + } + } + return p7; + } + } +} diff --git a/analysis/apk/decomp/a_b.java b/analysis/apk/decomp/a_b.java new file mode 100644 index 0000000..9bd169b --- /dev/null +++ b/analysis/apk/decomp/a_b.java @@ -0,0 +1,2012 @@ +package a; +public abstract class b { + public static boolean a = False; + public static reflect.Method b; + public static i2.f c; + + public static j8.a A(j8.c p1, String p2, boolean p3) + { + kotlin.jvm.internal.s.f(p2, "relativePath"); + j8.a v1_3 = a.b.F(p1, p2); + java.io.FileOutputStream v2_1 = v1_3.getParentFile(); + if (v2_1 != null) { + v2_1.mkdirs(); + } + return new j8.a(new java.io.FileOutputStream(v1_3, p3)); + } + + public static byte[] B(j8.c p1, String p2) + { + kotlin.jvm.internal.s.f(p2, "relativePath"); + byte[] v1_1 = a.b.F(p1, p2); + if ((!v1_1.exists()) || (!v1_1.isFile())) { + v1_1 = 0; + } + if (v1_1 == null) { + return 0; + } else { + return y6.k.u(v1_1); + } + } + + public static final b9.r C(b9.w p7, boolean p8, e1.n0 p9, int p10) + { + int v10_2; + kotlin.jvm.internal.s.f(p7, "devicesViewModel"); + String v3 = p7.c; + a7.c v0_4 = p9.i(p7); + if (((((p10 & 112) ^ 48) <= 32) || (!p9.h(p8))) && ((p10 & 48) != 32)) { + v10_2 = 0; + } else { + v10_2 = 1; + } + int v10_3 = (v10_2 | v0_4); + a7.c v0_1 = p9.O(); + if ((v10_3 != 0) || (v0_1 == e1.n.a)) { + v0_1 = new b9.p0(p7, p8, 0); + p9.k0(v0_1); + } + a7.c v0_3 = ((a7.c) v0_1); + androidx.lifecycle.w0 v2_0 = u4.a.a(p9); + if (v2_0 == null) { + throw new IllegalStateException("No ViewModelStoreOwner was provided via LocalViewModelStoreOwner"); + } else { + b9.r v7_6; + kotlin.jvm.internal.i v1_1 = kotlin.jvm.internal.g0.a(b9.r); + String v8_3 = new l.b(1); + v8_3.a(kotlin.jvm.internal.g0.a(b9.r), v0_3); + t4.c v4 = v8_3.b(); + if (!(v2_0 instanceof androidx.lifecycle.k)) { + v7_6 = t4.a.b; + } else { + v7_6 = ((b.l) ((androidx.lifecycle.k) v2_0)).e(); + } + return ((b9.r) u2.b.q(v1_1, v2_0, v3, v4, v7_6, p9)); + } + } + + public static final y0.m1 D(long p21, boolean p23, boolean p24, b2.x p25, b2.x p26, b2.x p27, b2.x p28, b2.x p29, b2.x p30, f6.g p31, double p32, i6.a p34, m6.a p35, a7.c p36, e1.n0 p37, int p38, int p39) + { + b2.x v10; + if ((p39 & 16) == 0) { + v10 = p26; + } else { + v10 = 0; + } + b2.x v11; + if ((p39 & 32) == 0) { + v11 = p27; + } else { + v11 = 0; + } + b2.x v12; + if ((p39 & 64) == 0) { + v12 = p28; + } else { + v12 = 0; + } + b2.x v13; + if ((p39 & 128) == 0) { + v13 = p29; + } else { + v13 = 0; + } + b2.x v14; + if ((p39 & 256) == 0) { + v14 = p30; + } else { + v14 = 0; + } + e1.f v1_2; + double v2_3 = (p37.f(p21) | p37.h(p23)); + boolean v3_4 = p37.h(p24); + if (((((p38 & 7168) ^ 3072) <= 2048) || (!p37.g(p25))) && ((p38 & 3072) != 2048)) { + v1_2 = 0; + } else { + v1_2 = 1; + } + e1.f v1_13 = (((((((((((v1_2 | (v2_3 | v3_4)) | p37.g(v10)) | p37.g(v11)) | p37.g(v12)) | p37.g(v13)) | p37.g(v14)) | p37.e(p31.ordinal())) | p37.c(p32)) | p37.e(p34.ordinal())) | p37.e(p35.ordinal())) | p37.g(p36)); + y0.m1 v15_1 = p37.O(); + if ((v1_13 != null) || (v15_1 == e1.n.a)) { + v15_1 = a.b.q(p21, p23, p24, p25, v10, v11, v12, v13, v14, p31, p32, p34, p35, p36); + p37.k0(v15_1); + } + return ((y0.m1) v15_1); + } + + public static boolean E(String p2, String p3) + { + boolean v0_0 = j8.c.c; + kotlin.jvm.internal.s.f(p2, "sourceRelativePath"); + kotlin.jvm.internal.s.f(p3, "targetRelativePath"); + boolean v2_3 = a.b.F(v0_0, p2); + java.io.File v3_1 = a.b.F(v0_0, p3); + if (v2_3.exists()) { + boolean v0_2 = v3_1.getParentFile(); + if (v0_2) { + v0_2.mkdirs(); + } + if (v3_1.exists()) { + v3_1.delete(); + } + return v2_3.renameTo(v3_1); + } else { + return 0; + } + } + + public static java.io.File F(j8.c p3, String p4) + { + String v4_2 = i7.p.i0(p4, 92, 47); + java.io.File v0_6 = new char[1]; + v0_6[0] = 47; + String v4_1 = i7.i.D0(i7.i.T0(v4_2, v0_6), "./"); + if (v4_1.length() != 0) { + return new java.io.File(a.b.G(p3), v4_1); + } else { + return a.b.G(p3); + } + } + + public static java.io.File G(j8.c p2) + { + String v0_1 = w7.w.g(); + b3.e v2_5 = p2.ordinal(); + if (v2_5 == null) { + b3.e v2_6 = v0_1.getDataDir(); + kotlin.jvm.internal.s.e(v2_6, "getDataDir(...)"); + return v2_6; + } else { + if (v2_5 == 1) { + b3.e v2_1 = v0_1.getFilesDir(); + kotlin.jvm.internal.s.e(v2_1, "getFilesDir(...)"); + return v2_1; + } else { + if (v2_5 != 2) { + throw new b3.e(); + } else { + b3.e v2_4 = v0_1.getCacheDir(); + kotlin.jvm.internal.s.e(v2_4, "getCacheDir(...)"); + return v2_4; + } + } + } + } + + public static final b2.n H(e9.a p1, String p2) + { + kotlin.jvm.internal.s.f(p1, "runtimeShader"); + android.graphics.RenderEffect v1_2 = b.b.c(p1.a, p2); + kotlin.jvm.internal.s.e(v1_2, "createRuntimeShaderEffect(...)"); + return new b2.n(v1_2); + } + + public static String K(long p4) + { + String v0_4 = ((int) (p4 >> 32)); + String v4_8 = ((int) (p4 & 4294967295)); + if (Float.intBitsToFloat(v0_4) != Float.intBitsToFloat(v4_8)) { + StringBuilder v5_2 = new StringBuilder("CornerRadius.elliptical("); + v5_2.append(c7.a.W(Float.intBitsToFloat(v0_4))); + v5_2.append(", "); + v5_2.append(c7.a.W(Float.intBitsToFloat(v4_8))); + v5_2.append(41); + return v5_2.toString(); + } else { + String v4_5 = new StringBuilder("CornerRadius.circular("); + v4_5.append(c7.a.W(Float.intBitsToFloat(v0_4))); + v4_5.append(41); + return v4_5.toString(); + } + } + + public static final int L(String p16) + { + c7.a.l(16); + StringBuilder v2_0 = p16.length(); + p6.r v3_1 = 0; + if (v2_0 != null) { + int v6_2; + int v4_3 = 0; + int v5_6 = p16.charAt(0); + if (kotlin.jvm.internal.s.g(v5_6, 48) >= 0) { + v6_2 = 0; + } else { + v6_2 = 1; + if ((v2_0 == 1) || (v5_6 != 43)) { + if (v3_1 == null) { + StringBuilder v2_2 = new StringBuilder("Invalid number format: \'"); + v2_2.append(p16); + v2_2.append(39); + throw new NumberFormatException(v2_2.toString()); + } else { + return v3_1.c; + } + } + } + int v5_0 = 119304647; + int v7_1 = 119304647; + while (v6_2 < v2_0) { + int v8_1 = Character.digit(p16.charAt(v6_2), 16); + if (v8_1 >= 0) { + int v15; + int v10 = (v4_3 ^ -2147483648); + if (Integer.compare(v10, (v7_1 ^ -2147483648)) <= 0) { + v15 = v6_2; + } else { + if (v7_1 != v5_0) { + } else { + v15 = v6_2; + v7_1 = ((int) ((((long) -1) & 4294967295) / (((long) 16) & 4294967295))); + if (Integer.compare(v10, (v7_1 ^ -2147483648)) > 0) { + } + } + } + int v4_0 = (v4_3 * 16); + int v5_5 = (v4_0 + v8_1); + if (Integer.compare((v5_5 ^ -2147483648), (v4_0 ^ -2147483648)) >= 0) { + v6_2 = (v15 + 1); + v4_3 = v5_5; + v5_0 = 119304647; + } + } + } + v3_1 = new p6.r(v4_3); + } + } + + public static final long M() + { + long v0_0 = java.util.Calendar.getInstance(); + v0_0.set(11, 0); + v0_0.set(12, 0); + v0_0.set(13, 0); + v0_0.set(14, 0); + return v0_0.getTimeInMillis(); + } + + public static final void N(d3.s p9, int p10, c3.i p11) + { + int v1_1 = new d3.s[16]; + f1.e v0_1 = new f1.e(v1_1); + java.util.List v9_6 = p9.i(0, 0); + while(true) { + v0_1.d(v0_1.e, v9_6); + java.util.List v9_7 = v0_1.e; + if (v9_7 == null) { + return; + } else { + java.util.List v9_3 = ((d3.s) v0_1.k((v9_7 - 1))); + c3.j v3_0 = v9_3.d; + int v4_0 = v3_0.c; + if ((!d3.v.g(v9_3)) && (!v4_0.c(d3.w.j))) { + v2.f1 v2_3 = v9_3.d(); + if (v2_3 == null) { + throw p.p1.f("Expected semantics node to have a coordinator."); + } else { + s3.k v6_1 = q6.y.R(t2.x.f(v2_3, 1)); + if ((v6_1.a < v6_1.c) && (v6_1.b < v6_1.d)) { + c3.j v3_2 = v3_0.c.g(d3.n.e); + d3.l v7_3 = 0; + if (v3_2 == null) { + v3_2 = 0; + } + c3.j v3_3 = ((a7.e) v3_2); + int v4_1 = v4_0.g(d3.w.w); + if (v4_1 != 0) { + v7_3 = v4_1; + } + d3.l v7_4 = ((d3.l) v7_3); + if ((v3_3 != null) && ((v7_4 != null) && (((Number) v7_4.b.invoke()).floatValue() > 0))) { + break; + } + v9_6 = v9_3.i(0, 0); + } + } + } + } + do { + } while((v6_1.a >= v6_1.c) && (v6_1.b < v6_1.d)); + } + int v5_1 = (1 + p10); + p11.invoke(new c3.j(v9_3, v5_1, v6_1, v2_3)); + a.b.N(v9_3, v5_1, p11); + } + + public static void O(j8.c p1, String p2, byte[] p3) + { + kotlin.jvm.internal.s.f(p2, "relativePath"); + kotlin.jvm.internal.s.f(p3, "bytes"); + java.io.File v1_1 = a.b.F(p1, p2); + java.io.File v2_1 = v1_1.getParentFile(); + if (v2_1 != null) { + v2_1.mkdirs(); + } + y6.k.w(v1_1, p3); + return; + } + + public static final android.graphics.BlurMaskFilter a(float p2) + { + return new android.graphics.BlurMaskFilter(p2, android.graphics.BlurMaskFilter$Blur.NORMAL); + } + + public static final void b(b0.a0 p37, b0.v p38, u1.q p39, w.p1 p40, s.q1 p41, boolean p42, p.s1 p43, float p44, float p45, a7.c p46, e1.n0 p47, int p48, int p49) + { + u1.q v0_1; + e1.d2 v13_1 = s.n2.c; + p47.b0(-1904835166); + if ((p48 & 6) != 0) { + v0_1 = p48; + } else { + u1.q v0_13; + if (!p47.g(p37)) { + v0_13 = 2; + } else { + v0_13 = 4; + } + v0_1 = (v0_13 | p48); + } + if ((p48 & 48) == 0) { + int v6_23; + if (!p47.e(0)) { + v6_23 = 16; + } else { + v6_23 = 32; + } + v0_1 |= v6_23; + } + if ((p48 & 384) == 0) { + int v6_46; + if ((p48 & 512) != 0) { + v6_46 = p47.i(p38); + } else { + v6_46 = p47.g(p38); + } + int v6_48; + if (v6_46 == 0) { + v6_48 = 128; + } else { + v6_48 = 256; + } + v0_1 |= v6_48; + } + if ((p48 & 3072) == 0) { + int v6_54; + if (!p47.g(p39)) { + v6_54 = 1024; + } else { + v6_54 = 2048; + } + v0_1 |= v6_54; + } + if ((p48 & 24576) == 0) { + int v6_57; + if (!p47.g(p40)) { + v6_57 = 8192; + } else { + v6_57 = 16384; + } + v0_1 |= v6_57; + } + if ((p48 & 196608) == 0) { + int v18_2; + if (!p47.h(0)) { + v18_2 = 65536; + } else { + v18_2 = 131072; + } + v0_1 |= v18_2; + } + if ((p48 & 1572864) == 0) { + int v21_1; + if (!p47.g(p41)) { + v21_1 = 524288; + } else { + v21_1 = 1048576; + } + v0_1 |= v21_1; + } + if ((p48 & 12582912) == 0) { + int v21_5; + if (!p47.h(p42)) { + v21_5 = 4194304; + } else { + v21_5 = 8388608; + } + v0_1 |= v21_5; + } + if ((p48 & 100663296) == 0) { + int v23_4; + if (!p47.g(p43)) { + v23_4 = 33554432; + } else { + v23_4 = 67108864; + } + v0_1 |= v23_4; + } + if ((p48 & 805306368) == 0) { + int v23_1; + if (!p47.d(p44)) { + v23_1 = 268435456; + } else { + v23_1 = 536870912; + } + v0_1 |= v23_1; + } + u1.q v0_3; + int v23_2 = v0_1; + if ((p49 & 6) != 0) { + v0_3 = p49; + } else { + int v16_0; + if (!p47.d(p45)) { + v16_0 = 2; + } else { + v16_0 = 4; + } + v0_3 = (p49 | v16_0); + } + if ((p49 & 48) == 0) { + a0.d1 v17_0; + if (!p47.i(p46)) { + v17_0 = 16; + } else { + v17_0 = 32; + } + v0_3 |= v17_0; + } + a0.s v3_2; + int v25_0 = v0_3; + int v26 = 1; + if (((v23_2 & 306783379) == 306783378) && ((v25_0 & 19) == 18)) { + v3_2 = 0; + } else { + v3_2 = 1; + } + int v6_0; + if (!p47.R((v23_2 & 1), v3_2)) { + v6_0 = p37; + p47.U(); + } else { + p47.W(); + if (((p48 & 1) != 0) && (!p47.A())) { + p47.U(); + } + u1.q v0_11; + p47.r(); + int v27 = (v23_2 & 14); + a0.s v3_7 = (v27 | (v25_0 & 112)); + int v7_2 = e1.t.t(p46, p47); + if (((((v3_7 & 14) ^ 6) <= 4) || (!p47.g(p37))) && ((v3_7 & 6) != 4)) { + v0_11 = 0; + } else { + v0_11 = 1; + } + a0.s v3_9 = p47.O(); + e1.f v12_0 = e1.n.a; + if ((v0_11 != null) || (v3_9 == v12_0)) { + u1.q v0_12 = e1.f.d; + v3_9 = new b0.g(0, 0, e1.a3, e1.t.i(new a0.f2(4, e1.t.i(new a9.u3(v7_2, 8), v0_12), p37), v0_12), "value", "getValue()Ljava/lang/Object;"); + p47.k0(v3_9); + } + a0.s v3_13 = ((g7.k) v3_9); + u1.q v0_14 = p47.O(); + if (v0_14 == v12_0) { + v0_14 = e1.h0.g(kotlin.coroutines.EmptyCoroutineContext.INSTANCE, p47); + p47.k0(v0_14); + } + int v6_15; + int v7_5 = ((b2.e0) p47.k(w2.l1.g)); + u1.q v0_18 = (v23_2 >> 6); + kotlinx.coroutines.CoroutineScope v28_2 = ((kotlinx.coroutines.CoroutineScope) v0_14); + int v31_1 = (v23_2 >> 12); + u1.q v0_24 = ((((((v0_18 & 7168) | (v27 | (v0_18 & 896))) | ((v23_2 << 9) & 57344)) | (v31_1 & 458752)) | ((v25_0 << 18) & 3670016)) | ((v23_2 << 18) & 234881024)); + if (((((v0_24 & 14) ^ 6) <= 4) || (!p47.g(p37))) && ((v0_24 & 6) != 4)) { + v6_15 = 0; + } else { + v6_15 = 1; + } + u1.q v1_2; + int v6_16 = (v6_15 | p47.g(v3_13)); + if (((((v0_24 & 896) ^ 384) <= 256) || (!p47.g(p40))) && ((v0_24 & 384) != 256)) { + v1_2 = 0; + } else { + v1_2 = 1; + } + if (((((v0_24 & 7168) ^ 3072) <= 2048) || (!p47.h(0))) && ((v0_24 & 3072) != 2048)) { + int v6_22 = 0; + } else { + v6_22 = 1; + } + if (((((v0_24 & 57344) ^ 24576) <= 16384) || (!p47.e(0))) && ((v0_24 & 24576) != 16384)) { + int v6_28 = 0; + } else { + v6_28 = 1; + } + if (((((v0_24 & 458752) ^ 196608) <= 131072) || (!p47.d(p44))) && ((v0_24 & 196608) != 131072)) { + int v6_33 = 0; + } else { + v6_33 = 1; + } + if (((((v0_24 & 3670016) ^ 1572864) <= 1048576) || (!p47.d(p45))) && ((v0_24 & 1572864) != 1048576)) { + int v6_39 = 0; + } else { + v6_39 = 1; + } + if (((((v0_24 & 234881024) ^ 100663296) <= 67108864) || (!p47.g(p38))) && ((v0_24 & 100663296) != 67108864)) { + u1.q v0_26 = 0; + } else { + v0_26 = 1; + } + g7.k v14_11; + u1.q v1_10; + u1.q v0_29; + u1.q v0_28 = ((v0_26 | (((((v1_2 | v6_16) | v6_22) | v6_28) | v6_33) | v6_39)) | p47.g(v7_5)); + u1.q v1_9 = p47.O(); + if ((v0_28 == null) && (v1_9 != v12_0)) { + v0_29 = v1_9; + v14_11 = v3_13; + v1_10 = p37; + } else { + v1_10 = p37; + v0_29 = new b0.o(p37, p38, v3_13, p40, p44, v28_2, v7_5); + v14_11 = v3_13; + p47.k0(v0_29); + } + int v6_45; + a0.d1 v17_5 = ((a0.d1) v0_29); + u1.q v0_32 = (v27 | (v31_1 & 112)); + if (((((v0_32 & 14) ^ 6) <= 4) || (!p47.g(v1_10))) && ((v0_32 & 6) != 4)) { + v6_45 = 0; + } else { + v6_45 = 1; + } + if (((((v0_32 & 112) ^ 48) <= 32) || (!p47.h(0))) && ((v0_32 & 48) != 32)) { + u1.q v0_34 = 0; + } else { + v0_34 = 1; + } + u1.q v0_35 = (v0_34 | v6_45); + a0.n1 v2_8 = p47.O(); + if ((v0_35 != null) || (v2_8 == v12_0)) { + v2_8 = new b0.u(v1_10); + p47.k0(v2_8); + } + u1.q v0_37; + a0.n1 v2_10 = ((b0.u) v2_8); + if (!p42) { + p47.a0(-1834291488); + p47.q(0); + v0_37 = u1.n.a; + } else { + p47.a0(-1834596342); + if ((((v27 ^ 6) <= 4) || (!p47.g(v1_10))) && ((v23_2 & 6) != 4)) { + v26 = 0; + } + u1.q v0_42 = p47.O(); + if ((v26 != 0) || (v0_42 == v12_0)) { + v0_42 = new b0.a(v1_10); + p47.k0(v0_42); + } + v0_37 = a0.u.n(((b0.a) v0_42), v1_10.k, v13_1); + p47.q(0); + } + v6_0 = v1_10; + a0.u.a(v14_11, p.n.u(a0.u.o(p39.c(v1_10.i).c(v1_10.j), v14_11, v2_10, v13_1, p42).c(v0_37).c(v1_10.t.k), v1_10, v13_1, p43, p42, p41, v1_10.r, 0), v6_0.m, v17_5, p47, 0); + } + e1.d2 v13_0 = p47.t(); + if (v13_0 != null) { + v13_0.d = new b0.i(v6_0, p38, p39, p40, p41, p42, p43, p44, p45, p46, p48, p49); + } + return; + } + + public static final void c(boolean p16, a7.e p17, e1.n0 p18, int p19) + { + int v2_5; + p18.b0(-642000585); + if ((p19 & 6) != 0) { + v2_5 = p19; + } else { + int v2_2; + if (!p18.h(p16)) { + v2_2 = 2; + } else { + v2_2 = 4; + } + v2_5 = (v2_2 | p19); + } + if ((p19 & 48) == 0) { + a7.c v4_14; + if (!p18.i(p17)) { + v4_14 = 16; + } else { + v4_14 = 32; + } + v2_5 |= v4_14; + } + a7.c v4_16; + int v7_0 = 1; + if ((v2_5 & 19) == 18) { + v4_16 = 0; + } else { + v4_16 = 1; + } + if (!p18.R((v2_5 & 1), v4_16)) { + p18.U(); + } else { + a7.c v4_20 = ((w4.c) p18.k(x4.a.a)); + if (v4_20 != null) { + p18.a0(1512737723); + } else { + p18.a0(1512740606); + v4_20 = c.l.a(p18); + } + p18.q(0); + if (v4_20 == null) { + throw new IllegalStateException("No NavigationEventDispatcherOwner was provided via LocalNavigationEventDispatcherOwner and no OnBackPressedDispatcherOwner was provided via LocalOnBackPressedDispatcherOwner. Please provide one of the two."); + } else { + a7.c v5_11 = p18.g(v4_20); + d.c v10_0 = p18.O(); + e1.f v11 = e1.n.a; + if ((v5_11 != null) || (v10_0 == v11)) { + a7.c v5_13; + b.g0 v12_0 = 0; + if (!(v4_20 instanceof w4.c)) { + v5_13 = 0; + } else { + v5_13 = ((w4.c) v4_20); + } + a7.c v5_15; + if (v5_13 == null) { + v5_15 = 0; + } else { + v5_15 = v5_13.c(); + } + long v13_1; + if (!(v4_20 instanceof b.i0)) { + v13_1 = 0; + } else { + v13_1 = ((b.i0) v4_20); + } + if (v13_1 != 0) { + v12_0 = v13_1.a(); + } + v10_0 = new d.c(v5_15, v12_0); + p18.k0(v10_0); + } + d.c v10_2 = ((d.c) v10_0); + a7.c v5_16 = p18.O(); + if (v5_16 == v11) { + v5_16 = e1.h0.g(kotlin.coroutines.EmptyCoroutineContext.INSTANCE, p18); + p18.k0(v5_16); + } + a7.c v5_18 = ((kotlinx.coroutines.CoroutineScope) v5_16); + b.g0 v12_1 = p18.T; + c.n v14_3 = (p18.g(v10_2) | p18.f(v12_1)); + c.j v15_1 = p18.O(); + if ((v14_3 != null) || (v15_1 == v11)) { + v15_1 = new c.j(v5_18, new c.n(v12_1, v4_20)); + p18.k0(v15_1); + } + c.j v15_2 = ((c.j) v15_1); + p18.a0(-348514256); + a7.c v4_2 = (p18.i(v15_2) | p18.i(p17)); + a7.c v5_1 = p18.O(); + if ((v4_2 != null) || (v5_1 == v11)) { + v5_1 = new a0.f2(7, v15_2, p17); + p18.k0(v5_1); + } + e1.h0.f(((a7.a) v5_1), p18); + a7.c v4_4 = v2_5; + int v2_1 = Boolean.valueOf(p16); + a7.c v5_4 = p18.i(v15_2); + a7.c v4_5 = (v4_4 & 14); + if (v4_5 != 4) { + v7_0 = 0; + } + c.j v3_0 = (v5_4 | v7_0); + a7.c v5_5 = p18.O(); + if ((v3_0 != null) || (v5_5 == v11)) { + v5_5 = new b9.p0(v15_2, p16, 2); + p18.k0(v5_5); + } + c.j v3_2 = v15_2; + k3.t.a(v2_1, v3_2, 0, ((a7.c) v5_5), p18, v4_5); + int v2_4 = (p18.i(v10_2) | p18.i(v3_2)); + a7.c v4_8 = p18.O(); + if ((v2_4 != 0) || (v4_8 == v11)) { + v4_8 = new a0.e(8, v10_2, v3_2); + p18.k0(v4_8); + } + e1.h0.b(v10_2, v3_2, ((a7.c) v4_8), p18); + p18.q(0); + } + } + int v2_7 = p18.t(); + if (v2_7 != 0) { + v2_7.d = new c.d(p16, p17, p19, 2); + } + return; + } + + public static final a2.c d(long p8, long p10) + { + float v2_2 = ((int) (p8 >> 32)); + float v8_3 = ((int) (p8 & 4294967295)); + return new a2.c(Float.intBitsToFloat(v2_2), Float.intBitsToFloat(v8_3), (Float.intBitsToFloat(((int) (p10 >> 32))) + Float.intBitsToFloat(v2_2)), (Float.intBitsToFloat(((int) (p10 & 4294967295))) + Float.intBitsToFloat(v8_3))); + } + + public static String e(j8.c p1, String p2) + { + kotlin.jvm.internal.s.f(p2, "relativePath"); + String v1_2 = a.b.F(p1, p2).getAbsolutePath(); + kotlin.jvm.internal.s.e(v1_2, "getAbsolutePath(...)"); + return v1_2; + } + + public static final void f(e9.a p9, String p10, f9.e p11, boolean p12) + { + kotlin.jvm.internal.s.f(p11, "light"); + String v0_1 = p11.b; + String v2_2 = p11.a; + float v3_2 = (v2_2.a - 1056964608); + float v4_4 = (v2_2.b - 1060320051); + String v2_0 = v2_2.c; + android.graphics.RuntimeShader v5_5 = ((float) Math.sqrt(((double) ((v2_0 * v2_0) + ((v4_4 * v4_4) + (v3_2 * v3_2)))))); + if (v5_5 < 897988541) { + v5_5 = 897988541; + } + float v3_0 = (v3_2 / v5_5); + float v4_0 = (v4_4 / v5_5); + int v6_4 = "lightDir".concat(p10); + String v2_1 = (v2_0 / v5_5); + kotlin.jvm.internal.s.f(v6_4, "name"); + b.b.u(p9.a, v6_4, v3_0, v4_0, v2_1); + String v2_4 = "lightColor".concat(p10); + int v6_5 = 1065353216; + int v7_2 = b2.x.c(1065353216, v0_1); + kotlin.jvm.internal.s.f(v2_4, "name"); + b.b.w(p9.a, v2_4, b2.h0.M(v7_2)); + p9.a("lightIntensity".concat(p10), (b2.x.e(v0_1) * p11.c)); + if (p12 != 0) { + int v11_5 = ((float) Math.sqrt(((double) ((v4_0 * v4_0) + (v3_0 * v3_0))))); + if (v11_5 <= 981668463) { + if (p10.equals("1")) { + v6_5 = -1082130432; + } + p9.b("axis".concat(p10), 0, v6_5); + } else { + p9.b("axis".concat(p10), (v3_0 / v11_5), (v4_0 / v11_5)); + return; + } + } + return; + } + + public static final Object g(v2.j p10, a7.a p11, kotlin.coroutines.jvm.internal.ContinuationImpl p12) + { + int v1_2 = ((u1.p) p10).c.p; + if (v1_2 != 0) { + if (v1_2 == 0) { + s2.a.b("visitAncestors called on an unattached node"); + } + v2.z1 v0_3 = ((u1.p) p10).c.g; + int v1_0 = v2.l.z(p10); + while(true) { + a3.a v2_0 = 0; + if (v1_0 != 0) { + if ((((u1.p) v1_0.H.g).f & 524288) != 0) { + break; + } + v1_0 = v1_0.u(); + if (v1_0 != 0) { + v2.z1 v0_2 = v1_0.H; + if (v0_2 != null) { + v0_3 = ((v2.z1) v0_2.f); + } + } + v0_3 = 0; + } + a3.a v2_1 = ((a3.a) v2_0); + if (v2_1 != null) { + Object v10_1 = v2.l.y(p10); + Object v10_2 = v2_1.K0(v10_1, new a3.b(0, p11, v10_1), p12); + if (v10_2 == kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()) { + return v10_2; + } + } + } + while (v0_3 != null) { + if ((v0_3.e & 524288) != 0) { + a3.a v3_7 = v0_3; + f1.e v5_0 = 0; + while (v3_7 != null) { + if (!(v3_7 instanceof a3.a)) { + if (((v3_7.e & 524288) != 0) && ((v3_7 instanceof v2.k))) { + u1.p v6_6 = ((v2.k) v3_7).r; + int v7 = 0; + while (v6_6 != null) { + if ((v6_6.e & 524288) != 0) { + v7++; + if (v7 != 1) { + if (v5_0 == null) { + u1.p[] v9_3 = new u1.p[16]; + v5_0 = new f1.e(v9_3); + } + if (v3_7 != null) { + v5_0.b(v3_7); + kotlin.coroutines.jvm.internal.Boxing.boxBoolean(1); + v3_7 = 0; + } + v5_0.b(v6_6); + kotlin.coroutines.jvm.internal.Boxing.boxBoolean(1); + } else { + v3_7 = v6_6; + } + } + v6_6 = v6_6.h; + } + if (v7 == 1) { + } + } + v3_7 = v2.l.e(v5_0); + } else { + v2_0 = v3_7; + } + } + } + v0_3 = v0_3.g; + } + } + return p6.a0.a; + } + + public static byte[] h(Object p13, boolean p14) + { + kotlin.jvm.internal.s.f(p13, "bitmap"); + int v1 = ((android.graphics.Bitmap) p13).getWidth(); + byte v0_7 = ((android.graphics.Bitmap) p13).getHeight(); + int v13_4 = g8.f.c(p13); + java.util.ArrayList v2_1 = new java.util.ArrayList(); + int v3 = 0; + int v4 = 0; + int v5_0 = 0; + int v6_0 = 0; + while (v4 < v0_7) { + int v8 = 0; + while (v8 < v1) { + int v9_2 = v13_4[((v4 * v1) + v8)]; + int v10_1 = ((v9_2 >> 16) & 255); + int v11_1 = ((v9_2 >> 8) & 255); + int v9_3 = (v9_2 & 255); + int v12 = 1; + if (p14 != null) { + if ((v10_1 <= 0) || ((v11_1 != 0) || (v9_3 != 0))) { + v12 = 0; + } + } else { + if ((v10_1 <= 0) || ((v11_1 <= 0) || (v9_3 <= 0))) { + } + } + v6_0 = ((v6_0 << 1) | v12); + v5_0++; + if (v5_0 == 8) { + v2_1.add(Integer.valueOf(v6_0)); + v5_0 = 0; + v6_0 = 0; + } + v8++; + } + v4++; + } + if (v5_0 > 0) { + v2_1.add(Integer.valueOf((v6_0 << (8 - v5_0)))); + } + int v13_3 = v2_1.size(); + byte[] v14_1 = new byte[v13_3]; + while (v3 < v13_3) { + v14_1[v3] = ((byte) ((Number) v2_1.get(v3)).intValue()); + v3++; + } + return v14_1; + } + + public static byte[] i(Object p13, boolean p14) + { + kotlin.jvm.internal.s.f(p13, "bitmap"); + int v1 = ((android.graphics.Bitmap) p13).getWidth(); + byte v0_7 = ((android.graphics.Bitmap) p13).getHeight(); + int v13_4 = g8.f.c(p13); + java.util.ArrayList v2_1 = new java.util.ArrayList(); + int v3 = (v1 - 1); + int v4 = 0; + int v5_0 = 0; + int v6_0 = 0; + while (-1 < v3) { + int v7_1 = 0; + while (v7_1 < v0_7) { + int v9_2 = v13_4[((v7_1 * v1) + v3)]; + int v10_1 = ((v9_2 >> 16) & 255); + int v11_1 = ((v9_2 >> 8) & 255); + int v9_3 = (v9_2 & 255); + int v12 = 1; + if (p14 != null) { + if ((v10_1 <= 0) || ((v11_1 != 0) || (v9_3 != 0))) { + v12 = 0; + } + } else { + if ((v10_1 <= 0) || ((v11_1 <= 0) || (v9_3 <= 0))) { + } + } + v6_0 = ((v6_0 << 1) | v12); + v5_0++; + if (v5_0 == 8) { + v2_1.add(Integer.valueOf(v6_0)); + v5_0 = 0; + v6_0 = 0; + } + v7_1++; + } + v3--; + } + if (v5_0 > 0) { + v2_1.add(Integer.valueOf((v6_0 << (8 - v5_0)))); + } + int v13_3 = v2_1.size(); + byte[] v14_1 = new byte[v13_3]; + while (v4 < v13_3) { + v14_1[v4] = ((byte) ((Number) v2_1.get(v4)).intValue()); + v4++; + } + return v14_1; + } + + public static final a0.g1 j(a0.g1 p0, a0.g1 p1) + { + if (p0 != null) { + android.graphics.RenderEffect v0_2 = b2.w0.i(p1.c(), p0.c()); + kotlin.jvm.internal.s.e(v0_2, "createChainEffect(...)"); + p1 = new b2.n(v0_2); + } + return p1; + } + + public static final long k() + { + return System.currentTimeMillis(); + } + + public static final long l(int p2, int p3, int p4) + { + java.util.Calendar v0 = java.util.Calendar.getInstance(); + v0.set(1, p2); + v0.set(2, (p3 - 1)); + v0.set(5, p4); + v0.set(11, 0); + v0.set(12, 0); + v0.set(13, 0); + v0.set(14, 0); + return v0.getTimeInMillis(); + } + + public static boolean m(j8.c p1, String p2) + { + kotlin.jvm.internal.s.f(p2, "relativePath"); + int v1_3 = a.b.F(p1, p2); + if ((v1_3.exists()) && (!v1_3.delete())) { + return 0; + } else { + return 1; + } + } + + public static void n(j8.c p3, String p4) + { + java.io.File[] v3_1 = a.b.F(p3, p4); + if ((!v3_1.exists()) || (!v3_1.isDirectory())) { + v3_1 = 0; + } + if (v3_1 != null) { + java.io.File[] v3_2 = v3_1.listFiles(); + if (v3_2 != null) { + int v4_1 = v3_2.length; + int v0 = 0; + while (v0 < v4_1) { + java.io.File v1 = v3_2[v0]; + if (!v1.isDirectory()) { + v1.delete(); + } else { + y6.k.t(v1); + } + v0++; + } + } + } + return; + } + + public static boolean o(android.view.View p3, android.view.KeyEvent p4) + { + if (android.os.Build$VERSION.SDK_INT < 28) { + int v1_1 = ((h4.q) p3.getTag(2131034213)); + ref.WeakReference v2_1 = 0; + if (v1_1 == 0) { + v1_1 = new h4.q(); + v1_1.a = 0; + v1_1.b = 0; + v1_1.c = 0; + p3.setTag(2131034213, v1_1); + } + ClassCastException v3_1 = v1_1.c; + if ((v3_1 == null) || (v3_1.get() != p4)) { + v1_1.c = new ref.WeakReference(p4); + if (v1_1.b == null) { + v1_1.b = new android.util.SparseArray(); + } + ClassCastException v3_8 = v1_1.b; + if (p4.getAction() == 1) { + int v0_3 = v3_8.indexOfKey(p4.getKeyCode()); + if (v0_3 >= 0) { + v2_1 = ((ref.WeakReference) v3_8.valueAt(v0_3)); + v3_8.removeAt(v0_3); + } + } + if (v2_1 == null) { + v2_1 = ((ref.WeakReference) v3_8.get(p4.getKeyCode())); + } + if (v2_1 != null) { + ClassCastException v3_11 = ((android.view.View) v2_1.get()); + if ((v3_11 != null) && (v3_11.isAttachedToWindow())) { + ClassCastException v3_13 = ((java.util.ArrayList) v3_11.getTag(2131034214)); + if (v3_13 != null) { + int v4_5 = (v3_13.size() - 1); + if (v4_5 >= 0) { + v3_13.get(v4_5).getClass(); + throw new ClassCastException(); + } + } + } + return 1; + } + } + } + return 0; + } + + public static final void p(d2.d p18, e2.c p19) + { + b2.v v1_1 = p18.f0().m(); + int v2_11 = ((e2.c) p18.f0().e); + a0.m2 v3_1 = p19.a; + if (!p19.s) { + p19.a(); + try { + if (!v3_1.K()) { + p19.a.c(p19.b, p19.c, p19, p19.e); + } + } catch (Throwable) { + } + e2.c v4_7; + if (v3_1.J() <= 0) { + v4_7 = 0; + } else { + v4_7 = 1; + } + if (v4_7 != null) { + v1_1.t(); + } + b2.h0 v7_1 = b2.c.a(v1_1); + boolean v13 = v7_1.isHardwareAccelerated(); + if (!v13) { + e2.c v8_24; + e2.c v8_20 = p19.t; + s3.c v11_3 = ((float) ((int) (v8_20 >> 32))); + long v9_7 = ((float) ((int) (v8_20 & 4294967295))); + e2.c v8_23 = v7_1; + long v6_2 = p19.u; + e2.c v10_5 = (((float) ((int) (v6_2 >> 32))) + v11_3); + long v6_6 = (((float) ((int) (v6_2 & 4294967295))) + v9_7); + b2.h0 v7_2 = v3_1.a(); + s3.m v12_1 = v3_1.F(); + b2.v v14_3 = v3_1.M(); + if ((v7_2 >= 1065353216) && ((v14_3 == 3) && ((v12_1 == null) && (v3_1.D() != 1)))) { + v8_23.save(); + v7_1 = v8_23; + v8_24 = v11_3; + } else { + b2.h0 v15_5 = p19.p; + if (v15_5 == null) { + v15_5 = b2.h0.h(); + p19.p = v15_5; + } + v15_5.c(v7_2); + v15_5.d(v14_3); + v15_5.f(v12_1); + v7_1 = v8_23; + v8_24 = v11_3; + v7_1.saveLayer(v8_24, v9_7, v10_5, v6_6, b2.h0.t(v15_5)); + } + v7_1.translate(v8_24, v9_7); + v7_1.concat(v3_1.H()); + } + if ((v13) || (!p19.w)) { + long v6_9 = 0; + } else { + v6_9 = 1; + } + if (v6_9 != 0) { + v1_1.p(); + e2.c v8_0 = p19.d(); + if (!(v8_0 instanceof b2.q0)) { + if (!(v8_0 instanceof b2.r0)) { + if (!(v8_0 instanceof b2.p0)) { + throw new b3.e(); + } else { + v1_1.i(((b2.p0) v8_0).f); + } + } else { + long v9_3 = p19.m; + if (v9_3 == 0) { + v9_3 = b2.m.a(); + p19.m = v9_3; + } else { + v9_3.i(); + } + b2.k.c(v9_3, ((b2.r0) v8_0).f); + v1_1.i(v9_3); + } + } else { + b2.v.h(v1_1, ((b2.q0) v8_0).f); + } + } + if (v2_11 != 0) { + int v2_0 = v2_11.r; + if (!v2_0.a) { + b2.l0.a("Only add dependencies during a tracking"); + } + e2.c v8_10 = ((k.n0) v2_0.d); + if (v8_10 == null) { + if (((e2.c) v2_0.b) == null) { + v2_0.b = p19; + } else { + e2.c v8_14 = new k.n0(); + e2.c v10_1 = ((e2.c) v2_0.b); + kotlin.jvm.internal.s.c(v10_1); + v8_14.a(v10_1); + v8_14.a(p19); + v2_0.d = v8_14; + v2_0.b = 0; + } + } else { + v8_10.a(p19); + } + int v2_1; + e2.c v8_16 = ((k.n0) v2_0.e); + if (v8_16 == null) { + if (((e2.c) v2_0.c) == p19) { + v2_0.c = 0; + v2_1 = 0; + } else { + v2_1 = 1; + } + } else { + v2_1 = (v8_16.l(p19) ^ 1); + } + if (v2_1 != 0) { + p19.q = (p19.q + 1); + } + } + b2.h0 v15_0; + android.graphics.Matrix v18_1; + int v16_0; + if (b2.c.a(v1_1).isHardwareAccelerated()) { + v16_0 = v4_7; + v18_1 = v6_9; + v15_0 = v7_1; + v3_1.g(v1_1); + } else { + int v2_7 = p19.o; + if (v2_7 == 0) { + v2_7 = new d2.b(); + p19.o = v2_7; + } + a0.m2 v3_0 = v2_7.d; + s3.c v5_1 = p19.b; + e2.c v8_19 = p19.c; + long v9_6 = k3.n.X(p19.u); + s3.c v11_0 = v3_0.o(); + s3.m v12_0 = v3_0.t(); + b2.v v14_0 = v3_0.m(); + v18_1 = v6_9; + v15_0 = v7_1; + long v6_1 = v3_0.x(); + v16_0 = v4_7; + e2.c v4_4 = ((e2.c) v3_0.e); + v3_0.L(v5_1); + v3_0.M(v8_19); + v3_0.K(v1_1); + v3_0.N(v9_6); + v3_0.e = p19; + v1_1.p(); + try { + p19.c(v2_7); + v1_1.m(); + v3_0.L(v11_0); + v3_0.M(v12_0); + v3_0.K(v14_0); + v3_0.N(v6_1); + v3_0.e = v4_4; + } catch (Throwable v0_3) { + v1_1.m(); + v3_0.L(v11_0); + v3_0.M(v12_0); + v3_0.K(v14_0); + v3_0.N(v6_1); + v3_0.e = v4_4; + throw v0_3; + } + } + if (v18_1 != null) { + v1_1.m(); + } + if (v16_0 != 0) { + v1_1.q(); + } + if (!v13) { + v15_0.restore(); + } + } + return; + } + + public static final y0.m1 q(long p106, boolean p108, boolean p109, b2.x p110, b2.x p111, b2.x p112, b2.x p113, b2.x p114, b2.x p115, f6.g p116, double p117, i6.a p119, m6.a p120, a7.c p121) + { + y0.m1 v9_3; + kotlin.jvm.internal.s.f(p116, "style"); + kotlin.jvm.internal.s.f(p119, "specVersion"); + kotlin.jvm.internal.s.f(p120, "platform"); + long v10_3 = new j6.b(b2.h0.M(p106)); + switch (p116.ordinal()) { + case 0: + v9_3 = new m6.c(v10_3, p108, p117, p119, p120, 7); + break; + case 1: + v9_3 = new m6.c(v10_3, p108, p117, p119, p120, 5); + break; + case 2: + v9_3 = new m6.c(v10_3, p108, p117, p119, p120, 8); + break; + case 3: + v9_3 = new m6.c(v10_3, p108, p117, p119, p120, 1); + break; + case 4: + v9_3 = new m6.c(v10_3, p108, p117, p119, p120, 6); + break; + case 5: + v9_3 = new m6.c(v10_3, p108, p117, p119, p120, 3); + break; + case 6: + v9_3 = new m6.c(v10_3, p108, p117, p119, p120, 4); + break; + case 7: + v9_3 = new m6.c(v10_3, p108, p117, p119, p120, 2); + break; + case 8: + v9_3 = new m6.c(v10_3, p108, p117, p119, p120, 0); + break; + default: + throw new b3.e(); + } + i6.t v7_90; + long v10_15 = new j6.b(b2.h0.M(p106)); + switch (p116.ordinal()) { + case 0: + v7_90 = m6.d.e; + break; + case 1: + v7_90 = m6.d.d; + break; + case 2: + v7_90 = m6.d.f; + break; + case 3: + v7_90 = m6.d.g; + break; + case 4: + v7_90 = m6.d.j; + break; + case 5: + v7_90 = m6.d.k; + break; + case 6: + v7_90 = m6.d.c; + break; + case 7: + v7_90 = m6.d.h; + break; + case 8: + v7_90 = m6.d.i; + break; + default: + throw new b3.e(); + } + y0.m1 v0_1; + if (p110 == null) { + v0_1 = v9_3.e; + } else { + v0_1 = k6.a.a(p110.a); + } + long v14_0 = v0_1; + y0.m1 v0_2; + if (p111 == null) { + v0_2 = v9_3.f; + } else { + v0_2 = k6.a.a(p111.a); + } + int v15_0 = v0_2; + y0.m1 v0_4; + if (p112 == null) { + v0_4 = v9_3.g; + } else { + v0_4 = k6.a.a(p112.a); + } + long v16_0 = v0_4; + y0.m1 v0_6; + if (p113 == null) { + v0_6 = v9_3.h; + } else { + v0_6 = k6.a.a(p113.a); + } + l6.b v17 = v0_6; + y0.m1 v0_8; + if (p114 == null) { + v0_8 = v9_3.i; + } else { + v0_8 = k6.a.a(p114.a); + } + long v18_0 = v0_8; + y0.m1 v0_10; + if (p115 == null) { + v0_10 = v9_3.k; + } else { + v0_10 = k6.a.a(p115.a); + } + long v1_2; + m6.b v8_1 = new m6.b(v10_15, v7_90, p108, p117, v14_0, v15_0, v16_0, v17, v18_0, p120, p119, v0_10); + y0.m1 v0_12 = i6.v.a; + if ((!p109) || (!p108)) { + v1_2 = k3.n.p(v0_12.a(), v8_1); + } else { + v1_2 = b2.x.b; + } + long v1_17; + long v36 = v1_2; + long v54 = k3.n.p(v0_12.b(), v8_1); + long v58 = k3.n.p(v0_12.c(), v8_1); + long v1_6 = new i6.t(); + v1_6.a = "inverse_on_surface"; + v1_6.b = new i6.i(26); + v1_6.f = new i6.i(27); + v1_6.h = new i6.i(28); + long v1_7 = v1_6.a(); + long v3_7 = new i6.t(); + v3_7.a = "inverse_on_surface"; + v3_7.b = new i6.c(13); + v3_7.c = new i6.c(14); + v3_7.f = new i6.c(15); + v3_7.h = new i6.c(16); + long v52 = k3.n.p(v3_7.a().c().b(v1_7).a(), v8_1); + long v1_11 = new i6.t(); + v1_11.a = "inverse_primary"; + v1_11.b = new i6.i(19); + v1_11.c = new i6.i(20); + v1_11.f = new i6.i(21); + v1_11.h = new i6.i(22); + long v1_12 = v1_11.a(); + long v3_17 = new i6.t(); + v3_17.a = "inverse_primary"; + v3_17.b = new i6.c(24); + v3_17.c = new i6.c(25); + v3_17.f = new i6.c(26); + v3_17.h = new i6.c(27); + long v18_1 = k3.n.p(v3_17.a().c().b(v1_12).a(), v8_1); + long v50 = k3.n.p(v0_12.m(), v8_1); + if ((!p109) || (!p108)) { + v1_17 = k3.n.p(i6.v.g(), v8_1); + } else { + v1_17 = b2.x.d; + } + long v20_1; + long v38 = v1_17; + long v56 = k3.n.p(i6.v.h(), v8_1); + long v60 = k3.n.p(i6.v.i(), v8_1); + long v1_21 = k3.n.p(i6.v.j(), v8_1); + long v16_2 = k3.n.p(i6.v.k(), v8_1); + long v22 = k3.n.p(i6.v.m(), v8_1); + long v26 = k3.n.p(i6.v.n(), v8_1); + if ((!p109) || (!p108)) { + v20_1 = k3.n.p(v0_12.D(), v8_1); + } else { + v20_1 = b2.x.d; + } + long v32_0; + long v42 = v20_1; + long v46 = k3.n.p(i6.v.o(), v8_1); + long v3_25 = new i6.t(); + v3_25.a = "on_tertiary"; + v3_25.b = new i6.k(10); + v3_25.f = new i6.k(11); + v3_25.h = new i6.k(12); + long v3_26 = v3_25.a(); + i6.t v4_8 = new i6.t(); + v4_8.a = "on_tertiary"; + v4_8.b = new i6.d(29); + v4_8.c = new i6.e(0); + v4_8.f = new i6.e(1); + v4_8.h = new i6.e(2); + long v30 = k3.n.p(v4_8.a().c().b(v3_26).a(), v8_1); + long v34 = k3.n.p(i6.v.p(), v8_1); + long v62 = k3.n.p(i6.v.q(), v8_1); + long v64 = k3.n.p(i6.v.r(), v8_1); + long v3_33 = k3.n.p(v0_12.o(), v8_1); + long v20_2 = k3.n.p(v0_12.p(), v8_1); + i6.t v7_16 = new i6.t(); + v7_16.a = "scrim"; + v7_16.b = new i6.g(21); + v7_16.c = new i6.g(22); + long v66 = k3.n.p(v7_16.a(), v8_1); + long v24_0 = k3.n.p(v0_12.s(), v8_1); + long v28_0 = k3.n.p(v0_12.t(), v8_1); + if ((!p109) || (!p108)) { + v32_0 = k3.n.p(v0_12.G(), v8_1); + } else { + v32_0 = b2.x.b; + } + long v40 = v32_0; + i6.t v7_22 = v0_12.o().c(); + v7_22.a = "surface_tint"; + i6.t v7_23 = v7_22.a(); + int v15_6 = new i6.t(); + v15_6.a = "surface_tint"; + v15_6.b = new g3.a0(29); + v15_6.c = new i6.c(0); + v15_6.d = 1; + long v48 = k3.n.p(v15_6.a().c().b(v7_23).a(), v8_1); + long v68 = k3.n.p(v0_12.w(), v8_1); + long v70 = k3.n.p(v0_12.x(), v8_1); + long v72 = k3.n.p(i6.v.s(), v8_1); + long v74 = k3.n.p(v0_12.H(), v8_1); + long v76 = k3.n.p(v0_12.I(), v8_1); + i6.t v7_32 = new i6.t(); + v7_32.a = "surface_container_low"; + v7_32.b = new i6.k(1); + v7_32.c = new i6.k(2); + v7_32.d = 1; + v7_32.e = new i6.k(3); + i6.t v7_33 = v7_32.a(); + long v14_8 = new i6.t(); + v14_8.a = "surface_container_low"; + v14_8.b = new i6.d(16); + v14_8.c = new i6.d(17); + v14_8.d = 1; + long v78 = k3.n.p(v14_8.a().c().b(v7_33).a(), v8_1); + i6.t v7_37 = new i6.t(); + v7_37.a = "surface_container_lowest"; + v7_37.b = new i6.i(23); + v7_37.c = new i6.i(24); + v7_37.d = 1; + i6.t v7_38 = v7_37.a(); + long v14_14 = new i6.t(); + v14_14.a = "surface_container_lowest"; + v14_14.b = new i6.c(6); + v14_14.c = new i6.c(7); + v14_14.d = 1; + long v80 = k3.n.p(v14_14.a().c().b(v7_38).a(), v8_1); + long v44 = k3.n.p(i6.v.t(), v8_1); + long v13_28 = k3.n.p(v0_12.y(), v8_1); + long v82_0 = k3.n.p(v0_12.z(), v8_1); + long v84_0 = k3.n.p(v0_12.q(), v8_1); + long v86_0 = k3.n.p(v0_12.r(), v8_1); + long v88_0 = k3.n.p(i6.v.l(), v8_1); + i6.t v7_48 = new i6.t(); + v7_48.a = "on_primary_fixed_variant"; + v7_48.b = new i6.k(13); + v7_48.f = new i6.k(14); + v7_48.h = new i6.k(16); + i6.t v7_49 = v7_48.a(); + long v10_12 = new i6.t(); + v10_12.a = "on_primary_fixed_variant"; + v10_12.b = new i6.d(7); + v10_12.c = new i6.d(8); + v10_12.f = new i6.d(9); + v10_12.g = new i6.d(10); + v10_12.h = new i6.d(11); + y0.m1 v9_23 = k3.n.p(v10_12.a().c().b(v7_49).a(), v8_1); + long v92_0 = k3.n.p(v0_12.u(), v8_1); + long v94_0 = k3.n.p(v0_12.v(), v8_1); + i6.t v7_55 = new i6.t(); + v7_55.a = "on_secondary_fixed"; + v7_55.b = new i6.k(27); + v7_55.f = new i6.k(29); + v7_55.h = new i6.l(0); + i6.t v5_7 = v7_55.a(); + i6.t v7_57 = new i6.t(); + v7_57.a = "on_secondary_fixed"; + v7_57.b = new i6.c(8); + v7_57.c = new i6.c(9); + v7_57.f = new i6.c(10); + v7_57.g = new i6.c(11); + v7_57.h = new i6.c(12); + long v11_27 = k3.n.p(v7_57.a().c().b(v5_7).a(), v8_1); + i6.t v5_11 = new i6.t(); + v5_11.a = "on_secondary_fixed_variant"; + i6.p v114_1 = v0_12; + v5_11.b = new i6.k(7); + v5_11.f = new i6.k(8); + v5_11.h = new i6.k(9); + y0.m1 v0_18 = v5_11.a(); + i6.t v5_13 = new i6.t(); + v5_13.a = "on_secondary_fixed_variant"; + v5_13.b = new i6.d(1); + v5_13.c = new i6.d(2); + v5_13.f = new i6.d(4); + v5_13.g = new i6.d(5); + v5_13.h = new i6.d(6); + long v96 = k3.n.p(v5_13.a().c().b(v0_18).a(), v8_1); + long v98 = k3.n.p(v114_1.A(), v8_1); + long v100 = k3.n.p(v114_1.B(), v8_1); + y0.m1 v0_24 = new i6.t(); + v0_24.a = "on_tertiary_fixed"; + v0_24.b = new i6.i(16); + v0_24.f = new i6.i(17); + v0_24.h = new i6.i(18); + y0.m1 v0_25 = v0_24.a(); + i6.t v7_79 = new i6.t(); + v7_79.a = "on_tertiary_fixed"; + v7_79.b = new i6.d(23); + v7_79.c = new i6.d(25); + v7_79.f = new i6.d(26); + v7_79.g = new i6.d(27); + v7_79.h = new i6.d(28); + long v102 = k3.n.p(v7_79.a().c().b(v0_25).a(), v8_1); + y0.m1 v0_29 = new i6.t(); + v0_29.a = "on_tertiary_fixed_variant"; + v0_29.b = new i6.k(24); + v0_29.f = new i6.k(25); + v0_29.h = new i6.k(26); + y0.m1 v0_30 = v0_29.a(); + i6.t v7_87 = new i6.t(); + v7_87.a = "on_tertiary_fixed_variant"; + v7_87.b = new i6.d(18); + v7_87.c = new i6.d(19); + v7_87.f = new i6.d(20); + v7_87.g = new i6.d(21); + v7_87.h = new i6.d(22); + y0.m1 v9_28 = new y0.m1(v3_33, v1_21, v20_2, v16_2, v18_1, v24_0, v22, v28_0, v26, v13_28, v30, v82_0, v34, v36, v38, v40, v42, v44, v46, v48, v50, v52, v54, v56, v58, v60, v62, v64, v66, v68, v70, v72, v74, v76, v78, v80, v84_0, v86_0, v88_0, v9_23, v92_0, v94_0, v11_27, v96, v98, v100, v102, k3.n.p(v7_87.a().c().b(v0_30).a(), v8_1)); + if (p121 != null) { + y0.m1 v0_34 = ((y0.m1) p121.invoke(v9_28)); + if (v0_34 != null) { + return v0_34; + } + } + return v9_28; + } + + public static final long r(long p8, long p10) + { + if (b2.x.e(p8) < 1065353216) { + long v8_4; + float v0_2 = b2.x.e(p8); + float v2 = b2.x.e(p10); + float v3 = (1065353216 - v0_2); + float v4_1 = ((v2 * v3) + v0_2); + if (v4_1 != 0) { + v8_4 = b2.h0.b(((((b2.x.i(p10) * v2) * v3) + (b2.x.i(p8) * v0_2)) / v4_1), ((((b2.x.h(p10) * v2) * v3) + (b2.x.h(p8) * v0_2)) / v4_1), ((((b2.x.f(p10) * v2) * v3) + (b2.x.f(p8) * v0_2)) / v4_1), v4_1, c2.e.e); + } else { + v8_4 = b2.h0.b(0, 0, 0, 0, c2.e.e); + } + return b2.h0.b(b2.x.i(v8_4), b2.x.h(v8_4), b2.x.f(v8_4), 1065353216, c2.e.e); + } else { + return p8; + } + } + + public static final int[] s(long p3) + { + int v0_0 = java.util.Calendar.getInstance(); + v0_0.setTimeInMillis(p3); + int[] v3_1 = 7; + if (v0_0.get(7) != 1) { + v3_1 = (v0_0.get(7) - 1); + } + return new int[] {v0_0.get(1), (v0_0.get(2) + 1), v0_0.get(5), v3_1}); + } + + public static final boolean t(long p0, long p2) + { + if (p0 != p2) { + return 0; + } else { + return 1; + } + } + + public static boolean u(j8.c p1, String p2) + { + kotlin.jvm.internal.s.f(p2, "relativePath"); + return a.b.F(p1, p2).exists(); + } + + public static final int v(c0.x p4) + { + long v0_1; + if (p4.e != s.n2.c) { + v0_1 = (p4.b() >> 32); + } else { + v0_1 = (p4.b() & 4294967295); + } + return ((int) v0_1); + } + + public static final i2.f w() + { + i2.f v0_0 = a.b.c; + if (v0_0 == null) { + i2.e v1_0 = new i2.e("Settings.Regular", 1103101952, 1103101952, 1151005491, 1151005491, 0, 0, 0, 224); + v1_0.a("", 0, 0, 0, 1065353216, -1082130432, 0, 1151005491, q6.t.c); + i2.f v0_37 = new i2.o(1143010099, 1121491354); + b2.d1 v2_43 = new i2.p(1143173939, 1121753498, 1143386931, 1122539930); + int v3_51 = new i2.p(1143599923, 1123326362, 1143845683, 1124289741); + i2.k v4_57 = new i2.n(1144140595, 1124945101); + int v5_5 = new i2.n(1148744499, 1133880934); + i2.p v6_6 = new i2.p(1149236019, 1134437990, 1149348250, 1134716518); + i2.p v7_5 = new i2.p(1149458842, 1134995046, 1149532570, 1135322726); + i2.p v8_4 = new i2.p(1149680026, 1135945318, 1149737370, 1136731750); + i2.p v9_6 = new i2.p(1149770138, 1137124966, 1149778330, 1137780326); + i2.p v10_7 = new i2.p(1149786522, 1138435686, 1149786522, 1139320422); + i2.b0 v11_6 = new i2.b0(1145148211); + i2.o v16 = v0_37; + i2.p v12_5 = new i2.p(1149786522, 1145590579, 1149778330, 1145910067); + i2.p v17 = v2_43; + b2.d1 v2_4 = new i2.p(1149245850, 1147573043, 1148941107, 1147736883); + i2.f v0_5 = new i2.n(1148744499, 1147851571); + i2.n v13_4 = new i2.n(1144140595, 1149847962); + i2.n v22 = v0_5; + i2.p v23 = v2_4; + i2.p v24 = v3_51; + i2.p v14_5 = new i2.p(1143780147, 1149954458, 1143493427, 1150024090); + i2.n v21 = v4_57; + b2.d1 v2_82 = new i2.p(1141863219, 1140696678, 1141322547, 1141314355); + i2.f v0_82 = new i2.p(1140713062, 1141855027, 1140713062, 1142608691); + int v3_79 = new i2.c0[87]; + v3_79[0] = v16; + v3_79[1] = v17; + v3_79[2] = v24; + v3_79[3] = v21; + v3_79[4] = v5_5; + v3_79[5] = v6_6; + v3_79[6] = v7_5; + v3_79[7] = v8_4; + v3_79[8] = v9_6; + v3_79[9] = v10_7; + v3_79[10] = v11_6; + v3_79[11] = v12_5; + v3_79[12] = new i2.p(1149770138, 1146229555, 1149737370, 1146426163); + v3_79[13] = new i2.p(1149680026, 1146802995, 1149532570, 1147147059); + v3_79[14] = new i2.p(1149467034, 1147294515, 1149356442, 1147433779); + v3_79[15] = v23; + v3_79[16] = v22; + v3_79[17] = v13_4; + v3_79[18] = v14_5; + v3_79[19] = new i2.p(1143206707, 1150093722, 1143010099, 1150110106); + v3_79[20] = new i2.p(1142616883, 1150159258, 1142223667, 1150110106); + v3_79[21] = new i2.p(1142027059, 1150093722, 1141740339, 1150024090); + v3_79[22] = new i2.p(1141453619, 1149954458, 1141093171, 1149847962); + v3_79[23] = new i2.n(1131793613, 1147851571); + v3_79[24] = new i2.p(1131334861, 1147786035, 1130810573, 1147720499); + v3_79[25] = new i2.p(1129696461, 1147556659, 1128811725, 1147417395); + v3_79[26] = new i2.p(1127926989, 1147278131, 1127468237, 1147147059); + v3_79[27] = new i2.p(1126288589, 1146802995, 1125829837, 1146426163); + v3_79[28] = new i2.p(1125567693, 1146229555, 1125502157, 1145910067); + v3_79[29] = new i2.p(1125436621, 1145590579, 1125436621, 1145148211); + v3_79[30] = new i2.b0(1139320422); + v3_79[31] = new i2.p(1125436621, 1138435686, 1125502157, 1137780326); + v3_79[32] = new i2.p(1125567693, 1137124966, 1125829837, 1136731750); + v3_79[33] = new i2.p(1126288589, 1135945318, 1127468237, 1135322726); + v3_79[34] = new i2.p(1127992525, 1135027814, 1128910029, 1134732902); + v3_79[35] = new i2.p(1129827533, 1134437990, 1131072717, 1134077542); + v3_79[36] = new i2.n(1131793613, 1133880934); + v3_79[37] = new i2.n(1141093171, 1124945101); + v3_79[38] = new i2.n(1141388083, 1124289741); + v3_79[39] = new i2.p(1141633843, 1123326362, 1141846835, 1122539930); + v3_79[40] = new i2.p(1142059827, 1121753498, 1142223667, 1121491354); + v3_79[41] = new i2.p(1142616883, 1120835994, 1143010099, 1121491354); + i2.k v4_117 = i2.k.c; + v3_79[42] = v4_117; + v3_79[43] = new i2.o(1131072717, 1138435686); + v3_79[44] = new i2.b0(1145688883); + v3_79[45] = new i2.p(1131072717, 1145918259, 1131498701, 1146090291); + v3_79[46] = new i2.p(1131924685, 1146262323, 1132684902, 1146409779); + v3_79[47] = new i2.n(1142092595, 1149323674); + v3_79[48] = new i2.p(1142403891, 1149413786, 1142592307, 1149417882); + v3_79[49] = new i2.p(1142780723, 1149421978, 1143059251, 1149348250); + v3_79[50] = new i2.n(1148302131, 1146508083); + v3_79[51] = new i2.p(1148711731, 1146278707, 1148826419, 1146082099); + v3_79[52] = new i2.p(1148941107, 1145885491, 1148941107, 1145410355); + v3_79[53] = new i2.b0(1138533990); + v3_79[54] = new i2.p(1148941107, 1137911398, 1148859187, 1137534566); + v3_79[55] = new i2.p(1148777267, 1137157734, 1148547891, 1136895590); + v3_79[56] = new i2.n(1143141171, 1129073869); + v3_79[57] = new i2.p(1142829875, 1128352973, 1142625075, 1128352973); + v3_79[58] = new i2.p(1142420275, 1128352973, 1142092595, 1129073869); + v3_79[59] = new i2.n(1132783206, 1136731750); + v3_79[60] = new i2.p(1131924685, 1137059430, 1131498701, 1137403494); + v3_79[61] = new i2.p(1131072717, 1137747558, 1131072717, 1138435686); + v3_79[62] = v4_117; + v3_79[63] = new i2.o(1145893683, 1142608691); + v3_79[64] = new i2.p(1145893683, 1143509811, 1145451315, 1144255283); + v3_79[65] = new i2.p(1145008947, 1145000755, 1144263475, 1145443123); + v3_79[66] = new i2.p(1143518003, 1145885491, 1142616883, 1145885491); + v3_79[67] = new i2.p(1141732147, 1145885491, 1140978483, 1145443123); + v3_79[68] = new i2.p(1139598950, 1145000755, 1138714214, 1144255283); + v3_79[69] = new i2.p(1137829478, 1143509811, 1137829478, 1142608691); + v3_79[70] = new i2.p(1137829478, 1141723955, 1138714214, 1140970291); + v3_79[71] = new i2.p(1139598950, 1139582566, 1140978483, 1138697830); + v3_79[72] = new i2.p(1141732147, 1137813094, 1142616883, 1137813094); + v3_79[73] = new i2.p(1143518003, 1137813094, 1144263475, 1138697830); + v3_79[74] = new i2.p(1145008947, 1139582566, 1145451315, 1140970291); + v3_79[75] = new i2.p(1145893683, 1141723955, 1145893683, 1142608691); + v3_79[76] = v4_117; + v3_79[77] = new i2.o(1140713062, 1142608691); + v3_79[78] = new i2.p(1140713062, 1143378739, 1141322547, 1143911219); + v3_79[79] = new i2.p(1141863219, 1144443699, 1142616883, 1144443699); + v3_79[80] = new i2.p(1143386931, 1144443699, 1143919411, 1143911219); + v3_79[81] = new i2.p(1144451891, 1143378739, 1144451891, 1142608691); + v3_79[82] = new i2.p(1144451891, 1141855027, 1143919411, 1141314355); + v3_79[83] = new i2.p(1143386931, 1140696678, 1142616883, 1140696678); + v3_79[84] = v2_82; + v3_79[85] = v0_82; + v3_79[86] = v4_117; + i2.e.d(v1_0, q6.n.Y(v3_79), new b2.d1(b2.x.b), 16356); + v1_0.f(); + i2.f v0_85 = v1_0.e(); + a.b.c = v0_85; + return v0_85; + } else { + return v0_0; + } + } + + public static java.util.List x(String p8) + { + java.util.Iterator v8_3 = a.b.F(j8.c.c, p8); + if ((!v8_3.exists()) || (!v8_3.isDirectory())) { + v8_3 = 0; + } + if (v8_3 != null) { + java.util.Iterator v8_1 = v8_3.listFiles(); + if (v8_1 != null) { + java.util.ArrayList v0_2 = new b9.h0(6); + if (v8_1.length != 0) { + v8_1 = java.util.Arrays.copyOf(v8_1, v8_1.length); + kotlin.jvm.internal.s.e(v8_1, "copyOf(...)"); + if (v8_1.length > 1) { + java.util.Arrays.sort(v8_1, v0_2); + } + } + java.util.Iterator v8_4 = q6.n.Y(v8_1); + java.util.ArrayList v0_4 = new java.util.ArrayList(q6.p.c0(v8_4, 10)); + java.util.Iterator v8_5 = v8_4.iterator(); + while (v8_5.hasNext()) { + java.io.File v1_9 = ((java.io.File) v8_5.next()); + String v7 = v1_9.getName(); + kotlin.jvm.internal.s.e(v7, "getName(...)"); + v0_4.add(new j8.b(v1_9.length(), v1_9.lastModified(), v7)); + } + return v0_4; + } + } + return q6.t.c; + } + + public static final j9.b y(j9.g p117, boolean p118) + { + long v15_0; + long v1_6; + long v91; + long v1_0 = p117.s; + long v3_0 = p117.w; + long v5_0 = p117.t; + long v83 = a.b.r(b2.x.c(1061997773, v5_0), v1_0); + long v99 = a.b.r(b2.x.c(1061997773, v5_0), v3_0); + long v7_1 = p117.a; + long v115 = a.b.r(b2.x.c(1045220557, v7_1), v1_0); + j9.b v10_3 = a.b.r(b2.x.c(1052938076, v7_1), v1_0); + int v12_0 = p117.b; + long v29 = a.b.r(b2.x.c(1052938076, v12_0), v10_3); + long v14_2 = a.b.r(b2.x.c(1052938076, v7_1), v1_0); + long v33 = a.b.r(b2.x.c(1058642330, v12_0), v14_2); + long v35 = a.b.r(b2.x.c(1052938076, v7_1), v1_0); + long v7_6 = a.b.r(b2.x.c(1056964608, p117.z), v1_0); + long v27 = v10_3; + long v51 = a.b.r(b2.x.c(1052938076, v5_0), v7_6); + long v1_9 = a.b.r(b2.x.c(1058642330, v3_0), v1_0); + long v55 = a.b.r(b2.x.c(1052938076, v5_0), v1_9); + long v11 = p117.a; + long v41 = p117.z; + long v43 = p117.y; + long v45 = p117.w; + long v47 = p117.t; + long v61 = p117.x; + long v63 = p117.A; + long v67 = p117.p; + long v1_5 = p117.v; + if (!p118) { + v91 = v1_5; + v1_6 = b2.x.b; + v15_0 = 1050253722; + } else { + v91 = v1_5; + v1_6 = b2.x.b; + v15_0 = 1058642330; + } + return new j9.b(v11, p117.b, p117.c, p117.d, p117.e, p117.f, p117.g, p117.h, v27, v29, v14_2, v33, v35, p117.i, p117.j, v41, v43, v45, v47, v7_6, v51, v1_9, v55, p117.m, p117.n, v61, v63, p117.o, v67, v67, p117.q, p117.r, v11, p117.s, v47, p117.u, v83, v63, v63, v47, v91, v47, v63, v45, v99, v61, v47, v43, v41, b2.x.c(v15_0, v1_6), p117.a, p117.w, v115); + } + + public static java.util.List z(h1.k p24, int p25, h1.k p26, boolean p27, boolean p28, boolean p29) + { + int v10_4; + int v3_6 = p24.u(p25); + int v4_3 = (p25 + v3_6); + int v5 = p24.f(p25); + int v6_6 = p24.f(v4_3); + int v7 = (v6_6 - v5); + if ((p25 < 0) || ((p24.b[((p24.r(p25) * 5) + 1)] & 201326592) == 0)) { + v10_4 = 0; + } else { + v10_4 = 1; + } + p26.w(v3_6); + p26.x(v7, p26.t); + if (p24.g < v4_3) { + p24.B(v4_3); + } + if (p24.k < v6_6) { + p24.C(v6_6, v4_3); + } + int v6_3 = p26.b; + h1.c v11_11 = p26.t; + int v13_4 = (v11_11 * 5); + q6.n.d0(p24.b, v6_3, v13_4, (p25 * 5), (v4_3 * 5)); + java.util.ArrayList v12_3 = p26.c; + int v14_2 = p26.i; + System.arraycopy(p24.c, v5, v12_3, v14_2, v7); + int v15_2 = p26.v; + v6_3[(v13_4 + 2)] = v15_2; + int v16_1 = (v11_11 - p25); + int v8 = (v11_11 + v3_6); + int v18_1 = (v14_2 - p26.g(v11_11, v6_3)); + int v9_4 = p26.l; + java.util.ArrayList v12_4 = v12_3.length; + int v21 = v10_4; + int v10_2 = p26.m; + int v20_1 = v13_4; + int v13_3 = v11_11; + while (v13_3 < v8) { + if (v13_3 != v11_11) { + int v22_1 = ((v13_3 * 5) + 2); + v6_3[v22_1] = (v6_3[v22_1] + v16_1); + } + h1.c v11_7; + int v22_3; + int v23_2 = v6_3; + int v6_1 = (p26.g(v13_3, v6_3) + v18_1); + if (v10_2 >= v13_3) { + v22_3 = v11_11; + v11_7 = p26.k; + } else { + v22_3 = v11_11; + v11_7 = 0; + } + v23_2[((v13_3 * 5) + 4)] = h1.k.i(v6_1, v11_7, v9_4, v12_4); + if (v13_3 == v10_2) { + v10_2++; + } + v13_3++; + v11_11 = v22_3; + v6_3 = v23_2; + } + int v10_6; + int v23_3 = v6_3; + p26.m = v10_2; + int v6_5 = h1.j.b(p24.d, p25, p24.p()); + int v4_4 = h1.j.b(p24.d, v4_3, p24.p()); + if (v6_5 >= v4_4) { + v10_6 = q6.t.c; + } else { + int v9_7 = p24.d; + v10_6 = new java.util.ArrayList((v4_4 - v6_5)); + h1.c v11_6 = v6_5; + while (v11_6 < v4_4) { + java.util.ArrayList v12_1 = ((h1.b) v9_7.get(v11_6)); + v12_1.a = (v12_1.a + v16_1); + v10_6.add(v12_1); + v11_6++; + } + p26.d.addAll(h1.j.b(p26.d, p26.t, p26.p()), v10_6); + v9_7.subList(v6_5, v4_4).clear(); + } + if (!v10_6.isEmpty()) { + int v4_7 = p24.e; + if ((v4_7 != 0) && (p26.e != null)) { + int v6_0 = v10_6.size(); + int v9_0 = 0; + while (v9_0 < v6_0) { + v4_7.get(((h1.b) v10_6.get(v9_0))); + v9_0++; + } + } + } + boolean v17_0; + h1.c vtmp19 = p26.O(v15_2); + int v4_1 = p24.E(p25, p24.b); + if (p29) { + if (!p27) { + int v3_0 = p24.I(p25, v3_6); + p24.J(v5, v7, (p25 - 1)); + v17_0 = v3_0; + } else { + boolean v17_1; + if (v4_1 < 0) { + v17_1 = 0; + } else { + v17_1 = 1; + } + if (v17_1) { + p24.P(); + p24.a((v4_1 - p24.t)); + p24.P(); + } + p24.a((p25 - p24.t)); + boolean v1_3 = p24.H(); + if (v17_1) { + p24.M(); + p24.j(); + p24.M(); + p24.j(); + } + v17_0 = v1_3; + } + } else { + v17_0 = 0; + } + if (v17_0) { + e1.o.a("Unexpectedly removed anchors"); + } + int v9_2; + boolean v1_4 = v23_3[(v20_1 + 1)]; + if ((1073741824 & v1_4) == 0) { + v9_2 = (v1_4 & 67108863); + } else { + v9_2 = 1; + } + p26.o = (p26.o + v9_2); + if (p28) { + p26.t = v8; + p26.i = (v14_2 + v7); + } + if (v21 != 0) { + p26.T(v15_2); + } + return v10_6; + } + + public void I(boolean p1) + { + return; + } + + public abstract void J(boolean p0); +} diff --git a/analysis/apk/decomp/b1_m.java b/analysis/apk/decomp/b1_m.java new file mode 100644 index 0000000..8831af1 --- /dev/null +++ b/analysis/apk/decomp/b1_m.java @@ -0,0 +1,314 @@ +package b1; +public final class m extends kotlin.coroutines.jvm.internal.SuspendLambda implements a7.e { + public final synthetic int c; + public int d; + public final synthetic boolean e; + public Object f; + public final synthetic Object g; + + public synthetic m(Object p1, boolean p2, Object p3, kotlin.coroutines.Continuation p4, int p5) + { + this.c = p5; + this.f = p1; + this.e = p2; + this.g = p3; + super(2, p4); + return; + } + + public m(w7.n p2, boolean p3, kotlin.coroutines.Continuation p4) + { + this.c = 4; + this.g = p2; + this.e = p3; + super(2, p4); + return; + } + + public synthetic m(boolean p1, Object p2, Object p3, kotlin.coroutines.Continuation p4, int p5) + { + this.c = p5; + this.e = p1; + this.f = p2; + this.g = p3; + super(2, p4); + return; + } + + public final kotlin.coroutines.Continuation create(Object p8, kotlin.coroutines.Continuation p9) + { + switch (this.c) { + case 0: + return new b1.m(((b1.a) this.f), this.e, ((b1.x) this.g), p9, 0); + case 1: + return new b1.m(this.e, ((String) this.f), ((n8.l) this.g), p9, 1); + case 2: + return new b1.m(this.e, ((y0.sd) this.f), ((e1.j1) this.g), p9, 2); + case 3: + return new b1.m(this.e, ((s8.f1) this.f), ((a7.a) this.g), p9, 3); + case 4: + return new b1.m(((w7.n) this.g), this.e, p9); + default: + return new b1.m(((n.c) this.f), this.e, ((n.v0) this.g), p9, 5); + } + } + + public final Object invoke(Object p2, Object p3) + { + switch (this.c) { + case 0: + return ((b1.m) this.create(((kotlinx.coroutines.CoroutineScope) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + case 1: + return ((b1.m) this.create(((kotlinx.coroutines.CoroutineScope) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + case 2: + return ((b1.m) this.create(((kotlinx.coroutines.CoroutineScope) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + case 3: + return ((b1.m) this.create(((kotlinx.coroutines.CoroutineScope) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + case 4: + return ((b1.m) this.create(((kotlinx.coroutines.CoroutineScope) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + default: + return ((b1.m) this.create(((kotlinx.coroutines.CoroutineScope) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + } + } + + public final Object invokeSuspend(Object p20) + { + r6.c v3_15 = 1065353216; + w7.f0 v6_2 = p6.a0.a; + int v5_11 = this.g; + boolean v7 = this.e; + int v9_2 = 1; + switch (this.c) { + case 0: + w7.f0 v17_4 = v6_2; + w7.o v0_27 = ((b1.x) v5_11).b; + w7.f0 v6_11 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + int v1_5 = this.d; + if (v1_5 == 0) { + q6.y.Y(p20); + int v1_8 = ((b1.a) this.f).C; + if (!v7) { + v3_15 = 0; + } + w7.o v0_29; + Boolean v2_3 = kotlin.coroutines.jvm.internal.Boxing.boxFloat(v3_15); + if (!v7) { + v0_29 = ((b1.q) v0_27).n; + } else { + v0_29 = ((b1.q) v0_27).m; + } + this.d = 1; + if (n.c.b(v1_8, v2_3, v0_29, 0, this, 12) != v6_11) { + v6_11 = v17_4; + } + } else { + if (v1_5 != 1) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + q6.y.Y(p20); + } + } + return v6_11; + case 1: + w7.f0 v6_9; + w7.f0 v17_3 = v6_2; + int v5_6 = ((n8.l) v5_11); + w7.o v0_22 = ((String) this.f); + Boolean v2_2 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + r6.c v3_13 = this.d; + if (v3_13 == null) { + q6.y.Y(p20); + r6.c v3_14 = n8.j.a; + if (!v7) { + int v5_7 = v5_6.a; + this.d = 2; + if (v3_14.f(v0_22, v5_7, this) != v2_2) { + v6_9 = v17_3; + return v6_9; + } + } else { + int v1_4 = v5_6.a; + this.d = 1; + if (v3_14.j(v0_22, v1_4, this) != v2_2) { + } + } + v6_9 = v2_2; + } else { + if ((v3_13 != 1) && (v3_13 != 2)) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + q6.y.Y(p20); + } + } + return v6_9; + case 2: + w7.f0 v6_7; + w7.f0 v17_2 = v6_2; + w7.o v0_16 = ((y0.sd) this.f); + Boolean v2_1 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + r6.c v3_6 = this.d; + if (v3_6 == null) { + q6.y.Y(p20); + if ((!v7) || (!((Boolean) ((e1.j1) v5_11).getValue()).booleanValue())) { + ((y0.td) v0_16).b(); + v6_7 = v17_2; + } else { + r6.c v3_11 = new okio.internal.b(3); + this.d = 1; + if (e1.c1.a(this.getContext()).e(v3_11, this) != v2_1) { + this.d = 2; + if (y0.sd.a(v0_16, this) != v2_1) { + } else { + v6_7 = v2_1; + } + } + } + } else { + if (v3_6 == 1) { + q6.y.Y(p20); + } else { + if (v3_6 != 2) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + q6.y.Y(p20); + } + } + } + return v6_7; + case 3: + w7.f0 v6_4; + w7.f0 v17_1 = v6_2; + w7.o v0_10 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + int v1_1 = this.d; + if (v1_1 == 0) { + q6.y.Y(p20); + if (v7) { + v6_4 = v17_1; + } else { + this.d = 1; + if (kotlinx.coroutines.DelayKt.delay(320, this) != v0_10) { + ((s8.f1) this.f).a = 0; + ((a7.a) v5_11).invoke(); + } else { + v6_4 = v0_10; + } + } + } else { + if (v1_1 != 1) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + q6.y.Y(p20); + } + } + return v6_4; + case 4: + String v8_5; + int v5_0 = ((w7.n) v5_11); + w7.o v0_7 = v5_0.f; + int v1_0 = v5_0.d; + r6.c v3_4 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + r6.c v10_0 = this.d; + try { + if (v10_0 == null) { + q6.y.Y(p20); + String v8_4 = w7.w.e(new p6.g[] {new p6.g("machine", v5_0.c.invoke()), new p6.g("version", kotlin.coroutines.jvm.internal.Boxing.boxInt(4)), new p6.g("platform", "android")})); + this.f = kotlin.coroutines.jvm.internal.SpillingKt.nullOutSpilledVariable(v8_4); + this.d = 1; + v8_5 = k8.h.c("https://qbsg.top/api/check-update", v8_4, this); + if (v8_5 != v3_4) { + r6.c v3_20 = w7.w.k(((String) v8_5)); + if (!v3_20.f("isLatest", 1)) { + Boolean v2_10 = v3_20.i(-1, "latestVersionCode"); + String v8_11 = v3_20.m("latestVersionName"); + if (v8_11 == null) { + v8_11 = ""; + } + String v12_3 = v3_20.m("downloadUrl"); + if (v12_3 == null) { + v12_3 = ""; + } + w7.f0 v17_0; + r6.c v3_2 = v3_20.j("updates"); + r6.c v10_9 = k3.t.p(); + if (v3_2 != null) { + int v13_2 = v3_2.E(); + int v14 = 0; + while (v14 < v13_2) { + n4.q v15 = v3_2.z(v14); + int v16_0 = v9_2; + r6.c v20_1 = v3_2; + r6.c v3_1 = v15.m("versionName"); + if (v3_1 == null) { + v3_1 = ""; + } + v17_0 = v6_2; + w7.f0 v6_1 = v15.m("changelog"); + if (v6_1 == null) { + v6_1 = ""; + } + v10_9.add(new w7.g0(v3_1, v6_1)); + v14++; + v3_2 = v20_1; + v9_2 = v16_0; + v6_2 = v17_0; + } + } + v17_0 = v6_2; + int v16_2 = v9_2; + v0_7.setValue(new w7.f0(v2_10, v8_11, v12_3, k3.t.i(v10_9))); + if ((v7) || (v2_10 != ((l8.a) ((kotlinx.coroutines.flow.StateFlow) v5_0.b.f).getValue()).i)) { + v1_0.setValue(w7.o.e); + v5_0.h.setValue(kotlin.coroutines.jvm.internal.Boxing.boxBoolean(v16_2)); + v6_2 = v17_0; + } else { + v1_0.setValue(w7.o.g); + } + } else { + v5_0.l = 0; + a.b.n(j8.c.d, "updates"); + v0_7.setValue(0); + v1_0.setValue(w7.o.h); + } + } else { + v6_2 = v3_4; + } + } else { + if (v10_0 != 1) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + q6.y.Y(p20); + v8_5 = p20; + } + } + } catch (Exception) { + v17_0 = v6_2; + v1_0.setValue(w7.o.f); + } catch (Exception) { + } + return v6_2; + default: + r6.c v10_5 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + w7.o v0_35 = this.d; + if (v0_35 == null) { + q6.y.Y(p20); + w7.o v0_37 = ((n.c) this.f); + if (!v7) { + v3_15 = 1061997773; + } + int v1_10 = kotlin.coroutines.jvm.internal.Boxing.boxFloat(v3_15); + Boolean v2_8 = ((n.v0) v5_11); + this.d = 1; + if (n.c.b(v0_37, v1_10, v2_8, 0, this, 12) == v10_5) { + v6_2 = v10_5; + } + } else { + if (v0_35 != 1) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + q6.y.Y(p20); + } + } + return v6_2; + } + } +} diff --git a/analysis/apk/decomp/b9_g0.java b/analysis/apk/decomp/b9_g0.java new file mode 100644 index 0000000..8bd5291 --- /dev/null +++ b/analysis/apk/decomp/b9_g0.java @@ -0,0 +1,292 @@ +package b9; +public final class g0 extends kotlin.coroutines.jvm.internal.SuspendLambda implements a7.e { + public final synthetic int c; + public int d; + public int e; + public Object f; + public final synthetic Object g; + + public g0(b9.l0 p2, kotlin.coroutines.Continuation p3) + { + this.c = 0; + this.g = p2; + super(2, p3); + return; + } + + public g0(java.util.List p2, c0.d p3, int p4, kotlin.coroutines.Continuation p5) + { + this.c = 1; + this.f = p2; + this.g = p3; + this.e = p4; + super(2, p5); + return; + } + + public synthetic g0(n.c p1, int p2, Object p3, kotlin.coroutines.Continuation p4, int p5) + { + this.c = p5; + this.f = p1; + this.e = p2; + this.g = p3; + super(2, p4); + return; + } + + public g0(y.t p2, int p3, kotlin.coroutines.Continuation p4) + { + this.c = 2; + this.g = p2; + this.e = p3; + super(2, p4); + return; + } + + public final kotlin.coroutines.Continuation create(Object p9, kotlin.coroutines.Continuation p10) + { + switch (this.c) { + case 0: + return new b9.g0(((b9.l0) this.g), p10); + case 1: + return new b9.g0(((java.util.List) this.f), ((c0.d) this.g), this.e, p10); + case 2: + b9.g0 v10_2 = new b9.g0(((y.t) this.g), this.e, p10); + v10_2.f = p9; + return v10_2; + case 3: + return new b9.g0(((n.c) this.f), this.e, ((kotlin.jvm.internal.f0) this.g), p10, 3); + default: + return new b9.g0(((n.c) this.f), this.e, ((y0.t9) this.g), p10, 4); + } + } + + public final Object invoke(Object p2, Object p3) + { + switch (this.c) { + case 0: + return ((b9.g0) this.create(((kotlinx.coroutines.CoroutineScope) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + case 1: + return ((b9.g0) this.create(((kotlinx.coroutines.CoroutineScope) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + case 2: + return ((b9.g0) this.create(((s.t2) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + case 3: + return ((b9.g0) this.create(((kotlinx.coroutines.CoroutineScope) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + default: + return ((b9.g0) this.create(((kotlinx.coroutines.CoroutineScope) p2), ((kotlin.coroutines.Continuation) p3))).invokeSuspend(p6.a0.a); + } + } + + public final Object invokeSuspend(Object p21) + { + String v6_2 = p6.a0.a; + Boolean v1_9 = this.g; + switch (this.c) { + case 0: + int v2_5; + String v0_3; + String v6_3; + Exception v3_2; + Object v18; + Boolean v1_18 = ((b9.l0) v1_9); + int v5_7 = v1_18.u; + Object v7_2 = v1_18.s; + kotlinx.coroutines.flow.MutableStateFlow v8 = v1_18.o; + kotlinx.coroutines.flow.MutableStateFlow v9 = v1_18.i; + kotlinx.coroutines.flow.MutableStateFlow v10 = v1_18.q; + String v0_31 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + String v11_0 = this.e; + String v12 = "\u56fa\u4ef6\u5217\u8868\u52a0\u8f7d\u5931\u8d25"; + q6.u v13 = q6.u.c; + q6.t v14 = q6.t.c; + int v16_0 = 1; + try { + if (v11_0 == null) { + q6.y.Y(p21); + v10.setValue(kotlin.coroutines.jvm.internal.Boxing.boxBoolean(1)); + v5_7.setValue(0); + v9.setValue(v14); + v1_18.m.setValue(v13); + v8.setValue(v13); + v1_18.f.setValue(q6.v.c); + v2_5 = (v1_18.h + 1); + v1_18.h = v2_5; + String v11_1 = new p6.g[0]; + String v11_2 = w7.w.e(v11_1); + this.d = v2_5; + this.e = 1; + v3_2 = k8.h.c("https://qbsg.top/api/firmware/catalog", v11_2, this); + if (v3_2 != v0_31) { + Exception v3_3 = ((String) v3_2); + v18 = v6_2; + String v6_0 = new p6.g[0]; + String v6_1 = w7.w.e(v6_0); + this.f = v3_3; + this.d = v2_5; + this.e = 2; + v6_2 = k8.h.c("https://qbsg.top/api/activation/firmware-list", v6_1, this); + if (v6_2 != v0_31) { + v0_3 = v3_3; + String v6_4 = ((String) v6_2); + String v0_9 = w7.w.k(v0_3); + String v11_4 = ""; + Exception v3_6 = v0_9.m("type"); + if (v3_6 != null) { + v11_4 = v3_6; + } else { + } + if (!v11_4.equals("success")) { + String v0_10 = v0_9.m("message"); + if (v0_10 == null) { + v0_10 = "\u56fa\u4ef6\u5217\u8868\u52a0\u8f7d\u5931\u8d25"; + } + throw new Exception(v0_10); + } else { + String v0_11 = a.a.i(v0_9, a.a.g(w7.w.k(v6_4))); + Exception v3_13 = a.a.h(v0_11); + if (v2_5 != v1_18.h) { + v1_18.d(); + v7_2.setValue(kotlin.coroutines.jvm.internal.Boxing.boxBoolean(1)); + v10.setValue(kotlin.coroutines.jvm.internal.Boxing.boxBoolean(0)); + v6_3 = v18; + } else { + v9.setValue(v0_11); + v8.setValue(v3_13); + } + } + } else { + v6_3 = v0_31; + } + } else { + } + } else { + try { + if (v11_0 == 1) { + v2_5 = this.d; + q6.y.Y(p21); + v3_2 = p21; + } else { + if (v11_0 != 2) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + v2_5 = this.d; + v0_3 = ((String) this.f); + q6.y.Y(p21); + v18 = v6_2; + v6_2 = p21; + } + } + } catch (String v0_7) { + int v17_0 = 0; + v1_18.d(); + v7_2.setValue(kotlin.coroutines.jvm.internal.Boxing.boxBoolean(v16_0)); + v10.setValue(kotlin.coroutines.jvm.internal.Boxing.boxBoolean(v17_0)); + throw v0_7; + } + } + } catch (String v0_8) { + v18 = v6_2; + if (v2_5 != v1_18.h) { + } else { + String v0_12 = v0_8.getMessage(); + if (v0_12 != null) { + v12 = v0_12; + } else { + } + v5_7.setValue(v12); + v9.setValue(v14); + v8.setValue(v13); + } + } catch (String v0_7) { + v16_0 = 1; + v17_0 = 0; + } catch (String v0_8) { + } + return v6_3; + case 1: + Boolean v1_16 = ((c0.d) v1_9); + String v0_27 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + int v5_5 = this.d; + if (v5_5 == 0) { + q6.y.Y(p21); + if (!((java.util.List) this.f).isEmpty()) { + int v5_6 = this.e; + if (v1_16.d.b.h() != v5_6) { + this.d = 1; + if (c0.i0.r(v1_16, v5_6, this) == v0_27) { + v6_2 = v0_27; + } + } + } + } else { + if (v5_5 != 1) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + q6.y.Y(p21); + } + } + return v6_2; + case 2: + String v0_24 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + int v5_2 = this.d; + if (v5_2 == 0) { + q6.y.Y(p21); + Boolean v1_10 = ((y.t) v1_9); + int v5_4 = new c0.a0(((s.t2) this.f), v1_10, 1); + int v2_15 = this.e; + Boolean v1_14 = ((y.n) v1_10.f.getValue()).i; + this.d = 1; + if (a0.v1.a(v5_4, v2_15, 100, v1_14, this) == v0_24) { + v6_2 = v0_24; + } + } else { + if (v5_2 != 1) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + q6.y.Y(p21); + } + } + return v6_2; + case 3: + Object v7_1 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + String v0_30 = this.d; + if (v0_30 == null) { + q6.y.Y(p21); + String v0_2 = ((n.c) this.f); + int v2_7 = kotlin.coroutines.jvm.internal.Boxing.boxInt(this.e); + Boolean v1_2 = ((n.k) ((kotlin.jvm.internal.f0) v1_9).c); + this.d = 1; + if (n.c.b(v0_2, v2_7, v1_2, 0, this, 12) == v7_1) { + v6_2 = v7_1; + } + } else { + if (v0_30 != 1) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + q6.y.Y(p21); + } + } + return v6_2; + default: + Object v7_0 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + String v0_15 = this.d; + if (v0_15 == null) { + q6.y.Y(p21); + String v0_17 = ((n.c) this.f); + int v2_10 = kotlin.coroutines.jvm.internal.Boxing.boxInt(this.e); + Boolean v1_6 = ((y0.t9) v1_9).b; + this.d = 1; + if (n.c.b(v0_17, v2_10, v1_6, 0, this, 12) == v7_0) { + v6_2 = v7_0; + } + } else { + if (v0_15 != 1) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + q6.y.Y(p21); + } + } + return v6_2; + } + } +} diff --git a/analysis/apk/decomp/c8_f.java b/analysis/apk/decomp/c8_f.java new file mode 100644 index 0000000..657171b --- /dev/null +++ b/analysis/apk/decomp/c8_f.java @@ -0,0 +1,461 @@ +package c8; +public final class f extends kotlin.coroutines.jvm.internal.SuspendLambda implements a7.e { + public long c; + public Object d; + public java.util.Iterator e; + public byte[] f; + public byte[] g; + public Object h; + public int i; + public int j; + public int k; + public int l; + public int m; + public int n; + public boolean o; + public int p; + public final synthetic c8.g q; + public final synthetic Object r; + public final synthetic g8.d s; + public final synthetic a7.a t; + + public f(c8.g p1, Object p2, g8.d p3, a7.a p4, kotlin.coroutines.Continuation p5) + { + this.q = p1; + this.r = p2; + this.s = p3; + this.t = p4; + super(2, p5); + return; + } + + public final kotlin.coroutines.Continuation create(Object p7, kotlin.coroutines.Continuation p8) + { + return new c8.f(this.q, this.r, this.s, this.t, p8); + } + + public final Object invoke(Object p1, Object p2) + { + return ((c8.f) this.create(((kotlinx.coroutines.CoroutineScope) p1), ((kotlin.coroutines.Continuation) p2))).invokeSuspend(p6.a0.a); + } + + public final Object invokeSuspend(Object p34) + { + try { + java.util.List v7_11; + int v8_4; + int v10; + int v5_0; + byte[] v21_1; + java.util.List v7_13; + byte[] v12_11; + int v9_1; + String v3_9; + int v9_0; + int v15_2; + int v20_5; + byte[] v21_0; + byte[] v11_10; + kotlinx.coroutines.flow.MutableStateFlow v23_0; + p6.g v13_10; + StringBuilder v2_0; + int v6_17; + int v8_3; + byte[] v11_4; + String v22_1; + p6.g v13_11; + int v15_0; + int v20_2; + int v24_4; + byte[] v12_15; + int v14_4; + byte[] v11_8; + int v34_2; + int v15_6; + int v6_19; + int v6_15; + int v14_2; + byte[] v11_6; + int v5_1; + Throwable v0_0 = this.q; + StringBuilder v2_1 = v0_0.j; + v3_9 = v0_0.h; + String v4_5 = v0_0.b; + v5_0 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + java.util.List v7_12 = p6.a0.a; + switch (this.p) { + case 0: + int v8_10; + q6.y.Y(p34); + v9_0 = System.currentTimeMillis(); + v0_0.l("\u5f00\u59cbEPD\u901a\u9053\u56fe\u7247\u4e0a\u4f20"); + int v6_28 = this.s.b; + if (v6_28 == 0) { + v8_10 = 0; + } else { + v8_10 = v6_28.d; + } + int v6_0; + if (v6_28 == 0) { + v6_0 = 0; + } else { + v6_0 = v6_28.e; + } + p6.g v13_0; + byte[] v12_0 = this.r; + kotlin.jvm.internal.s.f(v12_0, "bitmap"); + if (v8_10 == 0) { + v13_0 = a.b.h(v12_0, 0); + } else { + v13_0 = a.b.i(v12_0, 0); + } + int v8_0; + if (v6_0 != 0) { + v8_0 = 0; + } else { + if (v8_10 == 0) { + v8_0 = a.b.h(v12_0, 1); + } else { + v8_0 = a.b.i(v12_0, 1); + } + } + int v6_4; + if (v8_0 == 0) { + v6_4 = k3.t.K(new p6.g(v13_0, Boolean.FALSE)); + } else { + v6_4 = q6.n.Y(new p6.g[] {new p6.g(v13_0, Boolean.FALSE), new p6.g(v8_0, Boolean.TRUE)})); + } + v11_4 = v6_4; + int v6_8 = v11_4.iterator(); + v8_3 = 0; + while (v6_8.hasNext()) { + v8_3 += ((byte[]) ((p6.g) v6_8.next()).c).length; + } + v3_9.setValue(kotlin.coroutines.jvm.internal.Boxing.boxBoolean(1)); + v2_1.setValue(kotlin.coroutines.jvm.internal.Boxing.boxInt(0)); + byte[] v12_4 = new byte[2]; + v12_4 = {-128, 0}; + this.d = v11_4; + this.c = v9_0; + this.i = v8_3; + this.j = 0; + this.p = 1; + if (v4_5.sendEpdBytes(v12_4, this) != v5_0) { + v6_15 = 0; + p6.g v13_1 = new byte[2]; + v13_1 = {0, 0}; + this.d = v11_4; + this.c = v9_0; + this.i = v8_3; + this.j = v6_15; + this.p = 2; + if (v4_5.sendEpdBytes(v13_1, this) != v5_0) { + p6.g v13_2 = new byte[3]; + v13_2 = {2, 0, 0}; + this.d = v11_4; + this.c = v9_0; + this.i = v8_3; + this.j = v6_15; + this.p = 3; + if (v4_5.sendEpdBytes(v13_2, this) != v5_0) { + v12_11 = v11_4.iterator(); + if (!v12_11.hasNext()) { + v15_0 = v2_1; + v2_0 = v5_0; + v21_0 = v7_12; + int v34_1 = v11_4; + v5_0 = v3_9; + String v3_0 = new byte[2]; + v3_0 = {1, 1}; + this.d = kotlin.coroutines.jvm.internal.SpillingKt.nullOutSpilledVariable(v34_1); + this.e = 0; + this.f = 0; + this.g = 0; + this.h = 0; + this.c = v9_0; + this.i = v8_3; + this.j = v6_15; + this.p = 5; + if (v4_5.sendEpdBytes(v3_0, this) != v2_0) { + v11_6 = v34_1; + this.d = kotlin.coroutines.jvm.internal.SpillingKt.nullOutSpilledVariable(v11_6); + this.c = v9_0; + this.i = v8_3; + this.j = v6_15; + this.p = 6; + if (v4_5.sendCommand("24494d4728302c3029", this) != v2_0) { + this.d = kotlin.coroutines.jvm.internal.SpillingKt.nullOutSpilledVariable(v11_6); + this.c = v9_0; + this.i = v8_3; + this.j = v6_15; + this.p = 7; + if (v4_5.sendCommand("e2", this) != v2_0) { + v15_0.setValue(kotlin.coroutines.jvm.internal.Boxing.boxInt(100)); + StringBuilder v2_8 = w7.w.j((((float) (System.currentTimeMillis() - v9_0)) / 1148846080)); + String v3_8 = new StringBuilder(); + v3_8.append("\u4e0a\u4f20\u5b8c\u6210\uff0c\u8017\u65f6"); + v3_8.append(v2_8); + v3_8.append("s"); + v0_0.l(v3_8.toString()); + this.t.invoke(); + v5_0.setValue(kotlin.coroutines.jvm.internal.Boxing.boxBoolean(0)); + return v21_0; + } else { + return v2_0; + } + } else { + return v2_0; + } + } else { + return v2_0; + } + } else { + int v15_1; + p6.g v13_5 = ((p6.g) v12_11.next()); + int v14_1 = ((byte[]) v13_5.c); + p6.g v13_8 = ((Boolean) v13_5.d).booleanValue(); + if (v13_8 != null) { + v15_1 = 0; + } else { + v15_1 = -1; + } + int v20_0; + if (v13_8 != null) { + v20_0 = "BWR"; + } else { + v20_0 = "BW"; + } + v21_1 = v7_12; + v34_2 = v11_4; + java.util.List v7_6 = v20_0; + byte[] v11_7 = v14_1.length; + int v20_1 = v12_11; + byte[] v12_14 = new StringBuilder(); + String v22_0 = v13_8; + v12_14.append("\u53d1\u9001"); + v12_14.append(v7_6); + v12_14.append(" "); + v12_14.append(v11_7); + v12_14.append("B"); + v0_0.l(v12_14.toString()); + v12_15 = v15_1; + v13_10 = v20_1; + v11_8 = v22_0; + v20_2 = 0; + v22_1 = v3_9; + v15_2 = 240; + v7_11 = v6_15; + v6_17 = v14_1; + v14_2 = 0; + if (v14_2 >= v6_17.length) { + int v16 = 3; + v11_4 = v34_2; + v6_15 = v7_11; + v12_11 = v13_10; + v7_12 = v21_1; + v3_9 = v22_1; + } else { + v23_0 = v2_1; + StringBuilder v2_13 = q6.n.k0(v6_17, v14_2, Math.min((v14_2 + v15_2), v6_17.length)); + int v24_0 = v2_13; + String v3_14 = new byte[(v2_13.length + 4)]; + v3_14[0] = 3; + v3_14[1] = ((byte) v12_15); + v3_14[2] = ((byte) (v14_2 >> 8)); + v3_14[3] = ((byte) (v14_2 & 255)); + q6.n.g0(v24_0, v3_14, 4, 0, 0, 12); + StringBuilder v2_20 = v24_0; + int v24_1 = v5_0; + v5_0 = (v20_2 + 1); + byte[] v25_1 = v3_14; + String v3_15 = v2_20.length; + int v20_3 = v4_5; + String v4_3 = new StringBuilder(); + int v26_1 = v15_2; + v4_3.append("\u7b2c"); + v4_3.append(v5_0); + v4_3.append("\u5757 \u00b7 "); + v4_3.append(v3_15); + v4_3.append("B \u00b7 \u504f\u79fb"); + v4_3.append(v14_2); + v0_0.l(v4_3.toString()); + this.d = kotlin.coroutines.jvm.internal.SpillingKt.nullOutSpilledVariable(v34_2); + this.e = v13_10; + this.f = v6_17; + this.g = v2_20; + this.h = kotlin.coroutines.jvm.internal.SpillingKt.nullOutSpilledVariable(v25_1); + this.c = v9_0; + this.i = v8_3; + this.j = v7_11; + this.o = v11_8; + this.k = v12_15; + String v3_20 = v26_1; + this.l = v3_20; + this.m = v14_2; + this.n = v5_0; + this.p = 4; + v4_5 = v20_3; + v15_6 = v4_5.sendEpdBytes(v25_1, this); + v2_0 = v24_1; + if (v15_6 != v2_0) { + v20_5 = v3_20; + v3_9 = v2_20; + v14_4 = v13_10; + v13_11 = v14_2; + v24_4 = v5_0; + v5_1 = v6_17; + v6_19 = v34_2; + v8_4 = v7_11; + v7_13 = v12_15; + v9_1 = v8_3; + v10 = v11_8; + v11_10 = v9_0; + while (!((Boolean) v15_6).booleanValue()) { + try { + v0_0.l("\u53d1\u9001\u5931\u8d25\uff0c\u5df2\u4e2d\u6b62"); + v23_0.setValue(kotlin.coroutines.jvm.internal.Boxing.boxInt(0)); + StringBuilder v2_22 = v22_1; + try { + v2_22.setValue(kotlin.coroutines.jvm.internal.Boxing.boxBoolean(0)); + v2_22.setValue(kotlin.coroutines.jvm.internal.Boxing.boxBoolean(0)); + return v21_1; + } catch (Throwable v0_5) { + v5_0 = v2_22; + } + } catch (Throwable v0_5) { + v2_22 = v22_1; + } + v2_22.setValue(kotlin.coroutines.jvm.internal.Boxing.boxBoolean(0)); + v2_22.setValue(kotlin.coroutines.jvm.internal.Boxing.boxBoolean(0)); + return v21_1; + } + int v34_3 = v5_1; + int v5_2 = v22_1; + int v15_10 = v23_0; + p6.g v13_12 = (v13_11 + v20_5); + String v3_22 = (v3_9.length + v8_4); + v15_10.setValue(kotlin.coroutines.jvm.internal.Boxing.boxInt(((v3_22 * 100) / v9_1))); + v6_17 = v34_3; + v34_2 = v6_19; + v14_2 = v13_12; + v13_10 = v14_4; + v22_1 = v5_2; + v8_3 = v9_1; + v5_0 = v2_0; + v2_1 = v15_10; + v15_2 = v20_5; + v20_2 = v24_4; + v7_11 = v3_22; + v12_15 = v7_13; + v11_8 = v10; + v9_0 = v11_10; + } else { + return v2_0; + } + } + } + } else { + v2_0 = v5_0; + return v2_0; + } + } else { + } + } else { + } + case 1: + v6_15 = this.j; + v8_3 = this.i; + v9_0 = this.c; + v11_4 = ((java.util.List) this.d); + q6.y.Y(p34); + break; + case 2: + v6_15 = this.j; + v8_3 = this.i; + v9_0 = this.c; + v11_4 = ((java.util.List) this.d); + q6.y.Y(p34); + break; + case 3: + v6_15 = this.j; + v8_3 = this.i; + v9_0 = this.c; + v11_4 = ((java.util.List) this.d); + q6.y.Y(p34); + break; + case 4: + v13_11 = this.m; + int v14_3 = this.l; + int v15_7 = this.k; + v10 = this.o; + v8_4 = this.j; + v9_1 = this.i; + v11_10 = this.c; + int v20_6 = this.n; + byte[] v21_2 = this.g; + String v22_2 = this.f; + kotlinx.coroutines.flow.MutableStateFlow v23_1 = this.e; + v6_19 = ((java.util.List) this.d); + q6.y.Y(p34); + v24_4 = v20_6; + int v19 = 1; + v20_5 = v14_3; + v14_4 = v23_1; + v23_0 = v2_1; + v2_0 = v5_0; + v5_1 = v22_2; + v22_1 = v3_9; + v3_9 = v21_2; + v21_1 = v7_12; + v7_13 = v15_7; + v15_6 = p34; + break; + case 5: + v6_15 = this.j; + v8_3 = this.i; + v9_0 = this.c; + v11_6 = ((java.util.List) this.d); + q6.y.Y(p34); + v15_0 = v2_1; + v2_0 = v5_0; + v21_0 = v7_12; + v5_0 = v3_9; + break; + case 6: + v6_15 = this.j; + v8_3 = this.i; + v9_0 = this.c; + v11_6 = ((java.util.List) this.d); + q6.y.Y(p34); + v15_0 = v2_1; + v2_0 = v5_0; + v21_0 = v7_12; + v5_0 = v3_9; + break; + case 7: + String v4_0 = this.c; + q6.y.Y(p34); + v15_0 = v2_1; + v9_0 = v4_0; + v21_0 = v7_12; + v5_0 = v3_9; + v15_0.setValue(kotlin.coroutines.jvm.internal.Boxing.boxInt(100)); + v2_8 = w7.w.j((((float) (System.currentTimeMillis() - v9_0)) / 1148846080)); + v3_8 = new StringBuilder(); + v3_8.append("\u4e0a\u4f20\u5b8c\u6210\uff0c\u8017\u65f6"); + v3_8.append(v2_8); + v3_8.append("s"); + v0_0.l(v3_8.toString()); + this.t.invoke(); + v5_0.setValue(kotlin.coroutines.jvm.internal.Boxing.boxBoolean(0)); + return v21_0; + default: + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } + } catch (Throwable v0_5) { + v5_0 = v3_9; + } + v5_0.setValue(kotlin.coroutines.jvm.internal.Boxing.boxBoolean(0)); + throw v0_5; + } +} diff --git a/analysis/apk/decomp/c8_g.java b/analysis/apk/decomp/c8_g.java new file mode 100644 index 0000000..0d8143b --- /dev/null +++ b/analysis/apk/decomp/c8_g.java @@ -0,0 +1,200 @@ +package c8; +public final class g extends e8.o implements b8.c { + public final kotlinx.coroutines.flow.StateFlow A; + public final f8.a q; + public final kotlinx.coroutines.flow.MutableStateFlow r; + public final kotlinx.coroutines.flow.StateFlow s; + public final kotlinx.coroutines.flow.MutableStateFlow t; + public final kotlinx.coroutines.flow.StateFlow u; + public final kotlinx.coroutines.flow.MutableStateFlow v; + public final kotlinx.coroutines.flow.StateFlow w; + public final kotlinx.coroutines.flow.MutableStateFlow x; + public final kotlinx.coroutines.flow.StateFlow y; + public final kotlinx.coroutines.flow.MutableStateFlow z; + + public g(String p2, qbsg.top.ble.data.BleSessionFacade p3, kotlinx.coroutines.flow.SharedFlow p4, f8.a p5) + { + kotlin.jvm.internal.s.f(p2, "macAddress"); + kotlin.jvm.internal.s.f(p3, "session"); + super(p2, p3, p4); + super.q = p5; + kotlinx.coroutines.flow.StateFlow v2_14 = kotlinx.coroutines.flow.StateFlowKt.MutableStateFlow(""); + super.r = v2_14; + super.s = kotlinx.coroutines.flow.FlowKt.asStateFlow(v2_14); + kotlinx.coroutines.flow.StateFlow v2_4 = kotlinx.coroutines.flow.StateFlowKt.MutableStateFlow(new e8.a()); + super.t = v2_4; + super.u = kotlinx.coroutines.flow.FlowKt.asStateFlow(v2_4); + kotlinx.coroutines.flow.StateFlow v2_8 = kotlinx.coroutines.flow.StateFlowKt.MutableStateFlow(new e8.a()); + super.v = v2_8; + super.w = kotlinx.coroutines.flow.FlowKt.asStateFlow(v2_8); + kotlinx.coroutines.flow.StateFlow v3_1 = kotlinx.coroutines.flow.StateFlowKt.MutableStateFlow(0); + super.x = v3_1; + super.y = kotlinx.coroutines.flow.FlowKt.asStateFlow(v3_1); + kotlinx.coroutines.flow.StateFlow v2_11 = kotlinx.coroutines.flow.StateFlowKt.MutableStateFlow(0); + super.z = v2_11; + super.A = kotlinx.coroutines.flow.FlowKt.asStateFlow(v2_11); + return; + } + + public static String p(int p2) + { + if (p2 == null) { + return "e102"; + } else { + if (p2 == 1) { + return "e101"; + } else { + if (p2 != 2) { + throw new IllegalArgumentException(a1.a.j(p2, "Unknown row: ")); + } else { + return "e100"; + } + } + } + } + + public final kotlinx.coroutines.flow.StateFlow a() + { + return this.s; + } + + public final void b(int p4) + { + this.i(q6.n.Y(new String[] {c8.g.p(p4), "TIME", "e2"})), new c0.j0(this, p4, 1)); + return; + } + + public final kotlinx.coroutines.flow.StateFlow c() + { + return this.y; + } + + public final void d(String p4) + { + kotlin.jvm.internal.s.f(p4, "number"); + java.util.List v0_9 = java.util.regex.Pattern.compile("^[0-9]{11}$"); + kotlin.jvm.internal.s.e(v0_9, "compile(...)"); + if (!v0_9.matcher(p4).matches()) { + throw new e8.p("\u7535\u8bdd\u53f7\u7801\u5fc5\u987b\u662f11\u4f4d\u7eaf\u6570\u5b57"); + } else { + java.util.List v0_4 = new StringBuilder("ef"); + a0.f2 v1_1 = 0; + while (v1_1 < p4.length()) { + int v2_2 = p4.charAt(v1_1); + v0_4.append(v2_2); + v0_4.append(v2_2); + v1_1++; + } + this.i(q6.n.Y(new String[] {v0_4.toString(), "e2"})), new a0.f2(9, this, p4)); + return; + } + } + + public final void e(java.util.List p3) + { + this.i(p3, new a5.a(14)); + return; + } + + public final void f(int p8, int p9, boolean p10) + { + String v2_0 = 1; + if (p10 == null) { + c8.e v10_14 = ((Integer) this.x.getValue()); + Integer v3_1 = ((Integer) this.z.getValue()); + java.util.ArrayList v4_1 = new java.util.ArrayList(); + int v5 = 0; + if ((v10_14 == null) || ((v10_14.intValue() != p8) || ((v3_1 == null) || (p9 <= v3_1.intValue())))) { + if ((v10_14 == null) || (v10_14.intValue() == p8)) { + if (p8 != 0) { + v2_0 = 0; + } + v4_1.add(c8.g.p(v2_0)); + c8.e v10_6 = (p9 + 1); + while (v5 < v10_6) { + v4_1.add(c8.g.p(p8)); + v5++; + } + } else { + c8.e v10_7 = (p9 + 1); + while (v5 < v10_7) { + v4_1.add(c8.g.p(p8)); + v5++; + } + } + } else { + c8.e v10_2 = (p9 - v3_1.intValue()); + while (v5 < v10_2) { + v4_1.add(c8.g.p(p8)); + v5++; + } + } + v4_1.add("TIME"); + v4_1.add("e2"); + this.i(v4_1, new c8.e(p8, p9, 1, this)); + return; + } else { + c8.e v10_12; + if (p8 == 0) { + v10_12 = a1.a.j((p9 + 1), "e1020"); + } else { + if (p8 == 1) { + v10_12 = a1.a.j((p9 + 3), "e1010"); + } else { + v10_12 = "e10000"; + } + } + this.i(q6.n.Y(new String[] {v10_12, "TIME", "e2"})), new c8.e(p8, p9, 0, this)); + return; + } + } + + public final kotlinx.coroutines.flow.StateFlow g() + { + return this.A; + } + + public final String j() + { + return "\u5e73\u5e73/\u626b\u5730"; + } + + public final void n(Object p8, g8.d p9, a7.a p10) + { + kotlin.jvm.internal.s.f(p8, "processedBitmap"); + kotlin.jvm.internal.s.f(p9, "config"); + this.f = kotlinx.coroutines.BuildersKt.launch$default(this.e, 0, 0, new c8.f(this, p8, p9, p10, 0), 3, 0); + return; + } + + public final void o(e8.a p10, int p11) + { + a9.v1 v1_2; + java.util.ArrayList v0_0 = p10.a; + if (p11 != 16) { + v1_2 = 4; + } else { + v1_2 = 8; + } + int v2_0 = p10.f; + int v3 = p10.e; + int v4 = p10.d; + if ((v0_0.length() == 0) || (v0_0.length() > v1_2)) { + throw new e8.q(a1.a.k("\u5b57\u6570\u5fc5\u987b\u57281~", v1_2, " \u4e4b\u95f4")); + } else { + if (a.b.l(v4, v3, v2_0) <= a.b.M()) { + throw new e8.p("\u76ee\u6807\u65e5\u671f\u5fc5\u987b\u665a\u4e8e\u4eca\u5929"); + } else { + f8.a v6 = this.q; + java.util.ArrayList v0_3 = q6.o.H0(v6.c(v0_0, p11, p10.b, p10.c)); + if (v0_3.isEmpty()) { + throw new e8.r("\u672a\u80fd\u751f\u6210\u5012\u8ba1\u65f6\u6587\u5b57\uff0c\u8bf7\u68c0\u67e5\u5b57\u4f53\u6216\u5185\u5bb9"); + } else { + v0_3.add(v6.b(p11, v4, v3, v2_0)); + this.i(q6.o.y0(v0_3, "e2"), new a9.v1(p11, this, p10, 1)); + return; + } + } + } + } +} diff --git a/analysis/apk/decomp/d8_e.java b/analysis/apk/decomp/d8_e.java new file mode 100644 index 0000000..b8446fc --- /dev/null +++ b/analysis/apk/decomp/d8_e.java @@ -0,0 +1,471 @@ +package d8; +public final class e extends kotlin.coroutines.jvm.internal.SuspendLambda implements a7.e { + public long c; + public Object d; + public java.util.Iterator e; + public byte[] f; + public kotlin.jvm.internal.d0 g; + public byte[] h; + public Object i; + public int j; + public int k; + public int l; + public int m; + public int n; + public boolean o; + public int p; + public final synthetic d8.f q; + public final synthetic Object r; + public final synthetic g8.d s; + public final synthetic a7.a t; + + public e(d8.f p1, Object p2, g8.d p3, a7.a p4, kotlin.coroutines.Continuation p5) + { + this.q = p1; + this.r = p2; + this.s = p3; + this.t = p4; + super(2, p5); + return; + } + + public final kotlin.coroutines.Continuation create(Object p7, kotlin.coroutines.Continuation p8) + { + return new d8.e(this.q, this.r, this.s, this.t, p8); + } + + public final Object invoke(Object p1, Object p2) + { + return ((d8.e) this.create(((kotlinx.coroutines.CoroutineScope) p1), ((kotlin.coroutines.Continuation) p2))).invokeSuspend(p6.a0.a); + } + + public final Object invokeSuspend(Object p31) + { + try { + int v18_5; + byte[] v9_1; + String v21_2; + Integer v7_0; + long v10_0; + byte[] v15_0; + Exception v0_21; + boolean v12_11; + int v22_0; + Integer v3_0; + Exception v0_24; + int v11_1; + byte[] v15_4; + Integer v5_1; + int v20_0; + int v8_10; + boolean v12_15; + Integer v7_7; + boolean v23_1; + Integer v7_8; + Exception v0_1; + int v13_9; + int v18_2; + String v6_0; + int v11_9; + int v24_3; + String v4_0; + String v6_1; + byte[] v14_2; + byte[] v9_0; + Integer v31_3; + Exception v0_0 = this.r; + Boolean v2_0 = this.q; + v3_0 = v2_0.j; + v4_0 = v2_0.h; + v5_1 = v2_0.b; + v6_0 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + v8_10 = p6.a0.a; + switch (this.p) { + case 0: + q6.y.Y(p31); + v9_0 = System.currentTimeMillis(); + v2_0.l("\u5f00\u59cbEPD\u901a\u9053\u56fe\u7247\u4e0a\u4f20"); + v4_0.setValue(kotlin.coroutines.jvm.internal.Boxing.boxBoolean(1)); + v3_0.setValue(kotlin.coroutines.jvm.internal.Boxing.boxInt(0)); + v11_1 = q6.n.Y(new p6.g[] {new p6.g(d8.f.o(v2_0, v0_0, 0), kotlin.coroutines.jvm.internal.Boxing.boxBoolean(0)), new p6.g(d8.f.o(v2_0, v0_0, 1), kotlin.coroutines.jvm.internal.Boxing.boxBoolean(1))})); + Exception v0_6 = v11_1.iterator(); + v7_0 = 0; + while (v0_6.hasNext()) { + v7_0 += ((byte[]) ((p6.g) v0_6.next()).c).length; + } + Exception v0_8 = d8.f.p(v2_0, "8001"); + this.d = v11_1; + this.c = v9_0; + this.j = v7_0; + this.k = 0; + this.p = 1; + if (v5_1.sendEpdBytes(v0_8, this) != v6_0) { + v0_1 = 0; + boolean v12_6 = d8.f.p(v2_0, "0000"); + this.d = v11_1; + this.c = v9_0; + this.j = v7_0; + this.k = v0_1; + this.p = 2; + if (v5_1.sendEpdBytes(v12_6, this) != v6_0) { + boolean v12_9 = d8.f.p(v2_0, "020000"); + this.d = v11_1; + this.c = v9_0; + this.j = v7_0; + this.k = v0_1; + this.p = 3; + if (v5_1.sendEpdBytes(v12_9, this) != v6_0) { + v12_11 = v11_1.iterator(); + if (!v12_11.hasNext()) { + Integer v31_1 = v5_1; + v5_1 = v3_0; + v3_0 = v6_0; + v6_0 = v4_0; + v4_0 = v31_1; + v22_0 = v8_10; + Integer v31_2 = v11_1; + int v8_1 = d8.f.p(v2_0, "0101"); + this.d = kotlin.coroutines.jvm.internal.SpillingKt.nullOutSpilledVariable(v31_2); + this.e = 0; + this.f = 0; + this.g = 0; + this.h = 0; + this.i = 0; + this.c = v9_0; + this.j = v7_0; + this.k = v0_1; + this.p = 5; + if (v4_0.sendEpdBytes(v8_1, this) != v3_0) { + v11_9 = v31_2; + this.d = kotlin.coroutines.jvm.internal.SpillingKt.nullOutSpilledVariable(v11_9); + this.c = v9_0; + this.j = v7_0; + this.k = v0_1; + this.p = 6; + if (kotlinx.coroutines.DelayKt.delay(300, this) != v3_0) { + int v8_8; + int v8_7 = this.s.b; + if (v8_7 == 0) { + v8_8 = 0; + } else { + v8_8 = v8_7.f; + } + int v8_9; + if (v8_8 == 0) { + v8_9 = "e2"; + } else { + v8_9 = "aa"; + } + this.d = kotlin.coroutines.jvm.internal.SpillingKt.nullOutSpilledVariable(v11_9); + this.c = v9_0; + this.j = v7_0; + this.k = v0_1; + this.p = 7; + if (v4_0.sendCommand(v8_9, this) != v3_0) { + v5_1.setValue(kotlin.coroutines.jvm.internal.Boxing.boxInt(100)); + Exception v0_16 = w7.w.j((((float) (System.currentTimeMillis() - v9_0)) / 1148846080)); + Integer v3_5 = new StringBuilder(); + v3_5.append("\u4e0a\u4f20\u5b8c\u6210\uff0c\u8017\u65f6"); + v3_5.append(v0_16); + v3_5.append("s"); + v2_0.l(v3_5.toString()); + this.t.invoke(); + v6_0.setValue(kotlin.coroutines.jvm.internal.Boxing.boxBoolean(0)); + return v22_0; + } else { + return v3_0; + } + } else { + return v3_0; + } + } else { + return v3_0; + } + } else { + int v13_4 = ((p6.g) v12_11.next()); + byte[] v14_1 = ((byte[]) v13_4.c); + int v13_7 = ((Boolean) v13_4.d).booleanValue(); + if (v13_7 != 0) { + v15_0 = 0; + } else { + v15_0 = -1; + } + String v21_0; + int v18_1 = new kotlin.jvm.internal.d0(); + if (v13_7 != 0) { + v21_0 = "BWR"; + } else { + v21_0 = "BW"; + } + v22_0 = v8_10; + v31_3 = v11_1; + v8_10 = v21_0; + int v11_12 = v14_1.length; + String v21_1 = v12_11; + boolean v12_14 = new StringBuilder(); + boolean v23_0 = v13_7; + v12_14.append("\u53d1\u9001"); + v12_14.append(v8_10); + v12_14.append(" "); + v12_14.append(v11_12); + v12_14.append("B"); + v2_0.l(v12_14.toString()); + v8_10 = 240; + v10_0 = v9_0; + v13_9 = v18_1; + v12_15 = v23_0; + v18_2 = 0; + v9_1 = v7_0; + v7_7 = v0_1; + v0_21 = v14_1; + v14_2 = v21_1; + v21_2 = v4_0; + String v4_2 = v13_9.c; + v23_1 = v3_0; + if (v4_2 >= v0_21.length) { + int v17 = 2; + v0_1 = v7_7; + v7_0 = v9_1; + v9_0 = v10_0; + v12_11 = v14_2; + v4_0 = v21_2; + v8_10 = v22_0; + v3_0 = v23_1; + v11_1 = v31_3; + } else { + Integer v3_9 = q6.n.k0(v0_21, v13_9.c, Math.min((v4_2 + v8_10), v0_21.length)); + int v24_0 = v3_9; + String v4_7 = new byte[(v3_9.length + 4)]; + v4_7[0] = 3; + v4_7[1] = ((byte) v15_0); + Integer v3_12 = v13_9.c; + byte[] v25_0 = v4_7; + v25_0[2] = ((byte) (v3_12 >> 8)); + v25_0[3] = ((byte) (v3_12 & 255)); + q6.n.g0(v24_0, v25_0, 4, 0, 0, 12); + Integer v3_15 = v24_0; + int v24_1 = v6_0; + v6_0 = (v18_2 + 1); + byte[] v25_1 = v25_0; + String v4_11 = v3_15.length; + int v18_3 = v5_1; + Integer v5_2 = v13_9.c; + String v26_1 = v8_10; + int v8_15 = new StringBuilder(); + int v27_1 = v15_0; + v8_15.append("\u7b2c"); + v8_15.append(v6_0); + v8_15.append("\u5757 \u00b7 "); + v8_15.append(v4_11); + v8_15.append("B \u00b7 \u504f\u79fb"); + v8_15.append(v5_2); + v2_0.l(v8_15.toString()); + this.d = kotlin.coroutines.jvm.internal.SpillingKt.nullOutSpilledVariable(v31_3); + this.e = v14_2; + this.f = v0_21; + this.g = v13_9; + this.h = v3_15; + this.i = kotlin.coroutines.jvm.internal.SpillingKt.nullOutSpilledVariable(v25_1); + this.c = v10_0; + this.j = v9_1; + this.k = v7_7; + this.o = v12_15; + byte[] v15_3 = v27_1; + this.l = v15_3; + v8_10 = v26_1; + this.m = v8_10; + this.n = v6_0; + this.p = 4; + v4_0 = v18_3; + v5_1 = v4_0.sendEpdBytes(v25_1, this); + v3_0 = v24_1; + if (v5_1 != v3_0) { + v15_4 = v7_7; + v7_8 = v3_15; + v18_5 = v15_3; + v24_3 = v6_0; + v6_1 = v0_21; + v0_24 = v31_3; + while (!((Boolean) v5_1).booleanValue()) { + try { + v2_0.l("\u53d1\u9001\u5931\u8d25\uff0c\u5df2\u4e2d\u6b62"); + v5_1 = v23_1; + try { + v5_1.setValue(kotlin.coroutines.jvm.internal.Boxing.boxInt(0)); + v21_2.setValue(kotlin.coroutines.jvm.internal.Boxing.boxBoolean(0)); + return v22_0; + } catch (Exception v0_22) { + Integer v3_16 = v21_2; + v6_0 = v3_16; + Exception v0_34 = v0_22.getMessage(); + Integer v3_20 = new StringBuilder(); + v3_20.append("\u4f20\u8f93\u4e2d\u65ad: "); + v3_20.append(v0_34); + v2_0.l(v3_20.toString()); + v5_1.setValue(kotlin.coroutines.jvm.internal.Boxing.boxInt(0)); + v6_0.setValue(kotlin.coroutines.jvm.internal.Boxing.boxBoolean(0)); + return v22_0; + } + } catch (Exception v0_22) { + v3_16 = v21_2; + v5_1 = v23_1; + } catch (Exception v0_2) { + v6_0 = v21_2; + v20_0 = 0; + } + v5_1.setValue(kotlin.coroutines.jvm.internal.Boxing.boxInt(0)); + v21_2.setValue(kotlin.coroutines.jvm.internal.Boxing.boxBoolean(0)); + return v22_0; + } + Integer v31_4 = v6_1; + String v6_2 = v21_2; + Integer v5_6 = v23_1; + String v21_3 = v0_24; + v13_9.c = (v13_9.c + v8_10); + v7_7 = (v15_4 + v7_8.length); + v5_6.setValue(kotlin.coroutines.jvm.internal.Boxing.boxInt(((v7_7 * 100) / v9_1))); + v0_21 = v31_4; + v15_0 = v18_5; + v31_3 = v21_3; + v18_2 = v24_3; + v21_2 = v6_2; + v6_0 = v3_0; + v3_0 = v5_6; + v5_1 = v4_0; + } else { + return v3_0; + } + } + } + } else { + v3_0 = v6_0; + return v3_0; + } + } else { + } + } else { + } + case 1: + v20_0 = 0; + v0_1 = this.k; + v7_0 = this.j; + v9_0 = this.c; + v11_1 = ((java.util.List) this.d); + q6.y.Y(p31); + break; + case 2: + v20_0 = 0; + v0_1 = this.k; + v7_0 = this.j; + v9_0 = this.c; + v11_1 = ((java.util.List) this.d); + q6.y.Y(p31); + break; + case 3: + v20_0 = 0; + v0_1 = this.k; + v7_0 = this.j; + v9_0 = this.c; + v11_1 = ((java.util.List) this.d); + q6.y.Y(p31); + break; + case 4: + Integer v7_9 = this.m; + int v13_10 = this.l; + byte[] v14_3 = this.o; + v15_4 = this.k; + int v18_6 = this.j; + byte[] v9_2 = this.c; + int v11_15 = this.h; + v20_0 = 0; + boolean v12_21 = this.g; + String v21_4 = this.n; + int v22_3 = this.f; + boolean v23_2 = this.e; + v0_24 = ((java.util.List) this.d); + q6.y.Y(p31); + v23_1 = v3_0; + v3_0 = v6_0; + v6_1 = v22_3; + v22_0 = v8_10; + v8_10 = v7_9; + v7_8 = v11_15; + v10_0 = v9_2; + v9_1 = v18_6; + v18_5 = v13_10; + v13_9 = v12_21; + v12_15 = v14_3; + v14_2 = v23_2; + v24_3 = v21_4; + v17 = 2; + v21_2 = v4_0; + v4_0 = v5_1; + v5_1 = p31; + break; + case 5: + v0_1 = this.k; + v7_0 = this.j; + v9_0 = this.c; + v11_9 = ((java.util.List) this.d); + q6.y.Y(p31); + int v22_2 = v5_1; + v5_1 = v3_0; + v3_0 = v6_0; + v6_0 = v4_0; + v4_0 = v22_2; + v22_0 = v8_10; + break; + case 6: + v0_1 = this.k; + v7_0 = this.j; + v9_0 = this.c; + v11_9 = ((java.util.List) this.d); + q6.y.Y(p31); + int v22_1 = v5_1; + v5_1 = v3_0; + v3_0 = v6_0; + v6_0 = v4_0; + v4_0 = v22_1; + v22_0 = v8_10; + break; + case 7: + Integer v5_0 = this.c; + q6.y.Y(p31); + v9_0 = v5_0; + v22_0 = v8_10; + v5_1 = v3_0; + v6_0 = v4_0; + v5_1.setValue(kotlin.coroutines.jvm.internal.Boxing.boxInt(100)); + v0_16 = w7.w.j((((float) (System.currentTimeMillis() - v9_0)) / 1148846080)); + v3_5 = new StringBuilder(); + v3_5.append("\u4e0a\u4f20\u5b8c\u6210\uff0c\u8017\u65f6"); + v3_5.append(v0_16); + v3_5.append("s"); + v2_0.l(v3_5.toString()); + this.t.invoke(); + v6_0.setValue(kotlin.coroutines.jvm.internal.Boxing.boxBoolean(0)); + return v22_0; + default: + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } + } catch (Exception v0_22) { + v5_1 = v3_0; + v6_0 = v4_0; + v22_0 = v8_10; + v0_34 = v0_22.getMessage(); + v3_20 = new StringBuilder(); + v3_20.append("\u4f20\u8f93\u4e2d\u65ad: "); + v3_20.append(v0_34); + v2_0.l(v3_20.toString()); + v5_1.setValue(kotlin.coroutines.jvm.internal.Boxing.boxInt(0)); + v6_0.setValue(kotlin.coroutines.jvm.internal.Boxing.boxBoolean(0)); + return v22_0; + } catch (Exception v0_2) { + v6_0 = v4_0; + } catch (Exception v0_2) { + v6_0 = v4_0; + } + v6_0.setValue(kotlin.coroutines.jvm.internal.Boxing.boxBoolean(v20_0)); + throw v0_2; + } +} diff --git a/analysis/apk/decomp/d8_f.java b/analysis/apk/decomp/d8_f.java new file mode 100644 index 0000000..16d265f --- /dev/null +++ b/analysis/apk/decomp/d8_f.java @@ -0,0 +1,298 @@ +package d8; +public final class f extends e8.o implements b8.c { + public final kotlinx.coroutines.flow.StateFlow A; + public final f8.a q; + public final kotlinx.coroutines.flow.MutableStateFlow r; + public final kotlinx.coroutines.flow.StateFlow s; + public final kotlinx.coroutines.flow.MutableStateFlow t; + public final kotlinx.coroutines.flow.StateFlow u; + public final kotlinx.coroutines.flow.MutableStateFlow v; + public final kotlinx.coroutines.flow.StateFlow w; + public final kotlinx.coroutines.flow.MutableStateFlow x; + public final kotlinx.coroutines.flow.StateFlow y; + public final kotlinx.coroutines.flow.MutableStateFlow z; + + public f(String p2, qbsg.top.ble.data.BleSessionFacade p3, kotlinx.coroutines.flow.SharedFlow p4, f8.a p5) + { + kotlin.jvm.internal.s.f(p2, "macAddress"); + kotlin.jvm.internal.s.f(p3, "session"); + super(p2, p3, p4); + super.q = p5; + kotlinx.coroutines.flow.StateFlow v2_14 = kotlinx.coroutines.flow.StateFlowKt.MutableStateFlow(""); + super.r = v2_14; + super.s = kotlinx.coroutines.flow.FlowKt.asStateFlow(v2_14); + kotlinx.coroutines.flow.StateFlow v2_4 = kotlinx.coroutines.flow.StateFlowKt.MutableStateFlow(new e8.a()); + super.t = v2_4; + super.u = kotlinx.coroutines.flow.FlowKt.asStateFlow(v2_4); + kotlinx.coroutines.flow.StateFlow v2_8 = kotlinx.coroutines.flow.StateFlowKt.MutableStateFlow(new e8.a()); + super.v = v2_8; + super.w = kotlinx.coroutines.flow.FlowKt.asStateFlow(v2_8); + kotlinx.coroutines.flow.StateFlow v3_1 = kotlinx.coroutines.flow.StateFlowKt.MutableStateFlow(0); + super.x = v3_1; + super.y = kotlinx.coroutines.flow.FlowKt.asStateFlow(v3_1); + kotlinx.coroutines.flow.StateFlow v2_11 = kotlinx.coroutines.flow.StateFlowKt.MutableStateFlow(0); + super.z = v2_11; + super.A = kotlinx.coroutines.flow.FlowKt.asStateFlow(v2_11); + return; + } + + public static final byte[] o(d8.f p9, Object p10, boolean p11) + { + int v6; + int v5_0; + kotlin.jvm.internal.s.f(p10, "bitmap"); + int v0 = ((android.graphics.Bitmap) p10).getWidth(); + int v9_6 = ((android.graphics.Bitmap) p10).getHeight(); + byte[] v10_2 = g8.f.c(p10); + java.util.ArrayList v1_1 = new java.util.ArrayList(); + int v4 = 0; + if ((v0 == 212) || ((v0 == 250) || (v0 == 296))) { + int v2_3 = (v0 - 1); + v5_0 = 0; + v6 = 0; + while (-1 < v2_3) { + int v7_1 = 0; + while (v7_1 < v9_6) { + v5_0 = ((v5_0 << 1) | d8.f.r(v10_2, v0, p11, v2_3, v7_1)); + v6++; + if (v6 == 8) { + v1_1.add(Integer.valueOf(v5_0)); + v5_0 = 0; + v6 = 0; + } + v7_1++; + } + v2_3--; + } + } else { + int v2_4 = 0; + v5_0 = 0; + v6 = 0; + while (v2_4 < v9_6) { + int v7_2 = 0; + while (v7_2 < v0) { + v5_0 = ((v5_0 << 1) | d8.f.r(v10_2, v0, p11, v7_2, v2_4)); + v6++; + if (v6 == 8) { + v1_1.add(Integer.valueOf(v5_0)); + v5_0 = 0; + v6 = 0; + } + v7_2++; + } + v2_4++; + } + } + if (v6 > 0) { + v1_1.add(Integer.valueOf((v5_0 << (8 - v6)))); + } + int v9_5 = v1_1.size(); + byte[] v10_1 = new byte[v9_5]; + while (v4 < v9_5) { + v10_1[v4] = ((byte) ((Number) v1_1.get(v4)).intValue()); + v4++; + } + return v10_1; + } + + public static final byte[] p(d8.f p4, String p5) + { + IllegalArgumentException v4_2 = i7.p.j0(p5, " ", ""); + if ((v4_2.length() % 2) != 0) { + throw new IllegalArgumentException("Failed requirement."); + } else { + String v5_2 = (v4_2.length() / 2); + byte[] v0_1 = new byte[v5_2]; + int v1 = 0; + while (v1 < v5_2) { + byte v2_0 = (v1 * 2); + byte v2_1 = v4_2.substring(v2_0, (v2_0 + 2)); + kotlin.jvm.internal.s.e(v2_1, "substring(...)"); + c7.a.l(16); + v0_1[v1] = ((byte) Integer.parseInt(v2_1, 16)); + v1++; + } + return v0_1; + } + } + + public static final int r(int[] p0, int p1, boolean p2, int p3, int p4) + { + int v0_3 = p0[((p4 * p1) + p3)]; + int v1_2 = ((v0_3 >> 16) & 255); + if (p2) { + if ((v1_2 > 0) && ((((v0_3 >> 8) & 255) == 0) && ((v0_3 & 255) == 0))) { + return 1; + } + } else { + if (v1_2 > 0) { + return 1; + } + } + return 0; + } + + public static String s(int p2) + { + if (p2 == null) { + return "e102"; + } else { + if (p2 == 1) { + return "e101"; + } else { + if (p2 != 2) { + throw new IllegalArgumentException(a1.a.j(p2, "Unknown row: ")); + } else { + return "e100"; + } + } + } + } + + public final kotlinx.coroutines.flow.StateFlow a() + { + return this.s; + } + + public final void b(int p4) + { + this.i(q6.n.Y(new String[] {d8.f.s(p4), "TIME", "e2"})), new c0.j0(this, p4, 2)); + return; + } + + public final kotlinx.coroutines.flow.StateFlow c() + { + return this.y; + } + + public final void d(String p5) + { + kotlin.jvm.internal.s.f(p5, "number"); + java.util.List v0_9 = java.util.regex.Pattern.compile("^[0-9]{11}$"); + kotlin.jvm.internal.s.e(v0_9, "compile(...)"); + if (!v0_9.matcher(p5).matches()) { + throw new e8.p("\u7535\u8bdd\u53f7\u7801\u5fc5\u987b\u662f11\u4f4d\u7eaf\u6570\u5b57"); + } else { + java.util.List v0_4 = new StringBuilder("ef"); + a0.f2 v1_1 = 0; + while (v1_1 < p5.length()) { + int v2_2 = p5.charAt(v1_1); + c7.a.l(16); + int v2_3 = Integer.toString(v2_2, 16); + kotlin.jvm.internal.s.e(v2_3, "toString(...)"); + v0_4.append(v2_3); + v1_1++; + } + this.i(q6.n.Y(new String[] {v0_4.toString(), "e2"})), new a0.f2(11, this, p5)); + return; + } + } + + public final void e(java.util.List p3) + { + this.i(p3, new a5.a(14)); + return; + } + + public final void f(int p8, int p9, boolean p10) + { + String v2_0 = 1; + if (p10 == null) { + d8.d v10_14 = ((Integer) this.x.getValue()); + Integer v3_1 = ((Integer) this.z.getValue()); + java.util.ArrayList v4_1 = new java.util.ArrayList(); + int v5 = 0; + if ((v10_14 == null) || ((v10_14.intValue() != p8) || ((v3_1 == null) || (p9 <= v3_1.intValue())))) { + if ((v10_14 == null) || (v10_14.intValue() == p8)) { + if (p8 != 0) { + v2_0 = 0; + } + v4_1.add(d8.f.s(v2_0)); + d8.d v10_6 = (p9 + 1); + while (v5 < v10_6) { + v4_1.add(d8.f.s(p8)); + v5++; + } + } else { + d8.d v10_7 = (p9 + 1); + while (v5 < v10_7) { + v4_1.add(d8.f.s(p8)); + v5++; + } + } + } else { + d8.d v10_2 = (p9 - v3_1.intValue()); + while (v5 < v10_2) { + v4_1.add(d8.f.s(p8)); + v5++; + } + } + v4_1.add("TIME"); + v4_1.add("e2"); + this.i(v4_1, new d8.d(this, p8, p9, 1)); + return; + } else { + d8.d v10_12; + if (p8 == 0) { + v10_12 = a1.a.j((p9 + 1), "e1020"); + } else { + if (p8 == 1) { + v10_12 = a1.a.j((p9 + 3), "e1010"); + } else { + v10_12 = "e10000"; + } + } + this.i(q6.n.Y(new String[] {v10_12, "TIME", "e2"})), new d8.d(this, p8, p9, 0)); + return; + } + } + + public final kotlinx.coroutines.flow.StateFlow g() + { + return this.A; + } + + public final String j() + { + return "\u8f7b\u821e/\u65f6\u5149"; + } + + public final void n(Object p8, g8.d p9, a7.a p10) + { + kotlin.jvm.internal.s.f(p8, "processedBitmap"); + kotlin.jvm.internal.s.f(p9, "config"); + this.f = kotlinx.coroutines.BuildersKt.launch$default(this.e, 0, 0, new d8.e(this, p8, p9, p10, 0), 3, 0); + return; + } + + public final void q(e8.a p10, int p11) + { + a9.v1 v1_2; + java.util.ArrayList v0_0 = p10.a; + if (p11 != 16) { + v1_2 = 4; + } else { + v1_2 = 8; + } + int v2_0 = p10.f; + int v3 = p10.e; + int v4 = p10.d; + if ((v0_0.length() == 0) || (v0_0.length() > v1_2)) { + throw new e8.q(a1.a.k("\u5b57\u6570\u5fc5\u987b\u57281~", v1_2, " \u4e4b\u95f4")); + } else { + if (a.b.l(v4, v3, v2_0) <= a.b.M()) { + throw new e8.p("\u76ee\u6807\u65e5\u671f\u5fc5\u987b\u665a\u4e8e\u4eca\u5929"); + } else { + f8.a v6 = this.q; + java.util.ArrayList v0_3 = q6.o.H0(v6.c(v0_0, p11, p10.b, p10.c)); + if (v0_3.isEmpty()) { + throw new e8.r("\u672a\u80fd\u751f\u6210\u5012\u8ba1\u65f6\u6587\u5b57\uff0c\u8bf7\u68c0\u67e5\u5b57\u4f53\u6216\u5185\u5bb9"); + } else { + v0_3.add(v6.b(p11, v4, v3, v2_0)); + this.i(q6.o.y0(v0_3, "e2"), new a9.v1(p11, this, p10, 2)); + return; + } + } + } + } +} diff --git a/analysis/apk/decomp/e8_a.java b/analysis/apk/decomp/e8_a.java new file mode 100644 index 0000000..39b0cad --- /dev/null +++ b/analysis/apk/decomp/e8_a.java @@ -0,0 +1,84 @@ +package e8; +public final class a { + public final String a; + public final int b; + public final float c; + public final int d; + public final int e; + public final int f; + + public a() + { + this("", 128, 1065353216, a.b.s(System.currentTimeMillis())[0], a.b.s(System.currentTimeMillis())[1], a.b.s(System.currentTimeMillis())[2]); + return; + } + + public a(String p1, int p2, float p3, int p4, int p5, int p6) + { + this.a = p1; + this.b = p2; + this.c = p3; + this.d = p4; + this.e = p5; + this.f = p6; + return; + } + + public static e8.a a(e8.a p7, String p8, int p9, float p10, int p11, int p12, int p13, int p14) + { + if ((p14 & 1) != 0) { + p8 = p7.a; + } + p7.getClass(); + if ((p14 & 4) != 0) { + p9 = p7.b; + } + if ((p14 & 8) != 0) { + p10 = p7.c; + } + if ((p14 & 16) != 0) { + p11 = p7.d; + } + if ((p14 & 32) != 0) { + p12 = p7.e; + } + if ((p14 & 64) != 0) { + p13 = p7.f; + } + p7.getClass(); + kotlin.jvm.internal.s.f(p8, "text"); + return new e8.a(p8, p9, p10, p11, p12, p13); + } + + public final boolean equals(Object p3) + { + if ((this == p3) || (((p3 instanceof e8.a)) && ((kotlin.jvm.internal.s.b(this.a, ((e8.a) p3).a)) && ((this.b == ((e8.a) p3).b) && ((Float.compare(this.c, ((e8.a) p3).c) == 0) && ((this.d == ((e8.a) p3).d) && ((this.e == ((e8.a) p3).e) && (this.f == ((e8.a) p3).f)))))))) { + return 1; + } else { + return 0; + } + } + + public final int hashCode() + { + return (Integer.hashCode(this.f) + a1.a.c(this.e, a1.a.c(this.d, a1.a.b(this.c, a1.a.c(this.b, (this.a.hashCode() * 961), 31), 31), 31), 31)); + } + + public final String toString() + { + String v0_1 = new StringBuilder("CountdownConfig(text="); + v0_1.append(this.a); + v0_1.append(", fontPath=null, thickness="); + v0_1.append(this.b); + v0_1.append(", scale="); + v0_1.append(this.c); + v0_1.append(", targetYear="); + v0_1.append(this.d); + v0_1.append(", targetMonth="); + v0_1.append(this.e); + v0_1.append(", targetDay="); + v0_1.append(this.f); + v0_1.append(")"); + return v0_1.toString(); + } +} diff --git a/analysis/apk/decomp/e8_b.java b/analysis/apk/decomp/e8_b.java new file mode 100644 index 0000000..b17a2d3 --- /dev/null +++ b/analysis/apk/decomp/e8_b.java @@ -0,0 +1,38 @@ +package e8; +public final class b extends e8.e { + public final String a; + + public b(String p2) + { + kotlin.jvm.internal.s.f(p2, "data"); + this.a = p2; + return; + } + + public final boolean equals(Object p4) + { + if (this != p4) { + if ((p4 instanceof e8.b)) { + if (kotlin.jvm.internal.s.b(this.a, ((e8.b) p4).a)) { + return 1; + } else { + return 0; + } + } else { + return 0; + } + } else { + return 1; + } + } + + public final int hashCode() + { + return this.a.hashCode(); + } + + public final String toString() + { + return p.p1.k("Log(data=", this.a, ")"); + } +} diff --git a/analysis/apk/decomp/e8_j.java b/analysis/apk/decomp/e8_j.java new file mode 100644 index 0000000..537acc2 --- /dev/null +++ b/analysis/apk/decomp/e8_j.java @@ -0,0 +1,218 @@ +package e8; +public final class j extends kotlin.coroutines.jvm.internal.SuspendLambda implements a7.e { + public int c; + public int d; + public int e; + public int f; + public Object g; + public e8.o h; + public java.util.Iterator i; + public Object j; + public Object k; + public Object l; + public String m; + public int n; + public final synthetic e8.o o; + public final synthetic java.util.List p; + public final synthetic a7.a q; + + public j(e8.o p1, java.util.List p2, a7.a p3, kotlin.coroutines.Continuation p4) + { + this.o = p1; + this.p = p2; + this.q = p3; + super(2, p4); + return; + } + + public final kotlin.coroutines.Continuation create(Object p4, kotlin.coroutines.Continuation p5) + { + return new e8.j(this.o, this.p, this.q, p5); + } + + public final Object invoke(Object p1, Object p2) + { + return ((e8.j) this.create(((kotlinx.coroutines.CoroutineScope) p1), ((kotlin.coroutines.Continuation) p2))).invokeSuspend(p6.a0.a); + } + + public final Object invokeSuspend(Object p22) + { + int v10_5; + java.util.Iterator v13_2; + boolean v20; + int v11_1; + e8.d v5_11; + Object v6_6; + int v18; + java.util.List v15_2; + e8.d v14_0; + int v12_2; + Exception v0_5; + int v17_0; + Exception v0_0 = this.o; + int v2_0 = v0_0.h; + kotlinx.coroutines.sync.Mutex v3 = v0_0.g; + int v4_6 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + e8.d v5_12 = this.n; + Object v6_0 = p6.a0.a; + int v7_0 = 0; + int v8_0 = 0; + Object v9_0 = 1; + try { + if (v5_12 == null) { + q6.y.Y(p22); + if (kotlinx.coroutines.sync.Mutex$DefaultImpls.tryLock$default(v3, 0, 1, 0)) { + v2_0.setValue(kotlin.coroutines.jvm.internal.Boxing.boxBoolean(1)); + v0_0.j.setValue(kotlin.coroutines.jvm.internal.Boxing.boxInt(0)); + int v11_0 = this.p; + e8.d v5_7 = v11_0.size(); + int v10_2 = q6.o.s0(v11_0, "", 0, 0, new e1.v(2), 30); + int v12_5 = new StringBuilder("\u5f00\u59cb\u6267\u884c\uff0c\u5171"); + v12_5.append(v5_7); + v12_5.append(" \u6761\u6307\u4ee4\uff1a"); + v12_5.append(v10_2); + System.out.println(v12_5.toString()); + v13_2 = v11_0.iterator(); + v15_2 = v11_0; + v11_1 = v11_0.size(); + v10_5 = 0; + v5_11 = v0_0; + v0_5 = 0; + if (!v13_2.hasNext()) { + v20 = v6_0; + v18 = v7_0; + v17_0 = v8_0; + try { + this.q.invoke(); + v2_0.setValue(kotlin.coroutines.jvm.internal.Boxing.boxBoolean(v18)); + v2_0 = v17_0; + kotlinx.coroutines.sync.Mutex$DefaultImpls.unlock$default(v3, v2_0, 1, v2_0); + return v20; + } catch (Exception) { + int v4_0 = 0; + int v7_3 = 1; + } + } else { + int v12_1 = v13_2.next(); + v14_0 = (v0_5 + 1); + if (v0_5 < null) { + v20 = v6_0; + v18 = v7_0; + v17_0 = v8_0; + k3.t.W(); + throw v17_0; + } else { + String v16_1 = ((String) v12_1); + v18 = v7_0; + int v7_2 = i7.i.S0(v16_1).toString(); + v17_0 = v8_0; + try { + int v8_3; + if (!i7.p.f0(v7_2, "TIME")) { + v8_3 = v7_2; + } else { + v8_3 = e8.o.m(); + } + } catch (Exception) { + v20 = v6_0; + v7_3 = v9_0; + v4_0 = v17_0; + } + Object v9_2 = new StringBuilder(); + v20 = v6_0; + v9_2.append("\u6b63\u5728\u53d1\u9001("); + v9_2.append(v14_0); + v9_2.append("/"); + v9_2.append(v11_1); + v9_2.append("): "); + v9_2.append(v8_3); + System.out.println(v9_2.toString()); + try { + Object v6_5 = v5_11.b; + this.g = kotlin.coroutines.jvm.internal.SpillingKt.nullOutSpilledVariable(v15_2); + this.h = v5_11; + this.i = v13_2; + this.j = kotlin.coroutines.jvm.internal.SpillingKt.nullOutSpilledVariable(v12_1); + this.k = kotlin.coroutines.jvm.internal.SpillingKt.nullOutSpilledVariable(v16_1); + this.l = kotlin.coroutines.jvm.internal.SpillingKt.nullOutSpilledVariable(v7_2); + this.m = v8_3; + this.c = v11_1; + this.d = v10_5; + this.e = v14_0; + this.f = v0_5; + this.n = 1; + v6_6 = v6_5.sendCommand(v8_3, this); + } catch (Exception v0_6) { + v14_0 = v5_11; + v12_2 = v8_3; + int v4_1 = v0_6.getMessage(); + e8.d v5_4 = new StringBuilder(); + v5_4.append("\u6307\u4ee4\u53d1\u9001\u5931\u8d25 "); + v5_4.append(v12_2); + v5_4.append(", \u539f\u56e0: "); + v5_4.append(v4_1); + v14_0.l(v5_4.toString()); + v14_0.l.tryEmit(new e8.d(v0_6, v12_2)); + throw v0_6; + } + if (v6_6 != v4_6) { + v12_2 = v8_3; + if (!((Boolean) v6_6).booleanValue()) { + throw new IllegalStateException("\u53d1\u9001\u5931\u8d25"); + } else { + v5_11.j.setValue(kotlin.coroutines.jvm.internal.Boxing.boxInt((((v0_5 + 1) * 100) / v11_1))); + v0_5 = v14_0; + v8_0 = v17_0; + v7_0 = v18; + v6_0 = v20; + v9_0 = 1; + } + } else { + return v4_6; + } + } + } + } else { + v0_0.l("\u6267\u884c\u8df3\u8fc7\uff1a\u4e92\u65a5\u9501\u5df2\u88ab\u5360\u7528"); + return v6_0; + } + } else { + if (v5_12 != 1) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + v0_5 = this.f; + e8.d v5_13 = this.e; + v10_5 = this.d; + v11_1 = this.c; + v12_2 = this.m; + java.util.Iterator v13 = ((String) this.k); + v13_2 = this.i; + e8.d v14_2 = this.h; + v15_2 = ((Iterable) this.g); + try { + q6.y.Y(p22); + v14_0 = v5_13; + v5_11 = v14_2; + v20 = v6_0; + v18 = 0; + v17_0 = 0; + v6_6 = p22; + } catch (Exception v0_6) { + v20 = p22; + v18 = 0; + v17_0 = 0; + } + } + } + } catch (Exception v0_9) { + v18 = 0; + v2_0.setValue(kotlin.coroutines.jvm.internal.Boxing.boxBoolean(v18)); + kotlinx.coroutines.sync.Mutex$DefaultImpls.unlock$default(v3, 0, 1, 0); + throw v0_9; + } catch (Exception v0_9) { + } + v2_0.setValue(kotlin.coroutines.jvm.internal.Boxing.boxBoolean(v18)); + kotlinx.coroutines.sync.Mutex$DefaultImpls.unlock$default(v3, v4_0, v7_3, v4_0); + return v20; + } +} diff --git a/analysis/apk/decomp/e8_o.java b/analysis/apk/decomp/e8_o.java new file mode 100644 index 0000000..15e468f --- /dev/null +++ b/analysis/apk/decomp/e8_o.java @@ -0,0 +1,102 @@ +package e8; +public abstract class o { + public final String a; + public final qbsg.top.ble.data.BleSessionFacade b; + public final kotlinx.coroutines.flow.SharedFlow c; + public final String d; + public final kotlinx.coroutines.CoroutineScope e; + public kotlinx.coroutines.Job f; + public final kotlinx.coroutines.sync.Mutex g; + public final kotlinx.coroutines.flow.MutableStateFlow h; + public final kotlinx.coroutines.flow.StateFlow i; + public final kotlinx.coroutines.flow.MutableStateFlow j; + public final kotlinx.coroutines.flow.StateFlow k; + public final kotlinx.coroutines.flow.MutableSharedFlow l; + public final kotlinx.coroutines.flow.SharedFlow m; + public final kotlinx.coroutines.flow.StateFlow n; + public final kotlinx.coroutines.flow.MutableStateFlow o; + public final kotlinx.coroutines.flow.StateFlow p; + + public o(String p7, qbsg.top.ble.data.BleSessionFacade p8, kotlinx.coroutines.flow.SharedFlow p9) + { + kotlin.jvm.internal.s.f(p7, "macAddress"); + kotlin.jvm.internal.s.f(p8, "session"); + this.a = p7; + this.b = p8; + this.c = p9; + this.d = w7.w.i(); + kotlinx.coroutines.CoroutineScope v0_2 = kotlinx.coroutines.CoroutineScopeKt.CoroutineScope(kotlinx.coroutines.SupervisorKt.SupervisorJob$default(0, 1, 0).plus(w7.b.a)); + this.e = v0_2; + this.g = kotlinx.coroutines.sync.MutexKt.Mutex$default(0, 1, 0); + int v8_4 = kotlinx.coroutines.flow.StateFlowKt.MutableStateFlow(Boolean.FALSE); + this.h = v8_4; + this.i = kotlinx.coroutines.flow.FlowKt.asStateFlow(v8_4); + int v8_7 = kotlinx.coroutines.flow.StateFlowKt.MutableStateFlow(Integer.valueOf(0)); + this.j = v8_7; + this.k = kotlinx.coroutines.flow.FlowKt.asStateFlow(v8_7); + int v8_10 = kotlinx.coroutines.flow.SharedFlowKt.MutableSharedFlow$default(0, 64, 0, 5, 0); + this.l = v8_10; + this.m = kotlinx.coroutines.flow.FlowKt.asSharedFlow(v8_10); + this.n = v8_10.getSubscriptionCount(); + int v8_12 = kotlinx.coroutines.flow.StateFlowKt.MutableStateFlow(0); + this.o = v8_12; + this.p = kotlinx.coroutines.flow.FlowKt.asStateFlow(v8_12); + kotlinx.coroutines.BuildersKt.launch$default(v0_2, 0, 0, new e8.i(this, 0, 0), 3, 0); + kotlinx.coroutines.BuildersKt.launch$default(v0_2, 0, 0, new e8.i(this, 0, 1), 3, 0); + return; + } + + public static String k(int p1, long p2) + { + c7.a.l(16); + String v2_1 = Long.toString(p2, 16); + kotlin.jvm.internal.s.e(v2_1, "toString(...)"); + return i7.i.B0((p1 * 2), v2_1); + } + + public static String m() + { + String v0_0 = System.currentTimeMillis(); + long v6_0 = ((((long) java.util.TimeZone.getDefault().getOffset(v0_0)) / 1000) + (v0_0 / 1000)); + String v0_1 = a.b.s(v0_0); + String v1_1 = v0_1[0]; + long v3_0 = v0_1[1]; + int v5 = v0_1[2]; + String v0_2 = v0_1[3]; + StringBuilder v8_2 = new StringBuilder(); + v8_2.append(e8.o.k(4, v6_0)); + v8_2.append(e8.o.k(2, ((long) v1_1))); + v8_2.append(e8.o.k(1, ((long) v3_0))); + v8_2.append(e8.o.k(1, ((long) v5))); + v8_2.append(e8.o.k(1, ((long) v0_2))); + return p.p1.j("dd", v8_2.toString()); + } + + public final void h() + { + Integer v0_0 = this.f; + if (v0_0 != null) { + kotlinx.coroutines.Job$DefaultImpls.cancel$default(v0_0, 0, 1, 0); + } + this.h.setValue(Boolean.FALSE); + this.j.setValue(Integer.valueOf(0)); + return; + } + + public final void i(java.util.List p7, a7.a p8) + { + this.f = kotlinx.coroutines.BuildersKt.launch$default(this.e, 0, 0, new e8.j(this, p7, p8, 0), 3, 0); + return; + } + + public abstract String j(); + + public final void l(String p2) + { + kotlin.jvm.internal.s.f(p2, "data"); + this.l.tryEmit(new e8.b(p2)); + return; + } + + public abstract void n(Object p0, g8.d p1, a7.a p2); +} diff --git a/analysis/apk/decomp/f8_a.java b/analysis/apk/decomp/f8_a.java new file mode 100644 index 0000000..4e96bcf --- /dev/null +++ b/analysis/apk/decomp/f8_a.java @@ -0,0 +1,173 @@ +package f8; +public final class a { + + public a(android.content.Context p2) + { + kotlin.jvm.internal.s.f(p2, "context"); + return; + } + + public final android.graphics.Bitmap a(String p16, int p17, int p18, float p19) + { + int v2_0; + kotlin.jvm.internal.s.f(p16, "text"); + if (p16.length() != 0) { + v2_0 = p16.length(); + } else { + v2_0 = 1; + } + int v2_1 = (v2_0 * p17); + android.graphics.Bitmap v4_1 = android.graphics.Bitmap.createBitmap(v2_1, p17, android.graphics.Bitmap$Config.ARGB_8888); + int v5_1 = new android.graphics.Canvas(v4_1); + int v6_1 = new android.graphics.Paint(); + v6_1.setTypeface(android.graphics.Typeface.DEFAULT_BOLD); + v6_1.setTextSize((((float) p17) * p19)); + v6_1.setFakeBoldText(1); + v6_1.setTextAlign(android.graphics.Paint$Align.CENTER); + v6_1.setAntiAlias(1); + v5_1.drawColor(-1); + v6_1.setColor(-16777216); + int v9_0 = v6_1.getFontMetrics(); + int v7_2 = (((float) p17) / 1073741824); + int v9_2 = (v7_2 - ((v9_0.ascent + v9_0.descent) / 1073741824)); + int v10_1 = p16.length(); + int v12 = 0; + while (v12 < v10_1) { + v5_1.drawText(String.valueOf(p16.charAt(v12)), (((float) (v12 * p17)) + v7_2), v9_2, v6_1); + v12++; + } + android.graphics.Bitmap v0_2 = android.graphics.Bitmap.createBitmap(v2_1, p17, android.graphics.Bitmap$Config.ARGB_8888); + int v5_2 = 0; + while (v5_2 < p17) { + int v6_2 = 0; + while (v6_2 < v2_1) { + int v7_3 = v4_1.getPixel(v6_2, v5_2); + if (((android.graphics.Color.blue(v7_3) + (android.graphics.Color.green(v7_3) + android.graphics.Color.red(v7_3))) / 3) >= p18) { + v0_2.setPixel(v6_2, v5_2, -1); + } else { + v0_2.setPixel(v6_2, v5_2, -16777216); + } + v6_2++; + } + v5_2++; + } + v4_1.recycle(); + return v0_2; + } + + public final String b(int p1, int p2, int p3, int p4) + { + String v1_1; + String vtmp6 = String.format("%04d%02d%02d", java.util.Arrays.copyOf(new Object[] {Integer.valueOf(p2), Integer.valueOf(p3), Integer.valueOf(p4)}), 3)); + if (p1 != 24) { + v1_1 = "ff00"; + } else { + v1_1 = "ffff"; + } + return v1_1.concat(vtmp6); + } + + public final java.util.List c(String p17, int p18, int p19, float p20) + { + kotlin.jvm.internal.s.f(p17, "text"); + int v1_6 = this.a(p17, p18, p19, p20); + String v3_13 = v1_6.getWidth(); + String v4_12 = v1_6.getHeight(); + java.util.ArrayList v5_1 = new java.util.ArrayList(); + int v6 = 0; + int v7_0 = 0; + while (v7_0 < v4_12) { + String v10_0 = (v3_13 / 8); + String v11_6 = 0; + while (v11_6 < v10_0) { + int v12_1 = 0; + int v13 = 0; + while (v12_1 < 8) { + int v14_1 = ((v11_6 * 8) + v12_1); + if ((v14_1 < v3_13) && (v1_6.getPixel(v14_1, v7_0) != -16777216)) { + v13 |= (1 << (7 - v12_1)); + } + v12_1++; + } + v5_1.add(Integer.valueOf(v13)); + v11_6++; + } + v7_0++; + } + int v1_1 = p17.length(); + java.util.ArrayList v2_2 = new java.util.ArrayList(); + if (p18 == 16) { + if (v1_1 <= 8) { + if (v1_1 <= 4) { + String v3_6 = new StringBuilder(a1.a.j(v1_1, "0")); + String v0_6 = (v5_1.size() - 1); + while (v6 < v0_6) { + v3_6.append(String.format("%02x", java.util.Arrays.copyOf(new Object[] {v5_1.get(v6)}), 1))); + v6++; + } + String v0_7 = v3_6.toString(); + kotlin.jvm.internal.s.e(v0_7, "toString(...)"); + v2_2.add(v0_7); + return v2_2; + } else { + String v3_9 = ((v5_1.size() - ((v1_1 - 4) * 32)) - 1); + String v4_7 = new StringBuilder("04"); + while (v6 < v3_9) { + v4_7.append(String.format("%02x", java.util.Arrays.copyOf(new Object[] {v5_1.get(v6)}), 1))); + v6++; + } + String v3_10 = v4_7.toString(); + kotlin.jvm.internal.s.e(v3_10, "toString(...)"); + v2_2.add(v3_10); + String v3_12 = new StringBuilder(a1.a.j(v1_1, "0")); + String v0_10 = (v5_1.size() - 1); + int v1_7 = 128; + while (v1_7 < v0_10) { + v3_12.append(String.format("%02x", java.util.Arrays.copyOf(new Object[] {v5_1.get(v1_7)}), 1))); + v1_7++; + } + String v0_11 = v3_12.toString(); + kotlin.jvm.internal.s.e(v0_11, "toString(...)"); + v2_2.add(v0_11); + return v2_2; + } + } + } else { + if (p18 == 24) { + if (v1_1 <= 4) { + String v0_1 = 0; + while (v0_1 < v1_1) { + String v3_2 = new StringBuilder(a1.a.j(v0_1, "990")); + String v4_2 = (v0_1 * 72); + int v8_0 = 0; + while (v8_0 < 72) { + String v11_1 = (v4_2 + v8_0); + if (v11_1 < v5_1.size()) { + v3_2.append(String.format("%02x", java.util.Arrays.copyOf(new Object[] {v5_1.get(v11_1)}), 1))); + } + v8_0++; + } + String v3_3 = v3_2.toString(); + kotlin.jvm.internal.s.e(v3_3, "toString(...)"); + v2_2.add(v3_3); + v0_1++; + } + } else { + return q6.t.c; + } + } + return v2_2; + } + return q6.t.c; + } + + public final b2.h d(String p2, int p3, int p4, float p5) + { + kotlin.jvm.internal.s.f(p2, "text"); + if (!i7.i.x0(p2)) { + return new b2.h(this.a(p2, p3, p4, p5)); + } else { + return 0; + } + } +} diff --git a/analysis/apk/decomp/g8_a.java b/analysis/apk/decomp/g8_a.java new file mode 100644 index 0000000..e2419cc --- /dev/null +++ b/analysis/apk/decomp/g8_a.java @@ -0,0 +1,31 @@ +package g8; +public final enum class a extends java.lang.Enum { + public static final enum g8.a c; + public static final enum g8.a d; + public static final synthetic g8.a[] e; + public static final synthetic u6.b f; + + static a() + { + u6.b v0_2 = new g8.a("NONE", 0); + g8.a.c = v0_2; + new g8.a("FLOYD_STEINBERG", 1); + g8.a.d = new g8.a("ATKINSON", 2); + new g8.a("BAYER", 3); + new g8.a("STUCKI", 4); + u6.b v0_1 = new g8.a[] {v0_2, new g8.a("JARVIS", 5)}); + g8.a.e = v0_1; + g8.a.f = u3.a.a(v0_1); + return; + } + + public static g8.a valueOf(String p1) + { + return ((g8.a) Enum.valueOf(g8.a, p1)); + } + + public static g8.a[] values() + { + return ((g8.a[]) g8.a.e.clone()); + } +} diff --git a/analysis/apk/decomp/g8_c.java b/analysis/apk/decomp/g8_c.java new file mode 100644 index 0000000..715f0dd --- /dev/null +++ b/analysis/apk/decomp/g8_c.java @@ -0,0 +1,62 @@ +package g8; +public final class c { + public final g8.b a; + public final int b; + public final int c; + public final boolean d; + public final boolean e; + public final boolean f; + + public c(g8.b p4, int p5, int p6, boolean p7, int p8) + { + int v0_1; + int v1 = 1; + if ((p8 & 16) == 0) { + v0_1 = 1; + } else { + v0_1 = 0; + } + if ((p8 & 32) != 0) { + v1 = 0; + } + this.a = p4; + this.b = p5; + this.c = p6; + this.d = p7; + this.e = v0_1; + this.f = v1; + return; + } + + public final boolean equals(Object p3) + { + if ((this == p3) || (((p3 instanceof g8.c)) && ((this.a == ((g8.c) p3).a) && ((this.b == ((g8.c) p3).b) && ((this.c == ((g8.c) p3).c) && ((this.d == ((g8.c) p3).d) && ((this.e == ((g8.c) p3).e) && (this.f == ((g8.c) p3).f)))))))) { + return 1; + } else { + return 0; + } + } + + public final int hashCode() + { + return (Boolean.hashCode(this.f) + a1.a.e(a1.a.e(a1.a.c(this.c, a1.a.c(this.b, (this.a.hashCode() * 31), 31), 31), 31, this.d), 31, this.e)); + } + + public final String toString() + { + String v0_1 = new StringBuilder("FirmwareImageUploadPreset(screenSize="); + v0_1.append(this.a); + v0_1.append(", uploadWidthPx="); + v0_1.append(this.b); + v0_1.append(", uploadHeightPx="); + v0_1.append(this.c); + v0_1.append(", useRotatedScan="); + v0_1.append(this.d); + v0_1.append(", singleChannel="); + v0_1.append(this.e); + v0_1.append(", isCalendar="); + v0_1.append(this.f); + v0_1.append(")"); + return v0_1.toString(); + } +} diff --git a/analysis/apk/decomp/g8_d.java b/analysis/apk/decomp/g8_d.java new file mode 100644 index 0000000..1dff6c2 --- /dev/null +++ b/analysis/apk/decomp/g8_d.java @@ -0,0 +1,252 @@ +package g8; +public final class d { + public final b2.h a; + public final g8.c b; + public final g8.g c; + public final boolean d; + public final g8.a e; + public final float f; + public final float g; + public final float h; + public final float i; + public final int j; + public final int k; + + public synthetic d() + { + this(0, 0, g8.g.c, 0, g8.a.d, 0, 1120403456, 1120403456, 1120403456, 128, 0); + return; + } + + public d(b2.h p1, g8.c p2, g8.g p3, boolean p4, g8.a p5, float p6, float p7, float p8, float p9, int p10, int p11) + { + this.a = p1; + this.b = p2; + this.c = p3; + this.d = p4; + this.e = p5; + this.f = p6; + this.g = p7; + this.h = p8; + this.i = p9; + this.j = p10; + this.k = p11; + return; + } + + public static g8.d a(g8.d p12, b2.h p13, g8.c p14, g8.g p15, boolean p16, g8.a p17, float p18, float p19, float p20, float p21, int p22, int p23, int p24) + { + if ((p24 & 1) != 0) { + p13 = p12.a; + } + if ((p24 & 2) != 0) { + p14 = p12.b; + } + if ((p24 & 4) != 0) { + p15 = p12.c; + } + boolean v4; + if ((p24 & 8) == 0) { + v4 = p16; + } else { + v4 = p12.d; + } + g8.a v5; + if ((p24 & 16) == 0) { + v5 = p17; + } else { + v5 = p12.e; + } + float v6; + if ((p24 & 32) == 0) { + v6 = p18; + } else { + v6 = p12.f; + } + float v7; + if ((p24 & 64) == 0) { + v7 = p19; + } else { + v7 = p12.g; + } + float v8; + if ((p24 & 128) == 0) { + v8 = p20; + } else { + v8 = p12.h; + } + float v9; + if ((p24 & 256) == 0) { + v9 = p21; + } else { + v9 = p12.i; + } + int v10; + if ((p24 & 512) == 0) { + v10 = p22; + } else { + v10 = p12.j; + } + int v11; + if ((p24 & 1024) == 0) { + v11 = p23; + } else { + v11 = p12.k; + } + p12.getClass(); + kotlin.jvm.internal.s.f(p15, "scaleMode"); + kotlin.jvm.internal.s.f(v5, "ditherAlgorithm"); + return new g8.d(p13, p14, p15, v4, v5, v6, v7, v8, v9, v10, v11); + } + + public final int b() + { + int v0_0 = this.b; + if (v0_0 == 0) { + return 300; + } else { + return v0_0.c; + } + } + + public final boolean c() + { + if (this.b == null) { + return 0; + } else { + return 1; + } + } + + public final int d() + { + int v0_0 = this.b; + if (v0_0 == 0) { + return 400; + } else { + return v0_0.b; + } + } + + public final int e() + { + int v0_0 = this.b; + if (v0_0 == 0) { + return 300; + } else { + return v0_0.a.e; + } + } + + public final boolean equals(Object p5) + { + if (this != p5) { + if ((p5 instanceof g8.d)) { + if (kotlin.jvm.internal.s.b(this.a, ((g8.d) p5).a)) { + if (kotlin.jvm.internal.s.b(this.b, ((g8.d) p5).b)) { + if (this.c == ((g8.d) p5).c) { + if (this.d == ((g8.d) p5).d) { + if (this.e == ((g8.d) p5).e) { + if (Float.compare(this.f, ((g8.d) p5).f) == 0) { + if (Float.compare(this.g, ((g8.d) p5).g) == 0) { + if (Float.compare(this.h, ((g8.d) p5).h) == 0) { + if (Float.compare(this.i, ((g8.d) p5).i) == 0) { + if (this.j == ((g8.d) p5).j) { + if (this.k == ((g8.d) p5).k) { + return 1; + } else { + return 0; + } + } else { + return 0; + } + } else { + return 0; + } + } else { + return 0; + } + } else { + return 0; + } + } else { + return 0; + } + } else { + return 0; + } + } else { + return 0; + } + } else { + return 0; + } + } else { + return 0; + } + } else { + return 0; + } + } else { + return 0; + } + } else { + return 1; + } + } + + public final int f() + { + int v0_0 = this.b; + if (v0_0 == 0) { + return 400; + } else { + return v0_0.a.d; + } + } + + public final int hashCode() + { + int v1_12; + int v0_0 = 0; + int v1_0 = this.a; + if (v1_0 != 0) { + v1_12 = v1_0.hashCode(); + } else { + v1_12 = 0; + } + int v2 = 31; + int v1_16 = (v1_12 * 31); + g8.c v3 = this.b; + if (v3 != null) { + v0_0 = v3.hashCode(); + } + return (Integer.hashCode(this.k) + a1.a.c(this.j, a1.a.b(this.i, a1.a.b(this.h, a1.a.b(this.g, a1.a.b(this.f, ((this.e.hashCode() + a1.a.e(((this.c.hashCode() + ((v1_16 + v0_0) * 31)) * v2), v2, this.d)) * v2), v2), 31), 31), 31), 31)); + } + + public final String toString() + { + String v0_1 = new StringBuilder("ImageConfig(sourceBitmap="); + v0_1.append(this.a); + v0_1.append(", selectedPreset="); + v0_1.append(this.b); + v0_1.append(", scaleMode="); + v0_1.append(this.c); + v0_1.append(", isThreeColor="); + v0_1.append(this.d); + v0_1.append(", ditherAlgorithm="); + v0_1.append(this.e); + v0_1.append(", brightness="); + v0_1.append(this.f); + v0_1.append(", contrast="); + v0_1.append(this.g); + v0_1.append(", saturation="); + v0_1.append(this.h); + v0_1.append(", diffusion="); + v0_1.append(this.i); + v0_1.append(", threshold="); + v0_1.append(this.j); + v0_1.append(", rotationDegrees="); + return p.p1.l(v0_1, this.k, ")"); + } +} diff --git a/analysis/apk/decomp/g8_f.java b/analysis/apk/decomp/g8_f.java new file mode 100644 index 0000000..e5d6d52 --- /dev/null +++ b/analysis/apk/decomp/g8_f.java @@ -0,0 +1,602 @@ +package g8; +public abstract class f { + public static final int[][] a; + + static f() + { + g8.f.a = new int[][] {new int[] {15, 135, 45, 165}), new int[] {195, 75, 225, 105}), new int[] {60, 180, 30, 150}), new int[] {240, 120, 210, 90})}); + return; + } + + public static void a(g8.e p2, int p3, float p4, float p5, float p6, float p7) + { + if (p3 >= 0) { + int v0_0 = p2.a; + if (p3 < v0_0.length) { + v0_0[p3] = g8.f.b((c7.a.S((p4 * p7)) + v0_0[p3])); + int v4_2 = p2.b; + v4_2[p3] = g8.f.b((c7.a.S((p5 * p7)) + v4_2[p3])); + int[] v2_1 = p2.c; + v2_1[p3] = g8.f.b((c7.a.S((p6 * p7)) + v2_1[p3])); + } + } + return; + } + + public static int b(int p2) + { + return a.a.o(p2, 0, 255); + } + + public static final int[] c(Object p9) + { + kotlin.jvm.internal.s.f(p9, "bitmap"); + android.graphics.Bitmap v1_1 = ((android.graphics.Bitmap) p9); + int[] v2 = new int[(((android.graphics.Bitmap) p9).getHeight() * ((android.graphics.Bitmap) p9).getWidth())]; + v1_1.getPixels(v2, 0, ((android.graphics.Bitmap) p9).getWidth(), 0, 0, v1_1.getWidth(), v1_1.getHeight()); + return v2; + } + + public static float d(int p1, int p2, int p3) + { + return ((((float) p3) * 1038710997) + ((((float) p2) * 1058424226) + (((float) p1) * 1050220167))); + } + + public static boolean e(int p2, int p3, int p4, int p5) + { + if ((((float) p2) <= (((float) p3) * 1069547520)) || ((((float) p2) <= (((float) p4) * 1069547520)) || (p2 <= p5))) { + return 0; + } else { + return 1; + } + } + + public static final b2.h f(g8.d p31) + { + int v0_19; + int v16; + kotlin.jvm.internal.s.f(p31, "config"); + int v1_10 = p31.k; + int v2_18 = p31.a; + if (v2_18 == 0) { + v16 = 0; + v0_19 = 0; + } else { + float v4_30 = b2.h0.l(v2_18); + if (v4_30 != 0) { + int v11_0 = 1; + int v2_3 = a.a.o(p31.f(), 1, p31.d()); + float v12_2 = a.a.o(p31.e(), 1, p31.b()); + int[] v9_12 = new android.graphics.Matrix(); + v9_12.postRotate(((float) v1_10)); + if (v1_10 != 0) { + v4_30 = android.graphics.Bitmap.createBitmap(v4_30, 0, 0, v4_30.getWidth(), v4_30.getHeight(), v9_12, 1); + } + int v1_6; + kotlin.jvm.internal.s.c(v4_30); + int v1_16 = p31.c.ordinal(); + int v6_11 = 0; + int v7_9 = 2; + if (v1_16 == 0) { + v1_6 = android.graphics.Bitmap.createBitmap(v2_3, v12_2, android.graphics.Bitmap$Config.ARGB_8888); + int v8_13 = new android.graphics.Canvas(v1_6); + v8_13.drawColor(-1); + int v2_22 = ((float) v2_3); + int[] v10_3 = ((float) v12_2); + int[] v9_18 = Math.min((v2_22 / ((float) v4_30.getWidth())), (v10_3 / ((float) v4_30.getHeight()))); + int v2_25 = a1.a.a(((float) v4_30.getWidth()), v9_18, v2_22, 1073741824); + int v5_15 = a1.a.a(((float) v4_30.getHeight()), v9_18, v10_3, 1073741824); + v8_13.drawBitmap(v4_30, 0, new android.graphics.RectF(v2_25, v5_15, ((((float) v4_30.getWidth()) * v9_18) + v2_25), ((((float) v4_30.getHeight()) * v9_18) + v5_15)), new android.graphics.Paint(2)); + } else { + if (v1_16 == 1) { + v1_6 = android.graphics.Bitmap.createScaledBitmap(v4_30, v2_3, v12_2, 1); + } else { + if (v1_16 != 2) { + throw new b3.e(); + } else { + int v1_2 = Math.max((((float) v2_3) / ((float) v4_30.getWidth())), (((float) v12_2) / ((float) v4_30.getHeight()))); + int v8_5 = c7.a.S((((float) v4_30.getWidth()) * v1_2)); + if (v8_5 < v2_3) { + v8_5 = v2_3; + } + int v1_3 = c7.a.S((((float) v4_30.getHeight()) * v1_2)); + if (v1_3 < v12_2) { + v1_3 = v12_2; + } + int v8_6 = (v8_5 - v2_3); + int v1_4 = (v1_3 - v12_2); + v1_6 = android.graphics.Bitmap.createBitmap(android.graphics.Bitmap.createScaledBitmap(v4_30, v8_5, v1_3, 1), a.a.o(c7.a.S((((float) v8_6) / 1073741824)), 0, v8_6), a.a.o(c7.a.S((((float) v1_4) / 1073741824)), 0, v1_4), v2_3, v12_2); + kotlin.jvm.internal.s.e(v1_6, "createBitmap(...)"); + } + } + } + int v2_2 = p31.f; + float v4_1 = p31.g; + int v5_2 = p31.h; + kotlin.jvm.internal.s.f(v1_6, "src"); + int v1_7 = g8.f.h(v1_6); + int v8_9 = v1_7.c; + int[] v9_10 = v1_7.b; + int[] v10_0 = v1_7.a; + int v14_0 = 255; + float v15_0 = 1120403456; + if (v2_2 != 0) { + int v2_4 = c7.a.S(((((float) 255) * v2_2) / 1120403456)); + int v13_4 = v10_0.length; + v16 = 0; + int v3_0 = 0; + while (v3_0 < v13_4) { + v10_0[v3_0] = g8.f.b((v10_0[v3_0] + v2_4)); + v9_10[v3_0] = g8.f.b((v9_10[v3_0] + v2_4)); + v8_9[v3_0] = g8.f.b((v8_9[v3_0] + v2_4)); + v3_0++; + } + } else { + v16 = 0; + } + int v19_0; + float v17_9; + int v13_5 = 1065353216; + if (v4_1 != 1120403456) { + float v4_4 = (((v4_1 - 1120403456) + 1120403456) / 1120403456); + int v2_8 = c7.a.S(((1065353216 - v4_4) * 1124073472)); + v17_9 = 1124073472; + int v3_2 = v10_0.length; + float v12_1 = 0; + while(true) { + v19_0 = v13_5; + if (v12_1 >= v3_2) { + break; + } + int v20_0 = v15_0; + float v15_1 = ((float) v2_8); + v10_0[v12_1] = g8.f.b(c7.a.S(((((float) v10_0[v12_1]) * v4_4) + v15_1))); + v9_10[v12_1] = g8.f.b(c7.a.S(((((float) v9_10[v12_1]) * v4_4) + v15_1))); + v8_9[v12_1] = g8.f.b(c7.a.S(((((float) v8_9[v12_1]) * v4_4) + v15_1))); + v12_1++; + v13_5 = v19_0; + v15_0 = v20_0; + } + } else { + v17_9 = 1124073472; + v19_0 = 1065353216; + } + int v20_1 = v15_0; + if (v5_2 != v20_1) { + int v5_4 = (v5_2 / v20_1); + int v2_10 = v10_0.length; + int v3_3 = 0; + while (v3_3 < v2_10) { + float v4_6 = ((float) v10_0[v3_3]); + float v12_8 = ((((float) v8_9[v3_3]) * 1038710997) + ((((float) v9_10[v3_3]) * 1058424226) + (1050220167 * v4_6))); + v10_0[v3_3] = a.a.o(c7.a.S((((v4_6 - v12_8) * v5_4) + v12_8)), 0, 255); + v9_10[v3_3] = a.a.o(c7.a.S((((((float) v9_10[v3_3]) - v12_8) * v5_4) + v12_8)), 0, 255); + v8_9[v3_3] = a.a.o(c7.a.S((((((float) v8_9[v3_3]) - v12_8) * v5_4) + v12_8)), 0, 255); + v3_3++; + } + } + int v21_0; + int v1_8 = g8.f.g(v1_7); + int v2_11 = p31.e; + int v3_4 = p31.d; + float v4_26 = p31.i; + int v0_1 = p31.j; + kotlin.jvm.internal.s.f(v2_11, "algo"); + int v1_9 = g8.f.h(v1_8); + int v5_7 = v1_9.e; + int v8_10 = v1_9.d; + int[] v9_13 = v1_9.a; + int[] v10_1 = v1_9.b; + float v12_9 = v1_9.c; + float v4_27 = (v4_26 / v20_1); + int v2_12 = v2_11.ordinal(); + if (v2_12 == 0) { + v21_0 = v1_9; + int v1_11 = v9_13.length; + int v14_1 = 0; + while (v14_1 < v1_11) { + int v2_13 = v9_13[v14_1]; + float v4_28 = v10_1[v14_1]; + int v5_8 = v12_9[v14_1]; + if ((v3_4 == 0) || (!g8.f.e(v2_13, v4_28, v5_8, v0_1))) { + int v13_28; + if (g8.f.d(v2_13, v4_28, v5_8) >= ((float) v0_1)) { + v13_28 = 255; + } else { + v13_28 = 0; + } + v9_13[v14_1] = v13_28; + v10_1[v14_1] = v13_28; + v12_9[v14_1] = v13_28; + } else { + v9_13[v14_1] = 255; + v10_1[v14_1] = 0; + v12_9[v14_1] = 0; + } + v14_1++; + } + } else { + if (v2_12 == 1) { + v21_0 = v1_9; + int v14_2 = 0; + while (v14_2 < v5_7) { + int v1_12 = 0; + while (v1_12 < v8_10) { + int v2_17 = ((v14_2 * v8_10) + v1_12); + int v6_3 = v9_13[v2_17]; + int v7_1 = v10_1[v2_17]; + int v11_1 = v12_9[v2_17]; + if ((v3_4 == 0) || (!g8.f.e(v6_3, v7_1, v11_1, v0_1))) { + int v13_32; + if (g8.f.d(v6_3, v7_1, v11_1) >= ((float) v0_1)) { + v13_32 = 255; + } else { + v13_32 = 0; + } + v9_13[v2_17] = v13_32; + v10_1[v2_17] = v13_32; + v12_9[v2_17] = v13_32; + float v23_0 = (((float) (v6_3 - v13_32)) * v4_27); + float v24_0 = (((float) (v7_1 - v13_32)) * v4_27); + float v25_0 = (((float) (v11_1 - v13_32)) * v4_27); + int v6_8 = (v1_12 + 1); + if (v6_8 < v8_10) { + g8.f.a(v21_0, (v2_17 + 1), v23_0, v24_0, v25_0, 1054867456); + } + if ((v14_2 + 1) < v5_7) { + if ((v1_12 - 1) >= 0) { + g8.f.a(v21_0, ((v2_17 + v8_10) - 1), v23_0, v24_0, v25_0, 1044381696); + } + int v22_2 = (v2_17 + v8_10); + g8.f.a(v21_0, v22_2, v23_0, v24_0, v25_0, 1050673152); + if (v6_8 < v8_10) { + g8.f.a(v21_0, (v22_2 + 1), v23_0, v24_0, v25_0, 1031798784); + } + } + } else { + v9_13[v2_17] = 255; + v10_1[v2_17] = 0; + v12_9[v2_17] = 0; + } + v1_12++; + } + v14_2++; + } + } else { + if (v2_12 == 2) { + v21_0 = v1_9; + float v4_33 = (((v4_27 * ((float) 100)) / v20_1) * 1040187392); + int v0_2 = (v0_1 - 128); + int v1_18 = 0; + while (v1_18 < v5_7) { + int v2_19 = 0; + while (v2_19 < v8_10) { + int v0_11; + int v13_37; + int v14_7; + float v17_12; + int v6_10 = ((v1_18 * v8_10) + v2_19); + int v7_8 = a.a.o((v9_13[v6_10] + v0_2), 0, 255); + int v11_5 = a.a.o((v10_1[v6_10] + v0_2), 0, 255); + float v15_7 = a.a.o((v12_9[v6_10] + v0_2), 0, 255); + int v14_4 = (v11_5 * v11_5); + float v17_11 = (v15_7 * v15_7); + int v13_36 = (((v7_8 * v7_8) + v14_4) + v17_11); + int v31_1 = v0_2; + int v19_1 = ((v7_8 + -255) * (v7_8 + -255)); + int v0_10 = (((v15_7 + -255) * (v15_7 + -255)) + (((v11_5 + -255) * (v11_5 + -255)) + v19_1)); + if (v3_4 == 0) { + if (v13_36 > v0_10) { + v17_12 = v1_18; + v0_11 = 1132396544; + v13_37 = 1132396544; + v14_7 = 1132396544; + } else { + v17_12 = v1_18; + v0_11 = 0; + v13_37 = 0; + v14_7 = 0; + } + } else { + int v14_6 = ((v19_1 + v14_4) + v17_11); + if ((v13_36 > v0_10) || (v13_36 > v14_6)) { + if ((v0_10 > v13_36) || (v0_10 > v14_6)) { + v17_12 = v1_18; + v0_11 = 1132396544; + } + } + } + v9_13[v6_10] = ((int) v0_11); + v10_1[v6_10] = ((int) v13_37); + v12_9[v6_10] = ((int) v14_7); + float v23_1 = ((((float) v7_8) - v0_11) * v4_33); + float v24_1 = ((((float) v11_5) - v13_37) * v4_33); + float v25_1 = ((((float) v15_7) - v14_7) * v4_33); + int v0_16 = (v2_19 + 1); + if (v0_16 < v8_10) { + g8.f.a(v21_0, (v6_10 + 1), v23_1, v24_1, v25_1, 1065353216); + } + if ((v2_19 + 2) < v8_10) { + g8.f.a(v21_0, (v6_10 + 2), v23_1, v24_1, v25_1, 1065353216); + } + if ((v17_12 + 1) < v5_7) { + if ((v2_19 - 1) >= 0) { + g8.f.a(v21_0, ((v6_10 + v8_10) - 1), v23_1, v24_1, v25_1, 1065353216); + } + int v22_7 = (v6_10 + v8_10); + g8.f.a(v21_0, v22_7, v23_1, v24_1, v25_1, 1065353216); + if (v0_16 < v8_10) { + g8.f.a(v21_0, (v22_7 + 1), v23_1, v24_1, v25_1, 1065353216); + } + } + if ((v17_12 + 2) < v5_7) { + g8.f.a(v21_0, ((v8_10 * 2) + v6_10), v23_1, v24_1, v25_1, 1065353216); + } + v2_19 = v0_16; + v1_18 = v17_12; + v0_2 = v31_1; + } + v1_18++; + } + } else { + if (v2_12 == 3) { + v21_0 = v1_9; + float v29_3 = 0; + int v30_3 = 255; + int v1_30 = v9_13.length; + int v2_21 = 0; + while (v2_21 < v1_30) { + int v5_11 = v9_13[v2_21]; + int v6_12 = v10_1[v2_21]; + int v7_10 = v12_9[v2_21]; + int v14_9 = v29_3; + int v13_42 = v30_3; + int v11_17 = a.a.o(c7.a.S((((((((float) g8.f.a[((v2_21 % v8_10) % 4)][((v2_21 / v8_10) % 4)]) - v17_9) / v17_9) * v4_27) + v19_0) * ((float) v0_1))), v14_9, v13_42); + if ((v3_4 == 0) || (!g8.f.e(v5_11, v6_12, v7_10, v11_17))) { + int v5_14; + if (g8.f.d(v5_11, v6_12, v7_10) >= ((float) v11_17)) { + v5_14 = 255; + } else { + v5_14 = 0; + } + v9_13[v2_21] = v5_14; + v10_1[v2_21] = v5_14; + v12_9[v2_21] = v5_14; + } else { + v9_13[v2_21] = v13_42; + v10_1[v2_21] = v14_9; + v12_9[v2_21] = v14_9; + } + v2_21++; + v29_3 = 0; + v30_3 = 255; + } + } else { + if (v2_12 == 4) { + v21_0 = v1_9; + int v28 = 1; + int v1_31 = 0; + while (v1_31 < v5_7) { + int v2_23 = 0; + while (v2_23 < v8_10) { + int v6_15 = ((v1_31 * v8_10) + v2_23); + int v7_11 = v9_13[v6_15]; + int v11_18 = v10_1[v6_15]; + int v13_43 = v12_9[v6_15]; + if ((v3_4 == 0) || (!g8.f.e(v7_11, v11_18, v13_43, v0_1))) { + int v14_13; + if (g8.f.d(v7_11, v11_18, v13_43) >= ((float) v0_1)) { + v14_13 = 255; + } else { + v14_13 = 0; + } + v9_13[v6_15] = v14_13; + v10_1[v6_15] = v14_13; + v12_9[v6_15] = v14_13; + float v23_2 = (((float) (v7_11 - v14_13)) * v4_27); + float v24_2 = (((float) (v11_18 - v14_13)) * v4_27); + float v25_2 = (((float) (v13_43 - v14_13)) * v4_27); + int v7_16 = (v2_23 + 1); + if (v7_16 < v8_10) { + g8.f.a(v21_0, (v6_15 + 1), v23_2, v24_2, v25_2, 1044581425); + } + int v11_20 = (v2_23 + 2); + if (v11_20 < v8_10) { + g8.f.a(v21_0, (v6_15 + 2), v23_2, v24_2, v25_2, 1036192817); + } + if ((v1_31 + 1) < v5_7) { + if ((v2_23 - 2) >= 0) { + g8.f.a(v21_0, ((v6_15 + v8_10) - 2), v23_2, v24_2, v25_2, 1027804209); + } + if ((v2_23 - 1) >= 0) { + g8.f.a(v21_0, ((v6_15 + v8_10) - 1), v23_2, v24_2, v25_2, 1036192817); + } + int v22_14 = (v6_15 + v8_10); + g8.f.a(v21_0, v22_14, v23_2, v24_2, v25_2, 1044581425); + int v13_50 = v22_14; + if (v7_16 < v8_10) { + g8.f.a(v21_0, (v13_50 + 1), v23_2, v24_2, v25_2, 1036192817); + } + if (v11_20 < v8_10) { + g8.f.a(v21_0, (v13_50 + 2), v23_2, v24_2, v25_2, 1027804209); + } + } + if ((v1_31 + 2) < v5_7) { + if ((v2_23 - 2) >= 0) { + g8.f.a(v21_0, (((v8_10 * 2) + v6_15) - 2), v23_2, v24_2, v25_2, 1019415601); + } + if ((v2_23 - 1) >= 0) { + g8.f.a(v21_0, (((v8_10 * 2) + v6_15) - 1), v23_2, v24_2, v25_2, 1027804209); + } + int v22_19 = ((v8_10 * 2) + v6_15); + g8.f.a(v21_0, v22_19, v23_2, v24_2, v25_2, 1036192817); + int v13_59 = v22_19; + if (v7_16 < v8_10) { + g8.f.a(v21_0, (v13_59 + 1), v23_2, v24_2, v25_2, 1027804209); + } + if (v11_20 < v8_10) { + g8.f.a(v21_0, (v13_59 + 2), v23_2, v24_2, v25_2, 1019415601); + } + } + } else { + v9_13[v6_15] = 255; + v10_1[v6_15] = 0; + v12_9[v6_15] = 0; + } + v2_23++; + } + v1_31++; + } + } else { + if (v2_12 != 5) { + throw new b3.e(); + } else { + int v2_24 = 0; + while (v2_24 < v5_7) { + int v13_61 = v6_11; + while (v13_61 < v8_10) { + int v30_5; + int v21_1; + float v15_11 = ((v2_24 * v8_10) + v13_61); + int v27 = v7_9; + int v7_17 = v9_13[v15_11]; + v28 = v11_0; + int v11_21 = v10_1[v15_11]; + float v29_5 = v6_11; + int v6_16 = v12_9[v15_11]; + if ((v3_4 == 0) || (!g8.f.e(v7_17, v11_21, v6_16, v0_1))) { + int v14_16; + v30_5 = v14_0; + if (g8.f.d(v7_17, v11_21, v6_16) >= ((float) v0_1)) { + v14_16 = v30_5; + } else { + v14_16 = v29_5; + } + v9_13[v15_11] = v14_16; + v10_1[v15_11] = v14_16; + v12_9[v15_11] = v14_16; + float v23_3 = (((float) (v7_17 - v14_16)) * v4_27); + float v24_3 = (((float) (v11_21 - v14_16)) * v4_27); + float v25_3 = (((float) (v6_16 - v14_16)) * v4_27); + int v6_19 = (v13_61 + 1); + if (v6_19 >= v8_10) { + v21_1 = v1_9; + } else { + v21_1 = v1_9; + g8.f.a(v21_1, (v15_11 + 1), v23_3, v24_3, v25_3, 1041585493); + } + int v1_32 = (v13_61 + 2); + if (v1_32 < v8_10) { + g8.f.a(v21_1, (v15_11 + 2), v23_3, v24_3, v25_3, 1037391189); + } + if ((v2_24 + 1) < v5_7) { + if ((v13_61 - 2) >= 0) { + g8.f.a(v21_1, ((v15_11 + v8_10) - 2), v23_3, v24_3, v25_3, 1031798784); + } + if ((v13_61 - 1) >= 0) { + g8.f.a(v21_1, ((v15_11 + v8_10) - 1), v23_3, v24_3, v25_3, 1037391189); + } + int v22_26 = (v15_11 + v8_10); + g8.f.a(v21_1, v22_26, v23_3, v24_3, v25_3, 1041585493); + int v7_26 = v22_26; + if (v6_19 < v8_10) { + g8.f.a(v21_1, (v7_26 + 1), v23_3, v24_3, v25_3, 1037391189); + } + if (v1_32 < v8_10) { + g8.f.a(v21_1, (v7_26 + 2), v23_3, v24_3, v25_3, 1031798784); + } + } + if ((v2_24 + 2) < v5_7) { + if ((v13_61 - 2) >= 0) { + g8.f.a(v21_1, (((v8_10 * 2) + v15_11) - 2), v23_3, v24_3, v25_3, 1017817771); + } + if ((v13_61 - 1) >= 0) { + g8.f.a(v21_1, (((v8_10 * 2) + v15_11) - 1), v23_3, v24_3, v25_3, 1031798784); + } + int v22_31 = ((v8_10 * 2) + v15_11); + g8.f.a(v21_1, v22_31, v23_3, v24_3, v25_3, 1037391189); + int v7_35 = v22_31; + if (v6_19 < v8_10) { + g8.f.a(v21_1, (v7_35 + 1), v23_3, v24_3, v25_3, 1031798784); + } + if (v1_32 < v8_10) { + g8.f.a(v21_1, (v7_35 + 2), v23_3, v24_3, v25_3, 1017817771); + } + } + } else { + v9_13[v15_11] = v14_0; + v10_1[v15_11] = v29_5; + v12_9[v15_11] = v29_5; + v21_1 = v1_9; + v30_5 = v14_0; + } + v13_61++; + v1_9 = v21_1; + v7_9 = v27; + v11_0 = v28; + v6_11 = v29_5; + v14_0 = v30_5; + } + float v29 = v6_11; + v28 = v11_0; + v2_24++; + } + v21_0 = v1_9; + } + } + } + } + } + } + v0_19 = g8.f.g(v21_0); + } + } + if (v0_19 == 0) { + return v16; + } else { + return new b2.h(v0_19); + } + } + + public static android.graphics.Bitmap g(g8.e p10) + { + int v0_0 = p10.a; + int v1_0 = v0_0.length; + int[] v3 = new int[v1_0]; + android.graphics.Bitmap v2_0 = 0; + while (v2_0 < v1_0) { + v3[v2_0] = ((((g8.f.b(v0_0[v2_0]) << 16) | -16777216) | (g8.f.b(p10.b[v2_0]) << 8)) | g8.f.b(p10.c[v2_0])); + v2_0++; + } + android.graphics.Bitmap v2_2 = android.graphics.Bitmap.createBitmap(p10.d, p10.e, android.graphics.Bitmap$Config.ARGB_8888); + int v5_0 = p10.d; + v2_2.setPixels(v3, 0, v5_0, 0, 0, v5_0, p10.e); + return v2_2; + } + + public static g8.e h(android.graphics.Bitmap p10) + { + int v1_1 = (p10.getHeight() * p10.getWidth()); + int[] v3 = new int[v1_1]; + p10.getPixels(v3, 0, p10.getWidth(), 0, 0, p10.getWidth(), p10.getHeight()); + int[] v5_0 = new int[v1_1]; + int v10_1 = 0; + int v0_1 = 0; + while (v0_1 < v1_1) { + v5_0[v0_1] = ((v3[v0_1] >> 16) & 255); + v0_1++; + } + int[] v6_1 = new int[v1_1]; + int v0_2 = 0; + while (v0_2 < v1_1) { + v6_1[v0_2] = ((v3[v0_2] >> 8) & 255); + v0_2++; + } + int[] v7_1 = new int[v1_1]; + while (v10_1 < v1_1) { + v7_1[v10_1] = (v3[v10_1] & 255); + v10_1++; + } + return new g8.e(v5_0, v6_1, v7_1, p10.getWidth(), p10.getHeight()); + } +} diff --git a/analysis/apk/decomp/g8_g.java b/analysis/apk/decomp/g8_g.java new file mode 100644 index 0000000..aea2719 --- /dev/null +++ b/analysis/apk/decomp/g8_g.java @@ -0,0 +1,31 @@ +package g8; +public final enum class g extends java.lang.Enum { + public static final enum g8.g c; + public static final enum g8.g d; + public static final enum g8.g e; + public static final synthetic g8.g[] f; + + static g() + { + g8.g[] v0_2 = new g8.g("FIT", 0); + g8.g.c = v0_2; + g8.g v1_2 = new g8.g("STRETCH", 1); + g8.g.d = v1_2; + g8.g v2_1 = new g8.g("CENTER_CROP", 2); + g8.g.e = v2_1; + g8.g[] v0_1 = new g8.g[] {v0_2, v1_2, v2_1}); + g8.g.f = v0_1; + u3.a.a(v0_1); + return; + } + + public static g8.g valueOf(String p1) + { + return ((g8.g) Enum.valueOf(g8.g, p1)); + } + + public static g8.g[] values() + { + return ((g8.g[]) g8.g.f.clone()); + } +} diff --git a/analysis/apk/decomp/k8_b.java b/analysis/apk/decomp/k8_b.java new file mode 100644 index 0000000..7ce84aa --- /dev/null +++ b/analysis/apk/decomp/k8_b.java @@ -0,0 +1,52 @@ +package k8; +public final class b extends kotlin.coroutines.jvm.internal.SuspendLambda implements a7.e { + public final synthetic String c; + + public b(String p1, kotlin.coroutines.Continuation p2) + { + this.c = p1; + super(2, p2); + return; + } + + public final kotlin.coroutines.Continuation create(Object p2, kotlin.coroutines.Continuation p3) + { + return new k8.b(this.c, p3); + } + + public final Object invoke(Object p1, Object p2) + { + return ((k8.b) this.create(((kotlinx.coroutines.CoroutineScope) p1), ((kotlin.coroutines.Continuation) p2))).invokeSuspend(p6.a0.a); + } + + public final Object invokeSuspend(Object p6) + { + kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + q6.y.Y(p6); + okhttp3.Call v6_1 = k8.h.a().newCall(new okhttp3.Request$Builder().url(this.c).build()); + try { + okhttp3.Response v1_1 = v6_1.execute(); + } catch (byte[] v0_6) { + v6_1.cancel(); + throw v0_6; + } + if (!v1_1.isSuccessful()) { + int v3 = v1_1.code(); + StringBuilder v4_1 = new StringBuilder("HTTP "); + v4_1.append(v3); + throw new java.io.IOException(v4_1.toString()); + } else { + byte[] v0_3; + byte[] v0_2 = v1_1.body(); + if (v0_2 == null) { + v0_3 = new byte[0]; + } else { + v0_3 = v0_2.bytes(); + if (v0_3 == null) { + } + } + v1_1.close(); + return v0_3; + } + } +} diff --git a/analysis/apk/decomp/k8_f.java b/analysis/apk/decomp/k8_f.java new file mode 100644 index 0000000..94853ce --- /dev/null +++ b/analysis/apk/decomp/k8_f.java @@ -0,0 +1,54 @@ +package k8; +public final class f extends kotlin.coroutines.jvm.internal.SuspendLambda implements a7.e { + public final synthetic String c; + public final synthetic String d; + + public f(String p1, String p2, kotlin.coroutines.Continuation p3) + { + this.c = p1; + this.d = p2; + super(2, p3); + return; + } + + public final kotlin.coroutines.Continuation create(Object p3, kotlin.coroutines.Continuation p4) + { + return new k8.f(this.c, this.d, p4); + } + + public final Object invoke(Object p1, Object p2) + { + return ((k8.f) this.create(((kotlinx.coroutines.CoroutineScope) p1), ((kotlin.coroutines.Continuation) p2))).invokeSuspend(p6.a0.a); + } + + public final Object invokeSuspend(Object p6) + { + kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + q6.y.Y(p6); + okhttp3.Call v6_4 = k8.h.a().newCall(new okhttp3.Request$Builder().url(this.d).post(okhttp3.RequestBody.Companion.create(this.c, okhttp3.MediaType.Companion.get("application/json"))).build()); + try { + okhttp3.Response v1_1 = v6_4.execute(); + } catch (String v0_5) { + v6_4.cancel(); + throw v0_5; + } + if (!v1_1.isSuccessful()) { + int v3_1 = v1_1.code(); + StringBuilder v4_1 = new StringBuilder("HTTP "); + v4_1.append(v3_1); + throw new java.io.IOException(v4_1.toString()); + } else { + String v0_3; + String v0_2 = v1_1.body(); + if (v0_2 == null) { + v0_3 = ""; + } else { + v0_3 = v0_2.string(); + if (v0_3 == null) { + } + } + v1_1.close(); + return v0_3; + } + } +} diff --git a/analysis/apk/decomp/k8_h.java b/analysis/apk/decomp/k8_h.java new file mode 100644 index 0000000..2bc87d3 --- /dev/null +++ b/analysis/apk/decomp/k8_h.java @@ -0,0 +1,25 @@ +package k8; +public final class h { + public static final p6.l a; + + static h() + { + k8.h.a = k3.t.H(new h0.i(5)); + return; + } + + public static final okhttp3.OkHttpClient a() + { + return ((okhttp3.OkHttpClient) k8.h.a.getValue()); + } + + public static Object b(String p9, long p10, a7.c p12, a7.e p13, a7.e p14, kotlin.coroutines.jvm.internal.ContinuationImpl p15) + { + return kotlinx.coroutines.BuildersKt.withContext(kotlinx.coroutines.Dispatchers.getIO(), new k8.a(p9, p10, p12, p14, p13, 0), p15); + } + + public static Object c(String p3, String p4, kotlin.coroutines.jvm.internal.ContinuationImpl p5) + { + return kotlinx.coroutines.BuildersKt.withContext(kotlinx.coroutines.Dispatchers.getIO(), new k8.f(p4, p3, 0), p5); + } +} diff --git a/analysis/apk/decomp/qbsg_top_MainActivity.java b/analysis/apk/decomp/qbsg_top_MainActivity.java new file mode 100644 index 0000000..8039903 --- /dev/null +++ b/analysis/apk/decomp/qbsg_top_MainActivity.java @@ -0,0 +1,74 @@ +package qbsg.top; +public final class MainActivity extends b.l { + public static final synthetic int w; + + public MainActivity() + { + return; + } + + public final void onCreate(android.os.Bundle p8) + { + super.onCreate(p8); + w2.h1 v8_1 = w7.a.h; + if (v8_1 == null) { + kotlin.jvm.internal.s.l("instance"); + throw 0; + } else { + w2.h1 v8_16 = v8_1.b; + qbsg.top.activation.ActivationManager v3 = qbsg.top.activation.ActivationManager.a; + v3.nativeInit(w7.w.g()); + ((kotlinx.coroutines.flow.MutableStateFlow) v8_16.e).setValue(v3.nativeGetDeviceId()); + String v5 = ""; + boolean v2_9 = ((android.content.SharedPreferences) ((a6.a) ((a0.m2) v8_16.b).d).d).getString("activation_code", ""); + if (v2_9) { + v5 = v2_9; + } + boolean v2_12; + w2.h1 v8_3 = ((kotlinx.coroutines.flow.MutableStateFlow) v8_16.c); + if ((v5.length() <= 0) || (!v3.nativeChecksumOk(v5))) { + v2_12 = 0; + } else { + v3.nativeActivate(v5); + v2_12 = 1; + } + v8_3.setValue(Boolean.valueOf(v2_12)); + w2.h1 v8_4 = w7.a.h; + if (v8_4 == null) { + kotlin.jvm.internal.s.l("instance"); + throw 0; + } else { + w2.h1 v8_13; + v8_4.d.f(); + int v1_3 = new o1.f(865824856, 1, new m0.r(28, this)); + w2.h1 v8_12 = ((android.view.ViewGroup) this.getWindow().getDecorView().findViewById(16908290)).getChildAt(0); + if (!(v8_12 instanceof w2.h1)) { + v8_13 = 0; + } else { + v8_13 = ((w2.h1) v8_12); + } + if (v8_13 == null) { + w2.h1 v8_15 = new w2.h1(this); + v8_15.setParentCompositionContext(0); + v8_15.setContent(v1_3); + android.view.ViewGroup$LayoutParams v0_2 = this.getWindow().getDecorView(); + if (androidx.lifecycle.l0.d(v0_2) == null) { + androidx.lifecycle.l0.h(v0_2, this); + } + if (androidx.lifecycle.l0.e(v0_2) == null) { + v0_2.setTag(2131034234, this); + } + if (v0.b.j(v0_2) == null) { + v0_2.setTag(2131034233, this); + } + this.setContentView(v8_15, c.f.a); + return; + } else { + v8_13.setParentCompositionContext(0); + v8_13.setContent(v1_3); + return; + } + } + } + } +} diff --git a/analysis/apk/decomp/qbsg_top_MainApp.java b/analysis/apk/decomp/qbsg_top_MainApp.java new file mode 100644 index 0000000..f32151f --- /dev/null +++ b/analysis/apk/decomp/qbsg_top_MainApp.java @@ -0,0 +1,50 @@ +package qbsg.top; +public final class MainApp extends android.app.Application { + public static qbsg.top.MainApp c; + + public MainApp() + { + return; + } + + public final void onCreate() + { + super.onCreate(); + qbsg.top.MainApp.c = this; + if (w7.a.h == null) { + a0.m2 v2_0 = new a0.m2(new a6.a(w7.w.g())); + g3.q v3_1 = new g3.q(); + v3_1.b = v2_0; + int v0_7 = kotlinx.coroutines.flow.StateFlowKt.MutableStateFlow(Boolean.FALSE); + v3_1.c = v0_7; + v3_1.d = kotlinx.coroutines.flow.FlowKt.asStateFlow(v0_7); + int v0_11 = kotlinx.coroutines.flow.StateFlowKt.MutableStateFlow("--------"); + v3_1.e = v0_11; + v3_1.a = kotlinx.coroutines.flow.FlowKt.asStateFlow(v0_11); + w7.v v5_0 = w7.m.a; + w7.n v4_1 = new w7.n(v5_0, v2_0, new r4.d(20)); + i7.g v6_0 = v5_0; + int v0_22 = new w7.v(v6_0, ((kotlinx.coroutines.flow.StateFlow) v2_0.f), new okio.internal.a(14, v3_1), new s0.u0(10), new r4.d(21), new s0.u0(11), new s0.u0(12), new f8.a(w7.w.g())); + kotlin.jvm.internal.s.f(v6_0, "scope"); + w7.a v1_2 = new i7.g(); + v1_2.c = v6_0; + v1_2.d = v2_0; + w7.v v5_5 = kotlinx.coroutines.flow.StateFlowKt.MutableStateFlow(x7.d.a); + v1_2.e = v5_5; + v1_2.f = kotlinx.coroutines.flow.FlowKt.asStateFlow(v5_5); + if (v2_0.z().length() != 0) { + kotlinx.coroutines.BuildersKt.launch$default(v6_0, 0, 0, new a0.p1(v1_2, 0, 22), 3, 0); + } else { + v5_5.setValue(x7.f.a); + } + g3.q v7_8 = new g3.q(2); + w7.a.h = new w7.a(v2_0, v3_1, v4_1, v0_22, v1_2, v7_8); + v7_8.t(); + v7_8.u(); + if (((l8.a) ((kotlinx.coroutines.flow.StateFlow) v2_0.f).getValue()).h) { + v4_1.a(0); + } + } + return; + } +} diff --git a/analysis/apk/decomp/qbsg_top_activation_ActivationManager.java b/analysis/apk/decomp/qbsg_top_activation_ActivationManager.java new file mode 100644 index 0000000..f832d5c --- /dev/null +++ b/analysis/apk/decomp/qbsg_top_activation_ActivationManager.java @@ -0,0 +1,21 @@ +package qbsg.top.activation; +public final class ActivationManager { + public static final qbsg.top.activation.ActivationManager a; + + static ActivationManager() + { + qbsg.top.activation.ActivationManager.a = new qbsg.top.activation.ActivationManager(); + System.loadLibrary("app"); + return; + } + + public final native boolean nativeActivate(String p0); + + public final native boolean nativeChecksumOk(String p0); + + public final native String nativeDecryptSegment(String p0); + + public final native String nativeGetDeviceId(); + + public final native void nativeInit(Object p0); +} diff --git a/analysis/apk/decomp/qbsg_top_ble_BleManager$AndroidGattOtaChannel.java b/analysis/apk/decomp/qbsg_top_ble_BleManager$AndroidGattOtaChannel.java new file mode 100644 index 0000000..1e52665 --- /dev/null +++ b/analysis/apk/decomp/qbsg_top_ble_BleManager$AndroidGattOtaChannel.java @@ -0,0 +1,255 @@ +package qbsg.top.ble; +final class BleManager$AndroidGattOtaChannel implements qbsg.top.ble.GattOtaChannel { + private final kotlinx.coroutines.channels.Channel descResult; + private a7.c disconnectCb; + private final android.bluetooth.BluetoothGatt gatt; + private final kotlinx.coroutines.channels.Channel mtuResult; + private final kotlinx.coroutines.channels.Channel notifyEvents; + private final kotlinx.coroutines.channels.Channel readResult; + final synthetic qbsg.top.ble.BleManager this$0; + private final kotlinx.coroutines.channels.Channel writeResult; + + public BleManager$AndroidGattOtaChannel(qbsg.top.ble.BleManager p4, android.bluetooth.BluetoothGatt p5) + { + kotlin.jvm.internal.s.f(p5, "gatt"); + this.this$0 = p4; + this.gatt = p5; + this.writeResult = kotlinx.coroutines.channels.ChannelKt.Channel$default(1, 0, 0, 6, 0); + this.readResult = kotlinx.coroutines.channels.ChannelKt.Channel$default(2147483647, 0, 0, 6, 0); + this.mtuResult = kotlinx.coroutines.channels.ChannelKt.Channel$default(1, 0, 0, 6, 0); + this.descResult = kotlinx.coroutines.channels.ChannelKt.Channel$default(1, 0, 0, 6, 0); + this.notifyEvents = kotlinx.coroutines.channels.ChannelKt.Channel$default(2147483647, 0, 0, 6, 0); + return; + } + + public void enableNotification(String p2, String p3) + { + kotlin.jvm.internal.s.f(p2, "serviceUuid"); + kotlin.jvm.internal.s.f(p3, "charUuid"); + android.bluetooth.BluetoothGattCharacteristic v2_3 = this.gatt.getService(java.util.UUID.fromString(p2)); + if (v2_3 != null) { + android.bluetooth.BluetoothGattCharacteristic v2_1 = v2_3.getCharacteristic(java.util.UUID.fromString(p3)); + if (v2_1 != null) { + this.gatt.setCharacteristicNotification(v2_1, 1); + } + } + return; + } + + public final void forwardCharacteristicRead(android.bluetooth.BluetoothGattCharacteristic p2, byte[] p3, int p4) + { + kotlin.jvm.internal.s.f(p2, "c"); + kotlin.jvm.internal.s.f(p3, "data"); + kotlinx.coroutines.channels.Channel v4_2 = this.getReadResult(); + String v2_3 = p2.getUuid().toString(); + kotlin.jvm.internal.s.e(v2_3, "toString(...)"); + String v2_1 = v2_3.toLowerCase(java.util.Locale.ROOT); + kotlin.jvm.internal.s.e(v2_1, "toLowerCase(...)"); + v4_2.trySend-JP2dKIU(new p6.g(v2_1, p3)); + return; + } + + public final void forwardCharacteristicWrite(android.bluetooth.BluetoothGattCharacteristic p2, int p3) + { + Boolean v3_1; + kotlin.jvm.internal.s.f(p2, "c"); + kotlinx.coroutines.channels.Channel v2_1 = this.getWriteResult(); + if (p3 != null) { + v3_1 = 0; + } else { + v3_1 = 1; + } + v2_1.trySend-JP2dKIU(Boolean.valueOf(v3_1)); + return; + } + + public final void forwardDescriptorWrite(int p2) + { + Boolean v2_1; + kotlinx.coroutines.channels.Channel v0 = this.getDescResult(); + if (p2 != null) { + v2_1 = 0; + } else { + v2_1 = 1; + } + v0.trySend-JP2dKIU(Boolean.valueOf(v2_1)); + return; + } + + public final void forwardMtuChanged(int p2, int p3) + { + kotlinx.coroutines.channels.Channel v0 = this.getMtuResult(); + if (p3 != 0) { + p2 = 23; + } + v0.trySend-JP2dKIU(Integer.valueOf(p2)); + return; + } + + public final void forwardNotify(android.bluetooth.BluetoothGattCharacteristic p3, byte[] p4) + { + kotlin.jvm.internal.s.f(p3, "c"); + kotlin.jvm.internal.s.f(p4, "value"); + kotlinx.coroutines.channels.Channel v0_2 = this.getNotifyEvents(); + String v3_3 = p3.getUuid().toString(); + kotlin.jvm.internal.s.e(v3_3, "toString(...)"); + String v3_1 = v3_3.toLowerCase(java.util.Locale.ROOT); + kotlin.jvm.internal.s.e(v3_1, "toLowerCase(...)"); + v0_2.trySend-JP2dKIU(new p6.g(v3_1, p4)); + return; + } + + public kotlinx.coroutines.channels.Channel getDescResult() + { + return this.descResult; + } + + public kotlinx.coroutines.channels.Channel getMtuResult() + { + return this.mtuResult; + } + + public kotlinx.coroutines.channels.Channel getNotifyEvents() + { + return this.notifyEvents; + } + + public kotlinx.coroutines.channels.Channel getReadResult() + { + return this.readResult; + } + + public kotlinx.coroutines.channels.Channel getWriteResult() + { + return this.writeResult; + } + + public boolean hasCharacteristic(String p2, String p3) + { + int v2_1; + kotlin.jvm.internal.s.f(p2, "serviceUuid"); + kotlin.jvm.internal.s.f(p3, "charUuid"); + int v2_5 = this.gatt.getService(java.util.UUID.fromString(p2)); + if (v2_5 == 0) { + v2_1 = 0; + } else { + v2_1 = v2_5.getCharacteristic(java.util.UUID.fromString(p3)); + } + if (v2_1 == 0) { + return 0; + } else { + return 1; + } + } + + public boolean hasService(String p2) + { + kotlin.jvm.internal.s.f(p2, "serviceUuid"); + if (this.gatt.getService(java.util.UUID.fromString(p2)) == null) { + return 0; + } else { + return 1; + } + } + + public final void notifyDisconnect(int p2) + { + a7.c v0 = this.disconnectCb; + if (v0 != null) { + v0.invoke(Integer.valueOf(p2)); + } + return; + } + + public void readCharacteristic(String p2, String p3) + { + kotlin.jvm.internal.s.f(p2, "serviceUuid"); + kotlin.jvm.internal.s.f(p3, "charUuid"); + android.bluetooth.BluetoothGattCharacteristic v2_3 = this.gatt.getService(java.util.UUID.fromString(p2)); + if (v2_3 != null) { + android.bluetooth.BluetoothGattCharacteristic v2_1 = v2_3.getCharacteristic(java.util.UUID.fromString(p3)); + if (v2_1 != null) { + this.gatt.readCharacteristic(v2_1); + } + } + return; + } + + public void requestBalancedPriority() + { + this.gatt.requestConnectionPriority(0); + return; + } + + public void requestHighPriority() + { + this.gatt.requestConnectionPriority(1); + return; + } + + public void requestMtu(int p2) + { + this.gatt.requestMtu(p2); + return; + } + + public void setDisconnectCallback(a7.c p2) + { + kotlin.jvm.internal.s.f(p2, "cb"); + this.disconnectCb = p2; + return; + } + + public void writeCharacteristic(String p2, String p3, byte[] p4, boolean p5) + { + kotlin.jvm.internal.s.f(p2, "serviceUuid"); + kotlin.jvm.internal.s.f(p3, "charUuid"); + kotlin.jvm.internal.s.f(p4, "data"); + android.bluetooth.BluetoothGattCharacteristic v2_1 = this.gatt.getService(java.util.UUID.fromString(p2)); + if (v2_1 != null) { + android.bluetooth.BluetoothGattCharacteristic v2_2 = v2_1.getCharacteristic(java.util.UUID.fromString(p3)); + if (v2_2 != null) { + android.bluetooth.BluetoothGatt v3_2; + if (p5 == null) { + v3_2 = 1; + } else { + v3_2 = 2; + } + if (android.os.Build$VERSION.SDK_INT < 33) { + v2_2.setValue(p4); + v2_2.setWriteType(v3_2); + this.gatt.writeCharacteristic(v2_2); + } else { + b.b.q(this.gatt, v2_2, p4, v3_2); + return; + } + } + } + return; + } + + public void writeDescriptor(String p2, String p3, String p4, byte[] p5) + { + kotlin.jvm.internal.s.f(p2, "serviceUuid"); + kotlin.jvm.internal.s.f(p3, "charUuid"); + kotlin.jvm.internal.s.f(p4, "descUuid"); + kotlin.jvm.internal.s.f(p5, "data"); + android.bluetooth.BluetoothGattDescriptor v2_2 = this.gatt.getService(java.util.UUID.fromString(p2)); + if (v2_2 != null) { + android.bluetooth.BluetoothGattDescriptor v2_3 = v2_2.getCharacteristic(java.util.UUID.fromString(p3)); + if (v2_3 != null) { + android.bluetooth.BluetoothGattDescriptor v2_4 = v2_3.getDescriptor(java.util.UUID.fromString(p4)); + if (v2_4 != null) { + if (android.os.Build$VERSION.SDK_INT < 33) { + v2_4.setValue(p5); + this.gatt.writeDescriptor(v2_4); + } else { + b.b.r(this.gatt, v2_4, p5); + return; + } + } + } + } + return; + } +} diff --git a/analysis/apk/decomp/qbsg_top_ble_BleManager.java b/analysis/apk/decomp/qbsg_top_ble_BleManager.java new file mode 100644 index 0000000..16e2d90 --- /dev/null +++ b/analysis/apk/decomp/qbsg_top_ble_BleManager.java @@ -0,0 +1,887 @@ +package qbsg.top.ble; +public final class BleManager implements qbsg.top.ble.BleManagerFacade { + public static final int $stable = 8; + private final kotlinx.coroutines.flow.MutableStateFlow _activeDevice; + private final kotlinx.coroutines.flow.MutableStateFlow _connections; + private final kotlinx.coroutines.flow.MutableSharedFlow _disconnectEvents; + private final kotlinx.coroutines.flow.MutableStateFlow _isBluetoothEnabled; + private final kotlinx.coroutines.flow.MutableSharedFlow _messageEvents; + private final kotlinx.coroutines.flow.MutableSharedFlow _rawScanResults; + private final kotlinx.coroutines.flow.MutableStateFlow _scanState; + private final kotlinx.coroutines.flow.MutableStateFlow _scannedDevices; + private final kotlinx.coroutines.flow.MutableStateFlow _targetSessionMac; + private final kotlinx.coroutines.flow.StateFlow activeDevice; + private final android.bluetooth.BluetoothManager btManager; + private final qbsg.top.ble.BleManager$btStateReceiver$1 btStateReceiver; + private final kotlinx.coroutines.flow.StateFlow connections; + private final android.content.Context context; + private final java.util.LinkedList descriptorWriteQueue; + private final java.util.concurrent.ConcurrentHashMap deviceInfoReadJobs; + private final kotlinx.coroutines.flow.SharedFlow disconnectEvents; + private final qbsg.top.ble.BleManager$gattCallback$1 gattCallback; + private final java.util.concurrent.ConcurrentHashMap gatts; + private final String id; + private final kotlinx.coroutines.flow.StateFlow isBluetoothEnabled; + private boolean isWritingDescriptor; + private final kotlinx.coroutines.flow.SharedFlow messageEvents; + private final java.util.concurrent.ConcurrentHashMap otaChannels; + private a8.h otaManager; + private final java.util.concurrent.ConcurrentHashMap pendingCccdCount; + private final java.util.concurrent.ConcurrentHashMap pendingFirmware; + private final kotlinx.coroutines.flow.SharedFlow rawScanResults; + private final java.util.concurrent.ConcurrentHashMap readChannels; + private final qbsg.top.ble.BleManager$scanCallback$1 scanCallback; + private final kotlinx.coroutines.flow.StateFlow scanState; + private final kotlinx.coroutines.flow.StateFlow scannedDevices; + private final kotlinx.coroutines.CoroutineScope scope; + private final kotlinx.coroutines.flow.StateFlow targetSessionMac; + private final java.util.concurrent.ConcurrentHashMap$KeySetView userInitiatedDisconnections; + + public BleManager(android.content.Context p5) + { + String v2_13; + kotlin.jvm.internal.s.f(p5, "context"); + this.context = p5; + this.id = w7.w.i(); + this.scope = kotlinx.coroutines.CoroutineScopeKt.CoroutineScope(kotlinx.coroutines.SupervisorKt.SupervisorJob$default(0, 1, 0).plus(kotlinx.coroutines.Dispatchers.getIO())); + qbsg.top.ble.BleManager$btStateReceiver$1 v0_9 = p5.getSystemService("bluetooth"); + kotlin.jvm.internal.s.d(v0_9, "null cannot be cast to non-null type android.bluetooth.BluetoothManager"); + this.btManager = ((android.bluetooth.BluetoothManager) v0_9); + this.gatts = new java.util.concurrent.ConcurrentHashMap(); + this.userInitiatedDisconnections = java.util.concurrent.ConcurrentHashMap.newKeySet(); + this.otaChannels = new java.util.concurrent.ConcurrentHashMap(); + this.descriptorWriteQueue = new java.util.LinkedList(); + this.readChannels = new java.util.concurrent.ConcurrentHashMap(); + this.pendingFirmware = new java.util.concurrent.ConcurrentHashMap(); + this.deviceInfoReadJobs = new java.util.concurrent.ConcurrentHashMap(); + this.pendingCccdCount = new java.util.concurrent.ConcurrentHashMap(); + qbsg.top.ble.BleManager$btStateReceiver$1 v0_28 = kotlinx.coroutines.flow.StateFlowKt.MutableStateFlow(q6.u.c); + this._connections = v0_28; + this.connections = kotlinx.coroutines.flow.FlowKt.asStateFlow(v0_28); + qbsg.top.ble.BleManager$btStateReceiver$1 v0_30 = kotlinx.coroutines.flow.StateFlowKt.MutableStateFlow(0); + this._activeDevice = v0_30; + this.activeDevice = kotlinx.coroutines.flow.FlowKt.asStateFlow(v0_30); + qbsg.top.ble.BleManager$btStateReceiver$1 v0_32 = kotlinx.coroutines.flow.StateFlowKt.MutableStateFlow(0); + this._targetSessionMac = v0_32; + this.targetSessionMac = kotlinx.coroutines.flow.FlowKt.asStateFlow(v0_32); + qbsg.top.ble.BleManager$btStateReceiver$1 v0_36 = kotlinx.coroutines.flow.StateFlowKt.MutableStateFlow(qbsg.top.ble.data.BleScanState.Idle); + this._scanState = v0_36; + this.scanState = kotlinx.coroutines.flow.FlowKt.asStateFlow(v0_36); + qbsg.top.ble.BleManager$btStateReceiver$1 v0_39 = kotlinx.coroutines.flow.StateFlowKt.MutableStateFlow(q6.t.c); + this._scannedDevices = v0_39; + this.scannedDevices = kotlinx.coroutines.flow.FlowKt.asStateFlow(v0_39); + String v2_10 = kotlinx.coroutines.flow.SharedFlowKt.MutableSharedFlow$default(0, 16, 0, 5, 0); + this._rawScanResults = v2_10; + this.rawScanResults = kotlinx.coroutines.flow.FlowKt.asSharedFlow(v2_10); + String v2_12 = this.getBtAdapter(); + if (v2_12 == null) { + v2_13 = 0; + } else { + v2_13 = v2_12.isEnabled(); + } + String v2_0 = kotlinx.coroutines.flow.StateFlowKt.MutableStateFlow(Boolean.valueOf(v2_13)); + this._isBluetoothEnabled = v2_0; + this.isBluetoothEnabled = kotlinx.coroutines.flow.FlowKt.asStateFlow(v2_0); + String v2_3 = kotlinx.coroutines.flow.SharedFlowKt.MutableSharedFlow$default(0, 8, 0, 5, 0); + this._disconnectEvents = v2_3; + this.disconnectEvents = kotlinx.coroutines.flow.FlowKt.asSharedFlow(v2_3); + qbsg.top.ble.BleManager$btStateReceiver$1 v0_2 = kotlinx.coroutines.flow.SharedFlowKt.MutableSharedFlow$default(0, 64, 0, 5, 0); + this._messageEvents = v0_2; + this.messageEvents = kotlinx.coroutines.flow.FlowKt.asSharedFlow(v0_2); + qbsg.top.ble.BleManager$btStateReceiver$1 v0_5 = new qbsg.top.ble.BleManager$btStateReceiver$1(this); + this.btStateReceiver = v0_5; + p5.registerReceiver(v0_5, new android.content.IntentFilter("android.bluetooth.adapter.action.STATE_CHANGED")); + this.scanCallback = new qbsg.top.ble.BleManager$scanCallback$1(this); + this.gattCallback = new qbsg.top.ble.BleManager$gattCallback$1(this); + return; + } + + public static synthetic boolean a(qbsg.top.ble.a p0, Object p1) + { + return qbsg.top.ble.BleManager.cleanupDevice$lambda$1(p0, p1); + } + + public static final synthetic void access$cleanupDevice(qbsg.top.ble.BleManager p0, String p1, boolean p2, qbsg.top.ble.data.DisconnectReason p3) + { + p0.cleanupDevice(p1, p2, p3); + return; + } + + public static final synthetic boolean access$enqueueNotify(qbsg.top.ble.BleManager p0, android.bluetooth.BluetoothGatt p1, android.bluetooth.BluetoothGattCharacteristic p2) + { + return p0.enqueueNotify(p1, p2); + } + + public static final synthetic java.util.LinkedList access$getDescriptorWriteQueue$p(qbsg.top.ble.BleManager p0) + { + return p0.descriptorWriteQueue; + } + + public static final synthetic java.util.concurrent.ConcurrentHashMap access$getGatts$p(qbsg.top.ble.BleManager p0) + { + return p0.gatts; + } + + public static final synthetic java.util.concurrent.ConcurrentHashMap access$getOtaChannels$p(qbsg.top.ble.BleManager p0) + { + return p0.otaChannels; + } + + public static final synthetic java.util.concurrent.ConcurrentHashMap access$getPendingCccdCount$p(qbsg.top.ble.BleManager p0) + { + return p0.pendingCccdCount; + } + + public static final synthetic java.util.concurrent.ConcurrentHashMap access$getPendingFirmware$p(qbsg.top.ble.BleManager p0) + { + return p0.pendingFirmware; + } + + public static final synthetic java.util.concurrent.ConcurrentHashMap access$getReadChannels$p(qbsg.top.ble.BleManager p0) + { + return p0.readChannels; + } + + public static final synthetic java.util.concurrent.ConcurrentHashMap$KeySetView access$getUserInitiatedDisconnections$p(qbsg.top.ble.BleManager p0) + { + return p0.userInitiatedDisconnections; + } + + public static final synthetic kotlinx.coroutines.flow.MutableStateFlow access$get_activeDevice$p(qbsg.top.ble.BleManager p0) + { + return p0._activeDevice; + } + + public static final synthetic kotlinx.coroutines.flow.MutableStateFlow access$get_connections$p(qbsg.top.ble.BleManager p0) + { + return p0._connections; + } + + public static final synthetic kotlinx.coroutines.flow.MutableSharedFlow access$get_disconnectEvents$p(qbsg.top.ble.BleManager p0) + { + return p0._disconnectEvents; + } + + public static final synthetic kotlinx.coroutines.flow.MutableStateFlow access$get_isBluetoothEnabled$p(qbsg.top.ble.BleManager p0) + { + return p0._isBluetoothEnabled; + } + + public static final synthetic kotlinx.coroutines.flow.MutableSharedFlow access$get_messageEvents$p(qbsg.top.ble.BleManager p0) + { + return p0._messageEvents; + } + + public static final synthetic kotlinx.coroutines.flow.MutableSharedFlow access$get_rawScanResults$p(qbsg.top.ble.BleManager p0) + { + return p0._rawScanResults; + } + + public static final synthetic kotlinx.coroutines.flow.MutableStateFlow access$get_scanState$p(qbsg.top.ble.BleManager p0) + { + return p0._scanState; + } + + public static final synthetic kotlinx.coroutines.flow.MutableStateFlow access$get_scannedDevices$p(qbsg.top.ble.BleManager p0) + { + return p0._scannedDevices; + } + + public static final synthetic kotlinx.coroutines.flow.MutableStateFlow access$get_targetSessionMac$p(qbsg.top.ble.BleManager p0) + { + return p0._targetSessionMac; + } + + public static final synthetic void access$processDescriptorQueue(qbsg.top.ble.BleManager p0) + { + p0.processDescriptorQueue(); + return; + } + + public static final synthetic Object access$readDeviceInfoString(qbsg.top.ble.BleManager p0, android.bluetooth.BluetoothGatt p1, String p2, java.util.UUID p3, kotlin.coroutines.Continuation p4) + { + return p0.readDeviceInfoString(p1, p2, p3, p4); + } + + public static final synthetic void access$setWritingDescriptor$p(qbsg.top.ble.BleManager p0, boolean p1) + { + p0.isWritingDescriptor = p1; + return; + } + + public static final synthetic void access$startDeviceInfoRead(qbsg.top.ble.BleManager p0, android.bluetooth.BluetoothGatt p1) + { + p0.startDeviceInfoRead(p1); + return; + } + + public static final synthetic void access$updateDeviceInfo(qbsg.top.ble.BleManager p0, String p1, String p2) + { + p0.updateDeviceInfo(p1, p2); + return; + } + + public static synthetic boolean b(String p0, qbsg.top.ble.BleManager$DescriptorWriteRequest p1) + { + return qbsg.top.ble.BleManager.cleanupDevice$lambda$0(p0, p1); + } + + private final void checkPrerequisitesOrThrow() + { + qbsg.top.ble.data.BleException$BluetoothDisabled v0_1; + if (android.os.Build$VERSION.SDK_INT < 31) { + v0_1 = k3.t.K("android.permission.ACCESS_FINE_LOCATION"); + } else { + v0_1 = q6.n.Y(new String[] {"android.permission.BLUETOOTH_SCAN", "android.permission.BLUETOOTH_CONNECT"})); + } + java.util.ArrayList v1_2 = new java.util.ArrayList(); + qbsg.top.ble.data.BleException$BluetoothDisabled v0_2 = v0_1.iterator(); + while (v0_2.hasNext()) { + Object v2_1 = v0_2.next(); + if (this.context.checkSelfPermission(((String) v2_1)) != 0) { + v1_2.add(v2_1); + } + } + if (!v1_2.isEmpty()) { + throw new qbsg.top.ble.data.BleException$PermissionDenied(v1_2); + } else { + if (!this.getBtAdapter().isEnabled()) { + throw new qbsg.top.ble.data.BleException$BluetoothDisabled(); + } else { + return; + } + } + } + + private final void cleanupDevice(String p7, boolean p8, qbsg.top.ble.data.DisconnectReason p9) + { + this.userInitiatedDisconnections.remove(p7); + kotlinx.coroutines.flow.MutableStateFlow v0_24 = ((kotlinx.coroutines.Job) this.deviceInfoReadJobs.remove(p7)); + String v2 = 0; + if (v0_24 != null) { + kotlinx.coroutines.Job$DefaultImpls.cancel$default(v0_24, 0, 1, 0); + } + this.pendingFirmware.remove(p7); + this.pendingCccdCount.remove(p7); + kotlinx.coroutines.flow.MutableStateFlow v0_12 = ((kotlinx.coroutines.channels.Channel) this.readChannels.remove(p7)); + if (v0_12 != null) { + kotlinx.coroutines.channels.SendChannel$DefaultImpls.close$default(v0_12, 0, 1, 0); + } + kotlinx.coroutines.flow.MutableStateFlow v0_16 = ((android.bluetooth.BluetoothGatt) this.gatts.get(p7)); + if (v0_16 != null) { + v0_16.close(); + } + this.gatts.remove(p7); + this.descriptorWriteQueue.removeIf(new qbsg.top.ble.b(new qbsg.top.ble.a(p7))); + if (this.descriptorWriteQueue.isEmpty()) { + this.isWritingDescriptor = 0; + } + kotlinx.coroutines.flow.MutableStateFlow v0_23 = this._connections; + do { + int v3_3 = v0_23.getValue(); + java.util.Map v4_3 = ((java.util.Map) v3_3); + kotlin.jvm.internal.s.f(v4_3, ""); + java.util.Map v4_4 = q6.y.c0(v4_3); + v4_4.remove(p7); + int v5_1 = v4_4.size(); + if (v5_1 == 0) { + v4_4 = q6.u.c; + } else { + if (v5_1 == 1) { + v4_4 = q6.y.d0(v4_4); + } + } + } while(!v0_23.compareAndSet(v3_3, v4_4)); + kotlinx.coroutines.flow.MutableStateFlow v0_28; + kotlinx.coroutines.flow.MutableStateFlow v0_27 = ((qbsg.top.ble.data.BleDeviceInfo) this._activeDevice.getValue()); + if (v0_27 == null) { + v0_28 = 0; + } else { + v0_28 = v0_27.getAddress(); + } + if (kotlin.jvm.internal.s.b(v0_28, p7)) { + kotlinx.coroutines.flow.MutableStateFlow v0_35 = ((Iterable) ((java.util.Map) this._connections.getValue()).values()).iterator(); + while (v0_35.hasNext()) { + kotlinx.coroutines.flow.MutableStateFlow v1_7 = v0_35.next(); + if ((((qbsg.top.ble.data.BleConnectionInfo) v1_7).getState() instanceof qbsg.top.ble.data.DeviceConnectionState$Connected)) { + } + kotlinx.coroutines.flow.MutableStateFlow v0_36; + kotlinx.coroutines.flow.MutableStateFlow v1_8 = ((qbsg.top.ble.data.BleConnectionInfo) v1_7); + if (v1_8 == null) { + v0_36 = 0; + } else { + v0_36 = v1_8.getDevice(); + } + int v3_0; + kotlinx.coroutines.flow.MutableStateFlow v1_9 = this._targetSessionMac; + if (v0_36 == null) { + v3_0 = 0; + } else { + v3_0 = v0_36.getAddress(); + } + v1_9.setValue(v3_0); + this._activeDevice.setValue(v0_36); + } + v1_7 = 0; + } + if (kotlin.jvm.internal.s.b(this._targetSessionMac.getValue(), p7)) { + int v7_7 = ((Iterable) ((java.util.Map) this._connections.getValue()).values()).iterator(); + while (v7_7.hasNext()) { + kotlinx.coroutines.flow.MutableStateFlow v0_6 = v7_7.next(); + if ((((qbsg.top.ble.data.BleConnectionInfo) v0_6).getState() instanceof qbsg.top.ble.data.DeviceConnectionState$Connected)) { + } + int v7_8; + kotlinx.coroutines.flow.MutableStateFlow v0_7 = ((qbsg.top.ble.data.BleConnectionInfo) v0_6); + if (v0_7 == null) { + v7_8 = 0; + } else { + v7_8 = v0_7.getDevice(); + } + kotlinx.coroutines.flow.MutableStateFlow v0_8 = this._targetSessionMac; + if (v7_8 != 0) { + v2 = v7_8.getAddress(); + } + v0_8.setValue(v2); + this._activeDevice.setValue(v7_8); + } + v0_6 = 0; + } + if ((p8) && (p9 != null)) { + this._disconnectEvents.tryEmit(p9); + } + return; + } + + public static synthetic void cleanupDevice$default(qbsg.top.ble.BleManager p0, String p1, boolean p2, qbsg.top.ble.data.DisconnectReason p3, int p4, Object p5) + { + if ((p4 & 2) != 0) { + p2 = 0; + } + if ((p4 & 4) != 0) { + p3 = 0; + } + p0.cleanupDevice(p1, p2, p3); + return; + } + + private static final boolean cleanupDevice$lambda$0(String p0, qbsg.top.ble.BleManager$DescriptorWriteRequest p1) + { + return kotlin.jvm.internal.s.b(p1.getGatt().getDevice().getAddress(), p0); + } + + private static final boolean cleanupDevice$lambda$1(a7.c p0, Object p1) + { + return ((Boolean) p0.invoke(p1)).booleanValue(); + } + + private final boolean enqueueNotify(android.bluetooth.BluetoothGatt p5, android.bluetooth.BluetoothGattCharacteristic p6) + { + p5.setCharacteristicNotification(p6, 1); + android.bluetooth.BluetoothGattDescriptor v1_1 = p6.getDescriptor(qbsg.top.ble.BleManagerKt.access$getCCCD_UUID$p()); + if (v1_1 != null) { + byte[] v6_1; + if ((p6.getProperties() & 32) == 0) { + v6_1 = android.bluetooth.BluetoothGattDescriptor.ENABLE_NOTIFICATION_VALUE; + } else { + v6_1 = android.bluetooth.BluetoothGattDescriptor.ENABLE_INDICATION_VALUE; + } + java.util.LinkedList v2 = this.descriptorWriteQueue; + kotlin.jvm.internal.s.c(v6_1); + v2.add(new qbsg.top.ble.BleManager$DescriptorWriteRequest(p5, v1_1, v6_1)); + this.processDescriptorQueue(); + return 1; + } else { + return 0; + } + } + + private final android.bluetooth.BluetoothAdapter getBtAdapter() + { + return this.btManager.getAdapter(); + } + + private final void processDescriptorQueue() + { + if ((!this.isWritingDescriptor) && (!this.descriptorWriteQueue.isEmpty())) { + java.util.LinkedList v0_9 = ((qbsg.top.ble.BleManager$DescriptorWriteRequest) this.descriptorWriteQueue.peek()); + if (v0_9 != null) { + int v1_0 = 1; + this.isWritingDescriptor = 1; + if (android.os.Build$VERSION.SDK_INT < 33) { + v0_9.getDesc().setValue(v0_9.getValue()); + v1_0 = v0_9.getGatt().writeDescriptor(v0_9.getDesc()); + } else { + if (b.b.b(v0_9.getGatt(), v0_9.getDesc(), v0_9.getValue()) != 0) { + v1_0 = 0; + } + } + if (v1_0 == 0) { + this.descriptorWriteQueue.poll(); + this.isWritingDescriptor = 0; + this.processDescriptorQueue(); + } + } + } + return; + } + + private final Object readDeviceInfoString(android.bluetooth.BluetoothGatt p12, String p13, java.util.UUID p14, kotlin.coroutines.Continuation p15) + { + qbsg.top.ble.BleManager$readDeviceInfoString$1 v0_2; + if (!(p15 instanceof qbsg.top.ble.BleManager$readDeviceInfoString$1)) { + v0_2 = new qbsg.top.ble.BleManager$readDeviceInfoString$1(this, p15); + } else { + v0_2 = ((qbsg.top.ble.BleManager$readDeviceInfoString$1) p15); + Object v1_2 = ((qbsg.top.ble.BleManager$readDeviceInfoString$1) p15).label; + if ((v1_2 & -2147483648) == 0) { + } else { + ((qbsg.top.ble.BleManager$readDeviceInfoString$1) p15).label = (v1_2 - -2147483648); + } + } + Object v12_16; + android.bluetooth.BluetoothGattCharacteristic v8_1; + Object v15_6; + Object v13_10; + int v14_2; + long v6_3; + Object v15_1 = v0_2.result; + Object v1_1 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + qbsg.top.ble.BleManager$readDeviceInfoString$result$1 v2_3 = v0_2.label; + int v4 = 1; + if (v2_3 == null) { + q6.y.Y(v15_1); + Object v15_3 = p12.getServices(); + kotlin.jvm.internal.s.e(v15_3, "getServices(...)"); + qbsg.top.ble.BleManager$readDeviceInfoString$result$1 v2_6 = new java.util.ArrayList(); + Object v15_4 = v15_3.iterator(); + while (v15_4.hasNext()) { + long v6_6 = ((android.bluetooth.BluetoothGattService) v15_4.next()).getCharacteristics(); + kotlin.jvm.internal.s.e(v6_6, "getCharacteristics(...)"); + q6.o.f0(v2_6, v6_6); + } + Object v15_5 = v2_6.size(); + v6_3 = 0; + j7.d v7_0 = 0; + while (v7_0 < v15_5) { + android.bluetooth.BluetoothGattCharacteristic v8_0 = v2_6.get(v7_0); + v7_0++; + if (kotlin.jvm.internal.s.b(((android.bluetooth.BluetoothGattCharacteristic) v8_0).getUuid(), p14)) { + } + v8_1 = ((android.bluetooth.BluetoothGattCharacteristic) v8_0); + if (v8_1 != null) { + v15_6 = p14; + v14_2 = p13; + v13_10 = p12; + v12_16 = 0; + if (v12_16 >= 3) { + v4 = v6_3; + if (v4 != 0) { + Object v12_3 = ((kotlinx.coroutines.channels.Channel) this.readChannels.get(v14_2)); + if (v12_3 != null) { + long v6_1 = j7.h.m(4, j7.d.f); + qbsg.top.ble.BleManager$readDeviceInfoString$result$1 v2_2 = new qbsg.top.ble.BleManager$readDeviceInfoString$result$1(v12_3, v15_6, 0); + v0_2.L$0 = kotlin.coroutines.jvm.internal.SpillingKt.nullOutSpilledVariable(v13_10); + v0_2.L$1 = kotlin.coroutines.jvm.internal.SpillingKt.nullOutSpilledVariable(v14_2); + v0_2.L$2 = kotlin.coroutines.jvm.internal.SpillingKt.nullOutSpilledVariable(v15_6); + v0_2.L$3 = kotlin.coroutines.jvm.internal.SpillingKt.nullOutSpilledVariable(v8_1); + v0_2.L$4 = kotlin.coroutines.jvm.internal.SpillingKt.nullOutSpilledVariable(v12_3); + v0_2.I$0 = v4; + v0_2.label = 2; + v15_1 = kotlinx.coroutines.TimeoutKt.withTimeoutOrNull-KLykuaI(v6_1, v2_2, v0_2); + if (v15_1 != v1_1) { + Object v15_2 = ((p6.g) v15_1); + if (v15_2 != null) { + Object v12_13 = ((byte[]) v15_2.d); + if (v12_13.length != 0) { + Object v12_15 = i7.i.S0(new String(v12_13, i7.a.a)).toString(); + if (v12_15.length() != 0) { + return v12_15; + } + } + } + return 0; + } + } + } + } else { + if (!v13_10.readCharacteristic(v8_1)) { + long v9_4 = j7.h.m(120, j7.d.e); + v0_2.L$0 = v13_10; + v0_2.L$1 = v14_2; + v0_2.L$2 = v15_6; + v0_2.L$3 = v8_1; + v0_2.I$0 = v6_3; + v0_2.I$1 = v12_16; + v0_2.label = 1; + if (kotlinx.coroutines.DelayKt.delay-VtjQ1oo(v9_4, v0_2) == v1_1) { + } + } + } + return v1_1; + } + } + v8_0 = 0; + } else { + if (v2_3 == 1) { + v12_16 = v0_2.I$1; + Object v13_11 = v0_2.I$0; + int v14_4 = ((android.bluetooth.BluetoothGattCharacteristic) v0_2.L$3); + qbsg.top.ble.BleManager$readDeviceInfoString$result$1 v2_9 = ((java.util.UUID) v0_2.L$2); + long v6_8 = ((String) v0_2.L$1); + j7.d v7_3 = ((android.bluetooth.BluetoothGatt) v0_2.L$0); + q6.y.Y(v15_1); + v8_1 = v14_4; + v15_6 = v2_9; + v14_2 = v6_8; + v6_3 = v13_11; + v13_10 = v7_3; + do { + v12_16++; + } while(v4 != 0); + } else { + if (v2_3 != 2) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + p12 = ((android.bluetooth.BluetoothGattCharacteristic) v0_2.L$3); + p12 = ((String) v0_2.L$1); + q6.y.Y(v15_1); + } + } + } + return 0; + } + + private final void startDeviceInfoRead(android.bluetooth.BluetoothGatt p9) + { + String v0_1 = p9.getDevice().getAddress(); + java.util.concurrent.ConcurrentHashMap v1_4 = ((kotlinx.coroutines.Job) this.deviceInfoReadJobs.get(v0_1)); + if ((v1_4 == null) || (v1_4.isActive() != 1)) { + this.deviceInfoReadJobs.put(v0_1, kotlinx.coroutines.BuildersKt.launch$default(this.scope, 0, 0, new qbsg.top.ble.BleManager$startDeviceInfoRead$1(this, v0_1, p9, 0), 3, 0)); + return; + } else { + return; + } + } + + private final void updateDeviceInfo(String p20, String p21) + { + kotlinx.coroutines.flow.MutableStateFlow v2 = this._connections; + do { + boolean v3_0 = v2.getValue(); + java.util.Map v4_1 = ((java.util.Map) v3_0); + qbsg.top.ble.data.BleConnectionInfo v5_2 = ((qbsg.top.ble.data.BleConnectionInfo) v4_1.get(p20)); + if (v5_2 != null) { + int v7_0; + if (p21 != null) { + v7_0 = p21; + } else { + v7_0 = "\u672a\u77e5"; + } + String v13; + if (!v7_0.equals("\u672a\u77e5")) { + v13 = v7_0; + } else { + v13 = 0; + } + int v7_4; + p6.g v6_2 = qbsg.top.ble.data.BleDeviceInfo.copy$default(v5_2.getDevice(), 0, 0, 0, v13, 0, 0, 0, 119, 0); + int v7_3 = ((qbsg.top.ble.data.BleDeviceInfo) this._activeDevice.getValue()); + if (v7_3 == 0) { + v7_4 = 0; + } else { + v7_4 = v7_3.getAddress(); + } + if (kotlin.jvm.internal.s.b(v7_4, p20)) { + this._activeDevice.setValue(v6_2); + } + v4_1 = q6.y.L(v4_1, new p6.g(p20, qbsg.top.ble.data.BleConnectionInfo.copy$default(v5_2, v6_2, 0, 2, 0))); + } + } while(!v2.compareAndSet(v3_0, v4_1)); + return; + } + + public void closeOtaChannel(String p2) + { + kotlin.jvm.internal.s.f(p2, "address"); + this.otaChannels.remove(p2); + return; + } + + public void connect(qbsg.top.ble.data.BleDeviceInfo p7) + { + kotlin.jvm.internal.s.f(p7, "device"); + this.checkPrerequisitesOrThrow(); + if (!this.gatts.containsKey(p7.getAddress())) { + android.bluetooth.BluetoothGatt v0_6 = this._connections; + do { + java.util.concurrent.ConcurrentHashMap v1_0 = v0_6.getValue(); + } while(!v0_6.compareAndSet(v1_0, q6.y.L(((java.util.Map) v1_0), new p6.g(p7.getAddress(), new qbsg.top.ble.data.BleConnectionInfo(p7, qbsg.top.ble.data.DeviceConnectionState$Connecting.INSTANCE))))); + this.gatts.put(p7.getAddress(), this.getBtAdapter().getRemoteDevice(p7.getAddress()).connectGatt(this.context, 0, this.gattCallback, 2)); + return; + } else { + return; + } + } + + public void destroy() + { + try { + this.context.unregisterReceiver(this.btStateReceiver); + } catch (Exception) { + } + java.util.Iterator v0_4 = this.gatts.keySet(); + kotlin.jvm.internal.s.e(v0_4, "(...)"); + java.util.Iterator v0_2 = q6.o.G0(((Iterable) v0_4)).iterator(); + } + + public void disconnect(String p9) + { + kotlin.jvm.internal.s.f(p9, "address"); + android.bluetooth.BluetoothGatt v0_3 = ((android.bluetooth.BluetoothGatt) this.gatts.get(p9)); + if (v0_3 != null) { + boolean v1_3; + boolean v1_2 = ((qbsg.top.ble.data.BleConnectionInfo) ((java.util.Map) this._connections.getValue()).get(p9)); + if (!v1_2) { + v1_3 = 0; + } else { + v1_3 = v1_2.getState(); + } + if (!(v1_3 instanceof qbsg.top.ble.data.DeviceConnectionState$Connecting)) { + this.userInitiatedDisconnections.add(p9); + v0_3.disconnect(); + return; + } else { + qbsg.top.ble.BleManager.cleanupDevice$default(this, p9, 0, 0, 4, 0); + return; + } + } else { + return; + } + } + + public kotlinx.coroutines.flow.StateFlow getActiveDevice() + { + return this.activeDevice; + } + + public kotlinx.coroutines.flow.StateFlow getConnections() + { + return this.connections; + } + + public kotlinx.coroutines.flow.SharedFlow getDisconnectEvents() + { + return this.disconnectEvents; + } + + public String getId() + { + return this.id; + } + + public kotlinx.coroutines.flow.SharedFlow getMessageEvents() + { + return this.messageEvents; + } + + public a8.h getOtaManager() + { + return this.otaManager; + } + + public kotlinx.coroutines.flow.SharedFlow getRawScanResults() + { + return this.rawScanResults; + } + + public kotlinx.coroutines.flow.StateFlow getScanState() + { + return this.scanState; + } + + public kotlinx.coroutines.flow.StateFlow getScannedDevices() + { + return this.scannedDevices; + } + + public kotlinx.coroutines.flow.StateFlow getTargetSessionMac() + { + return this.targetSessionMac; + } + + public kotlinx.coroutines.flow.StateFlow isBluetoothEnabled() + { + return this.isBluetoothEnabled; + } + + public qbsg.top.ble.GattOtaChannel openOtaChannel(String p3) + { + kotlin.jvm.internal.s.f(p3, "address"); + java.util.concurrent.ConcurrentHashMap v0_3 = ((android.bluetooth.BluetoothGatt) this.gatts.get(p3)); + if (v0_3 != null) { + qbsg.top.ble.BleManager$AndroidGattOtaChannel v1_1 = new qbsg.top.ble.BleManager$AndroidGattOtaChannel(this, v0_3); + this.otaChannels.put(p3, v1_1); + return v1_1; + } else { + return 0; + } + } + + public void setActiveFocus(qbsg.top.ble.data.BleDeviceInfo p3) + { + kotlin.jvm.internal.s.f(p3, "device"); + qbsg.top.ble.data.BleDeviceInfo v0_1 = ((qbsg.top.ble.data.BleConnectionInfo) ((java.util.Map) this._connections.getValue()).get(p3.getAddress())); + if ((v0_1 != null) && ((v0_1.getState() instanceof qbsg.top.ble.data.DeviceConnectionState$Connected))) { + this._targetSessionMac.setValue(p3.getAddress()); + this._activeDevice.setValue(v0_1.getDevice()); + } + return; + } + + public boolean setBluetoothEnabled(boolean p2) + { + throw new p6.f("An operation is not implemented: Not yet implemented"); + } + + public void setOtaManager(a8.h p1) + { + this.otaManager = p1; + return; + } + + public void startScan() + { + this.checkPrerequisitesOrThrow(); + int v1_1 = qbsg.top.ble.data.BleScanState.Scanning; + if (this._scanState.getValue() != v1_1) { + this._scannedDevices.setValue(q6.t.c); + this._scanState.setValue(v1_1); + android.bluetooth.le.BluetoothLeScanner v0_2 = this.getBtAdapter().getBluetoothLeScanner(); + if (v0_2 != null) { + v0_2.startScan(0, new android.bluetooth.le.ScanSettings$Builder().setScanMode(2).build(), this.scanCallback); + } + kotlinx.coroutines.BuildersKt.launch$default(this.scope, 0, 0, new qbsg.top.ble.BleManager$startScan$1(this, 0), 3, 0); + return; + } else { + return; + } + } + + public void stopScan() + { + if (this._scanState.getValue() == qbsg.top.ble.data.BleScanState.Scanning) { + try { + android.bluetooth.le.BluetoothLeScanner v0_5 = this.getBtAdapter(); + } catch (Exception) { + this._scanState.setValue(qbsg.top.ble.data.BleScanState.Idle); + return; + } + if ((v0_5 == null) || (v0_5.isEnabled() != 1)) { + this._scanState.setValue(qbsg.top.ble.data.BleScanState.Idle); + return; + } else { + android.bluetooth.le.BluetoothLeScanner v0_2 = this.getBtAdapter().getBluetoothLeScanner(); + if (v0_2 == null) { + this._scanState.setValue(qbsg.top.ble.data.BleScanState.Idle); + return; + } else { + v0_2.stopScan(this.scanCallback); + this._scanState.setValue(qbsg.top.ble.data.BleScanState.Idle); + return; + } + } + } else { + return; + } + } + + public void updateDeviceType(String p17, w7.y p18) + { + kotlin.jvm.internal.s.f(p17, "address"); + kotlinx.coroutines.flow.MutableStateFlow v2_1 = this._connections; + do { + boolean v3_1 = v2_1.getValue(); + java.util.Map v4_0 = ((java.util.Map) v3_1); + qbsg.top.ble.data.BleConnectionInfo v5_1 = ((qbsg.top.ble.data.BleConnectionInfo) v4_0.get(p17)); + if (v5_1 != null) { + int v7_4; + p6.g v6_1 = qbsg.top.ble.data.BleDeviceInfo.copy$default(v5_1.getDevice(), 0, 0, 0, 0, 0, p18, 0, 95, 0); + int v7_3 = ((qbsg.top.ble.data.BleDeviceInfo) this._activeDevice.getValue()); + if (v7_3 == 0) { + v7_4 = 0; + } else { + v7_4 = v7_3.getAddress(); + } + if (kotlin.jvm.internal.s.b(v7_4, p17)) { + this._activeDevice.setValue(v6_1); + } + v4_0 = q6.y.L(v4_0, new p6.g(p17, qbsg.top.ble.data.BleConnectionInfo.copy$default(v5_1, v6_1, 0, 2, 0))); + } + } while(!v2_1.compareAndSet(v3_1, v4_0)); + return; + } + + public void updateScreenSize(String p17, String p18) + { + kotlin.jvm.internal.s.f(p17, "address"); + String v8 = p18; + kotlin.jvm.internal.s.f(p18, "screenSize"); + kotlinx.coroutines.flow.MutableStateFlow v2_2 = this._connections; + while(true) { + Object v13 = v2_2.getValue(); + java.util.Map v14_1 = ((java.util.Map) v13); + qbsg.top.ble.data.BleConnectionInfo v15_1 = ((qbsg.top.ble.data.BleConnectionInfo) v14_1.get(p17)); + if (v15_1 != null) { + p6.g v4_4; + qbsg.top.ble.data.BleConnectionInfo v3_2 = qbsg.top.ble.data.BleDeviceInfo.copy$default(v15_1.getDevice(), 0, 0, 0, 0, v8, 0, 0, 111, 0); + p6.g v4_3 = ((qbsg.top.ble.data.BleDeviceInfo) this._activeDevice.getValue()); + if (v4_3 == null) { + v4_4 = 0; + } else { + v4_4 = v4_3.getAddress(); + } + if (kotlin.jvm.internal.s.b(v4_4, p17)) { + this._activeDevice.setValue(v3_2); + } + v14_1 = q6.y.L(v14_1, new p6.g(p17, qbsg.top.ble.data.BleConnectionInfo.copy$default(v15_1, v3_2, 0, 2, 0))); + } + if (v2_2.compareAndSet(v13, v14_1)) { + break; + } + v8 = p18; + } + return; + } + + public void updateSelectPhase(String p17, w7.x p18) + { + kotlin.jvm.internal.s.f(p17, "address"); + w7.x v10 = p18; + kotlin.jvm.internal.s.f(p18, "phase"); + kotlinx.coroutines.flow.MutableStateFlow v2_2 = this._connections; + while(true) { + Object v13 = v2_2.getValue(); + java.util.Map v14_1 = ((java.util.Map) v13); + qbsg.top.ble.data.BleConnectionInfo v15_1 = ((qbsg.top.ble.data.BleConnectionInfo) v14_1.get(p17)); + if (v15_1 != null) { + p6.g v4_4; + qbsg.top.ble.data.BleConnectionInfo v3_2 = qbsg.top.ble.data.BleDeviceInfo.copy$default(v15_1.getDevice(), 0, 0, 0, 0, 0, 0, v10, 63, 0); + p6.g v4_3 = ((qbsg.top.ble.data.BleDeviceInfo) this._activeDevice.getValue()); + if (v4_3 == null) { + v4_4 = 0; + } else { + v4_4 = v4_3.getAddress(); + } + if (kotlin.jvm.internal.s.b(v4_4, p17)) { + this._activeDevice.setValue(v3_2); + } + v14_1 = q6.y.L(v14_1, new p6.g(p17, qbsg.top.ble.data.BleConnectionInfo.copy$default(v15_1, v3_2, 0, 2, 0))); + } + if (v2_2.compareAndSet(v13, v14_1)) { + break; + } + v10 = p18; + } + return; + } +} diff --git a/analysis/apk/decomp/qbsg_top_ble_BleManagerKt.java b/analysis/apk/decomp/qbsg_top_ble_BleManagerKt.java new file mode 100644 index 0000000..bcb66ed --- /dev/null +++ b/analysis/apk/decomp/qbsg_top_ble_BleManagerKt.java @@ -0,0 +1,57 @@ +package qbsg.top.ble; +public final class BleManagerKt { + private static final java.util.UUID CCCD_UUID; + private static final java.util.UUID EPD_CHAR_UUID; + private static final java.util.UUID EPD_SERVICE_UUID; + private static final java.util.UUID FIRMWARE_REVISION_UUID; + private static final java.util.UUID MODEL_NUMBER_UUID; + private static final java.util.UUID TX_CHAR_UUID; + private static final java.util.UUID TX_SERVICE_UUID; + + static BleManagerKt() + { + qbsg.top.ble.BleManagerKt.TX_SERVICE_UUID = java.util.UUID.fromString("00001f10-0000-1000-8000-00805f9b34fb"); + qbsg.top.ble.BleManagerKt.TX_CHAR_UUID = java.util.UUID.fromString("00001f1f-0000-1000-8000-00805f9b34fb"); + qbsg.top.ble.BleManagerKt.CCCD_UUID = java.util.UUID.fromString("00002902-0000-1000-8000-00805f9b34fb"); + qbsg.top.ble.BleManagerKt.MODEL_NUMBER_UUID = java.util.UUID.fromString("00002A24-0000-1000-8000-00805f9b34fb"); + qbsg.top.ble.BleManagerKt.FIRMWARE_REVISION_UUID = java.util.UUID.fromString("00002A26-0000-1000-8000-00805f9b34fb"); + qbsg.top.ble.BleManagerKt.EPD_SERVICE_UUID = java.util.UUID.fromString("13187b10-eba9-a3ba-044e-83d3217d9a38"); + qbsg.top.ble.BleManagerKt.EPD_CHAR_UUID = java.util.UUID.fromString("4b646063-6264-f3a7-8941-e65356ea82fe"); + return; + } + + public static final synthetic java.util.UUID access$getCCCD_UUID$p() + { + return qbsg.top.ble.BleManagerKt.CCCD_UUID; + } + + public static final synthetic java.util.UUID access$getEPD_CHAR_UUID$p() + { + return qbsg.top.ble.BleManagerKt.EPD_CHAR_UUID; + } + + public static final synthetic java.util.UUID access$getEPD_SERVICE_UUID$p() + { + return qbsg.top.ble.BleManagerKt.EPD_SERVICE_UUID; + } + + public static final synthetic java.util.UUID access$getFIRMWARE_REVISION_UUID$p() + { + return qbsg.top.ble.BleManagerKt.FIRMWARE_REVISION_UUID; + } + + public static final synthetic java.util.UUID access$getMODEL_NUMBER_UUID$p() + { + return qbsg.top.ble.BleManagerKt.MODEL_NUMBER_UUID; + } + + public static final synthetic java.util.UUID access$getTX_CHAR_UUID$p() + { + return qbsg.top.ble.BleManagerKt.TX_CHAR_UUID; + } + + public static final synthetic java.util.UUID access$getTX_SERVICE_UUID$p() + { + return qbsg.top.ble.BleManagerKt.TX_SERVICE_UUID; + } +} diff --git a/analysis/apk/decomp/qbsg_top_ble_BleSession.java b/analysis/apk/decomp/qbsg_top_ble_BleSession.java new file mode 100644 index 0000000..7db27c2 --- /dev/null +++ b/analysis/apk/decomp/qbsg_top_ble_BleSession.java @@ -0,0 +1,355 @@ +package qbsg.top.ble; +public final class BleSession implements qbsg.top.ble.data.BleSessionFacade { + public static final int $stable = 8; + private final kotlinx.coroutines.flow.MutableStateFlow _epdManager; + private final kotlinx.coroutines.flow.MutableSharedFlow _logEvents; + private final String address; + private final android.bluetooth.BluetoothGattCharacteristic epdChar; + private final kotlinx.coroutines.flow.StateFlow epdManager; + private final android.bluetooth.BluetoothGatt gatt; + private final String id; + private final kotlinx.coroutines.flow.SharedFlow logEvents; + private int negotiatedMtu; + private final android.bluetooth.BluetoothGattCharacteristic rxtxChar; + private final String tag; + private final kotlinx.coroutines.sync.Mutex writeMutex; + private a7.c writeResume; + + public BleSession(android.bluetooth.BluetoothGatt p2, android.bluetooth.BluetoothGattCharacteristic p3, android.bluetooth.BluetoothGattCharacteristic p4) + { + kotlin.jvm.internal.s.f(p2, "gatt"); + kotlin.jvm.internal.s.f(p3, "rxtxChar"); + this.gatt = p2; + this.rxtxChar = p3; + this.epdChar = p4; + this.id = w7.w.i(); + int v2_2 = p2.getDevice().getAddress(); + kotlin.jvm.internal.s.e(v2_2, "getAddress(...)"); + this.address = v2_2; + this.tag = "BleSession"; + this.writeMutex = kotlinx.coroutines.sync.MutexKt.Mutex$default(0, 1, 0); + int v2_5 = kotlinx.coroutines.flow.SharedFlowKt.MutableSharedFlow$default(0, 64, 0, 5, 0); + this._logEvents = v2_5; + this.logEvents = kotlinx.coroutines.flow.FlowKt.asSharedFlow(v2_5); + int v2_7 = kotlinx.coroutines.flow.StateFlowKt.MutableStateFlow(0); + this._epdManager = v2_7; + this.epdManager = kotlinx.coroutines.flow.FlowKt.asStateFlow(v2_7); + this.negotiatedMtu = 23; + return; + } + + public synthetic BleSession(android.bluetooth.BluetoothGatt p1, android.bluetooth.BluetoothGattCharacteristic p2, android.bluetooth.BluetoothGattCharacteristic p3, int p4, kotlin.jvm.internal.j p5) + { + if ((p4 & 4) != 0) { + p3 = 0; + } + this(p1, p2, p3); + return; + } + + public static synthetic CharSequence a(byte p0) + { + return qbsg.top.ble.BleSession.sendEpdBytes$lambda$2(p0); + } + + public static final synthetic Object access$executeWrite(qbsg.top.ble.BleSession p0, android.bluetooth.BluetoothGattCharacteristic p1, byte[] p2, kotlin.coroutines.Continuation p3) + { + return p0.executeWrite(p1, p2, p3); + } + + public static final synthetic android.bluetooth.BluetoothGatt access$getGatt$p(qbsg.top.ble.BleSession p0) + { + return p0.gatt; + } + + public static final synthetic android.bluetooth.BluetoothGattCharacteristic access$getRxtxChar$p(qbsg.top.ble.BleSession p0) + { + return p0.rxtxChar; + } + + public static final synthetic String access$getTag$p(qbsg.top.ble.BleSession p0) + { + return p0.tag; + } + + public static final synthetic kotlinx.coroutines.sync.Mutex access$getWriteMutex$p(qbsg.top.ble.BleSession p0) + { + return p0.writeMutex; + } + + public static final synthetic void access$setWriteResume$p(qbsg.top.ble.BleSession p0, a7.c p1) + { + p0.writeResume = p1; + return; + } + + private final Object executeWrite(android.bluetooth.BluetoothGattCharacteristic p6, byte[] p7, kotlin.coroutines.Continuation p8) + { + int v2 = 1; + kotlinx.coroutines.CancellableContinuationImpl v0_1 = new kotlinx.coroutines.CancellableContinuationImpl(kotlin.coroutines.intrinsics.IntrinsicsKt.intercepted(p8), 1); + v0_1.initCancellability(); + qbsg.top.ble.BleSession.access$setWriteResume$p(this, new qbsg.top.ble.BleSession$executeWrite$2$1(this, v0_1)); + if (android.os.Build$VERSION.SDK_INT < 33) { + p6.setValue(p7); + v2 = qbsg.top.ble.BleSession.access$getGatt$p(this).writeCharacteristic(p6); + } else { + if (b.b.a(qbsg.top.ble.BleSession.access$getGatt$p(this), p6, p7) != 0) { + v2 = 0; + } + } + if (v2 == 0) { + qbsg.top.ble.BleSession.access$setWriteResume$p(this, 0); + v0_1.resumeWith(kotlin.coroutines.jvm.internal.Boxing.boxBoolean(0)); + } + Object v6_4 = v0_1.getResult(); + if (v6_4 == kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()) { + kotlin.coroutines.jvm.internal.DebugProbesKt.probeCoroutineSuspended(p8); + } + return v6_4; + } + + private final byte[] hexToBytes(String p6) + { + IllegalArgumentException v6_2 = i7.p.j0(p6, " ", ""); + if ((v6_2.length() % 2) != 0) { + throw new IllegalArgumentException("Failed requirement."); + } else { + String v0_2 = (v6_2.length() / 2); + byte[] v1_1 = new byte[v0_2]; + int v2 = 0; + while (v2 < v0_2) { + byte v3_0 = (v2 * 2); + byte v3_1 = v6_2.substring(v3_0, (v3_0 + 2)); + kotlin.jvm.internal.s.e(v3_1, "substring(...)"); + c7.a.l(16); + v1_1[v2] = ((byte) Integer.parseInt(v3_1, 16)); + v2++; + } + return v1_1; + } + } + + private static final CharSequence sendEpdBytes$lambda$1(byte p1) + { + return String.format("%02x", java.util.Arrays.copyOf(new Object[] {Byte.valueOf(p1)}), 1)); + } + + private static final CharSequence sendEpdBytes$lambda$2(byte p1) + { + return String.format("%02x", java.util.Arrays.copyOf(new Object[] {Byte.valueOf(p1)}), 1)); + } + + public String getAddress() + { + return this.address; + } + + public kotlinx.coroutines.flow.StateFlow getEpdManager() + { + return this.epdManager; + } + + public String getId() + { + return this.id; + } + + public kotlinx.coroutines.flow.SharedFlow getLogEvents() + { + return this.logEvents; + } + + public final int getMaxPayloadBytes() + { + int v0_1 = (this.negotiatedMtu - 3); + if (v0_1 >= 20) { + return v0_1; + } else { + return 20; + } + } + + public final int getNegotiatedMtu$composeApp_release() + { + return this.negotiatedMtu; + } + + public final void onWriteComplete$composeApp_release(boolean p3) + { + a7.c v0 = this.writeResume; + this.writeResume = 0; + if (v0 != null) { + v0.invoke(Boolean.valueOf(p3)); + } + return; + } + + public Object sendCommand(String p12, kotlin.coroutines.Continuation p13) + { + StringBuilder v0_2; + if (!(p13 instanceof qbsg.top.ble.BleSession$sendCommand$1)) { + v0_2 = new qbsg.top.ble.BleSession$sendCommand$1(this, p13); + } else { + v0_2 = ((qbsg.top.ble.BleSession$sendCommand$1) p13); + String v1_2 = ((qbsg.top.ble.BleSession$sendCommand$1) p13).label; + if ((v1_2 & -2147483648) == 0) { + } else { + ((qbsg.top.ble.BleSession$sendCommand$1) p13).label = (v1_2 - -2147483648); + } + } + Object v13_3 = v0_2.result; + String v1_1 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + int v2_0 = v0_2.label; + boolean v3_0 = 0; + if (v2_0 == 0) { + q6.y.Y(v13_3); + Object v13_4 = this.tag; + int v2_2 = new StringBuilder("\u51c6\u5907\u53d1\u9001\u547d\u4ee4: "); + v2_2.append(p12); + android.util.Log.d(v13_4, v2_2.toString()); + try { + Object v13_5 = this.hexToBytes(p12); + this._logEvents.tryEmit("->CMD ".concat(i7.p.j0(p12, " ", ""))); + int v2_5 = this.getMaxPayloadBytes(); + kotlin.jvm.internal.s.f(v13_5, ""); + qbsg.top.ble.BleSession$sendCommand$2 v5_7 = a.a.V(new f7.d(0, (v13_5.length - 1), 1), v2_5); + java.util.ArrayList v6_5 = new java.util.ArrayList(q6.p.c0(v5_7, 10)); + qbsg.top.ble.BleSession$sendCommand$2 v5_8 = v5_7.iterator(); + } catch (Object v12_7) { + Object v13_6 = this.tag; + Object v12_8 = v12_7.getMessage(); + StringBuilder v0_4 = new StringBuilder("Hex \u8f6c\u6362\u5b57\u8282\u5931\u8d25: "); + v0_4.append(v12_8); + android.util.Log.e(v13_6, v0_4.toString()); + return kotlin.coroutines.jvm.internal.Boxing.boxBoolean(0); + } + while(true) { + byte[] v8_4 = ((f7.c) v5_8); + if (!v8_4.e) { + break; + } + byte[] v8_5 = v8_4.nextInt(); + v6_5.add(q6.n.A0(v13_5, a.a.Y(v8_5, Math.min((v8_5 + v2_5), v13_5.length)))); + } + long v7_1 = j7.h.m(10, j7.d.f); + qbsg.top.ble.BleSession$sendCommand$2 v5_11 = new qbsg.top.ble.BleSession$sendCommand$2(this, v6_5, p12, 0); + v0_2.L$0 = kotlin.coroutines.jvm.internal.SpillingKt.nullOutSpilledVariable(p12); + v0_2.L$1 = kotlin.coroutines.jvm.internal.SpillingKt.nullOutSpilledVariable(v13_5); + v0_2.L$2 = kotlin.coroutines.jvm.internal.SpillingKt.nullOutSpilledVariable(v6_5); + v0_2.I$0 = v2_5; + v0_2.label = 1; + v13_3 = kotlinx.coroutines.TimeoutKt.withTimeoutOrNull-KLykuaI(v7_1, v5_11, v0_2); + if (v13_3 == v1_1) { + return v1_1; + } + } else { + if (v2_0 != 1) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + p12 = ((byte[]) v0_2.L$1); + q6.y.Y(v13_3); + } + } + Object v13_2 = ((Boolean) v13_3); + if (v13_2 != null) { + v3_0 = v13_2.booleanValue(); + } + return kotlin.coroutines.jvm.internal.Boxing.boxBoolean(v3_0); + } + + public Object sendEpdBytes(byte[] p12, kotlin.coroutines.Continuation p13) + { + qbsg.top.ble.BleSession$sendEpdBytes$1 v0_2; + if (!(p13 instanceof qbsg.top.ble.BleSession$sendEpdBytes$1)) { + v0_2 = new qbsg.top.ble.BleSession$sendEpdBytes$1(this, p13); + } else { + v0_2 = ((qbsg.top.ble.BleSession$sendEpdBytes$1) p13); + Object v1_2 = ((qbsg.top.ble.BleSession$sendEpdBytes$1) p13).label; + if ((v1_2 & -2147483648) == 0) { + } else { + ((qbsg.top.ble.BleSession$sendEpdBytes$1) p13).label = (v1_2 - -2147483648); + } + } + Object v13_4 = v0_2.result; + Object v1_1 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + String v2_0 = v0_2.label; + boolean v3_0 = 0; + if (v2_0 == null) { + q6.y.Y(v13_4); + Object v13_5 = this.epdChar; + if (v13_5 != null) { + String v2_7; + if (p12.length > 20) { + String v2_4 = q6.o.s0(q6.n.B0(p12, 12), "", 0, 0, new okio.internal.b(17), 30); + long v5_2 = p12.length; + j7.d v6_2 = new StringBuilder(); + v6_2.append(v2_4); + v6_2.append("...("); + v6_2.append(v5_2); + v6_2.append("B)"); + v2_7 = v6_2.toString(); + } else { + String v2_9 = new StringBuilder(); + v2_9.append(""); + j7.d v6_3 = p12.length; + int v7_1 = 0; + int v8_1 = 0; + while (v7_1 < v6_3) { + CharSequence v9_2 = p12[v7_1]; + v8_1++; + if (v8_1 > 1) { + v2_9.append(""); + } + v2_9.append(qbsg.top.ble.BleSession.sendEpdBytes$lambda$1(v9_2)); + v7_1++; + } + v2_9.append(""); + v2_7 = v2_9.toString(); + } + long v5_4 = this._logEvents; + j7.d v6_5 = new StringBuilder("->EPD "); + v6_5.append(v2_7); + v5_4.tryEmit(v6_5.toString()); + long v5_6 = j7.h.m(5, j7.d.f); + int v7_4 = new qbsg.top.ble.BleSession$sendEpdBytes$2(this, v13_5, p12, 0); + v0_2.L$0 = kotlin.coroutines.jvm.internal.SpillingKt.nullOutSpilledVariable(p12); + v0_2.L$1 = kotlin.coroutines.jvm.internal.SpillingKt.nullOutSpilledVariable(v13_5); + v0_2.L$2 = kotlin.coroutines.jvm.internal.SpillingKt.nullOutSpilledVariable(v2_7); + v0_2.label = 1; + v13_4 = kotlinx.coroutines.TimeoutKt.withTimeoutOrNull-KLykuaI(v5_6, v7_4, v0_2); + if (v13_4 == v1_1) { + return v1_1; + } + } else { + android.util.Log.e(this.tag, "EPD \u901a\u9053\u672a\u5c31\u7eea"); + return kotlin.coroutines.jvm.internal.Boxing.boxBoolean(0); + } + } else { + if (v2_0 != 1) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + p12 = ((android.bluetooth.BluetoothGattCharacteristic) v0_2.L$1); + q6.y.Y(v13_4); + } + } + Object v13_2 = ((Boolean) v13_4); + if (v13_2 == null) { + android.util.Log.w(this.tag, "EPD \u5199\u5165\u8d85\u65f6"); + } else { + v3_0 = v13_2.booleanValue(); + } + return kotlin.coroutines.jvm.internal.Boxing.boxBoolean(v3_0); + } + + public void setEpdManager(e8.o p2) + { + this._epdManager.setValue(p2); + return; + } + + public final void setNegotiatedMtu$composeApp_release(int p1) + { + this.negotiatedMtu = p1; + return; + } +} diff --git a/analysis/apk/decomp/qbsg_top_ble_GattOtaChannel.java b/analysis/apk/decomp/qbsg_top_ble_GattOtaChannel.java new file mode 100644 index 0000000..5757b8c --- /dev/null +++ b/analysis/apk/decomp/qbsg_top_ble_GattOtaChannel.java @@ -0,0 +1,33 @@ +package qbsg.top.ble; +public interface GattOtaChannel { + + public abstract void enableNotification(String p0, String p1); + + public abstract kotlinx.coroutines.channels.Channel getDescResult(); + + public abstract kotlinx.coroutines.channels.Channel getMtuResult(); + + public abstract kotlinx.coroutines.channels.Channel getNotifyEvents(); + + public abstract kotlinx.coroutines.channels.Channel getReadResult(); + + public abstract kotlinx.coroutines.channels.Channel getWriteResult(); + + public abstract boolean hasCharacteristic(String p0, String p1); + + public abstract boolean hasService(String p0); + + public abstract void readCharacteristic(String p0, String p1); + + public abstract void requestBalancedPriority(); + + public abstract void requestHighPriority(); + + public abstract void requestMtu(int p0); + + public abstract void setDisconnectCallback(a7.c p0); + + public abstract void writeCharacteristic(String p0, String p1, byte[] p2, boolean p3); + + public abstract void writeDescriptor(String p0, String p1, String p2, byte[] p3); +} diff --git a/analysis/apk/decomp/s0_u0.java b/analysis/apk/decomp/s0_u0.java new file mode 100644 index 0000000..3a77e0d --- /dev/null +++ b/analysis/apk/decomp/s0_u0.java @@ -0,0 +1,177 @@ +package s0; +public final synthetic class u0 implements a7.c { + public final synthetic int c; + + public synthetic u0(int p1) + { + this.c = p1; + return; + } + + public synthetic u0(int p1, y.n p2) + { + this.c = 20; + return; + } + + public final Object invoke(Object p8) + { + int v5 = 0; + switch (this.c) { + case 0: + return new a2.b(((((long) Float.floatToRawIntBits(((n.n) p8).a)) << 32) | (4294967295 & ((long) Float.floatToRawIntBits(((n.n) p8).b))))); + case 1: + return new s0.g1(((Long) p8).longValue()); + case 2: + try { + boolean v1_17 = s1.m.i; + w7.l v2_10 = v1_17.size(); + } catch (String v8_40) { + throw v8_40; + } + while (v5 < v2_10) { + ((a7.c) v1_17.get(v5)).invoke(p8); + v5++; + } + return p6.a0.a; + case 3: + p8 = s1.m.a; + return p6.a0.a; + case 4: + kotlin.jvm.internal.s.f(((d3.a0) p8), "$this$semantics"); + d3.y.k(((d3.a0) p8), -1082130432); + return p6.a0.a; + case 5: + kotlin.jvm.internal.s.f(((b2.i0) p8), "$this$graphicsLayer"); + ((b2.i0) p8).d(0); + return p6.a0.a; + case 6: + ((Integer) p8).getClass(); + return p6.a0.a; + case 7: + return ((w.j2) p8).l; + case 8: + return ((w.j2) p8).c; + case 9: + return ((w.j2) p8).e; + case 10: + kotlin.jvm.internal.s.f(((String) p8), "it"); + qbsg.top.activation.ActivationManager v0_19 = w7.a.h; + if (v0_19 == null) { + kotlin.jvm.internal.s.l("instance"); + throw 0; + } else { + s8.d0.a(((s8.d0) v0_19.g.getValue()), ((String) p8)); + return p6.a0.a; + } + case 11: + a7.c v3_11; + String v8_18 = ((Boolean) p8).booleanValue(); + qbsg.top.activation.ActivationManager v0_17 = new s0.u0(13); + if (v8_18 == null) { + v3_11 = new z7.b0(w7.m.a, new qbsg.top.ble.BleManager(w7.w.g()), new qbsg.top.ble.AndroidRawGattConnector(w7.w.g()), v0_17); + } else { + String v8_20 = w7.m.a; + kotlin.jvm.internal.s.f(v8_20, "scope"); + v3_11 = new z7.b0(v8_20, new qbsg.top.ble.SimulatedBleManager(), new qbsg.top.ble.SimulatedRawGattConnector(), v0_17); + } + return v3_11; + case 12: + kotlin.jvm.internal.s.f(((qbsg.top.ble.BleManagerFacade) p8), "b"); + return new a8.g(w7.m.a, ((qbsg.top.ble.BleManagerFacade) p8)); + case 13: + kotlin.jvm.internal.s.f(((String) p8), "it"); + qbsg.top.activation.ActivationManager v0_8 = w7.a.h; + if (v0_8 == null) { + kotlin.jvm.internal.s.l("instance"); + throw 0; + } else { + boolean v1_8 = ((Boolean) ((kotlinx.coroutines.flow.StateFlow) v0_8.b.d).getValue()).booleanValue(); + if (v0_8.d.k.getValue() == w7.l.d) { + v5 = 1; + } + if ((!v1_8) || (v5 == 0)) { + String v8_13 = ""; + } else { + v8_13 = i7.i.S0(qbsg.top.activation.ActivationManager.a.nativeDecryptSegment(((String) p8))).toString(); + } + return v8_13; + } + case 14: + kotlin.jvm.internal.s.f(((String) p8), "url"); + u0.a.n(); + w7.l v2_1 = w7.w.g(); + try { + a7.c v3_5 = new android.content.Intent("android.intent.action.VIEW", android.net.Uri.parse(((String) p8))); + v3_5.addCategory("android.intent.category.BROWSABLE"); + v3_5.addFlags(268435456); + v2_1.startActivity(v3_5); + } catch (Exception) { + a7.c v3_8 = new android.content.Intent("android.intent.action.VIEW", android.net.Uri.parse(((String) p8))); + v3_8.addFlags(268435456); + v2_1.startActivity(v3_8); + } + return p6.a0.a; + case 15: + kotlin.jvm.internal.s.f(((t4.b) p8), "$this$viewModel"); + qbsg.top.activation.ActivationManager v0_2 = w7.a.h; + if (v0_2 == null) { + kotlin.jvm.internal.s.l("instance"); + throw 0; + } else { + return new n8.i0(v0_2.e); + } + case 16: + kotlin.jvm.internal.s.f(((z8.c0) p8), "link"); + w7.l v2_14 = w7.w.g(); + try { + a7.c v3_0 = new android.content.Intent("android.intent.action.VIEW", android.net.Uri.parse(((z8.c0) p8).d)); + v3_0.addCategory("android.intent.category.BROWSABLE"); + v3_0.addFlags(268435456); + v2_14.startActivity(v3_0); + } catch (Exception) { + a7.c v3_2 = new android.content.Intent("android.intent.action.VIEW", android.net.Uri.parse(((z8.c0) p8).e)); + v3_2.addFlags(268435456); + v2_14.startActivity(v3_2); + } + return p6.a0.a; + case 17: + return p6.a0.a; + case 18: + ((Integer) p8).getClass(); + return 0; + case 19: + return new y.t(((Number) ((java.util.List) p8).get(0)).intValue(), ((Number) ((java.util.List) p8).get(1)).intValue()); + case 20: + return p6.a0.a; + case 21: + p8 = y0.t.a; + return p6.a0.a; + case 22: + ((v2.k0) p8).h(y0.w.f, ((float) ((int) (((v2.k0) p8).c().o0() >> 32)))); + ((v2.k0) p8).h(y0.w.e, 0); + return p6.a0.a; + case 23: + d3.y.g(((d3.a0) p8), 0); + return p6.a0.a; + case 24: + d3.y.g(((d3.a0) p8), 1); + return p6.a0.a; + case 25: + p8 = y0.t1.a; + return p6.a0.a; + case 26: + ((d3.a0) p8).a(d3.w.m, Boolean.TRUE); + return p6.a0.a; + case 27: + ((Integer) p8).intValue(); + return ((Integer) p8); + case 28: + ((d3.a0) p8).a(d3.w.v, new d3.l(new w7.h(10), new w7.h(10))); + return p6.a0.a; + default: + p8 = y0.e3.a; + return p6.a0.a; + } + } +} diff --git a/analysis/apk/decomp/w7_w.java b/analysis/apk/decomp/w7_w.java new file mode 100644 index 0000000..48d83fe --- /dev/null +++ b/analysis/apk/decomp/w7_w.java @@ -0,0 +1,712 @@ +package w7; +public abstract class w { + public static final o1.f a; + + static w() + { + w7.w.a = new o1.f(443304602, 0, new s8.l(8)); + return; + } + + public static final void a(int p51, e1.n0 p52) + { + int v2_83; + p52.b0(947805020); + if (p51 == 0) { + v2_83 = 0; + } else { + v2_83 = 1; + } + if (!p52.R((p51 & 1), v2_83)) { + p52.U(); + } else { + w7.g v8_0 = e1.t.e(w7.w.f().d.k, p52); + e1.j1 v25 = e1.t.e(((kotlinx.coroutines.flow.StateFlow) w7.w.f().b.d), p52); + e1.j1 v27 = e1.t.e(w7.w.f().d.p, p52); + e1.j1 v28 = e1.t.e(w7.w.f().c.e, p52); + e1.j1 v41 = e1.t.e(w7.w.f().c.i, p52); + e1.j1 v42 = e1.t.e(w7.w.f().c.g, p52); + e1.j1 v29 = e1.t.e(w7.w.f().c.k, p52); + int v2_68 = new Object[0]; + w7.a0 v3_67 = p52.O(); + e1.j1 v9_0 = e1.n.a; + if (v3_67 == v9_0) { + v3_67 = new r4.d(22); + p52.k0(v3_67); + } + e1.j1 v21_1 = ((e1.j1) r1.k.c(v2_68, ((a7.a) v3_67), p52, 48)); + int v2_84 = new Object[0]; + w7.a0 v3_99 = p52.O(); + if (v3_99 == v9_0) { + v3_99 = new r4.d(28); + p52.k0(v3_99); + } + e1.j1 v19_1 = ((e1.j1) r1.k.c(v2_84, ((a7.a) v3_99), p52, 48)); + int v2_89 = new Object[0]; + w7.a0 v3_114 = p52.O(); + if (v3_114 == v9_0) { + v3_114 = new r4.d(29); + p52.k0(v3_114); + } + e1.j1 v20_1 = ((e1.j1) r1.k.c(v2_89, ((a7.a) v3_114), p52, 48)); + int v2_91 = new Object[0]; + w7.a0 v3_0 = p52.O(); + if (v3_0 == v9_0) { + v3_0 = new w7.h(0); + p52.k0(v3_0); + } + e1.j1 v13_1 = ((e1.j1) r1.k.c(v2_91, ((a7.a) v3_0), p52, 48)); + int v2_2 = new Object[0]; + w7.a0 v3_3 = p52.O(); + if (v3_3 == v9_0) { + v3_3 = new w7.h(1); + p52.k0(v3_3); + } + e1.j1 v17_1 = ((e1.j1) r1.k.c(v2_2, ((a7.a) v3_3), p52, 48)); + int v2_4 = new Object[0]; + w7.a0 v3_6 = p52.O(); + if (v3_6 == v9_0) { + v3_6 = new w7.h(2); + p52.k0(v3_6); + } + int v2_8; + int v10_1 = ((e1.j1) r1.k.c(v2_4, ((a7.a) v3_6), p52, 48)); + int v11_0 = w7.w.f().d.i; + if (v11_0 == 0) { + v2_8 = 0; + } else { + v2_8 = v11_0.getConnections(); + } + if (v2_8 != 0) { + p52.a0(307590415); + } else { + p52.a0(945408637); + int v2_11 = p52.O(); + if (v2_11 == v9_0) { + v2_11 = kotlinx.coroutines.flow.StateFlowKt.MutableStateFlow(q6.u.c); + p52.k0(v2_11); + } + v2_8 = ((kotlinx.coroutines.flow.MutableStateFlow) v2_11); + } + w7.a0 v3_10; + p52.q(0); + int v2_14 = e1.t.e(v2_8, p52); + if (v11_0 == 0) { + v3_10 = 0; + } else { + v3_10 = v11_0.getActiveDevice(); + } + if (v3_10 != null) { + p52.a0(307594508); + } else { + p52.a0(945536481); + w7.a0 v3_12 = p52.O(); + if (v3_12 == v9_0) { + v3_12 = kotlinx.coroutines.flow.StateFlowKt.MutableStateFlow(0); + p52.k0(v3_12); + } + v3_10 = ((kotlinx.coroutines.flow.MutableStateFlow) v3_12); + } + w7.a0 v3_13; + p52.q(0); + e1.j1 v38 = e1.t.e(v3_10, p52); + if (v11_0 == 0) { + v3_13 = 0; + } else { + v3_13 = v11_0.getTargetSessionMac(); + } + if (v3_13 != null) { + p52.a0(307599383); + } else { + p52.a0(945691450); + w7.a0 v3_15 = p52.O(); + if (v3_15 == v9_0) { + v3_15 = kotlinx.coroutines.flow.StateFlowKt.MutableStateFlow(0); + p52.k0(v3_15); + } + v3_13 = ((kotlinx.coroutines.flow.MutableStateFlow) v3_15); + } + p52.q(0); + w7.a0 v3_16 = e1.t.e(v3_13, p52); + a7.e v4_2 = w7.a.h; + if (v4_2 == null) { + kotlin.jvm.internal.s.l("instance"); + throw 0; + } else { + int v36; + e1.j1 v37 = e1.t.e(v4_2.d.r, p52); + w7.a0 v3_18 = ((String) v3_16.getValue()); + if (v3_18 == null) { + v36 = 0; + } else { + v36 = ((qbsg.top.ble.data.BleConnectionInfo) ((java.util.Map) v2_14.getValue()).get(v3_18)); + } + java.util.Iterator v35; + w7.a0 v3_24 = ((Iterable) ((java.util.Map) v2_14.getValue()).values()); + if ((!(v3_24 instanceof java.util.Collection)) || (!((java.util.Collection) v3_24).isEmpty())) { + w7.a0 v3_25 = v3_24.iterator(); + while (v3_25.hasNext()) { + if ((((qbsg.top.ble.data.BleConnectionInfo) v3_25.next()).getState() instanceof qbsg.top.ble.data.DeviceConnectionState$Connecting)) { + v35 = 1; + } + } + v35 = 0; + } + int v24; + o1.f v1_4 = ((Iterable) ((java.util.Map) v2_14.getValue()).values()); + if ((!(v1_4 instanceof java.util.Collection)) || (!((java.util.Collection) v1_4).isEmpty())) { + o1.f v1_5 = v1_4.iterator(); + int v2_24 = 0; + while (v1_5.hasNext()) { + if ((((qbsg.top.ble.data.BleConnectionInfo) v1_5.next()).getState() instanceof qbsg.top.ble.data.DeviceConnectionState$Connected)) { + v2_24++; + if (v2_24 < 0) { + throw new ArithmeticException("Count overflow has happened."); + } + } + o1.f v1_75 = p52.t(); + if (v1_75 != null) { + v1_75.d = new s8.l(p51, 7); + } + return; + } + v24 = v2_24; + } else { + v24 = 0; + } + o1.f v1_7 = p52.O(); + if (v1_7 == v9_0) { + v1_7 = new a9.b(17); + p52.k0(v1_7); + } + o1.f v1_9 = ((a7.c) v1_7); + int v2_28 = u4.a.a(p52); + if (v2_28 == 0) { + throw new IllegalStateException("No ViewModelStoreOwner was provided via LocalViewModelStoreOwner"); + } else { + w7.a0 v3_34; + a7.e v4_16 = kotlin.jvm.internal.g0.a(b9.m0); + a7.e v5_4 = new l.b(1); + v5_4.a(kotlin.jvm.internal.g0.a(b9.m0), v1_9); + o1.f v1_10 = v5_4.b(); + if (!(v2_28 instanceof androidx.lifecycle.k)) { + v3_34 = t4.a.b; + } else { + v3_34 = ((b.l) ((androidx.lifecycle.k) v2_28)).e(); + } + b9.w v12_3 = ((b9.m0) u2.b.q(v4_16, v2_28, 0, v1_10, v3_34, p52)); + o1.f v1_13 = w7.a.h; + if (v1_13 == null) { + kotlin.jvm.internal.s.l("instance"); + throw 0; + } else { + o1.f v1_17 = e1.t.e(((kotlinx.coroutines.flow.StateFlow) v1_13.f.d), p52); + int v2_33 = p52.g(((java.util.List) v1_17.getValue())); + w7.a0 v3_39 = p52.O(); + if ((v2_33 != 0) || (v3_39 == v9_0)) { + o1.f v1_19 = ((java.util.List) v1_17.getValue()); + kotlin.jvm.internal.s.f(v1_19, "projects"); + int v2_37 = new java.util.ArrayList(); + o1.f v1_20 = v1_19.iterator(); + while (v1_20.hasNext()) { + w7.a0 v3_113; + w7.a0 v3_111 = ((m8.c) v1_20.next()).b; + if (i7.p.l0(v3_111, "\u672a\u547d\u540d\u9879\u76ee", 0)) { + w7.a0 v3_112 = i7.i.D0(v3_111, "\u672a\u547d\u540d\u9879\u76ee"); + if (i7.i.x0(v3_112)) { + v3_113 = 0; + } else { + a7.e v4_41 = 0; + while (v4_41 < v3_112.length()) { + if (Character.isDigit(v3_112.charAt(v4_41))) { + v4_41++; + } + } + v3_113 = i7.p.n0(v3_112); + } + } + if (v3_113 != null) { + v2_37.add(v3_113); + } + } + o1.f v1_23; + o1.f v1_22 = ((Long) q6.o.v0(v2_37)); + if (v1_22 == null) { + v1_23 = 0; + } else { + v1_23 = v1_22.longValue(); + } + o1.f v1_24 = (v1_23 + 1); + w7.a0 v3_42 = new StringBuilder("\u672a\u547d\u540d\u9879\u76ee"); + v3_42.append(v1_24); + v3_39 = v3_42.toString(); + p52.k0(v3_39); + } + long v18_1 = ((String) v3_39); + o1.f v1_25 = p52.i(v12_3); + int v2_39 = p52.O(); + if ((v1_25 != null) || (v2_39 == v9_0)) { + v2_39 = new m0.r(26, v12_3); + p52.k0(v2_39); + } + m8.f v7_2; + e1.j1 v22_1 = q8.k.p(((a7.e) v2_39), p52); + if (v11_0 != 0) { + p52.a0(946592000); + o1.f v1_28 = v11_0.getId(); + int v2_42 = v12_3.b; + w7.a0 v3_44 = new StringBuilder(); + v3_44.append(v1_28); + v3_44.append(":"); + v3_44.append(v2_42); + w7.a0 v3_45 = v3_44.toString(); + o1.f v1_32 = (p52.i(v11_0) | p52.i(v12_3)); + int v2_45 = p52.O(); + if ((v1_32 != null) || (v2_45 == v9_0)) { + v2_45 = new n.n1(29, v11_0, v12_3); + p52.k0(v2_45); + } + int v2_48 = ((a7.c) v2_45); + o1.f v1_34 = u4.a.a(p52); + if (v1_34 == null) { + throw new IllegalStateException("No ViewModelStoreOwner was provided via LocalViewModelStoreOwner"); + } else { + int v2_51; + a7.e v5_6 = kotlin.jvm.internal.g0.a(b9.w); + int v26_0 = v3_45; + m8.f v7_1 = new l.b(1); + v7_1.a(kotlin.jvm.internal.g0.a(b9.w), v2_48); + a7.e v4_20 = v7_1.b(); + if (!(v1_34 instanceof androidx.lifecycle.k)) { + v2_51 = t4.a.b; + } else { + v2_51 = ((b.l) ((androidx.lifecycle.k) v1_34)).e(); + } + o1.f v1_37 = ((b9.w) u2.b.q(v5_6, v1_34, v26_0, v4_20, v2_51, p52)); + p52.q(0); + v7_2 = v1_37; + } + } else { + p52.a0(946591999); + p52.q(0); + v7_2 = 0; + } + o1.f v1_44; + m8.f v45_1 = ((m8.f) q6.o.u0(((java.util.List) e1.t.e(v12_3.f, p52).getValue()))); + if (v7_2 == null) { + v1_44 = 0; + } else { + v1_44 = v7_2.l; + } + int v2_59; + if (v1_44 != null) { + v2_59 = 0; + p52.a0(307640928); + } else { + p52.a0(946978384); + o1.f v1_46 = p52.O(); + if (v1_46 == v9_0) { + v1_46 = kotlinx.coroutines.flow.StateFlowKt.MutableStateFlow(0); + p52.k0(v1_46); + } + v1_44 = ((kotlinx.coroutines.flow.MutableStateFlow) v1_46); + v2_59 = 0; + } + o1.f v1_48; + p52.q(v2_59); + e1.j1 v40 = e1.t.e(v1_44, p52); + int v26_1 = e1.t.e(v12_3.d, p52); + if (v11_0 == 0) { + v1_48 = 0; + } else { + v1_48 = v11_0.getOtaManager(); + } + o1.f v1_49; + if (v1_48 == null) { + v1_49 = 0; + } else { + v1_49 = ((a8.g) v1_48).f; + } + int v2_61; + if (v1_49 != null) { + v2_61 = 0; + p52.a0(307649811); + } else { + p52.a0(947245108); + o1.f v1_52 = p52.O(); + if (v1_52 == v9_0) { + v1_52 = kotlinx.coroutines.flow.StateFlowKt.MutableStateFlow(0); + p52.k0(v1_52); + } + v1_49 = ((kotlinx.coroutines.flow.MutableStateFlow) v1_52); + v2_61 = 0; + } + p52.q(v2_61); + b9.l v30_0 = e1.t.e(v1_49, p52); + o1.f v1_53 = p52.O(); + if (v1_53 == v9_0) { + v1_53 = new b9.n0(); + p52.k0(v1_53); + } + b9.n0 v32_1 = ((b9.n0) v1_53); + o1.f v1_55 = p52.O(); + if (v1_55 == v9_0) { + v1_55 = new a9.b(16); + p52.k0(v1_55); + } + o1.f v1_57 = ((a7.c) v1_55); + int v2_65 = u4.a.a(p52); + if (v2_65 == 0) { + throw new IllegalStateException("No ViewModelStoreOwner was provided via LocalViewModelStoreOwner"); + } else { + w7.a0 v3_56; + a7.e v4_21 = kotlin.jvm.internal.g0.a(b9.m); + a7.e v5_9 = new l.b(1); + v5_9.a(kotlin.jvm.internal.g0.a(b9.m), v1_57); + o1.f v1_58 = v5_9.b(); + if (!(v2_65 instanceof androidx.lifecycle.k)) { + v3_56 = t4.a.b; + } else { + v3_56 = ((b.l) ((androidx.lifecycle.k) v2_65)).e(); + } + e1.j1 v31_2 = v7_2; + m8.f v7_4 = v45_1; + o1.f v1_61 = ((b9.m) u2.b.q(v4_21, v2_65, 0, v1_58, v3_56, p52)); + int v2_69 = (p52.i(v11_0) | p52.i(v12_3)); + w7.a0 v3_62 = p52.O(); + if ((v2_69 != 0) || (v3_62 == v9_0)) { + v3_62 = new o8.s3(15, v11_0, v12_3); + p52.k0(v3_62); + } + v1_61.c = ((a7.e) v3_62); + int v2_71 = p52.i(v1_61); + w7.a0 v3_65 = p52.O(); + if ((v2_71 != 0) || (v3_65 == v9_0)) { + v3_65 = new w7.c(v1_61, 0); + p52.k0(v3_65); + } + a7.a v33 = q8.k.m(((a7.e) v3_65), p52, 0); + int v2_74 = w7.a.h; + if (v2_74 == 0) { + kotlin.jvm.internal.s.l("instance"); + throw 0; + } else { + e1.j1 v34_1; + o1.f v1_72; + int v2_76 = v2_74.d.l; + w7.a0 v3_70 = ((w7.l) v8_0.getValue()); + kotlin.jvm.internal.s.f(v3_70, "appMode"); + p52.a0(495211714); + m8.f v14_1 = w7.l.d; + if ((v3_70 == v14_1) && (v2_76 != 0)) { + w7.a0 v3_73 = ((z7.b0) v2_76).d; + a7.e v4_25 = p52.i(v2_76); + a7.e v5_11 = p52.O(); + if ((v4_25 != null) || (v5_11 == v9_0)) { + v5_11 = new b9.o0(v2_76, 0); + p52.k0(v5_11); + } + a7.e v5_13 = ((a7.c) v5_11); + int v2_77 = u4.a.a(p52); + if (v2_77 == 0) { + throw new IllegalStateException("No ViewModelStoreOwner was provided via LocalViewModelStoreOwner"); + } else { + o1.f v1_66; + b9.m0 v15_1 = v1_61; + qbsg.top.ble.BleManagerFacade v39_0 = v3_73; + o1.f v1_64 = new l.b(1); + v1_64.a(kotlin.jvm.internal.g0.a(b9.l), v5_13); + a7.e v4_29 = v1_64.b(); + if (!(v2_77 instanceof androidx.lifecycle.k)) { + v1_66 = t4.a.b; + } else { + v1_66 = ((b.l) ((androidx.lifecycle.k) v2_77)).e(); + } + v34_1 = v15_1; + v1_72 = ((b9.l) u2.b.q(kotlin.jvm.internal.g0.a(b9.l), v2_77, v39_0, v4_29, v1_66, p52)); + p52.q(0); + } + } else { + v34_1 = v1_61; + p52.q(0); + v1_72 = 0; + } + int v2_80 = p52.O(); + if (v2_80 == v9_0) { + v2_80 = e1.t.n(0); + p52.k0(v2_80); + } + int v2_81 = ((e1.j1) v2_80); + w7.a0 v3_79 = p52.i(v1_72); + a7.e v4_31 = p52.O(); + if ((v3_79 != null) || (v4_31 == v9_0)) { + v4_31 = new o8.f0(17, v1_72, v2_81); + p52.k0(v4_31); + } + e1.h0.f(((a7.a) v4_31), p52); + w7.a0 v3_82 = ((w7.l) v8_0.getValue()); + a7.e v4_35 = (p52.g(v8_0) | p52.g(v10_1)); + a7.e v5_16 = p52.O(); + if ((v4_35 != null) || (v5_16 == v9_0)) { + v5_16 = new w7.i(v8_0, v10_1, 0, 0); + p52.k0(v5_16); + } + int v44; + w7.a0 v3_100; + e1.h0.c(((a7.e) v5_16), p52, v3_82); + if (((a8.j) v30_0.getValue()) == null) { + if (v7_4 == null) { + if (!((Boolean) v20_1.getValue()).booleanValue()) { + if (!((Boolean) v19_1.getValue()).booleanValue()) { + if ((!((Boolean) v10_1.getValue()).booleanValue()) && (((w7.l) v8_0.getValue()) != v14_1)) { + if (!((Boolean) v26_1.getValue()).booleanValue()) { + v44 = 0; + } else { + v3_100 = w7.a0.g; + v44 = v3_100; + } + } else { + v3_100 = w7.a0.c; + } + } else { + v3_100 = w7.a0.d; + } + } else { + v3_100 = w7.a0.e; + } + } else { + v3_100 = w7.a0.f; + } + } else { + v3_100 = w7.a0.h; + } + w7.a0 v3_101 = p52.O(); + if (v3_101 == v9_0) { + v3_101 = e1.t.n(v44); + p52.k0(v3_101); + } + e1.j1 v46_1 = ((e1.j1) v3_101); + w7.a0 v3_102 = p52.O(); + if (v3_102 == v9_0) { + v3_102 = e1.t.n(v7_4); + p52.k0(v3_102); + } + w7.a0 v3_104; + e1.j1 v47_1 = ((e1.j1) v3_102); + if (v44 != 0) { + v3_104 = v44.ordinal(); + } else { + v3_104 = -1; + } + m8.f v14_2; + int v26_2; + int v10_2; + w7.a0 v3_106 = (p52.e(v3_104) | p52.g(v7_4)); + a7.e v4_38 = p52.O(); + if ((v3_106 == null) && (v4_38 != v9_0)) { + v14_2 = v7_4; + v26_2 = v10_1; + v10_2 = v44; + } else { + m8.f v45_2 = v7_4; + v26_2 = v10_1; + v4_38 = new h0.z(v44, v45_2, v46_1, v47_1, 0, 3); + v10_2 = v44; + v14_2 = v45_2; + p52.k0(v4_38); + } + e1.h0.d(v10_2, v14_2, ((a7.e) v4_38), p52); + q8.k.a(o1.l.d(-1446439417, new w7.g(v30_0, v10_2, v34_1, v31_2, v13_1, v14_2, v12_3, v18_1, v17_1, v22_1, v19_1, v20_1, v21_1, v46_1, v2_81, v24, v25, v26_2, v27, v28, v29, v1_72, v8_0, v32_1, v33, v47_1, v35, v36, v37, v38, v11_0, v40, v41, v42), p52), p52, 6); + } + } + } + } + } + } + } + + public static final String b(String p2) + { + return i7.p.j0(i7.p.j0(i7.p.j0(i7.p.j0(p2, "\\\"", "\""), "\\\\", "\\"), "\\n", "\n"), "\\r", "\r"); + } + + public static final int c(String p10, int p11, char p12, char p13) + { + int v0 = p10.length(); + int v2_1 = p11; + int v3 = 0; + int v4 = 0; + int v5 = 0; + while (v2_1 < v0) { + char v7 = p10.charAt(v2_1); + if (v3 == 0) { + if ((v7 != 92) || (v4 == 0)) { + if (v7 != 34) { + if (v4 == 0) { + if (v7 != p12) { + if (v7 == p13) { + v5--; + if (v5 == 0) { + String v10_1 = p10.substring(p11, (v2_1 + 1)); + kotlin.jvm.internal.s.e(v10_1, "substring(...)"); + return (i7.i.s0(v10_1) + p11); + } + } + } else { + v5++; + } + } + } else { + v4 ^= 1; + } + } else { + v3 = 1; + } + } else { + v3 = 0; + } + v2_1++; + } + v10_1 = p10.substring(p11); + kotlin.jvm.internal.s.e(v10_1, "substring(...)"); + return (i7.i.s0(v10_1) + p11); + } + + public static final int d(int p5, String p6) + { + int v5_1 = (p5 + 1); + int v2 = 0; + while (v5_1 < p6.length()) { + char v3_0 = p6.charAt(v5_1); + if (v2 == 0) { + if (v3_0 != 92) { + if (v3_0 == 34) { + return v5_1; + } + } else { + v2 = 1; + } + } else { + v2 = 0; + } + v5_1++; + } + return i7.i.s0(p6); + } + + public static final varargs String e(p6.g[] p7) + { + StringBuilder v0_1 = new StringBuilder("{"); + int v1_1 = p7.length; + int v2 = 0; + String v3_10 = 0; + while (v2 < v1_1) { + String v4_0 = p7[v2]; + int v5 = (v3_10 + 1); + String v6_1 = ((String) v4_0.c); + String v4_1 = v4_0.d; + if (v3_10 > null) { + v0_1.append(44); + } + String v3_8; + v0_1.append(34); + v0_1.append(w7.w.h(v6_1)); + v0_1.append("\":"); + if (v4_1 != null) { + if (!(v4_1 instanceof Boolean)) { + if (!(v4_1 instanceof Number)) { + v3_8 = p.p1.k("\"", w7.w.h(v4_1.toString()), "\""); + } else { + v3_8 = ((Number) v4_1).toString(); + } + } else { + v3_8 = String.valueOf(((Boolean) v4_1).booleanValue()); + } + } else { + v3_8 = "null"; + } + v0_1.append(v3_8); + v2++; + v3_10 = v5; + } + v0_1.append(125); + return v0_1.toString(); + } + + public static w7.a f() + { + int v0_0 = w7.a.h; + if (v0_0 == 0) { + kotlin.jvm.internal.s.l("instance"); + throw 0; + } else { + return v0_0; + } + } + + public static qbsg.top.MainApp g() + { + int v0_0 = qbsg.top.MainApp.c; + if (v0_0 == 0) { + kotlin.jvm.internal.s.l("instance"); + throw 0; + } else { + return v0_0; + } + } + + public static final String h(String p2) + { + return i7.p.j0(i7.p.j0(i7.p.j0(i7.p.j0(p2, "\\", "\\\\"), "\"", "\\\""), "\n", "\\n"), "\r", "\\r"); + } + + public static final String i() + { + String v0_1 = java.util.UUID.randomUUID().toString(); + kotlin.jvm.internal.s.e(v0_1, "toString(...)"); + return v0_1; + } + + public static final String j(float p2) + { + String v2_5 = ((int) ((float) Math.rint(((double) (p2 * 1092616192))))); + String v0_4 = (v2_5 / 10); + String v2_2 = Math.abs((v2_5 % 10)); + StringBuilder v1_1 = new StringBuilder(); + v1_1.append(v0_4); + v1_1.append("."); + v1_1.append(v2_2); + return v1_1.toString(); + } + + public static final n4.q k(String p2) + { + kotlin.jvm.internal.s.f(p2, "s"); + return new n4.q(p2, 1); + } + + public static final String l(String p5) + { + kotlin.jvm.internal.s.f(p5, "s"); + StringBuilder v0_2 = new StringBuilder(); + String v5_2 = i7.p.d0(p5); + int v1 = v5_2.length; + int v2 = 0; + while (v2 < v1) { + String v3_1 = (v5_2[v2] & 255); + if (((48 > v3_1) || (v3_1 >= 58)) && (((65 > v3_1) || (v3_1 >= 91)) && (((97 > v3_1) || (v3_1 >= 123)) && ((v3_1 != 45) && ((v3_1 != 95) && ((v3_1 != 46) && (v3_1 != 126))))))) { + v0_2.append(37); + c7.a.l(16); + String v3_2 = Integer.toString(v3_1, 16); + kotlin.jvm.internal.s.e(v3_2, "toString(...)"); + String v3_3 = v3_2.toUpperCase(java.util.Locale.ROOT); + kotlin.jvm.internal.s.e(v3_3, "toUpperCase(...)"); + v0_2.append(i7.i.B0(2, v3_3)); + } else { + v0_2.append(((char) v3_1)); + } + v2++; + } + return v0_2.toString(); + } +} diff --git a/analysis/apk/decomp/y7_a.java b/analysis/apk/decomp/y7_a.java new file mode 100644 index 0000000..e29ea1a --- /dev/null +++ b/analysis/apk/decomp/y7_a.java @@ -0,0 +1,111 @@ +package y7; +public final class a { + public final kotlinx.coroutines.flow.MutableStateFlow a; + public final kotlinx.coroutines.flow.StateFlow b; + public final kotlinx.coroutines.flow.MutableStateFlow c; + public final kotlinx.coroutines.flow.StateFlow d; + + public a(String p2) + { + kotlin.jvm.internal.s.f(p2, "deviceId"); + w7.w.i(); + kotlinx.coroutines.flow.StateFlow v2_5 = kotlinx.coroutines.flow.StateFlowKt.MutableStateFlow(0); + this.a = v2_5; + this.b = kotlinx.coroutines.flow.FlowKt.asStateFlow(v2_5); + kotlinx.coroutines.flow.StateFlow v2_2 = kotlinx.coroutines.flow.StateFlowKt.MutableStateFlow(Boolean.FALSE); + this.c = v2_2; + this.d = kotlinx.coroutines.flow.FlowKt.asStateFlow(v2_2); + return; + } + + public final void a(String p23, boolean p24) + { + kotlin.jvm.internal.s.f(p23, "code"); + String v0_1 = w7.a.h; + if (v0_1 == null) { + kotlin.jvm.internal.s.l("instance"); + throw 0; + } else { + kotlinx.coroutines.flow.MutableStateFlow v21; + y7.a v1_0 = v0_1.b; + boolean v18 = qbsg.top.activation.ActivationManager.a.nativeActivate(p23); + if (!v18) { + v21 = v0_1; + } else { + kotlinx.coroutines.flow.MutableStateFlow v2_2 = ((a0.m2) v1_0.b); + ((a6.a) v2_2.d).D("activation_code", p23); + kotlinx.coroutines.flow.MutableStateFlow v2_4 = ((kotlinx.coroutines.flow.MutableStateFlow) v2_2.e); + y7.a v19 = v1_0; + v21 = v0_1; + v2_4.setValue(l8.a.a(((l8.a) v2_4.getValue()), 0, 0, 0, 0, 0, p23, 0, 0, 0, 0, 0, 0, 0, 0, 32703)); + ((kotlinx.coroutines.flow.MutableStateFlow) v19.c).setValue(Boolean.TRUE); + } + if (v18) { + v21.d.e(); + } + if (v18) { + return; + } else { + String v0_10; + if (!p24) { + String v0_9 = new Object[0]; + v0_10 = h8.c.b("\u6fc0\u6d3b\u7801\u65e0\u6548\u6216\u4e0d\u5c5e\u4e8e\u672c\u8bbe\u5907", v0_9); + } else { + String v0_11 = new Object[0]; + v0_10 = h8.c.b("\u4e8c\u7ef4\u7801\u4e0d\u5c5e\u4e8e\u672c\u8bbe\u5907", v0_11); + } + this.a.setValue(v0_10); + return; + } + } + } + + public final void b(byte[] p11) + { + int v1_0 = this.a; + int v2_0 = 0; + if ((p11 != null) && (p11.length >= 71)) { + if (kotlin.jvm.internal.s.b(q6.o.s0(q6.n.B0(p11, 4), "", 0, 0, new y0.w2(24), 30), "qbsg")) { + IllegalArgumentException v0_2 = (p11.length - 4); + if (v0_2 >= null) { + v2_0 = v0_2; + } + if (v2_0 < 0) { + throw new IllegalArgumentException(a1.a.k("Requested element count ", v2_0, " is less than zero.").toString()); + } else { + java.util.ArrayList v11_4; + if (v2_0 != 0) { + int v1_1 = p11.length; + if (v2_0 < v1_1) { + if (v2_0 != 1) { + java.util.ArrayList v3_2 = new java.util.ArrayList(v2_0); + int v2_1 = (v1_1 - v2_0); + while (v2_1 < v1_1) { + v3_2.add(Byte.valueOf(p11[v2_1])); + v2_1++; + } + v11_4 = v3_2; + } else { + v11_4 = k3.t.K(Byte.valueOf(p11[(v1_1 - 1)])); + } + } else { + v11_4 = q6.n.C0(p11); + } + } else { + v11_4 = q6.t.c; + } + this.a(q6.o.s0(q6.o.D0(v11_4, 67), "", 0, 0, new y0.w2(25), 30), 1); + return; + } + } else { + java.util.ArrayList v11_9 = new Object[0]; + v1_0.setValue(h8.c.b("\u4e8c\u7ef4\u7801\u4e0d\u662f\u6fc0\u6d3b\u7801", v11_9)); + return; + } + } else { + java.util.ArrayList v11_11 = new Object[0]; + v1_0.setValue(h8.c.b("\u4e8c\u7ef4\u7801\u4e0d\u662f\u6fc0\u6d3b\u7801", v11_11)); + return; + } + } +} diff --git a/analysis/apk/decomp/z7_b0.java b/analysis/apk/decomp/z7_b0.java new file mode 100644 index 0000000..08ce9e4 --- /dev/null +++ b/analysis/apk/decomp/z7_b0.java @@ -0,0 +1,2569 @@ +package z7; +public final class b0 implements z7.c0 { + public static final synthetic int r; + public final kotlinx.coroutines.CoroutineScope a; + public final qbsg.top.ble.BleManagerFacade b; + public final qbsg.top.ble.RawGattConnector c; + public final String d; + public final String e; + public final String f; + public final kotlinx.coroutines.flow.MutableStateFlow g; + public final kotlinx.coroutines.flow.StateFlow h; + public final kotlinx.coroutines.flow.MutableStateFlow i; + public final kotlinx.coroutines.flow.StateFlow j; + public final kotlinx.coroutines.flow.MutableStateFlow k; + public final kotlinx.coroutines.flow.StateFlow l; + public byte[] m; + public java.util.Map n; + public final java.util.HashMap o; + public final java.util.HashMap p; + public final java.util.HashMap q; + + static b0() + { + kotlin.jvm.internal.s.e(java.util.regex.Pattern.compile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"), "compile(...)"); + return; + } + + public b0(kotlinx.coroutines.CoroutineScope p8, qbsg.top.ble.BleManagerFacade p9, qbsg.top.ble.RawGattConnector p10, s0.u0 p11) + { + kotlin.jvm.internal.s.f(p8, "scope"); + this.a = p8; + this.b = p9; + this.c = p10; + this.d = w7.w.i(); + this.e = "00000000-0000-0000-8000-000000000000"; + this.f = "00000000-0000-0000-8000-000000000000"; + int v2_3 = kotlinx.coroutines.flow.StateFlowKt.MutableStateFlow(new z7.d0()); + this.g = v2_3; + this.h = kotlinx.coroutines.flow.FlowKt.asStateFlow(v2_3); + int v2_5 = kotlinx.coroutines.flow.StateFlowKt.MutableStateFlow(0); + this.i = v2_5; + this.j = kotlinx.coroutines.flow.FlowKt.asStateFlow(v2_5); + int v2_7 = kotlinx.coroutines.flow.StateFlowKt.MutableStateFlow(0); + this.k = v2_7; + this.l = kotlinx.coroutines.flow.FlowKt.asStateFlow(v2_7); + this.n = q6.u.c; + this.o = new java.util.HashMap(); + this.p = new java.util.HashMap(); + this.q = new java.util.HashMap(); + this.e = ((String) p11.invoke("a232499efa74dd648334f2bcb5c4b7bace803dc053fd6c4f9d31fe5640b501113a9b815ee2965716273724a67fd70155eb9757c49442e0e1c718a67d6dd5d01d")); + this.f = ((String) p11.invoke("3fd29fea11187d48e527be1cb2a62d9b617d457033f076cb0b1e20bcc60f966b0ddf81dd86533d893cbc9355949b74c9a378a8ab27e2516401da22268d3a7791")); + kotlinx.coroutines.BuildersKt.launch$default(p8, 0, 0, new z7.t(this, 0, 0), 3, 0); + kotlinx.coroutines.BuildersKt.launch$default(p8, 0, 0, new z7.t(this, 0, 1), 3, 0); + kotlinx.coroutines.BuildersKt.launch$default(p8, 0, 0, new z7.t(this, 0, 2), 3, 0); + return; + } + + public static final byte[] a(z7.b0 p4, String p5) + { + p4.getClass(); + IllegalArgumentException v4_3 = i7.p.j0(p5, " ", ""); + if ((v4_3.length() % 2) != 0) { + throw new IllegalArgumentException("Failed requirement."); + } else { + String v5_3 = (v4_3.length() / 2); + byte[] v0_0 = new byte[v5_3]; + int v1 = 0; + while (v1 < v5_3) { + byte v2_0 = (v1 * 2); + byte v2_1 = v4_3.substring(v2_0, (v2_0 + 2)); + kotlin.jvm.internal.s.e(v2_1, "substring(...)"); + c7.a.l(16); + v0_0[v1] = ((byte) Integer.parseInt(v2_1, 16)); + v1++; + } + return v0_0; + } + } + + public static final Object b(z7.b0 p16, String p17, z7.j0 p18, java.util.List p19, int p20, kotlinx.coroutines.sync.Semaphore p21, kotlin.coroutines.jvm.internal.ContinuationImpl p22) + { + String v4_4; + int v1_0 = p16; + int v2_0 = p17; + kotlinx.coroutines.sync.Semaphore v3_2 = p18; + java.util.HashMap v9 = p16.p; + if (!(p22 instanceof z7.w)) { + v4_4 = new z7.w(p16, p22); + } else { + v4_4 = ((z7.w) p22); + int v5_13 = ((z7.w) p22).m; + if ((v5_13 & -2147483648) == 0) { + } else { + ((z7.w) p22).m = (v5_13 - -2147483648); + } + } + int v6_7; + kotlinx.coroutines.sync.Semaphore v3_0; + int v5_0; + int v8_1; + int v2_1; + int v2_3; + int v6_1; + int v15_0; + int v5_2; + z7.b0 v12_0; + int v13_0; + String v4_3; + String v4_0; + int v5_8; + z7.w v10 = v4_4; + Object v0_11 = v10.k; + Object v11 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + String v4_10 = v10.m; + try { + if (v4_10 == null) { + q6.y.Y(v0_11); + v4_0 = new z7.f0(); + v9.put(p17, v4_0); + try { + int v13_2; + int v8_7; + int v15_1; + if (p19.isEmpty()) { + v8_7 = p19; + v13_2 = p20; + v15_1 = p21; + String v7_10 = new Object[0]; + throw new Exception(z7.b0.k("\u6307\u4ee4\u5217\u8868\u4e3a\u7a7a", v7_10)); + } else { + p16.l(p17, new z7.n(p16, p18, 1)); + v4_0.a = p16.c.connect(p17, new a0.m2(v4_0, p16, p17, 22)); + int v6_12 = j7.h.m(20, j7.d.f); + Object v0_37 = new a0.p1(v4_0, 0, 28); + v10.c = p17; + v10.d = p18; + v8_7 = p19; + try { + v10.e = p19; + v15_1 = p21; + try { + v10.f = p21; + v10.g = v4_0; + v13_2 = p20; + } catch (kotlinx.coroutines.TimeoutCancellationException) { + v13_2 = p20; + } catch (Object v0_1) { + v13_2 = p20; + v8_1 = v4_0; + String v4_1 = v8_7; + int v5_3 = v13_2; + int v6_3 = v15_1; + Object v0_22 = v0_1.getMessage(); + if (v0_22 == null) { + String v7_6 = new Object[0]; + v0_22 = z7.b0.k("\u672a\u77e5\u9519\u8bef", v7_6); + } + v1_0.e(v2_0, v3_2, v4_1, v5_3, v6_3, v0_22); + Object v0_24 = v8_1.a; + if (v0_24 == null) { + v8_1.a = 0; + v9.remove(v2_0); + } else { + v0_24.safeDisconnectAndClose(); + } + return p6.a0.a; + } + v10.j = p20; + v10.m = 1; + v0_11 = kotlinx.coroutines.TimeoutKt.withTimeout-KLykuaI(v6_12, v0_37, v10); + if (v0_11 != v11) { + v3_0 = p17; + v2_1 = p21; + v15_0 = p20; + v13_0 = p18; + v5_2 = p19; + String v7_2 = v4_0; + try { + int v8_3; + if (!((Boolean) v0_11).booleanValue()) { + v12_0 = v2_1; + v8_3 = v5_2; + v2_3 = v15_0; + int v6_4 = new Object[0]; + throw new Exception(z7.b0.k("\u670d\u52a1\u53d1\u73b0\u5931\u8d25", v6_4)); + } else { + int v6_5 = v7_2.a; + if (v6_5 == 0) { + v12_0 = v2_1; + v8_3 = v5_2; + v2_3 = v15_0; + int v6_6 = new Object[0]; + throw new Exception(z7.b0.k("GATT \u8fde\u63a5\u5df2\u4e22\u5931", v6_6)); + } else { + p16.l(v3_0, new z7.r(p16, 0)); + int v1_1 = v5_2; + try { + v5_8 = new kotlin.jvm.internal.d0(); + String v4_9 = v1_1.size(); + int v17_1 = v15_0; + try { + long v14_0 = j7.h.m(60, j7.d.f); + v12_0 = v2_1; + try { + Object v0_14 = new z7.x(v1_1, p16, v3_0, v4_9, v5_8, v6_5, v7_2, 0); + v8_3 = v1_1; + v1_0 = p16; + try { + v10.c = v3_0; + v10.d = v13_0; + v10.e = v8_3; + v10.f = v12_0; + v10.g = v7_2; + v10.h = kotlin.coroutines.jvm.internal.SpillingKt.nullOutSpilledVariable(v6_5); + v10.i = v5_8; + v2_3 = v17_1; + } catch (Object v0_1) { + v2_3 = v17_1; + v5_3 = v2_3; + v2_0 = v3_0; + v4_1 = v8_3; + v6_3 = v12_0; + v3_2 = v13_0; + v8_1 = v7_2; + } + v10.j = v2_3; + v10.m = 2; + if (kotlinx.coroutines.TimeoutKt.withTimeout-KLykuaI(v14_0, v0_14, v10) != v11) { + v4_0 = v7_2; + v6_7 = v8_3; + try { + v1_0.l(v3_0, new w7.d(12, v1_0, v5_8)); + Object v0_20 = v4_0.a; + } catch (kotlinx.coroutines.TimeoutCancellationException) { + v5_0 = v2_3; + v2_0 = v3_0; + v8_1 = v4_0; + v4_3 = v6_7; + v6_1 = v12_0; + v3_2 = v13_0; + int v1_3 = new Object[0]; + p16.e(v2_0, v3_2, v4_3, v5_0, v6_1, z7.b0.k("\u64cd\u4f5c\u8d85\u65f6", v1_3)); + Object v0_27 = v8_1.a; + if (v0_27 == null) { + } else { + v0_27.safeDisconnectAndClose(); + } + return p6.a0.a; + } catch (Object v0_2) { + throw v0_2; + } catch (Object v0_1) { + v5_3 = v2_3; + v2_0 = v3_0; + v8_1 = v4_0; + v4_1 = v6_7; + v6_3 = v12_0; + v3_2 = v13_0; + } + if (v0_20 != null) { + v0_20.safeDisconnectAndClose(); + } + v4_0.a = 0; + v9.remove(v3_0); + return p6.a0.a; + } else { + return v11; + } + } catch (kotlinx.coroutines.TimeoutCancellationException) { + v8_3 = p16; + v2_3 = v17_1; + } catch (Object v0_1) { + v8_3 = p16; + v1_0 = p16; + } + } catch (kotlinx.coroutines.TimeoutCancellationException) { + v8_3 = v1_1; + v12_0 = p16; + } catch (Object v0_1) { + v8_3 = v1_1; + v12_0 = p16; + v1_0 = p16; + } catch (kotlinx.coroutines.TimeoutCancellationException) { + } + } catch (kotlinx.coroutines.TimeoutCancellationException) { + v8_3 = v1_1; + v12_0 = v2_1; + v2_3 = v15_0; + } catch (Object v0_1) { + v8_3 = v1_1; + v12_0 = v2_1; + v2_3 = v15_0; + v1_0 = p16; + } + } + } + } catch (kotlinx.coroutines.TimeoutCancellationException) { + v12_0 = v2_1; + v8_3 = v5_2; + v2_3 = v15_0; + } catch (Object v0_2) { + v4_0 = v7_2; + } catch (Object v0_1) { + v12_0 = v2_1; + v8_3 = v5_2; + v2_3 = v15_0; + } catch (Object v0_0) { + v4_0 = v7_2; + int v1_5 = v4_0.a; + if (v1_5 != 0) { + v1_5.safeDisconnectAndClose(); + } + v4_0.a = 0; + v9.remove(v3_0); + throw v0_0; + } catch (kotlinx.coroutines.TimeoutCancellationException) { + } catch (Object v0_1) { + } + v5_0 = v2_3; + v2_0 = v3_0; + v4_3 = v8_3; + v6_1 = v12_0; + v3_2 = v13_0; + v8_1 = v7_2; + } + return p6.a0.a; + } catch (Object v0_1) { + v13_2 = p20; + v15_1 = p21; + } + } + } catch (kotlinx.coroutines.TimeoutCancellationException) { + v8_7 = p19; + v13_2 = p20; + v15_1 = p21; + } catch (Object v0_2) { + v3_0 = p17; + } catch (Object v0_1) { + v8_7 = p19; + } catch (Object v0_0) { + v3_0 = p17; + } catch (kotlinx.coroutines.TimeoutCancellationException) { + } catch (kotlinx.coroutines.TimeoutCancellationException) { + } catch (Object v0_1) { + } + v8_1 = v4_0; + v4_3 = v8_7; + v5_0 = v13_2; + v6_1 = v15_1; + } else { + if (v4_10 == 1) { + int v2_2 = v10.j; + v4_0 = v10.g; + kotlinx.coroutines.sync.Semaphore v3_1 = v10.f; + v5_2 = v10.e; + int v6_2 = v10.d; + String v7_1 = v10.c; + try { + q6.y.Y(v0_11); + v15_0 = v2_2; + v2_1 = v3_1; + v13_0 = v6_2; + v3_0 = v7_1; + } catch (kotlinx.coroutines.TimeoutCancellationException) { + v6_1 = v3_0; + v3_2 = v6_2; + v8_1 = v4_0; + v4_3 = v5_2; + v5_0 = v2_1; + v2_0 = v7_1; + } catch (Object v0_2) { + v3_0 = v7_1; + } catch (Object v0_1) { + v6_3 = v3_0; + v3_2 = v6_2; + v8_1 = v4_0; + v4_1 = v5_2; + v5_3 = v2_1; + v2_0 = v7_1; + } catch (Object v0_0) { + v3_0 = v7_1; + } + } else { + if (v4_10 != 2) { + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } else { + v2_3 = v10.j; + kotlinx.coroutines.sync.Semaphore v3_3 = v10.i; + v4_0 = v10.g; + int v5_10 = v10.f; + v6_7 = v10.e; + String v7_3 = v10.d; + int v8_6 = v10.c; + try { + q6.y.Y(v0_11); + v12_0 = v5_10; + v13_0 = v7_3; + v5_8 = v3_3; + v3_0 = v8_6; + } catch (kotlinx.coroutines.TimeoutCancellationException) { + v5_0 = v2_3; + v2_0 = v8_6; + v8_1 = v4_0; + v4_3 = v6_7; + v6_1 = v5_8; + v3_2 = v7_3; + } catch (Object v0_2) { + v3_0 = v8_6; + } catch (Object v0_1) { + v5_3 = v2_3; + v2_0 = v8_6; + v8_1 = v4_0; + v4_1 = v6_7; + v6_3 = v5_8; + v3_2 = v7_3; + } catch (Object v0_0) { + v3_0 = v8_6; + } + } + } + } + } catch (Object v0_0) { + } + return p6.a0.a; + } + + public static int c(z7.o0 p0) + { + p0.getClass(); + return 318767104; + } + + public static byte[] f(int p3) + { + byte v3_3 = ((byte) ((p3 >> 8) & 255)); + byte[] v1_1 = new byte[2]; + v1_1[0] = ((byte) (p3 & 255)); + v1_1[1] = v3_3; + return v1_1; + } + + public static byte[] g(int p5) + { + byte v1_2 = ((byte) ((p5 >> 8) & 255)); + byte v2_2 = ((byte) ((p5 >> 16) & 255)); + byte v5_1 = ((byte) ((p5 >> 24) & 255)); + byte[] v3_1 = new byte[4]; + v3_1[0] = ((byte) (p5 & 255)); + v3_1[1] = v1_2; + v3_1[2] = v2_2; + v3_1[3] = v5_1; + return v3_1; + } + + public static String h(int p1, long p2) + { + c7.a.l(16); + String v2_1 = Long.toString(p2, 16); + kotlin.jvm.internal.s.e(v2_1, "toString(...)"); + return i7.i.B0((p1 * 2), v2_1); + } + + public static varargs String k(String p1, Object[] p2) + { + return h8.c.b(p1, java.util.Arrays.copyOf(p2, p2.length)); + } + + public final void d() + { + kotlinx.coroutines.flow.MutableStateFlow v0_0 = this.q; + qbsg.top.ble.RawGattHandle v1_3 = v0_0.values(); + kotlin.jvm.internal.s.e(v1_3, "(...)"); + qbsg.top.ble.RawGattHandle v1_19 = q6.o.G0(((Iterable) v1_3)); + v0_0.clear(); + kotlinx.coroutines.flow.MutableStateFlow v0_1 = v1_19.iterator(); + while (v0_1.hasNext()) { + qbsg.top.ble.RawGattHandle v1_18 = ((kotlinx.coroutines.Job) v0_1.next()); + kotlin.jvm.internal.s.c(v1_18); + kotlinx.coroutines.Job$DefaultImpls.cancel$default(v1_18, 0, 1, 0); + } + kotlinx.coroutines.flow.MutableStateFlow v0_2 = this.o; + qbsg.top.ble.RawGattHandle v1_1 = v0_2.values(); + kotlin.jvm.internal.s.e(v1_1, "(...)"); + qbsg.top.ble.RawGattHandle v1_4 = q6.o.G0(((Iterable) v1_1)); + v0_2.clear(); + kotlinx.coroutines.flow.MutableStateFlow v0_3 = v1_4.iterator(); + while (v0_3.hasNext()) { + qbsg.top.ble.RawGattHandle v1_15 = ((z7.i0) v0_3.next()); + v1_15.getClass(); + qbsg.top.ble.RawGattHandle v1_16 = v1_15.a; + if (v1_16 != null) { + v1_16.safeDisconnectAndClose(); + } + } + kotlinx.coroutines.flow.MutableStateFlow v0_4 = this.p; + qbsg.top.ble.RawGattHandle v1_6 = v0_4.values(); + kotlin.jvm.internal.s.e(v1_6, "(...)"); + qbsg.top.ble.RawGattHandle v1_8 = q6.o.G0(((Iterable) v1_6)); + v0_4.clear(); + kotlinx.coroutines.flow.MutableStateFlow v0_5 = v1_8.iterator(); + while (v0_5.hasNext()) { + qbsg.top.ble.RawGattHandle v1_11 = ((z7.f0) v0_5.next()); + v1_11.getClass(); + qbsg.top.ble.RawGattHandle v1_12 = v1_11.a; + if (v1_12 != null) { + v1_12.safeDisconnectAndClose(); + } + } + this.i.setValue(0); + return; + } + + public final void e(String p12, z7.j0 p13, java.util.List p14, int p15, kotlinx.coroutines.sync.Semaphore p16, String p17) + { + if ((p15 >= 2) || (p16 == null)) { + this.l(p12, new d9.b(this, p17)); + return; + } else { + int v8 = (p15 + 1); + this.l(p12, new a8.c(this, v8, 3)); + this.q.put(p12, kotlinx.coroutines.BuildersKt.launch$default(this.a, 0, 0, new z7.u(p16, this, p12, p13, p14, v8, 0, 0), 3, 0)); + return; + } + } + + public final Object i(String p43, z7.j0 p44, z7.o0 p45, int p46, kotlinx.coroutines.sync.Semaphore p47, kotlin.coroutines.jvm.internal.ContinuationImpl p48) + { + int v10_3; + z7.b0 v2_0 = this; + Object v3_48 = p44; + if (!(p48 instanceof z7.z)) { + v10_3 = new z7.z(this, p48); + } else { + v10_3 = ((z7.z) p48); + z7.b0 v11_17 = ((z7.z) p48).x; + if ((v11_17 & -2147483648) == 0) { + } else { + ((z7.z) p48).x = (v11_17 - -2147483648); + } + } + try { + Object v7_10; + kotlinx.coroutines.CoroutineScope v19_6; + int v15_2; + z7.h0 v32_0; + kotlinx.coroutines.CoroutineScope v19_7; + kotlinx.coroutines.CoroutineScope v19_8; + z7.b0 v11_16; + Object v3_17; + Object v3_0; + Object v7_15; + kotlinx.coroutines.CoroutineScope v19_11; + z7.b0 v4_15; + z7.y v8_25; + z7.b0 v11_19; + Throwable v0_8; + Exception v13_32; + z7.b0 v11_20; + z7.b0 v24_1; + z7.b0 v11_21; + Object v5_0; + Object v3_23; + Object v5_1; + z7.b0 v24_4; + Object v5_2; + z7.h0 v14_2; + int v33_1; + Object v7_22; + z7.b0 v24_5; + Object[] v9_0; + int v33_2; + z7.b0 v11_25; + z7.b0 v24_6; + Object[] v9_1; + z7.b0 v24_7; + kotlinx.coroutines.sync.Semaphore v34_0; + z7.b0 v24_8; + z7.b0 v16_6; + kotlinx.coroutines.sync.Semaphore v34_1; + kotlinx.coroutines.sync.Semaphore v34_2; + z7.b0 v16_8; + z7.b0 v11_30; + kotlinx.coroutines.CoroutineScope v35_1; + z7.b0 v16_9; + Object v3_33; + kotlinx.coroutines.CoroutineScope v35_4; + z7.h0 v14_12; + kotlinx.coroutines.CoroutineScope v35_0; + Object v17_1; + kotlinx.coroutines.CoroutineScope v35_5; + Object v1_10; + Object v5_13; + Object v17_2; + z7.b0 v4_0; + z7.b0 v24_16; + Object v5_14; + z7.o0 v12_0; + long v36_2; + Object v17_4; + z7.b0 v24_18; + Object v5_16; + int v10_1; + z7.b0 v24_19; + Object v17_6; + int v6_0; + String v27_0; + Object v3_40; + z7.h0 v14_18; + int v37_1; + Object v43_9; + int v6_1; + Object v17_8; + int v10_4; + int v6_2; + int v37_3; + Throwable v0_79; + Object v17_10; + int v37_4; + int v6_4; + Object v7_42; + int v10_8; + Throwable v0_25; + z7.h0 v14_24; + Exception v13_2; + int v38_5; + int v18_3; + z7.h0 v14_27; + int v10_12; + int v38_6; + int v18_4; + Object v1_25; + int v38_7; + z7.y v8_0; + Object v5_29; + z7.h0 v14_29; + int v38_8; + int v10_15; + Exception v13_9; + long v44_3; + Exception v13_10; + Object v5_33; + int v38_12; + int v10_19; + Exception v13_12; + Object v3_1; + z7.b0 v24_0; + z7.b0 v2_37; + Object v7_0; + z7.y v8_9; + Object v5_38; + Exception v13_16; + Object v7_2; + z7.y v8_11; + Object v5_40; + z7.y v8_12; + z7.b0 v11_6; + z7.b0 v4_4; + Object v3_8; + z7.y v8_14; + Object v7_6; + kotlinx.coroutines.CoroutineScope v19_5; + z7.b0 v4_9; + Throwable v0_13 = v10_3.v; + z7.b0 v11_1 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED(); + z7.o0 v12_3 = this.o; + z7.h0 v28 = "457871e8-d516-4ca1-9116-57d0b17b9cb2"; + z7.h0 v14_0 = "0000fef5-0000-1000-8000-00805f9b34fb"; + switch (v10_3.x) { + case 0: + q6.y.Y(v0_13); + v27_0 = "9d84b9a3-000c-49d8-9183-855b673fda31"; + v15_2 = new z7.i0(); + v12_3.put(p43, v15_2); + try { + v32_0 = v12_3; + try { + this.l(p43, new z7.n(this, p44, 0)); + v33_2 = "724249f0-5ec3-4b5f-8804-42345af08651"; + v15_2.a = this.c.connect(p43, new a0.m2(v15_2, this, p43, 23)); + v34_2 = "8082caa8-41a6-4021-91c6-56f9b954cc34"; + z7.o0 v12_7 = j7.h.m(30, j7.d.f); + v35_5 = "5f78df94-798c-46f5-990a-b3eb6a065c88"; + Throwable v0_86 = new z7.y(v15_2, 0, 14); + v10_3.c = p43; + v10_3.d = p44; + v4_15 = p45; + try { + v10_3.e = p45; + Object[] v9_9 = p47; + try { + v10_3.f = p47; + v10_3.g = v15_2; + v10_3.l = p46; + v10_3.x = 1; + v0_13 = kotlinx.coroutines.TimeoutKt.withTimeoutOrNull-KLykuaI(v12_7, v0_86, v10_3); + } catch (Throwable v0_16) { + v13_9 = v32_0; + Object v5_5 = v4_15; + Object v1_1 = v9_9; + z7.h0 v14_19 = 2; + v9_0 = p46; + z7.b0 v4_1 = p44; + v3_1 = p43; + if (v9_0 >= v14_19) { + v2_0.l(v3_1, new w7.d(11, v2_0, v0_16)); + } else { + if (v1_1 == null) { + } else { + int v6_7 = (v9_0 + 1); + v2_0.l(v3_1, new z7.q(v2_0, v6_7, 0)); + v2_0.q.put(v3_1, kotlinx.coroutines.BuildersKt.launch$default(v2_0.a, 0, 0, new z7.u(v1_1, v2_0, v3_1, v4_1, v5_5, v6_7, 0, 1), 3, 0)); + } + } + Throwable v0_74 = v15_2.a; + if (v0_74 != null) { + v0_74.safeDisconnectAndClose(); + } + v15_2.a = 0; + v13_9.remove(v3_1); + return p6.a0.a; + } + if (v0_13 != v11_1) { + v1_10 = p43; + v12_0 = p47; + v9_0 = p46; + try { + Throwable v0_88; + Throwable v0_87 = ((Boolean) v0_13); + } catch (Throwable v0_18) { + v13_9 = v32_0; + v6_1 = v15_2; + throw v0_18; + } catch (Throwable v0_16) { + v13_9 = v32_0; + v5_5 = v4_15; + v14_19 = 2; + v4_1 = v3_48; + v3_1 = v1_10; + v1_1 = v12_0; + } catch (Throwable v0_17) { + v13_9 = v32_0; + v6_1 = v15_2; + Object v3_54 = v6_1.a; + if (v3_54 != null) { + v3_54.safeDisconnectAndClose(); + } + v6_1.a = 0; + v13_9.remove(v1_10); + throw v0_17; + } + if (v0_87 == null) { + v0_88 = 0; + if (v0_88 == null) { + v13_9 = v32_0; + Object v5_55 = new Object[0]; + throw new Exception(z7.b0.k("\u8fde\u63a5\u8d85\u65f6\u6216\u670d\u52a1\u53d1\u73b0\u5931\u8d25", v5_55)); + } else { + v13_32 = v15_2.a; + if (v13_32 == null) { + v13_9 = v32_0; + Object v5_57 = new Object[0]; + throw new Exception(z7.b0.k("\u8fde\u63a5\u8d85\u65f6\u6216\u670d\u52a1\u53d1\u73b0\u5931\u8d25", v5_57)); + } else { + if (!v13_32.hasService("0000fef5-0000-1000-8000-00805f9b34fb")) { + v13_9 = v32_0; + int v6_19 = new Object[0]; + throw new Exception(z7.b0.k("\u8bbe\u5907\u4e0d\u652f\u6301SUOTA\u670d\u52a1", v6_19)); + } else { + if (!v13_32.hasCharacteristic("0000fef5-0000-1000-8000-00805f9b34fb", "64b4e8b5-0de5-401b-a21d-acc8db3b913a")) { + v37_4 = "61c8849c-f639-4765-946e-5c3419bebb2a"; + v36_2 = "b7de1eea-823d-43bb-a3af-c4903dfce23c"; + v8_0 = 23; + v2_37 = "42c3dfdd-77be-4d9c-8454-8f875267fb3b"; + v7_42 = v0_88; + v0_79 = 20; + v6_1 = v15_2; + if (!v13_32.hasCharacteristic("0000fef5-0000-1000-8000-00805f9b34fb", v2_37)) { + z7.b0 v2_49 = v36_2; + if (!v13_32.hasCharacteristic(v14_0, v2_49)) { + v2_0 = v0_79; + v5_0 = v7_42; + v7_0 = v13_32; + Throwable v0_3 = v37_4; + if (!v7_0.hasCharacteristic(v14_0, v0_3)) { + v24_0 = v14_0; + v7_0.requestMtu((v2_0 + 3)); + z7.h0 v14_3 = j7.h.m(8, j7.d.f); + int v38_1 = v11_1; + Throwable v0_12 = new z7.y(v6_1, 0, 10); + v10_3.c = v1_10; + v10_3.d = v3_48; + v10_3.e = v4_15; + v10_3.f = v12_0; + v10_3.g = v6_1; + v10_3.h = v7_0; + v10_3.l = v9_0; + v10_3.m = v5_0; + v10_3.n = v2_0; + v10_3.o = v8_0; + v10_3.x = 6; + v0_13 = kotlinx.coroutines.TimeoutKt.withTimeout-KLykuaI(v14_3, v0_12, v10_3); + v11_1 = v38_1; + if (v0_13 != v11_1) { + v5_2 = v2_0; + v2_0 = v5_0; + Throwable v0_15 = ((Number) v0_13).intValue(); + z7.y v8_3 = Math.min(v5_2, (v0_15 - 3)); + try { + int v15_0 = this.m; + kotlin.jvm.internal.s.c(v15_0); + } catch (Throwable v0_18) { + v13_9 = v32_0; + } catch (Throwable v0_16) { + v2_0 = 2; + v13_9 = v32_0; + v5_5 = v4_15; + v15_2 = v6_1; + } catch (Throwable v0_17) { + v13_9 = v32_0; + } + Exception v13_8 = new z7.h0(v15_0, v8_3, 2); + v7_0.requestHighPriority(); + int v15_1 = v24_0; + z7.h0 v14_6 = v35_5; + if (!v7_0.hasCharacteristic(v15_1, v14_6)) { + v2_0 = this; + v13_9 = v32_0; + try { + Object v7_1 = new Object[0]; + throw new Exception(z7.b0.k("SERV_STATUS\u7279\u5f81\u503c\u672a\u627e\u5230", v7_1)); + } catch (Throwable v0_18) { + } catch (Throwable v0_16) { + } + } else { + v7_0.enableNotification(v15_1, v14_6); + int v38_2 = v11_1; + Object v43_1 = v8_3; + v7_0.writeDescriptor(v15_1, v14_6, "00002902-0000-1000-8000-00805f9b34fb", z7.k0.a); + v24_1 = v15_1; + z7.y v8_7 = new z7.y(v6_1, 0, 11); + v10_3.c = v1_10; + v10_3.d = v3_48; + v10_3.e = v4_15; + v10_3.f = v12_0; + v10_3.g = v6_1; + v10_3.h = v7_0; + v10_3.i = v13_8; + v10_3.l = v9_0; + v10_3.m = v2_0; + v10_3.n = v5_2; + v10_3.o = v0_15; + v11_6 = v43_1; + v10_3.p = v11_6; + v10_3.x = 7; + z7.y v8_8 = kotlinx.coroutines.TimeoutKt.withTimeout-KLykuaI(j7.h.m(8, j7.d.f), v8_7, v10_3); + v14_12 = v38_2; + if (v8_8 != v14_12) { + long v40_1 = v2_0; + v2_0 = v0_15; + v0_13 = v8_8; + v8_9 = v13_8; + v13_10 = v7_0; + v7_2 = v40_1; + try { + kotlinx.coroutines.CoroutineScope v19_1; + if (!((Boolean) v0_13).booleanValue()) { + v2_0 = this; + v19_1 = v1_10; + v13_9 = v32_0; + Object v5_6 = new Object[0]; + throw new Exception(z7.b0.k("CCCD\u5199\u5165\u5931\u8d25", v5_6)); + } else { + v0_25 = v24_1; + int v15_3 = v34_2; + if (!v13_10.hasCharacteristic(v0_25, v15_3)) { + v2_0 = this; + v19_1 = v1_10; + v13_9 = v32_0; + Object v5_8 = new Object[0]; + throw new Exception(z7.b0.k("SPOTA_MEM_DEV\u672a\u627e\u5230", v5_8)); + } else { + z7.b0.c(v4_15); + int v38_3 = v14_12; + int v18_2 = v11_6; + v13_10.writeCharacteristic(v0_25, v15_3, z7.b0.g(318767104), 1); + kotlinx.coroutines.CoroutineScope v19_2 = v7_2; + z7.b0 v24_2 = v8_9; + Object v7_4 = j7.h.m(8, j7.d.f); + v34_0 = v15_3; + z7.b0 v11_10 = new z7.y(v6_1, 0, 0); + v10_3.c = v1_10; + v10_3.d = v3_48; + v10_3.e = v4_15; + v10_3.f = v12_0; + v10_3.g = v6_1; + v10_3.h = v13_10; + v14_18 = v24_2; + v10_3.i = v14_18; + v10_3.l = v9_0; + v15_2 = v19_2; + v10_3.m = v15_2; + v10_3.n = v5_2; + v10_3.o = v2_0; + v19_1 = v1_10; + Object v1_7 = v18_2; + try { + v10_3.p = v1_7; + v18_3 = v1_7; + v10_3.x = 8; + Object v1_9 = kotlinx.coroutines.TimeoutKt.withTimeout-KLykuaI(v7_4, v11_10, v10_3); + v11_1 = v38_3; + } catch (Throwable v0_18) { + v13_9 = v32_0; + } catch (Throwable v0_16) { + v2_0 = this; + v13_9 = v32_0; + v5_5 = v4_15; + v15_2 = v6_1; + v1_1 = v12_0; + v14_19 = 2; + v4_1 = v3_48; + v3_1 = v19_1; + } catch (Throwable v0_17) { + v13_9 = v32_0; + v1_10 = v19_1; + } + if (v1_9 != v11_1) { + v8_11 = v6_1; + v6_4 = v2_0; + v2_0 = v1_9; + v1_10 = v19_1; + Object v7_5 = v5_2; + Object v5_9 = v18_3; + try { + z7.b0 v11_11; + int v45_1; + if (!((Boolean) v2_0).booleanValue()) { + v2_0 = this; + v11_11 = v3_48; + v45_1 = v4_15; + v13_9 = v32_0; + z7.b0 v4_2 = new Object[0]; + throw new Exception(z7.b0.k("\u5199MEM_DEV\u5931\u8d25", v4_2)); + } else { + v4_15.getClass(); + z7.b0 v2_3 = v33_2; + if (!v13_10.hasCharacteristic(v0_25, v2_3)) { + v2_0 = this; + v11_11 = v3_48; + v45_1 = v4_15; + v13_9 = v32_0; + z7.b0 v4_3 = new Object[0]; + throw new Exception(z7.b0.k("SPOTA_GPIO_MAP\u672a\u627e\u5230", v4_3)); + } else { + int v38_4 = v11_1; + int v18_7 = v5_9; + v13_10.writeCharacteristic(v0_25, v2_3, z7.b0.g(84280064), 1); + kotlinx.coroutines.CoroutineScope v19_4 = v6_4; + z7.b0 v2_6 = new z7.y(v8_11, 0, 1); + v10_3.c = v1_10; + v10_3.d = v3_48; + v10_3.e = v4_15; + v10_3.f = v12_0; + v10_3.g = v8_11; + v10_3.h = v13_10; + v10_3.i = v14_18; + v10_3.l = v9_0; + v10_3.m = v15_2; + v10_3.n = v7_5; + v5_13 = v19_4; + v10_3.o = v5_13; + int v6_5 = v18_7; + v10_3.p = v6_5; + v10_3.x = 9; + v11_11 = v3_48; + v45_1 = v4_15; + try { + v2_0 = kotlinx.coroutines.TimeoutKt.withTimeout-KLykuaI(j7.h.m(8, j7.d.f), v2_6, v10_3); + v3_8 = v38_4; + } catch (Throwable v0_16) { + v2_0 = this; + v13_9 = v32_0; + v5_5 = v45_1; + v3_1 = v1_10; + v15_2 = v8_11; + v4_1 = v11_11; + v1_1 = v12_0; + v14_19 = 2; + } + if (v2_0 != v3_8) { + v19_5 = v45_1; + v17_1 = v6_5; + v4_4 = v7_5; + v6_1 = v8_11; + v24_4 = v11_11; + v8_12 = v13_10; + v7_6 = v14_18; + try { + z7.h0 v14_22; + if (!((Boolean) v2_0).booleanValue()) { + v14_22 = this; + v13_9 = v32_0; + z7.b0 v4_5 = new Object[0]; + throw new Exception(z7.b0.k("\u5199GPIO_MAP\u5931\u8d25", v4_5)); + } else { + while (!v6_1.g.isEmpty()) { + try { + v6_1.g.tryReceive-PtdJZtk(); + } catch (Throwable v0_16) { + v2_0 = this; + v3_1 = v1_10; + v15_2 = v6_1; + v1_1 = v12_0; + v5_5 = v19_5; + v4_1 = v24_4; + v13_9 = v32_0; + } + } + v11_16 = v27_0; + if (!v8_12.hasCharacteristic(v0_25, v11_16)) { + v14_22 = this; + v13_9 = v32_0; + z7.b0 v4_6 = new Object[0]; + throw new Exception(z7.b0.k("SPOTA_PATCH_LEN\u672a\u627e\u5230", v4_6)); + } else { + if (!v8_12.hasCharacteristic(v0_25, "457871e8-d516-4ca1-9116-57d0b17b9cb2")) { + v14_22 = this; + v13_9 = v32_0; + z7.b0 v4_7 = new Object[0]; + throw new Exception(z7.b0.k("SPOTA_PATCH_DATA\u672a\u627e\u5230", v4_7)); + } else { + v35_0 = a.b.k(); + v5_14 = v7_6.c(); + v2_0 = v24_4; + v24_5 = v5_13; + v14_24 = v10_3; + v10_4 = -1; + v38_6 = v3_8; + v28 = "457871e8-d516-4ca1-9116-57d0b17b9cb2"; + v3_1 = 0; + v13_12 = v4_4; + v4_0 = v19_5; + v19_6 = v17_1; + Object v17_3 = v35_0; + if (v3_1 >= v5_14) { + Object v5_15 = v24_5; + z7.b0 v39_0 = v38_6; + v17_2 = v7_6; + Object v7_7 = v0_25; + try { + long v36_0 = v10_4; + Object v26_0 = v17_3; + Object v3_13 = v34_0; + v8_12.writeCharacteristic(v7_7, v3_13, z7.b0.g(-33554432), 1); + int v10_7 = j7.h.m(8, j7.d.f); + v34_1 = v3_13; + v24_6 = v7_7; + Throwable v0_42 = new z7.y(v6_1, 0, 4); + v14_24.c = v1_10; + v14_24.d = v2_0; + v14_24.e = v4_0; + v14_24.f = v12_0; + v14_24.g = v6_1; + v14_24.h = v8_12; + v14_24.i = kotlin.coroutines.jvm.internal.SpillingKt.nullOutSpilledVariable(v17_2); + v14_24.l = v9_0; + v14_24.m = v15_2; + v14_24.n = v13_12; + v14_24.o = v5_15; + Object v3_16 = v19_6; + v14_24.p = v3_16; + Object v7_9 = v1_10; + z7.b0 v16_1 = v2_0; + v1_10 = v26_0; + try { + v14_24.u = v1_10; + Object v26_1 = v1_10; + Object v1_16 = v36_0; + v14_24.q = v1_16; + v14_24.x = 13; + v0_13 = kotlinx.coroutines.TimeoutKt.withTimeout-KLykuaI(v10_7, v0_42, v14_24); + v11_1 = v39_0; + } catch (Throwable v0_18) { + v13_9 = v32_0; + v1_10 = v7_9; + } catch (Throwable v0_16) { + z7.h0 v14_25 = this; + v13_9 = v32_0; + v5_5 = v4_0; + v15_2 = v6_1; + v3_1 = v7_9; + v1_1 = v12_0; + v2_0 = v14_25; + v4_1 = v16_1; + } catch (Throwable v0_17) { + v13_9 = v32_0; + v1_10 = v7_9; + } + if (v0_13 != v11_1) { + v3_17 = v1_16; + v1_10 = v7_9; + v7_10 = v3_16; + v10_8 = v6_1; + v38_5 = v11_1; + v11_19 = v14_24; + v2_0 = v16_1; + v14_2 = v13_12; + v13_2 = v5_15; + v5_16 = v26_1; + try { + z7.b0 v16_2; + int v18_10; + if (!((Boolean) v0_13).booleanValue()) { + z7.h0 v14_26 = this; + v16_2 = v1_10; + v18_10 = v2_0; + v13_9 = v32_0; + try { + Object v3_18 = new Object[0]; + throw new Exception(z7.b0.k("\u5199END_SIGNAL\u5931\u8d25", v3_18)); + } catch (Throwable v0_18) { + } catch (Throwable v0_16) { + v5_5 = v4_0; + v15_2 = v10_8; + v1_1 = v12_0; + v2_0 = v14_26; + v3_1 = v16_2; + v4_1 = v18_10; + } catch (Throwable v0_17) { + v6_1 = v10_8; + v1_10 = v16_2; + } + } else { + z7.b0 v16_3 = v3_17; + int v18_11 = v5_16; + Throwable v0_49 = new z7.y(v10_8, 0, 13); + v11_19.c = v1_10; + v11_19.d = v2_0; + v11_19.e = v4_0; + v11_19.f = v12_0; + v11_19.g = v10_8; + v11_19.h = v8_12; + v11_19.i = kotlin.coroutines.jvm.internal.SpillingKt.nullOutSpilledVariable(v17_2); + v11_19.l = v9_0; + v11_19.m = v15_2; + v11_19.n = v14_2; + v11_19.o = v13_2; + v11_19.p = v7_10; + Object v5_19 = v18_11; + v11_19.u = v5_19; + Object v3_22 = v16_3; + v11_19.q = v3_22; + v16_2 = v1_10; + try { + v11_19.x = 14; + v18_10 = v2_0; + try { + v0_13 = kotlinx.coroutines.TimeoutKt.withTimeout-KLykuaI(j7.h.m(60, j7.d.f), v0_49, v11_19); + Object v1_21 = v38_5; + } catch (Throwable v0_16) { + v14_26 = this; + v13_9 = v32_0; + } + if (v0_13 != v1_21) { + v38_7 = v1_21; + v1_10 = v11_19; + v2_0 = v16_2; + v11_20 = v10_8; + v10_1 = v7_10; + v6_2 = v5_19; + v5_1 = v3_22; + v3_0 = v18_10; + try { + Throwable v0_51 = ((Number) v0_13).intValue(); + z7.b0 v16_4 = v5_1; + } catch (Throwable v0_18) { + v13_9 = v32_0; + v1_10 = v2_0; + v6_1 = v11_20; + } catch (Throwable v0_16) { + v14_22 = this; + v13_9 = v32_0; + v5_5 = v4_0; + v15_2 = v11_20; + v1_1 = v12_0; + v4_1 = v3_0; + v3_1 = v2_0; + v2_0 = v14_22; + } catch (Throwable v0_17) { + v13_9 = v32_0; + v1_10 = v2_0; + v6_1 = v11_20; + } + if (v0_51 != 2) { + v14_22 = this; + v13_9 = v32_0; + try { + throw new Exception(z7.b0.k("CRC\u6821\u9a8c\u5931\u8d25: %s", new Object[] {z7.k0.a(v0_51)}))); + } catch (Throwable v0_18) { + } catch (Throwable v0_16) { + } catch (Throwable v0_17) { + } + } else { + int v18_12 = v6_2; + z7.h0 v22_0 = v10_1; + v8_12.writeCharacteristic(v24_6, v34_1, z7.b0.g(-50331648), 1); + int v10_11 = new z7.y(v11_20, 0, 5); + v1_10.c = v2_0; + v1_10.d = v3_0; + v1_10.e = v4_0; + v1_10.f = v12_0; + v1_10.g = v11_20; + v1_10.h = v8_12; + v1_10.i = kotlin.coroutines.jvm.internal.SpillingKt.nullOutSpilledVariable(v17_2); + v1_10.l = v9_0; + v1_10.m = v15_2; + v1_10.n = v14_2; + v1_10.o = v13_2; + v1_10.p = v22_0; + v5_29 = v18_12; + v1_10.u = v5_29; + v1_10.q = v16_4; + v1_10.r = v0_51; + v1_10.x = 15; + v14_12 = v38_7; + if (kotlinx.coroutines.TimeoutKt.withTimeoutOrNull-KLykuaI(j7.h.m(5, j7.d.f), v10_11, v1_10) != v14_12) { + v10_12 = v2_0; + v1_25 = v9_0; + v9_1 = v3_0; + try { + v14_22 = this; + try { + this.l(v10_12, new z7.p(this, (((double) (a.b.k() - v5_29)) / 4652007308841189376))); + v8_12.requestBalancedPriority(); + Throwable v0_59 = v11_20.a; + } catch (Throwable v0_18) { + v13_9 = v32_0; + v1_10 = v10_12; + } catch (Throwable v0_16) { + v13_9 = v32_0; + v5_5 = v4_0; + v4_1 = v9_1; + v3_1 = v10_12; + v15_2 = v11_20; + v2_0 = v14_22; + v14_19 = 2; + v9_0 = v1_25; + } catch (Throwable v0_17) { + v13_9 = v32_0; + v1_10 = v10_12; + } + if (v0_59 != null) { + v0_59.safeDisconnectAndClose(); + } + v11_20.a = 0; + v32_0.remove(v10_12); + return p6.a0.a; + } catch (Throwable v0_18) { + } catch (Throwable v0_16) { + v14_22 = this; + } catch (Throwable v0_17) { + } + } else { + } + } + } else { + v14_12 = v1_21; + } + v6_1 = v8_11; + } catch (Throwable v0_18) { + v13_9 = v32_0; + } catch (Throwable v0_16) { + v14_26 = this; + v18_10 = v2_0; + } catch (Throwable v0_17) { + v13_9 = v32_0; + } + } + } catch (Throwable v0_18) { + v13_9 = v32_0; + v6_1 = v10_8; + } catch (Throwable v0_16) { + v14_26 = this; + v16_2 = v1_10; + } catch (Throwable v0_17) { + v13_9 = v32_0; + v6_1 = v10_8; + } + v6_1 = v10_8; + v1_10 = v16_2; + } else { + v14_12 = v11_1; + } + } catch (Throwable v0_18) { + v13_9 = v32_0; + } catch (Throwable v0_16) { + v14_25 = this; + v7_9 = v1_10; + v16_1 = v2_0; + } catch (Throwable v0_17) { + v13_9 = v32_0; + } + } else { + v27_0 = v5_14; + Object v5_32 = v7_6.b; + v35_1 = v3_1; + Object v3_27 = Math.min(v5_32, (v7_6.a.length - (v3_1 * v5_32))); + if (v3_27 == v10_4) { + v33_1 = v11_16; + v5_33 = v24_5; + v7_15 = v38_6; + v24_7 = v8_12; + v8_12 = v7_6; + v17_6 = v3_27; + v16_6 = v14_24; + v11_21 = v10_4; + v10_15 = v19_6; + v19_7 = v15_2; + v14_27 = v17_3; + Object v3_39 = v35_1; + v38_8 = v7_15; + v7_22 = v10_15; + v10_3 = v16_6; + v16_8 = v17_6; + v43_9 = v27_0; + v17_8 = v3_39; + v3_40 = v8_12.a(v3_39).iterator(); + v35_4 = v14_27; + v15_2 = v6_1; + v14_29 = v13_12; + v6_1 = v19_7; + v13_16 = v5_33; + v19_6 = v11_21; + v5_40 = v24_7; + try { + if (!v3_40.hasNext()) { + z7.b0 v11_23 = v7_22; + String v27_2 = v13_16; + int v37_0 = v14_29; + v3_23 = v17_8; + z7.h0 v14_30 = v38_8; + Object v17_9 = v43_9; + int v38_9; + if (v3_23 != (v8_12.c() - 1)) { + v38_9 = j7.h.m(30, j7.d.f); + } else { + v38_9 = j7.h.m(60, j7.d.f); + } + int v38_10 = v14_30; + Object v43_10 = v38_9; + Object v7_28 = new z7.y(v15_2, 0, 12); + v10_3.c = v1_10; + v10_3.d = v2_0; + v10_3.e = v4_0; + v10_3.f = v12_0; + v10_3.g = v15_2; + v10_3.h = v5_40; + v10_3.i = v8_12; + v10_3.j = 0; + v10_3.k = 0; + v10_3.l = v9_0; + v10_3.m = v6_1; + z7.h0 v14_33 = v37_0; + v10_3.n = v14_33; + Exception v13_21 = v27_2; + v10_3.o = v13_21; + v10_3.p = v11_23; + z7.b0 v24_9 = v1_10; + v27_0 = v2_0; + Object v1_36 = v35_4; + try { + v10_3.u = v1_36; + v35_0 = v1_36; + Object v1_37 = v19_6; + v10_3.q = v1_37; + v10_3.r = v3_23; + v2_0 = v17_9; + v10_3.s = v2_0; + v19_6 = v1_37; + v10_3.t = v16_8; + v10_3.x = 12; + v17_4 = v2_0; + v1_10 = kotlinx.coroutines.TimeoutKt.withTimeout-KLykuaI(v43_10, v7_28, v10_3); + v7_15 = v38_10; + } catch (Throwable v0_18) { + v6_1 = v15_2; + v1_10 = v24_9; + } catch (Throwable v0_16) { + Object v3_45 = this; + } catch (Throwable v0_17) { + v6_1 = v15_2; + v1_10 = v24_9; + } + if (v1_10 != v7_15) { + v16_9 = v11_23; + v37_1 = v13_21; + v13_12 = v14_33; + v11_25 = v6_1; + v14_24 = v10_3; + v10_4 = v19_6; + v19_6 = v9_0; + v9_0 = v4_0; + v4_9 = v8_12; + v8_12 = v24_9; + v24_8 = v5_40; + Object v1_42 = ((Number) v1_10).intValue(); + if (v1_42 != 2) { + v3_1 = this; + throw new Exception(z7.b0.k("\u5757%s\u5931\u8d25: %s", new Object[] {kotlin.coroutines.jvm.internal.Boxing.boxInt((v3_23 + 1)), z7.k0.a(v1_42)}))); + } else { + int v38_11 = (v3_23 + 1); + z7.b0 v39_1 = v7_15; + Object v7_29 = v0_25; + v2_0 = this; + this.l(v8_12, new z7.o(((v38_11 * 100) / v4_9.c()), this, v3_23, v4_9, (((double) (a.b.k() - v35_0)) / 4652007308841189376))); + v0_25 = v7_29; + v1_10 = v8_12; + v6_1 = v15_2; + v5_14 = v17_4; + v8_12 = v24_8; + v2_0 = v27_0; + v24_5 = v37_1; + v3_1 = v38_11; + v38_6 = v39_1; + v7_6 = v4_9; + v4_0 = v9_0; + v15_2 = v11_25; + v9_0 = v19_6; + v11_16 = v33_1; + v19_6 = v16_9; + } + } else { + v14_12 = v7_15; + } + } else { + z7.b0 v11_27 = ((byte[]) v3_40.next()); + z7.b0 v24_10 = v7_22; + String v27_3 = v13_16; + Object v7_30 = v28; + v5_40.writeCharacteristic(v0_25, v7_30, v11_27, 0); + v28 = v7_30; + int v37_2 = v14_29; + long v44_4 = v11_27; + Object v7_33 = new z7.y(v15_2, 0, 3); + v10_3.c = v1_10; + v10_3.d = v2_0; + v10_3.e = v4_0; + v10_3.f = v12_0; + v10_3.g = v15_2; + v10_3.h = v5_40; + v10_3.i = v8_12; + v10_3.j = v3_40; + v10_3.k = kotlin.coroutines.jvm.internal.SpillingKt.nullOutSpilledVariable(v44_4); + v10_3.l = v9_0; + v10_3.m = v6_1; + Exception v13_27 = v37_2; + v10_3.n = v13_27; + z7.h0 v14_34 = v27_3; + v10_3.o = v14_34; + z7.b0 v11_29 = v24_10; + v10_3.p = v11_29; + v37_3 = v13_27; + String v27_4 = v14_34; + Exception v13_28 = v35_4; + v10_3.u = v13_28; + long v44_5 = v3_40; + Object v3_51 = v19_6; + v10_3.q = v3_51; + v19_6 = v3_51; + Object v3_52 = v17_8; + v10_3.r = v3_52; + v35_4 = v13_28; + Exception v13_29 = v43_9; + v10_3.s = v13_29; + z7.h0 v14_35 = v16_8; + v10_3.t = v14_35; + v16_8 = v14_35; + v10_3.x = 11; + v17_10 = v13_29; + v14_12 = v38_8; + if (kotlinx.coroutines.TimeoutKt.withTimeout-KLykuaI(j7.h.m(5, j7.d.f), v7_33, v10_3) != v14_12) { + v7_22 = v11_29; + v13_16 = v27_4; + v11_30 = v3_52; + v3_40 = v44_5; + while(true) { + v38_8 = v14_12; + v43_9 = v17_10; + v14_29 = v37_3; + v17_8 = v11_30; + z7.b0 v2 = this; + v6_1 = v15_2; + } + } else { + } + } + } catch (Throwable v0_18) { + v2 = this; + v6_1 = v15_2; + } catch (Throwable v0_16) { + v3_45 = this; + v24_9 = v1_10; + v27_0 = v2_0; + } catch (Throwable v0_17) { + } catch (Throwable v0_16) { + v3_1 = v1_10; + v5_5 = v4_0; + v1_1 = v12_0; + v13_9 = v32_0; + v14_19 = 2; + v4_1 = v2_0; + v2_0 = this; + } + v2_0 = v3_45; + v5_5 = v4_0; + v1_1 = v12_0; + v3_1 = v24_9; + v4_1 = v27_0; + } else { + Object v43_6 = v3_27; + v8_12.writeCharacteristic(v0_25, v11_16, z7.b0.f(v3_27), 1); + long v36_1 = v10_4; + v33_1 = v11_16; + Object v3_32 = new z7.y(v6_1, 0, 2); + v14_24.c = v1_10; + v14_24.d = v2_0; + v14_24.e = v4_0; + v14_24.f = v12_0; + v14_24.g = v6_1; + v14_24.h = v8_12; + v14_24.i = v7_6; + v14_24.l = v9_0; + v14_24.m = v15_2; + v14_24.n = v13_12; + Object v5_37 = v24_5; + v14_24.o = v5_37; + int v10_18 = v19_6; + v14_24.p = v10_18; + v19_8 = v10_18; + v10_19 = v17_3; + v14_24.u = v10_19; + Object v17_7 = v7_6; + v14_24.q = v36_1; + Object v7_17 = v35_1; + v14_24.r = v7_17; + v35_1 = v7_17; + Object v7_18 = v27_0; + v14_24.s = v7_18; + v27_0 = v7_18; + Object v7_19 = v43_6; + v14_24.t = v7_19; + Object v43_8 = v7_19; + v14_24.x = 10; + z7.b0 v16_7 = v8_12; + v3_33 = kotlinx.coroutines.TimeoutKt.withTimeout-KLykuaI(j7.h.m(8, j7.d.f), v3_32, v14_24); + v7_15 = v38_6; + if (v3_33 != v7_15) { + v8_14 = v5_37; + v24_7 = v16_7; + v5_38 = v17_7; + v17_6 = v43_8; + if (!((Boolean) v3_33).booleanValue()) { + Object v5_39 = new Object[0]; + throw new Exception(z7.b0.k("\u5199PATCH_LEN\u5931\u8d25", v5_39)); + } else { + v8_12 = v5_38; + v5_33 = v8_14; + v16_6 = v14_24; + v19_7 = v15_2; + v14_27 = v10_19; + v11_21 = v17_6; + v10_15 = v19_8; + } + } + } + } + } + } + } + } catch (Throwable v0_18) { + } catch (Throwable v0_16) { + v14_22 = this; + v13_9 = v32_0; + } catch (Throwable v0_17) { + } + v3_1 = v1_10; + v15_2 = v6_1; + v1_1 = v12_0; + v2_0 = v14_22; + v5_5 = v19_5; + v4_1 = v24_4; + } else { + v14_12 = v3_8; + } + } + } + } catch (Throwable v0_18) { + v13_9 = v32_0; + } catch (Throwable v0_16) { + v2_0 = this; + v11_11 = v3_48; + v45_1 = v4_15; + } catch (Throwable v0_17) { + v13_9 = v32_0; + v6_1 = v8_11; + } + } + } + } + } catch (Throwable v0_18) { + kotlinx.coroutines.CoroutineScope v19 = v1_10; + } catch (Throwable v0_16) { + v2_0 = this; + v19_1 = v1_10; + } catch (Throwable v0_17) { + v19 = v1_10; + } + v1_10 = v19_1; + } else { + } + } + } else { + } + } else { + v7_0.readCharacteristic(v14_0, v0_3); + v24_0 = v14_0; + z7.h0 v14_1 = j7.h.m(5, j7.d.f); + int v38_0 = v11_1; + Throwable v0_6 = new z7.y(v6_1, 0, 9); + v10_3.c = v1_10; + v10_3.d = v3_48; + v10_3.e = v4_15; + v10_3.f = v12_0; + v10_3.g = v6_1; + v10_3.h = v7_0; + v10_3.l = v9_0; + v10_3.m = v5_0; + v10_3.n = v2_0; + v10_3.o = v8_0; + v10_3.x = 5; + v11_1 = v38_0; + if (kotlinx.coroutines.TimeoutKt.withTimeout-KLykuaI(v14_1, v0_6, v10_3) != v11_1) { + v0_8 = v6_1; + v6_0 = v9_0; + v9_0 = v6_0; + v6_1 = v0_8; + } else { + } + } + } else { + v13_32.readCharacteristic(v14_0, v2_49); + v24_16 = v14_0; + z7.h0 v14_44 = j7.h.m(5, j7.d.f); + int v38_14 = v11_1; + z7.b0 v2_52 = new z7.y(v6_1, 0, 8); + v10_3.c = v1_10; + v10_3.d = v3_48; + v10_3.e = v4_15; + v10_3.f = v12_0; + v10_3.g = v6_1; + v10_3.h = v13_32; + v10_3.l = v9_0; + v10_3.m = v7_42; + v10_3.n = v0_79; + v10_3.o = v8_0; + v10_3.x = 4; + z7.b0 v2_53 = kotlinx.coroutines.TimeoutKt.withTimeout-KLykuaI(v14_44, v2_52, v10_3); + v11_1 = v38_14; + if (v2_53 != v11_1) { + v2_0 = v0_79; + v0_13 = v2_53; + Throwable v0_103 = ((byte[]) ((p6.g) v0_13).d); + if (v0_103.length >= 2) { + v8_0 = (((v0_103[1] & 255) << 8) | (v0_103[0] & 255)); + } + v5_0 = v7_42; + v7_0 = v13_32; + v14_0 = v24_16; + } else { + } + } + } else { + v13_32.readCharacteristic("0000fef5-0000-1000-8000-00805f9b34fb", v2_37); + v24_18 = "0000fef5-0000-1000-8000-00805f9b34fb"; + z7.h0 v14_42 = j7.h.m(5, j7.d.f); + int v38_13 = v11_1; + z7.b0 v2_45 = new z7.y(v6_1, 0, 7); + v10_3.c = v1_10; + v10_3.d = v3_48; + v10_3.e = v4_15; + v10_3.f = v12_0; + v10_3.g = v6_1; + v10_3.h = v13_32; + v10_3.l = v9_0; + v10_3.m = v7_42; + v10_3.n = v0_79; + v10_3.o = v8_0; + v10_3.x = 3; + z7.b0 v2_46 = kotlinx.coroutines.TimeoutKt.withTimeout-KLykuaI(v14_42, v2_45, v10_3); + v11_1 = v38_13; + if (v2_46 != v11_1) { + v2_0 = v0_79; + v0_13 = v2_46; + Throwable v0_97 = ((byte[]) ((p6.g) v0_13).d); + if (v0_97.length < 2) { + v0_79 = v2_0; + } else { + v0_79 = (((v0_97[1] & 255) << 8) | (v0_97[0] & 255)); + } + v14_0 = v24_18; + } else { + } + } + } else { + try { + v13_32.readCharacteristic("0000fef5-0000-1000-8000-00805f9b34fb", "64b4e8b5-0de5-401b-a21d-acc8db3b913a"); + v37_4 = "61c8849c-f639-4765-946e-5c3419bebb2a"; + v36_2 = "b7de1eea-823d-43bb-a3af-c4903dfce23c"; + Object v5_61 = j7.h.m(5, j7.d.f); + v38_12 = "42c3dfdd-77be-4d9c-8454-8f875267fb3b"; + z7.b0 v2_40 = new z7.y(v15_2, 0, 6); + v10_3.c = v1_10; + v10_3.d = v3_48; + v10_3.e = v4_15; + v10_3.f = v12_0; + v10_3.g = v15_2; + v10_3.h = v13_32; + v10_3.l = v9_0; + v10_3.m = v0_88; + v10_3.n = 20; + v10_3.o = 23; + v10_3.x = 2; + } catch (Throwable v0_16) { + v2_0 = this; + } + if (kotlinx.coroutines.TimeoutKt.withTimeout-KLykuaI(v5_61, v2_40, v10_3) != v11_1) { + v24_19 = 23; + v8_25 = v0_88; + v0_79 = 20; + v7_42 = v8_25; + v8_0 = v24_19; + v2_37 = v38_12; + } else { + } + } + } + } + } + } else { + try { + v0_88 = v0_87.booleanValue(); + } catch (Throwable v0_18) { + } catch (Throwable v0_16) { + } catch (Throwable v0_17) { + } + } + v5_5 = v4_15; + v13_9 = v32_0; + } else { + } + } catch (Throwable v0_16) { + v9_9 = p47; + } + } catch (Throwable v0_18) { + v13_9 = v32_0; + v1_10 = p43; + } catch (Throwable v0_16) { + v4_15 = p45; + } catch (Throwable v0_17) { + v13_9 = v32_0; + v1_10 = p43; + } + } catch (Throwable v0_18) { + v13_9 = 0; + } catch (Throwable v0_16) { + v4_15 = p45; + v9_9 = p47; + v13_9 = 0; + } catch (Throwable v0_17) { + v13_9 = 0; + } + case 1: + Object v3_66 = v10_3.g; + String v27_15 = v10_3.l; + z7.h0 v32_9 = v10_3.f; + Object v43_18 = v10_3.e; + long v44_11 = v10_3.d; + v1_10 = v10_3.c; + try { + q6.y.Y(v0_13); + v32_0 = v12_3; + v12_0 = v32_9; + v33_2 = "724249f0-5ec3-4b5f-8804-42345af08651"; + v35_5 = "5f78df94-798c-46f5-990a-b3eb6a065c88"; + v34_2 = "8082caa8-41a6-4021-91c6-56f9b954cc34"; + v9_0 = v27_15; + v4_15 = v43_18; + v27_0 = "9d84b9a3-000c-49d8-9183-855b673fda31"; + v15_2 = v3_66; + v3_48 = v44_11; + } catch (Throwable v0_18) { + v6_1 = v3_48; + v13_9 = v12_0; + } catch (Throwable v0_16) { + v5_5 = v43_18; + v4_1 = v44_11; + v15_2 = v3_48; + v13_9 = v12_0; + v9_0 = "9d84b9a3-000c-49d8-9183-855b673fda31"; + v14_19 = 2; + v3_1 = v1_10; + v1_1 = v32_0; + } catch (Throwable v0_17) { + v6_1 = v3_48; + v13_9 = v12_0; + } + break; + case 2: + Object v3_64 = v10_3.n; + v8_25 = v10_3.m; + v24_19 = v10_3.o; + String v27_14 = v10_3.l; + z7.h0 v32_8 = v10_3.h; + Object v43_17 = v10_3.g; + v44_3 = v10_3.f; + int v45_8 = v10_3.e; + z7.u v46_4 = v10_3.d; + v1_10 = v10_3.c; + try { + q6.y.Y(v0_13); + v0_79 = v3_64; + v33_2 = "724249f0-5ec3-4b5f-8804-42345af08651"; + v37_4 = "61c8849c-f639-4765-946e-5c3419bebb2a"; + v36_2 = "b7de1eea-823d-43bb-a3af-c4903dfce23c"; + v38_12 = "42c3dfdd-77be-4d9c-8454-8f875267fb3b"; + v35_5 = "5f78df94-798c-46f5-990a-b3eb6a065c88"; + v34_2 = "8082caa8-41a6-4021-91c6-56f9b954cc34"; + v9_0 = v27_14; + v13_32 = v32_8; + v4_15 = v45_8; + v3_48 = v46_4; + v32_0 = v12_3; + v27_0 = "9d84b9a3-000c-49d8-9183-855b673fda31"; + v15_2 = v43_17; + v12_0 = v44_3; + } catch (Throwable v0_18) { + v6_1 = v43_17; + } catch (Throwable v0_16) { + v15_2 = v43_17; + v5_5 = v45_8; + v4_1 = v46_4; + v3_1 = v1_10; + v13_9 = v12_0; + v9_0 = "9d84b9a3-000c-49d8-9183-855b673fda31"; + v14_19 = 2; + v1_1 = v44_3; + } catch (Throwable v0_17) { + v6_1 = v43_17; + } + break; + case 3: + Object v3_63 = v10_3.n; + v7_42 = v10_3.m; + z7.y v8_24 = v10_3.l; + z7.b0 v24_17 = v10_3.o; + String v27_13 = v10_3.h; + z7.h0 v32_7 = v10_3.g; + Object v43_16 = v10_3.f; + long v44_10 = v10_3.e; + int v45_7 = v10_3.d; + v1_10 = v10_3.c; + try { + q6.y.Y(v0_13); + v2_0 = v3_63; + v33_2 = "724249f0-5ec3-4b5f-8804-42345af08651"; + v37_4 = "61c8849c-f639-4765-946e-5c3419bebb2a"; + v36_2 = "b7de1eea-823d-43bb-a3af-c4903dfce23c"; + v35_5 = "5f78df94-798c-46f5-990a-b3eb6a065c88"; + v34_2 = "8082caa8-41a6-4021-91c6-56f9b954cc34"; + v13_32 = v27_13; + v6_1 = v32_7; + v4_15 = v44_10; + v3_48 = v45_7; + v9_0 = v8_24; + v32_0 = v12_3; + v27_0 = "9d84b9a3-000c-49d8-9183-855b673fda31"; + v8_0 = v24_17; + v12_0 = v43_16; + v24_18 = "0000fef5-0000-1000-8000-00805f9b34fb"; + } catch (Throwable v0_18) { + v13_9 = v12_0; + v6_1 = v32_0; + } catch (Throwable v0_16) { + v5_5 = v44_10; + v4_1 = v45_7; + v3_1 = v1_10; + v9_0 = v8_0; + v13_9 = v12_0; + v15_2 = v32_0; + v14_19 = 2; + v1_1 = v43_16; + } catch (Throwable v0_17) { + v13_9 = v12_0; + v6_1 = v32_0; + } + break; + case 4: + Object v3_62 = v10_3.n; + int v6_14 = v10_3.m; + Object v7_41 = v10_3.l; + z7.y v8_23 = v10_3.h; + z7.b0 v24_15 = v10_3.o; + String v27_12 = v10_3.g; + z7.h0 v32_6 = v10_3.f; + Object v43_15 = v10_3.e; + long v44_9 = v10_3.d; + v1_10 = v10_3.c; + try { + q6.y.Y(v0_13); + v32_0 = v12_3; + v12_0 = v32_6; + v2_0 = v3_62; + v33_2 = "724249f0-5ec3-4b5f-8804-42345af08651"; + v37_4 = "61c8849c-f639-4765-946e-5c3419bebb2a"; + v35_5 = "5f78df94-798c-46f5-990a-b3eb6a065c88"; + v34_2 = "8082caa8-41a6-4021-91c6-56f9b954cc34"; + v4_15 = v43_15; + v3_48 = v44_9; + v9_0 = v7_41; + v13_32 = v8_23; + v8_0 = v24_15; + v7_42 = v6_14; + v24_16 = "0000fef5-0000-1000-8000-00805f9b34fb"; + v6_1 = v27_12; + v27_0 = "9d84b9a3-000c-49d8-9183-855b673fda31"; + } catch (Throwable v0_16) { + v5_5 = v43_15; + v4_1 = v44_9; + v3_1 = v1_10; + v9_0 = v7_42; + v13_9 = v12_0; + v15_2 = v27_0; + v1_1 = v32_0; + } + break; + case 5: + Object v3_61 = v10_3.n; + v5_0 = v10_3.m; + v6_0 = v10_3.l; + v7_0 = v10_3.h; + z7.y v8_22 = v10_3.g; + z7.b0 v24_14 = v10_3.o; + String v27_11 = v10_3.f; + z7.h0 v32_5 = v10_3.e; + Object v43_14 = v10_3.d; + v1_10 = v10_3.c; + try { + q6.y.Y(v0_13); + v2_0 = v3_61; + v33_2 = "724249f0-5ec3-4b5f-8804-42345af08651"; + v0_8 = v8_22; + v35_5 = "5f78df94-798c-46f5-990a-b3eb6a065c88"; + v34_2 = "8082caa8-41a6-4021-91c6-56f9b954cc34"; + v8_0 = v24_14; + v4_15 = v32_5; + v3_48 = v43_14; + v32_0 = v12_3; + v24_0 = "0000fef5-0000-1000-8000-00805f9b34fb"; + v12_0 = v27_11; + v27_0 = "9d84b9a3-000c-49d8-9183-855b673fda31"; + } catch (Throwable v0_18) { + v6_1 = v8_0; + } catch (Throwable v0_16) { + v4_1 = v43_14; + v3_1 = v1_10; + v9_0 = v6_0; + v15_2 = v8_0; + v13_9 = v12_0; + v1_1 = "9d84b9a3-000c-49d8-9183-855b673fda31"; + v5_5 = v32_0; + } catch (Throwable v0_17) { + v6_1 = v8_0; + } + break; + case 6: + Object v3_60 = v10_3.m; + Object v5_52 = v10_3.l; + int v6_13 = v10_3.h; + Object v7_40 = v10_3.g; + z7.y v8_21 = v10_3.f; + kotlinx.coroutines.CoroutineScope v19_12 = v10_3.n; + z7.b0 v24_13 = v10_3.e; + String v27_10 = v10_3.d; + v1_10 = v10_3.c; + try { + q6.y.Y(v0_13); + v7_0 = v6_13; + v6_1 = v7_40; + v2_0 = v3_60; + v33_2 = "724249f0-5ec3-4b5f-8804-42345af08651"; + v35_5 = "5f78df94-798c-46f5-990a-b3eb6a065c88"; + v32_0 = v12_3; + v34_2 = "8082caa8-41a6-4021-91c6-56f9b954cc34"; + v4_15 = v24_13; + v3_48 = v27_10; + v9_0 = v5_52; + v12_0 = v8_21; + v24_0 = "0000fef5-0000-1000-8000-00805f9b34fb"; + v27_0 = "9d84b9a3-000c-49d8-9183-855b673fda31"; + v5_2 = v19_12; + } catch (Throwable v0_18) { + v6_1 = v7_0; + } catch (Throwable v0_16) { + v3_1 = v1_10; + v9_0 = v5_2; + v15_2 = v7_0; + v1_1 = v8_21; + v13_9 = v12_0; + v5_5 = "0000fef5-0000-1000-8000-00805f9b34fb"; + v4_1 = "9d84b9a3-000c-49d8-9183-855b673fda31"; + } catch (Throwable v0_17) { + v6_1 = v7_0; + } + break; + case 7: + Object v3_59 = v10_3.o; + v5_2 = v10_3.n; + int v6_12 = v10_3.m; + Object v7_39 = v10_3.l; + v8_9 = ((z7.h0) v10_3.i); + Object[] v9_8 = v10_3.h; + int v18_17 = v10_3.p; + v19_11 = v10_3.g; + z7.b0 v24_12 = v10_3.f; + String v27_9 = v10_3.e; + z7.h0 v32_4 = v10_3.d; + v1_10 = v10_3.c; + q6.y.Y(v0_13); + v2_0 = v3_59; + v33_2 = "724249f0-5ec3-4b5f-8804-42345af08651"; + v34_2 = "8082caa8-41a6-4021-91c6-56f9b954cc34"; + v4_15 = v27_9; + v3_48 = v32_4; + v13_10 = v9_8; + v32_0 = v12_3; + v27_0 = "9d84b9a3-000c-49d8-9183-855b673fda31"; + v12_0 = v24_12; + v9_0 = v7_39; + v24_1 = "0000fef5-0000-1000-8000-00805f9b34fb"; + v7_2 = v6_12; + v14_12 = v11_1; + v11_6 = v18_17; + v6_1 = v19_11; + break; + case 8: + Object v3_58 = v10_3.o; + v5_2 = v10_3.n; + int v6_11 = v10_3.m; + v7_2 = v10_3.l; + z7.y v8_18 = ((z7.h0) v10_3.i); + Object[] v9_7 = v10_3.h; + v18_3 = v10_3.p; + v19_11 = v10_3.g; + v24_1 = v10_3.f; + String v27_8 = v10_3.e; + z7.h0 v32_3 = v10_3.d; + v1_10 = v10_3.c; + q6.y.Y(v0_13); + v2_0 = v0_13; + v33_2 = "724249f0-5ec3-4b5f-8804-42345af08651"; + v34_0 = "8082caa8-41a6-4021-91c6-56f9b954cc34"; + v0_25 = "0000fef5-0000-1000-8000-00805f9b34fb"; + v4_15 = v27_8; + v14_18 = v8_18; + v13_10 = v9_7; + v27_0 = "9d84b9a3-000c-49d8-9183-855b673fda31"; + v8_11 = v19_11; + v15_2 = v6_11; + v9_0 = v7_2; + v6_4 = v3_58; + v3_48 = v32_3; + v32_0 = v12_3; + v12_0 = v24_1; + break; + case 9: + Object v3_56 = v10_3.o; + v4_4 = v10_3.n; + Object v5_49 = v10_3.m; + int v6_10 = v10_3.l; + v7_6 = ((z7.h0) v10_3.i); + v8_12 = v10_3.h; + Object[] v9_6 = v10_3.g; + v17_1 = v10_3.p; + int v18_16 = v10_3.f; + v19_5 = v10_3.e; + v24_4 = v10_3.d; + v1_10 = v10_3.c; + try { + q6.y.Y(v0_13); + v9_0 = v6_10; + v6_1 = v9_6; + v2_0 = v0_13; + v32_0 = v12_3; + v34_0 = "8082caa8-41a6-4021-91c6-56f9b954cc34"; + v0_25 = "0000fef5-0000-1000-8000-00805f9b34fb"; + v27_0 = "9d84b9a3-000c-49d8-9183-855b673fda31"; + v12_0 = v18_16; + v15_2 = v5_49; + v5_13 = v3_56; + v3_8 = v11_1; + } catch (Throwable v0_18) { + v6_1 = v9_0; + } catch (Throwable v0_16) { + v3_1 = v1_10; + v15_2 = v9_0; + v13_9 = v12_0; + v1_1 = v18_16; + v5_5 = v19_5; + v4_1 = v24_4; + v14_19 = 2; + v9_0 = v6_1; + } catch (Throwable v0_17) { + v6_1 = v9_0; + } + break; + case 10: + Object v3_55 = v10_3.s; + z7.b0 v4_13 = v10_3.r; + Object v5_48 = v10_3.u; + Object v7_36 = v10_3.p; + v8_14 = v10_3.o; + Object[] v9_5 = v10_3.n; + v17_6 = v10_3.t; + int v18_15 = v10_3.m; + kotlinx.coroutines.CoroutineScope v19_10 = v10_3.l; + Object v43_13 = ((z7.h0) v10_3.i); + v24_7 = v10_3.h; + String v27_7 = v10_3.g; + z7.h0 v32_2 = v10_3.f; + long v44_8 = v10_3.e; + int v45_6 = v10_3.d; + v1_10 = v10_3.c; + try { + q6.y.Y(v0_13); + v32_0 = v12_3; + v12_0 = v32_2; + v2_0 = v45_6; + v35_1 = v4_13; + v34_0 = "8082caa8-41a6-4021-91c6-56f9b954cc34"; + v33_1 = "9d84b9a3-000c-49d8-9183-855b673fda31"; + v15_2 = v18_15; + v4_0 = v44_8; + v13_12 = v9_5; + v9_0 = v19_10; + v19_8 = v7_36; + v7_15 = v11_1; + v5_38 = v43_13; + v6_1 = v27_7; + v27_0 = v3_55; + v3_33 = v0_13; + v0_25 = "0000fef5-0000-1000-8000-00805f9b34fb"; + v14_24 = v10_3; + v10_19 = v5_48; + } catch (Throwable v0_16) { + v5_5 = v44_8; + v4_1 = v45_6; + v3_1 = v1_10; + v13_9 = v12_0; + v9_0 = v19_8; + } + break; + case 11: + Object v3_53 = v10_3.s; + z7.b0 v4_11 = v10_3.r; + Object v5_47 = v10_3.q; + int v6_9 = v10_3.u; + z7.y v8_16 = v10_3.p; + Object[] v9_4 = v10_3.o; + Object v17_11 = v10_3.t; + int v18_14 = v10_3.n; + kotlinx.coroutines.CoroutineScope v19_9 = v10_3.m; + z7.b0 v24_11 = v10_3.l; + String v27_5 = v10_3.j; + Object v43_12 = ((z7.h0) v10_3.i); + long v44_7 = v10_3.h; + int v45_5 = v10_3.g; + z7.u v46_3 = v10_3.f; + int v47_2 = v10_3.e; + z7.h0 v32_1 = v10_3.d; + v1_10 = v10_3.c; + try { + q6.y.Y(v0_13); + v35_4 = v6_9; + v7_22 = v8_16; + v34_0 = "8082caa8-41a6-4021-91c6-56f9b954cc34"; + v0_25 = "0000fef5-0000-1000-8000-00805f9b34fb"; + v33_1 = "9d84b9a3-000c-49d8-9183-855b673fda31"; + v16_8 = v17_11; + v37_3 = v18_14; + v6_1 = v19_9; + v2_0 = v32_1; + v8_12 = v43_12; + v15_2 = v45_5; + v17_10 = v3_53; + v19_6 = v5_47; + v13_16 = v9_4; + v14_12 = v11_1; + v32_0 = v12_3; + v9_0 = v24_11; + v3_40 = v27_5; + v5_40 = v44_7; + v12_0 = v46_3; + v11_30 = v4_11; + v4_0 = v47_2; + } catch (Throwable v0_18) { + v6_1 = v45_5; + } catch (Throwable v0_16) { + v15_2 = v45_5; + v5_5 = v47_2; + v3_1 = v1_10; + v13_9 = v12_0; + v9_0 = v24_11; + v4_1 = v32_0; + v14_19 = 2; + v1_1 = v46_3; + } catch (Throwable v0_17) { + v6_1 = v45_5; + } + break; + case 12: + v3_23 = v10_3.r; + z7.b0 v4_8 = v10_3.q; + Object v5_30 = v10_3.u; + Object v7_14 = v10_3.p; + z7.y v8_13 = v10_3.o; + Object[] v9_2 = v10_3.n; + v17_4 = v10_3.s; + int v18_13 = v10_3.m; + v19_6 = v10_3.l; + Object v43_7 = ((z7.h0) v10_3.i); + v24_8 = v10_3.h; + String v27_1 = v10_3.g; + v44_3 = v10_3.f; + int v45_2 = v10_3.e; + z7.u v46_1 = v10_3.d; + Object v1_35 = v10_3.c; + try { + q6.y.Y(v0_13); + v35_0 = v5_30; + v16_9 = v7_14; + v37_1 = v8_13; + v7_15 = v11_1; + v32_0 = v12_3; + v34_0 = "8082caa8-41a6-4021-91c6-56f9b954cc34"; + v33_1 = "9d84b9a3-000c-49d8-9183-855b673fda31"; + v11_25 = v18_13; + v15_2 = v27_1; + v12_0 = v44_3; + v27_0 = v46_1; + v8_12 = v1_35; + v13_12 = v9_2; + v9_0 = v45_2; + v1_10 = v0_13; + v0_25 = "0000fef5-0000-1000-8000-00805f9b34fb"; + v14_24 = v10_3; + v10_4 = v4_8; + v4_9 = v43_7; + } catch (Throwable v0_16) { + v5_5 = v45_2; + v4_1 = v46_1; + v3_1 = v1_10; + v13_9 = v12_0; + v9_0 = v19_6; + v15_2 = v27_0; + } + break; + case 13: + Object v3_2 = v10_3.u; + Object v5_7 = v10_3.p; + int v6_3 = v10_3.o; + Object v7_3 = v10_3.n; + z7.y v8_10 = v10_3.m; + v9_0 = v10_3.l; + int v15_6 = ((z7.h0) v10_3.i); + z7.b0 v16_0 = v10_3.q; + Object v17_0 = v10_3.h; + v18_4 = v10_3.g; + kotlinx.coroutines.CoroutineScope v19_3 = v10_3.f; + z7.b0 v24_3 = v10_3.e; + z7.j0 v25 = v10_3.d; + v1_10 = v10_3.c; + try { + q6.y.Y(v0_13); + v15_2 = v8_10; + v8_12 = v17_0; + v17_2 = v15_6; + v38_5 = v11_1; + v32_0 = v12_3; + v34_1 = "8082caa8-41a6-4021-91c6-56f9b954cc34"; + v12_0 = v19_3; + v2_0 = v25; + v13_2 = v6_3; + v11_19 = v10_3; + v10_8 = v18_4; + v7_10 = v5_7; + v5_16 = v3_2; + v3_17 = v16_0; + v4_0 = v24_3; + v24_6 = "0000fef5-0000-1000-8000-00805f9b34fb"; + v14_2 = v7_3; + } catch (Throwable v0_16) { + v3_1 = v1_10; + v13_9 = v12_0; + v15_2 = v18_4; + v1_1 = v19_3; + v5_5 = "0000fef5-0000-1000-8000-00805f9b34fb"; + v4_1 = v25; + } + break; + case 14: + Object v3_65 = v10_3.u; + Object v5_54 = v10_3.p; + int v6_16 = v10_3.o; + Object v7_44 = v10_3.n; + z7.y v8_26 = v10_3.m; + v9_0 = v10_3.l; + int v15_10 = ((z7.h0) v10_3.i); + z7.b0 v16_10 = v10_3.q; + Object v17_12 = v10_3.h; + v18_4 = v10_3.g; + kotlinx.coroutines.CoroutineScope v19_13 = v10_3.f; + z7.h0 v22_1 = v10_3.e; + z7.j0 v23 = v10_3.d; + Object v1_125 = v10_3.c; + try { + q6.y.Y(v0_13); + v15_2 = v8_26; + v8_12 = v17_12; + v17_2 = v15_10; + v2_0 = v1_125; + v1_10 = v10_3; + v38_7 = v11_1; + v32_0 = v12_3; + v34_1 = "8082caa8-41a6-4021-91c6-56f9b954cc34"; + v24_6 = "0000fef5-0000-1000-8000-00805f9b34fb"; + v11_20 = v18_4; + v12_0 = v19_13; + v10_1 = v5_54; + v13_2 = v6_16; + v14_2 = v7_44; + v5_1 = v16_10; + v6_2 = v3_65; + v4_0 = v22_1; + v3_0 = v23; + } catch (Throwable v0_16) { + v3_1 = v1_10; + v13_9 = v12_0; + v15_2 = v18_4; + v1_1 = v19_13; + v5_5 = v22_1; + v4_1 = v23; + } + break; + case 15: + Object v3_57 = v10_3.u; + v1_25 = v10_3.l; + Object v5_51 = v10_3.h; + v6_1 = v10_3.g; + Object v7_38 = v10_3.f; + z7.y v8_20 = v10_3.e; + v9_1 = v10_3.d; + v10_12 = v10_3.c; + try { + q6.y.Y(v0_13); + v11_20 = v6_1; + v32_0 = v12_3; + v12_0 = v7_38; + v8_12 = v5_51; + v5_29 = v3_57; + v4_0 = v8_20; + } catch (Throwable v0_18) { + v1_10 = v10_12; + } catch (Throwable v0_16) { + v15_2 = v6_1; + v5_5 = v8_12; + v4_1 = v9_1; + v3_1 = v10_12; + v13_9 = v12_0; + v14_19 = 2; + v9_0 = v1_25; + v1_1 = v7_38; + } catch (Throwable v0_17) { + v1_10 = v10_12; + } + break; + default: + throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine"); + } + } catch (Throwable v0_18) { + v13_9 = v12_0; + v6_1 = v27_0; + } catch (Throwable v0_17) { + v13_9 = v12_0; + v6_1 = v27_0; + } catch (Throwable v0_18) { + v13_9 = v12_0; + v6_1 = v19_11; + } catch (Throwable v0_16) { + v3_1 = v1_10; + v9_0 = v7_2; + v13_9 = v12_0; + v15_2 = v19_11; + v1_1 = v24_1; + v5_5 = v27_0; + v4_1 = v32_0; + } catch (Throwable v0_17) { + v13_9 = v12_0; + v6_1 = v19_11; + } catch (Throwable v0_18) { + v13_9 = v12_0; + v6_1 = v18_4; + } catch (Throwable v0_17) { + v13_9 = v12_0; + v6_1 = v18_4; + } catch (Throwable v0_18) { + } catch (Throwable v0_16) { + v2_0 = this; + v5_5 = v4_15; + v15_2 = v6_1; + } catch (Throwable v0_17) { + } catch (Throwable v0_16) { + v3_1 = v1_10; + v5_5 = v4_0; + v15_2 = v6_1; + } catch (Throwable v0_17) { + } catch (Throwable v0_16) { + v2_0 = this; + } catch (Throwable v0_18) { + } catch (Throwable v0_17) { + } catch (Throwable v0_18) { + } catch (Throwable v0_16) { + v5_5 = v4_0; + v15_2 = v6_1; + v13_9 = v32_0; + v14_19 = 2; + v4_1 = v2_0; + v2_0 = this; + } catch (Throwable v0_17) { + } + return v14_12; + } + + public final void j(z7.n0 p20) + { + z7.n0 v2_0 = p20; + kotlinx.coroutines.sync.Semaphore v0_2 = this.g; + boolean v6_5 = ((z7.d0) v0_2.getValue()); + java.util.List v9 = v6_5.b; + kotlinx.coroutines.sync.Semaphore v1_0 = q6.o.G0(((Iterable) v6_5.d)); + if (((!v1_0.isEmpty()) && ((p20 != z7.n0.c) || (this.m != null))) && ((p20 != z7.n0.d) || (!v6_5.h.isEmpty()))) { + int v7_0 = this.i; + if (((Boolean) this.b.isBluetoothEnabled().getValue()).booleanValue()) { + String v4_19 = new java.util.ArrayList(q6.p.c0(v1_0, 10)); + z7.j0 v5_7 = v1_0.iterator(); + while (v5_7.hasNext()) { + int v13_1 = ((String) v5_7.next()); + String v11_1 = v9.iterator(); + while (v11_1.hasNext()) { + kotlinx.coroutines.CoroutineScope v12_1 = v11_1.next(); + if (kotlin.jvm.internal.s.b(((z7.j0) v12_1).a, v13_1)) { + } + int v14_4; + kotlinx.coroutines.CoroutineScope v12_2 = ((z7.j0) v12_1); + if (v12_2 == null) { + v14_4 = v13_1; + } else { + String v11_2 = v12_2.b; + if (v11_2 != null) { + v14_4 = v11_2; + } + } + Object[] v10_0 = new Object[0]; + v4_19.add(new z7.l0(v13_1, v14_4, z7.m0.c, z7.b0.k("\u6392\u961f\u4e2d...", v10_0), 0, 104)); + } + v12_1 = 0; + } + v7_0.setValue(new z7.g0(v4_19, p20)); + kotlinx.coroutines.sync.Semaphore v0_6 = kotlinx.coroutines.sync.SemaphoreKt.Semaphore$default(((z7.d0) v0_2.getValue()).j, 0, 2, 0); + String v11_7 = v1_0.iterator(); + while (v11_7.hasNext()) { + String v4_22 = ((String) v11_7.next()); + kotlinx.coroutines.sync.Semaphore v1_7 = v9.iterator(); + while (v1_7.hasNext()) { + z7.j0 v5_11 = v1_7.next(); + if (kotlin.jvm.internal.s.b(((z7.j0) v5_11).a, v4_22)) { + } + kotlinx.coroutines.sync.Semaphore v1_9; + z7.j0 v5_12 = ((z7.j0) v5_11); + if (v5_12 != null) { + z7.v v15_2 = new z7.v; + v1_9 = v0_6; + v15_2(v1_9, v2_0, this, v4_22, v5_12, v6_5, 0, 1); + this.q.put(v4_22, kotlinx.coroutines.BuildersKt.launch$default(this.a, 0, 0, v15_2, 3, 0)); + } else { + v1_9 = v0_6; + } + v2_0 = p20; + v0_6 = v1_9; + } + v5_11 = 0; + } + } else { + kotlinx.coroutines.sync.Semaphore v0_1 = new java.util.ArrayList(q6.p.c0(v1_0, 10)); + kotlinx.coroutines.sync.Semaphore v1_1 = v1_0.iterator(); + while (v1_1.hasNext()) { + kotlinx.coroutines.CoroutineScope v12_6 = ((String) v1_1.next()); + String v4_5 = v9.iterator(); + while (v4_5.hasNext()) { + z7.j0 v5_1 = v4_5.next(); + if (kotlin.jvm.internal.s.b(((z7.j0) v5_1).a, v12_6)) { + } + int v13_2; + z7.j0 v5_2 = ((z7.j0) v5_1); + if (v5_2 == null) { + v13_2 = v12_6; + } else { + String v4_6 = v5_2.b; + if (v4_6 != null) { + v13_2 = v4_6; + } + } + z7.j0 v5_3 = new Object[0]; + z7.j0 v5_4 = new Object[0]; + v0_1.add(new z7.l0(v12_6, v13_2, z7.m0.e, z7.b0.k("\u5931\u8d25", v5_3), z7.b0.k("\u7cfb\u7edf\u84dd\u7259\u672a\u5f00\u542f", v5_4), 72)); + } + v5_1 = 0; + } + v7_0.setValue(new z7.g0(v0_1, p20)); + return; + } + } + return; + } + + public final void l(String p8, a7.c p9) + { + do { + z7.g0 v3_2; + boolean v0_0 = this.i; + Object v1 = v0_0.getValue(); + z7.n0 v2_2 = ((z7.g0) v1); + if (v2_2 == null) { + v3_2 = 0; + } else { + z7.g0 v3_3 = v2_2.a; + java.util.ArrayList v4_0 = new java.util.ArrayList(q6.p.c0(v3_3, 10)); + z7.g0 v3_0 = v3_3.iterator(); + while (v3_0.hasNext()) { + z7.l0 v5_3 = ((z7.l0) v3_0.next()); + if (kotlin.jvm.internal.s.b(v5_3.a, p8)) { + v5_3 = ((z7.l0) p9.invoke(v5_3)); + } + v4_0.add(v5_3); + } + v3_2 = new z7.g0(v4_0, v2_2.b); + } + } while(!v0_0.compareAndSet(v1, v3_2)); + return; + } +} diff --git a/analysis/apk/decomp/z7_c0.java b/analysis/apk/decomp/z7_c0.java new file mode 100644 index 0000000..358870d --- /dev/null +++ b/analysis/apk/decomp/z7_c0.java @@ -0,0 +1,3 @@ +package z7; +public interface c0 { +} diff --git a/analysis/apk/decomp/z7_d0.java b/analysis/apk/decomp/z7_d0.java new file mode 100644 index 0000000..a407ada --- /dev/null +++ b/analysis/apk/decomp/z7_d0.java @@ -0,0 +1,174 @@ +package z7; +public final class d0 { + public final boolean a; + public final java.util.List b; + public final boolean c; + public final java.util.Set d; + public final String e; + public final int f; + public final String g; + public final java.util.List h; + public final z7.o0 i; + public final int j; + + public d0() + { + q6.t v2 = q6.t.c; + this(0, v2, 1, q6.v.c, "", 0, "", v2, new z7.o0(), 6); + return; + } + + public d0(boolean p1, java.util.List p2, boolean p3, java.util.Set p4, String p5, int p6, String p7, java.util.List p8, z7.o0 p9, int p10) + { + this.a = p1; + this.b = p2; + this.c = p3; + this.d = p4; + this.e = p5; + this.f = p6; + this.g = p7; + this.h = p8; + this.i = p9; + this.j = p10; + return; + } + + public static z7.d0 a(z7.d0 p11, boolean p12, java.util.List p13, boolean p14, java.util.Set p15, String p16, int p17, String p18, java.util.List p19, int p20, int p21) + { + if ((p21 & 1) != 0) { + p12 = p11.a; + } + if ((p21 & 2) != 0) { + p13 = p11.b; + } + if ((p21 & 4) != 0) { + p14 = p11.c; + } + if ((p21 & 8) != 0) { + p15 = p11.d; + } + String v5; + if ((p21 & 16) == 0) { + v5 = p16; + } else { + v5 = p11.e; + } + int v6; + if ((p21 & 32) == 0) { + v6 = p17; + } else { + v6 = p11.f; + } + String v7; + if ((p21 & 64) == 0) { + v7 = p18; + } else { + v7 = p11.g; + } + java.util.List v8; + if ((p21 & 128) == 0) { + v8 = p19; + } else { + v8 = p11.h; + } + int v10; + z7.o0 v9 = p11.i; + if ((p21 & 512) == 0) { + v10 = p20; + } else { + v10 = p11.j; + } + p11.getClass(); + kotlin.jvm.internal.s.f(p13, "scannedDevices"); + kotlin.jvm.internal.s.f(p15, "selectedAddresses"); + kotlin.jvm.internal.s.f(v5, "firmwareFileName"); + kotlin.jvm.internal.s.f(v7, "firmwareCrc"); + kotlin.jvm.internal.s.f(v8, "commands"); + kotlin.jvm.internal.s.f(v9, "uploadConfig"); + return new z7.d0(p12, p13, p14, p15, v5, v6, v7, v8, v9, v10); + } + + public final boolean equals(Object p5) + { + if (this != p5) { + if ((p5 instanceof z7.d0)) { + if (this.a == ((z7.d0) p5).a) { + if (kotlin.jvm.internal.s.b(this.b, ((z7.d0) p5).b)) { + if (this.c == ((z7.d0) p5).c) { + if (kotlin.jvm.internal.s.b(this.d, ((z7.d0) p5).d)) { + if (kotlin.jvm.internal.s.b(this.e, ((z7.d0) p5).e)) { + if (this.f == ((z7.d0) p5).f) { + if (kotlin.jvm.internal.s.b(this.g, ((z7.d0) p5).g)) { + if (kotlin.jvm.internal.s.b(this.h, ((z7.d0) p5).h)) { + if (kotlin.jvm.internal.s.b(this.i, ((z7.d0) p5).i)) { + if (this.j == ((z7.d0) p5).j) { + return 1; + } else { + return 0; + } + } else { + return 0; + } + } else { + return 0; + } + } else { + return 0; + } + } else { + return 0; + } + } else { + return 0; + } + } else { + return 0; + } + } else { + return 0; + } + } else { + return 0; + } + } else { + return 0; + } + } else { + return 0; + } + } else { + return 1; + } + } + + public final int hashCode() + { + return (Integer.hashCode(this.j) + ((this.i.hashCode() + a1.a.d(p.p1.c(this.g, a1.a.c(this.f, p.p1.c(this.e, ((this.d.hashCode() + a1.a.e(a1.a.d((Boolean.hashCode(this.a) * 31), 31, this.b), 31, this.c)) * int v1), 31), 31), 31), 31, this.h)) * 31)); + } + + public final String toString() + { + String v0_1 = new StringBuilder("AdvancedSetupState(isScanning="); + v0_1.append(this.a); + v0_1.append(", scannedDevices="); + v0_1.append(this.b); + v0_1.append(", enabledFilter="); + v0_1.append(this.c); + v0_1.append(", selectedAddresses="); + v0_1.append(this.d); + v0_1.append(", firmwareFileName="); + v0_1.append(this.e); + v0_1.append(", firmwareTotalBytes="); + v0_1.append(this.f); + v0_1.append(", firmwareCrc="); + v0_1.append(this.g); + v0_1.append(", commands="); + v0_1.append(this.h); + v0_1.append(", uploadConfig="); + v0_1.append(this.i); + v0_1.append(", maxConcurrent="); + v0_1.append(this.j); + v0_1.append(")"); + return v0_1.toString(); + } +} diff --git a/analysis/apk/decomp/z7_f0.java b/analysis/apk/decomp/z7_f0.java new file mode 100644 index 0000000..d09d33e --- /dev/null +++ b/analysis/apk/decomp/z7_f0.java @@ -0,0 +1,13 @@ +package z7; +public final class f0 { + public qbsg.top.ble.RawGattHandle a; + public final kotlinx.coroutines.channels.Channel b; + public final kotlinx.coroutines.channels.Channel c; + + public f0() + { + this.b = kotlinx.coroutines.channels.ChannelKt.Channel$default(1, 0, 0, 6, 0); + this.c = kotlinx.coroutines.channels.ChannelKt.Channel$default(1, 0, 0, 6, 0); + return; + } +} diff --git a/analysis/apk/decomp/z7_i0.java b/analysis/apk/decomp/z7_i0.java new file mode 100644 index 0000000..31dda61 --- /dev/null +++ b/analysis/apk/decomp/z7_i0.java @@ -0,0 +1,21 @@ +package z7; +public final class i0 { + public qbsg.top.ble.RawGattHandle a; + public final kotlinx.coroutines.channels.Channel b; + public final kotlinx.coroutines.channels.Channel c; + public final kotlinx.coroutines.channels.Channel d; + public final kotlinx.coroutines.channels.Channel e; + public final kotlinx.coroutines.channels.Channel f; + public final kotlinx.coroutines.channels.Channel g; + + public i0() + { + this.b = kotlinx.coroutines.channels.ChannelKt.Channel$default(1, 0, 0, 6, 0); + this.c = kotlinx.coroutines.channels.ChannelKt.Channel$default(1, 0, 0, 6, 0); + this.d = kotlinx.coroutines.channels.ChannelKt.Channel$default(2147483647, 0, 0, 6, 0); + this.e = kotlinx.coroutines.channels.ChannelKt.Channel$default(1, 0, 0, 6, 0); + this.f = kotlinx.coroutines.channels.ChannelKt.Channel$default(1, 0, 0, 6, 0); + this.g = kotlinx.coroutines.channels.ChannelKt.Channel$default(2147483647, 0, 0, 6, 0); + return; + } +} diff --git a/analysis/apk/decomp/z7_j0.java b/analysis/apk/decomp/z7_j0.java new file mode 100644 index 0000000..9e18db3 --- /dev/null +++ b/analysis/apk/decomp/z7_j0.java @@ -0,0 +1,51 @@ +package z7; +public final class j0 { + public final String a; + public final String b; + public final int c; + + public j0(String p2, String p3, int p4) + { + kotlin.jvm.internal.s.f(p2, "address"); + kotlin.jvm.internal.s.f(p3, "name"); + this.a = p2; + this.b = p3; + this.c = p4; + return; + } + + public final boolean equals(Object p5) + { + if (this != p5) { + if ((p5 instanceof z7.j0)) { + if (kotlin.jvm.internal.s.b(this.a, ((z7.j0) p5).a)) { + if (kotlin.jvm.internal.s.b(this.b, ((z7.j0) p5).b)) { + if (this.c == ((z7.j0) p5).c) { + return 1; + } else { + return 0; + } + } else { + return 0; + } + } else { + return 0; + } + } else { + return 0; + } + } else { + return 1; + } + } + + public final int hashCode() + { + return (Integer.hashCode(this.c) + p.p1.c(this.b, (this.a.hashCode() * 31), 31)); + } + + public final String toString() + { + return p.p1.l(a1.a.t("SuotaScannedDevice(address=", this.a, ", name=", this.b, ", rssi="), this.c, ")"); + } +} diff --git a/analysis/apk/decomp/z7_k0.java b/analysis/apk/decomp/z7_k0.java new file mode 100644 index 0000000..c95bd6a --- /dev/null +++ b/analysis/apk/decomp/z7_k0.java @@ -0,0 +1,46 @@ +package z7; +public abstract class k0 { + public static final byte[] a; + public static final Object b; + + static k0() + { + p6.g v1_0 = new byte[2]; + v1_0 = {1, 0}; + z7.k0.a = v1_0; + p6.g v1_4 = new p6.g(Integer.valueOf(2), "\u64cd\u4f5c\u6210\u529f"); + new p6.g(Integer.valueOf(3), "\u5f3a\u5236\u9000\u51faSPOTA\u670d\u52a1"); + new p6.g(Integer.valueOf(4), "Patch Data CRC\u6821\u9a8c\u5931\u8d25"); + new p6.g(Integer.valueOf(5), "\u63a5\u6536\u957f\u5ea6\u4e0ePATCH_LEN\u4e0d\u7b26"); + new p6.g(Integer.valueOf(6), "\u5916\u90e8\u5b58\u50a8\u5668\u5199\u5165\u5931\u8d25"); + new p6.g(Integer.valueOf(7), "\u5185\u90e8\u5b58\u50a8\u7a7a\u95f4\u4e0d\u8db3"); + new p6.g(Integer.valueOf(8), "\u65e0\u6548\u7684\u5b58\u50a8\u5668\u8bbe\u5907\u7c7b\u578b"); + new p6.g(Integer.valueOf(9), "\u5e94\u7528\u5c42\u9519\u8bef"); + new p6.g(Integer.valueOf(17), "\u65e0\u6548\u955c\u50cfBank"); + new p6.g(Integer.valueOf(18), "\u65e0\u6548\u955c\u50cf\u5934\u90e8"); + new p6.g(Integer.valueOf(19), "\u65e0\u6548\u955c\u50cf\u5927\u5c0f"); + new p6.g(Integer.valueOf(20), "\u65e0\u6548\u4ea7\u54c1\u5934\u90e8"); + new p6.g(Integer.valueOf(21), "\u76f8\u540c\u955c\u50cf\u9519\u8bef"); + new p6.g(Integer.valueOf(22), "\u5916\u90e8\u5b58\u50a8\u5668\u8bfb\u53d6\u5931\u8d25"); + p6.g v16_1 = v1_4; + new p6.g(Integer.valueOf(65535), "\u901a\u4fe1\u9519\u8bef"); + z7.k0.b = q6.y.F(new p6.g[] {v16_1, new p6.g(Integer.valueOf(65534), "\u8bbe\u5907\u4e0d\u652f\u6301SUOTA")})); + return; + } + + public static final String a(int p2) + { + String v0_6 = ((String) z7.k0.b.get(Integer.valueOf(p2))); + if (v0_6 == null) { + c7.a.l(16); + String v2_1 = Integer.toString(p2, 16); + kotlin.jvm.internal.s.e(v2_1, "toString(...)"); + String v2_2 = v2_1.toUpperCase(java.util.Locale.ROOT); + kotlin.jvm.internal.s.e(v2_2, "toUpperCase(...)"); + return h8.c.b("\u672a\u77e5\u72b6\u6001(0x%s)", new Object[] {v2_2})); + } else { + String v2_6 = new Object[0]; + return h8.c.b(v0_6, v2_6); + } + } +} diff --git a/analysis/apk/decomp/z7_o0.java b/analysis/apk/decomp/z7_o0.java new file mode 100644 index 0000000..551cb61 --- /dev/null +++ b/analysis/apk/decomp/z7_o0.java @@ -0,0 +1,28 @@ +package z7; +public final class o0 { + + public final boolean equals(Object p2) + { + if (this != p2) { + if ((p2 instanceof z7.o0)) { + return 1; + } else { + return 0; + } + } else { + return 1; + } + } + + public final int hashCode() + { + int v0_0 = 3; + int v2 = 31; + return (Integer.hashCode(80) + a1.a.c(2, a1.a.c(v0_0, a1.a.c(0, a1.a.c(v0_0, a1.a.c(6, a1.a.c(5, a1.a.c(0, (Integer.hashCode(3) * 31), 31), 31), 31), v2), v2), v2), 31)); + } + + public final String toString() + { + return "UploadConfig(memoryType=3, imageBank=0, misoGpio=5, mosiGpio=6, csGpio=3, sckGpio=0, sdaGpio=3, sclGpio=2, i2cAddress=80)"; + } +} diff --git a/analysis/apk/decomp2.log b/analysis/apk/decomp2.log new file mode 100644 index 0000000..e69de29 diff --git a/analysis/apk/decomp3.log b/analysis/apk/decomp3.log new file mode 100644 index 0000000..e69de29 diff --git a/analysis/apk/decomp4.log b/analysis/apk/decomp4.log new file mode 100644 index 0000000..e69de29 diff --git a/analysis/apk/decomp5.log b/analysis/apk/decomp5.log new file mode 100644 index 0000000..e69de29 diff --git a/analysis/apk/native/libapp.so b/analysis/apk/native/libapp.so new file mode 100644 index 0000000..391ca57 Binary files /dev/null and b/analysis/apk/native/libapp.so differ diff --git a/analysis/apk/native/libeditor.so b/analysis/apk/native/libeditor.so new file mode 100644 index 0000000..d04a1a5 Binary files /dev/null and b/analysis/apk/native/libeditor.so differ diff --git a/requirements.txt b/requirements.txt index 63b34a8..76ae38d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,3 +3,5 @@ bleak==3.0.2 capstone==5.0.9 pillow==12.3.0 pytest==9.1.1 +pytest-asyncio==1.4.0 +qrcode==8.2 diff --git a/src/ppclock/cli.py b/src/ppclock/cli.py new file mode 100644 index 0000000..75e217a --- /dev/null +++ b/src/ppclock/cli.py @@ -0,0 +1,250 @@ +"""ppclock CLI — 离线、agent 友好(--json 机器可读输出)。""" +from __future__ import annotations + +import argparse +import asyncio +import datetime +import json +import sys + +from . import commands as C +from . import image_pipeline as IP +from . import protocol as P + +EXIT_OK = 0 +EXIT_USAGE = 1 +EXIT_TRANSPORT = 2 +EXIT_ERROR = 3 + + +def _emit(args, cmd, data=None, error=None): + if args.json: + out = {"ok": error is None, "cmd": cmd} + if data is not None: + out["data"] = data + if error is not None: + out["error"] = error + print(json.dumps(out, ensure_ascii=False)) + else: + if error is not None: + print(f"错误: {error}", file=sys.stderr) + elif data is not None: + if isinstance(data, (dict, list)): + print(json.dumps(data, ensure_ascii=False, indent=2)) + else: + print(data) + else: + print("OK") + + +def _make_transport(args): + """工厂函数——测试用 monkeypatch 替换为 FakeTransport。""" + from .transport import BLETransport + return BLETransport(address=args.mac, timeout=args.timeout) + + +async def _run_with_transport(args, fn): + async with _make_transport(args) as t: + return await fn(t) + + +def _need_image(args): + from PIL import Image + img = Image.open(args.path) + size = tuple(int(v) for v in args.size.split("x")) if args.size else (400, 300) + bw, red = IP.process_image( + img, size=size, algorithm=args.algo, tricolor=not args.mono, + threshold=args.threshold, diffusion=args.diffusion / 100, + brightness=args.brightness, contrast=args.contrast, + saturation=args.saturation, rotate=args.rotate, + ) + small = len(bw) in (3500, 9000) + return bw, red, small + + +async def _cmd_image(args, t): + bw, red, small = _need_image(args) + await C.upload_image(t, bw, red, small=small, slot=args.slot, + block_delay=args.block_delay) + return {"bytes_bw": len(bw), "bytes_red": len(red) if red else 0, + "small": small, "slot": args.slot} + + +async def _cmd_template(args, t): + from .templates import render_template + payload = json.loads(args.data) if args.data else {} + img = render_template(args.name, payload) + bw, red = IP.process_image(img, size=(400, 300), algorithm=args.algo, + tricolor=not args.mono) + await C.upload_image(t, bw, red, small=False, slot=args.slot, + block_delay=args.block_delay) + return {"template": args.name, "slot": args.slot} + + +def build_parser() -> argparse.ArgumentParser: + p = argparse.ArgumentParser(prog="ppclock", description="4.2寸墨水屏离线 CLI 上位机") + p.add_argument("--mac", help="设备 MAC(省略则自动扫描 NRF- 前缀设备)") + p.add_argument("--timeout", type=float, default=10.0) + p.add_argument("--json", action="store_true", help="机器可读 JSON 输出") + sub = p.add_subparsers(dest="cmd", required=True) + + sub.add_parser("scan", help="扫描设备") + + sp = sub.add_parser("time", help="对时(默认当前本地时间)") + sp.add_argument("datetime", nargs="?", help="ISO8601,如 2026-07-24T15:30:00") + + sp = sub.add_parser("mode", help="显示模式") + sp.add_argument("name", choices=sorted(P.MODES)) + + sp = sub.add_parser("toggle", help="切换类命令") + sp.add_argument("name", choices=["invert", "font", "rotate180", "hour_format", "clock_color"]) + + sub.add_parser("clear", help="刷屏(EPD 通道)") + + sp = sub.add_parser("image", help="传图") + sp.add_argument("path") + sp.add_argument("--slot", type=int, choices=[0, 1, 2, 3]) + sp.add_argument("--algo", default="atkinson", choices=IP.ALGORITHMS) + sp.add_argument("--mono", action="store_true", help="黑白模式(不发红平面)") + sp.add_argument("--threshold", type=int, default=125) + sp.add_argument("--diffusion", type=int, default=100, help="0–100") + sp.add_argument("--brightness", type=int, default=0) + sp.add_argument("--contrast", type=int, default=0) + sp.add_argument("--saturation", type=int, default=100) + sp.add_argument("--rotate", type=int, default=0, choices=[0, 90, 180, 270]) + sp.add_argument("--size", help="WxH,默认 400x300") + sp.add_argument("--block-delay", type=float, default=0.0) + + sp = sub.add_parser("template", help="本地模板渲染并上传") + sp.add_argument("name", choices=["schedule", "businesscard", "memo", "course", "qrcode", "custom"]) + sp.add_argument("--data", help="模板参数 JSON") + sp.add_argument("--slot", type=int, choices=[0, 1, 2, 3]) + sp.add_argument("--algo", default="atkinson", choices=IP.ALGORITHMS) + sp.add_argument("--mono", action="store_true") + sp.add_argument("--block-delay", type=float, default=0.0) + + sp = sub.add_parser("countdown", help="倒计时") + sp.add_argument("date", nargs="?", help="YYYY-MM-DD") + sp.add_argument("--mode", default="clock", choices=["clock", "calendar"]) + sp.add_argument("--off", action="store_true") + + sp = sub.add_parser("sleep", help="休眠时段") + sp.add_argument("--on", action="store_true") + sp.add_argument("--off", action="store_true") + sp.add_argument("--start", type=int, default=0) + sp.add_argument("--end", type=int, default=0) + + sp = sub.add_parser("parking", help="停车牌号码") + sp.add_argument("number") + + sp = sub.add_parser("rotation", help="轮播设置") + sp.add_argument("--count", type=int, choices=[1, 2, 3, 4]) + sp.add_argument("--interval", type=int) + sp.add_argument("--unit", default="min", choices=["min", "hour"]) + + sp = sub.add_parser("lut", help="LUT 校准(0x01-0f 红,0x10-f0 黑)") + sp.add_argument("value", type=lambda v: int(v, 0)) + + sp = sub.add_parser("activate", help="激活") + sp.add_argument("code", nargs="?", help="激活码 hex") + sp.add_argument("--show-id", action="store_true", help="仅读取设备 ID") + + sp = sub.add_parser("wifi", help="WiFi 配置") + sp.add_argument("ssid") + sp.add_argument("password") + sp.add_argument("--city", default="") + + sp = sub.add_parser("raw", help="高级命令:直发 hex") + sp.add_argument("hex") + sp.add_argument("--channel", default="rxtx", choices=["rxtx", "epd"]) + sp.add_argument("--no-response", action="store_true") + return p + + +async def _dispatch(args) -> dict | None: + if args.cmd == "scan": + from .transport import scan + return {"devices": await scan(timeout=args.timeout)} + + async def body(t): + c = args.cmd + if c == "time": + dt = (datetime.datetime.fromisoformat(args.datetime) + if args.datetime else None) + await C.set_time(t, dt) + return {"set": (dt or datetime.datetime.now()).isoformat()} + if c == "mode": + await C.set_mode(t, args.name) + return {"mode": args.name} + if c == "toggle": + await C.toggle(t, args.name) + return {"toggle": args.name} + if c == "clear": + await C.clear(t) + return None + if c == "image": + return await _cmd_image(args, t) + if c == "template": + return await _cmd_template(args, t) + if c == "countdown": + if args.off: + await C.countdown_off(t) + return {"countdown": "off"} + if not args.date: + raise ValueError("缺少日期(YYYY-MM-DD)或 --off") + d = datetime.date.fromisoformat(args.date) + await C.countdown_set(t, d, args.mode) + return {"date": d.isoformat(), "mode": args.mode} + if c == "sleep": + on = args.on or not args.off + await C.sleep(t, on, args.start, args.end) + return {"on": on, "start": args.start, "end": args.end} + if c == "parking": + await C.parking(t, args.number) + return {"number": args.number} + if c == "rotation": + await C.rotation(t, count=args.count, interval=args.interval, unit=args.unit) + return {"count": args.count, "interval": args.interval, "unit": args.unit} + if c == "lut": + await C.lut(t, args.value) + return {"lut": hex(args.value)} + if c == "activate": + if args.show_id: + return {"device_id": await C.get_device_id(t)} + if not args.code: + raise ValueError("缺少激活码或 --show-id") + await C.activate(t, args.code) + return None + if c == "wifi": + await C.wifi(t, args.ssid, args.password, args.city) + return None + if c == "raw": + data = bytes.fromhex(args.hex) + if args.channel == "epd": + await t.write_epd(data, response=not args.no_response) + else: + await t.write_rxtx(data, response=not args.no_response) + return {"sent": len(data)} + raise ValueError(f"未知命令 {c}") + + return await _run_with_transport(args, body) + + +def main(argv=None) -> int: + args = build_parser().parse_args(argv) + try: + data = asyncio.run(_dispatch(args)) + except ValueError as e: + _emit(args, args.cmd, error=str(e)) + return EXIT_USAGE + except Exception as e: + from .transport import TransportError + code = EXIT_TRANSPORT if isinstance(e, TransportError) else EXIT_ERROR + _emit(args, args.cmd, error=f"{type(e).__name__}: {e}") + return code + _emit(args, args.cmd, data=data) + return EXIT_OK + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/src/ppclock/commands.py b/src/ppclock/commands.py new file mode 100644 index 0000000..14ecf73 --- /dev/null +++ b/src/ppclock/commands.py @@ -0,0 +1,106 @@ +"""高层命令:帧序列编排。协议规范 docs/protocol.md。""" +from __future__ import annotations + +import datetime + +from . import protocol as P + + +async def set_time(t, dt: datetime.datetime | None = None): + dt = dt or datetime.datetime.now() + await t.write_rxtx(P.build_set_time(dt)) + await t.delay(0.3) + await t.write_rxtx(P.simple_command("commit")) + + +async def set_mode(t, mode: str): + """模式切换:setri 语义——命令后 300ms 补 e2(ble.js:3956-3962)。""" + await t.write_rxtx(P.mode_frame(mode)) + await t.delay(0.3) + await t.write_rxtx(P.simple_command("commit")) + + +async def toggle(t, name: str): + """单字节切换类命令(invert/font/rotate180/hour_format/clock_color),补 e2。""" + await t.write_rxtx(P.simple_command(name)) + await t.delay(0.3) + await t.write_rxtx(P.simple_command("commit")) + + +async def clear(t, param: int = 0x00): + for frame in P.clear_frames(param): + await t.write_epd(frame) + + +async def upload_image(t, bw: bytes, red: bytes | None, *, small: bool, + slot: int | None = None, block_delay: float = 0.0): + """传图:可选槽位选择 → bw 平面块 → 红平面块 → 300ms → 01/AA。""" + if slot is not None: + await t.write_rxtx(P.slot_select_frame(slot)) + await t.delay(0.3) + for frame in P.image_blocks(bw, small=small, red=False): + await t.write_epd(frame) + if block_delay: + await t.delay(block_delay) + if red is not None: + for frame in P.image_blocks(red, small=small, red=True): + await t.write_epd(frame) + if block_delay: + await t.delay(block_delay) + await t.delay(0.3) + await t.write_epd(P.end_frame(small=small)) + + +async def countdown_set(t, d: datetime.date, mode: str): + await t.write_rxtx(P.countdown_date_frame(d, mode)) + await t.delay(1.0) + await t.write_rxtx(P.simple_command("commit")) + + +async def countdown_off(t): + for frame in P.countdown_off_frames(): + await t.write_rxtx(frame) + await t.delay(1.0) + + +async def parking(t, number: str): + await t.write_rxtx(P.parking_frame(number)) + await t.delay(0.5) + await t.write_rxtx(P.simple_command("commit")) + + +async def sleep(t, on: bool, start_h: int, end_h: int): + await t.write_rxtx(P.sleep_frame(on, start_h, end_h)) + + +async def rotation(t, count: int | None = None, interval: int | None = None, + unit: str = "min"): + if count is not None: + await t.write_rxtx(P.rotation_count_frame(count)) + if interval is not None: + await t.write_rxtx(P.rotation_interval_frame(interval, unit)) + + +async def activate(t, code_hex: str): + await t.write_rxtx(P.activation_frame(code_hex)) + await t.delay(0.4) + await t.write_rxtx(P.simple_command("commit")) + + +async def get_device_id(t) -> str: + return await t.request_device_id() + + +async def wifi(t, ssid: str, password: str, city: str = ""): + await t.write_rxtx(P.wifi_frame(ssid, password, city)) + + +async def lut(t, value: int): + await t.write_rxtx(P.lut_frame(value)) + + +async def raw(t, data: bytes, channel: str = "rxtx"): + if channel == "epd": + await t.write_epd(data) + else: + await t.write_rxtx(data) diff --git a/src/ppclock/image_pipeline.py b/src/ppclock/image_pipeline.py new file mode 100644 index 0000000..e495874 --- /dev/null +++ b/src/ppclock/image_pipeline.py @@ -0,0 +1,164 @@ +"""图像管线:调整 → 抖动量化 → 1bpp 平面打包。 +算法与参数证据:analysis/web/timedjs.js(见 docs/protocol.md §5)。 +所有实现与 Web 端 JS 语义对齐:同样的灰度系数、误差核、BCD 无 —— 像素级等价为目标。 +""" +from __future__ import annotations + +from PIL import Image + +GRAY = (0.299, 0.587, 0.114) + +BAYER4 = ( + (15, 135, 45, 165), + (195, 75, 225, 105), + (60, 180, 30, 150), + (240, 120, 210, 90), +) + +# 误差扩散核:(dx, dy, 权重分子);除数见 _KERNELS 键名 +_KERNELS = { + "floydsteinberg": ([(1, 0, 7), (-1, 1, 3), (0, 1, 5), (1, 1, 1)], 16), + "atkinson": ( + [(1, 0, 1), (2, 0, 1), (-1, 1, 1), (0, 1, 1), (1, 1, 1), (0, 2, 1)], + 8, + ), + "stucki": ( + [ + (1, 0, 8), (2, 0, 4), + (-2, 1, 2), (-1, 1, 4), (0, 1, 8), (1, 1, 4), (2, 1, 2), + (-2, 2, 1), (-1, 2, 2), (0, 2, 4), (1, 2, 2), (2, 2, 1), + ], + 42, + ), + "jarvis": ( + [ + (1, 0, 7), (2, 0, 5), + (-2, 1, 3), (-1, 1, 5), (0, 1, 7), (1, 1, 5), (2, 1, 3), + (-2, 2, 1), (-1, 2, 3), (0, 2, 5), (1, 2, 3), (2, 2, 1), + ], + 48, + ), +} + +ALGORITHMS = ["none", "floydsteinberg", "atkinson", "bayer", "stucki", "jarvis"] + + +def _clamp(v: float) -> int: + return 0 if v < 0 else (255 if v > 255 else round(v)) + + +def _gray_of(r: float, g: float, b: float) -> float: + return GRAY[0] * r + GRAY[1] * g + GRAY[2] * b + + +def adjust_pixels(pixels, brightness=0, contrast=0, saturation=100): + """JS applyImageAdjustments 语义(timedjs.js:1-41)。 + brightness: ±100 → v±255*b/100;contrast: ±100 → v*f+(1-f)*128, f=(c+100)/100; + saturation: 0–100+ → gray+(v-gray)*s/100。""" + out = [] + bf = 255 * brightness / 100 + cf = (contrast + 100) / 100 + ca = (1 - cf) * 128 + sf = saturation / 100 + for r, g, b in pixels: + if brightness: + r, g, b = r + bf, g + bf, b + bf + if contrast: + r, g, b = r * cf + ca, g * cf + ca, b * cf + ca + if saturation != 100: + gray = _gray_of(r, g, b) + r, g, b = (gray + (v - gray) * sf for v in (r, g, b)) + out.append((_clamp(r), _clamp(g), _clamp(b))) + return out + + +def _is_red(r, g, b, threshold): + return r > g * 1.5 and r > b * 1.5 and r > threshold + + +def dither_pixels(pixels, width, height, algorithm, threshold=125, + diffusion=1.0, tricolor=False): + """量化到黑/白(+红)。返回与输入等长的 (r,g,b) 列表。 + 与 JS 一致:红判定优先且红像素不扩散误差;误差按通道扩散;写入即截断取整。""" + if algorithm not in ALGORITHMS: + raise ValueError(f"未知抖动算法 {algorithm!r},可选:{ALGORITHMS}") + buf = [[float(r), float(g), float(b)] for r, g, b in pixels] + out = [(0, 0, 0)] * (width * height) + + def quantize(i, x, y): + r, g, b = buf[i] + if tricolor and _is_red(r, g, b, threshold): + out[i] = (255, 0, 0) + return None # 红像素无误差扩散 + gray = _gray_of(r, g, b) + if algorithm == "bayer": + limit = BAYER4[y % 4][x % 4] + else: + limit = threshold + new = 0 if gray < limit else 255 + out[i] = (new, new, new) + return (r - new) * diffusion, (g - new) * diffusion, (b - new) * diffusion + + if algorithm in ("none", "bayer"): + for y in range(height): + for x in range(width): + quantize(y * width + x, x, y) + return out + + kernel, div = _KERNELS[algorithm] + for y in range(height): + for x in range(width): + i = y * width + x + errs = quantize(i, x, y) + if errs is None: + continue + er, eg, eb = errs + for dx, dy, w in kernel: + nx, ny = x + dx, y + dy + if 0 <= nx < width and ny < height: + ni = ny * width + nx + # JS:写入 Uint8ClampedArray 即截断取整(round) + buf[ni][0] = _clamp(buf[ni][0] + er * w / div) + buf[ni][1] = _clamp(buf[ni][1] + eg * w / div) + buf[ni][2] = _clamp(buf[ni][2] + eb * w / div) + return out + + +def pack_plane(pixels, plane): + """(r,g,b) 列表 → 1bpp MSB-first 字节流。 + bw: R,G,B 全>0 → 1;red: R>0 且 G=0 且 B=0 → 1(timedjs.js:564-584)。""" + if len(pixels) % 8: + raise ValueError("像素数必须是 8 的倍数") + out = bytearray() + acc = 0 + nbits = 0 + for r, g, b in pixels: + if plane == "bw": + bit = 1 if (r > 0 and g > 0 and b > 0) else 0 + elif plane == "red": + bit = 1 if (r > 0 and g == 0 and b == 0) else 0 + else: + raise ValueError("plane 必须是 bw 或 red") + acc = (acc << 1) | bit + nbits += 1 + if nbits == 8: + out.append(acc) + acc = 0 + nbits = 0 + return bytes(out) + + +def process_image(img: Image.Image, *, size=(400, 300), algorithm="atkinson", + tricolor=True, threshold=125, diffusion=1.0, + brightness=0, contrast=0, saturation=100, rotate=0): + """完整管线:缩放/旋转 → 调整 → 抖动 → 打包。返回 (bw_bytes, red_bytes|None)。""" + img = img.convert("RGB").resize(size, Image.LANCZOS) + if rotate: + img = img.rotate(-rotate, expand=False) # 与 JS 顺时针旋转语义一致 + w, h = size + px = list(img.getdata()) + px = adjust_pixels(px, brightness, contrast, saturation) + px = dither_pixels(px, w, h, algorithm, threshold, diffusion, tricolor) + bw = pack_plane(px, "bw") + red = pack_plane(px, "red") if tricolor else None + return bw, red diff --git a/src/ppclock/templates.py b/src/ppclock/templates.py new file mode 100644 index 0000000..3c4c9a5 --- /dev/null +++ b/src/ppclock/templates.py @@ -0,0 +1,194 @@ +"""本地模板渲染(替代 Web 端 canvas 渲染,离线可用)。 +渲染产物为 400x300 RGB 图,红字用纯红 (255,0,0),经 image_pipeline 三色量化上屏。 +模板集与 Web 端对齐:schedule/businesscard/memo/course/qrcode/custom(moban.js)。 +""" +from __future__ import annotations + +import datetime + +from PIL import Image, ImageDraw, ImageFont + +W, H = 400, 300 +BLACK = (0, 0, 0) +WHITE = (255, 255, 255) +RED = (255, 0, 0) + +_FONT_CANDIDATES = [ + "/usr/share/fonts/truetype/wqy/wqy-zenhei.ttc", + "/usr/share/fonts/truetype/noto/NotoSansCJK-Regular.ttc", +] + +_cache: dict[int, ImageFont.FreeTypeFont] = {} + + +def _font(size: int) -> ImageFont.FreeTypeFont: + if size not in _cache: + for path in _FONT_CANDIDATES: + try: + _cache[size] = ImageFont.truetype(path, size) + break + except OSError: + continue + else: + _cache[size] = ImageFont.load_default() + return _cache[size] + + +def _canvas() -> tuple[Image.Image, ImageDraw.ImageDraw]: + img = Image.new("RGB", (W, H), WHITE) + return img, ImageDraw.Draw(img) + + +def _wrap_cjk(text: str, max_units: float) -> list[str]: + """按显示宽度断行:中文=1 单位,其他=0.5(与 moban.js 自定义文本一致)。""" + lines, cur, width = [], "", 0.0 + for ch in text: + u = 1.0 if ord(ch) > 0x2E7F else 0.5 + if ch == "\n" or width + u > max_units: + lines.append(cur) + cur, width = "", 0.0 + if ch == "\n": + continue + cur += ch + width += u + lines.append(cur) + return lines + + +def _draw_colored(draw: ImageDraw.ImageDraw, xy, text: str, size: int): + """绘制含 【…】 红字段落的单行文本。返回结束 x。""" + x, y = xy + segs, cur, red = [], "", False + for ch in text: + if ch == "【": + segs.append((cur, red)); cur, red = "", True + elif ch == "】": + segs.append((cur, red)); cur, red = "", False + else: + cur += ch + segs.append((cur, red)) + for seg, is_red in segs: + if not seg: + continue + draw.text((x, y), seg, font=_font(size), fill=RED if is_red else BLACK) + x += draw.textlength(seg, font=_font(size)) + return x + + +def render_schedule(p: dict) -> Image.Image: + """日程:{"date": "2026-07-24"(可省), "items": [["09:00","晨会【重要】"],...]}""" + img, d = _canvas() + date = p.get("date") or datetime.date.today().isoformat() + d.rectangle([0, 0, W, 46], fill=BLACK) + d.text((16, 10), f"日程 {date}", font=_font(24), fill=WHITE) + y = 58 + for time_s, event in p.get("items", [])[:8]: + d.text((16, y), time_s, font=_font(20), fill=BLACK) + _draw_colored(d, (110, y), event, 20) + d.line([(16, y + 30), (W - 16, y + 30)], fill=BLACK, width=1) + y += 30 + return img + + +def render_businesscard(p: dict) -> Image.Image: + """名片:{"name","title","company","phone","email"}""" + img, d = _canvas() + d.rectangle([0, 0, W, H], outline=BLACK, width=3) + d.text((24, 30), p.get("name", ""), font=_font(40), fill=BLACK) + d.text((24, 86), p.get("title", ""), font=_font(20), fill=RED) + d.text((24, 116), p.get("company", ""), font=_font(20), fill=BLACK) + d.line([(24, 150), (W - 24, 150)], fill=BLACK, width=2) + y = 164 + for label, key in (("电话", "phone"), ("邮箱", "email"), ("地址", "addr")): + if p.get(key): + d.text((24, y), f"{label}:{p[key]}", font=_font(18), fill=BLACK) + y += 28 + return img + + +def render_memo(p: dict) -> Image.Image: + """备忘录:{"title": "...", "lines": ["...", ...]}""" + img, d = _canvas() + d.rectangle([0, 0, W, 44], fill=BLACK) + d.text((16, 8), p.get("title", "备忘录"), font=_font(24), fill=WHITE) + y = 56 + for line in p.get("lines", [])[:9]: + d.ellipse([16, y + 8, 24, y + 16], fill=BLACK) + _draw_colored(d, (32, y), line, 18) + y += 27 + return img + + +def render_course(p: dict) -> Image.Image: + """课程表:{"days": ["周一",...](≤7), "periods": 4(2–9), + "grid": [["数学","语文",...], ...] # grid[period][day]""" + days = p.get("days") or ["周一", "周二", "周三", "周四", "周五"] + periods = int(p.get("periods", 4)) + grid = p.get("grid", []) + img, d = _canvas() + cols = len(days) + 1 + cw, rh = W // cols, H // (periods + 1) + for i in range(cols + 1): + d.line([(i * cw, 0), (i * cw, H)], fill=BLACK) + for j in range(periods + 2): + d.line([(0, j * rh), (W, j * rh)], fill=BLACK) + for c, day in enumerate(days): + d.text((c * cw + cw // 2, rh // 2), day, font=_font(16), + fill=BLACK, anchor="mm") + for r in range(periods): + d.text((cw // 2, (r + 1) * rh + rh // 2), f"{r + 1}", font=_font(16), + fill=BLACK, anchor="mm") + for c in range(len(days)): + name = grid[r][c] if r < len(grid) and c < len(grid[r]) else "" + if name: + d.text(((c + 1) * cw + cw // 2, (r + 1) * rh + rh // 2), + name, font=_font(14), fill=BLACK, anchor="mm") + return img + + +def render_qrcode(p: dict) -> Image.Image: + """二维码:{"content": "...", "caption": "..."}(纠错级 M,与 Web 端一致)""" + import qrcode + qr = qrcode.QRCode(error_correction=qrcode.constants.ERROR_CORRECT_M, box_size=8, border=2) + qr.add_data(p.get("content", "")) + qr.make(fit=True) + qimg = qr.make_image(fill_color="black", back_color="white").convert("RGB") + side = min(qimg.width, 240) + qimg = qimg.resize((side, side), Image.NEAREST) + img, d = _canvas() + img.paste(qimg, ((W - side) // 2, (H - side) // 2 - 14)) + caption = p.get("caption", "") + if caption: + d.text((W // 2, H - 34), caption, font=_font(20), fill=BLACK, anchor="mm") + return img + + +def render_custom(p: dict) -> Image.Image: + """自定义文本:{"text": "支持【红字】与换行", "size": 24(可选)}""" + text = p.get("text", "") + size = int(p.get("size", 24)) + img, d = _canvas() + y = 10 + for line in _wrap_cjk(text, max_units=(W - 20) / size): + _draw_colored(d, (10, y), line, size) + y += int(size * 1.35) + if y > H - size: + break + return img + + +RENDERERS = { + "schedule": render_schedule, + "businesscard": render_businesscard, + "memo": render_memo, + "course": render_course, + "qrcode": render_qrcode, + "custom": render_custom, +} + + +def render_template(name: str, payload: dict) -> Image.Image: + try: + return RENDERERS[name](payload) + except KeyError: + raise ValueError(f"未知模板 {name!r},可选:{sorted(RENDERERS)}") from None diff --git a/src/ppclock/transport.py b/src/ppclock/transport.py new file mode 100644 index 0000000..a70ab30 --- /dev/null +++ b/src/ppclock/transport.py @@ -0,0 +1,91 @@ +"""BLE 传输层(bleak 封装)。硬件相关,单测以 FakeTransport 替代。""" +from __future__ import annotations + +import asyncio + +from bleak import BleakClient, BleakScanner +from bleak.exc import BleakError + +from . import protocol as P + + +class TransportError(Exception): + pass + + +async def scan(timeout: float = 5.0, name_prefix: str = P.DEVICE_NAME_PREFIX): + """扫描设备,返回 [{name, address, rssi}]。""" + found = await BleakScanner.discover(timeout=timeout, return_adv=True) + out = [] + for addr, (dev, adv) in found.items(): + name = dev.name or adv.local_name or "" + if name.startswith(name_prefix): + out.append({"name": name, "address": dev.address, "rssi": adv.rssi}) + return out + + +class BLETransport: + """与 FakeTransport 同接口:write_epd/write_rxtx/request_device_id/delay。""" + + def __init__(self, address: str | None = None, timeout: float = 10.0, + name_prefix: str = P.DEVICE_NAME_PREFIX): + self.address = address + self.timeout = timeout + self.name_prefix = name_prefix + self._client: BleakClient | None = None + self._id_buf = bytearray() + self._id_event = asyncio.Event() + + async def __aenter__(self): + await self.connect() + return self + + async def __aexit__(self, *exc): + await self.close() + + async def connect(self): + if not self.address: + devices = await scan(timeout=self.timeout, name_prefix=self.name_prefix) + if not devices: + raise TransportError(f"未找到名称前缀 {self.name_prefix!r} 的设备") + self.address = devices[0]["address"] + self._client = BleakClient(self.address, timeout=self.timeout) + try: + await self._client.connect() + except BleakError as e: + raise TransportError(f"连接失败: {e}") from e + await self._client.start_notify(P.RXTX_CHAR_UUID, self._on_notify) + + async def close(self): + if self._client and self._client.is_connected: + try: + await self._client.stop_notify(P.RXTX_CHAR_UUID) + finally: + await self._client.disconnect() + + def _on_notify(self, _sender, data: bytearray): + self._id_buf.extend(data) + if len(self._id_buf) >= 14: + self._id_event.set() + + async def write_epd(self, data: bytes, response: bool = True): + await self._client.write_gatt_char(P.EPD_CHAR_UUID, data, response=response) + + async def write_rxtx(self, data: bytes, response: bool = True): + await self._client.write_gatt_char(P.RXTX_CHAR_UUID, data, response=response) + + async def read_rxtx(self) -> bytes: + return bytes(await self._client.read_gatt_char(P.RXTX_CHAR_UUID)) + + async def request_device_id(self, timeout: float = 8.0) -> str: + self._id_buf.clear() + self._id_event.clear() + await self.write_rxtx(P.request_id_frame()) + try: + await asyncio.wait_for(self._id_event.wait(), timeout) + except asyncio.TimeoutError as e: + raise TransportError("等待设备 ID 应答超时") from e + return P.parse_device_id(bytes(self._id_buf[:14])) + + async def delay(self, seconds: float): + await asyncio.sleep(seconds) diff --git a/tests/test_cli.py b/tests/test_cli.py new file mode 100644 index 0000000..66e5796 --- /dev/null +++ b/tests/test_cli.py @@ -0,0 +1,167 @@ +"""CLI 测试 — monkeypatch 传输工厂,验证 JSON 输出与退出码。""" +import json + +import pytest +from PIL import Image + +from ppclock import cli + + +class FakeTransport: + instances = [] + + def __init__(self, address=None, timeout=10.0): + self.epd_writes = [] + self.rxtx_writes = [] + self.address = address + FakeTransport.instances.append(self) + + async def __aenter__(self): + return self + + async def __aexit__(self, *exc): + return False + + async def write_epd(self, data, response=True): + self.epd_writes.append(data) + + async def write_rxtx(self, data, response=True): + self.rxtx_writes.append(data) + + async def request_device_id(self, timeout=8.0): + return "DEVICE12345678" + + async def delay(self, seconds): + pass + + +@pytest.fixture(autouse=True) +def fake_transport(monkeypatch): + FakeTransport.instances.clear() + monkeypatch.setattr(cli, "_make_transport", lambda args: FakeTransport(args.mac, args.timeout)) + yield FakeTransport + + +def run_cli(capsys, argv): + code = cli.main(argv) + out = capsys.readouterr().out.strip() + return code, json.loads(out) if out.startswith("{") else out + + +class TestJsonContract: + def test_mode_json(self, capsys): + code, out = run_cli(capsys, ["--json", "mode", "clock1"]) + assert code == 0 + assert out["ok"] is True and out["cmd"] == "mode" + t = FakeTransport.instances[0] + assert t.rxtx_writes == [bytes.fromhex("e10201"), bytes([0xE2])] + + def test_time_json(self, capsys): + code, out = run_cli(capsys, ["--json", "time", "2026-07-24T15:30:00"]) + assert code == 0 and out["ok"] + t = FakeTransport.instances[0] + assert t.rxtx_writes[0][0] == 0xDD + assert t.rxtx_writes[-1] == bytes([0xE2]) + + def test_error_json_contract(self, capsys): + """错误 schema:ok=false + error 字段,退出码 1""" + code, out = run_cli(capsys, ["--json", "countdown"]) + assert code == 1 + assert out["ok"] is False and "error" in out + + def test_mac_passthrough(self, capsys): + run_cli(capsys, ["--json", "--mac", "AA:BB:CC:DD:EE:FF", "clear"]) + assert FakeTransport.instances[0].address == "AA:BB:CC:DD:EE:FF" + + +class TestCommands: + def test_clear(self, capsys): + code, _ = run_cli(capsys, ["--json", "clear"]) + assert code == 0 + assert FakeTransport.instances[0].epd_writes[-1] == bytes([0x01]) + + def test_image_upload(self, capsys, tmp_path): + p = tmp_path / "white.png" + Image.new("RGB", (400, 300), (255, 255, 255)).save(p) + code, out = run_cli(capsys, ["--json", "image", str(p), "--mono"]) + assert code == 0 + t = FakeTransport.instances[0] + assert len(t.epd_writes) == 63 + 1 + assert t.epd_writes[-1] == bytes([0x01]) + assert out["data"]["bytes_bw"] == 15000 + + def test_image_slot_and_color(self, capsys, tmp_path): + p = tmp_path / "red.png" + Image.new("RGB", (400, 300), (255, 0, 0)).save(p) + code, out = run_cli(capsys, ["--json", "image", str(p), "--slot", "2"]) + assert code == 0 + t = FakeTransport.instances[0] + assert t.rxtx_writes[0] == bytes([0xEA, 0x02]) + assert out["data"]["bytes_red"] == 15000 + + def test_countdown(self, capsys): + code, _ = run_cli(capsys, ["--json", "countdown", "2026-12-31"]) + assert code == 0 + assert FakeTransport.instances[0].rxtx_writes[0] == bytes( + [0xFF, 0x00, 0x20, 0x26, 0x12, 0x31]) + + def test_countdown_off(self, capsys): + code, _ = run_cli(capsys, ["--json", "countdown", "--off"]) + assert code == 0 + assert FakeTransport.instances[0].rxtx_writes[0] == bytes([0xFA]) + + def test_parking(self, capsys): + code, _ = run_cli(capsys, ["--json", "parking", "12"]) + assert code == 0 + assert FakeTransport.instances[0].rxtx_writes[0] == bytes([0xEF, 0x11, 0x22]) + + def test_sleep(self, capsys): + code, _ = run_cli(capsys, ["--json", "sleep", "--on", "--start", "23", "--end", "7"]) + assert code == 0 + assert FakeTransport.instances[0].rxtx_writes[0] == bytes([0xFB, 0x01, 0x23, 0x07]) + + def test_rotation(self, capsys): + code, _ = run_cli(capsys, ["--json", "rotation", "--count", "4"]) + assert code == 0 + assert FakeTransport.instances[0].rxtx_writes[0] == bytes.fromhex("EA0003") + + def test_lut(self, capsys): + code, _ = run_cli(capsys, ["--json", "lut", "0x05"]) + assert code == 0 + assert FakeTransport.instances[0].rxtx_writes[0] == bytes([0xE6, 0x05]) + + def test_activate_show_id(self, capsys): + code, out = run_cli(capsys, ["--json", "activate", "--show-id"]) + assert code == 0 + assert out["data"]["device_id"] == "DEVICE12345678" + + def test_wifi(self, capsys): + code, _ = run_cli(capsys, ["--json", "wifi", "MyAP", "pw", "--city", "101010100"]) + assert code == 0 + assert FakeTransport.instances[0].rxtx_writes[0].startswith(b"WIFI_SSID:MyAP") + + def test_raw(self, capsys): + code, _ = run_cli(capsys, ["--json", "raw", "e2"]) + assert code == 0 + assert FakeTransport.instances[0].rxtx_writes == [bytes([0xE2])] + + def test_raw_epd_channel(self, capsys): + code, _ = run_cli(capsys, ["--json", "raw", "01", "--channel", "epd"]) + assert code == 0 + assert FakeTransport.instances[0].epd_writes == [bytes([0x01])] + + def test_scan(self, capsys, monkeypatch): + import ppclock.transport as tr + async def fake_scan(timeout=5.0, name_prefix="NRF-"): + return [{"name": "NRF-TEST", "address": "AA:BB", "rssi": -50}] + monkeypatch.setattr(tr, "scan", fake_scan) + code, out = run_cli(capsys, ["--json", "scan"]) + assert code == 0 + assert out["data"]["devices"][0]["name"] == "NRF-TEST" + + def test_template_custom(self, capsys): + code, out = run_cli(capsys, ["--json", "template", "custom", + "--data", '{"text": "你好"}']) + assert code == 0 + t = FakeTransport.instances[0] + assert len(t.epd_writes) == 63 + 63 + 1 # 默认三色双平面 diff --git a/tests/test_commands.py b/tests/test_commands.py new file mode 100644 index 0000000..2eb1538 --- /dev/null +++ b/tests/test_commands.py @@ -0,0 +1,138 @@ +"""命令层测试 — 用 FakeTransport 验证高层操作的帧序列与顺序(证据 docs/protocol.md)。""" +import datetime + +import pytest + +from ppclock import commands as C + + +class FakeTransport: + def __init__(self, id_response="DEVICE12345678"): + self.epd_writes = [] + self.rxtx_writes = [] + self.id_response = id_response + self.delays = [] + + async def write_epd(self, data, response=True): + self.epd_writes.append(data) + + async def write_rxtx(self, data, response=True): + self.rxtx_writes.append(data) + + async def request_device_id(self, timeout=8.0): + self.rxtx_writes.append(bytes([0xEF, 0xEF])) + return self.id_response + + async def delay(self, seconds): + self.delays.append(seconds) + + +@pytest.fixture +def t(): + return FakeTransport() + + +class TestTimeAndMode: + @pytest.mark.asyncio + async def test_set_time_sends_dd_then_commit(self, t): + dt = datetime.datetime(2026, 7, 24, 15, 30, 0) + await C.set_time(t, dt) + assert t.rxtx_writes[0][0] == 0xDD + assert t.rxtx_writes[-1] == bytes([0xE2]) + + @pytest.mark.asyncio + async def test_set_mode_appends_commit(self, t): + await C.set_mode(t, "clock1") + assert t.rxtx_writes == [bytes.fromhex("e10201"), bytes([0xE2])] + + @pytest.mark.asyncio + async def test_clear_uses_epd_channel(self, t): + await C.clear(t) + assert t.epd_writes == [bytes([0x00, 0x00]), bytes([0x01])] + assert t.rxtx_writes == [] + + +class TestUploadImage: + @pytest.mark.asyncio + async def test_full_image_sequence(self, t): + """整图:bw块×63 → 红块×63 → 延时 → 01""" + bw = bytes(15000) + red = bytes([0xFF]) * 15000 + await C.upload_image(t, bw, red, small=False) + assert t.epd_writes[0][:4] == bytes([0x03, 0xFF, 0x00, 0x00]) + assert t.epd_writes[63][:2] == bytes([0x03, 0x00]) # 红平面首块 + assert t.epd_writes[-1] == bytes([0x01]) + assert len(t.epd_writes) == 63 + 63 + 1 + + @pytest.mark.asyncio + async def test_mono_image_no_red_blocks(self, t): + await C.upload_image(t, bytes(15000), None, small=False) + assert len(t.epd_writes) == 63 + 1 + + @pytest.mark.asyncio + async def test_slot_select_before_upload(self, t): + await C.upload_image(t, bytes(15000), None, small=False, slot=2) + assert t.rxtx_writes[0] == bytes([0xEA, 0x02]) + + @pytest.mark.asyncio + async def test_small_image_ends_with_AA(self, t): + await C.upload_image(t, bytes(3500), None, small=True) + assert t.epd_writes[-1] == bytes([0xAA]) + assert t.epd_writes[0][0] == 0x04 + + +class TestOtherCommands: + @pytest.mark.asyncio + async def test_countdown_set(self, t): + d = datetime.date(2026, 12, 31) + await C.countdown_set(t, d, "clock") + assert t.rxtx_writes[0] == bytes([0xFF, 0x00, 0x20, 0x26, 0x12, 0x31]) + assert t.rxtx_writes[-1] == bytes([0xE2]) + + @pytest.mark.asyncio + async def test_countdown_off(self, t): + await C.countdown_off(t) + assert t.rxtx_writes == [bytes([0xFA]), bytes([0xE2])] + + @pytest.mark.asyncio + async def test_parking(self, t): + await C.parking(t, "13800138000") + assert t.rxtx_writes[0] == bytes([0xEF]) + bytes( + int(f"{d}{d}", 16) for d in "13800138000" + ) + + @pytest.mark.asyncio + async def test_sleep_on_off(self, t): + await C.sleep(t, True, 23, 7) + assert t.rxtx_writes[0] == bytes([0xFB, 0x01, 0x23, 0x07]) + await C.sleep(t, False, 23, 7) + assert t.rxtx_writes[1] == bytes([0xFB, 0x00, 0x23, 0x07]) + + @pytest.mark.asyncio + async def test_rotation(self, t): + await C.rotation(t, count=4) + assert t.rxtx_writes[0] == bytes.fromhex("EA0003") + await C.rotation(t, interval=5, unit="min") + assert t.rxtx_writes[1] == bytes.fromhex("e9010501") + + @pytest.mark.asyncio + async def test_activate(self, t): + await C.activate(t, "A1B2" * 8) + assert t.rxtx_writes[0] == bytes([0xEF]) + bytes.fromhex("A1B2" * 8) + assert t.rxtx_writes[-1] == bytes([0xE2]) + + @pytest.mark.asyncio + async def test_wifi(self, t): + await C.wifi(t, "MyAP", "pw", "101010100") + assert t.rxtx_writes[0] == b"WIFI_SSID:MyAP;WIFI_PASS:pw;CITY:101010100" + + @pytest.mark.asyncio + async def test_lut(self, t): + await C.lut(t, 0x05) + assert t.rxtx_writes[0] == bytes([0xE6, 0x05]) + + @pytest.mark.asyncio + async def test_get_device_id(self, t): + dev_id = await C.get_device_id(t) + assert t.rxtx_writes[0] == bytes([0xEF, 0xEF]) + assert dev_id == "DEVICE12345678" diff --git a/tests/test_image.py b/tests/test_image.py new file mode 100644 index 0000000..8877930 --- /dev/null +++ b/tests/test_image.py @@ -0,0 +1,159 @@ +"""图像管线测试 — 算法参数证据:analysis/web/timedjs.js(docs/protocol.md §5)。""" +import pytest +from PIL import Image + +from ppclock import image_pipeline as IP + + +def make_img(w, h, pixels): + """pixels: list[(r,g,b)] 长度 w*h,行主序。""" + img = Image.new("RGB", (w, h)) + img.putdata(pixels) + return img + + +class TestPack: + def test_all_white_bw_plane(self): + px = [(255, 255, 255)] * 16 + assert IP.pack_plane(px, "bw") == bytes([0xFF, 0xFF]) + + def test_all_black_bw_plane(self): + px = [(0, 0, 0)] * 16 + assert IP.pack_plane(px, "bw") == bytes(2) + + def test_msb_first_order(self): + """首像素=bit7:仅(0,0)白→0x80;仅第8像素白→0x01;第9像素→第二字节0x80""" + px = [(255, 255, 255)] + [(0, 0, 0)] * 15 + assert IP.pack_plane(px, "bw") == bytes([0x80, 0x00]) + px = [(0, 0, 0)] * 7 + [(255, 255, 255)] + [(0, 0, 0)] * 8 + assert IP.pack_plane(px, "bw") == bytes([0x01, 0x00]) + px = [(0, 0, 0)] * 8 + [(255, 255, 255)] + [(0, 0, 0)] * 7 + assert IP.pack_plane(px, "bw") == bytes([0x00, 0x80]) + + def test_red_pixel_planes(self): + """红(255,0,0):bw 平面=0,红平面=1(timedjs.js:573-576,599-601)""" + px = [(255, 0, 0)] * 8 + assert IP.pack_plane(px, "bw") == bytes([0x00]) + assert IP.pack_plane(px, "red") == bytes([0xFF]) + + def test_partial_channels_count_as_white(self): + """bw 规则:R,G,B 全>0 → 1;(1,1,1) 也是白""" + px = [(1, 1, 1)] * 8 + assert IP.pack_plane(px, "bw") == bytes([0xFF]) + + def test_length_not_multiple_of_8_raises(self): + with pytest.raises(ValueError): + IP.pack_plane([(0, 0, 0)] * 7, "bw") + + +class TestDither: + def test_none_threshold(self): + """none:grayg*1.5 且 r>b*1.5 且 r>threshold → 纯红且不扩散误差""" + px = [(200, 50, 50)] * 8 + out = IP.dither_pixels(px, 8, 1, "none", threshold=125, tricolor=True) + assert out == [(255, 0, 0)] * 8 + + def test_not_red_when_threshold_high(self): + px = [(200, 50, 50)] * 8 + out = IP.dither_pixels(px, 8, 1, "none", threshold=250, tricolor=True) + # 200>250 假 → 走红判定失败 → 灰度 0.299*200+0.587*50+0.114*50=94.9 <250 → 黑 + assert out == [(0, 0, 0)] * 8 + + def test_floyd_steinberg_error_propagation(self): + """2x1 灰100:px0→黑 err=100*7/16=43.75 → px1=143.75→白(阈值125,扩散1.0)""" + px = [(100, 100, 100)] * 2 + out = IP.dither_pixels(px, 2, 1, "floydsteinberg", threshold=125) + assert out[0] == (0, 0, 0) + assert out[1] == (255, 255, 255) + + def test_diffusion_zero_behaves_like_none(self): + px = [(100, 100, 100)] * 2 + out = IP.dither_pixels(px, 2, 1, "floydsteinberg", threshold=125, diffusion=0.0) + assert out == [(0, 0, 0)] * 2 + + def test_atkinson_kernel_smaller_error(self): + """Atkinson 只扩散 6/8:px0 黑 err=100*1/8=12.5 → px1=112.5<125 仍黑""" + px = [(100, 100, 100)] * 2 + out = IP.dither_pixels(px, 2, 1, "atkinson", threshold=125) + assert out == [(0, 0, 0), (0, 0, 0)] + + def test_bayer_matrix_origin(self): + """bayer (0,0) 阈值=15:灰10→黑,灰20→白(矩阵 timedjs.js:116-136)""" + out = IP.dither_pixels([(10, 10, 10)] * 8, 8, 1, "bayer", threshold=125) + assert out[0] == (0, 0, 0) + out = IP.dither_pixels([(20, 20, 20)] * 8, 8, 1, "bayer", threshold=125) + assert out[0] == (255, 255, 255) + + def test_stucki_and_jarvis_run(self): + """大核算法冒烟:全灰输入输出只有黑白""" + px = [(128, 128, 128)] * 64 + for algo in ("stucki", "jarvis"): + out = IP.dither_pixels(px, 8, 8, algo, threshold=125) + assert set(out) <= {(0, 0, 0), (255, 255, 255)} + + def test_unknown_algo_raises(self): + with pytest.raises(ValueError): + IP.dither_pixels([(0, 0, 0)] * 8, 8, 1, "magic") + + +class TestAdjust: + def test_brightness(self): + """亮度+50 → v+=127.5(timedjs.js:9-17)""" + px = [(100, 100, 100)] + out = IP.adjust_pixels(px, brightness=50, contrast=0, saturation=100) + assert out == [(228, 228, 228)] # 100+127.5=227.5 → round=228 + + def test_contrast(self): + """对比度+100 → factor=2, v=v*2-128(timedjs.js:18-27)""" + out = IP.adjust_pixels([(200, 50, 128)], brightness=0, contrast=100, saturation=100) + assert out == [(255, 0, 128)] + + def test_saturation_desaturate(self): + """饱和度35 → v=gray+(v-gray)*0.35(timedjs.js:28-38)""" + out = IP.adjust_pixels([(200, 50, 50)], brightness=0, contrast=0, saturation=35) + gray = 0.299 * 200 + 0.587 * 50 + 0.114 * 50 + exp = round(gray + (200 - gray) * 0.35) + assert out[0][0] == exp + + +class TestProcess: + def test_full_size_output_lengths(self): + """400x300 → bw 15000B;三色另有红平面 15000B""" + img = Image.new("RGB", (400, 300), (255, 255, 255)) + bw, red = IP.process_image(img, size=(400, 300), algorithm="none", tricolor=True) + assert len(bw) == 15000 + assert len(red) == 15000 + assert bw == bytes([0xFF]) * 15000 + assert red == bytes(15000) + + def test_mono_has_no_red_plane(self): + img = Image.new("RGB", (400, 300), (0, 0, 0)) + bw, red = IP.process_image(img, size=(400, 300), algorithm="none", tricolor=False) + assert len(bw) == 15000 + assert red is None + + def test_resize_to_fit(self): + img = Image.new("RGB", (800, 600), (255, 255, 255)) + bw, _ = IP.process_image(img, size=(400, 300), algorithm="none", tricolor=False) + assert len(bw) == 15000 + + def test_rotate_180(self): + """rotate=180:左上角白块移到右下""" + img = Image.new("RGB", (8, 8), (0, 0, 0)) + for x in range(8): + img.putpixel((x, 0), (255, 255, 255)) + bw, _ = IP.process_image(img, size=(8, 8), algorithm="none", + tricolor=False, rotate=180) + assert bw[0] == 0x00 + assert bw[-1] == 0xFF diff --git a/tests/test_templates.py b/tests/test_templates.py new file mode 100644 index 0000000..895671f --- /dev/null +++ b/tests/test_templates.py @@ -0,0 +1,34 @@ +"""模板渲染测试。""" +import pytest + +from ppclock import templates as T + + +@pytest.mark.parametrize("name", sorted(T.RENDERERS)) +def test_all_templates_render_400x300(name): + payloads = { + "schedule": {"items": [["09:00", "晨会【重要】"]]}, + "businesscard": {"name": "张三", "title": "工程师", "phone": "138"}, + "memo": {"title": "购物", "lines": ["牛奶", "鸡蛋"]}, + "course": {"grid": [["数学"]]}, + "qrcode": {"content": "https://example.com", "caption": "扫码"}, + "custom": {"text": "你好【世界】\n第二行"}, + } + img = T.render_template(name, payloads[name]) + assert img.size == (400, 300) + assert img.mode == "RGB" + + +def test_custom_wraps_long_text(): + img = T.render_template("custom", {"text": "长" * 100}) + assert img.size == (400, 300) + + +def test_red_segments_rendered_red(): + img = T.render_template("custom", {"text": "【红】"}) + assert (255, 0, 0) in set(img.getdata()) + + +def test_unknown_template_raises(): + with pytest.raises(ValueError): + T.render_template("nope", {})