Move code to core_max_pool.c