How to handle false FIR

Dear All, I loved a girl from 2018 to 2020 and she too acted that she also loved me both age is 28 yrs(both are unmarried)I spend around 3-5 Lakhs on her incl gifts.Till 2021 Mar everything gone well. In Mar 2021 she blackmailed to me to marry or she will file a 376 case on me.As I am afraid I just tied a yellow thread along with Yellow horn and both exchanged the plastic garlands in a car. In Sep 2021 I had taken his phone and seen some vulgar pics of unknown boy and she even made pregnant with that boy. So from that day i started avoiding her she called to my parents,friends,office people and all idiots supported her. Se had filed an false 376 case and she ran away from my city. I was arrested and send to remand.After that i came out on bail after 14 days of remand. I lost my govt job,I lost my family relations,mental tensions,Health of mine damaged,All people in society are seeing that I am a big rapist.,She took gold ,money,my phone,etc from my parents stating those are mine. Now police are filling the charge sheet,Is there any sort of possibility to remove 376 section in FIR(In complaint/FIR she mentions as in living relation and later we got married she doesn't mention as rape at any point )? if i apply for quash in AP high court how much time it will take? If girl comes for compromise, without her vising the high court for quash.If she signs affidavit stating and accepting her mistake is it sufficient without attending the court ?? If affidavit is ok then what i need to mention in affidavit so that I can file a reverse case after quash. If quash is successful ,there any way to file a case against her and keep her behind the bars? Plz advice me......