the main issue is the weirdo memory mapping with extp imo, you have the stock code why not to use it?
extp/exts on DPP-covered memory areas are not necessary
also this code is super complicated, keep in mind this 24-40mhz beast has a limited resources

entry point of 8 instructions could be done with 3:
movb rl4, 08A45h ; 0x380A45 tmot
cmpb rl4, 07E79h ; 0x817E79 minimal tmot map i believe, original code uses exts here but its not necessary here as its at DPP page 0x205
jmpr cc_ule, loc_meow
moreover c167 doesnt have callee-saved registers which means.. uh.. lets say if register getting its value before call to your procedure and after that its value examined then you cannot touch it in your routine. stack could helps here but imo its always better to not touch the stack without a reason
no reason to use C here as it takes more time than just pure asm
also 380BB5 is a tsrldyn not a 'toggle'
Thank you for your response!
I "fixed" the reset timer i will test it one more time, if nothing, then ill use the asm! (and i will report if the main issue was extp (for now ill keep (cause compiler does it automatically) it to make sure))
About the
3 instructions instead of one, the compiler does this, i think if i tweak the settings it might produce better result, but you are totally right. (i want to use C, cause it's easier for me to customize the code in future)
good catch on tsrldyn, thanks ill update the comment!
Appreciate the help man, will update with results!