Fix the generation of function CIR