If you lose the job you have one month notice period during which you can arrange for NOC and visa transfer. You will have to find a new sponsor for your visa. This new sponsor can be a new Employer or a Manpower company.
If you have a new Employer, its straight forward. But, if you transfer to a Manpower company then you have to speak with them about their fees and renewal costs each year.
Note that this manpower company may belong to a Qatari who might never give you NOC if you ever find a new Job.
Measure your risks properly and take calculated steps.
You can get Free visa from Manpower companies, but, you will have to exit and come back on new visa.
You can start by asking the typing centers to arrange for your new visa.
Wish you best of efforts.