Nesting - two nawk into one nawk

hi people;

this is my two awk code:

nawk '/cell[0-9]+-/{r=(NF==8) ? $4FS$5FS$6 : NF==7 ? $4FS$5 : $4 ;c=split(r,rr);for (i=1;i<=c;i++){if(rr != "111111"){printf($3" %d ""\n",(i+3))}}printf("")}' /home/gc_sw/str.txt > /home/gc_sw/predwn.txt 

nawk -F'[-/ ]*' '{gsub(/ *$/,"")}$0=$1$($NF-2)' /home/gc_sw/predwn.txt > /home/gc_sw/down.txt

and the error is:

nawk: syntax error at source line 1
 context is
        {gsub(/ *$/,"")}run >>>  gc_sw/down. <<< txt=$1$($NF-2)
nawk: bailing out at source line 1

in the error the red part is not same as my second original code. instead of red part, there should be $0. $0 is assigned to something and it is being used there. i think the variables are inside each other. how can i make these two nawks nested?

Post your input file and the conditions to get the desired output.

it's quite complex and hard to understand. it's also impossible for me to implement desired output in another way.. the problem is; when those "nawk" commands are applied after each other, the $0 variable is set to another nawk command? this is too strange. is there any way to implement it in a way?