.class public Lcom/scaleasw/powercalc/Editor;
.super Ljava/lang/Object;
.source "Editor.java"

# interfaces
.implements Landroid/os/Parcelable;


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/scaleasw/powercalc/Editor$ViewMode;
    }
.end annotation


# static fields
.field static final CREATOR:Landroid/os/Parcelable$Creator;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Landroid/os/Parcelable$Creator",
            "<",
            "Lcom/scaleasw/powercalc/Editor;",
            ">;"
        }
    .end annotation
.end field


# instance fields
.field private activity:Landroid/app/Activity;

.field public editing:Ljava/lang/Boolean;

.field public errorIndex:I

.field private errorLine:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List",
            "<",
            "Lcom/scaleasw/powercalc/Element;",
            ">;"
        }
    .end annotation
.end field

.field private historyAnsFloat:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List",
            "<",
            "Lcom/scaleasw/powercalc/Complex;",
            ">;"
        }
    .end annotation
.end field

.field private historyAnsRadix:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List",
            "<",
            "Lcom/scaleasw/powercalc/Complex;",
            ">;"
        }
    .end annotation
.end field

.field private historyFloat:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List",
            "<",
            "Ljava/util/List",
            "<",
            "Lcom/scaleasw/powercalc/Element;",
            ">;>;"
        }
    .end annotation
.end field

.field public historyIndexFloat:I

.field public historyIndexRadix:I

.field private historyRadix:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List",
            "<",
            "Ljava/util/List",
            "<",
            "Lcom/scaleasw/powercalc/Element;",
            ">;>;"
        }
    .end annotation
.end field

.field public historySize:I

.field public hypState:Lcom/scaleasw/powercalc/Keyboard$HypState;

.field public index:I

.field public line:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List",
            "<",
            "Lcom/scaleasw/powercalc/Element;",
            ">;"
        }
    .end annotation
.end field

.field private lineAns:Lcom/scaleasw/powercalc/Complex;

.field private resultView:Landroid/widget/EditText;

.field public shiftState:Lcom/scaleasw/powercalc/Keyboard$ShiftState;

.field public solver:Lcom/scaleasw/powercalc/Solver;

.field private view:Lcom/scaleasw/powercalc/CalcDisplay;

.field public viewDecimals:I

.field public viewMode:Lcom/scaleasw/powercalc/Editor$ViewMode;


# direct methods
.method static constructor <clinit>()V
    .locals 1

    .prologue
    .line 241
    new-instance v0, Lcom/scaleasw/powercalc/Editor$1;

    invoke-direct {v0}, Lcom/scaleasw/powercalc/Editor$1;-><init>()V

    sput-object v0, Lcom/scaleasw/powercalc/Editor;->CREATOR:Landroid/os/Parcelable$Creator;

    return-void
.end method

.method constructor <init>()V
    .locals 1

    .prologue
    const/4 v0, 0x0

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

    .line 57
    iput-object v0, p0, Lcom/scaleasw/powercalc/Editor;->activity:Landroid/app/Activity;

    .line 58
    iput-object v0, p0, Lcom/scaleasw/powercalc/Editor;->view:Lcom/scaleasw/powercalc/CalcDisplay;

    .line 59
    iput-object v0, p0, Lcom/scaleasw/powercalc/Editor;->resultView:Landroid/widget/EditText;

    .line 60
    invoke-direct {p0}, Lcom/scaleasw/powercalc/Editor;->initialize()V

    .line 61
    return-void
.end method

.method constructor <init>(Landroid/os/Parcel;)V
    .locals 1
    .param p1, "in"    # Landroid/os/Parcel;

    .prologue
    const/4 v0, 0x0

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

    .line 65
    iput-object v0, p0, Lcom/scaleasw/powercalc/Editor;->activity:Landroid/app/Activity;

    .line 66
    iput-object v0, p0, Lcom/scaleasw/powercalc/Editor;->view:Lcom/scaleasw/powercalc/CalcDisplay;

    .line 67
    iput-object v0, p0, Lcom/scaleasw/powercalc/Editor;->resultView:Landroid/widget/EditText;

    .line 68
    invoke-direct {p0}, Lcom/scaleasw/powercalc/Editor;->initialize()V

    .line 69
    invoke-virtual {p0, p1}, Lcom/scaleasw/powercalc/Editor;->readFromParcel(Landroid/os/Parcel;)V

    .line 70
    return-void
.end method

.method private getNextCloseBracketIndex(I)I
    .locals 5
    .param p1, "index"    # I

    .prologue
    .line 449
    iget-object v3, p0, Lcom/scaleasw/powercalc/Editor;->line:Ljava/util/List;

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

    move-result v1

    .line 450
    .local v1, "result":I
    iget-object v3, p0, Lcom/scaleasw/powercalc/Editor;->line:Ljava/util/List;

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

    move-result v3

    if-lt p1, v3, :cond_0

    iget-object v3, p0, Lcom/scaleasw/powercalc/Editor;->line:Ljava/util/List;

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

    move-result v3

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

    .line 451
    :cond_0
    const/4 v2, 0x0

    .line 452
    .local v2, "step":I
    move v0, p1

    .local v0, "i":I
    :goto_0
    iget-object v3, p0, Lcom/scaleasw/powercalc/Editor;->line:Ljava/util/List;

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

    move-result v3

    if-ge v0, v3, :cond_4

    .line 454
    if-gez p1, :cond_2

    .line 452
    :cond_1
    :goto_1
    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    .line 455
    :cond_2
    iget-object v3, p0, Lcom/scaleasw/powercalc/Editor;->line:Ljava/util/List;

    invoke-interface {v3, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v3

    sget-object v4, Lcom/scaleasw/powercalc/Element;->SOBRACKET:Lcom/scaleasw/powercalc/Element;

    if-ne v3, v4, :cond_3

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

    .line 456
    :cond_3
    iget-object v3, p0, Lcom/scaleasw/powercalc/Editor;->line:Ljava/util/List;

    invoke-interface {v3, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v3

    sget-object v4, Lcom/scaleasw/powercalc/Element;->SCBRACKET:Lcom/scaleasw/powercalc/Element;

    if-ne v3, v4, :cond_5

    if-nez v2, :cond_5

    .line 458
    move v1, v0

    .line 463
    :cond_4
    return v1

    .line 461
    :cond_5
    iget-object v3, p0, Lcom/scaleasw/powercalc/Editor;->line:Ljava/util/List;

    invoke-interface {v3, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v3

    sget-object v4, Lcom/scaleasw/powercalc/Element;->SCBRACKET:Lcom/scaleasw/powercalc/Element;

    if-ne v3, v4, :cond_1

    add-int/lit8 v2, v2, 0x1

    goto :goto_1
.end method

.method private getPreviousOpenBracketIndex(I)I
    .locals 5
    .param p1, "index"    # I

    .prologue
    .line 430
    const/4 v1, -0x1

    .line 431
    .local v1, "result":I
    iget-object v3, p0, Lcom/scaleasw/powercalc/Editor;->line:Ljava/util/List;

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

    move-result v3

    if-lt p1, v3, :cond_0

    iget-object v3, p0, Lcom/scaleasw/powercalc/Editor;->line:Ljava/util/List;

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

    move-result v3

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

    .line 432
    :cond_0
    const/4 v2, 0x0

    .line 433
    .local v2, "step":I
    move v0, p1

    .local v0, "i":I
    :goto_0
    if-ltz v0, :cond_2

    .line 435
    iget-object v3, p0, Lcom/scaleasw/powercalc/Editor;->line:Ljava/util/List;

    invoke-interface {v3, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v3

    sget-object v4, Lcom/scaleasw/powercalc/Element;->SCBRACKET:Lcom/scaleasw/powercalc/Element;

    if-ne v3, v4, :cond_1

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

    .line 436
    :cond_1
    iget-object v3, p0, Lcom/scaleasw/powercalc/Editor;->line:Ljava/util/List;

    invoke-interface {v3, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v3

    sget-object v4, Lcom/scaleasw/powercalc/Element;->SOBRACKET:Lcom/scaleasw/powercalc/Element;

    if-ne v3, v4, :cond_3

    if-nez v2, :cond_3

    .line 438
    move v1, v0

    .line 443
    :cond_2
    return v1

    .line 441
    :cond_3
    iget-object v3, p0, Lcom/scaleasw/powercalc/Editor;->line:Ljava/util/List;

    invoke-interface {v3, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v3

    sget-object v4, Lcom/scaleasw/powercalc/Element;->SOBRACKET:Lcom/scaleasw/powercalc/Element;

    if-ne v3, v4, :cond_4

    add-int/lit8 v2, v2, 0x1

    .line 433
    :cond_4
    add-int/lit8 v0, v0, -0x1

    goto :goto_0
.end method

.method private historyPutOnStack(Lcom/scaleasw/powercalc/Solver$CalcMode;)V
    .locals 6
    .param p1, "targetMode"    # Lcom/scaleasw/powercalc/Solver$CalcMode;

    .prologue
    const-wide/16 v4, 0x0

    const/4 v3, 0x0

    .line 299
    new-instance v0, Ljava/util/ArrayList;

    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->line:Ljava/util/List;

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

    .line 300
    .local v0, "historyLine":Ljava/util/List;, "Ljava/util/List<Lcom/scaleasw/powercalc/Element;>;"
    sget-object v2, Lcom/scaleasw/powercalc/Solver$CalcMode;->MODE_FLOAT:Lcom/scaleasw/powercalc/Solver$CalcMode;

    if-ne p1, v2, :cond_1

    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->historyFloat:Ljava/util/List;

    invoke-interface {v2, v3, v0}, Ljava/util/List;->add(ILjava/lang/Object;)V

    .line 302
    :goto_0
    new-instance v1, Lcom/scaleasw/powercalc/Complex;

    invoke-direct {v1, v4, v5, v4, v5}, Lcom/scaleasw/powercalc/Complex;-><init>(DD)V

    .line 303
    .local v1, "value":Lcom/scaleasw/powercalc/Complex;
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->solver:Lcom/scaleasw/powercalc/Solver;

    iget-object v2, v2, Lcom/scaleasw/powercalc/Solver;->memoryANS:Lcom/scaleasw/powercalc/Complex;

    invoke-virtual {v1, v2}, Lcom/scaleasw/powercalc/Complex;->setComplex(Lcom/scaleasw/powercalc/Complex;)V

    .line 304
    sget-object v2, Lcom/scaleasw/powercalc/Solver$CalcMode;->MODE_FLOAT:Lcom/scaleasw/powercalc/Solver$CalcMode;

    if-ne p1, v2, :cond_2

    .line 305
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->historyAnsFloat:Ljava/util/List;

    invoke-interface {v2, v3, v1}, Ljava/util/List;->add(ILjava/lang/Object;)V

    .line 306
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->historyFloat:Ljava/util/List;

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

    move-result v2

    iget v3, p0, Lcom/scaleasw/powercalc/Editor;->historySize:I

    if-le v2, v3, :cond_0

    .line 307
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->historyFloat:Ljava/util/List;

    iget v3, p0, Lcom/scaleasw/powercalc/Editor;->historySize:I

    invoke-interface {v2, v3}, Ljava/util/List;->remove(I)Ljava/lang/Object;

    .line 308
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->historyAnsFloat:Ljava/util/List;

    iget v3, p0, Lcom/scaleasw/powercalc/Editor;->historySize:I

    invoke-interface {v2, v3}, Ljava/util/List;->remove(I)Ljava/lang/Object;

    .line 318
    :cond_0
    :goto_1
    return-void

    .line 301
    .end local v1    # "value":Lcom/scaleasw/powercalc/Complex;
    :cond_1
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->historyRadix:Ljava/util/List;

    invoke-interface {v2, v3, v0}, Ljava/util/List;->add(ILjava/lang/Object;)V

    goto :goto_0

    .line 312
    .restart local v1    # "value":Lcom/scaleasw/powercalc/Complex;
    :cond_2
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->historyAnsRadix:Ljava/util/List;

    invoke-interface {v2, v3, v1}, Ljava/util/List;->add(ILjava/lang/Object;)V

    .line 313
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->historyRadix:Ljava/util/List;

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

    move-result v2

    iget v3, p0, Lcom/scaleasw/powercalc/Editor;->historySize:I

    if-le v2, v3, :cond_0

    .line 314
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->historyRadix:Ljava/util/List;

    iget v3, p0, Lcom/scaleasw/powercalc/Editor;->historySize:I

    invoke-interface {v2, v3}, Ljava/util/List;->remove(I)Ljava/lang/Object;

    .line 315
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->historyAnsRadix:Ljava/util/List;

    iget v3, p0, Lcom/scaleasw/powercalc/Editor;->historySize:I

    invoke-interface {v2, v3}, Ljava/util/List;->remove(I)Ljava/lang/Object;

    goto :goto_1
.end method

.method private initialize()V
    .locals 5

    .prologue
    const/4 v4, 0x0

    const-wide/16 v2, 0x0

    const/4 v1, -0x1

    .line 74
    const/16 v0, 0x14

    iput v0, p0, Lcom/scaleasw/powercalc/Editor;->historySize:I

    .line 75
    new-instance v0, Ljava/util/ArrayList;

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

    iput-object v0, p0, Lcom/scaleasw/powercalc/Editor;->line:Ljava/util/List;

    .line 76
    new-instance v0, Ljava/util/ArrayList;

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

    iput-object v0, p0, Lcom/scaleasw/powercalc/Editor;->errorLine:Ljava/util/List;

    .line 77
    new-instance v0, Lcom/scaleasw/powercalc/Complex;

    invoke-direct {v0, v2, v3, v2, v3}, Lcom/scaleasw/powercalc/Complex;-><init>(DD)V

    iput-object v0, p0, Lcom/scaleasw/powercalc/Editor;->lineAns:Lcom/scaleasw/powercalc/Complex;

    .line 78
    sget-object v0, Lcom/scaleasw/powercalc/Editor$ViewMode;->MODE_NORMAL:Lcom/scaleasw/powercalc/Editor$ViewMode;

    iput-object v0, p0, Lcom/scaleasw/powercalc/Editor;->viewMode:Lcom/scaleasw/powercalc/Editor$ViewMode;

    .line 79
    const/4 v0, 0x2

    iput v0, p0, Lcom/scaleasw/powercalc/Editor;->viewDecimals:I

    .line 80
    iput v4, p0, Lcom/scaleasw/powercalc/Editor;->index:I

    .line 81
    iput v1, p0, Lcom/scaleasw/powercalc/Editor;->errorIndex:I

    .line 82
    sget-object v0, Lcom/scaleasw/powercalc/Keyboard$ShiftState;->SHIFT_OFF:Lcom/scaleasw/powercalc/Keyboard$ShiftState;

    iput-object v0, p0, Lcom/scaleasw/powercalc/Editor;->shiftState:Lcom/scaleasw/powercalc/Keyboard$ShiftState;

    .line 83
    sget-object v0, Lcom/scaleasw/powercalc/Keyboard$HypState;->HYP_OFF:Lcom/scaleasw/powercalc/Keyboard$HypState;

    iput-object v0, p0, Lcom/scaleasw/powercalc/Editor;->hypState:Lcom/scaleasw/powercalc/Keyboard$HypState;

    .line 84
    new-instance v0, Ljava/util/ArrayList;

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

    iput-object v0, p0, Lcom/scaleasw/powercalc/Editor;->historyFloat:Ljava/util/List;

    .line 85
    new-instance v0, Ljava/util/ArrayList;

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

    iput-object v0, p0, Lcom/scaleasw/powercalc/Editor;->historyRadix:Ljava/util/List;

    .line 86
    new-instance v0, Ljava/util/ArrayList;

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

    iput-object v0, p0, Lcom/scaleasw/powercalc/Editor;->historyAnsFloat:Ljava/util/List;

    .line 87
    new-instance v0, Ljava/util/ArrayList;

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

    iput-object v0, p0, Lcom/scaleasw/powercalc/Editor;->historyAnsRadix:Ljava/util/List;

    .line 88
    invoke-static {v4}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v0

    iput-object v0, p0, Lcom/scaleasw/powercalc/Editor;->editing:Ljava/lang/Boolean;

    .line 89
    iput v1, p0, Lcom/scaleasw/powercalc/Editor;->historyIndexFloat:I

    .line 90
    iput v1, p0, Lcom/scaleasw/powercalc/Editor;->historyIndexRadix:I

    .line 91
    new-instance v0, Lcom/scaleasw/powercalc/Solver;

    invoke-direct {v0}, Lcom/scaleasw/powercalc/Solver;-><init>()V

    iput-object v0, p0, Lcom/scaleasw/powercalc/Editor;->solver:Lcom/scaleasw/powercalc/Solver;

    .line 92
    return-void
.end method

.method private setError()V
    .locals 2

    .prologue
    .line 469
    new-instance v0, Ljava/util/ArrayList;

    iget-object v1, p0, Lcom/scaleasw/powercalc/Editor;->line:Ljava/util/List;

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

    iput-object v0, p0, Lcom/scaleasw/powercalc/Editor;->errorLine:Ljava/util/List;

    .line 470
    return-void
.end method

.method private valueToRadix(JLcom/scaleasw/powercalc/Solver$CalcMode;I)Ljava/lang/CharSequence;
    .locals 21
    .param p1, "value"    # J
    .param p3, "mode"    # Lcom/scaleasw/powercalc/Solver$CalcMode;
    .param p4, "bitSize"    # I

    .prologue
    .line 340
    const-string v9, ""

    .line 341
    .local v9, "result":Ljava/lang/String;
    move-wide/from16 v10, p1

    .line 342
    .local v10, "origValue":J
    const-wide/16 v4, 0x0

    .line 343
    .local v4, "mask":J
    const-wide/16 v12, 0x1

    .line 344
    .local v12, "sign":J
    const/4 v3, 0x0

    .local v3, "i":I
    :goto_0
    move/from16 v0, p4

    if-ge v3, v0, :cond_0

    .line 346
    const/16 v16, 0x1

    shl-long v4, v4, v16

    .line 347
    const-wide/16 v16, 0x1

    or-long v4, v4, v16

    .line 348
    const/16 v16, 0x1

    shl-long v12, v12, v16

    .line 344
    add-int/lit8 v3, v3, 0x1

    goto :goto_0

    .line 351
    :cond_0
    sget-object v16, Lcom/scaleasw/powercalc/Solver$CalcMode;->MODE_DEC:Lcom/scaleasw/powercalc/Solver$CalcMode;

    move-object/from16 v0, p3

    move-object/from16 v1, v16

    if-ne v0, v1, :cond_4

    .line 353
    const/16 v16, 0x40

    move/from16 v0, p4

    move/from16 v1, v16

    if-ge v0, v1, :cond_1

    rem-long p1, p1, v12

    .line 360
    :cond_1
    :goto_1
    move-wide/from16 v6, p1

    .line 361
    .local v6, "maskedValue":J
    const/4 v2, 0x0

    .line 366
    .local v2, "count":I
    :cond_2
    sget-object v16, Lcom/scaleasw/powercalc/Editor$2;->$SwitchMap$com$scaleasw$powercalc$Solver$CalcMode:[I

    invoke-virtual/range {p3 .. p3}, Lcom/scaleasw/powercalc/Solver$CalcMode;->ordinal()I

    move-result v17

    aget v16, v16, v17

    packed-switch v16, :pswitch_data_0

    .line 395
    const-wide/16 p1, 0x0

    .line 398
    :goto_2
    const-wide/16 v16, 0x0

    cmp-long v16, p1, v16

    if-nez v16, :cond_7

    .line 400
    sget-object v16, Lcom/scaleasw/powercalc/Editor$2;->$SwitchMap$com$scaleasw$powercalc$Solver$CalcMode:[I

    invoke-virtual/range {p3 .. p3}, Lcom/scaleasw/powercalc/Solver$CalcMode;->ordinal()I

    move-result v17

    aget v16, v16, v17

    packed-switch v16, :pswitch_data_1

    .line 424
    :cond_3
    :goto_3
    new-instance v16, Ljava/lang/String;

    move-object/from16 v0, v16

    invoke-direct {v0, v9}, Ljava/lang/String;-><init>(Ljava/lang/String;)V

    return-object v16

    .line 357
    .end local v2    # "count":I
    .end local v6    # "maskedValue":J
    :cond_4
    and-long p1, p1, v4

    .line 358
    const/16 v16, 0x1

    shr-long v12, v12, v16

    goto :goto_1

    .line 369
    .restart local v2    # "count":I
    .restart local v6    # "maskedValue":J
    :pswitch_0
    const-wide/16 v16, 0xa

    rem-long v14, p1, v16

    .line 370
    .local v14, "temp":J
    const-wide/16 v16, 0x0

    cmp-long v16, v14, v16

    if-gez v16, :cond_5

    const-wide/16 v16, -0x1

    mul-long v14, v14, v16

    .line 371
    :cond_5
    const-wide/16 v16, 0x30

    add-long v16, v16, v14

    move-wide/from16 v0, v16

    long-to-int v0, v0

    move/from16 v16, v0

    move/from16 v0, v16

    int-to-char v8, v0

    .line 372
    .local v8, "num":C
    new-instance v16, Ljava/lang/StringBuilder;

    invoke-direct/range {v16 .. v16}, Ljava/lang/StringBuilder;-><init>()V

    invoke-static {v8}, Ljava/lang/Character;->toString(C)Ljava/lang/String;

    move-result-object v17

    invoke-virtual/range {v16 .. v17}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v16

    move-object/from16 v0, v16

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

    move-result-object v16

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

    move-result-object v9

    .line 373
    const-wide/16 v16, 0xa

    div-long p1, p1, v16

    .line 374
    goto :goto_2

    .line 376
    .end local v8    # "num":C
    .end local v14    # "temp":J
    :pswitch_1
    const-wide/16 v16, 0x1

    and-long v14, p1, v16

    .line 377
    .restart local v14    # "temp":J
    const-wide/16 v16, 0x30

    add-long v16, v16, v14

    move-wide/from16 v0, v16

    long-to-int v0, v0

    move/from16 v16, v0

    move/from16 v0, v16

    int-to-char v8, v0

    .line 378
    .restart local v8    # "num":C
    new-instance v16, Ljava/lang/StringBuilder;

    invoke-direct/range {v16 .. v16}, Ljava/lang/StringBuilder;-><init>()V

    invoke-static {v8}, Ljava/lang/Character;->toString(C)Ljava/lang/String;

    move-result-object v17

    invoke-virtual/range {v16 .. v17}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v16

    move-object/from16 v0, v16

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

    move-result-object v16

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

    move-result-object v9

    .line 379
    const/16 v16, 0x1

    ushr-long p1, p1, v16

    .line 380
    goto/16 :goto_2

    .line 382
    .end local v8    # "num":C
    .end local v14    # "temp":J
    :pswitch_2
    const-wide/16 v16, 0x7

    and-long v14, p1, v16

    .line 383
    .restart local v14    # "temp":J
    const-wide/16 v16, 0x30

    add-long v16, v16, v14

    move-wide/from16 v0, v16

    long-to-int v0, v0

    move/from16 v16, v0

    move/from16 v0, v16

    int-to-char v8, v0

    .line 384
    .restart local v8    # "num":C
    new-instance v16, Ljava/lang/StringBuilder;

    invoke-direct/range {v16 .. v16}, Ljava/lang/StringBuilder;-><init>()V

    invoke-static {v8}, Ljava/lang/Character;->toString(C)Ljava/lang/String;

    move-result-object v17

    invoke-virtual/range {v16 .. v17}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v16

    move-object/from16 v0, v16

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

    move-result-object v16

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

    move-result-object v9

    .line 385
    const/16 v16, 0x3

    ushr-long p1, p1, v16

    .line 386
    goto/16 :goto_2

    .line 388
    .end local v8    # "num":C
    .end local v14    # "temp":J
    :pswitch_3
    const-wide/16 v16, 0xf

    and-long v14, p1, v16

    .line 389
    .restart local v14    # "temp":J
    const-wide/16 v16, 0xa

    cmp-long v16, v14, v16

    if-gez v16, :cond_6

    const-wide/16 v16, 0x30

    add-long v16, v16, v14

    move-wide/from16 v0, v16

    long-to-int v0, v0

    move/from16 v16, v0

    move/from16 v0, v16

    int-to-char v8, v0

    .line 391
    .restart local v8    # "num":C
    :goto_4
    new-instance v16, Ljava/lang/StringBuilder;

    invoke-direct/range {v16 .. v16}, Ljava/lang/StringBuilder;-><init>()V

    invoke-static {v8}, Ljava/lang/Character;->toString(C)Ljava/lang/String;

    move-result-object v17

    invoke-virtual/range {v16 .. v17}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v16

    move-object/from16 v0, v16

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

    move-result-object v16

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

    move-result-object v9

    .line 392
    const/16 v16, 0x4

    ushr-long p1, p1, v16

    .line 393
    goto/16 :goto_2

    .line 390
    .end local v8    # "num":C
    :cond_6
    const-wide/16 v16, 0x41

    add-long v16, v16, v14

    const-wide/16 v18, 0xa

    sub-long v16, v16, v18

    move-wide/from16 v0, v16

    long-to-int v0, v0

    move/from16 v16, v0

    move/from16 v0, v16

    int-to-char v8, v0

    .restart local v8    # "num":C
    goto :goto_4

    .line 403
    .end local v8    # "num":C
    .end local v14    # "temp":J
    :pswitch_4
    const-wide/16 v16, 0x0

    cmp-long v16, v10, v16

    if-gez v16, :cond_3

    const-wide/16 v16, 0x0

    cmp-long v16, v6, v16

    if-eqz v16, :cond_3

    new-instance v16, Ljava/lang/StringBuilder;

    invoke-direct/range {v16 .. v16}, Ljava/lang/StringBuilder;-><init>()V

    const-string v17, "-"

    invoke-virtual/range {v16 .. v17}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v16

    move-object/from16 v0, v16

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

    move-result-object v16

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

    move-result-object v9

    goto/16 :goto_3

    .line 406
    :pswitch_5
    new-instance v16, Ljava/lang/StringBuilder;

    invoke-direct/range {v16 .. v16}, Ljava/lang/StringBuilder;-><init>()V

    const-string v17, "0b"

    invoke-virtual/range {v16 .. v17}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v16

    move-object/from16 v0, v16

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

    move-result-object v16

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

    move-result-object v9

    .line 407
    goto/16 :goto_3

    .line 409
    :pswitch_6
    new-instance v16, Ljava/lang/StringBuilder;

    invoke-direct/range {v16 .. v16}, Ljava/lang/StringBuilder;-><init>()V

    const-string v17, "0o"

    invoke-virtual/range {v16 .. v17}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v16

    move-object/from16 v0, v16

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

    move-result-object v16

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

    move-result-object v9

    .line 410
    goto/16 :goto_3

    .line 412
    :pswitch_7
    new-instance v16, Ljava/lang/StringBuilder;

    invoke-direct/range {v16 .. v16}, Ljava/lang/StringBuilder;-><init>()V

    const-string v17, "0x"

    invoke-virtual/range {v16 .. v17}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v16

    move-object/from16 v0, v16

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

    move-result-object v16

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

    move-result-object v9

    .line 413
    goto/16 :goto_3

    .line 419
    :cond_7
    add-int/lit8 v2, v2, 0x1

    .line 420
    sget-object v16, Lcom/scaleasw/powercalc/Solver$CalcMode;->MODE_BIN:Lcom/scaleasw/powercalc/Solver$CalcMode;

    move-object/from16 v0, p3

    move-object/from16 v1, v16

    if-eq v0, v1, :cond_8

    sget-object v16, Lcom/scaleasw/powercalc/Solver$CalcMode;->MODE_HEX:Lcom/scaleasw/powercalc/Solver$CalcMode;

    move-object/from16 v0, p3

    move-object/from16 v1, v16

    if-ne v0, v1, :cond_9

    .line 421
    :cond_8
    rem-int/lit8 v16, v2, 0x4

    if-nez v16, :cond_9

    new-instance v16, Ljava/lang/StringBuilder;

    invoke-direct/range {v16 .. v16}, Ljava/lang/StringBuilder;-><init>()V

    const-string v17, " "

    invoke-virtual/range {v16 .. v17}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v16

    move-object/from16 v0, v16

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

    move-result-object v16

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

    move-result-object v9

    .line 423
    :cond_9
    const-wide/16 v16, 0x0

    cmp-long v16, p1, v16

    if-nez v16, :cond_2

    goto/16 :goto_3

    .line 366
    nop

    :pswitch_data_0
    .packed-switch 0x1
        :pswitch_0
        :pswitch_1
        :pswitch_2
        :pswitch_3
    .end packed-switch

    .line 400
    :pswitch_data_1
    .packed-switch 0x1
        :pswitch_4
        :pswitch_5
        :pswitch_6
        :pswitch_7
    .end packed-switch
.end method


# virtual methods
.method public buttonClick(IILcom/scaleasw/powercalc/Keyboard$KeyboardType;)V
    .locals 9
    .param p1, "x"    # I
    .param p2, "y"    # I
    .param p3, "keyboardType"    # Lcom/scaleasw/powercalc/Keyboard$KeyboardType;

    .prologue
    const/4 v3, 0x1

    const-wide/16 v6, 0x0

    const/4 v8, -0x1

    const/4 v4, 0x0

    .line 773
    invoke-static {p1, p2, p3}, Lcom/scaleasw/powercalc/Keyboard;->getKeyboard(IILcom/scaleasw/powercalc/Keyboard$KeyboardType;)Lcom/scaleasw/powercalc/Keyboard;

    move-result-object v1

    .line 774
    .local v1, "key":Lcom/scaleasw/powercalc/Keyboard;
    sget-object v2, Lcom/scaleasw/powercalc/Keyboard;->T00:Lcom/scaleasw/powercalc/Keyboard;

    if-ne v1, v2, :cond_3

    .line 777
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->shiftState:Lcom/scaleasw/powercalc/Keyboard$ShiftState;

    sget-object v3, Lcom/scaleasw/powercalc/Keyboard$ShiftState;->SHIFT_OFF:Lcom/scaleasw/powercalc/Keyboard$ShiftState;

    if-ne v2, v3, :cond_1

    sget-object v2, Lcom/scaleasw/powercalc/Keyboard$ShiftState;->SHIFT_ON:Lcom/scaleasw/powercalc/Keyboard$ShiftState;

    iput-object v2, p0, Lcom/scaleasw/powercalc/Editor;->shiftState:Lcom/scaleasw/powercalc/Keyboard$ShiftState;

    .line 942
    :cond_0
    :goto_0
    invoke-virtual {p0}, Lcom/scaleasw/powercalc/Editor;->updateEditorView()V

    .line 943
    return-void

    .line 778
    :cond_1
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->shiftState:Lcom/scaleasw/powercalc/Keyboard$ShiftState;

    sget-object v3, Lcom/scaleasw/powercalc/Keyboard$ShiftState;->SHIFT_ON:Lcom/scaleasw/powercalc/Keyboard$ShiftState;

    if-ne v2, v3, :cond_2

    sget-object v2, Lcom/scaleasw/powercalc/Keyboard$ShiftState;->SHIFT_ALPHA:Lcom/scaleasw/powercalc/Keyboard$ShiftState;

    iput-object v2, p0, Lcom/scaleasw/powercalc/Editor;->shiftState:Lcom/scaleasw/powercalc/Keyboard$ShiftState;

    goto :goto_0

    .line 779
    :cond_2
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->shiftState:Lcom/scaleasw/powercalc/Keyboard$ShiftState;

    sget-object v3, Lcom/scaleasw/powercalc/Keyboard$ShiftState;->SHIFT_ALPHA:Lcom/scaleasw/powercalc/Keyboard$ShiftState;

    if-ne v2, v3, :cond_0

    sget-object v2, Lcom/scaleasw/powercalc/Keyboard$ShiftState;->SHIFT_OFF:Lcom/scaleasw/powercalc/Keyboard$ShiftState;

    iput-object v2, p0, Lcom/scaleasw/powercalc/Editor;->shiftState:Lcom/scaleasw/powercalc/Keyboard$ShiftState;

    goto :goto_0

    .line 781
    :cond_3
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->solver:Lcom/scaleasw/powercalc/Solver;

    iget-object v2, v2, Lcom/scaleasw/powercalc/Solver;->calcMode:Lcom/scaleasw/powercalc/Solver$CalcMode;

    sget-object v5, Lcom/scaleasw/powercalc/Solver$CalcMode;->MODE_FLOAT:Lcom/scaleasw/powercalc/Solver$CalcMode;

    if-ne v2, v5, :cond_5

    sget-object v2, Lcom/scaleasw/powercalc/Keyboard;->T01:Lcom/scaleasw/powercalc/Keyboard;

    if-ne v1, v2, :cond_5

    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->shiftState:Lcom/scaleasw/powercalc/Keyboard$ShiftState;

    sget-object v5, Lcom/scaleasw/powercalc/Keyboard$ShiftState;->SHIFT_ALPHA:Lcom/scaleasw/powercalc/Keyboard$ShiftState;

    if-eq v2, v5, :cond_5

    .line 784
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->hypState:Lcom/scaleasw/powercalc/Keyboard$HypState;

    sget-object v3, Lcom/scaleasw/powercalc/Keyboard$HypState;->HYP_OFF:Lcom/scaleasw/powercalc/Keyboard$HypState;

    if-ne v2, v3, :cond_4

    sget-object v2, Lcom/scaleasw/powercalc/Keyboard$HypState;->HYP_ON:Lcom/scaleasw/powercalc/Keyboard$HypState;

    iput-object v2, p0, Lcom/scaleasw/powercalc/Editor;->hypState:Lcom/scaleasw/powercalc/Keyboard$HypState;

    goto :goto_0

    .line 785
    :cond_4
    sget-object v2, Lcom/scaleasw/powercalc/Keyboard$HypState;->HYP_OFF:Lcom/scaleasw/powercalc/Keyboard$HypState;

    iput-object v2, p0, Lcom/scaleasw/powercalc/Editor;->hypState:Lcom/scaleasw/powercalc/Keyboard$HypState;

    goto :goto_0

    .line 787
    :cond_5
    sget-object v2, Lcom/scaleasw/powercalc/Keyboard;->T10:Lcom/scaleasw/powercalc/Keyboard;

    if-ne v1, v2, :cond_c

    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->editing:Ljava/lang/Boolean;

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

    move-result v2

    if-nez v2, :cond_c

    iget v2, p0, Lcom/scaleasw/powercalc/Editor;->errorIndex:I

    if-ne v2, v8, :cond_c

    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->shiftState:Lcom/scaleasw/powercalc/Keyboard$ShiftState;

    sget-object v5, Lcom/scaleasw/powercalc/Keyboard$ShiftState;->SHIFT_OFF:Lcom/scaleasw/powercalc/Keyboard$ShiftState;

    if-ne v2, v5, :cond_c

    .line 790
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->solver:Lcom/scaleasw/powercalc/Solver;

    iget-object v2, v2, Lcom/scaleasw/powercalc/Solver;->calcMode:Lcom/scaleasw/powercalc/Solver$CalcMode;

    sget-object v3, Lcom/scaleasw/powercalc/Solver$CalcMode;->MODE_FLOAT:Lcom/scaleasw/powercalc/Solver$CalcMode;

    if-ne v2, v3, :cond_9

    .line 791
    iget v2, p0, Lcom/scaleasw/powercalc/Editor;->historyIndexFloat:I

    add-int/lit8 v2, v2, 0x1

    iput v2, p0, Lcom/scaleasw/powercalc/Editor;->historyIndexFloat:I

    .line 792
    iget v2, p0, Lcom/scaleasw/powercalc/Editor;->historyIndexFloat:I

    iget v3, p0, Lcom/scaleasw/powercalc/Editor;->historySize:I

    if-lt v2, v3, :cond_6

    iget v2, p0, Lcom/scaleasw/powercalc/Editor;->historySize:I

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

    iput v2, p0, Lcom/scaleasw/powercalc/Editor;->historyIndexFloat:I

    .line 793
    :cond_6
    iget v2, p0, Lcom/scaleasw/powercalc/Editor;->historyIndexFloat:I

    iget-object v3, p0, Lcom/scaleasw/powercalc/Editor;->historyFloat:Ljava/util/List;

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

    move-result v3

    if-lt v2, v3, :cond_7

    iget v2, p0, Lcom/scaleasw/powercalc/Editor;->historyIndexFloat:I

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

    iput v2, p0, Lcom/scaleasw/powercalc/Editor;->historyIndexFloat:I

    .line 794
    :cond_7
    iget v2, p0, Lcom/scaleasw/powercalc/Editor;->historyIndexFloat:I

    if-le v2, v8, :cond_8

    invoke-virtual {p0}, Lcom/scaleasw/powercalc/Editor;->historyGetLine()V

    .line 802
    :cond_8
    :goto_1
    sget-object v2, Lcom/scaleasw/powercalc/Keyboard$HypState;->HYP_OFF:Lcom/scaleasw/powercalc/Keyboard$HypState;

    iput-object v2, p0, Lcom/scaleasw/powercalc/Editor;->hypState:Lcom/scaleasw/powercalc/Keyboard$HypState;

    goto/16 :goto_0

    .line 797
    :cond_9
    iget v2, p0, Lcom/scaleasw/powercalc/Editor;->historyIndexRadix:I

    add-int/lit8 v2, v2, 0x1

    iput v2, p0, Lcom/scaleasw/powercalc/Editor;->historyIndexRadix:I

    .line 798
    iget v2, p0, Lcom/scaleasw/powercalc/Editor;->historyIndexRadix:I

    iget v3, p0, Lcom/scaleasw/powercalc/Editor;->historySize:I

    if-lt v2, v3, :cond_a

    iget v2, p0, Lcom/scaleasw/powercalc/Editor;->historySize:I

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

    iput v2, p0, Lcom/scaleasw/powercalc/Editor;->historyIndexRadix:I

    .line 799
    :cond_a
    iget v2, p0, Lcom/scaleasw/powercalc/Editor;->historyIndexRadix:I

    iget-object v3, p0, Lcom/scaleasw/powercalc/Editor;->historyRadix:Ljava/util/List;

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

    move-result v3

    if-lt v2, v3, :cond_b

    iget v2, p0, Lcom/scaleasw/powercalc/Editor;->historyIndexRadix:I

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

    iput v2, p0, Lcom/scaleasw/powercalc/Editor;->historyIndexRadix:I

    .line 800
    :cond_b
    iget v2, p0, Lcom/scaleasw/powercalc/Editor;->historyIndexRadix:I

    if-le v2, v8, :cond_8

    invoke-virtual {p0}, Lcom/scaleasw/powercalc/Editor;->historyGetLine()V

    goto :goto_1

    .line 804
    :cond_c
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->solver:Lcom/scaleasw/powercalc/Solver;

    iget-object v2, v2, Lcom/scaleasw/powercalc/Solver;->calcMode:Lcom/scaleasw/powercalc/Solver$CalcMode;

    sget-object v5, Lcom/scaleasw/powercalc/Solver$CalcMode;->MODE_FLOAT:Lcom/scaleasw/powercalc/Solver$CalcMode;

    if-ne v2, v5, :cond_f

    sget-object v2, Lcom/scaleasw/powercalc/Keyboard;->T10:Lcom/scaleasw/powercalc/Keyboard;

    if-ne v1, v2, :cond_f

    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->shiftState:Lcom/scaleasw/powercalc/Keyboard$ShiftState;

    sget-object v5, Lcom/scaleasw/powercalc/Keyboard$ShiftState;->SHIFT_ON:Lcom/scaleasw/powercalc/Keyboard$ShiftState;

    if-ne v2, v5, :cond_f

    .line 807
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->solver:Lcom/scaleasw/powercalc/Solver;

    iget-object v2, v2, Lcom/scaleasw/powercalc/Solver;->angleMode:Lcom/scaleasw/powercalc/Solver$AngleMode;

    sget-object v3, Lcom/scaleasw/powercalc/Solver$AngleMode;->MODE_DEG:Lcom/scaleasw/powercalc/Solver$AngleMode;

    if-ne v2, v3, :cond_d

    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->solver:Lcom/scaleasw/powercalc/Solver;

    sget-object v3, Lcom/scaleasw/powercalc/Solver$AngleMode;->MODE_RAD:Lcom/scaleasw/powercalc/Solver$AngleMode;

    iput-object v3, v2, Lcom/scaleasw/powercalc/Solver;->angleMode:Lcom/scaleasw/powercalc/Solver$AngleMode;

    .line 810
    :goto_2
    sget-object v2, Lcom/scaleasw/powercalc/Keyboard$ShiftState;->SHIFT_OFF:Lcom/scaleasw/powercalc/Keyboard$ShiftState;

    iput-object v2, p0, Lcom/scaleasw/powercalc/Editor;->shiftState:Lcom/scaleasw/powercalc/Keyboard$ShiftState;

    .line 811
    sget-object v2, Lcom/scaleasw/powercalc/Keyboard$HypState;->HYP_OFF:Lcom/scaleasw/powercalc/Keyboard$HypState;

    iput-object v2, p0, Lcom/scaleasw/powercalc/Editor;->hypState:Lcom/scaleasw/powercalc/Keyboard$HypState;

    goto/16 :goto_0

    .line 808
    :cond_d
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->solver:Lcom/scaleasw/powercalc/Solver;

    iget-object v2, v2, Lcom/scaleasw/powercalc/Solver;->angleMode:Lcom/scaleasw/powercalc/Solver$AngleMode;

    sget-object v3, Lcom/scaleasw/powercalc/Solver$AngleMode;->MODE_RAD:Lcom/scaleasw/powercalc/Solver$AngleMode;

    if-ne v2, v3, :cond_e

    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->solver:Lcom/scaleasw/powercalc/Solver;

    sget-object v3, Lcom/scaleasw/powercalc/Solver$AngleMode;->MODE_GRAD:Lcom/scaleasw/powercalc/Solver$AngleMode;

    iput-object v3, v2, Lcom/scaleasw/powercalc/Solver;->angleMode:Lcom/scaleasw/powercalc/Solver$AngleMode;

    goto :goto_2

    .line 809
    :cond_e
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->solver:Lcom/scaleasw/powercalc/Solver;

    sget-object v3, Lcom/scaleasw/powercalc/Solver$AngleMode;->MODE_DEG:Lcom/scaleasw/powercalc/Solver$AngleMode;

    iput-object v3, v2, Lcom/scaleasw/powercalc/Solver;->angleMode:Lcom/scaleasw/powercalc/Solver$AngleMode;

    goto :goto_2

    .line 813
    :cond_f
    sget-object v2, Lcom/scaleasw/powercalc/Keyboard;->T20:Lcom/scaleasw/powercalc/Keyboard;

    if-ne v1, v2, :cond_14

    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->editing:Ljava/lang/Boolean;

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

    move-result v2

    if-nez v2, :cond_14

    iget v2, p0, Lcom/scaleasw/powercalc/Editor;->errorIndex:I

    if-ne v2, v8, :cond_14

    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->shiftState:Lcom/scaleasw/powercalc/Keyboard$ShiftState;

    sget-object v5, Lcom/scaleasw/powercalc/Keyboard$ShiftState;->SHIFT_OFF:Lcom/scaleasw/powercalc/Keyboard$ShiftState;

    if-ne v2, v5, :cond_14

    .line 816
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->solver:Lcom/scaleasw/powercalc/Solver;

    iget-object v2, v2, Lcom/scaleasw/powercalc/Solver;->calcMode:Lcom/scaleasw/powercalc/Solver$CalcMode;

    sget-object v3, Lcom/scaleasw/powercalc/Solver$CalcMode;->MODE_FLOAT:Lcom/scaleasw/powercalc/Solver$CalcMode;

    if-ne v2, v3, :cond_12

    .line 817
    iget v2, p0, Lcom/scaleasw/powercalc/Editor;->historyIndexFloat:I

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

    iput v2, p0, Lcom/scaleasw/powercalc/Editor;->historyIndexFloat:I

    .line 818
    iget v2, p0, Lcom/scaleasw/powercalc/Editor;->historyIndexFloat:I

    if-gt v2, v8, :cond_10

    iput v4, p0, Lcom/scaleasw/powercalc/Editor;->historyIndexFloat:I

    .line 819
    :cond_10
    iget v2, p0, Lcom/scaleasw/powercalc/Editor;->historyIndexFloat:I

    if-le v2, v8, :cond_11

    invoke-virtual {p0}, Lcom/scaleasw/powercalc/Editor;->historyGetLine()V

    .line 826
    :cond_11
    :goto_3
    sget-object v2, Lcom/scaleasw/powercalc/Keyboard$HypState;->HYP_OFF:Lcom/scaleasw/powercalc/Keyboard$HypState;

    iput-object v2, p0, Lcom/scaleasw/powercalc/Editor;->hypState:Lcom/scaleasw/powercalc/Keyboard$HypState;

    goto/16 :goto_0

    .line 822
    :cond_12
    iget v2, p0, Lcom/scaleasw/powercalc/Editor;->historyIndexRadix:I

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

    iput v2, p0, Lcom/scaleasw/powercalc/Editor;->historyIndexRadix:I

    .line 823
    iget v2, p0, Lcom/scaleasw/powercalc/Editor;->historyIndexRadix:I

    if-gt v2, v8, :cond_13

    iput v4, p0, Lcom/scaleasw/powercalc/Editor;->historyIndexRadix:I

    .line 824
    :cond_13
    iget v2, p0, Lcom/scaleasw/powercalc/Editor;->historyIndexRadix:I

    if-le v2, v8, :cond_11

    invoke-virtual {p0}, Lcom/scaleasw/powercalc/Editor;->historyGetLine()V

    goto :goto_3

    .line 828
    :cond_14
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->solver:Lcom/scaleasw/powercalc/Solver;

    iget-object v2, v2, Lcom/scaleasw/powercalc/Solver;->calcMode:Lcom/scaleasw/powercalc/Solver$CalcMode;

    sget-object v5, Lcom/scaleasw/powercalc/Solver$CalcMode;->MODE_FLOAT:Lcom/scaleasw/powercalc/Solver$CalcMode;

    if-ne v2, v5, :cond_18

    sget-object v2, Lcom/scaleasw/powercalc/Keyboard;->T20:Lcom/scaleasw/powercalc/Keyboard;

    if-ne v1, v2, :cond_18

    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->shiftState:Lcom/scaleasw/powercalc/Keyboard$ShiftState;

    sget-object v5, Lcom/scaleasw/powercalc/Keyboard$ShiftState;->SHIFT_ON:Lcom/scaleasw/powercalc/Keyboard$ShiftState;

    if-ne v2, v5, :cond_18

    .line 831
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->viewMode:Lcom/scaleasw/powercalc/Editor$ViewMode;

    sget-object v3, Lcom/scaleasw/powercalc/Editor$ViewMode;->MODE_NORMAL:Lcom/scaleasw/powercalc/Editor$ViewMode;

    if-ne v2, v3, :cond_15

    sget-object v2, Lcom/scaleasw/powercalc/Editor$ViewMode;->MODE_FIXED:Lcom/scaleasw/powercalc/Editor$ViewMode;

    iput-object v2, p0, Lcom/scaleasw/powercalc/Editor;->viewMode:Lcom/scaleasw/powercalc/Editor$ViewMode;

    .line 835
    :goto_4
    sget-object v2, Lcom/scaleasw/powercalc/Keyboard$ShiftState;->SHIFT_OFF:Lcom/scaleasw/powercalc/Keyboard$ShiftState;

    iput-object v2, p0, Lcom/scaleasw/powercalc/Editor;->shiftState:Lcom/scaleasw/powercalc/Keyboard$ShiftState;

    .line 836
    sget-object v2, Lcom/scaleasw/powercalc/Keyboard$HypState;->HYP_OFF:Lcom/scaleasw/powercalc/Keyboard$HypState;

    iput-object v2, p0, Lcom/scaleasw/powercalc/Editor;->hypState:Lcom/scaleasw/powercalc/Keyboard$HypState;

    goto/16 :goto_0

    .line 832
    :cond_15
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->viewMode:Lcom/scaleasw/powercalc/Editor$ViewMode;

    sget-object v3, Lcom/scaleasw/powercalc/Editor$ViewMode;->MODE_FIXED:Lcom/scaleasw/powercalc/Editor$ViewMode;

    if-ne v2, v3, :cond_16

    sget-object v2, Lcom/scaleasw/powercalc/Editor$ViewMode;->MODE_SCIENTIFIC:Lcom/scaleasw/powercalc/Editor$ViewMode;

    iput-object v2, p0, Lcom/scaleasw/powercalc/Editor;->viewMode:Lcom/scaleasw/powercalc/Editor$ViewMode;

    goto :goto_4

    .line 833
    :cond_16
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->viewMode:Lcom/scaleasw/powercalc/Editor$ViewMode;

    sget-object v3, Lcom/scaleasw/powercalc/Editor$ViewMode;->MODE_SCIENTIFIC:Lcom/scaleasw/powercalc/Editor$ViewMode;

    if-ne v2, v3, :cond_17

    sget-object v2, Lcom/scaleasw/powercalc/Editor$ViewMode;->MODE_ENGINEER:Lcom/scaleasw/powercalc/Editor$ViewMode;

    iput-object v2, p0, Lcom/scaleasw/powercalc/Editor;->viewMode:Lcom/scaleasw/powercalc/Editor$ViewMode;

    goto :goto_4

    .line 834
    :cond_17
    sget-object v2, Lcom/scaleasw/powercalc/Editor$ViewMode;->MODE_NORMAL:Lcom/scaleasw/powercalc/Editor$ViewMode;

    iput-object v2, p0, Lcom/scaleasw/powercalc/Editor;->viewMode:Lcom/scaleasw/powercalc/Editor$ViewMode;

    goto :goto_4

    .line 838
    :cond_18
    sget-object v2, Lcom/scaleasw/powercalc/Keyboard;->T30:Lcom/scaleasw/powercalc/Keyboard;

    if-ne v1, v2, :cond_1c

    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->shiftState:Lcom/scaleasw/powercalc/Keyboard$ShiftState;

    sget-object v5, Lcom/scaleasw/powercalc/Keyboard$ShiftState;->SHIFT_OFF:Lcom/scaleasw/powercalc/Keyboard$ShiftState;

    if-ne v2, v5, :cond_1c

    .line 841
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->editing:Ljava/lang/Boolean;

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

    move-result v2

    if-nez v2, :cond_1a

    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->line:Ljava/util/List;

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

    move-result v2

    iput v2, p0, Lcom/scaleasw/powercalc/Editor;->index:I

    .line 843
    :cond_19
    :goto_5
    invoke-static {v3}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v2

    iput-object v2, p0, Lcom/scaleasw/powercalc/Editor;->editing:Ljava/lang/Boolean;

    .line 844
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->solver:Lcom/scaleasw/powercalc/Solver;

    iget-object v2, v2, Lcom/scaleasw/powercalc/Solver;->calcMode:Lcom/scaleasw/powercalc/Solver$CalcMode;

    sget-object v3, Lcom/scaleasw/powercalc/Solver$CalcMode;->MODE_FLOAT:Lcom/scaleasw/powercalc/Solver$CalcMode;

    if-ne v2, v3, :cond_1b

    iput v4, p0, Lcom/scaleasw/powercalc/Editor;->historyIndexFloat:I

    .line 846
    :goto_6
    iput v8, p0, Lcom/scaleasw/powercalc/Editor;->errorIndex:I

    .line 847
    sget-object v2, Lcom/scaleasw/powercalc/Keyboard$HypState;->HYP_OFF:Lcom/scaleasw/powercalc/Keyboard$HypState;

    iput-object v2, p0, Lcom/scaleasw/powercalc/Editor;->hypState:Lcom/scaleasw/powercalc/Keyboard$HypState;

    goto/16 :goto_0

    .line 842
    :cond_1a
    iget v2, p0, Lcom/scaleasw/powercalc/Editor;->index:I

    if-lez v2, :cond_19

    iget v2, p0, Lcom/scaleasw/powercalc/Editor;->index:I

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

    iput v2, p0, Lcom/scaleasw/powercalc/Editor;->index:I

    goto :goto_5

    .line 845
    :cond_1b
    iput v4, p0, Lcom/scaleasw/powercalc/Editor;->historyIndexRadix:I

    goto :goto_6

    .line 849
    :cond_1c
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->solver:Lcom/scaleasw/powercalc/Solver;

    iget-object v2, v2, Lcom/scaleasw/powercalc/Solver;->calcMode:Lcom/scaleasw/powercalc/Solver$CalcMode;

    sget-object v5, Lcom/scaleasw/powercalc/Solver$CalcMode;->MODE_FLOAT:Lcom/scaleasw/powercalc/Solver$CalcMode;

    if-ne v2, v5, :cond_1e

    sget-object v2, Lcom/scaleasw/powercalc/Keyboard;->T30:Lcom/scaleasw/powercalc/Keyboard;

    if-ne v1, v2, :cond_1e

    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->shiftState:Lcom/scaleasw/powercalc/Keyboard$ShiftState;

    sget-object v5, Lcom/scaleasw/powercalc/Keyboard$ShiftState;->SHIFT_ON:Lcom/scaleasw/powercalc/Keyboard$ShiftState;

    if-ne v2, v5, :cond_1e

    .line 852
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->solver:Lcom/scaleasw/powercalc/Solver;

    iget-object v2, v2, Lcom/scaleasw/powercalc/Solver;->complexMode:Lcom/scaleasw/powercalc/Solver$ComplexMode;

    sget-object v3, Lcom/scaleasw/powercalc/Solver$ComplexMode;->MODE_NORMAL:Lcom/scaleasw/powercalc/Solver$ComplexMode;

    if-ne v2, v3, :cond_1d

    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->solver:Lcom/scaleasw/powercalc/Solver;

    sget-object v3, Lcom/scaleasw/powercalc/Solver$ComplexMode;->MODE_POLAR:Lcom/scaleasw/powercalc/Solver$ComplexMode;

    iput-object v3, v2, Lcom/scaleasw/powercalc/Solver;->complexMode:Lcom/scaleasw/powercalc/Solver$ComplexMode;

    .line 854
    :goto_7
    sget-object v2, Lcom/scaleasw/powercalc/Keyboard$ShiftState;->SHIFT_OFF:Lcom/scaleasw/powercalc/Keyboard$ShiftState;

    iput-object v2, p0, Lcom/scaleasw/powercalc/Editor;->shiftState:Lcom/scaleasw/powercalc/Keyboard$ShiftState;

    .line 855
    sget-object v2, Lcom/scaleasw/powercalc/Keyboard$HypState;->HYP_OFF:Lcom/scaleasw/powercalc/Keyboard$HypState;

    iput-object v2, p0, Lcom/scaleasw/powercalc/Editor;->hypState:Lcom/scaleasw/powercalc/Keyboard$HypState;

    goto/16 :goto_0

    .line 853
    :cond_1d
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->solver:Lcom/scaleasw/powercalc/Solver;

    sget-object v3, Lcom/scaleasw/powercalc/Solver$ComplexMode;->MODE_NORMAL:Lcom/scaleasw/powercalc/Solver$ComplexMode;

    iput-object v3, v2, Lcom/scaleasw/powercalc/Solver;->complexMode:Lcom/scaleasw/powercalc/Solver$ComplexMode;

    goto :goto_7

    .line 857
    :cond_1e
    sget-object v2, Lcom/scaleasw/powercalc/Keyboard;->T33:Lcom/scaleasw/powercalc/Keyboard;

    if-ne v1, v2, :cond_1f

    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->shiftState:Lcom/scaleasw/powercalc/Keyboard$ShiftState;

    sget-object v5, Lcom/scaleasw/powercalc/Keyboard$ShiftState;->SHIFT_ON:Lcom/scaleasw/powercalc/Keyboard$ShiftState;

    if-ne v2, v5, :cond_1f

    .line 860
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->solver:Lcom/scaleasw/powercalc/Solver;

    iget-object v2, v2, Lcom/scaleasw/powercalc/Solver;->memoryM:Lcom/scaleasw/powercalc/Complex;

    iput-wide v6, v2, Lcom/scaleasw/powercalc/Complex;->re:D

    .line 861
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->solver:Lcom/scaleasw/powercalc/Solver;

    iget-object v2, v2, Lcom/scaleasw/powercalc/Solver;->memoryM:Lcom/scaleasw/powercalc/Complex;

    iput-wide v6, v2, Lcom/scaleasw/powercalc/Complex;->im:D

    .line 862
    sget-object v2, Lcom/scaleasw/powercalc/Keyboard$ShiftState;->SHIFT_OFF:Lcom/scaleasw/powercalc/Keyboard$ShiftState;

    iput-object v2, p0, Lcom/scaleasw/powercalc/Editor;->shiftState:Lcom/scaleasw/powercalc/Keyboard$ShiftState;

    goto/16 :goto_0

    .line 864
    :cond_1f
    sget-object v2, Lcom/scaleasw/powercalc/Keyboard;->T40:Lcom/scaleasw/powercalc/Keyboard;

    if-ne v1, v2, :cond_23

    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->shiftState:Lcom/scaleasw/powercalc/Keyboard$ShiftState;

    sget-object v5, Lcom/scaleasw/powercalc/Keyboard$ShiftState;->SHIFT_OFF:Lcom/scaleasw/powercalc/Keyboard$ShiftState;

    if-ne v2, v5, :cond_23

    .line 867
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->editing:Ljava/lang/Boolean;

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

    move-result v2

    if-nez v2, :cond_20

    iput v4, p0, Lcom/scaleasw/powercalc/Editor;->index:I

    .line 868
    :cond_20
    iget v2, p0, Lcom/scaleasw/powercalc/Editor;->index:I

    iget-object v5, p0, Lcom/scaleasw/powercalc/Editor;->line:Ljava/util/List;

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

    move-result v5

    if-ge v2, v5, :cond_21

    iget v2, p0, Lcom/scaleasw/powercalc/Editor;->index:I

    add-int/lit8 v2, v2, 0x1

    iput v2, p0, Lcom/scaleasw/powercalc/Editor;->index:I

    .line 869
    :cond_21
    invoke-static {v3}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v2

    iput-object v2, p0, Lcom/scaleasw/powercalc/Editor;->editing:Ljava/lang/Boolean;

    .line 870
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->solver:Lcom/scaleasw/powercalc/Solver;

    iget-object v2, v2, Lcom/scaleasw/powercalc/Solver;->calcMode:Lcom/scaleasw/powercalc/Solver$CalcMode;

    sget-object v3, Lcom/scaleasw/powercalc/Solver$CalcMode;->MODE_FLOAT:Lcom/scaleasw/powercalc/Solver$CalcMode;

    if-ne v2, v3, :cond_22

    iput v4, p0, Lcom/scaleasw/powercalc/Editor;->historyIndexFloat:I

    .line 872
    :goto_8
    iput v8, p0, Lcom/scaleasw/powercalc/Editor;->errorIndex:I

    .line 873
    sget-object v2, Lcom/scaleasw/powercalc/Keyboard$HypState;->HYP_OFF:Lcom/scaleasw/powercalc/Keyboard$HypState;

    iput-object v2, p0, Lcom/scaleasw/powercalc/Editor;->hypState:Lcom/scaleasw/powercalc/Keyboard$HypState;

    goto/16 :goto_0

    .line 871
    :cond_22
    iput v4, p0, Lcom/scaleasw/powercalc/Editor;->historyIndexRadix:I

    goto :goto_8

    .line 875
    :cond_23
    sget-object v2, Lcom/scaleasw/powercalc/Keyboard;->T50:Lcom/scaleasw/powercalc/Keyboard;

    if-ne v1, v2, :cond_25

    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->shiftState:Lcom/scaleasw/powercalc/Keyboard$ShiftState;

    sget-object v5, Lcom/scaleasw/powercalc/Keyboard$ShiftState;->SHIFT_OFF:Lcom/scaleasw/powercalc/Keyboard$ShiftState;

    if-ne v2, v5, :cond_25

    .line 878
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->line:Ljava/util/List;

    invoke-interface {v2}, Ljava/util/List;->clear()V

    .line 879
    iput v4, p0, Lcom/scaleasw/powercalc/Editor;->index:I

    .line 880
    invoke-static {v4}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v2

    iput-object v2, p0, Lcom/scaleasw/powercalc/Editor;->editing:Ljava/lang/Boolean;

    .line 881
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->solver:Lcom/scaleasw/powercalc/Solver;

    iget-object v2, v2, Lcom/scaleasw/powercalc/Solver;->calcMode:Lcom/scaleasw/powercalc/Solver$CalcMode;

    sget-object v3, Lcom/scaleasw/powercalc/Solver$CalcMode;->MODE_FLOAT:Lcom/scaleasw/powercalc/Solver$CalcMode;

    if-ne v2, v3, :cond_24

    iput v8, p0, Lcom/scaleasw/powercalc/Editor;->historyIndexFloat:I

    .line 883
    :goto_9
    iput v8, p0, Lcom/scaleasw/powercalc/Editor;->errorIndex:I

    .line 884
    sget-object v2, Lcom/scaleasw/powercalc/Keyboard$HypState;->HYP_OFF:Lcom/scaleasw/powercalc/Keyboard$HypState;

    iput-object v2, p0, Lcom/scaleasw/powercalc/Editor;->hypState:Lcom/scaleasw/powercalc/Keyboard$HypState;

    goto/16 :goto_0

    .line 882
    :cond_24
    iput v8, p0, Lcom/scaleasw/powercalc/Editor;->historyIndexRadix:I

    goto :goto_9

    .line 886
    :cond_25
    sget-object v2, Lcom/scaleasw/powercalc/Keyboard;->T53:Lcom/scaleasw/powercalc/Keyboard;

    if-ne v1, v2, :cond_27

    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->shiftState:Lcom/scaleasw/powercalc/Keyboard$ShiftState;

    sget-object v5, Lcom/scaleasw/powercalc/Keyboard$ShiftState;->SHIFT_OFF:Lcom/scaleasw/powercalc/Keyboard$ShiftState;

    if-ne v2, v5, :cond_27

    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->editing:Ljava/lang/Boolean;

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

    move-result v2

    if-eqz v2, :cond_27

    .line 889
    iget v2, p0, Lcom/scaleasw/powercalc/Editor;->index:I

    if-lez v2, :cond_0

    .line 891
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->editing:Ljava/lang/Boolean;

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

    move-result v2

    if-eqz v2, :cond_26

    iget v2, p0, Lcom/scaleasw/powercalc/Editor;->index:I

    invoke-virtual {p0, v2}, Lcom/scaleasw/powercalc/Editor;->deletePreviousElement(I)V

    .line 892
    :cond_26
    sget-object v2, Lcom/scaleasw/powercalc/Keyboard$HypState;->HYP_OFF:Lcom/scaleasw/powercalc/Keyboard$HypState;

    iput-object v2, p0, Lcom/scaleasw/powercalc/Editor;->hypState:Lcom/scaleasw/powercalc/Keyboard$HypState;

    goto/16 :goto_0

    .line 895
    :cond_27
    sget-object v2, Lcom/scaleasw/powercalc/Keyboard;->B43:Lcom/scaleasw/powercalc/Keyboard;

    if-ne v1, v2, :cond_2d

    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->shiftState:Lcom/scaleasw/powercalc/Keyboard$ShiftState;

    sget-object v5, Lcom/scaleasw/powercalc/Keyboard$ShiftState;->SHIFT_OFF:Lcom/scaleasw/powercalc/Keyboard$ShiftState;

    if-ne v2, v5, :cond_2d

    .line 898
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->solver:Lcom/scaleasw/powercalc/Solver;

    iget-object v3, p0, Lcom/scaleasw/powercalc/Editor;->line:Ljava/util/List;

    invoke-virtual {v2, v3}, Lcom/scaleasw/powercalc/Solver;->solve(Ljava/util/List;)Lcom/scaleasw/powercalc/Solver$Error;

    move-result-object v0

    .line 899
    .local v0, "error":Lcom/scaleasw/powercalc/Solver$Error;
    sget-object v2, Lcom/scaleasw/powercalc/Solver$Error;->NONE:Lcom/scaleasw/powercalc/Solver$Error;

    if-eq v0, v2, :cond_29

    .line 900
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->solver:Lcom/scaleasw/powercalc/Solver;

    iget-object v2, v2, Lcom/scaleasw/powercalc/Solver;->lastErrorIndex:Ljava/lang/Integer;

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

    move-result v2

    iput v2, p0, Lcom/scaleasw/powercalc/Editor;->errorIndex:I

    .line 901
    iget v2, p0, Lcom/scaleasw/powercalc/Editor;->errorIndex:I

    if-ne v2, v8, :cond_28

    const/4 v2, -0x2

    iput v2, p0, Lcom/scaleasw/powercalc/Editor;->errorIndex:I

    .line 902
    :cond_28
    invoke-direct {p0}, Lcom/scaleasw/powercalc/Editor;->setError()V

    .line 913
    :goto_a
    iput v4, p0, Lcom/scaleasw/powercalc/Editor;->index:I

    .line 914
    invoke-static {v4}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v2

    iput-object v2, p0, Lcom/scaleasw/powercalc/Editor;->editing:Ljava/lang/Boolean;

    .line 915
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->solver:Lcom/scaleasw/powercalc/Solver;

    iget-object v2, v2, Lcom/scaleasw/powercalc/Solver;->calcMode:Lcom/scaleasw/powercalc/Solver$CalcMode;

    sget-object v3, Lcom/scaleasw/powercalc/Solver$CalcMode;->MODE_FLOAT:Lcom/scaleasw/powercalc/Solver$CalcMode;

    if-ne v2, v3, :cond_2c

    iput v4, p0, Lcom/scaleasw/powercalc/Editor;->historyIndexFloat:I

    .line 917
    :goto_b
    sget-object v2, Lcom/scaleasw/powercalc/Keyboard$HypState;->HYP_OFF:Lcom/scaleasw/powercalc/Keyboard$HypState;

    iput-object v2, p0, Lcom/scaleasw/powercalc/Editor;->hypState:Lcom/scaleasw/powercalc/Keyboard$HypState;

    goto/16 :goto_0

    .line 905
    :cond_29
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->solver:Lcom/scaleasw/powercalc/Solver;

    iget-boolean v2, v2, Lcom/scaleasw/powercalc/Solver;->modeChange:Z

    if-eqz v2, :cond_2b

    .line 906
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->solver:Lcom/scaleasw/powercalc/Solver;

    iget-object v2, v2, Lcom/scaleasw/powercalc/Solver;->calcMode:Lcom/scaleasw/powercalc/Solver$CalcMode;

    sget-object v3, Lcom/scaleasw/powercalc/Solver$CalcMode;->MODE_FLOAT:Lcom/scaleasw/powercalc/Solver$CalcMode;

    if-ne v2, v3, :cond_2a

    sget-object v2, Lcom/scaleasw/powercalc/Solver$CalcMode;->MODE_HEX:Lcom/scaleasw/powercalc/Solver$CalcMode;

    invoke-direct {p0, v2}, Lcom/scaleasw/powercalc/Editor;->historyPutOnStack(Lcom/scaleasw/powercalc/Solver$CalcMode;)V

    .line 910
    :goto_c
    new-instance v2, Lcom/scaleasw/powercalc/Complex;

    invoke-direct {v2, v6, v7, v6, v7}, Lcom/scaleasw/powercalc/Complex;-><init>(DD)V

    iput-object v2, p0, Lcom/scaleasw/powercalc/Editor;->lineAns:Lcom/scaleasw/powercalc/Complex;

    .line 911
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->lineAns:Lcom/scaleasw/powercalc/Complex;

    iget-object v3, p0, Lcom/scaleasw/powercalc/Editor;->solver:Lcom/scaleasw/powercalc/Solver;

    iget-object v3, v3, Lcom/scaleasw/powercalc/Solver;->memoryANS:Lcom/scaleasw/powercalc/Complex;

    invoke-virtual {v2, v3}, Lcom/scaleasw/powercalc/Complex;->setComplex(Lcom/scaleasw/powercalc/Complex;)V

    goto :goto_a

    .line 907
    :cond_2a
    sget-object v2, Lcom/scaleasw/powercalc/Solver$CalcMode;->MODE_FLOAT:Lcom/scaleasw/powercalc/Solver$CalcMode;

    invoke-direct {p0, v2}, Lcom/scaleasw/powercalc/Editor;->historyPutOnStack(Lcom/scaleasw/powercalc/Solver$CalcMode;)V

    goto :goto_c

    .line 909
    :cond_2b
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->solver:Lcom/scaleasw/powercalc/Solver;

    iget-object v2, v2, Lcom/scaleasw/powercalc/Solver;->calcMode:Lcom/scaleasw/powercalc/Solver$CalcMode;

    invoke-direct {p0, v2}, Lcom/scaleasw/powercalc/Editor;->historyPutOnStack(Lcom/scaleasw/powercalc/Solver$CalcMode;)V

    goto :goto_c

    .line 916
    :cond_2c
    iput v4, p0, Lcom/scaleasw/powercalc/Editor;->historyIndexRadix:I

    goto :goto_b

    .line 922
    .end local v0    # "error":Lcom/scaleasw/powercalc/Solver$Error;
    :cond_2d
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->editing:Ljava/lang/Boolean;

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

    move-result v2

    if-nez v2, :cond_2e

    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->line:Ljava/util/List;

    invoke-interface {v2}, Ljava/util/List;->clear()V

    .line 923
    :cond_2e
    if-eqz v1, :cond_2f

    iget v5, p0, Lcom/scaleasw/powercalc/Editor;->index:I

    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->solver:Lcom/scaleasw/powercalc/Solver;

    iget-object v2, v2, Lcom/scaleasw/powercalc/Solver;->calcMode:Lcom/scaleasw/powercalc/Solver$CalcMode;

    sget-object v6, Lcom/scaleasw/powercalc/Solver$CalcMode;->MODE_FLOAT:Lcom/scaleasw/powercalc/Solver$CalcMode;

    if-eq v2, v6, :cond_30

    move v2, v3

    :goto_d
    iget-object v6, p0, Lcom/scaleasw/powercalc/Editor;->shiftState:Lcom/scaleasw/powercalc/Keyboard$ShiftState;

    iget-object v7, p0, Lcom/scaleasw/powercalc/Editor;->hypState:Lcom/scaleasw/powercalc/Keyboard$HypState;

    invoke-static {v1, v2, v6, v7}, Lcom/scaleasw/powercalc/Element;->getElement(Lcom/scaleasw/powercalc/Keyboard;ZLcom/scaleasw/powercalc/Keyboard$ShiftState;Lcom/scaleasw/powercalc/Keyboard$HypState;)Lcom/scaleasw/powercalc/Element;

    move-result-object v2

    invoke-virtual {p0, v5, v2}, Lcom/scaleasw/powercalc/Editor;->insertElement(ILcom/scaleasw/powercalc/Element;)V

    .line 924
    :cond_2f
    sget-object v2, Lcom/scaleasw/powercalc/Keyboard$HypState;->HYP_OFF:Lcom/scaleasw/powercalc/Keyboard$HypState;

    iput-object v2, p0, Lcom/scaleasw/powercalc/Editor;->hypState:Lcom/scaleasw/powercalc/Keyboard$HypState;

    .line 925
    invoke-static {v3}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v2

    iput-object v2, p0, Lcom/scaleasw/powercalc/Editor;->editing:Ljava/lang/Boolean;

    .line 926
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->solver:Lcom/scaleasw/powercalc/Solver;

    iget-object v2, v2, Lcom/scaleasw/powercalc/Solver;->calcMode:Lcom/scaleasw/powercalc/Solver$CalcMode;

    sget-object v3, Lcom/scaleasw/powercalc/Solver$CalcMode;->MODE_FLOAT:Lcom/scaleasw/powercalc/Solver$CalcMode;

    if-ne v2, v3, :cond_31

    iput v4, p0, Lcom/scaleasw/powercalc/Editor;->historyIndexFloat:I

    .line 928
    :goto_e
    iput v8, p0, Lcom/scaleasw/powercalc/Editor;->errorIndex:I

    .line 930
    sget-object v2, Lcom/scaleasw/powercalc/Keyboard;->T23:Lcom/scaleasw/powercalc/Keyboard;

    if-ne v1, v2, :cond_32

    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->shiftState:Lcom/scaleasw/powercalc/Keyboard$ShiftState;

    sget-object v3, Lcom/scaleasw/powercalc/Keyboard$ShiftState;->SHIFT_OFF:Lcom/scaleasw/powercalc/Keyboard$ShiftState;

    if-ne v2, v3, :cond_32

    .line 933
    sget-object v2, Lcom/scaleasw/powercalc/Keyboard$ShiftState;->SHIFT_ALPHA:Lcom/scaleasw/powercalc/Keyboard$ShiftState;

    iput-object v2, p0, Lcom/scaleasw/powercalc/Editor;->shiftState:Lcom/scaleasw/powercalc/Keyboard$ShiftState;

    goto/16 :goto_0

    :cond_30
    move v2, v4

    .line 923
    goto :goto_d

    .line 927
    :cond_31
    iput v4, p0, Lcom/scaleasw/powercalc/Editor;->historyIndexRadix:I

    goto :goto_e

    .line 935
    :cond_32
    sget-object v2, Lcom/scaleasw/powercalc/Keyboard;->T33:Lcom/scaleasw/powercalc/Keyboard;

    if-ne v1, v2, :cond_33

    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->shiftState:Lcom/scaleasw/powercalc/Keyboard$ShiftState;

    sget-object v3, Lcom/scaleasw/powercalc/Keyboard$ShiftState;->SHIFT_OFF:Lcom/scaleasw/powercalc/Keyboard$ShiftState;

    if-ne v2, v3, :cond_33

    .line 938
    sget-object v2, Lcom/scaleasw/powercalc/Keyboard$ShiftState;->SHIFT_ALPHA:Lcom/scaleasw/powercalc/Keyboard$ShiftState;

    iput-object v2, p0, Lcom/scaleasw/powercalc/Editor;->shiftState:Lcom/scaleasw/powercalc/Keyboard$ShiftState;

    goto/16 :goto_0

    .line 940
    :cond_33
    sget-object v2, Lcom/scaleasw/powercalc/Keyboard$ShiftState;->SHIFT_OFF:Lcom/scaleasw/powercalc/Keyboard$ShiftState;

    iput-object v2, p0, Lcom/scaleasw/powercalc/Editor;->shiftState:Lcom/scaleasw/powercalc/Keyboard$ShiftState;

    goto/16 :goto_0
.end method

.method public deletePreviousElement(I)V
    .locals 2
    .param p1, "index"    # I

    .prologue
    .line 499
    add-int/lit8 v0, p1, -0x1

    if-ltz v0, :cond_0

    iget-object v0, p0, Lcom/scaleasw/powercalc/Editor;->line:Ljava/util/List;

    add-int/lit8 v1, p1, -0x1

    invoke-interface {v0, v1}, Ljava/util/List;->remove(I)Ljava/lang/Object;

    .line 500
    :cond_0
    iget v0, p0, Lcom/scaleasw/powercalc/Editor;->index:I

    if-lt v0, p1, :cond_1

    iget v0, p0, Lcom/scaleasw/powercalc/Editor;->index:I

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

    iput v0, p0, Lcom/scaleasw/powercalc/Editor;->index:I

    .line 501
    :cond_1
    return-void
.end method

.method public describeContents()I
    .locals 1

    .prologue
    .line 258
    const/4 v0, 0x0

    return v0
.end method

.method public historyGetLine()V
    .locals 6

    .prologue
    const-wide/16 v4, 0x0

    .line 323
    iget-object v0, p0, Lcom/scaleasw/powercalc/Editor;->solver:Lcom/scaleasw/powercalc/Solver;

    iget-object v0, v0, Lcom/scaleasw/powercalc/Solver;->calcMode:Lcom/scaleasw/powercalc/Solver$CalcMode;

    sget-object v1, Lcom/scaleasw/powercalc/Solver$CalcMode;->MODE_FLOAT:Lcom/scaleasw/powercalc/Solver$CalcMode;

    if-ne v0, v1, :cond_2

    .line 324
    iget-object v0, p0, Lcom/scaleasw/powercalc/Editor;->historyFloat:Ljava/util/List;

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

    move-result v0

    if-nez v0, :cond_1

    .line 335
    :cond_0
    :goto_0
    return-void

    .line 325
    :cond_1
    new-instance v1, Ljava/util/ArrayList;

    iget-object v0, p0, Lcom/scaleasw/powercalc/Editor;->historyFloat:Ljava/util/List;

    iget v2, p0, Lcom/scaleasw/powercalc/Editor;->historyIndexFloat:I

    invoke-interface {v0, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/util/Collection;

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

    iput-object v1, p0, Lcom/scaleasw/powercalc/Editor;->line:Ljava/util/List;

    .line 326
    new-instance v0, Lcom/scaleasw/powercalc/Complex;

    invoke-direct {v0, v4, v5, v4, v5}, Lcom/scaleasw/powercalc/Complex;-><init>(DD)V

    iput-object v0, p0, Lcom/scaleasw/powercalc/Editor;->lineAns:Lcom/scaleasw/powercalc/Complex;

    .line 327
    iget-object v1, p0, Lcom/scaleasw/powercalc/Editor;->lineAns:Lcom/scaleasw/powercalc/Complex;

    iget-object v0, p0, Lcom/scaleasw/powercalc/Editor;->historyAnsFloat:Ljava/util/List;

    iget v2, p0, Lcom/scaleasw/powercalc/Editor;->historyIndexFloat:I

    invoke-interface {v0, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/scaleasw/powercalc/Complex;

    invoke-virtual {v1, v0}, Lcom/scaleasw/powercalc/Complex;->setComplex(Lcom/scaleasw/powercalc/Complex;)V

    goto :goto_0

    .line 330
    :cond_2
    iget-object v0, p0, Lcom/scaleasw/powercalc/Editor;->historyRadix:Ljava/util/List;

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

    move-result v0

    if-eqz v0, :cond_0

    .line 331
    new-instance v1, Ljava/util/ArrayList;

    iget-object v0, p0, Lcom/scaleasw/powercalc/Editor;->historyRadix:Ljava/util/List;

    iget v2, p0, Lcom/scaleasw/powercalc/Editor;->historyIndexRadix:I

    invoke-interface {v0, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/util/Collection;

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

    iput-object v1, p0, Lcom/scaleasw/powercalc/Editor;->line:Ljava/util/List;

    .line 332
    new-instance v0, Lcom/scaleasw/powercalc/Complex;

    invoke-direct {v0, v4, v5, v4, v5}, Lcom/scaleasw/powercalc/Complex;-><init>(DD)V

    iput-object v0, p0, Lcom/scaleasw/powercalc/Editor;->lineAns:Lcom/scaleasw/powercalc/Complex;

    .line 333
    iget-object v1, p0, Lcom/scaleasw/powercalc/Editor;->lineAns:Lcom/scaleasw/powercalc/Complex;

    iget-object v0, p0, Lcom/scaleasw/powercalc/Editor;->historyAnsRadix:Ljava/util/List;

    iget v2, p0, Lcom/scaleasw/powercalc/Editor;->historyIndexRadix:I

    invoke-interface {v0, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/scaleasw/powercalc/Complex;

    invoke-virtual {v1, v0}, Lcom/scaleasw/powercalc/Complex;->setComplex(Lcom/scaleasw/powercalc/Complex;)V

    goto :goto_0
.end method

.method public insertElement(ILcom/scaleasw/powercalc/Element;)V
    .locals 3
    .param p1, "index"    # I
    .param p2, "element"    # Lcom/scaleasw/powercalc/Element;

    .prologue
    .line 475
    if-gez p1, :cond_4

    const/4 p1, 0x0

    .line 477
    :cond_0
    :goto_0
    if-eqz p2, :cond_3

    .line 479
    iget-object v0, p0, Lcom/scaleasw/powercalc/Editor;->line:Ljava/util/List;

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

    move-result v0

    if-nez v0, :cond_2

    .line 481
    iget-object v0, p2, Lcom/scaleasw/powercalc/Element;->formalElementType:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    sget-object v1, Lcom/scaleasw/powercalc/FormalElement$FormalElementType;->ACTION:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    if-eq v0, v1, :cond_1

    iget-object v0, p2, Lcom/scaleasw/powercalc/Element;->formalElementType:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    sget-object v1, Lcom/scaleasw/powercalc/FormalElement$FormalElementType;->FUNCTION_AF:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    if-eq v0, v1, :cond_1

    iget-object v0, p2, Lcom/scaleasw/powercalc/Element;->formalElementType:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    sget-object v1, Lcom/scaleasw/powercalc/FormalElement$FormalElementType;->FUNCTION_AFA:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    if-eq v0, v1, :cond_1

    iget-object v0, p2, Lcom/scaleasw/powercalc/Element;->formalElementType:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    sget-object v1, Lcom/scaleasw/powercalc/FormalElement$FormalElementType;->OPERATOR:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    if-ne v0, v1, :cond_2

    .line 486
    :cond_1
    iget-object v0, p0, Lcom/scaleasw/powercalc/Editor;->line:Ljava/util/List;

    const/4 v1, 0x0

    sget-object v2, Lcom/scaleasw/powercalc/Element;->MANS:Lcom/scaleasw/powercalc/Element;

    invoke-interface {v0, v1, v2}, Ljava/util/List;->add(ILjava/lang/Object;)V

    .line 487
    iget v0, p0, Lcom/scaleasw/powercalc/Editor;->index:I

    add-int/lit8 v0, v0, 0x1

    iput v0, p0, Lcom/scaleasw/powercalc/Editor;->index:I

    .line 488
    add-int/lit8 p1, p1, 0x1

    .line 491
    :cond_2
    iget-object v0, p0, Lcom/scaleasw/powercalc/Editor;->line:Ljava/util/List;

    invoke-interface {v0, p1, p2}, Ljava/util/List;->add(ILjava/lang/Object;)V

    .line 492
    iget v0, p0, Lcom/scaleasw/powercalc/Editor;->index:I

    add-int/lit8 v0, v0, 0x1

    iput v0, p0, Lcom/scaleasw/powercalc/Editor;->index:I

    .line 494
    :cond_3
    return-void

    .line 476
    :cond_4
    iget-object v0, p0, Lcom/scaleasw/powercalc/Editor;->line:Ljava/util/List;

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

    move-result v0

    if-le p1, v0, :cond_0

    iget-object v0, p0, Lcom/scaleasw/powercalc/Editor;->line:Ljava/util/List;

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

    move-result p1

    goto :goto_0
.end method

.method public readFromParcel(Landroid/os/Parcel;)V
    .locals 10
    .param p1, "in"    # Landroid/os/Parcel;

    .prologue
    const/4 v9, 0x1

    .line 169
    invoke-virtual {p1}, Landroid/os/Parcel;->readInt()I

    move-result v7

    iput v7, p0, Lcom/scaleasw/powercalc/Editor;->historySize:I

    .line 171
    invoke-virtual {p1}, Landroid/os/Parcel;->readInt()I

    move-result v5

    .line 172
    .local v5, "n":I
    const/4 v3, 0x0

    .local v3, "i":I
    :goto_0
    if-ge v3, v5, :cond_0

    .line 174
    invoke-static {}, Lcom/scaleasw/powercalc/Element;->values()[Lcom/scaleasw/powercalc/Element;

    move-result-object v7

    invoke-virtual {p1}, Landroid/os/Parcel;->readInt()I

    move-result v8

    aget-object v2, v7, v8

    .line 175
    .local v2, "e":Lcom/scaleasw/powercalc/Element;
    iget-object v7, p0, Lcom/scaleasw/powercalc/Editor;->line:Ljava/util/List;

    invoke-interface {v7, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 172
    add-int/lit8 v3, v3, 0x1

    goto :goto_0

    .line 178
    .end local v2    # "e":Lcom/scaleasw/powercalc/Element;
    :cond_0
    const-class v7, Lcom/scaleasw/powercalc/Complex;

    invoke-virtual {v7}, Ljava/lang/Class;->getClassLoader()Ljava/lang/ClassLoader;

    move-result-object v7

    invoke-virtual {p1, v7}, Landroid/os/Parcel;->readParcelable(Ljava/lang/ClassLoader;)Landroid/os/Parcelable;

    move-result-object v7

    check-cast v7, Lcom/scaleasw/powercalc/Complex;

    iput-object v7, p0, Lcom/scaleasw/powercalc/Editor;->lineAns:Lcom/scaleasw/powercalc/Complex;

    .line 180
    invoke-virtual {p1}, Landroid/os/Parcel;->readInt()I

    move-result v5

    .line 181
    const/4 v3, 0x0

    :goto_1
    if-ge v3, v5, :cond_1

    .line 183
    invoke-static {}, Lcom/scaleasw/powercalc/Element;->values()[Lcom/scaleasw/powercalc/Element;

    move-result-object v7

    invoke-virtual {p1}, Landroid/os/Parcel;->readInt()I

    move-result v8

    aget-object v2, v7, v8

    .line 184
    .restart local v2    # "e":Lcom/scaleasw/powercalc/Element;
    iget-object v7, p0, Lcom/scaleasw/powercalc/Editor;->errorLine:Ljava/util/List;

    invoke-interface {v7, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 181
    add-int/lit8 v3, v3, 0x1

    goto :goto_1

    .line 187
    .end local v2    # "e":Lcom/scaleasw/powercalc/Element;
    :cond_1
    invoke-virtual {p1}, Landroid/os/Parcel;->readInt()I

    move-result v5

    .line 188
    const/4 v3, 0x0

    :goto_2
    if-ge v3, v5, :cond_3

    .line 190
    invoke-virtual {p1}, Landroid/os/Parcel;->readInt()I

    move-result v6

    .line 191
    .local v6, "nn":I
    new-instance v0, Ljava/util/ArrayList;

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

    .line 192
    .local v0, "ar":Ljava/util/List;, "Ljava/util/List<Lcom/scaleasw/powercalc/Element;>;"
    iget-object v7, p0, Lcom/scaleasw/powercalc/Editor;->historyFloat:Ljava/util/List;

    invoke-interface {v7, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 193
    const/4 v4, 0x0

    .local v4, "ii":I
    :goto_3
    if-ge v4, v6, :cond_2

    .line 194
    invoke-static {}, Lcom/scaleasw/powercalc/Element;->values()[Lcom/scaleasw/powercalc/Element;

    move-result-object v7

    invoke-virtual {p1}, Landroid/os/Parcel;->readInt()I

    move-result v8

    aget-object v2, v7, v8

    .line 195
    .restart local v2    # "e":Lcom/scaleasw/powercalc/Element;
    iget-object v7, p0, Lcom/scaleasw/powercalc/Editor;->historyFloat:Ljava/util/List;

    invoke-interface {v7, v3}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v7

    check-cast v7, Ljava/util/List;

    invoke-interface {v7, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 193
    add-int/lit8 v4, v4, 0x1

    goto :goto_3

    .line 188
    .end local v2    # "e":Lcom/scaleasw/powercalc/Element;
    :cond_2
    add-int/lit8 v3, v3, 0x1

    goto :goto_2

    .line 199
    .end local v0    # "ar":Ljava/util/List;, "Ljava/util/List<Lcom/scaleasw/powercalc/Element;>;"
    .end local v4    # "ii":I
    .end local v6    # "nn":I
    :cond_3
    invoke-virtual {p1}, Landroid/os/Parcel;->readInt()I

    move-result v5

    .line 200
    const/4 v3, 0x0

    :goto_4
    if-ge v3, v5, :cond_5

    .line 202
    invoke-virtual {p1}, Landroid/os/Parcel;->readInt()I

    move-result v6

    .line 203
    .restart local v6    # "nn":I
    new-instance v0, Ljava/util/ArrayList;

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

    .line 204
    .restart local v0    # "ar":Ljava/util/List;, "Ljava/util/List<Lcom/scaleasw/powercalc/Element;>;"
    iget-object v7, p0, Lcom/scaleasw/powercalc/Editor;->historyRadix:Ljava/util/List;

    invoke-interface {v7, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 205
    const/4 v4, 0x0

    .restart local v4    # "ii":I
    :goto_5
    if-ge v4, v6, :cond_4

    .line 206
    invoke-static {}, Lcom/scaleasw/powercalc/Element;->values()[Lcom/scaleasw/powercalc/Element;

    move-result-object v7

    invoke-virtual {p1}, Landroid/os/Parcel;->readInt()I

    move-result v8

    aget-object v2, v7, v8

    .line 207
    .restart local v2    # "e":Lcom/scaleasw/powercalc/Element;
    iget-object v7, p0, Lcom/scaleasw/powercalc/Editor;->historyRadix:Ljava/util/List;

    invoke-interface {v7, v3}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v7

    check-cast v7, Ljava/util/List;

    invoke-interface {v7, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 205
    add-int/lit8 v4, v4, 0x1

    goto :goto_5

    .line 200
    .end local v2    # "e":Lcom/scaleasw/powercalc/Element;
    :cond_4
    add-int/lit8 v3, v3, 0x1

    goto :goto_4

    .line 211
    .end local v0    # "ar":Ljava/util/List;, "Ljava/util/List<Lcom/scaleasw/powercalc/Element;>;"
    .end local v4    # "ii":I
    .end local v6    # "nn":I
    :cond_5
    invoke-virtual {p1}, Landroid/os/Parcel;->readInt()I

    move-result v5

    .line 212
    const/4 v3, 0x0

    :goto_6
    if-ge v3, v5, :cond_6

    .line 214
    const-class v7, Lcom/scaleasw/powercalc/Complex;

    invoke-virtual {v7}, Ljava/lang/Class;->getClassLoader()Ljava/lang/ClassLoader;

    move-result-object v7

    invoke-virtual {p1, v7}, Landroid/os/Parcel;->readParcelable(Ljava/lang/ClassLoader;)Landroid/os/Parcelable;

    move-result-object v1

    check-cast v1, Lcom/scaleasw/powercalc/Complex;

    .line 215
    .local v1, "c":Lcom/scaleasw/powercalc/Complex;
    iget-object v7, p0, Lcom/scaleasw/powercalc/Editor;->historyAnsFloat:Ljava/util/List;

    invoke-interface {v7, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 212
    add-int/lit8 v3, v3, 0x1

    goto :goto_6

    .line 218
    .end local v1    # "c":Lcom/scaleasw/powercalc/Complex;
    :cond_6
    invoke-virtual {p1}, Landroid/os/Parcel;->readInt()I

    move-result v5

    .line 219
    const/4 v3, 0x0

    :goto_7
    if-ge v3, v5, :cond_7

    .line 221
    const-class v7, Lcom/scaleasw/powercalc/Complex;

    invoke-virtual {v7}, Ljava/lang/Class;->getClassLoader()Ljava/lang/ClassLoader;

    move-result-object v7

    invoke-virtual {p1, v7}, Landroid/os/Parcel;->readParcelable(Ljava/lang/ClassLoader;)Landroid/os/Parcelable;

    move-result-object v1

    check-cast v1, Lcom/scaleasw/powercalc/Complex;

    .line 222
    .restart local v1    # "c":Lcom/scaleasw/powercalc/Complex;
    iget-object v7, p0, Lcom/scaleasw/powercalc/Editor;->historyAnsRadix:Ljava/util/List;

    invoke-interface {v7, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 219
    add-int/lit8 v3, v3, 0x1

    goto :goto_7

    .line 225
    .end local v1    # "c":Lcom/scaleasw/powercalc/Complex;
    :cond_7
    invoke-virtual {p1}, Landroid/os/Parcel;->readInt()I

    move-result v7

    iput v7, p0, Lcom/scaleasw/powercalc/Editor;->historyIndexFloat:I

    .line 226
    invoke-virtual {p1}, Landroid/os/Parcel;->readInt()I

    move-result v7

    iput v7, p0, Lcom/scaleasw/powercalc/Editor;->historyIndexRadix:I

    .line 227
    invoke-virtual {p1}, Landroid/os/Parcel;->readInt()I

    move-result v7

    iput v7, p0, Lcom/scaleasw/powercalc/Editor;->viewDecimals:I

    .line 228
    invoke-virtual {p1}, Landroid/os/Parcel;->readInt()I

    move-result v7

    iput v7, p0, Lcom/scaleasw/powercalc/Editor;->index:I

    .line 229
    invoke-virtual {p1}, Landroid/os/Parcel;->readInt()I

    move-result v7

    iput v7, p0, Lcom/scaleasw/powercalc/Editor;->errorIndex:I

    .line 230
    invoke-static {}, Lcom/scaleasw/powercalc/Editor$ViewMode;->values()[Lcom/scaleasw/powercalc/Editor$ViewMode;

    move-result-object v7

    invoke-virtual {p1}, Landroid/os/Parcel;->readInt()I

    move-result v8

    aget-object v7, v7, v8

    iput-object v7, p0, Lcom/scaleasw/powercalc/Editor;->viewMode:Lcom/scaleasw/powercalc/Editor$ViewMode;

    .line 231
    invoke-static {}, Lcom/scaleasw/powercalc/Keyboard$ShiftState;->values()[Lcom/scaleasw/powercalc/Keyboard$ShiftState;

    move-result-object v7

    invoke-virtual {p1}, Landroid/os/Parcel;->readInt()I

    move-result v8

    aget-object v7, v7, v8

    iput-object v7, p0, Lcom/scaleasw/powercalc/Editor;->shiftState:Lcom/scaleasw/powercalc/Keyboard$ShiftState;

    .line 232
    invoke-static {}, Lcom/scaleasw/powercalc/Keyboard$HypState;->values()[Lcom/scaleasw/powercalc/Keyboard$HypState;

    move-result-object v7

    invoke-virtual {p1}, Landroid/os/Parcel;->readInt()I

    move-result v8

    aget-object v7, v7, v8

    iput-object v7, p0, Lcom/scaleasw/powercalc/Editor;->hypState:Lcom/scaleasw/powercalc/Keyboard$HypState;

    .line 234
    invoke-virtual {p1}, Landroid/os/Parcel;->readInt()I

    move-result v5

    .line 235
    if-ne v5, v9, :cond_8

    .line 236
    invoke-static {v9}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v7

    iput-object v7, p0, Lcom/scaleasw/powercalc/Editor;->editing:Ljava/lang/Boolean;

    .line 239
    :goto_8
    return-void

    .line 238
    :cond_8
    const/4 v7, 0x0

    invoke-static {v7}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v7

    iput-object v7, p0, Lcom/scaleasw/powercalc/Editor;->editing:Ljava/lang/Boolean;

    goto :goto_8
.end method

.method public setControls(Landroid/app/Activity;Lcom/scaleasw/powercalc/CalcDisplay;Landroid/widget/EditText;)V
    .locals 1
    .param p1, "activity"    # Landroid/app/Activity;
    .param p2, "view"    # Lcom/scaleasw/powercalc/CalcDisplay;
    .param p3, "resultView"    # Landroid/widget/EditText;

    .prologue
    .line 96
    iput-object p1, p0, Lcom/scaleasw/powercalc/Editor;->activity:Landroid/app/Activity;

    .line 97
    iput-object p2, p0, Lcom/scaleasw/powercalc/Editor;->view:Lcom/scaleasw/powercalc/CalcDisplay;

    .line 98
    iget-object v0, p0, Lcom/scaleasw/powercalc/Editor;->view:Lcom/scaleasw/powercalc/CalcDisplay;

    invoke-virtual {v0, p0}, Lcom/scaleasw/powercalc/CalcDisplay;->setEditor(Lcom/scaleasw/powercalc/Editor;)V

    .line 99
    iput-object p3, p0, Lcom/scaleasw/powercalc/Editor;->resultView:Landroid/widget/EditText;

    .line 100
    return-void
.end method

.method public setCursor(I)V
    .locals 7
    .param p1, "index"    # I

    .prologue
    const/4 v6, 0x0

    .line 755
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->editing:Ljava/lang/Boolean;

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

    move-result v2

    if-nez v2, :cond_0

    .line 768
    :goto_0
    return-void

    .line 756
    :cond_0
    const/4 v1, 0x0

    .line 757
    .local v1, "size":I
    const/4 v0, 0x0

    .local v0, "i":I
    :goto_1
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->line:Ljava/util/List;

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

    move-result v2

    if-ge v0, v2, :cond_1

    .line 759
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->line:Ljava/util/List;

    invoke-interface {v2, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Lcom/scaleasw/powercalc/Element;

    invoke-static {v6}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v3

    invoke-static {v6}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v4

    invoke-static {v6}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v5

    invoke-virtual {v2, v3, v4, v5}, Lcom/scaleasw/powercalc/Element;->translation(Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;)Landroid/text/SpannableString;

    move-result-object v2

    invoke-virtual {v2}, Landroid/text/SpannableString;->length()I

    move-result v2

    add-int/2addr v1, v2

    .line 760
    if-ge p1, v1, :cond_2

    .line 762
    iput v0, p0, Lcom/scaleasw/powercalc/Editor;->index:I

    .line 766
    :cond_1
    invoke-virtual {p0}, Lcom/scaleasw/powercalc/Editor;->updateEditorView()V

    .line 767
    invoke-virtual {p0}, Lcom/scaleasw/powercalc/Editor;->updateCursorPosition()V

    goto :goto_0

    .line 757
    :cond_2
    add-int/lit8 v0, v0, 0x1

    goto :goto_1
.end method

.method public setHistorySize(I)V
    .locals 2
    .param p1, "size"    # I

    .prologue
    .line 264
    iput p1, p0, Lcom/scaleasw/powercalc/Editor;->historySize:I

    .line 265
    iget-object v0, p0, Lcom/scaleasw/powercalc/Editor;->solver:Lcom/scaleasw/powercalc/Solver;

    iget-object v0, v0, Lcom/scaleasw/powercalc/Solver;->calcMode:Lcom/scaleasw/powercalc/Solver$CalcMode;

    sget-object v1, Lcom/scaleasw/powercalc/Solver$CalcMode;->MODE_FLOAT:Lcom/scaleasw/powercalc/Solver$CalcMode;

    if-ne v0, v1, :cond_2

    .line 266
    iget-object v0, p0, Lcom/scaleasw/powercalc/Editor;->historyFloat:Ljava/util/List;

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

    move-result v0

    iget v1, p0, Lcom/scaleasw/powercalc/Editor;->historySize:I

    if-le v0, v1, :cond_0

    .line 267
    iget-object v0, p0, Lcom/scaleasw/powercalc/Editor;->historyFloat:Ljava/util/List;

    iget v1, p0, Lcom/scaleasw/powercalc/Editor;->historySize:I

    invoke-interface {v0, v1}, Ljava/util/List;->remove(I)Ljava/lang/Object;

    .line 268
    iget-object v0, p0, Lcom/scaleasw/powercalc/Editor;->historyAnsFloat:Ljava/util/List;

    iget v1, p0, Lcom/scaleasw/powercalc/Editor;->historySize:I

    invoke-interface {v0, v1}, Ljava/util/List;->remove(I)Ljava/lang/Object;

    .line 270
    :cond_0
    iget v0, p0, Lcom/scaleasw/powercalc/Editor;->historyIndexFloat:I

    iget v1, p0, Lcom/scaleasw/powercalc/Editor;->historySize:I

    if-lt v0, v1, :cond_1

    iget v0, p0, Lcom/scaleasw/powercalc/Editor;->historySize:I

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

    iput v0, p0, Lcom/scaleasw/powercalc/Editor;->historyIndexFloat:I

    .line 279
    :cond_1
    :goto_0
    return-void

    .line 273
    :cond_2
    iget-object v0, p0, Lcom/scaleasw/powercalc/Editor;->historyFloat:Ljava/util/List;

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

    move-result v0

    iget v1, p0, Lcom/scaleasw/powercalc/Editor;->historySize:I

    if-le v0, v1, :cond_3

    .line 274
    iget-object v0, p0, Lcom/scaleasw/powercalc/Editor;->historyFloat:Ljava/util/List;

    iget v1, p0, Lcom/scaleasw/powercalc/Editor;->historySize:I

    invoke-interface {v0, v1}, Ljava/util/List;->remove(I)Ljava/lang/Object;

    .line 275
    iget-object v0, p0, Lcom/scaleasw/powercalc/Editor;->historyAnsRadix:Ljava/util/List;

    iget v1, p0, Lcom/scaleasw/powercalc/Editor;->historySize:I

    invoke-interface {v0, v1}, Ljava/util/List;->remove(I)Ljava/lang/Object;

    .line 277
    :cond_3
    iget v0, p0, Lcom/scaleasw/powercalc/Editor;->historyIndexRadix:I

    iget v1, p0, Lcom/scaleasw/powercalc/Editor;->historySize:I

    if-lt v0, v1, :cond_1

    iget v0, p0, Lcom/scaleasw/powercalc/Editor;->historySize:I

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

    iput v0, p0, Lcom/scaleasw/powercalc/Editor;->historyIndexRadix:I

    goto :goto_0
.end method

.method public translate(Ljava/lang/Boolean;I)Ljava/lang/CharSequence;
    .locals 12
    .param p1, "bracketHighlight"    # Ljava/lang/Boolean;
    .param p2, "errorIndex"    # I

    .prologue
    .line 506
    const-string v5, ""

    .line 509
    .local v5, "result":Ljava/lang/CharSequence;
    const/4 v7, -0x1

    if-eq p2, v7, :cond_4

    .line 510
    new-instance v3, Ljava/util/ArrayList;

    iget-object v7, p0, Lcom/scaleasw/powercalc/Editor;->errorLine:Ljava/util/List;

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

    .line 513
    .local v3, "fullLine":Ljava/util/List;, "Ljava/util/List<Lcom/scaleasw/powercalc/Element;>;"
    :goto_0
    iget-object v7, p0, Lcom/scaleasw/powercalc/Editor;->editing:Ljava/lang/Boolean;

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

    move-result v7

    if-nez v7, :cond_0

    iget-object v7, p0, Lcom/scaleasw/powercalc/Editor;->line:Ljava/util/List;

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

    move-result v7

    if-lez v7, :cond_0

    sget-object v7, Lcom/scaleasw/powercalc/Element;->ASOLVE:Lcom/scaleasw/powercalc/Element;

    invoke-interface {v3, v7}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 514
    :cond_0
    const/4 v2, 0x0

    .line 515
    .local v2, "from":I
    const/4 v6, 0x0

    .line 518
    .local v6, "to":I
    const/4 v7, 0x0

    invoke-static {v7}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v0

    .line 519
    .local v0, "bracket":Ljava/lang/Boolean;
    invoke-virtual {p1}, Ljava/lang/Boolean;->booleanValue()Z

    move-result v7

    if-eqz v7, :cond_1

    .line 521
    iget v7, p0, Lcom/scaleasw/powercalc/Editor;->index:I

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

    invoke-direct {p0, v7}, Lcom/scaleasw/powercalc/Editor;->getPreviousOpenBracketIndex(I)I

    move-result v2

    .line 522
    add-int/lit8 v7, v2, 0x1

    invoke-direct {p0, v7}, Lcom/scaleasw/powercalc/Editor;->getNextCloseBracketIndex(I)I

    move-result v6

    .line 523
    const/4 v7, -0x1

    if-ne v2, v7, :cond_1

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

    move-result v7

    add-int/lit8 v6, v7, -0x1

    .line 525
    :cond_1
    const/4 v4, 0x0

    .local v4, "i":I
    :goto_1
    invoke-interface {v3}, Ljava/util/List;->size()I

    move-result v7

    if-ge v4, v7, :cond_9

    .line 527
    if-ne p2, v4, :cond_5

    const/4 v7, 0x1

    invoke-static {v7}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v1

    .line 529
    .local v1, "error":Ljava/lang/Boolean;
    :goto_2
    invoke-virtual {p1}, Ljava/lang/Boolean;->booleanValue()Z

    move-result v7

    if-eqz v7, :cond_8

    .line 531
    if-eq v4, v2, :cond_2

    if-ne v4, v6, :cond_6

    :cond_2
    const/4 v7, 0x1

    invoke-static {v7}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v0

    .line 533
    :goto_3
    const/4 v7, -0x1

    if-ne v2, v7, :cond_3

    const/4 v7, 0x0

    invoke-static {v7}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v0

    .line 534
    :cond_3
    if-lt v4, v2, :cond_7

    if-gt v4, v6, :cond_7

    const/4 v7, 0x2

    new-array v8, v7, [Ljava/lang/CharSequence;

    const/4 v7, 0x0

    aput-object v5, v8, v7

    const/4 v9, 0x1

    invoke-interface {v3, v4}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v7

    check-cast v7, Lcom/scaleasw/powercalc/Element;

    const/4 v10, 0x1

    invoke-static {v10}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v10

    invoke-virtual {v7, v10, v0, v1}, Lcom/scaleasw/powercalc/Element;->translation(Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;)Landroid/text/SpannableString;

    move-result-object v7

    aput-object v7, v8, v9

    invoke-static {v8}, Landroid/text/TextUtils;->concat([Ljava/lang/CharSequence;)Ljava/lang/CharSequence;

    move-result-object v5

    .line 525
    :goto_4
    add-int/lit8 v4, v4, 0x1

    goto :goto_1

    .line 512
    .end local v0    # "bracket":Ljava/lang/Boolean;
    .end local v1    # "error":Ljava/lang/Boolean;
    .end local v2    # "from":I
    .end local v3    # "fullLine":Ljava/util/List;, "Ljava/util/List<Lcom/scaleasw/powercalc/Element;>;"
    .end local v4    # "i":I
    .end local v6    # "to":I
    :cond_4
    new-instance v3, Ljava/util/ArrayList;

    iget-object v7, p0, Lcom/scaleasw/powercalc/Editor;->line:Ljava/util/List;

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

    .restart local v3    # "fullLine":Ljava/util/List;, "Ljava/util/List<Lcom/scaleasw/powercalc/Element;>;"
    goto/16 :goto_0

    .line 528
    .restart local v0    # "bracket":Ljava/lang/Boolean;
    .restart local v2    # "from":I
    .restart local v4    # "i":I
    .restart local v6    # "to":I
    :cond_5
    const/4 v7, 0x0

    invoke-static {v7}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v1

    .restart local v1    # "error":Ljava/lang/Boolean;
    goto :goto_2

    .line 532
    :cond_6
    const/4 v7, 0x0

    invoke-static {v7}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v0

    goto :goto_3

    .line 535
    :cond_7
    const/4 v7, 0x2

    new-array v8, v7, [Ljava/lang/CharSequence;

    const/4 v7, 0x0

    aput-object v5, v8, v7

    const/4 v9, 0x1

    invoke-interface {v3, v4}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v7

    check-cast v7, Lcom/scaleasw/powercalc/Element;

    const/4 v10, 0x0

    invoke-static {v10}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v10

    invoke-virtual {v7, v10, v0, v1}, Lcom/scaleasw/powercalc/Element;->translation(Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;)Landroid/text/SpannableString;

    move-result-object v7

    aput-object v7, v8, v9

    invoke-static {v8}, Landroid/text/TextUtils;->concat([Ljava/lang/CharSequence;)Ljava/lang/CharSequence;

    move-result-object v5

    goto :goto_4

    .line 537
    :cond_8
    const/4 v7, 0x2

    new-array v8, v7, [Ljava/lang/CharSequence;

    const/4 v7, 0x0

    aput-object v5, v8, v7

    const/4 v9, 0x1

    invoke-interface {v3, v4}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v7

    check-cast v7, Lcom/scaleasw/powercalc/Element;

    const/4 v10, 0x0

    invoke-static {v10}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v10

    const/4 v11, 0x0

    invoke-static {v11}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v11

    invoke-virtual {v7, v10, v11, v1}, Lcom/scaleasw/powercalc/Element;->translation(Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;)Landroid/text/SpannableString;

    move-result-object v7

    aput-object v7, v8, v9

    invoke-static {v8}, Landroid/text/TextUtils;->concat([Ljava/lang/CharSequence;)Ljava/lang/CharSequence;

    move-result-object v5

    goto :goto_4

    .line 539
    .end local v1    # "error":Ljava/lang/Boolean;
    :cond_9
    return-object v5
.end method

.method public translateNumber(D)Ljava/lang/CharSequence;
    .locals 19
    .param p1, "num"    # D

    .prologue
    .line 546
    const/4 v13, 0x0

    .line 547
    .local v13, "use":Z
    const/4 v3, 0x0

    .line 548
    .local v3, "exp":I
    move-object/from16 v0, p0

    iget-object v6, v0, Lcom/scaleasw/powercalc/Editor;->viewMode:Lcom/scaleasw/powercalc/Editor$ViewMode;

    .line 549
    .local v6, "mode":Lcom/scaleasw/powercalc/Editor$ViewMode;
    sget-object v14, Ljava/util/Locale;->ENGLISH:Ljava/util/Locale;

    invoke-static {v14}, Ljava/text/NumberFormat;->getNumberInstance(Ljava/util/Locale;)Ljava/text/NumberFormat;

    move-result-object v7

    .line 551
    .local v7, "nf":Ljava/text/NumberFormat;
    const-string v12, "."

    .line 552
    .local v12, "separator":Ljava/lang/String;
    const-string v4, ","

    .line 553
    .local v4, "grouping":Ljava/lang/String;
    move-object/from16 v0, p0

    iget-object v14, v0, Lcom/scaleasw/powercalc/Editor;->activity:Landroid/app/Activity;

    if-eqz v14, :cond_0

    .line 555
    move-object/from16 v0, p0

    iget-object v14, v0, Lcom/scaleasw/powercalc/Editor;->activity:Landroid/app/Activity;

    invoke-static {v14}, Landroid/preference/PreferenceManager;->getDefaultSharedPreferences(Landroid/content/Context;)Landroid/content/SharedPreferences;

    move-result-object v10

    .line 556
    .local v10, "prefs":Landroid/content/SharedPreferences;
    const-string v14, "prefDecimal"

    const-string v15, "."

    invoke-interface {v10, v14, v15}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v12

    .line 557
    const-string v14, "prefGroup"

    const-string v15, ","

    invoke-interface {v10, v14, v15}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v4

    .end local v10    # "prefs":Landroid/content/SharedPreferences;
    :cond_0
    move-object v2, v7

    .line 560
    check-cast v2, Ljava/text/DecimalFormat;

    .line 561
    .local v2, "df":Ljava/text/DecimalFormat;
    new-instance v8, Ljava/text/DecimalFormatSymbols;

    sget-object v14, Ljava/util/Locale;->ENGLISH:Ljava/util/Locale;

    invoke-direct {v8, v14}, Ljava/text/DecimalFormatSymbols;-><init>(Ljava/util/Locale;)V

    .line 562
    .local v8, "otherSymbols":Ljava/text/DecimalFormatSymbols;
    const/4 v14, 0x0

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

    move-result v14

    invoke-virtual {v8, v14}, Ljava/text/DecimalFormatSymbols;->setDecimalSeparator(C)V

    .line 565
    sget-object v14, Lcom/scaleasw/powercalc/Editor$ViewMode;->MODE_NORMAL:Lcom/scaleasw/powercalc/Editor$ViewMode;

    if-ne v6, v14, :cond_4

    .line 566
    invoke-static/range {p1 .. p2}, Ljava/lang/Math;->abs(D)D

    move-result-wide v14

    const-wide v16, 0x3e112e0be826d695L    # 1.0E-9

    cmpg-double v14, v14, v16

    if-ltz v14, :cond_1

    invoke-static/range {p1 .. p2}, Ljava/lang/Math;->abs(D)D

    move-result-wide v14

    const-wide v16, 0x4202a05f20000000L    # 1.0E10

    cmpl-double v14, v14, v16

    if-ltz v14, :cond_3

    :cond_1
    const-wide/16 v14, 0x0

    cmpl-double v14, p1, v14

    if-eqz v14, :cond_3

    .line 568
    const-string v9, "0.###########"

    .line 569
    .local v9, "pattern":Ljava/lang/String;
    new-instance v14, Ljava/lang/StringBuilder;

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

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

    move-result-object v14

    const-string v15, "E0"

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

    move-result-object v14

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

    move-result-object v9

    .line 570
    invoke-virtual {v2, v9}, Ljava/text/DecimalFormat;->applyPattern(Ljava/lang/String;)V

    .line 616
    :goto_0
    const-string v14, "0"

    invoke-virtual {v4, v14}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v14

    if-nez v14, :cond_10

    .line 617
    const/4 v14, 0x3

    invoke-virtual {v2, v14}, Ljava/text/DecimalFormat;->setGroupingSize(I)V

    .line 618
    const/4 v14, 0x1

    invoke-virtual {v2, v14}, Ljava/text/DecimalFormat;->setGroupingUsed(Z)V

    .line 622
    :goto_1
    const-string v14, "1"

    invoke-virtual {v4, v14}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v14

    if-eqz v14, :cond_11

    const/16 v14, 0x20

    invoke-virtual {v8, v14}, Ljava/text/DecimalFormatSymbols;->setGroupingSeparator(C)V

    .line 626
    :cond_2
    :goto_2
    invoke-virtual {v2, v8}, Ljava/text/DecimalFormat;->setDecimalFormatSymbols(Ljava/text/DecimalFormatSymbols;)V

    .line 628
    const-string v11, ""

    .line 629
    .local v11, "result":Ljava/lang/String;
    if-eqz v13, :cond_1d

    .line 630
    sget-object v14, Lcom/scaleasw/powercalc/Editor$ViewMode;->MODE_ENGINEER_SI:Lcom/scaleasw/powercalc/Editor$ViewMode;

    if-ne v6, v14, :cond_1c

    .line 631
    move-wide/from16 v0, p1

    invoke-virtual {v2, v0, v1}, Ljava/text/DecimalFormat;->format(D)Ljava/lang/String;

    move-result-object v11

    .line 632
    const-wide/16 v14, 0x0

    cmpl-double v14, p1, v14

    if-nez v14, :cond_13

    new-instance v14, Ljava/lang/StringBuilder;

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

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

    move-result-object v14

    const-string v15, ""

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

    move-result-object v14

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

    move-result-object v11

    .line 647
    :goto_3
    return-object v11

    .line 574
    .end local v9    # "pattern":Ljava/lang/String;
    .end local v11    # "result":Ljava/lang/String;
    :cond_3
    const-string v9, "0.###########"

    .line 575
    .restart local v9    # "pattern":Ljava/lang/String;
    invoke-virtual {v2, v9}, Ljava/text/DecimalFormat;->applyPattern(Ljava/lang/String;)V

    goto :goto_0

    .line 578
    .end local v9    # "pattern":Ljava/lang/String;
    :cond_4
    sget-object v14, Lcom/scaleasw/powercalc/Editor$ViewMode;->MODE_FIXED:Lcom/scaleasw/powercalc/Editor$ViewMode;

    if-ne v6, v14, :cond_6

    .line 579
    const-string v9, "0."

    .line 580
    .restart local v9    # "pattern":Ljava/lang/String;
    const/4 v5, 0x0

    .local v5, "i":I
    :goto_4
    move-object/from16 v0, p0

    iget v14, v0, Lcom/scaleasw/powercalc/Editor;->viewDecimals:I

    if-ge v5, v14, :cond_5

    new-instance v14, Ljava/lang/StringBuilder;

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

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

    move-result-object v14

    const-string v15, "0"

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

    move-result-object v14

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

    move-result-object v9

    add-int/lit8 v5, v5, 0x1

    goto :goto_4

    .line 581
    :cond_5
    invoke-virtual {v2, v9}, Ljava/text/DecimalFormat;->applyPattern(Ljava/lang/String;)V

    goto :goto_0

    .line 583
    .end local v5    # "i":I
    .end local v9    # "pattern":Ljava/lang/String;
    :cond_6
    sget-object v14, Lcom/scaleasw/powercalc/Editor$ViewMode;->MODE_SCIENTIFIC:Lcom/scaleasw/powercalc/Editor$ViewMode;

    if-ne v6, v14, :cond_8

    .line 584
    const-string v9, "0."

    .line 585
    .restart local v9    # "pattern":Ljava/lang/String;
    const/4 v5, 0x0

    .restart local v5    # "i":I
    :goto_5
    move-object/from16 v0, p0

    iget v14, v0, Lcom/scaleasw/powercalc/Editor;->viewDecimals:I

    if-ge v5, v14, :cond_7

    new-instance v14, Ljava/lang/StringBuilder;

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

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

    move-result-object v14

    const-string v15, "0"

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

    move-result-object v14

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

    move-result-object v9

    add-int/lit8 v5, v5, 0x1

    goto :goto_5

    .line 586
    :cond_7
    new-instance v14, Ljava/lang/StringBuilder;

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

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

    move-result-object v14

    const-string v15, "E0"

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

    move-result-object v14

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

    move-result-object v9

    .line 587
    invoke-virtual {v2, v9}, Ljava/text/DecimalFormat;->applyPattern(Ljava/lang/String;)V

    goto/16 :goto_0

    .line 591
    .end local v5    # "i":I
    .end local v9    # "pattern":Ljava/lang/String;
    :cond_8
    const-string v9, "0."

    .line 592
    .restart local v9    # "pattern":Ljava/lang/String;
    invoke-static/range {p1 .. p2}, Ljava/lang/Double;->isNaN(D)Z

    move-result v14

    if-nez v14, :cond_9

    invoke-static/range {p1 .. p2}, Ljava/lang/Double;->isInfinite(D)Z

    move-result v14

    if-eqz v14, :cond_b

    .line 593
    :cond_9
    const/4 v5, 0x0

    .restart local v5    # "i":I
    :goto_6
    move-object/from16 v0, p0

    iget v14, v0, Lcom/scaleasw/powercalc/Editor;->viewDecimals:I

    if-ge v5, v14, :cond_a

    new-instance v14, Ljava/lang/StringBuilder;

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

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

    move-result-object v14

    const-string v15, "0"

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

    move-result-object v14

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

    move-result-object v9

    add-int/lit8 v5, v5, 0x1

    goto :goto_6

    .line 594
    :cond_a
    new-instance v14, Ljava/lang/StringBuilder;

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

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

    move-result-object v14

    const-string v15, "E0"

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

    move-result-object v14

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

    move-result-object v9

    .line 610
    .end local v5    # "i":I
    :goto_7
    const/4 v14, 0x1

    if-ne v13, v14, :cond_f

    .line 611
    const/4 v5, 0x0

    .restart local v5    # "i":I
    :goto_8
    move-object/from16 v0, p0

    iget v14, v0, Lcom/scaleasw/powercalc/Editor;->viewDecimals:I

    if-ge v5, v14, :cond_f

    new-instance v14, Ljava/lang/StringBuilder;

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

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

    move-result-object v14

    const-string v15, "0"

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

    move-result-object v14

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

    move-result-object v9

    add-int/lit8 v5, v5, 0x1

    goto :goto_8

    .line 597
    .end local v5    # "i":I
    :cond_b
    :goto_9
    invoke-static/range {p1 .. p2}, Ljava/lang/Math;->abs(D)D

    move-result-wide v14

    const-wide v16, 0x408f400000000000L    # 1000.0

    cmpl-double v14, v14, v16

    if-gez v14, :cond_c

    invoke-static/range {p1 .. p2}, Ljava/lang/Math;->abs(D)D

    move-result-wide v14

    const-wide/high16 v16, 0x3ff0000000000000L    # 1.0

    cmpg-double v14, v14, v16

    if-gez v14, :cond_e

    :cond_c
    const-wide/16 v14, 0x0

    cmpl-double v14, p1, v14

    if-eqz v14, :cond_e

    .line 598
    invoke-static/range {p1 .. p2}, Ljava/lang/Math;->abs(D)D

    move-result-wide v14

    const-wide v16, 0x408f400000000000L    # 1000.0

    cmpl-double v14, v14, v16

    if-ltz v14, :cond_d

    .line 599
    const-wide v14, 0x408f400000000000L    # 1000.0

    div-double p1, p1, v14

    .line 600
    add-int/lit8 v3, v3, 0x3

    goto :goto_9

    .line 603
    :cond_d
    const-wide v14, 0x408f400000000000L    # 1000.0

    mul-double p1, p1, v14

    .line 604
    add-int/lit8 v3, v3, -0x3

    goto :goto_9

    .line 607
    :cond_e
    const/4 v13, 0x1

    goto :goto_7

    .line 613
    :cond_f
    invoke-virtual {v2, v9}, Ljava/text/DecimalFormat;->applyPattern(Ljava/lang/String;)V

    goto/16 :goto_0

    .line 620
    :cond_10
    const/4 v14, 0x0

    invoke-virtual {v2, v14}, Ljava/text/DecimalFormat;->setGroupingUsed(Z)V

    goto/16 :goto_1

    .line 623
    :cond_11
    const-string v14, "2"

    invoke-virtual {v4, v14}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v14

    if-eqz v14, :cond_12

    const/16 v14, 0x2e

    invoke-virtual {v8, v14}, Ljava/text/DecimalFormatSymbols;->setGroupingSeparator(C)V

    goto/16 :goto_2

    .line 624
    :cond_12
    const-string v14, "3"

    invoke-virtual {v4, v14}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v14

    if-eqz v14, :cond_2

    const/16 v14, 0x2c

    invoke-virtual {v8, v14}, Ljava/text/DecimalFormatSymbols;->setGroupingSeparator(C)V

    goto/16 :goto_2

    .line 633
    .restart local v11    # "result":Ljava/lang/String;
    :cond_13
    const/4 v14, 0x3

    if-ne v3, v14, :cond_14

    new-instance v14, Ljava/lang/StringBuilder;

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

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

    move-result-object v14

    const-string v15, "k"

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

    move-result-object v14

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

    move-result-object v11

    goto/16 :goto_3

    .line 634
    :cond_14
    const/4 v14, 0x6

    if-ne v3, v14, :cond_15

    new-instance v14, Ljava/lang/StringBuilder;

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

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

    move-result-object v14

    const-string v15, "M"

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

    move-result-object v14

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

    move-result-object v11

    goto/16 :goto_3

    .line 635
    :cond_15
    const/16 v14, 0x9

    if-ne v3, v14, :cond_16

    new-instance v14, Ljava/lang/StringBuilder;

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

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

    move-result-object v14

    const-string v15, "G"

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

    move-result-object v14

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

    move-result-object v11

    goto/16 :goto_3

    .line 636
    :cond_16
    const/16 v14, 0xc

    if-ne v3, v14, :cond_17

    new-instance v14, Ljava/lang/StringBuilder;

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

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

    move-result-object v14

    const-string v15, "T"

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

    move-result-object v14

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

    move-result-object v11

    goto/16 :goto_3

    .line 637
    :cond_17
    const/4 v14, -0x3

    if-ne v3, v14, :cond_18

    new-instance v14, Ljava/lang/StringBuilder;

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

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

    move-result-object v14

    const-string v15, "m"

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

    move-result-object v14

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

    move-result-object v11

    goto/16 :goto_3

    .line 638
    :cond_18
    const/4 v14, -0x6

    if-ne v3, v14, :cond_19

    new-instance v14, Ljava/lang/StringBuilder;

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

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

    move-result-object v14

    const-string v15, "\u03bc"

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

    move-result-object v14

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

    move-result-object v11

    goto/16 :goto_3

    .line 639
    :cond_19
    const/16 v14, -0x9

    if-ne v3, v14, :cond_1a

    new-instance v14, Ljava/lang/StringBuilder;

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

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

    move-result-object v14

    const-string v15, "n"

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

    move-result-object v14

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

    move-result-object v11

    goto/16 :goto_3

    .line 640
    :cond_1a
    const/16 v14, -0xc

    if-ne v3, v14, :cond_1b

    new-instance v14, Ljava/lang/StringBuilder;

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

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

    move-result-object v14

    const-string v15, "p"

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

    move-result-object v14

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

    move-result-object v11

    goto/16 :goto_3

    .line 641
    :cond_1b
    new-instance v14, Ljava/lang/StringBuilder;

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

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

    move-result-object v14

    const-string v15, "E"

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

    move-result-object v14

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

    move-result-object v15

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

    move-result-object v14

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

    move-result-object v11

    goto/16 :goto_3

    .line 643
    :cond_1c
    new-instance v14, Ljava/lang/StringBuilder;

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

    move-wide/from16 v0, p1

    invoke-virtual {v2, v0, v1}, Ljava/text/DecimalFormat;->format(D)Ljava/lang/String;

    move-result-object v15

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

    move-result-object v14

    const-string v15, "E"

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

    move-result-object v14

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

    move-result-object v15

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

    move-result-object v14

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

    move-result-object v11

    goto/16 :goto_3

    .line 645
    :cond_1d
    move-wide/from16 v0, p1

    invoke-virtual {v2, v0, v1}, Ljava/text/DecimalFormat;->format(D)Ljava/lang/String;

    move-result-object v11

    goto/16 :goto_3
.end method

.method public updateCursorPosition()V
    .locals 7

    .prologue
    const/4 v6, 0x0

    .line 284
    const/4 v1, 0x0

    .line 285
    .local v1, "size":I
    const/4 v0, 0x0

    .local v0, "i":I
    :goto_0
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->line:Ljava/util/List;

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

    move-result v2

    if-ge v0, v2, :cond_0

    .line 286
    iget v2, p0, Lcom/scaleasw/powercalc/Editor;->index:I

    if-lt v0, v2, :cond_2

    .line 289
    :cond_0
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->view:Lcom/scaleasw/powercalc/CalcDisplay;

    if-eqz v2, :cond_1

    .line 291
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->view:Lcom/scaleasw/powercalc/CalcDisplay;

    invoke-virtual {v2, v1}, Lcom/scaleasw/powercalc/CalcDisplay;->setSelection(I)V

    .line 292
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->view:Lcom/scaleasw/powercalc/CalcDisplay;

    iget-object v3, p0, Lcom/scaleasw/powercalc/Editor;->editing:Ljava/lang/Boolean;

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

    move-result v3

    invoke-virtual {v2, v3}, Lcom/scaleasw/powercalc/CalcDisplay;->setCursorVisible(Z)V

    .line 294
    :cond_1
    return-void

    .line 287
    :cond_2
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->line:Ljava/util/List;

    invoke-interface {v2, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Lcom/scaleasw/powercalc/Element;

    invoke-static {v6}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v3

    invoke-static {v6}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v4

    invoke-static {v6}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v5

    invoke-virtual {v2, v3, v4, v5}, Lcom/scaleasw/powercalc/Element;->translation(Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;)Landroid/text/SpannableString;

    move-result-object v2

    invoke-virtual {v2}, Landroid/text/SpannableString;->length()I

    move-result v2

    add-int/2addr v1, v2

    .line 285
    add-int/lit8 v0, v0, 0x1

    goto :goto_0
.end method

.method public updateEditorView()V
    .locals 15

    .prologue
    .line 653
    iget-object v1, p0, Lcom/scaleasw/powercalc/Editor;->view:Lcom/scaleasw/powercalc/CalcDisplay;

    if-eqz v1, :cond_0

    .line 654
    iget-object v1, p0, Lcom/scaleasw/powercalc/Editor;->view:Lcom/scaleasw/powercalc/CalcDisplay;

    const/4 v10, 0x1

    iput-boolean v10, v1, Lcom/scaleasw/powercalc/CalcDisplay;->lockCursor:Z

    .line 655
    :cond_0
    iget-object v1, p0, Lcom/scaleasw/powercalc/Editor;->editing:Ljava/lang/Boolean;

    iget v10, p0, Lcom/scaleasw/powercalc/Editor;->errorIndex:I

    invoke-virtual {p0, v1, v10}, Lcom/scaleasw/powercalc/Editor;->translate(Ljava/lang/Boolean;I)Ljava/lang/CharSequence;

    move-result-object v0

    .line 656
    .local v0, "text":Ljava/lang/CharSequence;
    iget-object v1, p0, Lcom/scaleasw/powercalc/Editor;->view:Lcom/scaleasw/powercalc/CalcDisplay;

    if-eqz v1, :cond_1

    .line 657
    iget-object v1, p0, Lcom/scaleasw/powercalc/Editor;->view:Lcom/scaleasw/powercalc/CalcDisplay;

    sget-object v10, Landroid/widget/TextView$BufferType;->SPANNABLE:Landroid/widget/TextView$BufferType;

    invoke-virtual {v1, v0, v10}, Lcom/scaleasw/powercalc/CalcDisplay;->setText(Ljava/lang/CharSequence;Landroid/widget/TextView$BufferType;)V

    .line 658
    :cond_1
    invoke-virtual {p0}, Lcom/scaleasw/powercalc/Editor;->updateCursorPosition()V

    .line 659
    iget-object v1, p0, Lcom/scaleasw/powercalc/Editor;->view:Lcom/scaleasw/powercalc/CalcDisplay;

    if-eqz v1, :cond_2

    .line 660
    iget-object v1, p0, Lcom/scaleasw/powercalc/Editor;->view:Lcom/scaleasw/powercalc/CalcDisplay;

    const/4 v10, 0x0

    iput-boolean v10, v1, Lcom/scaleasw/powercalc/CalcDisplay;->lockCursor:Z

    .line 661
    :cond_2
    iget-object v1, p0, Lcom/scaleasw/powercalc/Editor;->editing:Ljava/lang/Boolean;

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

    move-result v1

    if-nez v1, :cond_f

    const-string v1, ""

    if-eq v0, v1, :cond_f

    .line 662
    iget v1, p0, Lcom/scaleasw/powercalc/Editor;->errorIndex:I

    const/4 v10, -0x1

    if-ne v1, v10, :cond_e

    .line 664
    iget-object v1, p0, Lcom/scaleasw/powercalc/Editor;->solver:Lcom/scaleasw/powercalc/Solver;

    iget-object v1, v1, Lcom/scaleasw/powercalc/Solver;->calcMode:Lcom/scaleasw/powercalc/Solver$CalcMode;

    sget-object v10, Lcom/scaleasw/powercalc/Solver$CalcMode;->MODE_FLOAT:Lcom/scaleasw/powercalc/Solver$CalcMode;

    if-ne v1, v10, :cond_d

    .line 666
    iget-object v1, p0, Lcom/scaleasw/powercalc/Editor;->lineAns:Lcom/scaleasw/powercalc/Complex;

    iget-object v1, v1, Lcom/scaleasw/powercalc/Complex;->format:Lcom/scaleasw/powercalc/Complex$Format;

    sget-object v10, Lcom/scaleasw/powercalc/Complex$Format;->ORTHO:Lcom/scaleasw/powercalc/Complex$Format;

    if-eq v1, v10, :cond_3

    iget-object v1, p0, Lcom/scaleasw/powercalc/Editor;->lineAns:Lcom/scaleasw/powercalc/Complex;

    iget-object v1, v1, Lcom/scaleasw/powercalc/Complex;->format:Lcom/scaleasw/powercalc/Complex$Format;

    sget-object v10, Lcom/scaleasw/powercalc/Complex$Format;->DEFAULT:Lcom/scaleasw/powercalc/Complex$Format;

    if-ne v1, v10, :cond_8

    iget-object v1, p0, Lcom/scaleasw/powercalc/Editor;->solver:Lcom/scaleasw/powercalc/Solver;

    iget-object v1, v1, Lcom/scaleasw/powercalc/Solver;->complexMode:Lcom/scaleasw/powercalc/Solver$ComplexMode;

    sget-object v10, Lcom/scaleasw/powercalc/Solver$ComplexMode;->MODE_NORMAL:Lcom/scaleasw/powercalc/Solver$ComplexMode;

    if-ne v1, v10, :cond_8

    .line 669
    :cond_3
    iget-object v1, p0, Lcom/scaleasw/powercalc/Editor;->lineAns:Lcom/scaleasw/powercalc/Complex;

    iget-wide v10, v1, Lcom/scaleasw/powercalc/Complex;->re:D

    const-wide/16 v12, 0x0

    cmpl-double v1, v10, v12

    if-nez v1, :cond_6

    const/4 v1, 0x1

    new-array v1, v1, [Ljava/lang/CharSequence;

    const/4 v10, 0x0

    iget-object v11, p0, Lcom/scaleasw/powercalc/Editor;->lineAns:Lcom/scaleasw/powercalc/Complex;

    iget-wide v12, v11, Lcom/scaleasw/powercalc/Complex;->re:D

    invoke-static {v12, v13}, Ljava/lang/Math;->abs(D)D

    move-result-wide v12

    invoke-virtual {p0, v12, v13}, Lcom/scaleasw/powercalc/Editor;->translateNumber(D)Ljava/lang/CharSequence;

    move-result-object v11

    aput-object v11, v1, v10

    invoke-static {v1}, Landroid/text/TextUtils;->concat([Ljava/lang/CharSequence;)Ljava/lang/CharSequence;

    move-result-object v0

    .line 671
    :goto_0
    iget-object v1, p0, Lcom/scaleasw/powercalc/Editor;->lineAns:Lcom/scaleasw/powercalc/Complex;

    iget-wide v10, v1, Lcom/scaleasw/powercalc/Complex;->im:D

    const-wide/16 v12, 0x0

    cmpl-double v1, v10, v12

    if-eqz v1, :cond_4

    .line 672
    iget-object v1, p0, Lcom/scaleasw/powercalc/Editor;->lineAns:Lcom/scaleasw/powercalc/Complex;

    iget-wide v10, v1, Lcom/scaleasw/powercalc/Complex;->im:D

    const-wide/16 v12, 0x0

    cmpg-double v1, v10, v12

    if-gez v1, :cond_7

    const/4 v1, 0x2

    new-array v1, v1, [Ljava/lang/CharSequence;

    const/4 v10, 0x0

    aput-object v0, v1, v10

    const/4 v10, 0x1

    const-string v11, " -"

    aput-object v11, v1, v10

    invoke-static {v1}, Landroid/text/TextUtils;->concat([Ljava/lang/CharSequence;)Ljava/lang/CharSequence;

    move-result-object v0

    .line 674
    :goto_1
    const/4 v1, 0x2

    new-array v1, v1, [Ljava/lang/CharSequence;

    const/4 v10, 0x0

    aput-object v0, v1, v10

    const/4 v10, 0x1

    iget-object v11, p0, Lcom/scaleasw/powercalc/Editor;->lineAns:Lcom/scaleasw/powercalc/Complex;

    iget-wide v12, v11, Lcom/scaleasw/powercalc/Complex;->im:D

    invoke-static {v12, v13}, Ljava/lang/Math;->abs(D)D

    move-result-wide v12

    invoke-virtual {p0, v12, v13}, Lcom/scaleasw/powercalc/Editor;->translateNumber(D)Ljava/lang/CharSequence;

    move-result-object v11

    aput-object v11, v1, v10

    invoke-static {v1}, Landroid/text/TextUtils;->concat([Ljava/lang/CharSequence;)Ljava/lang/CharSequence;

    move-result-object v0

    .line 675
    const/4 v1, 0x2

    new-array v1, v1, [Ljava/lang/CharSequence;

    const/4 v10, 0x0

    aput-object v0, v1, v10

    const/4 v10, 0x1

    sget-object v11, Lcom/scaleasw/powercalc/Element;->CI:Lcom/scaleasw/powercalc/Element;

    const/4 v12, 0x0

    invoke-static {v12}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v12

    const/4 v13, 0x0

    invoke-static {v13}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v13

    const/4 v14, 0x0

    invoke-static {v14}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v14

    invoke-virtual {v11, v12, v13, v14}, Lcom/scaleasw/powercalc/Element;->translation(Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;)Landroid/text/SpannableString;

    move-result-object v11

    aput-object v11, v1, v10

    invoke-static {v1}, Landroid/text/TextUtils;->concat([Ljava/lang/CharSequence;)Ljava/lang/CharSequence;

    move-result-object v0

    .line 676
    const/4 v1, 0x2

    new-array v1, v1, [Ljava/lang/CharSequence;

    const/4 v10, 0x0

    aput-object v0, v1, v10

    const/4 v10, 0x1

    const-string v11, " "

    aput-object v11, v1, v10

    invoke-static {v1}, Landroid/text/TextUtils;->concat([Ljava/lang/CharSequence;)Ljava/lang/CharSequence;

    move-result-object v0

    .line 730
    :cond_4
    :goto_2
    iget-object v1, p0, Lcom/scaleasw/powercalc/Editor;->resultView:Landroid/widget/EditText;

    if-eqz v1, :cond_5

    .line 732
    iget-object v1, p0, Lcom/scaleasw/powercalc/Editor;->resultView:Landroid/widget/EditText;

    const/16 v10, 0x35

    invoke-virtual {v1, v10}, Landroid/widget/EditText;->setGravity(I)V

    .line 733
    iget-object v1, p0, Lcom/scaleasw/powercalc/Editor;->resultView:Landroid/widget/EditText;

    sget-object v10, Landroid/widget/TextView$BufferType;->SPANNABLE:Landroid/widget/TextView$BufferType;

    invoke-virtual {v1, v0, v10}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;Landroid/widget/TextView$BufferType;)V

    .line 750
    :cond_5
    :goto_3
    return-void

    .line 670
    :cond_6
    const/4 v1, 0x1

    new-array v1, v1, [Ljava/lang/CharSequence;

    const/4 v10, 0x0

    iget-object v11, p0, Lcom/scaleasw/powercalc/Editor;->lineAns:Lcom/scaleasw/powercalc/Complex;

    iget-wide v12, v11, Lcom/scaleasw/powercalc/Complex;->re:D

    invoke-virtual {p0, v12, v13}, Lcom/scaleasw/powercalc/Editor;->translateNumber(D)Ljava/lang/CharSequence;

    move-result-object v11

    aput-object v11, v1, v10

    invoke-static {v1}, Landroid/text/TextUtils;->concat([Ljava/lang/CharSequence;)Ljava/lang/CharSequence;

    move-result-object v0

    goto/16 :goto_0

    .line 673
    :cond_7
    const/4 v1, 0x2

    new-array v1, v1, [Ljava/lang/CharSequence;

    const/4 v10, 0x0

    aput-object v0, v1, v10

    const/4 v10, 0x1

    const-string v11, " +"

    aput-object v11, v1, v10

    invoke-static {v1}, Landroid/text/TextUtils;->concat([Ljava/lang/CharSequence;)Ljava/lang/CharSequence;

    move-result-object v0

    goto :goto_1

    .line 679
    :cond_8
    iget-object v1, p0, Lcom/scaleasw/powercalc/Editor;->lineAns:Lcom/scaleasw/powercalc/Complex;

    iget-object v1, v1, Lcom/scaleasw/powercalc/Complex;->format:Lcom/scaleasw/powercalc/Complex$Format;

    sget-object v10, Lcom/scaleasw/powercalc/Complex$Format;->POLAR:Lcom/scaleasw/powercalc/Complex$Format;

    if-eq v1, v10, :cond_9

    iget-object v1, p0, Lcom/scaleasw/powercalc/Editor;->solver:Lcom/scaleasw/powercalc/Solver;

    iget-object v1, v1, Lcom/scaleasw/powercalc/Solver;->complexMode:Lcom/scaleasw/powercalc/Solver$ComplexMode;

    sget-object v10, Lcom/scaleasw/powercalc/Solver$ComplexMode;->MODE_NORMAL:Lcom/scaleasw/powercalc/Solver$ComplexMode;

    if-eq v1, v10, :cond_a

    .line 682
    :cond_9
    const/4 v1, 0x1

    new-array v1, v1, [Ljava/lang/CharSequence;

    const/4 v10, 0x0

    iget-object v11, p0, Lcom/scaleasw/powercalc/Editor;->lineAns:Lcom/scaleasw/powercalc/Complex;

    invoke-virtual {v11}, Lcom/scaleasw/powercalc/Complex;->magnitude()Ljava/lang/Double;

    move-result-object v11

    invoke-virtual {v11}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v12

    invoke-virtual {p0, v12, v13}, Lcom/scaleasw/powercalc/Editor;->translateNumber(D)Ljava/lang/CharSequence;

    move-result-object v11

    aput-object v11, v1, v10

    invoke-static {v1}, Landroid/text/TextUtils;->concat([Ljava/lang/CharSequence;)Ljava/lang/CharSequence;

    move-result-object v0

    .line 683
    const/4 v1, 0x2

    new-array v1, v1, [Ljava/lang/CharSequence;

    const/4 v10, 0x0

    aput-object v0, v1, v10

    const/4 v10, 0x1

    const-string v11, " \u2220\u00a0"

    aput-object v11, v1, v10

    invoke-static {v1}, Landroid/text/TextUtils;->concat([Ljava/lang/CharSequence;)Ljava/lang/CharSequence;

    move-result-object v0

    .line 684
    const/4 v1, 0x2

    new-array v1, v1, [Ljava/lang/CharSequence;

    const/4 v10, 0x0

    aput-object v0, v1, v10

    const/4 v10, 0x1

    iget-object v11, p0, Lcom/scaleasw/powercalc/Editor;->solver:Lcom/scaleasw/powercalc/Solver;

    iget-object v11, v11, Lcom/scaleasw/powercalc/Solver;->functionSolver:Lcom/scaleasw/powercalc/FunctionSolver;

    iget-object v12, p0, Lcom/scaleasw/powercalc/Editor;->lineAns:Lcom/scaleasw/powercalc/Complex;

    invoke-virtual {v12}, Lcom/scaleasw/powercalc/Complex;->argument()Ljava/lang/Double;

    move-result-object v12

    invoke-virtual {v12}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v12

    invoke-virtual {v11, v12, v13}, Lcom/scaleasw/powercalc/FunctionSolver;->normalizeAngle(D)D

    move-result-wide v12

    invoke-virtual {p0, v12, v13}, Lcom/scaleasw/powercalc/Editor;->translateNumber(D)Ljava/lang/CharSequence;

    move-result-object v11

    aput-object v11, v1, v10

    invoke-static {v1}, Landroid/text/TextUtils;->concat([Ljava/lang/CharSequence;)Ljava/lang/CharSequence;

    move-result-object v0

    .line 685
    const/4 v1, 0x2

    new-array v1, v1, [Ljava/lang/CharSequence;

    const/4 v10, 0x0

    aput-object v0, v1, v10

    const/4 v10, 0x1

    const-string v11, " "

    aput-object v11, v1, v10

    invoke-static {v1}, Landroid/text/TextUtils;->concat([Ljava/lang/CharSequence;)Ljava/lang/CharSequence;

    move-result-object v0

    goto/16 :goto_2

    .line 690
    :cond_a
    const-wide/16 v2, 0x0

    .line 691
    .local v2, "value":D
    sget-object v1, Lcom/scaleasw/powercalc/Editor$2;->$SwitchMap$com$scaleasw$powercalc$Solver$AngleMode:[I

    iget-object v10, p0, Lcom/scaleasw/powercalc/Editor;->solver:Lcom/scaleasw/powercalc/Solver;

    iget-object v10, v10, Lcom/scaleasw/powercalc/Solver;->angleMode:Lcom/scaleasw/powercalc/Solver$AngleMode;

    invoke-virtual {v10}, Lcom/scaleasw/powercalc/Solver$AngleMode;->ordinal()I

    move-result v10

    aget v1, v1, v10

    packed-switch v1, :pswitch_data_0

    .line 703
    :goto_4
    invoke-static {v2, v3}, Ljava/lang/Math;->floor(D)D

    move-result-wide v4

    .line 704
    .local v4, "valued":D
    sub-double/2addr v2, v4

    .line 705
    const-wide/high16 v10, 0x404e000000000000L    # 60.0

    mul-double/2addr v10, v2

    invoke-static {v10, v11}, Ljava/lang/Math;->floor(D)D

    move-result-wide v6

    .line 706
    .local v6, "valuem":D
    const-wide/high16 v10, 0x404e000000000000L    # 60.0

    div-double v10, v6, v10

    sub-double/2addr v2, v10

    .line 707
    const-wide v10, 0x40ac200000000000L    # 3600.0

    mul-double v8, v2, v10

    .line 708
    .local v8, "values":D
    const-wide v10, 0x404dffffffffc906L    # 59.9999999999

    cmpl-double v1, v8, v10

    if-lez v1, :cond_b

    .line 710
    const-wide/16 v8, 0x0

    .line 711
    const-wide/high16 v10, 0x3ff0000000000000L    # 1.0

    add-double/2addr v6, v10

    .line 713
    :cond_b
    const-wide v10, 0x404dffffffffc906L    # 59.9999999999

    cmpl-double v1, v6, v10

    if-lez v1, :cond_c

    .line 715
    const-wide/16 v6, 0x0

    .line 716
    const-wide/high16 v10, 0x3ff0000000000000L    # 1.0

    add-double/2addr v4, v10

    .line 718
    :cond_c
    const/4 v1, 0x1

    new-array v1, v1, [Ljava/lang/CharSequence;

    const/4 v10, 0x0

    invoke-virtual {p0, v4, v5}, Lcom/scaleasw/powercalc/Editor;->translateNumber(D)Ljava/lang/CharSequence;

    move-result-object v11

    aput-object v11, v1, v10

    invoke-static {v1}, Landroid/text/TextUtils;->concat([Ljava/lang/CharSequence;)Ljava/lang/CharSequence;

    move-result-object v0

    .line 719
    const/4 v1, 0x2

    new-array v1, v1, [Ljava/lang/CharSequence;

    const/4 v10, 0x0

    aput-object v0, v1, v10

    const/4 v10, 0x1

    const-string v11, "\u00b0"

    aput-object v11, v1, v10

    invoke-static {v1}, Landroid/text/TextUtils;->concat([Ljava/lang/CharSequence;)Ljava/lang/CharSequence;

    move-result-object v0

    .line 720
    const/4 v1, 0x2

    new-array v1, v1, [Ljava/lang/CharSequence;

    const/4 v10, 0x0

    aput-object v0, v1, v10

    const/4 v10, 0x1

    invoke-virtual {p0, v6, v7}, Lcom/scaleasw/powercalc/Editor;->translateNumber(D)Ljava/lang/CharSequence;

    move-result-object v11

    aput-object v11, v1, v10

    invoke-static {v1}, Landroid/text/TextUtils;->concat([Ljava/lang/CharSequence;)Ljava/lang/CharSequence;

    move-result-object v0

    .line 721
    const/4 v1, 0x2

    new-array v1, v1, [Ljava/lang/CharSequence;

    const/4 v10, 0x0

    aput-object v0, v1, v10

    const/4 v10, 0x1

    const-string v11, "\'"

    aput-object v11, v1, v10

    invoke-static {v1}, Landroid/text/TextUtils;->concat([Ljava/lang/CharSequence;)Ljava/lang/CharSequence;

    move-result-object v0

    .line 722
    const/4 v1, 0x2

    new-array v1, v1, [Ljava/lang/CharSequence;

    const/4 v10, 0x0

    aput-object v0, v1, v10

    const/4 v10, 0x1

    invoke-virtual {p0, v8, v9}, Lcom/scaleasw/powercalc/Editor;->translateNumber(D)Ljava/lang/CharSequence;

    move-result-object v11

    aput-object v11, v1, v10

    invoke-static {v1}, Landroid/text/TextUtils;->concat([Ljava/lang/CharSequence;)Ljava/lang/CharSequence;

    move-result-object v0

    .line 723
    const/4 v1, 0x2

    new-array v1, v1, [Ljava/lang/CharSequence;

    const/4 v10, 0x0

    aput-object v0, v1, v10

    const/4 v10, 0x1

    const-string v11, "\'\'"

    aput-object v11, v1, v10

    invoke-static {v1}, Landroid/text/TextUtils;->concat([Ljava/lang/CharSequence;)Ljava/lang/CharSequence;

    move-result-object v0

    .line 724
    const/4 v1, 0x2

    new-array v1, v1, [Ljava/lang/CharSequence;

    const/4 v10, 0x0

    aput-object v0, v1, v10

    const/4 v10, 0x1

    const-string v11, " "

    aput-object v11, v1, v10

    invoke-static {v1}, Landroid/text/TextUtils;->concat([Ljava/lang/CharSequence;)Ljava/lang/CharSequence;

    move-result-object v0

    .line 725
    goto/16 :goto_2

    .line 694
    .end local v4    # "valued":D
    .end local v6    # "valuem":D
    .end local v8    # "values":D
    :pswitch_0
    iget-object v1, p0, Lcom/scaleasw/powercalc/Editor;->lineAns:Lcom/scaleasw/powercalc/Complex;

    iget-wide v2, v1, Lcom/scaleasw/powercalc/Complex;->re:D

    .line 695
    goto/16 :goto_4

    .line 697
    :pswitch_1
    iget-object v1, p0, Lcom/scaleasw/powercalc/Editor;->lineAns:Lcom/scaleasw/powercalc/Complex;

    iget-wide v10, v1, Lcom/scaleasw/powercalc/Complex;->re:D

    invoke-static {v10, v11}, Lcom/scaleasw/powercalc/FunctionSolver;->radToDeg(D)D

    move-result-wide v2

    .line 698
    goto/16 :goto_4

    .line 700
    :pswitch_2
    iget-object v1, p0, Lcom/scaleasw/powercalc/Editor;->lineAns:Lcom/scaleasw/powercalc/Complex;

    iget-wide v10, v1, Lcom/scaleasw/powercalc/Complex;->re:D

    invoke-static {v10, v11}, Lcom/scaleasw/powercalc/FunctionSolver;->gradToDeg(D)D

    move-result-wide v2

    goto/16 :goto_4

    .line 728
    .end local v2    # "value":D
    :cond_d
    iget-object v1, p0, Lcom/scaleasw/powercalc/Editor;->lineAns:Lcom/scaleasw/powercalc/Complex;

    iget-wide v10, v1, Lcom/scaleasw/powercalc/Complex;->radix:J

    iget-object v1, p0, Lcom/scaleasw/powercalc/Editor;->solver:Lcom/scaleasw/powercalc/Solver;

    iget-object v1, v1, Lcom/scaleasw/powercalc/Solver;->calcMode:Lcom/scaleasw/powercalc/Solver$CalcMode;

    iget-object v12, p0, Lcom/scaleasw/powercalc/Editor;->solver:Lcom/scaleasw/powercalc/Solver;

    iget v12, v12, Lcom/scaleasw/powercalc/Solver;->calcBits:I

    invoke-direct {p0, v10, v11, v1, v12}, Lcom/scaleasw/powercalc/Editor;->valueToRadix(JLcom/scaleasw/powercalc/Solver$CalcMode;I)Ljava/lang/CharSequence;

    move-result-object v0

    goto/16 :goto_2

    .line 738
    :cond_e
    iget-object v1, p0, Lcom/scaleasw/powercalc/Editor;->resultView:Landroid/widget/EditText;

    if-eqz v1, :cond_5

    .line 740
    iget-object v1, p0, Lcom/scaleasw/powercalc/Editor;->resultView:Landroid/widget/EditText;

    const/16 v10, 0x33

    invoke-virtual {v1, v10}, Landroid/widget/EditText;->setGravity(I)V

    .line 741
    iget-object v1, p0, Lcom/scaleasw/powercalc/Editor;->resultView:Landroid/widget/EditText;

    iget-object v10, p0, Lcom/scaleasw/powercalc/Editor;->solver:Lcom/scaleasw/powercalc/Solver;

    invoke-virtual {v10}, Lcom/scaleasw/powercalc/Solver;->getErrorString()Ljava/lang/String;

    move-result-object v10

    sget-object v11, Landroid/widget/TextView$BufferType;->SPANNABLE:Landroid/widget/TextView$BufferType;

    invoke-virtual {v1, v10, v11}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;Landroid/widget/TextView$BufferType;)V

    goto/16 :goto_3

    .line 747
    :cond_f
    iget-object v1, p0, Lcom/scaleasw/powercalc/Editor;->resultView:Landroid/widget/EditText;

    if-eqz v1, :cond_5

    .line 748
    iget-object v1, p0, Lcom/scaleasw/powercalc/Editor;->resultView:Landroid/widget/EditText;

    const-string v10, ""

    sget-object v11, Landroid/widget/TextView$BufferType;->SPANNABLE:Landroid/widget/TextView$BufferType;

    invoke-virtual {v1, v10, v11}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;Landroid/widget/TextView$BufferType;)V

    goto/16 :goto_3

    .line 691
    :pswitch_data_0
    .packed-switch 0x1
        :pswitch_0
        :pswitch_1
        :pswitch_2
    .end packed-switch
.end method

.method public writeToParcel(Landroid/os/Parcel;I)V
    .locals 3
    .param p1, "out"    # Landroid/os/Parcel;
    .param p2, "flags"    # I

    .prologue
    .line 105
    iget v2, p0, Lcom/scaleasw/powercalc/Editor;->historySize:I

    invoke-virtual {p1, v2}, Landroid/os/Parcel;->writeInt(I)V

    .line 107
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->line:Ljava/util/List;

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

    move-result v2

    invoke-virtual {p1, v2}, Landroid/os/Parcel;->writeInt(I)V

    .line 108
    const/4 v0, 0x0

    .local v0, "i":I
    :goto_0
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->line:Ljava/util/List;

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

    move-result v2

    if-ge v0, v2, :cond_0

    .line 110
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->line:Ljava/util/List;

    invoke-interface {v2, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Lcom/scaleasw/powercalc/Element;

    invoke-virtual {v2}, Lcom/scaleasw/powercalc/Element;->ordinal()I

    move-result v2

    invoke-virtual {p1, v2}, Landroid/os/Parcel;->writeInt(I)V

    .line 108
    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    .line 113
    :cond_0
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->lineAns:Lcom/scaleasw/powercalc/Complex;

    invoke-virtual {p1, v2, p2}, Landroid/os/Parcel;->writeParcelable(Landroid/os/Parcelable;I)V

    .line 115
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->errorLine:Ljava/util/List;

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

    move-result v2

    invoke-virtual {p1, v2}, Landroid/os/Parcel;->writeInt(I)V

    .line 116
    const/4 v0, 0x0

    :goto_1
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->errorLine:Ljava/util/List;

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

    move-result v2

    if-ge v0, v2, :cond_1

    .line 118
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->errorLine:Ljava/util/List;

    invoke-interface {v2, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Lcom/scaleasw/powercalc/Element;

    invoke-virtual {v2}, Lcom/scaleasw/powercalc/Element;->ordinal()I

    move-result v2

    invoke-virtual {p1, v2}, Landroid/os/Parcel;->writeInt(I)V

    .line 116
    add-int/lit8 v0, v0, 0x1

    goto :goto_1

    .line 121
    :cond_1
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->historyFloat:Ljava/util/List;

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

    move-result v2

    invoke-virtual {p1, v2}, Landroid/os/Parcel;->writeInt(I)V

    .line 122
    const/4 v0, 0x0

    :goto_2
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->historyFloat:Ljava/util/List;

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

    move-result v2

    if-ge v0, v2, :cond_3

    .line 124
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->historyFloat:Ljava/util/List;

    invoke-interface {v2, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Ljava/util/List;

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

    move-result v2

    invoke-virtual {p1, v2}, Landroid/os/Parcel;->writeInt(I)V

    .line 125
    const/4 v1, 0x0

    .local v1, "ii":I
    :goto_3
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->historyFloat:Ljava/util/List;

    invoke-interface {v2, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Ljava/util/List;

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

    move-result v2

    if-ge v1, v2, :cond_2

    .line 127
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->historyFloat:Ljava/util/List;

    invoke-interface {v2, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Ljava/util/List;

    invoke-interface {v2, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Lcom/scaleasw/powercalc/Element;

    invoke-virtual {v2}, Lcom/scaleasw/powercalc/Element;->ordinal()I

    move-result v2

    invoke-virtual {p1, v2}, Landroid/os/Parcel;->writeInt(I)V

    .line 125
    add-int/lit8 v1, v1, 0x1

    goto :goto_3

    .line 122
    :cond_2
    add-int/lit8 v0, v0, 0x1

    goto :goto_2

    .line 131
    .end local v1    # "ii":I
    :cond_3
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->historyRadix:Ljava/util/List;

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

    move-result v2

    invoke-virtual {p1, v2}, Landroid/os/Parcel;->writeInt(I)V

    .line 132
    const/4 v0, 0x0

    :goto_4
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->historyRadix:Ljava/util/List;

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

    move-result v2

    if-ge v0, v2, :cond_5

    .line 134
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->historyRadix:Ljava/util/List;

    invoke-interface {v2, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Ljava/util/List;

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

    move-result v2

    invoke-virtual {p1, v2}, Landroid/os/Parcel;->writeInt(I)V

    .line 135
    const/4 v1, 0x0

    .restart local v1    # "ii":I
    :goto_5
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->historyRadix:Ljava/util/List;

    invoke-interface {v2, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Ljava/util/List;

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

    move-result v2

    if-ge v1, v2, :cond_4

    .line 137
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->historyRadix:Ljava/util/List;

    invoke-interface {v2, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Ljava/util/List;

    invoke-interface {v2, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Lcom/scaleasw/powercalc/Element;

    invoke-virtual {v2}, Lcom/scaleasw/powercalc/Element;->ordinal()I

    move-result v2

    invoke-virtual {p1, v2}, Landroid/os/Parcel;->writeInt(I)V

    .line 135
    add-int/lit8 v1, v1, 0x1

    goto :goto_5

    .line 132
    :cond_4
    add-int/lit8 v0, v0, 0x1

    goto :goto_4

    .line 141
    .end local v1    # "ii":I
    :cond_5
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->historyAnsFloat:Ljava/util/List;

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

    move-result v2

    invoke-virtual {p1, v2}, Landroid/os/Parcel;->writeInt(I)V

    .line 142
    const/4 v0, 0x0

    :goto_6
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->historyAnsFloat:Ljava/util/List;

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

    move-result v2

    if-ge v0, v2, :cond_6

    .line 144
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->historyAnsFloat:Ljava/util/List;

    invoke-interface {v2, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Landroid/os/Parcelable;

    invoke-virtual {p1, v2, p2}, Landroid/os/Parcel;->writeParcelable(Landroid/os/Parcelable;I)V

    .line 142
    add-int/lit8 v0, v0, 0x1

    goto :goto_6

    .line 147
    :cond_6
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->historyAnsRadix:Ljava/util/List;

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

    move-result v2

    invoke-virtual {p1, v2}, Landroid/os/Parcel;->writeInt(I)V

    .line 148
    const/4 v0, 0x0

    :goto_7
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->historyAnsRadix:Ljava/util/List;

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

    move-result v2

    if-ge v0, v2, :cond_7

    .line 150
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->historyAnsRadix:Ljava/util/List;

    invoke-interface {v2, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Landroid/os/Parcelable;

    invoke-virtual {p1, v2, p2}, Landroid/os/Parcel;->writeParcelable(Landroid/os/Parcelable;I)V

    .line 148
    add-int/lit8 v0, v0, 0x1

    goto :goto_7

    .line 153
    :cond_7
    iget v2, p0, Lcom/scaleasw/powercalc/Editor;->historyIndexFloat:I

    invoke-virtual {p1, v2}, Landroid/os/Parcel;->writeInt(I)V

    .line 154
    iget v2, p0, Lcom/scaleasw/powercalc/Editor;->historyIndexRadix:I

    invoke-virtual {p1, v2}, Landroid/os/Parcel;->writeInt(I)V

    .line 155
    iget v2, p0, Lcom/scaleasw/powercalc/Editor;->viewDecimals:I

    invoke-virtual {p1, v2}, Landroid/os/Parcel;->writeInt(I)V

    .line 156
    iget v2, p0, Lcom/scaleasw/powercalc/Editor;->index:I

    invoke-virtual {p1, v2}, Landroid/os/Parcel;->writeInt(I)V

    .line 157
    iget v2, p0, Lcom/scaleasw/powercalc/Editor;->errorIndex:I

    invoke-virtual {p1, v2}, Landroid/os/Parcel;->writeInt(I)V

    .line 158
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->viewMode:Lcom/scaleasw/powercalc/Editor$ViewMode;

    invoke-virtual {v2}, Lcom/scaleasw/powercalc/Editor$ViewMode;->ordinal()I

    move-result v2

    invoke-virtual {p1, v2}, Landroid/os/Parcel;->writeInt(I)V

    .line 159
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->shiftState:Lcom/scaleasw/powercalc/Keyboard$ShiftState;

    invoke-virtual {v2}, Lcom/scaleasw/powercalc/Keyboard$ShiftState;->ordinal()I

    move-result v2

    invoke-virtual {p1, v2}, Landroid/os/Parcel;->writeInt(I)V

    .line 160
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->hypState:Lcom/scaleasw/powercalc/Keyboard$HypState;

    invoke-virtual {v2}, Lcom/scaleasw/powercalc/Keyboard$HypState;->ordinal()I

    move-result v2

    invoke-virtual {p1, v2}, Landroid/os/Parcel;->writeInt(I)V

    .line 161
    iget-object v2, p0, Lcom/scaleasw/powercalc/Editor;->editing:Ljava/lang/Boolean;

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

    move-result v2

    if-eqz v2, :cond_8

    .line 162
    const/4 v2, 0x1

    invoke-virtual {p1, v2}, Landroid/os/Parcel;->writeInt(I)V

    .line 165
    :goto_8
    return-void

    .line 164
    :cond_8
    const/4 v2, 0x0

    invoke-virtual {p1, v2}, Landroid/os/Parcel;->writeInt(I)V

    goto :goto_8
.end method
