  Using methods from soft-collinear and heavy-quark effective theory, a
systematic factorization analysis is performed for the $\bar B\to X_s\gamma$
photon spectrum in the endpoint region $m_b-2E_\gamma={\cal O}(\Lambda_{\rm
QCD})$. It is proposed that, to all orders in $1/m_b$, the spectrum obeys a
novel factorization formula, which besides terms with the structure
$H\,J\otimes S$ familiar from inclusive $\bar B\to X_u l\,\bar\nu$ decay
distributions contains "resolved photon" contributions of the form $H\,J\otimes
S\otimes\bar J$ and $H\,J\otimes S\otimes\bar J\otimes\bar J$. Here $S$ and
$\bar J$ are new soft and jet functions, whose form is derived. These
contributions arise whenever the photon couples to light partons instead of
coupling directly to the effective weak interaction. The new contributions
appear first at order $1/m_b$ and are related to operators other than
$Q_{7\gamma}$ in the effective weak Hamiltonian. They give rise to
non-vanishing $1/m_b$ corrections to the total decay rate, which cannot be
described using a local operator product expansion. A systematic analysis of
these effects is performed at tree level in hard and hard-collinear
interactions. The resulting uncertainty on the decay rate defined with a cut
$E_\gamma>1.6$ GeV is estimated to be approximately $\pm 5%$. It could be
reduced by an improved measurement of the isospin asymmetry $\Delta_{0-}$ to
the level of $\pm 4%$. We see no possibility to reduce this uncertainty further
using reliable theoretical methods.
