This will totally fail for optimised code if it is just using object code without debug information.
There is no information in the resulting machine code that can indicate whether some code has been inlined or not.
Basically any optimisations performed by the compiler will throw this decompilation off.
I question whether you can get any real use out of this...