i got the solution.
The solution is on internet in the next links:
Thank Edward for your help!
It looks like you confuse between functions and blocks. It looks like what you call function0, function1 and functionX are in fact parts of the same function, and just different basic blocks within the function.
To your specific questions:
Nothing changes r0, r1, and r2 between 0x20.b function1 and 0x28.cmp r0 #1. So yes, they still hold the values from ...
Standalone LDC and STC instructions are almost never used in ARM binaries. They were used for a short time in early ARM ISA extensions:
FPA (Floating-point accelerator) used some variants of LDC/STC etc. to load and store data. IIRC they used coprocessor numbers 0/1/2. It used custom 48-bit floating point format and just a few processors were released that ...