

.method huhu(a,b)
.var
n
x
.end-var
 
      BIPUSH 3
      ISTORE x       // x <- 3
      BIPUSH 1
      ISTORE n       // n <- 1
loop: ILOAD x
      BIPUSH 73
      IF_ICMPEQ  then    // vai a then se x=73
      ILOAD x
      ILOAD b
      ISUB
      ISTORE x
      GOTO check     // altrimenti x <-  (x - b)
then: LDCW objref
      ILOAD x
      BIPUSH 1
      IADD
      ILOAD b
      INVOKEVIRTUAL ohoh  // invoca ohoh con parametri x+1 e b
      ISTORE x            // x <- ohoh(x+1,b)
check:ILOAD n
      ILOAD a
      IFCMPEQ end         // confronta n ed a; se uguali vai ad end
      IINC n 1
      GOTO loop           // altrimenti incrementa n e ripeti il ciclo
end:  ILOAD x             // return x
      IRETURN
.end-method             



 
