I don't know which gcc version you use and how it behaves, but I doubt this will work.
What are you trying to achieve with these global register definitions?
Code:
register int outdata __asm("a4");
register z_streamp instream __asm("a5");
register int flush __asm("a6");
I'm not sure what will happen here. Probably gcc will allocate these three registers for all functions with these variables, degrading code quality.
And there is no "flush" argument in the assembler implementation of inflate(). Do you know what "flush" is doing? A6 is used for an (optional) alternative stack area, AFAIK, but only when you define the appropriate symbol (it is not used by default).