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

# interfaces
.implements Lz5/z2;


# instance fields
.field public final a:Lt0/c;

.field public final b:J

.field public final c:J

.field public final d:J

.field public final e:J

.field public final f:J

.field public g:I

.field public h:Z


# direct methods
.method public constructor <init>()V
    .registers 10

    new-instance v0, Lt0/c;

    const/4 v1, 0x2

    invoke-direct {v0, v1}, Lt0/c;-><init>(I)V

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

    const/16 v1, 0x9c4

    const/4 v2, 0x0

    const-string v3, "bufferForPlaybackMs"

    const-string v4, "0"

    invoke-static {v1, v2, v3, v4}, Lz5/y1;->e(IILjava/lang/String;Ljava/lang/String;)V

    const/16 v5, 0x1388

    const-string v6, "bufferForPlaybackAfterRebufferMs"

    invoke-static {v5, v2, v6, v4}, Lz5/y1;->e(IILjava/lang/String;Ljava/lang/String;)V

    const v7, 0xc350

    const-string v8, "minBufferMs"

    invoke-static {v7, v1, v8, v3}, Lz5/y1;->e(IILjava/lang/String;Ljava/lang/String;)V

    invoke-static {v7, v5, v8, v6}, Lz5/y1;->e(IILjava/lang/String;Ljava/lang/String;)V

    const-string v1, "maxBufferMs"

    invoke-static {v7, v7, v1, v8}, Lz5/y1;->e(IILjava/lang/String;Ljava/lang/String;)V

    const-string v1, "backBufferDurationMs"

    invoke-static {v2, v2, v1, v4}, Lz5/y1;->e(IILjava/lang/String;Ljava/lang/String;)V

    iput-object v0, p0, Lz5/y1;->a:Lt0/c;

    const-wide/32 v0, 0xc350

    invoke-static {v0, v1}, Lz5/v1;->b(J)J

    move-result-wide v2

    iput-wide v2, p0, Lz5/y1;->b:J

    invoke-static {v0, v1}, Lz5/v1;->b(J)J

    move-result-wide v0

    iput-wide v0, p0, Lz5/y1;->c:J

    const-wide/16 v0, 0x9c4

    invoke-static {v0, v1}, Lz5/v1;->b(J)J

    move-result-wide v0

    iput-wide v0, p0, Lz5/y1;->d:J

    const-wide/16 v0, 0x1388

    invoke-static {v0, v1}, Lz5/v1;->b(J)J

    move-result-wide v0

    iput-wide v0, p0, Lz5/y1;->e:J

    const/high16 v0, 0xc80000

    iput v0, p0, Lz5/y1;->g:I

    const-wide/16 v0, 0x0

    invoke-static {v0, v1}, Lz5/v1;->b(J)J

    move-result-wide v0

    iput-wide v0, p0, Lz5/y1;->f:J

    return-void
.end method

.method public static e(IILjava/lang/String;Ljava/lang/String;)V
    .registers 6

    if-lt p0, p1, :cond_4

    const/4 p0, 0x1

    goto :goto_5

    :cond_4
    const/4 p0, 0x0

    :goto_5
    new-instance p1, Ljava/lang/StringBuilder;

    invoke-virtual {p2}, Ljava/lang/String;->length()I

    move-result v0

    add-int/lit8 v0, v0, 0x15

    invoke-virtual {p3}, Ljava/lang/String;->length()I

    move-result v1

    add-int/2addr v1, v0

    invoke-direct {p1, v1}, Ljava/lang/StringBuilder;-><init>(I)V

    invoke-virtual {p1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string p2, " cannot be less than "

    invoke-virtual {p1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p1, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    invoke-static {p0, p1}, Lcom/google/android/gms/internal/ads/d;->h(ZLjava/lang/Object;)V

    return-void
.end method


# virtual methods
.method public final a([Lz5/e4;Lz5/fw1;[Lz5/yq1;)V
    .registers 8

    const/4 p2, 0x0

    move v0, p2

    :goto_2
    const/4 v1, 0x2

    const/high16 v2, 0xc80000

    if-ge p2, v1, :cond_1a

    aget-object v1, p3, p2

    if-eqz v1, :cond_17

    aget-object v1, p1, p2

    invoke-interface {v1}, Lz5/e4;->d()I

    move-result v1

    const/4 v3, 0x1

    if-eq v1, v3, :cond_16

    const/high16 v2, 0x7d00000

    :cond_16
    add-int/2addr v0, v2

    :cond_17
    add-int/lit8 p2, p2, 0x1

    goto :goto_2

    :cond_1a
    invoke-static {v2, v0}, Ljava/lang/Math;->max(II)I

    move-result p1

    iput p1, p0, Lz5/y1;->g:I

    iget-object p2, p0, Lz5/y1;->a:Lt0/c;

    invoke-virtual {p2, p1}, Lt0/c;->e(I)V

    return-void
.end method

.method public final b(JFZJ)Z
    .registers 9

    sget v0, Lz5/r7;->a:I

    const/high16 v0, 0x3f800000    # 1.0f

    cmpl-float v0, p3, v0

    if-nez v0, :cond_9

    goto :goto_10

    :cond_9
    long-to-double p1, p1

    float-to-double v0, p3

    div-double/2addr p1, v0

    .line 1
    invoke-static {p1, p2}, Ljava/lang/Math;->round(D)J

    move-result-wide p1

    :goto_10
    if-eqz p4, :cond_15

    .line 2
    iget-wide p3, p0, Lz5/y1;->e:J

    goto :goto_17

    :cond_15
    iget-wide p3, p0, Lz5/y1;->d:J

    :goto_17
    const-wide v0, -0x7fffffffffffffffL    # -4.9E-324

    cmp-long v0, p5, v0

    if-eqz v0, :cond_27

    const-wide/16 v0, 0x2

    div-long/2addr p5, v0

    invoke-static {p5, p6, p3, p4}, Ljava/lang/Math;->min(JJ)J

    move-result-wide p3

    :cond_27
    const-wide/16 p5, 0x0

    cmp-long p5, p3, p5

    if-lez p5, :cond_3e

    cmp-long p1, p1, p3

    if-gez p1, :cond_3e

    iget-object p1, p0, Lz5/y1;->a:Lt0/c;

    invoke-virtual {p1}, Lt0/c;->j()I

    move-result p1

    iget p2, p0, Lz5/y1;->g:I

    if-lt p1, p2, :cond_3c

    goto :goto_3e

    :cond_3c
    const/4 p1, 0x0

    return p1

    :cond_3e
    :goto_3e
    const/4 p1, 0x1

    return p1
.end method

.method public final c(JJF)Z
    .registers 10

    iget-object p1, p0, Lz5/y1;->a:Lt0/c;

    invoke-virtual {p1}, Lt0/c;->j()I

    move-result p1

    iget p2, p0, Lz5/y1;->g:I

    iget-wide v0, p0, Lz5/y1;->b:J

    const/high16 v2, 0x3f800000    # 1.0f

    cmpl-float v2, p5, v2

    if-lez v2, :cond_1a

    invoke-static {v0, v1, p5}, Lz5/r7;->f(JF)J

    move-result-wide v0

    iget-wide v2, p0, Lz5/y1;->c:J

    invoke-static {v0, v1, v2, v3}, Ljava/lang/Math;->min(JJ)J

    move-result-wide v0

    :cond_1a
    const-wide/32 v2, 0x7a120

    invoke-static {v0, v1, v2, v3}, Ljava/lang/Math;->max(JJ)J

    move-result-wide v0

    cmp-long p5, p3, v0

    const/4 v0, 0x0

    if-gez p5, :cond_39

    if-ge p1, p2, :cond_29

    const/4 v0, 0x1

    :cond_29
    iput-boolean v0, p0, Lz5/y1;->h:Z

    if-nez v0, :cond_43

    cmp-long p1, p3, v2

    if-gez p1, :cond_43

    const-string p1, "DefaultLoadControl"

    const-string p2, "Target buffer size reached with less than 500ms of buffered media data."

    invoke-static {p1, p2}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I

    goto :goto_43

    :cond_39
    iget-wide v1, p0, Lz5/y1;->c:J

    cmp-long p3, p3, v1

    if-gez p3, :cond_41

    if-lt p1, p2, :cond_43

    :cond_41
    iput-boolean v0, p0, Lz5/y1;->h:Z

    :cond_43
    :goto_43
    iget-boolean p1, p0, Lz5/y1;->h:Z

    return p1
.end method

.method public final d(Z)V
    .registers 3

    const/high16 v0, 0xc80000

    iput v0, p0, Lz5/y1;->g:I

    const/4 v0, 0x0

    iput-boolean v0, p0, Lz5/y1;->h:Z

    if-eqz p1, :cond_e

    iget-object p1, p0, Lz5/y1;->a:Lt0/c;

    invoke-virtual {p1}, Lt0/c;->d()V

    :cond_e
    return-void
.end method

.method public final zza()V
    .registers 2

    const/4 v0, 0x0

    invoke-virtual {p0, v0}, Lz5/y1;->d(Z)V

    return-void
.end method

.method public final zzb()V
    .registers 2

    const/4 v0, 0x1

    invoke-virtual {p0, v0}, Lz5/y1;->d(Z)V

    return-void
.end method

.method public final zzc()V
    .registers 2

    const/4 v0, 0x1

    invoke-virtual {p0, v0}, Lz5/y1;->d(Z)V

    return-void
.end method

.method public final zzd()J
    .registers 3

    iget-wide v0, p0, Lz5/y1;->f:J

    return-wide v0
.end method

.method public final zze()Z
    .registers 2

    const/4 v0, 0x0

    return v0
.end method

.method public final zzh()Lt0/c;
    .registers 2

    iget-object v0, p0, Lz5/y1;->a:Lt0/c;

    return-object v0
.end method
