Someone once had an assignment to help with writing assembler. So they had to write C code with only gotoand simple if statements (no elseif or else). Once you have that, it 's relatively easy to convert to your assembler of choice.
I also suggest breaking down the pseudo code even further, especially the function calls.
PS It the end of my lunch time, so I probably won't be able to reply.