This is why LLM written code is often more verbose than human written code. All of those seemingly unnecessary comments everywhere, the excessively descriptive function names, the way everything is broken down into a seemingly excessive number of logical blocks: This is all helpful to the LLM for understanding the code.
AI image manipulation tools use the image as context just like text tools use text for context.
You can get an LLM to modify assembly if there’s enough context about what it’s doing, what the input means, what the output means, and so on provided manually.
A chunk of assembly by itself is missing a lot of context that is naturally embedded in higher level programming languages, though. Like variable names.
The difficulty with Assembly is local reasoning, like register allocations (which was particularly annoying when we had few registers, some of which were specialised) and jump targets, which doesn't require a lot of context, but is still tedious compared to C. Global reasoning is pretty much identical to C.