I found the other law the 9th mentioned,
1152. It never mentions religion. I
quote part of 1152 below.

Okay, at

https://www.youtube.com/watch?v=7GfzISGJo7Y

I listened to the arguments before the
Court of Appeals of the 9th Circuit.

The arguments mentioned both

8 U.S. Code § 1152 - Numerical
limitations on individual foreign states

as at

https://www.law.cornell.edu/uscode/text/8/1152

and

8 U.S. Code § 1182 - Inadmissible aliens

as at

https://www.law.cornell.edu/uscode/text/8/1182

Section (f) of 1182 has been quoted in
this case, including by me in this thread.

So to address one of your claims,

Q. Does 1152 limit, modify, constrain,
weaken section (f) of 1182?

A. Apparently a little: 1152 has in part:

> (A) Except as specifically provided in
paragraph (2) and in sections 1101(a)(27),
1151(b)(2)(A)(i), and 1153 of this title,
no person shall receive any preference or
priority or be discriminated against in
the issuance of an immigrant visa because
of the person’s race, sex, nationality,
place of birth, or place of residence.

But clearly the part of this law with
"nationality, place of birth, or place of
residence" is nonsense because just try to
get into the US if you are from North
Korea or Iran. Lots of luck! One of the
judges mentioned this point.

Next, if the US denies a Visa to a US
alien outside of the US based on some of
"race, sex, nationality, place of birth,
or place of residence", does that person
have standing to sue in the US courts?
I doubt it. Why not? The US Constitution
does not provide legal right to US aliens
outside of the US.

The law 1182 is mostly about the POTUS
protecting the US, and 1152 doesn't
restrict the POTUS from protecting the US
as in 1182.

The court kept asking if the POTUS could
block all Muslims?

Apparently 1152 and 1182 don't say he
can't. E.g., the POTUS might notice that
radical Islamic terrorism is a threat to
the US, that all radical Islamist
terrorists are Muslims, and that until he
can tell the difference between a safe
Muslim and a dangerous one he can block
them all.

Maybe the 9th Circuit would like to spend
a few years in legal cases on that point.

To help such a case, when some e-coli is
detected in a four ounce sample of 10 tons
of hamburger, we block all 10 tons.

In line with section (f) of 1182, The
POTUS might notice lots of evidence that
lots of Muslims believe that their
religion demands that they regard everyone
else as an infidel and kill or convert
them and, thus, admitted to the US would
be a risk to US national security. Or, a
violent religion is not just a religion
but is violent and can be banned from the
US because it is violent even though its
practitioners believe it is a religion.

The hearing had lots of wacko nonsense:

(1) E.g., suppose I'm in the burka
business; the Trump executive order (EO)
will reduce the number of Muslim customers
for my business; so, I have standing to
challenge the EO as harmful to my
business. The EO should be blocked until
we have a court case where I can show the
damages to my business.

Nonsense.

(2) The establishment clause is

> Congress shall make no law respecting an
establishment of religion, or prohibiting
the free exercise thereof;

So, in Yemen I create a new religion
that worships death for everyone else,
claim that the EO blocks my "free
exercise" of my religion in the US; thus
the EO should be struck down as
unconstitutional.

Gads.

(3) The judicial role is to say what the
law says.

So, each time the POTUS wants to use a
law, we need to have long legal cases to
question in court what the heck the law
means.

So, the POTUS can't use a law unless every
possible wacko objection to the law has
spent months in the courts and been struck
down.

So, we don't have any laws at all until,
one law at a time, the Judicial Branch has
their say, modifications, vetoes, etc.?

More nonsense.

(4) Can't just block all Muslim aliens
outside the US from entering the US
because, as mentioned in the hearing,
there is "religious motivation".

Nonsense.

The law 1182 says that he can block people
for reasons he "deems" .... That's darned
broad.

There is nothing in the US Constitution
that says that aliens outside the US have
rights, i.e., a right to have their
religion ignored when they want to enter
the US. Instead, both current practice,
e.g., keeping people from North Korea out
in spite of 1152, from 1182 and "deems"
the US can block immigrants on eye color,
ability to run a 100 yard dash, or
anything or nothing. Aliens outside the
US have zip, zilch, and zero rights under
the US Constitution.

Apparently the courts want to claim that
some huge range of legal cases can change
the meanings of all the laws passed by
Congress. There be monsters and chaos.
In that case, in general, the POTUS can't
do anything because anything he does might
hurt someone; for each POTUS action legal
cases could go on for years.

Nonsense.

Net, so far the most reasonable
explanation is that this whole EO case and
its appeal is a bunch of lawyers making a
mess just so that they can stick it to
Trump -- tie him up in endless legal
nonsense -- because they don't like him.

Maybe Trump's approach now is to have some
major fraction of all the best lawyers in
DC write him a new EO that not even the
9th Circuit dare question.