main_logic_ctr