I am shocked how readable the code is. Was expecting some Perl-like spaghetti.
I found this snippet on stackexchange showing how exactly that is possible on Linux.
> echo hello | gawk '!length{exit(0)} {print; print substr($0,2) >"/dev/fd/3"; fflush()}' 3>/dev/fd/0
This "renders" on stdout then feeds itself more input on /dev/fd/3.