lua bytecode parser written in Rust using nom, part of metaworm's lua decompiler, support lua51/lua52/lua53/lua54/luajit/luau https://luadec.metaworm.site/
Thank you for your meticulous testing. I have fixed many issues you reported, but it has also introduced new problems. I need some more time to continue refining before I can release it.
When given the following script:
Metaworm's luadec generates the following result:
This only happens on Lua 5.1, where there are no instructions between JMP and TFORLOOP.