SAN FRANCISCO — A federal appeals court will decide whether to reinstate President Donald Trump’s travel ban after a contentious hearing in which the judges hammered away at the administration’s motivations for the ban, but also directed pointed questions to an attorney for two states trying to overturn it. It was unclear which way the three judges of the San Francisco-based 9th Circuit Court of Appeals would rule, though legal experts said the states appeared to have the edge. “I’m not sure if either side presented a compelling case, but I certainly thought the government’s case came across as weaker,” said Stephen Vladeck, a professor at the University of Texas School of Law.A ruling could come as early as Wednesday and could be appealed to the U.S. Supreme Court. Trump tweeted early Wednesday: “If the U.S. does not win this case as it so obviously should, we can never have the security and safety to which we are entitled. Politics!”The appeals court challenged the administration’s claim that the ban was motivated by terrorism fears, but it also questioned the argument of an attorney challenging the executive order on grounds that it unconstitutionally targeted Muslims.