This is pretty neat. The approach I was using would have involved multiple steps. it was something like first separate _1 and _2 reads
samtools view input.bam | awk '{if(and($2,0x40)){print > "file_1.sam"} else {print > "file_2.sam"};}'
then separating forward and reverse strand reads, then reverse complementing them, then filtering reads based on TLEN and merging everything back into one.
What cut-off do you want to set for TLEN?