% The asymptote run replaces the .aux file with an empty one.
% This is probably a bug in asymptote.
\documentclass{article}
\usepackage{asymptote}
\begin{document}
See section~\ref{sec:foo}.
\begin{asy}
  import graph;
  draw ((0,0)--(100,100));
  axes ();
\end{asy}
\section{Foo}
\label{sec:foo}
\end{document}
