\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}

\let\if@tempswa\iffalse
\def\loop#1\repeat{\def\iterate{#1\relax\expandafter\iterate\fi}%
  \iterate \let\iterate\relax}

\begin{document}

\iffalse
Commented stuff
Another \ifstuff here \fi
\ifaa \else \fi
\ifasd \fi \f \fii
$ a \iff b $
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod
tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At
vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd
gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
\fi

\iffalse
Commented stuff
Another \ifstuff here \fi
\ifaa \else \fi
\ifasd \fi \f \fii
\else
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod
tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At
vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd
gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
\fi

\end{document}
