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; } } }