Thanks for the proposition @razvan.lupusoru. It makes sense to me and this decomposition will help when translating to LLVM.
It was initially tried here https://github.com/flang-compiler/f18-llvm-project/pull/915 but having it earlier will make this legalization from FIR easier.