# GCD of two numbers (they have to be in a0 and a1 and we perform no # check, for instance that they are positive). .global euclide euclide: beq a0, a1, end # while a ≠ b bge a0, a1, decra # if a > b subw a1, a1, a0 # b := b − a j euclide decra: subw a0, a0, a1 # a := a − b j euclide end: ret # Result will be in a0