package O2;

/* JADX INFO: loaded from: classes.dex */
public final /* synthetic */ class e implements Runnable {

    /* JADX INFO: renamed from: k, reason: collision with root package name */
    public final /* synthetic */ int f2294k;

    /* JADX INFO: renamed from: l, reason: collision with root package name */
    public final /* synthetic */ g f2295l;

    /* JADX INFO: renamed from: m, reason: collision with root package name */
    public final /* synthetic */ Runnable f2296m;

    /* JADX INFO: renamed from: n, reason: collision with root package name */
    public final /* synthetic */ g3.c f2297n;

    public /* synthetic */ e(g gVar, Runnable runnable, g3.c cVar, int i) {
        this.f2294k = i;
        this.f2295l = gVar;
        this.f2296m = runnable;
        this.f2297n = cVar;
    }

    @Override // java.lang.Runnable
    public final void run() {
        switch (this.f2294k) {
            case 0:
                g gVar = this.f2295l;
                final g3.c cVar = this.f2297n;
                final Runnable runnable = this.f2296m;
                final int i = 0;
                gVar.f2301k.execute(new Runnable() { // from class: O2.c
                    @Override // java.lang.Runnable
                    public final void run() throws Exception {
                        switch (i) {
                            case 0:
                                try {
                                    runnable.run();
                                    return;
                                } catch (Exception e2) {
                                    ((i) cVar.f6465l).k(e2);
                                    throw e2;
                                }
                            case 1:
                                try {
                                    runnable.run();
                                    return;
                                } catch (Exception e6) {
                                    ((i) cVar.f6465l).k(e6);
                                    return;
                                }
                            default:
                                Runnable runnable2 = runnable;
                                i iVar = (i) cVar.f6465l;
                                try {
                                    runnable2.run();
                                    iVar.j(null);
                                    return;
                                } catch (Exception e7) {
                                    iVar.k(e7);
                                    return;
                                }
                        }
                    }
                });
                break;
            case 1:
                g gVar2 = this.f2295l;
                final g3.c cVar2 = this.f2297n;
                final Runnable runnable2 = this.f2296m;
                final int i5 = 2;
                gVar2.f2301k.execute(new Runnable() { // from class: O2.c
                    @Override // java.lang.Runnable
                    public final void run() throws Exception {
                        switch (i5) {
                            case 0:
                                try {
                                    runnable2.run();
                                    return;
                                } catch (Exception e2) {
                                    ((i) cVar2.f6465l).k(e2);
                                    throw e2;
                                }
                            case 1:
                                try {
                                    runnable2.run();
                                    return;
                                } catch (Exception e6) {
                                    ((i) cVar2.f6465l).k(e6);
                                    return;
                                }
                            default:
                                Runnable runnable22 = runnable2;
                                i iVar = (i) cVar2.f6465l;
                                try {
                                    runnable22.run();
                                    iVar.j(null);
                                    return;
                                } catch (Exception e7) {
                                    iVar.k(e7);
                                    return;
                                }
                        }
                    }
                });
                break;
            default:
                g gVar3 = this.f2295l;
                final g3.c cVar3 = this.f2297n;
                final Runnable runnable3 = this.f2296m;
                final int i6 = 1;
                gVar3.f2301k.execute(new Runnable() { // from class: O2.c
                    @Override // java.lang.Runnable
                    public final void run() throws Exception {
                        switch (i6) {
                            case 0:
                                try {
                                    runnable3.run();
                                    return;
                                } catch (Exception e2) {
                                    ((i) cVar3.f6465l).k(e2);
                                    throw e2;
                                }
                            case 1:
                                try {
                                    runnable3.run();
                                    return;
                                } catch (Exception e6) {
                                    ((i) cVar3.f6465l).k(e6);
                                    return;
                                }
                            default:
                                Runnable runnable22 = runnable3;
                                i iVar = (i) cVar3.f6465l;
                                try {
                                    runnable22.run();
                                    iVar.j(null);
                                    return;
                                } catch (Exception e7) {
                                    iVar.k(e7);
                                    return;
                                }
                        }
                    }
                });
                break;
        }
    }
}
