package com.tencent.map.lib.gl;

import com.tencent.map.lib.gl.e.h;
import com.tencent.matrix.trace.core.AppMethodBeat;
import java.lang.ref.WeakReference;
import java.util.ArrayList;

class e$i extends Thread {
    private boolean a;
    private boolean b;
    private boolean c;
    private boolean d;
    private boolean e;
    private boolean f;
    private boolean g;
    private boolean h;
    private boolean i;
    private boolean j;
    private boolean k;
    private int l = 0;
    private int m = 0;
    private int n = 1;
    private boolean o = true;
    private boolean p;
    private ArrayList<Runnable> q = new ArrayList();
    private boolean r = true;
    private h s;
    private WeakReference<e> t;

    e$i(WeakReference<e> weakReference) {
        AppMethodBeat.i(98075);
        this.t = weakReference;
        AppMethodBeat.o(98075);
    }

    public void run() {
        AppMethodBeat.i(98076);
        setName("GLThread " + getId());
        try {
            l();
        } catch (InterruptedException e) {
        } finally {
            e.c().a(this);
            AppMethodBeat.o(98076);
        }
    }

    private void j() {
        AppMethodBeat.i(98077);
        if (this.i) {
            this.i = false;
            this.s.e();
        }
        AppMethodBeat.o(98077);
    }

    private void k() {
        AppMethodBeat.i(98078);
        if (this.h) {
            this.s.f();
            this.h = false;
            e.c().c(this);
        }
        AppMethodBeat.o(98078);
    }

    /* JADX WARNING: Removed duplicated region for block: B:20:0x0065 A:{SYNTHETIC, Splitter:B:20:0x0065} */
    /* JADX WARNING: Removed duplicated region for block: B:110:0x01f8  */
    /* JADX WARNING: Removed duplicated region for block: B:26:0x007e A:{SYNTHETIC, Splitter:B:26:0x007e} */
    private void l() {
        /*
        r17 = this;
        r1 = 98079; // 0x17f1f float:1.37438E-40 double:4.84575E-319;
        com.tencent.matrix.trace.core.AppMethodBeat.i(r1);
        r1 = new com.tencent.map.lib.gl.e$h;
        r0 = r17;
        r2 = r0.t;
        r1.<init>(r2);
        r0 = r17;
        r0.s = r1;
        r1 = 0;
        r0 = r17;
        r0.h = r1;
        r1 = 0;
        r0 = r17;
        r0.i = r1;
        r1 = 0;
        r12 = 0;
        r3 = 0;
        r11 = 0;
        r10 = 0;
        r9 = 0;
        r8 = 0;
        r2 = 0;
        r7 = 0;
        r6 = 0;
        r5 = 0;
        r4 = 0;
        r14 = r1;
    L_0x002a:
        r15 = com.tencent.map.lib.gl.e.c();	 Catch:{ Exception -> 0x01cf, all -> 0x02ac }
        monitor-enter(r15);	 Catch:{ Exception -> 0x01cf, all -> 0x02ac }
    L_0x002f:
        r0 = r17;
        r1 = r0.a;	 Catch:{ all -> 0x01c6 }
        if (r1 == 0) goto L_0x0065;
    L_0x0035:
        r0 = r17;
        r1 = r0.t;	 Catch:{ all -> 0x01c6 }
        r1 = r1.get();	 Catch:{ all -> 0x01c6 }
        r1 = (com.tencent.map.lib.gl.e) r1;	 Catch:{ all -> 0x01c6 }
        if (r1 == 0) goto L_0x0048;
    L_0x0041:
        r1 = com.tencent.map.lib.gl.e.g(r1);	 Catch:{ all -> 0x01c6 }
        r1.j();	 Catch:{ all -> 0x01c6 }
    L_0x0048:
        monitor-exit(r15);	 Catch:{ all -> 0x01c6 }
        r2 = com.tencent.map.lib.gl.e.c();
        monitor-enter(r2);
        r17.j();	 Catch:{ all -> 0x005c }
        r17.k();	 Catch:{ all -> 0x005c }
        monitor-exit(r2);	 Catch:{ all -> 0x005c }
        r1 = 98079; // 0x17f1f float:1.37438E-40 double:4.84575E-319;
        com.tencent.matrix.trace.core.AppMethodBeat.o(r1);
    L_0x005b:
        return;
    L_0x005c:
        r1 = move-exception;
        monitor-exit(r2);	 Catch:{ all -> 0x005c }
        r2 = 98079; // 0x17f1f float:1.37438E-40 double:4.84575E-319;
        com.tencent.matrix.trace.core.AppMethodBeat.o(r2);
        throw r1;
    L_0x0065:
        r0 = r17;
        r1 = r0.q;	 Catch:{ all -> 0x01c6 }
        r1 = r1.isEmpty();	 Catch:{ all -> 0x01c6 }
        if (r1 != 0) goto L_0x0083;
    L_0x006f:
        r0 = r17;
        r1 = r0.q;	 Catch:{ all -> 0x01c6 }
        r4 = 0;
        r1 = r1.remove(r4);	 Catch:{ all -> 0x01c6 }
        r1 = (java.lang.Runnable) r1;	 Catch:{ all -> 0x01c6 }
        r4 = r1;
    L_0x007b:
        monitor-exit(r15);	 Catch:{ all -> 0x01c6 }
        if (r4 == 0) goto L_0x01f8;
    L_0x007e:
        r4.run();	 Catch:{ Exception -> 0x01cf, all -> 0x02ac }
        r4 = 0;
        goto L_0x002a;
    L_0x0083:
        r1 = 0;
        r0 = r17;
        r13 = r0.d;	 Catch:{ all -> 0x01c6 }
        r0 = r17;
        r0 = r0.c;	 Catch:{ all -> 0x01c6 }
        r16 = r0;
        r0 = r16;
        if (r13 == r0) goto L_0x0305;
    L_0x0092:
        r0 = r17;
        r1 = r0.c;	 Catch:{ all -> 0x01c6 }
        r0 = r17;
        r13 = r0.c;	 Catch:{ all -> 0x01c6 }
        r0 = r17;
        r0.d = r13;	 Catch:{ all -> 0x01c6 }
        r13 = com.tencent.map.lib.gl.e.c();	 Catch:{ all -> 0x01c6 }
        r13.notifyAll();	 Catch:{ all -> 0x01c6 }
        r13 = r1;
    L_0x00a6:
        r0 = r17;
        r1 = r0.k;	 Catch:{ all -> 0x01c6 }
        if (r1 == 0) goto L_0x00b8;
    L_0x00ac:
        r17.j();	 Catch:{ all -> 0x01c6 }
        r17.k();	 Catch:{ all -> 0x01c6 }
        r1 = 0;
        r0 = r17;
        r0.k = r1;	 Catch:{ all -> 0x01c6 }
        r7 = 1;
    L_0x00b8:
        if (r10 == 0) goto L_0x00c1;
    L_0x00ba:
        r17.j();	 Catch:{ all -> 0x01c6 }
        r17.k();	 Catch:{ all -> 0x01c6 }
        r10 = 0;
    L_0x00c1:
        if (r13 == 0) goto L_0x00cc;
    L_0x00c3:
        r0 = r17;
        r1 = r0.i;	 Catch:{ all -> 0x01c6 }
        if (r1 == 0) goto L_0x00cc;
    L_0x00c9:
        r17.j();	 Catch:{ all -> 0x01c6 }
    L_0x00cc:
        if (r13 == 0) goto L_0x00f0;
    L_0x00ce:
        r0 = r17;
        r1 = r0.h;	 Catch:{ all -> 0x01c6 }
        if (r1 == 0) goto L_0x00f0;
    L_0x00d4:
        r0 = r17;
        r1 = r0.t;	 Catch:{ all -> 0x01c6 }
        r1 = r1.get();	 Catch:{ all -> 0x01c6 }
        r1 = (com.tencent.map.lib.gl.e) r1;	 Catch:{ all -> 0x01c6 }
        if (r1 != 0) goto L_0x019f;
    L_0x00e0:
        r1 = 0;
    L_0x00e1:
        if (r1 == 0) goto L_0x00ed;
    L_0x00e3:
        r1 = com.tencent.map.lib.gl.e.c();	 Catch:{ all -> 0x01c6 }
        r1 = r1.a();	 Catch:{ all -> 0x01c6 }
        if (r1 == 0) goto L_0x00f0;
    L_0x00ed:
        r17.k();	 Catch:{ all -> 0x01c6 }
    L_0x00f0:
        if (r13 == 0) goto L_0x0103;
    L_0x00f2:
        r1 = com.tencent.map.lib.gl.e.c();	 Catch:{ all -> 0x01c6 }
        r1 = r1.b();	 Catch:{ all -> 0x01c6 }
        if (r1 == 0) goto L_0x0103;
    L_0x00fc:
        r0 = r17;
        r1 = r0.s;	 Catch:{ all -> 0x01c6 }
        r1.f();	 Catch:{ all -> 0x01c6 }
    L_0x0103:
        r0 = r17;
        r1 = r0.e;	 Catch:{ all -> 0x01c6 }
        if (r1 != 0) goto L_0x0129;
    L_0x0109:
        r0 = r17;
        r1 = r0.g;	 Catch:{ all -> 0x01c6 }
        if (r1 != 0) goto L_0x0129;
    L_0x010f:
        r0 = r17;
        r1 = r0.i;	 Catch:{ all -> 0x01c6 }
        if (r1 == 0) goto L_0x0118;
    L_0x0115:
        r17.j();	 Catch:{ all -> 0x01c6 }
    L_0x0118:
        r1 = 1;
        r0 = r17;
        r0.g = r1;	 Catch:{ all -> 0x01c6 }
        r1 = 0;
        r0 = r17;
        r0.f = r1;	 Catch:{ all -> 0x01c6 }
        r1 = com.tencent.map.lib.gl.e.c();	 Catch:{ all -> 0x01c6 }
        r1.notifyAll();	 Catch:{ all -> 0x01c6 }
    L_0x0129:
        r0 = r17;
        r1 = r0.e;	 Catch:{ all -> 0x01c6 }
        if (r1 == 0) goto L_0x0141;
    L_0x012f:
        r0 = r17;
        r1 = r0.g;	 Catch:{ all -> 0x01c6 }
        if (r1 == 0) goto L_0x0141;
    L_0x0135:
        r1 = 0;
        r0 = r17;
        r0.g = r1;	 Catch:{ all -> 0x01c6 }
        r1 = com.tencent.map.lib.gl.e.c();	 Catch:{ all -> 0x01c6 }
        r1.notifyAll();	 Catch:{ all -> 0x01c6 }
    L_0x0141:
        if (r2 == 0) goto L_0x0151;
    L_0x0143:
        r8 = 0;
        r2 = 0;
        r1 = 1;
        r0 = r17;
        r0.p = r1;	 Catch:{ all -> 0x01c6 }
        r1 = com.tencent.map.lib.gl.e.c();	 Catch:{ all -> 0x01c6 }
        r1.notifyAll();	 Catch:{ all -> 0x01c6 }
    L_0x0151:
        r1 = r17.m();	 Catch:{ all -> 0x01c6 }
        if (r1 == 0) goto L_0x01ef;
    L_0x0157:
        r0 = r17;
        r1 = r0.h;	 Catch:{ all -> 0x01c6 }
        if (r1 != 0) goto L_0x0160;
    L_0x015d:
        if (r7 == 0) goto L_0x01a5;
    L_0x015f:
        r7 = 0;
    L_0x0160:
        r0 = r17;
        r1 = r0.h;	 Catch:{ all -> 0x01c6 }
        if (r1 == 0) goto L_0x0174;
    L_0x0166:
        r0 = r17;
        r1 = r0.i;	 Catch:{ all -> 0x01c6 }
        if (r1 != 0) goto L_0x0174;
    L_0x016c:
        r1 = 1;
        r0 = r17;
        r0.i = r1;	 Catch:{ all -> 0x01c6 }
        r3 = 1;
        r11 = 1;
        r9 = 1;
    L_0x0174:
        r0 = r17;
        r1 = r0.i;	 Catch:{ all -> 0x01c6 }
        if (r1 == 0) goto L_0x01ef;
    L_0x017a:
        r0 = r17;
        r1 = r0.r;	 Catch:{ all -> 0x01c6 }
        if (r1 == 0) goto L_0x0302;
    L_0x0180:
        r9 = 1;
        r0 = r17;
        r6 = r0.l;	 Catch:{ all -> 0x01c6 }
        r0 = r17;
        r1 = r0.m;	 Catch:{ all -> 0x01c6 }
        r8 = 1;
        r3 = 1;
        r5 = 0;
        r0 = r17;
        r0.r = r5;	 Catch:{ all -> 0x01c6 }
    L_0x0190:
        r5 = 0;
        r0 = r17;
        r0.o = r5;	 Catch:{ all -> 0x01c6 }
        r5 = com.tencent.map.lib.gl.e.c();	 Catch:{ all -> 0x01c6 }
        r5.notifyAll();	 Catch:{ all -> 0x01c6 }
        r5 = r1;
        goto L_0x007b;
    L_0x019f:
        r1 = com.tencent.map.lib.gl.e.h(r1);	 Catch:{ all -> 0x01c6 }
        goto L_0x00e1;
    L_0x01a5:
        r1 = com.tencent.map.lib.gl.e.c();	 Catch:{ all -> 0x01c6 }
        r0 = r17;
        r1 = r1.b(r0);	 Catch:{ all -> 0x01c6 }
        if (r1 == 0) goto L_0x0160;
    L_0x01b1:
        r0 = r17;
        r1 = r0.s;	 Catch:{ RuntimeException -> 0x01e4 }
        r1.a();	 Catch:{ RuntimeException -> 0x01e4 }
    L_0x01b8:
        r1 = 1;
        r0 = r17;
        r0.h = r1;	 Catch:{ all -> 0x01c6 }
        r12 = 1;
        r1 = com.tencent.map.lib.gl.e.c();	 Catch:{ all -> 0x01c6 }
        r1.notifyAll();	 Catch:{ all -> 0x01c6 }
        goto L_0x0160;
    L_0x01c6:
        r1 = move-exception;
        monitor-exit(r15);	 Catch:{ all -> 0x01c6 }
        r2 = 98079; // 0x17f1f float:1.37438E-40 double:4.84575E-319;
        com.tencent.matrix.trace.core.AppMethodBeat.o(r2);	 Catch:{ Exception -> 0x01cf, all -> 0x02ac }
        throw r1;	 Catch:{ Exception -> 0x01cf, all -> 0x02ac }
    L_0x01cf:
        r1 = move-exception;
        r2 = com.tencent.map.lib.gl.e.c();
        monitor-enter(r2);
        r17.j();	 Catch:{ all -> 0x02ed }
        r17.k();	 Catch:{ all -> 0x02ed }
        monitor-exit(r2);	 Catch:{ all -> 0x02ed }
        r1 = 98079; // 0x17f1f float:1.37438E-40 double:4.84575E-319;
        com.tencent.matrix.trace.core.AppMethodBeat.o(r1);
        goto L_0x005b;
    L_0x01e4:
        r1 = move-exception;
        r1 = com.tencent.map.lib.gl.e.c();	 Catch:{ all -> 0x01c6 }
        r0 = r17;
        r1.c(r0);	 Catch:{ all -> 0x01c6 }
        goto L_0x01b8;
    L_0x01ef:
        r1 = com.tencent.map.lib.gl.e.c();	 Catch:{ all -> 0x01c6 }
        r1.wait();	 Catch:{ all -> 0x01c6 }
        goto L_0x002f;
    L_0x01f8:
        if (r3 == 0) goto L_0x0218;
    L_0x01fa:
        r0 = r17;
        r1 = r0.s;	 Catch:{ Exception -> 0x01cf, all -> 0x02ac }
        r1 = r1.b();	 Catch:{ Exception -> 0x01cf, all -> 0x02ac }
        if (r1 == 0) goto L_0x02c0;
    L_0x0204:
        r3 = com.tencent.map.lib.gl.e.c();	 Catch:{ Exception -> 0x01cf, all -> 0x02ac }
        monitor-enter(r3);	 Catch:{ Exception -> 0x01cf, all -> 0x02ac }
        r1 = 1;
        r0 = r17;
        r0.j = r1;	 Catch:{ all -> 0x02a3 }
        r1 = com.tencent.map.lib.gl.e.c();	 Catch:{ all -> 0x02a3 }
        r1.notifyAll();	 Catch:{ all -> 0x02a3 }
        monitor-exit(r3);	 Catch:{ all -> 0x02a3 }
        r1 = 0;
        r3 = r1;
    L_0x0218:
        if (r11 == 0) goto L_0x02ff;
    L_0x021a:
        r0 = r17;
        r1 = r0.s;	 Catch:{ Exception -> 0x01cf, all -> 0x02ac }
        r1 = r1.c();	 Catch:{ Exception -> 0x01cf, all -> 0x02ac }
        r1 = (javax.microedition.khronos.opengles.GL10) r1;	 Catch:{ Exception -> 0x01cf, all -> 0x02ac }
        r11 = com.tencent.map.lib.gl.e.c();	 Catch:{ Exception -> 0x01cf, all -> 0x02ac }
        r11.a(r1);	 Catch:{ Exception -> 0x01cf, all -> 0x02ac }
        r11 = 0;
        r13 = r1;
    L_0x022d:
        if (r12 == 0) goto L_0x0249;
    L_0x022f:
        r0 = r17;
        r1 = r0.t;	 Catch:{ Exception -> 0x01cf, all -> 0x02ac }
        r1 = r1.get();	 Catch:{ Exception -> 0x01cf, all -> 0x02ac }
        r1 = (com.tencent.map.lib.gl.e) r1;	 Catch:{ Exception -> 0x01cf, all -> 0x02ac }
        if (r1 == 0) goto L_0x0248;
    L_0x023b:
        r1 = com.tencent.map.lib.gl.e.g(r1);	 Catch:{ Exception -> 0x01cf, all -> 0x02ac }
        r0 = r17;
        r12 = r0.s;	 Catch:{ Exception -> 0x01cf, all -> 0x02ac }
        r12 = r12.d;	 Catch:{ Exception -> 0x01cf, all -> 0x02ac }
        r1.a(r13, r12);	 Catch:{ Exception -> 0x01cf, all -> 0x02ac }
    L_0x0248:
        r12 = 0;
    L_0x0249:
        if (r9 == 0) goto L_0x025f;
    L_0x024b:
        r0 = r17;
        r1 = r0.t;	 Catch:{ Exception -> 0x01cf, all -> 0x02ac }
        r1 = r1.get();	 Catch:{ Exception -> 0x01cf, all -> 0x02ac }
        r1 = (com.tencent.map.lib.gl.e) r1;	 Catch:{ Exception -> 0x01cf, all -> 0x02ac }
        if (r1 == 0) goto L_0x025e;
    L_0x0257:
        r1 = com.tencent.map.lib.gl.e.g(r1);	 Catch:{ Exception -> 0x01cf, all -> 0x02ac }
        r1.a(r13, r6, r5);	 Catch:{ Exception -> 0x01cf, all -> 0x02ac }
    L_0x025e:
        r9 = 0;
    L_0x025f:
        r14 = 0;
        r0 = r17;
        r1 = r0.t;	 Catch:{ Exception -> 0x01cf, all -> 0x02ac }
        r1 = r1.get();	 Catch:{ Exception -> 0x01cf, all -> 0x02ac }
        r1 = (com.tencent.map.lib.gl.e) r1;	 Catch:{ Exception -> 0x01cf, all -> 0x02ac }
        if (r1 == 0) goto L_0x030a;
    L_0x026c:
        r1 = com.tencent.map.lib.gl.e.g(r1);	 Catch:{ Exception -> 0x01cf, all -> 0x02ac }
        r1 = r1.a(r13);	 Catch:{ Exception -> 0x01cf, all -> 0x02ac }
    L_0x0274:
        if (r1 == 0) goto L_0x029c;
    L_0x0276:
        r0 = r17;
        r1 = r0.s;	 Catch:{ Exception -> 0x01cf, all -> 0x02ac }
        r1 = r1.d();	 Catch:{ Exception -> 0x01cf, all -> 0x02ac }
        switch(r1) {
            case 12288: goto L_0x029c;
            case 12302: goto L_0x02e2;
            default: goto L_0x0281;
        };	 Catch:{ Exception -> 0x01cf, all -> 0x02ac }
    L_0x0281:
        r14 = "GLThread";
        r15 = "eglSwapBuffers";
        com.tencent.map.lib.gl.e.h.a(r14, r15, r1);	 Catch:{ Exception -> 0x01cf, all -> 0x02ac }
        r14 = com.tencent.map.lib.gl.e.c();	 Catch:{ Exception -> 0x01cf, all -> 0x02ac }
        monitor-enter(r14);	 Catch:{ Exception -> 0x01cf, all -> 0x02ac }
        r1 = 1;
        r0 = r17;
        r0.f = r1;	 Catch:{ all -> 0x02e4 }
        r1 = com.tencent.map.lib.gl.e.c();	 Catch:{ all -> 0x02e4 }
        r1.notifyAll();	 Catch:{ all -> 0x02e4 }
        monitor-exit(r14);	 Catch:{ all -> 0x02e4 }
    L_0x029c:
        if (r8 == 0) goto L_0x0308;
    L_0x029e:
        r1 = 1;
    L_0x029f:
        r2 = r1;
        r14 = r13;
        goto L_0x002a;
    L_0x02a3:
        r1 = move-exception;
        monitor-exit(r3);	 Catch:{ all -> 0x02a3 }
        r2 = 98079; // 0x17f1f float:1.37438E-40 double:4.84575E-319;
        com.tencent.matrix.trace.core.AppMethodBeat.o(r2);	 Catch:{ Exception -> 0x01cf, all -> 0x02ac }
        throw r1;	 Catch:{ Exception -> 0x01cf, all -> 0x02ac }
    L_0x02ac:
        r1 = move-exception;
        r2 = com.tencent.map.lib.gl.e.c();
        monitor-enter(r2);
        r17.j();	 Catch:{ all -> 0x02f6 }
        r17.k();	 Catch:{ all -> 0x02f6 }
        monitor-exit(r2);	 Catch:{ all -> 0x02f6 }
        r2 = 98079; // 0x17f1f float:1.37438E-40 double:4.84575E-319;
        com.tencent.matrix.trace.core.AppMethodBeat.o(r2);
        throw r1;
    L_0x02c0:
        r13 = com.tencent.map.lib.gl.e.c();	 Catch:{ Exception -> 0x01cf, all -> 0x02ac }
        monitor-enter(r13);	 Catch:{ Exception -> 0x01cf, all -> 0x02ac }
        r1 = 1;
        r0 = r17;
        r0.j = r1;	 Catch:{ all -> 0x02d9 }
        r1 = 1;
        r0 = r17;
        r0.f = r1;	 Catch:{ all -> 0x02d9 }
        r1 = com.tencent.map.lib.gl.e.c();	 Catch:{ all -> 0x02d9 }
        r1.notifyAll();	 Catch:{ all -> 0x02d9 }
        monitor-exit(r13);	 Catch:{ all -> 0x02d9 }
        goto L_0x002a;
    L_0x02d9:
        r1 = move-exception;
        monitor-exit(r13);	 Catch:{ all -> 0x02d9 }
        r2 = 98079; // 0x17f1f float:1.37438E-40 double:4.84575E-319;
        com.tencent.matrix.trace.core.AppMethodBeat.o(r2);	 Catch:{ Exception -> 0x01cf, all -> 0x02ac }
        throw r1;	 Catch:{ Exception -> 0x01cf, all -> 0x02ac }
    L_0x02e2:
        r10 = 1;
        goto L_0x029c;
    L_0x02e4:
        r1 = move-exception;
        monitor-exit(r14);	 Catch:{ all -> 0x02e4 }
        r2 = 98079; // 0x17f1f float:1.37438E-40 double:4.84575E-319;
        com.tencent.matrix.trace.core.AppMethodBeat.o(r2);	 Catch:{ Exception -> 0x01cf, all -> 0x02ac }
        throw r1;	 Catch:{ Exception -> 0x01cf, all -> 0x02ac }
    L_0x02ed:
        r1 = move-exception;
        monitor-exit(r2);	 Catch:{ all -> 0x02ed }
        r2 = 98079; // 0x17f1f float:1.37438E-40 double:4.84575E-319;
        com.tencent.matrix.trace.core.AppMethodBeat.o(r2);
        throw r1;
    L_0x02f6:
        r1 = move-exception;
        monitor-exit(r2);	 Catch:{ all -> 0x02f6 }
        r2 = 98079; // 0x17f1f float:1.37438E-40 double:4.84575E-319;
        com.tencent.matrix.trace.core.AppMethodBeat.o(r2);
        throw r1;
    L_0x02ff:
        r13 = r14;
        goto L_0x022d;
    L_0x0302:
        r1 = r5;
        goto L_0x0190;
    L_0x0305:
        r13 = r1;
        goto L_0x00a6;
    L_0x0308:
        r1 = r2;
        goto L_0x029f;
    L_0x030a:
        r1 = r14;
        goto L_0x0274;
        */
        throw new UnsupportedOperationException("Method not decompiled: com.tencent.map.lib.gl.e$i.l():void");
    }

    public boolean a() {
        AppMethodBeat.i(98080);
        if (this.h && this.i && m()) {
            AppMethodBeat.o(98080);
            return true;
        }
        AppMethodBeat.o(98080);
        return false;
    }

    private boolean m() {
        return !this.d && this.e && !this.f && this.l > 0 && this.m > 0 && (this.o || this.n == 1);
    }

    public void a(int i) {
        AppMethodBeat.i(98081);
        if (i < 0 || i > 1) {
            IllegalArgumentException illegalArgumentException = new IllegalArgumentException("renderMode");
            AppMethodBeat.o(98081);
            throw illegalArgumentException;
        }
        synchronized (e.c()) {
            try {
                this.n = i;
                e.c().notifyAll();
            } finally {
                while (true) {
                }
                AppMethodBeat.o(98081);
            }
        }
    }

    public int b() {
        int i;
        AppMethodBeat.i(98082);
        synchronized (e.c()) {
            try {
                i = this.n;
            } finally {
                while (true) {
                }
                AppMethodBeat.o(98082);
            }
        }
        return i;
    }

    public void c() {
        AppMethodBeat.i(98083);
        synchronized (e.c()) {
            try {
                this.o = true;
                e.c().notifyAll();
            } finally {
                while (true) {
                }
                AppMethodBeat.o(98083);
            }
        }
    }

    public void d() {
        AppMethodBeat.i(98084);
        synchronized (e.c()) {
            try {
                this.e = true;
                this.j = false;
                e.c().notifyAll();
                while (this.g && !this.j && !this.b) {
                    e.c().wait();
                }
            } catch (InterruptedException e) {
                Thread.currentThread().interrupt();
            } catch (Throwable th) {
                AppMethodBeat.o(98084);
            }
        }
        AppMethodBeat.o(98084);
    }

    public void e() {
        AppMethodBeat.i(98085);
        synchronized (e.c()) {
            try {
                this.e = false;
                e.c().notifyAll();
                while (!this.g && !this.b) {
                    e.c().wait();
                }
            } catch (InterruptedException e) {
                Thread.currentThread().interrupt();
            } catch (Throwable th) {
                AppMethodBeat.o(98085);
            }
        }
        AppMethodBeat.o(98085);
    }

    public void f() {
        AppMethodBeat.i(98086);
        synchronized (e.c()) {
            try {
                this.c = true;
                e.c().notifyAll();
                while (!this.b && !this.d) {
                    e.c().wait();
                }
            } catch (InterruptedException e) {
                Thread.currentThread().interrupt();
            } catch (Throwable th) {
                AppMethodBeat.o(98086);
            }
        }
        AppMethodBeat.o(98086);
    }

    public void g() {
        AppMethodBeat.i(98087);
        synchronized (e.c()) {
            try {
                this.c = false;
                this.o = true;
                this.p = false;
                e.c().notifyAll();
                while (!this.b && this.d && !this.p) {
                    e.c().wait();
                }
            } catch (InterruptedException e) {
                Thread.currentThread().interrupt();
            } catch (Throwable th) {
                AppMethodBeat.o(98087);
            }
        }
        AppMethodBeat.o(98087);
    }

    public void a(int i, int i2) {
        AppMethodBeat.i(98088);
        synchronized (e.c()) {
            try {
                this.l = i;
                this.m = i2;
                this.r = true;
                this.o = true;
                this.p = false;
                e.c().notifyAll();
                while (!this.b && !this.d && !this.p && a()) {
                    e.c().wait();
                }
            } catch (InterruptedException e) {
                Thread.currentThread().interrupt();
            } catch (Throwable th) {
                AppMethodBeat.o(98088);
            }
        }
        AppMethodBeat.o(98088);
    }

    public void h() {
        AppMethodBeat.i(98089);
        synchronized (e.c()) {
            try {
                this.a = true;
                e.c().notifyAll();
                while (!this.b) {
                    e.c().wait();
                }
            } catch (InterruptedException e) {
                Thread.currentThread().interrupt();
            } catch (Throwable th) {
                AppMethodBeat.o(98089);
            }
        }
        AppMethodBeat.o(98089);
    }

    public void i() {
        AppMethodBeat.i(98090);
        this.k = true;
        e.c().notifyAll();
        AppMethodBeat.o(98090);
    }
}
