@target mips, mipt2

package main;

const (
    LIN  = 2
    COL  = 2
)
var (
    matrizA [LIN][COL]int 
)

func main() {
    var (
        aux = 0
        i = 1
    )
/**
FOR_OR_AND_AND_1:
    for i := 0; (((i < LIN || 1 == 1) && (i < LIN && 1 == 1)) && 1 == 1 ); i++ {
        //continue
        aux = aux + 10
        //break
    }
FOR_OR_AND_AND_OR:
    for i := 0; (((i < LIN || 1 == 1) && (i < LIN && 1 == 1)) || 1 == 1 ); i++ {
        //continue
        aux = aux + 10
        //break
    }

*/


SWITCH_1:

switch aux {
    case 1,3,5:
        aux = 10
    case 2:
        aux = 20
    default:
        aux = 30
}

SWITCH_2:
switch {
    case 1 == 3, 2 < 4:
        aux = 10
    case 2 == 2:
        aux = 20
    default:
        aux = 30
}

// if - if - else
if i == 1 && 1 == 1 {
   aux = 10

} else if i == 2 {
   aux = 20

}else {
   aux = 30
}



IF_01:
if (i < LIN) {
    aux = 10
}else {
    aux = 20
}

IF_02:
if (i < LIN || 1 == 1) {
    aux = 10
}else {
    aux = 20
}
IF_03:
if (i < LIN && 1 == 1) {
    aux = 10
}else {
    aux = 20
}

IF_04:
if ((i < LIN || 1 == 1) || (i < LIN || 1 == 1)) {
    aux = 10
}else {
    aux = 20
}

IF_05:
if ((i < LIN && 1 == 1) && (i < LIN && 1 == 1)) {
    aux = 10
}else {
    aux = 20
}

IF_06:
if ((i < LIN && 1 == 1) || (i < LIN && 1 == 1)) {
    aux = 10
}else {
    aux = 20
}

IF_07:
if ((i < LIN || 1 == 1) && (i < LIN || 1 == 1)) {
    aux = 10
}else {
    aux = 20
}

IF_08:
if ((i < LIN && 1 == 1) && (i < LIN || 1 == 1)) {
    aux = 10
}else {
    aux = 20
}

IF_09:
if ((i < LIN || 1 == 1) && (i < LIN && 1 == 1)) {
    aux = 10
}else {
    aux = 20
}

IF_10:
if ((i < LIN && 1 == 1) || (i < LIN || 1 == 1)) {
    aux = 10
}else {
    aux = 20
}

IF_11:
if ((i < LIN || 1 == 1) || (i < LIN && 1 == 1)) {
    aux = 10
}else {
    aux = 20
}
/** 
*/

/**
FOR_OR_AND_AND_1:
    for i := 0; ((i < LIN || 1 == 1) && (i < LIN && 1 == 1)); i++ {
        //continue
        aux = aux + 10
        //break
    }

FOR_AND_AND_OR_1:
    for i := 0; ((i < LIN && 1 == 1) && (i < LIN || 1 == 1)); i++ {
        //continue
        aux = aux + 10
        //break
    }

FOR_AND_OR_OR_1:
    for i := 0; ((i < LIN && 1 == 1) || (i < LIN || 1 == 1)); i++ {
        //continue
        aux = aux + 10
        //break
    }

FOR_OR_OR_AND_1:
    for i := 0; ((i < LIN || 1 == 1) || (i < LIN && 1 == 1)); i++ {
        //continue
        aux = aux + 10
        //break
    }
FOR_AND_OR_1:
    for i := 0; ((i < LIN || 1 == 1) && (i < LIN || 1 == 1)); i++ {
        //continue
        aux = aux + 10
        //break
    }
FOR_OR_AND_1:
    for i := 0; ((i < LIN && 1 == 1) || (i < LIN && 1 == 1)); i++ {
        //continue
        aux = aux + 10
        //break
    }

FOR_OR_1:
    for i := 0; ((i < LIN || 1 == 1) || (i < LIN || 1 == 1)); i++ {
        //continue
        aux = aux + 10
        //break
    }

FOR_OR_2:
    for i := 0; i < LIN || 1 == 1; i++ {
        //continue
        aux = aux + 10
        //break
    }

FOR_0:
    for i := 0; ((i < LIN && 1 == 1) && (i < LIN && 1 == 1)); i++ {
        //continue
        aux = aux + 10
        //break
    }

FOR_1:
    for i := 0; (i < LIN && 1 == 1); i++ {
        //continue
        aux = aux + 10
        //break
    }

FOR_2:

    for i := 0; (i < LIN || 1 == 1); i++ {
        //continue
        aux = aux + 10
        //break
    }

FOR_3:

    for i := 0; (i < LIN); i++ {
        //continue
        aux = aux + 10
        //break
    }

*/
}

/**

package main;

const (
    LIN  = 2
    COL  = 2
)
var (
    matrizA [LIN][COL]int 
    matrizB [LIN][COL]int
    matrizR [LIN][COL]int
)

func preenche(){
    var k = 1
    for i := 0; i < LIN ; i++ {
        for j := 0; j < COL ; j++ {
            matrizA[i][j] = k
            matrizB[i][j] = k
            k++
        }
    }
}

func multiplica() {
    var aux = 0
    for i := 0; i < LIN; i++ {
        for j := 0; j < COL; j++ {
            for k := 0; k < LIN; k++ {
                aux += matrizA[i][k] * matrizB[k][j]
            }
            matrizR[i][j] = aux
            aux = 0
        }
    }
}
func main() {
    preenche()
    multiplica()
}


*/
/**
package main;

const (
    LIN  = 2
    COL  = 2
)

type X struct {
    a int 
    b int 
    c int 
}

var (
    a [5][6]int
    matrixX [3]X
)

func atualiza(x,i int) {
    if (x == 1){
    //a[x][i].c = 1
//    a[x][i] = 1
        a[x][i] = 10
    } else {
        i = 1
    }
}

func atualiza2(x *int) int {
    *x = 10
    return 2
}

func main() int {
    x := 1
    i := 1
    
    var (
        varx X
    )

    i = atualiza2(y)
    //atualiza(x,i)

    //varx.c = 50
    //matrixX[i].c = 50

/*
Testados
IF_BASIC:
    if i < LIN  {
        x = 10
    }


IF_ANDOR:

    if (i < LIN && true) || 1 == 1 {
        x = 10
    } else {
        x = 20
    }

*/
/*
IF_ORAND:
    if (i < LIN || true) && 1 == 1 {
        x = 10
    } else {
        x = 20
    }

IF_ANDOR_R:

    if 1 == 1  || (i < LIN && true){
        x = 10
    } else {
        x = 20
    }

IF_ORAND_R:
    if 1 == 1 && (i < LIN || true) {
        x = 10
    } else {
        x = 20
    }

IF_OROR:

    if (i < LIN || true) || 1 == 1 {
        x = 10
    } else {
        x = 20
    }

IF_ANDAND:
    if (i < LIN && true) && 1 == 1 {
        x = 10
    } else {
        x = 20
    }

IF_OROR_R:

    if 1 == 1 || (i < LIN || true){
        x = 10
    } else {
        x = 20
    }

IF_ANDAND_R:
    if  1 == 1||(i < LIN && true) {
        x = 10
    } else {
        x = 20
    }

IF_ORANDOR:
    if (i < LIN || true) && (1 == 1 || 2==2) {
        x = 10
    } else {
        x = 20
    }


IF_ANDORAND_0:
    if (i < LIN || true) || (1 == 1 || 2 == 2 ) {
        x = 10
    } else {
        x = 20
    }

IF_ANDORAND_1:
    if (i < LIN && true) || (1 == 1 || 2==2) {
        x = 10
    } else {
        x = 20
    }

IF_ANDORAND_2:
    if (i < LIN || true) || (1 == 1 && 2 == 2 ) {
        x = 10
    } else {
        x = 20
    }

IF_ANDORAND_10:
    if (i < LIN && true) || 2==2 {
        x = 10
    } else {
        x = 20
    }
IF_ANDORAND_11:
    if 2==2 || (i < LIN && true) {
        x = 10
    } else {
        x = 20
    }
    return x
*/

