package com.google.android.m4b.maps.bc;

import java.util.ArrayList;
import java.util.List;

public final class f
{
  private am a;
  private int b;
  private af[] c;
  private boolean d;
  private final ArrayList<aj.a> e = new ArrayList();
  private final ArrayList<a> f = new ArrayList();
  private int g;

  public f(am paramam)
  {
    a(paramam);
  }

  private void a(int paramInt1, af paramaf, int paramInt2, boolean paramBoolean)
  {
    if (paramInt1 == this.b)
    {
      if (paramBoolean)
      {
        if (this.g == this.e.size())
        {
          this.e.add(new aj.a());
          this.f.add(new a());
        }
        this.g = (1 + this.g);
      }
      if ((((aj.a)this.e.get(-1 + this.g)).a(paramaf)) && (this.d))
        ((a)this.f.get(-1 + this.g)).a(paramInt2);
      return;
    }
    af localaf1;
    af localaf2;
    if (paramInt1 == 0)
    {
      localaf1 = this.a.c();
      localaf2 = this.a.a(0);
      if (ah.a(localaf1, localaf2, paramaf) < 0)
        break label257;
      if ((!paramBoolean) && (ah.a(localaf1, localaf2, this.c[paramInt1]) < 0))
      {
        af localaf4 = new af();
        ah.a(localaf1, localaf2, paramaf, this.c[paramInt1], localaf4);
        a(paramInt1 + 1, localaf4, paramInt2, true);
      }
      a(paramInt1 + 1, paramaf, paramInt2, paramBoolean);
    }
    while (true)
    {
      this.c[paramInt1].b(paramaf);
      return;
      localaf1 = this.a.a(paramInt1 - 1);
      localaf2 = this.a.a(paramInt1);
      break;
      label257: if ((!paramBoolean) && (ah.a(localaf1, localaf2, this.c[paramInt1]) >= 0))
      {
        af localaf3 = new af();
        ah.a(localaf1, localaf2, this.c[paramInt1], paramaf, localaf3);
        a(paramInt1 + 1, localaf3, paramInt2, false);
      }
    }
  }

  private void a(am paramam)
  {
    this.a = paramam;
    this.b = paramam.b();
    this.c = new af[this.b];
    for (int i = 0; i < this.c.length; i++)
      this.c[i] = new af();
  }

  public final void a(aj paramaj, List<aj> paramList)
  {
    this.g = 0;
    this.d = false;
    al localal = paramaj.a();
    if (this.a.a(localal))
    {
      if (!this.a.b(localal))
        break label61;
      paramList.add(paramaj);
      if (this.d)
        null.add(null);
    }
    while (true)
    {
      return;
      label61: af localaf = new af();
      int i = paramaj.b();
      paramaj.a(0, localaf);
      int j;
      label110: int k;
      if (this.d)
      {
        throw new NullPointerException();
        a(0, localaf, 0, true);
        j = 1;
        k = 0;
        if (j >= i)
          break label164;
        paramaj.a(j, localaf);
        if (!this.d)
          break label161;
        throw new NullPointerException();
      }
      label161: 
      while (true)
      {
        a(0, localaf, 0, false);
        j++;
        break label110;
        break;
      }
      label164: 
      while (k < this.g)
      {
        aj.a locala = (aj.a)this.e.get(k);
        if (locala.a() > 1)
          paramList.add(locala.c());
        locala.b();
        if (this.d)
        {
          a locala1 = (a)this.f.get(k);
          if (locala1.c() > 1)
            null.add(locala1.a());
          locala1.b();
        }
        k++;
      }
    }
  }

  static final class a
  {
    private int[] a = new int[16];
    private int b = 0;

    a()
    {
      this(16);
    }

    private a(int paramInt)
    {
    }

    final void a(int paramInt)
    {
      if (this.b == this.a.length)
      {
        int[] arrayOfInt2 = new int[2 * this.a.length];
        System.arraycopy(this.a, 0, arrayOfInt2, 0, this.a.length);
        this.a = arrayOfInt2;
      }
      int[] arrayOfInt1 = this.a;
      int i = this.b;
      this.b = (i + 1);
      arrayOfInt1[i] = paramInt;
    }

    final int[] a()
    {
      int[] arrayOfInt = new int[this.b];
      System.arraycopy(this.a, 0, arrayOfInt, 0, this.b);
      return arrayOfInt;
    }

    final void b()
    {
      this.b = 0;
    }

    final int c()
    {
      return this.b;
    }
  }
}

/* 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.bc.f
 * JD-Core Version:    0.6.2
 */