Files
qianbian/analysis/apk/decomp/qbsg_top_ble_BleSession$sendCommand$2.java

189 lines
6.9 KiB
Java

package qbsg.top.ble;
final class BleSession$sendCommand$2 extends kotlin.coroutines.jvm.internal.SuspendLambda implements a7.e {
final synthetic java.util.List $chunks;
final synthetic String $hex;
int I$0;
int I$1;
int I$2;
int I$3;
Object L$0;
Object L$1;
Object L$2;
Object L$3;
Object L$4;
Object L$5;
int label;
final synthetic qbsg.top.ble.BleSession this$0;
public BleSession$sendCommand$2(qbsg.top.ble.BleSession p1, java.util.List p2, String p3, kotlin.coroutines.Continuation p4)
{
this.this$0 = p1;
this.$chunks = p2;
this.$hex = p3;
super(2, p4);
return;
}
public final kotlin.coroutines.Continuation create(Object p4, kotlin.coroutines.Continuation p5)
{
return new qbsg.top.ble.BleSession$sendCommand$2(this.this$0, this.$chunks, this.$hex, p5);
}
public bridge synthetic Object invoke(Object p1, Object p2)
{
return this.invoke(((kotlinx.coroutines.CoroutineScope) p1), ((kotlin.coroutines.Continuation) p2));
}
public final Object invoke(kotlinx.coroutines.CoroutineScope p1, kotlin.coroutines.Continuation p2)
{
return ((qbsg.top.ble.BleSession$sendCommand$2) this.create(p1, p2)).invokeSuspend(p6.a0.a);
}
public final Object invokeSuspend(Object p19)
{
int v16_0;
Object v8_0;
int v13_0;
Object v8_2;
int v0_5;
int v4_1;
int v7_0;
String v9_0;
String v2_7;
String v2_9;
String v9_2;
int v12_0;
int v11_0;
int v4_2;
kotlinx.coroutines.sync.Mutex v14_0;
int v7_1;
java.util.Iterator v10_3;
int v0_9 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED();
String v2_8 = this.label;
int v5_2 = 1;
if (v2_8 == null) {
q6.y.Y(p19);
String v2_1 = qbsg.top.ble.BleSession.access$getWriteMutex$p(this.this$0);
v9_0 = this.$chunks;
v8_0 = this.this$0;
v7_1 = this.$hex;
this.L$0 = v2_1;
this.L$1 = v9_0;
this.L$2 = v8_0;
this.L$3 = v7_1;
this.I$0 = 0;
this.label = 1;
if (v2_1.lock(0, this) != v0_9) {
v14_0 = v2_1;
v2_7 = 0;
v10_3 = v9_0.iterator();
v11_0 = v7_1;
v12_0 = v8_0;
v13_0 = v9_0;
v9_2 = v2_7;
v2_9 = 0;
v8_2 = 0;
if (!v10_3.hasNext()) {
int v16_1 = v5_2;
int v0_14 = qbsg.top.ble.BleSession.access$getTag$p(v12_0);
String v2_12 = new StringBuilder();
v2_12.append("\u6240\u6709\u5206\u5305\u53d1\u9001\u6210\u529f: ");
v2_12.append(v11_0);
android.util.Log.i(v0_14, v2_12.toString());
v4_2 = v16_1;
} else {
v7_0 = (v2_9 + 1);
byte[] v15_1 = ((byte[]) v10_3.next());
int v4_0 = qbsg.top.ble.BleSession.access$getTag$p(v12_0);
v16_0 = v5_2;
int v5_0 = v13_0.size();
int v6_0 = v15_1.length;
String v3_1 = new StringBuilder();
Throwable v17 = v0_9;
v3_1.append("\u6b63\u5728\u53d1\u9001\u5206\u5305 (");
v3_1.append(v7_0);
v3_1.append("/");
v3_1.append(v5_0);
v3_1.append("), \u957f\u5ea6: ");
v3_1.append(v6_0);
android.util.Log.v(v4_0, v3_1.toString());
int v0_4 = qbsg.top.ble.BleSession.access$getRxtxChar$p(v12_0);
this.L$0 = v14_0;
this.L$1 = v13_0;
this.L$2 = v12_0;
this.L$3 = v11_0;
this.L$4 = v10_3;
this.L$5 = kotlin.coroutines.jvm.internal.SpillingKt.nullOutSpilledVariable(v15_1);
this.I$0 = v9_2;
this.I$1 = v8_2;
this.I$2 = v7_0;
this.I$3 = v2_9;
this.label = 2;
v0_5 = qbsg.top.ble.BleSession.access$executeWrite(v12_0, v0_4, v15_1, this);
v4_1 = v17;
if (v0_5 == v4_1) {
return v4_1;
} else {
int v5_3 = v2_9;
v2_9 = v7_0;
if (((Boolean) v0_5).booleanValue()) {
v0_9 = v4_1;
v5_2 = v16_0;
int v6 = 0;
} else {
int v0_6 = qbsg.top.ble.BleSession.access$getTag$p(v12_0);
int v5_1 = (v5_3 + 1);
String v2_3 = new StringBuilder();
v2_3.append("\u7b2c ");
v2_3.append(v5_1);
v2_3.append(" \u4e2a\u5206\u5305\u53d1\u9001\u5931\u8d25");
android.util.Log.e(v0_6, v2_3.toString());
v4_2 = 0;
}
}
}
} else {
v4_1 = v0_9;
return v4_1;
}
} else {
if (v2_8 == 1) {
v2_7 = this.I$0;
v7_1 = ((String) this.L$3);
v8_0 = ((qbsg.top.ble.BleSession) this.L$2);
v9_0 = ((java.util.List) this.L$1);
java.util.Iterator v10_2 = ((kotlinx.coroutines.sync.Mutex) this.L$0);
q6.y.Y(p19);
v14_0 = v10_2;
} else {
if (v2_8 != 2) {
throw new IllegalStateException("call to \'resume\' before \'invoke\' with coroutine");
} else {
v2_9 = this.I$3;
v7_0 = this.I$2;
v8_2 = this.I$1;
v9_2 = this.I$0;
v10_3 = ((java.util.Iterator) this.L$4);
v11_0 = ((String) this.L$3);
v12_0 = ((qbsg.top.ble.BleSession) this.L$2);
v13_0 = ((java.util.List) this.L$1);
v14_0 = ((kotlinx.coroutines.sync.Mutex) this.L$0);
try {
q6.y.Y(p19);
v4_1 = v0_9;
v16_0 = 1;
v0_5 = p19;
} catch (int v0_7) {
String v2_5 = 0;
v14_0.unlock(v2_5);
throw v0_7;
}
}
}
}
int v0_8 = kotlin.coroutines.jvm.internal.Boxing.boxBoolean(v4_2);
v14_0.unlock(0);
return v0_8;
}
}