I feel like we've probably had this discussion before, but do you see any place for assert()?
I think it's fine in programs like vkd3d-compiler, vkd3d-dxbc, or the demos. I generally don't think assert() is appropriate in libraries like libvkd3d or libvkd3d-shader, no.
shader_sm1_read_semantic(sm1, &p, &ins->declaration.semantic); + /* DCL has two source parameters, but they seem to be + * unused. We ignore them. */ + ins->src_count = 0;
They're not source parameters. These are the "usage_token" and "dst_token" read by shader_sm1_read_semantic(). src_count is set to 2 in order to make shader_sm1_skip_opcode() do the right thing for 1.x shaders, but arguably that function has outlived its usefulness.
I think setting src_count to 0 like this is fine if the comment is updated, but I wouldn't be opposed to instead setting src_count to 0 in the opcode info tables and adjusting sm1->ptr in either shader_sm1_skip_opcode() or shader_sm1_read_semantic() either.