SMT x86_64 TSO model checking and minimum fence synthesis