package com.google.android.m4b.maps.bl;

import java.util.Arrays;
import java.util.Iterator;
import java.util.TreeSet;

public final class as
{
  public static final as a = new as(21);
  private final int b;
  private final int[] c;
  private final int d;
  private final int e;
  private final int f;
  private final int[] g;
  private final int[] h;
  private final float[] i;
  private TreeSet<Integer> j;
  private final float[] k;

  private as(int paramInt)
  {
    this.c = new int[0];
    this.b = 1;
    this.f = 21;
    this.e = 21;
    this.d = 22;
    this.i = new float[0];
    this.k = new float[0];
    this.j = new TreeSet();
    this.g = new int[0];
    this.h = new int[0];
  }

  public as(int[] paramArrayOfInt, int paramInt1, int paramInt2, int paramInt3)
  {
    this.c = paramArrayOfInt;
    this.b = paramInt2;
    float f1 = 1.0F / paramInt2;
    this.f = paramInt3;
    int m = this.c.length;
    this.e = this.c[(m - 1)];
    this.d = paramInt1;
    this.i = new float[1 + this.e];
    this.k = new float[1 + this.e];
    Arrays.fill(this.i, -1.0F);
    Arrays.fill(this.k, -1.0F);
    this.j = new TreeSet();
    int n = this.d;
    float f2 = this.d;
    int i1 = 0;
    int i2 = n;
    float f4;
    int i5;
    if (i1 < m)
    {
      this.j.add(Integer.valueOf(this.c[i1]));
      if (this.i[this.c[i1]] >= 0.0F)
        break label360;
      f4 = f1 * i1 + this.d;
      while (i2 < this.c[i1])
      {
        this.i[i2] = f2;
        this.k[i2] = f4;
        i2++;
      }
      this.i[i2] = f4;
      i5 = i2;
    }
    for (float f3 = f4; ; f3 = f2)
    {
      i1++;
      f2 = f3;
      i2 = i5;
      break;
      this.g = new int[1 + this.e];
      this.h = new int[1 + this.e];
      Arrays.fill(this.g, -1);
      Arrays.fill(this.h, -1);
      Iterator localIterator = this.j.iterator();
      int i4;
      for (int i3 = -1; localIterator.hasNext(); i3 = i4)
      {
        i4 = ((Integer)localIterator.next()).intValue();
        this.g[i4] = i3;
        if (i3 >= 0)
          this.h[i3] = i4;
      }
      return;
      label360: i5 = i2;
    }
  }

  public final int a()
  {
    return this.f;
  }

  public final int a(float paramFloat)
  {
    int m = (int)((paramFloat - this.d) * this.b);
    if (m >= this.c.length)
      return this.e;
    if (m < 0)
      return -1;
    return this.c[m];
  }

  public final int a(int paramInt)
  {
    if ((paramInt < 0) || (paramInt >= this.g.length))
      return -1;
    return this.g[paramInt];
  }

  public final int b()
  {
    return this.e;
  }

  public final int b(int paramInt)
  {
    if ((paramInt < 0) || (paramInt >= this.h.length))
      return -1;
    return this.h[paramInt];
  }

  public final boolean c(int paramInt)
  {
    return this.j.contains(Integer.valueOf(paramInt));
  }

  public final float d(int paramInt)
  {
    if ((paramInt < 0) || (paramInt >= this.i.length))
      return -1.0F;
    return this.i[paramInt];
  }

  public final float e(int paramInt)
  {
    if ((paramInt < 0) || (paramInt >= this.i.length))
      return -1.0F;
    return this.k[paramInt];
  }
}

/* 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.bl.as
 * JD-Core Version:    0.6.2
 */