alexandroid/decompiled/jadx/sources/androidx/paging/FlowExtKt$simpleRunningReduce$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

196 lines
9.7 KiB
Java

package androidx.paging;
import androidx.exifinterface.media.ExifInterface;
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.functions.Function3;
import kotlin.jvm.internal.Ref;
import kotlinx.coroutines.flow.Flow;
import kotlinx.coroutines.flow.FlowCollector;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import rx.Single$$ExternalSyntheticBUOutline0;
/* JADX INFO: Add missing generic type declarations: [T] */
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
@Metadata(d1 = {"\u0000\f\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\u0010\u0000\u001a\u00020\u0001\"\u0004\b\u0000\u0010\u0002*\b\u0012\u0004\u0012\u0002H\u00020\u0003H\u008a@"}, d2 = {"<anonymous>", "", ExifInterface.GPS_DIRECTION_TRUE, "Lkotlinx/coroutines/flow/FlowCollector;"}, k = 3, mv = {1, 8, 0}, xi = 48)
@DebugMetadata(c = "androidx.paging.FlowExtKt$simpleRunningReduce$1", f = "FlowExt.kt", i = {}, l = {69}, m = "invokeSuspend", n = {}, s = {})
/* loaded from: classes14.dex */
public final class FlowExtKt$simpleRunningReduce$1<T> extends SuspendLambda implements Function2<FlowCollector<? super T>, Continuation<? super Unit>, Object> {
final /* synthetic */ Function3<T, T, Continuation<? super T>, Object> $operation;
final /* synthetic */ Flow<T> $this_simpleRunningReduce;
private /* synthetic */ Object L$0;
int label;
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
@Metadata(d1 = {"\u0000\n\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0004\u0010\u0000\u001a\u00020\u0001\"\u0004\b\u0000\u0010\u00022\u0006\u0010\u0003\u001a\u0002H\u0002H\u008a@¢\u0006\u0004\b\u0004\u0010\u0005"}, d2 = {"<anonymous>", "", ExifInterface.GPS_DIRECTION_TRUE, "value", "emit", "(Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;"}, k = 3, mv = {1, 8, 0}, xi = 48)
/* renamed from: androidx.paging.FlowExtKt$simpleRunningReduce$1$1, reason: invalid class name */
public static final class AnonymousClass1<T> implements FlowCollector {
final /* synthetic */ FlowCollector<T> $$this$flow;
final /* synthetic */ Ref.ObjectRef<Object> $accumulator;
final /* synthetic */ Function3<T, T, Continuation<? super T>, Object> $operation;
/* JADX WARN: Multi-variable type inference failed */
public AnonymousClass1(Ref.ObjectRef<Object> objectRef, Function3<? super T, ? super T, ? super Continuation<? super T>, ? extends Object> function3, FlowCollector<? super T> flowCollector) {
this.$accumulator = objectRef;
this.$operation = function3;
this.$$this$flow = flowCollector;
}
/* JADX WARN: Code restructure failed: missing block: B:19:0x007b, code lost:
if (r8.emit(r7, r0) == r1) goto L26;
*/
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Removed duplicated region for block: B:21:0x003f */
/* 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(T r8, @org.jetbrains.annotations.NotNull kotlin.coroutines.Continuation<? super kotlin.Unit> r9) {
/*
r7 = this;
boolean r0 = r9 instanceof androidx.paging.FlowExtKt$simpleRunningReduce$1$1$emit$1
if (r0 == 0) goto L13
r0 = r9
androidx.paging.FlowExtKt$simpleRunningReduce$1$1$emit$1 r0 = (androidx.paging.FlowExtKt$simpleRunningReduce$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$simpleRunningReduce$1$1$emit$1 r0 = new androidx.paging.FlowExtKt$simpleRunningReduce$1$1$emit$1
r0.<init>(r7, r9)
L18:
java.lang.Object r9 = r0.result
java.lang.Object r1 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
int r2 = r0.label
r3 = 2
r4 = 1
if (r2 == 0) goto L3f
if (r2 == r4) goto L33
if (r2 != r3) goto L2c
kotlin.ResultKt.throwOnFailure(r9)
goto L7e
L2c:
java.lang.String r7 = "call to 'resume' before 'invoke' with coroutine"
rx.Single$$ExternalSyntheticBUOutline0.m$2(r7)
r7 = 0
return r7
L33:
java.lang.Object r7 = r0.L$1
kotlin.jvm.internal.Ref$ObjectRef r7 = (kotlin.jvm.internal.Ref.ObjectRef) r7
java.lang.Object r8 = r0.L$0
androidx.paging.FlowExtKt$simpleRunningReduce$1$1 r8 = (androidx.paging.FlowExtKt$simpleRunningReduce$1.AnonymousClass1) r8
kotlin.ResultKt.throwOnFailure(r9)
goto L64
L3f:
kotlin.ResultKt.throwOnFailure(r9)
kotlin.jvm.internal.Ref$ObjectRef<java.lang.Object> r9 = r7.$accumulator
T r2 = r9.element
java.lang.Object r5 = androidx.paging.FlowExtKt.access$getNULL$p()
if (r2 != r5) goto L4d
goto L68
L4d:
kotlin.jvm.functions.Function3<T, T, kotlin.coroutines.Continuation<? super T>, java.lang.Object> r2 = r7.$operation
kotlin.jvm.internal.Ref$ObjectRef<java.lang.Object> r5 = r7.$accumulator
T r5 = r5.element
r0.L$0 = r7
r0.L$1 = r9
r0.label = r4
java.lang.Object r8 = r2.invoke(r5, r8, r0)
if (r8 != r1) goto L60
goto L7d
L60:
r6 = r8
r8 = r7
r7 = r9
r9 = r6
L64:
r6 = r9
r9 = r7
r7 = r8
r8 = r6
L68:
r9.element = r8
kotlinx.coroutines.flow.FlowCollector<T> r8 = r7.$$this$flow
kotlin.jvm.internal.Ref$ObjectRef<java.lang.Object> r7 = r7.$accumulator
T r7 = r7.element
r9 = 0
r0.L$0 = r9
r0.L$1 = r9
r0.label = r3
java.lang.Object r7 = r8.emit(r7, r0)
if (r7 != r1) goto L7e
L7d:
return r1
L7e:
kotlin.Unit r7 = kotlin.Unit.INSTANCE
return r7
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.paging.FlowExtKt$simpleRunningReduce$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) */
/* JADX WARN: Multi-variable type inference failed */
public FlowExtKt$simpleRunningReduce$1(Flow<? extends T> flow, Function3<? super T, ? super T, ? super Continuation<? super T>, ? extends Object> function3, Continuation<? super FlowExtKt$simpleRunningReduce$1> continuation) {
super(2, continuation);
this.$this_simpleRunningReduce = flow;
this.$operation = function3;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
@NotNull
public final Continuation<Unit> create(@Nullable Object obj, @NotNull Continuation<?> continuation) {
FlowExtKt$simpleRunningReduce$1 flowExtKt$simpleRunningReduce$1 = new FlowExtKt$simpleRunningReduce$1(this.$this_simpleRunningReduce, this.$operation, continuation);
flowExtKt$simpleRunningReduce$1.L$0 = obj;
return flowExtKt$simpleRunningReduce$1;
}
@Override // kotlin.jvm.functions.Function2
@Nullable
public final Object invoke(@NotNull FlowCollector<? super T> flowCollector, @Nullable Continuation<? super Unit> continuation) {
return ((FlowExtKt$simpleRunningReduce$1) create(flowCollector, continuation)).invokeSuspend(Unit.INSTANCE);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
@Nullable
public final Object invokeSuspend(@NotNull Object obj) {
Object obj2;
Object coroutine_suspended = IntrinsicsKt.getCOROUTINE_SUSPENDED();
int i = this.label;
if (i == 0) {
ResultKt.throwOnFailure(obj);
FlowCollector flowCollector = (FlowCollector) this.L$0;
Ref.ObjectRef objectRef = new Ref.ObjectRef();
obj2 = FlowExtKt.NULL;
objectRef.element = (T) obj2;
Flow<T> flow = this.$this_simpleRunningReduce;
AnonymousClass1 anonymousClass1 = new AnonymousClass1(objectRef, this.$operation, flowCollector);
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);
}
return Unit.INSTANCE;
}
}