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


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/scaleasw/powercalc/Solver$NumberCompilerState;,
        Lcom/scaleasw/powercalc/Solver$ComplexMode;,
        Lcom/scaleasw/powercalc/Solver$AngleMode;,
        Lcom/scaleasw/powercalc/Solver$CalcMode;,
        Lcom/scaleasw/powercalc/Solver$Error;
    }
.end annotation


# instance fields
.field public angleMode:Lcom/scaleasw/powercalc/Solver$AngleMode;

.field calcBits:I

.field public calcMode:Lcom/scaleasw/powercalc/Solver$CalcMode;

.field public complexMode:Lcom/scaleasw/powercalc/Solver$ComplexMode;

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

.field public functionSolver:Lcom/scaleasw/powercalc/FunctionSolver;

.field public lastError:Lcom/scaleasw/powercalc/Solver$Error;

.field public lastErrorIndex:Ljava/lang/Integer;

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

.field public memoryAF:[Lcom/scaleasw/powercalc/Complex;

.field public memoryANS:Lcom/scaleasw/powercalc/Complex;

.field public memoryM:Lcom/scaleasw/powercalc/Complex;

.field public modeChange:Z


# direct methods
.method constructor <init>()V
    .locals 6

    .prologue
    const/4 v3, 0x6

    const-wide/16 v4, 0x0

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

    .line 36
    new-instance v1, Lcom/scaleasw/powercalc/FunctionSolver;

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

    iput-object v1, p0, Lcom/scaleasw/powercalc/Solver;->functionSolver:Lcom/scaleasw/powercalc/FunctionSolver;

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

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

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

    .line 38
    const/4 v1, -0x1

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    iput-object v1, p0, Lcom/scaleasw/powercalc/Solver;->lastErrorIndex:Ljava/lang/Integer;

    .line 40
    new-array v1, v3, [Lcom/scaleasw/powercalc/Complex;

    iput-object v1, p0, Lcom/scaleasw/powercalc/Solver;->memoryAF:[Lcom/scaleasw/powercalc/Complex;

    .line 41
    const/4 v0, 0x0

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

    .line 43
    iget-object v1, p0, Lcom/scaleasw/powercalc/Solver;->memoryAF:[Lcom/scaleasw/powercalc/Complex;

    new-instance v2, Lcom/scaleasw/powercalc/Complex;

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

    aput-object v2, v1, v0

    .line 41
    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    .line 46
    :cond_0
    new-instance v1, Lcom/scaleasw/powercalc/Complex;

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

    iput-object v1, p0, Lcom/scaleasw/powercalc/Solver;->memoryM:Lcom/scaleasw/powercalc/Complex;

    .line 47
    new-instance v1, Lcom/scaleasw/powercalc/Complex;

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

    iput-object v1, p0, Lcom/scaleasw/powercalc/Solver;->memoryANS:Lcom/scaleasw/powercalc/Complex;

    .line 49
    sget-object v1, Lcom/scaleasw/powercalc/Solver$AngleMode;->MODE_DEG:Lcom/scaleasw/powercalc/Solver$AngleMode;

    iput-object v1, p0, Lcom/scaleasw/powercalc/Solver;->angleMode:Lcom/scaleasw/powercalc/Solver$AngleMode;

    .line 50
    sget-object v1, Lcom/scaleasw/powercalc/Solver$ComplexMode;->MODE_NORMAL:Lcom/scaleasw/powercalc/Solver$ComplexMode;

    iput-object v1, p0, Lcom/scaleasw/powercalc/Solver;->complexMode:Lcom/scaleasw/powercalc/Solver$ComplexMode;

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

    iput-object v1, p0, Lcom/scaleasw/powercalc/Solver;->calcMode:Lcom/scaleasw/powercalc/Solver$CalcMode;

    .line 52
    const/16 v1, 0x20

    iput v1, p0, Lcom/scaleasw/powercalc/Solver;->calcBits:I

    .line 53
    const/4 v1, 0x0

    iput-boolean v1, p0, Lcom/scaleasw/powercalc/Solver;->modeChange:Z

    .line 54
    return-void
.end method

.method private addFormalElement(Lcom/scaleasw/powercalc/FormalElement$FormalElementType;Lcom/scaleasw/powercalc/Element;Lcom/scaleasw/powercalc/Complex;I)V
    .locals 2
    .param p1, "formalElementType"    # Lcom/scaleasw/powercalc/FormalElement$FormalElementType;
    .param p2, "element"    # Lcom/scaleasw/powercalc/Element;
    .param p3, "value"    # Lcom/scaleasw/powercalc/Complex;
    .param p4, "elementIndex"    # I

    .prologue
    .line 59
    new-instance v0, Lcom/scaleasw/powercalc/FormalElement;

    invoke-direct {v0, p1}, Lcom/scaleasw/powercalc/FormalElement;-><init>(Lcom/scaleasw/powercalc/FormalElement$FormalElementType;)V

    .line 60
    .local v0, "formalElement":Lcom/scaleasw/powercalc/FormalElement;
    invoke-virtual {v0, p2}, Lcom/scaleasw/powercalc/FormalElement;->setElement(Lcom/scaleasw/powercalc/Element;)V

    .line 61
    invoke-virtual {v0, p3}, Lcom/scaleasw/powercalc/FormalElement;->setValue(Lcom/scaleasw/powercalc/Complex;)V

    .line 62
    invoke-virtual {v0, p4}, Lcom/scaleasw/powercalc/FormalElement;->setElementIndex(I)V

    .line 63
    iget-object v1, p0, Lcom/scaleasw/powercalc/Solver;->formalLine:Ljava/util/List;

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

    .line 64
    return-void
.end method

.method private formalCheckActions()Lcom/scaleasw/powercalc/Solver$Error;
    .locals 6

    .prologue
    .line 691
    sget-object v1, Lcom/scaleasw/powercalc/Solver$Error;->NONE:Lcom/scaleasw/powercalc/Solver$Error;

    .line 695
    .local v1, "lastError":Lcom/scaleasw/powercalc/Solver$Error;
    const/4 v2, 0x0

    .local v2, "n":I
    :goto_0
    iget-object v4, p0, Lcom/scaleasw/powercalc/Solver;->formalLine:Ljava/util/List;

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

    move-result v4

    if-ge v2, v4, :cond_1

    .line 698
    iget-object v4, p0, Lcom/scaleasw/powercalc/Solver;->formalLine:Ljava/util/List;

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

    move-result-object v0

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

    .line 699
    .local v0, "current":Lcom/scaleasw/powercalc/FormalElement;
    iget-object v4, p0, Lcom/scaleasw/powercalc/Solver;->formalLine:Ljava/util/List;

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

    move-result v4

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

    if-ne v2, v4, :cond_2

    const/4 v3, 0x0

    .line 701
    .local v3, "next":Lcom/scaleasw/powercalc/FormalElement;
    :goto_1
    iget-object v4, v0, Lcom/scaleasw/powercalc/FormalElement;->formalElementType:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

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

    if-ne v4, v5, :cond_0

    .line 702
    sget-object v4, Lcom/scaleasw/powercalc/Solver$1;->$SwitchMap$com$scaleasw$powercalc$Element:[I

    iget-object v5, v0, Lcom/scaleasw/powercalc/FormalElement;->element:Lcom/scaleasw/powercalc/Element;

    invoke-virtual {v5}, Lcom/scaleasw/powercalc/Element;->ordinal()I

    move-result v5

    aget v4, v4, v5

    packed-switch v4, :pswitch_data_0

    .line 722
    :cond_0
    :goto_2
    sget-object v4, Lcom/scaleasw/powercalc/Solver$Error;->NONE:Lcom/scaleasw/powercalc/Solver$Error;

    if-eq v1, v4, :cond_3

    .line 724
    .end local v0    # "current":Lcom/scaleasw/powercalc/FormalElement;
    .end local v3    # "next":Lcom/scaleasw/powercalc/FormalElement;
    :cond_1
    return-object v1

    .line 700
    .restart local v0    # "current":Lcom/scaleasw/powercalc/FormalElement;
    :cond_2
    iget-object v4, p0, Lcom/scaleasw/powercalc/Solver;->formalLine:Ljava/util/List;

    add-int/lit8 v5, v2, 0x1

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

    move-result-object v3

    check-cast v3, Lcom/scaleasw/powercalc/FormalElement;

    .restart local v3    # "next":Lcom/scaleasw/powercalc/FormalElement;
    goto :goto_1

    .line 705
    :pswitch_0
    if-nez v3, :cond_0

    .line 706
    sget-object v1, Lcom/scaleasw/powercalc/Solver$Error;->SYNTAX_MEMORY:Lcom/scaleasw/powercalc/Solver$Error;

    .line 707
    iget v4, v0, Lcom/scaleasw/powercalc/FormalElement;->elementIndex:I

    invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v4

    iput-object v4, p0, Lcom/scaleasw/powercalc/Solver;->lastErrorIndex:Ljava/lang/Integer;

    goto :goto_2

    .line 714
    :pswitch_1
    if-eqz v3, :cond_0

    .line 715
    sget-object v1, Lcom/scaleasw/powercalc/Solver$Error;->SYNTAX_SYNTAX:Lcom/scaleasw/powercalc/Solver$Error;

    .line 716
    iget v4, v0, Lcom/scaleasw/powercalc/FormalElement;->elementIndex:I

    invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v4

    iput-object v4, p0, Lcom/scaleasw/powercalc/Solver;->lastErrorIndex:Ljava/lang/Integer;

    goto :goto_2

    .line 695
    :cond_3
    add-int/lit8 v2, v2, 0x1

    goto :goto_0

    .line 702
    :pswitch_data_0
    .packed-switch 0x18
        :pswitch_0
        :pswitch_1
        :pswitch_1
        :pswitch_1
        :pswitch_1
    .end packed-switch
.end method

.method private formalCheckSymbols()Lcom/scaleasw/powercalc/Solver$Error;
    .locals 8

    .prologue
    .line 595
    sget-object v2, Lcom/scaleasw/powercalc/Solver$Error;->NONE:Lcom/scaleasw/powercalc/Solver$Error;

    .line 599
    .local v2, "lastError":Lcom/scaleasw/powercalc/Solver$Error;
    const/4 v0, 0x0

    .line 601
    .local v0, "brackets":I
    const/4 v3, 0x0

    .local v3, "n":I
    :goto_0
    iget-object v6, p0, Lcom/scaleasw/powercalc/Solver;->formalLine:Ljava/util/List;

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

    move-result v6

    if-ge v3, v6, :cond_0

    .line 604
    if-nez v3, :cond_2

    const/4 v5, 0x0

    .line 606
    .local v5, "previous":Lcom/scaleasw/powercalc/FormalElement;
    :goto_1
    iget-object v6, p0, Lcom/scaleasw/powercalc/Solver;->formalLine:Ljava/util/List;

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

    move-result-object v1

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

    .line 607
    .local v1, "current":Lcom/scaleasw/powercalc/FormalElement;
    iget-object v6, p0, Lcom/scaleasw/powercalc/Solver;->formalLine:Ljava/util/List;

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

    move-result v6

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

    if-ne v3, v6, :cond_3

    const/4 v4, 0x0

    .line 620
    .local v4, "next":Lcom/scaleasw/powercalc/FormalElement;
    :goto_2
    iget-object v6, v1, Lcom/scaleasw/powercalc/FormalElement;->element:Lcom/scaleasw/powercalc/Element;

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

    if-ne v6, v7, :cond_8

    .line 623
    if-eqz v5, :cond_4

    .line 624
    iget-object v6, v5, Lcom/scaleasw/powercalc/FormalElement;->formalElementType:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

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

    if-eq v6, v7, :cond_4

    iget-object v6, v5, Lcom/scaleasw/powercalc/FormalElement;->formalElementType:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    sget-object v7, Lcom/scaleasw/powercalc/FormalElement$FormalElementType;->FUNCTION_FA:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    if-eq v6, v7, :cond_4

    iget-object v6, v5, Lcom/scaleasw/powercalc/FormalElement;->formalElementType:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

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

    if-eq v6, v7, :cond_4

    iget-object v6, v5, Lcom/scaleasw/powercalc/FormalElement;->formalElementType:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    sget-object v7, Lcom/scaleasw/powercalc/FormalElement$FormalElementType;->SYMBOL:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    if-eq v6, v7, :cond_4

    .line 628
    sget-object v2, Lcom/scaleasw/powercalc/Solver$Error;->SYNTAX_SYNTAX:Lcom/scaleasw/powercalc/Solver$Error;

    .line 629
    iget v6, v1, Lcom/scaleasw/powercalc/FormalElement;->elementIndex:I

    invoke-static {v6}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v6

    iput-object v6, p0, Lcom/scaleasw/powercalc/Solver;->lastErrorIndex:Ljava/lang/Integer;

    .line 681
    .end local v1    # "current":Lcom/scaleasw/powercalc/FormalElement;
    .end local v4    # "next":Lcom/scaleasw/powercalc/FormalElement;
    .end local v5    # "previous":Lcom/scaleasw/powercalc/FormalElement;
    :cond_0
    :goto_3
    sget-object v6, Lcom/scaleasw/powercalc/Solver$Error;->NONE:Lcom/scaleasw/powercalc/Solver$Error;

    if-ne v2, v6, :cond_1

    if-eqz v0, :cond_1

    .line 682
    sget-object v2, Lcom/scaleasw/powercalc/Solver$Error;->SYNTAX_CBRACKET:Lcom/scaleasw/powercalc/Solver$Error;

    .line 683
    iget-object v6, p0, Lcom/scaleasw/powercalc/Solver;->formalLine:Ljava/util/List;

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

    move-result v6

    invoke-static {v6}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v6

    iput-object v6, p0, Lcom/scaleasw/powercalc/Solver;->lastErrorIndex:Ljava/lang/Integer;

    .line 685
    :cond_1
    return-object v2

    .line 605
    :cond_2
    iget-object v6, p0, Lcom/scaleasw/powercalc/Solver;->formalLine:Ljava/util/List;

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

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

    move-result-object v5

    check-cast v5, Lcom/scaleasw/powercalc/FormalElement;

    .restart local v5    # "previous":Lcom/scaleasw/powercalc/FormalElement;
    goto :goto_1

    .line 608
    .restart local v1    # "current":Lcom/scaleasw/powercalc/FormalElement;
    :cond_3
    iget-object v6, p0, Lcom/scaleasw/powercalc/Solver;->formalLine:Ljava/util/List;

    add-int/lit8 v7, v3, 0x1

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

    move-result-object v4

    check-cast v4, Lcom/scaleasw/powercalc/FormalElement;

    .restart local v4    # "next":Lcom/scaleasw/powercalc/FormalElement;
    goto :goto_2

    .line 634
    :cond_4
    if-eqz v4, :cond_5

    iget-object v6, v4, Lcom/scaleasw/powercalc/FormalElement;->formalElementType:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    sget-object v7, Lcom/scaleasw/powercalc/FormalElement$FormalElementType;->FUNCTION_FA:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    if-eq v6, v7, :cond_6

    iget-object v6, v4, Lcom/scaleasw/powercalc/FormalElement;->formalElementType:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    sget-object v7, Lcom/scaleasw/powercalc/FormalElement$FormalElementType;->NUMBER:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    if-eq v6, v7, :cond_6

    iget-object v6, v4, Lcom/scaleasw/powercalc/FormalElement;->formalElementType:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    sget-object v7, Lcom/scaleasw/powercalc/FormalElement$FormalElementType;->MEMORY:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    if-eq v6, v7, :cond_6

    iget-object v6, v4, Lcom/scaleasw/powercalc/FormalElement;->formalElementType:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    sget-object v7, Lcom/scaleasw/powercalc/FormalElement$FormalElementType;->CONSTANT:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    if-eq v6, v7, :cond_6

    iget-object v6, v4, Lcom/scaleasw/powercalc/FormalElement;->formalElementType:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    sget-object v7, Lcom/scaleasw/powercalc/FormalElement$FormalElementType;->SYMBOL:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    if-eq v6, v7, :cond_6

    .line 639
    :cond_5
    sget-object v2, Lcom/scaleasw/powercalc/Solver$Error;->SYNTAX_SYNTAX:Lcom/scaleasw/powercalc/Solver$Error;

    .line 640
    iget v6, v1, Lcom/scaleasw/powercalc/FormalElement;->elementIndex:I

    invoke-static {v6}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v6

    iput-object v6, p0, Lcom/scaleasw/powercalc/Solver;->lastErrorIndex:Ljava/lang/Integer;

    goto :goto_3

    .line 643
    :cond_6
    add-int/lit8 v0, v0, 0x1

    .line 677
    :cond_7
    :goto_4
    sget-object v6, Lcom/scaleasw/powercalc/Solver$Error;->NONE:Lcom/scaleasw/powercalc/Solver$Error;

    if-ne v2, v6, :cond_0

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

    goto/16 :goto_0

    .line 645
    :cond_8
    iget-object v6, v1, Lcom/scaleasw/powercalc/FormalElement;->element:Lcom/scaleasw/powercalc/Element;

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

    if-ne v6, v7, :cond_7

    .line 648
    if-eqz v4, :cond_9

    .line 649
    iget-object v6, v4, Lcom/scaleasw/powercalc/FormalElement;->formalElementType:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

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

    if-eq v6, v7, :cond_9

    iget-object v6, v4, Lcom/scaleasw/powercalc/FormalElement;->formalElementType:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

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

    if-eq v6, v7, :cond_9

    iget-object v6, v4, Lcom/scaleasw/powercalc/FormalElement;->formalElementType:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    sget-object v7, Lcom/scaleasw/powercalc/FormalElement$FormalElementType;->SYMBOL:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    if-eq v6, v7, :cond_9

    iget-object v6, v4, Lcom/scaleasw/powercalc/FormalElement;->formalElementType:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

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

    if-eq v6, v7, :cond_9

    iget-object v6, v4, Lcom/scaleasw/powercalc/FormalElement;->formalElementType:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

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

    if-eq v6, v7, :cond_9

    .line 654
    sget-object v2, Lcom/scaleasw/powercalc/Solver$Error;->SYNTAX_SYNTAX:Lcom/scaleasw/powercalc/Solver$Error;

    .line 655
    iget v6, v1, Lcom/scaleasw/powercalc/FormalElement;->elementIndex:I

    invoke-static {v6}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v6

    iput-object v6, p0, Lcom/scaleasw/powercalc/Solver;->lastErrorIndex:Ljava/lang/Integer;

    goto/16 :goto_3

    .line 660
    :cond_9
    if-eqz v5, :cond_a

    iget-object v6, v5, Lcom/scaleasw/powercalc/FormalElement;->formalElementType:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

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

    if-eq v6, v7, :cond_b

    iget-object v6, v5, Lcom/scaleasw/powercalc/FormalElement;->formalElementType:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    sget-object v7, Lcom/scaleasw/powercalc/FormalElement$FormalElementType;->NUMBER:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    if-eq v6, v7, :cond_b

    iget-object v6, v5, Lcom/scaleasw/powercalc/FormalElement;->formalElementType:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    sget-object v7, Lcom/scaleasw/powercalc/FormalElement$FormalElementType;->MEMORY:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    if-eq v6, v7, :cond_b

    iget-object v6, v5, Lcom/scaleasw/powercalc/FormalElement;->formalElementType:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    sget-object v7, Lcom/scaleasw/powercalc/FormalElement$FormalElementType;->CONSTANT:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    if-eq v6, v7, :cond_b

    iget-object v6, v5, Lcom/scaleasw/powercalc/FormalElement;->formalElementType:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    sget-object v7, Lcom/scaleasw/powercalc/FormalElement$FormalElementType;->SYMBOL:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    if-eq v6, v7, :cond_b

    .line 665
    :cond_a
    sget-object v2, Lcom/scaleasw/powercalc/Solver$Error;->SYNTAX_SYNTAX:Lcom/scaleasw/powercalc/Solver$Error;

    .line 666
    iget v6, v1, Lcom/scaleasw/powercalc/FormalElement;->elementIndex:I

    invoke-static {v6}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v6

    iput-object v6, p0, Lcom/scaleasw/powercalc/Solver;->lastErrorIndex:Ljava/lang/Integer;

    goto/16 :goto_3

    .line 669
    :cond_b
    if-nez v0, :cond_c

    .line 671
    sget-object v2, Lcom/scaleasw/powercalc/Solver$Error;->SYNTAX_OBRACKET:Lcom/scaleasw/powercalc/Solver$Error;

    .line 672
    iget v6, v1, Lcom/scaleasw/powercalc/FormalElement;->elementIndex:I

    invoke-static {v6}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v6

    iput-object v6, p0, Lcom/scaleasw/powercalc/Solver;->lastErrorIndex:Ljava/lang/Integer;

    .line 674
    :cond_c
    add-int/lit8 v0, v0, -0x1

    goto :goto_4
.end method

.method private formalCompile()Lcom/scaleasw/powercalc/Solver$Error;
    .locals 2

    .prologue
    .line 731
    invoke-direct {p0}, Lcom/scaleasw/powercalc/Solver;->formalNumberCompile()Lcom/scaleasw/powercalc/Solver$Error;

    move-result-object v0

    .line 732
    .local v0, "lastError":Lcom/scaleasw/powercalc/Solver$Error;
    invoke-direct {p0}, Lcom/scaleasw/powercalc/Solver;->formalExpandBrackets()V

    .line 733
    sget-object v1, Lcom/scaleasw/powercalc/Solver$Error;->NONE:Lcom/scaleasw/powercalc/Solver$Error;

    if-ne v0, v1, :cond_0

    invoke-direct {p0}, Lcom/scaleasw/powercalc/Solver;->formalSyntaxCompile()Lcom/scaleasw/powercalc/Solver$Error;

    move-result-object v0

    .line 734
    :cond_0
    sget-object v1, Lcom/scaleasw/powercalc/Solver$Error;->NONE:Lcom/scaleasw/powercalc/Solver$Error;

    if-ne v0, v1, :cond_1

    invoke-direct {p0}, Lcom/scaleasw/powercalc/Solver;->formalCheckSymbols()Lcom/scaleasw/powercalc/Solver$Error;

    move-result-object v0

    .line 735
    :cond_1
    sget-object v1, Lcom/scaleasw/powercalc/Solver$Error;->NONE:Lcom/scaleasw/powercalc/Solver$Error;

    if-ne v0, v1, :cond_2

    invoke-direct {p0}, Lcom/scaleasw/powercalc/Solver;->formalDMSNumberCompile()Lcom/scaleasw/powercalc/Solver$Error;

    move-result-object v0

    .line 737
    :cond_2
    sget-object v1, Lcom/scaleasw/powercalc/Solver$Error;->NONE:Lcom/scaleasw/powercalc/Solver$Error;

    if-ne v0, v1, :cond_3

    invoke-direct {p0}, Lcom/scaleasw/powercalc/Solver;->formalCheckActions()Lcom/scaleasw/powercalc/Solver$Error;

    move-result-object v0

    .line 738
    :cond_3
    return-object v0
.end method

.method private formalDMSNumberCompile()Lcom/scaleasw/powercalc/Solver$Error;
    .locals 18

    .prologue
    .line 399
    sget-object v5, Lcom/scaleasw/powercalc/Solver$Error;->NONE:Lcom/scaleasw/powercalc/Solver$Error;

    .line 403
    .local v5, "lastError":Lcom/scaleasw/powercalc/Solver$Error;
    new-instance v10, Lcom/scaleasw/powercalc/Complex;

    const-wide/16 v12, 0x0

    const-wide/16 v14, 0x0

    invoke-direct {v10, v12, v13, v14, v15}, Lcom/scaleasw/powercalc/Complex;-><init>(DD)V

    .line 404
    .local v10, "value":Lcom/scaleasw/powercalc/Complex;
    const/4 v9, 0x0

    .line 405
    .local v9, "step":I
    const/4 v4, 0x0

    .line 407
    .local v4, "index":I
    const/4 v8, 0x0

    .line 408
    .local v8, "previous":Lcom/scaleasw/powercalc/FormalElement;
    const/4 v6, 0x0

    .local v6, "n":I
    :goto_0
    move-object/from16 v0, p0

    iget-object v11, v0, Lcom/scaleasw/powercalc/Solver;->formalLine:Ljava/util/List;

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

    move-result v11

    if-ge v6, v11, :cond_4

    .line 411
    if-nez v6, :cond_5

    const/4 v8, 0x0

    .line 413
    :goto_1
    move-object/from16 v0, p0

    iget-object v11, v0, Lcom/scaleasw/powercalc/Solver;->formalLine:Ljava/util/List;

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

    move-result-object v2

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

    .line 414
    .local v2, "current":Lcom/scaleasw/powercalc/FormalElement;
    move-object/from16 v0, p0

    iget-object v11, v0, Lcom/scaleasw/powercalc/Solver;->formalLine:Ljava/util/List;

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

    move-result v11

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

    if-ne v6, v11, :cond_6

    const/4 v7, 0x0

    .line 417
    .local v7, "next":Lcom/scaleasw/powercalc/FormalElement;
    :goto_2
    iget-object v11, v2, Lcom/scaleasw/powercalc/FormalElement;->element:Lcom/scaleasw/powercalc/Element;

    sget-object v12, Lcom/scaleasw/powercalc/Element;->SDMS:Lcom/scaleasw/powercalc/Element;

    if-eq v11, v12, :cond_1

    if-lez v9, :cond_0

    if-eqz v8, :cond_0

    iget-object v11, v8, Lcom/scaleasw/powercalc/FormalElement;->formalElementType:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    sget-object v12, Lcom/scaleasw/powercalc/FormalElement$FormalElementType;->NUMBER:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    if-ne v11, v12, :cond_0

    iget-object v11, v2, Lcom/scaleasw/powercalc/FormalElement;->formalElementType:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    sget-object v12, Lcom/scaleasw/powercalc/FormalElement$FormalElementType;->NUMBER:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    if-ne v11, v12, :cond_1

    :cond_0
    if-lez v9, :cond_b

    move-object/from16 v0, p0

    iget-object v11, v0, Lcom/scaleasw/powercalc/Solver;->formalLine:Ljava/util/List;

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

    move-result v11

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

    if-ne v6, v11, :cond_b

    .line 420
    :cond_1
    move-object/from16 v0, p0

    iget-object v11, v0, Lcom/scaleasw/powercalc/Solver;->formalLine:Ljava/util/List;

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

    move-result v11

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

    if-ne v6, v11, :cond_2

    iget-object v11, v2, Lcom/scaleasw/powercalc/FormalElement;->formalElementType:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    sget-object v12, Lcom/scaleasw/powercalc/FormalElement$FormalElementType;->NUMBER:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    if-ne v11, v12, :cond_2

    .line 421
    add-int/lit8 v6, v6, 0x1

    .line 422
    move-object v8, v2

    .line 425
    :cond_2
    if-eqz v8, :cond_3

    iget-object v11, v8, Lcom/scaleasw/powercalc/FormalElement;->formalElementType:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    sget-object v12, Lcom/scaleasw/powercalc/FormalElement$FormalElementType;->NUMBER:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    if-ne v11, v12, :cond_3

    const/4 v11, 0x3

    if-lt v9, v11, :cond_7

    .line 426
    :cond_3
    sget-object v5, Lcom/scaleasw/powercalc/Solver$Error;->SYNTAX_DMS:Lcom/scaleasw/powercalc/Solver$Error;

    .line 473
    .end local v2    # "current":Lcom/scaleasw/powercalc/FormalElement;
    .end local v7    # "next":Lcom/scaleasw/powercalc/FormalElement;
    :cond_4
    return-object v5

    .line 412
    :cond_5
    move-object/from16 v0, p0

    iget-object v11, v0, Lcom/scaleasw/powercalc/Solver;->formalLine:Ljava/util/List;

    add-int/lit8 v12, v6, -0x1

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

    move-result-object v8

    .end local v8    # "previous":Lcom/scaleasw/powercalc/FormalElement;
    check-cast v8, Lcom/scaleasw/powercalc/FormalElement;

    .restart local v8    # "previous":Lcom/scaleasw/powercalc/FormalElement;
    goto :goto_1

    .line 415
    .restart local v2    # "current":Lcom/scaleasw/powercalc/FormalElement;
    :cond_6
    move-object/from16 v0, p0

    iget-object v11, v0, Lcom/scaleasw/powercalc/Solver;->formalLine:Ljava/util/List;

    add-int/lit8 v12, v6, 0x1

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

    move-result-object v7

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

    .restart local v7    # "next":Lcom/scaleasw/powercalc/FormalElement;
    goto :goto_2

    .line 430
    :cond_7
    packed-switch v9, :pswitch_data_0

    .line 440
    iget-wide v12, v10, Lcom/scaleasw/powercalc/Complex;->re:D

    iget-object v11, v8, Lcom/scaleasw/powercalc/FormalElement;->value:Lcom/scaleasw/powercalc/Complex;

    iget-wide v14, v11, Lcom/scaleasw/powercalc/Complex;->re:D

    const-wide v16, 0x40ac200000000000L    # 3600.0

    div-double v14, v14, v16

    add-double/2addr v12, v14

    iput-wide v12, v10, Lcom/scaleasw/powercalc/Complex;->re:D

    .line 443
    :goto_3
    new-instance v3, Lcom/scaleasw/powercalc/FormalElement;

    sget-object v11, Lcom/scaleasw/powercalc/FormalElement$FormalElementType;->NUMBER:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    invoke-direct {v3, v11}, Lcom/scaleasw/powercalc/FormalElement;-><init>(Lcom/scaleasw/powercalc/FormalElement$FormalElementType;)V

    .line 445
    .local v3, "element":Lcom/scaleasw/powercalc/FormalElement;
    sget-object v11, Lcom/scaleasw/powercalc/Solver$1;->$SwitchMap$com$scaleasw$powercalc$Solver$AngleMode:[I

    move-object/from16 v0, p0

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

    invoke-virtual {v12}, Lcom/scaleasw/powercalc/Solver$AngleMode;->ordinal()I

    move-result v12

    aget v11, v11, v12

    packed-switch v11, :pswitch_data_1

    .line 458
    :goto_4
    iget-object v11, v3, Lcom/scaleasw/powercalc/FormalElement;->value:Lcom/scaleasw/powercalc/Complex;

    const-wide/16 v12, 0x0

    iput-wide v12, v11, Lcom/scaleasw/powercalc/Complex;->im:D

    .line 459
    move-object/from16 v0, p0

    iget-object v11, v0, Lcom/scaleasw/powercalc/Solver;->formalLine:Ljava/util/List;

    invoke-interface {v11, v4, v3}, Ljava/util/List;->set(ILjava/lang/Object;)Ljava/lang/Object;

    .line 460
    iget-object v11, v2, Lcom/scaleasw/powercalc/FormalElement;->element:Lcom/scaleasw/powercalc/Element;

    sget-object v12, Lcom/scaleasw/powercalc/Element;->SDMS:Lcom/scaleasw/powercalc/Element;

    if-ne v11, v12, :cond_8

    move-object/from16 v0, p0

    iget-object v11, v0, Lcom/scaleasw/powercalc/Solver;->formalLine:Ljava/util/List;

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

    .line 461
    :cond_8
    if-lez v9, :cond_c

    .line 462
    move-object/from16 v0, p0

    iget-object v11, v0, Lcom/scaleasw/powercalc/Solver;->formalLine:Ljava/util/List;

    add-int/lit8 v12, v6, -0x1

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

    .line 463
    iget-object v11, v2, Lcom/scaleasw/powercalc/FormalElement;->element:Lcom/scaleasw/powercalc/Element;

    sget-object v12, Lcom/scaleasw/powercalc/Element;->SDMS:Lcom/scaleasw/powercalc/Element;

    if-ne v11, v12, :cond_9

    add-int/lit8 v6, v6, -0x2

    .line 466
    :cond_9
    :goto_5
    add-int/lit8 v9, v9, 0x1

    .line 468
    iget-object v11, v2, Lcom/scaleasw/powercalc/FormalElement;->element:Lcom/scaleasw/powercalc/Element;

    sget-object v12, Lcom/scaleasw/powercalc/Element;->SDMS:Lcom/scaleasw/powercalc/Element;

    if-ne v11, v12, :cond_a

    if-eqz v7, :cond_a

    iget-object v11, v7, Lcom/scaleasw/powercalc/FormalElement;->formalElementType:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    sget-object v12, Lcom/scaleasw/powercalc/FormalElement$FormalElementType;->NUMBER:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    if-eq v11, v12, :cond_b

    .line 469
    :cond_a
    const/4 v9, 0x0

    .line 408
    .end local v3    # "element":Lcom/scaleasw/powercalc/FormalElement;
    :cond_b
    add-int/lit8 v6, v6, 0x1

    goto/16 :goto_0

    .line 433
    :pswitch_0
    iget-object v11, v8, Lcom/scaleasw/powercalc/FormalElement;->value:Lcom/scaleasw/powercalc/Complex;

    iget-wide v12, v11, Lcom/scaleasw/powercalc/Complex;->re:D

    iput-wide v12, v10, Lcom/scaleasw/powercalc/Complex;->re:D

    .line 434
    add-int/lit8 v4, v6, -0x1

    .line 435
    goto :goto_3

    .line 437
    :pswitch_1
    iget-wide v12, v10, Lcom/scaleasw/powercalc/Complex;->re:D

    iget-object v11, v8, Lcom/scaleasw/powercalc/FormalElement;->value:Lcom/scaleasw/powercalc/Complex;

    iget-wide v14, v11, Lcom/scaleasw/powercalc/Complex;->re:D

    const-wide/high16 v16, 0x404e000000000000L    # 60.0

    div-double v14, v14, v16

    add-double/2addr v12, v14

    iput-wide v12, v10, Lcom/scaleasw/powercalc/Complex;->re:D

    goto :goto_3

    .line 448
    .restart local v3    # "element":Lcom/scaleasw/powercalc/FormalElement;
    :pswitch_2
    iget-object v11, v3, Lcom/scaleasw/powercalc/FormalElement;->value:Lcom/scaleasw/powercalc/Complex;

    iget-wide v12, v10, Lcom/scaleasw/powercalc/Complex;->re:D

    iput-wide v12, v11, Lcom/scaleasw/powercalc/Complex;->re:D

    goto :goto_4

    .line 451
    :pswitch_3
    iget-object v11, v3, Lcom/scaleasw/powercalc/FormalElement;->value:Lcom/scaleasw/powercalc/Complex;

    iget-wide v12, v10, Lcom/scaleasw/powercalc/Complex;->re:D

    invoke-static {v12, v13}, Lcom/scaleasw/powercalc/FunctionSolver;->degToRad(D)D

    move-result-wide v12

    iput-wide v12, v11, Lcom/scaleasw/powercalc/Complex;->re:D

    goto :goto_4

    .line 454
    :pswitch_4
    iget-object v11, v3, Lcom/scaleasw/powercalc/FormalElement;->value:Lcom/scaleasw/powercalc/Complex;

    iget-wide v12, v10, Lcom/scaleasw/powercalc/Complex;->re:D

    invoke-static {v12, v13}, Lcom/scaleasw/powercalc/FunctionSolver;->degToGrad(D)D

    move-result-wide v12

    iput-wide v12, v11, Lcom/scaleasw/powercalc/Complex;->re:D

    goto :goto_4

    .line 465
    :cond_c
    add-int/lit8 v6, v6, -0x1

    goto :goto_5

    .line 430
    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
        :pswitch_1
    .end packed-switch

    .line 445
    :pswitch_data_1
    .packed-switch 0x1
        :pswitch_2
        :pswitch_3
        :pswitch_4
    .end packed-switch
.end method

.method private formalExpandBrackets()V
    .locals 6

    .prologue
    .line 543
    const/4 v1, 0x0

    .local v1, "n":I
    :goto_0
    iget-object v4, p0, Lcom/scaleasw/powercalc/Solver;->formalLine:Ljava/util/List;

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

    move-result v4

    if-ge v1, v4, :cond_6

    .line 546
    if-nez v1, :cond_1

    const/4 v3, 0x0

    .line 548
    .local v3, "previous":Lcom/scaleasw/powercalc/FormalElement;
    :goto_1
    iget-object v4, p0, Lcom/scaleasw/powercalc/Solver;->formalLine:Ljava/util/List;

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

    move-result-object v0

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

    .line 549
    .local v0, "current":Lcom/scaleasw/powercalc/FormalElement;
    iget-object v4, p0, Lcom/scaleasw/powercalc/Solver;->formalLine:Ljava/util/List;

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

    move-result v4

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

    if-ne v1, v4, :cond_2

    const/4 v2, 0x0

    .line 552
    .local v2, "next":Lcom/scaleasw/powercalc/FormalElement;
    :goto_2
    iget-object v4, v0, Lcom/scaleasw/powercalc/FormalElement;->formalElementType:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    sget-object v5, Lcom/scaleasw/powercalc/FormalElement$FormalElementType;->SYMBOL:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    if-ne v4, v5, :cond_4

    iget-object v4, v0, Lcom/scaleasw/powercalc/FormalElement;->element:Lcom/scaleasw/powercalc/Element;

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

    if-ne v4, v5, :cond_4

    .line 555
    if-nez v3, :cond_3

    .line 543
    :cond_0
    :goto_3
    add-int/lit8 v1, v1, 0x1

    goto :goto_0

    .line 547
    .end local v0    # "current":Lcom/scaleasw/powercalc/FormalElement;
    .end local v2    # "next":Lcom/scaleasw/powercalc/FormalElement;
    .end local v3    # "previous":Lcom/scaleasw/powercalc/FormalElement;
    :cond_1
    iget-object v4, p0, Lcom/scaleasw/powercalc/Solver;->formalLine:Ljava/util/List;

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

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

    move-result-object v3

    check-cast v3, Lcom/scaleasw/powercalc/FormalElement;

    .restart local v3    # "previous":Lcom/scaleasw/powercalc/FormalElement;
    goto :goto_1

    .line 550
    .restart local v0    # "current":Lcom/scaleasw/powercalc/FormalElement;
    :cond_2
    iget-object v4, p0, Lcom/scaleasw/powercalc/Solver;->formalLine:Ljava/util/List;

    add-int/lit8 v5, v1, 0x1

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

    move-result-object v2

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

    .restart local v2    # "next":Lcom/scaleasw/powercalc/FormalElement;
    goto :goto_2

    .line 556
    :cond_3
    iget-object v4, v3, Lcom/scaleasw/powercalc/FormalElement;->formalElementType:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

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

    if-eq v4, v5, :cond_4

    iget-object v4, v3, Lcom/scaleasw/powercalc/FormalElement;->formalElementType:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    sget-object v5, Lcom/scaleasw/powercalc/FormalElement$FormalElementType;->FUNCTION_FA:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    if-eq v4, v5, :cond_4

    iget-object v4, v3, Lcom/scaleasw/powercalc/FormalElement;->formalElementType:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

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

    if-eq v4, v5, :cond_4

    .line 560
    iget-object v4, v3, Lcom/scaleasw/powercalc/FormalElement;->formalElementType:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    sget-object v5, Lcom/scaleasw/powercalc/FormalElement$FormalElementType;->SYMBOL:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    if-ne v4, v5, :cond_5

    iget-object v4, v3, Lcom/scaleasw/powercalc/FormalElement;->element:Lcom/scaleasw/powercalc/Element;

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

    if-eq v4, v5, :cond_5

    .line 574
    :cond_4
    iget-object v4, v0, Lcom/scaleasw/powercalc/FormalElement;->formalElementType:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    sget-object v5, Lcom/scaleasw/powercalc/FormalElement$FormalElementType;->SYMBOL:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    if-ne v4, v5, :cond_0

    iget-object v4, v0, Lcom/scaleasw/powercalc/FormalElement;->element:Lcom/scaleasw/powercalc/Element;

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

    if-ne v4, v5, :cond_0

    .line 577
    if-eqz v2, :cond_0

    .line 578
    iget-object v4, v2, Lcom/scaleasw/powercalc/FormalElement;->formalElementType:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

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

    if-eq v4, v5, :cond_0

    iget-object v4, v2, Lcom/scaleasw/powercalc/FormalElement;->formalElementType:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    sget-object v5, Lcom/scaleasw/powercalc/FormalElement$FormalElementType;->SYMBOL:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    if-eq v4, v5, :cond_0

    iget-object v4, v2, Lcom/scaleasw/powercalc/FormalElement;->formalElementType:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

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

    if-eq v4, v5, :cond_0

    iget-object v4, v2, Lcom/scaleasw/powercalc/FormalElement;->formalElementType:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

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

    if-eq v4, v5, :cond_0

    .line 583
    new-instance v0, Lcom/scaleasw/powercalc/FormalElement;

    .end local v0    # "current":Lcom/scaleasw/powercalc/FormalElement;
    sget-object v4, Lcom/scaleasw/powercalc/FormalElement$FormalElementType;->OPERATOR:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    invoke-direct {v0, v4}, Lcom/scaleasw/powercalc/FormalElement;-><init>(Lcom/scaleasw/powercalc/FormalElement$FormalElementType;)V

    .line 584
    .restart local v0    # "current":Lcom/scaleasw/powercalc/FormalElement;
    sget-object v4, Lcom/scaleasw/powercalc/Element;->OMULT:Lcom/scaleasw/powercalc/Element;

    invoke-virtual {v0, v4}, Lcom/scaleasw/powercalc/FormalElement;->setElement(Lcom/scaleasw/powercalc/Element;)V

    .line 585
    iget-object v4, p0, Lcom/scaleasw/powercalc/Solver;->formalLine:Ljava/util/List;

    add-int/lit8 v5, v1, 0x1

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

    goto :goto_3

    .line 566
    :cond_5
    new-instance v0, Lcom/scaleasw/powercalc/FormalElement;

    .end local v0    # "current":Lcom/scaleasw/powercalc/FormalElement;
    sget-object v4, Lcom/scaleasw/powercalc/FormalElement$FormalElementType;->OPERATOR:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    invoke-direct {v0, v4}, Lcom/scaleasw/powercalc/FormalElement;-><init>(Lcom/scaleasw/powercalc/FormalElement$FormalElementType;)V

    .line 567
    .restart local v0    # "current":Lcom/scaleasw/powercalc/FormalElement;
    sget-object v4, Lcom/scaleasw/powercalc/Element;->OMULT:Lcom/scaleasw/powercalc/Element;

    invoke-virtual {v0, v4}, Lcom/scaleasw/powercalc/FormalElement;->setElement(Lcom/scaleasw/powercalc/Element;)V

    .line 568
    iget-object v4, p0, Lcom/scaleasw/powercalc/Solver;->formalLine:Ljava/util/List;

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

    goto/16 :goto_3

    .line 590
    .end local v0    # "current":Lcom/scaleasw/powercalc/FormalElement;
    .end local v2    # "next":Lcom/scaleasw/powercalc/FormalElement;
    .end local v3    # "previous":Lcom/scaleasw/powercalc/FormalElement;
    :cond_6
    return-void
.end method

.method private formalNumberCompile()Lcom/scaleasw/powercalc/Solver$Error;
    .locals 26

    .prologue
    .line 69
    sget-object v9, Lcom/scaleasw/powercalc/Solver$Error;->NONE:Lcom/scaleasw/powercalc/Solver$Error;

    .line 70
    .local v9, "lastError":Lcom/scaleasw/powercalc/Solver$Error;
    sget-object v18, Lcom/scaleasw/powercalc/Solver$NumberCompilerState;->IDDLE:Lcom/scaleasw/powercalc/Solver$NumberCompilerState;

    .line 72
    .local v18, "state":Lcom/scaleasw/powercalc/Solver$NumberCompilerState;
    new-instance v19, Lcom/scaleasw/powercalc/Complex;

    const-wide/16 v20, 0x0

    const-wide/16 v22, 0x0

    invoke-direct/range {v19 .. v23}, Lcom/scaleasw/powercalc/Complex;-><init>(DD)V

    .line 73
    .local v19, "value":Lcom/scaleasw/powercalc/Complex;
    const-wide/high16 v20, 0x3ff0000000000000L    # 1.0

    invoke-static/range {v20 .. v21}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double;

    move-result-object v11

    .line 74
    .local v11, "multiplier":Ljava/lang/Double;
    move-object/from16 v0, p0

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

    .line 75
    .local v14, "radixMode":Lcom/scaleasw/powercalc/Solver$CalcMode;
    const/16 v20, 0x1

    invoke-static/range {v20 .. v20}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v17

    .line 76
    .local v17, "signMultiplier":Ljava/lang/Integer;
    const/16 v20, 0x0

    invoke-static/range {v20 .. v20}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v7

    .line 77
    .local v7, "exponent":Ljava/lang/Integer;
    const/16 v20, 0x0

    invoke-static/range {v20 .. v20}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v12

    .local v12, "n":Ljava/lang/Integer;
    :goto_0
    invoke-virtual {v12}, Ljava/lang/Integer;->intValue()I

    move-result v20

    move-object/from16 v0, p0

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

    move-object/from16 v21, v0

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

    move-result v21

    move/from16 v0, v20

    move/from16 v1, v21

    if-ge v0, v1, :cond_25

    .line 79
    move-object/from16 v0, p0

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

    move-object/from16 v20, v0

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

    move-result v21

    invoke-interface/range {v20 .. v21}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v6

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

    .line 80
    .local v6, "element":Lcom/scaleasw/powercalc/Element;
    const/16 v20, 0x0

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

    move-result-object v16

    .line 81
    .local v16, "saveNumber":Ljava/lang/Boolean;
    const/16 v20, 0x0

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

    move-result-object v15

    .line 84
    .local v15, "saveElement":Ljava/lang/Boolean;
    sget-object v20, Lcom/scaleasw/powercalc/Solver$NumberCompilerState;->SIGN:Lcom/scaleasw/powercalc/Solver$NumberCompilerState;

    move-object/from16 v0, v18

    move-object/from16 v1, v20

    if-ne v0, v1, :cond_1

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

    move-object/from16 v20, v0

    sget-object v21, Lcom/scaleasw/powercalc/FormalElement$FormalElementType;->MEMORY:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    move-object/from16 v0, v20

    move-object/from16 v1, v21

    if-eq v0, v1, :cond_0

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

    move-object/from16 v20, v0

    sget-object v21, Lcom/scaleasw/powercalc/FormalElement$FormalElementType;->CONSTANT:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    move-object/from16 v0, v20

    move-object/from16 v1, v21

    if-eq v0, v1, :cond_0

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

    move-object/from16 v20, v0

    sget-object v21, Lcom/scaleasw/powercalc/FormalElement$FormalElementType;->SYMBOL:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    move-object/from16 v0, v20

    move-object/from16 v1, v21

    if-eq v0, v1, :cond_0

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

    move-object/from16 v20, v0

    sget-object v21, Lcom/scaleasw/powercalc/FormalElement$FormalElementType;->FUNCTION_FA:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    move-object/from16 v0, v20

    move-object/from16 v1, v21

    if-ne v0, v1, :cond_1

    .line 90
    :cond_0
    const-wide/high16 v20, -0x4010000000000000L    # -1.0

    move-wide/from16 v0, v20

    move-object/from16 v2, v19

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

    .line 91
    const-wide/16 v20, 0x0

    move-wide/from16 v0, v20

    move-object/from16 v2, v19

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

    .line 92
    const-wide/16 v20, -0x1

    move-wide/from16 v0, v20

    move-object/from16 v2, v19

    iput-wide v0, v2, Lcom/scaleasw/powercalc/Complex;->radix:J

    .line 93
    const/16 v20, 0x1

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

    move-result-object v16

    .line 94
    const/16 v20, 0x1

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

    move-result-object v15

    .line 95
    sget-object v18, Lcom/scaleasw/powercalc/Solver$NumberCompilerState;->SIGNCONST:Lcom/scaleasw/powercalc/Solver$NumberCompilerState;

    .line 98
    :cond_1
    invoke-virtual/range {v16 .. v16}, Ljava/lang/Boolean;->booleanValue()Z

    move-result v20

    if-nez v20, :cond_2

    .line 100
    sget-object v20, Lcom/scaleasw/powercalc/Solver$1;->$SwitchMap$com$scaleasw$powercalc$Element:[I

    invoke-virtual {v6}, Lcom/scaleasw/powercalc/Element;->ordinal()I

    move-result v21

    aget v20, v20, v21

    packed-switch v20, :pswitch_data_0

    .line 280
    move-object/from16 v0, p0

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

    .line 281
    sget-object v20, Lcom/scaleasw/powercalc/Solver$NumberCompilerState;->NUMBER:Lcom/scaleasw/powercalc/Solver$NumberCompilerState;

    move-object/from16 v0, v18

    move-object/from16 v1, v20

    invoke-virtual {v0, v1}, Lcom/scaleasw/powercalc/Solver$NumberCompilerState;->compareTo(Ljava/lang/Enum;)I

    move-result v20

    if-ltz v20, :cond_1c

    .line 283
    const/16 v20, 0x1

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

    move-result-object v16

    .line 284
    const/16 v20, 0x1

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

    move-result-object v15

    .line 303
    :cond_2
    :goto_1
    invoke-virtual {v12}, Ljava/lang/Integer;->intValue()I

    move-result v20

    move-object/from16 v0, p0

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

    move-object/from16 v21, v0

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

    move-result v21

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

    move/from16 v0, v20

    move/from16 v1, v21

    if-ne v0, v1, :cond_3

    .line 305
    sget-object v20, Lcom/scaleasw/powercalc/Solver$NumberCompilerState;->NUMBER:Lcom/scaleasw/powercalc/Solver$NumberCompilerState;

    move-object/from16 v0, v18

    move-object/from16 v1, v20

    invoke-virtual {v0, v1}, Lcom/scaleasw/powercalc/Solver$NumberCompilerState;->compareTo(Ljava/lang/Enum;)I

    move-result v20

    if-ltz v20, :cond_1e

    .line 307
    const/16 v20, 0x1

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

    move-result-object v16

    .line 316
    :cond_3
    :goto_2
    invoke-virtual/range {v16 .. v16}, Ljava/lang/Boolean;->booleanValue()Z

    move-result v20

    if-eqz v20, :cond_23

    .line 319
    invoke-virtual {v7}, Ljava/lang/Integer;->intValue()I

    move-result v20

    if-eqz v20, :cond_21

    .line 320
    invoke-virtual {v7}, Ljava/lang/Integer;->intValue()I

    move-result v20

    invoke-static/range {v20 .. v20}, Ljava/lang/Math;->abs(I)I

    move-result v20

    const/16 v21, 0x12c

    move/from16 v0, v20

    move/from16 v1, v21

    if-le v0, v1, :cond_1f

    .line 322
    sget-object v9, Lcom/scaleasw/powercalc/Solver$Error;->SYNTAX_NUMBER_EXP:Lcom/scaleasw/powercalc/Solver$Error;

    .line 323
    move-object/from16 v0, p0

    iput-object v12, v0, Lcom/scaleasw/powercalc/Solver;->lastErrorIndex:Ljava/lang/Integer;

    move-object v10, v9

    .line 351
    .end local v6    # "element":Lcom/scaleasw/powercalc/Element;
    .end local v9    # "lastError":Lcom/scaleasw/powercalc/Solver$Error;
    .end local v15    # "saveElement":Ljava/lang/Boolean;
    .end local v16    # "saveNumber":Ljava/lang/Boolean;
    .local v10, "lastError":Lcom/scaleasw/powercalc/Solver$Error;
    :goto_3
    return-object v10

    .line 104
    .end local v10    # "lastError":Lcom/scaleasw/powercalc/Solver$Error;
    .restart local v6    # "element":Lcom/scaleasw/powercalc/Element;
    .restart local v9    # "lastError":Lcom/scaleasw/powercalc/Solver$Error;
    .restart local v15    # "saveElement":Ljava/lang/Boolean;
    .restart local v16    # "saveNumber":Ljava/lang/Boolean;
    :pswitch_0
    sget-object v20, Lcom/scaleasw/powercalc/Solver$NumberCompilerState;->SIGN:Lcom/scaleasw/powercalc/Solver$NumberCompilerState;

    move-object/from16 v0, v18

    move-object/from16 v1, v20

    invoke-virtual {v0, v1}, Lcom/scaleasw/powercalc/Solver$NumberCompilerState;->compareTo(Ljava/lang/Enum;)I

    move-result v20

    if-ltz v20, :cond_4

    sget-object v20, Lcom/scaleasw/powercalc/Solver$NumberCompilerState;->EXPONENT:Lcom/scaleasw/powercalc/Solver$NumberCompilerState;

    move-object/from16 v0, v18

    move-object/from16 v1, v20

    invoke-virtual {v0, v1}, Lcom/scaleasw/powercalc/Solver$NumberCompilerState;->compareTo(Ljava/lang/Enum;)I

    move-result v20

    if-gez v20, :cond_4

    .line 106
    sget-object v9, Lcom/scaleasw/powercalc/Solver$Error;->SYNTAX_NUMBER_SIGN:Lcom/scaleasw/powercalc/Solver$Error;

    .line 107
    move-object/from16 v0, p0

    iput-object v12, v0, Lcom/scaleasw/powercalc/Solver;->lastErrorIndex:Ljava/lang/Integer;

    goto :goto_1

    .line 109
    :cond_4
    sget-object v20, Lcom/scaleasw/powercalc/Solver$NumberCompilerState;->EXPSIGN:Lcom/scaleasw/powercalc/Solver$NumberCompilerState;

    move-object/from16 v0, v18

    move-object/from16 v1, v20

    invoke-virtual {v0, v1}, Lcom/scaleasw/powercalc/Solver$NumberCompilerState;->compareTo(Ljava/lang/Enum;)I

    move-result v20

    if-ltz v20, :cond_5

    .line 111
    sget-object v9, Lcom/scaleasw/powercalc/Solver$Error;->SYNTAX_NUMBER_SIGN:Lcom/scaleasw/powercalc/Solver$Error;

    .line 112
    move-object/from16 v0, p0

    iput-object v12, v0, Lcom/scaleasw/powercalc/Solver;->lastErrorIndex:Ljava/lang/Integer;

    goto :goto_1

    .line 114
    :cond_5
    sget-object v20, Lcom/scaleasw/powercalc/Solver$NumberCompilerState;->IDDLE:Lcom/scaleasw/powercalc/Solver$NumberCompilerState;

    move-object/from16 v0, v18

    move-object/from16 v1, v20

    invoke-virtual {v0, v1}, Lcom/scaleasw/powercalc/Solver$NumberCompilerState;->compareTo(Ljava/lang/Enum;)I

    move-result v20

    if-nez v20, :cond_6

    .line 116
    sget-object v18, Lcom/scaleasw/powercalc/Solver$NumberCompilerState;->SIGN:Lcom/scaleasw/powercalc/Solver$NumberCompilerState;

    .line 117
    const/16 v20, -0x1

    invoke-static/range {v20 .. v20}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v17

    goto/16 :goto_1

    .line 121
    :cond_6
    sget-object v18, Lcom/scaleasw/powercalc/Solver$NumberCompilerState;->EXPSIGN:Lcom/scaleasw/powercalc/Solver$NumberCompilerState;

    .line 122
    const/16 v20, -0x1

    invoke-static/range {v20 .. v20}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v17

    .line 124
    goto/16 :goto_1

    .line 127
    :pswitch_1
    invoke-virtual {v7}, Ljava/lang/Integer;->intValue()I

    move-result v20

    if-nez v20, :cond_7

    const/16 v20, 0x1

    invoke-static/range {v20 .. v20}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v7

    .line 128
    :cond_7
    sget-object v20, Lcom/scaleasw/powercalc/Solver$NumberCompilerState;->NUMBER:Lcom/scaleasw/powercalc/Solver$NumberCompilerState;

    move-object/from16 v0, v18

    move-object/from16 v1, v20

    invoke-virtual {v0, v1}, Lcom/scaleasw/powercalc/Solver$NumberCompilerState;->compareTo(Ljava/lang/Enum;)I

    move-result v20

    if-ltz v20, :cond_8

    sget-object v20, Lcom/scaleasw/powercalc/Solver$NumberCompilerState;->DOT:Lcom/scaleasw/powercalc/Solver$NumberCompilerState;

    move-object/from16 v0, v18

    move-object/from16 v1, v20

    invoke-virtual {v0, v1}, Lcom/scaleasw/powercalc/Solver$NumberCompilerState;->compareTo(Ljava/lang/Enum;)I

    move-result v20

    if-gtz v20, :cond_8

    .line 130
    sget-object v18, Lcom/scaleasw/powercalc/Solver$NumberCompilerState;->EXPONENT:Lcom/scaleasw/powercalc/Solver$NumberCompilerState;

    .line 131
    const/16 v20, 0x1

    invoke-static/range {v20 .. v20}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v17

    goto/16 :goto_1

    .line 135
    :cond_8
    sget-object v9, Lcom/scaleasw/powercalc/Solver$Error;->SYNTAX_NUMBER_EXP:Lcom/scaleasw/powercalc/Solver$Error;

    .line 136
    move-object/from16 v0, p0

    iput-object v12, v0, Lcom/scaleasw/powercalc/Solver;->lastErrorIndex:Ljava/lang/Integer;

    goto/16 :goto_1

    .line 141
    :pswitch_2
    sget-object v20, Lcom/scaleasw/powercalc/Solver$NumberCompilerState;->DOT:Lcom/scaleasw/powercalc/Solver$NumberCompilerState;

    move-object/from16 v0, v18

    move-object/from16 v1, v20

    invoke-virtual {v0, v1}, Lcom/scaleasw/powercalc/Solver$NumberCompilerState;->compareTo(Ljava/lang/Enum;)I

    move-result v20

    if-ltz v20, :cond_9

    .line 143
    sget-object v9, Lcom/scaleasw/powercalc/Solver$Error;->SYNTAX_NUMBER_DOT:Lcom/scaleasw/powercalc/Solver$Error;

    .line 144
    move-object/from16 v0, p0

    iput-object v12, v0, Lcom/scaleasw/powercalc/Solver;->lastErrorIndex:Ljava/lang/Integer;

    goto/16 :goto_1

    .line 148
    :cond_9
    const-wide v20, 0x3fb999999999999aL    # 0.1

    invoke-static/range {v20 .. v21}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double;

    move-result-object v11

    .line 149
    sget-object v18, Lcom/scaleasw/powercalc/Solver$NumberCompilerState;->DOT:Lcom/scaleasw/powercalc/Solver$NumberCompilerState;

    .line 151
    goto/16 :goto_1

    .line 153
    :pswitch_3
    sget-object v20, Lcom/scaleasw/powercalc/Solver$NumberCompilerState;->NUMBER:Lcom/scaleasw/powercalc/Solver$NumberCompilerState;

    move-object/from16 v0, v18

    move-object/from16 v1, v20

    invoke-virtual {v0, v1}, Lcom/scaleasw/powercalc/Solver$NumberCompilerState;->compareTo(Ljava/lang/Enum;)I

    move-result v20

    if-lez v20, :cond_a

    .line 154
    sget-object v9, Lcom/scaleasw/powercalc/Solver$Error;->SYNTAX_SYNTAX:Lcom/scaleasw/powercalc/Solver$Error;

    .line 155
    move-object/from16 v0, p0

    iput-object v12, v0, Lcom/scaleasw/powercalc/Solver;->lastErrorIndex:Ljava/lang/Integer;

    goto/16 :goto_1

    .line 158
    :cond_a
    sget-object v14, Lcom/scaleasw/powercalc/Solver$CalcMode;->MODE_HEX:Lcom/scaleasw/powercalc/Solver$CalcMode;

    .line 159
    sget-object v18, Lcom/scaleasw/powercalc/Solver$NumberCompilerState;->NUMBER:Lcom/scaleasw/powercalc/Solver$NumberCompilerState;

    .line 161
    goto/16 :goto_1

    .line 163
    :pswitch_4
    sget-object v20, Lcom/scaleasw/powercalc/Solver$NumberCompilerState;->NUMBER:Lcom/scaleasw/powercalc/Solver$NumberCompilerState;

    move-object/from16 v0, v18

    move-object/from16 v1, v20

    invoke-virtual {v0, v1}, Lcom/scaleasw/powercalc/Solver$NumberCompilerState;->compareTo(Ljava/lang/Enum;)I

    move-result v20

    if-lez v20, :cond_b

    .line 164
    sget-object v9, Lcom/scaleasw/powercalc/Solver$Error;->SYNTAX_SYNTAX:Lcom/scaleasw/powercalc/Solver$Error;

    .line 165
    move-object/from16 v0, p0

    iput-object v12, v0, Lcom/scaleasw/powercalc/Solver;->lastErrorIndex:Ljava/lang/Integer;

    goto/16 :goto_1

    .line 168
    :cond_b
    sget-object v14, Lcom/scaleasw/powercalc/Solver$CalcMode;->MODE_DEC:Lcom/scaleasw/powercalc/Solver$CalcMode;

    .line 169
    sget-object v18, Lcom/scaleasw/powercalc/Solver$NumberCompilerState;->NUMBER:Lcom/scaleasw/powercalc/Solver$NumberCompilerState;

    .line 171
    goto/16 :goto_1

    .line 173
    :pswitch_5
    sget-object v20, Lcom/scaleasw/powercalc/Solver$NumberCompilerState;->NUMBER:Lcom/scaleasw/powercalc/Solver$NumberCompilerState;

    move-object/from16 v0, v18

    move-object/from16 v1, v20

    invoke-virtual {v0, v1}, Lcom/scaleasw/powercalc/Solver$NumberCompilerState;->compareTo(Ljava/lang/Enum;)I

    move-result v20

    if-lez v20, :cond_c

    .line 174
    sget-object v9, Lcom/scaleasw/powercalc/Solver$Error;->SYNTAX_SYNTAX:Lcom/scaleasw/powercalc/Solver$Error;

    .line 175
    move-object/from16 v0, p0

    iput-object v12, v0, Lcom/scaleasw/powercalc/Solver;->lastErrorIndex:Ljava/lang/Integer;

    goto/16 :goto_1

    .line 178
    :cond_c
    sget-object v14, Lcom/scaleasw/powercalc/Solver$CalcMode;->MODE_BIN:Lcom/scaleasw/powercalc/Solver$CalcMode;

    .line 179
    sget-object v18, Lcom/scaleasw/powercalc/Solver$NumberCompilerState;->NUMBER:Lcom/scaleasw/powercalc/Solver$NumberCompilerState;

    .line 181
    goto/16 :goto_1

    .line 183
    :pswitch_6
    sget-object v20, Lcom/scaleasw/powercalc/Solver$NumberCompilerState;->NUMBER:Lcom/scaleasw/powercalc/Solver$NumberCompilerState;

    move-object/from16 v0, v18

    move-object/from16 v1, v20

    invoke-virtual {v0, v1}, Lcom/scaleasw/powercalc/Solver$NumberCompilerState;->compareTo(Ljava/lang/Enum;)I

    move-result v20

    if-lez v20, :cond_d

    .line 184
    sget-object v9, Lcom/scaleasw/powercalc/Solver$Error;->SYNTAX_SYNTAX:Lcom/scaleasw/powercalc/Solver$Error;

    .line 185
    move-object/from16 v0, p0

    iput-object v12, v0, Lcom/scaleasw/powercalc/Solver;->lastErrorIndex:Ljava/lang/Integer;

    goto/16 :goto_1

    .line 188
    :cond_d
    sget-object v14, Lcom/scaleasw/powercalc/Solver$CalcMode;->MODE_OCT:Lcom/scaleasw/powercalc/Solver$CalcMode;

    .line 189
    sget-object v18, Lcom/scaleasw/powercalc/Solver$NumberCompilerState;->NUMBER:Lcom/scaleasw/powercalc/Solver$NumberCompilerState;

    .line 191
    goto/16 :goto_1

    .line 209
    :pswitch_7
    const/16 v20, 0x0

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

    move-result-object v20

    const/16 v21, 0x0

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

    move-result-object v21

    const/16 v22, 0x0

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

    move-result-object v22

    move-object/from16 v0, v20

    move-object/from16 v1, v21

    move-object/from16 v2, v22

    invoke-virtual {v6, v0, v1, v2}, Lcom/scaleasw/powercalc/Element;->translation(Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;)Landroid/text/SpannableString;

    move-result-object v20

    invoke-virtual/range {v20 .. v20}, Landroid/text/SpannableString;->toString()Ljava/lang/String;

    move-result-object v20

    const/16 v21, 0x0

    invoke-virtual/range {v20 .. v21}, Ljava/lang/String;->charAt(I)C

    move-result v20

    invoke-static/range {v20 .. v20}, Ljava/lang/Character;->getNumericValue(C)I

    move-result v13

    .line 210
    .local v13, "number":I
    const/16 v20, 0x41

    invoke-static/range {v20 .. v20}, Ljava/lang/Character;->getNumericValue(C)I

    move-result v20

    move/from16 v0, v20

    if-lt v13, v0, :cond_f

    const/16 v20, 0x41

    invoke-static/range {v20 .. v20}, Ljava/lang/Character;->getNumericValue(C)I

    move-result v20

    sub-int v20, v13, v20

    add-int/lit8 v13, v20, 0xa

    .line 213
    :goto_4
    sget-object v20, Lcom/scaleasw/powercalc/Solver$NumberCompilerState;->EXPONENT:Lcom/scaleasw/powercalc/Solver$NumberCompilerState;

    move-object/from16 v0, v18

    move-object/from16 v1, v20

    invoke-virtual {v0, v1}, Lcom/scaleasw/powercalc/Solver$NumberCompilerState;->compareTo(Ljava/lang/Enum;)I

    move-result v20

    if-gez v20, :cond_19

    .line 215
    sget-object v20, Lcom/scaleasw/powercalc/Solver$NumberCompilerState;->DOT:Lcom/scaleasw/powercalc/Solver$NumberCompilerState;

    move-object/from16 v0, v18

    move-object/from16 v1, v20

    invoke-virtual {v0, v1}, Lcom/scaleasw/powercalc/Solver$NumberCompilerState;->compareTo(Ljava/lang/Enum;)I

    move-result v20

    if-gez v20, :cond_18

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

    move-object/from16 v0, v20

    if-ne v14, v0, :cond_10

    const/16 v20, 0x2

    move/from16 v0, v20

    if-lt v13, v0, :cond_10

    .line 219
    sget-object v9, Lcom/scaleasw/powercalc/Solver$Error;->SYNTAX_SYNTAX:Lcom/scaleasw/powercalc/Solver$Error;

    .line 220
    move-object/from16 v0, p0

    iput-object v12, v0, Lcom/scaleasw/powercalc/Solver;->lastErrorIndex:Ljava/lang/Integer;

    .line 232
    :cond_e
    :goto_5
    sget-object v20, Lcom/scaleasw/powercalc/Solver$NumberCompilerState;->IDDLE:Lcom/scaleasw/powercalc/Solver$NumberCompilerState;

    move-object/from16 v0, v18

    move-object/from16 v1, v20

    if-ne v0, v1, :cond_12

    .line 234
    int-to-double v0, v13

    move-wide/from16 v20, v0

    move-wide/from16 v0, v20

    move-object/from16 v2, v19

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

    .line 235
    int-to-long v0, v13

    move-wide/from16 v20, v0

    move-wide/from16 v0, v20

    move-object/from16 v2, v19

    iput-wide v0, v2, Lcom/scaleasw/powercalc/Complex;->radix:J

    .line 236
    sget-object v18, Lcom/scaleasw/powercalc/Solver$NumberCompilerState;->NUMBER:Lcom/scaleasw/powercalc/Solver$NumberCompilerState;

    goto/16 :goto_1

    .line 211
    :cond_f
    const/16 v20, 0x30

    invoke-static/range {v20 .. v20}, Ljava/lang/Character;->getNumericValue(C)I

    move-result v20

    sub-int v13, v13, v20

    goto :goto_4

    .line 222
    :cond_10
    sget-object v20, Lcom/scaleasw/powercalc/Solver$CalcMode;->MODE_OCT:Lcom/scaleasw/powercalc/Solver$CalcMode;

    move-object/from16 v0, v20

    if-ne v14, v0, :cond_11

    const/16 v20, 0x8

    move/from16 v0, v20

    if-lt v13, v0, :cond_11

    .line 223
    sget-object v9, Lcom/scaleasw/powercalc/Solver$Error;->SYNTAX_SYNTAX:Lcom/scaleasw/powercalc/Solver$Error;

    .line 224
    move-object/from16 v0, p0

    iput-object v12, v0, Lcom/scaleasw/powercalc/Solver;->lastErrorIndex:Ljava/lang/Integer;

    goto :goto_5

    .line 226
    :cond_11
    sget-object v20, Lcom/scaleasw/powercalc/Solver$CalcMode;->MODE_DEC:Lcom/scaleasw/powercalc/Solver$CalcMode;

    move-object/from16 v0, v20

    if-ne v14, v0, :cond_e

    const/16 v20, 0xa

    move/from16 v0, v20

    if-lt v13, v0, :cond_e

    .line 227
    sget-object v9, Lcom/scaleasw/powercalc/Solver$Error;->SYNTAX_SYNTAX:Lcom/scaleasw/powercalc/Solver$Error;

    .line 228
    move-object/from16 v0, p0

    iput-object v12, v0, Lcom/scaleasw/powercalc/Solver;->lastErrorIndex:Ljava/lang/Integer;

    goto :goto_5

    .line 238
    :cond_12
    sget-object v20, Lcom/scaleasw/powercalc/Solver$NumberCompilerState;->SIGN:Lcom/scaleasw/powercalc/Solver$NumberCompilerState;

    move-object/from16 v0, v18

    move-object/from16 v1, v20

    if-ne v0, v1, :cond_13

    .line 240
    int-to-double v0, v13

    move-wide/from16 v20, v0

    move-wide/from16 v0, v20

    neg-double v0, v0

    move-wide/from16 v20, v0

    move-wide/from16 v0, v20

    move-object/from16 v2, v19

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

    .line 241
    neg-int v0, v13

    move/from16 v20, v0

    move/from16 v0, v20

    int-to-long v0, v0

    move-wide/from16 v20, v0

    move-wide/from16 v0, v20

    move-object/from16 v2, v19

    iput-wide v0, v2, Lcom/scaleasw/powercalc/Complex;->radix:J

    .line 242
    sget-object v18, Lcom/scaleasw/powercalc/Solver$NumberCompilerState;->NUMBER:Lcom/scaleasw/powercalc/Solver$NumberCompilerState;

    goto/16 :goto_1

    .line 246
    :cond_13
    sget-object v20, Lcom/scaleasw/powercalc/Solver$CalcMode;->MODE_BIN:Lcom/scaleasw/powercalc/Solver$CalcMode;

    move-object/from16 v0, v20

    if-ne v14, v0, :cond_14

    move-object/from16 v0, v19

    iget-wide v0, v0, Lcom/scaleasw/powercalc/Complex;->radix:J

    move-wide/from16 v20, v0

    const-wide/16 v22, 0x2

    mul-long v20, v20, v22

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

    move-result v22

    mul-int v22, v22, v13

    move/from16 v0, v22

    int-to-long v0, v0

    move-wide/from16 v22, v0

    add-long v20, v20, v22

    move-wide/from16 v0, v20

    move-object/from16 v2, v19

    iput-wide v0, v2, Lcom/scaleasw/powercalc/Complex;->radix:J

    goto/16 :goto_1

    .line 247
    :cond_14
    sget-object v20, Lcom/scaleasw/powercalc/Solver$CalcMode;->MODE_OCT:Lcom/scaleasw/powercalc/Solver$CalcMode;

    move-object/from16 v0, v20

    if-ne v14, v0, :cond_15

    move-object/from16 v0, v19

    iget-wide v0, v0, Lcom/scaleasw/powercalc/Complex;->radix:J

    move-wide/from16 v20, v0

    const-wide/16 v22, 0x8

    mul-long v20, v20, v22

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

    move-result v22

    mul-int v22, v22, v13

    move/from16 v0, v22

    int-to-long v0, v0

    move-wide/from16 v22, v0

    add-long v20, v20, v22

    move-wide/from16 v0, v20

    move-object/from16 v2, v19

    iput-wide v0, v2, Lcom/scaleasw/powercalc/Complex;->radix:J

    goto/16 :goto_1

    .line 248
    :cond_15
    sget-object v20, Lcom/scaleasw/powercalc/Solver$CalcMode;->MODE_DEC:Lcom/scaleasw/powercalc/Solver$CalcMode;

    move-object/from16 v0, v20

    if-ne v14, v0, :cond_16

    move-object/from16 v0, v19

    iget-wide v0, v0, Lcom/scaleasw/powercalc/Complex;->radix:J

    move-wide/from16 v20, v0

    const-wide/16 v22, 0xa

    mul-long v20, v20, v22

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

    move-result v22

    mul-int v22, v22, v13

    move/from16 v0, v22

    int-to-long v0, v0

    move-wide/from16 v22, v0

    add-long v20, v20, v22

    move-wide/from16 v0, v20

    move-object/from16 v2, v19

    iput-wide v0, v2, Lcom/scaleasw/powercalc/Complex;->radix:J

    goto/16 :goto_1

    .line 249
    :cond_16
    sget-object v20, Lcom/scaleasw/powercalc/Solver$CalcMode;->MODE_HEX:Lcom/scaleasw/powercalc/Solver$CalcMode;

    move-object/from16 v0, v20

    if-ne v14, v0, :cond_17

    move-object/from16 v0, v19

    iget-wide v0, v0, Lcom/scaleasw/powercalc/Complex;->radix:J

    move-wide/from16 v20, v0

    const-wide/16 v22, 0x10

    mul-long v20, v20, v22

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

    move-result v22

    mul-int v22, v22, v13

    move/from16 v0, v22

    int-to-long v0, v0

    move-wide/from16 v22, v0

    add-long v20, v20, v22

    move-wide/from16 v0, v20

    move-object/from16 v2, v19

    iput-wide v0, v2, Lcom/scaleasw/powercalc/Complex;->radix:J

    goto/16 :goto_1

    .line 250
    :cond_17
    move-object/from16 v0, v19

    iget-wide v0, v0, Lcom/scaleasw/powercalc/Complex;->re:D

    move-wide/from16 v20, v0

    const-wide/high16 v22, 0x4024000000000000L    # 10.0

    mul-double v20, v20, v22

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

    move-result v22

    move/from16 v0, v22

    int-to-double v0, v0

    move-wide/from16 v22, v0

    int-to-double v0, v13

    move-wide/from16 v24, v0

    mul-double v22, v22, v24

    add-double v20, v20, v22

    move-wide/from16 v0, v20

    move-object/from16 v2, v19

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

    goto/16 :goto_1

    .line 256
    :cond_18
    move-object/from16 v0, v19

    iget-wide v0, v0, Lcom/scaleasw/powercalc/Complex;->re:D

    move-wide/from16 v20, v0

    invoke-virtual {v11}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v22

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

    move-result v24

    move/from16 v0, v24

    int-to-double v0, v0

    move-wide/from16 v24, v0

    mul-double v22, v22, v24

    int-to-double v0, v13

    move-wide/from16 v24, v0

    mul-double v22, v22, v24

    add-double v20, v20, v22

    move-wide/from16 v0, v20

    move-object/from16 v2, v19

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

    .line 257
    invoke-virtual {v11}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v20

    const-wide/high16 v22, 0x4024000000000000L    # 10.0

    div-double v20, v20, v22

    invoke-static/range {v20 .. v21}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double;

    move-result-object v11

    goto/16 :goto_1

    .line 262
    :cond_19
    sget-object v20, Lcom/scaleasw/powercalc/Solver$NumberCompilerState;->EXPONENT:Lcom/scaleasw/powercalc/Solver$NumberCompilerState;

    move-object/from16 v0, v18

    move-object/from16 v1, v20

    if-ne v0, v1, :cond_1a

    .line 264
    invoke-static {v13}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v7

    .line 265
    sget-object v18, Lcom/scaleasw/powercalc/Solver$NumberCompilerState;->EXPNUMBER:Lcom/scaleasw/powercalc/Solver$NumberCompilerState;

    goto/16 :goto_1

    .line 267
    :cond_1a
    sget-object v20, Lcom/scaleasw/powercalc/Solver$NumberCompilerState;->EXPSIGN:Lcom/scaleasw/powercalc/Solver$NumberCompilerState;

    move-object/from16 v0, v18

    move-object/from16 v1, v20

    if-ne v0, v1, :cond_1b

    .line 269
    neg-int v0, v13

    move/from16 v20, v0

    invoke-static/range {v20 .. v20}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v7

    .line 270
    sget-object v18, Lcom/scaleasw/powercalc/Solver$NumberCompilerState;->EXPNUMBER:Lcom/scaleasw/powercalc/Solver$NumberCompilerState;

    goto/16 :goto_1

    .line 274
    :cond_1b
    invoke-virtual {v7}, Ljava/lang/Integer;->intValue()I

    move-result v20

    mul-int/lit8 v20, v20, 0xa

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

    move-result v21

    mul-int v21, v21, v13

    add-int v20, v20, v21

    invoke-static/range {v20 .. v20}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v7

    .line 277
    goto/16 :goto_1

    .line 286
    .end local v13    # "number":I
    :cond_1c
    sget-object v20, Lcom/scaleasw/powercalc/Solver$NumberCompilerState;->SIGN:Lcom/scaleasw/powercalc/Solver$NumberCompilerState;

    move-object/from16 v0, v18

    move-object/from16 v1, v20

    if-ne v0, v1, :cond_1d

    .line 288
    sget-object v9, Lcom/scaleasw/powercalc/Solver$Error;->SYNTAX_NUMBER_SIGN:Lcom/scaleasw/powercalc/Solver$Error;

    .line 289
    move-object/from16 v0, p0

    iput-object v12, v0, Lcom/scaleasw/powercalc/Solver;->lastErrorIndex:Ljava/lang/Integer;

    goto/16 :goto_1

    .line 293
    :cond_1d
    const/16 v20, 0x0

    invoke-static/range {v20 .. v20}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v7

    .line 294
    const-wide/high16 v20, 0x3ff0000000000000L    # 1.0

    invoke-static/range {v20 .. v21}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double;

    move-result-object v11

    .line 295
    const/16 v20, 0x1

    invoke-static/range {v20 .. v20}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v17

    .line 296
    const-wide/16 v20, 0x0

    move-wide/from16 v0, v20

    move-object/from16 v2, v19

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

    .line 297
    const-wide/16 v20, 0x0

    move-wide/from16 v0, v20

    move-object/from16 v2, v19

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

    .line 298
    const/16 v20, 0x1

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

    move-result-object v15

    goto/16 :goto_1

    .line 309
    :cond_1e
    sget-object v20, Lcom/scaleasw/powercalc/Solver$NumberCompilerState;->SIGN:Lcom/scaleasw/powercalc/Solver$NumberCompilerState;

    move-object/from16 v0, v18

    move-object/from16 v1, v20

    if-ne v0, v1, :cond_3

    .line 311
    sget-object v9, Lcom/scaleasw/powercalc/Solver$Error;->SYNTAX_NUMBER_SIGN:Lcom/scaleasw/powercalc/Solver$Error;

    .line 312
    move-object/from16 v0, p0

    iput-object v12, v0, Lcom/scaleasw/powercalc/Solver;->lastErrorIndex:Ljava/lang/Integer;

    goto/16 :goto_2

    .line 326
    :cond_1f
    invoke-virtual {v7}, Ljava/lang/Integer;->intValue()I

    move-result v20

    if-lez v20, :cond_20

    const/4 v8, 0x0

    .local v8, "i":I
    :goto_6
    invoke-virtual {v7}, Ljava/lang/Integer;->intValue()I

    move-result v20

    move/from16 v0, v20

    if-ge v8, v0, :cond_21

    move-object/from16 v0, v19

    iget-wide v0, v0, Lcom/scaleasw/powercalc/Complex;->re:D

    move-wide/from16 v20, v0

    const-wide/high16 v22, 0x4024000000000000L    # 10.0

    mul-double v20, v20, v22

    move-wide/from16 v0, v20

    move-object/from16 v2, v19

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

    add-int/lit8 v8, v8, 0x1

    goto :goto_6

    .line 327
    .end local v8    # "i":I
    :cond_20
    invoke-virtual {v7}, Ljava/lang/Integer;->intValue()I

    move-result v8

    .restart local v8    # "i":I
    :goto_7
    if-gez v8, :cond_21

    move-object/from16 v0, v19

    iget-wide v0, v0, Lcom/scaleasw/powercalc/Complex;->re:D

    move-wide/from16 v20, v0

    const-wide/high16 v22, 0x4024000000000000L    # 10.0

    div-double v20, v20, v22

    move-wide/from16 v0, v20

    move-object/from16 v2, v19

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

    add-int/lit8 v8, v8, 0x1

    goto :goto_7

    .line 329
    .end local v8    # "i":I
    :cond_21
    sget-object v20, Lcom/scaleasw/powercalc/Solver$CalcMode;->MODE_FLOAT:Lcom/scaleasw/powercalc/Solver$CalcMode;

    move-object/from16 v0, v20

    if-eq v14, v0, :cond_22

    .line 332
    move-object/from16 v0, v19

    iget-wide v0, v0, Lcom/scaleasw/powercalc/Complex;->radix:J

    move-wide/from16 v20, v0

    move-object/from16 v0, p0

    iget v0, v0, Lcom/scaleasw/powercalc/Solver;->calcBits:I

    move/from16 v22, v0

    invoke-virtual/range {v19 .. v22}, Lcom/scaleasw/powercalc/Complex;->setRadix(JI)V

    .line 335
    :cond_22
    sget-object v20, Lcom/scaleasw/powercalc/FormalElement$FormalElementType;->NUMBER:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    const/16 v21, 0x0

    const/16 v22, 0x0

    move-object/from16 v0, p0

    move-object/from16 v1, v20

    move-object/from16 v2, v21

    move-object/from16 v3, v19

    move/from16 v4, v22

    invoke-direct {v0, v1, v2, v3, v4}, Lcom/scaleasw/powercalc/Solver;->addFormalElement(Lcom/scaleasw/powercalc/FormalElement$FormalElementType;Lcom/scaleasw/powercalc/Element;Lcom/scaleasw/powercalc/Complex;I)V

    .line 336
    sget-object v18, Lcom/scaleasw/powercalc/Solver$NumberCompilerState;->IDDLE:Lcom/scaleasw/powercalc/Solver$NumberCompilerState;

    .line 337
    const/16 v20, 0x0

    invoke-static/range {v20 .. v20}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v7

    .line 338
    const-wide/high16 v20, 0x3ff0000000000000L    # 1.0

    invoke-static/range {v20 .. v21}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double;

    move-result-object v11

    .line 339
    const/16 v20, 0x1

    invoke-static/range {v20 .. v20}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v17

    .line 340
    const-wide/16 v20, 0x0

    move-wide/from16 v0, v20

    move-object/from16 v2, v19

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

    .line 341
    const-wide/16 v20, 0x0

    move-wide/from16 v0, v20

    move-object/from16 v2, v19

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

    .line 342
    const-wide/16 v20, 0x0

    move-wide/from16 v0, v20

    move-object/from16 v2, v19

    iput-wide v0, v2, Lcom/scaleasw/powercalc/Complex;->radix:J

    .line 345
    :cond_23
    invoke-virtual {v15}, Ljava/lang/Boolean;->booleanValue()Z

    move-result v20

    if-eqz v20, :cond_24

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

    move-object/from16 v20, v0

    const/16 v21, 0x0

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

    move-result v22

    move-object/from16 v0, p0

    move-object/from16 v1, v20

    move-object/from16 v2, v21

    move/from16 v3, v22

    invoke-direct {v0, v1, v6, v2, v3}, Lcom/scaleasw/powercalc/Solver;->addFormalElement(Lcom/scaleasw/powercalc/FormalElement$FormalElementType;Lcom/scaleasw/powercalc/Element;Lcom/scaleasw/powercalc/Complex;I)V

    .line 349
    :cond_24
    sget-object v20, Lcom/scaleasw/powercalc/Solver$Error;->NONE:Lcom/scaleasw/powercalc/Solver$Error;

    move-object/from16 v0, v20

    if-eq v9, v0, :cond_26

    .end local v6    # "element":Lcom/scaleasw/powercalc/Element;
    .end local v15    # "saveElement":Ljava/lang/Boolean;
    .end local v16    # "saveNumber":Ljava/lang/Boolean;
    :cond_25
    move-object v10, v9

    .line 351
    .end local v9    # "lastError":Lcom/scaleasw/powercalc/Solver$Error;
    .restart local v10    # "lastError":Lcom/scaleasw/powercalc/Solver$Error;
    goto/16 :goto_3

    .line 77
    .end local v10    # "lastError":Lcom/scaleasw/powercalc/Solver$Error;
    .restart local v6    # "element":Lcom/scaleasw/powercalc/Element;
    .restart local v9    # "lastError":Lcom/scaleasw/powercalc/Solver$Error;
    .restart local v15    # "saveElement":Ljava/lang/Boolean;
    .restart local v16    # "saveNumber":Ljava/lang/Boolean;
    :cond_26
    invoke-virtual {v12}, Ljava/lang/Integer;->intValue()I

    move-result v20

    add-int/lit8 v20, v20, 0x1

    invoke-static/range {v20 .. v20}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v12

    goto/16 :goto_0

    .line 100
    :pswitch_data_0
    .packed-switch 0x1
        :pswitch_0
        :pswitch_1
        :pswitch_2
        :pswitch_3
        :pswitch_4
        :pswitch_5
        :pswitch_6
        :pswitch_7
        :pswitch_7
        :pswitch_7
        :pswitch_7
        :pswitch_7
        :pswitch_7
        :pswitch_7
        :pswitch_7
        :pswitch_7
        :pswitch_7
        :pswitch_7
        :pswitch_7
        :pswitch_7
        :pswitch_7
        :pswitch_7
        :pswitch_7
    .end packed-switch
.end method

.method private formalSyntaxCompile()Lcom/scaleasw/powercalc/Solver$Error;
    .locals 8

    .prologue
    .line 479
    sget-object v1, Lcom/scaleasw/powercalc/Solver$Error;->NONE:Lcom/scaleasw/powercalc/Solver$Error;

    .line 484
    .local v1, "lastError":Lcom/scaleasw/powercalc/Solver$Error;
    const/4 v5, 0x0

    .line 485
    .local v5, "previous":Lcom/scaleasw/powercalc/FormalElement;
    const/4 v2, 0x0

    .local v2, "n":I
    :goto_0
    iget-object v6, p0, Lcom/scaleasw/powercalc/Solver;->formalLine:Ljava/util/List;

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

    move-result v6

    if-ge v2, v6, :cond_6

    .line 487
    const/4 v6, 0x1

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

    move-result-object v4

    .line 489
    .local v4, "ok":Ljava/lang/Boolean;
    if-nez v2, :cond_1

    const/4 v5, 0x0

    .line 491
    :goto_1
    iget-object v6, p0, Lcom/scaleasw/powercalc/Solver;->formalLine:Ljava/util/List;

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

    move-result-object v0

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

    .line 492
    .local v0, "current":Lcom/scaleasw/powercalc/FormalElement;
    iget-object v6, p0, Lcom/scaleasw/powercalc/Solver;->formalLine:Ljava/util/List;

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

    move-result v6

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

    if-ne v2, v6, :cond_2

    const/4 v3, 0x0

    .line 496
    .local v3, "next":Lcom/scaleasw/powercalc/FormalElement;
    :goto_2
    invoke-virtual {v4}, Ljava/lang/Boolean;->booleanValue()Z

    move-result v6

    invoke-virtual {v0, v5}, Lcom/scaleasw/powercalc/FormalElement;->checkPreviousElement(Lcom/scaleasw/powercalc/FormalElement;)Ljava/lang/Boolean;

    move-result-object v7

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

    move-result v7

    and-int/2addr v6, v7

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

    move-result-object v4

    .line 498
    invoke-virtual {v4}, Ljava/lang/Boolean;->booleanValue()Z

    move-result v6

    if-nez v6, :cond_3

    .line 501
    invoke-virtual {v0, v5}, Lcom/scaleasw/powercalc/FormalElement;->checkPossiblePreviousMultiply(Lcom/scaleasw/powercalc/FormalElement;)Ljava/lang/Boolean;

    move-result-object v6

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

    move-result v6

    if-eqz v6, :cond_3

    .line 503
    new-instance v0, Lcom/scaleasw/powercalc/FormalElement;

    .end local v0    # "current":Lcom/scaleasw/powercalc/FormalElement;
    sget-object v6, Lcom/scaleasw/powercalc/FormalElement$FormalElementType;->OPERATOR:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    invoke-direct {v0, v6}, Lcom/scaleasw/powercalc/FormalElement;-><init>(Lcom/scaleasw/powercalc/FormalElement$FormalElementType;)V

    .line 504
    .restart local v0    # "current":Lcom/scaleasw/powercalc/FormalElement;
    sget-object v6, Lcom/scaleasw/powercalc/Element;->OMULT:Lcom/scaleasw/powercalc/Element;

    invoke-virtual {v0, v6}, Lcom/scaleasw/powercalc/FormalElement;->setElement(Lcom/scaleasw/powercalc/Element;)V

    .line 505
    iget-object v6, p0, Lcom/scaleasw/powercalc/Solver;->formalLine:Ljava/util/List;

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

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

    .line 506
    add-int/lit8 v2, v2, -0x2

    .line 485
    :cond_0
    :goto_3
    add-int/lit8 v2, v2, 0x1

    goto :goto_0

    .line 490
    .end local v0    # "current":Lcom/scaleasw/powercalc/FormalElement;
    .end local v3    # "next":Lcom/scaleasw/powercalc/FormalElement;
    :cond_1
    iget-object v6, p0, Lcom/scaleasw/powercalc/Solver;->formalLine:Ljava/util/List;

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

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

    move-result-object v5

    .end local v5    # "previous":Lcom/scaleasw/powercalc/FormalElement;
    check-cast v5, Lcom/scaleasw/powercalc/FormalElement;

    .restart local v5    # "previous":Lcom/scaleasw/powercalc/FormalElement;
    goto :goto_1

    .line 493
    .restart local v0    # "current":Lcom/scaleasw/powercalc/FormalElement;
    :cond_2
    iget-object v6, p0, Lcom/scaleasw/powercalc/Solver;->formalLine:Ljava/util/List;

    add-int/lit8 v7, v2, 0x1

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

    move-result-object v3

    check-cast v3, Lcom/scaleasw/powercalc/FormalElement;

    .restart local v3    # "next":Lcom/scaleasw/powercalc/FormalElement;
    goto :goto_2

    .line 512
    :cond_3
    invoke-virtual {v4}, Ljava/lang/Boolean;->booleanValue()Z

    move-result v6

    invoke-virtual {v0, v3}, Lcom/scaleasw/powercalc/FormalElement;->checkNextElement(Lcom/scaleasw/powercalc/FormalElement;)Ljava/lang/Boolean;

    move-result-object v7

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

    move-result v7

    and-int/2addr v6, v7

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

    move-result-object v4

    .line 514
    invoke-virtual {v4}, Ljava/lang/Boolean;->booleanValue()Z

    move-result v6

    if-nez v6, :cond_4

    .line 517
    invoke-virtual {v0, v3}, Lcom/scaleasw/powercalc/FormalElement;->checkPossibleNextMultiply(Lcom/scaleasw/powercalc/FormalElement;)Ljava/lang/Boolean;

    move-result-object v6

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

    move-result v6

    if-eqz v6, :cond_4

    .line 519
    new-instance v0, Lcom/scaleasw/powercalc/FormalElement;

    .end local v0    # "current":Lcom/scaleasw/powercalc/FormalElement;
    sget-object v6, Lcom/scaleasw/powercalc/FormalElement$FormalElementType;->OPERATOR:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    invoke-direct {v0, v6}, Lcom/scaleasw/powercalc/FormalElement;-><init>(Lcom/scaleasw/powercalc/FormalElement$FormalElementType;)V

    .line 520
    .restart local v0    # "current":Lcom/scaleasw/powercalc/FormalElement;
    sget-object v6, Lcom/scaleasw/powercalc/Element;->OMULT:Lcom/scaleasw/powercalc/Element;

    invoke-virtual {v0, v6}, Lcom/scaleasw/powercalc/FormalElement;->setElement(Lcom/scaleasw/powercalc/Element;)V

    .line 521
    iget-object v6, p0, Lcom/scaleasw/powercalc/Solver;->formalLine:Ljava/util/List;

    add-int/lit8 v7, v2, 0x1

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

    goto :goto_3

    .line 526
    :cond_4
    invoke-virtual {v4}, Ljava/lang/Boolean;->booleanValue()Z

    move-result v6

    if-nez v6, :cond_5

    .line 528
    sget-object v1, Lcom/scaleasw/powercalc/Solver$Error;->SYNTAX_SYNTAX:Lcom/scaleasw/powercalc/Solver$Error;

    .line 529
    iget v6, v0, Lcom/scaleasw/powercalc/FormalElement;->elementIndex:I

    invoke-static {v6}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v6

    iput-object v6, p0, Lcom/scaleasw/powercalc/Solver;->lastErrorIndex:Ljava/lang/Integer;

    .line 531
    :cond_5
    sget-object v6, Lcom/scaleasw/powercalc/Solver$Error;->NONE:Lcom/scaleasw/powercalc/Solver$Error;

    if-eq v1, v6, :cond_0

    .line 533
    .end local v0    # "current":Lcom/scaleasw/powercalc/FormalElement;
    .end local v3    # "next":Lcom/scaleasw/powercalc/FormalElement;
    .end local v4    # "ok":Ljava/lang/Boolean;
    :cond_6
    return-object v1
.end method

.method private solveConstant(Lcom/scaleasw/powercalc/Element;)Lcom/scaleasw/powercalc/Complex;
    .locals 4
    .param p1, "element"    # Lcom/scaleasw/powercalc/Element;

    .prologue
    const-wide/16 v2, 0x0

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

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

    .line 745
    .local v0, "result":Lcom/scaleasw/powercalc/Complex;
    sget-object v1, Lcom/scaleasw/powercalc/Solver$1;->$SwitchMap$com$scaleasw$powercalc$Element:[I

    invoke-virtual {p1}, Lcom/scaleasw/powercalc/Element;->ordinal()I

    move-result v2

    aget v1, v1, v2

    packed-switch v1, :pswitch_data_0

    .line 887
    :goto_0
    return-object v0

    .line 748
    :pswitch_0
    const-wide v2, 0x400921fb54442d18L    # Math.PI

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

    goto :goto_0

    .line 751
    :pswitch_1
    const-wide/high16 v2, 0x3ff0000000000000L    # 1.0

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

    goto :goto_0

    .line 754
    :pswitch_2
    const-wide v2, 0x41b1de784a000000L    # 2.99792458E8

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

    goto :goto_0

    .line 757
    :pswitch_3
    const-wide v2, 0x3eb515370f99f6cbL    # 1.2566370614359173E-6

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

    goto :goto_0

    .line 760
    :pswitch_4
    const-wide v2, 0x3da37876f14ded31L    # 8.85418781762039E-12

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

    goto :goto_0

    .line 763
    :pswitch_5
    const-wide v2, 0x3dd2584c222c163eL    # 6.67384E-11

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

    goto :goto_0

    .line 766
    :pswitch_6
    const-wide v2, 0x390b860bb596a559L    # 6.62606957E-34

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

    goto :goto_0

    .line 769
    :pswitch_7
    const-wide v2, 0x3c07a4da17f6b151L    # 1.602176565E-19

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

    goto :goto_0

    .line 772
    :pswitch_8
    const-wide v2, 0x3f7de3d42a279e69L    # 0.0072973525698

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

    goto :goto_0

    .line 775
    :pswitch_9
    const-wide v2, 0x3b30b0e6accdcc7eL    # 1.3806488E-23

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

    goto :goto_0

    .line 778
    :pswitch_a
    const-wide v2, 0x3e575ebec0ffac87L    # 2.17651E-8

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

    goto :goto_0

    .line 781
    :pswitch_b
    const-wide v2, 0x36f33c66e1f96793L    # 5.39106E-44

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

    goto :goto_0

    .line 784
    :pswitch_c
    const-wide v2, 0x38b57ba3e4e425aeL    # 1.616199E-35

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

    goto :goto_0

    .line 787
    :pswitch_d
    const-wide v2, 0x3c69a7ed39e826dbL    # 1.1126500560536187E-17

    invoke-static {v2, v3}, Ljava/lang/Math;->sqrt(D)D

    move-result-wide v2

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

    goto :goto_0

    .line 790
    :pswitch_e
    const-wide v2, 0x3ce2a0199a96f13fL    # 2.067833758E-15

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

    goto :goto_0

    .line 793
    :pswitch_f
    const-wide v2, 0x42fb7d4674167800L    # 4.8359787E14

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

    goto/16 :goto_0

    .line 796
    :pswitch_10
    const-wide v2, 0x40d93533ad271518L    # 25812.8074434

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

    goto/16 :goto_0

    .line 799
    :pswitch_11
    const-wide v2, 0x3f144fa80635f144L    # 7.7480917346E-5

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

    goto/16 :goto_0

    .line 802
    :pswitch_12
    const-wide v2, 0x3e6e714d2298d740L    # 5.670373E-8

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

    goto/16 :goto_0

    .line 805
    :pswitch_13
    const-wide v2, 0x3cbaf659a55f20c0L    # 3.74177153E-16

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

    goto/16 :goto_0

    .line 808
    :pswitch_14
    const-wide v2, 0x3f8d7755cce62233L    # 0.01438777

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

    goto/16 :goto_0

    .line 811
    :pswitch_15
    const-wide v2, 0x3f67bd118cd3093dL    # 0.0028977721

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

    goto/16 :goto_0

    .line 814
    :pswitch_16
    const-wide v2, 0x422b6039a6e00000L    # 5.8789254E10

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

    goto/16 :goto_0

    .line 817
    :pswitch_17
    const-wide v2, 0x4164ee44723178b3L    # 1.0973731568539E7

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

    goto/16 :goto_0

    .line 820
    :pswitch_18
    const-wide v2, 0x3c541b13dff88a81L    # 4.35974434E-18

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

    goto/16 :goto_0

    .line 823
    :pswitch_19
    const-wide v2, 0x3b266c557dfef89eL    # 9.27400968E-24

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

    goto/16 :goto_0

    .line 826
    :pswitch_1a
    const-wide v2, 0x3a7902a0f74b9b16L    # 5.05078353E-27

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

    goto/16 :goto_0

    .line 829
    :pswitch_1b
    const-wide v2, 0x3a6071f760bc4714L    # 1.660538921E-27

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

    goto/16 :goto_0

    .line 832
    :pswitch_1c
    const-wide v2, 0x44dfe185f96a931eL    # 6.02214129E23

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

    goto/16 :goto_0

    .line 835
    :pswitch_1d
    const-wide v2, 0x40f78e55624dd2f2L    # 96485.3365

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

    goto/16 :goto_0

    .line 838
    :pswitch_1e
    const-wide v2, 0x4020a1012d26a9b8L    # 8.3144621

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

    goto/16 :goto_0

    .line 841
    :pswitch_1f
    const-wide v2, 0x3f96f3afee22658eL    # 0.022413968

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

    goto/16 :goto_0

    .line 844
    :pswitch_20
    const-wide v2, 0x4536397aa0a6d831L    # 2.6867805E25

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

    goto/16 :goto_0

    .line 847
    :pswitch_21
    const-wide v2, 0x39b279dcadc7c7f1L    # 9.10938291E-31

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

    goto/16 :goto_0

    .line 850
    :pswitch_22
    const-wide v2, 0x3d855790a029cc65L    # 2.4263102389E-12

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

    goto/16 :goto_0

    .line 853
    :pswitch_23
    const-wide v2, 0x3ce961ba5e6296d8L    # 2.8179403267E-15

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

    goto/16 :goto_0

    .line 856
    :pswitch_24
    const-wide v2, 0x3a15151d9f99f9c0L    # 6.652458734E-29

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

    goto/16 :goto_0

    .line 859
    :pswitch_25
    const-wide v2, -0x44d98d025ec9bf53L    # -9.2847643E-24

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

    goto/16 :goto_0

    .line 862
    :pswitch_26
    const-wide v2, -0x3ffffb40043cf12bL    # -2.00231930436153

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

    goto/16 :goto_0

    .line 865
    :pswitch_27
    const-wide v2, 0x3a609099998b221eL    # 1.672621777E-27

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

    goto/16 :goto_0

    .line 868
    :pswitch_28
    const-wide v2, 0x3cd7cded675f5747L    # 1.32140985623E-15

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

    goto/16 :goto_0

    .line 871
    :pswitch_29
    const-wide v2, 0x3a60967200bb5cb8L    # 1.674927351E-27

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

    goto/16 :goto_0

    .line 874
    :pswitch_2a
    const-wide v2, 0x3cd7c589f7a3c9f6L    # 1.3195909068E-15

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

    goto/16 :goto_0

    .line 877
    :pswitch_2b
    const-wide v2, 0x4242a65501000000L    # 1.602E11

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

    goto/16 :goto_0

    .line 880
    :pswitch_2c
    const-wide v2, 0x3f515df6555c52e7L    # 0.00106

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

    goto/16 :goto_0

    .line 745
    :pswitch_data_0
    .packed-switch 0x1d
        :pswitch_0
        :pswitch_1
        :pswitch_2
        :pswitch_3
        :pswitch_4
        :pswitch_5
        :pswitch_6
        :pswitch_7
        :pswitch_8
        :pswitch_9
        :pswitch_a
        :pswitch_b
        :pswitch_c
        :pswitch_d
        :pswitch_e
        :pswitch_f
        :pswitch_10
        :pswitch_11
        :pswitch_12
        :pswitch_13
        :pswitch_14
        :pswitch_15
        :pswitch_16
        :pswitch_17
        :pswitch_18
        :pswitch_19
        :pswitch_1a
        :pswitch_1b
        :pswitch_1c
        :pswitch_1d
        :pswitch_1e
        :pswitch_1f
        :pswitch_20
        :pswitch_21
        :pswitch_22
        :pswitch_23
        :pswitch_24
        :pswitch_25
        :pswitch_26
        :pswitch_27
        :pswitch_28
        :pswitch_29
        :pswitch_2a
        :pswitch_2b
        :pswitch_2c
    .end packed-switch
.end method

.method private solveLevel(I)Lcom/scaleasw/powercalc/Solver$Error;
    .locals 13
    .param p1, "index"    # I

    .prologue
    const/4 v11, 0x1

    .line 961
    sget-object v4, Lcom/scaleasw/powercalc/Solver$Error;->NONE:Lcom/scaleasw/powercalc/Solver$Error;

    .line 962
    .local v4, "lastError":Lcom/scaleasw/powercalc/Solver$Error;
    iget-object v10, p0, Lcom/scaleasw/powercalc/Solver;->formalLine:Ljava/util/List;

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

    move-result v10

    add-int/lit8 v6, v10, -0x1

    .line 965
    .local v6, "maxIndex":I
    move v7, p1

    .local v7, "n":I
    :goto_0
    iget-object v10, p0, Lcom/scaleasw/powercalc/Solver;->formalLine:Ljava/util/List;

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

    move-result v10

    if-ge v7, v10, :cond_2

    .line 967
    iget-object v10, p0, Lcom/scaleasw/powercalc/Solver;->formalLine:Ljava/util/List;

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

    move-result-object v1

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

    .line 968
    .local v1, "element":Lcom/scaleasw/powercalc/FormalElement;
    iget-object v10, v1, Lcom/scaleasw/powercalc/FormalElement;->formalElementType:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    sget-object v12, Lcom/scaleasw/powercalc/FormalElement$FormalElementType;->SYMBOL:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    if-ne v10, v12, :cond_0

    .line 969
    iget-object v10, v1, Lcom/scaleasw/powercalc/FormalElement;->element:Lcom/scaleasw/powercalc/Element;

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

    if-ne v10, v12, :cond_1

    add-int/lit8 v10, v7, 0x1

    invoke-direct {p0, v10}, Lcom/scaleasw/powercalc/Solver;->solveLevel(I)Lcom/scaleasw/powercalc/Solver$Error;

    move-result-object v4

    .line 975
    :cond_0
    sget-object v10, Lcom/scaleasw/powercalc/Solver$Error;->NONE:Lcom/scaleasw/powercalc/Solver$Error;

    if-eq v4, v10, :cond_5

    move-object v5, v4

    .line 1185
    .end local v1    # "element":Lcom/scaleasw/powercalc/FormalElement;
    .end local v4    # "lastError":Lcom/scaleasw/powercalc/Solver$Error;
    .local v5, "lastError":Lcom/scaleasw/powercalc/Solver$Error;
    :goto_1
    return-object v5

    .line 970
    .end local v5    # "lastError":Lcom/scaleasw/powercalc/Solver$Error;
    .restart local v1    # "element":Lcom/scaleasw/powercalc/FormalElement;
    .restart local v4    # "lastError":Lcom/scaleasw/powercalc/Solver$Error;
    :cond_1
    iget-object v10, v1, Lcom/scaleasw/powercalc/FormalElement;->element:Lcom/scaleasw/powercalc/Element;

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

    if-ne v10, v12, :cond_0

    .line 971
    add-int/lit8 v6, v7, -0x1

    .line 978
    .end local v1    # "element":Lcom/scaleasw/powercalc/FormalElement;
    :cond_2
    iget-object v10, p0, Lcom/scaleasw/powercalc/Solver;->formalLine:Ljava/util/List;

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

    move-result v10

    if-lt v6, v10, :cond_3

    iget-object v10, p0, Lcom/scaleasw/powercalc/Solver;->formalLine:Ljava/util/List;

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

    move-result v10

    add-int/lit8 v6, v10, -0x1

    .line 981
    :cond_3
    move v7, p1

    :goto_2
    if-gt v7, v6, :cond_a

    .line 984
    if-nez v7, :cond_6

    const/4 v8, 0x0

    .line 987
    .local v8, "prev":Lcom/scaleasw/powercalc/FormalElement;
    :goto_3
    iget-object v10, p0, Lcom/scaleasw/powercalc/Solver;->formalLine:Ljava/util/List;

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

    move-result-object v1

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

    .line 988
    .restart local v1    # "element":Lcom/scaleasw/powercalc/FormalElement;
    iget-object v10, v1, Lcom/scaleasw/powercalc/FormalElement;->formalElementType:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    sget-object v12, Lcom/scaleasw/powercalc/FormalElement$FormalElementType;->CONSTANT:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    if-ne v10, v12, :cond_7

    .line 989
    iget-object v10, v1, Lcom/scaleasw/powercalc/FormalElement;->element:Lcom/scaleasw/powercalc/Element;

    invoke-direct {p0, v10}, Lcom/scaleasw/powercalc/Solver;->solveConstant(Lcom/scaleasw/powercalc/Element;)Lcom/scaleasw/powercalc/Complex;

    move-result-object v9

    .line 990
    .local v9, "value":Lcom/scaleasw/powercalc/Complex;
    new-instance v2, Lcom/scaleasw/powercalc/FormalElement;

    sget-object v10, Lcom/scaleasw/powercalc/FormalElement$FormalElementType;->NUMBER:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    invoke-direct {v2, v10}, Lcom/scaleasw/powercalc/FormalElement;-><init>(Lcom/scaleasw/powercalc/FormalElement$FormalElementType;)V

    .line 991
    .local v2, "formalElement":Lcom/scaleasw/powercalc/FormalElement;
    invoke-virtual {v2, v9}, Lcom/scaleasw/powercalc/FormalElement;->setValue(Lcom/scaleasw/powercalc/Complex;)V

    .line 992
    iget-object v10, p0, Lcom/scaleasw/powercalc/Solver;->formalLine:Ljava/util/List;

    invoke-interface {v10, v7, v2}, Ljava/util/List;->set(ILjava/lang/Object;)Ljava/lang/Object;

    .line 981
    .end local v2    # "formalElement":Lcom/scaleasw/powercalc/FormalElement;
    .end local v9    # "value":Lcom/scaleasw/powercalc/Complex;
    :cond_4
    :goto_4
    add-int/lit8 v7, v7, 0x1

    goto :goto_2

    .line 965
    .end local v8    # "prev":Lcom/scaleasw/powercalc/FormalElement;
    :cond_5
    add-int/lit8 v7, v7, 0x1

    goto :goto_0

    .line 985
    .end local v1    # "element":Lcom/scaleasw/powercalc/FormalElement;
    :cond_6
    iget-object v10, p0, Lcom/scaleasw/powercalc/Solver;->formalLine:Ljava/util/List;

    add-int/lit8 v12, v7, -0x1

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

    move-result-object v8

    check-cast v8, Lcom/scaleasw/powercalc/FormalElement;

    .restart local v8    # "prev":Lcom/scaleasw/powercalc/FormalElement;
    goto :goto_3

    .line 996
    .restart local v1    # "element":Lcom/scaleasw/powercalc/FormalElement;
    :cond_7
    iget-object v10, v1, Lcom/scaleasw/powercalc/FormalElement;->formalElementType:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    sget-object v12, Lcom/scaleasw/powercalc/FormalElement$FormalElementType;->MEMORY:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    if-ne v10, v12, :cond_4

    .line 997
    if-eqz v8, :cond_8

    iget-object v10, v8, Lcom/scaleasw/powercalc/FormalElement;->formalElementType:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

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

    if-ne v10, v12, :cond_9

    iget-object v10, v8, Lcom/scaleasw/powercalc/FormalElement;->element:Lcom/scaleasw/powercalc/Element;

    sget-object v12, Lcom/scaleasw/powercalc/Element;->ASTO:Lcom/scaleasw/powercalc/Element;

    if-ne v10, v12, :cond_9

    move v10, v11

    :goto_5
    if-nez v10, :cond_4

    .line 998
    :cond_8
    iget-object v10, v1, Lcom/scaleasw/powercalc/FormalElement;->element:Lcom/scaleasw/powercalc/Element;

    invoke-direct {p0, v10}, Lcom/scaleasw/powercalc/Solver;->solveMemory(Lcom/scaleasw/powercalc/Element;)Lcom/scaleasw/powercalc/Complex;

    move-result-object v9

    .line 999
    .restart local v9    # "value":Lcom/scaleasw/powercalc/Complex;
    new-instance v2, Lcom/scaleasw/powercalc/FormalElement;

    sget-object v10, Lcom/scaleasw/powercalc/FormalElement$FormalElementType;->NUMBER:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    invoke-direct {v2, v10}, Lcom/scaleasw/powercalc/FormalElement;-><init>(Lcom/scaleasw/powercalc/FormalElement$FormalElementType;)V

    .line 1000
    .restart local v2    # "formalElement":Lcom/scaleasw/powercalc/FormalElement;
    invoke-virtual {v2, v9}, Lcom/scaleasw/powercalc/FormalElement;->setValue(Lcom/scaleasw/powercalc/Complex;)V

    .line 1001
    iget-object v10, p0, Lcom/scaleasw/powercalc/Solver;->formalLine:Ljava/util/List;

    invoke-interface {v10, v7, v2}, Ljava/util/List;->set(ILjava/lang/Object;)Ljava/lang/Object;

    goto :goto_4

    .line 997
    .end local v2    # "formalElement":Lcom/scaleasw/powercalc/FormalElement;
    .end local v9    # "value":Lcom/scaleasw/powercalc/Complex;
    :cond_9
    const/4 v10, 0x0

    goto :goto_5

    .line 1008
    .end local v1    # "element":Lcom/scaleasw/powercalc/FormalElement;
    .end local v8    # "prev":Lcom/scaleasw/powercalc/FormalElement;
    :cond_a
    move v7, p1

    :goto_6
    if-gt v7, v6, :cond_b

    .line 1010
    iget-object v10, p0, Lcom/scaleasw/powercalc/Solver;->formalLine:Ljava/util/List;

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

    move-result-object v1

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

    .line 1011
    .restart local v1    # "element":Lcom/scaleasw/powercalc/FormalElement;
    iget-object v10, v1, Lcom/scaleasw/powercalc/FormalElement;->formalElementType:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    sget-object v12, Lcom/scaleasw/powercalc/FormalElement$FormalElementType;->SYMBOL:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    if-ne v10, v12, :cond_c

    iget-object v10, v1, Lcom/scaleasw/powercalc/FormalElement;->element:Lcom/scaleasw/powercalc/Element;

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

    if-ne v10, v12, :cond_c

    .line 1012
    add-int/lit8 v6, v7, -0x1

    .line 1027
    .end local v1    # "element":Lcom/scaleasw/powercalc/FormalElement;
    :cond_b
    sget-object v10, Lcom/scaleasw/powercalc/Solver$Error;->NONE:Lcom/scaleasw/powercalc/Solver$Error;

    if-eq v4, v10, :cond_10

    move-object v5, v4

    .end local v4    # "lastError":Lcom/scaleasw/powercalc/Solver$Error;
    .restart local v5    # "lastError":Lcom/scaleasw/powercalc/Solver$Error;
    goto/16 :goto_1

    .line 1015
    .end local v5    # "lastError":Lcom/scaleasw/powercalc/Solver$Error;
    .restart local v1    # "element":Lcom/scaleasw/powercalc/FormalElement;
    .restart local v4    # "lastError":Lcom/scaleasw/powercalc/Solver$Error;
    :cond_c
    iget-object v10, v1, Lcom/scaleasw/powercalc/FormalElement;->formalElementType:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

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

    if-eq v10, v12, :cond_d

    iget-object v10, v1, Lcom/scaleasw/powercalc/FormalElement;->formalElementType:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

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

    if-eq v10, v12, :cond_d

    iget-object v10, v1, Lcom/scaleasw/powercalc/FormalElement;->formalElementType:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    sget-object v12, Lcom/scaleasw/powercalc/FormalElement$FormalElementType;->FUNCTION_FA:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    if-ne v10, v12, :cond_f

    .line 1019
    :cond_d
    iget-object v10, p0, Lcom/scaleasw/powercalc/Solver;->functionSolver:Lcom/scaleasw/powercalc/FunctionSolver;

    invoke-virtual {v10, v7}, Lcom/scaleasw/powercalc/FunctionSolver;->solveFunction(I)Lcom/scaleasw/powercalc/Solver$Error;

    move-result-object v4

    .line 1020
    iget-object v10, p0, Lcom/scaleasw/powercalc/Solver;->formalLine:Ljava/util/List;

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

    move-result v10

    if-lt v6, v10, :cond_e

    iget-object v10, p0, Lcom/scaleasw/powercalc/Solver;->formalLine:Ljava/util/List;

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

    move-result v10

    add-int/lit8 v6, v10, -0x1

    .line 1021
    :cond_e
    iget-object v10, v1, Lcom/scaleasw/powercalc/FormalElement;->formalElementType:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

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

    if-ne v10, v12, :cond_f

    .line 1022
    if-lez v7, :cond_f

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

    .line 1024
    :cond_f
    sget-object v10, Lcom/scaleasw/powercalc/Solver$Error;->NONE:Lcom/scaleasw/powercalc/Solver$Error;

    if-ne v4, v10, :cond_b

    .line 1008
    add-int/lit8 v7, v7, 0x1

    goto :goto_6

    .line 1030
    .end local v1    # "element":Lcom/scaleasw/powercalc/FormalElement;
    :cond_10
    const/4 v3, 0x0

    .local v3, "i":I
    :goto_7
    const/4 v10, 0x6

    if-ge v3, v10, :cond_12

    .line 1032
    move v7, p1

    :goto_8
    if-gt v7, v6, :cond_11

    .line 1034
    iget-object v10, p0, Lcom/scaleasw/powercalc/Solver;->formalLine:Ljava/util/List;

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

    move-result-object v0

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

    .line 1035
    .local v0, "current":Lcom/scaleasw/powercalc/FormalElement;
    iget-object v10, v0, Lcom/scaleasw/powercalc/FormalElement;->formalElementType:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    sget-object v12, Lcom/scaleasw/powercalc/FormalElement$FormalElementType;->SYMBOL:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    if-ne v10, v12, :cond_13

    iget-object v10, v0, Lcom/scaleasw/powercalc/FormalElement;->element:Lcom/scaleasw/powercalc/Element;

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

    if-ne v10, v12, :cond_13

    .line 1036
    add-int/lit8 v6, v7, -0x1

    .line 1145
    .end local v0    # "current":Lcom/scaleasw/powercalc/FormalElement;
    :cond_11
    sget-object v10, Lcom/scaleasw/powercalc/Solver$Error;->NONE:Lcom/scaleasw/powercalc/Solver$Error;

    if-eq v4, v10, :cond_24

    .line 1148
    :cond_12
    sget-object v10, Lcom/scaleasw/powercalc/Solver$Error;->NONE:Lcom/scaleasw/powercalc/Solver$Error;

    if-eq v4, v10, :cond_25

    move-object v5, v4

    .end local v4    # "lastError":Lcom/scaleasw/powercalc/Solver$Error;
    .restart local v5    # "lastError":Lcom/scaleasw/powercalc/Solver$Error;
    goto/16 :goto_1

    .line 1039
    .end local v5    # "lastError":Lcom/scaleasw/powercalc/Solver$Error;
    .restart local v0    # "current":Lcom/scaleasw/powercalc/FormalElement;
    .restart local v4    # "lastError":Lcom/scaleasw/powercalc/Solver$Error;
    :cond_13
    iget-object v10, v0, Lcom/scaleasw/powercalc/FormalElement;->formalElementType:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

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

    if-ne v10, v12, :cond_22

    .line 1040
    packed-switch v3, :pswitch_data_0

    .line 1142
    :cond_14
    :goto_9
    iget-object v10, p0, Lcom/scaleasw/powercalc/Solver;->formalLine:Ljava/util/List;

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

    move-result v10

    if-lt v6, v10, :cond_15

    iget-object v10, p0, Lcom/scaleasw/powercalc/Solver;->formalLine:Ljava/util/List;

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

    move-result v10

    add-int/lit8 v6, v10, -0x1

    .line 1143
    :cond_15
    sget-object v10, Lcom/scaleasw/powercalc/Solver$Error;->NONE:Lcom/scaleasw/powercalc/Solver$Error;

    if-ne v4, v10, :cond_11

    .line 1032
    :goto_a
    add-int/lit8 v7, v7, 0x1

    goto :goto_8

    .line 1043
    :pswitch_0
    iget-object v10, v0, Lcom/scaleasw/powercalc/FormalElement;->element:Lcom/scaleasw/powercalc/Element;

    sget-object v12, Lcom/scaleasw/powercalc/Element;->OMULT:Lcom/scaleasw/powercalc/Element;

    if-ne v10, v12, :cond_16

    .line 1044
    iget-object v10, p0, Lcom/scaleasw/powercalc/Solver;->functionSolver:Lcom/scaleasw/powercalc/FunctionSolver;

    invoke-virtual {v10, v7}, Lcom/scaleasw/powercalc/FunctionSolver;->solveOperator(I)Lcom/scaleasw/powercalc/Solver$Error;

    move-result-object v4

    .line 1045
    add-int/lit8 v7, v7, -0x1

    goto :goto_9

    .line 1047
    :cond_16
    iget-object v10, v0, Lcom/scaleasw/powercalc/FormalElement;->element:Lcom/scaleasw/powercalc/Element;

    sget-object v12, Lcom/scaleasw/powercalc/Element;->ODIV:Lcom/scaleasw/powercalc/Element;

    if-ne v10, v12, :cond_17

    .line 1048
    iget-object v10, p0, Lcom/scaleasw/powercalc/Solver;->functionSolver:Lcom/scaleasw/powercalc/FunctionSolver;

    invoke-virtual {v10, v7}, Lcom/scaleasw/powercalc/FunctionSolver;->solveOperator(I)Lcom/scaleasw/powercalc/Solver$Error;

    move-result-object v4

    .line 1049
    add-int/lit8 v7, v7, -0x1

    goto :goto_9

    .line 1051
    :cond_17
    iget-object v10, v0, Lcom/scaleasw/powercalc/FormalElement;->element:Lcom/scaleasw/powercalc/Element;

    sget-object v12, Lcom/scaleasw/powercalc/Element;->OMOD:Lcom/scaleasw/powercalc/Element;

    if-ne v10, v12, :cond_14

    .line 1052
    iget-object v10, p0, Lcom/scaleasw/powercalc/Solver;->functionSolver:Lcom/scaleasw/powercalc/FunctionSolver;

    invoke-virtual {v10, v7}, Lcom/scaleasw/powercalc/FunctionSolver;->solveOperator(I)Lcom/scaleasw/powercalc/Solver$Error;

    move-result-object v4

    .line 1053
    add-int/lit8 v7, v7, -0x1

    goto :goto_9

    .line 1057
    :pswitch_1
    iget-object v10, v0, Lcom/scaleasw/powercalc/FormalElement;->element:Lcom/scaleasw/powercalc/Element;

    sget-object v12, Lcom/scaleasw/powercalc/Element;->OPLUS:Lcom/scaleasw/powercalc/Element;

    if-ne v10, v12, :cond_18

    .line 1058
    iget-object v10, p0, Lcom/scaleasw/powercalc/Solver;->functionSolver:Lcom/scaleasw/powercalc/FunctionSolver;

    invoke-virtual {v10, v7}, Lcom/scaleasw/powercalc/FunctionSolver;->solveOperator(I)Lcom/scaleasw/powercalc/Solver$Error;

    move-result-object v4

    .line 1059
    add-int/lit8 v7, v7, -0x1

    goto :goto_9

    .line 1061
    :cond_18
    iget-object v10, v0, Lcom/scaleasw/powercalc/FormalElement;->element:Lcom/scaleasw/powercalc/Element;

    sget-object v12, Lcom/scaleasw/powercalc/Element;->OMINUS:Lcom/scaleasw/powercalc/Element;

    if-ne v10, v12, :cond_14

    .line 1062
    iget-object v10, p0, Lcom/scaleasw/powercalc/Solver;->functionSolver:Lcom/scaleasw/powercalc/FunctionSolver;

    invoke-virtual {v10, v7}, Lcom/scaleasw/powercalc/FunctionSolver;->solveOperator(I)Lcom/scaleasw/powercalc/Solver$Error;

    move-result-object v4

    .line 1063
    add-int/lit8 v7, v7, -0x1

    goto :goto_9

    .line 1067
    :pswitch_2
    iget-object v10, v0, Lcom/scaleasw/powercalc/FormalElement;->element:Lcom/scaleasw/powercalc/Element;

    sget-object v12, Lcom/scaleasw/powercalc/Element;->OLSL:Lcom/scaleasw/powercalc/Element;

    if-ne v10, v12, :cond_19

    .line 1068
    iget-object v10, p0, Lcom/scaleasw/powercalc/Solver;->functionSolver:Lcom/scaleasw/powercalc/FunctionSolver;

    invoke-virtual {v10, v7}, Lcom/scaleasw/powercalc/FunctionSolver;->solveOperator(I)Lcom/scaleasw/powercalc/Solver$Error;

    move-result-object v4

    .line 1069
    add-int/lit8 v7, v7, -0x1

    goto :goto_9

    .line 1071
    :cond_19
    iget-object v10, v0, Lcom/scaleasw/powercalc/FormalElement;->element:Lcom/scaleasw/powercalc/Element;

    sget-object v12, Lcom/scaleasw/powercalc/Element;->OLSR:Lcom/scaleasw/powercalc/Element;

    if-ne v10, v12, :cond_1a

    .line 1072
    iget-object v10, p0, Lcom/scaleasw/powercalc/Solver;->functionSolver:Lcom/scaleasw/powercalc/FunctionSolver;

    invoke-virtual {v10, v7}, Lcom/scaleasw/powercalc/FunctionSolver;->solveOperator(I)Lcom/scaleasw/powercalc/Solver$Error;

    move-result-object v4

    .line 1073
    add-int/lit8 v7, v7, -0x1

    goto :goto_9

    .line 1075
    :cond_1a
    iget-object v10, v0, Lcom/scaleasw/powercalc/FormalElement;->element:Lcom/scaleasw/powercalc/Element;

    sget-object v12, Lcom/scaleasw/powercalc/Element;->OASL:Lcom/scaleasw/powercalc/Element;

    if-ne v10, v12, :cond_1b

    .line 1076
    iget-object v10, p0, Lcom/scaleasw/powercalc/Solver;->functionSolver:Lcom/scaleasw/powercalc/FunctionSolver;

    invoke-virtual {v10, v7}, Lcom/scaleasw/powercalc/FunctionSolver;->solveOperator(I)Lcom/scaleasw/powercalc/Solver$Error;

    move-result-object v4

    .line 1077
    add-int/lit8 v7, v7, -0x1

    goto/16 :goto_9

    .line 1079
    :cond_1b
    iget-object v10, v0, Lcom/scaleasw/powercalc/FormalElement;->element:Lcom/scaleasw/powercalc/Element;

    sget-object v12, Lcom/scaleasw/powercalc/Element;->OASR:Lcom/scaleasw/powercalc/Element;

    if-ne v10, v12, :cond_1c

    .line 1080
    iget-object v10, p0, Lcom/scaleasw/powercalc/Solver;->functionSolver:Lcom/scaleasw/powercalc/FunctionSolver;

    invoke-virtual {v10, v7}, Lcom/scaleasw/powercalc/FunctionSolver;->solveOperator(I)Lcom/scaleasw/powercalc/Solver$Error;

    move-result-object v4

    .line 1081
    add-int/lit8 v7, v7, -0x1

    goto/16 :goto_9

    .line 1083
    :cond_1c
    iget-object v10, v0, Lcom/scaleasw/powercalc/FormalElement;->element:Lcom/scaleasw/powercalc/Element;

    sget-object v12, Lcom/scaleasw/powercalc/Element;->OROL:Lcom/scaleasw/powercalc/Element;

    if-ne v10, v12, :cond_1d

    .line 1084
    iget-object v10, p0, Lcom/scaleasw/powercalc/Solver;->functionSolver:Lcom/scaleasw/powercalc/FunctionSolver;

    invoke-virtual {v10, v7}, Lcom/scaleasw/powercalc/FunctionSolver;->solveOperator(I)Lcom/scaleasw/powercalc/Solver$Error;

    move-result-object v4

    .line 1085
    add-int/lit8 v7, v7, -0x1

    goto/16 :goto_9

    .line 1087
    :cond_1d
    iget-object v10, v0, Lcom/scaleasw/powercalc/FormalElement;->element:Lcom/scaleasw/powercalc/Element;

    sget-object v12, Lcom/scaleasw/powercalc/Element;->OROR:Lcom/scaleasw/powercalc/Element;

    if-ne v10, v12, :cond_14

    .line 1088
    iget-object v10, p0, Lcom/scaleasw/powercalc/Solver;->functionSolver:Lcom/scaleasw/powercalc/FunctionSolver;

    invoke-virtual {v10, v7}, Lcom/scaleasw/powercalc/FunctionSolver;->solveOperator(I)Lcom/scaleasw/powercalc/Solver$Error;

    move-result-object v4

    .line 1089
    add-int/lit8 v7, v7, -0x1

    goto/16 :goto_9

    .line 1093
    :pswitch_3
    iget-object v10, v0, Lcom/scaleasw/powercalc/FormalElement;->element:Lcom/scaleasw/powercalc/Element;

    sget-object v12, Lcom/scaleasw/powercalc/Element;->OAND:Lcom/scaleasw/powercalc/Element;

    if-ne v10, v12, :cond_1e

    .line 1094
    iget-object v10, p0, Lcom/scaleasw/powercalc/Solver;->functionSolver:Lcom/scaleasw/powercalc/FunctionSolver;

    invoke-virtual {v10, v7}, Lcom/scaleasw/powercalc/FunctionSolver;->solveOperator(I)Lcom/scaleasw/powercalc/Solver$Error;

    move-result-object v4

    .line 1095
    add-int/lit8 v7, v7, -0x1

    goto/16 :goto_9

    .line 1097
    :cond_1e
    iget-object v10, v0, Lcom/scaleasw/powercalc/FormalElement;->element:Lcom/scaleasw/powercalc/Element;

    sget-object v12, Lcom/scaleasw/powercalc/Element;->ONAND:Lcom/scaleasw/powercalc/Element;

    if-ne v10, v12, :cond_14

    .line 1099
    iget-object v10, p0, Lcom/scaleasw/powercalc/Solver;->functionSolver:Lcom/scaleasw/powercalc/FunctionSolver;

    invoke-virtual {v10, v7}, Lcom/scaleasw/powercalc/FunctionSolver;->solveOperator(I)Lcom/scaleasw/powercalc/Solver$Error;

    move-result-object v4

    .line 1100
    add-int/lit8 v7, v7, -0x1

    goto/16 :goto_9

    .line 1104
    :pswitch_4
    iget-object v10, v0, Lcom/scaleasw/powercalc/FormalElement;->element:Lcom/scaleasw/powercalc/Element;

    sget-object v12, Lcom/scaleasw/powercalc/Element;->OXOR:Lcom/scaleasw/powercalc/Element;

    if-ne v10, v12, :cond_1f

    .line 1105
    iget-object v10, p0, Lcom/scaleasw/powercalc/Solver;->functionSolver:Lcom/scaleasw/powercalc/FunctionSolver;

    invoke-virtual {v10, v7}, Lcom/scaleasw/powercalc/FunctionSolver;->solveOperator(I)Lcom/scaleasw/powercalc/Solver$Error;

    move-result-object v4

    .line 1106
    add-int/lit8 v7, v7, -0x1

    goto/16 :goto_9

    .line 1108
    :cond_1f
    iget-object v10, v0, Lcom/scaleasw/powercalc/FormalElement;->element:Lcom/scaleasw/powercalc/Element;

    sget-object v12, Lcom/scaleasw/powercalc/Element;->OXNOR:Lcom/scaleasw/powercalc/Element;

    if-ne v10, v12, :cond_14

    .line 1110
    iget-object v10, p0, Lcom/scaleasw/powercalc/Solver;->functionSolver:Lcom/scaleasw/powercalc/FunctionSolver;

    invoke-virtual {v10, v7}, Lcom/scaleasw/powercalc/FunctionSolver;->solveOperator(I)Lcom/scaleasw/powercalc/Solver$Error;

    move-result-object v4

    .line 1111
    add-int/lit8 v7, v7, -0x1

    goto/16 :goto_9

    .line 1115
    :pswitch_5
    iget-object v10, v0, Lcom/scaleasw/powercalc/FormalElement;->element:Lcom/scaleasw/powercalc/Element;

    sget-object v12, Lcom/scaleasw/powercalc/Element;->OOR:Lcom/scaleasw/powercalc/Element;

    if-ne v10, v12, :cond_20

    .line 1116
    iget-object v10, p0, Lcom/scaleasw/powercalc/Solver;->functionSolver:Lcom/scaleasw/powercalc/FunctionSolver;

    invoke-virtual {v10, v7}, Lcom/scaleasw/powercalc/FunctionSolver;->solveOperator(I)Lcom/scaleasw/powercalc/Solver$Error;

    move-result-object v4

    .line 1117
    add-int/lit8 v7, v7, -0x1

    goto/16 :goto_9

    .line 1119
    :cond_20
    iget-object v10, v0, Lcom/scaleasw/powercalc/FormalElement;->element:Lcom/scaleasw/powercalc/Element;

    sget-object v12, Lcom/scaleasw/powercalc/Element;->ONOR:Lcom/scaleasw/powercalc/Element;

    if-ne v10, v12, :cond_21

    .line 1121
    iget-object v10, p0, Lcom/scaleasw/powercalc/Solver;->functionSolver:Lcom/scaleasw/powercalc/FunctionSolver;

    invoke-virtual {v10, v7}, Lcom/scaleasw/powercalc/FunctionSolver;->solveOperator(I)Lcom/scaleasw/powercalc/Solver$Error;

    move-result-object v4

    .line 1122
    add-int/lit8 v7, v7, -0x1

    goto/16 :goto_9

    .line 1124
    :cond_21
    iget-object v10, v0, Lcom/scaleasw/powercalc/FormalElement;->element:Lcom/scaleasw/powercalc/Element;

    sget-object v12, Lcom/scaleasw/powercalc/Element;->OREV:Lcom/scaleasw/powercalc/Element;

    if-ne v10, v12, :cond_14

    .line 1126
    iget-object v10, p0, Lcom/scaleasw/powercalc/Solver;->functionSolver:Lcom/scaleasw/powercalc/FunctionSolver;

    invoke-virtual {v10, v7}, Lcom/scaleasw/powercalc/FunctionSolver;->solveOperator(I)Lcom/scaleasw/powercalc/Solver$Error;

    move-result-object v4

    .line 1127
    add-int/lit8 v7, v7, -0x1

    goto/16 :goto_9

    .line 1132
    :cond_22
    iget-object v10, v0, Lcom/scaleasw/powercalc/FormalElement;->formalElementType:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

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

    if-ne v10, v12, :cond_14

    if-ne v3, v11, :cond_14

    .line 1133
    iget-object v10, p0, Lcom/scaleasw/powercalc/Solver;->functionSolver:Lcom/scaleasw/powercalc/FunctionSolver;

    invoke-virtual {v10, v7}, Lcom/scaleasw/powercalc/FunctionSolver;->solveOperatorAction(I)Lcom/scaleasw/powercalc/Solver$Error;

    move-result-object v4

    .line 1134
    if-nez v4, :cond_23

    .line 1136
    sget-object v4, Lcom/scaleasw/powercalc/Solver$Error;->NONE:Lcom/scaleasw/powercalc/Solver$Error;

    .line 1137
    goto/16 :goto_a

    .line 1139
    :cond_23
    add-int/lit8 v7, v7, -0x1

    .line 1140
    iget-object v10, p0, Lcom/scaleasw/powercalc/Solver;->formalLine:Ljava/util/List;

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

    move-result v10

    if-lt v6, v10, :cond_14

    iget-object v10, p0, Lcom/scaleasw/powercalc/Solver;->formalLine:Ljava/util/List;

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

    move-result v10

    add-int/lit8 v6, v10, -0x1

    goto/16 :goto_9

    .line 1030
    .end local v0    # "current":Lcom/scaleasw/powercalc/FormalElement;
    :cond_24
    add-int/lit8 v3, v3, 0x1

    goto/16 :goto_7

    .line 1151
    :cond_25
    move v7, p1

    :goto_b
    if-gt v7, v6, :cond_26

    .line 1153
    iget-object v10, p0, Lcom/scaleasw/powercalc/Solver;->formalLine:Ljava/util/List;

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

    move-result-object v1

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

    .line 1154
    .restart local v1    # "element":Lcom/scaleasw/powercalc/FormalElement;
    iget-object v10, v1, Lcom/scaleasw/powercalc/FormalElement;->formalElementType:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    sget-object v11, Lcom/scaleasw/powercalc/FormalElement$FormalElementType;->SYMBOL:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    if-ne v10, v11, :cond_2a

    iget-object v10, v1, Lcom/scaleasw/powercalc/FormalElement;->element:Lcom/scaleasw/powercalc/Element;

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

    if-ne v10, v11, :cond_2a

    .line 1155
    add-int/lit8 v6, v7, -0x1

    .line 1167
    .end local v1    # "element":Lcom/scaleasw/powercalc/FormalElement;
    :cond_26
    if-ge v6, p1, :cond_27

    .line 1169
    sget-object v4, Lcom/scaleasw/powercalc/Solver$Error;->SYNTAX_SYNTAX:Lcom/scaleasw/powercalc/Solver$Error;

    .line 1170
    invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v10

    iput-object v10, p0, Lcom/scaleasw/powercalc/Solver;->lastErrorIndex:Ljava/lang/Integer;

    .line 1173
    :cond_27
    if-lez p1, :cond_28

    .line 1174
    iget-object v10, p0, Lcom/scaleasw/powercalc/Solver;->formalLine:Ljava/util/List;

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

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

    move-result-object v1

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

    .line 1175
    .restart local v1    # "element":Lcom/scaleasw/powercalc/FormalElement;
    iget-object v10, v1, Lcom/scaleasw/powercalc/FormalElement;->formalElementType:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    sget-object v11, Lcom/scaleasw/powercalc/FormalElement$FormalElementType;->SYMBOL:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    if-ne v10, v11, :cond_28

    iget-object v10, v1, Lcom/scaleasw/powercalc/FormalElement;->element:Lcom/scaleasw/powercalc/Element;

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

    if-ne v10, v11, :cond_28

    .line 1176
    iget-object v10, p0, Lcom/scaleasw/powercalc/Solver;->formalLine:Ljava/util/List;

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

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

    .line 1179
    .end local v1    # "element":Lcom/scaleasw/powercalc/FormalElement;
    :cond_28
    iget-object v10, p0, Lcom/scaleasw/powercalc/Solver;->formalLine:Ljava/util/List;

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

    move-result v10

    if-ge v6, v10, :cond_29

    .line 1180
    iget-object v10, p0, Lcom/scaleasw/powercalc/Solver;->formalLine:Ljava/util/List;

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

    move-result-object v1

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

    .line 1181
    .restart local v1    # "element":Lcom/scaleasw/powercalc/FormalElement;
    iget-object v10, v1, Lcom/scaleasw/powercalc/FormalElement;->formalElementType:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    sget-object v11, Lcom/scaleasw/powercalc/FormalElement$FormalElementType;->SYMBOL:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

    if-ne v10, v11, :cond_29

    iget-object v10, v1, Lcom/scaleasw/powercalc/FormalElement;->element:Lcom/scaleasw/powercalc/Element;

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

    if-ne v10, v11, :cond_29

    .line 1182
    iget-object v10, p0, Lcom/scaleasw/powercalc/Solver;->formalLine:Ljava/util/List;

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

    .end local v1    # "element":Lcom/scaleasw/powercalc/FormalElement;
    :cond_29
    move-object v5, v4

    .line 1185
    .end local v4    # "lastError":Lcom/scaleasw/powercalc/Solver$Error;
    .restart local v5    # "lastError":Lcom/scaleasw/powercalc/Solver$Error;
    goto/16 :goto_1

    .line 1158
    .end local v5    # "lastError":Lcom/scaleasw/powercalc/Solver$Error;
    .restart local v1    # "element":Lcom/scaleasw/powercalc/FormalElement;
    .restart local v4    # "lastError":Lcom/scaleasw/powercalc/Solver$Error;
    :cond_2a
    iget-object v10, v1, Lcom/scaleasw/powercalc/FormalElement;->formalElementType:Lcom/scaleasw/powercalc/FormalElement$FormalElementType;

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

    if-ne v10, v11, :cond_2b

    .line 1160
    iget-object v10, p0, Lcom/scaleasw/powercalc/Solver;->functionSolver:Lcom/scaleasw/powercalc/FunctionSolver;

    invoke-virtual {v10, v7}, Lcom/scaleasw/powercalc/FunctionSolver;->solveAction(I)Lcom/scaleasw/powercalc/Solver$Error;

    move-result-object v4

    .line 1161
    iget-object v10, p0, Lcom/scaleasw/powercalc/Solver;->formalLine:Ljava/util/List;

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

    move-result v10

    if-lt v6, v10, :cond_2b

    iget-object v10, p0, Lcom/scaleasw/powercalc/Solver;->formalLine:Ljava/util/List;

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

    move-result v10

    add-int/lit8 v6, v10, -0x1

    .line 1163
    :cond_2b
    sget-object v10, Lcom/scaleasw/powercalc/Solver$Error;->NONE:Lcom/scaleasw/powercalc/Solver$Error;

    if-ne v4, v10, :cond_26

    .line 1151
    add-int/lit8 v7, v7, 0x1

    goto/16 :goto_b

    .line 1040
    nop

    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
        :pswitch_1
        :pswitch_2
        :pswitch_3
        :pswitch_4
        :pswitch_5
    .end packed-switch
.end method

.method private solveMemory(Lcom/scaleasw/powercalc/Element;)Lcom/scaleasw/powercalc/Complex;
    .locals 4
    .param p1, "element"    # Lcom/scaleasw/powercalc/Element;

    .prologue
    const-wide/16 v2, 0x0

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

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

    .line 894
    .local v0, "result":Lcom/scaleasw/powercalc/Complex;
    sget-object v1, Lcom/scaleasw/powercalc/Solver$1;->$SwitchMap$com$scaleasw$powercalc$Element:[I

    invoke-virtual {p1}, Lcom/scaleasw/powercalc/Element;->ordinal()I

    move-result v2

    aget v1, v1, v2

    packed-switch v1, :pswitch_data_0

    .line 922
    :goto_0
    return-object v0

    .line 897
    :pswitch_0
    iget-object v1, p0, Lcom/scaleasw/powercalc/Solver;->memoryAF:[Lcom/scaleasw/powercalc/Complex;

    const/4 v2, 0x0

    aget-object v1, v1, v2

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

    goto :goto_0

    .line 900
    :pswitch_1
    iget-object v1, p0, Lcom/scaleasw/powercalc/Solver;->memoryAF:[Lcom/scaleasw/powercalc/Complex;

    const/4 v2, 0x1

    aget-object v1, v1, v2

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

    goto :goto_0

    .line 903
    :pswitch_2
    iget-object v1, p0, Lcom/scaleasw/powercalc/Solver;->memoryAF:[Lcom/scaleasw/powercalc/Complex;

    const/4 v2, 0x2

    aget-object v1, v1, v2

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

    goto :goto_0

    .line 906
    :pswitch_3
    iget-object v1, p0, Lcom/scaleasw/powercalc/Solver;->memoryAF:[Lcom/scaleasw/powercalc/Complex;

    const/4 v2, 0x3

    aget-object v1, v1, v2

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

    goto :goto_0

    .line 909
    :pswitch_4
    iget-object v1, p0, Lcom/scaleasw/powercalc/Solver;->memoryAF:[Lcom/scaleasw/powercalc/Complex;

    const/4 v2, 0x4

    aget-object v1, v1, v2

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

    goto :goto_0

    .line 912
    :pswitch_5
    iget-object v1, p0, Lcom/scaleasw/powercalc/Solver;->memoryAF:[Lcom/scaleasw/powercalc/Complex;

    const/4 v2, 0x5

    aget-object v1, v1, v2

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

    goto :goto_0

    .line 915
    :pswitch_6
    iget-object v1, p0, Lcom/scaleasw/powercalc/Solver;->memoryM:Lcom/scaleasw/powercalc/Complex;

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

    goto :goto_0

    .line 918
    :pswitch_7
    iget-object v1, p0, Lcom/scaleasw/powercalc/Solver;->memoryANS:Lcom/scaleasw/powercalc/Complex;

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

    goto :goto_0

    .line 894
    nop

    :pswitch_data_0
    .packed-switch 0x4a
        :pswitch_0
        :pswitch_1
        :pswitch_2
        :pswitch_3
        :pswitch_4
        :pswitch_5
        :pswitch_6
        :pswitch_7
    .end packed-switch
.end method


# virtual methods
.method public getErrorString()Ljava/lang/String;
    .locals 3

    .prologue
    .line 1214
    sget-object v1, Lcom/scaleasw/powercalc/Solver$1;->$SwitchMap$com$scaleasw$powercalc$Solver$Error:[I

    iget-object v2, p0, Lcom/scaleasw/powercalc/Solver;->lastError:Lcom/scaleasw/powercalc/Solver$Error;

    invoke-virtual {v2}, Lcom/scaleasw/powercalc/Solver$Error;->ordinal()I

    move-result v2

    aget v1, v1, v2

    packed-switch v1, :pswitch_data_0

    .line 1259
    const-string v0, ""

    .line 1261
    .local v0, "result":Ljava/lang/String;
    :goto_0
    return-object v0

    .line 1217
    .end local v0    # "result":Ljava/lang/String;
    :pswitch_0
    const-string v0, "Error: \'-\' syntax error"

    .line 1218
    .restart local v0    # "result":Ljava/lang/String;
    goto :goto_0

    .line 1220
    .end local v0    # "result":Ljava/lang/String;
    :pswitch_1
    const-string v0, "Error: exonent syntax error"

    .line 1221
    .restart local v0    # "result":Ljava/lang/String;
    goto :goto_0

    .line 1223
    .end local v0    # "result":Ljava/lang/String;
    :pswitch_2
    const-string v0, "Error: \'.\' syntax error"

    .line 1224
    .restart local v0    # "result":Ljava/lang/String;
    goto :goto_0

    .line 1226
    .end local v0    # "result":Ljava/lang/String;
    :pswitch_3
    const-string v0, "Error: syntax error"

    .line 1227
    .restart local v0    # "result":Ljava/lang/String;
    goto :goto_0

    .line 1229
    .end local v0    # "result":Ljava/lang/String;
    :pswitch_4
    const-string v0, "Error: polar syntax error"

    .line 1230
    .restart local v0    # "result":Ljava/lang/String;
    goto :goto_0

    .line 1232
    .end local v0    # "result":Ljava/lang/String;
    :pswitch_5
    const-string v0, "Error: missing \')\'"

    .line 1233
    .restart local v0    # "result":Ljava/lang/String;
    goto :goto_0

    .line 1235
    .end local v0    # "result":Ljava/lang/String;
    :pswitch_6
    const-string v0, "Error: missing \'(\'"

    .line 1236
    .restart local v0    # "result":Ljava/lang/String;
    goto :goto_0

    .line 1238
    .end local v0    # "result":Ljava/lang/String;
    :pswitch_7
    const-string v0, "Error: memory symbol required"

    .line 1239
    .restart local v0    # "result":Ljava/lang/String;
    goto :goto_0

    .line 1241
    .end local v0    # "result":Ljava/lang/String;
    :pswitch_8
    const-string v0, "Error: Internal solver error"

    .line 1242
    .restart local v0    # "result":Ljava/lang/String;
    goto :goto_0

    .line 1244
    .end local v0    # "result":Ljava/lang/String;
    :pswitch_9
    const-string v0, "Error: Division by zero"

    .line 1245
    .restart local v0    # "result":Ljava/lang/String;
    goto :goto_0

    .line 1247
    .end local v0    # "result":Ljava/lang/String;
    :pswitch_a
    const-string v0, "Error: not a real number"

    .line 1248
    .restart local v0    # "result":Ljava/lang/String;
    goto :goto_0

    .line 1250
    .end local v0    # "result":Ljava/lang/String;
    :pswitch_b
    const-string v0, "Error: computation error"

    .line 1251
    .restart local v0    # "result":Ljava/lang/String;
    goto :goto_0

    .line 1253
    .end local v0    # "result":Ljava/lang/String;
    :pswitch_c
    const-string v0, "Error: infinity"

    .line 1254
    .restart local v0    # "result":Ljava/lang/String;
    goto :goto_0

    .line 1256
    .end local v0    # "result":Ljava/lang/String;
    :pswitch_d
    const-string v0, "Error: not available in free version"

    .line 1257
    .restart local v0    # "result":Ljava/lang/String;
    goto :goto_0

    .line 1214
    :pswitch_data_0
    .packed-switch 0x1
        :pswitch_0
        :pswitch_1
        :pswitch_2
        :pswitch_3
        :pswitch_4
        :pswitch_5
        :pswitch_6
        :pswitch_7
        :pswitch_8
        :pswitch_9
        :pswitch_a
        :pswitch_b
        :pswitch_c
        :pswitch_d
    .end packed-switch
.end method

.method public solve(Ljava/util/List;)Lcom/scaleasw/powercalc/Solver$Error;
    .locals 4
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List",
            "<",
            "Lcom/scaleasw/powercalc/Element;",
            ">;)",
            "Lcom/scaleasw/powercalc/Solver$Error;"
        }
    .end annotation

    .prologue
    .local p1, "line":Ljava/util/List;, "Ljava/util/List<Lcom/scaleasw/powercalc/Element;>;"
    const/4 v3, 0x0

    .line 1193
    iput-boolean v3, p0, Lcom/scaleasw/powercalc/Solver;->modeChange:Z

    .line 1194
    const/4 v1, -0x1

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    iput-object v1, p0, Lcom/scaleasw/powercalc/Solver;->lastErrorIndex:Ljava/lang/Integer;

    .line 1195
    iput-object p1, p0, Lcom/scaleasw/powercalc/Solver;->line:Ljava/util/List;

    .line 1196
    iget-object v1, p0, Lcom/scaleasw/powercalc/Solver;->formalLine:Ljava/util/List;

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

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

    move-result v1

    if-nez v1, :cond_0

    .line 1199
    sget-object v1, Lcom/scaleasw/powercalc/Element;->MANS:Lcom/scaleasw/powercalc/Element;

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

    .line 1202
    :cond_0
    invoke-direct {p0}, Lcom/scaleasw/powercalc/Solver;->formalCompile()Lcom/scaleasw/powercalc/Solver$Error;

    move-result-object v0

    .line 1203
    .local v0, "lastError":Lcom/scaleasw/powercalc/Solver$Error;
    sget-object v1, Lcom/scaleasw/powercalc/Solver$Error;->NONE:Lcom/scaleasw/powercalc/Solver$Error;

    if-ne v0, v1, :cond_1

    invoke-direct {p0, v3}, Lcom/scaleasw/powercalc/Solver;->solveLevel(I)Lcom/scaleasw/powercalc/Solver$Error;

    move-result-object v0

    .line 1204
    :cond_1
    sget-object v1, Lcom/scaleasw/powercalc/Solver$Error;->NONE:Lcom/scaleasw/powercalc/Solver$Error;

    if-ne v0, v1, :cond_2

    .line 1205
    iget-object v1, p0, Lcom/scaleasw/powercalc/Solver;->formalLine:Ljava/util/List;

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

    move-result v1

    const/4 v2, 0x1

    if-ne v1, v2, :cond_2

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

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

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

    move-result-object v1

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

    iget-object v1, v1, Lcom/scaleasw/powercalc/FormalElement;->value:Lcom/scaleasw/powercalc/Complex;

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

    .line 1207
    :cond_2
    iput-object v0, p0, Lcom/scaleasw/powercalc/Solver;->lastError:Lcom/scaleasw/powercalc/Solver$Error;

    .line 1208
    return-object v0
.end method

.method public storeMemory(Lcom/scaleasw/powercalc/Complex;Lcom/scaleasw/powercalc/Element;)V
    .locals 2
    .param p1, "value"    # Lcom/scaleasw/powercalc/Complex;
    .param p2, "element"    # Lcom/scaleasw/powercalc/Element;

    .prologue
    .line 928
    sget-object v0, Lcom/scaleasw/powercalc/Solver$1;->$SwitchMap$com$scaleasw$powercalc$Element:[I

    invoke-virtual {p2}, Lcom/scaleasw/powercalc/Element;->ordinal()I

    move-result v1

    aget v0, v0, v1

    packed-switch v0, :pswitch_data_0

    .line 956
    :goto_0
    return-void

    .line 931
    :pswitch_0
    iget-object v0, p0, Lcom/scaleasw/powercalc/Solver;->memoryAF:[Lcom/scaleasw/powercalc/Complex;

    const/4 v1, 0x0

    aget-object v0, v0, v1

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

    goto :goto_0

    .line 934
    :pswitch_1
    iget-object v0, p0, Lcom/scaleasw/powercalc/Solver;->memoryAF:[Lcom/scaleasw/powercalc/Complex;

    const/4 v1, 0x1

    aget-object v0, v0, v1

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

    goto :goto_0

    .line 937
    :pswitch_2
    iget-object v0, p0, Lcom/scaleasw/powercalc/Solver;->memoryAF:[Lcom/scaleasw/powercalc/Complex;

    const/4 v1, 0x2

    aget-object v0, v0, v1

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

    goto :goto_0

    .line 940
    :pswitch_3
    iget-object v0, p0, Lcom/scaleasw/powercalc/Solver;->memoryAF:[Lcom/scaleasw/powercalc/Complex;

    const/4 v1, 0x3

    aget-object v0, v0, v1

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

    goto :goto_0

    .line 943
    :pswitch_4
    iget-object v0, p0, Lcom/scaleasw/powercalc/Solver;->memoryAF:[Lcom/scaleasw/powercalc/Complex;

    const/4 v1, 0x4

    aget-object v0, v0, v1

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

    goto :goto_0

    .line 946
    :pswitch_5
    iget-object v0, p0, Lcom/scaleasw/powercalc/Solver;->memoryAF:[Lcom/scaleasw/powercalc/Complex;

    const/4 v1, 0x5

    aget-object v0, v0, v1

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

    goto :goto_0

    .line 949
    :pswitch_6
    iget-object v0, p0, Lcom/scaleasw/powercalc/Solver;->memoryM:Lcom/scaleasw/powercalc/Complex;

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

    goto :goto_0

    .line 952
    :pswitch_7
    iget-object v0, p0, Lcom/scaleasw/powercalc/Solver;->memoryANS:Lcom/scaleasw/powercalc/Complex;

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

    goto :goto_0

    .line 928
    :pswitch_data_0
    .packed-switch 0x4a
        :pswitch_0
        :pswitch_1
        :pswitch_2
        :pswitch_3
        :pswitch_4
        :pswitch_5
        :pswitch_6
        :pswitch_7
    .end packed-switch
.end method
