alexandroid/decompiled/jadx/sources/androidx/paging/FlowExtKt$combineWithoutBatching$2$1$1.java
KaKi87 a47fad5135 📦 Add decompiled Alexa 2.2.730155.0 (jadx, apktool, Hermes strings)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 00:04:16 +01:00

179 lines
9.3 KiB
Java

package androidx.paging;
import java.util.concurrent.atomic.AtomicInteger;
import kotlin.Metadata;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlinx.coroutines.CoroutineScope;
import kotlinx.coroutines.channels.SendChannel;
import kotlinx.coroutines.flow.Flow;
import kotlinx.coroutines.flow.FlowCollector;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import rx.Single$$ExternalSyntheticBUOutline0;
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
@Metadata(d1 = {"\u0000\u000e\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\u0010\u0000\u001a\u00020\u0001\"\u0004\b\u0000\u0010\u0002\"\u0004\b\u0001\u0010\u0003\"\u0004\b\u0002\u0010\u0004*\u00020\u0005H\u008a@"}, d2 = {"<anonymous>", "", "T1", "T2", "R", "Lkotlinx/coroutines/CoroutineScope;"}, k = 3, mv = {1, 8, 0}, xi = 176)
@DebugMetadata(c = "androidx.paging.FlowExtKt$combineWithoutBatching$2$1$1", f = "FlowExt.kt", i = {}, l = {148}, m = "invokeSuspend", n = {}, s = {})
@SourceDebugExtension({"SMAP\nFlowExt.kt\nKotlin\n*S Kotlin\n*F\n+ 1 FlowExt.kt\nandroidx/paging/FlowExtKt$combineWithoutBatching$2$1$1\n*L\n1#1,224:1\n*E\n"})
/* loaded from: classes14.dex */
public final class FlowExtKt$combineWithoutBatching$2$1$1 extends SuspendLambda implements Function2<CoroutineScope, Continuation<? super Unit>, Object> {
final /* synthetic */ SimpleProducerScope<R> $$this$simpleChannelFlow;
final /* synthetic */ Flow<Object> $flow;
final /* synthetic */ AtomicInteger $incompleteFlows;
final /* synthetic */ int $index;
final /* synthetic */ UnbatchedFlowCombiner<T1, T2> $unbatchedFlowCombiner;
int label;
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
@Metadata(d1 = {"\u0000\u0012\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0004\n\u0002\u0010\u0000\n\u0002\b\u0002\u0010\u0000\u001a\u00020\u0001\"\u0004\b\u0000\u0010\u0002\"\u0004\b\u0001\u0010\u0003\"\u0004\b\u0002\u0010\u00042\b\u0010\u0005\u001a\u0004\u0018\u00010\u0006H\u008a@¢\u0006\u0004\b\u0007\u0010\b"}, d2 = {"<anonymous>", "", "T1", "T2", "R", "value", "", "emit", "(Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;"}, k = 3, mv = {1, 8, 0}, xi = 176)
@SourceDebugExtension({"SMAP\nFlowExt.kt\nKotlin\n*S Kotlin\n*F\n+ 1 FlowExt.kt\nandroidx/paging/FlowExtKt$combineWithoutBatching$2$1$1$1\n*L\n1#1,224:1\n*E\n"})
/* renamed from: androidx.paging.FlowExtKt$combineWithoutBatching$2$1$1$1, reason: invalid class name */
public static final class AnonymousClass1<T> implements FlowCollector {
final /* synthetic */ int $index;
final /* synthetic */ UnbatchedFlowCombiner<T1, T2> $unbatchedFlowCombiner;
public AnonymousClass1(UnbatchedFlowCombiner<T1, T2> unbatchedFlowCombiner, int i) {
this.$unbatchedFlowCombiner = unbatchedFlowCombiner;
this.$index = i;
}
/* JADX WARN: Code restructure failed: missing block: B:18:0x004d, code lost:
if (kotlinx.coroutines.YieldKt.yield(r0) != r1) goto L22;
*/
/* JADX WARN: Code restructure failed: missing block: B:19:0x004f, code lost:
return r1;
*/
/* JADX WARN: Code restructure failed: missing block: B:21:0x0044, code lost:
if (r7.onNext(r5, r6, r0) == r1) goto L21;
*/
/* JADX WARN: Removed duplicated region for block: B:20:0x0037 */
/* JADX WARN: Removed duplicated region for block: B:8:0x0024 */
@Override // kotlinx.coroutines.flow.FlowCollector
@org.jetbrains.annotations.Nullable
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final java.lang.Object emit(@org.jetbrains.annotations.Nullable java.lang.Object r6, @org.jetbrains.annotations.NotNull kotlin.coroutines.Continuation<? super kotlin.Unit> r7) {
/*
r5 = this;
boolean r0 = r7 instanceof androidx.paging.FlowExtKt$combineWithoutBatching$2$1$1$1$emit$1
if (r0 == 0) goto L13
r0 = r7
androidx.paging.FlowExtKt$combineWithoutBatching$2$1$1$1$emit$1 r0 = (androidx.paging.FlowExtKt$combineWithoutBatching$2$1$1$1$emit$1) r0
int r1 = r0.label
r2 = -2147483648(0xffffffff80000000, float:-0.0)
r3 = r1 & r2
if (r3 == 0) goto L13
int r1 = r1 - r2
r0.label = r1
goto L18
L13:
androidx.paging.FlowExtKt$combineWithoutBatching$2$1$1$1$emit$1 r0 = new androidx.paging.FlowExtKt$combineWithoutBatching$2$1$1$1$emit$1
r0.<init>(r5, r7)
L18:
java.lang.Object r7 = r0.result
java.lang.Object r1 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
int r2 = r0.label
r3 = 2
r4 = 1
if (r2 == 0) goto L37
if (r2 == r4) goto L33
if (r2 != r3) goto L2c
kotlin.ResultKt.throwOnFailure(r7)
goto L50
L2c:
java.lang.String r5 = "call to 'resume' before 'invoke' with coroutine"
rx.Single$$ExternalSyntheticBUOutline0.m$2(r5)
r5 = 0
return r5
L33:
kotlin.ResultKt.throwOnFailure(r7)
goto L47
L37:
kotlin.ResultKt.throwOnFailure(r7)
androidx.paging.UnbatchedFlowCombiner<T1, T2> r7 = r5.$unbatchedFlowCombiner
int r5 = r5.$index
r0.label = r4
java.lang.Object r5 = r7.onNext(r5, r6, r0)
if (r5 != r1) goto L47
goto L4f
L47:
r0.label = r3
java.lang.Object r5 = kotlinx.coroutines.YieldKt.yield(r0)
if (r5 != r1) goto L50
L4f:
return r1
L50:
kotlin.Unit r5 = kotlin.Unit.INSTANCE
return r5
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.paging.FlowExtKt$combineWithoutBatching$2$1$1.AnonymousClass1.emit(java.lang.Object, kotlin.coroutines.Continuation):java.lang.Object");
}
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public FlowExtKt$combineWithoutBatching$2$1$1(Flow<? extends Object> flow, AtomicInteger atomicInteger, SimpleProducerScope<R> simpleProducerScope, UnbatchedFlowCombiner<T1, T2> unbatchedFlowCombiner, int i, Continuation<? super FlowExtKt$combineWithoutBatching$2$1$1> continuation) {
super(2, continuation);
this.$flow = flow;
this.$incompleteFlows = atomicInteger;
this.$$this$simpleChannelFlow = simpleProducerScope;
this.$unbatchedFlowCombiner = unbatchedFlowCombiner;
this.$index = i;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
@NotNull
public final Continuation<Unit> create(@Nullable Object obj, @NotNull Continuation<?> continuation) {
return new FlowExtKt$combineWithoutBatching$2$1$1(this.$flow, this.$incompleteFlows, this.$$this$simpleChannelFlow, this.$unbatchedFlowCombiner, this.$index, continuation);
}
@Override // kotlin.jvm.functions.Function2
@Nullable
public final Object invoke(@NotNull CoroutineScope coroutineScope, @Nullable Continuation<? super Unit> continuation) {
return ((FlowExtKt$combineWithoutBatching$2$1$1) create(coroutineScope, continuation)).invokeSuspend(Unit.INSTANCE);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
@Nullable
public final Object invokeSuspend(@NotNull Object obj) {
AtomicInteger atomicInteger;
Object coroutine_suspended = IntrinsicsKt.getCOROUTINE_SUSPENDED();
int i = this.label;
try {
if (i == 0) {
ResultKt.throwOnFailure(obj);
Flow<Object> flow = this.$flow;
AnonymousClass1 anonymousClass1 = new AnonymousClass1(this.$unbatchedFlowCombiner, this.$index);
this.label = 1;
if (flow.collect(anonymousClass1, this) == coroutine_suspended) {
return coroutine_suspended;
}
} else {
if (i != 1) {
Single$$ExternalSyntheticBUOutline0.m$2("call to 'resume' before 'invoke' with coroutine");
return null;
}
ResultKt.throwOnFailure(obj);
}
if (atomicInteger.decrementAndGet() == 0) {
SendChannel.DefaultImpls.close$default(this.$$this$simpleChannelFlow, null, 1, null);
}
return Unit.INSTANCE;
} finally {
if (this.$incompleteFlows.decrementAndGet() == 0) {
SendChannel.DefaultImpls.close$default(this.$$this$simpleChannelFlow, null, 1, null);
}
}
}
}