Optimal FPGA Mapping and Retiming with Efficient Initial State Computation