package com.google.android.m4b.maps.x;

import android.opengl.GLDebugHelper;
import android.view.SurfaceHolder;
import android.view.SurfaceHolder.Callback;
import android.view.SurfaceView;
import java.io.Writer;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import javax.microedition.khronos.egl.EGL10;
import javax.microedition.khronos.egl.EGLConfig;
import javax.microedition.khronos.egl.EGLContext;
import javax.microedition.khronos.egl.EGLDisplay;
import javax.microedition.khronos.egl.EGLSurface;
import javax.microedition.khronos.opengles.GL;
import javax.microedition.khronos.opengles.GL10;

public class d extends SurfaceView
  implements SurfaceHolder.Callback
{
  private static final c a = new c((byte)0);
  private b b;
  private boolean c;

  protected void finalize()
  {
    try
    {
      if (this.b != null)
        this.b.d();
      return;
    }
    finally
    {
      super.finalize();
    }
  }

  protected void onAttachedToWindow()
  {
    super.onAttachedToWindow();
    this.c = false;
  }

  protected void onDetachedFromWindow()
  {
    if (this.b != null)
      this.b.d();
    this.c = true;
    super.onDetachedFromWindow();
  }

  public void queueEvent(Runnable paramRunnable)
  {
    this.b.a(paramRunnable);
  }

  public void requestRender()
  {
    this.b.a();
  }

  public void surfaceChanged(SurfaceHolder paramSurfaceHolder, int paramInt1, int paramInt2, int paramInt3)
  {
    this.b.a(paramInt2, paramInt3);
  }

  public void surfaceCreated(SurfaceHolder paramSurfaceHolder)
  {
    this.b.b();
  }

  public void surfaceDestroyed(SurfaceHolder paramSurfaceHolder)
  {
    this.b.c();
  }

  static final class a
  {
    EGL10 a;
    EGLDisplay b;
    EGLSurface c;
    EGLConfig d;
    private final WeakReference<d> e;
    private EGLContext f;

    public a(WeakReference<d> paramWeakReference)
    {
      this.e = paramWeakReference;
    }

    public static String a(String paramString, int paramInt)
    {
      return paramString + " failed: " + paramInt;
    }

    private void f()
    {
      if ((this.c != null) && (this.c != EGL10.EGL_NO_SURFACE))
      {
        this.a.eglMakeCurrent(this.b, EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_CONTEXT);
        d locald = (d)this.e.get();
        if (locald != null)
          d.c(locald);
        this.c = null;
      }
    }

    public final void a()
    {
      this.a = ((EGL10)EGLContext.getEGL());
      this.b = this.a.eglGetDisplay(EGL10.EGL_DEFAULT_DISPLAY);
      if (this.b == EGL10.EGL_NO_DISPLAY)
        throw new RuntimeException("eglGetDisplay failed");
      int[] arrayOfInt = new int[2];
      if (!this.a.eglInitialize(this.b, arrayOfInt))
        throw new RuntimeException("eglInitialize failed");
      d locald = (d)this.e.get();
      if (locald == null)
        this.d = null;
      b localb;
      for (this.f = null; (this.f == null) || (this.f == EGL10.EGL_NO_CONTEXT); this.f = localb.a())
      {
        this.f = null;
        throw new RuntimeException(a("createContext", this.a.eglGetError()));
        this.d = d.a(locald).chooseConfig(this.a, this.b);
        localb = d.b(locald);
      }
      this.c = null;
    }

    public final boolean b()
    {
      if (this.a == null)
        throw new RuntimeException("egl not initialized");
      if (this.b == null)
        throw new RuntimeException("eglDisplay not initialized");
      if (this.d == null)
        throw new RuntimeException("mEglConfig not initialized");
      f();
      d locald = (d)this.e.get();
      c localc;
      if (locald != null)
      {
        localc = d.c(locald);
        locald.getHolder();
      }
      for (this.c = localc.a(); (this.c == null) || (this.c == EGL10.EGL_NO_SURFACE); this.c = null)
      {
        this.a.eglGetError();
        return false;
      }
      if (!this.a.eglMakeCurrent(this.b, this.c, this.c, this.f))
      {
        a("eglMakeCurrent", this.a.eglGetError());
        return false;
      }
      return true;
    }

    final GL c()
    {
      GL localGL = this.f.getGL();
      d locald = (d)this.e.get();
      int j;
      if (locald != null)
      {
        if (d.d(locald) != null)
          localGL = d.d(locald).a();
        if ((0x3 & d.e(locald)) != 0)
        {
          int i = 0x1 & d.e(locald);
          j = 0;
          if (i != 0)
            j = 1;
          if ((0x2 & d.e(locald)) == 0)
            break label95;
        }
      }
      label95: for (d.d locald1 = new d.d(); ; locald1 = null)
      {
        localGL = GLDebugHelper.wrap(localGL, j, locald1);
        return localGL;
      }
    }

    public final void d()
    {
      f();
    }

    public final void e()
    {
      if (this.f != null)
      {
        d locald = (d)this.e.get();
        if (locald != null)
          d.b(locald);
        this.f = null;
      }
      if (this.b != null)
      {
        this.a.eglTerminate(this.b);
        this.b = null;
      }
    }
  }

  static final class b 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 int k;
    private int l;
    private int m;
    private boolean n;
    private boolean o;
    private final ArrayList<Runnable> p;
    private boolean q;
    private d.a r;
    private final WeakReference<d> s;

    private void f()
    {
      if (this.h)
      {
        this.h = false;
        this.r.d();
      }
    }

    private void g()
    {
      if (this.g)
      {
        this.r.e();
        this.g = false;
        d.a().c(this);
      }
    }

    // ERROR //
    private void h()
    {
      // Byte code:
      //   0: aload_0
      //   1: new 40	com/google/android/m4b/maps/x/d$a
      //   4: dup
      //   5: aload_0
      //   6: getfield 60	com/google/android/m4b/maps/x/d$b:s	Ljava/lang/ref/WeakReference;
      //   9: invokespecial 64	com/google/android/m4b/maps/x/d$a:<init>	(Ljava/lang/ref/WeakReference;)V
      //   12: putfield 38	com/google/android/m4b/maps/x/d$b:r	Lcom/google/android/m4b/maps/x/d$a;
      //   15: aload_0
      //   16: iconst_0
      //   17: putfield 44	com/google/android/m4b/maps/x/d$b:g	Z
      //   20: aload_0
      //   21: iconst_0
      //   22: putfield 36	com/google/android/m4b/maps/x/d$b:h	Z
      //   25: aconst_null
      //   26: astore_1
      //   27: iconst_0
      //   28: istore_2
      //   29: iconst_0
      //   30: istore_3
      //   31: iconst_0
      //   32: istore 4
      //   34: iconst_0
      //   35: istore 5
      //   37: aconst_null
      //   38: astore 6
      //   40: iconst_0
      //   41: istore 7
      //   43: iconst_0
      //   44: istore 8
      //   46: iconst_0
      //   47: istore 9
      //   49: iconst_0
      //   50: istore 10
      //   52: iconst_0
      //   53: istore 11
      //   55: iconst_0
      //   56: istore 12
      //   58: invokestatic 51	com/google/android/m4b/maps/x/d:a	()Lcom/google/android/m4b/maps/x/d$c;
      //   61: astore 16
      //   63: aload 16
      //   65: monitorenter
      //   66: aload_0
      //   67: getfield 66	com/google/android/m4b/maps/x/d$b:p	Ljava/util/ArrayList;
      //   70: invokevirtual 72	java/util/ArrayList:isEmpty	()Z
      //   73: ifne +125 -> 198
      //   76: aload_0
      //   77: getfield 66	com/google/android/m4b/maps/x/d$b:p	Ljava/util/ArrayList;
      //   80: iconst_0
      //   81: invokevirtual 76	java/util/ArrayList:remove	(I)Ljava/lang/Object;
      //   84: checkcast 78	java/lang/Runnable
      //   87: astore 52
      //   89: iload 10
      //   91: istore 20
      //   93: iload 9
      //   95: istore 21
      //   97: iload 8
      //   99: istore 22
      //   101: iload 7
      //   103: istore 23
      //   105: aload 52
      //   107: astore 24
      //   109: iload 5
      //   111: istore 25
      //   113: iload 4
      //   115: istore 26
      //   117: iload_3
      //   118: istore 27
      //   120: iload_2
      //   121: istore 28
      //   123: iload 11
      //   125: istore 53
      //   127: iload 12
      //   129: istore 30
      //   131: iload 53
      //   133: istore 31
      //   135: aload 16
      //   137: monitorexit
      //   138: aload 24
      //   140: ifnull +479 -> 619
      //   143: aload 24
      //   145: invokeinterface 81 1 0
      //   150: iload 28
      //   152: istore_2
      //   153: iload 27
      //   155: istore_3
      //   156: iload 26
      //   158: istore 4
      //   160: iload 25
      //   162: istore 5
      //   164: iload 23
      //   166: istore 7
      //   168: iload 22
      //   170: istore 8
      //   172: iload 21
      //   174: istore 9
      //   176: iload 20
      //   178: istore 10
      //   180: iload 31
      //   182: istore 49
      //   184: iload 30
      //   186: istore 12
      //   188: iload 49
      //   190: istore 11
      //   192: aconst_null
      //   193: astore 6
      //   195: goto -137 -> 58
      //   198: aload_0
      //   199: getfield 83	com/google/android/m4b/maps/x/d$b:a	Z
      //   202: ifeq +34 -> 236
      //   205: aload 16
      //   207: monitorexit
      //   208: invokestatic 51	com/google/android/m4b/maps/x/d:a	()Lcom/google/android/m4b/maps/x/d$c;
      //   211: astore 50
      //   213: aload 50
      //   215: monitorenter
      //   216: aload_0
      //   217: invokespecial 85	com/google/android/m4b/maps/x/d$b:f	()V
      //   220: aload_0
      //   221: invokespecial 87	com/google/android/m4b/maps/x/d$b:g	()V
      //   224: aload 50
      //   226: monitorexit
      //   227: return
      //   228: astore 51
      //   230: aload 50
      //   232: monitorexit
      //   233: aload 51
      //   235: athrow
      //   236: aload_0
      //   237: getfield 89	com/google/android/m4b/maps/x/d$b:c	Z
      //   240: ifeq +14 -> 254
      //   243: aload_0
      //   244: iconst_0
      //   245: putfield 89	com/google/android/m4b/maps/x/d$b:c	Z
      //   248: invokestatic 51	com/google/android/m4b/maps/x/d:a	()Lcom/google/android/m4b/maps/x/d$c;
      //   251: invokevirtual 94	java/lang/Object:notifyAll	()V
      //   254: aload_0
      //   255: getfield 96	com/google/android/m4b/maps/x/d$b:j	Z
      //   258: ifeq +19 -> 277
      //   261: aload_0
      //   262: invokespecial 85	com/google/android/m4b/maps/x/d$b:f	()V
      //   265: aload_0
      //   266: invokespecial 87	com/google/android/m4b/maps/x/d$b:g	()V
      //   269: aload_0
      //   270: iconst_0
      //   271: putfield 96	com/google/android/m4b/maps/x/d$b:j	Z
      //   274: iconst_1
      //   275: istore 7
      //   277: iload 4
      //   279: ifeq +14 -> 293
      //   282: aload_0
      //   283: invokespecial 85	com/google/android/m4b/maps/x/d$b:f	()V
      //   286: aload_0
      //   287: invokespecial 87	com/google/android/m4b/maps/x/d$b:g	()V
      //   290: iconst_0
      //   291: istore 4
      //   293: aload_0
      //   294: getfield 98	com/google/android/m4b/maps/x/d$b:d	Z
      //   297: ifne +37 -> 334
      //   300: aload_0
      //   301: getfield 100	com/google/android/m4b/maps/x/d$b:f	Z
      //   304: ifne +30 -> 334
      //   307: aload_0
      //   308: getfield 36	com/google/android/m4b/maps/x/d$b:h	Z
      //   311: ifeq +7 -> 318
      //   314: aload_0
      //   315: invokespecial 85	com/google/android/m4b/maps/x/d$b:f	()V
      //   318: aload_0
      //   319: iconst_1
      //   320: putfield 100	com/google/android/m4b/maps/x/d$b:f	Z
      //   323: aload_0
      //   324: iconst_0
      //   325: putfield 102	com/google/android/m4b/maps/x/d$b:e	Z
      //   328: invokestatic 51	com/google/android/m4b/maps/x/d:a	()Lcom/google/android/m4b/maps/x/d$c;
      //   331: invokevirtual 94	java/lang/Object:notifyAll	()V
      //   334: aload_0
      //   335: getfield 98	com/google/android/m4b/maps/x/d$b:d	Z
      //   338: ifeq +21 -> 359
      //   341: aload_0
      //   342: getfield 100	com/google/android/m4b/maps/x/d$b:f	Z
      //   345: ifeq +14 -> 359
      //   348: aload_0
      //   349: iconst_0
      //   350: putfield 100	com/google/android/m4b/maps/x/d$b:f	Z
      //   353: invokestatic 51	com/google/android/m4b/maps/x/d:a	()Lcom/google/android/m4b/maps/x/d$c;
      //   356: invokevirtual 94	java/lang/Object:notifyAll	()V
      //   359: iload 12
      //   361: ifeq +19 -> 380
      //   364: iconst_0
      //   365: istore_3
      //   366: iconst_0
      //   367: istore 12
      //   369: aload_0
      //   370: iconst_1
      //   371: putfield 104	com/google/android/m4b/maps/x/d$b:o	Z
      //   374: invokestatic 51	com/google/android/m4b/maps/x/d:a	()Lcom/google/android/m4b/maps/x/d$c;
      //   377: invokevirtual 94	java/lang/Object:notifyAll	()V
      //   380: aload_0
      //   381: invokespecial 106	com/google/android/m4b/maps/x/d$b:i	()Z
      //   384: ifeq +226 -> 610
      //   387: aload_0
      //   388: getfield 44	com/google/android/m4b/maps/x/d$b:g	Z
      //   391: ifne +11 -> 402
      //   394: iload 7
      //   396: ifeq +132 -> 528
      //   399: iconst_0
      //   400: istore 7
      //   402: aload_0
      //   403: getfield 44	com/google/android/m4b/maps/x/d$b:g	Z
      //   406: ifeq +24 -> 430
      //   409: aload_0
      //   410: getfield 36	com/google/android/m4b/maps/x/d$b:h	Z
      //   413: ifne +17 -> 430
      //   416: aload_0
      //   417: iconst_1
      //   418: putfield 36	com/google/android/m4b/maps/x/d$b:h	Z
      //   421: iconst_1
      //   422: istore 5
      //   424: iconst_1
      //   425: istore 9
      //   427: iconst_1
      //   428: istore 8
      //   430: aload_0
      //   431: getfield 36	com/google/android/m4b/maps/x/d$b:h	Z
      //   434: ifeq +176 -> 610
      //   437: aload_0
      //   438: getfield 108	com/google/android/m4b/maps/x/d$b:q	Z
      //   441: ifeq +27 -> 468
      //   444: iconst_1
      //   445: istore 8
      //   447: aload_0
      //   448: getfield 110	com/google/android/m4b/maps/x/d$b:k	I
      //   451: istore_2
      //   452: aload_0
      //   453: getfield 112	com/google/android/m4b/maps/x/d$b:l	I
      //   456: istore 11
      //   458: iconst_1
      //   459: istore_3
      //   460: iconst_1
      //   461: istore 5
      //   463: aload_0
      //   464: iconst_0
      //   465: putfield 108	com/google/android/m4b/maps/x/d$b:q	Z
      //   468: aload_0
      //   469: iconst_0
      //   470: putfield 114	com/google/android/m4b/maps/x/d$b:n	Z
      //   473: invokestatic 51	com/google/android/m4b/maps/x/d:a	()Lcom/google/android/m4b/maps/x/d$c;
      //   476: invokevirtual 94	java/lang/Object:notifyAll	()V
      //   479: iload 10
      //   481: istore 20
      //   483: iload 9
      //   485: istore 21
      //   487: iload 8
      //   489: istore 22
      //   491: iload 7
      //   493: istore 23
      //   495: aload 6
      //   497: astore 24
      //   499: iload 5
      //   501: istore 25
      //   503: iload 4
      //   505: istore 26
      //   507: iload_3
      //   508: istore 27
      //   510: iload_2
      //   511: istore 28
      //   513: iload 11
      //   515: istore 29
      //   517: iload 12
      //   519: istore 30
      //   521: iload 29
      //   523: istore 31
      //   525: goto -390 -> 135
      //   528: invokestatic 51	com/google/android/m4b/maps/x/d:a	()Lcom/google/android/m4b/maps/x/d$c;
      //   531: aload_0
      //   532: invokevirtual 117	com/google/android/m4b/maps/x/d$c:b	(Lcom/google/android/m4b/maps/x/d$b;)Z
      //   535: istore 18
      //   537: iload 18
      //   539: ifeq -137 -> 402
      //   542: aload_0
      //   543: getfield 38	com/google/android/m4b/maps/x/d$b:r	Lcom/google/android/m4b/maps/x/d$a;
      //   546: invokevirtual 119	com/google/android/m4b/maps/x/d$a:a	()V
      //   549: aload_0
      //   550: iconst_1
      //   551: putfield 44	com/google/android/m4b/maps/x/d$b:g	Z
      //   554: iconst_1
      //   555: istore 10
      //   557: invokestatic 51	com/google/android/m4b/maps/x/d:a	()Lcom/google/android/m4b/maps/x/d$c;
      //   560: invokevirtual 94	java/lang/Object:notifyAll	()V
      //   563: goto -161 -> 402
      //   566: astore 17
      //   568: aload 16
      //   570: monitorexit
      //   571: aload 17
      //   573: athrow
      //   574: astore 13
      //   576: invokestatic 51	com/google/android/m4b/maps/x/d:a	()Lcom/google/android/m4b/maps/x/d$c;
      //   579: astore 14
      //   581: aload 14
      //   583: monitorenter
      //   584: aload_0
      //   585: invokespecial 85	com/google/android/m4b/maps/x/d$b:f	()V
      //   588: aload_0
      //   589: invokespecial 87	com/google/android/m4b/maps/x/d$b:g	()V
      //   592: aload 14
      //   594: monitorexit
      //   595: aload 13
      //   597: athrow
      //   598: astore 19
      //   600: invokestatic 51	com/google/android/m4b/maps/x/d:a	()Lcom/google/android/m4b/maps/x/d$c;
      //   603: aload_0
      //   604: invokevirtual 56	com/google/android/m4b/maps/x/d$c:c	(Lcom/google/android/m4b/maps/x/d$b;)V
      //   607: aload 19
      //   609: athrow
      //   610: invokestatic 51	com/google/android/m4b/maps/x/d:a	()Lcom/google/android/m4b/maps/x/d$c;
      //   613: invokevirtual 122	java/lang/Object:wait	()V
      //   616: goto -550 -> 66
      //   619: iload 25
      //   621: ifeq +419 -> 1040
      //   624: aload_0
      //   625: getfield 38	com/google/android/m4b/maps/x/d$b:r	Lcom/google/android/m4b/maps/x/d$a;
      //   628: invokevirtual 124	com/google/android/m4b/maps/x/d$a:b	()Z
      //   631: ifeq +309 -> 940
      //   634: invokestatic 51	com/google/android/m4b/maps/x/d:a	()Lcom/google/android/m4b/maps/x/d$c;
      //   637: astore 47
      //   639: aload 47
      //   641: monitorenter
      //   642: aload_0
      //   643: iconst_1
      //   644: putfield 126	com/google/android/m4b/maps/x/d$b:i	Z
      //   647: invokestatic 51	com/google/android/m4b/maps/x/d:a	()Lcom/google/android/m4b/maps/x/d$c;
      //   650: invokevirtual 94	java/lang/Object:notifyAll	()V
      //   653: aload 47
      //   655: monitorexit
      //   656: iconst_0
      //   657: istore 32
      //   659: iload 21
      //   661: ifeq +29 -> 690
      //   664: aload_0
      //   665: getfield 38	com/google/android/m4b/maps/x/d$b:r	Lcom/google/android/m4b/maps/x/d$a;
      //   668: invokevirtual 129	com/google/android/m4b/maps/x/d$a:c	()Ljavax/microedition/khronos/opengles/GL;
      //   671: checkcast 131	javax/microedition/khronos/opengles/GL10
      //   674: astore 43
      //   676: invokestatic 51	com/google/android/m4b/maps/x/d:a	()Lcom/google/android/m4b/maps/x/d$c;
      //   679: aload 43
      //   681: invokevirtual 134	com/google/android/m4b/maps/x/d$c:a	(Ljavax/microedition/khronos/opengles/GL10;)V
      //   684: iconst_0
      //   685: istore 21
      //   687: aload 43
      //   689: astore_1
      //   690: iload 20
      //   692: ifeq +41 -> 733
      //   695: aload_0
      //   696: getfield 60	com/google/android/m4b/maps/x/d$b:s	Ljava/lang/ref/WeakReference;
      //   699: invokevirtual 140	java/lang/ref/WeakReference:get	()Ljava/lang/Object;
      //   702: checkcast 48	com/google/android/m4b/maps/x/d
      //   705: astore 33
      //   707: aload 33
      //   709: ifnull +345 -> 1054
      //   712: aload 33
      //   714: invokestatic 143	com/google/android/m4b/maps/x/d:f	(Lcom/google/android/m4b/maps/x/d;)Lcom/google/android/m4b/maps/x/g;
      //   717: aload_1
      //   718: aload_0
      //   719: getfield 38	com/google/android/m4b/maps/x/d$b:r	Lcom/google/android/m4b/maps/x/d$a;
      //   722: getfield 146	com/google/android/m4b/maps/x/d$a:d	Ljavax/microedition/khronos/egl/EGLConfig;
      //   725: invokeinterface 152 3 0
      //   730: goto +324 -> 1054
      //   733: iload 22
      //   735: ifeq +38 -> 773
      //   738: aload_0
      //   739: getfield 60	com/google/android/m4b/maps/x/d$b:s	Ljava/lang/ref/WeakReference;
      //   742: invokevirtual 140	java/lang/ref/WeakReference:get	()Ljava/lang/Object;
      //   745: checkcast 48	com/google/android/m4b/maps/x/d
      //   748: astore 34
      //   750: aload 34
      //   752: ifnull +308 -> 1060
      //   755: aload 34
      //   757: invokestatic 143	com/google/android/m4b/maps/x/d:f	(Lcom/google/android/m4b/maps/x/d;)Lcom/google/android/m4b/maps/x/g;
      //   760: aload_1
      //   761: iload 28
      //   763: iload 31
      //   765: invokeinterface 156 4 0
      //   770: goto +290 -> 1060
      //   773: aload_0
      //   774: getfield 60	com/google/android/m4b/maps/x/d$b:s	Ljava/lang/ref/WeakReference;
      //   777: invokevirtual 140	java/lang/ref/WeakReference:get	()Ljava/lang/Object;
      //   780: checkcast 48	com/google/android/m4b/maps/x/d
      //   783: astore 35
      //   785: aload 35
      //   787: ifnull +14 -> 801
      //   790: aload 35
      //   792: invokestatic 143	com/google/android/m4b/maps/x/d:f	(Lcom/google/android/m4b/maps/x/d;)Lcom/google/android/m4b/maps/x/g;
      //   795: aload_1
      //   796: invokeinterface 159 2 0
      //   801: aload_0
      //   802: getfield 38	com/google/android/m4b/maps/x/d$b:r	Lcom/google/android/m4b/maps/x/d$a;
      //   805: astore 36
      //   807: aload 36
      //   809: getfield 162	com/google/android/m4b/maps/x/d$a:a	Ljavax/microedition/khronos/egl/EGL10;
      //   812: aload 36
      //   814: getfield 165	com/google/android/m4b/maps/x/d$a:b	Ljavax/microedition/khronos/egl/EGLDisplay;
      //   817: aload 36
      //   819: getfield 168	com/google/android/m4b/maps/x/d$a:c	Ljavax/microedition/khronos/egl/EGLSurface;
      //   822: invokeinterface 174 3 0
      //   827: ifne +269 -> 1096
      //   830: aload 36
      //   832: getfield 162	com/google/android/m4b/maps/x/d$a:a	Ljavax/microedition/khronos/egl/EGL10;
      //   835: invokeinterface 178 1 0
      //   840: istore 37
      //   842: goto +224 -> 1066
      //   845: ldc 179
      //   847: iload 37
      //   849: invokestatic 182	com/google/android/m4b/maps/x/d$a:a	(Ljava/lang/String;I)Ljava/lang/String;
      //   852: pop
      //   853: invokestatic 51	com/google/android/m4b/maps/x/d:a	()Lcom/google/android/m4b/maps/x/d$c;
      //   856: astore 41
      //   858: aload 41
      //   860: monitorenter
      //   861: aload_0
      //   862: iconst_1
      //   863: putfield 102	com/google/android/m4b/maps/x/d$b:e	Z
      //   866: invokestatic 51	com/google/android/m4b/maps/x/d:a	()Lcom/google/android/m4b/maps/x/d$c;
      //   869: invokevirtual 94	java/lang/Object:notifyAll	()V
      //   872: aload 41
      //   874: monitorexit
      //   875: iload 27
      //   877: ifeq +170 -> 1047
      //   880: iconst_1
      //   881: istore 38
      //   883: iload 31
      //   885: istore 11
      //   887: iload 38
      //   889: istore 12
      //   891: aload 24
      //   893: astore 6
      //   895: iload 23
      //   897: istore 7
      //   899: iload 22
      //   901: istore 8
      //   903: iload 21
      //   905: istore 9
      //   907: iload 20
      //   909: istore 10
      //   911: iload 26
      //   913: istore 39
      //   915: iload 32
      //   917: istore 5
      //   919: iload 28
      //   921: istore_2
      //   922: iload 27
      //   924: istore_3
      //   925: iload 39
      //   927: istore 4
      //   929: goto -871 -> 58
      //   932: astore 48
      //   934: aload 47
      //   936: monitorexit
      //   937: aload 48
      //   939: athrow
      //   940: invokestatic 51	com/google/android/m4b/maps/x/d:a	()Lcom/google/android/m4b/maps/x/d$c;
      //   943: astore 44
      //   945: aload 44
      //   947: monitorenter
      //   948: aload_0
      //   949: iconst_1
      //   950: putfield 126	com/google/android/m4b/maps/x/d$b:i	Z
      //   953: aload_0
      //   954: iconst_1
      //   955: putfield 102	com/google/android/m4b/maps/x/d$b:e	Z
      //   958: invokestatic 51	com/google/android/m4b/maps/x/d:a	()Lcom/google/android/m4b/maps/x/d$c;
      //   961: invokevirtual 94	java/lang/Object:notifyAll	()V
      //   964: aload 44
      //   966: monitorexit
      //   967: iload 28
      //   969: istore_2
      //   970: iload 27
      //   972: istore_3
      //   973: iload 26
      //   975: istore 4
      //   977: iload 25
      //   979: istore 5
      //   981: aload 24
      //   983: astore 6
      //   985: iload 23
      //   987: istore 7
      //   989: iload 22
      //   991: istore 8
      //   993: iload 21
      //   995: istore 9
      //   997: iload 20
      //   999: istore 10
      //   1001: iload 31
      //   1003: istore 46
      //   1005: iload 30
      //   1007: istore 12
      //   1009: iload 46
      //   1011: istore 11
      //   1013: goto -955 -> 58
      //   1016: astore 45
      //   1018: aload 44
      //   1020: monitorexit
      //   1021: aload 45
      //   1023: athrow
      //   1024: astore 42
      //   1026: aload 41
      //   1028: monitorexit
      //   1029: aload 42
      //   1031: athrow
      //   1032: astore 15
      //   1034: aload 14
      //   1036: monitorexit
      //   1037: aload 15
      //   1039: athrow
      //   1040: iload 25
      //   1042: istore 32
      //   1044: goto -385 -> 659
      //   1047: iload 30
      //   1049: istore 38
      //   1051: goto -168 -> 883
      //   1054: iconst_0
      //   1055: istore 20
      //   1057: goto -324 -> 733
      //   1060: iconst_0
      //   1061: istore 22
      //   1063: goto -290 -> 773
      //   1066: iload 37
      //   1068: lookupswitch	default:+-223->845, 12288:+-193->875, 12302:+36->1104
      //   1097: faload
      //   1098: nop
      //   1099: istore 37
      //   1101: goto -35 -> 1066
      //   1104: iconst_1
      //   1105: istore 26
      //   1107: goto -232 -> 875
      //
      // Exception table:
      //   from	to	target	type
      //   216	227	228	finally
      //   66	89	566	finally
      //   135	138	566	finally
      //   198	208	566	finally
      //   236	254	566	finally
      //   254	274	566	finally
      //   282	290	566	finally
      //   293	318	566	finally
      //   318	334	566	finally
      //   334	359	566	finally
      //   369	380	566	finally
      //   380	394	566	finally
      //   402	421	566	finally
      //   430	444	566	finally
      //   447	458	566	finally
      //   463	468	566	finally
      //   468	479	566	finally
      //   528	537	566	finally
      //   542	549	566	finally
      //   549	554	566	finally
      //   557	563	566	finally
      //   600	610	566	finally
      //   610	616	566	finally
      //   58	66	574	finally
      //   143	150	574	finally
      //   568	574	574	finally
      //   624	642	574	finally
      //   664	684	574	finally
      //   695	707	574	finally
      //   712	730	574	finally
      //   738	750	574	finally
      //   755	770	574	finally
      //   773	785	574	finally
      //   790	801	574	finally
      //   801	842	574	finally
      //   845	861	574	finally
      //   934	940	574	finally
      //   940	948	574	finally
      //   1018	1024	574	finally
      //   1026	1032	574	finally
      //   542	549	598	java/lang/RuntimeException
      //   642	656	932	finally
      //   948	967	1016	finally
      //   861	875	1024	finally
      //   584	595	1032	finally
    }

    private boolean i()
    {
      return (!this.c) && (this.d) && (!this.e) && (this.k > 0) && (this.l > 0) && ((this.n) || (this.m == 1));
    }

    public final void a()
    {
      synchronized (d.a())
      {
        this.n = true;
        d.a().notifyAll();
        return;
      }
    }

    public final void a(int paramInt1, int paramInt2)
    {
      while (true)
      {
        synchronized (d.a())
        {
          this.k = paramInt1;
          this.l = paramInt2;
          this.q = true;
          this.n = true;
          this.o = false;
          d.a().notifyAll();
          if ((this.b) || (this.c) || (this.o))
            break;
          if ((this.g) && (this.h))
          {
            boolean bool = i();
            if (bool)
            {
              i1 = 1;
              if (i1 == 0)
                break;
              try
              {
                d.a().wait();
              }
              catch (InterruptedException localInterruptedException)
              {
                Thread.currentThread().interrupt();
              }
            }
          }
        }
        int i1 = 0;
      }
    }

    public final void a(Runnable paramRunnable)
    {
      if (paramRunnable == null)
        throw new IllegalArgumentException("r must not be null");
      synchronized (d.a())
      {
        this.p.add(paramRunnable);
        d.a().notifyAll();
        return;
      }
    }

    public final void b()
    {
      synchronized (d.a())
      {
        this.d = true;
        this.i = false;
        d.a().notifyAll();
        while (true)
          if ((this.f) && (!this.i))
          {
            boolean bool = this.b;
            if (!bool)
              try
              {
                d.a().wait();
              }
              catch (InterruptedException localInterruptedException)
              {
                Thread.currentThread().interrupt();
              }
          }
      }
    }

    public final void c()
    {
      synchronized (d.a())
      {
        this.d = false;
        d.a().notifyAll();
        while (true)
          if (!this.f)
          {
            boolean bool = this.b;
            if (!bool)
              try
              {
                d.a().wait();
              }
              catch (InterruptedException localInterruptedException)
              {
                Thread.currentThread().interrupt();
              }
          }
      }
    }

    public final void d()
    {
      synchronized (d.a())
      {
        this.a = true;
        d.a().notifyAll();
        while (true)
        {
          boolean bool = this.b;
          if (!bool)
            try
            {
              d.a().wait();
            }
            catch (InterruptedException localInterruptedException)
            {
              Thread.currentThread().interrupt();
            }
        }
      }
    }

    public final void e()
    {
      this.j = true;
      d.a().notifyAll();
    }

    // ERROR //
    public final void run()
    {
      // Byte code:
      //   0: aload_0
      //   1: new 208	java/lang/StringBuilder
      //   4: dup
      //   5: ldc 210
      //   7: invokespecial 211	java/lang/StringBuilder:<init>	(Ljava/lang/String;)V
      //   10: aload_0
      //   11: invokevirtual 215	com/google/android/m4b/maps/x/d$b:getId	()J
      //   14: invokevirtual 219	java/lang/StringBuilder:append	(J)Ljava/lang/StringBuilder;
      //   17: invokevirtual 223	java/lang/StringBuilder:toString	()Ljava/lang/String;
      //   20: invokevirtual 226	com/google/android/m4b/maps/x/d$b:setName	(Ljava/lang/String;)V
      //   23: aload_0
      //   24: invokespecial 228	com/google/android/m4b/maps/x/d$b:h	()V
      //   27: invokestatic 51	com/google/android/m4b/maps/x/d:a	()Lcom/google/android/m4b/maps/x/d$c;
      //   30: aload_0
      //   31: invokevirtual 230	com/google/android/m4b/maps/x/d$c:a	(Lcom/google/android/m4b/maps/x/d$b;)V
      //   34: return
      //   35: astore_2
      //   36: invokestatic 51	com/google/android/m4b/maps/x/d:a	()Lcom/google/android/m4b/maps/x/d$c;
      //   39: aload_0
      //   40: invokevirtual 230	com/google/android/m4b/maps/x/d$c:a	(Lcom/google/android/m4b/maps/x/d$b;)V
      //   43: return
      //   44: astore_1
      //   45: invokestatic 51	com/google/android/m4b/maps/x/d:a	()Lcom/google/android/m4b/maps/x/d$c;
      //   48: aload_0
      //   49: invokevirtual 230	com/google/android/m4b/maps/x/d$c:a	(Lcom/google/android/m4b/maps/x/d$b;)V
      //   52: aload_1
      //   53: athrow
      //
      // Exception table:
      //   from	to	target	type
      //   23	27	35	java/lang/InterruptedException
      //   23	27	44	finally
    }
  }

  static final class c
  {
    private boolean a;
    private int b;
    private boolean c;
    private boolean d;
    private boolean e;
    private d.b f;

    private void a()
    {
      if (!this.a)
      {
        this.b = 131072;
        if (this.b >= 131072)
          this.d = true;
        this.a = true;
      }
    }

    public final void a(d.b paramb)
    {
      try
      {
        d.b.a(paramb, true);
        if (this.f == paramb)
          this.f = null;
        notifyAll();
        return;
      }
      finally
      {
      }
    }

    public final void a(GL10 paramGL10)
    {
      boolean bool1 = true;
      try
      {
        boolean bool2;
        if (!this.c)
        {
          a();
          String str = paramGL10.glGetString(7937);
          if (this.b < 131072)
          {
            if (str.startsWith("Q3Dimension MSM7500 "))
              break label78;
            bool2 = bool1;
            this.d = bool2;
            notifyAll();
          }
          if (this.d)
            break label84;
        }
        while (true)
        {
          this.e = bool1;
          this.c = true;
          return;
          label78: bool2 = false;
          break;
          label84: bool1 = false;
        }
      }
      finally
      {
      }
    }

    public final boolean b(d.b paramb)
    {
      if ((this.f == paramb) || (this.f == null))
      {
        this.f = paramb;
        notifyAll();
      }
      do
      {
        return true;
        a();
      }
      while (this.d);
      if (this.f != null)
        this.f.e();
      return false;
    }

    public final void c(d.b paramb)
    {
      if (this.f == paramb)
        this.f = null;
      notifyAll();
    }
  }

  static final class d extends Writer
  {
    private final StringBuilder a = new StringBuilder();

    private void a()
    {
      if (this.a.length() > 0)
        this.a.delete(0, this.a.length());
    }

    public final void close()
    {
      a();
    }

    public final void flush()
    {
      a();
    }

    public final void write(char[] paramArrayOfChar, int paramInt1, int paramInt2)
    {
      int i = 0;
      if (i < paramInt2)
      {
        char c = paramArrayOfChar[(paramInt1 + i)];
        if (c == '\n')
          a();
        while (true)
        {
          i++;
          break;
          this.a.append(c);
        }
      }
    }
  }
}

/* Location:           C:\Documents and Settings\Cesar Cabello Cea\Mis documentos\Downloads\apk-downloader\com.ikea.kompis-6_dex2jar.jar
 * Qualified Name:     com.google.android.m4b.maps.x.d
 * JD-Core Version:    0.6.2
 */