Comment by flutas

9 months ago

I manually pre-parsed the bytecode file with awk into a bazillion individual files that were each just one function, and gave it the hint to grep to sort through them. This was all done in Cursor.

    awk '/^=> \[Function #/ {           
        if (out) close(out);
        fn = $0; sub(/^.*#/, "", fn); sub(/ .*/, "", fn);
        out = "function_" fn ".txt"
    }
    { if (out) print > out }' bundle.hasm

Quick example of the output it gave and it's process.

https://i.imgur.com/Cmg4KK1.png

https://i.imgur.com/ApNxUkB.png