save_current_input: the branch uses this function to save the current input