.class public Lp9/d;
.super Lp/f;
.source ""


# direct methods
.method public static o(Ljava/lang/String;Ljava/lang/String;I)Ljava/lang/String;
    .registers 15

    and-int/lit8 p1, p2, 0x1

    const/4 p2, 0x0

    if-eqz p1, :cond_8

    const-string p1, "|"

    goto :goto_9

    :cond_8
    move-object p1, p2

    :goto_9
    const-string v0, "$this$trimMargin"

    .line 1
    invoke-static {p0, v0}, Lx/e;->f(Ljava/lang/Object;Ljava/lang/String;)V

    const-string v0, "marginPrefix"

    invoke-static {p1, v0}, Lx/e;->f(Ljava/lang/Object;Ljava/lang/String;)V

    .line 2
    invoke-static {p1}, Lp9/h;->s(Ljava/lang/CharSequence;)Z

    move-result v0

    xor-int/lit8 v0, v0, 0x1

    if-eqz v0, :cond_cf

    const-string v0, "\r\n"

    const-string v1, "\n"

    const-string v2, "\r"

    .line 3
    filled-new-array {v0, v1, v2}, [Ljava/lang/String;

    move-result-object v4

    const/4 v6, 0x0

    const/4 v7, 0x0

    const/4 v5, 0x0

    const/4 v8, 0x2

    move-object v3, p0

    .line 4
    invoke-static/range {v3 .. v8}, Lp9/l;->J(Ljava/lang/CharSequence;[Ljava/lang/String;IZII)Lo9/d;

    move-result-object v0

    new-instance v1, Lp9/k;

    invoke-direct {v1, p0}, Lp9/k;-><init>(Ljava/lang/CharSequence;)V

    .line 5
    new-instance v2, Lo9/i;

    invoke-direct {v2, v0, v1}, Lo9/i;-><init>(Lo9/d;Lh9/b;)V

    .line 6
    invoke-static {v2}, Lo9/e;->i(Lo9/d;)Ljava/util/List;

    move-result-object v0

    .line 7
    invoke-virtual {p0}, Ljava/lang/String;->length()I

    move-result p0

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v1

    const/4 v2, 0x0

    mul-int/2addr v1, v2

    add-int/2addr v1, p0

    .line 8
    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result p0

    const/4 v3, -0x1

    add-int/2addr p0, v3

    .line 9
    new-instance v4, Ljava/util/ArrayList;

    invoke-direct {v4}, Ljava/util/ArrayList;-><init>()V

    invoke-interface {v0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;

    move-result-object v0

    move v5, v2

    :goto_57
    invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z

    move-result v6

    if-eqz v6, :cond_b3

    invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v6

    add-int/lit8 v7, v5, 0x1

    if-ltz v5, :cond_af

    check-cast v6, Ljava/lang/String;

    if-eqz v5, :cond_6b

    if-ne v5, p0, :cond_73

    :cond_6b
    invoke-static {v6}, Lp9/h;->s(Ljava/lang/CharSequence;)Z

    move-result v5

    if-eqz v5, :cond_73

    move-object v6, p2

    goto :goto_a8

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

    move-result v5

    move v8, v2

    :goto_78
    if-ge v8, v5, :cond_8a

    invoke-virtual {v6, v8}, Ljava/lang/String;->charAt(I)C

    move-result v9

    invoke-static {v9}, Lp/a;->f(C)Z

    move-result v9

    xor-int/lit8 v9, v9, 0x1

    if-eqz v9, :cond_87

    goto :goto_8b

    :cond_87
    add-int/lit8 v8, v8, 0x1

    goto :goto_78

    :cond_8a
    move v8, v3

    :goto_8b
    if-ne v8, v3, :cond_8e

    goto :goto_a4

    :cond_8e
    const/4 v5, 0x4

    invoke-static {v6, p1, v8, v2, v5}, Lp9/h;->x(Ljava/lang/String;Ljava/lang/String;IZI)Z

    move-result v5

    if-eqz v5, :cond_a4

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

    move-result v5

    add-int/2addr v5, v8

    invoke-virtual {v6, v5}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object v5

    const-string v8, "(this as java.lang.String).substring(startIndex)"

    invoke-static {v5, v8}, Lx/e;->e(Ljava/lang/Object;Ljava/lang/String;)V

    goto :goto_a5

    :cond_a4
    :goto_a4
    move-object v5, p2

    :goto_a5
    if-eqz v5, :cond_a8

    move-object v6, v5

    :cond_a8
    :goto_a8
    if-eqz v6, :cond_ad

    invoke-virtual {v4, v6}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    :cond_ad
    move v5, v7

    goto :goto_57

    :cond_af
    invoke-static {}, Lo/b;->f()V

    throw p2

    :cond_b3
    new-instance p0, Ljava/lang/StringBuilder;

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

    const/4 v9, -0x1

    const/4 v11, 0x0

    const-string v6, "\n"

    const-string v8, ""

    const-string v10, "..."

    move-object v5, p0

    move-object v7, v8

    .line 10
    invoke-static/range {v4 .. v11}, Lz8/i;->j(Ljava/lang/Iterable;Ljava/lang/Appendable;Ljava/lang/CharSequence;Ljava/lang/CharSequence;Ljava/lang/CharSequence;ILjava/lang/CharSequence;Lh9/b;)Ljava/lang/Appendable;

    .line 11
    invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p0

    const-string p1, "mapIndexedNotNull { inde\u2026\"\\n\")\n        .toString()"

    invoke-static {p0, p1}, Lx/e;->e(Ljava/lang/Object;Ljava/lang/String;)V

    return-object p0

    :cond_cf
    new-instance p0, Ljava/lang/IllegalArgumentException;

    const-string p1, "marginPrefix must be non-blank string."

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

    move-result-object p1

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

    throw p0
.end method
