I don't understand why we'd want to remove an abstract C function, and replace it with a bunch of inline assembly that looks like it has a lot of redundancy here.

As a general rule, you want to stick to C as much as possible, and minimize assembly.