Unfortunately, if you get laid off while in L-1B status before you are able to file an I-485 application, which is the last step in the green card process, you would need get no benefit from the PERM/green card process and would need to take an action within 60 days of the end of your employment to be able to remain in the U.S., by filing some type of application with USCIS. PERM processing is still really slow, over a year, but I'm seeing some indications that this might improve.