But Chief Judge Roger L. Gregory wrote that the government's "asserted national security interest ... appears to be a post hoc, secondary justification for an executive action rooted in religious animus and intended to bar Muslims from this country."