\begin{picture}(382,233)(21,9)
  \gasset{Nadjust=n}
  \node[Nadjust=w](block1)(349,232){$\mathtt{two\_mod\_3}$}
  \node[Nadjust=w](block2)(232,158){$\mathtt{one\_mod\_3}$}
  \node[Nadjust=w](block3)(362,91){$\mathtt{zero\_mod\_3}$}
  \node[Nadjust=w](block4)(86,115){$\mathtt{tree\_3n\_plus\_2}$}
  \gasset{Nadjust=n,Nw=1,Nh=20,Nmr=0,fillgray=0} % black rectangle
  \gasset{ExtNL=y,NLdist=3,NLangle=45} % external label right and above the node
  \node(trans1)(31,168){$\mathtt{nil}$}
  \node(trans3)(64,42){$\mathtt{cons}$}
  \node(trans6)(269,231){$\mathtt{s}$}
  \gasset{Nadjust=n,Nw=20,Nh=1,Nmr=0,fillgray=0} % black rectangle
  \gasset{ExtNL=y,NLdist=3,NLangle=135} % external label right and above the node
  \node(trans4)(389,19){$\mathtt{o}$}
  \gasset{Nadjust=n,Nw=1,Nh=20,Nmr=0,fillgray=0} % black rectangle
  \gasset{ExtNL=y,NLdist=3,NLangle=225} % external label right and above the node
  \node(trans7)(284,94){$\mathtt{s}$}
  \node(trans2)(155,146){$\mathtt{s}$}
  \gasset{Nadjust=n,Nw=20,Nh=1,Nmr=0,fillgray=0} % black rectangle
  \gasset{ExtNL=y,NLdist=3,NLangle=315} % external label right and above the node
  \node(trans5)(393,165){$\mathtt{s}$}
  \gasset{ELpos=85,ELdistC=y,ELdist=0} % put (argument number) labels on the edge, toward the end
  \drawqbedge[exo=0](block1,393,225,trans5){}
  \drawqbedge(trans5,393,105,block3){}
  \drawqbedge(trans1,91,168,block4){}
  \drawqbedge[eyo=-5](block4,-16,42,trans3){\tiny 1}
  \drawqbedge[eyo=5](block4,24,42,trans3){\tiny 2}
  \drawqbedge(trans3,124,42,block4){}
  \drawqbedge[eyo=0](block3,344,94,trans7){}
  \drawqbedge(trans7,224,94,block2){}
  \drawqbedge(trans4,389,79,block3){}
  \drawqbedge[eyo=0](block2,209,231,trans6){}
  \drawqbedge(trans6,329,231,block1){}
  \drawqbedge[eyo=0](block2,215,146,trans2){}
  \drawqbedge(trans2,95,146,block4){}
\end{picture}
