.class public final Lz5/nn0;
.super Ljava/lang/Object;
.source ""

# interfaces
.implements Lz5/n91;


# annotations
.annotation system Ldalvik/annotation/Signature;
    value = {
        "Ljava/lang/Object;",
        "Lz5/n91<",
        "Lz5/oy1;",
        "Landroid/graphics/Bitmap;",
        ">;"
    }
.end annotation


# instance fields
.field public final synthetic a:D

.field public final synthetic b:Z

.field public final synthetic c:Lz5/on0;


# direct methods
.method public constructor <init>(Lz5/on0;DZ)V
    .registers 5

    iput-object p1, p0, Lz5/nn0;->c:Lz5/on0;

    iput-wide p2, p0, Lz5/nn0;->a:D

    iput-boolean p4, p0, Lz5/nn0;->b:Z

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public final apply(Ljava/lang/Object;)Ljava/lang/Object;
    .registers 9

    check-cast p1, Lz5/oy1;

    iget-object v0, p0, Lz5/nn0;->c:Lz5/on0;

    iget-object p1, p1, Lz5/oy1;->b:[B

    iget-wide v1, p0, Lz5/nn0;->a:D

    iget-boolean v3, p0, Lz5/nn0;->b:Z

    .line 1
    new-instance v4, Landroid/graphics/BitmapFactory$Options;

    invoke-direct {v4}, Landroid/graphics/BitmapFactory$Options;-><init>()V

    const-wide/high16 v5, 0x4064000000000000L    # 160.0

    mul-double/2addr v1, v5

    double-to-int v1, v1

    iput v1, v4, Landroid/graphics/BitmapFactory$Options;->inDensity:I

    if-nez v3, :cond_1b

    sget-object v1, Landroid/graphics/Bitmap$Config;->RGB_565:Landroid/graphics/Bitmap$Config;

    iput-object v1, v4, Landroid/graphics/BitmapFactory$Options;->inPreferredConfig:Landroid/graphics/Bitmap$Config;

    :cond_1b
    sget-object v1, Lz5/so;->R3:Lz5/no;

    .line 2
    sget-object v2, Lz5/xk;->d:Lz5/xk;

    iget-object v3, v2, Lz5/xk;->c:Lcom/google/android/gms/internal/ads/g0;

    .line 3
    invoke-virtual {v3, v1}, Lcom/google/android/gms/internal/ads/g0;->a(Lz5/no;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Ljava/lang/Boolean;

    invoke-virtual {v1}, Ljava/lang/Boolean;->booleanValue()Z

    move-result v1

    if-eqz v1, :cond_59

    const/4 v1, 0x1

    iput-boolean v1, v4, Landroid/graphics/BitmapFactory$Options;->inJustDecodeBounds:Z

    invoke-virtual {v0, p1, v4}, Lz5/on0;->a([BLandroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;

    const/4 v3, 0x0

    iput-boolean v3, v4, Landroid/graphics/BitmapFactory$Options;->inJustDecodeBounds:Z

    iget v3, v4, Landroid/graphics/BitmapFactory$Options;->outWidth:I

    iget v5, v4, Landroid/graphics/BitmapFactory$Options;->outHeight:I

    mul-int/2addr v3, v5

    if-lez v3, :cond_59

    sget-object v5, Lz5/so;->S3:Lz5/no;

    add-int/lit8 v3, v3, -0x1

    .line 4
    iget-object v2, v2, Lz5/xk;->c:Lcom/google/android/gms/internal/ads/g0;

    .line 5
    invoke-virtual {v2, v5}, Lcom/google/android/gms/internal/ads/g0;->a(Lz5/no;)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Ljava/lang/Integer;

    invoke-virtual {v2}, Ljava/lang/Integer;->intValue()I

    move-result v2

    div-int/2addr v3, v2

    invoke-static {v3}, Ljava/lang/Integer;->numberOfLeadingZeros(I)I

    move-result v2

    rsub-int/lit8 v2, v2, 0x21

    div-int/lit8 v2, v2, 0x2

    shl-int/2addr v1, v2

    iput v1, v4, Landroid/graphics/BitmapFactory$Options;->inSampleSize:I

    :cond_59
    invoke-virtual {v0, p1, v4}, Lz5/on0;->a([BLandroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;

    move-result-object p1

    return-object p1
.end method
