Convert C program into assembly code

How exactly do I convert this C program into assembly code? I am having a hard time understanding this process or how to even start it. I am new to this. Any help would be appreciated!

while(a!=b){
     if(a > b){
        a = a - b;
       }
        else{
          b = b - a;
    }
  }
   return a;
   }

Side Note: Assume two positive integers a and b are already given in register R0 and R1.
Can you leave comments explaining how you did it?

Leave a Comment