BatchSolve: A Divide and Conquer Approach to Solving the Memory Ordering Problem