Index: src/CodeGen/CodeGenerator.cc
===================================================================
--- src/CodeGen/CodeGenerator.cc	(revision 201aeb9b7c42eb7c7aa8bc065247bffda4932b33)
+++ src/CodeGen/CodeGenerator.cc	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -443,11 +443,11 @@
 	void CodeGenerator::postvisit( UntypedExpr * untypedExpr ) {
 		extension( untypedExpr );
-		if ( NameExpr * nameExpr = dynamic_cast< NameExpr* >( untypedExpr->get_function() ) ) {
+		if ( NameExpr * nameExpr = dynamic_cast< NameExpr* >( untypedExpr->function ) ) {
 			OperatorInfo opInfo;
-			if ( operatorLookup( nameExpr->get_name(), opInfo ) ) {
-				std::list< Expression* >::iterator arg = untypedExpr->get_args().begin();
+			if ( operatorLookup( nameExpr->name, opInfo ) ) {
+				std::list< Expression* >::iterator arg = untypedExpr->args.begin();
 				switch ( opInfo.type ) {
 				  case OT_INDEX:
-					assert( untypedExpr->get_args().size() == 2 );
+					assert( untypedExpr->args.size() == 2 );
 					(*arg++)->accept( *visitor );
 					output << "[";
@@ -461,5 +461,5 @@
 				  case OT_CTOR:
 				  case OT_DTOR:
-					if ( untypedExpr->get_args().size() == 1 ) {
+					if ( untypedExpr->args.size() == 1 ) {
 						// the expression fed into a single parameter constructor or destructor may contain side
 						// effects, so must still output this expression
@@ -480,5 +480,5 @@
 						(*arg++)->accept( *visitor );
 						output << opInfo.symbol << "{ ";
-						genCommaList( arg, untypedExpr->get_args().end() );
+						genCommaList( arg, untypedExpr->args.end() );
 						output << "}) /* " << opInfo.inputName << " */";
 					} // if
@@ -488,5 +488,5 @@
 				  case OT_PREFIXASSIGN:
 				  case OT_LABELADDRESS:
-					assert( untypedExpr->get_args().size() == 1 );
+					assert( untypedExpr->args.size() == 1 );
 					output << "(";
 					output << opInfo.symbol;
@@ -497,5 +497,5 @@
 				  case OT_POSTFIX:
 				  case OT_POSTFIXASSIGN:
-					assert( untypedExpr->get_args().size() == 1 );
+					assert( untypedExpr->args.size() == 1 );
 					(*arg)->accept( *visitor );
 					output << opInfo.symbol;
@@ -504,5 +504,5 @@
 				  case OT_INFIX:
 				  case OT_INFIXASSIGN:
-					assert( untypedExpr->get_args().size() == 2 );
+					assert( untypedExpr->args.size() == 2 );
 					output << "(";
 					(*arg++)->accept( *visitor );
@@ -517,20 +517,14 @@
 				} // switch
 			} else {
-				if ( nameExpr->get_name() == "..." ) { // case V1 ... V2 or case V1~V2
-					assert( untypedExpr->get_args().size() == 2 );
-					(*untypedExpr->get_args().begin())->accept( *visitor );
-					output << " ... ";
-					(*--untypedExpr->get_args().end())->accept( *visitor );
-				} else {								// builtin routines
-					nameExpr->accept( *visitor );
-					output << "(";
-					genCommaList( untypedExpr->get_args().begin(), untypedExpr->get_args().end() );
-					output << ")";
-				} // if
+				// builtin routines
+				nameExpr->accept( *visitor );
+				output << "(";
+				genCommaList( untypedExpr->args.begin(), untypedExpr->args.end() );
+				output << ")";
 			} // if
 		} else {
-			untypedExpr->get_function()->accept( *visitor );
+			untypedExpr->function->accept( *visitor );
 			output << "(";
-			genCommaList( untypedExpr->get_args().begin(), untypedExpr->get_args().end() );
+			genCommaList( untypedExpr->args.begin(), untypedExpr->args.end() );
 			output << ")";
 		} // if
@@ -538,7 +532,7 @@
 
 	void CodeGenerator::postvisit( RangeExpr * rangeExpr ) {
-		rangeExpr->get_low()->accept( *visitor );
+		rangeExpr->low->accept( *visitor );
 		output << " ... ";
-		rangeExpr->get_high()->accept( *visitor );
+		rangeExpr->high->accept( *visitor );
 	}
 
@@ -885,4 +879,6 @@
 
 	void CodeGenerator::postvisit( CaseStmt * caseStmt ) {
+		updateLocation( caseStmt );
+		output << indent;
 		if ( caseStmt->isDefault()) {
 			output << "default";
@@ -1026,4 +1022,13 @@
 } // namespace CodeGen
 
+std::ostream & operator<<( std::ostream & out, const BaseSyntaxNode * node ) {
+	if ( node ) {
+		node->print( out );
+	} else {
+		out << "nullptr";
+	}
+	return out;
+}
+
 // Local Variables: //
 // tab-width: 4 //
Index: src/Concurrency/Keywords.cc
===================================================================
--- src/Concurrency/Keywords.cc	(revision 201aeb9b7c42eb7c7aa8bc065247bffda4932b33)
+++ src/Concurrency/Keywords.cc	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -528,5 +528,4 @@
 		DeclarationWithType * param = decl->get_functionType()->get_parameters().front();
 		auto type  = dynamic_cast< StructInstType * >( InitTweak::getPointerBase( param->get_type() ) );
-		// if( type ) std::cerr << "FRED2" << std::endl;
 		if( type && type->get_baseStruct()->is_thread() ) {
 			addStartStatement( decl, param );
Index: src/Concurrency/Waitfor.cc
===================================================================
--- src/Concurrency/Waitfor.cc	(revision 201aeb9b7c42eb7c7aa8bc065247bffda4932b33)
+++ src/Concurrency/Waitfor.cc	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -27,5 +27,5 @@
 #include "InitTweak/InitTweak.h"   // for getPointerBase
 #include "Parser/LinkageSpec.h"    // for Cforall
-#include "SymTab/AddVisit.h"       // for acceptAndAdd
+#include "ResolvExpr/Resolver.h"   // for findVoidExpression
 #include "SynTree/Constant.h"      // for Constant
 #include "SynTree/Declaration.h"   // for StructDecl, FunctionDecl, ObjectDecl
@@ -112,5 +112,5 @@
 	//=============================================================================================
 
-	class GenerateWaitForPass final : public WithStmtsToAdd {
+	class GenerateWaitForPass final : public WithIndexer {
 	  public:
 
@@ -126,9 +126,11 @@
 
 		ObjectDecl * declare( unsigned long count, CompoundStmt * stmt );
+		ObjectDecl * declareFlag( CompoundStmt * stmt );
+		Statement  * makeSetter( ObjectDecl * flag );
 		ObjectDecl * declMon( WaitForStmt::Clause & clause, CompoundStmt * stmt );
-		void         init( ObjectDecl * acceptables, int index, WaitForStmt::Clause & clause, CompoundStmt * stmt );
-		Expression * init_timeout( Expression *& time, Expression *& time_cond, bool has_else, Expression *& else_cond, CompoundStmt * stmt );
-		Expression * call();
-		void choose();
+		void         init( ObjectDecl * acceptables, int index, WaitForStmt::Clause & clause, Statement * settter, CompoundStmt * stmt );
+		Expression * init_timeout( Expression *& time, Expression *& time_cond, bool has_else, Expression *& else_cond, Statement * settter, CompoundStmt * stmt );
+		Expression * call(size_t count, ObjectDecl * acceptables, Expression * timeout, CompoundStmt * stmt);
+		void         choose( WaitForStmt * waitfor, Expression  * result, CompoundStmt * stmt );
 
 		static void implement( std::list< Declaration * > & translationUnit ) {
@@ -140,15 +142,15 @@
 	  private:
 	  	FunctionDecl        * decl_waitfor    = nullptr;
+	  	StructDecl          * decl_mask       = nullptr;
 		StructDecl          * decl_acceptable = nullptr;
 		StructDecl          * decl_monitor    = nullptr;
-		DeclarationWithType * decl_m_func     = nullptr;
-		DeclarationWithType * decl_m_count    = nullptr;
-		DeclarationWithType * decl_m_monitors = nullptr;
-		DeclarationWithType * decl_m_isdtor   = nullptr;
 
 		static std::unique_ptr< Type > generic_func;
 
+		UniqueName namer_acc = "__acceptables_"s;
+		UniqueName namer_idx = "__index_"s;
+		UniqueName namer_flg = "__do_run_"s;
+		UniqueName namer_msk = "__mask_"s;
 		UniqueName namer_mon = "__monitors_"s;
-		UniqueName namer_acc = "__acceptables_"s;
 		UniqueName namer_tim = "__timeout_"s;
 	};
@@ -167,5 +169,5 @@
 	namespace {
 		Expression * makeOpIndex( DeclarationWithType * array, unsigned long index ) {
-			return new ApplicationExpr(
+			return new UntypedExpr(
 				new NameExpr( "?[?]" ),
 				{
@@ -177,5 +179,5 @@
 
 		Expression * makeOpAssign( Expression * lhs, Expression * rhs ) {
-			return new ApplicationExpr(
+			return new UntypedExpr(
 					new NameExpr( "?=?" ),
 					{ lhs, rhs }
@@ -183,22 +185,21 @@
 		}
 
-		Expression * makeOpMember( Expression * sue, DeclarationWithType * mem ) {
-			return new MemberExpr( mem, sue );
-		}
-
-		Statement * makeAccStatement( DeclarationWithType * object, unsigned long index, DeclarationWithType * member, Expression * value ) {
-			return new ExprStmt(
-				noLabels,
-				makeOpAssign(
-					makeOpMember(
-						makeOpIndex(
-							object,
-							index
-						),
-						member
+		Expression * makeOpMember( Expression * sue, const std::string & mem ) {
+			return new UntypedMemberExpr( new NameExpr( mem ), sue );
+		}
+
+		Statement * makeAccStatement( DeclarationWithType * object, unsigned long index, const std::string & member, Expression * value, const SymTab::Indexer & indexer ) {
+			std::unique_ptr< Expression > expr( makeOpAssign(
+				makeOpMember(
+					makeOpIndex(
+						object,
+						index
 					),
-					value
-				)
-			);
+					member
+				),
+				value
+			) );
+
+			return new ExprStmt( noLabels, ResolvExpr::findVoidExpression( expr.get(), indexer ) );
 		}
 
@@ -208,4 +209,19 @@
 			return new ConstantExpr( Constant::from_bool( ifnull ) );
 		}
+
+		VariableExpr * extractVariable( Expression * func ) {
+			if( VariableExpr * var = dynamic_cast< VariableExpr * >( func ) ) {
+				return var;
+			}
+
+			CastExpr * cast = strict_dynamic_cast< CastExpr * >( func );
+			return strict_dynamic_cast< VariableExpr * >( cast->arg );
+		}
+
+		Expression * detectIsDtor( Expression * func ) {
+			VariableExpr * typed_func = extractVariable( func );
+			bool is_dtor = InitTweak::isDestructor( typed_func->var );
+			return new ConstantExpr( Constant::from_bool( is_dtor ) );
+		}
 	};
 
@@ -216,5 +232,5 @@
 
 	void GenerateWaitForPass::premutate( FunctionDecl * decl) {
-		if( decl->name != "__accept_internal" ) return;
+		if( decl->name != "__waitfor_internal" ) return;
 
 		decl_waitfor = decl;
@@ -227,11 +243,8 @@
 			assert( !decl_acceptable );
 			decl_acceptable = decl;
-			for( Declaration * field : decl_acceptable->members ) {
-				     if( field->name == "func"    ) decl_m_func     = strict_dynamic_cast< DeclarationWithType * >( field );
-				else if( field->name == "count"   ) decl_m_count    = strict_dynamic_cast< DeclarationWithType * >( field );
-				else if( field->name == "monitor" ) decl_m_monitors = strict_dynamic_cast< DeclarationWithType * >( field );
-				else if( field->name == "is_dtor" ) decl_m_isdtor   = strict_dynamic_cast< DeclarationWithType * >( field );
-			}
-
+		}
+		else if( decl->name == "__waitfor_mask_t" ) {
+			assert( !decl_mask );
+			decl_mask = decl;
 		}
 		else if( decl->name == "monitor_desc" ) {
@@ -242,15 +255,15 @@
 
 	Statement * GenerateWaitForPass::postmutate( WaitForStmt * waitfor ) {
-		return waitfor;
-
-		if( !decl_monitor || !decl_acceptable ) throw SemanticError( "waitfor keyword requires monitors to be in scope, add #include <monitor>", waitfor );
+		if( !decl_monitor || !decl_acceptable || !decl_mask ) throw SemanticError( "waitfor keyword requires monitors to be in scope, add #include <monitor>", waitfor );
 
 		CompoundStmt * stmt = new CompoundStmt( noLabels );
 
 		ObjectDecl * acceptables = declare( waitfor->clauses.size(), stmt );
+		ObjectDecl * flag        = declareFlag( stmt );
+		Statement  * setter      = makeSetter( flag );
 
 		int index = 0;
 		for( auto & clause : waitfor->clauses ) {
-			init( acceptables, index, clause, stmt );
+			init( acceptables, index, clause, setter, stmt );
 
 			index++;
@@ -262,10 +275,19 @@
 			waitfor->orelse .statement,
 			waitfor->orelse .condition,
+			setter,
 			stmt
 		);
 
-		// Expression * result  = call( acceptables, timeout, orelse, stmt );
-
-		// choose( waitfor, result );
+		CompoundStmt * compound = new CompoundStmt( noLabels );
+		stmt->push_back( new IfStmt(
+			noLabels,
+			safeCond( new VariableExpr( flag ) ),
+			compound,
+			nullptr
+		));
+
+		Expression * result = call( waitfor->clauses.size(), acceptables, timeout, compound );
+
+		choose( waitfor, result, compound );
 
 		return stmt;
@@ -274,9 +296,6 @@
 	ObjectDecl * GenerateWaitForPass::declare( unsigned long count, CompoundStmt * stmt )
 	{
-		ObjectDecl * acceptables = new ObjectDecl(
+		ObjectDecl * acceptables = ObjectDecl::newObject(
 			namer_acc.newName(),
-			noStorage,
-			LinkageSpec::Cforall,
-			nullptr,
 			new ArrayType(
 				noQualifiers,
@@ -294,19 +313,63 @@
 		stmt->push_back( new DeclStmt( noLabels, acceptables) );
 
+		UntypedExpr * set = new UntypedExpr(
+			new NameExpr( "__builtin_memset" ),
+			{
+				new VariableExpr( acceptables ),
+				new ConstantExpr( Constant::from_int( 0 ) ),
+				new SizeofExpr( new VariableExpr( acceptables ) )
+			}
+		);
+
+		Expression * resolved_set = ResolvExpr::findVoidExpression( set, indexer );
+		delete set;
+
+		stmt->push_back( new ExprStmt( noLabels, resolved_set ) );
+
 		return acceptables;
 	}
 
+	ObjectDecl * GenerateWaitForPass::declareFlag( CompoundStmt * stmt ) {
+		ObjectDecl * flag = ObjectDecl::newObject(
+			namer_flg.newName(),
+			new BasicType(
+				noQualifiers,
+				BasicType::Bool
+			),
+			new SingleInit( new ConstantExpr( Constant::from_ulong( 0 ) ) )
+		);
+
+		stmt->push_back( new DeclStmt( noLabels, flag) );
+
+		return flag;
+	}
+
+	Statement * GenerateWaitForPass::makeSetter( ObjectDecl * flag ) {
+		Expression * untyped = new UntypedExpr(
+			new NameExpr( "?=?" ),
+			{
+				new VariableExpr( flag ),
+				new ConstantExpr( Constant::from_ulong( 1 ) )
+			}
+		);
+
+		Expression * expr = ResolvExpr::findVoidExpression( untyped, indexer );
+		delete untyped;
+
+		return new ExprStmt( noLabels, expr );
+	}
+
 	ObjectDecl * GenerateWaitForPass::declMon( WaitForStmt::Clause & clause, CompoundStmt * stmt ) {
 
-		ObjectDecl * mon = new ObjectDecl(
+		ObjectDecl * mon = ObjectDecl::newObject(
 			namer_mon.newName(),
-			noStorage,
-			LinkageSpec::Cforall,
-			nullptr,
 			new ArrayType(
 				noQualifiers,
-				new StructInstType(
+				new PointerType(
 					noQualifiers,
-					decl_monitor
+					new StructInstType(
+						noQualifiers,
+						decl_monitor
+					)
 				),
 				new ConstantExpr( Constant::from_ulong( clause.target.arguments.size() ) ),
@@ -316,5 +379,21 @@
 			new ListInit(
 				map_range < std::list<Initializer*> > ( clause.target.arguments, [this](Expression * expr ){
-					return new SingleInit( expr );
+					Expression * untyped = new CastExpr(
+						new UntypedExpr(
+							new NameExpr( "get_monitor" ),
+							{ expr }
+						),
+						new PointerType(
+							noQualifiers,
+							new StructInstType(
+								noQualifiers,
+								decl_monitor
+							)
+						)
+					);
+
+					Expression * init = ResolvExpr::findSingleExpression( untyped, indexer );
+					delete untyped;
+					return new SingleInit( init );
 				})
 			)
@@ -326,18 +405,20 @@
 	}
 
-	void GenerateWaitForPass::init( ObjectDecl * acceptables, int index, WaitForStmt::Clause & clause, CompoundStmt * stmt ) {
+	void GenerateWaitForPass::init( ObjectDecl * acceptables, int index, WaitForStmt::Clause & clause, Statement * setter, CompoundStmt * stmt ) {
 
 		ObjectDecl * monitors = declMon( clause, stmt );
 
-		CompoundStmt * compound = new CompoundStmt( noLabels );
-		compound->push_back( makeAccStatement( acceptables, index, decl_m_func    , clause.target.function ) );
-		compound->push_back( makeAccStatement( acceptables, index, decl_m_count   , new ConstantExpr( Constant::from_ulong( clause.target.arguments.size() ) ) ) );
-		compound->push_back( makeAccStatement( acceptables, index, decl_m_monitors, new VariableExpr( monitors ) ) );
-		compound->push_back( makeAccStatement( acceptables, index, decl_m_isdtor  , new ConstantExpr( Constant::from_bool( true ) ) ) );
+		Type * fptr_t = new PointerType( noQualifiers, new FunctionType( noQualifiers, true ) );
 
 		stmt->push_back( new IfStmt(
 			noLabels,
 			safeCond( clause.condition ),
-			compound,
+			new CompoundStmt({
+				makeAccStatement( acceptables, index, "is_dtor", detectIsDtor( clause.target.function )                                    , indexer ),
+				makeAccStatement( acceptables, index, "func"   , new CastExpr( clause.target.function, fptr_t )                            , indexer ),
+				makeAccStatement( acceptables, index, "list"   , new VariableExpr( monitors )                                              , indexer ),
+				makeAccStatement( acceptables, index, "size"   , new ConstantExpr( Constant::from_ulong( clause.target.arguments.size() ) ), indexer ),
+				setter->clone()
+			}),
 			nullptr
 		));
@@ -353,11 +434,9 @@
 		bool has_else,
 		Expression *& else_cond,
+		Statement * setter,
 		CompoundStmt * stmt
 	) {
-		ObjectDecl * timeout = new ObjectDecl(
+		ObjectDecl * timeout = ObjectDecl::newObject(
 			namer_tim.newName(),
-			noStorage,
-			LinkageSpec::Cforall,
-			nullptr,
 			new BasicType(
 				noQualifiers,
@@ -374,12 +453,15 @@
 			stmt->push_back( new IfStmt(
 				noLabels,
-				safeCond( else_cond ),
-				new ExprStmt(
-					noLabels,
-					makeOpAssign(
-						new VariableExpr( timeout ),
-						time
-					)
-				),
+				safeCond( time_cond ),
+				new CompoundStmt({
+					new ExprStmt(
+						noLabels,
+						makeOpAssign(
+							new VariableExpr( timeout ),
+							time
+						)
+					),
+					setter->clone()
+				}),
 				nullptr
 			));
@@ -392,11 +474,14 @@
 				noLabels,
 				safeCond( else_cond ),
-				new ExprStmt(
-					noLabels,
-					makeOpAssign(
-						new VariableExpr( timeout ),
-						new ConstantExpr( Constant::from_ulong( 0 ) )
-					)
-				),
+				new CompoundStmt({
+					new ExprStmt(
+						noLabels,
+						makeOpAssign(
+							new VariableExpr( timeout ),
+							new ConstantExpr( Constant::from_ulong( 0 ) )
+						)
+					),
+					setter->clone()
+				}),
 				nullptr
 			));
@@ -405,5 +490,130 @@
 		}
 
+		delete setter;
+
 		return new VariableExpr( timeout );
+	}
+
+	Expression * GenerateWaitForPass::call(
+		size_t count,
+		ObjectDecl * acceptables,
+		Expression * timeout,
+		CompoundStmt * stmt
+	) {
+		ObjectDecl * index = ObjectDecl::newObject(
+			namer_idx.newName(),
+			new BasicType(
+				noQualifiers,
+				BasicType::ShortSignedInt
+			),
+			new SingleInit(
+				new ConstantExpr( Constant::from_int( -1 ) )
+			)
+		);
+
+		stmt->push_back( new DeclStmt( noLabels, index ) );
+
+		ObjectDecl * mask = ObjectDecl::newObject(
+			namer_msk.newName(),
+			new StructInstType(
+				noQualifiers,
+				decl_mask
+			),
+			new ListInit({
+				new SingleInit( new AddressExpr( new VariableExpr( index ) ) ),
+				new SingleInit( new VariableExpr( acceptables ) ),
+				new SingleInit( new ConstantExpr( Constant::from_ulong( count ) ) )
+			})
+		);
+
+		stmt->push_back( new DeclStmt( noLabels, mask ) );
+
+		stmt->push_back( new ExprStmt(
+			noLabels,
+			new ApplicationExpr(
+				VariableExpr::functionPointer( decl_waitfor ),
+				{
+					new CastExpr(
+						new VariableExpr( mask ),
+						new ReferenceType(
+							noQualifiers,
+							new StructInstType(
+								noQualifiers,
+								decl_mask
+							)
+						)
+					),
+					timeout
+				}
+			)
+		));
+
+		return new VariableExpr( index );
+	}
+
+	void GenerateWaitForPass::choose(
+		WaitForStmt * waitfor,
+		Expression  * result,
+		CompoundStmt * stmt
+	) {
+		SwitchStmt * swtch = new SwitchStmt(
+			noLabels,
+			result,
+			std::list<Statement *>()
+		);
+
+		unsigned long i = 0;
+		for( auto & clause : waitfor->clauses ) {
+			swtch->statements.push_back(
+				new CaseStmt(
+					noLabels,
+					new ConstantExpr( Constant::from_ulong( i++ ) ),
+					{
+						clause.statement,
+						new BranchStmt(
+							noLabels,
+							"",
+							BranchStmt::Break
+						)
+					}
+				)
+			);
+		}
+
+		if(waitfor->timeout.statement) {
+			swtch->statements.push_back(
+				new CaseStmt(
+					noLabels,
+					new ConstantExpr( Constant::from_int( -2 ) ),
+					{
+						waitfor->timeout.statement,
+						new BranchStmt(
+							noLabels,
+							"",
+							BranchStmt::Break
+						)
+					}
+				)
+			);
+		}
+
+		if(waitfor->orelse.statement) {
+			swtch->statements.push_back(
+				new CaseStmt(
+					noLabels,
+					new ConstantExpr( Constant::from_int( -1 ) ),
+					{
+						waitfor->orelse.statement,
+						new BranchStmt(
+							noLabels,
+							"",
+							BranchStmt::Break
+						)
+					}
+				)
+			);
+		}
+
+		stmt->push_back( swtch );
 	}
 };
Index: src/GenPoly/Box.cc
===================================================================
--- src/GenPoly/Box.cc	(revision 201aeb9b7c42eb7c7aa8bc065247bffda4932b33)
+++ src/GenPoly/Box.cc	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -32,5 +32,4 @@
 #include "Common/UniqueName.h"           // for UniqueName
 #include "Common/utility.h"              // for toString
-#include "DeclMutator.h"                 // for DeclMutator
 #include "FindFunction.h"                // for findFunction, findAndReplace...
 #include "GenPoly/ErasableScopedMap.h"   // for ErasableScopedMap<>::const_i...
@@ -39,5 +38,4 @@
 #include "Lvalue.h"                      // for generalizedLvalue
 #include "Parser/LinkageSpec.h"          // for C, Spec, Cforall, Intrinsic
-#include "PolyMutator.h"                 // for PolyMutator
 #include "ResolvExpr/TypeEnvironment.h"  // for EqvClass
 #include "ResolvExpr/typeops.h"          // for typesCompatible
@@ -62,35 +60,37 @@
 		FunctionType *makeAdapterType( FunctionType *adaptee, const TyVarMap &tyVars );
 
+		class BoxPass {
+		protected:
+			BoxPass() : scopeTyVars( TypeDecl::Data{} ) {}
+			TyVarMap scopeTyVars;
+		};
+
 		/// Adds layout-generation functions to polymorphic types
-		class LayoutFunctionBuilder final : public DeclMutator {
-			unsigned int functionNesting;  // current level of nested functions
+		class LayoutFunctionBuilder final : public WithDeclsToAdd, public WithVisitorRef<LayoutFunctionBuilder>, public WithShortCircuiting {
+			unsigned int functionNesting = 0;  // current level of nested functions
 		public:
-			LayoutFunctionBuilder() : functionNesting( 0 ) {}
-
-			using DeclMutator::mutate;
-			virtual DeclarationWithType *mutate( FunctionDecl *functionDecl ) override;
-			virtual Declaration *mutate( StructDecl *structDecl ) override;
-			virtual Declaration *mutate( UnionDecl *unionDecl ) override;
+			void previsit( FunctionDecl *functionDecl );
+			void previsit( StructDecl *structDecl );
+			void previsit( UnionDecl *unionDecl );
 		};
 
 		/// Replaces polymorphic return types with out-parameters, replaces calls to polymorphic functions with adapter calls as needed, and adds appropriate type variables to the function call
-		class Pass1 final : public PolyMutator {
+		class Pass1 final : public BoxPass, public WithTypeSubstitution, public WithStmtsToAdd, public WithGuards, public WithVisitorRef<Pass1>, public WithShortCircuiting {
 		  public:
 			Pass1();
 
-			using PolyMutator::mutate;
-			virtual Expression *mutate( ApplicationExpr *appExpr ) override;
-			virtual Expression *mutate( AddressExpr *addrExpr ) override;
-			virtual Expression *mutate( UntypedExpr *expr ) override;
-			virtual DeclarationWithType* mutate( FunctionDecl *functionDecl ) override;
-			virtual TypeDecl *mutate( TypeDecl *typeDecl ) override;
-			virtual Expression *mutate( CommaExpr *commaExpr ) override;
-			virtual Expression *mutate( ConditionalExpr *condExpr ) override;
-			virtual Statement * mutate( ReturnStmt *returnStmt ) override;
-			virtual Type *mutate( PointerType *pointerType ) override;
-			virtual Type * mutate( FunctionType *functionType ) override;
-
-			virtual void doBeginScope() override;
-			virtual void doEndScope() override;
+			void premutate( FunctionDecl * functionDecl );
+			void premutate( TypeDecl * typeDecl );
+			void premutate( CommaExpr * commaExpr );
+			Expression * postmutate( ApplicationExpr * appExpr );
+			Expression * postmutate( UntypedExpr *expr );
+			void premutate( AddressExpr * addrExpr );
+			Expression * postmutate( AddressExpr * addrExpr );
+			void premutate( ReturnStmt * returnStmt );
+			void premutate( PointerType * pointerType );
+			void premutate( FunctionType * functionType );
+
+			void beginScope();
+			void endScope();
 		  private:
 			/// Pass the extra type parameters from polymorphic generic arguments or return types into a function application
@@ -129,22 +129,14 @@
 		/// * Moves polymorphic returns in function types to pointer-type parameters
 		/// * adds type size and assertion parameters to parameter lists
-		class Pass2 final : public PolyMutator {
-		  public:
-			template< typename DeclClass >
-			DeclClass *handleDecl( DeclClass *decl );
-			template< typename AggDecl >
-			AggDecl * handleAggDecl( AggDecl * aggDecl );
-
-			typedef PolyMutator Parent;
-			using Parent::mutate;
-			virtual DeclarationWithType *mutate( FunctionDecl *functionDecl ) override;
-			virtual ObjectDecl *mutate( ObjectDecl *objectDecl ) override;
-			virtual StructDecl *mutate( StructDecl *structDecl ) override;
-			virtual UnionDecl *mutate( UnionDecl *unionDecl ) override;
-			virtual TraitDecl *mutate( TraitDecl *unionDecl ) override;
-			virtual TypeDecl *mutate( TypeDecl *typeDecl ) override;
-			virtual TypedefDecl *mutate( TypedefDecl *typedefDecl ) override;
-			virtual Type *mutate( PointerType *pointerType ) override;
-			virtual Type *mutate( FunctionType *funcType ) override;
+		struct Pass2 final : public BoxPass, public WithGuards {
+			void handleAggDecl();
+
+			DeclarationWithType * postmutate( FunctionDecl *functionDecl );
+			void premutate( StructDecl *structDecl );
+			void premutate( UnionDecl *unionDecl );
+			void premutate( TraitDecl *unionDecl );
+			void premutate( TypeDecl *typeDecl );
+			void premutate( PointerType *pointerType );
+			void premutate( FunctionType *funcType );
 
 		  private:
@@ -158,5 +150,5 @@
 		/// * Calculates polymorphic offsetof expressions from offset array
 		/// * Inserts dynamic calculation of polymorphic type layouts where needed
-		class PolyGenericCalculator final : public WithGuards, public WithVisitorRef<PolyGenericCalculator>, public WithStmtsToAdd, public WithDeclsToAdd, public WithTypeSubstitution {
+		class PolyGenericCalculator final : public BoxPass, public WithGuards, public WithVisitorRef<PolyGenericCalculator>, public WithStmtsToAdd, public WithDeclsToAdd, public WithTypeSubstitution {
 		public:
 			PolyGenericCalculator();
@@ -197,23 +189,19 @@
 			ScopedSet< std::string > knownOffsets;          ///< Set of non-generic types for which the offset array exists in the current scope, indexed by offsetofName
 			UniqueName bufNamer;                           ///< Namer for VLA buffers
-			TyVarMap scopeTyVars;
 		};
 
 		/// Replaces initialization of polymorphic values with alloca, declaration of dtype/ftype with appropriate void expression, sizeof expressions of polymorphic types with the proper variable, and strips fields from generic struct declarations.
-		class Pass3 final : public PolyMutator {
-		  public:
+		struct Pass3 final : public BoxPass, public WithGuards {
 			template< typename DeclClass >
-			DeclClass *handleDecl( DeclClass *decl, Type *type );
-
-			using PolyMutator::mutate;
-			virtual DeclarationWithType *mutate( FunctionDecl *functionDecl ) override;
-			virtual Declaration *mutate( StructDecl *structDecl ) override;
-			virtual Declaration *mutate( UnionDecl *unionDecl ) override;
-			virtual ObjectDecl *mutate( ObjectDecl *objectDecl ) override;
-			virtual TypedefDecl *mutate( TypedefDecl *objectDecl ) override;
-			virtual TypeDecl *mutate( TypeDecl *objectDecl ) override;
-			virtual Type *mutate( PointerType *pointerType ) override;
-			virtual Type *mutate( FunctionType *funcType ) override;
-		  private:
+			void handleDecl( DeclClass * decl, Type * type );
+
+			void premutate( ObjectDecl * objectDecl );
+			void premutate( FunctionDecl * functionDecl );
+			void premutate( TypedefDecl * typedefDecl );
+			void premutate( StructDecl * structDecl );
+			void premutate( UnionDecl * unionDecl );
+			void premutate( TypeDecl * typeDecl );
+			void premutate( PointerType * pointerType );
+			void premutate( FunctionType * funcType );
 		};
 	} // anonymous namespace
@@ -247,25 +235,25 @@
 
 	void box( std::list< Declaration *>& translationUnit ) {
-		LayoutFunctionBuilder layoutBuilder;
-		Pass1 pass1;
-		Pass2 pass2;
+		PassVisitor<LayoutFunctionBuilder> layoutBuilder;
+		PassVisitor<Pass1> pass1;
+		PassVisitor<Pass2> pass2;
 		PassVisitor<PolyGenericCalculator> polyCalculator;
-		Pass3 pass3;
-
-		layoutBuilder.mutateDeclarationList( translationUnit );
-		mutateTranslationUnit/*All*/( translationUnit, pass1 );
-		mutateTranslationUnit/*All*/( translationUnit, pass2 );
+		PassVisitor<Pass3> pass3;
+
+		acceptAll( translationUnit, layoutBuilder );
+		mutateAll( translationUnit, pass1 );
+		mutateAll( translationUnit, pass2 );
 		mutateAll( translationUnit, polyCalculator );
-		mutateTranslationUnit/*All*/( translationUnit, pass3 );
+		mutateAll( translationUnit, pass3 );
 	}
 
 	////////////////////////////////// LayoutFunctionBuilder ////////////////////////////////////////////
 
-	DeclarationWithType *LayoutFunctionBuilder::mutate( FunctionDecl *functionDecl ) {
-		functionDecl->set_functionType( maybeMutate( functionDecl->get_functionType(), *this ) );
+	void LayoutFunctionBuilder::previsit( FunctionDecl *functionDecl ) {
+		visit_children = false;
+		maybeAccept( functionDecl->get_functionType(), *visitor );
 		++functionNesting;
-		functionDecl->set_statements( maybeMutate( functionDecl->get_statements(), *this ) );
+		maybeAccept( functionDecl->get_statements(), *visitor );
 		--functionNesting;
-		return functionDecl;
 	}
 
@@ -356,11 +344,12 @@
 	}
 
-	Declaration *LayoutFunctionBuilder::mutate( StructDecl *structDecl ) {
+	void LayoutFunctionBuilder::previsit( StructDecl *structDecl ) {
 		// do not generate layout function for "empty" tag structs
-		if ( structDecl->get_members().empty() ) return structDecl;
+		visit_children = false;
+		if ( structDecl->get_members().empty() ) return;
 
 		// get parameters that can change layout, exiting early if none
 		std::list< TypeDecl* > otypeParams = takeOtypeOnly( structDecl->get_parameters() );
-		if ( otypeParams.empty() ) return structDecl;
+		if ( otypeParams.empty() ) return;
 
 		// build layout function signature
@@ -413,15 +402,15 @@
 		addStmt( layoutDecl->get_statements(), makeAlignTo( derefVar( sizeParam ), derefVar( alignParam ) ) );
 
-		addDeclarationAfter( layoutDecl );
-		return structDecl;
+		declsToAddAfter.push_back( layoutDecl );
 	}
 
-	Declaration *LayoutFunctionBuilder::mutate( UnionDecl *unionDecl ) {
+	void LayoutFunctionBuilder::previsit( UnionDecl *unionDecl ) {
 		// do not generate layout function for "empty" tag unions
-		if ( unionDecl->get_members().empty() ) return unionDecl;
+		visit_children = false;
+		if ( unionDecl->get_members().empty() ) return;
 
 		// get parameters that can change layout, exiting early if none
 		std::list< TypeDecl* > otypeParams = takeOtypeOnly( unionDecl->get_parameters() );
-		if ( otypeParams.empty() ) return unionDecl;
+		if ( otypeParams.empty() ) return;
 
 		// build layout function signature
@@ -456,6 +445,5 @@
 		addStmt( layoutDecl->get_statements(), makeAlignTo( derefVar( sizeParam ), derefVar( alignParam ) ) );
 
-		addDeclarationAfter( layoutDecl );
-		return unionDecl;
+		declsToAddAfter.push_back( layoutDecl );
 	}
 
@@ -501,31 +489,29 @@
 		Pass1::Pass1() : tempNamer( "_temp" ) {}
 
-		DeclarationWithType *Pass1::mutate( FunctionDecl *functionDecl ) {
+		void Pass1::premutate( FunctionDecl *functionDecl ) {
 			if ( functionDecl->get_statements() ) {		// empty routine body ?
 				// std::cerr << "mutating function: " << functionDecl->get_mangleName() << std::endl;
-				doBeginScope();
-				scopeTyVars.beginScope();
-
-				DeclarationWithType *oldRetval = retval;
+				GuardScope( scopeTyVars );
+				GuardValue( retval );
 
 				// process polymorphic return value
 				retval = nullptr;
-				if ( isDynRet( functionDecl->get_functionType() ) && functionDecl->get_linkage() != LinkageSpec::C ) {
-					retval = functionDecl->get_functionType()->get_returnVals().front();
+				FunctionType *functionType = functionDecl->type;
+				if ( isDynRet( functionType ) && functionDecl->linkage != LinkageSpec::C ) {
+					retval = functionType->returnVals.front();
 
 					// give names to unnamed return values
-					if ( retval->get_name() == "" ) {
-						retval->set_name( "_retparm" );
-						retval->set_linkage( LinkageSpec::C );
+					if ( retval->name == "" ) {
+						retval->name = "_retparm";
+						retval->linkage = LinkageSpec::C;
 					} // if
 				} // if
 
-				FunctionType *functionType = functionDecl->get_functionType();
-				makeTyVarMap( functionDecl->get_functionType(), scopeTyVars );
-
-				std::list< DeclarationWithType *> &paramList = functionType->get_parameters();
+				makeTyVarMap( functionType, scopeTyVars );
+
+				std::list< DeclarationWithType *> &paramList = functionType->parameters;
 				std::list< FunctionType *> functions;
-				for ( Type::ForallList::iterator tyVar = functionType->get_forall().begin(); tyVar != functionType->get_forall().end(); ++tyVar ) {
-					for ( std::list< DeclarationWithType *>::iterator assert = (*tyVar)->get_assertions().begin(); assert != (*tyVar)->get_assertions().end(); ++assert ) {
+				for ( Type::ForallList::iterator tyVar = functionType->forall.begin(); tyVar != functionType->forall.end(); ++tyVar ) {
+					for ( std::list< DeclarationWithType *>::iterator assert = (*tyVar)->assertions.begin(); assert != (*tyVar)->assertions.end(); ++assert ) {
 						findFunction( (*assert)->get_type(), functions, scopeTyVars, needsAdapter );
 					} // for
@@ -542,21 +528,13 @@
 					} // if
 				} // for
-
-				functionDecl->set_statements( functionDecl->get_statements()->acceptMutator( *this ) );
-
-				scopeTyVars.endScope();
-				retval = oldRetval;
-				doEndScope();
 				// std::cerr << "end function: " << functionDecl->get_mangleName() << std::endl;
 			} // if
-			return functionDecl;
-		}
-
-		TypeDecl *Pass1::mutate( TypeDecl *typeDecl ) {
+		}
+
+		void Pass1::premutate( TypeDecl *typeDecl ) {
 			addToTyVarMap( typeDecl, scopeTyVars );
-			return dynamic_cast<TypeDecl*>( Mutator::mutate( typeDecl ) );
-		}
-
-		Expression *Pass1::mutate( CommaExpr *commaExpr ) {
+		}
+
+		void Pass1::premutate( CommaExpr *commaExpr ) {
 			// Attempting to find application expressions that were mutated by the copy constructor passes
 			// to use an explicit return variable, so that the variable can be reused as a parameter to the
@@ -574,16 +552,4 @@
 				}
 			}
-
-			commaExpr->set_arg1( maybeMutate( commaExpr->get_arg1(), *this ) );
-			commaExpr->set_arg2( maybeMutate( commaExpr->get_arg2(), *this ) );
-			return commaExpr;
-		}
-
-		Expression *Pass1::mutate( ConditionalExpr *condExpr ) {
-			condExpr->set_arg1( maybeMutate( condExpr->get_arg1(), *this ) );
-			condExpr->set_arg2( maybeMutate( condExpr->get_arg2(), *this ) );
-			condExpr->set_arg3( maybeMutate( condExpr->get_arg3(), *this ) );
-			return condExpr;
-
 		}
 
@@ -659,5 +625,5 @@
 		ObjectDecl *Pass1::makeTemporary( Type *type ) {
 			ObjectDecl *newObj = new ObjectDecl( tempNamer.newName(), Type::StorageClasses(), LinkageSpec::C, 0, type, 0 );
-			stmtsToAdd.push_back( new DeclStmt( noLabels, newObj ) );
+			stmtsToAddBefore.push_back( new DeclStmt( noLabels, newObj ) );
 			return newObj;
 		}
@@ -775,9 +741,9 @@
 					ObjectDecl *newObj = new ObjectDecl( tempNamer.newName(), Type::StorageClasses(), LinkageSpec::C, 0, newType, 0 );
 					newObj->get_type()->get_qualifiers() = Type::Qualifiers(); // TODO: is this right???
-					stmtsToAdd.push_back( new DeclStmt( noLabels, newObj ) );
+					stmtsToAddBefore.push_back( new DeclStmt( noLabels, newObj ) );
 					UntypedExpr *assign = new UntypedExpr( new NameExpr( "?=?" ) ); // TODO: why doesn't this just use initialization syntax?
 					assign->get_args().push_back( new VariableExpr( newObj ) );
 					assign->get_args().push_back( arg );
-					stmtsToAdd.push_back( new ExprStmt( noLabels, assign ) );
+					stmtsToAddBefore.push_back( new ExprStmt( noLabels, assign ) );
 					arg = new AddressExpr( new VariableExpr( newObj ) );
 				} // if
@@ -961,5 +927,5 @@
 						std::pair< AdapterIter, bool > answer = adapters.insert( std::pair< std::string, DeclarationWithType *>( mangleName, newAdapter ) );
 						adapter = answer.first;
-						stmtsToAdd.push_back( new DeclStmt( noLabels, newAdapter ) );
+						stmtsToAddBefore.push_back( new DeclStmt( noLabels, newAdapter ) );
 					} // if
 					assert( adapter != adapters.end() );
@@ -1118,5 +1084,5 @@
 		}
 
-		Expression *Pass1::mutate( ApplicationExpr *appExpr ) {
+		Expression *Pass1::postmutate( ApplicationExpr *appExpr ) {
 			// std::cerr << "mutate appExpr: " << InitTweak::getFunctionName( appExpr ) << std::endl;
 			// for ( TyVarMap::iterator i = scopeTyVars.begin(); i != scopeTyVars.end(); ++i ) {
@@ -1124,10 +1090,8 @@
 			// }
 			// std::cerr << "\n";
-			appExpr->get_function()->acceptMutator( *this );
-			mutateAll( appExpr->get_args(), *this );
-
-			assert( appExpr->get_function()->has_result() );
-			FunctionType * function = getFunctionType( appExpr->get_function()->get_result() );
-			assertf( function, "ApplicationExpr has non-function type: %s", toString( appExpr->get_function()->get_result() ).c_str() );
+
+			assert( appExpr->function->result );
+			FunctionType * function = getFunctionType( appExpr->function->result );
+			assertf( function, "ApplicationExpr has non-function type: %s", toString( appExpr->function->result ).c_str() );
 
 			if ( Expression *newExpr = handleIntrinsics( appExpr ) ) {
@@ -1182,19 +1146,20 @@
 		}
 
-		Expression *Pass1::mutate( UntypedExpr *expr ) {
-			if ( expr->has_result() && isPolyType( expr->get_result(), scopeTyVars, env ) ) {
-				if ( NameExpr *name = dynamic_cast< NameExpr *>( expr->get_function() ) ) {
+		Expression * Pass1::postmutate( UntypedExpr *expr ) {
+			if ( expr->result && isPolyType( expr->result, scopeTyVars, env ) ) {
+				if ( NameExpr *name = dynamic_cast< NameExpr *>( expr->function ) ) {
 					if ( name->get_name() == "*?" ) {
-						Expression *ret = expr->get_args().front();
-						expr->get_args().clear();
+						Expression *ret = expr->args.front();
+						expr->args.clear();
 						delete expr;
-						return ret->acceptMutator( *this );
+						return ret;
 					} // if
 				} // if
 			} // if
-			return PolyMutator::mutate( expr );
-		}
-
-		Expression *Pass1::mutate( AddressExpr *addrExpr ) {
+			return expr;
+		}
+
+		void Pass1::premutate( AddressExpr * ) { visit_children = false; }
+		Expression * Pass1::postmutate( AddressExpr * addrExpr ) {
 			assert( addrExpr->get_arg()->has_result() && ! addrExpr->get_arg()->get_result()->isVoid() );
 
@@ -1216,5 +1181,5 @@
 			// isPolyType check needs to happen before mutating addrExpr arg, so pull it forward
 			// out of the if condition.
-			addrExpr->set_arg( mutateExpression( addrExpr->get_arg() ) );
+			addrExpr->arg = addrExpr->get_arg()->acceptMutator( *visitor );
 			// ... but must happen after mutate, since argument might change (e.g. intrinsic *?, ?[?]) - re-evaluate above comment
 			bool polytype = isPolyType( addrExpr->get_arg()->get_result(), scopeTyVars, env );
@@ -1231,40 +1196,27 @@
 		}
 
-		Statement * Pass1::mutate( ReturnStmt *returnStmt ) {
-			if ( retval && returnStmt->get_expr() ) {
-				assert( returnStmt->get_expr()->has_result() && ! returnStmt->get_expr()->get_result()->isVoid() );
-				delete returnStmt->get_expr();
-				returnStmt->set_expr( 0 );
-			} else {
-				returnStmt->set_expr( mutateExpression( returnStmt->get_expr() ) );
+		void Pass1::premutate( ReturnStmt *returnStmt ) {
+			if ( retval && returnStmt->expr ) {
+				assert( returnStmt->expr->result && ! returnStmt->expr->result->isVoid() );
+				delete returnStmt->expr;
+				returnStmt->expr = nullptr;
 			} // if
-			return returnStmt;
-		}
-
-		Type * Pass1::mutate( PointerType *pointerType ) {
-			scopeTyVars.beginScope();
+		}
+
+		void Pass1::premutate( PointerType *pointerType ) {
+			GuardScope( scopeTyVars );
 			makeTyVarMap( pointerType, scopeTyVars );
-
-			Type *ret = Mutator::mutate( pointerType );
-
-			scopeTyVars.endScope();
-			return ret;
-		}
-
-		Type * Pass1::mutate( FunctionType *functionType ) {
-			scopeTyVars.beginScope();
+		}
+
+		void Pass1::premutate( FunctionType *functionType ) {
+			GuardScope( scopeTyVars );
 			makeTyVarMap( functionType, scopeTyVars );
-
-			Type *ret = Mutator::mutate( functionType );
-
-			scopeTyVars.endScope();
-			return ret;
-		}
-
-		void Pass1::doBeginScope() {
+		}
+
+		void Pass1::beginScope() {
 			adapters.beginScope();
 		}
 
-		void Pass1::doEndScope() {
+		void Pass1::endScope() {
 			adapters.endScope();
 		}
@@ -1293,13 +1245,5 @@
 		}
 
-		template< typename DeclClass >
-		DeclClass * Pass2::handleDecl( DeclClass *decl ) {
-			DeclClass *ret = static_cast< DeclClass *>( Parent::mutate( decl ) );
-
-			return ret;
-		}
-
-		DeclarationWithType * Pass2::mutate( FunctionDecl *functionDecl ) {
-			functionDecl = strict_dynamic_cast< FunctionDecl * > ( handleDecl( functionDecl ) );
+		DeclarationWithType * Pass2::postmutate( FunctionDecl *functionDecl ) {
 			FunctionType * ftype = functionDecl->get_functionType();
 			if ( ! ftype->get_returnVals().empty() && functionDecl->get_statements() ) {
@@ -1325,55 +1269,30 @@
 		}
 
-		ObjectDecl * Pass2::mutate( ObjectDecl *objectDecl ) {
-			return handleDecl( objectDecl );
-		}
-
-		template< typename AggDecl >
-		AggDecl * Pass2::handleAggDecl( AggDecl * aggDecl ) {
+		void Pass2::premutate( StructDecl * ) {
 			// prevent tyVars from leaking into containing scope
-			scopeTyVars.beginScope();
-			Parent::mutate( aggDecl );
-			scopeTyVars.endScope();
-			return aggDecl;
-		}
-
-		StructDecl * Pass2::mutate( StructDecl *aggDecl ) {
-			return handleAggDecl( aggDecl );
-		}
-
-		UnionDecl * Pass2::mutate( UnionDecl *aggDecl ) {
-			return handleAggDecl( aggDecl );
-		}
-
-		TraitDecl * Pass2::mutate( TraitDecl *aggDecl ) {
-			return handleAggDecl( aggDecl );
-		}
-
-		TypeDecl * Pass2::mutate( TypeDecl *typeDecl ) {
+			GuardScope( scopeTyVars );
+		}
+
+		void Pass2::premutate( UnionDecl * ) {
+			// prevent tyVars from leaking into containing scope
+			GuardScope( scopeTyVars );
+		}
+
+		void Pass2::premutate( TraitDecl * ) {
+			// prevent tyVars from leaking into containing scope
+			GuardScope( scopeTyVars );
+		}
+
+		void Pass2::premutate( TypeDecl *typeDecl ) {
 			addToTyVarMap( typeDecl, scopeTyVars );
-			if ( typeDecl->get_base() ) {
-				return handleDecl( typeDecl );
-			} else {
-				return dynamic_cast<TypeDecl*>( Parent::mutate( typeDecl ) );
-			}
-		}
-
-		TypedefDecl * Pass2::mutate( TypedefDecl *typedefDecl ) {
-			return handleDecl( typedefDecl );
-		}
-
-		Type * Pass2::mutate( PointerType *pointerType ) {
-			scopeTyVars.beginScope();
+		}
+
+		void Pass2::premutate( PointerType *pointerType ) {
+			GuardScope( scopeTyVars );
 			makeTyVarMap( pointerType, scopeTyVars );
-
-			Type *ret = Parent::mutate( pointerType );
-
-			scopeTyVars.endScope();
-			return ret;
-		}
-
-		Type *Pass2::mutate( FunctionType *funcType ) {
-			scopeTyVars.beginScope();
-
+		}
+
+		void Pass2::premutate( FunctionType *funcType ) {
+			GuardScope( scopeTyVars );
 			makeTyVarMap( funcType, scopeTyVars );
 
@@ -1414,5 +1333,4 @@
 				// move all assertions into parameter list
 				for ( std::list< DeclarationWithType *>::iterator assert = (*tyParm)->get_assertions().begin(); assert != (*tyParm)->get_assertions().end(); ++assert ) {
-//      *assert = (*assert)->acceptMutator( *this );
 					// assertion parameters may not be used in body, pass along with unused attribute.
 					(*assert)->get_attributes().push_back( new Attribute( "unused" ) );
@@ -1450,5 +1368,4 @@
 						}
 					}
-
 					seenTypes.insert( typeName );
 				}
@@ -1458,9 +1375,4 @@
 			funcType->get_parameters().splice( last, inferredParams );
 			addAdapters( funcType );
-			mutateAll( funcType->get_returnVals(), *this );
-			mutateAll( funcType->get_parameters(), *this );
-
-			scopeTyVars.endScope();
-			return funcType;
 		}
 
@@ -1468,5 +1380,5 @@
 
 		PolyGenericCalculator::PolyGenericCalculator()
-			: knownLayouts(), knownOffsets(), bufNamer( "_buf" ), scopeTyVars( TypeDecl::Data{} ) {}
+			: knownLayouts(), knownOffsets(), bufNamer( "_buf" ) {}
 
 		void PolyGenericCalculator::beginTypeScope( Type *ty ) {
@@ -1829,74 +1741,47 @@
 
 		template< typename DeclClass >
-		DeclClass * Pass3::handleDecl( DeclClass *decl, Type *type ) {
-			scopeTyVars.beginScope();
+		void Pass3::handleDecl( DeclClass * decl, Type * type ) {
+			GuardScope( scopeTyVars );
 			makeTyVarMap( type, scopeTyVars );
-
-			DeclClass *ret = static_cast< DeclClass *>( Mutator::mutate( decl ) );
-			// ScrubTyVars::scrub( decl, scopeTyVars );
 			ScrubTyVars::scrubAll( decl );
-
-			scopeTyVars.endScope();
-			return ret;
-		}
-
-		ObjectDecl * Pass3::mutate( ObjectDecl *objectDecl ) {
-			return handleDecl( objectDecl, objectDecl->get_type() );
-		}
-
-		DeclarationWithType * Pass3::mutate( FunctionDecl *functionDecl ) {
-			return handleDecl( functionDecl, functionDecl->get_functionType() );
-		}
-
-		TypedefDecl * Pass3::mutate( TypedefDecl *typedefDecl ) {
-			return handleDecl( typedefDecl, typedefDecl->get_base() );
+		}
+
+		void Pass3::premutate( ObjectDecl * objectDecl ) {
+			handleDecl( objectDecl, objectDecl->type );
+		}
+
+		void Pass3::premutate( FunctionDecl * functionDecl ) {
+			handleDecl( functionDecl, functionDecl->type );
+		}
+
+		void Pass3::premutate( TypedefDecl * typedefDecl ) {
+			handleDecl( typedefDecl, typedefDecl->base );
 		}
 
 		/// Strips the members from a generic aggregate
-		void stripGenericMembers(AggregateDecl* decl) {
-			if ( ! decl->get_parameters().empty() ) decl->get_members().clear();
-		}
-
-		Declaration *Pass3::mutate( StructDecl *structDecl ) {
+		void stripGenericMembers(AggregateDecl * decl) {
+			if ( ! decl->parameters.empty() ) decl->members.clear();
+		}
+
+		void Pass3::premutate( StructDecl * structDecl ) {
 			stripGenericMembers( structDecl );
-			return structDecl;
-		}
-
-		Declaration *Pass3::mutate( UnionDecl *unionDecl ) {
+		}
+
+		void Pass3::premutate( UnionDecl * unionDecl ) {
 			stripGenericMembers( unionDecl );
-			return unionDecl;
-		}
-
-		TypeDecl * Pass3::mutate( TypeDecl *typeDecl ) {
-//   Initializer *init = 0;
-//   std::list< Expression *> designators;
-//   addToTyVarMap( typeDecl, scopeTyVars );
-//   if ( typeDecl->get_base() ) {
-//     init = new SimpleInit( new SizeofExpr( handleDecl( typeDecl, typeDecl->get_base() ) ), designators );
-//   }
-//   return new ObjectDecl( typeDecl->get_name(), Declaration::Extern, LinkageSpec::C, 0, new BasicType( Type::Qualifiers(), BasicType::UnsignedInt ), init );
-
+		}
+
+		void Pass3::premutate( TypeDecl * typeDecl ) {
 			addToTyVarMap( typeDecl, scopeTyVars );
-			return dynamic_cast<TypeDecl*>( Mutator::mutate( typeDecl ) );
-		}
-
-		Type * Pass3::mutate( PointerType *pointerType ) {
-			scopeTyVars.beginScope();
+		}
+
+		void Pass3::premutate( PointerType * pointerType ) {
+			GuardScope( scopeTyVars );
 			makeTyVarMap( pointerType, scopeTyVars );
-
-			Type *ret = Mutator::mutate( pointerType );
-
-			scopeTyVars.endScope();
-			return ret;
-		}
-
-		Type * Pass3::mutate( FunctionType *functionType ) {
-			scopeTyVars.beginScope();
+		}
+
+		void Pass3::premutate( FunctionType * functionType ) {
+			GuardScope( scopeTyVars );
 			makeTyVarMap( functionType, scopeTyVars );
-
-			Type *ret = Mutator::mutate( functionType );
-
-			scopeTyVars.endScope();
-			return ret;
 		}
 	} // anonymous namespace
Index: src/GenPoly/DeclMutator.cc
===================================================================
--- src/GenPoly/DeclMutator.cc	(revision 201aeb9b7c42eb7c7aa8bc065247bffda4932b33)
+++ 	(revision )
@@ -1,195 +1,0 @@
-//
-// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
-//
-// The contents of this file are covered under the licence agreement in the
-// file "LICENCE" distributed with Cforall.
-//
-// DeclMutator.cc --
-//
-// Author           : Aaron B. Moss
-// Created On       : Fri Nov 27 14:44:00 2015
-// Last Modified By : Andrew Beach
-// Last Modified On : Thu Jun 22 13:49:00 2017
-// Update Count     : 4
-//
-
-#include "DeclMutator.h"
-
-#include <memory>                  // for allocator_traits<>::value_type
-
-#include "Common/SemanticError.h"  // for SemanticError
-#include "SynTree/Declaration.h"   // for Declaration
-#include "SynTree/Expression.h"    // for Expression
-#include "SynTree/Label.h"         // for Label, noLabels
-#include "SynTree/Statement.h"     // for CatchStmt, Statement, CompoundStmt
-
-namespace GenPoly {
-	DeclMutator::DeclMutator() : Mutator(), declsToAdd(1), declsToAddAfter(1) {}
-
-	DeclMutator::~DeclMutator() {}
-
-	void DeclMutator::mutateDeclarationList( std::list< Declaration* > &decls ) {
-		for ( std::list< Declaration* >::iterator decl = decls.begin(); ; ++decl ) {
-			// splice in new declarations after previous decl
-			decls.splice( decl, declsToAddAfter.back() );
-
-			if ( decl == decls.end() ) break;
-
-			// run mutator on declaration
-			*decl = maybeMutate( *decl, *this );
-
-			// splice in new declarations before current decl
-			decls.splice( decl, declsToAdd.back() );
-		}
-	}
-
-	void DeclMutator::doBeginScope() {
-		// add new decl lists for inside of scope
-		declsToAdd.resize( declsToAdd.size()+1 );
-		declsToAddAfter.resize( declsToAddAfter.size()+1 );
-	}
-
-	void DeclMutator::doEndScope() {
-		// splice any leftover declarations from this scope onto the containing scope
-		std::vector< std::list< Declaration* > >::reverse_iterator back = declsToAdd.rbegin();
-		std::vector< std::list< Declaration* > >::reverse_iterator newBack = back + 1;
-		newBack->splice( newBack->end(), *back );
-		declsToAdd.pop_back();
-
-		back = declsToAddAfter.rbegin();
-		newBack = back + 1;
-		newBack->splice( newBack->end(), *back );
-		declsToAddAfter.pop_back();
-	}
-
-	Statement* DeclMutator::mutateStatement( Statement *stmt ) {
-		// shunt over to compound statement handling if applicable
-		CompoundStmt *compoundStmt = dynamic_cast< CompoundStmt* >(stmt);
-		if ( compoundStmt ) return mutate( compoundStmt );
-
-		doBeginScope();
-
-		// run mutator on statement
-		stmt = maybeMutate( stmt, *this );
-		// return if no declarations to add
-		if ( declsToAdd.back().empty() && declsToAddAfter.back().empty() ) {
-			doEndScope();
-			return stmt;
-		}
-
-		// otherwise add declarations to new compound statement
-		CompoundStmt *compound = new CompoundStmt( noLabels );
-		for ( std::list< Declaration* >::iterator decl = declsToAdd.back().begin(); decl != declsToAdd.back().end(); ++decl ) {
-			DeclStmt *declStmt = new DeclStmt( noLabels, *decl );
-			compound->get_kids().push_back( declStmt );
-		}
-		declsToAdd.back().clear();
-
-		// add mutated statement
-		compound->get_kids().push_back( stmt );
-
-		// add declarations after to new compound statement
-		for ( std::list< Declaration* >::iterator decl = declsToAddAfter.back().begin(); decl != declsToAddAfter.back().end(); ++decl ) {
-			DeclStmt *declStmt = new DeclStmt( noLabels, *decl );
-			compound->get_kids().push_back( declStmt );
-		}
-		declsToAddAfter.back().clear();
-
-		doEndScope();
-		return compound;
-	}
-
-	void DeclMutator::mutateStatementList( std::list< Statement* > &stmts ) {
-		doBeginScope();
-
-
-		for ( std::list< Statement* >::iterator stmt = stmts.begin(); ; ++stmt ) {
-			// add any new declarations after the previous statement
-			for ( std::list< Declaration* >::iterator decl = declsToAddAfter.back().begin(); decl != declsToAddAfter.back().end(); ++decl ) {
-				DeclStmt *declStmt = new DeclStmt( noLabels, *decl );
-				stmts.insert( stmt, declStmt );
-			}
-			declsToAddAfter.back().clear();
-
-			if ( stmt == stmts.end() ) break;
-
-			// run mutator on statement
-			*stmt = maybeMutate( *stmt, *this );
-
-			// add any new declarations before the statement
-			for ( std::list< Declaration* >::iterator decl = declsToAdd.back().begin(); decl != declsToAdd.back().end(); ++decl ) {
-				DeclStmt *declStmt = new DeclStmt( noLabels, *decl );
-				stmts.insert( stmt, declStmt );
-			}
-			declsToAdd.back().clear();
-		}
-
-		doEndScope();
-	}
-
-	void DeclMutator::addDeclaration( Declaration *decl ) {
-		declsToAdd.back().push_back( decl );
-	}
-
-	void DeclMutator::addDeclarationAfter( Declaration *decl ) {
-		declsToAddAfter.back().push_back( decl );
-	}
-
-	CompoundStmt* DeclMutator::mutate(CompoundStmt *compoundStmt) {
-		mutateStatementList( compoundStmt->get_kids() );
-		return compoundStmt;
-	}
-
-	Statement* DeclMutator::mutate(IfStmt *ifStmt) {
-		ifStmt->set_condition( maybeMutate( ifStmt->get_condition(), *this ) );
-		ifStmt->set_thenPart( mutateStatement( ifStmt->get_thenPart() ) );
-		ifStmt->set_elsePart( mutateStatement( ifStmt->get_elsePart() ) );
-		return ifStmt;
-	}
-
-	Statement* DeclMutator::mutate(WhileStmt *whileStmt) {
-		whileStmt->set_condition( maybeMutate( whileStmt->get_condition(), *this ) );
-		whileStmt->set_body(  mutateStatement( whileStmt->get_body() ) );
-		return whileStmt;
-	}
-
-	Statement* DeclMutator::mutate(ForStmt *forStmt) {
-		mutateAll( forStmt->get_initialization(), *this );
-		forStmt->set_condition(  maybeMutate( forStmt->get_condition(), *this ) );
-		forStmt->set_increment(  maybeMutate( forStmt->get_increment(), *this ) );
-		forStmt->set_body(  mutateStatement( forStmt->get_body() ) );
-		return forStmt;
-	}
-
-	Statement* DeclMutator::mutate(SwitchStmt *switchStmt) {
-		switchStmt->set_condition( maybeMutate( switchStmt->get_condition(), *this ) );
-		mutateAll( switchStmt->get_statements(), *this );
-		return switchStmt;
-	}
-
-	Statement* DeclMutator::mutate(CaseStmt *caseStmt) {
-		caseStmt->set_condition( maybeMutate( caseStmt->get_condition(), *this ) );
-		mutateAll( caseStmt->get_statements(), *this );
-		return caseStmt;
-	}
-
-	Statement* DeclMutator::mutate(TryStmt *tryStmt) {
-		tryStmt->set_block( maybeMutate( tryStmt->get_block(), *this ) );
-		mutateAll( tryStmt->get_catchers(), *this );
-		tryStmt->set_finally( maybeMutate( tryStmt->get_finally(), *this ) );
-		return tryStmt;
-	}
-
-	Statement* DeclMutator::mutate(CatchStmt *catchStmt) {
-		catchStmt->set_decl( maybeMutate( catchStmt->get_decl(), *this ) );
-		catchStmt->set_cond( maybeMutate( catchStmt->get_cond(), *this ) );
-		catchStmt->set_body( mutateStatement( catchStmt->get_body() ) );
-		return catchStmt;
-	}
-}  // namespace GenPoly
-
-// Local Variables: //
-// tab-width: 4 //
-// mode: c++ //
-// compile-command: "make install" //
-// End: //
Index: src/GenPoly/DeclMutator.h
===================================================================
--- src/GenPoly/DeclMutator.h	(revision 201aeb9b7c42eb7c7aa8bc065247bffda4932b33)
+++ 	(revision )
@@ -1,71 +1,0 @@
-//
-// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
-//
-// The contents of this file are covered under the licence agreement in the
-// file "LICENCE" distributed with Cforall.
-//
-// DeclMutator.h --
-//
-// Author           : Aaron B. Moss
-// Created On       : Fri Nov 27 14:44:00 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Sat Jul 22 09:21:12 2017
-// Update Count     : 4
-//
-
-#pragma once
-
-#include <list>               // for list
-#include <vector>             // for vector
-
-#include "SynTree/Mutator.h"  // for Mutator
-#include "SynTree/SynTree.h"  // for Visitor Nodes
-
-namespace GenPoly {
-	/// Mutates a list of declarations, providing a means of adding new declarations into the list
-	class DeclMutator : public Mutator {
-	  public:
-		typedef Mutator Parent;
-
-		DeclMutator();
-		virtual ~DeclMutator();
-
-		using Parent::mutate;
-		virtual CompoundStmt* mutate(CompoundStmt *compoundStmt);
-		virtual Statement* mutate(IfStmt *ifStmt);
-		virtual Statement* mutate(WhileStmt *whileStmt);
-		virtual Statement* mutate(ForStmt *forStmt);
-		virtual Statement* mutate(SwitchStmt *switchStmt);
-		virtual Statement* mutate(CaseStmt *caseStmt);
-		virtual Statement* mutate(TryStmt *tryStmt);
-		virtual Statement* mutate(CatchStmt *catchStmt);
-
-		/// Mutates a list of declarations with this visitor
-		void mutateDeclarationList(std::list< Declaration* >& decls);
-
-		/// Called on entry to a new scope; overriders should call this as a super-class call
-		virtual void doBeginScope();
-		/// Called on exit from a scope; overriders should call this as a super-class call
-		virtual void doEndScope();
-	  protected:
-		/// Mutate a statement that forms its own scope
-		Statement* mutateStatement( Statement *stmt );
-		/// Mutate a list of statements that form a scope
-		void mutateStatementList( std::list< Statement* > &stmts );
-		/// Add a declaration to the list to be added before the current position
-		void addDeclaration( Declaration* decl );
-		/// Add a declaration to the list to be added after the current position
-		void addDeclarationAfter( Declaration* decl );
-	  private:
-		/// A stack of declarations to add before the current declaration or statement
-		std::vector< std::list< Declaration* > > declsToAdd;
-		/// A stack of declarations to add after the current declaration or statement
-		std::vector< std::list< Declaration* > > declsToAddAfter;
-	};
-} // namespace
-
-// Local Variables: //
-// tab-width: 4 //
-// mode: c++ //
-// compile-command: "make install" //
-// End: //
Index: src/GenPoly/PolyMutator.cc
===================================================================
--- src/GenPoly/PolyMutator.cc	(revision 201aeb9b7c42eb7c7aa8bc065247bffda4932b33)
+++ 	(revision )
@@ -1,187 +1,0 @@
-//
-// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
-//
-// The contents of this file are covered under the licence agreement in the
-// file "LICENCE" distributed with Cforall.
-//
-// PolyMutator.cc --
-//
-// Author           : Richard C. Bilson
-// Created On       : Mon May 18 07:44:20 2015
-// Last Modified By : Andrew Beach
-// Last Modified On : Thu Jun 22 13:47:00 2017
-// Update Count     : 17
-//
-
-#include "PolyMutator.h"
-
-#include "Common/SemanticError.h"  // for SemanticError
-#include "Common/utility.h"        // for ValueGuard
-#include "SynTree/Declaration.h"   // for Declaration, TypeDecl, TypeDecl::Data
-#include "SynTree/Expression.h"    // for Expression, UntypedExpr, StmtExpr ...
-#include "SynTree/Initializer.h"   // for SingleInit, Initializer (ptr only)
-#include "SynTree/Label.h"         // for Label, noLabels
-#include "SynTree/Mutator.h"       // for maybeMutate, mutateAll
-#include "SynTree/Statement.h"     // for CatchStmt, CompoundStmt, ForStmt
-
-class TypeSubstitution;
-
-namespace GenPoly {
-	PolyMutator::PolyMutator() : scopeTyVars( TypeDecl::Data{} ), env( 0 ) {}
-
-	void PolyMutator::mutateStatementList( std::list< Statement* > &statements ) {
-		SemanticError errors;
-
-		for ( std::list< Statement* >::iterator i = statements.begin(); i != statements.end(); ++i ) {
-			if ( ! stmtsToAddAfter.empty() ) {
-				statements.splice( i, stmtsToAddAfter );
-			} // if
-			try {
-				*i = (*i)->acceptMutator( *this );
-			} catch ( SemanticError &e ) {
-				errors.append( e );
-			} // try
-			if ( ! stmtsToAdd.empty() ) {
-				statements.splice( i, stmtsToAdd );
-			} // if
-		} // for
-		if ( ! stmtsToAddAfter.empty() ) {
-			statements.splice( statements.end(), stmtsToAddAfter );
-		} // if
-		if ( ! errors.isEmpty() ) {
-			throw errors;
-		}
-	}
-
-	Statement * PolyMutator::mutateStatement( Statement *stmt ) {
-		// don't want statements from outer CompoundStmts to be added to this CompoundStmt
-		ValueGuard< std::list< Statement* > > oldStmtsToAdd( stmtsToAdd );
-		ValueGuard< std::list< Statement* > > oldStmtsToAddAfter( stmtsToAddAfter );
-		ValueGuard< TypeSubstitution * > oldEnv( env );
-		stmtsToAdd.clear();
-		stmtsToAddAfter.clear();
-
-		Statement *newStmt = maybeMutate( stmt, *this );
-		if ( ! stmtsToAdd.empty() || ! stmtsToAddAfter.empty() ) {
-			CompoundStmt *compound = new CompoundStmt( noLabels );
-			compound->get_kids().splice( compound->get_kids().end(), stmtsToAdd );
-			compound->get_kids().push_back( newStmt );
-			compound->get_kids().splice( compound->get_kids().end(), stmtsToAddAfter );
-			// doEndScope();
-			return compound;
-		} else {
-			return newStmt;
-		}
-	}
-
-	Expression * PolyMutator::mutateExpression( Expression *expr ) {
-		if ( expr ) {
-			if ( expr->get_env() ) {
-				env = expr->get_env();
-			}
-			// xxx - should env be cloned (or moved) onto the result of the mutate?
-			return expr->acceptMutator( *this );
-		} else {
-			return expr;
-		}
-	}
-
-	CompoundStmt * PolyMutator::mutate(CompoundStmt *compoundStmt) {
-		doBeginScope();
-		mutateStatementList( compoundStmt->get_kids() );
-		doEndScope();
-		return compoundStmt;
-	}
-
-	Statement * PolyMutator::mutate(IfStmt *ifStmt) {
-		ifStmt->set_condition(  mutateExpression( ifStmt->get_condition() ) );
-		ifStmt->set_thenPart(  mutateStatement( ifStmt->get_thenPart() ) );
-		ifStmt->set_elsePart(  mutateStatement( ifStmt->get_elsePart() ) );
-		return ifStmt;
-	}
-
-	Statement * PolyMutator::mutate(WhileStmt *whileStmt) {
-		whileStmt->set_condition(  mutateExpression( whileStmt->get_condition() ) );
-		whileStmt->set_body(  mutateStatement( whileStmt->get_body() ) );
-		return whileStmt;
-	}
-
-	Statement * PolyMutator::mutate(ForStmt *forStmt) {
-		mutateAll( forStmt->get_initialization(), *this );
-		forStmt->set_condition(  mutateExpression( forStmt->get_condition() ) );
-		forStmt->set_increment(  mutateExpression( forStmt->get_increment() ) );
-		forStmt->set_body(  mutateStatement( forStmt->get_body() ) );
-		return forStmt;
-	}
-
-	Statement * PolyMutator::mutate(SwitchStmt *switchStmt) {
-		switchStmt->set_condition( mutateExpression( switchStmt->get_condition() ) );
-		mutateStatementList( switchStmt->get_statements() );
-		return switchStmt;
-	}
-
-	Statement * PolyMutator::mutate(CaseStmt *caseStmt) {
-		caseStmt->set_condition(  mutateExpression( caseStmt->get_condition() ) );
-		mutateStatementList( caseStmt->get_statements() );
-		return caseStmt;
-	}
-
-	Statement * PolyMutator::mutate(TryStmt *tryStmt) {
-		tryStmt->set_block( maybeMutate( tryStmt->get_block(), *this ) );
-		mutateAll( tryStmt->get_catchers(), *this );
-		tryStmt->set_finally( maybeMutate( tryStmt->get_finally(), *this ) );
-		return tryStmt;
-	}
-
-	Statement * PolyMutator::mutate(CatchStmt *cathStmt) {
-		cathStmt->set_body( mutateStatement( cathStmt->get_body() ) );
-		cathStmt->set_cond( maybeMutate( cathStmt->get_cond(), *this ) );
-		cathStmt->set_decl( maybeMutate( cathStmt->get_decl(), *this ) );
-		return cathStmt;
-	}
-
-	Statement * PolyMutator::mutate(ReturnStmt *retStmt) {
-		retStmt->set_expr( mutateExpression( retStmt->get_expr() ) );
-		return retStmt;
-	}
-
-	Statement * PolyMutator::mutate(ExprStmt *exprStmt) {
-		exprStmt->set_expr( mutateExpression( exprStmt->get_expr() ) );
-		return exprStmt;
-	}
-
-
-	Expression * PolyMutator::mutate(UntypedExpr *untypedExpr) {
-		for ( std::list< Expression* >::iterator i = untypedExpr->get_args().begin(); i != untypedExpr->get_args().end(); ++i ) {
-			*i = mutateExpression( *i );
-		} // for
-		return untypedExpr;
-	}
-
-	Expression *PolyMutator::mutate( StmtExpr * stmtExpr ) {
-		// don't want statements from outer CompoundStmts to be added to this StmtExpr
-		ValueGuard< std::list< Statement* > > oldStmtsToAdd( stmtsToAdd );
-		ValueGuard< std::list< Statement* > > oldStmtsToAddAfter( stmtsToAddAfter );
-		ValueGuard< TypeSubstitution * > oldEnv( env );
-
-		// xxx - not sure if this is needed, along with appropriate reset, but I don't think so...
-		// ValueGuard< TyVarMap > oldScopeTyVars( scopeTyVars );
-
-		stmtsToAdd.clear();
-		stmtsToAddAfter.clear();
-		// scopeTyVars.clear();
-
-		return Parent::mutate( stmtExpr );
-	}
-
-	Initializer *PolyMutator::mutate( SingleInit *singleInit ) {
-		singleInit->set_value( mutateExpression( singleInit->get_value() ) );
-		return singleInit;
-	}
-} // namespace GenPoly
-
-// Local Variables: //
-// tab-width: 4 //
-// mode: c++ //
-// compile-command: "make install" //
-// End: //
Index: src/GenPoly/PolyMutator.h
===================================================================
--- src/GenPoly/PolyMutator.h	(revision 201aeb9b7c42eb7c7aa8bc065247bffda4932b33)
+++ 	(revision )
@@ -1,67 +1,0 @@
-//
-// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
-//
-// The contents of this file are covered under the licence agreement in the
-// file "LICENCE" distributed with Cforall.
-//
-// PolyMutator.h --
-//
-// Author           : Richard C. Bilson
-// Created On       : Mon May 18 07:44:20 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Sat Jul 22 09:20:31 2017
-// Update Count     : 7
-//
-
-#pragma once
-
-#include <list>               // for list
-
-#include "GenPoly.h"          // for TyVarMap
-#include "SynTree/Mutator.h"  // for Mutator
-#include "SynTree/SynTree.h"  // for Visitor Nodes
-
-namespace GenPoly {
-	class PolyMutator : public Mutator {
-	  public:
-		typedef Mutator Parent;
-		using Parent::mutate;
-
-		PolyMutator();
-
-		virtual CompoundStmt* mutate(CompoundStmt *compoundStmt);
-		virtual Statement* mutate(IfStmt *ifStmt);
-		virtual Statement* mutate(WhileStmt *whileStmt);
-		virtual Statement* mutate(ForStmt *forStmt);
-		virtual Statement* mutate(SwitchStmt *switchStmt);
-		virtual Statement* mutate(CaseStmt *caseStmt);
-		virtual Statement* mutate(TryStmt *returnStmt);
-		virtual Statement* mutate(CatchStmt *catchStmt);
-		virtual Statement* mutate(ExprStmt *catchStmt);
-		virtual Statement* mutate(ReturnStmt *catchStmt);
-
-		virtual Expression* mutate(UntypedExpr *untypedExpr);
-		virtual Expression* mutate( StmtExpr *stmtExpr );
-
-		virtual Initializer* mutate(SingleInit *SingleInit);
-
-		// template method
-		virtual void doBeginScope() {}
-		virtual void doEndScope() {}
-	  protected:
-		void mutateStatementList( std::list< Statement* > &statements );
-		Statement* mutateStatement( Statement *stmt );
-		Expression* mutateExpression( Expression *expr );
-
-		TyVarMap scopeTyVars;
-		TypeSubstitution *env;
-		std::list< Statement* > stmtsToAdd;
-		std::list< Statement* > stmtsToAddAfter;
-	};
-} // namespace
-
-// Local Variables: //
-// tab-width: 4 //
-// mode: c++ //
-// compile-command: "make install" //
-// End: //
Index: src/GenPoly/Specialize.cc
===================================================================
--- src/GenPoly/Specialize.cc	(revision 201aeb9b7c42eb7c7aa8bc065247bffda4932b33)
+++ src/GenPoly/Specialize.cc	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -22,4 +22,5 @@
 #include <utility>                       // for pair
 
+#include "Common/PassVisitor.h"
 #include "Common/SemanticError.h"        // for SemanticError
 #include "Common/UniqueName.h"           // for UniqueName
@@ -28,5 +29,4 @@
 #include "InitTweak/InitTweak.h"         // for isIntrinsicCallExpr
 #include "Parser/LinkageSpec.h"          // for C
-#include "PolyMutator.h"                 // for PolyMutator
 #include "ResolvExpr/FindOpenVars.h"     // for findOpenVars
 #include "ResolvExpr/TypeEnvironment.h"  // for OpenVarSet, AssertionSet
@@ -43,13 +43,8 @@
 
 namespace GenPoly {
-	class Specialize final : public PolyMutator {
-	  public:
-		using PolyMutator::mutate;
-		virtual Expression * mutate( ApplicationExpr *applicationExpr ) override;
-		virtual Expression * mutate( AddressExpr *castExpr ) override;
-		virtual Expression * mutate( CastExpr *castExpr ) override;
-		// virtual Expression * mutate( LogicalExpr *logicalExpr );
-		// virtual Expression * mutate( ConditionalExpr *conditionalExpr );
-		// virtual Expression * mutate( CommaExpr *commaExpr );
+	struct Specialize final : public WithTypeSubstitution, public WithStmtsToAdd, public WithVisitorRef<Specialize> {
+		Expression * postmutate( ApplicationExpr *applicationExpr );
+		Expression * postmutate( AddressExpr *castExpr );
+		Expression * postmutate( CastExpr *castExpr );
 
 		void handleExplicitParams( ApplicationExpr *appExpr );
@@ -204,11 +199,11 @@
 	}
 
-	struct EnvTrimmer : public Visitor {
+	struct EnvTrimmer {
 		TypeSubstitution * env, * newEnv;
 		EnvTrimmer( TypeSubstitution * env, TypeSubstitution * newEnv ) : env( env ), newEnv( newEnv ){}
-		virtual void visit( TypeDecl * tyDecl ) {
+		void previsit( TypeDecl * tyDecl ) {
 			// transfer known bindings for seen type variables
-			if ( Type * t = env->lookup( tyDecl->get_name() ) ) {
-				newEnv->add( tyDecl->get_name(), t );
+			if ( Type * t = env->lookup( tyDecl->name ) ) {
+				newEnv->add( tyDecl->name, t );
 			}
 		}
@@ -219,5 +214,5 @@
 		if ( env ) {
 			TypeSubstitution * newEnv = new TypeSubstitution();
-			EnvTrimmer trimmer( env, newEnv );
+			PassVisitor<EnvTrimmer> trimmer( env, newEnv );
 			expr->accept( trimmer );
 			return newEnv;
@@ -277,25 +272,25 @@
 		std::string oldParamPrefix = paramPrefix;
 		paramPrefix += "p";
-		// save stmtsToAdd in oldStmts
+		// save stmtsToAddBefore in oldStmts
 		std::list< Statement* > oldStmts;
-		oldStmts.splice( oldStmts.end(), stmtsToAdd );
-		mutate( appExpr );
+		oldStmts.splice( oldStmts.end(), stmtsToAddBefore );
+		appExpr->acceptMutator( *visitor );
 		paramPrefix = oldParamPrefix;
 		// write any statements added for recursive specializations into the thunk body
-		thunkFunc->get_statements()->get_kids().splice( thunkFunc->get_statements()->get_kids().end(), stmtsToAdd );
-		// restore oldStmts into stmtsToAdd
-		stmtsToAdd.splice( stmtsToAdd.end(), oldStmts );
+		thunkFunc->statements->kids.splice( thunkFunc->statements->kids.end(), stmtsToAddBefore );
+		// restore oldStmts into stmtsToAddBefore
+		stmtsToAddBefore.splice( stmtsToAddBefore.end(), oldStmts );
 
 		// add return (or valueless expression) to the thunk
 		Statement *appStmt;
-		if ( funType->get_returnVals().empty() ) {
+		if ( funType->returnVals.empty() ) {
 			appStmt = new ExprStmt( noLabels, appExpr );
 		} else {
 			appStmt = new ReturnStmt( noLabels, appExpr );
 		} // if
-		thunkFunc->get_statements()->get_kids().push_back( appStmt );
+		thunkFunc->statements->kids.push_back( appStmt );
 
 		// add thunk definition to queue of statements to add
-		stmtsToAdd.push_back( new DeclStmt( noLabels, thunkFunc ) );
+		stmtsToAddBefore.push_back( new DeclStmt( noLabels, thunkFunc ) );
 		// return address of thunk function as replacement expression
 		return new AddressExpr( new VariableExpr( thunkFunc ) );
@@ -304,18 +299,15 @@
 	void Specialize::handleExplicitParams( ApplicationExpr *appExpr ) {
 		// create thunks for the explicit parameters
-		assert( appExpr->get_function()->has_result() );
-		FunctionType *function = getFunctionType( appExpr->get_function()->get_result() );
+		assert( appExpr->function->result );
+		FunctionType *function = getFunctionType( appExpr->function->result );
 		assert( function );
 		std::list< DeclarationWithType* >::iterator formal;
 		std::list< Expression* >::iterator actual;
 		for ( formal = function->get_parameters().begin(), actual = appExpr->get_args().begin(); formal != function->get_parameters().end() && actual != appExpr->get_args().end(); ++formal, ++actual ) {
-			*actual = doSpecialization( (*formal )->get_type(), *actual, &appExpr->get_inferParams() );
-		}
-	}
-
-	Expression * Specialize::mutate( ApplicationExpr *appExpr ) {
-		appExpr->get_function()->acceptMutator( *this );
-		mutateAll( appExpr->get_args(), *this );
-
+			*actual = doSpecialization( (*formal)->get_type(), *actual, &appExpr->get_inferParams() );
+		}
+	}
+
+	Expression * Specialize::postmutate( ApplicationExpr *appExpr ) {
 		if ( ! InitTweak::isIntrinsicCallExpr( appExpr ) ) {
 			// create thunks for the inferred parameters
@@ -331,19 +323,17 @@
 	}
 
-	Expression * Specialize::mutate( AddressExpr *addrExpr ) {
-		addrExpr->get_arg()->acceptMutator( *this );
-		assert( addrExpr->has_result() );
-		addrExpr->set_arg( doSpecialization( addrExpr->get_result(), addrExpr->get_arg() ) );
+	Expression * Specialize::postmutate( AddressExpr *addrExpr ) {
+		assert( addrExpr->result );
+		addrExpr->set_arg( doSpecialization( addrExpr->result, addrExpr->arg ) );
 		return addrExpr;
 	}
 
-	Expression * Specialize::mutate( CastExpr *castExpr ) {
-		castExpr->get_arg()->acceptMutator( *this );
-		if ( castExpr->get_result()->isVoid() ) {
+	Expression * Specialize::postmutate( CastExpr *castExpr ) {
+		if ( castExpr->result->isVoid() ) {
 			// can't specialize if we don't have a return value
 			return castExpr;
 		}
-		Expression *specialized = doSpecialization( castExpr->get_result(), castExpr->get_arg() );
-		if ( specialized != castExpr->get_arg() ) {
+		Expression *specialized = doSpecialization( castExpr->result, castExpr->arg );
+		if ( specialized != castExpr->arg ) {
 			// assume here that the specialization incorporates the cast
 			return specialized;
@@ -353,22 +343,6 @@
 	}
 
-	// Removing these for now. Richard put these in for some reason, but it's not clear why.
-	// In particular, copy constructors produce a comma expression, and with this code the parts
-	// of that comma expression are not specialized, which causes problems.
-
-	// Expression * Specialize::mutate( LogicalExpr *logicalExpr ) {
-	// 	return logicalExpr;
-	// }
-
-	// Expression * Specialize::mutate( ConditionalExpr *condExpr ) {
-	// 	return condExpr;
-	// }
-
-	// Expression * Specialize::mutate( CommaExpr *commaExpr ) {
-	// 	return commaExpr;
-	// }
-
 	void convertSpecializations( std::list< Declaration* >& translationUnit ) {
-		Specialize spec;
+		PassVisitor<Specialize> spec;
 		mutateAll( translationUnit, spec );
 	}
Index: src/GenPoly/module.mk
===================================================================
--- src/GenPoly/module.mk	(revision 201aeb9b7c42eb7c7aa8bc065247bffda4932b33)
+++ src/GenPoly/module.mk	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -6,5 +6,5 @@
 ## file "LICENCE" distributed with Cforall.
 ##
-## module.mk -- 
+## module.mk --
 ##
 ## Author           : Richard C. Bilson
@@ -17,5 +17,4 @@
 SRC += GenPoly/Box.cc \
        GenPoly/GenPoly.cc \
-       GenPoly/PolyMutator.cc \
        GenPoly/ScrubTyVars.cc \
        GenPoly/Lvalue.cc \
@@ -23,4 +22,3 @@
        GenPoly/CopyParams.cc \
        GenPoly/FindFunction.cc \
-       GenPoly/DeclMutator.cc \
        GenPoly/InstantiateGeneric.cc
Index: src/InitTweak/FixInit.cc
===================================================================
--- src/InitTweak/FixInit.cc	(revision 201aeb9b7c42eb7c7aa8bc065247bffda4932b33)
+++ src/InitTweak/FixInit.cc	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -36,7 +36,5 @@
 #include "FixGlobalInit.h"             // for fixGlobalInit
 #include "GenInit.h"                   // for genCtorDtor
-#include "GenPoly/DeclMutator.h"       // for DeclMutator
 #include "GenPoly/GenPoly.h"           // for getFunctionType
-#include "GenPoly/PolyMutator.h"       // for PolyMutator
 #include "InitTweak.h"                 // for getFunctionName, getCallArg
 #include "Parser/LinkageSpec.h"        // for C, Spec, Cforall, isBuiltin
@@ -46,5 +44,4 @@
 #include "SymTab/Indexer.h"            // for Indexer
 #include "SymTab/Mangler.h"            // for Mangler
-#include "SynTree/AddStmtVisitor.h"    // for AddStmtVisitor
 #include "SynTree/Attribute.h"         // for Attribute
 #include "SynTree/Constant.h"          // for Constant
@@ -58,5 +55,4 @@
 #include "SynTree/TypeSubstitution.h"  // for TypeSubstitution, operator<<
 #include "SynTree/Visitor.h"           // for acceptAll, maybeAccept
-#include "Tuples/Tuples.h"             // for isTtype
 
 bool ctordtorp = false; // print all debug
@@ -187,5 +183,5 @@
 		};
 
-		class FixCopyCtors final : public GenPoly::PolyMutator {
+		class FixCopyCtors final : public WithStmtsToAdd, public WithShortCircuiting, public WithVisitorRef<FixCopyCtors> {
 		  public:
 			FixCopyCtors( UnqCount & unqCount ) : unqCount( unqCount ){}
@@ -194,9 +190,7 @@
 			static void fixCopyCtors( std::list< Declaration * > &translationUnit, UnqCount & unqCount );
 
-			typedef GenPoly::PolyMutator Parent;
-			using Parent::mutate;
-			virtual Expression * mutate( ImplicitCopyCtorExpr * impCpCtorExpr ) override;
-			virtual Expression * mutate( UniqueExpr * unqExpr ) override;
-			virtual Expression * mutate( StmtExpr * stmtExpr ) override;
+			Expression * postmutate( ImplicitCopyCtorExpr * impCpCtorExpr );
+			void premutate( StmtExpr * stmtExpr );
+			void premutate( UniqueExpr * unqExpr );
 
 			UnqCount & unqCount;
@@ -243,11 +237,9 @@
 		};
 
-		class FixCtorExprs final : public GenPoly::DeclMutator {
-		  public:
+		struct FixCtorExprs final : public WithDeclsToAdd, public WithIndexer {
 			/// expands ConstructorExpr nodes into comma expressions, using a temporary for the first argument
 			static void fix( std::list< Declaration * > & translationUnit );
 
-			using GenPoly::DeclMutator::mutate;
-			virtual Expression * mutate( ConstructorExpr * ctorExpr ) override;
+			Expression * postmutate( ConstructorExpr * ctorExpr );
 		};
 	} // namespace
@@ -316,5 +308,5 @@
 
 		void FixCopyCtors::fixCopyCtors( std::list< Declaration * > & translationUnit, UnqCount & unqCount ) {
-			FixCopyCtors fixer( unqCount );
+			PassVisitor<FixCopyCtors> fixer( unqCount );
 			mutateAll( translationUnit, fixer );
 		}
@@ -326,6 +318,6 @@
 
 		void FixCtorExprs::fix( std::list< Declaration * > & translationUnit ) {
-			FixCtorExprs fixer;
-			fixer.mutateDeclarationList( translationUnit );
+			PassVisitor<FixCtorExprs> fixer;
+			mutateAll( translationUnit, fixer );
 		}
 
@@ -339,5 +331,5 @@
 				} else if ( DeclarationWithType * funcDecl = dynamic_cast< DeclarationWithType * > ( function->get_var() ) ) {
 					FunctionType * ftype = dynamic_cast< FunctionType * >( GenPoly::getFunctionType( funcDecl->get_type() ) );
-					assert( ftype );
+					assertf( ftype, "Function call without function type: %s", toString( funcDecl ).c_str() );
 					if ( CodeGen::isConstructor( funcDecl->get_name() ) && ftype->get_parameters().size() == 2 ) {
 						Type * t1 = getPointerBase( ftype->get_parameters().front()->get_type() );
@@ -368,7 +360,5 @@
 		}
 
-		bool ResolveCopyCtors::skipCopyConstruct( Type * type ) {
-			return dynamic_cast< VarArgsType * >( type ) || dynamic_cast< ReferenceType * >( type ) || GenPoly::getFunctionType( type ) || Tuples::isTtype( type );
-		}
+		bool ResolveCopyCtors::skipCopyConstruct( Type * type ) { return ! isConstructable( type ); }
 
 		Expression * ResolveCopyCtors::makeCtorDtor( const std::string & fname, ObjectDecl * var, Expression * cpArg ) {
@@ -407,5 +397,5 @@
 			result = result->clone();
 			env->apply( result );
-			ObjectDecl * tmp = new ObjectDecl( tempNamer.newName(), Type::StorageClasses(), LinkageSpec::C, 0, result, 0 );
+			ObjectDecl * tmp = ObjectDecl::newObject( "__tmp", result, nullptr );
 			tmp->get_type()->set_const( false );
 
@@ -421,4 +411,7 @@
 				if ( function->get_var()->get_linkage() == LinkageSpec::Intrinsic ) return;
 			}
+
+			// set a unique name for the temporary once it's certain the call is necessary
+			tmp->name = tempNamer.newName();
 
 			// replace argument to function call with temporary
@@ -450,10 +443,10 @@
 				result = result->clone();
 				env->apply( result );
-				ObjectDecl * ret = new ObjectDecl( retNamer.newName(), Type::StorageClasses(), LinkageSpec::C, 0, result, 0 );
+				ObjectDecl * ret = ObjectDecl::newObject( retNamer.newName(), result, nullptr );
 				ret->get_type()->set_const( false );
 				impCpCtorExpr->get_returnDecls().push_back( ret );
 				CP_CTOR_PRINT( std::cerr << "makeCtorDtor for a return" << std::endl; )
 				if ( ! dynamic_cast< ReferenceType * >( result ) ) {
-					// destructing lvalue returns is bad because it can cause multiple destructor calls to the same object - the returned object is not a temporary
+					// destructing reference returns is bad because it can cause multiple destructor calls to the same object - the returned object is not a temporary
 					destructRet( ret, impCpCtorExpr );
 				}
@@ -472,5 +465,5 @@
 				result = result->clone();
 				env->apply( result );
-				ObjectDecl * ret = new ObjectDecl( retNamer.newName(), Type::StorageClasses(), LinkageSpec::C, 0, result, 0 );
+				ObjectDecl * ret = ObjectDecl::newObject( retNamer.newName(), result, nullptr );
 				ret->get_type()->set_const( false );
 				stmtExpr->get_returnDecls().push_front( ret );
@@ -509,5 +502,5 @@
 			} else {
 				// expr isn't a call expr, so create a new temporary variable to use to hold the value of the unique expression
-				unqExpr->set_object( new ObjectDecl( toString("_unq", unqExpr->get_id()), Type::StorageClasses(), LinkageSpec::C, nullptr, unqExpr->get_result()->clone(), nullptr ) );
+				unqExpr->set_object( ObjectDecl::newObject( toString("_unq", unqExpr->get_id()), unqExpr->get_result()->clone(), nullptr ) );
 				unqExpr->set_var( new VariableExpr( unqExpr->get_object() ) );
 			}
@@ -515,8 +508,7 @@
 		}
 
-		Expression * FixCopyCtors::mutate( ImplicitCopyCtorExpr * impCpCtorExpr ) {
+		Expression * FixCopyCtors::postmutate( ImplicitCopyCtorExpr * impCpCtorExpr ) {
 			CP_CTOR_PRINT( std::cerr << "FixCopyCtors: " << impCpCtorExpr << std::endl; )
 
-			impCpCtorExpr = strict_dynamic_cast< ImplicitCopyCtorExpr * >( Parent::mutate( impCpCtorExpr ) );
 			std::list< ObjectDecl * > & tempDecls = impCpCtorExpr->get_tempDecls();
 			std::list< ObjectDecl * > & returnDecls = impCpCtorExpr->get_returnDecls();
@@ -525,8 +517,8 @@
 			// add all temporary declarations and their constructors
 			for ( ObjectDecl * obj : tempDecls ) {
-				stmtsToAdd.push_back( new DeclStmt( noLabels, obj ) );
+				stmtsToAddBefore.push_back( new DeclStmt( noLabels, obj ) );
 			} // for
 			for ( ObjectDecl * obj : returnDecls ) {
-				stmtsToAdd.push_back( new DeclStmt( noLabels, obj ) );
+				stmtsToAddBefore.push_back( new DeclStmt( noLabels, obj ) );
 			} // for
 
@@ -536,5 +528,4 @@
 			} // for
 
-			// xxx - update to work with multiple return values
 			ObjectDecl * returnDecl = returnDecls.empty() ? nullptr : returnDecls.front();
 			Expression * callExpr = impCpCtorExpr->get_callExpr();
@@ -569,21 +560,23 @@
 		}
 
-		Expression * FixCopyCtors::mutate( StmtExpr * stmtExpr ) {
+		void FixCopyCtors::premutate( StmtExpr * stmtExpr ) {
 			// function call temporaries should be placed at statement-level, rather than nested inside of a new statement expression,
 			// since temporaries can be shared across sub-expressions, e.g.
 			//   [A, A] f();
 			//   g([A] x, [A] y);
-			//   f(g());
+			//   g(f());
 			// f is executed once, so the return temporary is shared across the tuple constructors for x and y.
+			// Explicitly mutating children instead of mutating the inner compound statment forces the temporaries to be added
+			// to the outer context, rather than inside of the statement expression.
+			visit_children = false;
 			std::list< Statement * > & stmts = stmtExpr->get_statements()->get_kids();
 			for ( Statement *& stmt : stmts ) {
-				stmt = stmt->acceptMutator( *this );
+				stmt = stmt->acceptMutator( *visitor );
 			} // for
-			// stmtExpr = strict_dynamic_cast< StmtExpr * >( Parent::mutate( stmtExpr ) );
 			assert( stmtExpr->get_result() );
 			Type * result = stmtExpr->get_result();
 			if ( ! result->isVoid() ) {
 				for ( ObjectDecl * obj : stmtExpr->get_returnDecls() ) {
-					stmtsToAdd.push_back( new DeclStmt( noLabels, obj ) );
+					stmtsToAddBefore.push_back( new DeclStmt( noLabels, obj ) );
 				} // for
 				// add destructors after current statement
@@ -592,8 +585,7 @@
 				} // for
 				// must have a non-empty body, otherwise it wouldn't have a result
-				CompoundStmt * body = stmtExpr->get_statements();
-				assert( ! body->get_kids().empty() );
+				assert( ! stmts.empty() );
 				assert( ! stmtExpr->get_returnDecls().empty() );
-				body->get_kids().push_back( new ExprStmt( noLabels, new VariableExpr( stmtExpr->get_returnDecls().front() ) ) );
+				stmts.push_back( new ExprStmt( noLabels, new VariableExpr( stmtExpr->get_returnDecls().front() ) ) );
 				stmtExpr->get_returnDecls().clear();
 				stmtExpr->get_dtors().clear();
@@ -601,12 +593,11 @@
 			assert( stmtExpr->get_returnDecls().empty() );
 			assert( stmtExpr->get_dtors().empty() );
-			return stmtExpr;
-		}
-
-		Expression * FixCopyCtors::mutate( UniqueExpr * unqExpr ) {
+		}
+
+		void FixCopyCtors::premutate( UniqueExpr * unqExpr ) {
+			visit_children = false;
 			unqCount[ unqExpr->get_id() ]--;
 			static std::unordered_map< int, std::list< Statement * > > dtors;
 			static std::unordered_map< int, UniqueExpr * > unqMap;
-			static std::unordered_set< int > addDeref;
 			// has to be done to clean up ImplicitCopyCtorExpr nodes, even when this node was skipped in previous passes
 			if ( unqMap.count( unqExpr->get_id() ) ) {
@@ -619,30 +610,16 @@
 					stmtsToAddAfter.splice( stmtsToAddAfter.end(), dtors[ unqExpr->get_id() ] );
 				}
-				if ( addDeref.count( unqExpr->get_id() ) ) {
-					// other UniqueExpr was dereferenced because it was an lvalue return, so this one should be too
-					return UntypedExpr::createDeref( unqExpr );
-				}
-				return unqExpr;
-			}
-			FixCopyCtors fixer( unqCount );
+				return;
+			}
+			PassVisitor<FixCopyCtors> fixer( unqCount );
 			unqExpr->set_expr( unqExpr->get_expr()->acceptMutator( fixer ) ); // stmtexprs contained should not be separately fixed, so this must occur after the lookup
-			stmtsToAdd.splice( stmtsToAdd.end(), fixer.stmtsToAdd );
+			stmtsToAddBefore.splice( stmtsToAddBefore.end(), fixer.pass.stmtsToAddBefore );
 			unqMap[unqExpr->get_id()] = unqExpr;
 			if ( unqCount[ unqExpr->get_id() ] == 0 ) {  // insert destructor after the last use of the unique expression
 				stmtsToAddAfter.splice( stmtsToAddAfter.end(), dtors[ unqExpr->get_id() ] );
 			} else { // remember dtors for last instance of unique expr
-				dtors[ unqExpr->get_id() ] = fixer.stmtsToAddAfter;
-			}
-			if ( UntypedExpr * deref = dynamic_cast< UntypedExpr * >( unqExpr->get_expr() ) ) {
-				// unique expression is now a dereference, because the inner expression is an lvalue returning function call.
-				// Normalize the expression by dereferencing the unique expression, rather than the inner expression
-				// (i.e. move the dereference out a level)
-				assert( getFunctionName( deref ) == "*?" );
-				unqExpr->set_expr( getCallArg( deref, 0 ) );
-				getCallArg( deref, 0 ) = unqExpr;
-				addDeref.insert( unqExpr->get_id() );
-				return deref;
-			}
-			return unqExpr;
+				dtors[ unqExpr->get_id() ] = fixer.pass.stmtsToAddAfter;
+			}
+			return;
 		}
 
@@ -819,7 +796,9 @@
 					assert( ! ctorInit->get_ctor() || ! ctorInit->get_init() );
 					Statement * dtor = ctorInit->get_dtor();
+					// don't need to call intrinsic dtor, because it does nothing, but
+					// non-intrinsic dtors must be called
 					if ( dtor && ! isIntrinsicSingleArgCallStmt( dtor ) ) {
-						// don't need to call intrinsic dtor, because it does nothing, but
-						// non-intrinsic dtors must be called
+						// set dtor location to the object's location for error messages
+						ctorInit->dtor->location = objDecl->location;
 						reverseDeclOrder.front().push_front( objDecl );
 					} // if
@@ -1012,4 +991,6 @@
 					// skip non-DWT members
 					if ( ! field ) continue;
+					// skip non-constructable members
+					if ( ! tryConstruct( field ) ) continue;
 					// skip handled members
 					if ( ! unhandled.count( field ) ) continue;
@@ -1142,5 +1123,5 @@
 		}
 
-		Expression * FixCtorExprs::mutate( ConstructorExpr * ctorExpr ) {
+		Expression * FixCtorExprs::postmutate( ConstructorExpr * ctorExpr ) {
 			static UniqueName tempNamer( "_tmp_ctor_expr" );
 			// xxx - is the size check necessary?
@@ -1148,6 +1129,6 @@
 
 			// xxx - ideally we would reuse the temporary generated from the copy constructor passes from within firstArg if it exists and not generate a temporary if it's unnecessary.
-			ObjectDecl * tmp = new ObjectDecl( tempNamer.newName(), Type::StorageClasses(), LinkageSpec::C, nullptr, ctorExpr->get_result()->clone(), nullptr );
-			addDeclaration( tmp );
+			ObjectDecl * tmp = ObjectDecl::newObject( tempNamer.newName(), ctorExpr->get_result()->clone(), nullptr );
+			declsToAddBefore.push_back( tmp );
 
 			// xxx - this can be TupleAssignExpr now. Need to properly handle this case.
@@ -1158,26 +1139,14 @@
 			delete ctorExpr;
 
+			// build assignment and replace constructor's first argument with new temporary
 			Expression *& firstArg = callExpr->get_args().front();
-
-			// xxx - hack in 'fake' assignment operator until resolver can easily be called in this pass. Once the resolver can be used in PassVisitor, this hack goes away.
-
-			// generate the type of assignment operator using the type of tmp minus any reference types
-			Type * type = tmp->get_type()->stripReferences();
-			FunctionType * ftype = SymTab::genAssignType( type );
-
-			// generate fake assignment decl and call it using &tmp and &firstArg
-			// since tmp is guaranteed to be a reference and we want to assign pointers
-			FunctionDecl * assignDecl = new FunctionDecl( "?=?", Type::StorageClasses(), LinkageSpec::Intrinsic, ftype, nullptr );
-			ApplicationExpr * assign = new ApplicationExpr( VariableExpr::functionPointer( assignDecl ) );
-			assign->get_args().push_back( new AddressExpr( new VariableExpr( tmp ) ) );
-			Expression * addrArg = new AddressExpr( firstArg );
-			// if firstArg has type T&&, then &firstArg has type T*&.
-			// Cast away the reference to a value type so that the argument
-			// matches the assignment's parameter types
-			if ( dynamic_cast<ReferenceType *>( addrArg->get_result() ) ) {
-				addrArg = new CastExpr( addrArg, addrArg->get_result()->stripReferences()->clone() );
-			}
-			assign->get_args().push_back( addrArg );
+			Expression * assign = new UntypedExpr( new NameExpr( "?=?" ), { new AddressExpr( new VariableExpr( tmp ) ), new AddressExpr( firstArg ) } );
 			firstArg = new VariableExpr( tmp );
+
+			// resolve assignment and dispose of new env
+			Expression * resolvedAssign = ResolvExpr::findVoidExpression( assign, indexer );
+			delete resolvedAssign->env;
+			resolvedAssign->env = nullptr;
+			delete assign;
 
 			// for constructor expr:
@@ -1188,5 +1157,5 @@
 			//   T & tmp;
 			//   &tmp = &x, ?{}(tmp), tmp
-			CommaExpr * commaExpr = new CommaExpr( assign, new CommaExpr( callExpr, new VariableExpr( tmp ) ) );
+			CommaExpr * commaExpr = new CommaExpr( resolvedAssign, new CommaExpr( callExpr, new VariableExpr( tmp ) ) );
 			commaExpr->set_env( env );
 			return commaExpr;
Index: src/InitTweak/GenInit.cc
===================================================================
--- src/InitTweak/GenInit.cc	(revision 201aeb9b7c42eb7c7aa8bc065247bffda4932b33)
+++ src/InitTweak/GenInit.cc	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -26,5 +26,4 @@
 #include "Common/UniqueName.h"     // for UniqueName
 #include "Common/utility.h"        // for ValueGuard, maybeClone
-#include "GenPoly/DeclMutator.h"   // for DeclMutator
 #include "GenPoly/GenPoly.h"       // for getFunctionType, isPolyType
 #include "GenPoly/ScopedSet.h"     // for ScopedSet, ScopedSet<>::const_iter...
@@ -62,5 +61,5 @@
 	};
 
-	struct CtorDtor : public WithGuards, public WithShortCircuiting  {
+	struct CtorDtor : public WithGuards, public WithShortCircuiting, public WithVisitorRef<CtorDtor>  {
 		/// create constructor and destructor statements for object declarations.
 		/// the actual call statements will be added in after the resolver has run
@@ -75,10 +74,7 @@
 		// that need to be constructed or destructed
 		void previsit( StructDecl *aggregateDecl );
-		void previsit( __attribute__((unused)) UnionDecl    * aggregateDecl ) { visit_children = false; }
-		void previsit( __attribute__((unused)) EnumDecl     * aggregateDecl ) { visit_children = false; }
-		void previsit( __attribute__((unused)) TraitDecl    * aggregateDecl ) { visit_children = false; }
-		void previsit( __attribute__((unused)) TypeDecl     * typeDecl )      { visit_children = false; }
-		void previsit( __attribute__((unused)) TypedefDecl  * typeDecl )      { visit_children = false; }
-		void previsit( __attribute__((unused)) FunctionType * funcType )      { visit_children = false; }
+		void previsit( AggregateDecl * ) { visit_children = false; }
+		void previsit( NamedTypeDecl * ) { visit_children = false; }
+		void previsit( FunctionType * ) { visit_children = false; }
 
 		void previsit( CompoundStmt * compoundStmt );
@@ -96,8 +92,5 @@
 	};
 
-	class HoistArrayDimension final : public GenPoly::DeclMutator {
-	  public:
-		typedef GenPoly::DeclMutator Parent;
-
+	struct HoistArrayDimension final : public WithDeclsToAdd, public WithShortCircuiting, public WithGuards {
 		/// hoist dimension from array types in object declaration so that it uses a single
 		/// const variable of type size_t, so that side effecting array dimensions are only
@@ -105,19 +98,12 @@
 		static void hoistArrayDimension( std::list< Declaration * > & translationUnit );
 
-	  private:
-		using Parent::mutate;
-
-		virtual DeclarationWithType * mutate( ObjectDecl * objectDecl ) override;
-		virtual DeclarationWithType * mutate( FunctionDecl *functionDecl ) override;
+		void premutate( ObjectDecl * objectDecl );
+		DeclarationWithType * postmutate( ObjectDecl * objectDecl );
+		void premutate( FunctionDecl *functionDecl );
 		// should not traverse into any of these declarations to find objects
 		// that need to be constructed or destructed
-		virtual Declaration* mutate( StructDecl *aggregateDecl ) override { return aggregateDecl; }
-		virtual Declaration* mutate( UnionDecl *aggregateDecl ) override { return aggregateDecl; }
-		virtual Declaration* mutate( EnumDecl *aggregateDecl ) override { return aggregateDecl; }
-		virtual Declaration* mutate( TraitDecl *aggregateDecl ) override { return aggregateDecl; }
-		virtual TypeDecl* mutate( TypeDecl *typeDecl ) override { return typeDecl; }
-		virtual Declaration* mutate( TypedefDecl *typeDecl ) override { return typeDecl; }
-
-		virtual Type* mutate( FunctionType *funcType ) override { return funcType; }
+		void premutate( AggregateDecl * ) { visit_children = false; }
+		void premutate( NamedTypeDecl * ) { visit_children = false; }
+		void premutate( FunctionType * ) { visit_children = false; }
 
 		void hoist( Type * type );
@@ -128,10 +114,10 @@
 
 	void genInit( std::list< Declaration * > & translationUnit ) {
-		ReturnFixer::makeReturnTemp( translationUnit );
+		fixReturnStatements( translationUnit );
 		HoistArrayDimension::hoistArrayDimension( translationUnit );
 		CtorDtor::generateCtorDtor( translationUnit );
 	}
 
-	void ReturnFixer::makeReturnTemp( std::list< Declaration * > & translationUnit ) {
+	void fixReturnStatements( std::list< Declaration * > & translationUnit ) {
 		PassVisitor<ReturnFixer> fixer;
 		mutateAll( translationUnit, fixer );
@@ -143,5 +129,5 @@
 		// hands off if the function returns a reference - we don't want to allocate a temporary if a variable's address
 		// is being returned
-		if ( returnStmt->get_expr() && returnVals.size() == 1 && ! dynamic_cast< ReferenceType * >( returnVals.front()->get_type() ) ) {
+		if ( returnStmt->get_expr() && returnVals.size() == 1 && isConstructable( returnVals.front()->get_type() ) ) {
 			// explicitly construct the return value using the return expression and the retVal object
 			assertf( returnVals.front()->get_name() != "", "Function %s has unnamed return value\n", funcName.c_str() );
@@ -158,6 +144,6 @@
 		GuardValue( funcName );
 
-		ftype = functionDecl->get_functionType();
-		funcName = functionDecl->get_name();
+		ftype = functionDecl->type;
+		funcName = functionDecl->name;
 	}
 
@@ -165,13 +151,16 @@
 	// which would be incorrect if it is a side-effecting computation.
 	void HoistArrayDimension::hoistArrayDimension( std::list< Declaration * > & translationUnit ) {
-		HoistArrayDimension hoister;
-		hoister.mutateDeclarationList( translationUnit );
-	}
-
-	DeclarationWithType * HoistArrayDimension::mutate( ObjectDecl * objectDecl ) {
+		PassVisitor<HoistArrayDimension> hoister;
+		mutateAll( translationUnit, hoister );
+	}
+
+	void HoistArrayDimension::premutate( ObjectDecl * objectDecl ) {
+		GuardValue( storageClasses );
 		storageClasses = objectDecl->get_storageClasses();
-		DeclarationWithType * temp = Parent::mutate( objectDecl );
+	}
+
+	DeclarationWithType * HoistArrayDimension::postmutate( ObjectDecl * objectDecl ) {
 		hoist( objectDecl->get_type() );
-		return temp;
+		return objectDecl;
 	}
 
@@ -194,5 +183,5 @@
 
 			arrayType->set_dimension( new VariableExpr( arrayDimension ) );
-			addDeclaration( arrayDimension );
+			declsToAddBefore.push_back( arrayDimension );
 
 			hoist( arrayType->get_base() );
@@ -201,9 +190,6 @@
 	}
 
-	DeclarationWithType * HoistArrayDimension::mutate( FunctionDecl *functionDecl ) {
-		ValueGuard< bool > oldInFunc( inFunction );
-		inFunction = true;
-		DeclarationWithType * decl = Parent::mutate( functionDecl );
-		return decl;
+	void HoistArrayDimension::premutate( FunctionDecl * ) {
+		GuardValue( inFunction );
 	}
 
@@ -214,5 +200,5 @@
 
 	bool CtorDtor::isManaged( Type * type ) const {
-		// at least for now, references are never constructed
+		// references are never constructed
 		if ( dynamic_cast< ReferenceType * >( type ) ) return false;
 		// need to clear and reset qualifiers when determining if a type is managed
@@ -221,5 +207,5 @@
 		if ( TupleType * tupleType = dynamic_cast< TupleType * > ( type ) ) {
 			// tuple is also managed if any of its components are managed
-			if ( std::any_of( tupleType->get_types().begin(), tupleType->get_types().end(), [&](Type * type) { return isManaged( type ); }) ) {
+			if ( std::any_of( tupleType->types.begin(), tupleType->types.end(), [&](Type * type) { return isManaged( type ); }) ) {
 				return true;
 			}
@@ -305,4 +291,5 @@
 
 	void CtorDtor::previsit( FunctionDecl *functionDecl ) {
+		visit_children = false;  // do not try and construct parameters or forall parameters
 		GuardValue( inFunction );
 		inFunction = true;
@@ -318,8 +305,5 @@
 		}
 
-		PassVisitor<CtorDtor> newCtorDtor;
-		newCtorDtor.pass = *this;
-		maybeAccept( functionDecl->get_statements(), newCtorDtor );
-		visit_children = false;  // do not try and construct parameters or forall parameters - must happen after maybeAccept
+		maybeAccept( functionDecl->get_statements(), *visitor );
 	}
 
@@ -340,5 +324,5 @@
 	}
 
-	void CtorDtor::previsit( __attribute__((unused)) CompoundStmt * compoundStmt ) {
+	void CtorDtor::previsit( CompoundStmt * ) {
 		GuardScope( managedTypes );
 	}
Index: src/InitTweak/GenInit.h
===================================================================
--- src/InitTweak/GenInit.h	(revision 201aeb9b7c42eb7c7aa8bc065247bffda4932b33)
+++ src/InitTweak/GenInit.h	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -25,6 +25,9 @@
 	void genInit( std::list< Declaration * > & translationUnit );
 
-  /// generates a single ctor/dtor statement using objDecl as the 'this' parameter and arg as the optional argument
-  ImplicitCtorDtorStmt * genCtorDtor( const std::string & fname, ObjectDecl * objDecl, Expression * arg = nullptr );
+	/// Converts return statements into copy constructor calls on the hidden return variable
+	void fixReturnStatements( std::list< Declaration * > & translationUnit );
+
+	/// generates a single ctor/dtor statement using objDecl as the 'this' parameter and arg as the optional argument
+	ImplicitCtorDtorStmt * genCtorDtor( const std::string & fname, ObjectDecl * objDecl, Expression * arg = nullptr );
 
 	/// creates an appropriate ConstructorInit node which contains a constructor, destructor, and C-initializer
Index: src/InitTweak/InitTweak.cc
===================================================================
--- src/InitTweak/InitTweak.cc	(revision 201aeb9b7c42eb7c7aa8bc065247bffda4932b33)
+++ src/InitTweak/InitTweak.cc	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -1,3 +1,2 @@
-#include <stddef.h>                // for NULL
 #include <algorithm>               // for find, all_of
 #include <cassert>                 // for assertf, assert, strict_dynamic_cast
@@ -23,4 +22,5 @@
 #include "SynTree/Type.h"          // for FunctionType, ArrayType, PointerType
 #include "SynTree/Visitor.h"       // for Visitor, maybeAccept
+#include "Tuples/Tuples.h"         // for Tuples::isTtype
 
 class UntypedValofExpr;
@@ -184,5 +184,5 @@
 			callExpr->get_args().splice( callExpr->get_args().end(), args );
 
-			*out++ = new IfStmt( noLabels, cond, new ExprStmt( noLabels, callExpr ), NULL );
+			*out++ = new IfStmt( noLabels, cond, new ExprStmt( noLabels, callExpr ), nullptr );
 
 			UntypedExpr * increment = new UntypedExpr( new NameExpr( "++?" ) );
@@ -250,18 +250,18 @@
 	// To accomplish this, generate switch statement, consuming all of expander's elements
 	Statement * InitImpl::buildListInit( UntypedExpr * dst, std::list< Expression * > & indices ) {
-		if ( ! init ) return NULL;
+		if ( ! init ) return nullptr;
 		CompoundStmt * block = new CompoundStmt( noLabels );
 		build( dst, indices.begin(), indices.end(), init, back_inserter( block->get_kids() ) );
 		if ( block->get_kids().empty() ) {
 			delete block;
-			return NULL;
+			return nullptr;
 		} else {
-			init = NULL; // init was consumed in creating the list init
+			init = nullptr; // init was consumed in creating the list init
 			return block;
 		}
 	}
 
-	Statement * ExprImpl::buildListInit( __attribute((unused)) UntypedExpr * dst, __attribute((unused)) std::list< Expression * > & indices ) {
-		return NULL;
+	Statement * ExprImpl::buildListInit( UntypedExpr *, std::list< Expression * > & ) {
+		return nullptr;
 	}
 
@@ -270,9 +270,16 @@
 	}
 
-	bool tryConstruct( ObjectDecl * objDecl ) {
+	bool tryConstruct( DeclarationWithType * dwt ) {
+		ObjectDecl * objDecl = dynamic_cast< ObjectDecl * >( dwt );
+		if ( ! objDecl ) return false;
 		return ! LinkageSpec::isBuiltin( objDecl->get_linkage() ) &&
-			(objDecl->get_init() == NULL ||
-				( objDecl->get_init() != NULL && objDecl->get_init()->get_maybeConstructed() ))
-			&& ! objDecl->get_storageClasses().is_extern;
+			(objDecl->get_init() == nullptr ||
+				( objDecl->get_init() != nullptr && objDecl->get_init()->get_maybeConstructed() ))
+			&& ! objDecl->get_storageClasses().is_extern
+			&& isConstructable( objDecl->type );
+	}
+
+	bool isConstructable( Type * type ) {
+		return ! dynamic_cast< VarArgsType * >( type ) && ! dynamic_cast< ReferenceType * >( type ) && ! dynamic_cast< FunctionType * >( type ) && ! Tuples::isTtype( type );
 	}
 
@@ -314,5 +321,5 @@
 		collectCtorDtorCalls( stmt, matches );
 		assert( matches.size() <= 1 );
-		return matches.size() == 1 ? matches.front() : NULL;
+		return matches.size() == 1 ? matches.front() : nullptr;
 	}
 
@@ -359,10 +366,10 @@
 	ApplicationExpr * isIntrinsicCallExpr( Expression * expr ) {
 		ApplicationExpr * appExpr = dynamic_cast< ApplicationExpr * >( expr );
-		if ( ! appExpr ) return NULL;
+		if ( ! appExpr ) return nullptr;
 		DeclarationWithType * function = getCalledFunction( appExpr->get_function() );
 		assertf( function, "getCalledFunction returned nullptr: %s", toString( appExpr->get_function() ).c_str() );
 		// check for Intrinsic only - don't want to remove all overridable ctor/dtors because autogenerated ctor/dtor
 		// will call all member dtors, and some members may have a user defined dtor.
-		return function->get_linkage() == LinkageSpec::Intrinsic ? appExpr : NULL;
+		return function->get_linkage() == LinkageSpec::Intrinsic ? appExpr : nullptr;
 	}
 
@@ -482,5 +489,5 @@
 			return refType->get_base();
 		} else {
-			return NULL;
+			return nullptr;
 		}
 	}
@@ -488,5 +495,5 @@
 	Type * isPointerType( Type * type ) {
 		if ( getPointerBase( type ) ) return type;
-		else return NULL;
+		else return nullptr;
 	}
 
Index: src/InitTweak/InitTweak.h
===================================================================
--- src/InitTweak/InitTweak.h	(revision 201aeb9b7c42eb7c7aa8bc065247bffda4932b33)
+++ src/InitTweak/InitTweak.h	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -33,6 +33,9 @@
 	std::list< Expression * > makeInitList( Initializer * init );
 
-	/// True if the resolver should try to construct objDecl
-	bool tryConstruct( ObjectDecl * objDecl );
+	/// True if the resolver should try to construct dwt
+	bool tryConstruct( DeclarationWithType * dwt );
+
+	/// True if the type can have a user-defined constructor
+	bool isConstructable( Type * t );
 
 	/// True if the Initializer contains designations
Index: src/Makefile.in
===================================================================
--- src/Makefile.in	(revision 201aeb9b7c42eb7c7aa8bc065247bffda4932b33)
+++ src/Makefile.in	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -172,5 +172,4 @@
 	GenPoly/driver_cfa_cpp-Box.$(OBJEXT) \
 	GenPoly/driver_cfa_cpp-GenPoly.$(OBJEXT) \
-	GenPoly/driver_cfa_cpp-PolyMutator.$(OBJEXT) \
 	GenPoly/driver_cfa_cpp-ScrubTyVars.$(OBJEXT) \
 	GenPoly/driver_cfa_cpp-Lvalue.$(OBJEXT) \
@@ -178,5 +177,4 @@
 	GenPoly/driver_cfa_cpp-CopyParams.$(OBJEXT) \
 	GenPoly/driver_cfa_cpp-FindFunction.$(OBJEXT) \
-	GenPoly/driver_cfa_cpp-DeclMutator.$(OBJEXT) \
 	GenPoly/driver_cfa_cpp-InstantiateGeneric.$(OBJEXT) \
 	InitTweak/driver_cfa_cpp-GenInit.$(OBJEXT) \
@@ -253,5 +251,4 @@
 	SynTree/driver_cfa_cpp-Visitor.$(OBJEXT) \
 	SynTree/driver_cfa_cpp-Mutator.$(OBJEXT) \
-	SynTree/driver_cfa_cpp-AddStmtVisitor.$(OBJEXT) \
 	SynTree/driver_cfa_cpp-TypeSubstitution.$(OBJEXT) \
 	SynTree/driver_cfa_cpp-Attribute.$(OBJEXT) \
@@ -497,8 +494,7 @@
 	ControlStruct/ForExprMutator.cc \
 	ControlStruct/ExceptTranslate.cc GenPoly/Box.cc \
-	GenPoly/GenPoly.cc GenPoly/PolyMutator.cc \
-	GenPoly/ScrubTyVars.cc GenPoly/Lvalue.cc GenPoly/Specialize.cc \
-	GenPoly/CopyParams.cc GenPoly/FindFunction.cc \
-	GenPoly/DeclMutator.cc GenPoly/InstantiateGeneric.cc \
+	GenPoly/GenPoly.cc GenPoly/ScrubTyVars.cc GenPoly/Lvalue.cc \
+	GenPoly/Specialize.cc GenPoly/CopyParams.cc \
+	GenPoly/FindFunction.cc GenPoly/InstantiateGeneric.cc \
 	InitTweak/GenInit.cc InitTweak/FixInit.cc \
 	InitTweak/FixGlobalInit.cc InitTweak/InitTweak.cc \
@@ -535,8 +531,8 @@
 	SynTree/NamedTypeDecl.cc SynTree/TypeDecl.cc \
 	SynTree/Initializer.cc SynTree/Visitor.cc SynTree/Mutator.cc \
-	SynTree/AddStmtVisitor.cc SynTree/TypeSubstitution.cc \
-	SynTree/Attribute.cc SynTree/VarExprReplacer.cc \
-	Tuples/TupleAssignment.cc Tuples/TupleExpansion.cc \
-	Tuples/Explode.cc Virtual/ExpandCasts.cc
+	SynTree/TypeSubstitution.cc SynTree/Attribute.cc \
+	SynTree/VarExprReplacer.cc Tuples/TupleAssignment.cc \
+	Tuples/TupleExpansion.cc Tuples/Explode.cc \
+	Virtual/ExpandCasts.cc
 MAINTAINERCLEANFILES = Parser/parser.output ${libdir}/${notdir \
 	${cfa_cpplib_PROGRAMS}}
@@ -717,6 +713,4 @@
 GenPoly/driver_cfa_cpp-GenPoly.$(OBJEXT): GenPoly/$(am__dirstamp) \
 	GenPoly/$(DEPDIR)/$(am__dirstamp)
-GenPoly/driver_cfa_cpp-PolyMutator.$(OBJEXT): GenPoly/$(am__dirstamp) \
-	GenPoly/$(DEPDIR)/$(am__dirstamp)
 GenPoly/driver_cfa_cpp-ScrubTyVars.$(OBJEXT): GenPoly/$(am__dirstamp) \
 	GenPoly/$(DEPDIR)/$(am__dirstamp)
@@ -729,6 +723,4 @@
 GenPoly/driver_cfa_cpp-FindFunction.$(OBJEXT):  \
 	GenPoly/$(am__dirstamp) GenPoly/$(DEPDIR)/$(am__dirstamp)
-GenPoly/driver_cfa_cpp-DeclMutator.$(OBJEXT): GenPoly/$(am__dirstamp) \
-	GenPoly/$(DEPDIR)/$(am__dirstamp)
 GenPoly/driver_cfa_cpp-InstantiateGeneric.$(OBJEXT):  \
 	GenPoly/$(am__dirstamp) GenPoly/$(DEPDIR)/$(am__dirstamp)
@@ -929,6 +921,4 @@
 SynTree/driver_cfa_cpp-Mutator.$(OBJEXT): SynTree/$(am__dirstamp) \
 	SynTree/$(DEPDIR)/$(am__dirstamp)
-SynTree/driver_cfa_cpp-AddStmtVisitor.$(OBJEXT):  \
-	SynTree/$(am__dirstamp) SynTree/$(DEPDIR)/$(am__dirstamp)
 SynTree/driver_cfa_cpp-TypeSubstitution.$(OBJEXT):  \
 	SynTree/$(am__dirstamp) SynTree/$(DEPDIR)/$(am__dirstamp)
@@ -1008,10 +998,8 @@
 @AMDEP_TRUE@@am__include@ @am__quote@GenPoly/$(DEPDIR)/driver_cfa_cpp-Box.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@GenPoly/$(DEPDIR)/driver_cfa_cpp-CopyParams.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@GenPoly/$(DEPDIR)/driver_cfa_cpp-DeclMutator.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@GenPoly/$(DEPDIR)/driver_cfa_cpp-FindFunction.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@GenPoly/$(DEPDIR)/driver_cfa_cpp-GenPoly.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@GenPoly/$(DEPDIR)/driver_cfa_cpp-InstantiateGeneric.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@GenPoly/$(DEPDIR)/driver_cfa_cpp-Lvalue.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@GenPoly/$(DEPDIR)/driver_cfa_cpp-PolyMutator.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@GenPoly/$(DEPDIR)/driver_cfa_cpp-ScrubTyVars.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@GenPoly/$(DEPDIR)/driver_cfa_cpp-Specialize.Po@am__quote@
@@ -1056,5 +1044,4 @@
 @AMDEP_TRUE@@am__include@ @am__quote@SymTab/$(DEPDIR)/driver_cfa_cpp-TypeEquality.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@SymTab/$(DEPDIR)/driver_cfa_cpp-Validate.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@SynTree/$(DEPDIR)/driver_cfa_cpp-AddStmtVisitor.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@SynTree/$(DEPDIR)/driver_cfa_cpp-AddressExpr.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@SynTree/$(DEPDIR)/driver_cfa_cpp-AggregateDecl.Po@am__quote@
@@ -1450,18 +1437,4 @@
 @am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o GenPoly/driver_cfa_cpp-GenPoly.obj `if test -f 'GenPoly/GenPoly.cc'; then $(CYGPATH_W) 'GenPoly/GenPoly.cc'; else $(CYGPATH_W) '$(srcdir)/GenPoly/GenPoly.cc'; fi`
 
-GenPoly/driver_cfa_cpp-PolyMutator.o: GenPoly/PolyMutator.cc
-@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT GenPoly/driver_cfa_cpp-PolyMutator.o -MD -MP -MF GenPoly/$(DEPDIR)/driver_cfa_cpp-PolyMutator.Tpo -c -o GenPoly/driver_cfa_cpp-PolyMutator.o `test -f 'GenPoly/PolyMutator.cc' || echo '$(srcdir)/'`GenPoly/PolyMutator.cc
-@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) GenPoly/$(DEPDIR)/driver_cfa_cpp-PolyMutator.Tpo GenPoly/$(DEPDIR)/driver_cfa_cpp-PolyMutator.Po
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='GenPoly/PolyMutator.cc' object='GenPoly/driver_cfa_cpp-PolyMutator.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o GenPoly/driver_cfa_cpp-PolyMutator.o `test -f 'GenPoly/PolyMutator.cc' || echo '$(srcdir)/'`GenPoly/PolyMutator.cc
-
-GenPoly/driver_cfa_cpp-PolyMutator.obj: GenPoly/PolyMutator.cc
-@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT GenPoly/driver_cfa_cpp-PolyMutator.obj -MD -MP -MF GenPoly/$(DEPDIR)/driver_cfa_cpp-PolyMutator.Tpo -c -o GenPoly/driver_cfa_cpp-PolyMutator.obj `if test -f 'GenPoly/PolyMutator.cc'; then $(CYGPATH_W) 'GenPoly/PolyMutator.cc'; else $(CYGPATH_W) '$(srcdir)/GenPoly/PolyMutator.cc'; fi`
-@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) GenPoly/$(DEPDIR)/driver_cfa_cpp-PolyMutator.Tpo GenPoly/$(DEPDIR)/driver_cfa_cpp-PolyMutator.Po
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='GenPoly/PolyMutator.cc' object='GenPoly/driver_cfa_cpp-PolyMutator.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o GenPoly/driver_cfa_cpp-PolyMutator.obj `if test -f 'GenPoly/PolyMutator.cc'; then $(CYGPATH_W) 'GenPoly/PolyMutator.cc'; else $(CYGPATH_W) '$(srcdir)/GenPoly/PolyMutator.cc'; fi`
-
 GenPoly/driver_cfa_cpp-ScrubTyVars.o: GenPoly/ScrubTyVars.cc
 @am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT GenPoly/driver_cfa_cpp-ScrubTyVars.o -MD -MP -MF GenPoly/$(DEPDIR)/driver_cfa_cpp-ScrubTyVars.Tpo -c -o GenPoly/driver_cfa_cpp-ScrubTyVars.o `test -f 'GenPoly/ScrubTyVars.cc' || echo '$(srcdir)/'`GenPoly/ScrubTyVars.cc
@@ -1534,18 +1507,4 @@
 @am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o GenPoly/driver_cfa_cpp-FindFunction.obj `if test -f 'GenPoly/FindFunction.cc'; then $(CYGPATH_W) 'GenPoly/FindFunction.cc'; else $(CYGPATH_W) '$(srcdir)/GenPoly/FindFunction.cc'; fi`
 
-GenPoly/driver_cfa_cpp-DeclMutator.o: GenPoly/DeclMutator.cc
-@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT GenPoly/driver_cfa_cpp-DeclMutator.o -MD -MP -MF GenPoly/$(DEPDIR)/driver_cfa_cpp-DeclMutator.Tpo -c -o GenPoly/driver_cfa_cpp-DeclMutator.o `test -f 'GenPoly/DeclMutator.cc' || echo '$(srcdir)/'`GenPoly/DeclMutator.cc
-@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) GenPoly/$(DEPDIR)/driver_cfa_cpp-DeclMutator.Tpo GenPoly/$(DEPDIR)/driver_cfa_cpp-DeclMutator.Po
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='GenPoly/DeclMutator.cc' object='GenPoly/driver_cfa_cpp-DeclMutator.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o GenPoly/driver_cfa_cpp-DeclMutator.o `test -f 'GenPoly/DeclMutator.cc' || echo '$(srcdir)/'`GenPoly/DeclMutator.cc
-
-GenPoly/driver_cfa_cpp-DeclMutator.obj: GenPoly/DeclMutator.cc
-@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT GenPoly/driver_cfa_cpp-DeclMutator.obj -MD -MP -MF GenPoly/$(DEPDIR)/driver_cfa_cpp-DeclMutator.Tpo -c -o GenPoly/driver_cfa_cpp-DeclMutator.obj `if test -f 'GenPoly/DeclMutator.cc'; then $(CYGPATH_W) 'GenPoly/DeclMutator.cc'; else $(CYGPATH_W) '$(srcdir)/GenPoly/DeclMutator.cc'; fi`
-@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) GenPoly/$(DEPDIR)/driver_cfa_cpp-DeclMutator.Tpo GenPoly/$(DEPDIR)/driver_cfa_cpp-DeclMutator.Po
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='GenPoly/DeclMutator.cc' object='GenPoly/driver_cfa_cpp-DeclMutator.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o GenPoly/driver_cfa_cpp-DeclMutator.obj `if test -f 'GenPoly/DeclMutator.cc'; then $(CYGPATH_W) 'GenPoly/DeclMutator.cc'; else $(CYGPATH_W) '$(srcdir)/GenPoly/DeclMutator.cc'; fi`
-
 GenPoly/driver_cfa_cpp-InstantiateGeneric.o: GenPoly/InstantiateGeneric.cc
 @am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT GenPoly/driver_cfa_cpp-InstantiateGeneric.o -MD -MP -MF GenPoly/$(DEPDIR)/driver_cfa_cpp-InstantiateGeneric.Tpo -c -o GenPoly/driver_cfa_cpp-InstantiateGeneric.o `test -f 'GenPoly/InstantiateGeneric.cc' || echo '$(srcdir)/'`GenPoly/InstantiateGeneric.cc
@@ -2583,18 +2542,4 @@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o SynTree/driver_cfa_cpp-Mutator.obj `if test -f 'SynTree/Mutator.cc'; then $(CYGPATH_W) 'SynTree/Mutator.cc'; else $(CYGPATH_W) '$(srcdir)/SynTree/Mutator.cc'; fi`
-
-SynTree/driver_cfa_cpp-AddStmtVisitor.o: SynTree/AddStmtVisitor.cc
-@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT SynTree/driver_cfa_cpp-AddStmtVisitor.o -MD -MP -MF SynTree/$(DEPDIR)/driver_cfa_cpp-AddStmtVisitor.Tpo -c -o SynTree/driver_cfa_cpp-AddStmtVisitor.o `test -f 'SynTree/AddStmtVisitor.cc' || echo '$(srcdir)/'`SynTree/AddStmtVisitor.cc
-@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) SynTree/$(DEPDIR)/driver_cfa_cpp-AddStmtVisitor.Tpo SynTree/$(DEPDIR)/driver_cfa_cpp-AddStmtVisitor.Po
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='SynTree/AddStmtVisitor.cc' object='SynTree/driver_cfa_cpp-AddStmtVisitor.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o SynTree/driver_cfa_cpp-AddStmtVisitor.o `test -f 'SynTree/AddStmtVisitor.cc' || echo '$(srcdir)/'`SynTree/AddStmtVisitor.cc
-
-SynTree/driver_cfa_cpp-AddStmtVisitor.obj: SynTree/AddStmtVisitor.cc
-@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT SynTree/driver_cfa_cpp-AddStmtVisitor.obj -MD -MP -MF SynTree/$(DEPDIR)/driver_cfa_cpp-AddStmtVisitor.Tpo -c -o SynTree/driver_cfa_cpp-AddStmtVisitor.obj `if test -f 'SynTree/AddStmtVisitor.cc'; then $(CYGPATH_W) 'SynTree/AddStmtVisitor.cc'; else $(CYGPATH_W) '$(srcdir)/SynTree/AddStmtVisitor.cc'; fi`
-@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) SynTree/$(DEPDIR)/driver_cfa_cpp-AddStmtVisitor.Tpo SynTree/$(DEPDIR)/driver_cfa_cpp-AddStmtVisitor.Po
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='SynTree/AddStmtVisitor.cc' object='SynTree/driver_cfa_cpp-AddStmtVisitor.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o SynTree/driver_cfa_cpp-AddStmtVisitor.obj `if test -f 'SynTree/AddStmtVisitor.cc'; then $(CYGPATH_W) 'SynTree/AddStmtVisitor.cc'; else $(CYGPATH_W) '$(srcdir)/SynTree/AddStmtVisitor.cc'; fi`
 
 SynTree/driver_cfa_cpp-TypeSubstitution.o: SynTree/TypeSubstitution.cc
Index: src/Parser/StatementNode.cc
===================================================================
--- src/Parser/StatementNode.cc	(revision 201aeb9b7c42eb7c7aa8bc065247bffda4932b33)
+++ src/Parser/StatementNode.cc	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -234,5 +234,5 @@
 		target,
 		maybeMoveBuild<Statement >( stmt ),
-		maybeMoveBuild<Expression>( when )
+		notZeroExpr( maybeMoveBuild<Expression>( when ) )
 	});
 
@@ -250,8 +250,8 @@
 	delete targetExpr;
 
-	node->clauses.push_back( WaitForStmt::Clause{
+	node->clauses.insert( node->clauses.begin(), WaitForStmt::Clause{
 		std::move( target ),
 		maybeMoveBuild<Statement >( stmt ),
-		maybeMoveBuild<Expression>( when )
+		notZeroExpr( maybeMoveBuild<Expression>( when ) )
 	});
 
@@ -265,9 +265,9 @@
 		node->timeout.time      = maybeMoveBuild<Expression>( timeout );
 		node->timeout.statement = maybeMoveBuild<Statement >( stmt    );
-		node->timeout.condition = maybeMoveBuild<Expression>( when    );
+		node->timeout.condition = notZeroExpr( maybeMoveBuild<Expression>( when ) );
 	}
 	else {
-		node->orelse.statement  = maybeMoveBuild<Statement >( stmt    );
-		node->orelse.condition  = maybeMoveBuild<Expression>( when    );
+		node->orelse.statement  = maybeMoveBuild<Statement >( stmt );
+		node->orelse.condition  = notZeroExpr( maybeMoveBuild<Expression>( when ) );
 	}
 
@@ -280,17 +280,11 @@
 	node->timeout.time      = maybeMoveBuild<Expression>( timeout );
 	node->timeout.statement = maybeMoveBuild<Statement >( stmt    );
-	node->timeout.condition = maybeMoveBuild<Expression>( when    );
+	node->timeout.condition = notZeroExpr( maybeMoveBuild<Expression>( when ) );
 
 	node->orelse.statement = maybeMoveBuild<Statement >( else_stmt );
-	node->orelse.condition = maybeMoveBuild<Expression>( else_when );
+	node->orelse.condition  = notZeroExpr( maybeMoveBuild<Expression>( else_when ) );
 
 	return node;
 }
-
-// WaitForStmt::Target build_waitfor( const std::string * name, ExpressionNode * arguments ) {
-// 	 return WaitForStmt::Clause{
-
-// 	 };
-// }
 
 Statement *build_compound( StatementNode *first ) {
Index: src/Parser/parserutility.cc
===================================================================
--- src/Parser/parserutility.cc	(revision 201aeb9b7c42eb7c7aa8bc065247bffda4932b33)
+++ src/Parser/parserutility.cc	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -29,4 +29,5 @@
 
 Expression *notZeroExpr( Expression *orig ) {
+	if( !orig ) return nullptr;
 	UntypedExpr *comparison = new UntypedExpr( new NameExpr( "?!=?" ) );
 	comparison->get_args().push_back( orig );
Index: src/ResolvExpr/AlternativeFinder.cc
===================================================================
--- src/ResolvExpr/AlternativeFinder.cc	(revision 201aeb9b7c42eb7c7aa8bc065247bffda4932b33)
+++ src/ResolvExpr/AlternativeFinder.cc	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -144,12 +144,12 @@
 			expr->get_result()->accept( global_renamer );
 		}
-
-		void referenceToRvalueConversion( Expression *& expr ) {
-			if ( dynamic_cast< ReferenceType * >( expr->get_result() ) ) {
-				// cast away reference from expr
-				expr = new CastExpr( expr, expr->get_result()->stripReferences()->clone() );
-			}
-		}
 	} // namespace
+
+	void referenceToRvalueConversion( Expression *& expr ) {
+		if ( dynamic_cast< ReferenceType * >( expr->get_result() ) ) {
+			// cast away reference from expr
+			expr = new CastExpr( expr, expr->get_result()->stripReferences()->clone() );
+		}
+	}
 
 	template< typename InputIterator, typename OutputIterator >
Index: src/ResolvExpr/AlternativeFinder.h
===================================================================
--- src/ResolvExpr/AlternativeFinder.h	(revision 201aeb9b7c42eb7c7aa8bc065247bffda4932b33)
+++ src/ResolvExpr/AlternativeFinder.h	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -50,4 +50,9 @@
 		const SymTab::Indexer &get_indexer() const { return indexer; }
 		const TypeEnvironment &get_environ() const { return env; }
+
+		/// Runs a new alternative finder on each element in [begin, end)
+		/// and writes each alternative finder to out.
+		template< typename InputIterator, typename OutputIterator >
+		void findSubExprs( InputIterator begin, InputIterator end, OutputIterator out );
 	  private:
 		virtual void visit( ApplicationExpr *applicationExpr );
@@ -81,8 +86,4 @@
 		virtual void visit( StmtExpr *stmtExpr );
 		virtual void visit( UntypedInitExpr *initExpr );
-		/// Runs a new alternative finder on each element in [begin, end)
-		/// and writes each alternative finder to out.
-		template< typename InputIterator, typename OutputIterator >
-		void findSubExprs( InputIterator begin, InputIterator end, OutputIterator out );
 
 		/// Adds alternatives for anonymous members
@@ -108,4 +109,5 @@
 
 	Expression *resolveInVoidContext( Expression *expr, const SymTab::Indexer &indexer, TypeEnvironment &env );
+	void referenceToRvalueConversion( Expression *& expr );
 
 	template< typename InputIterator, typename OutputIterator >
Index: src/ResolvExpr/Resolver.cc
===================================================================
--- src/ResolvExpr/Resolver.cc	(revision 201aeb9b7c42eb7c7aa8bc065247bffda4932b33)
+++ src/ResolvExpr/Resolver.cc	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -40,4 +40,5 @@
 #include "SynTree/Visitor.h"             // for acceptAll, maybeAccept
 #include "typeops.h"                     // for extractResultType
+#include "Unify.h"                       // for unify
 
 using namespace std;
@@ -71,4 +72,5 @@
 		void previsit( ThrowStmt *throwStmt );
 		void previsit( CatchStmt *catchStmt );
+		void previsit( WaitForStmt * stmt );
 
 		void previsit( SingleInit *singleInit );
@@ -93,4 +95,9 @@
 		PassVisitor<Resolver> resolver;
 		acceptAll( translationUnit, resolver );
+	}
+
+	void resolveDecl( Declaration * decl, const SymTab::Indexer &indexer ) {
+		PassVisitor<Resolver> resolver( indexer );
+		maybeAccept( decl, resolver );
 	}
 
@@ -116,26 +123,26 @@
 	}
 
+	Expression * findSingleExpression( Expression *untyped, const SymTab::Indexer &indexer ) {
+		TypeEnvironment env;
+		AlternativeFinder finder( indexer, env );
+		finder.find( untyped );
+		#if 0
+		if ( finder.get_alternatives().size() != 1 ) {
+			std::cout << "untyped expr is ";
+			untyped->print( std::cout );
+			std::cout << std::endl << "alternatives are:";
+			for ( std::list< Alternative >::const_iterator i = finder.get_alternatives().begin(); i != finder.get_alternatives().end(); ++i ) {
+				i->print( std::cout );
+			} // for
+		} // if
+		#endif
+		assertf( finder.get_alternatives().size() == 1, "findSingleExpression: must have exactly one alternative at the end." );
+		Alternative &choice = finder.get_alternatives().front();
+		Expression *newExpr = choice.expr->clone();
+		finishExpr( newExpr, choice.env );
+		return newExpr;
+	}
+
 	namespace {
-		Expression *findSingleExpression( Expression *untyped, const SymTab::Indexer &indexer ) {
-			TypeEnvironment env;
-			AlternativeFinder finder( indexer, env );
-			finder.find( untyped );
-#if 0
-			if ( finder.get_alternatives().size() != 1 ) {
-				std::cout << "untyped expr is ";
-				untyped->print( std::cout );
-				std::cout << std::endl << "alternatives are:";
-				for ( std::list< Alternative >::const_iterator i = finder.get_alternatives().begin(); i != finder.get_alternatives().end(); ++i ) {
-					i->print( std::cout );
-				} // for
-			} // if
-#endif
-			assertf( finder.get_alternatives().size() == 1, "findSingleExpression: must have exactly one alternative at the end." );
-			Alternative &choice = finder.get_alternatives().front();
-			Expression *newExpr = choice.expr->clone();
-			finishExpr( newExpr, choice.env );
-			return newExpr;
-		}
-
 		bool isIntegralType( Type *type ) {
 			if ( dynamic_cast< EnumInstType * >( type ) ) {
@@ -391,4 +398,207 @@
 	}
 
+	inline void resolveAsIf( Expression *& expr, SymTab::Indexer & indexer ) {
+		if( !expr ) return;
+		Expression * newExpr = findSingleExpression( expr, indexer );
+		delete expr;
+		expr = newExpr;
+	}
+
+	inline void resolveAsType( Expression *& expr, Type * type, SymTab::Indexer & indexer ) {
+		if( !expr ) return;
+		Expression * newExpr = findSingleExpression( new CastExpr( expr, type ), indexer );
+		delete expr;
+		expr = newExpr;
+	}
+
+	template< typename iterator_t >
+	inline bool advance_to_mutex( iterator_t & it, const iterator_t & end ) {
+		while( it != end && !(*it)->get_type()->get_mutex() ) {
+			it++;
+		}
+
+		return it != end;
+	}
+
+	void Resolver::previsit( WaitForStmt * stmt ) {
+		visit_children = false;
+
+		// Resolve all clauses first
+		for( auto& clause : stmt->clauses ) {
+
+			TypeEnvironment env;
+			AlternativeFinder funcFinder( indexer, env );
+
+			// Find all alternatives for a function in canonical form
+			funcFinder.findWithAdjustment( clause.target.function );
+
+			if ( funcFinder.get_alternatives().empty() ) {
+				stringstream ss;
+				ss << "Use of undeclared indentifier '";
+				ss << strict_dynamic_cast<NameExpr*>( clause.target.function )->name;
+				ss << "' in call to waitfor";
+				throw SemanticError( ss.str() );
+			}
+
+			// Find all alternatives for all arguments in canonical form
+			std::list< AlternativeFinder > argAlternatives;
+			funcFinder.findSubExprs( clause.target.arguments.begin(), clause.target.arguments.end(), back_inserter( argAlternatives ) );
+
+			// List all combinations of arguments
+			std::list< AltList > possibilities;
+			combos( argAlternatives.begin(), argAlternatives.end(), back_inserter( possibilities ) );
+
+			AltList                func_candidates;
+			std::vector< AltList > args_candidates;
+
+			// For every possible function :
+			// 	try matching the arguments to the parameters
+			// 	not the other way around because we have more arguments than parameters
+			SemanticError errors;
+			for ( Alternative & func : funcFinder.get_alternatives() ) {
+				try {
+					PointerType * pointer = dynamic_cast< PointerType* >( func.expr->get_result()->stripReferences() );
+					if( !pointer ) {
+						throw SemanticError( "candidate not viable: not a pointer type\n", func.expr->get_result() );
+					}
+
+					FunctionType * function = dynamic_cast< FunctionType* >( pointer->get_base() );
+					if( !function ) {
+						throw SemanticError( "candidate not viable: not a function type\n", pointer->get_base() );
+					}
+
+
+					{
+						auto param     = function->parameters.begin();
+						auto param_end = function->parameters.end();
+
+						if( !advance_to_mutex( param, param_end ) ) {
+							throw SemanticError("candidate function not viable: no mutex parameters\n", function);
+						}
+					}
+
+					Alternative newFunc( func );
+					// Strip reference from function
+					referenceToRvalueConversion( newFunc.expr );
+
+					// For all the set of arguments we have try to match it with the parameter of the current function alternative
+					for ( auto & argsList : possibilities ) {
+
+						try {
+							// Declare data structures need for resolution
+							OpenVarSet openVars;
+							AssertionSet resultNeed, resultHave;
+							TypeEnvironment resultEnv;
+
+							// Load type variables from arguemnts into one shared space
+							simpleCombineEnvironments( argsList.begin(), argsList.end(), resultEnv );
+
+							// Make sure we don't widen any existing bindings
+							for ( auto & i : resultEnv ) {
+								i.allowWidening = false;
+							}
+
+							// Find any unbound type variables
+							resultEnv.extractOpenVars( openVars );
+
+							auto param     = function->parameters.begin();
+							auto param_end = function->parameters.end();
+
+							// For every arguments of its set, check if it matches one of the parameter
+							// The order is important
+							for( auto & arg : argsList ) {
+
+								// Ignore non-mutex arguments
+								if( !advance_to_mutex( param, param_end ) ) {
+									// We ran out of parameters but still have arguments
+									// this function doesn't match
+									throw SemanticError("candidate function not viable: too many mutex arguments\n", function);
+								}
+
+								// Check if the argument matches the parameter type in the current scope
+								if( ! unify( (*param)->get_type(), arg.expr->get_result(), resultEnv, resultNeed, resultHave, openVars, this->indexer ) ) {
+									// Type doesn't match
+									stringstream ss;
+									ss << "candidate function not viable: no known convertion from '";
+									arg.expr->get_result()->print( ss );
+									ss << "' to '";
+									(*param)->get_type()->print( ss );
+									ss << "'\n";
+									throw SemanticError(ss.str(), function);
+								}
+
+								param++;
+							}
+
+							// All arguments match !
+
+							// Check if parameters are missing
+							if( advance_to_mutex( param, param_end ) ) {
+								// We ran out of arguments but still have parameters left
+								// this function doesn't match
+								throw SemanticError("candidate function not viable: too few mutex arguments\n", function);
+							}
+
+							// All parameters match !
+
+							// Finish the expressions to tie in the proper environments
+							finishExpr( newFunc.expr, resultEnv );
+							for( Alternative & alt : argsList ) {
+								finishExpr( alt.expr, resultEnv );
+							}
+
+							// This is a match store it and save it for later
+							func_candidates.push_back( newFunc );
+							args_candidates.push_back( argsList );
+
+						}
+						catch( SemanticError &e ) {
+							errors.append( e );
+						}
+					}
+				}
+				catch( SemanticError &e ) {
+					errors.append( e );
+				}
+			}
+
+			// Make sure we got the right number of arguments
+			if( func_candidates.empty() )    { SemanticError top( "No alternatives for function in call to waitfor"  ); top.append( errors ); throw top; }
+			if( args_candidates.empty() )    { SemanticError top( "No alternatives for arguments in call to waitfor" ); top.append( errors ); throw top; }
+			if( func_candidates.size() > 1 ) { SemanticError top( "Ambiguous function in call to waitfor"            ); top.append( errors ); throw top; }
+			if( args_candidates.size() > 1 ) { SemanticError top( "Ambiguous arguments in call to waitfor"           ); top.append( errors ); throw top; }
+
+
+			// Swap the results from the alternative with the unresolved values.
+			// Alternatives will handle deletion on destruction
+			std::swap( clause.target.function, func_candidates.front().expr );
+			for( auto arg_pair : group_iterate( clause.target.arguments, args_candidates.front() ) ) {
+				std::swap ( std::get<0>( arg_pair), std::get<1>( arg_pair).expr );
+			}
+
+			// Resolve the conditions as if it were an IfStmt
+			// Resolve the statments normally
+			resolveAsIf( clause.condition, this->indexer );
+			clause.statement->accept( *visitor );
+		}
+
+
+		if( stmt->timeout.statement ) {
+			// Resolve the timeout as an size_t for now
+			// Resolve the conditions as if it were an IfStmt
+			// Resolve the statments normally
+			resolveAsType( stmt->timeout.time, new BasicType( noQualifiers, BasicType::LongLongUnsignedInt ), this->indexer );
+			resolveAsIf  ( stmt->timeout.condition, this->indexer );
+			stmt->timeout.statement->accept( *visitor );
+		}
+
+		if( stmt->orelse.statement ) {
+			// Resolve the conditions as if it were an IfStmt
+			// Resolve the statments normally
+			resolveAsIf( stmt->orelse.condition, this->indexer );
+			stmt->orelse.statement->accept( *visitor );
+		}
+	}
+
 	template< typename T >
 	bool isCharType( T t ) {
Index: src/ResolvExpr/Resolver.h
===================================================================
--- src/ResolvExpr/Resolver.h	(revision 201aeb9b7c42eb7c7aa8bc065247bffda4932b33)
+++ src/ResolvExpr/Resolver.h	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -29,6 +29,8 @@
 	/// Checks types and binds syntactic constructs to typed representations
 	void resolve( std::list< Declaration * > translationUnit );
+	void resolveDecl( Declaration *, const SymTab::Indexer &indexer );
 	Expression *resolveInVoidContext( Expression *expr, const SymTab::Indexer &indexer );
 	Expression *findVoidExpression( Expression *untyped, const SymTab::Indexer &indexer );
+	Expression * findSingleExpression( Expression *untyped, const SymTab::Indexer &indexer );
 	void resolveCtorInit( ConstructorInit * ctorInit, const SymTab::Indexer & indexer );
 	void resolveStmtExpr( StmtExpr * stmtExpr, const SymTab::Indexer & indexer );
Index: src/ResolvExpr/TypeEnvironment.cc
===================================================================
--- src/ResolvExpr/TypeEnvironment.cc	(revision 201aeb9b7c42eb7c7aa8bc065247bffda4932b33)
+++ src/ResolvExpr/TypeEnvironment.cc	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -123,13 +123,13 @@
 		for ( std::list< EqvClass >::const_iterator theClass = env.begin(); theClass != env.end(); ++theClass ) {
 			for ( std::set< std::string >::const_iterator theVar = theClass->vars.begin(); theVar != theClass->vars.end(); ++theVar ) {
-///       std::cout << "adding " << *theVar;
+///       std::cerr << "adding " << *theVar;
 				if ( theClass->type ) {
-///         std::cout << " bound to ";
-///         theClass->type->print( std::cout );
-///         std::cout << std::endl;
+///         std::cerr << " bound to ";
+///         theClass->type->print( std::cerr );
+///         std::cerr << std::endl;
 					sub.add( *theVar, theClass->type );
 				} else if ( theVar != theClass->vars.begin() ) {
 					TypeInstType *newTypeInst = new TypeInstType( Type::Qualifiers(), *theClass->vars.begin(), theClass->data.kind == TypeDecl::Ftype );
-///         std::cout << " bound to variable " << *theClass->vars.begin() << std::endl;
+///         std::cerr << " bound to variable " << *theClass->vars.begin() << std::endl;
 					sub.add( *theVar, newTypeInst );
 					delete newTypeInst;
Index: src/SymTab/Autogen.cc
===================================================================
--- src/SymTab/Autogen.cc	(revision 201aeb9b7c42eb7c7aa8bc065247bffda4932b33)
+++ src/SymTab/Autogen.cc	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -16,5 +16,4 @@
 #include "Autogen.h"
 
-#include <cstddef>                 // for NULL
 #include <algorithm>               // for count_if
 #include <cassert>                 // for strict_dynamic_cast, assert, assertf
@@ -27,8 +26,10 @@
 #include "AddVisit.h"              // for addVisit
 #include "CodeGen/OperatorTable.h" // for isCtorDtor, isCtorDtorAssign
+#include "Common/PassVisitor.h"    // for PassVisitor
 #include "Common/ScopedMap.h"      // for ScopedMap<>::const_iterator, Scope...
 #include "Common/utility.h"        // for cloneAll, operator+
-#include "GenPoly/DeclMutator.h"   // for DeclMutator
 #include "GenPoly/ScopedSet.h"     // for ScopedSet, ScopedSet<>::iterator
+#include "InitTweak/GenInit.h"     // for fixReturnStatements
+#include "ResolvExpr/Resolver.h"   // for resolveDecl
 #include "SymTab/Mangler.h"        // for Mangler
 #include "SynTree/Attribute.h"     // For Attribute
@@ -53,35 +54,21 @@
 	};
 
-	class AutogenerateRoutines final : public Visitor {
-	    template< typename Visitor >
-	    friend void acceptAndAdd( std::list< Declaration * > &translationUnit, Visitor &visitor );
-	    template< typename Visitor >
-	    friend void addVisitStatementList( std::list< Statement* > &stmts, Visitor &visitor );
-	  public:
-		std::list< Declaration * > &get_declsToAdd() { return declsToAdd; }
-
-		typedef Visitor Parent;
-		using Parent::visit;
-
+	struct AutogenerateRoutines final : public WithDeclsToAdd, public WithVisitorRef<AutogenerateRoutines>, public WithGuards, public WithShortCircuiting {
 		AutogenerateRoutines();
 
-		virtual void visit( EnumDecl *enumDecl );
-		virtual void visit( StructDecl *structDecl );
-		virtual void visit( UnionDecl *structDecl );
-		virtual void visit( TypeDecl *typeDecl );
-		virtual void visit( TraitDecl *ctxDecl );
-		virtual void visit( FunctionDecl *functionDecl );
-
-		virtual void visit( FunctionType *ftype );
-		virtual void visit( PointerType *ftype );
-
-		virtual void visit( CompoundStmt *compoundStmt );
-		virtual void visit( SwitchStmt *switchStmt );
+		void previsit( EnumDecl * enumDecl );
+		void previsit( StructDecl * structDecl );
+		void previsit( UnionDecl * structDecl );
+		void previsit( TypeDecl * typeDecl );
+		void previsit( TraitDecl * traitDecl );
+		void previsit( FunctionDecl * functionDecl );
+
+		void previsit( FunctionType * ftype );
+		void previsit( PointerType * ptype );
+
+		void previsit( CompoundStmt * compoundStmt );
 
 	  private:
-		template< typename StmtClass > void visitStatement( StmtClass *stmt );
-
-		std::list< Declaration * > declsToAdd, declsToAddAfter;
-		std::set< std::string > structsDone;
+		GenPoly::ScopedSet< std::string > structsDone;
 		unsigned int functionNesting = 0;     // current level of nested functions
 		/// Note: the following maps could be ScopedSets, but it should be easier to work
@@ -93,16 +80,10 @@
 
 	/// generates routines for tuple types.
-	/// Doesn't really need to be a mutator, but it's easier to reuse DeclMutator than it is to use AddVisit
-	/// or anything we currently have that supports adding new declarations for visitors
-	class AutogenTupleRoutines : public GenPoly::DeclMutator {
-	  public:
-		typedef GenPoly::DeclMutator Parent;
-		using Parent::mutate;
-
-		virtual DeclarationWithType * mutate( FunctionDecl *functionDecl );
-
-		virtual Type * mutate( TupleType *tupleType );
-
-		virtual CompoundStmt * mutate( CompoundStmt *compoundStmt );
+	struct AutogenTupleRoutines : public WithDeclsToAdd, public WithVisitorRef<AutogenTupleRoutines>, public WithGuards, public WithShortCircuiting {
+		void previsit( FunctionDecl *functionDecl );
+
+		void postvisit( TupleType *tupleType );
+
+		void previsit( CompoundStmt *compoundStmt );
 
 	  private:
@@ -112,14 +93,14 @@
 
 	void autogenerateRoutines( std::list< Declaration * > &translationUnit ) {
-		AutogenerateRoutines generator;
-		acceptAndAdd( translationUnit, generator );
+		PassVisitor<AutogenerateRoutines> generator;
+		acceptAll( translationUnit, generator );
 
 		// needs to be done separately because AutogenerateRoutines skips types that appear as function arguments, etc.
 		// AutogenTupleRoutines tupleGenerator;
-		// tupleGenerator.mutateDeclarationList( translationUnit );
+		// acceptAll( translationUnit, tupleGenerator );
 	}
 
 	bool isUnnamedBitfield( ObjectDecl * obj ) {
-		return obj != NULL && obj->get_name() == "" && obj->get_bitfieldWidth() != NULL;
+		return obj != nullptr && obj->get_name() == "" && obj->get_bitfieldWidth() != nullptr;
 	}
 
@@ -128,5 +109,5 @@
 		FunctionDecl * decl = functionDecl->clone();
 		delete decl->get_statements();
-		decl->set_statements( NULL );
+		decl->set_statements( nullptr );
 		declsToAdd.push_back( decl );
 		decl->fixUniqueId();
@@ -339,5 +320,5 @@
 				assert( ! func->get_functionType()->get_parameters().empty() );
 				ObjectDecl * dstParam = dynamic_cast<ObjectDecl*>( func->get_functionType()->get_parameters().front() );
-				ObjectDecl * srcParam = NULL;
+				ObjectDecl * srcParam = nullptr;
 				if ( func->get_functionType()->get_parameters().size() == 2 ) {
 					srcParam = dynamic_cast<ObjectDecl*>( func->get_functionType()->get_parameters().back() );
@@ -346,5 +327,5 @@
 				assert( dstParam );
 
-				Expression *srcselect = srcParam ? new MemberExpr( field, new VariableExpr( srcParam ) ) : NULL;
+				Expression *srcselect = srcParam ? new MemberExpr( field, new VariableExpr( srcParam ) ) : nullptr;
 				makeStructMemberOp( dstParam, srcselect, field, func, forward );
 			} // if
@@ -385,5 +366,5 @@
 				} else {
 					// no matching parameter, initialize field with default ctor
-					makeStructMemberOp( dstParam, NULL, field, func );
+					makeStructMemberOp( dstParam, nullptr, field, func );
 				}
 			}
@@ -401,11 +382,10 @@
 	void makeStructFunctions( StructDecl *aggregateDecl, StructInstType *refType, unsigned int functionNesting, std::list< Declaration * > & declsToAdd, const std::vector< FuncData > & data ) {
 		// Builtins do not use autogeneration.
-		if ( aggregateDecl->get_linkage() == LinkageSpec::BuiltinCFA ||
-			 aggregateDecl->get_linkage() == LinkageSpec::BuiltinC ) {
+		if ( LinkageSpec::isBuiltin( aggregateDecl->get_linkage() ) ) {
 			return;
 		}
 
 		// Make function polymorphic in same parameters as generic struct, if applicable
-		const std::list< TypeDecl* > & typeParams = aggregateDecl->get_parameters(); // List of type variables to be placed on the generated functions
+		const std::list< TypeDecl * > & typeParams = aggregateDecl->get_parameters(); // List of type variables to be placed on the generated functions
 
 		// generate each of the functions based on the supplied FuncData objects
@@ -572,11 +552,12 @@
 		// the order here determines the order that these functions are generated.
 		// assignment should come last since it uses copy constructor in return.
-		data.push_back( FuncData( "?{}", genDefaultType, constructable ) );
-		data.push_back( FuncData( "?{}", genCopyType, copyable ) );
-		data.push_back( FuncData( "^?{}", genDefaultType, destructable ) );
-		data.push_back( FuncData( "?=?", genAssignType, assignable ) );
-	}
-
-	void AutogenerateRoutines::visit( EnumDecl *enumDecl ) {
+		data.emplace_back( "?{}", genDefaultType, constructable );
+		data.emplace_back( "?{}", genCopyType, copyable );
+		data.emplace_back( "^?{}", genDefaultType, destructable );
+		data.emplace_back( "?=?", genAssignType, assignable );
+	}
+
+	void AutogenerateRoutines::previsit( EnumDecl * enumDecl ) {
+		visit_children = false;
 		if ( ! enumDecl->get_members().empty() ) {
 			EnumInstType *enumInst = new EnumInstType( Type::Qualifiers(), enumDecl->get_name() );
@@ -586,19 +567,21 @@
 	}
 
-	void AutogenerateRoutines::visit( StructDecl *structDecl ) {
-		if ( structDecl->has_body() && structsDone.find( structDecl->get_name() ) == structsDone.end() ) {
-			StructInstType structInst( Type::Qualifiers(), structDecl->get_name() );
-			for ( TypeDecl * typeDecl : structDecl->get_parameters() ) {
+	void AutogenerateRoutines::previsit( StructDecl * structDecl ) {
+		visit_children = false;
+		if ( structDecl->has_body() && structsDone.find( structDecl->name ) == structsDone.end() ) {
+			StructInstType structInst( Type::Qualifiers(), structDecl->name );
+			for ( TypeDecl * typeDecl : structDecl->parameters ) {
 				// need to visit assertions so that they are added to the appropriate maps
-				acceptAll( typeDecl->get_assertions(), *this );
-				structInst.get_parameters().push_back( new TypeExpr( new TypeInstType( Type::Qualifiers(), typeDecl->get_name(), typeDecl ) ) );
+				acceptAll( typeDecl->assertions, *visitor );
+				structInst.parameters.push_back( new TypeExpr( new TypeInstType( Type::Qualifiers(), typeDecl->name, typeDecl ) ) );
 			}
 			structInst.set_baseStruct( structDecl );
 			makeStructFunctions( structDecl, &structInst, functionNesting, declsToAddAfter, data );
-			structsDone.insert( structDecl->get_name() );
+			structsDone.insert( structDecl->name );
 		} // if
 	}
 
-	void AutogenerateRoutines::visit( UnionDecl *unionDecl ) {
+	void AutogenerateRoutines::previsit( UnionDecl * unionDecl ) {
+		visit_children = false;
 		if ( ! unionDecl->get_members().empty() ) {
 			UnionInstType unionInst( Type::Qualifiers(), unionDecl->get_name() );
@@ -619,5 +602,6 @@
 
 	// generate ctor/dtors/assign for typedecls, e.g., otype T = int *;
-	void AutogenerateRoutines::visit( TypeDecl *typeDecl ) {
+	void AutogenerateRoutines::previsit( TypeDecl * typeDecl ) {
+		visit_children = false;
 		if ( ! typeDecl->base ) return;
 
@@ -664,31 +648,21 @@
 	}
 
-	void addDecls( std::list< Declaration * > &declsToAdd, std::list< Statement * > &statements, std::list< Statement * >::iterator i ) {
-		for ( std::list< Declaration * >::iterator decl = declsToAdd.begin(); decl != declsToAdd.end(); ++decl ) {
-			statements.insert( i, new DeclStmt( noLabels, *decl ) );
-		} // for
-		declsToAdd.clear();
-	}
-
-	void AutogenerateRoutines::visit( FunctionType *) {
+	void AutogenerateRoutines::previsit( FunctionType *) {
 		// ensure that we don't add assignment ops for types defined as part of the function
-	}
-
-	void AutogenerateRoutines::visit( PointerType *) {
+		visit_children = false;
+	}
+
+	void AutogenerateRoutines::previsit( PointerType *) {
 		// ensure that we don't add assignment ops for types defined as part of the pointer
-	}
-
-	void AutogenerateRoutines::visit( TraitDecl *) {
+		visit_children = false;
+	}
+
+	void AutogenerateRoutines::previsit( TraitDecl * ) {
 		// ensure that we don't add assignment ops for types defined as part of the trait
-	}
-
-	template< typename StmtClass >
-	inline void AutogenerateRoutines::visitStatement( StmtClass *stmt ) {
-		std::set< std::string > oldStructs = structsDone;
-		addVisit( stmt, *this );
-		structsDone = oldStructs;
-	}
-
-	void AutogenerateRoutines::visit( FunctionDecl *functionDecl ) {
+		visit_children = false;
+	}
+
+	void AutogenerateRoutines::previsit( FunctionDecl * functionDecl ) {
+		visit_children = false;
 		// record the existence of this function as appropriate
 		insert( functionDecl, constructable, InitTweak::isDefaultConstructor );
@@ -697,24 +671,16 @@
 		insert( functionDecl, destructable, InitTweak::isDestructor );
 
-		maybeAccept( functionDecl->get_functionType(), *this );
+		maybeAccept( functionDecl->type, *visitor );
 		functionNesting += 1;
-		maybeAccept( functionDecl->get_statements(), *this );
+		maybeAccept( functionDecl->statements, *visitor );
 		functionNesting -= 1;
 	}
 
-	void AutogenerateRoutines::visit( CompoundStmt *compoundStmt ) {
-		constructable.beginScope();
-		assignable.beginScope();
-		copyable.beginScope();
-		destructable.beginScope();
-		visitStatement( compoundStmt );
-		constructable.endScope();
-		assignable.endScope();
-		copyable.endScope();
-		destructable.endScope();
-	}
-
-	void AutogenerateRoutines::visit( SwitchStmt *switchStmt ) {
-		visitStatement( switchStmt );
+	void AutogenerateRoutines::previsit( CompoundStmt * ) {
+		GuardScope( constructable );
+		GuardScope( assignable );
+		GuardScope( copyable );
+		GuardScope( destructable );
+		GuardScope( structsDone );
 	}
 
@@ -734,8 +700,7 @@
 	}
 
-	Type * AutogenTupleRoutines::mutate( TupleType * tupleType ) {
-		tupleType = strict_dynamic_cast< TupleType * >( Parent::mutate( tupleType ) );
+	void AutogenTupleRoutines::postvisit( TupleType * tupleType ) {
 		std::string mangleName = SymTab::Mangler::mangleType( tupleType );
-		if ( seenTuples.find( mangleName ) != seenTuples.end() ) return tupleType;
+		if ( seenTuples.find( mangleName ) != seenTuples.end() ) return;
 		seenTuples.insert( mangleName );
 
@@ -785,25 +750,20 @@
 		makeTupleFunctionBody( dtorDecl );
 
-		addDeclaration( ctorDecl );
-		addDeclaration( copyCtorDecl );
-		addDeclaration( dtorDecl );
-		addDeclaration( assignDecl ); // assignment should come last since it uses copy constructor in return
-
-		return tupleType;
-	}
-
-	DeclarationWithType * AutogenTupleRoutines::mutate( FunctionDecl *functionDecl ) {
-		functionDecl->set_functionType( maybeMutate( functionDecl->get_functionType(), *this ) );
+		declsToAddBefore.push_back( ctorDecl );
+		declsToAddBefore.push_back( copyCtorDecl );
+		declsToAddBefore.push_back( dtorDecl );
+		declsToAddBefore.push_back( assignDecl ); // assignment should come last since it uses copy constructor in return
+	}
+
+	void AutogenTupleRoutines::previsit( FunctionDecl *functionDecl ) {
+		visit_children = false;
+		maybeAccept( functionDecl->type, *visitor );
 		functionNesting += 1;
-		functionDecl->set_statements( maybeMutate( functionDecl->get_statements(), *this ) );
+		maybeAccept( functionDecl->statements, *visitor );
 		functionNesting -= 1;
-		return functionDecl;
-	}
-
-	CompoundStmt * AutogenTupleRoutines::mutate( CompoundStmt *compoundStmt ) {
-		seenTuples.beginScope();
-		compoundStmt = strict_dynamic_cast< CompoundStmt * >( Parent::mutate( compoundStmt ) );
-		seenTuples.endScope();
-		return compoundStmt;
+	}
+
+	void AutogenTupleRoutines::previsit( CompoundStmt * ) {
+		GuardScope( seenTuples );
 	}
 } // SymTab
Index: src/SymTab/FixFunction.cc
===================================================================
--- src/SymTab/FixFunction.cc	(revision 201aeb9b7c42eb7c7aa8bc065247bffda4932b33)
+++ src/SymTab/FixFunction.cc	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -27,8 +27,8 @@
 
 	DeclarationWithType * FixFunction::mutate(FunctionDecl *functionDecl) {
+		// can't delete function type because it may contain assertions, so transfer ownership to new object
 		ObjectDecl *pointer = new ObjectDecl( functionDecl->get_name(), functionDecl->get_storageClasses(), functionDecl->get_linkage(), 0, new PointerType( Type::Qualifiers(), functionDecl->get_type() ), 0, functionDecl->get_attributes() );
 		functionDecl->get_attributes().clear();
-		// can't delete function type because it may contain assertions, but can't transfer ownership without a clone since set_type checks for nullptr
-		functionDecl->set_type( functionDecl->get_type()->clone() );
+		functionDecl->type = nullptr;
 		delete functionDecl;
 		return pointer;
Index: src/SymTab/Indexer.cc
===================================================================
--- src/SymTab/Indexer.cc	(revision 201aeb9b7c42eb7c7aa8bc065247bffda4932b33)
+++ src/SymTab/Indexer.cc	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -40,17 +40,4 @@
 
 namespace SymTab {
-	struct NewScope {
-		NewScope( SymTab::Indexer & indexer ) : indexer( indexer ) { indexer.enterScope(); }
-		~NewScope() { indexer.leaveScope(); }
-		SymTab::Indexer & indexer;
-	};
-
-	template< typename TreeType, typename VisitorType >
-	inline void acceptNewScope( TreeType *tree, VisitorType &visitor ) {
-		visitor.enterScope();
-		maybeAccept( tree, visitor );
-		visitor.leaveScope();
-	}
-
 	typedef std::unordered_map< std::string, DeclarationWithType* > MangleTable;
 	typedef std::unordered_map< std::string, MangleTable > IdTable;
@@ -198,9 +185,9 @@
 	}
 
-	Indexer::Indexer( bool _doDebug ) : tables( 0 ), scope( 0 ), doDebug( _doDebug ) {}
-
-	Indexer::Indexer( const Indexer &that ) : tables( newRef( that.tables ) ), scope( that.scope ), doDebug( that.doDebug ) {}
-
-	Indexer::Indexer( Indexer &&that ) : tables( that.tables ), scope( that.scope ), doDebug( that.doDebug ) {
+	Indexer::Indexer() : tables( 0 ), scope( 0 ) {}
+
+	Indexer::Indexer( const Indexer &that ) : doDebug( that.doDebug ), tables( newRef( that.tables ) ), scope( that.scope ) {}
+
+	Indexer::Indexer( Indexer &&that ) : doDebug( that.doDebug ), tables( that.tables ), scope( that.scope ) {
 		that.tables = 0;
 	}
Index: src/SymTab/Indexer.h
===================================================================
--- src/SymTab/Indexer.h	(revision 201aeb9b7c42eb7c7aa8bc065247bffda4932b33)
+++ src/SymTab/Indexer.h	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -26,5 +26,5 @@
 	class Indexer {
 	  public:
-		explicit Indexer( bool useDebug = false );
+		explicit Indexer();
 
 		Indexer( const Indexer &that );
@@ -76,4 +76,5 @@
 		void addTrait( TraitDecl *decl );
 
+		bool doDebug = false; ///< Display debugging trace?
 	  private:
 		struct Impl;
@@ -81,5 +82,4 @@
 		Impl *tables;         ///< Copy-on-write instance of table data structure
 		unsigned long scope;  ///< Scope index of this pointer
-		bool doDebug;         ///< Display debugging trace?
 
 		/// Takes a new ref to a table (returns null if null)
Index: src/SymTab/Mangler.cc
===================================================================
--- src/SymTab/Mangler.cc	(revision 201aeb9b7c42eb7c7aa8bc065247bffda4932b33)
+++ src/SymTab/Mangler.cc	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -31,5 +31,5 @@
 
 namespace SymTab {
-	std::string Mangler::mangleType( Type *ty ) {
+	std::string Mangler::mangleType( Type * ty ) {
 		Mangler mangler( false, true );
 		maybeAccept( ty, mangler );
@@ -48,5 +48,5 @@
 	}
 
-	void Mangler::mangleDecl( DeclarationWithType *declaration ) {
+	void Mangler::mangleDecl( DeclarationWithType * declaration ) {
 		bool wasTopLevel = isTopLevel;
 		if ( isTopLevel ) {
@@ -79,18 +79,18 @@
 	}
 
-	void Mangler::visit( ObjectDecl *declaration ) {
+	void Mangler::visit( ObjectDecl * declaration ) {
 		mangleDecl( declaration );
 	}
 
-	void Mangler::visit( FunctionDecl *declaration ) {
+	void Mangler::visit( FunctionDecl * declaration ) {
 		mangleDecl( declaration );
 	}
 
-	void Mangler::visit( VoidType *voidType ) {
+	void Mangler::visit( VoidType * voidType ) {
 		printQualifiers( voidType );
 		mangleName << "v";
 	}
 
-	void Mangler::visit( BasicType *basicType ) {
+	void Mangler::visit( BasicType * basicType ) {
 		static const char *btLetter[] = {
 			"b",	// Bool
@@ -123,5 +123,5 @@
 	}
 
-	void Mangler::visit( PointerType *pointerType ) {
+	void Mangler::visit( PointerType * pointerType ) {
 		printQualifiers( pointerType );
 		mangleName << "P";
@@ -129,5 +129,5 @@
 	}
 
-	void Mangler::visit( ArrayType *arrayType ) {
+	void Mangler::visit( ArrayType * arrayType ) {
 		// TODO: encode dimension
 		printQualifiers( arrayType );
@@ -136,5 +136,5 @@
 	}
 
-	void Mangler::visit( ReferenceType *refType ) {
+	void Mangler::visit( ReferenceType * refType ) {
 		printQualifiers( refType );
 		mangleName << "R";
@@ -151,5 +151,5 @@
 	}
 
-	void Mangler::visit( FunctionType *functionType ) {
+	void Mangler::visit( FunctionType * functionType ) {
 		printQualifiers( functionType );
 		mangleName << "F";
@@ -162,5 +162,5 @@
 	}
 
-	void Mangler::mangleRef( ReferenceToType *refType, std::string prefix ) {
+	void Mangler::mangleRef( ReferenceToType * refType, std::string prefix ) {
 		printQualifiers( refType );
 
@@ -168,5 +168,5 @@
 	}
 
-	void Mangler::mangleGenericRef( ReferenceToType *refType, std::string prefix ) {
+	void Mangler::mangleGenericRef( ReferenceToType * refType, std::string prefix ) {
 		printQualifiers( refType );
 
@@ -191,19 +191,19 @@
 	}
 
-	void Mangler::visit( StructInstType *aggregateUseType ) {
+	void Mangler::visit( StructInstType * aggregateUseType ) {
 		if ( typeMode ) mangleGenericRef( aggregateUseType, "s" );
 		else mangleRef( aggregateUseType, "s" );
 	}
 
-	void Mangler::visit( UnionInstType *aggregateUseType ) {
+	void Mangler::visit( UnionInstType * aggregateUseType ) {
 		if ( typeMode ) mangleGenericRef( aggregateUseType, "u" );
 		else mangleRef( aggregateUseType, "u" );
 	}
 
-	void Mangler::visit( EnumInstType *aggregateUseType ) {
+	void Mangler::visit( EnumInstType * aggregateUseType ) {
 		mangleRef( aggregateUseType, "e" );
 	}
 
-	void Mangler::visit( TypeInstType *typeInst ) {
+	void Mangler::visit( TypeInstType * typeInst ) {
 		VarMapType::iterator varNum = varNums.find( typeInst->get_name() );
 		if ( varNum == varNums.end() ) {
@@ -233,27 +233,27 @@
 	}
 
-	void Mangler::visit( TupleType *tupleType ) {
+	void Mangler::visit( TupleType * tupleType ) {
 		printQualifiers( tupleType );
 		mangleName << "T";
-		acceptAll( tupleType->get_types(), *this );
+		acceptAll( tupleType->types, *this );
 		mangleName << "_";
 	}
 
-	void Mangler::visit( VarArgsType *varArgsType ) {
+	void Mangler::visit( VarArgsType * varArgsType ) {
 		printQualifiers( varArgsType );
 		mangleName << "VARGS";
 	}
 
-	void Mangler::visit( __attribute__((unused)) ZeroType *zeroType ) {
+	void Mangler::visit( ZeroType * ) {
 		mangleName << "Z";
 	}
 
-	void Mangler::visit( __attribute__((unused)) OneType *oneType ) {
+	void Mangler::visit( OneType * ) {
 		mangleName << "O";
 	}
 
-	void Mangler::visit( TypeDecl *decl ) {
+	void Mangler::visit( TypeDecl * decl ) {
 		static const char *typePrefix[] = { "BT", "BD", "BF" };
-		mangleName << typePrefix[ decl->get_kind() ] << ( decl->get_name().length() + 1 ) << decl->get_name();
+		mangleName << typePrefix[ decl->get_kind() ] << ( decl->name.length() + 1 ) << decl->name;
 	}
 
@@ -264,5 +264,5 @@
 	}
 
-	void Mangler::printQualifiers( Type *type ) {
+	void Mangler::printQualifiers( Type * type ) {
 		// skip if not including qualifiers
 		if ( typeMode ) return;
@@ -272,5 +272,5 @@
 			int tcount = 0, dcount = 0, fcount = 0, vcount = 0;
 			mangleName << "A";
-			for ( Type::ForallList::iterator i = type->get_forall().begin(); i != type->get_forall().end(); ++i ) {
+			for ( Type::ForallList::iterator i = type->forall.begin(); i != type->forall.end(); ++i ) {
 				switch ( (*i)->get_kind() ) {
 				  case TypeDecl::Any:
@@ -289,6 +289,6 @@
 					assert( false );
 				} // switch
-				varNums[ (*i )->get_name() ] = std::pair< int, int >( nextVarNum++, (int )(*i )->get_kind() );
-				for ( std::list< DeclarationWithType* >::iterator assert = (*i )->get_assertions().begin(); assert != (*i )->get_assertions().end(); ++assert ) {
+				varNums[ (*i)->name ] = std::pair< int, int >( nextVarNum++, (int)(*i)->get_kind() );
+				for ( std::list< DeclarationWithType* >::iterator assert = (*i)->assertions.begin(); assert != (*i)->assertions.end(); ++assert ) {
 					Mangler sub_mangler( mangleOverridable, typeMode );
 					sub_mangler.nextVarNum = nextVarNum;
@@ -309,4 +309,7 @@
 			mangleName << "V";
 		} // if
+		if ( type->get_mutex() ) {
+			mangleName << "M";
+		} // if
 		// Removed due to restrict not affecting function compatibility in GCC
 //		if ( type->get_isRestrict() ) {
@@ -314,6 +317,7 @@
 //		} // if
 		if ( type->get_lvalue() ) {
+			// mangle based on whether the type is lvalue, so that the resolver can differentiate lvalues and rvalues
 			mangleName << "L";
-		} // if
+		}
 		if ( type->get_atomic() ) {
 			mangleName << "A";
Index: src/SymTab/Validate.cc
===================================================================
--- src/SymTab/Validate.cc	(revision 201aeb9b7c42eb7c7aa8bc065247bffda4932b33)
+++ src/SymTab/Validate.cc	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -56,4 +56,5 @@
 #include "FixFunction.h"               // for FixFunction
 #include "Indexer.h"                   // for Indexer
+#include "InitTweak/GenInit.h"         // for fixReturnStatements
 #include "InitTweak/InitTweak.h"       // for isCtorDtorAssign
 #include "Parser/LinkageSpec.h"        // for C
@@ -150,6 +151,6 @@
 	/// Replaces array and function types in forall lists by appropriate pointer type and assigns each Object and Function declaration a unique ID.
 	struct ForallPointerDecay final {
-		void previsit( ObjectDecl *object );
-		void previsit( FunctionDecl *func );
+		void previsit( ObjectDecl * object );
+		void previsit( FunctionDecl * func );
 	};
 
@@ -579,6 +580,6 @@
 
 	/// Fix up assertions - flattens assertion lists, removing all trait instances
-	void forallFixer( Type * func ) {
-		for ( TypeDecl * type : func->get_forall() ) {
+	void forallFixer( std::list< TypeDecl * > & forall, BaseSyntaxNode * node ) {
+		for ( TypeDecl * type : forall ) {
 			std::list< DeclarationWithType * > asserts;
 			asserts.splice( asserts.end(), type->assertions );
@@ -599,5 +600,5 @@
 				assertion = assertion->acceptMutator( fixer );
 				if ( fixer.get_isVoid() ) {
-					throw SemanticError( "invalid type void in assertion of function ", func );
+					throw SemanticError( "invalid type void in assertion of function ", node );
 				} // if
 			} // for
@@ -607,7 +608,7 @@
 
 	void ForallPointerDecay::previsit( ObjectDecl *object ) {
-		forallFixer( object->get_type() );
-		if ( PointerType *pointer = dynamic_cast< PointerType * >( object->get_type() ) ) {
-			forallFixer( pointer->get_base() );
+		forallFixer( object->type->forall, object );
+		if ( PointerType *pointer = dynamic_cast< PointerType * >( object->type ) ) {
+			forallFixer( pointer->base->forall, object );
 		} // if
 		object->fixUniqueId();
@@ -615,5 +616,5 @@
 
 	void ForallPointerDecay::previsit( FunctionDecl *func ) {
-		forallFixer( func->get_type() );
+		forallFixer( func->type->forall, func );
 		func->fixUniqueId();
 	}
Index: src/SynTree/AddStmtVisitor.cc
===================================================================
--- src/SynTree/AddStmtVisitor.cc	(revision 201aeb9b7c42eb7c7aa8bc065247bffda4932b33)
+++ 	(revision )
@@ -1,93 +1,0 @@
-//
-// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
-//
-// The contents of this file are covered under the licence agreement in the
-// file "LICENCE" distributed with Cforall.
-//
-// AddStmtVisitor.cc --
-//
-// Author           : Rob Schluntz
-// Created On       : Wed Jun 22 12:11:17 2016
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Aug  4 11:23:47 2016
-// Update Count     : 16
-//
-
-#include "AddStmtVisitor.h"
-
-#include "Common/SemanticError.h"  // for SemanticError
-#include "Declaration.h"           // for Declaration
-#include "Expression.h"            // for Expression
-#include "Statement.h"             // for CompoundStmt, ForStmt, IfStmt, Sta...
-#include "SynTree/Label.h"         // for Label, noLabels
-
-void AddStmtVisitor::visitStatementList( std::list< Statement* > &statements ) {
-	for ( std::list< Statement* >::iterator i = statements.begin(); i != statements.end(); ++i ) {
-		if ( ! stmtsToAddAfter.empty() ) {
-			statements.splice( i, stmtsToAddAfter );
-		} // if
-		(*i)->accept( *this );
-		if ( ! stmtsToAdd.empty() ) {
-			statements.splice( i, stmtsToAdd );
-		} // if
-	} // for
-	if ( ! stmtsToAddAfter.empty() ) {
-		statements.splice( statements.end(), stmtsToAddAfter );
-	} // if
-}
-
-Statement * AddStmtVisitor::visitStatement( Statement *stmt ) {
-	maybeAccept( stmt, *this );
-	if ( ! stmtsToAdd.empty() || ! stmtsToAddAfter.empty() ) {
-		CompoundStmt *compound = new CompoundStmt( noLabels );
-		compound->get_kids().splice( compound->get_kids().end(), stmtsToAdd );
-		compound->get_kids().push_back( stmt );
-		compound->get_kids().splice( compound->get_kids().end(), stmtsToAddAfter );
-		return compound;
-	} else {
-		return stmt;
-	}
-}
-
-void AddStmtVisitor::visit(CompoundStmt *compoundStmt) {
-	visitStatementList( compoundStmt->get_kids() );
-}
-
-void AddStmtVisitor::visit(IfStmt *ifStmt) {
-	ifStmt->set_thenPart( visitStatement( ifStmt->get_thenPart() ) );
-	ifStmt->set_elsePart( visitStatement( ifStmt->get_elsePart() ) );
-	maybeAccept( ifStmt->get_condition(), *this );
-}
-
-void AddStmtVisitor::visit(WhileStmt *whileStmt) {
-	whileStmt->set_body( visitStatement( whileStmt->get_body() ) );
-	maybeAccept( whileStmt->get_condition(), *this );
-}
-
-void AddStmtVisitor::visit(ForStmt *forStmt) {
-	forStmt->set_body( visitStatement( forStmt->get_body() ) );
-	acceptAll( forStmt->get_initialization(), *this );
-	maybeAccept( forStmt->get_condition(), *this );
-	maybeAccept( forStmt->get_increment(), *this );
-}
-
-void AddStmtVisitor::visit(SwitchStmt *switchStmt) {
-	visitStatementList( switchStmt->get_statements() );
-	maybeAccept( switchStmt->get_condition(), *this );
-}
-
-void AddStmtVisitor::visit(CaseStmt *caseStmt) {
-	visitStatementList( caseStmt->get_statements() );
-	maybeAccept( caseStmt->get_condition(), *this );
-}
-
-void AddStmtVisitor::visit(CatchStmt *catchStmt) {
-	catchStmt->set_body( visitStatement( catchStmt->get_body() ) );
-	maybeAccept( catchStmt->get_decl(), *this );
-}
-
-// Local Variables: //
-// tab-width: 4 //
-// mode: c++ //
-// compile-command: "make install" //
-// End: //
Index: src/SynTree/AddStmtVisitor.h
===================================================================
--- src/SynTree/AddStmtVisitor.h	(revision 201aeb9b7c42eb7c7aa8bc065247bffda4932b33)
+++ 	(revision )
@@ -1,47 +1,0 @@
-//
-// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
-//
-// The contents of this file are covered under the licence agreement in the
-// file "LICENCE" distributed with Cforall.
-//
-// AddStmtVisitor.h --
-//
-// Author           : Rob Schluntz
-// Created On       : Wed Jun 22 12:05:48 2016
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Sat Jul 22 09:51:08 2017
-// Update Count     : 9
-//
-
-#pragma once
-
-#include <list>               // for list
-
-#include "SynTree/SynTree.h"  // for Visitor Nodes
-#include "SynTree/Visitor.h"  // for Visitor
-
-class AddStmtVisitor : public Visitor {
-  public:
-	typedef Visitor Parent;
-
-	using Parent::visit;
-	virtual void visit(CompoundStmt *compoundStmt);
-	virtual void visit(IfStmt *ifStmt);
-	virtual void visit(WhileStmt *whileStmt);
-	virtual void visit(ForStmt *forStmt);
-	virtual void visit(SwitchStmt *switchStmt);
-	virtual void visit(CaseStmt *caseStmt);
-	virtual void visit(CatchStmt *catchStmt);
-
-  protected:
-	void visitStatementList( std::list< Statement * > & );
-	Statement * visitStatement( Statement * );
-	std::list< Statement* > stmtsToAdd;
-	std::list< Statement* > stmtsToAddAfter;
-};
-
-// Local Variables: //
-// tab-width: 4 //
-// mode: c++ //
-// compile-command: "make install" //
-// End: //
Index: src/SynTree/BaseSyntaxNode.h
===================================================================
--- src/SynTree/BaseSyntaxNode.h	(revision 201aeb9b7c42eb7c7aa8bc065247bffda4932b33)
+++ src/SynTree/BaseSyntaxNode.h	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -26,6 +26,8 @@
 
 	virtual void accept( Visitor & v ) = 0;
-  virtual void print( std::ostream & os, int indent = 0 ) const = 0;
+  	virtual void print( std::ostream & os, int indent = 0 ) const = 0;
 };
+
+std::ostream & operator<<( std::ostream & out, const BaseSyntaxNode * node );
 
 // Local Variables: //
Index: src/SynTree/CompoundStmt.cc
===================================================================
--- src/SynTree/CompoundStmt.cc	(revision 201aeb9b7c42eb7c7aa8bc065247bffda4932b33)
+++ src/SynTree/CompoundStmt.cc	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -29,4 +29,7 @@
 
 CompoundStmt::CompoundStmt( std::list<Label> labels ) : Statement( labels ) {
+}
+
+CompoundStmt::CompoundStmt( std::list<Statement *> stmts ) : Statement( noLabels ), kids( stmts ) {
 }
 
Index: src/SynTree/Constant.cc
===================================================================
--- src/SynTree/Constant.cc	(revision 201aeb9b7c42eb7c7aa8bc065247bffda4932b33)
+++ src/SynTree/Constant.cc	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -32,4 +32,8 @@
 Constant Constant::from_bool( bool b ) {
 	return Constant( new BasicType( Type::Qualifiers(), BasicType::Bool ), b ? "1" : "0" , (unsigned long long int)b );
+}
+
+Constant Constant::from_char( char c ) {
+	return Constant( new BasicType( Type::Qualifiers(), BasicType::Char ), std::to_string( c ), (unsigned long long int)c );
 }
 
Index: src/SynTree/Constant.h
===================================================================
--- src/SynTree/Constant.h	(revision 201aeb9b7c42eb7c7aa8bc065247bffda4932b33)
+++ src/SynTree/Constant.h	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -40,4 +40,6 @@
 	/// generates a boolean constant of the given bool
 	static Constant from_bool( bool b );
+	/// generates a char constant of the given char
+	static Constant from_char( char c );
 	/// generates an integer constant of the given int
 	static Constant from_int( int i );
Index: src/SynTree/Declaration.cc
===================================================================
--- src/SynTree/Declaration.cc	(revision 201aeb9b7c42eb7c7aa8bc065247bffda4932b33)
+++ src/SynTree/Declaration.cc	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -59,13 +59,4 @@
 }
 
-std::ostream & operator<<( std::ostream & out, const Declaration * decl ) {
-	if ( decl ){
-		decl->print( out );
-	} else {
-		out << "nullptr";
-	}
-	return out;
-}
-
 
 AsmDecl::AsmDecl( AsmStmt *stmt ) : Declaration( "", Type::StorageClasses(), LinkageSpec::C ), stmt( stmt ) {
Index: src/SynTree/Declaration.h
===================================================================
--- src/SynTree/Declaration.h	(revision 201aeb9b7c42eb7c7aa8bc065247bffda4932b33)
+++ src/SynTree/Declaration.h	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -62,7 +62,7 @@
 	void fixUniqueId( void );
 	virtual Declaration *clone() const = 0;
-	virtual void accept( Visitor &v ) = 0;
+	virtual void accept( Visitor &v ) override = 0;
 	virtual Declaration *acceptMutator( Mutator &m ) = 0;
-	virtual void print( std::ostream &os, int indent = 0 ) const = 0;
+	virtual void print( std::ostream &os, int indent = 0 ) const override = 0;
 	virtual void printShort( std::ostream &os, int indent = 0 ) const = 0;
 
@@ -106,6 +106,6 @@
 	//void set_functionSpecifiers( Type::FuncSpecifiers newValue ) { fs = newValue; }
 
-	virtual DeclarationWithType *clone() const = 0;
-	virtual DeclarationWithType *acceptMutator( Mutator &m ) = 0;
+	virtual DeclarationWithType *clone() const override = 0;
+	virtual DeclarationWithType *acceptMutator( Mutator &m )  override = 0;
 
 	virtual Type * get_type() const = 0;
@@ -128,6 +128,6 @@
 	virtual ~ObjectDecl();
 
-	virtual Type * get_type() const { return type; }
-	virtual void set_type(Type *newType) { type = newType; }
+	virtual Type * get_type() const override { return type; }
+	virtual void set_type(Type *newType) override { type = newType; }
 
 	Initializer *get_init() const { return init; }
@@ -139,9 +139,9 @@
 	static ObjectDecl * newObject( const std::string & name, Type * type, Initializer * init );
 
-	virtual ObjectDecl *clone() const { return new ObjectDecl( *this ); }
-	virtual void accept( Visitor &v ) { v.visit( this ); }
-	virtual DeclarationWithType *acceptMutator( Mutator &m ) { return m.mutate( this ); }
-	virtual void print( std::ostream &os, int indent = 0 ) const;
-	virtual void printShort( std::ostream &os, int indent = 0 ) const;
+	virtual ObjectDecl *clone() const override { return new ObjectDecl( *this ); }
+	virtual void accept( Visitor &v ) override { v.visit( this ); }
+	virtual DeclarationWithType *acceptMutator( Mutator &m )  override { return m.mutate( this ); }
+	virtual void print( std::ostream &os, int indent = 0 ) const override;
+	virtual void printShort( std::ostream &os, int indent = 0 ) const override;
 };
 
@@ -157,6 +157,6 @@
 	virtual ~FunctionDecl();
 
-	Type * get_type() const { return type; }
-	virtual void set_type(Type * t) { type = strict_dynamic_cast< FunctionType* >( t ); }
+	virtual Type * get_type() const override { return type; }
+	virtual void set_type(Type * t) override { type = strict_dynamic_cast< FunctionType* >( t ); }
 
 	FunctionType * get_functionType() const { return type; }
@@ -165,9 +165,9 @@
 	void set_statements( CompoundStmt *newValue ) { statements = newValue; }
 
-	virtual FunctionDecl *clone() const { return new FunctionDecl( *this ); }
-	virtual void accept( Visitor &v ) { v.visit( this ); }
-	virtual DeclarationWithType *acceptMutator( Mutator &m ) { return m.mutate( this ); }
-	virtual void print( std::ostream &os, int indent = 0 ) const;
-	virtual void printShort( std::ostream &os, int indent = 0 ) const;
+	virtual FunctionDecl *clone() const override { return new FunctionDecl( *this ); }
+	virtual void accept( Visitor &v ) override { v.visit( this ); }
+	virtual DeclarationWithType *acceptMutator( Mutator &m )  override { return m.mutate( this ); }
+	virtual void print( std::ostream &os, int indent = 0 ) const override;
+	virtual void printShort( std::ostream &os, int indent = 0 ) const override;
 };
 
@@ -190,7 +190,7 @@
 	virtual std::string typeString() const = 0;
 
-	virtual NamedTypeDecl *clone() const = 0;
-	virtual void print( std::ostream &os, int indent = 0 ) const;
-	virtual void printShort( std::ostream &os, int indent = 0 ) const;
+	virtual NamedTypeDecl *clone() const override = 0;
+	virtual void print( std::ostream &os, int indent = 0 ) const override;
+	virtual void printShort( std::ostream &os, int indent = 0 ) const override;
 };
 
@@ -227,11 +227,11 @@
 	TypeDecl * set_sized( bool newValue ) { sized = newValue; return this; }
 
-	virtual std::string typeString() const;
+	virtual std::string typeString() const override;
 	virtual std::string genTypeString() const;
 
-	virtual TypeDecl *clone() const { return new TypeDecl( *this ); }
-	virtual void accept( Visitor &v ) { v.visit( this ); }
-	virtual Declaration *acceptMutator( Mutator &m ) { return m.mutate( this ); }
-	virtual void print( std::ostream &os, int indent = 0 ) const;
+	virtual TypeDecl *clone() const override { return new TypeDecl( *this ); }
+	virtual void accept( Visitor &v ) override { v.visit( this ); }
+	virtual Declaration *acceptMutator( Mutator &m )  override { return m.mutate( this ); }
+	virtual void print( std::ostream &os, int indent = 0 ) const override;
 
   private:
@@ -245,9 +245,9 @@
 	TypedefDecl( const TypedefDecl &other ) : Parent( other ) {}
 
-	virtual std::string typeString() const;
-
-	virtual TypedefDecl *clone() const { return new TypedefDecl( *this ); }
-	virtual void accept( Visitor &v ) { v.visit( this ); }
-	virtual Declaration *acceptMutator( Mutator &m ) { return m.mutate( this ); }
+	virtual std::string typeString() const override;
+
+	virtual TypedefDecl *clone() const override { return new TypedefDecl( *this ); }
+	virtual void accept( Visitor &v ) override { v.visit( this ); }
+	virtual Declaration *acceptMutator( Mutator &m )  override { return m.mutate( this ); }
   private:
 };
@@ -274,6 +274,6 @@
 	AggregateDecl * set_body( bool body ) { AggregateDecl::body = body; return this; }
 
-	virtual void print( std::ostream &os, int indent = 0 ) const;
-	virtual void printShort( std::ostream &os, int indent = 0 ) const;
+	virtual void print( std::ostream &os, int indent = 0 ) const override;
+	virtual void printShort( std::ostream &os, int indent = 0 ) const override;
   protected:
 	virtual std::string typeString() const = 0;
@@ -290,10 +290,10 @@
 	bool is_thread() { return kind == DeclarationNode::Thread; }
 
-	virtual StructDecl *clone() const { return new StructDecl( *this ); }
-	virtual void accept( Visitor &v ) { v.visit( this ); }
-	virtual Declaration *acceptMutator( Mutator &m ) { return m.mutate( this ); }
+	virtual StructDecl *clone() const override { return new StructDecl( *this ); }
+	virtual void accept( Visitor &v ) override { v.visit( this ); }
+	virtual Declaration *acceptMutator( Mutator &m )  override { return m.mutate( this ); }
   private:
 	DeclarationNode::Aggregate kind;
-	virtual std::string typeString() const;
+	virtual std::string typeString() const override;
 };
 
@@ -304,9 +304,9 @@
 	UnionDecl( const UnionDecl &other ) : Parent( other ) {}
 
-	virtual UnionDecl *clone() const { return new UnionDecl( *this ); }
-	virtual void accept( Visitor &v ) { v.visit( this ); }
-	virtual Declaration *acceptMutator( Mutator &m ) { return m.mutate( this ); }
-  private:
-	virtual std::string typeString() const;
+	virtual UnionDecl *clone() const override { return new UnionDecl( *this ); }
+	virtual void accept( Visitor &v ) override { v.visit( this ); }
+	virtual Declaration *acceptMutator( Mutator &m )  override { return m.mutate( this ); }
+  private:
+	virtual std::string typeString() const override;
 };
 
@@ -317,9 +317,9 @@
 	EnumDecl( const EnumDecl &other ) : Parent( other ) {}
 
-	virtual EnumDecl *clone() const { return new EnumDecl( *this ); }
-	virtual void accept( Visitor &v ) { v.visit( this ); }
-	virtual Declaration *acceptMutator( Mutator &m ) { return m.mutate( this ); }
-  private:
-	virtual std::string typeString() const;
+	virtual EnumDecl *clone() const override { return new EnumDecl( *this ); }
+	virtual void accept( Visitor &v ) override { v.visit( this ); }
+	virtual Declaration *acceptMutator( Mutator &m )  override { return m.mutate( this ); }
+  private:
+	virtual std::string typeString() const override;
 };
 
@@ -332,9 +332,9 @@
 	TraitDecl( const TraitDecl &other ) : Parent( other ) {}
 
-	virtual TraitDecl *clone() const { return new TraitDecl( *this ); }
-	virtual void accept( Visitor &v ) { v.visit( this ); }
-	virtual Declaration *acceptMutator( Mutator &m ) { return m.mutate( this ); }
-  private:
-	virtual std::string typeString() const;
+	virtual TraitDecl *clone() const override { return new TraitDecl( *this ); }
+	virtual void accept( Visitor &v ) override { v.visit( this ); }
+	virtual Declaration *acceptMutator( Mutator &m )  override { return m.mutate( this ); }
+  private:
+	virtual std::string typeString() const override;
 };
 
@@ -350,12 +350,11 @@
 	void set_stmt( AsmStmt *newValue ) { stmt = newValue; }
 
-	virtual AsmDecl *clone() const { return new AsmDecl( *this ); }
-	virtual void accept( Visitor &v ) { v.visit( this ); }
-	virtual AsmDecl *acceptMutator( Mutator &m ) { return m.mutate( this ); }
-	virtual void print( std::ostream &os, int indent = 0 ) const;
-	virtual void printShort( std::ostream &os, int indent = 0 ) const;
-};
-
-std::ostream & operator<<( std::ostream & out, const Declaration * decl );
+	virtual AsmDecl *clone() const override { return new AsmDecl( *this ); }
+	virtual void accept( Visitor &v ) override { v.visit( this ); }
+	virtual AsmDecl *acceptMutator( Mutator &m )  override { return m.mutate( this ); }
+	virtual void print( std::ostream &os, int indent = 0 ) const override;
+	virtual void printShort( std::ostream &os, int indent = 0 ) const override;
+};
+
 std::ostream & operator<<( std::ostream & os, const TypeDecl::Data & data );
 
Index: src/SynTree/Expression.cc
===================================================================
--- src/SynTree/Expression.cc	(revision 201aeb9b7c42eb7c7aa8bc065247bffda4932b33)
+++ src/SynTree/Expression.cc	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -741,14 +741,4 @@
 }
 
-
-std::ostream & operator<<( std::ostream & out, const Expression * expr ) {
-	if ( expr ) {
-		expr->print( out );
-	} else {
-		out << "nullptr";
-	}
-	return out;
-}
-
 // Local Variables: //
 // tab-width: 4 //
Index: src/SynTree/Expression.h
===================================================================
--- src/SynTree/Expression.h	(revision 201aeb9b7c42eb7c7aa8bc065247bffda4932b33)
+++ src/SynTree/Expression.h	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -821,7 +821,4 @@
 };
 
-
-std::ostream & operator<<( std::ostream & out, const Expression * expr );
-
 // Local Variables: //
 // tab-width: 4 //
Index: src/SynTree/Initializer.cc
===================================================================
--- src/SynTree/Initializer.cc	(revision 201aeb9b7c42eb7c7aa8bc065247bffda4932b33)
+++ src/SynTree/Initializer.cc	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -137,22 +137,4 @@
 }
 
-std::ostream & operator<<( std::ostream & out, const Initializer * init ) {
-	if ( init ) {
-		init->print( out );
-	} else {
-		out << "nullptr";
-	}
-	return out;
-}
-
-std::ostream & operator<<( std::ostream & out, const Designation * des ) {
-	if ( des ) {
-		des->print( out );
-	} else {
-		out << "nullptr";
-	}
-	return out;
-}
-
 // Local Variables: //
 // tab-width: 4 //
Index: src/SynTree/Initializer.h
===================================================================
--- src/SynTree/Initializer.h	(revision 201aeb9b7c42eb7c7aa8bc065247bffda4932b33)
+++ src/SynTree/Initializer.h	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -38,7 +38,7 @@
 
 	virtual Designation * clone() const { return new Designation( *this ); };
-	virtual void accept( Visitor &v ) { v.visit( this ); }
+	virtual void accept( Visitor &v ) override { v.visit( this ); }
 	virtual Designation * acceptMutator( Mutator &m ) { return m.mutate( this ); }
-	virtual void print( std::ostream &os, int indent = 0 ) const;
+	virtual void print( std::ostream &os, int indent = 0 ) const override;
 };
 
@@ -55,7 +55,7 @@
 
 	virtual Initializer *clone() const = 0;
-	virtual void accept( Visitor &v ) = 0;
+	virtual void accept( Visitor &v ) override = 0;
 	virtual Initializer *acceptMutator( Mutator &m ) = 0;
-	virtual void print( std::ostream &os, int indent = 0 ) const = 0;
+	virtual void print( std::ostream &os, int indent = 0 ) const override = 0;
   private:
 	bool maybeConstructed;
@@ -75,8 +75,8 @@
 	void set_value( Expression *newValue ) { value = newValue; }
 
-	virtual SingleInit *clone() const { return new SingleInit( *this); }
-	virtual void accept( Visitor &v ) { v.visit( this ); }
-	virtual Initializer *acceptMutator( Mutator &m ) { return m.mutate( this ); }
-	virtual void print( std::ostream &os, int indent = 0 ) const;
+	virtual SingleInit *clone() const override { return new SingleInit( *this); }
+	virtual void accept( Visitor &v ) override { v.visit( this ); }
+	virtual Initializer *acceptMutator( Mutator &m )  override { return m.mutate( this ); }
+	virtual void print( std::ostream &os, int indent = 0 ) const override;
 };
 
@@ -103,8 +103,8 @@
 	const_iterator end() const { return initializers.end(); }
 
-	virtual ListInit *clone() const { return new ListInit( *this ); }
-	virtual void accept( Visitor &v ) { v.visit( this ); }
-	virtual Initializer *acceptMutator( Mutator &m ) { return m.mutate( this ); }
-	virtual void print( std::ostream &os, int indent = 0 ) const;
+	virtual ListInit *clone() const override { return new ListInit( *this ); }
+	virtual void accept( Visitor &v ) override { v.visit( this ); }
+	virtual Initializer *acceptMutator( Mutator &m )  override { return m.mutate( this ); }
+	virtual void print( std::ostream &os, int indent = 0 ) const override;
 };
 
@@ -129,8 +129,8 @@
 	Initializer * get_init() const { return init; }
 
-	ConstructorInit *clone() const { return new ConstructorInit( *this ); }
-	virtual void accept( Visitor &v ) { v.visit( this ); }
-	virtual Initializer *acceptMutator( Mutator &m ) { return m.mutate( this ); }
-	virtual void print( std::ostream &os, int indent = 0 ) const;
+	ConstructorInit *clone() const override { return new ConstructorInit( *this ); }
+	virtual void accept( Visitor &v ) override { v.visit( this ); }
+	virtual Initializer *acceptMutator( Mutator &m )  override { return m.mutate( this ); }
+	virtual void print( std::ostream &os, int indent = 0 ) const override;
 
   private:
@@ -140,7 +140,4 @@
 };
 
-std::ostream & operator<<( std::ostream & out, const Initializer * init );
-std::ostream & operator<<( std::ostream & out, const Designation * des );
-
 // Local Variables: //
 // tab-width: 4 //
Index: src/SynTree/Statement.cc
===================================================================
--- src/SynTree/Statement.cc	(revision 201aeb9b7c42eb7c7aa8bc065247bffda4932b33)
+++ src/SynTree/Statement.cc	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -168,5 +168,5 @@
 }
 
-SwitchStmt::SwitchStmt( std::list<Label> labels, Expression * condition, std::list<Statement *> &statements ):
+SwitchStmt::SwitchStmt( std::list<Label> labels, Expression * condition, const std::list<Statement *> &statements ):
 	Statement( labels ), condition( condition ), statements( statements ) {
 }
@@ -196,5 +196,5 @@
 }
 
-CaseStmt::CaseStmt( std::list<Label> labels, Expression *condition, std::list<Statement *> &statements, bool deflt ) throw ( SemanticError ) :
+CaseStmt::CaseStmt( std::list<Label> labels, Expression *condition, const std::list<Statement *> &statements, bool deflt ) throw ( SemanticError ) :
 	Statement( labels ), condition( condition ), stmts( statements ), _isDefault( deflt ) {
 	if ( isDefault() && condition != 0 )
@@ -497,13 +497,4 @@
 }
 
-std::ostream & operator<<( std::ostream & out, const Statement * statement ) {
-	if ( statement ) {
-		statement->print( out );
-	} else {
-		out << "nullptr";
-	}
-	return out;
-}
-
 // Local Variables: //
 // tab-width: 4 //
Index: src/SynTree/Statement.h
===================================================================
--- src/SynTree/Statement.h	(revision 201aeb9b7c42eb7c7aa8bc065247bffda4932b33)
+++ src/SynTree/Statement.h	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -44,7 +44,7 @@
 
 	virtual Statement *clone() const = 0;
-	virtual void accept( Visitor &v ) = 0;
+	virtual void accept( Visitor &v ) override = 0;
 	virtual Statement *acceptMutator( Mutator &m ) = 0;
-	virtual void print( std::ostream &os, int indent = 0 ) const;
+	virtual void print( std::ostream &os, int indent = 0 ) const override;
 };
 
@@ -54,4 +54,5 @@
 
 	CompoundStmt( std::list<Label> labels );
+	CompoundStmt( std::list<Statement *> stmts );
 	CompoundStmt( const CompoundStmt &other );
 	virtual ~CompoundStmt();
@@ -61,8 +62,8 @@
 	void push_front( Statement * stmt ) { kids.push_front( stmt ); }
 
-	virtual CompoundStmt *clone() const { return new CompoundStmt( *this ); }
-	virtual void accept( Visitor &v ) { v.visit( this ); }
-	virtual CompoundStmt *acceptMutator( Mutator &m ) { return m.mutate( this ); }
-	virtual void print( std::ostream &os, int indent = 0 ) const;
+	virtual CompoundStmt *clone() const override { return new CompoundStmt( *this ); }
+	virtual void accept( Visitor &v ) override { v.visit( this ); }
+	virtual CompoundStmt *acceptMutator( Mutator &m )  override { return m.mutate( this ); }
+	virtual void print( std::ostream &os, int indent = 0 ) const override;
 };
 
@@ -72,8 +73,8 @@
 	NullStmt( std::list<Label> labels );
 
-	virtual NullStmt *clone() const { return new NullStmt( *this ); }
-	virtual void accept( Visitor &v ) { v.visit( this ); }
-	virtual NullStmt *acceptMutator( Mutator &m ) { return m.mutate( this ); }
-	virtual void print( std::ostream &os, int indent = 0 ) const;
+	virtual NullStmt *clone() const override { return new NullStmt( *this ); }
+	virtual void accept( Visitor &v ) override { v.visit( this ); }
+	virtual NullStmt *acceptMutator( Mutator &m )  override { return m.mutate( this ); }
+	virtual void print( std::ostream &os, int indent = 0 ) const override;
 };
 
@@ -89,8 +90,8 @@
 	void set_expr( Expression *newValue ) { expr = newValue; }
 
-	virtual ExprStmt *clone() const { return new ExprStmt( *this ); }
-	virtual void accept( Visitor &v ) { v.visit( this ); }
-	virtual Statement *acceptMutator( Mutator &m ) { return m.mutate( this ); }
-	virtual void print( std::ostream &os, int indent = 0 ) const;
+	virtual ExprStmt *clone() const override { return new ExprStmt( *this ); }
+	virtual void accept( Visitor &v ) override { v.visit( this ); }
+	virtual Statement *acceptMutator( Mutator &m )  override { return m.mutate( this ); }
+	virtual void print( std::ostream &os, int indent = 0 ) const override;
 };
 
@@ -146,8 +147,8 @@
 	void set_elsePart( Statement *newValue ) { elsePart = newValue; }
 
-	virtual IfStmt *clone() const { return new IfStmt( *this ); }
-	virtual void accept( Visitor &v ) { v.visit( this ); }
-	virtual Statement *acceptMutator( Mutator &m ) { return m.mutate( this ); }
-	virtual void print( std::ostream &os, int indent = 0 ) const;
+	virtual IfStmt *clone() const override { return new IfStmt( *this ); }
+	virtual void accept( Visitor &v ) override { v.visit( this ); }
+	virtual Statement *acceptMutator( Mutator &m )  override { return m.mutate( this ); }
+	virtual void print( std::ostream &os, int indent = 0 ) const override;
 };
 
@@ -157,5 +158,5 @@
 	std::list<Statement *> statements;
 
-	SwitchStmt( std::list<Label> labels, Expression *condition, std::list<Statement *> &statements );
+	SwitchStmt( std::list<Label> labels, Expression *condition, const std::list<Statement *> &statements );
 	SwitchStmt( const SwitchStmt &other );
 	virtual ~SwitchStmt();
@@ -166,9 +167,9 @@
 	std::list<Statement *> & get_statements() { return statements; }
 
-	virtual void accept( Visitor &v ) { v.visit( this ); }
-	virtual Statement *acceptMutator( Mutator &m ) { return m.mutate( this ); }
-
-	virtual SwitchStmt *clone() const { return new SwitchStmt( *this ); }
-	virtual void print( std::ostream &os, int indent = 0 ) const;
+	virtual void accept( Visitor &v ) override { v.visit( this ); }
+	virtual Statement *acceptMutator( Mutator &m )  override { return m.mutate( this ); }
+
+	virtual SwitchStmt *clone() const override { return new SwitchStmt( *this ); }
+	virtual void print( std::ostream &os, int indent = 0 ) const override;
 
 };
@@ -179,5 +180,5 @@
 	std::list<Statement *> stmts;
 
-	CaseStmt( std::list<Label> labels, Expression *conditions, std::list<Statement *> &stmts, bool isdef = false ) throw(SemanticError);
+	CaseStmt( std::list<Label> labels, Expression *conditions, const std::list<Statement *> &stmts, bool isdef = false ) throw(SemanticError);
 	CaseStmt( const CaseStmt &other );
 	virtual ~CaseStmt();
@@ -194,9 +195,9 @@
 	void set_statements( std::list<Statement *> &newValue ) { stmts = newValue; }
 
-	virtual void accept( Visitor &v ) { v.visit( this ); }
-	virtual Statement *acceptMutator( Mutator &m ) { return m.mutate( this ); }
-
-	virtual CaseStmt *clone() const { return new CaseStmt( *this ); }
-	virtual void print( std::ostream &os, int indent = 0 ) const;
+	virtual void accept( Visitor &v ) override { v.visit( this ); }
+	virtual Statement *acceptMutator( Mutator &m )  override { return m.mutate( this ); }
+
+	virtual CaseStmt *clone() const override { return new CaseStmt( *this ); }
+	virtual void print( std::ostream &os, int indent = 0 ) const override;
   private:
 	bool _isDefault;
@@ -221,8 +222,8 @@
 	void set_isDoWhile( bool newValue ) { isDoWhile = newValue; }
 
-	virtual WhileStmt *clone() const { return new WhileStmt( *this ); }
-	virtual void accept( Visitor &v ) { v.visit( this ); }
-	virtual Statement *acceptMutator( Mutator &m ) { return m.mutate( this ); }
-	virtual void print( std::ostream &os, int indent = 0 ) const;
+	virtual WhileStmt *clone() const override { return new WhileStmt( *this ); }
+	virtual void accept( Visitor &v ) override { v.visit( this ); }
+	virtual Statement *acceptMutator( Mutator &m )  override { return m.mutate( this ); }
+	virtual void print( std::ostream &os, int indent = 0 ) const override;
 };
 
@@ -247,8 +248,8 @@
 	void set_body( Statement *newValue ) { body = newValue; }
 
-	virtual ForStmt *clone() const { return new ForStmt( *this ); }
-	virtual void accept( Visitor &v ) { v.visit( this ); }
-	virtual Statement *acceptMutator( Mutator &m ) { return m.mutate( this ); }
-	virtual void print( std::ostream &os, int indent = 0 ) const;
+	virtual ForStmt *clone() const override { return new ForStmt( *this ); }
+	virtual void accept( Visitor &v ) override { v.visit( this ); }
+	virtual Statement *acceptMutator( Mutator &m )  override { return m.mutate( this ); }
+	virtual void print( std::ostream &os, int indent = 0 ) const override;
 };
 
@@ -276,8 +277,8 @@
 	const char *get_typename() { return brType[ type ]; }
 
-	virtual BranchStmt *clone() const { return new BranchStmt( *this ); }
-	virtual void accept( Visitor &v ) { v.visit( this ); }
-	virtual Statement *acceptMutator( Mutator &m ) { return m.mutate( this ); }
-	virtual void print( std::ostream &os, int indent = 0 ) const;
+	virtual BranchStmt *clone() const override { return new BranchStmt( *this ); }
+	virtual void accept( Visitor &v ) override { v.visit( this ); }
+	virtual Statement *acceptMutator( Mutator &m )  override { return m.mutate( this ); }
+	virtual void print( std::ostream &os, int indent = 0 ) const override;
   private:
 	static const char *brType[];
@@ -295,8 +296,8 @@
 	void set_expr( Expression *newValue ) { expr = newValue; }
 
-	virtual ReturnStmt *clone() const { return new ReturnStmt( *this ); }
-	virtual void accept( Visitor &v ) { v.visit( this ); }
-	virtual Statement *acceptMutator( Mutator &m ) { return m.mutate( this ); }
-	virtual void print( std::ostream &os, int indent = 0 ) const;
+	virtual ReturnStmt *clone() const override { return new ReturnStmt( *this ); }
+	virtual void accept( Visitor &v ) override { v.visit( this ); }
+	virtual Statement *acceptMutator( Mutator &m )  override { return m.mutate( this ); }
+	virtual void print( std::ostream &os, int indent = 0 ) const override;
 };
 
@@ -319,8 +320,8 @@
 	void set_target( Expression * newTarget ) { target = newTarget; }
 
-	virtual ThrowStmt *clone() const { return new ThrowStmt( *this ); }
-	virtual void accept( Visitor &v ) { v.visit( this ); }
-	virtual Statement *acceptMutator( Mutator &m ) { return m.mutate( this ); }
-	virtual void print( std::ostream &os, int indent = 0 ) const;
+	virtual ThrowStmt *clone() const override { return new ThrowStmt( *this ); }
+	virtual void accept( Visitor &v ) override { v.visit( this ); }
+	virtual Statement *acceptMutator( Mutator &m )  override { return m.mutate( this ); }
+	virtual void print( std::ostream &os, int indent = 0 ) const override;
 };
 
@@ -342,8 +343,8 @@
 	void set_finally( FinallyStmt *newValue ) { finallyBlock = newValue; }
 
-	virtual TryStmt *clone() const { return new TryStmt( *this ); }
-	virtual void accept( Visitor &v ) { v.visit( this ); }
-	virtual Statement *acceptMutator( Mutator &m ) { return m.mutate( this ); }
-	virtual void print( std::ostream &os, int indent = 0 ) const;
+	virtual TryStmt *clone() const override { return new TryStmt( *this ); }
+	virtual void accept( Visitor &v ) override { v.visit( this ); }
+	virtual Statement *acceptMutator( Mutator &m )  override { return m.mutate( this ); }
+	virtual void print( std::ostream &os, int indent = 0 ) const override;
 };
 
@@ -370,8 +371,8 @@
 	void set_body( Statement *newValue ) { body = newValue; }
 
-	virtual CatchStmt *clone() const { return new CatchStmt( *this ); }
-	virtual void accept( Visitor &v ) { v.visit( this ); }
-	virtual Statement *acceptMutator( Mutator &m ) { return m.mutate( this ); }
-	virtual void print( std::ostream &os, int indent = 0 ) const;
+	virtual CatchStmt *clone() const override { return new CatchStmt( *this ); }
+	virtual void accept( Visitor &v ) override { v.visit( this ); }
+	virtual Statement *acceptMutator( Mutator &m )  override { return m.mutate( this ); }
+	virtual void print( std::ostream &os, int indent = 0 ) const override;
 };
 
@@ -387,8 +388,8 @@
 	void set_block( CompoundStmt *newValue ) { block = newValue; }
 
-	virtual FinallyStmt *clone() const { return new FinallyStmt( *this ); }
-	virtual void accept( Visitor &v ) { v.visit( this ); }
-	virtual Statement *acceptMutator( Mutator &m ) { return m.mutate( this ); }
-	virtual void print( std::ostream &os, int indent = 0 ) const;
+	virtual FinallyStmt *clone() const override { return new FinallyStmt( *this ); }
+	virtual void accept( Visitor &v ) override { v.visit( this ); }
+	virtual Statement *acceptMutator( Mutator &m )  override { return m.mutate( this ); }
+	virtual void print( std::ostream &os, int indent = 0 ) const override;
 };
 
@@ -424,8 +425,8 @@
 	} orelse;
 
-	virtual WaitForStmt *clone() const { return new WaitForStmt( *this ); }
-	virtual void accept( Visitor &v ) { v.visit( this ); }
-	virtual Statement *acceptMutator( Mutator &m ) { return m.mutate( this ); }
-	virtual void print( std::ostream &os, int indent = 0 ) const;
+	virtual WaitForStmt *clone() const override { return new WaitForStmt( *this ); }
+	virtual void accept( Visitor &v ) override { v.visit( this ); }
+	virtual Statement *acceptMutator( Mutator &m )  override { return m.mutate( this ); }
+	virtual void print( std::ostream &os, int indent = 0 ) const override;
 
 };
@@ -444,8 +445,8 @@
 	void set_decl( Declaration *newValue ) { decl = newValue; }
 
-	virtual DeclStmt *clone() const { return new DeclStmt( *this ); }
-	virtual void accept( Visitor &v ) { v.visit( this ); }
-	virtual Statement *acceptMutator( Mutator &m ) { return m.mutate( this ); }
-	virtual void print( std::ostream &os, int indent = 0 ) const;
+	virtual DeclStmt *clone() const override { return new DeclStmt( *this ); }
+	virtual void accept( Visitor &v ) override { v.visit( this ); }
+	virtual Statement *acceptMutator( Mutator &m )  override { return m.mutate( this ); }
+	virtual void print( std::ostream &os, int indent = 0 ) const override;
 };
 
@@ -466,12 +467,9 @@
 	void set_callStmt( Statement * newValue ) { callStmt = newValue; }
 
-	virtual ImplicitCtorDtorStmt *clone() const { return new ImplicitCtorDtorStmt( *this ); }
-	virtual void accept( Visitor &v ) { v.visit( this ); }
-	virtual Statement *acceptMutator( Mutator &m ) { return m.mutate( this ); }
-	virtual void print( std::ostream &os, int indent = 0 ) const;
-};
-
-
-std::ostream & operator<<( std::ostream & out, const Statement * statement );
+	virtual ImplicitCtorDtorStmt *clone() const override { return new ImplicitCtorDtorStmt( *this ); }
+	virtual void accept( Visitor &v ) override { v.visit( this ); }
+	virtual Statement *acceptMutator( Mutator &m )  override { return m.mutate( this ); }
+	virtual void print( std::ostream &os, int indent = 0 ) const override;
+};
 
 // Local Variables: //
Index: src/SynTree/Type.cc
===================================================================
--- src/SynTree/Type.cc	(revision 201aeb9b7c42eb7c7aa8bc065247bffda4932b33)
+++ src/SynTree/Type.cc	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -101,13 +101,4 @@
 const Type::Qualifiers noQualifiers;
 
-std::ostream & operator<<( std::ostream & out, const Type * type ) {
-	if ( type ) {
-		type->print( out );
-	} else {
-		out << "nullptr";
-	} // if
-	return out;
-}
-
 // Local Variables: //
 // tab-width: 4 //
Index: src/SynTree/Type.h
===================================================================
--- src/SynTree/Type.h	(revision 201aeb9b7c42eb7c7aa8bc065247bffda4932b33)
+++ src/SynTree/Type.h	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -192,11 +192,11 @@
 	VoidType( const Type::Qualifiers & tq, const std::list< Attribute * > & attributes = std::list< Attribute * >() );
 
-	virtual unsigned size() const { return 0; };
-	virtual bool isComplete() const { return false; }
-
-	virtual VoidType *clone() const { return new VoidType( *this ); }
-	virtual void accept( Visitor & v ) { v.visit( this ); }
-	virtual Type *acceptMutator( Mutator & m ) { return m.mutate( this ); }
-	virtual void print( std::ostream & os, int indent = 0 ) const;
+	virtual unsigned size() const override { return 0; };
+	virtual bool isComplete() const override { return false; }
+
+	virtual VoidType *clone() const override { return new VoidType( *this ); }
+	virtual void accept( Visitor & v ) override { v.visit( this ); }
+	virtual Type *acceptMutator( Mutator & m ) override { return m.mutate( this ); }
+	virtual void print( std::ostream & os, int indent = 0 ) const override;
 };
 
@@ -237,8 +237,8 @@
 	void set_kind( Kind newValue ) { kind = newValue; }
 
-	virtual BasicType *clone() const { return new BasicType( *this ); }
-	virtual void accept( Visitor & v ) { v.visit( this ); }
-	virtual Type *acceptMutator( Mutator & m ) { return m.mutate( this ); }
-	virtual void print( std::ostream & os, int indent = 0 ) const;
+	virtual BasicType *clone() const override { return new BasicType( *this ); }
+	virtual void accept( Visitor & v ) override { v.visit( this ); }
+	virtual Type *acceptMutator( Mutator & m ) override { return m.mutate( this ); }
+	virtual void print( std::ostream & os, int indent = 0 ) const override;
 
 	bool isInteger() const;
@@ -270,10 +270,10 @@
 	bool is_array() const { return isStatic || isVarLen || dimension; }
 
-	virtual bool isComplete() const { return ! isVarLen; }
-
-	virtual PointerType *clone() const { return new PointerType( *this ); }
-	virtual void accept( Visitor & v ) { v.visit( this ); }
-	virtual Type *acceptMutator( Mutator & m ) { return m.mutate( this ); }
-	virtual void print( std::ostream & os, int indent = 0 ) const;
+	virtual bool isComplete() const override { return ! isVarLen; }
+
+	virtual PointerType *clone() const override { return new PointerType( *this ); }
+	virtual void accept( Visitor & v ) override { v.visit( this ); }
+	virtual Type *acceptMutator( Mutator & m ) override { return m.mutate( this ); }
+	virtual void print( std::ostream & os, int indent = 0 ) const override;
 };
 
@@ -298,10 +298,10 @@
 	void set_isStatic( bool newValue ) { isStatic = newValue; }
 
-	virtual bool isComplete() const { return ! isVarLen; }
-
-	virtual ArrayType *clone() const { return new ArrayType( *this ); }
-	virtual void accept( Visitor & v ) { v.visit( this ); }
-	virtual Type *acceptMutator( Mutator & m ) { return m.mutate( this ); }
-	virtual void print( std::ostream & os, int indent = 0 ) const;
+	virtual bool isComplete() const override { return ! isVarLen; }
+
+	virtual ArrayType *clone() const override { return new ArrayType( *this ); }
+	virtual void accept( Visitor & v ) override { v.visit( this ); }
+	virtual Type *acceptMutator( Mutator & m ) override { return m.mutate( this ); }
+	virtual void print( std::ostream & os, int indent = 0 ) const override;
 };
 
@@ -317,15 +317,15 @@
 	void set_base( Type *newValue ) { base = newValue; }
 
-	virtual int referenceDepth() const;
+	virtual int referenceDepth() const override;
 
 	// Since reference types act like value types, their size is the size of the base.
 	// This makes it simple to cast the empty tuple to a reference type, since casts that increase
 	// the number of values are disallowed.
-	virtual unsigned size() const { return base->size(); }
-
-	virtual ReferenceType *clone() const { return new ReferenceType( *this ); }
-	virtual void accept( Visitor & v ) { v.visit( this ); }
-	virtual Type *acceptMutator( Mutator & m ) { return m.mutate( this ); }
-	virtual void print( std::ostream & os, int indent = 0 ) const;
+	virtual unsigned size() const override { return base->size(); }
+
+	virtual ReferenceType *clone() const override { return new ReferenceType( *this ); }
+	virtual void accept( Visitor & v ) override { v.visit( this ); }
+	virtual Type *acceptMutator( Mutator & m ) override { return m.mutate( this ); }
+	virtual void print( std::ostream & os, int indent = 0 ) const override;
 };
 
@@ -351,8 +351,8 @@
 	bool isTtype() const;
 
-	virtual FunctionType *clone() const { return new FunctionType( *this ); }
-	virtual void accept( Visitor & v ) { v.visit( this ); }
-	virtual Type *acceptMutator( Mutator & m ) { return m.mutate( this ); }
-	virtual void print( std::ostream & os, int indent = 0 ) const;
+	virtual FunctionType *clone() const override { return new FunctionType( *this ); }
+	virtual void accept( Visitor & v ) override { v.visit( this ); }
+	virtual Type *acceptMutator( Mutator & m ) override { return m.mutate( this ); }
+	virtual void print( std::ostream & os, int indent = 0 ) const override;
 };
 
@@ -373,8 +373,8 @@
 	void set_hoistType( bool newValue ) { hoistType = newValue; }
 
-	virtual ReferenceToType *clone() const = 0;
-	virtual void accept( Visitor & v ) = 0;
-	virtual Type *acceptMutator( Mutator & m ) = 0;
-	virtual void print( std::ostream & os, int indent = 0 ) const;
+	virtual ReferenceToType *clone() const override = 0;
+	virtual void accept( Visitor & v ) override = 0;
+	virtual Type *acceptMutator( Mutator & m ) override = 0;
+	virtual void print( std::ostream & os, int indent = 0 ) const override;
 
 	virtual void lookup( __attribute__((unused)) const std::string & name, __attribute__((unused)) std::list< Declaration* > & foundDecls ) const {}
@@ -400,17 +400,17 @@
 	std::list<TypeDecl*> * get_baseParameters();
 
-	virtual bool isComplete() const;
+	virtual bool isComplete() const override;
 
 	/// Looks up the members of this struct named "name" and places them into "foundDecls".
 	/// Clones declarations into "foundDecls", caller responsible for freeing
-	void lookup( const std::string & name, std::list< Declaration* > & foundDecls ) const;
-
-	virtual StructInstType *clone() const { return new StructInstType( *this ); }
-	virtual void accept( Visitor & v ) { v.visit( this ); }
-	virtual Type *acceptMutator( Mutator & m ) { return m.mutate( this ); }
-
-	virtual void print( std::ostream & os, int indent = 0 ) const;
+	void lookup( const std::string & name, std::list< Declaration* > & foundDecls ) const override;
+
+	virtual StructInstType *clone() const override { return new StructInstType( *this ); }
+	virtual void accept( Visitor & v ) override { v.visit( this ); }
+	virtual Type *acceptMutator( Mutator & m ) override { return m.mutate( this ); }
+
+	virtual void print( std::ostream & os, int indent = 0 ) const override;
   private:
-	virtual std::string typeString() const;
+	virtual std::string typeString() const override;
 };
 
@@ -432,17 +432,17 @@
 	std::list< TypeDecl * > * get_baseParameters();
 
-	virtual bool isComplete() const;
+	virtual bool isComplete() const override;
 
 	/// looks up the members of this union named "name" and places them into "foundDecls"
 	/// Clones declarations into "foundDecls", caller responsible for freeing
-	void lookup( const std::string & name, std::list< Declaration* > & foundDecls ) const;
-
-	virtual UnionInstType *clone() const { return new UnionInstType( *this ); }
-	virtual void accept( Visitor & v ) { v.visit( this ); }
-	virtual Type *acceptMutator( Mutator & m ) { return m.mutate( this ); }
-
-	virtual void print( std::ostream & os, int indent = 0 ) const;
+	void lookup( const std::string & name, std::list< Declaration* > & foundDecls ) const override;
+
+	virtual UnionInstType *clone() const override { return new UnionInstType( *this ); }
+	virtual void accept( Visitor & v ) override { v.visit( this ); }
+	virtual Type *acceptMutator( Mutator & m ) override { return m.mutate( this ); }
+
+	virtual void print( std::ostream & os, int indent = 0 ) const override;
   private:
-	virtual std::string typeString() const;
+	virtual std::string typeString() const override;
 };
 
@@ -461,11 +461,11 @@
 	void set_baseEnum( EnumDecl *newValue ) { baseEnum = newValue; }
 
-	virtual bool isComplete() const;
-
-	virtual EnumInstType *clone() const { return new EnumInstType( *this ); }
-	virtual void accept( Visitor & v ) { v.visit( this ); }
-	virtual Type *acceptMutator( Mutator & m ) { return m.mutate( this ); }
+	virtual bool isComplete() const override;
+
+	virtual EnumInstType *clone() const override { return new EnumInstType( *this ); }
+	virtual void accept( Visitor & v ) override { v.visit( this ); }
+	virtual Type *acceptMutator( Mutator & m ) override { return m.mutate( this ); }
   private:
-	virtual std::string typeString() const;
+	virtual std::string typeString() const override;
 };
 
@@ -482,11 +482,11 @@
 	~TraitInstType();
 
-	virtual bool isComplete() const;
-
-	virtual TraitInstType *clone() const { return new TraitInstType( *this ); }
-	virtual void accept( Visitor & v ) { v.visit( this ); }
-	virtual Type *acceptMutator( Mutator & m ) { return m.mutate( this ); }
+	virtual bool isComplete() const override;
+
+	virtual TraitInstType *clone() const override { return new TraitInstType( *this ); }
+	virtual void accept( Visitor & v ) override { v.visit( this ); }
+	virtual Type *acceptMutator( Mutator & m ) override { return m.mutate( this ); }
   private:
-	virtual std::string typeString() const;
+	virtual std::string typeString() const override;
 };
 
@@ -509,12 +509,12 @@
 	void set_isFtype( bool newValue ) { isFtype = newValue; }
 
-	virtual bool isComplete() const;
-
-	virtual TypeInstType *clone() const { return new TypeInstType( *this ); }
-	virtual void accept( Visitor & v ) { v.visit( this ); }
-	virtual Type *acceptMutator( Mutator & m ) { return m.mutate( this ); }
-	virtual void print( std::ostream & os, int indent = 0 ) const;
+	virtual bool isComplete() const override;
+
+	virtual TypeInstType *clone() const override { return new TypeInstType( *this ); }
+	virtual void accept( Visitor & v ) override { v.visit( this ); }
+	virtual Type *acceptMutator( Mutator & m ) override { return m.mutate( this ); }
+	virtual void print( std::ostream & os, int indent = 0 ) const override;
   private:
-	virtual std::string typeString() const;
+	virtual std::string typeString() const override;
 };
 
@@ -532,5 +532,5 @@
 
 	std::list<Type *> & get_types() { return types; }
-	virtual unsigned size() const { return types.size(); };
+	virtual unsigned size() const override { return types.size(); };
 
 	// For now, this is entirely synthetic -- tuple types always have unnamed members.
@@ -541,15 +541,15 @@
 	iterator end() { return types.end(); }
 
-	virtual Type * getComponent( unsigned i ) {
+	virtual Type * getComponent( unsigned i ) override {
 		assertf( i < size(), "TupleType::getComponent: index %d must be less than size %d", i, size() );
 		return *(begin()+i);
 	}
 
-	// virtual bool isComplete() const { return true; } // xxx - not sure if this is right, might need to recursively check complete-ness
-
-	virtual TupleType *clone() const { return new TupleType( *this ); }
-	virtual void accept( Visitor & v ) { v.visit( this ); }
-	virtual Type *acceptMutator( Mutator & m ) { return m.mutate( this ); }
-	virtual void print( std::ostream & os, int indent = 0 ) const;
+	// virtual bool isComplete() const override { return true; } // xxx - not sure if this is right, might need to recursively check complete-ness
+
+	virtual TupleType *clone() const override { return new TupleType( *this ); }
+	virtual void accept( Visitor & v ) override { v.visit( this ); }
+	virtual Type *acceptMutator( Mutator & m ) override { return m.mutate( this ); }
+	virtual void print( std::ostream & os, int indent = 0 ) const override;
 };
 
@@ -565,10 +565,10 @@
 	void set_expr( Expression *newValue ) { expr = newValue; }
 
-	virtual bool isComplete() const { assert( false ); return false; }
-
-	virtual TypeofType *clone() const { return new TypeofType( *this ); }
-	virtual void accept( Visitor & v ) { v.visit( this ); }
-	virtual Type *acceptMutator( Mutator & m ) { return m.mutate( this ); }
-	virtual void print( std::ostream & os, int indent = 0 ) const;
+	virtual bool isComplete() const override { assert( false ); return false; }
+
+	virtual TypeofType *clone() const override { return new TypeofType( *this ); }
+	virtual void accept( Visitor & v ) override { v.visit( this ); }
+	virtual Type *acceptMutator( Mutator & m ) override { return m.mutate( this ); }
+	virtual void print( std::ostream & os, int indent = 0 ) const override;
 };
 
@@ -594,10 +594,10 @@
 	void set_isType( bool newValue ) { isType = newValue; }
 
-	virtual bool isComplete() const { assert( false ); } // xxx - not sure what to do here
-
-	virtual AttrType *clone() const { return new AttrType( *this ); }
-	virtual void accept( Visitor & v ) { v.visit( this ); }
-	virtual Type *acceptMutator( Mutator & m ) { return m.mutate( this ); }
-	virtual void print( std::ostream & os, int indent = 0 ) const;
+	virtual bool isComplete() const override { assert( false ); } // xxx - not sure what to do here
+
+	virtual AttrType *clone() const override { return new AttrType( *this ); }
+	virtual void accept( Visitor & v ) override { v.visit( this ); }
+	virtual Type *acceptMutator( Mutator & m ) override { return m.mutate( this ); }
+	virtual void print( std::ostream & os, int indent = 0 ) const override;
 };
 
@@ -608,10 +608,10 @@
 	VarArgsType( Type::Qualifiers tq, const std::list< Attribute * > & attributes = std::list< Attribute * >()  );
 
-	virtual bool isComplete() const{ return true; } // xxx - is this right?
-
-	virtual VarArgsType *clone() const { return new VarArgsType( *this ); }
-	virtual void accept( Visitor & v ) { v.visit( this ); }
-	virtual Type *acceptMutator( Mutator & m ) { return m.mutate( this ); }
-	virtual void print( std::ostream & os, int indent = 0 ) const;
+	virtual bool isComplete() const override{ return true; } // xxx - is this right?
+
+	virtual VarArgsType *clone() const override { return new VarArgsType( *this ); }
+	virtual void accept( Visitor & v ) override { v.visit( this ); }
+	virtual Type *acceptMutator( Mutator & m ) override { return m.mutate( this ); }
+	virtual void print( std::ostream & os, int indent = 0 ) const override;
 };
 
@@ -622,8 +622,8 @@
 	ZeroType( Type::Qualifiers tq, const std::list< Attribute * > & attributes = std::list< Attribute * >()  );
 
-	virtual ZeroType *clone() const { return new ZeroType( *this ); }
-	virtual void accept( Visitor & v ) { v.visit( this ); }
-	virtual Type *acceptMutator( Mutator & m ) { return m.mutate( this ); }
-	virtual void print( std::ostream & os, int indent = 0 ) const;
+	virtual ZeroType *clone() const override { return new ZeroType( *this ); }
+	virtual void accept( Visitor & v ) override { v.visit( this ); }
+	virtual Type *acceptMutator( Mutator & m ) override { return m.mutate( this ); }
+	virtual void print( std::ostream & os, int indent = 0 ) const override;
 };
 
@@ -634,11 +634,9 @@
 	OneType( Type::Qualifiers tq, const std::list< Attribute * > & attributes = std::list< Attribute * >()  );
 
-	virtual OneType *clone() const { return new OneType( *this ); }
-	virtual void accept( Visitor & v ) { v.visit( this ); }
-	virtual Type *acceptMutator( Mutator & m ) { return m.mutate( this ); }
-	virtual void print( std::ostream & os, int indent = 0 ) const;
-};
-
-std::ostream & operator<<( std::ostream & out, const Type * type );
+	virtual OneType *clone() const override { return new OneType( *this ); }
+	virtual void accept( Visitor & v ) override { v.visit( this ); }
+	virtual Type *acceptMutator( Mutator & m ) override { return m.mutate( this ); }
+	virtual void print( std::ostream & os, int indent = 0 ) const override;
+};
 
 // Local Variables: //
Index: src/SynTree/Visitor.h
===================================================================
--- src/SynTree/Visitor.h	(revision 201aeb9b7c42eb7c7aa8bc065247bffda4932b33)
+++ src/SynTree/Visitor.h	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -25,5 +25,5 @@
   public:
 	// visit: Default implementation of all functions visits the children
-    // of the given syntax node, but performs no other action.
+	// of the given syntax node, but performs no other action.
 
 	virtual void visit( ObjectDecl *objectDecl );
Index: src/SynTree/module.mk
===================================================================
--- src/SynTree/module.mk	(revision 201aeb9b7c42eb7c7aa8bc065247bffda4932b33)
+++ src/SynTree/module.mk	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -48,5 +48,4 @@
        SynTree/Visitor.cc \
        SynTree/Mutator.cc \
-       SynTree/AddStmtVisitor.cc \
        SynTree/TypeSubstitution.cc \
        SynTree/Attribute.cc \
Index: src/Tuples/TupleExpansion.cc
===================================================================
--- src/Tuples/TupleExpansion.cc	(revision 201aeb9b7c42eb7c7aa8bc065247bffda4932b33)
+++ src/Tuples/TupleExpansion.cc	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -21,5 +21,4 @@
 #include "Common/ScopedMap.h"     // for ScopedMap
 #include "Common/utility.h"       // for CodeLocation
-#include "GenPoly/DeclMutator.h"  // for DeclMutator
 #include "InitTweak/InitTweak.h"  // for getFunction
 #include "Parser/LinkageSpec.h"   // for Spec, C, Intrinsic
Index: src/benchmark/Makefile.am
===================================================================
--- src/benchmark/Makefile.am	(revision 201aeb9b7c42eb7c7aa8bc065247bffda4932b33)
+++ src/benchmark/Makefile.am	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -48,4 +48,13 @@
 	@rm -f a.out .result.log
 
+ctxswitch-pthread$(EXEEXT):
+	@BACKEND_CC@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} -lrt -pthread -DN=50000000 PthrdCtxSwitch.c
+	@rm -f .result.log
+	@for number in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do \
+                ./a.out | tee -a .result.log ; \
+        done
+	@./stat.py .result.log
+	@rm -f a.out .result.log
+
 sched-int$(EXEEXT):
 	${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -nodebug -lrt -DN=50000000 SchedInt.c
Index: src/benchmark/Makefile.in
===================================================================
--- src/benchmark/Makefile.in	(revision 201aeb9b7c42eb7c7aa8bc065247bffda4932b33)
+++ src/benchmark/Makefile.in	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -598,4 +598,13 @@
 	@rm -f a.out .result.log
 
+ctxswitch-pthread$(EXEEXT):
+	@BACKEND_CC@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} -lrt -pthread -DN=50000000 PthrdCtxSwitch.c
+	@rm -f .result.log
+	@for number in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do \
+                ./a.out | tee -a .result.log ; \
+        done
+	@./stat.py .result.log
+	@rm -f a.out .result.log
+
 sched-int$(EXEEXT):
 	${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -nodebug -lrt -DN=50000000 SchedInt.c
Index: src/benchmark/PthrdCtxSwitch.c
===================================================================
--- src/benchmark/PthrdCtxSwitch.c	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
+++ src/benchmark/PthrdCtxSwitch.c	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -0,0 +1,19 @@
+#include <stdio.h>
+#include <stdlib.h>
+#define _GNU_SOURCE
+#include <pthread.h>
+
+#include "bench.h"
+
+int main() {
+	const unsigned int NoOfTimes = N;
+	long long int StartTime, EndTime;
+
+	StartTime = Time();
+	for ( volatile unsigned int i = 0; i < NoOfTimes; i += 1 ) {
+		pthread_yield();
+	}
+	EndTime = Time();
+
+	printf("%lld\n", ( EndTime - StartTime ) / NoOfTimes );
+}
Index: src/benchmark/bench.h
===================================================================
--- src/benchmark/bench.h	(revision 201aeb9b7c42eb7c7aa8bc065247bffda4932b33)
+++ src/benchmark/bench.h	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -1,12 +1,16 @@
 #pragma once
 
+#ifdef __CFORALL__
 extern "C" {
+#endif
 	#include <unistd.h>					// sysconf
 	#include <sys/times.h>					// times
 	#include <time.h>
+#ifdef __CFORALL__
 }
+#endif
 
-inline unsigned long long int Time() {
-    timespec ts;
+static inline unsigned long long int Time() {
+    struct timespec ts;
     clock_gettime(
 #if defined( __linux__ )
Index: src/benchmark/create_cfaThrd.c
===================================================================
--- src/benchmark/create_cfaThrd.c	(revision 201aeb9b7c42eb7c7aa8bc065247bffda4932b33)
+++ src/benchmark/create_cfaThrd.c	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -4,5 +4,5 @@
 
 thread MyThread {};
-void main(MyThread * this) {}
+void main(MyThread & this) {}
 
 int main(int argc, char* argv[]) {
Index: src/libcfa/Makefile.am
===================================================================
--- src/libcfa/Makefile.am	(revision 201aeb9b7c42eb7c7aa8bc065247bffda4932b33)
+++ src/libcfa/Makefile.am	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -36,5 +36,5 @@
 	 ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -D__CFA_DEBUG__ -O0 -c -o $@ $<
 
-EXTRA_FLAGS = -g -Wall -Werror -Wno-unused-function -imacros libcfa-prelude.c @CFA_FLAGS@
+EXTRA_FLAGS = -g -Wall -Wno-unused-function -imacros libcfa-prelude.c @CFA_FLAGS@
 
 AM_CCASFLAGS = @CFA_FLAGS@
Index: src/libcfa/Makefile.in
===================================================================
--- src/libcfa/Makefile.in	(revision 201aeb9b7c42eb7c7aa8bc065247bffda4932b33)
+++ src/libcfa/Makefile.in	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -416,5 +416,5 @@
 ARFLAGS = cr
 lib_LIBRARIES = $(am__append_1) $(am__append_2)
-EXTRA_FLAGS = -g -Wall -Werror -Wno-unused-function -imacros libcfa-prelude.c @CFA_FLAGS@
+EXTRA_FLAGS = -g -Wall -Wno-unused-function -imacros libcfa-prelude.c @CFA_FLAGS@
 AM_CCASFLAGS = @CFA_FLAGS@
 headers = fstream iostream iterator limits rational stdlib \
Index: src/libcfa/concurrency/coroutine.c
===================================================================
--- src/libcfa/concurrency/coroutine.c	(revision 201aeb9b7c42eb7c7aa8bc065247bffda4932b33)
+++ src/libcfa/concurrency/coroutine.c	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -123,6 +123,4 @@
 	if(pageSize == 0ul) pageSize = sysconf( _SC_PAGESIZE );
 
-	LIB_DEBUG_PRINT_SAFE("FRED");
-
 	size_t cxtSize = libCeiling( sizeof(machine_context_t), 8 ); // minimum alignment
 
Index: src/libcfa/concurrency/invoke.h
===================================================================
--- src/libcfa/concurrency/invoke.h	(revision 201aeb9b7c42eb7c7aa8bc065247bffda4932b33)
+++ src/libcfa/concurrency/invoke.h	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -84,4 +84,10 @@
       };
 
+      struct __waitfor_mask_t {
+            short * accepted;                         // the index of the accepted function, -1 if none
+            struct __acceptable_t * clauses;          // list of acceptable functions, null if any
+            short size;                               // number of acceptable functions
+      };
+
       struct monitor_desc {
             struct spinlock lock;                     // spinlock to protect internal data
@@ -90,23 +96,47 @@
             struct __condition_stack_t signal_stack;  // stack of conditions to run next once we exit the monitor
             unsigned int recursion;                   // monitor routines can be called recursively, we need to keep track of that
+            struct __waitfor_mask_t mask;               // mask used to know if some thread is waiting for something while holding the monitor
+      };
 
-            struct __acceptable_t * acceptables;      // list of acceptable functions, null if any
-            unsigned short acceptable_count;          // number of acceptable functions
-            short accepted_index;                     // the index of the accepted function, -1 if none
-       };
+      struct __monitor_group_t {
+            struct monitor_desc ** list;              // currently held monitors
+            short                  size;              // number of currently held monitors
+            fptr_t                 func;              // last function that acquired monitors
+      };
 
       struct thread_desc {
             // Core threading fields
-            struct coroutine_desc cor;                // coroutine body used to store context
-            struct monitor_desc mon;                  // monitor body used for mutual exclusion
+            struct coroutine_desc  self_cor;          // coroutine body used to store context
+            struct monitor_desc    self_mon;          // monitor body used for mutual exclusion
+            struct monitor_desc *  self_mon_p;        // pointer to monitor with sufficient lifetime for current monitors
+            struct __monitor_group_t monitors;          // monitors currently held by this thread
 
             // Link lists fields
             struct thread_desc * next;                // instrusive link field for threads
 
-            // Current status related to monitors
-            struct monitor_desc ** current_monitors;  // currently held monitors
-            unsigned short current_monitor_count;     // number of currently held monitors
-            fptr_t current_monitor_func;              // last function that acquired monitors
+
      };
+
+     #ifdef __CFORALL__
+     extern "Cforall" {
+            static inline monitor_desc * ?[?]( const __monitor_group_t & this, ptrdiff_t index ) {
+                  return this.list[index];
+            }
+
+            static inline bool ?==?( const __monitor_group_t & lhs, const __monitor_group_t & rhs ) {
+                  if( (lhs.list != 0) != (rhs.list != 0) ) return false;
+                  if( lhs.size != rhs.size ) return false;
+                  if( lhs.func != rhs.func ) return false;
+
+                  // Check that all the monitors match
+                  for( int i = 0; i < lhs.size; i++ ) {
+                        // If not a match, check next function
+                        if( lhs[i] != rhs[i] ) return false;
+                  }
+
+                  return true;
+            }
+      }
+      #endif
 
 #endif //_INVOKE_H_
Index: src/libcfa/concurrency/kernel.c
===================================================================
--- src/libcfa/concurrency/kernel.c	(revision 201aeb9b7c42eb7c7aa8bc065247bffda4932b33)
+++ src/libcfa/concurrency/kernel.c	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -106,5 +106,5 @@
 
 void ?{}( thread_desc & this, current_stack_info_t * info) {
-	(this.cor){ info };
+	(this.self_cor){ info };
 }
 
@@ -328,5 +328,5 @@
 	// if( !thrd ) return;
 	verify( thrd );
-	verify( thrd->cor.state != Halted );
+	verify( thrd->self_cor.state != Halted );
 
 	verify( disable_preempt_count > 0 );
@@ -373,5 +373,5 @@
 	assert(thrd);
 	disable_interrupts();
-	assert( thrd->cor.state != Halted );
+	assert( thrd->self_cor.state != Halted );
 	this_processor->finish.action_code = Schedule;
 	this_processor->finish.thrd = thrd;
@@ -466,5 +466,5 @@
 	this_processor = mainProcessor;
 	this_thread = mainThread;
-	this_coroutine = &mainThread->cor;
+	this_coroutine = &mainThread->self_cor;
 
 	// Enable preemption
@@ -547,5 +547,5 @@
 	thread_desc * thrd = kernel_data;
 
-	int len = snprintf( abort_text, abort_text_size, "Error occurred while executing task %.256s (%p)", thrd->cor.name, thrd );
+	int len = snprintf( abort_text, abort_text_size, "Error occurred while executing task %.256s (%p)", thrd->self_cor.name, thrd );
 	__lib_debug_write( STDERR_FILENO, abort_text, len );
 
Index: src/libcfa/concurrency/monitor
===================================================================
--- src/libcfa/concurrency/monitor	(revision 201aeb9b7c42eb7c7aa8bc065247bffda4932b33)
+++ src/libcfa/concurrency/monitor	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -22,4 +22,9 @@
 #include "stdlib"
 
+trait is_monitor(dtype T) {
+	monitor_desc * get_monitor( T & );
+	void ^?{}( T & mutex );
+};
+
 static inline void ?{}(monitor_desc & this) {
 	(this.lock){};
@@ -28,7 +33,7 @@
 	(this.signal_stack){};
 	this.recursion = 0;
-	this.acceptables = NULL;
-	this.acceptable_count = 0;
-	this.accepted_index = -1;
+	this.mask.accepted = NULL;
+	this.mask.clauses  = NULL;
+	this.mask.size     = 0;
 }
 
@@ -100,11 +105,9 @@
 
 struct __acceptable_t {
-	fptr_t func;
-	unsigned short count;
-	monitor_desc ** monitors;
+	__monitor_group_t;
 	bool is_dtor;
 };
 
-int __accept_internal( unsigned short count, __acceptable_t * acceptables );
+void __waitfor_internal( const __waitfor_mask_t & mask, int duration );
 
 // Local Variables: //
Index: src/libcfa/concurrency/monitor.c
===================================================================
--- src/libcfa/concurrency/monitor.c	(revision 201aeb9b7c42eb7c7aa8bc065247bffda4932b33)
+++ src/libcfa/concurrency/monitor.c	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -23,7 +23,11 @@
 //-----------------------------------------------------------------------------
 // Forward declarations
-static inline void set_owner( monitor_desc * this, thread_desc * owner );
+static inline void set_owner ( monitor_desc * this, thread_desc * owner );
+static inline void set_owner ( monitor_desc ** storage, short count, thread_desc * owner );
+static inline void set_mask  ( monitor_desc ** storage, short count, const __waitfor_mask_t & mask );
+static inline void reset_mask( monitor_desc * this );
+
 static inline thread_desc * next_thread( monitor_desc * this );
-static inline int is_accepted( thread_desc * owner, monitor_desc * this, monitor_desc ** group, int group_cnt, void (*func)() );
+static inline bool is_accepted( monitor_desc * this, const __monitor_group_t & monitors );
 
 static inline void lock_all( spinlock ** locks, unsigned short count );
@@ -32,33 +36,41 @@
 static inline void unlock_all( monitor_desc ** locks, unsigned short count );
 
-static inline void save_recursion   ( monitor_desc ** ctx, unsigned int * /*out*/ recursions, unsigned short count );
-static inline void restore_recursion( monitor_desc ** ctx, unsigned int * /*in */ recursions, unsigned short count );
+static inline void save   ( monitor_desc ** ctx, short count, spinlock ** locks, unsigned int * /*out*/ recursions, __waitfor_mask_t * /*out*/ masks );
+static inline void restore( monitor_desc ** ctx, short count, spinlock ** locks, unsigned int * /*in */ recursions, __waitfor_mask_t * /*in */ masks );
 
 static inline void init     ( int count, monitor_desc ** monitors, __condition_node_t * waiter, __condition_criterion_t * criteria );
 static inline void init_push( int count, monitor_desc ** monitors, __condition_node_t * waiter, __condition_criterion_t * criteria );
 
-static inline thread_desc * check_condition( __condition_criterion_t * );
-static inline void brand_condition( condition * );
-static inline unsigned short insert_unique( thread_desc ** thrds, unsigned short end, thread_desc * val );
-
-static inline thread_desc * search_entry_queue( __acceptable_t * acceptables, int acc_count, monitor_desc ** monitors, int count );
+static inline thread_desc *        check_condition   ( __condition_criterion_t * );
+static inline void                 brand_condition   ( condition * );
+static inline [thread_desc *, int] search_entry_queue( const __waitfor_mask_t &, monitor_desc ** monitors, int count );
+
+forall(dtype T | sized( T ))
+static inline short insert_unique( T ** array, short & size, T * val );
+static inline short count_max    ( const __waitfor_mask_t & mask );
+static inline short aggregate    ( monitor_desc ** storage, const __waitfor_mask_t & mask );
 
 //-----------------------------------------------------------------------------
 // Useful defines
-#define wait_ctx(thrd, user_info)                               /* Create the necessary information to use the signaller stack       */ \
-	__condition_node_t waiter = { thrd, count, user_info };   /* Create the node specific to this wait operation                   */ \
-	__condition_criterion_t criteria[count];                  /* Create the creteria this wait operation needs to wake up          */ \
-	init( count, monitors, &waiter, criteria );               /* Link everything together                                          */ \
-
-#define wait_ctx_primed(thrd, user_info)                        /* Create the necessary information to use the signaller stack       */ \
-	__condition_node_t waiter = { thrd, count, user_info };   /* Create the node specific to this wait operation                   */ \
-	__condition_criterion_t criteria[count];                  /* Create the creteria this wait operation needs to wake up          */ \
-	init_push( count, monitors, &waiter, criteria );          /* Link everything together and push it to the AS-Stack              */ \
-
-#define monitor_ctx( mons, cnt )              /* Define that create the necessary struct for internal/external scheduling operations */ \
-	monitor_desc ** monitors = mons;        /* Save the targeted monitors                                                          */ \
-	unsigned short count = cnt;             /* Save the count to a local variable                                                  */ \
-	unsigned int recursions[ count ];       /* Save the current recursion levels to restore them later                             */ \
-	spinlock *   locks     [ count ];       /* We need to pass-in an array of locks to BlockInternal                               */ \
+#define wait_ctx(thrd, user_info)                               /* Create the necessary information to use the signaller stack                         */ \
+	__condition_node_t waiter = { thrd, count, user_info };   /* Create the node specific to this wait operation                                     */ \
+	__condition_criterion_t criteria[count];                  /* Create the creteria this wait operation needs to wake up                            */ \
+	init( count, monitors, &waiter, criteria );               /* Link everything together                                                            */ \
+
+#define wait_ctx_primed(thrd, user_info)                        /* Create the necessary information to use the signaller stack                         */ \
+	__condition_node_t waiter = { thrd, count, user_info };   /* Create the node specific to this wait operation                                     */ \
+	__condition_criterion_t criteria[count];                  /* Create the creteria this wait operation needs to wake up                            */ \
+	init_push( count, monitors, &waiter, criteria );          /* Link everything together and push it to the AS-Stack                                */ \
+
+#define monitor_ctx( mons, cnt )                                /* Define that create the necessary struct for internal/external scheduling operations */ \
+	monitor_desc ** monitors = mons;                          /* Save the targeted monitors                                                          */ \
+	unsigned short count = cnt;                               /* Save the count to a local variable                                                  */ \
+	unsigned int recursions[ count ];                         /* Save the current recursion levels to restore them later                             */ \
+	__waitfor_mask_t masks[ count ];                          /* Save the current waitfor masks to restore them later                                */ \
+	spinlock *   locks     [ count ];                         /* We need to pass-in an array of locks to BlockInternal                               */ \
+
+#define monitor_save    save   ( monitors, count, locks, recursions, masks )
+#define monitor_restore restore( monitors, count, locks, recursions, masks )
+
 
 //-----------------------------------------------------------------------------
@@ -68,5 +80,5 @@
 extern "C" {
 	// Enter single monitor
-	static void __enter_monitor_desc( monitor_desc * this, monitor_desc ** group, int group_cnt, void (*func)() ) {
+	static void __enter_monitor_desc( monitor_desc * this, const __monitor_group_t & group ) {
 		// Lock the monitor spinlock, lock_yield to reduce contention
 		lock_yield( &this->lock DEBUG_CTX2 );
@@ -75,5 +87,4 @@
 		LIB_DEBUG_PRINT_SAFE("Kernel : %10p Entering mon %p (%p)\n", thrd, this, this->owner);
 
-		this->accepted_index = -1;
 		if( !this->owner ) {
 			// No one has the monitor, just take it
@@ -89,7 +100,10 @@
 			LIB_DEBUG_PRINT_SAFE("Kernel :  mon already owned \n");
 		}
-		else if( (this->accepted_index = is_accepted( thrd, this, group, group_cnt, func)) >= 0 ) {
+		else if( is_accepted( this, group) ) {
 			// Some one was waiting for us, enter
 			set_owner( this, thrd );
+
+			// Reset mask
+			reset_mask( this );
 
 			LIB_DEBUG_PRINT_SAFE("Kernel :  mon accepts \n");
@@ -120,5 +134,7 @@
 		lock_yield( &this->lock DEBUG_CTX2 );
 
-		verifyf( this_thread == this->owner, "Expected owner to be %p, got %p (r: %i)", this_thread, this->owner, this->recursion );
+		LIB_DEBUG_PRINT_SAFE("Kernel : %10p Leaving mon %p (%p)\n", this_thread, this, this->owner);
+
+		verifyf( this_thread == this->owner, "Expected owner to be %p, got %p (r: %i, m: %p)", this_thread, this->owner, this->recursion, this );
 
 		// Leaving a recursion level, decrement the counter
@@ -146,5 +162,5 @@
 	// Should never return
 	void __leave_thread_monitor( thread_desc * thrd ) {
-		monitor_desc * this = &thrd->mon;
+		monitor_desc * this = &thrd->self_mon;
 
 		// Lock the monitor now
@@ -153,7 +169,7 @@
 		disable_interrupts();
 
-		thrd->cor.state = Halted;
-
-		verifyf( thrd == this->owner, "Expected owner to be %p, got %p (r: %i)", thrd, this->owner, this->recursion );
+		thrd->self_cor.state = Halted;
+
+		verifyf( thrd == this->owner, "Expected owner to be %p, got %p (r: %i, m: %p)", thrd, this->owner, this->recursion, this );
 
 		// Leaving a recursion level, decrement the counter
@@ -178,7 +194,7 @@
 // Enter multiple monitor
 // relies on the monitor array being sorted
-static inline void enter(monitor_desc ** monitors, int count, void (*func)() ) {
-	for(int i = 0; i < count; i++) {
-		__enter_monitor_desc( monitors[i], monitors, count, func );
+static inline void enter( __monitor_group_t monitors ) {
+	for(int i = 0; i < monitors.size; i++) {
+		__enter_monitor_desc( monitors.list[i], monitors );
 	}
 }
@@ -203,15 +219,20 @@
 
 	// Save previous thread context
-	this.prev_mntrs = this_thread->current_monitors;
-	this.prev_count = this_thread->current_monitor_count;
-	this.prev_func  = this_thread->current_monitor_func;
+	this.prev_mntrs = this_thread->monitors.list;
+	this.prev_count = this_thread->monitors.size;
+	this.prev_func  = this_thread->monitors.func;
 
 	// Update thread context (needed for conditions)
-	this_thread->current_monitors      = m;
-	this_thread->current_monitor_count = count;
-	this_thread->current_monitor_func  = func;
+	this_thread->monitors.list = m;
+	this_thread->monitors.size = count;
+	this_thread->monitors.func = func;
+
+	// LIB_DEBUG_PRINT_SAFE("MGUARD : enter %d\n", count);
 
 	// Enter the monitors in order
-	enter( this.m, this.count, func );
+	__monitor_group_t group = {this.m, this.count, func};
+	enter( group );
+
+	// LIB_DEBUG_PRINT_SAFE("MGUARD : entered\n");
 }
 
@@ -219,11 +240,15 @@
 // Dtor for monitor guard
 void ^?{}( monitor_guard_t & this ) {
+	// LIB_DEBUG_PRINT_SAFE("MGUARD : leaving %d\n", this.count);
+
 	// Leave the monitors in order
 	leave( this.m, this.count );
 
+	// LIB_DEBUG_PRINT_SAFE("MGUARD : left\n");
+
 	// Restore thread context
-	this_thread->current_monitors      = this.prev_mntrs;
-	this_thread->current_monitor_count = this.prev_count;
-	this_thread->current_monitor_func  = this.prev_func;
+	this_thread->monitors.list = this.prev_mntrs;
+	this_thread->monitors.size = this.prev_count;
+	this_thread->monitors.func = this.prev_func;
 }
 
@@ -271,14 +296,9 @@
 	append( &this->blocked, &waiter );
 
-	// Lock all monitors (aggregates the lock them as well)
+	// Lock all monitors (aggregates the locks as well)
 	lock_all( monitors, locks, count );
 
-	// DON'T unlock, ask the kernel to do it
-
-	// Save monitor state
-	save_recursion( monitors, recursions, count );
-
 	// Find the next thread(s) to run
-	unsigned short thread_count = 0;
+	short thread_count = 0;
 	thread_desc * threads[ count ];
 	for(int i = 0; i < count; i++) {
@@ -286,8 +306,11 @@
 	}
 
+	// Save monitor states
+	monitor_save;
+
 	// Remove any duplicate threads
 	for( int i = 0; i < count; i++) {
 		thread_desc * new_owner = next_thread( monitors[i] );
-		thread_count = insert_unique( threads, thread_count, new_owner );
+		insert_unique( threads, thread_count, new_owner );
 	}
 
@@ -295,12 +318,6 @@
 	BlockInternal( locks, count, threads, thread_count );
 
-
-	// WE WOKE UP
-
-
 	// We are back, restore the owners and recursions
-	lock_all( locks, count );
-	restore_recursion( monitors, recursions, count );
-	unlock_all( locks, count );
+	monitor_restore;
 }
 
@@ -315,11 +332,11 @@
 	LIB_DEBUG_DO(
 		thread_desc * this_thrd = this_thread;
-		if ( this->monitor_count != this_thrd->current_monitor_count ) {
-			abortf( "Signal on condition %p made with different number of monitor(s), expected %i got %i", this, this->monitor_count, this_thrd->current_monitor_count );
+		if ( this->monitor_count != this_thrd->monitors.size ) {
+			abortf( "Signal on condition %p made with different number of monitor(s), expected %i got %i", this, this->monitor_count, this_thrd->monitors.size );
 		}
 
 		for(int i = 0; i < this->monitor_count; i++) {
-			if ( this->monitors[i] != this_thrd->current_monitors[i] ) {
-				abortf( "Signal on condition %p made with different monitor, expected %p got %i", this, this->monitors[i], this_thrd->current_monitors[i] );
+			if ( this->monitors[i] != this_thrd->monitors.list[i] ) {
+				abortf( "Signal on condition %p made with different monitor, expected %p got %i", this, this->monitors[i], this_thrd->monitors.list[i] );
 			}
 		}
@@ -364,11 +381,9 @@
 
 	//save contexts
-	save_recursion( monitors, recursions, count );
+	monitor_save;
 
 	//Find the thread to run
 	thread_desc * signallee = pop_head( &this->blocked )->waiting_thread;
-	for(int i = 0; i < count; i++) {
-		set_owner( monitors[i], signallee );
-	}
+	set_owner( monitors, count, signallee );
 
 	//Everything is ready to go to sleep
@@ -379,8 +394,6 @@
 
 
-	//We are back, restore the owners and recursions
-	lock_all( locks, count );
-	restore_recursion( monitors, recursions, count );
-	unlock_all( locks, count );
+	//We are back, restore the masks and recursions
+	monitor_restore;
 
 	return true;
@@ -397,59 +410,109 @@
 
 //-----------------------------------------------------------------------------
-// Internal scheduling
-int __accept_internal( unsigned short acc_count, __acceptable_t * acceptables ) {
-	thread_desc * thrd = this_thread;
+// External scheduling
+// cases to handle :
+// 	- target already there :
+// 		block and wake
+// 	- dtor already there
+// 		put thread on signaller stack
+// 	- non-blocking
+// 		return else
+// 	- timeout
+// 		return timeout
+// 	- block
+// 		setup mask
+// 		block
+void __waitfor_internal( const __waitfor_mask_t & mask, int duration ) {
+	// This statment doesn't have a contiguous list of monitors...
+	// Create one!
+	short max = count_max( mask );
+	monitor_desc * mon_storage[max];
+	short actual_count = aggregate( mon_storage, mask );
+
+	if(actual_count == 0) return;
+
+	LIB_DEBUG_PRINT_SAFE("Kernel : waitfor internal proceeding\n");
 
 	// Create storage for monitor context
-	monitor_ctx( acceptables->monitors, acceptables->count );
-
-	// Lock all monitors (aggregates the lock them as well)
+	monitor_ctx( mon_storage, actual_count );
+
+	// Lock all monitors (aggregates the locks as well)
 	lock_all( monitors, locks, count );
 
+	{
+		// Check if the entry queue
+		thread_desc * next; int index;
+		[next, index] = search_entry_queue( mask, monitors, count );
+
+		if( next ) {
+			*mask.accepted = index;
+			if( mask.clauses[index].is_dtor ) {
+				#warning case not implemented
+			}
+			else {
+				LIB_DEBUG_PRINT_SAFE("Kernel : thread present, baton-passing\n");
+
+				// Create the node specific to this wait operation
+				wait_ctx_primed( this_thread, 0 );
+
+				// Save monitor states
+				monitor_save;
+
+				// Set the owners to be the next thread
+				set_owner( monitors, count, next );
+
+				// Everything is ready to go to sleep
+				BlockInternal( locks, count, &next, 1 );
+
+				// We are back, restore the owners and recursions
+				monitor_restore;
+
+				LIB_DEBUG_PRINT_SAFE("Kernel : thread present, returned\n");
+			}
+
+			LIB_DEBUG_PRINT_SAFE("Kernel : accepted %d\n", *mask.accepted);
+
+			return;
+		}
+	}
+
+
+	if( duration == 0 ) {
+		LIB_DEBUG_PRINT_SAFE("Kernel : non-blocking, exiting\n");
+
+		unlock_all( locks, count );
+
+		LIB_DEBUG_PRINT_SAFE("Kernel : accepted %d\n", *mask.accepted);
+		return;
+	}
+
+
+	verifyf( duration < 0, "Timeout on waitfor statments not supported yet.");
+
+	LIB_DEBUG_PRINT_SAFE("Kernel : blocking waitfor\n");
+
 	// Create the node specific to this wait operation
-	wait_ctx_primed( thrd, 0 );
-
-	// Check if the entry queue
-	thread_desc * next = search_entry_queue( acceptables, acc_count, monitors, count );
-
-	LIB_DEBUG_PRINT_SAFE("Owner(s) :");
+	wait_ctx_primed( this_thread, 0 );
+
+	monitor_save;
+	set_mask( monitors, count, mask );
+
 	for(int i = 0; i < count; i++) {
-		LIB_DEBUG_PRINT_SAFE(" %p", monitors[i]->owner );
-	}
-	LIB_DEBUG_PRINT_SAFE("\n");
-
-	LIB_DEBUG_PRINT_SAFE("Passing mon to %p\n", next);
-
-	if( !next ) {
-		// Update acceptables on the current monitors
-		for(int i = 0; i < count; i++) {
-			monitors[i]->acceptables = acceptables;
-			monitors[i]->acceptable_count = acc_count;
-		}
-	}
-	else {
-		for(int i = 0; i < count; i++) {
-			set_owner( monitors[i], next );
-		}
-	}
-
-
-	save_recursion( monitors, recursions, count );
-
-
-	// Everything is ready to go to sleep
-	BlockInternal( locks, count, &next, next ? 1 : 0 );
-
-
-	//WE WOKE UP
-
-
-	//We are back, restore the owners and recursions
-	lock_all( locks, count );
-	restore_recursion( monitors, recursions, count );
-	int acc_idx = monitors[0]->accepted_index;
-	unlock_all( locks, count );
-
-	return acc_idx;
+		verify( monitors[i]->owner == this_thread );
+	}
+
+	//Everything is ready to go to sleep
+	BlockInternal( locks, count );
+
+
+	// WE WOKE UP
+
+
+	//We are back, restore the masks and recursions
+	monitor_restore;
+
+	LIB_DEBUG_PRINT_SAFE("Kernel : exiting\n");
+
+	LIB_DEBUG_PRINT_SAFE("Kernel : accepted %d\n", *mask.accepted);
 }
 
@@ -458,4 +521,6 @@
 
 static inline void set_owner( monitor_desc * this, thread_desc * owner ) {
+	// LIB_DEBUG_PRINT_SAFE("Kernal :   Setting owner of %p to %p ( was %p)\n", this, owner, this->owner );
+
 	//Pass the monitor appropriately
 	this->owner = owner;
@@ -463,4 +528,22 @@
 	//We are passing the monitor to someone else, which means recursion level is not 0
 	this->recursion = owner ? 1 : 0;
+}
+
+static inline void set_owner( monitor_desc ** monitors, short count, thread_desc * owner ) {
+	for( int i = 0; i < count; i++ ) {
+		set_owner( monitors[i], owner );
+	}
+}
+
+static inline void set_mask( monitor_desc ** storage, short count, const __waitfor_mask_t & mask ) {
+	for(int i = 0; i < count; i++) {
+		storage[i]->mask = mask;
+	}
+}
+
+static inline void reset_mask( monitor_desc * this ) {
+	this->mask.accepted = NULL;
+	this->mask.clauses = NULL;
+	this->mask.size = 0;
 }
 
@@ -485,38 +568,24 @@
 }
 
-static inline int is_accepted( thread_desc * owner, monitor_desc * this, monitor_desc ** group, int group_cnt, void (*func)() ) {
-	__acceptable_t* accs = this->acceptables; // Optim
-	int acc_cnt = this->acceptable_count;
+static inline bool is_accepted( monitor_desc * this, const __monitor_group_t & group ) {
+	__acceptable_t * it = this->mask.clauses; // Optim
+	int count = this->mask.size;
 
 	// Check if there are any acceptable functions
-	if( !accs ) return -1;
+	if( !it ) return false;
 
 	// If this isn't the first monitor to test this, there is no reason to repeat the test.
-	if( this != group[0] ) return group[0]->accepted_index;
+	if( this != group[0] ) return group[0]->mask.accepted >= 0;
 
 	// For all acceptable functions check if this is the current function.
-	OUT_LOOP:
-	for( int i = 0; i < acc_cnt; i++ ) {
-		__acceptable_t * acc = &accs[i];
-
-		// if function matches, check the monitors
-		if( acc->func == func ) {
-
-			// If the group count is different then it can't be a match
-			if( acc->count != group_cnt ) return -1;
-
-			// Check that all the monitors match
-			for( int j = 0; j < group_cnt; j++ ) {
-				// If not a match, check next function
-				if( acc->monitors[j] != group[j] ) continue OUT_LOOP;
-			}
-
-			// It's a complete match, accept the call
-			return i;
+	for( short i = 0; i < count; i++, it++ ) {
+		if( *it == group ) {
+			*this->mask.accepted = i;
+			return true;
 		}
 	}
 
 	// No function matched
-	return -1;
+	return false;
 }
 
@@ -564,15 +633,18 @@
 }
 
-
-static inline void save_recursion   ( monitor_desc ** ctx, unsigned int * /*out*/ recursions, unsigned short count ) {
+static inline void save( monitor_desc ** ctx, short count, __attribute((unused)) spinlock ** locks, unsigned int * /*out*/ recursions, __waitfor_mask_t * /*out*/ masks ) {
 	for( int i = 0; i < count; i++ ) {
 		recursions[i] = ctx[i]->recursion;
-	}
-}
-
-static inline void restore_recursion( monitor_desc ** ctx, unsigned int * /*in */ recursions, unsigned short count ) {
+		masks[i]      = ctx[i]->mask;
+	}
+}
+
+static inline void restore( monitor_desc ** ctx, short count, spinlock ** locks, unsigned int * /*out*/ recursions, __waitfor_mask_t * /*out*/ masks ) {
+	lock_all( locks, count );
 	for( int i = 0; i < count; i++ ) {
 		ctx[i]->recursion = recursions[i];
-	}
+		ctx[i]->mask      = masks[i];
+	}
+	unlock_all( locks, count );
 }
 
@@ -607,35 +679,15 @@
 	if( !this->monitors ) {
 		// LIB_DEBUG_PRINT_SAFE("Branding\n");
-		assertf( thrd->current_monitors != NULL, "No current monitor to brand condition %p", thrd->current_monitors );
-		this->monitor_count = thrd->current_monitor_count;
+		assertf( thrd->monitors.list != NULL, "No current monitor to brand condition %p", thrd->monitors.list );
+		this->monitor_count = thrd->monitors.size;
 
 		this->monitors = malloc( this->monitor_count * sizeof( *this->monitors ) );
 		for( int i = 0; i < this->monitor_count; i++ ) {
-			this->monitors[i] = thrd->current_monitors[i];
-		}
-	}
-}
-
-static inline unsigned short insert_unique( thread_desc ** thrds, unsigned short end, thread_desc * val ) {
-	if( !val ) return end;
-
-	for(int i = 0; i <= end; i++) {
-		if( thrds[i] == val ) return end;
-	}
-
-	thrds[end] = val;
-	return end + 1;
-}
-
-
-static inline bool match( __acceptable_t * acc, thread_desc * thrd ) {
-	verify( thrd );
-	verify( acc );
-	if( acc->func != thrd->current_monitor_func ) return false;
-
-	return true;
-}
-
-static inline thread_desc * search_entry_queue( __acceptable_t * acceptables, int acc_count, monitor_desc ** monitors, int count ) {
+			this->monitors[i] = thrd->monitors.list[i];
+		}
+	}
+}
+
+static inline [thread_desc *, int] search_entry_queue( const __waitfor_mask_t & mask, monitor_desc ** monitors, int count ) {
 
 	__thread_queue_t * entry_queue = &monitors[0]->entry_queue;
@@ -644,21 +696,55 @@
 	for(	thread_desc ** thrd_it = &entry_queue->head;
 		*thrd_it;
-		thrd_it = &(*thrd_it)->next)
-	{
+		thrd_it = &(*thrd_it)->next
+	) {
 		// For each acceptable check if it matches
-		__acceptable_t * acc_end = acceptables + acc_count;
-		for( __acceptable_t * acc_it = acceptables; acc_it != acc_end; acc_it++ ) {
+		int i = 0;
+		__acceptable_t * end = mask.clauses + mask.size;
+		for( __acceptable_t * it = mask.clauses; it != end; it++, i++ ) {
 			// Check if we have a match
-			if( match( acc_it, *thrd_it ) ) {
+			if( *it == (*thrd_it)->monitors ) {
 
 				// If we have a match return it
 				// after removeing it from the entry queue
-				return remove( entry_queue, thrd_it );
+				return [remove( entry_queue, thrd_it ), i];
 			}
 		}
 	}
 
-	return NULL;
-}
+	return [0, -1];
+}
+
+forall(dtype T | sized( T ))
+static inline short insert_unique( T ** array, short & size, T * val ) {
+	if( !val ) return size;
+
+	for(int i = 0; i <= size; i++) {
+		if( array[i] == val ) return size;
+	}
+
+	array[size] = val;
+	size = size + 1;
+	return size;
+}
+
+static inline short count_max( const __waitfor_mask_t & mask ) {
+	short max = 0;
+	for( int i = 0; i < mask.size; i++ ) {
+		max += mask.clauses[i].size;
+	}
+	return max;
+}
+
+static inline short aggregate( monitor_desc ** storage, const __waitfor_mask_t & mask ) {
+	short size = 0;
+	for( int i = 0; i < mask.size; i++ ) {
+		for( int j = 0; j < mask.clauses[i].size; j++) {
+			insert_unique( storage, size, mask.clauses[i].list[j] );
+		}
+	}
+	qsort( storage, size );
+	return size;
+}
+
 void ?{}( __condition_blocked_queue_t & this ) {
 	this.head = NULL;
Index: src/libcfa/concurrency/preemption.c
===================================================================
--- src/libcfa/concurrency/preemption.c	(revision 201aeb9b7c42eb7c7aa8bc065247bffda4932b33)
+++ src/libcfa/concurrency/preemption.c	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -328,4 +328,18 @@
 		siginfo_t info;
 		int sig = sigwaitinfo( &mask, &info );
+
+		if( sig < 0 ) {
+			//Error!
+			int err = errno;
+			switch( err ) {
+				case EAGAIN :
+				case EINTR :
+					continue;
+       			case EINVAL :
+				 	abortf("Timeout was invalid.");
+				default:
+				 	abortf("Unhandled error %d", err);
+			}
+		}
 
 		// If another signal arrived something went wrong
Index: src/libcfa/concurrency/thread
===================================================================
--- src/libcfa/concurrency/thread	(revision 201aeb9b7c42eb7c7aa8bc065247bffda4932b33)
+++ src/libcfa/concurrency/thread	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -36,18 +36,18 @@
 forall( dtype T | is_thread(T) )
 static inline coroutine_desc* get_coroutine(T & this) {
-	return &get_thread(this)->cor;
+	return &get_thread(this)->self_cor;
 }
 
 forall( dtype T | is_thread(T) )
 static inline monitor_desc* get_monitor(T & this) {
-	return &get_thread(this)->mon;
+	return &get_thread(this)->self_mon;
 }
 
 static inline coroutine_desc* get_coroutine(thread_desc * this) {
-	return &this->cor;
+	return &this->self_cor;
 }
 
 static inline monitor_desc* get_monitor(thread_desc * this) {
-	return &this->mon;
+	return &this->self_mon;
 }
 
Index: src/libcfa/concurrency/thread.c
===================================================================
--- src/libcfa/concurrency/thread.c	(revision 201aeb9b7c42eb7c7aa8bc065247bffda4932b33)
+++ src/libcfa/concurrency/thread.c	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -33,16 +33,16 @@
 
 void ?{}(thread_desc& this) {
-	(this.cor){};
-	this.cor.name = "Anonymous Coroutine";
-	this.mon.owner = &this;
-	this.mon.recursion = 1;
+	(this.self_cor){};
+	this.self_cor.name = "Anonymous Coroutine";
+	this.self_mon.owner = &this;
+	this.self_mon.recursion = 1;
+	this.self_mon_p = &this.self_mon;
 	this.next = NULL;
 
-	this.current_monitors      = &this.mon;
-	this.current_monitor_count = 1;
+	(this.monitors){ &this.self_mon_p, 1, (fptr_t)0 };
 }
 
 void ^?{}(thread_desc& this) {
-	^(this.cor){};
+	^(this.self_cor){};
 }
 
Index: src/main.cc
===================================================================
--- src/main.cc	(revision 201aeb9b7c42eb7c7aa8bc065247bffda4932b33)
+++ src/main.cc	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -239,7 +239,4 @@
 		} // if
 
-		// OPTPRINT( "Concurrency" )
-		// Concurrency::applyKeywords( translationUnit );
-
 		// add the assignment statement after the initialization of a type parameter
 		OPTPRINT( "validate" )
Index: src/prelude/prelude.cf
===================================================================
--- src/prelude/prelude.cf	(revision 201aeb9b7c42eb7c7aa8bc065247bffda4932b33)
+++ src/prelude/prelude.cf	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -42,4 +42,8 @@
 _Bool			?--( _Bool & ),				?--( volatile _Bool & );
 unsigned char		?++( unsigned char & ),			?++( volatile unsigned char & );
+signed short		?++( signed short & ),			?++( volatile signed short & );
+signed short		?--( signed short & ),			?--( volatile signed short & );
+unsigned short		?++( unsigned short & ),		?++( volatile unsigned short & );
+unsigned short		?--( unsigned short & ),		?--( volatile unsigned short & );
 signed int		?++( signed int & ),			?++( volatile signed int & );
 signed int		?--( signed int & ),			?--( volatile signed int & );
@@ -92,6 +96,8 @@
 
 _Bool			++?( _Bool & ),				--?( _Bool & );
+signed short	++?( signed short & ),			--?( signed short & );
 signed int		++?( signed int & ),			--?( signed int & );
-unsigned int		++?( unsigned int & ),			--?( unsigned int & );
+unsigned short		++?( unsigned int & ),			--?( unsigned int & );
+unsigned int		++?( unsigned short & ),		--?( unsigned short & );
 signed long int		++?( signed long int & ),		--?( signed long int & );
 unsigned long int	++?( unsigned long int & ),		--?( unsigned long int & );
Index: src/tests/.expect/32/sched-ext-parse.txt
===================================================================
--- src/tests/.expect/32/sched-ext-parse.txt	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
+++ src/tests/.expect/32/sched-ext-parse.txt	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -0,0 +1,1599 @@
+__attribute__ ((__nothrow__,__leaf__,__malloc__)) extern void *malloc(unsigned int __size);
+__attribute__ ((__nothrow__,__leaf__)) extern void free(void *__ptr);
+__attribute__ ((__nothrow__,__leaf__,__noreturn__)) extern void abort(void);
+__attribute__ ((__nothrow__,__leaf__,__nonnull__(1))) extern signed int atexit(void (*__func)(void));
+__attribute__ ((__nothrow__,__leaf__,__noreturn__)) extern void exit(signed int __status);
+extern signed int printf(const char *__restrict __format, ...);
+__attribute__ ((__nothrow__,__leaf__,__noreturn__)) extern void __assert_fail(const char *__assertion, const char *__file, unsigned int __line, const char *__function);
+__attribute__ ((__nothrow__,__leaf__,__noreturn__)) extern void __assert_perror_fail(signed int __errnum, const char *__file, unsigned int __line, const char *__function);
+__attribute__ ((__nothrow__,__leaf__,__noreturn__)) extern void __assert(const char *__assertion, const char *__file, signed int __line);
+__attribute__ ((noreturn,format(printf, 5, 6))) void __assert_fail_f(const char *assertion, const char *file, unsigned int line, const char *function, const char *fmt, ...);
+struct spinlock {
+    volatile signed int lock;
+    const char *prev_name;
+    void *prev_thrd;
+};
+static inline void ___constructor__F_R9sspinlock_autogen___1(struct spinlock *___dst__R9sspinlock_1);
+static inline void ___constructor__F_R9sspinlock9sspinlock_autogen___1(struct spinlock *___dst__R9sspinlock_1, struct spinlock ___src__9sspinlock_1);
+static inline void ___destructor__F_R9sspinlock_autogen___1(struct spinlock *___dst__R9sspinlock_1);
+static inline struct spinlock ___operator_assign__F9sspinlock_R9sspinlock9sspinlock_autogen___1(struct spinlock *___dst__R9sspinlock_1, struct spinlock ___src__9sspinlock_1);
+static inline void ___constructor__F_R9sspinlock_autogen___1(struct spinlock *___dst__R9sspinlock_1){
+    ((void)((*((signed int *)(&(*___dst__R9sspinlock_1).lock)))) /* ?{} */);
+    ((void)((*___dst__R9sspinlock_1).prev_name) /* ?{} */);
+    ((void)((*___dst__R9sspinlock_1).prev_thrd) /* ?{} */);
+}
+static inline void ___constructor__F_R9sspinlock9sspinlock_autogen___1(struct spinlock *___dst__R9sspinlock_1, struct spinlock ___src__9sspinlock_1){
+    ((void)((*((signed int *)(&(*___dst__R9sspinlock_1).lock)))=___src__9sspinlock_1.lock) /* ?{} */);
+    ((void)((*___dst__R9sspinlock_1).prev_name=___src__9sspinlock_1.prev_name) /* ?{} */);
+    ((void)((*___dst__R9sspinlock_1).prev_thrd=___src__9sspinlock_1.prev_thrd) /* ?{} */);
+}
+static inline void ___destructor__F_R9sspinlock_autogen___1(struct spinlock *___dst__R9sspinlock_1){
+    ((void)((*___dst__R9sspinlock_1).prev_thrd) /* ^?{} */);
+    ((void)((*___dst__R9sspinlock_1).prev_name) /* ^?{} */);
+    ((void)((*((signed int *)(&(*___dst__R9sspinlock_1).lock)))) /* ^?{} */);
+}
+static inline struct spinlock ___operator_assign__F9sspinlock_R9sspinlock9sspinlock_autogen___1(struct spinlock *___dst__R9sspinlock_1, struct spinlock ___src__9sspinlock_1){
+    struct spinlock ___ret__9sspinlock_1;
+    ((void)((*___dst__R9sspinlock_1).lock=___src__9sspinlock_1.lock));
+    ((void)((*___dst__R9sspinlock_1).prev_name=___src__9sspinlock_1.prev_name));
+    ((void)((*___dst__R9sspinlock_1).prev_thrd=___src__9sspinlock_1.prev_thrd));
+    ((void)___constructor__F_R9sspinlock9sspinlock_autogen___1((&___ret__9sspinlock_1), ___src__9sspinlock_1));
+    return ((struct spinlock )___ret__9sspinlock_1);
+}
+static inline void ___constructor__F_R9sspinlockVi_autogen___1(struct spinlock *___dst__R9sspinlock_1, volatile signed int __lock__Vi_1){
+    ((void)((*((signed int *)(&(*___dst__R9sspinlock_1).lock)))=__lock__Vi_1) /* ?{} */);
+    ((void)((*___dst__R9sspinlock_1).prev_name) /* ?{} */);
+    ((void)((*___dst__R9sspinlock_1).prev_thrd) /* ?{} */);
+}
+static inline void ___constructor__F_R9sspinlockViPCc_autogen___1(struct spinlock *___dst__R9sspinlock_1, volatile signed int __lock__Vi_1, const char *__prev_name__PCc_1){
+    ((void)((*((signed int *)(&(*___dst__R9sspinlock_1).lock)))=__lock__Vi_1) /* ?{} */);
+    ((void)((*___dst__R9sspinlock_1).prev_name=__prev_name__PCc_1) /* ?{} */);
+    ((void)((*___dst__R9sspinlock_1).prev_thrd) /* ?{} */);
+}
+static inline void ___constructor__F_R9sspinlockViPCcPv_autogen___1(struct spinlock *___dst__R9sspinlock_1, volatile signed int __lock__Vi_1, const char *__prev_name__PCc_1, void *__prev_thrd__Pv_1){
+    ((void)((*((signed int *)(&(*___dst__R9sspinlock_1).lock)))=__lock__Vi_1) /* ?{} */);
+    ((void)((*___dst__R9sspinlock_1).prev_name=__prev_name__PCc_1) /* ?{} */);
+    ((void)((*___dst__R9sspinlock_1).prev_thrd=__prev_thrd__Pv_1) /* ?{} */);
+}
+struct __thread_queue_t {
+    struct thread_desc *head;
+    struct thread_desc **tail;
+};
+static inline void ___constructor__F_R17s__thread_queue_t_autogen___1(struct __thread_queue_t *___dst__R17s__thread_queue_t_1);
+static inline void ___constructor__F_R17s__thread_queue_t17s__thread_queue_t_autogen___1(struct __thread_queue_t *___dst__R17s__thread_queue_t_1, struct __thread_queue_t ___src__17s__thread_queue_t_1);
+static inline void ___destructor__F_R17s__thread_queue_t_autogen___1(struct __thread_queue_t *___dst__R17s__thread_queue_t_1);
+static inline struct __thread_queue_t ___operator_assign__F17s__thread_queue_t_R17s__thread_queue_t17s__thread_queue_t_autogen___1(struct __thread_queue_t *___dst__R17s__thread_queue_t_1, struct __thread_queue_t ___src__17s__thread_queue_t_1);
+static inline void ___constructor__F_R17s__thread_queue_t_autogen___1(struct __thread_queue_t *___dst__R17s__thread_queue_t_1){
+    ((void)((*___dst__R17s__thread_queue_t_1).head) /* ?{} */);
+    ((void)((*___dst__R17s__thread_queue_t_1).tail) /* ?{} */);
+}
+static inline void ___constructor__F_R17s__thread_queue_t17s__thread_queue_t_autogen___1(struct __thread_queue_t *___dst__R17s__thread_queue_t_1, struct __thread_queue_t ___src__17s__thread_queue_t_1){
+    ((void)((*___dst__R17s__thread_queue_t_1).head=___src__17s__thread_queue_t_1.head) /* ?{} */);
+    ((void)((*___dst__R17s__thread_queue_t_1).tail=___src__17s__thread_queue_t_1.tail) /* ?{} */);
+}
+static inline void ___destructor__F_R17s__thread_queue_t_autogen___1(struct __thread_queue_t *___dst__R17s__thread_queue_t_1){
+    ((void)((*___dst__R17s__thread_queue_t_1).tail) /* ^?{} */);
+    ((void)((*___dst__R17s__thread_queue_t_1).head) /* ^?{} */);
+}
+static inline struct __thread_queue_t ___operator_assign__F17s__thread_queue_t_R17s__thread_queue_t17s__thread_queue_t_autogen___1(struct __thread_queue_t *___dst__R17s__thread_queue_t_1, struct __thread_queue_t ___src__17s__thread_queue_t_1){
+    struct __thread_queue_t ___ret__17s__thread_queue_t_1;
+    ((void)((*___dst__R17s__thread_queue_t_1).head=___src__17s__thread_queue_t_1.head));
+    ((void)((*___dst__R17s__thread_queue_t_1).tail=___src__17s__thread_queue_t_1.tail));
+    ((void)___constructor__F_R17s__thread_queue_t17s__thread_queue_t_autogen___1((&___ret__17s__thread_queue_t_1), ___src__17s__thread_queue_t_1));
+    return ((struct __thread_queue_t )___ret__17s__thread_queue_t_1);
+}
+static inline void ___constructor__F_R17s__thread_queue_tP12sthread_desc_autogen___1(struct __thread_queue_t *___dst__R17s__thread_queue_t_1, struct thread_desc *__head__P12sthread_desc_1){
+    ((void)((*___dst__R17s__thread_queue_t_1).head=__head__P12sthread_desc_1) /* ?{} */);
+    ((void)((*___dst__R17s__thread_queue_t_1).tail) /* ?{} */);
+}
+static inline void ___constructor__F_R17s__thread_queue_tP12sthread_descPP12sthread_desc_autogen___1(struct __thread_queue_t *___dst__R17s__thread_queue_t_1, struct thread_desc *__head__P12sthread_desc_1, struct thread_desc **__tail__PP12sthread_desc_1){
+    ((void)((*___dst__R17s__thread_queue_t_1).head=__head__P12sthread_desc_1) /* ?{} */);
+    ((void)((*___dst__R17s__thread_queue_t_1).tail=__tail__PP12sthread_desc_1) /* ?{} */);
+}
+struct __condition_stack_t {
+    struct __condition_criterion_t *top;
+};
+static inline void ___constructor__F_R20s__condition_stack_t_autogen___1(struct __condition_stack_t *___dst__R20s__condition_stack_t_1);
+static inline void ___constructor__F_R20s__condition_stack_t20s__condition_stack_t_autogen___1(struct __condition_stack_t *___dst__R20s__condition_stack_t_1, struct __condition_stack_t ___src__20s__condition_stack_t_1);
+static inline void ___destructor__F_R20s__condition_stack_t_autogen___1(struct __condition_stack_t *___dst__R20s__condition_stack_t_1);
+static inline struct __condition_stack_t ___operator_assign__F20s__condition_stack_t_R20s__condition_stack_t20s__condition_stack_t_autogen___1(struct __condition_stack_t *___dst__R20s__condition_stack_t_1, struct __condition_stack_t ___src__20s__condition_stack_t_1);
+static inline void ___constructor__F_R20s__condition_stack_t_autogen___1(struct __condition_stack_t *___dst__R20s__condition_stack_t_1){
+    ((void)((*___dst__R20s__condition_stack_t_1).top) /* ?{} */);
+}
+static inline void ___constructor__F_R20s__condition_stack_t20s__condition_stack_t_autogen___1(struct __condition_stack_t *___dst__R20s__condition_stack_t_1, struct __condition_stack_t ___src__20s__condition_stack_t_1){
+    ((void)((*___dst__R20s__condition_stack_t_1).top=___src__20s__condition_stack_t_1.top) /* ?{} */);
+}
+static inline void ___destructor__F_R20s__condition_stack_t_autogen___1(struct __condition_stack_t *___dst__R20s__condition_stack_t_1){
+    ((void)((*___dst__R20s__condition_stack_t_1).top) /* ^?{} */);
+}
+static inline struct __condition_stack_t ___operator_assign__F20s__condition_stack_t_R20s__condition_stack_t20s__condition_stack_t_autogen___1(struct __condition_stack_t *___dst__R20s__condition_stack_t_1, struct __condition_stack_t ___src__20s__condition_stack_t_1){
+    struct __condition_stack_t ___ret__20s__condition_stack_t_1;
+    ((void)((*___dst__R20s__condition_stack_t_1).top=___src__20s__condition_stack_t_1.top));
+    ((void)___constructor__F_R20s__condition_stack_t20s__condition_stack_t_autogen___1((&___ret__20s__condition_stack_t_1), ___src__20s__condition_stack_t_1));
+    return ((struct __condition_stack_t )___ret__20s__condition_stack_t_1);
+}
+static inline void ___constructor__F_R20s__condition_stack_tP24s__condition_criterion_t_autogen___1(struct __condition_stack_t *___dst__R20s__condition_stack_t_1, struct __condition_criterion_t *__top__P24s__condition_criterion_t_1){
+    ((void)((*___dst__R20s__condition_stack_t_1).top=__top__P24s__condition_criterion_t_1) /* ?{} */);
+}
+void ___constructor__F_R17s__thread_queue_t__1(struct __thread_queue_t *__anonymous_object0);
+void __append__F_P17s__thread_queue_tP12sthread_desc__1(struct __thread_queue_t *__anonymous_object1, struct thread_desc *__anonymous_object2);
+struct thread_desc *__pop_head__FP12sthread_desc_P17s__thread_queue_t__1(struct __thread_queue_t *__anonymous_object3);
+struct thread_desc *__remove__FP12sthread_desc_P17s__thread_queue_tPP12sthread_desc__1(struct __thread_queue_t *__anonymous_object4, struct thread_desc **__anonymous_object5);
+void ___constructor__F_R20s__condition_stack_t__1(struct __condition_stack_t *__anonymous_object6);
+void __push__F_P20s__condition_stack_tP24s__condition_criterion_t__1(struct __condition_stack_t *__anonymous_object7, struct __condition_criterion_t *__anonymous_object8);
+struct __condition_criterion_t *__pop__FP24s__condition_criterion_t_P20s__condition_stack_t__1(struct __condition_stack_t *__anonymous_object9);
+void ___constructor__F_R9sspinlock__1(struct spinlock *__this__R9sspinlock_1);
+void ___destructor__F_R9sspinlock__1(struct spinlock *__this__R9sspinlock_1);
+struct coStack_t {
+    unsigned int size;
+    void *storage;
+    void *limit;
+    void *base;
+    void *context;
+    void *top;
+    _Bool userStack;
+};
+static inline void ___constructor__F_R10scoStack_t_autogen___1(struct coStack_t *___dst__R10scoStack_t_1);
+static inline void ___constructor__F_R10scoStack_t10scoStack_t_autogen___1(struct coStack_t *___dst__R10scoStack_t_1, struct coStack_t ___src__10scoStack_t_1);
+static inline void ___destructor__F_R10scoStack_t_autogen___1(struct coStack_t *___dst__R10scoStack_t_1);
+static inline struct coStack_t ___operator_assign__F10scoStack_t_R10scoStack_t10scoStack_t_autogen___1(struct coStack_t *___dst__R10scoStack_t_1, struct coStack_t ___src__10scoStack_t_1);
+static inline void ___constructor__F_R10scoStack_t_autogen___1(struct coStack_t *___dst__R10scoStack_t_1){
+    ((void)((*___dst__R10scoStack_t_1).size) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).storage) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).limit) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).base) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).context) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).top) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).userStack) /* ?{} */);
+}
+static inline void ___constructor__F_R10scoStack_t10scoStack_t_autogen___1(struct coStack_t *___dst__R10scoStack_t_1, struct coStack_t ___src__10scoStack_t_1){
+    ((void)((*___dst__R10scoStack_t_1).size=___src__10scoStack_t_1.size) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).storage=___src__10scoStack_t_1.storage) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).limit=___src__10scoStack_t_1.limit) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).base=___src__10scoStack_t_1.base) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).context=___src__10scoStack_t_1.context) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).top=___src__10scoStack_t_1.top) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).userStack=___src__10scoStack_t_1.userStack) /* ?{} */);
+}
+static inline void ___destructor__F_R10scoStack_t_autogen___1(struct coStack_t *___dst__R10scoStack_t_1){
+    ((void)((*___dst__R10scoStack_t_1).userStack) /* ^?{} */);
+    ((void)((*___dst__R10scoStack_t_1).top) /* ^?{} */);
+    ((void)((*___dst__R10scoStack_t_1).context) /* ^?{} */);
+    ((void)((*___dst__R10scoStack_t_1).base) /* ^?{} */);
+    ((void)((*___dst__R10scoStack_t_1).limit) /* ^?{} */);
+    ((void)((*___dst__R10scoStack_t_1).storage) /* ^?{} */);
+    ((void)((*___dst__R10scoStack_t_1).size) /* ^?{} */);
+}
+static inline struct coStack_t ___operator_assign__F10scoStack_t_R10scoStack_t10scoStack_t_autogen___1(struct coStack_t *___dst__R10scoStack_t_1, struct coStack_t ___src__10scoStack_t_1){
+    struct coStack_t ___ret__10scoStack_t_1;
+    ((void)((*___dst__R10scoStack_t_1).size=___src__10scoStack_t_1.size));
+    ((void)((*___dst__R10scoStack_t_1).storage=___src__10scoStack_t_1.storage));
+    ((void)((*___dst__R10scoStack_t_1).limit=___src__10scoStack_t_1.limit));
+    ((void)((*___dst__R10scoStack_t_1).base=___src__10scoStack_t_1.base));
+    ((void)((*___dst__R10scoStack_t_1).context=___src__10scoStack_t_1.context));
+    ((void)((*___dst__R10scoStack_t_1).top=___src__10scoStack_t_1.top));
+    ((void)((*___dst__R10scoStack_t_1).userStack=___src__10scoStack_t_1.userStack));
+    ((void)___constructor__F_R10scoStack_t10scoStack_t_autogen___1((&___ret__10scoStack_t_1), ___src__10scoStack_t_1));
+    return ((struct coStack_t )___ret__10scoStack_t_1);
+}
+static inline void ___constructor__F_R10scoStack_tUi_autogen___1(struct coStack_t *___dst__R10scoStack_t_1, unsigned int __size__Ui_1){
+    ((void)((*___dst__R10scoStack_t_1).size=__size__Ui_1) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).storage) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).limit) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).base) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).context) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).top) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).userStack) /* ?{} */);
+}
+static inline void ___constructor__F_R10scoStack_tUiPv_autogen___1(struct coStack_t *___dst__R10scoStack_t_1, unsigned int __size__Ui_1, void *__storage__Pv_1){
+    ((void)((*___dst__R10scoStack_t_1).size=__size__Ui_1) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).storage=__storage__Pv_1) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).limit) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).base) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).context) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).top) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).userStack) /* ?{} */);
+}
+static inline void ___constructor__F_R10scoStack_tUiPvPv_autogen___1(struct coStack_t *___dst__R10scoStack_t_1, unsigned int __size__Ui_1, void *__storage__Pv_1, void *__limit__Pv_1){
+    ((void)((*___dst__R10scoStack_t_1).size=__size__Ui_1) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).storage=__storage__Pv_1) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).limit=__limit__Pv_1) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).base) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).context) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).top) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).userStack) /* ?{} */);
+}
+static inline void ___constructor__F_R10scoStack_tUiPvPvPv_autogen___1(struct coStack_t *___dst__R10scoStack_t_1, unsigned int __size__Ui_1, void *__storage__Pv_1, void *__limit__Pv_1, void *__base__Pv_1){
+    ((void)((*___dst__R10scoStack_t_1).size=__size__Ui_1) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).storage=__storage__Pv_1) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).limit=__limit__Pv_1) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).base=__base__Pv_1) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).context) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).top) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).userStack) /* ?{} */);
+}
+static inline void ___constructor__F_R10scoStack_tUiPvPvPvPv_autogen___1(struct coStack_t *___dst__R10scoStack_t_1, unsigned int __size__Ui_1, void *__storage__Pv_1, void *__limit__Pv_1, void *__base__Pv_1, void *__context__Pv_1){
+    ((void)((*___dst__R10scoStack_t_1).size=__size__Ui_1) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).storage=__storage__Pv_1) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).limit=__limit__Pv_1) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).base=__base__Pv_1) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).context=__context__Pv_1) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).top) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).userStack) /* ?{} */);
+}
+static inline void ___constructor__F_R10scoStack_tUiPvPvPvPvPv_autogen___1(struct coStack_t *___dst__R10scoStack_t_1, unsigned int __size__Ui_1, void *__storage__Pv_1, void *__limit__Pv_1, void *__base__Pv_1, void *__context__Pv_1, void *__top__Pv_1){
+    ((void)((*___dst__R10scoStack_t_1).size=__size__Ui_1) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).storage=__storage__Pv_1) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).limit=__limit__Pv_1) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).base=__base__Pv_1) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).context=__context__Pv_1) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).top=__top__Pv_1) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).userStack) /* ?{} */);
+}
+static inline void ___constructor__F_R10scoStack_tUiPvPvPvPvPvb_autogen___1(struct coStack_t *___dst__R10scoStack_t_1, unsigned int __size__Ui_1, void *__storage__Pv_1, void *__limit__Pv_1, void *__base__Pv_1, void *__context__Pv_1, void *__top__Pv_1, _Bool __userStack__b_1){
+    ((void)((*___dst__R10scoStack_t_1).size=__size__Ui_1) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).storage=__storage__Pv_1) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).limit=__limit__Pv_1) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).base=__base__Pv_1) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).context=__context__Pv_1) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).top=__top__Pv_1) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).userStack=__userStack__b_1) /* ?{} */);
+}
+enum coroutine_state {
+    Halted,
+    Start,
+    Inactive,
+    Active,
+    Primed,
+};
+struct coroutine_desc {
+    struct coStack_t stack;
+    const char *name;
+    signed int errno_;
+    enum coroutine_state state;
+    struct coroutine_desc *starter;
+    struct coroutine_desc *last;
+};
+struct __waitfor_mask_t {
+    signed short int *accepted;
+    struct __acceptable_t *clauses;
+    signed short int size;
+};
+static inline void ___constructor__F_R17s__waitfor_mask_t_autogen___1(struct __waitfor_mask_t *___dst__R17s__waitfor_mask_t_1);
+static inline void ___constructor__F_R17s__waitfor_mask_t17s__waitfor_mask_t_autogen___1(struct __waitfor_mask_t *___dst__R17s__waitfor_mask_t_1, struct __waitfor_mask_t ___src__17s__waitfor_mask_t_1);
+static inline void ___destructor__F_R17s__waitfor_mask_t_autogen___1(struct __waitfor_mask_t *___dst__R17s__waitfor_mask_t_1);
+static inline struct __waitfor_mask_t ___operator_assign__F17s__waitfor_mask_t_R17s__waitfor_mask_t17s__waitfor_mask_t_autogen___1(struct __waitfor_mask_t *___dst__R17s__waitfor_mask_t_1, struct __waitfor_mask_t ___src__17s__waitfor_mask_t_1);
+static inline void ___constructor__F_R17s__waitfor_mask_t_autogen___1(struct __waitfor_mask_t *___dst__R17s__waitfor_mask_t_1){
+    ((void)((*___dst__R17s__waitfor_mask_t_1).accepted) /* ?{} */);
+    ((void)((*___dst__R17s__waitfor_mask_t_1).clauses) /* ?{} */);
+    ((void)((*___dst__R17s__waitfor_mask_t_1).size) /* ?{} */);
+}
+static inline void ___constructor__F_R17s__waitfor_mask_t17s__waitfor_mask_t_autogen___1(struct __waitfor_mask_t *___dst__R17s__waitfor_mask_t_1, struct __waitfor_mask_t ___src__17s__waitfor_mask_t_1){
+    ((void)((*___dst__R17s__waitfor_mask_t_1).accepted=___src__17s__waitfor_mask_t_1.accepted) /* ?{} */);
+    ((void)((*___dst__R17s__waitfor_mask_t_1).clauses=___src__17s__waitfor_mask_t_1.clauses) /* ?{} */);
+    ((void)((*___dst__R17s__waitfor_mask_t_1).size=___src__17s__waitfor_mask_t_1.size) /* ?{} */);
+}
+static inline void ___destructor__F_R17s__waitfor_mask_t_autogen___1(struct __waitfor_mask_t *___dst__R17s__waitfor_mask_t_1){
+    ((void)((*___dst__R17s__waitfor_mask_t_1).size) /* ^?{} */);
+    ((void)((*___dst__R17s__waitfor_mask_t_1).clauses) /* ^?{} */);
+    ((void)((*___dst__R17s__waitfor_mask_t_1).accepted) /* ^?{} */);
+}
+static inline struct __waitfor_mask_t ___operator_assign__F17s__waitfor_mask_t_R17s__waitfor_mask_t17s__waitfor_mask_t_autogen___1(struct __waitfor_mask_t *___dst__R17s__waitfor_mask_t_1, struct __waitfor_mask_t ___src__17s__waitfor_mask_t_1){
+    struct __waitfor_mask_t ___ret__17s__waitfor_mask_t_1;
+    ((void)((*___dst__R17s__waitfor_mask_t_1).accepted=___src__17s__waitfor_mask_t_1.accepted));
+    ((void)((*___dst__R17s__waitfor_mask_t_1).clauses=___src__17s__waitfor_mask_t_1.clauses));
+    ((void)((*___dst__R17s__waitfor_mask_t_1).size=___src__17s__waitfor_mask_t_1.size));
+    ((void)___constructor__F_R17s__waitfor_mask_t17s__waitfor_mask_t_autogen___1((&___ret__17s__waitfor_mask_t_1), ___src__17s__waitfor_mask_t_1));
+    return ((struct __waitfor_mask_t )___ret__17s__waitfor_mask_t_1);
+}
+static inline void ___constructor__F_R17s__waitfor_mask_tPs_autogen___1(struct __waitfor_mask_t *___dst__R17s__waitfor_mask_t_1, signed short int *__accepted__Ps_1){
+    ((void)((*___dst__R17s__waitfor_mask_t_1).accepted=__accepted__Ps_1) /* ?{} */);
+    ((void)((*___dst__R17s__waitfor_mask_t_1).clauses) /* ?{} */);
+    ((void)((*___dst__R17s__waitfor_mask_t_1).size) /* ?{} */);
+}
+static inline void ___constructor__F_R17s__waitfor_mask_tPsP15s__acceptable_t_autogen___1(struct __waitfor_mask_t *___dst__R17s__waitfor_mask_t_1, signed short int *__accepted__Ps_1, struct __acceptable_t *__clauses__P15s__acceptable_t_1){
+    ((void)((*___dst__R17s__waitfor_mask_t_1).accepted=__accepted__Ps_1) /* ?{} */);
+    ((void)((*___dst__R17s__waitfor_mask_t_1).clauses=__clauses__P15s__acceptable_t_1) /* ?{} */);
+    ((void)((*___dst__R17s__waitfor_mask_t_1).size) /* ?{} */);
+}
+static inline void ___constructor__F_R17s__waitfor_mask_tPsP15s__acceptable_ts_autogen___1(struct __waitfor_mask_t *___dst__R17s__waitfor_mask_t_1, signed short int *__accepted__Ps_1, struct __acceptable_t *__clauses__P15s__acceptable_t_1, signed short int __size__s_1){
+    ((void)((*___dst__R17s__waitfor_mask_t_1).accepted=__accepted__Ps_1) /* ?{} */);
+    ((void)((*___dst__R17s__waitfor_mask_t_1).clauses=__clauses__P15s__acceptable_t_1) /* ?{} */);
+    ((void)((*___dst__R17s__waitfor_mask_t_1).size=__size__s_1) /* ?{} */);
+}
+struct monitor_desc {
+    struct spinlock lock;
+    struct thread_desc *owner;
+    struct __thread_queue_t entry_queue;
+    struct __condition_stack_t signal_stack;
+    unsigned int recursion;
+    struct __waitfor_mask_t mask;
+};
+static inline void ___constructor__F_R13smonitor_desc_autogen___1(struct monitor_desc *___dst__R13smonitor_desc_1);
+static inline void ___constructor__F_R13smonitor_desc13smonitor_desc_autogen___1(struct monitor_desc *___dst__R13smonitor_desc_1, struct monitor_desc ___src__13smonitor_desc_1);
+static inline void ___destructor__F_R13smonitor_desc_autogen___1(struct monitor_desc *___dst__R13smonitor_desc_1);
+static inline struct monitor_desc ___operator_assign__F13smonitor_desc_R13smonitor_desc13smonitor_desc_autogen___1(struct monitor_desc *___dst__R13smonitor_desc_1, struct monitor_desc ___src__13smonitor_desc_1);
+static inline void ___constructor__F_R13smonitor_desc_autogen___1(struct monitor_desc *___dst__R13smonitor_desc_1){
+    ((void)___constructor__F_R9sspinlock__1((&(*___dst__R13smonitor_desc_1).lock)));
+    ((void)((*___dst__R13smonitor_desc_1).owner) /* ?{} */);
+    ((void)___constructor__F_R17s__thread_queue_t__1((&(*___dst__R13smonitor_desc_1).entry_queue)));
+    ((void)___constructor__F_R20s__condition_stack_t__1((&(*___dst__R13smonitor_desc_1).signal_stack)));
+    ((void)((*___dst__R13smonitor_desc_1).recursion) /* ?{} */);
+    ((void)___constructor__F_R17s__waitfor_mask_t_autogen___1((&(*___dst__R13smonitor_desc_1).mask)));
+}
+static inline void ___constructor__F_R13smonitor_desc13smonitor_desc_autogen___1(struct monitor_desc *___dst__R13smonitor_desc_1, struct monitor_desc ___src__13smonitor_desc_1){
+    ((void)___constructor__F_R9sspinlock9sspinlock_autogen___1((&(*___dst__R13smonitor_desc_1).lock), ___src__13smonitor_desc_1.lock));
+    ((void)((*___dst__R13smonitor_desc_1).owner=___src__13smonitor_desc_1.owner) /* ?{} */);
+    ((void)___constructor__F_R17s__thread_queue_t17s__thread_queue_t_autogen___1((&(*___dst__R13smonitor_desc_1).entry_queue), ___src__13smonitor_desc_1.entry_queue));
+    ((void)___constructor__F_R20s__condition_stack_t20s__condition_stack_t_autogen___1((&(*___dst__R13smonitor_desc_1).signal_stack), ___src__13smonitor_desc_1.signal_stack));
+    ((void)((*___dst__R13smonitor_desc_1).recursion=___src__13smonitor_desc_1.recursion) /* ?{} */);
+    ((void)___constructor__F_R17s__waitfor_mask_t17s__waitfor_mask_t_autogen___1((&(*___dst__R13smonitor_desc_1).mask), ___src__13smonitor_desc_1.mask));
+}
+static inline void ___destructor__F_R13smonitor_desc_autogen___1(struct monitor_desc *___dst__R13smonitor_desc_1){
+    ((void)___destructor__F_R17s__waitfor_mask_t_autogen___1((&(*___dst__R13smonitor_desc_1).mask)));
+    ((void)((*___dst__R13smonitor_desc_1).recursion) /* ^?{} */);
+    ((void)___destructor__F_R20s__condition_stack_t_autogen___1((&(*___dst__R13smonitor_desc_1).signal_stack)));
+    ((void)___destructor__F_R17s__thread_queue_t_autogen___1((&(*___dst__R13smonitor_desc_1).entry_queue)));
+    ((void)((*___dst__R13smonitor_desc_1).owner) /* ^?{} */);
+    ((void)___destructor__F_R9sspinlock__1((&(*___dst__R13smonitor_desc_1).lock)));
+}
+static inline struct monitor_desc ___operator_assign__F13smonitor_desc_R13smonitor_desc13smonitor_desc_autogen___1(struct monitor_desc *___dst__R13smonitor_desc_1, struct monitor_desc ___src__13smonitor_desc_1){
+    struct monitor_desc ___ret__13smonitor_desc_1;
+    struct spinlock _tmp_cp0;
+    struct spinlock _tmp_cp_ret0;
+    ((void)(((void)(_tmp_cp_ret0=___operator_assign__F9sspinlock_R9sspinlock9sspinlock_autogen___1((&(*___dst__R13smonitor_desc_1).lock), (((void)___constructor__F_R9sspinlock9sspinlock_autogen___1((&_tmp_cp0), ___src__13smonitor_desc_1.lock)) , _tmp_cp0)))) , _tmp_cp_ret0));
+    ((void)___destructor__F_R9sspinlock__1((&_tmp_cp_ret0)));
+    ((void)___destructor__F_R9sspinlock__1((&_tmp_cp0)));
+    ((void)((*___dst__R13smonitor_desc_1).owner=___src__13smonitor_desc_1.owner));
+    struct __thread_queue_t _tmp_cp1;
+    struct __thread_queue_t _tmp_cp_ret1;
+    ((void)(((void)(_tmp_cp_ret1=___operator_assign__F17s__thread_queue_t_R17s__thread_queue_t17s__thread_queue_t_autogen___1((&(*___dst__R13smonitor_desc_1).entry_queue), (((void)___constructor__F_R17s__thread_queue_t17s__thread_queue_t_autogen___1((&_tmp_cp1), ___src__13smonitor_desc_1.entry_queue)) , _tmp_cp1)))) , _tmp_cp_ret1));
+    ((void)___destructor__F_R17s__thread_queue_t_autogen___1((&_tmp_cp_ret1)));
+    ((void)___destructor__F_R17s__thread_queue_t_autogen___1((&_tmp_cp1)));
+    struct __condition_stack_t _tmp_cp2;
+    struct __condition_stack_t _tmp_cp_ret2;
+    ((void)(((void)(_tmp_cp_ret2=___operator_assign__F20s__condition_stack_t_R20s__condition_stack_t20s__condition_stack_t_autogen___1((&(*___dst__R13smonitor_desc_1).signal_stack), (((void)___constructor__F_R20s__condition_stack_t20s__condition_stack_t_autogen___1((&_tmp_cp2), ___src__13smonitor_desc_1.signal_stack)) , _tmp_cp2)))) , _tmp_cp_ret2));
+    ((void)___destructor__F_R20s__condition_stack_t_autogen___1((&_tmp_cp_ret2)));
+    ((void)___destructor__F_R20s__condition_stack_t_autogen___1((&_tmp_cp2)));
+    ((void)((*___dst__R13smonitor_desc_1).recursion=___src__13smonitor_desc_1.recursion));
+    struct __waitfor_mask_t _tmp_cp3;
+    struct __waitfor_mask_t _tmp_cp_ret3;
+    ((void)(((void)(_tmp_cp_ret3=___operator_assign__F17s__waitfor_mask_t_R17s__waitfor_mask_t17s__waitfor_mask_t_autogen___1((&(*___dst__R13smonitor_desc_1).mask), (((void)___constructor__F_R17s__waitfor_mask_t17s__waitfor_mask_t_autogen___1((&_tmp_cp3), ___src__13smonitor_desc_1.mask)) , _tmp_cp3)))) , _tmp_cp_ret3));
+    ((void)___destructor__F_R17s__waitfor_mask_t_autogen___1((&_tmp_cp_ret3)));
+    ((void)___destructor__F_R17s__waitfor_mask_t_autogen___1((&_tmp_cp3)));
+    ((void)___constructor__F_R13smonitor_desc13smonitor_desc_autogen___1((&___ret__13smonitor_desc_1), ___src__13smonitor_desc_1));
+    return ((struct monitor_desc )___ret__13smonitor_desc_1);
+}
+static inline void ___constructor__F_R13smonitor_desc9sspinlock_autogen___1(struct monitor_desc *___dst__R13smonitor_desc_1, struct spinlock __lock__9sspinlock_1){
+    ((void)___constructor__F_R9sspinlock9sspinlock_autogen___1((&(*___dst__R13smonitor_desc_1).lock), __lock__9sspinlock_1));
+    ((void)((*___dst__R13smonitor_desc_1).owner) /* ?{} */);
+    ((void)___constructor__F_R17s__thread_queue_t__1((&(*___dst__R13smonitor_desc_1).entry_queue)));
+    ((void)___constructor__F_R20s__condition_stack_t__1((&(*___dst__R13smonitor_desc_1).signal_stack)));
+    ((void)((*___dst__R13smonitor_desc_1).recursion) /* ?{} */);
+    ((void)___constructor__F_R17s__waitfor_mask_t_autogen___1((&(*___dst__R13smonitor_desc_1).mask)));
+}
+static inline void ___constructor__F_R13smonitor_desc9sspinlockP12sthread_desc_autogen___1(struct monitor_desc *___dst__R13smonitor_desc_1, struct spinlock __lock__9sspinlock_1, struct thread_desc *__owner__P12sthread_desc_1){
+    ((void)___constructor__F_R9sspinlock9sspinlock_autogen___1((&(*___dst__R13smonitor_desc_1).lock), __lock__9sspinlock_1));
+    ((void)((*___dst__R13smonitor_desc_1).owner=__owner__P12sthread_desc_1) /* ?{} */);
+    ((void)___constructor__F_R17s__thread_queue_t__1((&(*___dst__R13smonitor_desc_1).entry_queue)));
+    ((void)___constructor__F_R20s__condition_stack_t__1((&(*___dst__R13smonitor_desc_1).signal_stack)));
+    ((void)((*___dst__R13smonitor_desc_1).recursion) /* ?{} */);
+    ((void)___constructor__F_R17s__waitfor_mask_t_autogen___1((&(*___dst__R13smonitor_desc_1).mask)));
+}
+static inline void ___constructor__F_R13smonitor_desc9sspinlockP12sthread_desc17s__thread_queue_t_autogen___1(struct monitor_desc *___dst__R13smonitor_desc_1, struct spinlock __lock__9sspinlock_1, struct thread_desc *__owner__P12sthread_desc_1, struct __thread_queue_t __entry_queue__17s__thread_queue_t_1){
+    ((void)___constructor__F_R9sspinlock9sspinlock_autogen___1((&(*___dst__R13smonitor_desc_1).lock), __lock__9sspinlock_1));
+    ((void)((*___dst__R13smonitor_desc_1).owner=__owner__P12sthread_desc_1) /* ?{} */);
+    ((void)___constructor__F_R17s__thread_queue_t17s__thread_queue_t_autogen___1((&(*___dst__R13smonitor_desc_1).entry_queue), __entry_queue__17s__thread_queue_t_1));
+    ((void)___constructor__F_R20s__condition_stack_t__1((&(*___dst__R13smonitor_desc_1).signal_stack)));
+    ((void)((*___dst__R13smonitor_desc_1).recursion) /* ?{} */);
+    ((void)___constructor__F_R17s__waitfor_mask_t_autogen___1((&(*___dst__R13smonitor_desc_1).mask)));
+}
+static inline void ___constructor__F_R13smonitor_desc9sspinlockP12sthread_desc17s__thread_queue_t20s__condition_stack_t_autogen___1(struct monitor_desc *___dst__R13smonitor_desc_1, struct spinlock __lock__9sspinlock_1, struct thread_desc *__owner__P12sthread_desc_1, struct __thread_queue_t __entry_queue__17s__thread_queue_t_1, struct __condition_stack_t __signal_stack__20s__condition_stack_t_1){
+    ((void)___constructor__F_R9sspinlock9sspinlock_autogen___1((&(*___dst__R13smonitor_desc_1).lock), __lock__9sspinlock_1));
+    ((void)((*___dst__R13smonitor_desc_1).owner=__owner__P12sthread_desc_1) /* ?{} */);
+    ((void)___constructor__F_R17s__thread_queue_t17s__thread_queue_t_autogen___1((&(*___dst__R13smonitor_desc_1).entry_queue), __entry_queue__17s__thread_queue_t_1));
+    ((void)___constructor__F_R20s__condition_stack_t20s__condition_stack_t_autogen___1((&(*___dst__R13smonitor_desc_1).signal_stack), __signal_stack__20s__condition_stack_t_1));
+    ((void)((*___dst__R13smonitor_desc_1).recursion) /* ?{} */);
+    ((void)___constructor__F_R17s__waitfor_mask_t_autogen___1((&(*___dst__R13smonitor_desc_1).mask)));
+}
+static inline void ___constructor__F_R13smonitor_desc9sspinlockP12sthread_desc17s__thread_queue_t20s__condition_stack_tUi_autogen___1(struct monitor_desc *___dst__R13smonitor_desc_1, struct spinlock __lock__9sspinlock_1, struct thread_desc *__owner__P12sthread_desc_1, struct __thread_queue_t __entry_queue__17s__thread_queue_t_1, struct __condition_stack_t __signal_stack__20s__condition_stack_t_1, unsigned int __recursion__Ui_1){
+    ((void)___constructor__F_R9sspinlock9sspinlock_autogen___1((&(*___dst__R13smonitor_desc_1).lock), __lock__9sspinlock_1));
+    ((void)((*___dst__R13smonitor_desc_1).owner=__owner__P12sthread_desc_1) /* ?{} */);
+    ((void)___constructor__F_R17s__thread_queue_t17s__thread_queue_t_autogen___1((&(*___dst__R13smonitor_desc_1).entry_queue), __entry_queue__17s__thread_queue_t_1));
+    ((void)___constructor__F_R20s__condition_stack_t20s__condition_stack_t_autogen___1((&(*___dst__R13smonitor_desc_1).signal_stack), __signal_stack__20s__condition_stack_t_1));
+    ((void)((*___dst__R13smonitor_desc_1).recursion=__recursion__Ui_1) /* ?{} */);
+    ((void)___constructor__F_R17s__waitfor_mask_t_autogen___1((&(*___dst__R13smonitor_desc_1).mask)));
+}
+static inline void ___constructor__F_R13smonitor_desc9sspinlockP12sthread_desc17s__thread_queue_t20s__condition_stack_tUi17s__waitfor_mask_t_autogen___1(struct monitor_desc *___dst__R13smonitor_desc_1, struct spinlock __lock__9sspinlock_1, struct thread_desc *__owner__P12sthread_desc_1, struct __thread_queue_t __entry_queue__17s__thread_queue_t_1, struct __condition_stack_t __signal_stack__20s__condition_stack_t_1, unsigned int __recursion__Ui_1, struct __waitfor_mask_t __mask__17s__waitfor_mask_t_1){
+    ((void)___constructor__F_R9sspinlock9sspinlock_autogen___1((&(*___dst__R13smonitor_desc_1).lock), __lock__9sspinlock_1));
+    ((void)((*___dst__R13smonitor_desc_1).owner=__owner__P12sthread_desc_1) /* ?{} */);
+    ((void)___constructor__F_R17s__thread_queue_t17s__thread_queue_t_autogen___1((&(*___dst__R13smonitor_desc_1).entry_queue), __entry_queue__17s__thread_queue_t_1));
+    ((void)___constructor__F_R20s__condition_stack_t20s__condition_stack_t_autogen___1((&(*___dst__R13smonitor_desc_1).signal_stack), __signal_stack__20s__condition_stack_t_1));
+    ((void)((*___dst__R13smonitor_desc_1).recursion=__recursion__Ui_1) /* ?{} */);
+    ((void)___constructor__F_R17s__waitfor_mask_t17s__waitfor_mask_t_autogen___1((&(*___dst__R13smonitor_desc_1).mask), __mask__17s__waitfor_mask_t_1));
+}
+struct __monitor_group_t {
+    struct monitor_desc **list;
+    signed short int size;
+    void (*func)();
+};
+static inline void ___constructor__F_R18s__monitor_group_t_autogen___1(struct __monitor_group_t *___dst__R18s__monitor_group_t_1);
+static inline void ___constructor__F_R18s__monitor_group_t18s__monitor_group_t_autogen___1(struct __monitor_group_t *___dst__R18s__monitor_group_t_1, struct __monitor_group_t ___src__18s__monitor_group_t_1);
+static inline void ___destructor__F_R18s__monitor_group_t_autogen___1(struct __monitor_group_t *___dst__R18s__monitor_group_t_1);
+static inline struct __monitor_group_t ___operator_assign__F18s__monitor_group_t_R18s__monitor_group_t18s__monitor_group_t_autogen___1(struct __monitor_group_t *___dst__R18s__monitor_group_t_1, struct __monitor_group_t ___src__18s__monitor_group_t_1);
+static inline void ___constructor__F_R18s__monitor_group_t_autogen___1(struct __monitor_group_t *___dst__R18s__monitor_group_t_1){
+    ((void)((*___dst__R18s__monitor_group_t_1).list) /* ?{} */);
+    ((void)((*___dst__R18s__monitor_group_t_1).size) /* ?{} */);
+    ((void)((*___dst__R18s__monitor_group_t_1).func) /* ?{} */);
+}
+static inline void ___constructor__F_R18s__monitor_group_t18s__monitor_group_t_autogen___1(struct __monitor_group_t *___dst__R18s__monitor_group_t_1, struct __monitor_group_t ___src__18s__monitor_group_t_1){
+    ((void)((*___dst__R18s__monitor_group_t_1).list=___src__18s__monitor_group_t_1.list) /* ?{} */);
+    ((void)((*___dst__R18s__monitor_group_t_1).size=___src__18s__monitor_group_t_1.size) /* ?{} */);
+    ((void)((*___dst__R18s__monitor_group_t_1).func=___src__18s__monitor_group_t_1.func) /* ?{} */);
+}
+static inline void ___destructor__F_R18s__monitor_group_t_autogen___1(struct __monitor_group_t *___dst__R18s__monitor_group_t_1){
+    ((void)((*___dst__R18s__monitor_group_t_1).func) /* ^?{} */);
+    ((void)((*___dst__R18s__monitor_group_t_1).size) /* ^?{} */);
+    ((void)((*___dst__R18s__monitor_group_t_1).list) /* ^?{} */);
+}
+static inline struct __monitor_group_t ___operator_assign__F18s__monitor_group_t_R18s__monitor_group_t18s__monitor_group_t_autogen___1(struct __monitor_group_t *___dst__R18s__monitor_group_t_1, struct __monitor_group_t ___src__18s__monitor_group_t_1){
+    struct __monitor_group_t ___ret__18s__monitor_group_t_1;
+    ((void)((*___dst__R18s__monitor_group_t_1).list=___src__18s__monitor_group_t_1.list));
+    ((void)((*___dst__R18s__monitor_group_t_1).size=___src__18s__monitor_group_t_1.size));
+    ((void)((*___dst__R18s__monitor_group_t_1).func=___src__18s__monitor_group_t_1.func));
+    ((void)___constructor__F_R18s__monitor_group_t18s__monitor_group_t_autogen___1((&___ret__18s__monitor_group_t_1), ___src__18s__monitor_group_t_1));
+    return ((struct __monitor_group_t )___ret__18s__monitor_group_t_1);
+}
+static inline void ___constructor__F_R18s__monitor_group_tPP13smonitor_desc_autogen___1(struct __monitor_group_t *___dst__R18s__monitor_group_t_1, struct monitor_desc **__list__PP13smonitor_desc_1){
+    ((void)((*___dst__R18s__monitor_group_t_1).list=__list__PP13smonitor_desc_1) /* ?{} */);
+    ((void)((*___dst__R18s__monitor_group_t_1).size) /* ?{} */);
+    ((void)((*___dst__R18s__monitor_group_t_1).func) /* ?{} */);
+}
+static inline void ___constructor__F_R18s__monitor_group_tPP13smonitor_descs_autogen___1(struct __monitor_group_t *___dst__R18s__monitor_group_t_1, struct monitor_desc **__list__PP13smonitor_desc_1, signed short int __size__s_1){
+    ((void)((*___dst__R18s__monitor_group_t_1).list=__list__PP13smonitor_desc_1) /* ?{} */);
+    ((void)((*___dst__R18s__monitor_group_t_1).size=__size__s_1) /* ?{} */);
+    ((void)((*___dst__R18s__monitor_group_t_1).func) /* ?{} */);
+}
+static inline void ___constructor__F_R18s__monitor_group_tPP13smonitor_descsPF___autogen___1(struct __monitor_group_t *___dst__R18s__monitor_group_t_1, struct monitor_desc **__list__PP13smonitor_desc_1, signed short int __size__s_1, void (*__func__PF___1)()){
+    ((void)((*___dst__R18s__monitor_group_t_1).list=__list__PP13smonitor_desc_1) /* ?{} */);
+    ((void)((*___dst__R18s__monitor_group_t_1).size=__size__s_1) /* ?{} */);
+    ((void)((*___dst__R18s__monitor_group_t_1).func=__func__PF___1) /* ?{} */);
+}
+struct thread_desc {
+    struct coroutine_desc self_cor;
+    struct monitor_desc self_mon;
+    struct monitor_desc *self_mon_p;
+    struct __monitor_group_t monitors;
+    struct thread_desc *next;
+};
+static inline struct monitor_desc *___operator_index__FP13smonitor_desc_RC18s__monitor_group_ti__1(const struct __monitor_group_t *__this__RC18s__monitor_group_t_1, signed int __index__i_1){
+    __attribute__ ((unused)) struct monitor_desc *___retval__operator_index__P13smonitor_desc_1;
+    ((void)(___retval__operator_index__P13smonitor_desc_1=(*__this__RC18s__monitor_group_t_1).list[__index__i_1]) /* ?{} */);
+    return ((struct monitor_desc *)___retval__operator_index__P13smonitor_desc_1);
+}
+static inline _Bool ___operator_equal__Fb_RC18s__monitor_group_tRC18s__monitor_group_t__1(const struct __monitor_group_t *__lhs__RC18s__monitor_group_t_1, const struct __monitor_group_t *__rhs__RC18s__monitor_group_t_1){
+    __attribute__ ((unused)) _Bool ___retval__operator_equal__b_1;
+    if ( ((signed int )((((*__lhs__RC18s__monitor_group_t_1).list!=((struct monitor_desc **)0))!=((*__rhs__RC18s__monitor_group_t_1).list!=((struct monitor_desc **)0)))!=((signed int )0))) ) {
+        ((void)(___retval__operator_equal__b_1=((_Bool )0)) /* ?{} */);
+        return ((_Bool )___retval__operator_equal__b_1);
+    }
+
+    if ( ((signed int )(((*__lhs__RC18s__monitor_group_t_1).size!=(*__rhs__RC18s__monitor_group_t_1).size)!=((signed int )0))) ) {
+        ((void)(___retval__operator_equal__b_1=((_Bool )0)) /* ?{} */);
+        return ((_Bool )___retval__operator_equal__b_1);
+    }
+
+    if ( ((signed int )(((*__lhs__RC18s__monitor_group_t_1).func!=(*__rhs__RC18s__monitor_group_t_1).func)!=((signed int )0))) ) {
+        ((void)(___retval__operator_equal__b_1=((_Bool )0)) /* ?{} */);
+        return ((_Bool )___retval__operator_equal__b_1);
+    }
+
+    {
+        signed int __i__i_3 = ((signed int )0);
+        for (;((signed int )((__i__i_3<((signed int )(*__lhs__RC18s__monitor_group_t_1).size))!=((signed int )0)));((void)__i__i_3++)) {
+            struct monitor_desc *_tmp_cp_ret4;
+            struct monitor_desc *_tmp_cp_ret5;
+            if ( ((signed int )(((((void)(_tmp_cp_ret4=___operator_index__FP13smonitor_desc_RC18s__monitor_group_ti__1(__lhs__RC18s__monitor_group_t_1, __i__i_3))) , _tmp_cp_ret4)!=(((void)(_tmp_cp_ret5=___operator_index__FP13smonitor_desc_RC18s__monitor_group_ti__1(__rhs__RC18s__monitor_group_t_1, __i__i_3))) , _tmp_cp_ret5))!=((signed int )0))) ) {
+                ((void)(___retval__operator_equal__b_1=((_Bool )0)) /* ?{} */);
+                return ((_Bool )___retval__operator_equal__b_1);
+            }
+
+            ((void)(_tmp_cp_ret4) /* ^?{} */);
+            ((void)(_tmp_cp_ret5) /* ^?{} */);
+        }
+
+    }
+
+    ((void)(___retval__operator_equal__b_1=((_Bool )1)) /* ?{} */);
+    return ((_Bool )___retval__operator_equal__b_1);
+}
+static inline void *__malloc__A0_1_0_0__FPd0___1(__attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT){
+    __attribute__ ((unused)) void *___retval_malloc__P2tT_1;
+    void *_tmp_cp_ret6;
+    ((void)(___retval_malloc__P2tT_1=((void *)((void *)(((void)(_tmp_cp_ret6=malloc(((unsigned int )_sizeof_2tT)))) , _tmp_cp_ret6)))) /* ?{} */);
+    ((void)(_tmp_cp_ret6) /* ^?{} */);
+    return ((void *)___retval_malloc__P2tT_1);
+}
+void *calloc(unsigned int dim, unsigned int size);
+static inline void *__calloc__A0_1_0_0__FPd0_Ui__1(__attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT, unsigned int __dim__Ui_1){
+    __attribute__ ((unused)) void *___retval_calloc__P2tT_1;
+    void *_tmp_cp_ret7;
+    ((void)(___retval_calloc__P2tT_1=((void *)((void *)(((void)(_tmp_cp_ret7=calloc(__dim__Ui_1, ((unsigned int )_sizeof_2tT)))) , _tmp_cp_ret7)))) /* ?{} */);
+    ((void)(_tmp_cp_ret7) /* ^?{} */);
+    return ((void *)___retval_calloc__P2tT_1);
+}
+void *realloc(void *ptr, unsigned int size);
+static inline void *__realloc__A0_1_0_0__FPd0_Pd0Ui__1(__attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT, void *__ptr__P2tT_1, unsigned int __size__Ui_1){
+    __attribute__ ((unused)) void *___retval_realloc__P2tT_1;
+    void *_tmp_cp_ret8;
+    ((void)(___retval_realloc__P2tT_1=((void *)((void *)(((void)(_tmp_cp_ret8=realloc(((void *)__ptr__P2tT_1), __size__Ui_1))) , _tmp_cp_ret8)))) /* ?{} */);
+    ((void)(_tmp_cp_ret8) /* ^?{} */);
+    return ((void *)___retval_realloc__P2tT_1);
+}
+void *memalign(unsigned int align, unsigned int size);
+static inline void *__memalign__A0_1_0_0__FPd0_Ui__1(__attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT, unsigned int __align__Ui_1){
+    __attribute__ ((unused)) void *___retval_memalign__P2tT_1;
+    void *_tmp_cp_ret9;
+    ((void)(___retval_memalign__P2tT_1=((void *)(((void)(_tmp_cp_ret9=memalign(__align__Ui_1, ((unsigned int )_sizeof_2tT)))) , _tmp_cp_ret9))) /* ?{} */);
+    ((void)(_tmp_cp_ret9) /* ^?{} */);
+    return ((void *)___retval_memalign__P2tT_1);
+}
+static inline void *__aligned_alloc__A0_1_0_0__FPd0_Ui__1(__attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT, unsigned int __align__Ui_1){
+    __attribute__ ((unused)) void *___retval_aligned_alloc__P2tT_1;
+    void *_tmp_cp_ret10;
+    ((void)(___retval_aligned_alloc__P2tT_1=((void *)(((void)(_tmp_cp_ret10=memalign(__align__Ui_1, ((unsigned int )_sizeof_2tT)))) , _tmp_cp_ret10))) /* ?{} */);
+    ((void)(_tmp_cp_ret10) /* ^?{} */);
+    return ((void *)___retval_aligned_alloc__P2tT_1);
+}
+signed int posix_memalign(void **ptr, unsigned int align, unsigned int size);
+static inline signed int __posix_memalign__A0_1_0_0__Fi_PPd0Ui__1(__attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT, void **__ptr__PP2tT_1, unsigned int __align__Ui_1){
+    __attribute__ ((unused)) signed int ___retval_posix_memalign__i_1;
+    signed int _tmp_cp_ret11;
+    ((void)(___retval_posix_memalign__i_1=(((void)(_tmp_cp_ret11=posix_memalign(((void **)__ptr__PP2tT_1), __align__Ui_1, ((unsigned int )_sizeof_2tT)))) , _tmp_cp_ret11)) /* ?{} */);
+    ((void)(_tmp_cp_ret11) /* ^?{} */);
+    return ((signed int )___retval_posix_memalign__i_1);
+}
+void *memset(void *dest, signed int c, unsigned int size);
+static inline void *__alloc__A0_1_0_0__FPd0___1(__attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT){
+    __attribute__ ((unused)) void *___retval_alloc__P2tT_1;
+    void *_tmp_cp_ret12;
+    ((void)(___retval_alloc__P2tT_1=((void *)((void *)(((void)(_tmp_cp_ret12=malloc(((unsigned int )_sizeof_2tT)))) , _tmp_cp_ret12)))) /* ?{} */);
+    ((void)(_tmp_cp_ret12) /* ^?{} */);
+    return ((void *)___retval_alloc__P2tT_1);
+}
+static inline void *__alloc__A0_1_0_0__FPd0_c__1(__attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT, char __fill__c_1){
+    __attribute__ ((unused)) void *___retval_alloc__P2tT_1;
+    void *_tmp_cp_ret13;
+    void *__ptr__P2tT_2 = ((void *)((void *)((void *)(((void)(_tmp_cp_ret13=malloc(((unsigned int )_sizeof_2tT)))) , _tmp_cp_ret13))));
+    ((void)(_tmp_cp_ret13) /* ^?{} */);
+    void *_tmp_cp_ret14;
+    ((void)(___retval_alloc__P2tT_1=(((void)(_tmp_cp_ret14=memset(((void *)__ptr__P2tT_2), ((signed int )__fill__c_1), ((unsigned int )_sizeof_2tT)))) , _tmp_cp_ret14)) /* ?{} */);
+    ((void)(_tmp_cp_ret14) /* ^?{} */);
+    return ((void *)___retval_alloc__P2tT_1);
+}
+static inline void *__alloc__A0_1_0_0__FPd0_Ui__1(__attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT, unsigned int __dim__Ui_1){
+    __attribute__ ((unused)) void *___retval_alloc__P2tT_1;
+    void *_tmp_cp_ret15;
+    ((void)(___retval_alloc__P2tT_1=((void *)((void *)(((void)(_tmp_cp_ret15=malloc((__dim__Ui_1*((unsigned int )_sizeof_2tT))))) , _tmp_cp_ret15)))) /* ?{} */);
+    ((void)(_tmp_cp_ret15) /* ^?{} */);
+    return ((void *)___retval_alloc__P2tT_1);
+}
+static inline void *__alloc__A0_1_0_0__FPd0_Uic__1(__attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT, unsigned int __dim__Ui_1, char __fill__c_1){
+    __attribute__ ((unused)) void *___retval_alloc__P2tT_1;
+    void *_tmp_cp_ret16;
+    void *__ptr__P2tT_2 = ((void *)((void *)((void *)(((void)(_tmp_cp_ret16=malloc((__dim__Ui_1*((unsigned int )_sizeof_2tT))))) , _tmp_cp_ret16))));
+    ((void)(_tmp_cp_ret16) /* ^?{} */);
+    void *_tmp_cp_ret17;
+    ((void)(___retval_alloc__P2tT_1=(((void)(_tmp_cp_ret17=memset(((void *)__ptr__P2tT_2), ((signed int )__fill__c_1), ((unsigned int )(((unsigned long int )__dim__Ui_1)*_sizeof_2tT))))) , _tmp_cp_ret17)) /* ?{} */);
+    ((void)(_tmp_cp_ret17) /* ^?{} */);
+    return ((void *)___retval_alloc__P2tT_1);
+}
+static inline void *__alloc__A0_1_0_0__FPd0_Pd0Ui__1(__attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT, void *__ptr__P2tT_1, unsigned int __dim__Ui_1){
+    __attribute__ ((unused)) void *___retval_alloc__P2tT_1;
+    void *_tmp_cp_ret18;
+    ((void)(___retval_alloc__P2tT_1=((void *)(((void)(_tmp_cp_ret18=realloc(((void *)__ptr__P2tT_1), (__dim__Ui_1*((unsigned int )_sizeof_2tT))))) , _tmp_cp_ret18))) /* ?{} */);
+    ((void)(_tmp_cp_ret18) /* ^?{} */);
+    return ((void *)___retval_alloc__P2tT_1);
+}
+void *__alloc__A0_1_0_0__FPd0_Pd0Uic__1(__attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT, void *__ptr__P2tT_1, unsigned int __dim__Ui_1, char __fill__c_1);
+static inline void *__align_alloc__A0_1_0_0__FPd0_Ui__1(__attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT, unsigned int __align__Ui_1){
+    __attribute__ ((unused)) void *___retval_align_alloc__P2tT_1;
+    void *_tmp_cp_ret19;
+    ((void)(___retval_align_alloc__P2tT_1=((void *)(((void)(_tmp_cp_ret19=memalign(__align__Ui_1, ((unsigned int )_sizeof_2tT)))) , _tmp_cp_ret19))) /* ?{} */);
+    ((void)(_tmp_cp_ret19) /* ^?{} */);
+    return ((void *)___retval_align_alloc__P2tT_1);
+}
+static inline void *__align_alloc__A0_1_0_0__FPd0_Uic__1(__attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT, unsigned int __align__Ui_1, char __fill__c_1){
+    __attribute__ ((unused)) void *___retval_align_alloc__P2tT_1;
+    void *_tmp_cp_ret20;
+    void *__ptr__P2tT_2 = ((void *)((void *)(((void)(_tmp_cp_ret20=memalign(__align__Ui_1, ((unsigned int )_sizeof_2tT)))) , _tmp_cp_ret20)));
+    ((void)(_tmp_cp_ret20) /* ^?{} */);
+    void *_tmp_cp_ret21;
+    ((void)(___retval_align_alloc__P2tT_1=(((void)(_tmp_cp_ret21=memset(((void *)__ptr__P2tT_2), ((signed int )__fill__c_1), ((unsigned int )_sizeof_2tT)))) , _tmp_cp_ret21)) /* ?{} */);
+    ((void)(_tmp_cp_ret21) /* ^?{} */);
+    return ((void *)___retval_align_alloc__P2tT_1);
+}
+static inline void *__align_alloc__A0_1_0_0__FPd0_UiUi__1(__attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT, unsigned int __align__Ui_1, unsigned int __dim__Ui_1){
+    __attribute__ ((unused)) void *___retval_align_alloc__P2tT_1;
+    void *_tmp_cp_ret22;
+    ((void)(___retval_align_alloc__P2tT_1=((void *)(((void)(_tmp_cp_ret22=memalign(__align__Ui_1, ((unsigned int )(((unsigned long int )__dim__Ui_1)*_sizeof_2tT))))) , _tmp_cp_ret22))) /* ?{} */);
+    ((void)(_tmp_cp_ret22) /* ^?{} */);
+    return ((void *)___retval_align_alloc__P2tT_1);
+}
+static inline void *__align_alloc__A0_1_0_0__FPd0_UiUic__1(__attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT, unsigned int __align__Ui_1, unsigned int __dim__Ui_1, char __fill__c_1){
+    __attribute__ ((unused)) void *___retval_align_alloc__P2tT_1;
+    void *_tmp_cp_ret23;
+    void *__ptr__P2tT_2 = ((void *)((void *)(((void)(_tmp_cp_ret23=memalign(__align__Ui_1, ((unsigned int )(((unsigned long int )__dim__Ui_1)*_sizeof_2tT))))) , _tmp_cp_ret23)));
+    ((void)(_tmp_cp_ret23) /* ^?{} */);
+    void *_tmp_cp_ret24;
+    ((void)(___retval_align_alloc__P2tT_1=(((void)(_tmp_cp_ret24=memset(((void *)__ptr__P2tT_2), ((signed int )__fill__c_1), ((unsigned int )(((unsigned long int )__dim__Ui_1)*_sizeof_2tT))))) , _tmp_cp_ret24)) /* ?{} */);
+    ((void)(_tmp_cp_ret24) /* ^?{} */);
+    return ((void *)___retval_align_alloc__P2tT_1);
+}
+static inline void *__memset__A0_1_0_0__FPd0_Pd0c__1(__attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT, void *__dest__P2tT_1, char __c__c_1){
+    __attribute__ ((unused)) void *___retval_memset__P2tT_1;
+    void *_tmp_cp_ret25;
+    ((void)(___retval_memset__P2tT_1=(((void)(_tmp_cp_ret25=memset(((void *)__dest__P2tT_1), ((signed int )__c__c_1), ((unsigned int )_sizeof_2tT)))) , _tmp_cp_ret25)) /* ?{} */);
+    ((void)(_tmp_cp_ret25) /* ^?{} */);
+    return ((void *)___retval_memset__P2tT_1);
+}
+void *memcpy(void *dest, const void *src, unsigned int size);
+static inline void *__memcpy__A0_1_0_0__FPd0_Pd0PCd0__1(__attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT, void *__dest__P2tT_1, const void *__src__PC2tT_1){
+    __attribute__ ((unused)) void *___retval_memcpy__P2tT_1;
+    void *_tmp_cp_ret26;
+    ((void)(___retval_memcpy__P2tT_1=(((void)(_tmp_cp_ret26=memcpy(((void *)__dest__P2tT_1), ((const void *)__src__PC2tT_1), ((unsigned int )_sizeof_2tT)))) , _tmp_cp_ret26)) /* ?{} */);
+    ((void)(_tmp_cp_ret26) /* ^?{} */);
+    return ((void *)___retval_memcpy__P2tT_1);
+}
+static inline void *__memset__A0_1_0_0__FPd0_Pd0Uic__1(__attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT, void *__dest__P2tT_1, unsigned int __dim__Ui_1, char __c__c_1){
+    __attribute__ ((unused)) void *___retval_memset__P2tT_1;
+    void *_tmp_cp_ret27;
+    ((void)(___retval_memset__P2tT_1=((void *)(((void)(_tmp_cp_ret27=memset(((void *)__dest__P2tT_1), ((signed int )__c__c_1), ((unsigned int )(((unsigned long int )__dim__Ui_1)*_sizeof_2tT))))) , _tmp_cp_ret27))) /* ?{} */);
+    ((void)(_tmp_cp_ret27) /* ^?{} */);
+    return ((void *)___retval_memset__P2tT_1);
+}
+static inline void *__memcpy__A0_1_0_0__FPd0_Pd0PCd0Ui__1(__attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT, void *__dest__P2tT_1, const void *__src__PC2tT_1, unsigned int __dim__Ui_1){
+    __attribute__ ((unused)) void *___retval_memcpy__P2tT_1;
+    void *_tmp_cp_ret28;
+    ((void)(___retval_memcpy__P2tT_1=((void *)(((void)(_tmp_cp_ret28=memcpy(((void *)__dest__P2tT_1), ((const void *)__src__PC2tT_1), ((unsigned int )(((unsigned long int )__dim__Ui_1)*_sizeof_2tT))))) , _tmp_cp_ret28))) /* ?{} */);
+    ((void)(_tmp_cp_ret28) /* ^?{} */);
+    return ((void *)___retval_memcpy__P2tT_1);
+}
+void *__new__A0_1_0_1____constructor__PF_Rd0tVARGS1__FPd0_tVARGS1__1(__attribute__ ((unused)) void (*_adapterF_P2tT7tParams__MP)(void (*__anonymous_object10)(), void *__anonymous_object11, void *__anonymous_object12), __attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT, __attribute__ ((unused)) unsigned long int _sizeof_7tParams, __attribute__ ((unused)) unsigned long int _alignof_7tParams, __attribute__ ((unused)) void (*___constructor__PF_R2tT7tParams__1)(void *__anonymous_object13, void *__anonymous_object14), void *__p__7tParams_1);
+void __delete__A0_1_0_0____destructor__PF_Rd0__F_Pd0__1(__attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT, __attribute__ ((unused)) void (*___destructor__PF_R2tT__1)(void *__anonymous_object15), void *__ptr__P2tT_1);
+void __delete__A0_1_0_1____destructor__PF_Rd0___delete__PF_tVARGS1__F_Pd0tVARGS1__1(__attribute__ ((unused)) void (*_adapterF_7tParams__P)(void (*__anonymous_object16)(), void *__anonymous_object17), __attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT, __attribute__ ((unused)) unsigned long int _sizeof_7tParams, __attribute__ ((unused)) unsigned long int _alignof_7tParams, __attribute__ ((unused)) void (*___destructor__PF_R2tT__1)(void *__anonymous_object18), __attribute__ ((unused)) void (*__delete__PF_7tParams__1)(void *__anonymous_object19), void *__ptr__P2tT_1, void *__rest__7tParams_1);
+void *__anew__A0_1_0_1____constructor__PF_Rd0tVARGS1__FPd0_UitVARGS1__1(__attribute__ ((unused)) void (*_adapterF_P2tT7tParams__MP)(void (*__anonymous_object20)(), void *__anonymous_object21, void *__anonymous_object22), __attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT, __attribute__ ((unused)) unsigned long int _sizeof_7tParams, __attribute__ ((unused)) unsigned long int _alignof_7tParams, __attribute__ ((unused)) void (*___constructor__PF_R2tT7tParams__1)(void *__anonymous_object23, void *__anonymous_object24), unsigned int __dim__Ui_1, void *__p__7tParams_1);
+void __adelete__A0_1_0_0____destructor__PF_Rd0__F_UiPd0__1(__attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT, __attribute__ ((unused)) void (*___destructor__PF_R2tT__1)(void *__anonymous_object25), unsigned int __dim__Ui_1, void *__arr__P2tT_1);
+void __adelete__A0_1_0_1____destructor__PF_Rd0___adelete__PF_tVARGS1__F_UiPd0tVARGS1__1(__attribute__ ((unused)) void (*_adapterF_7tParams__P)(void (*__anonymous_object26)(), void *__anonymous_object27), __attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT, __attribute__ ((unused)) unsigned long int _sizeof_7tParams, __attribute__ ((unused)) unsigned long int _alignof_7tParams, __attribute__ ((unused)) void (*___destructor__PF_R2tT__1)(void *__anonymous_object28), __attribute__ ((unused)) void (*__adelete__PF_7tParams__1)(void *__anonymous_object29), unsigned int __dim__Ui_1, void *__arr__P2tT_1, void *__rest__7tParams_1);
+signed int __ato__Fi_PCc__1(const char *__ptr__PCc_1);
+unsigned int __ato__FUi_PCc__1(const char *__ptr__PCc_1);
+signed long int __ato__Fl_PCc__1(const char *__ptr__PCc_1);
+unsigned long int __ato__FUl_PCc__1(const char *__ptr__PCc_1);
+signed long long int __ato__Fq_PCc__1(const char *__ptr__PCc_1);
+unsigned long long int __ato__FUq_PCc__1(const char *__ptr__PCc_1);
+float __ato__Ff_PCc__1(const char *__ptr__PCc_1);
+double __ato__Fd_PCc__1(const char *__ptr__PCc_1);
+long double __ato__Fr_PCc__1(const char *__ptr__PCc_1);
+float _Complex __ato__FXf_PCc__1(const char *__ptr__PCc_1);
+double _Complex __ato__FXd_PCc__1(const char *__ptr__PCc_1);
+long double _Complex __ato__FXr_PCc__1(const char *__ptr__PCc_1);
+signed int __strto__Fi_PCcPPci__1(const char *__sptr__PCc_1, char **__eptr__PPc_1, signed int __base__i_1);
+unsigned int __strto__FUi_PCcPPci__1(const char *__sptr__PCc_1, char **__eptr__PPc_1, signed int __base__i_1);
+signed long int __strto__Fl_PCcPPci__1(const char *__sptr__PCc_1, char **__eptr__PPc_1, signed int __base__i_1);
+unsigned long int __strto__FUl_PCcPPci__1(const char *__sptr__PCc_1, char **__eptr__PPc_1, signed int __base__i_1);
+signed long long int __strto__Fq_PCcPPci__1(const char *__sptr__PCc_1, char **__eptr__PPc_1, signed int __base__i_1);
+unsigned long long int __strto__FUq_PCcPPci__1(const char *__sptr__PCc_1, char **__eptr__PPc_1, signed int __base__i_1);
+float __strto__Ff_PCcPPc__1(const char *__sptr__PCc_1, char **__eptr__PPc_1);
+double __strto__Fd_PCcPPc__1(const char *__sptr__PCc_1, char **__eptr__PPc_1);
+long double __strto__Fr_PCcPPc__1(const char *__sptr__PCc_1, char **__eptr__PPc_1);
+float _Complex __strto__FXf_PCcPPc__1(const char *__sptr__PCc_1, char **__eptr__PPc_1);
+double _Complex __strto__FXd_PCcPPc__1(const char *__sptr__PCc_1, char **__eptr__PPc_1);
+long double _Complex __strto__FXr_PCcPPc__1(const char *__sptr__PCc_1, char **__eptr__PPc_1);
+void *__bsearch__A1_0_0_0____operator_assign__PFt0_Rt0t0____constructor__PF_Rt0____constructor__PF_Rt0t0____destructor__PF_Rt0____operator_less__PFi_t0t0__FPt0_t0PCt0Ui__1(__attribute__ ((unused)) signed int (*_adapterFi_2tT2tT_M_PP)(void (*__anonymous_object30)(), void *__anonymous_object31, void *__anonymous_object32), __attribute__ ((unused)) void (*_adapterF_P2tT2tT__MP)(void (*__anonymous_object33)(), void *__anonymous_object34, void *__anonymous_object35), __attribute__ ((unused)) void (*_adapterF2tT_P2tT2tT_P_MP)(void (*__anonymous_object36)(), __attribute__ ((unused)) void *___retval__operator_assign__2tT_1, void *__anonymous_object37, void *__anonymous_object38), __attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT, __attribute__ ((unused)) void *(*___operator_assign__PF2tT_R2tT2tT__1)(void *__anonymous_object39, void *__anonymous_object40), __attribute__ ((unused)) void (*___constructor__PF_R2tT__1)(void *__anonymous_object41), __attribute__ ((unused)) void (*___constructor__PF_R2tT2tT__1)(void *__anonymous_object42, void *__anonymous_object43), __attribute__ ((unused)) void (*___destructor__PF_R2tT__1)(void *__anonymous_object44), __attribute__ ((unused)) signed int (*___operator_less__PFi_2tT2tT__1)(void *__anonymous_object45, void *__anonymous_object46), void *__key__2tT_1, const void *__arr__PC2tT_1, unsigned int __dim__Ui_1);
+unsigned int __bsearch__A1_0_0_0____operator_assign__PFt0_Rt0t0____constructor__PF_Rt0____constructor__PF_Rt0t0____destructor__PF_Rt0____operator_less__PFi_t0t0__FUi_t0PCt0Ui__1(__attribute__ ((unused)) signed int (*_adapterFi_2tT2tT_M_PP)(void (*__anonymous_object47)(), void *__anonymous_object48, void *__anonymous_object49), __attribute__ ((unused)) void (*_adapterF_P2tT2tT__MP)(void (*__anonymous_object50)(), void *__anonymous_object51, void *__anonymous_object52), __attribute__ ((unused)) void (*_adapterF2tT_P2tT2tT_P_MP)(void (*__anonymous_object53)(), __attribute__ ((unused)) void *___retval__operator_assign__2tT_1, void *__anonymous_object54, void *__anonymous_object55), __attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT, __attribute__ ((unused)) void *(*___operator_assign__PF2tT_R2tT2tT__1)(void *__anonymous_object56, void *__anonymous_object57), __attribute__ ((unused)) void (*___constructor__PF_R2tT__1)(void *__anonymous_object58), __attribute__ ((unused)) void (*___constructor__PF_R2tT2tT__1)(void *__anonymous_object59, void *__anonymous_object60), __attribute__ ((unused)) void (*___destructor__PF_R2tT__1)(void *__anonymous_object61), __attribute__ ((unused)) signed int (*___operator_less__PFi_2tT2tT__1)(void *__anonymous_object62, void *__anonymous_object63), void *__key__2tT_1, const void *__arr__PC2tT_1, unsigned int __dim__Ui_1);
+void __qsort__A1_0_0_0____operator_assign__PFt0_Rt0t0____constructor__PF_Rt0____constructor__PF_Rt0t0____destructor__PF_Rt0____operator_less__PFi_t0t0__F_PCt0Ui__1(__attribute__ ((unused)) signed int (*_adapterFi_2tT2tT_M_PP)(void (*__anonymous_object64)(), void *__anonymous_object65, void *__anonymous_object66), __attribute__ ((unused)) void (*_adapterF_P2tT2tT__MP)(void (*__anonymous_object67)(), void *__anonymous_object68, void *__anonymous_object69), __attribute__ ((unused)) void (*_adapterF2tT_P2tT2tT_P_MP)(void (*__anonymous_object70)(), __attribute__ ((unused)) void *___retval__operator_assign__2tT_1, void *__anonymous_object71, void *__anonymous_object72), __attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT, __attribute__ ((unused)) void *(*___operator_assign__PF2tT_R2tT2tT__1)(void *__anonymous_object73, void *__anonymous_object74), __attribute__ ((unused)) void (*___constructor__PF_R2tT__1)(void *__anonymous_object75), __attribute__ ((unused)) void (*___constructor__PF_R2tT2tT__1)(void *__anonymous_object76, void *__anonymous_object77), __attribute__ ((unused)) void (*___destructor__PF_R2tT__1)(void *__anonymous_object78), __attribute__ ((unused)) signed int (*___operator_less__PFi_2tT2tT__1)(void *__anonymous_object79, void *__anonymous_object80), const void *__arr__PC2tT_1, unsigned int __dim__Ui_1);
+struct _tuple2_ {
+};
+static inline void _layoutof__tuple2_(unsigned long int *_sizeof__tuple2_, unsigned long int *_alignof__tuple2_, unsigned long int *_offsetof__tuple2_, unsigned long int _sizeof_16ttuple_param_2_0, unsigned long int _alignof_16ttuple_param_2_0, unsigned long int _sizeof_16ttuple_param_2_1, unsigned long int _alignof_16ttuple_param_2_1){
+    ((void)((*_sizeof__tuple2_)=0));
+    ((void)((*_alignof__tuple2_)=1));
+    ((void)(_offsetof__tuple2_[0]=(*_sizeof__tuple2_)));
+    ((void)((*_sizeof__tuple2_)+=_sizeof_16ttuple_param_2_0));
+    if ( ((*_alignof__tuple2_)<_alignof_16ttuple_param_2_0) ) ((void)((*_alignof__tuple2_)=_alignof_16ttuple_param_2_0));
+
+    if ( ((*_sizeof__tuple2_)&(_alignof_16ttuple_param_2_1-1)) ) ((void)((*_sizeof__tuple2_)+=(_alignof_16ttuple_param_2_1-((*_sizeof__tuple2_)&(_alignof_16ttuple_param_2_1-1)))));
+
+    ((void)(_offsetof__tuple2_[1]=(*_sizeof__tuple2_)));
+    ((void)((*_sizeof__tuple2_)+=_sizeof_16ttuple_param_2_1));
+    if ( ((*_alignof__tuple2_)<_alignof_16ttuple_param_2_1) ) ((void)((*_alignof__tuple2_)=_alignof_16ttuple_param_2_1));
+
+    if ( ((*_sizeof__tuple2_)&((*_alignof__tuple2_)-1)) ) ((void)((*_sizeof__tuple2_)+=((*_alignof__tuple2_)-((*_sizeof__tuple2_)&((*_alignof__tuple2_)-1)))));
+
+}
+struct _conc__tuple2_0 {
+    signed int field_0;
+    signed int field_1;
+};
+struct _conc__tuple2_0 __div__FTii__ii__1(signed int __num__i_1, signed int __denom__i_1);
+struct _conc__tuple2_1 {
+    signed long int field_0;
+    signed long int field_1;
+};
+struct _conc__tuple2_1 __div__FTll__ll__1(signed long int __num__l_1, signed long int __denom__l_1);
+struct _conc__tuple2_2 {
+    signed long long int field_0;
+    signed long long int field_1;
+};
+struct _conc__tuple2_2 __div__FTqq__qq__1(signed long long int __num__q_1, signed long long int __denom__q_1);
+void __div__A1_0_0_0____operator_assign__PFt0_Rt0t0____constructor__PF_Rt0____constructor__PF_Rt0t0____destructor__PF_Rt0____operator_divide__PFt0_t0t0____operator_modulus__PFt0_t0t0__FTt0t0__t0t0__1(__attribute__ ((unused)) void (*_adapterF2tT_2tT2tT_P_PP)(void (*__anonymous_object81)(), __attribute__ ((unused)) void *___retval__operator_divide__2tT_1, void *__anonymous_object82, void *__anonymous_object83), __attribute__ ((unused)) void (*_adapterF_P2tT2tT__MP)(void (*__anonymous_object84)(), void *__anonymous_object85, void *__anonymous_object86), __attribute__ ((unused)) void (*_adapterF2tT_P2tT2tT_P_MP)(void (*__anonymous_object87)(), __attribute__ ((unused)) void *___retval__operator_assign__2tT_1, void *__anonymous_object88, void *__anonymous_object89), __attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT, __attribute__ ((unused)) void *(*___operator_assign__PF2tT_R2tT2tT__1)(void *__anonymous_object90, void *__anonymous_object91), __attribute__ ((unused)) void (*___constructor__PF_R2tT__1)(void *__anonymous_object92), __attribute__ ((unused)) void (*___constructor__PF_R2tT2tT__1)(void *__anonymous_object93, void *__anonymous_object94), __attribute__ ((unused)) void (*___destructor__PF_R2tT__1)(void *__anonymous_object95), __attribute__ ((unused)) void *(*___operator_divide__PF2tT_2tT2tT__1)(void *__anonymous_object96, void *__anonymous_object97), __attribute__ ((unused)) void *(*___operator_modulus__PF2tT_2tT2tT__1)(void *__anonymous_object98, void *__anonymous_object99), __attribute__ ((unused)) void *___retval_div__T2tT2tT__1, void *__num__2tT_1, void *__demon__2tT_1);
+unsigned char __abs__FUc_Sc__1(signed char __anonymous_object100);
+signed int abs(signed int __anonymous_object101);
+unsigned long int __abs__FUl_l__1(signed long int __anonymous_object102);
+unsigned long long int __abs__FUq_q__1(signed long long int __anonymous_object103);
+float __abs__Ff_f__1(float __anonymous_object104);
+double __abs__Fd_d__1(double __anonymous_object105);
+long double __abs__Fr_r__1(long double __anonymous_object106);
+float __abs__Ff_Xf__1(float _Complex __anonymous_object107);
+double __abs__Fd_Xd__1(double _Complex __anonymous_object108);
+long double __abs__Fr_Xr__1(long double _Complex __anonymous_object109);
+void __abs__A1_0_0_0____operator_assign__PFt0_Rt0t0____constructor__PF_Rt0____constructor__PF_Rt0t0____destructor__PF_Rt0____constructor__PF_Rt0Z____operator_less__PFi_t0t0____operator_unaryminus__PFt0_t0__Ft0_t0__1(__attribute__ ((unused)) void (*_adapterF2tT_2tT_P_P)(void (*__anonymous_object110)(), __attribute__ ((unused)) void *___retval__operator_unaryminus__2tT_1, void *__anonymous_object111), __attribute__ ((unused)) signed int (*_adapterFi_2tT2tT_M_PP)(void (*__anonymous_object112)(), void *__anonymous_object113, void *__anonymous_object114), __attribute__ ((unused)) void (*_adapterF_P2tT2tT__MP)(void (*__anonymous_object115)(), void *__anonymous_object116, void *__anonymous_object117), __attribute__ ((unused)) void (*_adapterF2tT_P2tT2tT_P_MP)(void (*__anonymous_object118)(), __attribute__ ((unused)) void *___retval__operator_assign__2tT_1, void *__anonymous_object119, void *__anonymous_object120), __attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT, __attribute__ ((unused)) void *(*___operator_assign__PF2tT_R2tT2tT__1)(void *__anonymous_object121, void *__anonymous_object122), __attribute__ ((unused)) void (*___constructor__PF_R2tT__1)(void *__anonymous_object123), __attribute__ ((unused)) void (*___constructor__PF_R2tT2tT__1)(void *__anonymous_object124, void *__anonymous_object125), __attribute__ ((unused)) void (*___destructor__PF_R2tT__1)(void *__anonymous_object126), __attribute__ ((unused)) void (*___constructor__PF_R2tTZ__1)(void *__anonymous_object127, long int __anonymous_object128), __attribute__ ((unused)) signed int (*___operator_less__PFi_2tT2tT__1)(void *__anonymous_object129, void *__anonymous_object130), __attribute__ ((unused)) void *(*___operator_unaryminus__PF2tT_2tT__1)(void *__anonymous_object131), __attribute__ ((unused)) void *___retval_abs__2tT_1, void *__anonymous_object132);
+void __rand48seed__F_l__1(signed long int __s__l_1);
+char __rand48__Fc___1(void);
+signed int __rand48__Fi___1(void);
+unsigned int __rand48__FUi___1(void);
+signed long int __rand48__Fl___1(void);
+unsigned long int __rand48__FUl___1(void);
+float __rand48__Ff___1(void);
+double __rand48__Fd___1(void);
+float _Complex __rand48__FXf___1(void);
+double _Complex __rand48__FXd___1(void);
+long double _Complex __rand48__FXr___1(void);
+void __min__A1_0_0_0____operator_assign__PFt0_Rt0t0____constructor__PF_Rt0____constructor__PF_Rt0t0____destructor__PF_Rt0____operator_less__PFi_t0t0__Ft0_t0t0__1(__attribute__ ((unused)) signed int (*_adapterFi_2tT2tT_M_PP)(void (*__anonymous_object133)(), void *__anonymous_object134, void *__anonymous_object135), __attribute__ ((unused)) void (*_adapterF_P2tT2tT__MP)(void (*__anonymous_object136)(), void *__anonymous_object137, void *__anonymous_object138), __attribute__ ((unused)) void (*_adapterF2tT_P2tT2tT_P_MP)(void (*__anonymous_object139)(), __attribute__ ((unused)) void *___retval__operator_assign__2tT_1, void *__anonymous_object140, void *__anonymous_object141), __attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT, __attribute__ ((unused)) void *(*___operator_assign__PF2tT_R2tT2tT__1)(void *__anonymous_object142, void *__anonymous_object143), __attribute__ ((unused)) void (*___constructor__PF_R2tT__1)(void *__anonymous_object144), __attribute__ ((unused)) void (*___constructor__PF_R2tT2tT__1)(void *__anonymous_object145, void *__anonymous_object146), __attribute__ ((unused)) void (*___destructor__PF_R2tT__1)(void *__anonymous_object147), __attribute__ ((unused)) signed int (*___operator_less__PFi_2tT2tT__1)(void *__anonymous_object148, void *__anonymous_object149), __attribute__ ((unused)) void *___retval_min__2tT_1, void *__t1__2tT_1, void *__t2__2tT_1);
+void __max__A1_0_0_0____operator_assign__PFt0_Rt0t0____constructor__PF_Rt0____constructor__PF_Rt0t0____destructor__PF_Rt0____operator_greater__PFi_t0t0__Ft0_t0t0__1(__attribute__ ((unused)) signed int (*_adapterFi_2tT2tT_M_PP)(void (*__anonymous_object150)(), void *__anonymous_object151, void *__anonymous_object152), __attribute__ ((unused)) void (*_adapterF_P2tT2tT__MP)(void (*__anonymous_object153)(), void *__anonymous_object154, void *__anonymous_object155), __attribute__ ((unused)) void (*_adapterF2tT_P2tT2tT_P_MP)(void (*__anonymous_object156)(), __attribute__ ((unused)) void *___retval__operator_assign__2tT_1, void *__anonymous_object157, void *__anonymous_object158), __attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT, __attribute__ ((unused)) void *(*___operator_assign__PF2tT_R2tT2tT__1)(void *__anonymous_object159, void *__anonymous_object160), __attribute__ ((unused)) void (*___constructor__PF_R2tT__1)(void *__anonymous_object161), __attribute__ ((unused)) void (*___constructor__PF_R2tT2tT__1)(void *__anonymous_object162, void *__anonymous_object163), __attribute__ ((unused)) void (*___destructor__PF_R2tT__1)(void *__anonymous_object164), __attribute__ ((unused)) signed int (*___operator_greater__PFi_2tT2tT__1)(void *__anonymous_object165, void *__anonymous_object166), __attribute__ ((unused)) void *___retval_max__2tT_1, void *__t1__2tT_1, void *__t2__2tT_1);
+void __clamp__A1_0_0_0____operator_assign__PFt0_Rt0t0____constructor__PF_Rt0____constructor__PF_Rt0t0____destructor__PF_Rt0___min__PFt0_t0t0___max__PFt0_t0t0__Ft0_t0t0t0__1(__attribute__ ((unused)) void (*_adapterF2tT_2tT2tT_P_PP)(void (*__anonymous_object167)(), __attribute__ ((unused)) void *___retval_min__2tT_1, void *__anonymous_object168, void *__anonymous_object169), __attribute__ ((unused)) void (*_adapterF_P2tT2tT__MP)(void (*__anonymous_object170)(), void *__anonymous_object171, void *__anonymous_object172), __attribute__ ((unused)) void (*_adapterF2tT_P2tT2tT_P_MP)(void (*__anonymous_object173)(), __attribute__ ((unused)) void *___retval__operator_assign__2tT_1, void *__anonymous_object174, void *__anonymous_object175), __attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT, __attribute__ ((unused)) void *(*___operator_assign__PF2tT_R2tT2tT__1)(void *__anonymous_object176, void *__anonymous_object177), __attribute__ ((unused)) void (*___constructor__PF_R2tT__1)(void *__anonymous_object178), __attribute__ ((unused)) void (*___constructor__PF_R2tT2tT__1)(void *__anonymous_object179, void *__anonymous_object180), __attribute__ ((unused)) void (*___destructor__PF_R2tT__1)(void *__anonymous_object181), __attribute__ ((unused)) void *(*__min__PF2tT_2tT2tT__1)(void *__anonymous_object182, void *__anonymous_object183), __attribute__ ((unused)) void *(*__max__PF2tT_2tT2tT__1)(void *__anonymous_object184, void *__anonymous_object185), __attribute__ ((unused)) void *___retval_clamp__2tT_1, void *__value__2tT_1, void *__min_val__2tT_1, void *__max_val__2tT_1);
+void __swap__A1_0_0_0____operator_assign__PFt0_Rt0t0____constructor__PF_Rt0____constructor__PF_Rt0t0____destructor__PF_Rt0__F_Rt0Rt0__1(__attribute__ ((unused)) void (*_adapterF_P2tT2tT__MP)(void (*__anonymous_object186)(), void *__anonymous_object187, void *__anonymous_object188), __attribute__ ((unused)) void (*_adapterF2tT_P2tT2tT_P_MP)(void (*__anonymous_object189)(), __attribute__ ((unused)) void *___retval__operator_assign__2tT_1, void *__anonymous_object190, void *__anonymous_object191), __attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT, __attribute__ ((unused)) void *(*___operator_assign__PF2tT_R2tT2tT__1)(void *__anonymous_object192, void *__anonymous_object193), __attribute__ ((unused)) void (*___constructor__PF_R2tT__1)(void *__anonymous_object194), __attribute__ ((unused)) void (*___constructor__PF_R2tT2tT__1)(void *__anonymous_object195, void *__anonymous_object196), __attribute__ ((unused)) void (*___destructor__PF_R2tT__1)(void *__anonymous_object197), void *__t1__R2tT_1, void *__t2__R2tT_1);
+static inline void ___constructor__F_R13smonitor_desc__1(struct monitor_desc *__this__R13smonitor_desc_1){
+    ((void)((*__this__R13smonitor_desc_1).owner) /* ?{} */);
+    ((void)((*__this__R13smonitor_desc_1).recursion) /* ?{} */);
+    ((void)___constructor__F_R17s__waitfor_mask_t_autogen___1((&(*__this__R13smonitor_desc_1).mask)));
+    struct spinlock *_tmp_ctor_expr0;
+    ((void)(((void)(_tmp_ctor_expr0=(&(*__this__R13smonitor_desc_1).lock))) , (((void)___constructor__F_R9sspinlock__1(_tmp_ctor_expr0)) , _tmp_ctor_expr0)));
+    ((void)((*__this__R13smonitor_desc_1).owner=((void *)0)));
+    struct __thread_queue_t *_tmp_ctor_expr1;
+    ((void)(((void)(_tmp_ctor_expr1=(&(*__this__R13smonitor_desc_1).entry_queue))) , (((void)___constructor__F_R17s__thread_queue_t__1(_tmp_ctor_expr1)) , _tmp_ctor_expr1)));
+    struct __condition_stack_t *_tmp_ctor_expr2;
+    ((void)(((void)(_tmp_ctor_expr2=(&(*__this__R13smonitor_desc_1).signal_stack))) , (((void)___constructor__F_R20s__condition_stack_t__1(_tmp_ctor_expr2)) , _tmp_ctor_expr2)));
+    ((void)((*__this__R13smonitor_desc_1).recursion=((unsigned int )0)));
+    ((void)((*__this__R13smonitor_desc_1).mask.accepted=((void *)0)));
+    ((void)((*__this__R13smonitor_desc_1).mask.clauses=((void *)0)));
+    ((void)((*__this__R13smonitor_desc_1).mask.size=((signed short int )0)));
+}
+struct monitor_guard_t {
+    struct monitor_desc **__m__PP13smonitor_desc_1;
+    signed int __count__i_1;
+    struct monitor_desc **__prev_mntrs__PP13smonitor_desc_1;
+    unsigned short int __prev_count__Us_1;
+    void (*__prev_func__PF___1)();
+};
+static inline void ___constructor__F_R16smonitor_guard_t_autogen___1(struct monitor_guard_t *___dst__R16smonitor_guard_t_1);
+static inline void ___constructor__F_R16smonitor_guard_t16smonitor_guard_t_autogen___1(struct monitor_guard_t *___dst__R16smonitor_guard_t_1, struct monitor_guard_t ___src__16smonitor_guard_t_1);
+static inline void ___destructor__F_R16smonitor_guard_t_autogen___1(struct monitor_guard_t *___dst__R16smonitor_guard_t_1);
+static inline struct monitor_guard_t ___operator_assign__F16smonitor_guard_t_R16smonitor_guard_t16smonitor_guard_t_autogen___1(struct monitor_guard_t *___dst__R16smonitor_guard_t_1, struct monitor_guard_t ___src__16smonitor_guard_t_1);
+static inline void ___constructor__F_R16smonitor_guard_t_autogen___1(struct monitor_guard_t *___dst__R16smonitor_guard_t_1){
+    ((void)((*___dst__R16smonitor_guard_t_1).__m__PP13smonitor_desc_1) /* ?{} */);
+    ((void)((*___dst__R16smonitor_guard_t_1).__count__i_1) /* ?{} */);
+    ((void)((*___dst__R16smonitor_guard_t_1).__prev_mntrs__PP13smonitor_desc_1) /* ?{} */);
+    ((void)((*___dst__R16smonitor_guard_t_1).__prev_count__Us_1) /* ?{} */);
+    ((void)((*___dst__R16smonitor_guard_t_1).__prev_func__PF___1) /* ?{} */);
+}
+static inline void ___constructor__F_R16smonitor_guard_t16smonitor_guard_t_autogen___1(struct monitor_guard_t *___dst__R16smonitor_guard_t_1, struct monitor_guard_t ___src__16smonitor_guard_t_1){
+    ((void)((*___dst__R16smonitor_guard_t_1).__m__PP13smonitor_desc_1=___src__16smonitor_guard_t_1.__m__PP13smonitor_desc_1) /* ?{} */);
+    ((void)((*___dst__R16smonitor_guard_t_1).__count__i_1=___src__16smonitor_guard_t_1.__count__i_1) /* ?{} */);
+    ((void)((*___dst__R16smonitor_guard_t_1).__prev_mntrs__PP13smonitor_desc_1=___src__16smonitor_guard_t_1.__prev_mntrs__PP13smonitor_desc_1) /* ?{} */);
+    ((void)((*___dst__R16smonitor_guard_t_1).__prev_count__Us_1=___src__16smonitor_guard_t_1.__prev_count__Us_1) /* ?{} */);
+    ((void)((*___dst__R16smonitor_guard_t_1).__prev_func__PF___1=___src__16smonitor_guard_t_1.__prev_func__PF___1) /* ?{} */);
+}
+static inline void ___destructor__F_R16smonitor_guard_t_autogen___1(struct monitor_guard_t *___dst__R16smonitor_guard_t_1){
+    ((void)((*___dst__R16smonitor_guard_t_1).__prev_func__PF___1) /* ^?{} */);
+    ((void)((*___dst__R16smonitor_guard_t_1).__prev_count__Us_1) /* ^?{} */);
+    ((void)((*___dst__R16smonitor_guard_t_1).__prev_mntrs__PP13smonitor_desc_1) /* ^?{} */);
+    ((void)((*___dst__R16smonitor_guard_t_1).__count__i_1) /* ^?{} */);
+    ((void)((*___dst__R16smonitor_guard_t_1).__m__PP13smonitor_desc_1) /* ^?{} */);
+}
+static inline struct monitor_guard_t ___operator_assign__F16smonitor_guard_t_R16smonitor_guard_t16smonitor_guard_t_autogen___1(struct monitor_guard_t *___dst__R16smonitor_guard_t_1, struct monitor_guard_t ___src__16smonitor_guard_t_1){
+    struct monitor_guard_t ___ret__16smonitor_guard_t_1;
+    ((void)((*___dst__R16smonitor_guard_t_1).__m__PP13smonitor_desc_1=___src__16smonitor_guard_t_1.__m__PP13smonitor_desc_1));
+    ((void)((*___dst__R16smonitor_guard_t_1).__count__i_1=___src__16smonitor_guard_t_1.__count__i_1));
+    ((void)((*___dst__R16smonitor_guard_t_1).__prev_mntrs__PP13smonitor_desc_1=___src__16smonitor_guard_t_1.__prev_mntrs__PP13smonitor_desc_1));
+    ((void)((*___dst__R16smonitor_guard_t_1).__prev_count__Us_1=___src__16smonitor_guard_t_1.__prev_count__Us_1));
+    ((void)((*___dst__R16smonitor_guard_t_1).__prev_func__PF___1=___src__16smonitor_guard_t_1.__prev_func__PF___1));
+    ((void)___constructor__F_R16smonitor_guard_t16smonitor_guard_t_autogen___1((&___ret__16smonitor_guard_t_1), ___src__16smonitor_guard_t_1));
+    return ((struct monitor_guard_t )___ret__16smonitor_guard_t_1);
+}
+static inline void ___constructor__F_R16smonitor_guard_tPP13smonitor_desc_autogen___1(struct monitor_guard_t *___dst__R16smonitor_guard_t_1, struct monitor_desc **__m__PP13smonitor_desc_1){
+    ((void)((*___dst__R16smonitor_guard_t_1).__m__PP13smonitor_desc_1=__m__PP13smonitor_desc_1) /* ?{} */);
+    ((void)((*___dst__R16smonitor_guard_t_1).__count__i_1) /* ?{} */);
+    ((void)((*___dst__R16smonitor_guard_t_1).__prev_mntrs__PP13smonitor_desc_1) /* ?{} */);
+    ((void)((*___dst__R16smonitor_guard_t_1).__prev_count__Us_1) /* ?{} */);
+    ((void)((*___dst__R16smonitor_guard_t_1).__prev_func__PF___1) /* ?{} */);
+}
+static inline void ___constructor__F_R16smonitor_guard_tPP13smonitor_desci_autogen___1(struct monitor_guard_t *___dst__R16smonitor_guard_t_1, struct monitor_desc **__m__PP13smonitor_desc_1, signed int __count__i_1){
+    ((void)((*___dst__R16smonitor_guard_t_1).__m__PP13smonitor_desc_1=__m__PP13smonitor_desc_1) /* ?{} */);
+    ((void)((*___dst__R16smonitor_guard_t_1).__count__i_1=__count__i_1) /* ?{} */);
+    ((void)((*___dst__R16smonitor_guard_t_1).__prev_mntrs__PP13smonitor_desc_1) /* ?{} */);
+    ((void)((*___dst__R16smonitor_guard_t_1).__prev_count__Us_1) /* ?{} */);
+    ((void)((*___dst__R16smonitor_guard_t_1).__prev_func__PF___1) /* ?{} */);
+}
+static inline void ___constructor__F_R16smonitor_guard_tPP13smonitor_desciPP13smonitor_desc_autogen___1(struct monitor_guard_t *___dst__R16smonitor_guard_t_1, struct monitor_desc **__m__PP13smonitor_desc_1, signed int __count__i_1, struct monitor_desc **__prev_mntrs__PP13smonitor_desc_1){
+    ((void)((*___dst__R16smonitor_guard_t_1).__m__PP13smonitor_desc_1=__m__PP13smonitor_desc_1) /* ?{} */);
+    ((void)((*___dst__R16smonitor_guard_t_1).__count__i_1=__count__i_1) /* ?{} */);
+    ((void)((*___dst__R16smonitor_guard_t_1).__prev_mntrs__PP13smonitor_desc_1=__prev_mntrs__PP13smonitor_desc_1) /* ?{} */);
+    ((void)((*___dst__R16smonitor_guard_t_1).__prev_count__Us_1) /* ?{} */);
+    ((void)((*___dst__R16smonitor_guard_t_1).__prev_func__PF___1) /* ?{} */);
+}
+static inline void ___constructor__F_R16smonitor_guard_tPP13smonitor_desciPP13smonitor_descUs_autogen___1(struct monitor_guard_t *___dst__R16smonitor_guard_t_1, struct monitor_desc **__m__PP13smonitor_desc_1, signed int __count__i_1, struct monitor_desc **__prev_mntrs__PP13smonitor_desc_1, unsigned short int __prev_count__Us_1){
+    ((void)((*___dst__R16smonitor_guard_t_1).__m__PP13smonitor_desc_1=__m__PP13smonitor_desc_1) /* ?{} */);
+    ((void)((*___dst__R16smonitor_guard_t_1).__count__i_1=__count__i_1) /* ?{} */);
+    ((void)((*___dst__R16smonitor_guard_t_1).__prev_mntrs__PP13smonitor_desc_1=__prev_mntrs__PP13smonitor_desc_1) /* ?{} */);
+    ((void)((*___dst__R16smonitor_guard_t_1).__prev_count__Us_1=__prev_count__Us_1) /* ?{} */);
+    ((void)((*___dst__R16smonitor_guard_t_1).__prev_func__PF___1) /* ?{} */);
+}
+static inline void ___constructor__F_R16smonitor_guard_tPP13smonitor_desciPP13smonitor_descUsPF___autogen___1(struct monitor_guard_t *___dst__R16smonitor_guard_t_1, struct monitor_desc **__m__PP13smonitor_desc_1, signed int __count__i_1, struct monitor_desc **__prev_mntrs__PP13smonitor_desc_1, unsigned short int __prev_count__Us_1, void (*__prev_func__PF___1)()){
+    ((void)((*___dst__R16smonitor_guard_t_1).__m__PP13smonitor_desc_1=__m__PP13smonitor_desc_1) /* ?{} */);
+    ((void)((*___dst__R16smonitor_guard_t_1).__count__i_1=__count__i_1) /* ?{} */);
+    ((void)((*___dst__R16smonitor_guard_t_1).__prev_mntrs__PP13smonitor_desc_1=__prev_mntrs__PP13smonitor_desc_1) /* ?{} */);
+    ((void)((*___dst__R16smonitor_guard_t_1).__prev_count__Us_1=__prev_count__Us_1) /* ?{} */);
+    ((void)((*___dst__R16smonitor_guard_t_1).__prev_func__PF___1=__prev_func__PF___1) /* ?{} */);
+}
+static inline signed int ___operator_less__Fi_P13smonitor_descP13smonitor_desc__1(struct monitor_desc *__lhs__P13smonitor_desc_1, struct monitor_desc *__rhs__P13smonitor_desc_1){
+    __attribute__ ((unused)) signed int ___retval__operator_less__i_1;
+    ((void)(___retval__operator_less__i_1=(((signed int )__lhs__P13smonitor_desc_1)<((signed int )__rhs__P13smonitor_desc_1))) /* ?{} */);
+    return ((signed int )___retval__operator_less__i_1);
+}
+void ___constructor__F_R16smonitor_guard_tPP13smonitor_desciPF____1(struct monitor_guard_t *__this__R16smonitor_guard_t_1, struct monitor_desc **__m__PP13smonitor_desc_1, signed int __count__i_1, void (*__func__PF___1)());
+void ___destructor__F_R16smonitor_guard_t__1(struct monitor_guard_t *__this__R16smonitor_guard_t_1);
+struct __condition_criterion_t {
+    _Bool __ready__b_1;
+    struct monitor_desc *__target__P13smonitor_desc_1;
+    struct __condition_node_t *__owner__P19s__condition_node_t_1;
+    struct __condition_criterion_t *__next__P24s__condition_criterion_t_1;
+};
+static inline void ___constructor__F_R24s__condition_criterion_t_autogen___1(struct __condition_criterion_t *___dst__R24s__condition_criterion_t_1);
+static inline void ___constructor__F_R24s__condition_criterion_t24s__condition_criterion_t_autogen___1(struct __condition_criterion_t *___dst__R24s__condition_criterion_t_1, struct __condition_criterion_t ___src__24s__condition_criterion_t_1);
+static inline void ___destructor__F_R24s__condition_criterion_t_autogen___1(struct __condition_criterion_t *___dst__R24s__condition_criterion_t_1);
+static inline struct __condition_criterion_t ___operator_assign__F24s__condition_criterion_t_R24s__condition_criterion_t24s__condition_criterion_t_autogen___1(struct __condition_criterion_t *___dst__R24s__condition_criterion_t_1, struct __condition_criterion_t ___src__24s__condition_criterion_t_1);
+static inline void ___constructor__F_R24s__condition_criterion_t_autogen___1(struct __condition_criterion_t *___dst__R24s__condition_criterion_t_1){
+    ((void)((*___dst__R24s__condition_criterion_t_1).__ready__b_1) /* ?{} */);
+    ((void)((*___dst__R24s__condition_criterion_t_1).__target__P13smonitor_desc_1) /* ?{} */);
+    ((void)((*___dst__R24s__condition_criterion_t_1).__owner__P19s__condition_node_t_1) /* ?{} */);
+    ((void)((*___dst__R24s__condition_criterion_t_1).__next__P24s__condition_criterion_t_1) /* ?{} */);
+}
+static inline void ___constructor__F_R24s__condition_criterion_t24s__condition_criterion_t_autogen___1(struct __condition_criterion_t *___dst__R24s__condition_criterion_t_1, struct __condition_criterion_t ___src__24s__condition_criterion_t_1){
+    ((void)((*___dst__R24s__condition_criterion_t_1).__ready__b_1=___src__24s__condition_criterion_t_1.__ready__b_1) /* ?{} */);
+    ((void)((*___dst__R24s__condition_criterion_t_1).__target__P13smonitor_desc_1=___src__24s__condition_criterion_t_1.__target__P13smonitor_desc_1) /* ?{} */);
+    ((void)((*___dst__R24s__condition_criterion_t_1).__owner__P19s__condition_node_t_1=___src__24s__condition_criterion_t_1.__owner__P19s__condition_node_t_1) /* ?{} */);
+    ((void)((*___dst__R24s__condition_criterion_t_1).__next__P24s__condition_criterion_t_1=___src__24s__condition_criterion_t_1.__next__P24s__condition_criterion_t_1) /* ?{} */);
+}
+static inline void ___destructor__F_R24s__condition_criterion_t_autogen___1(struct __condition_criterion_t *___dst__R24s__condition_criterion_t_1){
+    ((void)((*___dst__R24s__condition_criterion_t_1).__next__P24s__condition_criterion_t_1) /* ^?{} */);
+    ((void)((*___dst__R24s__condition_criterion_t_1).__owner__P19s__condition_node_t_1) /* ^?{} */);
+    ((void)((*___dst__R24s__condition_criterion_t_1).__target__P13smonitor_desc_1) /* ^?{} */);
+    ((void)((*___dst__R24s__condition_criterion_t_1).__ready__b_1) /* ^?{} */);
+}
+static inline struct __condition_criterion_t ___operator_assign__F24s__condition_criterion_t_R24s__condition_criterion_t24s__condition_criterion_t_autogen___1(struct __condition_criterion_t *___dst__R24s__condition_criterion_t_1, struct __condition_criterion_t ___src__24s__condition_criterion_t_1){
+    struct __condition_criterion_t ___ret__24s__condition_criterion_t_1;
+    ((void)((*___dst__R24s__condition_criterion_t_1).__ready__b_1=___src__24s__condition_criterion_t_1.__ready__b_1));
+    ((void)((*___dst__R24s__condition_criterion_t_1).__target__P13smonitor_desc_1=___src__24s__condition_criterion_t_1.__target__P13smonitor_desc_1));
+    ((void)((*___dst__R24s__condition_criterion_t_1).__owner__P19s__condition_node_t_1=___src__24s__condition_criterion_t_1.__owner__P19s__condition_node_t_1));
+    ((void)((*___dst__R24s__condition_criterion_t_1).__next__P24s__condition_criterion_t_1=___src__24s__condition_criterion_t_1.__next__P24s__condition_criterion_t_1));
+    ((void)___constructor__F_R24s__condition_criterion_t24s__condition_criterion_t_autogen___1((&___ret__24s__condition_criterion_t_1), ___src__24s__condition_criterion_t_1));
+    return ((struct __condition_criterion_t )___ret__24s__condition_criterion_t_1);
+}
+static inline void ___constructor__F_R24s__condition_criterion_tb_autogen___1(struct __condition_criterion_t *___dst__R24s__condition_criterion_t_1, _Bool __ready__b_1){
+    ((void)((*___dst__R24s__condition_criterion_t_1).__ready__b_1=__ready__b_1) /* ?{} */);
+    ((void)((*___dst__R24s__condition_criterion_t_1).__target__P13smonitor_desc_1) /* ?{} */);
+    ((void)((*___dst__R24s__condition_criterion_t_1).__owner__P19s__condition_node_t_1) /* ?{} */);
+    ((void)((*___dst__R24s__condition_criterion_t_1).__next__P24s__condition_criterion_t_1) /* ?{} */);
+}
+static inline void ___constructor__F_R24s__condition_criterion_tbP13smonitor_desc_autogen___1(struct __condition_criterion_t *___dst__R24s__condition_criterion_t_1, _Bool __ready__b_1, struct monitor_desc *__target__P13smonitor_desc_1){
+    ((void)((*___dst__R24s__condition_criterion_t_1).__ready__b_1=__ready__b_1) /* ?{} */);
+    ((void)((*___dst__R24s__condition_criterion_t_1).__target__P13smonitor_desc_1=__target__P13smonitor_desc_1) /* ?{} */);
+    ((void)((*___dst__R24s__condition_criterion_t_1).__owner__P19s__condition_node_t_1) /* ?{} */);
+    ((void)((*___dst__R24s__condition_criterion_t_1).__next__P24s__condition_criterion_t_1) /* ?{} */);
+}
+static inline void ___constructor__F_R24s__condition_criterion_tbP13smonitor_descP19s__condition_node_t_autogen___1(struct __condition_criterion_t *___dst__R24s__condition_criterion_t_1, _Bool __ready__b_1, struct monitor_desc *__target__P13smonitor_desc_1, struct __condition_node_t *__owner__P19s__condition_node_t_1){
+    ((void)((*___dst__R24s__condition_criterion_t_1).__ready__b_1=__ready__b_1) /* ?{} */);
+    ((void)((*___dst__R24s__condition_criterion_t_1).__target__P13smonitor_desc_1=__target__P13smonitor_desc_1) /* ?{} */);
+    ((void)((*___dst__R24s__condition_criterion_t_1).__owner__P19s__condition_node_t_1=__owner__P19s__condition_node_t_1) /* ?{} */);
+    ((void)((*___dst__R24s__condition_criterion_t_1).__next__P24s__condition_criterion_t_1) /* ?{} */);
+}
+static inline void ___constructor__F_R24s__condition_criterion_tbP13smonitor_descP19s__condition_node_tP24s__condition_criterion_t_autogen___1(struct __condition_criterion_t *___dst__R24s__condition_criterion_t_1, _Bool __ready__b_1, struct monitor_desc *__target__P13smonitor_desc_1, struct __condition_node_t *__owner__P19s__condition_node_t_1, struct __condition_criterion_t *__next__P24s__condition_criterion_t_1){
+    ((void)((*___dst__R24s__condition_criterion_t_1).__ready__b_1=__ready__b_1) /* ?{} */);
+    ((void)((*___dst__R24s__condition_criterion_t_1).__target__P13smonitor_desc_1=__target__P13smonitor_desc_1) /* ?{} */);
+    ((void)((*___dst__R24s__condition_criterion_t_1).__owner__P19s__condition_node_t_1=__owner__P19s__condition_node_t_1) /* ?{} */);
+    ((void)((*___dst__R24s__condition_criterion_t_1).__next__P24s__condition_criterion_t_1=__next__P24s__condition_criterion_t_1) /* ?{} */);
+}
+struct __condition_node_t {
+    struct thread_desc *__waiting_thread__P12sthread_desc_1;
+    struct __condition_criterion_t *__criteria__P24s__condition_criterion_t_1;
+    unsigned short int __count__Us_1;
+    struct __condition_node_t *__next__P19s__condition_node_t_1;
+    unsigned int __user_info__Ui_1;
+};
+static inline void ___constructor__F_R19s__condition_node_t_autogen___1(struct __condition_node_t *___dst__R19s__condition_node_t_1);
+static inline void ___constructor__F_R19s__condition_node_t19s__condition_node_t_autogen___1(struct __condition_node_t *___dst__R19s__condition_node_t_1, struct __condition_node_t ___src__19s__condition_node_t_1);
+static inline void ___destructor__F_R19s__condition_node_t_autogen___1(struct __condition_node_t *___dst__R19s__condition_node_t_1);
+static inline struct __condition_node_t ___operator_assign__F19s__condition_node_t_R19s__condition_node_t19s__condition_node_t_autogen___1(struct __condition_node_t *___dst__R19s__condition_node_t_1, struct __condition_node_t ___src__19s__condition_node_t_1);
+static inline void ___constructor__F_R19s__condition_node_t_autogen___1(struct __condition_node_t *___dst__R19s__condition_node_t_1){
+    ((void)((*___dst__R19s__condition_node_t_1).__waiting_thread__P12sthread_desc_1) /* ?{} */);
+    ((void)((*___dst__R19s__condition_node_t_1).__criteria__P24s__condition_criterion_t_1) /* ?{} */);
+    ((void)((*___dst__R19s__condition_node_t_1).__count__Us_1) /* ?{} */);
+    ((void)((*___dst__R19s__condition_node_t_1).__next__P19s__condition_node_t_1) /* ?{} */);
+    ((void)((*___dst__R19s__condition_node_t_1).__user_info__Ui_1) /* ?{} */);
+}
+static inline void ___constructor__F_R19s__condition_node_t19s__condition_node_t_autogen___1(struct __condition_node_t *___dst__R19s__condition_node_t_1, struct __condition_node_t ___src__19s__condition_node_t_1){
+    ((void)((*___dst__R19s__condition_node_t_1).__waiting_thread__P12sthread_desc_1=___src__19s__condition_node_t_1.__waiting_thread__P12sthread_desc_1) /* ?{} */);
+    ((void)((*___dst__R19s__condition_node_t_1).__criteria__P24s__condition_criterion_t_1=___src__19s__condition_node_t_1.__criteria__P24s__condition_criterion_t_1) /* ?{} */);
+    ((void)((*___dst__R19s__condition_node_t_1).__count__Us_1=___src__19s__condition_node_t_1.__count__Us_1) /* ?{} */);
+    ((void)((*___dst__R19s__condition_node_t_1).__next__P19s__condition_node_t_1=___src__19s__condition_node_t_1.__next__P19s__condition_node_t_1) /* ?{} */);
+    ((void)((*___dst__R19s__condition_node_t_1).__user_info__Ui_1=___src__19s__condition_node_t_1.__user_info__Ui_1) /* ?{} */);
+}
+static inline void ___destructor__F_R19s__condition_node_t_autogen___1(struct __condition_node_t *___dst__R19s__condition_node_t_1){
+    ((void)((*___dst__R19s__condition_node_t_1).__user_info__Ui_1) /* ^?{} */);
+    ((void)((*___dst__R19s__condition_node_t_1).__next__P19s__condition_node_t_1) /* ^?{} */);
+    ((void)((*___dst__R19s__condition_node_t_1).__count__Us_1) /* ^?{} */);
+    ((void)((*___dst__R19s__condition_node_t_1).__criteria__P24s__condition_criterion_t_1) /* ^?{} */);
+    ((void)((*___dst__R19s__condition_node_t_1).__waiting_thread__P12sthread_desc_1) /* ^?{} */);
+}
+static inline struct __condition_node_t ___operator_assign__F19s__condition_node_t_R19s__condition_node_t19s__condition_node_t_autogen___1(struct __condition_node_t *___dst__R19s__condition_node_t_1, struct __condition_node_t ___src__19s__condition_node_t_1){
+    struct __condition_node_t ___ret__19s__condition_node_t_1;
+    ((void)((*___dst__R19s__condition_node_t_1).__waiting_thread__P12sthread_desc_1=___src__19s__condition_node_t_1.__waiting_thread__P12sthread_desc_1));
+    ((void)((*___dst__R19s__condition_node_t_1).__criteria__P24s__condition_criterion_t_1=___src__19s__condition_node_t_1.__criteria__P24s__condition_criterion_t_1));
+    ((void)((*___dst__R19s__condition_node_t_1).__count__Us_1=___src__19s__condition_node_t_1.__count__Us_1));
+    ((void)((*___dst__R19s__condition_node_t_1).__next__P19s__condition_node_t_1=___src__19s__condition_node_t_1.__next__P19s__condition_node_t_1));
+    ((void)((*___dst__R19s__condition_node_t_1).__user_info__Ui_1=___src__19s__condition_node_t_1.__user_info__Ui_1));
+    ((void)___constructor__F_R19s__condition_node_t19s__condition_node_t_autogen___1((&___ret__19s__condition_node_t_1), ___src__19s__condition_node_t_1));
+    return ((struct __condition_node_t )___ret__19s__condition_node_t_1);
+}
+static inline void ___constructor__F_R19s__condition_node_tP12sthread_desc_autogen___1(struct __condition_node_t *___dst__R19s__condition_node_t_1, struct thread_desc *__waiting_thread__P12sthread_desc_1){
+    ((void)((*___dst__R19s__condition_node_t_1).__waiting_thread__P12sthread_desc_1=__waiting_thread__P12sthread_desc_1) /* ?{} */);
+    ((void)((*___dst__R19s__condition_node_t_1).__criteria__P24s__condition_criterion_t_1) /* ?{} */);
+    ((void)((*___dst__R19s__condition_node_t_1).__count__Us_1) /* ?{} */);
+    ((void)((*___dst__R19s__condition_node_t_1).__next__P19s__condition_node_t_1) /* ?{} */);
+    ((void)((*___dst__R19s__condition_node_t_1).__user_info__Ui_1) /* ?{} */);
+}
+static inline void ___constructor__F_R19s__condition_node_tP12sthread_descP24s__condition_criterion_t_autogen___1(struct __condition_node_t *___dst__R19s__condition_node_t_1, struct thread_desc *__waiting_thread__P12sthread_desc_1, struct __condition_criterion_t *__criteria__P24s__condition_criterion_t_1){
+    ((void)((*___dst__R19s__condition_node_t_1).__waiting_thread__P12sthread_desc_1=__waiting_thread__P12sthread_desc_1) /* ?{} */);
+    ((void)((*___dst__R19s__condition_node_t_1).__criteria__P24s__condition_criterion_t_1=__criteria__P24s__condition_criterion_t_1) /* ?{} */);
+    ((void)((*___dst__R19s__condition_node_t_1).__count__Us_1) /* ?{} */);
+    ((void)((*___dst__R19s__condition_node_t_1).__next__P19s__condition_node_t_1) /* ?{} */);
+    ((void)((*___dst__R19s__condition_node_t_1).__user_info__Ui_1) /* ?{} */);
+}
+static inline void ___constructor__F_R19s__condition_node_tP12sthread_descP24s__condition_criterion_tUs_autogen___1(struct __condition_node_t *___dst__R19s__condition_node_t_1, struct thread_desc *__waiting_thread__P12sthread_desc_1, struct __condition_criterion_t *__criteria__P24s__condition_criterion_t_1, unsigned short int __count__Us_1){
+    ((void)((*___dst__R19s__condition_node_t_1).__waiting_thread__P12sthread_desc_1=__waiting_thread__P12sthread_desc_1) /* ?{} */);
+    ((void)((*___dst__R19s__condition_node_t_1).__criteria__P24s__condition_criterion_t_1=__criteria__P24s__condition_criterion_t_1) /* ?{} */);
+    ((void)((*___dst__R19s__condition_node_t_1).__count__Us_1=__count__Us_1) /* ?{} */);
+    ((void)((*___dst__R19s__condition_node_t_1).__next__P19s__condition_node_t_1) /* ?{} */);
+    ((void)((*___dst__R19s__condition_node_t_1).__user_info__Ui_1) /* ?{} */);
+}
+static inline void ___constructor__F_R19s__condition_node_tP12sthread_descP24s__condition_criterion_tUsP19s__condition_node_t_autogen___1(struct __condition_node_t *___dst__R19s__condition_node_t_1, struct thread_desc *__waiting_thread__P12sthread_desc_1, struct __condition_criterion_t *__criteria__P24s__condition_criterion_t_1, unsigned short int __count__Us_1, struct __condition_node_t *__next__P19s__condition_node_t_1){
+    ((void)((*___dst__R19s__condition_node_t_1).__waiting_thread__P12sthread_desc_1=__waiting_thread__P12sthread_desc_1) /* ?{} */);
+    ((void)((*___dst__R19s__condition_node_t_1).__criteria__P24s__condition_criterion_t_1=__criteria__P24s__condition_criterion_t_1) /* ?{} */);
+    ((void)((*___dst__R19s__condition_node_t_1).__count__Us_1=__count__Us_1) /* ?{} */);
+    ((void)((*___dst__R19s__condition_node_t_1).__next__P19s__condition_node_t_1=__next__P19s__condition_node_t_1) /* ?{} */);
+    ((void)((*___dst__R19s__condition_node_t_1).__user_info__Ui_1) /* ?{} */);
+}
+static inline void ___constructor__F_R19s__condition_node_tP12sthread_descP24s__condition_criterion_tUsP19s__condition_node_tUi_autogen___1(struct __condition_node_t *___dst__R19s__condition_node_t_1, struct thread_desc *__waiting_thread__P12sthread_desc_1, struct __condition_criterion_t *__criteria__P24s__condition_criterion_t_1, unsigned short int __count__Us_1, struct __condition_node_t *__next__P19s__condition_node_t_1, unsigned int __user_info__Ui_1){
+    ((void)((*___dst__R19s__condition_node_t_1).__waiting_thread__P12sthread_desc_1=__waiting_thread__P12sthread_desc_1) /* ?{} */);
+    ((void)((*___dst__R19s__condition_node_t_1).__criteria__P24s__condition_criterion_t_1=__criteria__P24s__condition_criterion_t_1) /* ?{} */);
+    ((void)((*___dst__R19s__condition_node_t_1).__count__Us_1=__count__Us_1) /* ?{} */);
+    ((void)((*___dst__R19s__condition_node_t_1).__next__P19s__condition_node_t_1=__next__P19s__condition_node_t_1) /* ?{} */);
+    ((void)((*___dst__R19s__condition_node_t_1).__user_info__Ui_1=__user_info__Ui_1) /* ?{} */);
+}
+struct __condition_blocked_queue_t {
+    struct __condition_node_t *__head__P19s__condition_node_t_1;
+    struct __condition_node_t **__tail__PP19s__condition_node_t_1;
+};
+static inline void ___constructor__F_R28s__condition_blocked_queue_t_autogen___1(struct __condition_blocked_queue_t *___dst__R28s__condition_blocked_queue_t_1);
+static inline void ___constructor__F_R28s__condition_blocked_queue_t28s__condition_blocked_queue_t_autogen___1(struct __condition_blocked_queue_t *___dst__R28s__condition_blocked_queue_t_1, struct __condition_blocked_queue_t ___src__28s__condition_blocked_queue_t_1);
+static inline void ___destructor__F_R28s__condition_blocked_queue_t_autogen___1(struct __condition_blocked_queue_t *___dst__R28s__condition_blocked_queue_t_1);
+static inline struct __condition_blocked_queue_t ___operator_assign__F28s__condition_blocked_queue_t_R28s__condition_blocked_queue_t28s__condition_blocked_queue_t_autogen___1(struct __condition_blocked_queue_t *___dst__R28s__condition_blocked_queue_t_1, struct __condition_blocked_queue_t ___src__28s__condition_blocked_queue_t_1);
+static inline void ___constructor__F_R28s__condition_blocked_queue_t_autogen___1(struct __condition_blocked_queue_t *___dst__R28s__condition_blocked_queue_t_1){
+    ((void)((*___dst__R28s__condition_blocked_queue_t_1).__head__P19s__condition_node_t_1) /* ?{} */);
+    ((void)((*___dst__R28s__condition_blocked_queue_t_1).__tail__PP19s__condition_node_t_1) /* ?{} */);
+}
+static inline void ___constructor__F_R28s__condition_blocked_queue_t28s__condition_blocked_queue_t_autogen___1(struct __condition_blocked_queue_t *___dst__R28s__condition_blocked_queue_t_1, struct __condition_blocked_queue_t ___src__28s__condition_blocked_queue_t_1){
+    ((void)((*___dst__R28s__condition_blocked_queue_t_1).__head__P19s__condition_node_t_1=___src__28s__condition_blocked_queue_t_1.__head__P19s__condition_node_t_1) /* ?{} */);
+    ((void)((*___dst__R28s__condition_blocked_queue_t_1).__tail__PP19s__condition_node_t_1=___src__28s__condition_blocked_queue_t_1.__tail__PP19s__condition_node_t_1) /* ?{} */);
+}
+static inline void ___destructor__F_R28s__condition_blocked_queue_t_autogen___1(struct __condition_blocked_queue_t *___dst__R28s__condition_blocked_queue_t_1){
+    ((void)((*___dst__R28s__condition_blocked_queue_t_1).__tail__PP19s__condition_node_t_1) /* ^?{} */);
+    ((void)((*___dst__R28s__condition_blocked_queue_t_1).__head__P19s__condition_node_t_1) /* ^?{} */);
+}
+static inline struct __condition_blocked_queue_t ___operator_assign__F28s__condition_blocked_queue_t_R28s__condition_blocked_queue_t28s__condition_blocked_queue_t_autogen___1(struct __condition_blocked_queue_t *___dst__R28s__condition_blocked_queue_t_1, struct __condition_blocked_queue_t ___src__28s__condition_blocked_queue_t_1){
+    struct __condition_blocked_queue_t ___ret__28s__condition_blocked_queue_t_1;
+    ((void)((*___dst__R28s__condition_blocked_queue_t_1).__head__P19s__condition_node_t_1=___src__28s__condition_blocked_queue_t_1.__head__P19s__condition_node_t_1));
+    ((void)((*___dst__R28s__condition_blocked_queue_t_1).__tail__PP19s__condition_node_t_1=___src__28s__condition_blocked_queue_t_1.__tail__PP19s__condition_node_t_1));
+    ((void)___constructor__F_R28s__condition_blocked_queue_t28s__condition_blocked_queue_t_autogen___1((&___ret__28s__condition_blocked_queue_t_1), ___src__28s__condition_blocked_queue_t_1));
+    return ((struct __condition_blocked_queue_t )___ret__28s__condition_blocked_queue_t_1);
+}
+static inline void ___constructor__F_R28s__condition_blocked_queue_tP19s__condition_node_t_autogen___1(struct __condition_blocked_queue_t *___dst__R28s__condition_blocked_queue_t_1, struct __condition_node_t *__head__P19s__condition_node_t_1){
+    ((void)((*___dst__R28s__condition_blocked_queue_t_1).__head__P19s__condition_node_t_1=__head__P19s__condition_node_t_1) /* ?{} */);
+    ((void)((*___dst__R28s__condition_blocked_queue_t_1).__tail__PP19s__condition_node_t_1) /* ?{} */);
+}
+static inline void ___constructor__F_R28s__condition_blocked_queue_tP19s__condition_node_tPP19s__condition_node_t_autogen___1(struct __condition_blocked_queue_t *___dst__R28s__condition_blocked_queue_t_1, struct __condition_node_t *__head__P19s__condition_node_t_1, struct __condition_node_t **__tail__PP19s__condition_node_t_1){
+    ((void)((*___dst__R28s__condition_blocked_queue_t_1).__head__P19s__condition_node_t_1=__head__P19s__condition_node_t_1) /* ?{} */);
+    ((void)((*___dst__R28s__condition_blocked_queue_t_1).__tail__PP19s__condition_node_t_1=__tail__PP19s__condition_node_t_1) /* ?{} */);
+}
+void ___constructor__F_R28s__condition_blocked_queue_t__1(struct __condition_blocked_queue_t *__anonymous_object198);
+void __append__F_P28s__condition_blocked_queue_tP19s__condition_node_t__1(struct __condition_blocked_queue_t *__anonymous_object199, struct __condition_node_t *__anonymous_object200);
+struct __condition_node_t *__pop_head__FP19s__condition_node_t_P28s__condition_blocked_queue_t__1(struct __condition_blocked_queue_t *__anonymous_object201);
+struct condition {
+    struct __condition_blocked_queue_t __blocked__28s__condition_blocked_queue_t_1;
+    struct monitor_desc **__monitors__PP13smonitor_desc_1;
+    unsigned short int __monitor_count__Us_1;
+};
+static inline void ___constructor__F_R10scondition_autogen___1(struct condition *___dst__R10scondition_1);
+static inline void ___constructor__F_R10scondition10scondition_autogen___1(struct condition *___dst__R10scondition_1, struct condition ___src__10scondition_1);
+static inline void ___destructor__F_R10scondition_autogen___1(struct condition *___dst__R10scondition_1);
+static inline struct condition ___operator_assign__F10scondition_R10scondition10scondition_autogen___1(struct condition *___dst__R10scondition_1, struct condition ___src__10scondition_1);
+static inline void ___constructor__F_R10scondition_autogen___1(struct condition *___dst__R10scondition_1){
+    ((void)___constructor__F_R28s__condition_blocked_queue_t__1((&(*___dst__R10scondition_1).__blocked__28s__condition_blocked_queue_t_1)));
+    ((void)((*___dst__R10scondition_1).__monitors__PP13smonitor_desc_1) /* ?{} */);
+    ((void)((*___dst__R10scondition_1).__monitor_count__Us_1) /* ?{} */);
+}
+static inline void ___constructor__F_R10scondition10scondition_autogen___1(struct condition *___dst__R10scondition_1, struct condition ___src__10scondition_1){
+    ((void)___constructor__F_R28s__condition_blocked_queue_t28s__condition_blocked_queue_t_autogen___1((&(*___dst__R10scondition_1).__blocked__28s__condition_blocked_queue_t_1), ___src__10scondition_1.__blocked__28s__condition_blocked_queue_t_1));
+    ((void)((*___dst__R10scondition_1).__monitors__PP13smonitor_desc_1=___src__10scondition_1.__monitors__PP13smonitor_desc_1) /* ?{} */);
+    ((void)((*___dst__R10scondition_1).__monitor_count__Us_1=___src__10scondition_1.__monitor_count__Us_1) /* ?{} */);
+}
+static inline void ___destructor__F_R10scondition_autogen___1(struct condition *___dst__R10scondition_1){
+    ((void)((*___dst__R10scondition_1).__monitor_count__Us_1) /* ^?{} */);
+    ((void)((*___dst__R10scondition_1).__monitors__PP13smonitor_desc_1) /* ^?{} */);
+    ((void)___destructor__F_R28s__condition_blocked_queue_t_autogen___1((&(*___dst__R10scondition_1).__blocked__28s__condition_blocked_queue_t_1)));
+}
+static inline struct condition ___operator_assign__F10scondition_R10scondition10scondition_autogen___1(struct condition *___dst__R10scondition_1, struct condition ___src__10scondition_1){
+    struct condition ___ret__10scondition_1;
+    struct __condition_blocked_queue_t _tmp_cp56;
+    struct __condition_blocked_queue_t _tmp_cp_ret29;
+    ((void)(((void)(_tmp_cp_ret29=___operator_assign__F28s__condition_blocked_queue_t_R28s__condition_blocked_queue_t28s__condition_blocked_queue_t_autogen___1((&(*___dst__R10scondition_1).__blocked__28s__condition_blocked_queue_t_1), (((void)___constructor__F_R28s__condition_blocked_queue_t28s__condition_blocked_queue_t_autogen___1((&_tmp_cp56), ___src__10scondition_1.__blocked__28s__condition_blocked_queue_t_1)) , _tmp_cp56)))) , _tmp_cp_ret29));
+    ((void)___destructor__F_R28s__condition_blocked_queue_t_autogen___1((&_tmp_cp_ret29)));
+    ((void)___destructor__F_R28s__condition_blocked_queue_t_autogen___1((&_tmp_cp56)));
+    ((void)((*___dst__R10scondition_1).__monitors__PP13smonitor_desc_1=___src__10scondition_1.__monitors__PP13smonitor_desc_1));
+    ((void)((*___dst__R10scondition_1).__monitor_count__Us_1=___src__10scondition_1.__monitor_count__Us_1));
+    ((void)___constructor__F_R10scondition10scondition_autogen___1((&___ret__10scondition_1), ___src__10scondition_1));
+    return ((struct condition )___ret__10scondition_1);
+}
+static inline void ___constructor__F_R10scondition28s__condition_blocked_queue_t_autogen___1(struct condition *___dst__R10scondition_1, struct __condition_blocked_queue_t __blocked__28s__condition_blocked_queue_t_1){
+    ((void)___constructor__F_R28s__condition_blocked_queue_t28s__condition_blocked_queue_t_autogen___1((&(*___dst__R10scondition_1).__blocked__28s__condition_blocked_queue_t_1), __blocked__28s__condition_blocked_queue_t_1));
+    ((void)((*___dst__R10scondition_1).__monitors__PP13smonitor_desc_1) /* ?{} */);
+    ((void)((*___dst__R10scondition_1).__monitor_count__Us_1) /* ?{} */);
+}
+static inline void ___constructor__F_R10scondition28s__condition_blocked_queue_tPP13smonitor_desc_autogen___1(struct condition *___dst__R10scondition_1, struct __condition_blocked_queue_t __blocked__28s__condition_blocked_queue_t_1, struct monitor_desc **__monitors__PP13smonitor_desc_1){
+    ((void)___constructor__F_R28s__condition_blocked_queue_t28s__condition_blocked_queue_t_autogen___1((&(*___dst__R10scondition_1).__blocked__28s__condition_blocked_queue_t_1), __blocked__28s__condition_blocked_queue_t_1));
+    ((void)((*___dst__R10scondition_1).__monitors__PP13smonitor_desc_1=__monitors__PP13smonitor_desc_1) /* ?{} */);
+    ((void)((*___dst__R10scondition_1).__monitor_count__Us_1) /* ?{} */);
+}
+static inline void ___constructor__F_R10scondition28s__condition_blocked_queue_tPP13smonitor_descUs_autogen___1(struct condition *___dst__R10scondition_1, struct __condition_blocked_queue_t __blocked__28s__condition_blocked_queue_t_1, struct monitor_desc **__monitors__PP13smonitor_desc_1, unsigned short int __monitor_count__Us_1){
+    ((void)___constructor__F_R28s__condition_blocked_queue_t28s__condition_blocked_queue_t_autogen___1((&(*___dst__R10scondition_1).__blocked__28s__condition_blocked_queue_t_1), __blocked__28s__condition_blocked_queue_t_1));
+    ((void)((*___dst__R10scondition_1).__monitors__PP13smonitor_desc_1=__monitors__PP13smonitor_desc_1) /* ?{} */);
+    ((void)((*___dst__R10scondition_1).__monitor_count__Us_1=__monitor_count__Us_1) /* ?{} */);
+}
+static inline void ___constructor__F_R10scondition__1(struct condition *__this__R10scondition_1){
+    ((void)___constructor__F_R28s__condition_blocked_queue_t__1((&(*__this__R10scondition_1).__blocked__28s__condition_blocked_queue_t_1)));
+    ((void)((*__this__R10scondition_1).__monitors__PP13smonitor_desc_1) /* ?{} */);
+    ((void)((*__this__R10scondition_1).__monitor_count__Us_1) /* ?{} */);
+    ((void)((*__this__R10scondition_1).__monitors__PP13smonitor_desc_1=((void *)0)));
+    ((void)((*__this__R10scondition_1).__monitor_count__Us_1=((unsigned short int )0)));
+}
+static inline void ___destructor__F_R10scondition__1(struct condition *__this__R10scondition_1){
+    ((void)free(((void *)(*__this__R10scondition_1).__monitors__PP13smonitor_desc_1)));
+    ((void)((*__this__R10scondition_1).__monitor_count__Us_1) /* ^?{} */);
+    ((void)((*__this__R10scondition_1).__monitors__PP13smonitor_desc_1) /* ^?{} */);
+    ((void)___destructor__F_R28s__condition_blocked_queue_t_autogen___1((&(*__this__R10scondition_1).__blocked__28s__condition_blocked_queue_t_1)));
+}
+void __wait__F_P10sconditionUi__1(struct condition *__this__P10scondition_1, unsigned int __user_info__Ui_1);
+_Bool __signal__Fb_P10scondition__1(struct condition *__this__P10scondition_1);
+_Bool __signal_block__Fb_P10scondition__1(struct condition *__this__P10scondition_1);
+static inline _Bool __is_empty__Fb_P10scondition__1(struct condition *__this__P10scondition_1){
+    __attribute__ ((unused)) _Bool ___retval_is_empty__b_1;
+    ((void)(___retval_is_empty__b_1=((_Bool )(!(*__this__P10scondition_1).__blocked__28s__condition_blocked_queue_t_1.__head__P19s__condition_node_t_1))) /* ?{} */);
+    return ((_Bool )___retval_is_empty__b_1);
+}
+unsigned int __front__FUi_P10scondition__1(struct condition *__this__P10scondition_1);
+struct __acceptable_t {
+    struct __monitor_group_t __anonymous_object202;
+    _Bool __is_dtor__b_1;
+};
+static inline void ___constructor__F_R15s__acceptable_t_autogen___1(struct __acceptable_t *___dst__R15s__acceptable_t_1);
+static inline void ___constructor__F_R15s__acceptable_t15s__acceptable_t_autogen___1(struct __acceptable_t *___dst__R15s__acceptable_t_1, struct __acceptable_t ___src__15s__acceptable_t_1);
+static inline void ___destructor__F_R15s__acceptable_t_autogen___1(struct __acceptable_t *___dst__R15s__acceptable_t_1);
+static inline struct __acceptable_t ___operator_assign__F15s__acceptable_t_R15s__acceptable_t15s__acceptable_t_autogen___1(struct __acceptable_t *___dst__R15s__acceptable_t_1, struct __acceptable_t ___src__15s__acceptable_t_1);
+static inline void ___constructor__F_R15s__acceptable_t_autogen___1(struct __acceptable_t *___dst__R15s__acceptable_t_1){
+    ((void)((*___dst__R15s__acceptable_t_1).__is_dtor__b_1) /* ?{} */);
+}
+static inline void ___constructor__F_R15s__acceptable_t15s__acceptable_t_autogen___1(struct __acceptable_t *___dst__R15s__acceptable_t_1, struct __acceptable_t ___src__15s__acceptable_t_1){
+    ((void)((*___dst__R15s__acceptable_t_1).__is_dtor__b_1=___src__15s__acceptable_t_1.__is_dtor__b_1) /* ?{} */);
+}
+static inline void ___destructor__F_R15s__acceptable_t_autogen___1(struct __acceptable_t *___dst__R15s__acceptable_t_1){
+    ((void)((*___dst__R15s__acceptable_t_1).__is_dtor__b_1) /* ^?{} */);
+}
+static inline struct __acceptable_t ___operator_assign__F15s__acceptable_t_R15s__acceptable_t15s__acceptable_t_autogen___1(struct __acceptable_t *___dst__R15s__acceptable_t_1, struct __acceptable_t ___src__15s__acceptable_t_1){
+    struct __acceptable_t ___ret__15s__acceptable_t_1;
+    ((void)((*___dst__R15s__acceptable_t_1).__is_dtor__b_1=___src__15s__acceptable_t_1.__is_dtor__b_1));
+    ((void)___constructor__F_R15s__acceptable_t15s__acceptable_t_autogen___1((&___ret__15s__acceptable_t_1), ___src__15s__acceptable_t_1));
+    return ((struct __acceptable_t )___ret__15s__acceptable_t_1);
+}
+static inline void ___constructor__F_R15s__acceptable_tb_autogen___1(struct __acceptable_t *___dst__R15s__acceptable_t_1, _Bool __is_dtor__b_1){
+    ((void)((*___dst__R15s__acceptable_t_1).__is_dtor__b_1=__is_dtor__b_1) /* ?{} */);
+}
+void ____waitfor_internal__F_RC17s__waitfor_mask_ti__1(const struct __waitfor_mask_t *__mask__RC17s__waitfor_mask_t_1, signed int __duration__i_1);
+struct M;
+static inline struct monitor_desc *__get_monitor__FP13smonitor_desc_R2sM__1(struct M *__this__R2sM_1);
+struct M {
+    struct monitor_desc ____mon__13smonitor_desc_1;
+};
+static inline void ___constructor__F_R2sM_autogen___1(struct M *___dst__R2sM_1);
+static inline void ___constructor__F_R2sM2sM_autogen___1(struct M *___dst__R2sM_1, struct M ___src__2sM_1);
+static inline void ___destructor__F_MR2sM_autogen___1(struct M *___dst__MR2sM_1);
+static inline struct M ___operator_assign__F2sM_R2sM2sM_autogen___1(struct M *___dst__R2sM_1, struct M ___src__2sM_1);
+static inline void ___constructor__F_R2sM_autogen___1(struct M *___dst__R2sM_1){
+    ((void)___constructor__F_R13smonitor_desc__1((&(*___dst__R2sM_1).____mon__13smonitor_desc_1)));
+}
+static inline void ___constructor__F_R2sM2sM_autogen___1(struct M *___dst__R2sM_1, struct M ___src__2sM_1){
+    ((void)___constructor__F_R13smonitor_desc13smonitor_desc_autogen___1((&(*___dst__R2sM_1).____mon__13smonitor_desc_1), ___src__2sM_1.____mon__13smonitor_desc_1));
+}
+static inline void ___destructor__F_MR2sM_autogen___1(struct M *___dst__MR2sM_1){
+    struct monitor_desc *_tmp_cp_ret30;
+    struct monitor_desc *____monitors__A0P13smonitor_desc_2[((unsigned int )1)] = { ((struct monitor_desc *)(((void)(_tmp_cp_ret30=__get_monitor__FP13smonitor_desc_R2sM__1(((struct M *)___dst__MR2sM_1)))) , _tmp_cp_ret30)) };
+    ((void)(_tmp_cp_ret30) /* ^?{} */);
+    struct monitor_guard_t ____guard__16smonitor_guard_t_2;
+    ((void)___constructor__F_R16smonitor_guard_tPP13smonitor_desciPF____1((&____guard__16smonitor_guard_t_2), ____monitors__A0P13smonitor_desc_2, ((signed int )1), ((void (*)())((void (*)())___destructor__F_MR2sM_autogen___1))));
+    ((void)___destructor__F_R13smonitor_desc_autogen___1((&(*___dst__MR2sM_1).____mon__13smonitor_desc_1)));
+    ((void)___destructor__F_R16smonitor_guard_t__1((&____guard__16smonitor_guard_t_2)));
+}
+static inline struct M ___operator_assign__F2sM_R2sM2sM_autogen___1(struct M *___dst__R2sM_1, struct M ___src__2sM_1){
+    struct M ___ret__2sM_1;
+    struct monitor_desc _tmp_cp60;
+    struct monitor_desc _tmp_cp_ret31;
+    ((void)(((void)(_tmp_cp_ret31=___operator_assign__F13smonitor_desc_R13smonitor_desc13smonitor_desc_autogen___1((&(*___dst__R2sM_1).____mon__13smonitor_desc_1), (((void)___constructor__F_R13smonitor_desc13smonitor_desc_autogen___1((&_tmp_cp60), ___src__2sM_1.____mon__13smonitor_desc_1)) , _tmp_cp60)))) , _tmp_cp_ret31));
+    ((void)___destructor__F_R13smonitor_desc_autogen___1((&_tmp_cp_ret31)));
+    ((void)___destructor__F_R13smonitor_desc_autogen___1((&_tmp_cp60)));
+    ((void)___constructor__F_R2sM2sM_autogen___1((&___ret__2sM_1), ___src__2sM_1));
+    return ((struct M )___ret__2sM_1);
+}
+static inline void ___constructor__F_R2sM13smonitor_desc_autogen___1(struct M *___dst__R2sM_1, struct monitor_desc ____mon__13smonitor_desc_1){
+    ((void)___constructor__F_R13smonitor_desc13smonitor_desc_autogen___1((&(*___dst__R2sM_1).____mon__13smonitor_desc_1), ____mon__13smonitor_desc_1));
+}
+static inline struct monitor_desc *__get_monitor__FP13smonitor_desc_R2sM__1(struct M *__this__R2sM_1){
+    struct monitor_desc *__ret__P13smonitor_desc_1;
+    ((void)(__ret__P13smonitor_desc_1=(&(*__this__R2sM_1).____mon__13smonitor_desc_1)) /* ?{} */);
+    return ((struct monitor_desc *)__ret__P13smonitor_desc_1);
+}
+struct M __a__2sM_1;
+void __f1__F_MR2sM__1(struct M *__a__MR2sM_1);
+void __f2__F_MR2sM__1(struct M *__a__MR2sM_1);
+void __f2__F_MR2sMMR2sM__1(struct M *__a__MR2sM_1, struct M *__b__MR2sM_1);
+void __f3__F_MR2sM__1(struct M *__a__MR2sM_1);
+void __f3__F_MR2sMMR2sM__1(struct M *__a__MR2sM_1, struct M *__b__MR2sM_1);
+void __f3__F_MR2sMMR2sMMR2sM__1(struct M *__a__MR2sM_1, struct M *__b__MR2sM_1, struct M *__c__MR2sM_1);
+void __foo__F___1(){
+    {
+        struct __acceptable_t __acceptables_0[1];
+        ((void)__builtin_memset(((void *)__acceptables_0), 0, sizeof(__acceptables_0)));
+        _Bool __do_run_0 = 0;
+        struct monitor_desc *__monitors_0[1] = { ((struct monitor_desc *)__get_monitor__FP13smonitor_desc_R2sM__1((&__a__2sM_1))) };
+        if ( 1 ) {
+            ((void)(__acceptables_0[((signed int )0)].__is_dtor__b_1=0));
+            ((void)(__acceptables_0[((signed int )0)].__anonymous_object202.func=((void (*)())__f1__F_MR2sM__1)));
+            ((void)(__acceptables_0[((signed int )0)].__anonymous_object202.list=__monitors_0));
+            ((void)(__acceptables_0[((signed int )0)].__anonymous_object202.size=((signed short int )1)));
+            ((void)(__do_run_0=((_Bool )1)));
+        }
+
+        unsigned long long int __timeout_0 = -1;
+        if ( __do_run_0 ) {
+            signed short int __index_0 = -1;
+            struct __waitfor_mask_t __mask_0 = { (&__index_0), __acceptables_0, 1 };
+            ((void)____waitfor_internal__F_RC17s__waitfor_mask_ti__1((&__mask_0), __timeout_0));
+            switch ( __index_0 ) {
+                case 0:
+                    {
+                        ((void)1);
+                    }
+                    break;
+            }
+
+        }
+
+    }
+
+    {
+        struct __acceptable_t __acceptables_1[1];
+        ((void)__builtin_memset(((void *)__acceptables_1), 0, sizeof(__acceptables_1)));
+        _Bool __do_run_1 = 0;
+        struct monitor_desc *__monitors_1[1] = { ((struct monitor_desc *)__get_monitor__FP13smonitor_desc_R2sM__1((&__a__2sM_1))) };
+        if ( 1 ) {
+            ((void)(__acceptables_1[((signed int )0)].__is_dtor__b_1=0));
+            ((void)(__acceptables_1[((signed int )0)].__anonymous_object202.func=((void (*)())__f1__F_MR2sM__1)));
+            ((void)(__acceptables_1[((signed int )0)].__anonymous_object202.list=__monitors_1));
+            ((void)(__acceptables_1[((signed int )0)].__anonymous_object202.size=((signed short int )1)));
+            ((void)(__do_run_1=((_Bool )1)));
+        }
+
+        unsigned long long int __timeout_1 = -1;
+        if ( __do_run_1 ) {
+            signed short int __index_1 = -1;
+            struct __waitfor_mask_t __mask_1 = { (&__index_1), __acceptables_1, 1 };
+            ((void)____waitfor_internal__F_RC17s__waitfor_mask_ti__1((&__mask_1), __timeout_1));
+            switch ( __index_1 ) {
+                case 0:
+                    {
+                        ((void)2);
+                    }
+                    break;
+            }
+
+        }
+
+    }
+
+    {
+        struct __acceptable_t __acceptables_2[1];
+        ((void)__builtin_memset(((void *)__acceptables_2), 0, sizeof(__acceptables_2)));
+        _Bool __do_run_2 = 0;
+        struct monitor_desc *__monitors_2[1] = { ((struct monitor_desc *)__get_monitor__FP13smonitor_desc_R2sM__1((&__a__2sM_1))) };
+        if ( 1 ) {
+            ((void)(__acceptables_2[((signed int )0)].__is_dtor__b_1=0));
+            ((void)(__acceptables_2[((signed int )0)].__anonymous_object202.func=((void (*)())__f2__F_MR2sM__1)));
+            ((void)(__acceptables_2[((signed int )0)].__anonymous_object202.list=__monitors_2));
+            ((void)(__acceptables_2[((signed int )0)].__anonymous_object202.size=((signed short int )1)));
+            ((void)(__do_run_2=((_Bool )1)));
+        }
+
+        unsigned long long int __timeout_2 = -1;
+        if ( __do_run_2 ) {
+            signed short int __index_2 = -1;
+            struct __waitfor_mask_t __mask_2 = { (&__index_2), __acceptables_2, 1 };
+            ((void)____waitfor_internal__F_RC17s__waitfor_mask_ti__1((&__mask_2), __timeout_2));
+            switch ( __index_2 ) {
+                case 0:
+                    {
+                        ((void)3);
+                    }
+                    break;
+            }
+
+        }
+
+    }
+
+    {
+        struct __acceptable_t __acceptables_3[1];
+        ((void)__builtin_memset(((void *)__acceptables_3), 0, sizeof(__acceptables_3)));
+        _Bool __do_run_3 = 0;
+        struct monitor_desc *__monitors_3[2] = { ((struct monitor_desc *)__get_monitor__FP13smonitor_desc_R2sM__1((&__a__2sM_1))), ((struct monitor_desc *)__get_monitor__FP13smonitor_desc_R2sM__1((&__a__2sM_1))) };
+        if ( ((signed int )((((signed int )1)<3)!=((signed int )0))) ) {
+            ((void)(__acceptables_3[((signed int )0)].__is_dtor__b_1=0));
+            ((void)(__acceptables_3[((signed int )0)].__anonymous_object202.func=((void (*)())__f2__F_MR2sMMR2sM__1)));
+            ((void)(__acceptables_3[((signed int )0)].__anonymous_object202.list=__monitors_3));
+            ((void)(__acceptables_3[((signed int )0)].__anonymous_object202.size=((signed short int )2)));
+            ((void)(__do_run_3=((_Bool )1)));
+        }
+
+        unsigned long long int __timeout_3 = -1;
+        if ( 1 ) {
+            ((void)(__timeout_3=((unsigned long long int )100)));
+            ((void)(__do_run_3=((_Bool )1)));
+        }
+
+        if ( __do_run_3 ) {
+            signed short int __index_3 = -1;
+            struct __waitfor_mask_t __mask_3 = { (&__index_3), __acceptables_3, 1 };
+            ((void)____waitfor_internal__F_RC17s__waitfor_mask_ti__1((&__mask_3), __timeout_3));
+            switch ( __index_3 ) {
+                case 0:
+                    {
+                        ((void)4);
+                    }
+                    break;
+                case -2:
+                    {
+                        ((void)5);
+                    }
+                    break;
+            }
+
+        }
+
+    }
+
+    {
+        struct __acceptable_t __acceptables_4[1];
+        ((void)__builtin_memset(((void *)__acceptables_4), 0, sizeof(__acceptables_4)));
+        _Bool __do_run_4 = 0;
+        struct monitor_desc *__monitors_4[1] = { ((struct monitor_desc *)__get_monitor__FP13smonitor_desc_R2sM__1((&__a__2sM_1))) };
+        if ( ((signed int )((2<3)!=((signed int )0))) ) {
+            ((void)(__acceptables_4[((signed int )0)].__is_dtor__b_1=0));
+            ((void)(__acceptables_4[((signed int )0)].__anonymous_object202.func=((void (*)())__f3__F_MR2sM__1)));
+            ((void)(__acceptables_4[((signed int )0)].__anonymous_object202.list=__monitors_4));
+            ((void)(__acceptables_4[((signed int )0)].__anonymous_object202.size=((signed short int )1)));
+            ((void)(__do_run_4=((_Bool )1)));
+        }
+
+        unsigned long long int __timeout_4 = -1;
+        if ( 1 ) {
+            ((void)(__timeout_4=0));
+            ((void)(__do_run_4=((_Bool )1)));
+        }
+
+        if ( __do_run_4 ) {
+            signed short int __index_4 = -1;
+            struct __waitfor_mask_t __mask_4 = { (&__index_4), __acceptables_4, 1 };
+            ((void)____waitfor_internal__F_RC17s__waitfor_mask_ti__1((&__mask_4), __timeout_4));
+            switch ( __index_4 ) {
+                case 0:
+                    {
+                        ((void)5);
+                    }
+                    break;
+                case -1:
+                    {
+                        ((void)6);
+                    }
+                    break;
+            }
+
+        }
+
+    }
+
+    {
+        struct __acceptable_t __acceptables_5[1];
+        ((void)__builtin_memset(((void *)__acceptables_5), 0, sizeof(__acceptables_5)));
+        _Bool __do_run_5 = 0;
+        struct monitor_desc *__monitors_5[2] = { ((struct monitor_desc *)__get_monitor__FP13smonitor_desc_R2sM__1((&__a__2sM_1))), ((struct monitor_desc *)__get_monitor__FP13smonitor_desc_R2sM__1((&__a__2sM_1))) };
+        if ( ((signed int )((3<3)!=((signed int )0))) ) {
+            ((void)(__acceptables_5[((signed int )0)].__is_dtor__b_1=0));
+            ((void)(__acceptables_5[((signed int )0)].__anonymous_object202.func=((void (*)())__f3__F_MR2sMMR2sM__1)));
+            ((void)(__acceptables_5[((signed int )0)].__anonymous_object202.list=__monitors_5));
+            ((void)(__acceptables_5[((signed int )0)].__anonymous_object202.size=((signed short int )2)));
+            ((void)(__do_run_5=((_Bool )1)));
+        }
+
+        unsigned long long int __timeout_5 = -1;
+        if ( ((signed int )((4<3)!=((signed int )0))) ) {
+            ((void)(__timeout_5=((unsigned long long int )101)));
+            ((void)(__do_run_5=((_Bool )1)));
+        }
+
+        if ( ((signed int )((5<3)!=((signed int )0))) ) {
+            ((void)(__timeout_5=0));
+            ((void)(__do_run_5=((_Bool )1)));
+        }
+
+        if ( __do_run_5 ) {
+            signed short int __index_5 = -1;
+            struct __waitfor_mask_t __mask_5 = { (&__index_5), __acceptables_5, 1 };
+            ((void)____waitfor_internal__F_RC17s__waitfor_mask_ti__1((&__mask_5), __timeout_5));
+            switch ( __index_5 ) {
+                case 0:
+                    {
+                        ((void)7);
+                    }
+                    break;
+                case -2:
+                    {
+                        ((void)8);
+                    }
+                    break;
+                case -1:
+                    {
+                        ((void)9);
+                    }
+                    break;
+            }
+
+        }
+
+    }
+
+    {
+        struct __acceptable_t __acceptables_6[2];
+        ((void)__builtin_memset(((void *)__acceptables_6), 0, sizeof(__acceptables_6)));
+        _Bool __do_run_6 = 0;
+        struct monitor_desc *__monitors_6[3] = { ((struct monitor_desc *)__get_monitor__FP13smonitor_desc_R2sM__1((&__a__2sM_1))), ((struct monitor_desc *)__get_monitor__FP13smonitor_desc_R2sM__1((&__a__2sM_1))), ((struct monitor_desc *)__get_monitor__FP13smonitor_desc_R2sM__1((&__a__2sM_1))) };
+        if ( ((signed int )((6<3)!=((signed int )0))) ) {
+            ((void)(__acceptables_6[((signed int )0)].__is_dtor__b_1=0));
+            ((void)(__acceptables_6[((signed int )0)].__anonymous_object202.func=((void (*)())__f3__F_MR2sMMR2sMMR2sM__1)));
+            ((void)(__acceptables_6[((signed int )0)].__anonymous_object202.list=__monitors_6));
+            ((void)(__acceptables_6[((signed int )0)].__anonymous_object202.size=((signed short int )3)));
+            ((void)(__do_run_6=((_Bool )1)));
+        }
+
+        struct monitor_desc *__monitors_7[1] = { ((struct monitor_desc *)__get_monitor__FP13smonitor_desc_R2sM__1((&__a__2sM_1))) };
+        if ( ((signed int )((7<3)!=((signed int )0))) ) {
+            ((void)(__acceptables_6[((signed int )1)].__is_dtor__b_1=0));
+            ((void)(__acceptables_6[((signed int )1)].__anonymous_object202.func=((void (*)())__f1__F_MR2sM__1)));
+            ((void)(__acceptables_6[((signed int )1)].__anonymous_object202.list=__monitors_7));
+            ((void)(__acceptables_6[((signed int )1)].__anonymous_object202.size=((signed short int )1)));
+            ((void)(__do_run_6=((_Bool )1)));
+        }
+
+        unsigned long long int __timeout_6 = -1;
+        if ( 1 ) {
+            ((void)(__timeout_6=0));
+            ((void)(__do_run_6=((_Bool )1)));
+        }
+
+        if ( __do_run_6 ) {
+            signed short int __index_6 = -1;
+            struct __waitfor_mask_t __mask_6 = { (&__index_6), __acceptables_6, 2 };
+            ((void)____waitfor_internal__F_RC17s__waitfor_mask_ti__1((&__mask_6), __timeout_6));
+            switch ( __index_6 ) {
+                case 0:
+                    {
+                        ((void)10);
+                    }
+                    break;
+                case 1:
+                    {
+                        ((void)11);
+                    }
+                    break;
+                case -1:
+                    {
+                        ((void)12);
+                    }
+                    break;
+            }
+
+        }
+
+    }
+
+    {
+        struct __acceptable_t __acceptables_7[2];
+        ((void)__builtin_memset(((void *)__acceptables_7), 0, sizeof(__acceptables_7)));
+        _Bool __do_run_7 = 0;
+        struct monitor_desc *__monitors_8[2] = { ((struct monitor_desc *)__get_monitor__FP13smonitor_desc_R2sM__1((&__a__2sM_1))), ((struct monitor_desc *)__get_monitor__FP13smonitor_desc_R2sM__1((&__a__2sM_1))) };
+        if ( ((signed int )((8<3)!=((signed int )0))) ) {
+            ((void)(__acceptables_7[((signed int )0)].__is_dtor__b_1=0));
+            ((void)(__acceptables_7[((signed int )0)].__anonymous_object202.func=((void (*)())__f3__F_MR2sMMR2sM__1)));
+            ((void)(__acceptables_7[((signed int )0)].__anonymous_object202.list=__monitors_8));
+            ((void)(__acceptables_7[((signed int )0)].__anonymous_object202.size=((signed short int )2)));
+            ((void)(__do_run_7=((_Bool )1)));
+        }
+
+        struct monitor_desc *__monitors_9[1] = { ((struct monitor_desc *)__get_monitor__FP13smonitor_desc_R2sM__1((&__a__2sM_1))) };
+        if ( 1 ) {
+            ((void)(__acceptables_7[((signed int )1)].__is_dtor__b_1=0));
+            ((void)(__acceptables_7[((signed int )1)].__anonymous_object202.func=((void (*)())__f1__F_MR2sM__1)));
+            ((void)(__acceptables_7[((signed int )1)].__anonymous_object202.list=__monitors_9));
+            ((void)(__acceptables_7[((signed int )1)].__anonymous_object202.size=((signed short int )1)));
+            ((void)(__do_run_7=((_Bool )1)));
+        }
+
+        unsigned long long int __timeout_7 = -1;
+        if ( ((signed int )((9<3)!=((signed int )0))) ) {
+            ((void)(__timeout_7=((unsigned long long int )102)));
+            ((void)(__do_run_7=((_Bool )1)));
+        }
+
+        if ( __do_run_7 ) {
+            signed short int __index_7 = -1;
+            struct __waitfor_mask_t __mask_7 = { (&__index_7), __acceptables_7, 2 };
+            ((void)____waitfor_internal__F_RC17s__waitfor_mask_ti__1((&__mask_7), __timeout_7));
+            switch ( __index_7 ) {
+                case 0:
+                    {
+                        ((void)13);
+                    }
+                    break;
+                case 1:
+                    {
+                        ((void)14);
+                    }
+                    break;
+                case -2:
+                    {
+                        ((void)15);
+                    }
+                    break;
+            }
+
+        }
+
+    }
+
+    {
+        struct __acceptable_t __acceptables_8[2];
+        ((void)__builtin_memset(((void *)__acceptables_8), 0, sizeof(__acceptables_8)));
+        _Bool __do_run_8 = 0;
+        struct monitor_desc *__monitors_10[1] = { ((struct monitor_desc *)__get_monitor__FP13smonitor_desc_R2sM__1((&__a__2sM_1))) };
+        if ( ((signed int )((10<3)!=((signed int )0))) ) {
+            ((void)(__acceptables_8[((signed int )0)].__is_dtor__b_1=0));
+            ((void)(__acceptables_8[((signed int )0)].__anonymous_object202.func=((void (*)())__f1__F_MR2sM__1)));
+            ((void)(__acceptables_8[((signed int )0)].__anonymous_object202.list=__monitors_10));
+            ((void)(__acceptables_8[((signed int )0)].__anonymous_object202.size=((signed short int )1)));
+            ((void)(__do_run_8=((_Bool )1)));
+        }
+
+        struct monitor_desc *__monitors_11[2] = { ((struct monitor_desc *)__get_monitor__FP13smonitor_desc_R2sM__1((&__a__2sM_1))), ((struct monitor_desc *)__get_monitor__FP13smonitor_desc_R2sM__1((&__a__2sM_1))) };
+        if ( 1 ) {
+            ((void)(__acceptables_8[((signed int )1)].__is_dtor__b_1=0));
+            ((void)(__acceptables_8[((signed int )1)].__anonymous_object202.func=((void (*)())__f2__F_MR2sMMR2sM__1)));
+            ((void)(__acceptables_8[((signed int )1)].__anonymous_object202.list=__monitors_11));
+            ((void)(__acceptables_8[((signed int )1)].__anonymous_object202.size=((signed short int )2)));
+            ((void)(__do_run_8=((_Bool )1)));
+        }
+
+        unsigned long long int __timeout_8 = -1;
+        if ( 1 ) {
+            ((void)(__timeout_8=((unsigned long long int )103)));
+            ((void)(__do_run_8=((_Bool )1)));
+        }
+
+        if ( ((signed int )((11<3)!=((signed int )0))) ) {
+            ((void)(__timeout_8=0));
+            ((void)(__do_run_8=((_Bool )1)));
+        }
+
+        if ( __do_run_8 ) {
+            signed short int __index_8 = -1;
+            struct __waitfor_mask_t __mask_8 = { (&__index_8), __acceptables_8, 2 };
+            ((void)____waitfor_internal__F_RC17s__waitfor_mask_ti__1((&__mask_8), __timeout_8));
+            switch ( __index_8 ) {
+                case 0:
+                    {
+                        ((void)16);
+                    }
+                    break;
+                case 1:
+                    {
+                        ((void)17);
+                    }
+                    break;
+                case -2:
+                    {
+                        ((void)18);
+                    }
+                    break;
+                case -1:
+                    {
+                        ((void)19);
+                    }
+                    break;
+            }
+
+        }
+
+    }
+
+}
+signed int __main__Fi___1(){
+    __attribute__ ((unused)) signed int ___retval_main__i_1;
+    ((void)(___retval_main__i_1=0) /* ?{} */);
+    return ((signed int )___retval_main__i_1);
+}
+__attribute__ ((constructor)) static void _init_sched_ext_parse(void){
+    ((void)___constructor__F_R2sM_autogen___1((&__a__2sM_1)));
+}
+__attribute__ ((destructor)) static void _destroy_sched_ext_parse(void){
+    ((void)___destructor__F_MR2sM_autogen___1((&__a__2sM_1)));
+}
+static inline int invoke_main(int argc, char* argv[], char* envp[]) { (void)argc; (void)argv; (void)envp; return __main__Fi___1(); }
+__attribute__ ((__nothrow__,__leaf__,__malloc__)) extern void *malloc(unsigned int __size);
+__attribute__ ((__nothrow__,__leaf__)) extern void free(void *__ptr);
+__attribute__ ((__nothrow__,__leaf__,__noreturn__)) extern void abort(void);
+__attribute__ ((__nothrow__,__leaf__,__nonnull__(1))) extern signed int atexit(void (*__func)(void));
+__attribute__ ((__nothrow__,__leaf__,__noreturn__)) extern void exit(signed int __status);
+extern signed int printf(const char *__restrict __format, ...);
+static inline signed int invoke_main(signed int argc, char **argv, char **envp);
+signed int main(signed int __argc__i_1, char **__argv__PPc_1, char **__envp__PPc_1){
+    __attribute__ ((unused)) signed int ___retval_main__i_1;
+    signed int _tmp_cp_ret0;
+    ((void)(___retval_main__i_1=(((void)(_tmp_cp_ret0=invoke_main(__argc__i_1, __argv__PPc_1, __envp__PPc_1))) , _tmp_cp_ret0)) /* ?{} */);
+    ((void)(_tmp_cp_ret0) /* ^?{} */);
+    return ((signed int )___retval_main__i_1);
+}
Index: src/tests/.expect/64/sched-ext-parse.txt
===================================================================
--- src/tests/.expect/64/sched-ext-parse.txt	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
+++ src/tests/.expect/64/sched-ext-parse.txt	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -0,0 +1,1599 @@
+__attribute__ ((__nothrow__,__leaf__,__malloc__)) extern void *malloc(unsigned long int __size);
+__attribute__ ((__nothrow__,__leaf__)) extern void free(void *__ptr);
+__attribute__ ((__nothrow__,__leaf__,__noreturn__)) extern void abort(void);
+__attribute__ ((__nothrow__,__leaf__,__nonnull__(1))) extern signed int atexit(void (*__func)(void));
+__attribute__ ((__nothrow__,__leaf__,__noreturn__)) extern void exit(signed int __status);
+extern signed int printf(const char *__restrict __format, ...);
+__attribute__ ((__nothrow__,__leaf__,__noreturn__)) extern void __assert_fail(const char *__assertion, const char *__file, unsigned int __line, const char *__function);
+__attribute__ ((__nothrow__,__leaf__,__noreturn__)) extern void __assert_perror_fail(signed int __errnum, const char *__file, unsigned int __line, const char *__function);
+__attribute__ ((__nothrow__,__leaf__,__noreturn__)) extern void __assert(const char *__assertion, const char *__file, signed int __line);
+__attribute__ ((noreturn,format(printf, 5, 6))) void __assert_fail_f(const char *assertion, const char *file, unsigned int line, const char *function, const char *fmt, ...);
+struct spinlock {
+    volatile signed int lock;
+    const char *prev_name;
+    void *prev_thrd;
+};
+static inline void ___constructor__F_R9sspinlock_autogen___1(struct spinlock *___dst__R9sspinlock_1);
+static inline void ___constructor__F_R9sspinlock9sspinlock_autogen___1(struct spinlock *___dst__R9sspinlock_1, struct spinlock ___src__9sspinlock_1);
+static inline void ___destructor__F_R9sspinlock_autogen___1(struct spinlock *___dst__R9sspinlock_1);
+static inline struct spinlock ___operator_assign__F9sspinlock_R9sspinlock9sspinlock_autogen___1(struct spinlock *___dst__R9sspinlock_1, struct spinlock ___src__9sspinlock_1);
+static inline void ___constructor__F_R9sspinlock_autogen___1(struct spinlock *___dst__R9sspinlock_1){
+    ((void)((*((signed int *)(&(*___dst__R9sspinlock_1).lock)))) /* ?{} */);
+    ((void)((*___dst__R9sspinlock_1).prev_name) /* ?{} */);
+    ((void)((*___dst__R9sspinlock_1).prev_thrd) /* ?{} */);
+}
+static inline void ___constructor__F_R9sspinlock9sspinlock_autogen___1(struct spinlock *___dst__R9sspinlock_1, struct spinlock ___src__9sspinlock_1){
+    ((void)((*((signed int *)(&(*___dst__R9sspinlock_1).lock)))=___src__9sspinlock_1.lock) /* ?{} */);
+    ((void)((*___dst__R9sspinlock_1).prev_name=___src__9sspinlock_1.prev_name) /* ?{} */);
+    ((void)((*___dst__R9sspinlock_1).prev_thrd=___src__9sspinlock_1.prev_thrd) /* ?{} */);
+}
+static inline void ___destructor__F_R9sspinlock_autogen___1(struct spinlock *___dst__R9sspinlock_1){
+    ((void)((*___dst__R9sspinlock_1).prev_thrd) /* ^?{} */);
+    ((void)((*___dst__R9sspinlock_1).prev_name) /* ^?{} */);
+    ((void)((*((signed int *)(&(*___dst__R9sspinlock_1).lock)))) /* ^?{} */);
+}
+static inline struct spinlock ___operator_assign__F9sspinlock_R9sspinlock9sspinlock_autogen___1(struct spinlock *___dst__R9sspinlock_1, struct spinlock ___src__9sspinlock_1){
+    struct spinlock ___ret__9sspinlock_1;
+    ((void)((*___dst__R9sspinlock_1).lock=___src__9sspinlock_1.lock));
+    ((void)((*___dst__R9sspinlock_1).prev_name=___src__9sspinlock_1.prev_name));
+    ((void)((*___dst__R9sspinlock_1).prev_thrd=___src__9sspinlock_1.prev_thrd));
+    ((void)___constructor__F_R9sspinlock9sspinlock_autogen___1((&___ret__9sspinlock_1), ___src__9sspinlock_1));
+    return ((struct spinlock )___ret__9sspinlock_1);
+}
+static inline void ___constructor__F_R9sspinlockVi_autogen___1(struct spinlock *___dst__R9sspinlock_1, volatile signed int __lock__Vi_1){
+    ((void)((*((signed int *)(&(*___dst__R9sspinlock_1).lock)))=__lock__Vi_1) /* ?{} */);
+    ((void)((*___dst__R9sspinlock_1).prev_name) /* ?{} */);
+    ((void)((*___dst__R9sspinlock_1).prev_thrd) /* ?{} */);
+}
+static inline void ___constructor__F_R9sspinlockViPCc_autogen___1(struct spinlock *___dst__R9sspinlock_1, volatile signed int __lock__Vi_1, const char *__prev_name__PCc_1){
+    ((void)((*((signed int *)(&(*___dst__R9sspinlock_1).lock)))=__lock__Vi_1) /* ?{} */);
+    ((void)((*___dst__R9sspinlock_1).prev_name=__prev_name__PCc_1) /* ?{} */);
+    ((void)((*___dst__R9sspinlock_1).prev_thrd) /* ?{} */);
+}
+static inline void ___constructor__F_R9sspinlockViPCcPv_autogen___1(struct spinlock *___dst__R9sspinlock_1, volatile signed int __lock__Vi_1, const char *__prev_name__PCc_1, void *__prev_thrd__Pv_1){
+    ((void)((*((signed int *)(&(*___dst__R9sspinlock_1).lock)))=__lock__Vi_1) /* ?{} */);
+    ((void)((*___dst__R9sspinlock_1).prev_name=__prev_name__PCc_1) /* ?{} */);
+    ((void)((*___dst__R9sspinlock_1).prev_thrd=__prev_thrd__Pv_1) /* ?{} */);
+}
+struct __thread_queue_t {
+    struct thread_desc *head;
+    struct thread_desc **tail;
+};
+static inline void ___constructor__F_R17s__thread_queue_t_autogen___1(struct __thread_queue_t *___dst__R17s__thread_queue_t_1);
+static inline void ___constructor__F_R17s__thread_queue_t17s__thread_queue_t_autogen___1(struct __thread_queue_t *___dst__R17s__thread_queue_t_1, struct __thread_queue_t ___src__17s__thread_queue_t_1);
+static inline void ___destructor__F_R17s__thread_queue_t_autogen___1(struct __thread_queue_t *___dst__R17s__thread_queue_t_1);
+static inline struct __thread_queue_t ___operator_assign__F17s__thread_queue_t_R17s__thread_queue_t17s__thread_queue_t_autogen___1(struct __thread_queue_t *___dst__R17s__thread_queue_t_1, struct __thread_queue_t ___src__17s__thread_queue_t_1);
+static inline void ___constructor__F_R17s__thread_queue_t_autogen___1(struct __thread_queue_t *___dst__R17s__thread_queue_t_1){
+    ((void)((*___dst__R17s__thread_queue_t_1).head) /* ?{} */);
+    ((void)((*___dst__R17s__thread_queue_t_1).tail) /* ?{} */);
+}
+static inline void ___constructor__F_R17s__thread_queue_t17s__thread_queue_t_autogen___1(struct __thread_queue_t *___dst__R17s__thread_queue_t_1, struct __thread_queue_t ___src__17s__thread_queue_t_1){
+    ((void)((*___dst__R17s__thread_queue_t_1).head=___src__17s__thread_queue_t_1.head) /* ?{} */);
+    ((void)((*___dst__R17s__thread_queue_t_1).tail=___src__17s__thread_queue_t_1.tail) /* ?{} */);
+}
+static inline void ___destructor__F_R17s__thread_queue_t_autogen___1(struct __thread_queue_t *___dst__R17s__thread_queue_t_1){
+    ((void)((*___dst__R17s__thread_queue_t_1).tail) /* ^?{} */);
+    ((void)((*___dst__R17s__thread_queue_t_1).head) /* ^?{} */);
+}
+static inline struct __thread_queue_t ___operator_assign__F17s__thread_queue_t_R17s__thread_queue_t17s__thread_queue_t_autogen___1(struct __thread_queue_t *___dst__R17s__thread_queue_t_1, struct __thread_queue_t ___src__17s__thread_queue_t_1){
+    struct __thread_queue_t ___ret__17s__thread_queue_t_1;
+    ((void)((*___dst__R17s__thread_queue_t_1).head=___src__17s__thread_queue_t_1.head));
+    ((void)((*___dst__R17s__thread_queue_t_1).tail=___src__17s__thread_queue_t_1.tail));
+    ((void)___constructor__F_R17s__thread_queue_t17s__thread_queue_t_autogen___1((&___ret__17s__thread_queue_t_1), ___src__17s__thread_queue_t_1));
+    return ((struct __thread_queue_t )___ret__17s__thread_queue_t_1);
+}
+static inline void ___constructor__F_R17s__thread_queue_tP12sthread_desc_autogen___1(struct __thread_queue_t *___dst__R17s__thread_queue_t_1, struct thread_desc *__head__P12sthread_desc_1){
+    ((void)((*___dst__R17s__thread_queue_t_1).head=__head__P12sthread_desc_1) /* ?{} */);
+    ((void)((*___dst__R17s__thread_queue_t_1).tail) /* ?{} */);
+}
+static inline void ___constructor__F_R17s__thread_queue_tP12sthread_descPP12sthread_desc_autogen___1(struct __thread_queue_t *___dst__R17s__thread_queue_t_1, struct thread_desc *__head__P12sthread_desc_1, struct thread_desc **__tail__PP12sthread_desc_1){
+    ((void)((*___dst__R17s__thread_queue_t_1).head=__head__P12sthread_desc_1) /* ?{} */);
+    ((void)((*___dst__R17s__thread_queue_t_1).tail=__tail__PP12sthread_desc_1) /* ?{} */);
+}
+struct __condition_stack_t {
+    struct __condition_criterion_t *top;
+};
+static inline void ___constructor__F_R20s__condition_stack_t_autogen___1(struct __condition_stack_t *___dst__R20s__condition_stack_t_1);
+static inline void ___constructor__F_R20s__condition_stack_t20s__condition_stack_t_autogen___1(struct __condition_stack_t *___dst__R20s__condition_stack_t_1, struct __condition_stack_t ___src__20s__condition_stack_t_1);
+static inline void ___destructor__F_R20s__condition_stack_t_autogen___1(struct __condition_stack_t *___dst__R20s__condition_stack_t_1);
+static inline struct __condition_stack_t ___operator_assign__F20s__condition_stack_t_R20s__condition_stack_t20s__condition_stack_t_autogen___1(struct __condition_stack_t *___dst__R20s__condition_stack_t_1, struct __condition_stack_t ___src__20s__condition_stack_t_1);
+static inline void ___constructor__F_R20s__condition_stack_t_autogen___1(struct __condition_stack_t *___dst__R20s__condition_stack_t_1){
+    ((void)((*___dst__R20s__condition_stack_t_1).top) /* ?{} */);
+}
+static inline void ___constructor__F_R20s__condition_stack_t20s__condition_stack_t_autogen___1(struct __condition_stack_t *___dst__R20s__condition_stack_t_1, struct __condition_stack_t ___src__20s__condition_stack_t_1){
+    ((void)((*___dst__R20s__condition_stack_t_1).top=___src__20s__condition_stack_t_1.top) /* ?{} */);
+}
+static inline void ___destructor__F_R20s__condition_stack_t_autogen___1(struct __condition_stack_t *___dst__R20s__condition_stack_t_1){
+    ((void)((*___dst__R20s__condition_stack_t_1).top) /* ^?{} */);
+}
+static inline struct __condition_stack_t ___operator_assign__F20s__condition_stack_t_R20s__condition_stack_t20s__condition_stack_t_autogen___1(struct __condition_stack_t *___dst__R20s__condition_stack_t_1, struct __condition_stack_t ___src__20s__condition_stack_t_1){
+    struct __condition_stack_t ___ret__20s__condition_stack_t_1;
+    ((void)((*___dst__R20s__condition_stack_t_1).top=___src__20s__condition_stack_t_1.top));
+    ((void)___constructor__F_R20s__condition_stack_t20s__condition_stack_t_autogen___1((&___ret__20s__condition_stack_t_1), ___src__20s__condition_stack_t_1));
+    return ((struct __condition_stack_t )___ret__20s__condition_stack_t_1);
+}
+static inline void ___constructor__F_R20s__condition_stack_tP24s__condition_criterion_t_autogen___1(struct __condition_stack_t *___dst__R20s__condition_stack_t_1, struct __condition_criterion_t *__top__P24s__condition_criterion_t_1){
+    ((void)((*___dst__R20s__condition_stack_t_1).top=__top__P24s__condition_criterion_t_1) /* ?{} */);
+}
+void ___constructor__F_R17s__thread_queue_t__1(struct __thread_queue_t *__anonymous_object0);
+void __append__F_P17s__thread_queue_tP12sthread_desc__1(struct __thread_queue_t *__anonymous_object1, struct thread_desc *__anonymous_object2);
+struct thread_desc *__pop_head__FP12sthread_desc_P17s__thread_queue_t__1(struct __thread_queue_t *__anonymous_object3);
+struct thread_desc *__remove__FP12sthread_desc_P17s__thread_queue_tPP12sthread_desc__1(struct __thread_queue_t *__anonymous_object4, struct thread_desc **__anonymous_object5);
+void ___constructor__F_R20s__condition_stack_t__1(struct __condition_stack_t *__anonymous_object6);
+void __push__F_P20s__condition_stack_tP24s__condition_criterion_t__1(struct __condition_stack_t *__anonymous_object7, struct __condition_criterion_t *__anonymous_object8);
+struct __condition_criterion_t *__pop__FP24s__condition_criterion_t_P20s__condition_stack_t__1(struct __condition_stack_t *__anonymous_object9);
+void ___constructor__F_R9sspinlock__1(struct spinlock *__this__R9sspinlock_1);
+void ___destructor__F_R9sspinlock__1(struct spinlock *__this__R9sspinlock_1);
+struct coStack_t {
+    unsigned int size;
+    void *storage;
+    void *limit;
+    void *base;
+    void *context;
+    void *top;
+    _Bool userStack;
+};
+static inline void ___constructor__F_R10scoStack_t_autogen___1(struct coStack_t *___dst__R10scoStack_t_1);
+static inline void ___constructor__F_R10scoStack_t10scoStack_t_autogen___1(struct coStack_t *___dst__R10scoStack_t_1, struct coStack_t ___src__10scoStack_t_1);
+static inline void ___destructor__F_R10scoStack_t_autogen___1(struct coStack_t *___dst__R10scoStack_t_1);
+static inline struct coStack_t ___operator_assign__F10scoStack_t_R10scoStack_t10scoStack_t_autogen___1(struct coStack_t *___dst__R10scoStack_t_1, struct coStack_t ___src__10scoStack_t_1);
+static inline void ___constructor__F_R10scoStack_t_autogen___1(struct coStack_t *___dst__R10scoStack_t_1){
+    ((void)((*___dst__R10scoStack_t_1).size) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).storage) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).limit) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).base) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).context) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).top) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).userStack) /* ?{} */);
+}
+static inline void ___constructor__F_R10scoStack_t10scoStack_t_autogen___1(struct coStack_t *___dst__R10scoStack_t_1, struct coStack_t ___src__10scoStack_t_1){
+    ((void)((*___dst__R10scoStack_t_1).size=___src__10scoStack_t_1.size) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).storage=___src__10scoStack_t_1.storage) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).limit=___src__10scoStack_t_1.limit) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).base=___src__10scoStack_t_1.base) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).context=___src__10scoStack_t_1.context) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).top=___src__10scoStack_t_1.top) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).userStack=___src__10scoStack_t_1.userStack) /* ?{} */);
+}
+static inline void ___destructor__F_R10scoStack_t_autogen___1(struct coStack_t *___dst__R10scoStack_t_1){
+    ((void)((*___dst__R10scoStack_t_1).userStack) /* ^?{} */);
+    ((void)((*___dst__R10scoStack_t_1).top) /* ^?{} */);
+    ((void)((*___dst__R10scoStack_t_1).context) /* ^?{} */);
+    ((void)((*___dst__R10scoStack_t_1).base) /* ^?{} */);
+    ((void)((*___dst__R10scoStack_t_1).limit) /* ^?{} */);
+    ((void)((*___dst__R10scoStack_t_1).storage) /* ^?{} */);
+    ((void)((*___dst__R10scoStack_t_1).size) /* ^?{} */);
+}
+static inline struct coStack_t ___operator_assign__F10scoStack_t_R10scoStack_t10scoStack_t_autogen___1(struct coStack_t *___dst__R10scoStack_t_1, struct coStack_t ___src__10scoStack_t_1){
+    struct coStack_t ___ret__10scoStack_t_1;
+    ((void)((*___dst__R10scoStack_t_1).size=___src__10scoStack_t_1.size));
+    ((void)((*___dst__R10scoStack_t_1).storage=___src__10scoStack_t_1.storage));
+    ((void)((*___dst__R10scoStack_t_1).limit=___src__10scoStack_t_1.limit));
+    ((void)((*___dst__R10scoStack_t_1).base=___src__10scoStack_t_1.base));
+    ((void)((*___dst__R10scoStack_t_1).context=___src__10scoStack_t_1.context));
+    ((void)((*___dst__R10scoStack_t_1).top=___src__10scoStack_t_1.top));
+    ((void)((*___dst__R10scoStack_t_1).userStack=___src__10scoStack_t_1.userStack));
+    ((void)___constructor__F_R10scoStack_t10scoStack_t_autogen___1((&___ret__10scoStack_t_1), ___src__10scoStack_t_1));
+    return ((struct coStack_t )___ret__10scoStack_t_1);
+}
+static inline void ___constructor__F_R10scoStack_tUi_autogen___1(struct coStack_t *___dst__R10scoStack_t_1, unsigned int __size__Ui_1){
+    ((void)((*___dst__R10scoStack_t_1).size=__size__Ui_1) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).storage) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).limit) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).base) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).context) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).top) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).userStack) /* ?{} */);
+}
+static inline void ___constructor__F_R10scoStack_tUiPv_autogen___1(struct coStack_t *___dst__R10scoStack_t_1, unsigned int __size__Ui_1, void *__storage__Pv_1){
+    ((void)((*___dst__R10scoStack_t_1).size=__size__Ui_1) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).storage=__storage__Pv_1) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).limit) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).base) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).context) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).top) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).userStack) /* ?{} */);
+}
+static inline void ___constructor__F_R10scoStack_tUiPvPv_autogen___1(struct coStack_t *___dst__R10scoStack_t_1, unsigned int __size__Ui_1, void *__storage__Pv_1, void *__limit__Pv_1){
+    ((void)((*___dst__R10scoStack_t_1).size=__size__Ui_1) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).storage=__storage__Pv_1) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).limit=__limit__Pv_1) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).base) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).context) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).top) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).userStack) /* ?{} */);
+}
+static inline void ___constructor__F_R10scoStack_tUiPvPvPv_autogen___1(struct coStack_t *___dst__R10scoStack_t_1, unsigned int __size__Ui_1, void *__storage__Pv_1, void *__limit__Pv_1, void *__base__Pv_1){
+    ((void)((*___dst__R10scoStack_t_1).size=__size__Ui_1) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).storage=__storage__Pv_1) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).limit=__limit__Pv_1) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).base=__base__Pv_1) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).context) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).top) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).userStack) /* ?{} */);
+}
+static inline void ___constructor__F_R10scoStack_tUiPvPvPvPv_autogen___1(struct coStack_t *___dst__R10scoStack_t_1, unsigned int __size__Ui_1, void *__storage__Pv_1, void *__limit__Pv_1, void *__base__Pv_1, void *__context__Pv_1){
+    ((void)((*___dst__R10scoStack_t_1).size=__size__Ui_1) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).storage=__storage__Pv_1) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).limit=__limit__Pv_1) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).base=__base__Pv_1) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).context=__context__Pv_1) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).top) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).userStack) /* ?{} */);
+}
+static inline void ___constructor__F_R10scoStack_tUiPvPvPvPvPv_autogen___1(struct coStack_t *___dst__R10scoStack_t_1, unsigned int __size__Ui_1, void *__storage__Pv_1, void *__limit__Pv_1, void *__base__Pv_1, void *__context__Pv_1, void *__top__Pv_1){
+    ((void)((*___dst__R10scoStack_t_1).size=__size__Ui_1) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).storage=__storage__Pv_1) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).limit=__limit__Pv_1) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).base=__base__Pv_1) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).context=__context__Pv_1) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).top=__top__Pv_1) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).userStack) /* ?{} */);
+}
+static inline void ___constructor__F_R10scoStack_tUiPvPvPvPvPvb_autogen___1(struct coStack_t *___dst__R10scoStack_t_1, unsigned int __size__Ui_1, void *__storage__Pv_1, void *__limit__Pv_1, void *__base__Pv_1, void *__context__Pv_1, void *__top__Pv_1, _Bool __userStack__b_1){
+    ((void)((*___dst__R10scoStack_t_1).size=__size__Ui_1) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).storage=__storage__Pv_1) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).limit=__limit__Pv_1) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).base=__base__Pv_1) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).context=__context__Pv_1) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).top=__top__Pv_1) /* ?{} */);
+    ((void)((*___dst__R10scoStack_t_1).userStack=__userStack__b_1) /* ?{} */);
+}
+enum coroutine_state {
+    Halted,
+    Start,
+    Inactive,
+    Active,
+    Primed,
+};
+struct coroutine_desc {
+    struct coStack_t stack;
+    const char *name;
+    signed int errno_;
+    enum coroutine_state state;
+    struct coroutine_desc *starter;
+    struct coroutine_desc *last;
+};
+struct __waitfor_mask_t {
+    signed short int *accepted;
+    struct __acceptable_t *clauses;
+    signed short int size;
+};
+static inline void ___constructor__F_R17s__waitfor_mask_t_autogen___1(struct __waitfor_mask_t *___dst__R17s__waitfor_mask_t_1);
+static inline void ___constructor__F_R17s__waitfor_mask_t17s__waitfor_mask_t_autogen___1(struct __waitfor_mask_t *___dst__R17s__waitfor_mask_t_1, struct __waitfor_mask_t ___src__17s__waitfor_mask_t_1);
+static inline void ___destructor__F_R17s__waitfor_mask_t_autogen___1(struct __waitfor_mask_t *___dst__R17s__waitfor_mask_t_1);
+static inline struct __waitfor_mask_t ___operator_assign__F17s__waitfor_mask_t_R17s__waitfor_mask_t17s__waitfor_mask_t_autogen___1(struct __waitfor_mask_t *___dst__R17s__waitfor_mask_t_1, struct __waitfor_mask_t ___src__17s__waitfor_mask_t_1);
+static inline void ___constructor__F_R17s__waitfor_mask_t_autogen___1(struct __waitfor_mask_t *___dst__R17s__waitfor_mask_t_1){
+    ((void)((*___dst__R17s__waitfor_mask_t_1).accepted) /* ?{} */);
+    ((void)((*___dst__R17s__waitfor_mask_t_1).clauses) /* ?{} */);
+    ((void)((*___dst__R17s__waitfor_mask_t_1).size) /* ?{} */);
+}
+static inline void ___constructor__F_R17s__waitfor_mask_t17s__waitfor_mask_t_autogen___1(struct __waitfor_mask_t *___dst__R17s__waitfor_mask_t_1, struct __waitfor_mask_t ___src__17s__waitfor_mask_t_1){
+    ((void)((*___dst__R17s__waitfor_mask_t_1).accepted=___src__17s__waitfor_mask_t_1.accepted) /* ?{} */);
+    ((void)((*___dst__R17s__waitfor_mask_t_1).clauses=___src__17s__waitfor_mask_t_1.clauses) /* ?{} */);
+    ((void)((*___dst__R17s__waitfor_mask_t_1).size=___src__17s__waitfor_mask_t_1.size) /* ?{} */);
+}
+static inline void ___destructor__F_R17s__waitfor_mask_t_autogen___1(struct __waitfor_mask_t *___dst__R17s__waitfor_mask_t_1){
+    ((void)((*___dst__R17s__waitfor_mask_t_1).size) /* ^?{} */);
+    ((void)((*___dst__R17s__waitfor_mask_t_1).clauses) /* ^?{} */);
+    ((void)((*___dst__R17s__waitfor_mask_t_1).accepted) /* ^?{} */);
+}
+static inline struct __waitfor_mask_t ___operator_assign__F17s__waitfor_mask_t_R17s__waitfor_mask_t17s__waitfor_mask_t_autogen___1(struct __waitfor_mask_t *___dst__R17s__waitfor_mask_t_1, struct __waitfor_mask_t ___src__17s__waitfor_mask_t_1){
+    struct __waitfor_mask_t ___ret__17s__waitfor_mask_t_1;
+    ((void)((*___dst__R17s__waitfor_mask_t_1).accepted=___src__17s__waitfor_mask_t_1.accepted));
+    ((void)((*___dst__R17s__waitfor_mask_t_1).clauses=___src__17s__waitfor_mask_t_1.clauses));
+    ((void)((*___dst__R17s__waitfor_mask_t_1).size=___src__17s__waitfor_mask_t_1.size));
+    ((void)___constructor__F_R17s__waitfor_mask_t17s__waitfor_mask_t_autogen___1((&___ret__17s__waitfor_mask_t_1), ___src__17s__waitfor_mask_t_1));
+    return ((struct __waitfor_mask_t )___ret__17s__waitfor_mask_t_1);
+}
+static inline void ___constructor__F_R17s__waitfor_mask_tPs_autogen___1(struct __waitfor_mask_t *___dst__R17s__waitfor_mask_t_1, signed short int *__accepted__Ps_1){
+    ((void)((*___dst__R17s__waitfor_mask_t_1).accepted=__accepted__Ps_1) /* ?{} */);
+    ((void)((*___dst__R17s__waitfor_mask_t_1).clauses) /* ?{} */);
+    ((void)((*___dst__R17s__waitfor_mask_t_1).size) /* ?{} */);
+}
+static inline void ___constructor__F_R17s__waitfor_mask_tPsP15s__acceptable_t_autogen___1(struct __waitfor_mask_t *___dst__R17s__waitfor_mask_t_1, signed short int *__accepted__Ps_1, struct __acceptable_t *__clauses__P15s__acceptable_t_1){
+    ((void)((*___dst__R17s__waitfor_mask_t_1).accepted=__accepted__Ps_1) /* ?{} */);
+    ((void)((*___dst__R17s__waitfor_mask_t_1).clauses=__clauses__P15s__acceptable_t_1) /* ?{} */);
+    ((void)((*___dst__R17s__waitfor_mask_t_1).size) /* ?{} */);
+}
+static inline void ___constructor__F_R17s__waitfor_mask_tPsP15s__acceptable_ts_autogen___1(struct __waitfor_mask_t *___dst__R17s__waitfor_mask_t_1, signed short int *__accepted__Ps_1, struct __acceptable_t *__clauses__P15s__acceptable_t_1, signed short int __size__s_1){
+    ((void)((*___dst__R17s__waitfor_mask_t_1).accepted=__accepted__Ps_1) /* ?{} */);
+    ((void)((*___dst__R17s__waitfor_mask_t_1).clauses=__clauses__P15s__acceptable_t_1) /* ?{} */);
+    ((void)((*___dst__R17s__waitfor_mask_t_1).size=__size__s_1) /* ?{} */);
+}
+struct monitor_desc {
+    struct spinlock lock;
+    struct thread_desc *owner;
+    struct __thread_queue_t entry_queue;
+    struct __condition_stack_t signal_stack;
+    unsigned int recursion;
+    struct __waitfor_mask_t mask;
+};
+static inline void ___constructor__F_R13smonitor_desc_autogen___1(struct monitor_desc *___dst__R13smonitor_desc_1);
+static inline void ___constructor__F_R13smonitor_desc13smonitor_desc_autogen___1(struct monitor_desc *___dst__R13smonitor_desc_1, struct monitor_desc ___src__13smonitor_desc_1);
+static inline void ___destructor__F_R13smonitor_desc_autogen___1(struct monitor_desc *___dst__R13smonitor_desc_1);
+static inline struct monitor_desc ___operator_assign__F13smonitor_desc_R13smonitor_desc13smonitor_desc_autogen___1(struct monitor_desc *___dst__R13smonitor_desc_1, struct monitor_desc ___src__13smonitor_desc_1);
+static inline void ___constructor__F_R13smonitor_desc_autogen___1(struct monitor_desc *___dst__R13smonitor_desc_1){
+    ((void)___constructor__F_R9sspinlock__1((&(*___dst__R13smonitor_desc_1).lock)));
+    ((void)((*___dst__R13smonitor_desc_1).owner) /* ?{} */);
+    ((void)___constructor__F_R17s__thread_queue_t__1((&(*___dst__R13smonitor_desc_1).entry_queue)));
+    ((void)___constructor__F_R20s__condition_stack_t__1((&(*___dst__R13smonitor_desc_1).signal_stack)));
+    ((void)((*___dst__R13smonitor_desc_1).recursion) /* ?{} */);
+    ((void)___constructor__F_R17s__waitfor_mask_t_autogen___1((&(*___dst__R13smonitor_desc_1).mask)));
+}
+static inline void ___constructor__F_R13smonitor_desc13smonitor_desc_autogen___1(struct monitor_desc *___dst__R13smonitor_desc_1, struct monitor_desc ___src__13smonitor_desc_1){
+    ((void)___constructor__F_R9sspinlock9sspinlock_autogen___1((&(*___dst__R13smonitor_desc_1).lock), ___src__13smonitor_desc_1.lock));
+    ((void)((*___dst__R13smonitor_desc_1).owner=___src__13smonitor_desc_1.owner) /* ?{} */);
+    ((void)___constructor__F_R17s__thread_queue_t17s__thread_queue_t_autogen___1((&(*___dst__R13smonitor_desc_1).entry_queue), ___src__13smonitor_desc_1.entry_queue));
+    ((void)___constructor__F_R20s__condition_stack_t20s__condition_stack_t_autogen___1((&(*___dst__R13smonitor_desc_1).signal_stack), ___src__13smonitor_desc_1.signal_stack));
+    ((void)((*___dst__R13smonitor_desc_1).recursion=___src__13smonitor_desc_1.recursion) /* ?{} */);
+    ((void)___constructor__F_R17s__waitfor_mask_t17s__waitfor_mask_t_autogen___1((&(*___dst__R13smonitor_desc_1).mask), ___src__13smonitor_desc_1.mask));
+}
+static inline void ___destructor__F_R13smonitor_desc_autogen___1(struct monitor_desc *___dst__R13smonitor_desc_1){
+    ((void)___destructor__F_R17s__waitfor_mask_t_autogen___1((&(*___dst__R13smonitor_desc_1).mask)));
+    ((void)((*___dst__R13smonitor_desc_1).recursion) /* ^?{} */);
+    ((void)___destructor__F_R20s__condition_stack_t_autogen___1((&(*___dst__R13smonitor_desc_1).signal_stack)));
+    ((void)___destructor__F_R17s__thread_queue_t_autogen___1((&(*___dst__R13smonitor_desc_1).entry_queue)));
+    ((void)((*___dst__R13smonitor_desc_1).owner) /* ^?{} */);
+    ((void)___destructor__F_R9sspinlock__1((&(*___dst__R13smonitor_desc_1).lock)));
+}
+static inline struct monitor_desc ___operator_assign__F13smonitor_desc_R13smonitor_desc13smonitor_desc_autogen___1(struct monitor_desc *___dst__R13smonitor_desc_1, struct monitor_desc ___src__13smonitor_desc_1){
+    struct monitor_desc ___ret__13smonitor_desc_1;
+    struct spinlock _tmp_cp0;
+    struct spinlock _tmp_cp_ret0;
+    ((void)(((void)(_tmp_cp_ret0=___operator_assign__F9sspinlock_R9sspinlock9sspinlock_autogen___1((&(*___dst__R13smonitor_desc_1).lock), (((void)___constructor__F_R9sspinlock9sspinlock_autogen___1((&_tmp_cp0), ___src__13smonitor_desc_1.lock)) , _tmp_cp0)))) , _tmp_cp_ret0));
+    ((void)___destructor__F_R9sspinlock__1((&_tmp_cp_ret0)));
+    ((void)___destructor__F_R9sspinlock__1((&_tmp_cp0)));
+    ((void)((*___dst__R13smonitor_desc_1).owner=___src__13smonitor_desc_1.owner));
+    struct __thread_queue_t _tmp_cp1;
+    struct __thread_queue_t _tmp_cp_ret1;
+    ((void)(((void)(_tmp_cp_ret1=___operator_assign__F17s__thread_queue_t_R17s__thread_queue_t17s__thread_queue_t_autogen___1((&(*___dst__R13smonitor_desc_1).entry_queue), (((void)___constructor__F_R17s__thread_queue_t17s__thread_queue_t_autogen___1((&_tmp_cp1), ___src__13smonitor_desc_1.entry_queue)) , _tmp_cp1)))) , _tmp_cp_ret1));
+    ((void)___destructor__F_R17s__thread_queue_t_autogen___1((&_tmp_cp_ret1)));
+    ((void)___destructor__F_R17s__thread_queue_t_autogen___1((&_tmp_cp1)));
+    struct __condition_stack_t _tmp_cp2;
+    struct __condition_stack_t _tmp_cp_ret2;
+    ((void)(((void)(_tmp_cp_ret2=___operator_assign__F20s__condition_stack_t_R20s__condition_stack_t20s__condition_stack_t_autogen___1((&(*___dst__R13smonitor_desc_1).signal_stack), (((void)___constructor__F_R20s__condition_stack_t20s__condition_stack_t_autogen___1((&_tmp_cp2), ___src__13smonitor_desc_1.signal_stack)) , _tmp_cp2)))) , _tmp_cp_ret2));
+    ((void)___destructor__F_R20s__condition_stack_t_autogen___1((&_tmp_cp_ret2)));
+    ((void)___destructor__F_R20s__condition_stack_t_autogen___1((&_tmp_cp2)));
+    ((void)((*___dst__R13smonitor_desc_1).recursion=___src__13smonitor_desc_1.recursion));
+    struct __waitfor_mask_t _tmp_cp3;
+    struct __waitfor_mask_t _tmp_cp_ret3;
+    ((void)(((void)(_tmp_cp_ret3=___operator_assign__F17s__waitfor_mask_t_R17s__waitfor_mask_t17s__waitfor_mask_t_autogen___1((&(*___dst__R13smonitor_desc_1).mask), (((void)___constructor__F_R17s__waitfor_mask_t17s__waitfor_mask_t_autogen___1((&_tmp_cp3), ___src__13smonitor_desc_1.mask)) , _tmp_cp3)))) , _tmp_cp_ret3));
+    ((void)___destructor__F_R17s__waitfor_mask_t_autogen___1((&_tmp_cp_ret3)));
+    ((void)___destructor__F_R17s__waitfor_mask_t_autogen___1((&_tmp_cp3)));
+    ((void)___constructor__F_R13smonitor_desc13smonitor_desc_autogen___1((&___ret__13smonitor_desc_1), ___src__13smonitor_desc_1));
+    return ((struct monitor_desc )___ret__13smonitor_desc_1);
+}
+static inline void ___constructor__F_R13smonitor_desc9sspinlock_autogen___1(struct monitor_desc *___dst__R13smonitor_desc_1, struct spinlock __lock__9sspinlock_1){
+    ((void)___constructor__F_R9sspinlock9sspinlock_autogen___1((&(*___dst__R13smonitor_desc_1).lock), __lock__9sspinlock_1));
+    ((void)((*___dst__R13smonitor_desc_1).owner) /* ?{} */);
+    ((void)___constructor__F_R17s__thread_queue_t__1((&(*___dst__R13smonitor_desc_1).entry_queue)));
+    ((void)___constructor__F_R20s__condition_stack_t__1((&(*___dst__R13smonitor_desc_1).signal_stack)));
+    ((void)((*___dst__R13smonitor_desc_1).recursion) /* ?{} */);
+    ((void)___constructor__F_R17s__waitfor_mask_t_autogen___1((&(*___dst__R13smonitor_desc_1).mask)));
+}
+static inline void ___constructor__F_R13smonitor_desc9sspinlockP12sthread_desc_autogen___1(struct monitor_desc *___dst__R13smonitor_desc_1, struct spinlock __lock__9sspinlock_1, struct thread_desc *__owner__P12sthread_desc_1){
+    ((void)___constructor__F_R9sspinlock9sspinlock_autogen___1((&(*___dst__R13smonitor_desc_1).lock), __lock__9sspinlock_1));
+    ((void)((*___dst__R13smonitor_desc_1).owner=__owner__P12sthread_desc_1) /* ?{} */);
+    ((void)___constructor__F_R17s__thread_queue_t__1((&(*___dst__R13smonitor_desc_1).entry_queue)));
+    ((void)___constructor__F_R20s__condition_stack_t__1((&(*___dst__R13smonitor_desc_1).signal_stack)));
+    ((void)((*___dst__R13smonitor_desc_1).recursion) /* ?{} */);
+    ((void)___constructor__F_R17s__waitfor_mask_t_autogen___1((&(*___dst__R13smonitor_desc_1).mask)));
+}
+static inline void ___constructor__F_R13smonitor_desc9sspinlockP12sthread_desc17s__thread_queue_t_autogen___1(struct monitor_desc *___dst__R13smonitor_desc_1, struct spinlock __lock__9sspinlock_1, struct thread_desc *__owner__P12sthread_desc_1, struct __thread_queue_t __entry_queue__17s__thread_queue_t_1){
+    ((void)___constructor__F_R9sspinlock9sspinlock_autogen___1((&(*___dst__R13smonitor_desc_1).lock), __lock__9sspinlock_1));
+    ((void)((*___dst__R13smonitor_desc_1).owner=__owner__P12sthread_desc_1) /* ?{} */);
+    ((void)___constructor__F_R17s__thread_queue_t17s__thread_queue_t_autogen___1((&(*___dst__R13smonitor_desc_1).entry_queue), __entry_queue__17s__thread_queue_t_1));
+    ((void)___constructor__F_R20s__condition_stack_t__1((&(*___dst__R13smonitor_desc_1).signal_stack)));
+    ((void)((*___dst__R13smonitor_desc_1).recursion) /* ?{} */);
+    ((void)___constructor__F_R17s__waitfor_mask_t_autogen___1((&(*___dst__R13smonitor_desc_1).mask)));
+}
+static inline void ___constructor__F_R13smonitor_desc9sspinlockP12sthread_desc17s__thread_queue_t20s__condition_stack_t_autogen___1(struct monitor_desc *___dst__R13smonitor_desc_1, struct spinlock __lock__9sspinlock_1, struct thread_desc *__owner__P12sthread_desc_1, struct __thread_queue_t __entry_queue__17s__thread_queue_t_1, struct __condition_stack_t __signal_stack__20s__condition_stack_t_1){
+    ((void)___constructor__F_R9sspinlock9sspinlock_autogen___1((&(*___dst__R13smonitor_desc_1).lock), __lock__9sspinlock_1));
+    ((void)((*___dst__R13smonitor_desc_1).owner=__owner__P12sthread_desc_1) /* ?{} */);
+    ((void)___constructor__F_R17s__thread_queue_t17s__thread_queue_t_autogen___1((&(*___dst__R13smonitor_desc_1).entry_queue), __entry_queue__17s__thread_queue_t_1));
+    ((void)___constructor__F_R20s__condition_stack_t20s__condition_stack_t_autogen___1((&(*___dst__R13smonitor_desc_1).signal_stack), __signal_stack__20s__condition_stack_t_1));
+    ((void)((*___dst__R13smonitor_desc_1).recursion) /* ?{} */);
+    ((void)___constructor__F_R17s__waitfor_mask_t_autogen___1((&(*___dst__R13smonitor_desc_1).mask)));
+}
+static inline void ___constructor__F_R13smonitor_desc9sspinlockP12sthread_desc17s__thread_queue_t20s__condition_stack_tUi_autogen___1(struct monitor_desc *___dst__R13smonitor_desc_1, struct spinlock __lock__9sspinlock_1, struct thread_desc *__owner__P12sthread_desc_1, struct __thread_queue_t __entry_queue__17s__thread_queue_t_1, struct __condition_stack_t __signal_stack__20s__condition_stack_t_1, unsigned int __recursion__Ui_1){
+    ((void)___constructor__F_R9sspinlock9sspinlock_autogen___1((&(*___dst__R13smonitor_desc_1).lock), __lock__9sspinlock_1));
+    ((void)((*___dst__R13smonitor_desc_1).owner=__owner__P12sthread_desc_1) /* ?{} */);
+    ((void)___constructor__F_R17s__thread_queue_t17s__thread_queue_t_autogen___1((&(*___dst__R13smonitor_desc_1).entry_queue), __entry_queue__17s__thread_queue_t_1));
+    ((void)___constructor__F_R20s__condition_stack_t20s__condition_stack_t_autogen___1((&(*___dst__R13smonitor_desc_1).signal_stack), __signal_stack__20s__condition_stack_t_1));
+    ((void)((*___dst__R13smonitor_desc_1).recursion=__recursion__Ui_1) /* ?{} */);
+    ((void)___constructor__F_R17s__waitfor_mask_t_autogen___1((&(*___dst__R13smonitor_desc_1).mask)));
+}
+static inline void ___constructor__F_R13smonitor_desc9sspinlockP12sthread_desc17s__thread_queue_t20s__condition_stack_tUi17s__waitfor_mask_t_autogen___1(struct monitor_desc *___dst__R13smonitor_desc_1, struct spinlock __lock__9sspinlock_1, struct thread_desc *__owner__P12sthread_desc_1, struct __thread_queue_t __entry_queue__17s__thread_queue_t_1, struct __condition_stack_t __signal_stack__20s__condition_stack_t_1, unsigned int __recursion__Ui_1, struct __waitfor_mask_t __mask__17s__waitfor_mask_t_1){
+    ((void)___constructor__F_R9sspinlock9sspinlock_autogen___1((&(*___dst__R13smonitor_desc_1).lock), __lock__9sspinlock_1));
+    ((void)((*___dst__R13smonitor_desc_1).owner=__owner__P12sthread_desc_1) /* ?{} */);
+    ((void)___constructor__F_R17s__thread_queue_t17s__thread_queue_t_autogen___1((&(*___dst__R13smonitor_desc_1).entry_queue), __entry_queue__17s__thread_queue_t_1));
+    ((void)___constructor__F_R20s__condition_stack_t20s__condition_stack_t_autogen___1((&(*___dst__R13smonitor_desc_1).signal_stack), __signal_stack__20s__condition_stack_t_1));
+    ((void)((*___dst__R13smonitor_desc_1).recursion=__recursion__Ui_1) /* ?{} */);
+    ((void)___constructor__F_R17s__waitfor_mask_t17s__waitfor_mask_t_autogen___1((&(*___dst__R13smonitor_desc_1).mask), __mask__17s__waitfor_mask_t_1));
+}
+struct __monitor_group_t {
+    struct monitor_desc **list;
+    signed short int size;
+    void (*func)();
+};
+static inline void ___constructor__F_R18s__monitor_group_t_autogen___1(struct __monitor_group_t *___dst__R18s__monitor_group_t_1);
+static inline void ___constructor__F_R18s__monitor_group_t18s__monitor_group_t_autogen___1(struct __monitor_group_t *___dst__R18s__monitor_group_t_1, struct __monitor_group_t ___src__18s__monitor_group_t_1);
+static inline void ___destructor__F_R18s__monitor_group_t_autogen___1(struct __monitor_group_t *___dst__R18s__monitor_group_t_1);
+static inline struct __monitor_group_t ___operator_assign__F18s__monitor_group_t_R18s__monitor_group_t18s__monitor_group_t_autogen___1(struct __monitor_group_t *___dst__R18s__monitor_group_t_1, struct __monitor_group_t ___src__18s__monitor_group_t_1);
+static inline void ___constructor__F_R18s__monitor_group_t_autogen___1(struct __monitor_group_t *___dst__R18s__monitor_group_t_1){
+    ((void)((*___dst__R18s__monitor_group_t_1).list) /* ?{} */);
+    ((void)((*___dst__R18s__monitor_group_t_1).size) /* ?{} */);
+    ((void)((*___dst__R18s__monitor_group_t_1).func) /* ?{} */);
+}
+static inline void ___constructor__F_R18s__monitor_group_t18s__monitor_group_t_autogen___1(struct __monitor_group_t *___dst__R18s__monitor_group_t_1, struct __monitor_group_t ___src__18s__monitor_group_t_1){
+    ((void)((*___dst__R18s__monitor_group_t_1).list=___src__18s__monitor_group_t_1.list) /* ?{} */);
+    ((void)((*___dst__R18s__monitor_group_t_1).size=___src__18s__monitor_group_t_1.size) /* ?{} */);
+    ((void)((*___dst__R18s__monitor_group_t_1).func=___src__18s__monitor_group_t_1.func) /* ?{} */);
+}
+static inline void ___destructor__F_R18s__monitor_group_t_autogen___1(struct __monitor_group_t *___dst__R18s__monitor_group_t_1){
+    ((void)((*___dst__R18s__monitor_group_t_1).func) /* ^?{} */);
+    ((void)((*___dst__R18s__monitor_group_t_1).size) /* ^?{} */);
+    ((void)((*___dst__R18s__monitor_group_t_1).list) /* ^?{} */);
+}
+static inline struct __monitor_group_t ___operator_assign__F18s__monitor_group_t_R18s__monitor_group_t18s__monitor_group_t_autogen___1(struct __monitor_group_t *___dst__R18s__monitor_group_t_1, struct __monitor_group_t ___src__18s__monitor_group_t_1){
+    struct __monitor_group_t ___ret__18s__monitor_group_t_1;
+    ((void)((*___dst__R18s__monitor_group_t_1).list=___src__18s__monitor_group_t_1.list));
+    ((void)((*___dst__R18s__monitor_group_t_1).size=___src__18s__monitor_group_t_1.size));
+    ((void)((*___dst__R18s__monitor_group_t_1).func=___src__18s__monitor_group_t_1.func));
+    ((void)___constructor__F_R18s__monitor_group_t18s__monitor_group_t_autogen___1((&___ret__18s__monitor_group_t_1), ___src__18s__monitor_group_t_1));
+    return ((struct __monitor_group_t )___ret__18s__monitor_group_t_1);
+}
+static inline void ___constructor__F_R18s__monitor_group_tPP13smonitor_desc_autogen___1(struct __monitor_group_t *___dst__R18s__monitor_group_t_1, struct monitor_desc **__list__PP13smonitor_desc_1){
+    ((void)((*___dst__R18s__monitor_group_t_1).list=__list__PP13smonitor_desc_1) /* ?{} */);
+    ((void)((*___dst__R18s__monitor_group_t_1).size) /* ?{} */);
+    ((void)((*___dst__R18s__monitor_group_t_1).func) /* ?{} */);
+}
+static inline void ___constructor__F_R18s__monitor_group_tPP13smonitor_descs_autogen___1(struct __monitor_group_t *___dst__R18s__monitor_group_t_1, struct monitor_desc **__list__PP13smonitor_desc_1, signed short int __size__s_1){
+    ((void)((*___dst__R18s__monitor_group_t_1).list=__list__PP13smonitor_desc_1) /* ?{} */);
+    ((void)((*___dst__R18s__monitor_group_t_1).size=__size__s_1) /* ?{} */);
+    ((void)((*___dst__R18s__monitor_group_t_1).func) /* ?{} */);
+}
+static inline void ___constructor__F_R18s__monitor_group_tPP13smonitor_descsPF___autogen___1(struct __monitor_group_t *___dst__R18s__monitor_group_t_1, struct monitor_desc **__list__PP13smonitor_desc_1, signed short int __size__s_1, void (*__func__PF___1)()){
+    ((void)((*___dst__R18s__monitor_group_t_1).list=__list__PP13smonitor_desc_1) /* ?{} */);
+    ((void)((*___dst__R18s__monitor_group_t_1).size=__size__s_1) /* ?{} */);
+    ((void)((*___dst__R18s__monitor_group_t_1).func=__func__PF___1) /* ?{} */);
+}
+struct thread_desc {
+    struct coroutine_desc self_cor;
+    struct monitor_desc self_mon;
+    struct monitor_desc *self_mon_p;
+    struct __monitor_group_t monitors;
+    struct thread_desc *next;
+};
+static inline struct monitor_desc *___operator_index__FP13smonitor_desc_RC18s__monitor_group_tl__1(const struct __monitor_group_t *__this__RC18s__monitor_group_t_1, signed long int __index__l_1){
+    __attribute__ ((unused)) struct monitor_desc *___retval__operator_index__P13smonitor_desc_1;
+    ((void)(___retval__operator_index__P13smonitor_desc_1=(*__this__RC18s__monitor_group_t_1).list[__index__l_1]) /* ?{} */);
+    return ((struct monitor_desc *)___retval__operator_index__P13smonitor_desc_1);
+}
+static inline _Bool ___operator_equal__Fb_RC18s__monitor_group_tRC18s__monitor_group_t__1(const struct __monitor_group_t *__lhs__RC18s__monitor_group_t_1, const struct __monitor_group_t *__rhs__RC18s__monitor_group_t_1){
+    __attribute__ ((unused)) _Bool ___retval__operator_equal__b_1;
+    if ( ((signed int )((((*__lhs__RC18s__monitor_group_t_1).list!=((struct monitor_desc **)0))!=((*__rhs__RC18s__monitor_group_t_1).list!=((struct monitor_desc **)0)))!=((signed int )0))) ) {
+        ((void)(___retval__operator_equal__b_1=((_Bool )0)) /* ?{} */);
+        return ((_Bool )___retval__operator_equal__b_1);
+    }
+
+    if ( ((signed int )(((*__lhs__RC18s__monitor_group_t_1).size!=(*__rhs__RC18s__monitor_group_t_1).size)!=((signed int )0))) ) {
+        ((void)(___retval__operator_equal__b_1=((_Bool )0)) /* ?{} */);
+        return ((_Bool )___retval__operator_equal__b_1);
+    }
+
+    if ( ((signed int )(((*__lhs__RC18s__monitor_group_t_1).func!=(*__rhs__RC18s__monitor_group_t_1).func)!=((signed int )0))) ) {
+        ((void)(___retval__operator_equal__b_1=((_Bool )0)) /* ?{} */);
+        return ((_Bool )___retval__operator_equal__b_1);
+    }
+
+    {
+        signed int __i__i_3 = ((signed int )0);
+        for (;((signed int )((__i__i_3<((signed int )(*__lhs__RC18s__monitor_group_t_1).size))!=((signed int )0)));((void)__i__i_3++)) {
+            struct monitor_desc *_tmp_cp_ret4;
+            struct monitor_desc *_tmp_cp_ret5;
+            if ( ((signed int )(((((void)(_tmp_cp_ret4=___operator_index__FP13smonitor_desc_RC18s__monitor_group_tl__1(__lhs__RC18s__monitor_group_t_1, ((signed long int )__i__i_3)))) , _tmp_cp_ret4)!=(((void)(_tmp_cp_ret5=___operator_index__FP13smonitor_desc_RC18s__monitor_group_tl__1(__rhs__RC18s__monitor_group_t_1, ((signed long int )__i__i_3)))) , _tmp_cp_ret5))!=((signed int )0))) ) {
+                ((void)(___retval__operator_equal__b_1=((_Bool )0)) /* ?{} */);
+                return ((_Bool )___retval__operator_equal__b_1);
+            }
+
+            ((void)(_tmp_cp_ret4) /* ^?{} */);
+            ((void)(_tmp_cp_ret5) /* ^?{} */);
+        }
+
+    }
+
+    ((void)(___retval__operator_equal__b_1=((_Bool )1)) /* ?{} */);
+    return ((_Bool )___retval__operator_equal__b_1);
+}
+static inline void *__malloc__A0_1_0_0__FPd0___1(__attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT){
+    __attribute__ ((unused)) void *___retval_malloc__P2tT_1;
+    void *_tmp_cp_ret6;
+    ((void)(___retval_malloc__P2tT_1=((void *)((void *)(((void)(_tmp_cp_ret6=malloc(((unsigned long int )_sizeof_2tT)))) , _tmp_cp_ret6)))) /* ?{} */);
+    ((void)(_tmp_cp_ret6) /* ^?{} */);
+    return ((void *)___retval_malloc__P2tT_1);
+}
+void *calloc(unsigned long int dim, unsigned long int size);
+static inline void *__calloc__A0_1_0_0__FPd0_Ul__1(__attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT, unsigned long int __dim__Ul_1){
+    __attribute__ ((unused)) void *___retval_calloc__P2tT_1;
+    void *_tmp_cp_ret7;
+    ((void)(___retval_calloc__P2tT_1=((void *)((void *)(((void)(_tmp_cp_ret7=calloc(__dim__Ul_1, _sizeof_2tT))) , _tmp_cp_ret7)))) /* ?{} */);
+    ((void)(_tmp_cp_ret7) /* ^?{} */);
+    return ((void *)___retval_calloc__P2tT_1);
+}
+void *realloc(void *ptr, unsigned long int size);
+static inline void *__realloc__A0_1_0_0__FPd0_Pd0Ul__1(__attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT, void *__ptr__P2tT_1, unsigned long int __size__Ul_1){
+    __attribute__ ((unused)) void *___retval_realloc__P2tT_1;
+    void *_tmp_cp_ret8;
+    ((void)(___retval_realloc__P2tT_1=((void *)((void *)(((void)(_tmp_cp_ret8=realloc(((void *)__ptr__P2tT_1), __size__Ul_1))) , _tmp_cp_ret8)))) /* ?{} */);
+    ((void)(_tmp_cp_ret8) /* ^?{} */);
+    return ((void *)___retval_realloc__P2tT_1);
+}
+void *memalign(unsigned long int align, unsigned long int size);
+static inline void *__memalign__A0_1_0_0__FPd0_Ul__1(__attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT, unsigned long int __align__Ul_1){
+    __attribute__ ((unused)) void *___retval_memalign__P2tT_1;
+    void *_tmp_cp_ret9;
+    ((void)(___retval_memalign__P2tT_1=((void *)(((void)(_tmp_cp_ret9=memalign(__align__Ul_1, _sizeof_2tT))) , _tmp_cp_ret9))) /* ?{} */);
+    ((void)(_tmp_cp_ret9) /* ^?{} */);
+    return ((void *)___retval_memalign__P2tT_1);
+}
+static inline void *__aligned_alloc__A0_1_0_0__FPd0_Ul__1(__attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT, unsigned long int __align__Ul_1){
+    __attribute__ ((unused)) void *___retval_aligned_alloc__P2tT_1;
+    void *_tmp_cp_ret10;
+    ((void)(___retval_aligned_alloc__P2tT_1=((void *)(((void)(_tmp_cp_ret10=memalign(__align__Ul_1, _sizeof_2tT))) , _tmp_cp_ret10))) /* ?{} */);
+    ((void)(_tmp_cp_ret10) /* ^?{} */);
+    return ((void *)___retval_aligned_alloc__P2tT_1);
+}
+signed int posix_memalign(void **ptr, unsigned long int align, unsigned long int size);
+static inline signed int __posix_memalign__A0_1_0_0__Fi_PPd0Ul__1(__attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT, void **__ptr__PP2tT_1, unsigned long int __align__Ul_1){
+    __attribute__ ((unused)) signed int ___retval_posix_memalign__i_1;
+    signed int _tmp_cp_ret11;
+    ((void)(___retval_posix_memalign__i_1=(((void)(_tmp_cp_ret11=posix_memalign(((void **)__ptr__PP2tT_1), __align__Ul_1, _sizeof_2tT))) , _tmp_cp_ret11)) /* ?{} */);
+    ((void)(_tmp_cp_ret11) /* ^?{} */);
+    return ((signed int )___retval_posix_memalign__i_1);
+}
+void *memset(void *dest, signed int c, unsigned long int size);
+static inline void *__alloc__A0_1_0_0__FPd0___1(__attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT){
+    __attribute__ ((unused)) void *___retval_alloc__P2tT_1;
+    void *_tmp_cp_ret12;
+    ((void)(___retval_alloc__P2tT_1=((void *)((void *)(((void)(_tmp_cp_ret12=malloc(((unsigned long int )_sizeof_2tT)))) , _tmp_cp_ret12)))) /* ?{} */);
+    ((void)(_tmp_cp_ret12) /* ^?{} */);
+    return ((void *)___retval_alloc__P2tT_1);
+}
+static inline void *__alloc__A0_1_0_0__FPd0_c__1(__attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT, char __fill__c_1){
+    __attribute__ ((unused)) void *___retval_alloc__P2tT_1;
+    void *_tmp_cp_ret13;
+    void *__ptr__P2tT_2 = ((void *)((void *)((void *)(((void)(_tmp_cp_ret13=malloc(((unsigned long int )_sizeof_2tT)))) , _tmp_cp_ret13))));
+    ((void)(_tmp_cp_ret13) /* ^?{} */);
+    void *_tmp_cp_ret14;
+    ((void)(___retval_alloc__P2tT_1=(((void)(_tmp_cp_ret14=memset(((void *)__ptr__P2tT_2), ((signed int )__fill__c_1), _sizeof_2tT))) , _tmp_cp_ret14)) /* ?{} */);
+    ((void)(_tmp_cp_ret14) /* ^?{} */);
+    return ((void *)___retval_alloc__P2tT_1);
+}
+static inline void *__alloc__A0_1_0_0__FPd0_Ul__1(__attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT, unsigned long int __dim__Ul_1){
+    __attribute__ ((unused)) void *___retval_alloc__P2tT_1;
+    void *_tmp_cp_ret15;
+    ((void)(___retval_alloc__P2tT_1=((void *)((void *)(((void)(_tmp_cp_ret15=malloc((__dim__Ul_1*((unsigned long int )_sizeof_2tT))))) , _tmp_cp_ret15)))) /* ?{} */);
+    ((void)(_tmp_cp_ret15) /* ^?{} */);
+    return ((void *)___retval_alloc__P2tT_1);
+}
+static inline void *__alloc__A0_1_0_0__FPd0_Ulc__1(__attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT, unsigned long int __dim__Ul_1, char __fill__c_1){
+    __attribute__ ((unused)) void *___retval_alloc__P2tT_1;
+    void *_tmp_cp_ret16;
+    void *__ptr__P2tT_2 = ((void *)((void *)((void *)(((void)(_tmp_cp_ret16=malloc((__dim__Ul_1*((unsigned long int )_sizeof_2tT))))) , _tmp_cp_ret16))));
+    ((void)(_tmp_cp_ret16) /* ^?{} */);
+    void *_tmp_cp_ret17;
+    ((void)(___retval_alloc__P2tT_1=(((void)(_tmp_cp_ret17=memset(((void *)__ptr__P2tT_2), ((signed int )__fill__c_1), (__dim__Ul_1*_sizeof_2tT)))) , _tmp_cp_ret17)) /* ?{} */);
+    ((void)(_tmp_cp_ret17) /* ^?{} */);
+    return ((void *)___retval_alloc__P2tT_1);
+}
+static inline void *__alloc__A0_1_0_0__FPd0_Pd0Ul__1(__attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT, void *__ptr__P2tT_1, unsigned long int __dim__Ul_1){
+    __attribute__ ((unused)) void *___retval_alloc__P2tT_1;
+    void *_tmp_cp_ret18;
+    ((void)(___retval_alloc__P2tT_1=((void *)(((void)(_tmp_cp_ret18=realloc(((void *)__ptr__P2tT_1), (__dim__Ul_1*((unsigned long int )_sizeof_2tT))))) , _tmp_cp_ret18))) /* ?{} */);
+    ((void)(_tmp_cp_ret18) /* ^?{} */);
+    return ((void *)___retval_alloc__P2tT_1);
+}
+void *__alloc__A0_1_0_0__FPd0_Pd0Ulc__1(__attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT, void *__ptr__P2tT_1, unsigned long int __dim__Ul_1, char __fill__c_1);
+static inline void *__align_alloc__A0_1_0_0__FPd0_Ul__1(__attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT, unsigned long int __align__Ul_1){
+    __attribute__ ((unused)) void *___retval_align_alloc__P2tT_1;
+    void *_tmp_cp_ret19;
+    ((void)(___retval_align_alloc__P2tT_1=((void *)(((void)(_tmp_cp_ret19=memalign(__align__Ul_1, _sizeof_2tT))) , _tmp_cp_ret19))) /* ?{} */);
+    ((void)(_tmp_cp_ret19) /* ^?{} */);
+    return ((void *)___retval_align_alloc__P2tT_1);
+}
+static inline void *__align_alloc__A0_1_0_0__FPd0_Ulc__1(__attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT, unsigned long int __align__Ul_1, char __fill__c_1){
+    __attribute__ ((unused)) void *___retval_align_alloc__P2tT_1;
+    void *_tmp_cp_ret20;
+    void *__ptr__P2tT_2 = ((void *)((void *)(((void)(_tmp_cp_ret20=memalign(__align__Ul_1, _sizeof_2tT))) , _tmp_cp_ret20)));
+    ((void)(_tmp_cp_ret20) /* ^?{} */);
+    void *_tmp_cp_ret21;
+    ((void)(___retval_align_alloc__P2tT_1=(((void)(_tmp_cp_ret21=memset(((void *)__ptr__P2tT_2), ((signed int )__fill__c_1), _sizeof_2tT))) , _tmp_cp_ret21)) /* ?{} */);
+    ((void)(_tmp_cp_ret21) /* ^?{} */);
+    return ((void *)___retval_align_alloc__P2tT_1);
+}
+static inline void *__align_alloc__A0_1_0_0__FPd0_UlUl__1(__attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT, unsigned long int __align__Ul_1, unsigned long int __dim__Ul_1){
+    __attribute__ ((unused)) void *___retval_align_alloc__P2tT_1;
+    void *_tmp_cp_ret22;
+    ((void)(___retval_align_alloc__P2tT_1=((void *)(((void)(_tmp_cp_ret22=memalign(__align__Ul_1, (__dim__Ul_1*_sizeof_2tT)))) , _tmp_cp_ret22))) /* ?{} */);
+    ((void)(_tmp_cp_ret22) /* ^?{} */);
+    return ((void *)___retval_align_alloc__P2tT_1);
+}
+static inline void *__align_alloc__A0_1_0_0__FPd0_UlUlc__1(__attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT, unsigned long int __align__Ul_1, unsigned long int __dim__Ul_1, char __fill__c_1){
+    __attribute__ ((unused)) void *___retval_align_alloc__P2tT_1;
+    void *_tmp_cp_ret23;
+    void *__ptr__P2tT_2 = ((void *)((void *)(((void)(_tmp_cp_ret23=memalign(__align__Ul_1, (__dim__Ul_1*_sizeof_2tT)))) , _tmp_cp_ret23)));
+    ((void)(_tmp_cp_ret23) /* ^?{} */);
+    void *_tmp_cp_ret24;
+    ((void)(___retval_align_alloc__P2tT_1=(((void)(_tmp_cp_ret24=memset(((void *)__ptr__P2tT_2), ((signed int )__fill__c_1), (__dim__Ul_1*_sizeof_2tT)))) , _tmp_cp_ret24)) /* ?{} */);
+    ((void)(_tmp_cp_ret24) /* ^?{} */);
+    return ((void *)___retval_align_alloc__P2tT_1);
+}
+static inline void *__memset__A0_1_0_0__FPd0_Pd0c__1(__attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT, void *__dest__P2tT_1, char __c__c_1){
+    __attribute__ ((unused)) void *___retval_memset__P2tT_1;
+    void *_tmp_cp_ret25;
+    ((void)(___retval_memset__P2tT_1=(((void)(_tmp_cp_ret25=memset(((void *)__dest__P2tT_1), ((signed int )__c__c_1), _sizeof_2tT))) , _tmp_cp_ret25)) /* ?{} */);
+    ((void)(_tmp_cp_ret25) /* ^?{} */);
+    return ((void *)___retval_memset__P2tT_1);
+}
+void *memcpy(void *dest, const void *src, unsigned long int size);
+static inline void *__memcpy__A0_1_0_0__FPd0_Pd0PCd0__1(__attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT, void *__dest__P2tT_1, const void *__src__PC2tT_1){
+    __attribute__ ((unused)) void *___retval_memcpy__P2tT_1;
+    void *_tmp_cp_ret26;
+    ((void)(___retval_memcpy__P2tT_1=(((void)(_tmp_cp_ret26=memcpy(((void *)__dest__P2tT_1), ((const void *)__src__PC2tT_1), _sizeof_2tT))) , _tmp_cp_ret26)) /* ?{} */);
+    ((void)(_tmp_cp_ret26) /* ^?{} */);
+    return ((void *)___retval_memcpy__P2tT_1);
+}
+static inline void *__memset__A0_1_0_0__FPd0_Pd0Ulc__1(__attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT, void *__dest__P2tT_1, unsigned long int __dim__Ul_1, char __c__c_1){
+    __attribute__ ((unused)) void *___retval_memset__P2tT_1;
+    void *_tmp_cp_ret27;
+    ((void)(___retval_memset__P2tT_1=((void *)(((void)(_tmp_cp_ret27=memset(((void *)__dest__P2tT_1), ((signed int )__c__c_1), (__dim__Ul_1*_sizeof_2tT)))) , _tmp_cp_ret27))) /* ?{} */);
+    ((void)(_tmp_cp_ret27) /* ^?{} */);
+    return ((void *)___retval_memset__P2tT_1);
+}
+static inline void *__memcpy__A0_1_0_0__FPd0_Pd0PCd0Ul__1(__attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT, void *__dest__P2tT_1, const void *__src__PC2tT_1, unsigned long int __dim__Ul_1){
+    __attribute__ ((unused)) void *___retval_memcpy__P2tT_1;
+    void *_tmp_cp_ret28;
+    ((void)(___retval_memcpy__P2tT_1=((void *)(((void)(_tmp_cp_ret28=memcpy(((void *)__dest__P2tT_1), ((const void *)__src__PC2tT_1), (__dim__Ul_1*_sizeof_2tT)))) , _tmp_cp_ret28))) /* ?{} */);
+    ((void)(_tmp_cp_ret28) /* ^?{} */);
+    return ((void *)___retval_memcpy__P2tT_1);
+}
+void *__new__A0_1_0_1____constructor__PF_Rd0tVARGS1__FPd0_tVARGS1__1(__attribute__ ((unused)) void (*_adapterF_P2tT7tParams__MP)(void (*__anonymous_object10)(), void *__anonymous_object11, void *__anonymous_object12), __attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT, __attribute__ ((unused)) unsigned long int _sizeof_7tParams, __attribute__ ((unused)) unsigned long int _alignof_7tParams, __attribute__ ((unused)) void (*___constructor__PF_R2tT7tParams__1)(void *__anonymous_object13, void *__anonymous_object14), void *__p__7tParams_1);
+void __delete__A0_1_0_0____destructor__PF_Rd0__F_Pd0__1(__attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT, __attribute__ ((unused)) void (*___destructor__PF_R2tT__1)(void *__anonymous_object15), void *__ptr__P2tT_1);
+void __delete__A0_1_0_1____destructor__PF_Rd0___delete__PF_tVARGS1__F_Pd0tVARGS1__1(__attribute__ ((unused)) void (*_adapterF_7tParams__P)(void (*__anonymous_object16)(), void *__anonymous_object17), __attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT, __attribute__ ((unused)) unsigned long int _sizeof_7tParams, __attribute__ ((unused)) unsigned long int _alignof_7tParams, __attribute__ ((unused)) void (*___destructor__PF_R2tT__1)(void *__anonymous_object18), __attribute__ ((unused)) void (*__delete__PF_7tParams__1)(void *__anonymous_object19), void *__ptr__P2tT_1, void *__rest__7tParams_1);
+void *__anew__A0_1_0_1____constructor__PF_Rd0tVARGS1__FPd0_UltVARGS1__1(__attribute__ ((unused)) void (*_adapterF_P2tT7tParams__MP)(void (*__anonymous_object20)(), void *__anonymous_object21, void *__anonymous_object22), __attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT, __attribute__ ((unused)) unsigned long int _sizeof_7tParams, __attribute__ ((unused)) unsigned long int _alignof_7tParams, __attribute__ ((unused)) void (*___constructor__PF_R2tT7tParams__1)(void *__anonymous_object23, void *__anonymous_object24), unsigned long int __dim__Ul_1, void *__p__7tParams_1);
+void __adelete__A0_1_0_0____destructor__PF_Rd0__F_UlPd0__1(__attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT, __attribute__ ((unused)) void (*___destructor__PF_R2tT__1)(void *__anonymous_object25), unsigned long int __dim__Ul_1, void *__arr__P2tT_1);
+void __adelete__A0_1_0_1____destructor__PF_Rd0___adelete__PF_tVARGS1__F_UlPd0tVARGS1__1(__attribute__ ((unused)) void (*_adapterF_7tParams__P)(void (*__anonymous_object26)(), void *__anonymous_object27), __attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT, __attribute__ ((unused)) unsigned long int _sizeof_7tParams, __attribute__ ((unused)) unsigned long int _alignof_7tParams, __attribute__ ((unused)) void (*___destructor__PF_R2tT__1)(void *__anonymous_object28), __attribute__ ((unused)) void (*__adelete__PF_7tParams__1)(void *__anonymous_object29), unsigned long int __dim__Ul_1, void *__arr__P2tT_1, void *__rest__7tParams_1);
+signed int __ato__Fi_PCc__1(const char *__ptr__PCc_1);
+unsigned int __ato__FUi_PCc__1(const char *__ptr__PCc_1);
+signed long int __ato__Fl_PCc__1(const char *__ptr__PCc_1);
+unsigned long int __ato__FUl_PCc__1(const char *__ptr__PCc_1);
+signed long long int __ato__Fq_PCc__1(const char *__ptr__PCc_1);
+unsigned long long int __ato__FUq_PCc__1(const char *__ptr__PCc_1);
+float __ato__Ff_PCc__1(const char *__ptr__PCc_1);
+double __ato__Fd_PCc__1(const char *__ptr__PCc_1);
+long double __ato__Fr_PCc__1(const char *__ptr__PCc_1);
+float _Complex __ato__FXf_PCc__1(const char *__ptr__PCc_1);
+double _Complex __ato__FXd_PCc__1(const char *__ptr__PCc_1);
+long double _Complex __ato__FXr_PCc__1(const char *__ptr__PCc_1);
+signed int __strto__Fi_PCcPPci__1(const char *__sptr__PCc_1, char **__eptr__PPc_1, signed int __base__i_1);
+unsigned int __strto__FUi_PCcPPci__1(const char *__sptr__PCc_1, char **__eptr__PPc_1, signed int __base__i_1);
+signed long int __strto__Fl_PCcPPci__1(const char *__sptr__PCc_1, char **__eptr__PPc_1, signed int __base__i_1);
+unsigned long int __strto__FUl_PCcPPci__1(const char *__sptr__PCc_1, char **__eptr__PPc_1, signed int __base__i_1);
+signed long long int __strto__Fq_PCcPPci__1(const char *__sptr__PCc_1, char **__eptr__PPc_1, signed int __base__i_1);
+unsigned long long int __strto__FUq_PCcPPci__1(const char *__sptr__PCc_1, char **__eptr__PPc_1, signed int __base__i_1);
+float __strto__Ff_PCcPPc__1(const char *__sptr__PCc_1, char **__eptr__PPc_1);
+double __strto__Fd_PCcPPc__1(const char *__sptr__PCc_1, char **__eptr__PPc_1);
+long double __strto__Fr_PCcPPc__1(const char *__sptr__PCc_1, char **__eptr__PPc_1);
+float _Complex __strto__FXf_PCcPPc__1(const char *__sptr__PCc_1, char **__eptr__PPc_1);
+double _Complex __strto__FXd_PCcPPc__1(const char *__sptr__PCc_1, char **__eptr__PPc_1);
+long double _Complex __strto__FXr_PCcPPc__1(const char *__sptr__PCc_1, char **__eptr__PPc_1);
+void *__bsearch__A1_0_0_0____operator_assign__PFt0_Rt0t0____constructor__PF_Rt0____constructor__PF_Rt0t0____destructor__PF_Rt0____operator_less__PFi_t0t0__FPt0_t0PCt0Ul__1(__attribute__ ((unused)) signed int (*_adapterFi_2tT2tT_M_PP)(void (*__anonymous_object30)(), void *__anonymous_object31, void *__anonymous_object32), __attribute__ ((unused)) void (*_adapterF_P2tT2tT__MP)(void (*__anonymous_object33)(), void *__anonymous_object34, void *__anonymous_object35), __attribute__ ((unused)) void (*_adapterF2tT_P2tT2tT_P_MP)(void (*__anonymous_object36)(), __attribute__ ((unused)) void *___retval__operator_assign__2tT_1, void *__anonymous_object37, void *__anonymous_object38), __attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT, __attribute__ ((unused)) void *(*___operator_assign__PF2tT_R2tT2tT__1)(void *__anonymous_object39, void *__anonymous_object40), __attribute__ ((unused)) void (*___constructor__PF_R2tT__1)(void *__anonymous_object41), __attribute__ ((unused)) void (*___constructor__PF_R2tT2tT__1)(void *__anonymous_object42, void *__anonymous_object43), __attribute__ ((unused)) void (*___destructor__PF_R2tT__1)(void *__anonymous_object44), __attribute__ ((unused)) signed int (*___operator_less__PFi_2tT2tT__1)(void *__anonymous_object45, void *__anonymous_object46), void *__key__2tT_1, const void *__arr__PC2tT_1, unsigned long int __dim__Ul_1);
+unsigned int __bsearch__A1_0_0_0____operator_assign__PFt0_Rt0t0____constructor__PF_Rt0____constructor__PF_Rt0t0____destructor__PF_Rt0____operator_less__PFi_t0t0__FUi_t0PCt0Ul__1(__attribute__ ((unused)) signed int (*_adapterFi_2tT2tT_M_PP)(void (*__anonymous_object47)(), void *__anonymous_object48, void *__anonymous_object49), __attribute__ ((unused)) void (*_adapterF_P2tT2tT__MP)(void (*__anonymous_object50)(), void *__anonymous_object51, void *__anonymous_object52), __attribute__ ((unused)) void (*_adapterF2tT_P2tT2tT_P_MP)(void (*__anonymous_object53)(), __attribute__ ((unused)) void *___retval__operator_assign__2tT_1, void *__anonymous_object54, void *__anonymous_object55), __attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT, __attribute__ ((unused)) void *(*___operator_assign__PF2tT_R2tT2tT__1)(void *__anonymous_object56, void *__anonymous_object57), __attribute__ ((unused)) void (*___constructor__PF_R2tT__1)(void *__anonymous_object58), __attribute__ ((unused)) void (*___constructor__PF_R2tT2tT__1)(void *__anonymous_object59, void *__anonymous_object60), __attribute__ ((unused)) void (*___destructor__PF_R2tT__1)(void *__anonymous_object61), __attribute__ ((unused)) signed int (*___operator_less__PFi_2tT2tT__1)(void *__anonymous_object62, void *__anonymous_object63), void *__key__2tT_1, const void *__arr__PC2tT_1, unsigned long int __dim__Ul_1);
+void __qsort__A1_0_0_0____operator_assign__PFt0_Rt0t0____constructor__PF_Rt0____constructor__PF_Rt0t0____destructor__PF_Rt0____operator_less__PFi_t0t0__F_PCt0Ul__1(__attribute__ ((unused)) signed int (*_adapterFi_2tT2tT_M_PP)(void (*__anonymous_object64)(), void *__anonymous_object65, void *__anonymous_object66), __attribute__ ((unused)) void (*_adapterF_P2tT2tT__MP)(void (*__anonymous_object67)(), void *__anonymous_object68, void *__anonymous_object69), __attribute__ ((unused)) void (*_adapterF2tT_P2tT2tT_P_MP)(void (*__anonymous_object70)(), __attribute__ ((unused)) void *___retval__operator_assign__2tT_1, void *__anonymous_object71, void *__anonymous_object72), __attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT, __attribute__ ((unused)) void *(*___operator_assign__PF2tT_R2tT2tT__1)(void *__anonymous_object73, void *__anonymous_object74), __attribute__ ((unused)) void (*___constructor__PF_R2tT__1)(void *__anonymous_object75), __attribute__ ((unused)) void (*___constructor__PF_R2tT2tT__1)(void *__anonymous_object76, void *__anonymous_object77), __attribute__ ((unused)) void (*___destructor__PF_R2tT__1)(void *__anonymous_object78), __attribute__ ((unused)) signed int (*___operator_less__PFi_2tT2tT__1)(void *__anonymous_object79, void *__anonymous_object80), const void *__arr__PC2tT_1, unsigned long int __dim__Ul_1);
+struct _tuple2_ {
+};
+static inline void _layoutof__tuple2_(unsigned long int *_sizeof__tuple2_, unsigned long int *_alignof__tuple2_, unsigned long int *_offsetof__tuple2_, unsigned long int _sizeof_16ttuple_param_2_0, unsigned long int _alignof_16ttuple_param_2_0, unsigned long int _sizeof_16ttuple_param_2_1, unsigned long int _alignof_16ttuple_param_2_1){
+    ((void)((*_sizeof__tuple2_)=0));
+    ((void)((*_alignof__tuple2_)=1));
+    ((void)(_offsetof__tuple2_[0]=(*_sizeof__tuple2_)));
+    ((void)((*_sizeof__tuple2_)+=_sizeof_16ttuple_param_2_0));
+    if ( ((*_alignof__tuple2_)<_alignof_16ttuple_param_2_0) ) ((void)((*_alignof__tuple2_)=_alignof_16ttuple_param_2_0));
+
+    if ( ((*_sizeof__tuple2_)&(_alignof_16ttuple_param_2_1-1)) ) ((void)((*_sizeof__tuple2_)+=(_alignof_16ttuple_param_2_1-((*_sizeof__tuple2_)&(_alignof_16ttuple_param_2_1-1)))));
+
+    ((void)(_offsetof__tuple2_[1]=(*_sizeof__tuple2_)));
+    ((void)((*_sizeof__tuple2_)+=_sizeof_16ttuple_param_2_1));
+    if ( ((*_alignof__tuple2_)<_alignof_16ttuple_param_2_1) ) ((void)((*_alignof__tuple2_)=_alignof_16ttuple_param_2_1));
+
+    if ( ((*_sizeof__tuple2_)&((*_alignof__tuple2_)-1)) ) ((void)((*_sizeof__tuple2_)+=((*_alignof__tuple2_)-((*_sizeof__tuple2_)&((*_alignof__tuple2_)-1)))));
+
+}
+struct _conc__tuple2_0 {
+    signed int field_0;
+    signed int field_1;
+};
+struct _conc__tuple2_0 __div__FTii__ii__1(signed int __num__i_1, signed int __denom__i_1);
+struct _conc__tuple2_1 {
+    signed long int field_0;
+    signed long int field_1;
+};
+struct _conc__tuple2_1 __div__FTll__ll__1(signed long int __num__l_1, signed long int __denom__l_1);
+struct _conc__tuple2_2 {
+    signed long long int field_0;
+    signed long long int field_1;
+};
+struct _conc__tuple2_2 __div__FTqq__qq__1(signed long long int __num__q_1, signed long long int __denom__q_1);
+void __div__A1_0_0_0____operator_assign__PFt0_Rt0t0____constructor__PF_Rt0____constructor__PF_Rt0t0____destructor__PF_Rt0____operator_divide__PFt0_t0t0____operator_modulus__PFt0_t0t0__FTt0t0__t0t0__1(__attribute__ ((unused)) void (*_adapterF2tT_2tT2tT_P_PP)(void (*__anonymous_object81)(), __attribute__ ((unused)) void *___retval__operator_divide__2tT_1, void *__anonymous_object82, void *__anonymous_object83), __attribute__ ((unused)) void (*_adapterF_P2tT2tT__MP)(void (*__anonymous_object84)(), void *__anonymous_object85, void *__anonymous_object86), __attribute__ ((unused)) void (*_adapterF2tT_P2tT2tT_P_MP)(void (*__anonymous_object87)(), __attribute__ ((unused)) void *___retval__operator_assign__2tT_1, void *__anonymous_object88, void *__anonymous_object89), __attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT, __attribute__ ((unused)) void *(*___operator_assign__PF2tT_R2tT2tT__1)(void *__anonymous_object90, void *__anonymous_object91), __attribute__ ((unused)) void (*___constructor__PF_R2tT__1)(void *__anonymous_object92), __attribute__ ((unused)) void (*___constructor__PF_R2tT2tT__1)(void *__anonymous_object93, void *__anonymous_object94), __attribute__ ((unused)) void (*___destructor__PF_R2tT__1)(void *__anonymous_object95), __attribute__ ((unused)) void *(*___operator_divide__PF2tT_2tT2tT__1)(void *__anonymous_object96, void *__anonymous_object97), __attribute__ ((unused)) void *(*___operator_modulus__PF2tT_2tT2tT__1)(void *__anonymous_object98, void *__anonymous_object99), __attribute__ ((unused)) void *___retval_div__T2tT2tT__1, void *__num__2tT_1, void *__demon__2tT_1);
+unsigned char __abs__FUc_Sc__1(signed char __anonymous_object100);
+signed int abs(signed int __anonymous_object101);
+unsigned long int __abs__FUl_l__1(signed long int __anonymous_object102);
+unsigned long long int __abs__FUq_q__1(signed long long int __anonymous_object103);
+float __abs__Ff_f__1(float __anonymous_object104);
+double __abs__Fd_d__1(double __anonymous_object105);
+long double __abs__Fr_r__1(long double __anonymous_object106);
+float __abs__Ff_Xf__1(float _Complex __anonymous_object107);
+double __abs__Fd_Xd__1(double _Complex __anonymous_object108);
+long double __abs__Fr_Xr__1(long double _Complex __anonymous_object109);
+void __abs__A1_0_0_0____operator_assign__PFt0_Rt0t0____constructor__PF_Rt0____constructor__PF_Rt0t0____destructor__PF_Rt0____constructor__PF_Rt0Z____operator_less__PFi_t0t0____operator_unaryminus__PFt0_t0__Ft0_t0__1(__attribute__ ((unused)) void (*_adapterF2tT_2tT_P_P)(void (*__anonymous_object110)(), __attribute__ ((unused)) void *___retval__operator_unaryminus__2tT_1, void *__anonymous_object111), __attribute__ ((unused)) signed int (*_adapterFi_2tT2tT_M_PP)(void (*__anonymous_object112)(), void *__anonymous_object113, void *__anonymous_object114), __attribute__ ((unused)) void (*_adapterF_P2tT2tT__MP)(void (*__anonymous_object115)(), void *__anonymous_object116, void *__anonymous_object117), __attribute__ ((unused)) void (*_adapterF2tT_P2tT2tT_P_MP)(void (*__anonymous_object118)(), __attribute__ ((unused)) void *___retval__operator_assign__2tT_1, void *__anonymous_object119, void *__anonymous_object120), __attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT, __attribute__ ((unused)) void *(*___operator_assign__PF2tT_R2tT2tT__1)(void *__anonymous_object121, void *__anonymous_object122), __attribute__ ((unused)) void (*___constructor__PF_R2tT__1)(void *__anonymous_object123), __attribute__ ((unused)) void (*___constructor__PF_R2tT2tT__1)(void *__anonymous_object124, void *__anonymous_object125), __attribute__ ((unused)) void (*___destructor__PF_R2tT__1)(void *__anonymous_object126), __attribute__ ((unused)) void (*___constructor__PF_R2tTZ__1)(void *__anonymous_object127, long int __anonymous_object128), __attribute__ ((unused)) signed int (*___operator_less__PFi_2tT2tT__1)(void *__anonymous_object129, void *__anonymous_object130), __attribute__ ((unused)) void *(*___operator_unaryminus__PF2tT_2tT__1)(void *__anonymous_object131), __attribute__ ((unused)) void *___retval_abs__2tT_1, void *__anonymous_object132);
+void __rand48seed__F_l__1(signed long int __s__l_1);
+char __rand48__Fc___1(void);
+signed int __rand48__Fi___1(void);
+unsigned int __rand48__FUi___1(void);
+signed long int __rand48__Fl___1(void);
+unsigned long int __rand48__FUl___1(void);
+float __rand48__Ff___1(void);
+double __rand48__Fd___1(void);
+float _Complex __rand48__FXf___1(void);
+double _Complex __rand48__FXd___1(void);
+long double _Complex __rand48__FXr___1(void);
+void __min__A1_0_0_0____operator_assign__PFt0_Rt0t0____constructor__PF_Rt0____constructor__PF_Rt0t0____destructor__PF_Rt0____operator_less__PFi_t0t0__Ft0_t0t0__1(__attribute__ ((unused)) signed int (*_adapterFi_2tT2tT_M_PP)(void (*__anonymous_object133)(), void *__anonymous_object134, void *__anonymous_object135), __attribute__ ((unused)) void (*_adapterF_P2tT2tT__MP)(void (*__anonymous_object136)(), void *__anonymous_object137, void *__anonymous_object138), __attribute__ ((unused)) void (*_adapterF2tT_P2tT2tT_P_MP)(void (*__anonymous_object139)(), __attribute__ ((unused)) void *___retval__operator_assign__2tT_1, void *__anonymous_object140, void *__anonymous_object141), __attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT, __attribute__ ((unused)) void *(*___operator_assign__PF2tT_R2tT2tT__1)(void *__anonymous_object142, void *__anonymous_object143), __attribute__ ((unused)) void (*___constructor__PF_R2tT__1)(void *__anonymous_object144), __attribute__ ((unused)) void (*___constructor__PF_R2tT2tT__1)(void *__anonymous_object145, void *__anonymous_object146), __attribute__ ((unused)) void (*___destructor__PF_R2tT__1)(void *__anonymous_object147), __attribute__ ((unused)) signed int (*___operator_less__PFi_2tT2tT__1)(void *__anonymous_object148, void *__anonymous_object149), __attribute__ ((unused)) void *___retval_min__2tT_1, void *__t1__2tT_1, void *__t2__2tT_1);
+void __max__A1_0_0_0____operator_assign__PFt0_Rt0t0____constructor__PF_Rt0____constructor__PF_Rt0t0____destructor__PF_Rt0____operator_greater__PFi_t0t0__Ft0_t0t0__1(__attribute__ ((unused)) signed int (*_adapterFi_2tT2tT_M_PP)(void (*__anonymous_object150)(), void *__anonymous_object151, void *__anonymous_object152), __attribute__ ((unused)) void (*_adapterF_P2tT2tT__MP)(void (*__anonymous_object153)(), void *__anonymous_object154, void *__anonymous_object155), __attribute__ ((unused)) void (*_adapterF2tT_P2tT2tT_P_MP)(void (*__anonymous_object156)(), __attribute__ ((unused)) void *___retval__operator_assign__2tT_1, void *__anonymous_object157, void *__anonymous_object158), __attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT, __attribute__ ((unused)) void *(*___operator_assign__PF2tT_R2tT2tT__1)(void *__anonymous_object159, void *__anonymous_object160), __attribute__ ((unused)) void (*___constructor__PF_R2tT__1)(void *__anonymous_object161), __attribute__ ((unused)) void (*___constructor__PF_R2tT2tT__1)(void *__anonymous_object162, void *__anonymous_object163), __attribute__ ((unused)) void (*___destructor__PF_R2tT__1)(void *__anonymous_object164), __attribute__ ((unused)) signed int (*___operator_greater__PFi_2tT2tT__1)(void *__anonymous_object165, void *__anonymous_object166), __attribute__ ((unused)) void *___retval_max__2tT_1, void *__t1__2tT_1, void *__t2__2tT_1);
+void __clamp__A1_0_0_0____operator_assign__PFt0_Rt0t0____constructor__PF_Rt0____constructor__PF_Rt0t0____destructor__PF_Rt0___min__PFt0_t0t0___max__PFt0_t0t0__Ft0_t0t0t0__1(__attribute__ ((unused)) void (*_adapterF2tT_2tT2tT_P_PP)(void (*__anonymous_object167)(), __attribute__ ((unused)) void *___retval_min__2tT_1, void *__anonymous_object168, void *__anonymous_object169), __attribute__ ((unused)) void (*_adapterF_P2tT2tT__MP)(void (*__anonymous_object170)(), void *__anonymous_object171, void *__anonymous_object172), __attribute__ ((unused)) void (*_adapterF2tT_P2tT2tT_P_MP)(void (*__anonymous_object173)(), __attribute__ ((unused)) void *___retval__operator_assign__2tT_1, void *__anonymous_object174, void *__anonymous_object175), __attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT, __attribute__ ((unused)) void *(*___operator_assign__PF2tT_R2tT2tT__1)(void *__anonymous_object176, void *__anonymous_object177), __attribute__ ((unused)) void (*___constructor__PF_R2tT__1)(void *__anonymous_object178), __attribute__ ((unused)) void (*___constructor__PF_R2tT2tT__1)(void *__anonymous_object179, void *__anonymous_object180), __attribute__ ((unused)) void (*___destructor__PF_R2tT__1)(void *__anonymous_object181), __attribute__ ((unused)) void *(*__min__PF2tT_2tT2tT__1)(void *__anonymous_object182, void *__anonymous_object183), __attribute__ ((unused)) void *(*__max__PF2tT_2tT2tT__1)(void *__anonymous_object184, void *__anonymous_object185), __attribute__ ((unused)) void *___retval_clamp__2tT_1, void *__value__2tT_1, void *__min_val__2tT_1, void *__max_val__2tT_1);
+void __swap__A1_0_0_0____operator_assign__PFt0_Rt0t0____constructor__PF_Rt0____constructor__PF_Rt0t0____destructor__PF_Rt0__F_Rt0Rt0__1(__attribute__ ((unused)) void (*_adapterF_P2tT2tT__MP)(void (*__anonymous_object186)(), void *__anonymous_object187, void *__anonymous_object188), __attribute__ ((unused)) void (*_adapterF2tT_P2tT2tT_P_MP)(void (*__anonymous_object189)(), __attribute__ ((unused)) void *___retval__operator_assign__2tT_1, void *__anonymous_object190, void *__anonymous_object191), __attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT, __attribute__ ((unused)) void *(*___operator_assign__PF2tT_R2tT2tT__1)(void *__anonymous_object192, void *__anonymous_object193), __attribute__ ((unused)) void (*___constructor__PF_R2tT__1)(void *__anonymous_object194), __attribute__ ((unused)) void (*___constructor__PF_R2tT2tT__1)(void *__anonymous_object195, void *__anonymous_object196), __attribute__ ((unused)) void (*___destructor__PF_R2tT__1)(void *__anonymous_object197), void *__t1__R2tT_1, void *__t2__R2tT_1);
+static inline void ___constructor__F_R13smonitor_desc__1(struct monitor_desc *__this__R13smonitor_desc_1){
+    ((void)((*__this__R13smonitor_desc_1).owner) /* ?{} */);
+    ((void)((*__this__R13smonitor_desc_1).recursion) /* ?{} */);
+    ((void)___constructor__F_R17s__waitfor_mask_t_autogen___1((&(*__this__R13smonitor_desc_1).mask)));
+    struct spinlock *_tmp_ctor_expr0;
+    ((void)(((void)(_tmp_ctor_expr0=(&(*__this__R13smonitor_desc_1).lock))) , (((void)___constructor__F_R9sspinlock__1(_tmp_ctor_expr0)) , _tmp_ctor_expr0)));
+    ((void)((*__this__R13smonitor_desc_1).owner=((void *)0)));
+    struct __thread_queue_t *_tmp_ctor_expr1;
+    ((void)(((void)(_tmp_ctor_expr1=(&(*__this__R13smonitor_desc_1).entry_queue))) , (((void)___constructor__F_R17s__thread_queue_t__1(_tmp_ctor_expr1)) , _tmp_ctor_expr1)));
+    struct __condition_stack_t *_tmp_ctor_expr2;
+    ((void)(((void)(_tmp_ctor_expr2=(&(*__this__R13smonitor_desc_1).signal_stack))) , (((void)___constructor__F_R20s__condition_stack_t__1(_tmp_ctor_expr2)) , _tmp_ctor_expr2)));
+    ((void)((*__this__R13smonitor_desc_1).recursion=((unsigned int )0)));
+    ((void)((*__this__R13smonitor_desc_1).mask.accepted=((void *)0)));
+    ((void)((*__this__R13smonitor_desc_1).mask.clauses=((void *)0)));
+    ((void)((*__this__R13smonitor_desc_1).mask.size=((signed short int )0)));
+}
+struct monitor_guard_t {
+    struct monitor_desc **__m__PP13smonitor_desc_1;
+    signed int __count__i_1;
+    struct monitor_desc **__prev_mntrs__PP13smonitor_desc_1;
+    unsigned short int __prev_count__Us_1;
+    void (*__prev_func__PF___1)();
+};
+static inline void ___constructor__F_R16smonitor_guard_t_autogen___1(struct monitor_guard_t *___dst__R16smonitor_guard_t_1);
+static inline void ___constructor__F_R16smonitor_guard_t16smonitor_guard_t_autogen___1(struct monitor_guard_t *___dst__R16smonitor_guard_t_1, struct monitor_guard_t ___src__16smonitor_guard_t_1);
+static inline void ___destructor__F_R16smonitor_guard_t_autogen___1(struct monitor_guard_t *___dst__R16smonitor_guard_t_1);
+static inline struct monitor_guard_t ___operator_assign__F16smonitor_guard_t_R16smonitor_guard_t16smonitor_guard_t_autogen___1(struct monitor_guard_t *___dst__R16smonitor_guard_t_1, struct monitor_guard_t ___src__16smonitor_guard_t_1);
+static inline void ___constructor__F_R16smonitor_guard_t_autogen___1(struct monitor_guard_t *___dst__R16smonitor_guard_t_1){
+    ((void)((*___dst__R16smonitor_guard_t_1).__m__PP13smonitor_desc_1) /* ?{} */);
+    ((void)((*___dst__R16smonitor_guard_t_1).__count__i_1) /* ?{} */);
+    ((void)((*___dst__R16smonitor_guard_t_1).__prev_mntrs__PP13smonitor_desc_1) /* ?{} */);
+    ((void)((*___dst__R16smonitor_guard_t_1).__prev_count__Us_1) /* ?{} */);
+    ((void)((*___dst__R16smonitor_guard_t_1).__prev_func__PF___1) /* ?{} */);
+}
+static inline void ___constructor__F_R16smonitor_guard_t16smonitor_guard_t_autogen___1(struct monitor_guard_t *___dst__R16smonitor_guard_t_1, struct monitor_guard_t ___src__16smonitor_guard_t_1){
+    ((void)((*___dst__R16smonitor_guard_t_1).__m__PP13smonitor_desc_1=___src__16smonitor_guard_t_1.__m__PP13smonitor_desc_1) /* ?{} */);
+    ((void)((*___dst__R16smonitor_guard_t_1).__count__i_1=___src__16smonitor_guard_t_1.__count__i_1) /* ?{} */);
+    ((void)((*___dst__R16smonitor_guard_t_1).__prev_mntrs__PP13smonitor_desc_1=___src__16smonitor_guard_t_1.__prev_mntrs__PP13smonitor_desc_1) /* ?{} */);
+    ((void)((*___dst__R16smonitor_guard_t_1).__prev_count__Us_1=___src__16smonitor_guard_t_1.__prev_count__Us_1) /* ?{} */);
+    ((void)((*___dst__R16smonitor_guard_t_1).__prev_func__PF___1=___src__16smonitor_guard_t_1.__prev_func__PF___1) /* ?{} */);
+}
+static inline void ___destructor__F_R16smonitor_guard_t_autogen___1(struct monitor_guard_t *___dst__R16smonitor_guard_t_1){
+    ((void)((*___dst__R16smonitor_guard_t_1).__prev_func__PF___1) /* ^?{} */);
+    ((void)((*___dst__R16smonitor_guard_t_1).__prev_count__Us_1) /* ^?{} */);
+    ((void)((*___dst__R16smonitor_guard_t_1).__prev_mntrs__PP13smonitor_desc_1) /* ^?{} */);
+    ((void)((*___dst__R16smonitor_guard_t_1).__count__i_1) /* ^?{} */);
+    ((void)((*___dst__R16smonitor_guard_t_1).__m__PP13smonitor_desc_1) /* ^?{} */);
+}
+static inline struct monitor_guard_t ___operator_assign__F16smonitor_guard_t_R16smonitor_guard_t16smonitor_guard_t_autogen___1(struct monitor_guard_t *___dst__R16smonitor_guard_t_1, struct monitor_guard_t ___src__16smonitor_guard_t_1){
+    struct monitor_guard_t ___ret__16smonitor_guard_t_1;
+    ((void)((*___dst__R16smonitor_guard_t_1).__m__PP13smonitor_desc_1=___src__16smonitor_guard_t_1.__m__PP13smonitor_desc_1));
+    ((void)((*___dst__R16smonitor_guard_t_1).__count__i_1=___src__16smonitor_guard_t_1.__count__i_1));
+    ((void)((*___dst__R16smonitor_guard_t_1).__prev_mntrs__PP13smonitor_desc_1=___src__16smonitor_guard_t_1.__prev_mntrs__PP13smonitor_desc_1));
+    ((void)((*___dst__R16smonitor_guard_t_1).__prev_count__Us_1=___src__16smonitor_guard_t_1.__prev_count__Us_1));
+    ((void)((*___dst__R16smonitor_guard_t_1).__prev_func__PF___1=___src__16smonitor_guard_t_1.__prev_func__PF___1));
+    ((void)___constructor__F_R16smonitor_guard_t16smonitor_guard_t_autogen___1((&___ret__16smonitor_guard_t_1), ___src__16smonitor_guard_t_1));
+    return ((struct monitor_guard_t )___ret__16smonitor_guard_t_1);
+}
+static inline void ___constructor__F_R16smonitor_guard_tPP13smonitor_desc_autogen___1(struct monitor_guard_t *___dst__R16smonitor_guard_t_1, struct monitor_desc **__m__PP13smonitor_desc_1){
+    ((void)((*___dst__R16smonitor_guard_t_1).__m__PP13smonitor_desc_1=__m__PP13smonitor_desc_1) /* ?{} */);
+    ((void)((*___dst__R16smonitor_guard_t_1).__count__i_1) /* ?{} */);
+    ((void)((*___dst__R16smonitor_guard_t_1).__prev_mntrs__PP13smonitor_desc_1) /* ?{} */);
+    ((void)((*___dst__R16smonitor_guard_t_1).__prev_count__Us_1) /* ?{} */);
+    ((void)((*___dst__R16smonitor_guard_t_1).__prev_func__PF___1) /* ?{} */);
+}
+static inline void ___constructor__F_R16smonitor_guard_tPP13smonitor_desci_autogen___1(struct monitor_guard_t *___dst__R16smonitor_guard_t_1, struct monitor_desc **__m__PP13smonitor_desc_1, signed int __count__i_1){
+    ((void)((*___dst__R16smonitor_guard_t_1).__m__PP13smonitor_desc_1=__m__PP13smonitor_desc_1) /* ?{} */);
+    ((void)((*___dst__R16smonitor_guard_t_1).__count__i_1=__count__i_1) /* ?{} */);
+    ((void)((*___dst__R16smonitor_guard_t_1).__prev_mntrs__PP13smonitor_desc_1) /* ?{} */);
+    ((void)((*___dst__R16smonitor_guard_t_1).__prev_count__Us_1) /* ?{} */);
+    ((void)((*___dst__R16smonitor_guard_t_1).__prev_func__PF___1) /* ?{} */);
+}
+static inline void ___constructor__F_R16smonitor_guard_tPP13smonitor_desciPP13smonitor_desc_autogen___1(struct monitor_guard_t *___dst__R16smonitor_guard_t_1, struct monitor_desc **__m__PP13smonitor_desc_1, signed int __count__i_1, struct monitor_desc **__prev_mntrs__PP13smonitor_desc_1){
+    ((void)((*___dst__R16smonitor_guard_t_1).__m__PP13smonitor_desc_1=__m__PP13smonitor_desc_1) /* ?{} */);
+    ((void)((*___dst__R16smonitor_guard_t_1).__count__i_1=__count__i_1) /* ?{} */);
+    ((void)((*___dst__R16smonitor_guard_t_1).__prev_mntrs__PP13smonitor_desc_1=__prev_mntrs__PP13smonitor_desc_1) /* ?{} */);
+    ((void)((*___dst__R16smonitor_guard_t_1).__prev_count__Us_1) /* ?{} */);
+    ((void)((*___dst__R16smonitor_guard_t_1).__prev_func__PF___1) /* ?{} */);
+}
+static inline void ___constructor__F_R16smonitor_guard_tPP13smonitor_desciPP13smonitor_descUs_autogen___1(struct monitor_guard_t *___dst__R16smonitor_guard_t_1, struct monitor_desc **__m__PP13smonitor_desc_1, signed int __count__i_1, struct monitor_desc **__prev_mntrs__PP13smonitor_desc_1, unsigned short int __prev_count__Us_1){
+    ((void)((*___dst__R16smonitor_guard_t_1).__m__PP13smonitor_desc_1=__m__PP13smonitor_desc_1) /* ?{} */);
+    ((void)((*___dst__R16smonitor_guard_t_1).__count__i_1=__count__i_1) /* ?{} */);
+    ((void)((*___dst__R16smonitor_guard_t_1).__prev_mntrs__PP13smonitor_desc_1=__prev_mntrs__PP13smonitor_desc_1) /* ?{} */);
+    ((void)((*___dst__R16smonitor_guard_t_1).__prev_count__Us_1=__prev_count__Us_1) /* ?{} */);
+    ((void)((*___dst__R16smonitor_guard_t_1).__prev_func__PF___1) /* ?{} */);
+}
+static inline void ___constructor__F_R16smonitor_guard_tPP13smonitor_desciPP13smonitor_descUsPF___autogen___1(struct monitor_guard_t *___dst__R16smonitor_guard_t_1, struct monitor_desc **__m__PP13smonitor_desc_1, signed int __count__i_1, struct monitor_desc **__prev_mntrs__PP13smonitor_desc_1, unsigned short int __prev_count__Us_1, void (*__prev_func__PF___1)()){
+    ((void)((*___dst__R16smonitor_guard_t_1).__m__PP13smonitor_desc_1=__m__PP13smonitor_desc_1) /* ?{} */);
+    ((void)((*___dst__R16smonitor_guard_t_1).__count__i_1=__count__i_1) /* ?{} */);
+    ((void)((*___dst__R16smonitor_guard_t_1).__prev_mntrs__PP13smonitor_desc_1=__prev_mntrs__PP13smonitor_desc_1) /* ?{} */);
+    ((void)((*___dst__R16smonitor_guard_t_1).__prev_count__Us_1=__prev_count__Us_1) /* ?{} */);
+    ((void)((*___dst__R16smonitor_guard_t_1).__prev_func__PF___1=__prev_func__PF___1) /* ?{} */);
+}
+static inline signed int ___operator_less__Fi_P13smonitor_descP13smonitor_desc__1(struct monitor_desc *__lhs__P13smonitor_desc_1, struct monitor_desc *__rhs__P13smonitor_desc_1){
+    __attribute__ ((unused)) signed int ___retval__operator_less__i_1;
+    ((void)(___retval__operator_less__i_1=(((signed long int )__lhs__P13smonitor_desc_1)<((signed long int )__rhs__P13smonitor_desc_1))) /* ?{} */);
+    return ((signed int )___retval__operator_less__i_1);
+}
+void ___constructor__F_R16smonitor_guard_tPP13smonitor_desciPF____1(struct monitor_guard_t *__this__R16smonitor_guard_t_1, struct monitor_desc **__m__PP13smonitor_desc_1, signed int __count__i_1, void (*__func__PF___1)());
+void ___destructor__F_R16smonitor_guard_t__1(struct monitor_guard_t *__this__R16smonitor_guard_t_1);
+struct __condition_criterion_t {
+    _Bool __ready__b_1;
+    struct monitor_desc *__target__P13smonitor_desc_1;
+    struct __condition_node_t *__owner__P19s__condition_node_t_1;
+    struct __condition_criterion_t *__next__P24s__condition_criterion_t_1;
+};
+static inline void ___constructor__F_R24s__condition_criterion_t_autogen___1(struct __condition_criterion_t *___dst__R24s__condition_criterion_t_1);
+static inline void ___constructor__F_R24s__condition_criterion_t24s__condition_criterion_t_autogen___1(struct __condition_criterion_t *___dst__R24s__condition_criterion_t_1, struct __condition_criterion_t ___src__24s__condition_criterion_t_1);
+static inline void ___destructor__F_R24s__condition_criterion_t_autogen___1(struct __condition_criterion_t *___dst__R24s__condition_criterion_t_1);
+static inline struct __condition_criterion_t ___operator_assign__F24s__condition_criterion_t_R24s__condition_criterion_t24s__condition_criterion_t_autogen___1(struct __condition_criterion_t *___dst__R24s__condition_criterion_t_1, struct __condition_criterion_t ___src__24s__condition_criterion_t_1);
+static inline void ___constructor__F_R24s__condition_criterion_t_autogen___1(struct __condition_criterion_t *___dst__R24s__condition_criterion_t_1){
+    ((void)((*___dst__R24s__condition_criterion_t_1).__ready__b_1) /* ?{} */);
+    ((void)((*___dst__R24s__condition_criterion_t_1).__target__P13smonitor_desc_1) /* ?{} */);
+    ((void)((*___dst__R24s__condition_criterion_t_1).__owner__P19s__condition_node_t_1) /* ?{} */);
+    ((void)((*___dst__R24s__condition_criterion_t_1).__next__P24s__condition_criterion_t_1) /* ?{} */);
+}
+static inline void ___constructor__F_R24s__condition_criterion_t24s__condition_criterion_t_autogen___1(struct __condition_criterion_t *___dst__R24s__condition_criterion_t_1, struct __condition_criterion_t ___src__24s__condition_criterion_t_1){
+    ((void)((*___dst__R24s__condition_criterion_t_1).__ready__b_1=___src__24s__condition_criterion_t_1.__ready__b_1) /* ?{} */);
+    ((void)((*___dst__R24s__condition_criterion_t_1).__target__P13smonitor_desc_1=___src__24s__condition_criterion_t_1.__target__P13smonitor_desc_1) /* ?{} */);
+    ((void)((*___dst__R24s__condition_criterion_t_1).__owner__P19s__condition_node_t_1=___src__24s__condition_criterion_t_1.__owner__P19s__condition_node_t_1) /* ?{} */);
+    ((void)((*___dst__R24s__condition_criterion_t_1).__next__P24s__condition_criterion_t_1=___src__24s__condition_criterion_t_1.__next__P24s__condition_criterion_t_1) /* ?{} */);
+}
+static inline void ___destructor__F_R24s__condition_criterion_t_autogen___1(struct __condition_criterion_t *___dst__R24s__condition_criterion_t_1){
+    ((void)((*___dst__R24s__condition_criterion_t_1).__next__P24s__condition_criterion_t_1) /* ^?{} */);
+    ((void)((*___dst__R24s__condition_criterion_t_1).__owner__P19s__condition_node_t_1) /* ^?{} */);
+    ((void)((*___dst__R24s__condition_criterion_t_1).__target__P13smonitor_desc_1) /* ^?{} */);
+    ((void)((*___dst__R24s__condition_criterion_t_1).__ready__b_1) /* ^?{} */);
+}
+static inline struct __condition_criterion_t ___operator_assign__F24s__condition_criterion_t_R24s__condition_criterion_t24s__condition_criterion_t_autogen___1(struct __condition_criterion_t *___dst__R24s__condition_criterion_t_1, struct __condition_criterion_t ___src__24s__condition_criterion_t_1){
+    struct __condition_criterion_t ___ret__24s__condition_criterion_t_1;
+    ((void)((*___dst__R24s__condition_criterion_t_1).__ready__b_1=___src__24s__condition_criterion_t_1.__ready__b_1));
+    ((void)((*___dst__R24s__condition_criterion_t_1).__target__P13smonitor_desc_1=___src__24s__condition_criterion_t_1.__target__P13smonitor_desc_1));
+    ((void)((*___dst__R24s__condition_criterion_t_1).__owner__P19s__condition_node_t_1=___src__24s__condition_criterion_t_1.__owner__P19s__condition_node_t_1));
+    ((void)((*___dst__R24s__condition_criterion_t_1).__next__P24s__condition_criterion_t_1=___src__24s__condition_criterion_t_1.__next__P24s__condition_criterion_t_1));
+    ((void)___constructor__F_R24s__condition_criterion_t24s__condition_criterion_t_autogen___1((&___ret__24s__condition_criterion_t_1), ___src__24s__condition_criterion_t_1));
+    return ((struct __condition_criterion_t )___ret__24s__condition_criterion_t_1);
+}
+static inline void ___constructor__F_R24s__condition_criterion_tb_autogen___1(struct __condition_criterion_t *___dst__R24s__condition_criterion_t_1, _Bool __ready__b_1){
+    ((void)((*___dst__R24s__condition_criterion_t_1).__ready__b_1=__ready__b_1) /* ?{} */);
+    ((void)((*___dst__R24s__condition_criterion_t_1).__target__P13smonitor_desc_1) /* ?{} */);
+    ((void)((*___dst__R24s__condition_criterion_t_1).__owner__P19s__condition_node_t_1) /* ?{} */);
+    ((void)((*___dst__R24s__condition_criterion_t_1).__next__P24s__condition_criterion_t_1) /* ?{} */);
+}
+static inline void ___constructor__F_R24s__condition_criterion_tbP13smonitor_desc_autogen___1(struct __condition_criterion_t *___dst__R24s__condition_criterion_t_1, _Bool __ready__b_1, struct monitor_desc *__target__P13smonitor_desc_1){
+    ((void)((*___dst__R24s__condition_criterion_t_1).__ready__b_1=__ready__b_1) /* ?{} */);
+    ((void)((*___dst__R24s__condition_criterion_t_1).__target__P13smonitor_desc_1=__target__P13smonitor_desc_1) /* ?{} */);
+    ((void)((*___dst__R24s__condition_criterion_t_1).__owner__P19s__condition_node_t_1) /* ?{} */);
+    ((void)((*___dst__R24s__condition_criterion_t_1).__next__P24s__condition_criterion_t_1) /* ?{} */);
+}
+static inline void ___constructor__F_R24s__condition_criterion_tbP13smonitor_descP19s__condition_node_t_autogen___1(struct __condition_criterion_t *___dst__R24s__condition_criterion_t_1, _Bool __ready__b_1, struct monitor_desc *__target__P13smonitor_desc_1, struct __condition_node_t *__owner__P19s__condition_node_t_1){
+    ((void)((*___dst__R24s__condition_criterion_t_1).__ready__b_1=__ready__b_1) /* ?{} */);
+    ((void)((*___dst__R24s__condition_criterion_t_1).__target__P13smonitor_desc_1=__target__P13smonitor_desc_1) /* ?{} */);
+    ((void)((*___dst__R24s__condition_criterion_t_1).__owner__P19s__condition_node_t_1=__owner__P19s__condition_node_t_1) /* ?{} */);
+    ((void)((*___dst__R24s__condition_criterion_t_1).__next__P24s__condition_criterion_t_1) /* ?{} */);
+}
+static inline void ___constructor__F_R24s__condition_criterion_tbP13smonitor_descP19s__condition_node_tP24s__condition_criterion_t_autogen___1(struct __condition_criterion_t *___dst__R24s__condition_criterion_t_1, _Bool __ready__b_1, struct monitor_desc *__target__P13smonitor_desc_1, struct __condition_node_t *__owner__P19s__condition_node_t_1, struct __condition_criterion_t *__next__P24s__condition_criterion_t_1){
+    ((void)((*___dst__R24s__condition_criterion_t_1).__ready__b_1=__ready__b_1) /* ?{} */);
+    ((void)((*___dst__R24s__condition_criterion_t_1).__target__P13smonitor_desc_1=__target__P13smonitor_desc_1) /* ?{} */);
+    ((void)((*___dst__R24s__condition_criterion_t_1).__owner__P19s__condition_node_t_1=__owner__P19s__condition_node_t_1) /* ?{} */);
+    ((void)((*___dst__R24s__condition_criterion_t_1).__next__P24s__condition_criterion_t_1=__next__P24s__condition_criterion_t_1) /* ?{} */);
+}
+struct __condition_node_t {
+    struct thread_desc *__waiting_thread__P12sthread_desc_1;
+    struct __condition_criterion_t *__criteria__P24s__condition_criterion_t_1;
+    unsigned short int __count__Us_1;
+    struct __condition_node_t *__next__P19s__condition_node_t_1;
+    unsigned long int __user_info__Ul_1;
+};
+static inline void ___constructor__F_R19s__condition_node_t_autogen___1(struct __condition_node_t *___dst__R19s__condition_node_t_1);
+static inline void ___constructor__F_R19s__condition_node_t19s__condition_node_t_autogen___1(struct __condition_node_t *___dst__R19s__condition_node_t_1, struct __condition_node_t ___src__19s__condition_node_t_1);
+static inline void ___destructor__F_R19s__condition_node_t_autogen___1(struct __condition_node_t *___dst__R19s__condition_node_t_1);
+static inline struct __condition_node_t ___operator_assign__F19s__condition_node_t_R19s__condition_node_t19s__condition_node_t_autogen___1(struct __condition_node_t *___dst__R19s__condition_node_t_1, struct __condition_node_t ___src__19s__condition_node_t_1);
+static inline void ___constructor__F_R19s__condition_node_t_autogen___1(struct __condition_node_t *___dst__R19s__condition_node_t_1){
+    ((void)((*___dst__R19s__condition_node_t_1).__waiting_thread__P12sthread_desc_1) /* ?{} */);
+    ((void)((*___dst__R19s__condition_node_t_1).__criteria__P24s__condition_criterion_t_1) /* ?{} */);
+    ((void)((*___dst__R19s__condition_node_t_1).__count__Us_1) /* ?{} */);
+    ((void)((*___dst__R19s__condition_node_t_1).__next__P19s__condition_node_t_1) /* ?{} */);
+    ((void)((*___dst__R19s__condition_node_t_1).__user_info__Ul_1) /* ?{} */);
+}
+static inline void ___constructor__F_R19s__condition_node_t19s__condition_node_t_autogen___1(struct __condition_node_t *___dst__R19s__condition_node_t_1, struct __condition_node_t ___src__19s__condition_node_t_1){
+    ((void)((*___dst__R19s__condition_node_t_1).__waiting_thread__P12sthread_desc_1=___src__19s__condition_node_t_1.__waiting_thread__P12sthread_desc_1) /* ?{} */);
+    ((void)((*___dst__R19s__condition_node_t_1).__criteria__P24s__condition_criterion_t_1=___src__19s__condition_node_t_1.__criteria__P24s__condition_criterion_t_1) /* ?{} */);
+    ((void)((*___dst__R19s__condition_node_t_1).__count__Us_1=___src__19s__condition_node_t_1.__count__Us_1) /* ?{} */);
+    ((void)((*___dst__R19s__condition_node_t_1).__next__P19s__condition_node_t_1=___src__19s__condition_node_t_1.__next__P19s__condition_node_t_1) /* ?{} */);
+    ((void)((*___dst__R19s__condition_node_t_1).__user_info__Ul_1=___src__19s__condition_node_t_1.__user_info__Ul_1) /* ?{} */);
+}
+static inline void ___destructor__F_R19s__condition_node_t_autogen___1(struct __condition_node_t *___dst__R19s__condition_node_t_1){
+    ((void)((*___dst__R19s__condition_node_t_1).__user_info__Ul_1) /* ^?{} */);
+    ((void)((*___dst__R19s__condition_node_t_1).__next__P19s__condition_node_t_1) /* ^?{} */);
+    ((void)((*___dst__R19s__condition_node_t_1).__count__Us_1) /* ^?{} */);
+    ((void)((*___dst__R19s__condition_node_t_1).__criteria__P24s__condition_criterion_t_1) /* ^?{} */);
+    ((void)((*___dst__R19s__condition_node_t_1).__waiting_thread__P12sthread_desc_1) /* ^?{} */);
+}
+static inline struct __condition_node_t ___operator_assign__F19s__condition_node_t_R19s__condition_node_t19s__condition_node_t_autogen___1(struct __condition_node_t *___dst__R19s__condition_node_t_1, struct __condition_node_t ___src__19s__condition_node_t_1){
+    struct __condition_node_t ___ret__19s__condition_node_t_1;
+    ((void)((*___dst__R19s__condition_node_t_1).__waiting_thread__P12sthread_desc_1=___src__19s__condition_node_t_1.__waiting_thread__P12sthread_desc_1));
+    ((void)((*___dst__R19s__condition_node_t_1).__criteria__P24s__condition_criterion_t_1=___src__19s__condition_node_t_1.__criteria__P24s__condition_criterion_t_1));
+    ((void)((*___dst__R19s__condition_node_t_1).__count__Us_1=___src__19s__condition_node_t_1.__count__Us_1));
+    ((void)((*___dst__R19s__condition_node_t_1).__next__P19s__condition_node_t_1=___src__19s__condition_node_t_1.__next__P19s__condition_node_t_1));
+    ((void)((*___dst__R19s__condition_node_t_1).__user_info__Ul_1=___src__19s__condition_node_t_1.__user_info__Ul_1));
+    ((void)___constructor__F_R19s__condition_node_t19s__condition_node_t_autogen___1((&___ret__19s__condition_node_t_1), ___src__19s__condition_node_t_1));
+    return ((struct __condition_node_t )___ret__19s__condition_node_t_1);
+}
+static inline void ___constructor__F_R19s__condition_node_tP12sthread_desc_autogen___1(struct __condition_node_t *___dst__R19s__condition_node_t_1, struct thread_desc *__waiting_thread__P12sthread_desc_1){
+    ((void)((*___dst__R19s__condition_node_t_1).__waiting_thread__P12sthread_desc_1=__waiting_thread__P12sthread_desc_1) /* ?{} */);
+    ((void)((*___dst__R19s__condition_node_t_1).__criteria__P24s__condition_criterion_t_1) /* ?{} */);
+    ((void)((*___dst__R19s__condition_node_t_1).__count__Us_1) /* ?{} */);
+    ((void)((*___dst__R19s__condition_node_t_1).__next__P19s__condition_node_t_1) /* ?{} */);
+    ((void)((*___dst__R19s__condition_node_t_1).__user_info__Ul_1) /* ?{} */);
+}
+static inline void ___constructor__F_R19s__condition_node_tP12sthread_descP24s__condition_criterion_t_autogen___1(struct __condition_node_t *___dst__R19s__condition_node_t_1, struct thread_desc *__waiting_thread__P12sthread_desc_1, struct __condition_criterion_t *__criteria__P24s__condition_criterion_t_1){
+    ((void)((*___dst__R19s__condition_node_t_1).__waiting_thread__P12sthread_desc_1=__waiting_thread__P12sthread_desc_1) /* ?{} */);
+    ((void)((*___dst__R19s__condition_node_t_1).__criteria__P24s__condition_criterion_t_1=__criteria__P24s__condition_criterion_t_1) /* ?{} */);
+    ((void)((*___dst__R19s__condition_node_t_1).__count__Us_1) /* ?{} */);
+    ((void)((*___dst__R19s__condition_node_t_1).__next__P19s__condition_node_t_1) /* ?{} */);
+    ((void)((*___dst__R19s__condition_node_t_1).__user_info__Ul_1) /* ?{} */);
+}
+static inline void ___constructor__F_R19s__condition_node_tP12sthread_descP24s__condition_criterion_tUs_autogen___1(struct __condition_node_t *___dst__R19s__condition_node_t_1, struct thread_desc *__waiting_thread__P12sthread_desc_1, struct __condition_criterion_t *__criteria__P24s__condition_criterion_t_1, unsigned short int __count__Us_1){
+    ((void)((*___dst__R19s__condition_node_t_1).__waiting_thread__P12sthread_desc_1=__waiting_thread__P12sthread_desc_1) /* ?{} */);
+    ((void)((*___dst__R19s__condition_node_t_1).__criteria__P24s__condition_criterion_t_1=__criteria__P24s__condition_criterion_t_1) /* ?{} */);
+    ((void)((*___dst__R19s__condition_node_t_1).__count__Us_1=__count__Us_1) /* ?{} */);
+    ((void)((*___dst__R19s__condition_node_t_1).__next__P19s__condition_node_t_1) /* ?{} */);
+    ((void)((*___dst__R19s__condition_node_t_1).__user_info__Ul_1) /* ?{} */);
+}
+static inline void ___constructor__F_R19s__condition_node_tP12sthread_descP24s__condition_criterion_tUsP19s__condition_node_t_autogen___1(struct __condition_node_t *___dst__R19s__condition_node_t_1, struct thread_desc *__waiting_thread__P12sthread_desc_1, struct __condition_criterion_t *__criteria__P24s__condition_criterion_t_1, unsigned short int __count__Us_1, struct __condition_node_t *__next__P19s__condition_node_t_1){
+    ((void)((*___dst__R19s__condition_node_t_1).__waiting_thread__P12sthread_desc_1=__waiting_thread__P12sthread_desc_1) /* ?{} */);
+    ((void)((*___dst__R19s__condition_node_t_1).__criteria__P24s__condition_criterion_t_1=__criteria__P24s__condition_criterion_t_1) /* ?{} */);
+    ((void)((*___dst__R19s__condition_node_t_1).__count__Us_1=__count__Us_1) /* ?{} */);
+    ((void)((*___dst__R19s__condition_node_t_1).__next__P19s__condition_node_t_1=__next__P19s__condition_node_t_1) /* ?{} */);
+    ((void)((*___dst__R19s__condition_node_t_1).__user_info__Ul_1) /* ?{} */);
+}
+static inline void ___constructor__F_R19s__condition_node_tP12sthread_descP24s__condition_criterion_tUsP19s__condition_node_tUl_autogen___1(struct __condition_node_t *___dst__R19s__condition_node_t_1, struct thread_desc *__waiting_thread__P12sthread_desc_1, struct __condition_criterion_t *__criteria__P24s__condition_criterion_t_1, unsigned short int __count__Us_1, struct __condition_node_t *__next__P19s__condition_node_t_1, unsigned long int __user_info__Ul_1){
+    ((void)((*___dst__R19s__condition_node_t_1).__waiting_thread__P12sthread_desc_1=__waiting_thread__P12sthread_desc_1) /* ?{} */);
+    ((void)((*___dst__R19s__condition_node_t_1).__criteria__P24s__condition_criterion_t_1=__criteria__P24s__condition_criterion_t_1) /* ?{} */);
+    ((void)((*___dst__R19s__condition_node_t_1).__count__Us_1=__count__Us_1) /* ?{} */);
+    ((void)((*___dst__R19s__condition_node_t_1).__next__P19s__condition_node_t_1=__next__P19s__condition_node_t_1) /* ?{} */);
+    ((void)((*___dst__R19s__condition_node_t_1).__user_info__Ul_1=__user_info__Ul_1) /* ?{} */);
+}
+struct __condition_blocked_queue_t {
+    struct __condition_node_t *__head__P19s__condition_node_t_1;
+    struct __condition_node_t **__tail__PP19s__condition_node_t_1;
+};
+static inline void ___constructor__F_R28s__condition_blocked_queue_t_autogen___1(struct __condition_blocked_queue_t *___dst__R28s__condition_blocked_queue_t_1);
+static inline void ___constructor__F_R28s__condition_blocked_queue_t28s__condition_blocked_queue_t_autogen___1(struct __condition_blocked_queue_t *___dst__R28s__condition_blocked_queue_t_1, struct __condition_blocked_queue_t ___src__28s__condition_blocked_queue_t_1);
+static inline void ___destructor__F_R28s__condition_blocked_queue_t_autogen___1(struct __condition_blocked_queue_t *___dst__R28s__condition_blocked_queue_t_1);
+static inline struct __condition_blocked_queue_t ___operator_assign__F28s__condition_blocked_queue_t_R28s__condition_blocked_queue_t28s__condition_blocked_queue_t_autogen___1(struct __condition_blocked_queue_t *___dst__R28s__condition_blocked_queue_t_1, struct __condition_blocked_queue_t ___src__28s__condition_blocked_queue_t_1);
+static inline void ___constructor__F_R28s__condition_blocked_queue_t_autogen___1(struct __condition_blocked_queue_t *___dst__R28s__condition_blocked_queue_t_1){
+    ((void)((*___dst__R28s__condition_blocked_queue_t_1).__head__P19s__condition_node_t_1) /* ?{} */);
+    ((void)((*___dst__R28s__condition_blocked_queue_t_1).__tail__PP19s__condition_node_t_1) /* ?{} */);
+}
+static inline void ___constructor__F_R28s__condition_blocked_queue_t28s__condition_blocked_queue_t_autogen___1(struct __condition_blocked_queue_t *___dst__R28s__condition_blocked_queue_t_1, struct __condition_blocked_queue_t ___src__28s__condition_blocked_queue_t_1){
+    ((void)((*___dst__R28s__condition_blocked_queue_t_1).__head__P19s__condition_node_t_1=___src__28s__condition_blocked_queue_t_1.__head__P19s__condition_node_t_1) /* ?{} */);
+    ((void)((*___dst__R28s__condition_blocked_queue_t_1).__tail__PP19s__condition_node_t_1=___src__28s__condition_blocked_queue_t_1.__tail__PP19s__condition_node_t_1) /* ?{} */);
+}
+static inline void ___destructor__F_R28s__condition_blocked_queue_t_autogen___1(struct __condition_blocked_queue_t *___dst__R28s__condition_blocked_queue_t_1){
+    ((void)((*___dst__R28s__condition_blocked_queue_t_1).__tail__PP19s__condition_node_t_1) /* ^?{} */);
+    ((void)((*___dst__R28s__condition_blocked_queue_t_1).__head__P19s__condition_node_t_1) /* ^?{} */);
+}
+static inline struct __condition_blocked_queue_t ___operator_assign__F28s__condition_blocked_queue_t_R28s__condition_blocked_queue_t28s__condition_blocked_queue_t_autogen___1(struct __condition_blocked_queue_t *___dst__R28s__condition_blocked_queue_t_1, struct __condition_blocked_queue_t ___src__28s__condition_blocked_queue_t_1){
+    struct __condition_blocked_queue_t ___ret__28s__condition_blocked_queue_t_1;
+    ((void)((*___dst__R28s__condition_blocked_queue_t_1).__head__P19s__condition_node_t_1=___src__28s__condition_blocked_queue_t_1.__head__P19s__condition_node_t_1));
+    ((void)((*___dst__R28s__condition_blocked_queue_t_1).__tail__PP19s__condition_node_t_1=___src__28s__condition_blocked_queue_t_1.__tail__PP19s__condition_node_t_1));
+    ((void)___constructor__F_R28s__condition_blocked_queue_t28s__condition_blocked_queue_t_autogen___1((&___ret__28s__condition_blocked_queue_t_1), ___src__28s__condition_blocked_queue_t_1));
+    return ((struct __condition_blocked_queue_t )___ret__28s__condition_blocked_queue_t_1);
+}
+static inline void ___constructor__F_R28s__condition_blocked_queue_tP19s__condition_node_t_autogen___1(struct __condition_blocked_queue_t *___dst__R28s__condition_blocked_queue_t_1, struct __condition_node_t *__head__P19s__condition_node_t_1){
+    ((void)((*___dst__R28s__condition_blocked_queue_t_1).__head__P19s__condition_node_t_1=__head__P19s__condition_node_t_1) /* ?{} */);
+    ((void)((*___dst__R28s__condition_blocked_queue_t_1).__tail__PP19s__condition_node_t_1) /* ?{} */);
+}
+static inline void ___constructor__F_R28s__condition_blocked_queue_tP19s__condition_node_tPP19s__condition_node_t_autogen___1(struct __condition_blocked_queue_t *___dst__R28s__condition_blocked_queue_t_1, struct __condition_node_t *__head__P19s__condition_node_t_1, struct __condition_node_t **__tail__PP19s__condition_node_t_1){
+    ((void)((*___dst__R28s__condition_blocked_queue_t_1).__head__P19s__condition_node_t_1=__head__P19s__condition_node_t_1) /* ?{} */);
+    ((void)((*___dst__R28s__condition_blocked_queue_t_1).__tail__PP19s__condition_node_t_1=__tail__PP19s__condition_node_t_1) /* ?{} */);
+}
+void ___constructor__F_R28s__condition_blocked_queue_t__1(struct __condition_blocked_queue_t *__anonymous_object198);
+void __append__F_P28s__condition_blocked_queue_tP19s__condition_node_t__1(struct __condition_blocked_queue_t *__anonymous_object199, struct __condition_node_t *__anonymous_object200);
+struct __condition_node_t *__pop_head__FP19s__condition_node_t_P28s__condition_blocked_queue_t__1(struct __condition_blocked_queue_t *__anonymous_object201);
+struct condition {
+    struct __condition_blocked_queue_t __blocked__28s__condition_blocked_queue_t_1;
+    struct monitor_desc **__monitors__PP13smonitor_desc_1;
+    unsigned short int __monitor_count__Us_1;
+};
+static inline void ___constructor__F_R10scondition_autogen___1(struct condition *___dst__R10scondition_1);
+static inline void ___constructor__F_R10scondition10scondition_autogen___1(struct condition *___dst__R10scondition_1, struct condition ___src__10scondition_1);
+static inline void ___destructor__F_R10scondition_autogen___1(struct condition *___dst__R10scondition_1);
+static inline struct condition ___operator_assign__F10scondition_R10scondition10scondition_autogen___1(struct condition *___dst__R10scondition_1, struct condition ___src__10scondition_1);
+static inline void ___constructor__F_R10scondition_autogen___1(struct condition *___dst__R10scondition_1){
+    ((void)___constructor__F_R28s__condition_blocked_queue_t__1((&(*___dst__R10scondition_1).__blocked__28s__condition_blocked_queue_t_1)));
+    ((void)((*___dst__R10scondition_1).__monitors__PP13smonitor_desc_1) /* ?{} */);
+    ((void)((*___dst__R10scondition_1).__monitor_count__Us_1) /* ?{} */);
+}
+static inline void ___constructor__F_R10scondition10scondition_autogen___1(struct condition *___dst__R10scondition_1, struct condition ___src__10scondition_1){
+    ((void)___constructor__F_R28s__condition_blocked_queue_t28s__condition_blocked_queue_t_autogen___1((&(*___dst__R10scondition_1).__blocked__28s__condition_blocked_queue_t_1), ___src__10scondition_1.__blocked__28s__condition_blocked_queue_t_1));
+    ((void)((*___dst__R10scondition_1).__monitors__PP13smonitor_desc_1=___src__10scondition_1.__monitors__PP13smonitor_desc_1) /* ?{} */);
+    ((void)((*___dst__R10scondition_1).__monitor_count__Us_1=___src__10scondition_1.__monitor_count__Us_1) /* ?{} */);
+}
+static inline void ___destructor__F_R10scondition_autogen___1(struct condition *___dst__R10scondition_1){
+    ((void)((*___dst__R10scondition_1).__monitor_count__Us_1) /* ^?{} */);
+    ((void)((*___dst__R10scondition_1).__monitors__PP13smonitor_desc_1) /* ^?{} */);
+    ((void)___destructor__F_R28s__condition_blocked_queue_t_autogen___1((&(*___dst__R10scondition_1).__blocked__28s__condition_blocked_queue_t_1)));
+}
+static inline struct condition ___operator_assign__F10scondition_R10scondition10scondition_autogen___1(struct condition *___dst__R10scondition_1, struct condition ___src__10scondition_1){
+    struct condition ___ret__10scondition_1;
+    struct __condition_blocked_queue_t _tmp_cp4;
+    struct __condition_blocked_queue_t _tmp_cp_ret29;
+    ((void)(((void)(_tmp_cp_ret29=___operator_assign__F28s__condition_blocked_queue_t_R28s__condition_blocked_queue_t28s__condition_blocked_queue_t_autogen___1((&(*___dst__R10scondition_1).__blocked__28s__condition_blocked_queue_t_1), (((void)___constructor__F_R28s__condition_blocked_queue_t28s__condition_blocked_queue_t_autogen___1((&_tmp_cp4), ___src__10scondition_1.__blocked__28s__condition_blocked_queue_t_1)) , _tmp_cp4)))) , _tmp_cp_ret29));
+    ((void)___destructor__F_R28s__condition_blocked_queue_t_autogen___1((&_tmp_cp_ret29)));
+    ((void)___destructor__F_R28s__condition_blocked_queue_t_autogen___1((&_tmp_cp4)));
+    ((void)((*___dst__R10scondition_1).__monitors__PP13smonitor_desc_1=___src__10scondition_1.__monitors__PP13smonitor_desc_1));
+    ((void)((*___dst__R10scondition_1).__monitor_count__Us_1=___src__10scondition_1.__monitor_count__Us_1));
+    ((void)___constructor__F_R10scondition10scondition_autogen___1((&___ret__10scondition_1), ___src__10scondition_1));
+    return ((struct condition )___ret__10scondition_1);
+}
+static inline void ___constructor__F_R10scondition28s__condition_blocked_queue_t_autogen___1(struct condition *___dst__R10scondition_1, struct __condition_blocked_queue_t __blocked__28s__condition_blocked_queue_t_1){
+    ((void)___constructor__F_R28s__condition_blocked_queue_t28s__condition_blocked_queue_t_autogen___1((&(*___dst__R10scondition_1).__blocked__28s__condition_blocked_queue_t_1), __blocked__28s__condition_blocked_queue_t_1));
+    ((void)((*___dst__R10scondition_1).__monitors__PP13smonitor_desc_1) /* ?{} */);
+    ((void)((*___dst__R10scondition_1).__monitor_count__Us_1) /* ?{} */);
+}
+static inline void ___constructor__F_R10scondition28s__condition_blocked_queue_tPP13smonitor_desc_autogen___1(struct condition *___dst__R10scondition_1, struct __condition_blocked_queue_t __blocked__28s__condition_blocked_queue_t_1, struct monitor_desc **__monitors__PP13smonitor_desc_1){
+    ((void)___constructor__F_R28s__condition_blocked_queue_t28s__condition_blocked_queue_t_autogen___1((&(*___dst__R10scondition_1).__blocked__28s__condition_blocked_queue_t_1), __blocked__28s__condition_blocked_queue_t_1));
+    ((void)((*___dst__R10scondition_1).__monitors__PP13smonitor_desc_1=__monitors__PP13smonitor_desc_1) /* ?{} */);
+    ((void)((*___dst__R10scondition_1).__monitor_count__Us_1) /* ?{} */);
+}
+static inline void ___constructor__F_R10scondition28s__condition_blocked_queue_tPP13smonitor_descUs_autogen___1(struct condition *___dst__R10scondition_1, struct __condition_blocked_queue_t __blocked__28s__condition_blocked_queue_t_1, struct monitor_desc **__monitors__PP13smonitor_desc_1, unsigned short int __monitor_count__Us_1){
+    ((void)___constructor__F_R28s__condition_blocked_queue_t28s__condition_blocked_queue_t_autogen___1((&(*___dst__R10scondition_1).__blocked__28s__condition_blocked_queue_t_1), __blocked__28s__condition_blocked_queue_t_1));
+    ((void)((*___dst__R10scondition_1).__monitors__PP13smonitor_desc_1=__monitors__PP13smonitor_desc_1) /* ?{} */);
+    ((void)((*___dst__R10scondition_1).__monitor_count__Us_1=__monitor_count__Us_1) /* ?{} */);
+}
+static inline void ___constructor__F_R10scondition__1(struct condition *__this__R10scondition_1){
+    ((void)___constructor__F_R28s__condition_blocked_queue_t__1((&(*__this__R10scondition_1).__blocked__28s__condition_blocked_queue_t_1)));
+    ((void)((*__this__R10scondition_1).__monitors__PP13smonitor_desc_1) /* ?{} */);
+    ((void)((*__this__R10scondition_1).__monitor_count__Us_1) /* ?{} */);
+    ((void)((*__this__R10scondition_1).__monitors__PP13smonitor_desc_1=((void *)0)));
+    ((void)((*__this__R10scondition_1).__monitor_count__Us_1=((unsigned short int )0)));
+}
+static inline void ___destructor__F_R10scondition__1(struct condition *__this__R10scondition_1){
+    ((void)free(((void *)(*__this__R10scondition_1).__monitors__PP13smonitor_desc_1)));
+    ((void)((*__this__R10scondition_1).__monitor_count__Us_1) /* ^?{} */);
+    ((void)((*__this__R10scondition_1).__monitors__PP13smonitor_desc_1) /* ^?{} */);
+    ((void)___destructor__F_R28s__condition_blocked_queue_t_autogen___1((&(*__this__R10scondition_1).__blocked__28s__condition_blocked_queue_t_1)));
+}
+void __wait__F_P10sconditionUl__1(struct condition *__this__P10scondition_1, unsigned long int __user_info__Ul_1);
+_Bool __signal__Fb_P10scondition__1(struct condition *__this__P10scondition_1);
+_Bool __signal_block__Fb_P10scondition__1(struct condition *__this__P10scondition_1);
+static inline _Bool __is_empty__Fb_P10scondition__1(struct condition *__this__P10scondition_1){
+    __attribute__ ((unused)) _Bool ___retval_is_empty__b_1;
+    ((void)(___retval_is_empty__b_1=((_Bool )(!(*__this__P10scondition_1).__blocked__28s__condition_blocked_queue_t_1.__head__P19s__condition_node_t_1))) /* ?{} */);
+    return ((_Bool )___retval_is_empty__b_1);
+}
+unsigned long int __front__FUl_P10scondition__1(struct condition *__this__P10scondition_1);
+struct __acceptable_t {
+    struct __monitor_group_t __anonymous_object202;
+    _Bool __is_dtor__b_1;
+};
+static inline void ___constructor__F_R15s__acceptable_t_autogen___1(struct __acceptable_t *___dst__R15s__acceptable_t_1);
+static inline void ___constructor__F_R15s__acceptable_t15s__acceptable_t_autogen___1(struct __acceptable_t *___dst__R15s__acceptable_t_1, struct __acceptable_t ___src__15s__acceptable_t_1);
+static inline void ___destructor__F_R15s__acceptable_t_autogen___1(struct __acceptable_t *___dst__R15s__acceptable_t_1);
+static inline struct __acceptable_t ___operator_assign__F15s__acceptable_t_R15s__acceptable_t15s__acceptable_t_autogen___1(struct __acceptable_t *___dst__R15s__acceptable_t_1, struct __acceptable_t ___src__15s__acceptable_t_1);
+static inline void ___constructor__F_R15s__acceptable_t_autogen___1(struct __acceptable_t *___dst__R15s__acceptable_t_1){
+    ((void)((*___dst__R15s__acceptable_t_1).__is_dtor__b_1) /* ?{} */);
+}
+static inline void ___constructor__F_R15s__acceptable_t15s__acceptable_t_autogen___1(struct __acceptable_t *___dst__R15s__acceptable_t_1, struct __acceptable_t ___src__15s__acceptable_t_1){
+    ((void)((*___dst__R15s__acceptable_t_1).__is_dtor__b_1=___src__15s__acceptable_t_1.__is_dtor__b_1) /* ?{} */);
+}
+static inline void ___destructor__F_R15s__acceptable_t_autogen___1(struct __acceptable_t *___dst__R15s__acceptable_t_1){
+    ((void)((*___dst__R15s__acceptable_t_1).__is_dtor__b_1) /* ^?{} */);
+}
+static inline struct __acceptable_t ___operator_assign__F15s__acceptable_t_R15s__acceptable_t15s__acceptable_t_autogen___1(struct __acceptable_t *___dst__R15s__acceptable_t_1, struct __acceptable_t ___src__15s__acceptable_t_1){
+    struct __acceptable_t ___ret__15s__acceptable_t_1;
+    ((void)((*___dst__R15s__acceptable_t_1).__is_dtor__b_1=___src__15s__acceptable_t_1.__is_dtor__b_1));
+    ((void)___constructor__F_R15s__acceptable_t15s__acceptable_t_autogen___1((&___ret__15s__acceptable_t_1), ___src__15s__acceptable_t_1));
+    return ((struct __acceptable_t )___ret__15s__acceptable_t_1);
+}
+static inline void ___constructor__F_R15s__acceptable_tb_autogen___1(struct __acceptable_t *___dst__R15s__acceptable_t_1, _Bool __is_dtor__b_1){
+    ((void)((*___dst__R15s__acceptable_t_1).__is_dtor__b_1=__is_dtor__b_1) /* ?{} */);
+}
+void ____waitfor_internal__F_RC17s__waitfor_mask_ti__1(const struct __waitfor_mask_t *__mask__RC17s__waitfor_mask_t_1, signed int __duration__i_1);
+struct M;
+static inline struct monitor_desc *__get_monitor__FP13smonitor_desc_R2sM__1(struct M *__this__R2sM_1);
+struct M {
+    struct monitor_desc ____mon__13smonitor_desc_1;
+};
+static inline void ___constructor__F_R2sM_autogen___1(struct M *___dst__R2sM_1);
+static inline void ___constructor__F_R2sM2sM_autogen___1(struct M *___dst__R2sM_1, struct M ___src__2sM_1);
+static inline void ___destructor__F_MR2sM_autogen___1(struct M *___dst__MR2sM_1);
+static inline struct M ___operator_assign__F2sM_R2sM2sM_autogen___1(struct M *___dst__R2sM_1, struct M ___src__2sM_1);
+static inline void ___constructor__F_R2sM_autogen___1(struct M *___dst__R2sM_1){
+    ((void)___constructor__F_R13smonitor_desc__1((&(*___dst__R2sM_1).____mon__13smonitor_desc_1)));
+}
+static inline void ___constructor__F_R2sM2sM_autogen___1(struct M *___dst__R2sM_1, struct M ___src__2sM_1){
+    ((void)___constructor__F_R13smonitor_desc13smonitor_desc_autogen___1((&(*___dst__R2sM_1).____mon__13smonitor_desc_1), ___src__2sM_1.____mon__13smonitor_desc_1));
+}
+static inline void ___destructor__F_MR2sM_autogen___1(struct M *___dst__MR2sM_1){
+    struct monitor_desc *_tmp_cp_ret30;
+    struct monitor_desc *____monitors__A0P13smonitor_desc_2[((unsigned long int )1)] = { ((struct monitor_desc *)(((void)(_tmp_cp_ret30=__get_monitor__FP13smonitor_desc_R2sM__1(((struct M *)___dst__MR2sM_1)))) , _tmp_cp_ret30)) };
+    ((void)(_tmp_cp_ret30) /* ^?{} */);
+    struct monitor_guard_t ____guard__16smonitor_guard_t_2;
+    ((void)___constructor__F_R16smonitor_guard_tPP13smonitor_desciPF____1((&____guard__16smonitor_guard_t_2), ____monitors__A0P13smonitor_desc_2, ((signed int )1), ((void (*)())((void (*)())___destructor__F_MR2sM_autogen___1))));
+    ((void)___destructor__F_R13smonitor_desc_autogen___1((&(*___dst__MR2sM_1).____mon__13smonitor_desc_1)));
+    ((void)___destructor__F_R16smonitor_guard_t__1((&____guard__16smonitor_guard_t_2)));
+}
+static inline struct M ___operator_assign__F2sM_R2sM2sM_autogen___1(struct M *___dst__R2sM_1, struct M ___src__2sM_1){
+    struct M ___ret__2sM_1;
+    struct monitor_desc _tmp_cp5;
+    struct monitor_desc _tmp_cp_ret31;
+    ((void)(((void)(_tmp_cp_ret31=___operator_assign__F13smonitor_desc_R13smonitor_desc13smonitor_desc_autogen___1((&(*___dst__R2sM_1).____mon__13smonitor_desc_1), (((void)___constructor__F_R13smonitor_desc13smonitor_desc_autogen___1((&_tmp_cp5), ___src__2sM_1.____mon__13smonitor_desc_1)) , _tmp_cp5)))) , _tmp_cp_ret31));
+    ((void)___destructor__F_R13smonitor_desc_autogen___1((&_tmp_cp_ret31)));
+    ((void)___destructor__F_R13smonitor_desc_autogen___1((&_tmp_cp5)));
+    ((void)___constructor__F_R2sM2sM_autogen___1((&___ret__2sM_1), ___src__2sM_1));
+    return ((struct M )___ret__2sM_1);
+}
+static inline void ___constructor__F_R2sM13smonitor_desc_autogen___1(struct M *___dst__R2sM_1, struct monitor_desc ____mon__13smonitor_desc_1){
+    ((void)___constructor__F_R13smonitor_desc13smonitor_desc_autogen___1((&(*___dst__R2sM_1).____mon__13smonitor_desc_1), ____mon__13smonitor_desc_1));
+}
+static inline struct monitor_desc *__get_monitor__FP13smonitor_desc_R2sM__1(struct M *__this__R2sM_1){
+    struct monitor_desc *__ret__P13smonitor_desc_1;
+    ((void)(__ret__P13smonitor_desc_1=(&(*__this__R2sM_1).____mon__13smonitor_desc_1)) /* ?{} */);
+    return ((struct monitor_desc *)__ret__P13smonitor_desc_1);
+}
+struct M __a__2sM_1;
+void __f1__F_MR2sM__1(struct M *__a__MR2sM_1);
+void __f2__F_MR2sM__1(struct M *__a__MR2sM_1);
+void __f2__F_MR2sMMR2sM__1(struct M *__a__MR2sM_1, struct M *__b__MR2sM_1);
+void __f3__F_MR2sM__1(struct M *__a__MR2sM_1);
+void __f3__F_MR2sMMR2sM__1(struct M *__a__MR2sM_1, struct M *__b__MR2sM_1);
+void __f3__F_MR2sMMR2sMMR2sM__1(struct M *__a__MR2sM_1, struct M *__b__MR2sM_1, struct M *__c__MR2sM_1);
+void __foo__F___1(){
+    {
+        struct __acceptable_t __acceptables_0[1];
+        ((void)__builtin_memset(((void *)__acceptables_0), 0, sizeof(__acceptables_0)));
+        _Bool __do_run_0 = 0;
+        struct monitor_desc *__monitors_0[1] = { ((struct monitor_desc *)__get_monitor__FP13smonitor_desc_R2sM__1((&__a__2sM_1))) };
+        if ( 1 ) {
+            ((void)(__acceptables_0[((signed long int )0)].__is_dtor__b_1=0));
+            ((void)(__acceptables_0[((signed long int )0)].__anonymous_object202.func=((void (*)())__f1__F_MR2sM__1)));
+            ((void)(__acceptables_0[((signed long int )0)].__anonymous_object202.list=__monitors_0));
+            ((void)(__acceptables_0[((signed long int )0)].__anonymous_object202.size=((signed short int )1)));
+            ((void)(__do_run_0=((_Bool )1)));
+        }
+
+        unsigned long long int __timeout_0 = -1;
+        if ( __do_run_0 ) {
+            signed short int __index_0 = -1;
+            struct __waitfor_mask_t __mask_0 = { (&__index_0), __acceptables_0, 1 };
+            ((void)____waitfor_internal__F_RC17s__waitfor_mask_ti__1((&__mask_0), __timeout_0));
+            switch ( __index_0 ) {
+                case 0:
+                    {
+                        ((void)1);
+                    }
+                    break;
+            }
+
+        }
+
+    }
+
+    {
+        struct __acceptable_t __acceptables_1[1];
+        ((void)__builtin_memset(((void *)__acceptables_1), 0, sizeof(__acceptables_1)));
+        _Bool __do_run_1 = 0;
+        struct monitor_desc *__monitors_1[1] = { ((struct monitor_desc *)__get_monitor__FP13smonitor_desc_R2sM__1((&__a__2sM_1))) };
+        if ( 1 ) {
+            ((void)(__acceptables_1[((signed long int )0)].__is_dtor__b_1=0));
+            ((void)(__acceptables_1[((signed long int )0)].__anonymous_object202.func=((void (*)())__f1__F_MR2sM__1)));
+            ((void)(__acceptables_1[((signed long int )0)].__anonymous_object202.list=__monitors_1));
+            ((void)(__acceptables_1[((signed long int )0)].__anonymous_object202.size=((signed short int )1)));
+            ((void)(__do_run_1=((_Bool )1)));
+        }
+
+        unsigned long long int __timeout_1 = -1;
+        if ( __do_run_1 ) {
+            signed short int __index_1 = -1;
+            struct __waitfor_mask_t __mask_1 = { (&__index_1), __acceptables_1, 1 };
+            ((void)____waitfor_internal__F_RC17s__waitfor_mask_ti__1((&__mask_1), __timeout_1));
+            switch ( __index_1 ) {
+                case 0:
+                    {
+                        ((void)2);
+                    }
+                    break;
+            }
+
+        }
+
+    }
+
+    {
+        struct __acceptable_t __acceptables_2[1];
+        ((void)__builtin_memset(((void *)__acceptables_2), 0, sizeof(__acceptables_2)));
+        _Bool __do_run_2 = 0;
+        struct monitor_desc *__monitors_2[1] = { ((struct monitor_desc *)__get_monitor__FP13smonitor_desc_R2sM__1((&__a__2sM_1))) };
+        if ( 1 ) {
+            ((void)(__acceptables_2[((signed long int )0)].__is_dtor__b_1=0));
+            ((void)(__acceptables_2[((signed long int )0)].__anonymous_object202.func=((void (*)())__f2__F_MR2sM__1)));
+            ((void)(__acceptables_2[((signed long int )0)].__anonymous_object202.list=__monitors_2));
+            ((void)(__acceptables_2[((signed long int )0)].__anonymous_object202.size=((signed short int )1)));
+            ((void)(__do_run_2=((_Bool )1)));
+        }
+
+        unsigned long long int __timeout_2 = -1;
+        if ( __do_run_2 ) {
+            signed short int __index_2 = -1;
+            struct __waitfor_mask_t __mask_2 = { (&__index_2), __acceptables_2, 1 };
+            ((void)____waitfor_internal__F_RC17s__waitfor_mask_ti__1((&__mask_2), __timeout_2));
+            switch ( __index_2 ) {
+                case 0:
+                    {
+                        ((void)3);
+                    }
+                    break;
+            }
+
+        }
+
+    }
+
+    {
+        struct __acceptable_t __acceptables_3[1];
+        ((void)__builtin_memset(((void *)__acceptables_3), 0, sizeof(__acceptables_3)));
+        _Bool __do_run_3 = 0;
+        struct monitor_desc *__monitors_3[2] = { ((struct monitor_desc *)__get_monitor__FP13smonitor_desc_R2sM__1((&__a__2sM_1))), ((struct monitor_desc *)__get_monitor__FP13smonitor_desc_R2sM__1((&__a__2sM_1))) };
+        if ( ((signed int )((((signed int )1)<3)!=((signed int )0))) ) {
+            ((void)(__acceptables_3[((signed long int )0)].__is_dtor__b_1=0));
+            ((void)(__acceptables_3[((signed long int )0)].__anonymous_object202.func=((void (*)())__f2__F_MR2sMMR2sM__1)));
+            ((void)(__acceptables_3[((signed long int )0)].__anonymous_object202.list=__monitors_3));
+            ((void)(__acceptables_3[((signed long int )0)].__anonymous_object202.size=((signed short int )2)));
+            ((void)(__do_run_3=((_Bool )1)));
+        }
+
+        unsigned long long int __timeout_3 = -1;
+        if ( 1 ) {
+            ((void)(__timeout_3=((unsigned long long int )100)));
+            ((void)(__do_run_3=((_Bool )1)));
+        }
+
+        if ( __do_run_3 ) {
+            signed short int __index_3 = -1;
+            struct __waitfor_mask_t __mask_3 = { (&__index_3), __acceptables_3, 1 };
+            ((void)____waitfor_internal__F_RC17s__waitfor_mask_ti__1((&__mask_3), __timeout_3));
+            switch ( __index_3 ) {
+                case 0:
+                    {
+                        ((void)4);
+                    }
+                    break;
+                case -2:
+                    {
+                        ((void)5);
+                    }
+                    break;
+            }
+
+        }
+
+    }
+
+    {
+        struct __acceptable_t __acceptables_4[1];
+        ((void)__builtin_memset(((void *)__acceptables_4), 0, sizeof(__acceptables_4)));
+        _Bool __do_run_4 = 0;
+        struct monitor_desc *__monitors_4[1] = { ((struct monitor_desc *)__get_monitor__FP13smonitor_desc_R2sM__1((&__a__2sM_1))) };
+        if ( ((signed int )((2<3)!=((signed int )0))) ) {
+            ((void)(__acceptables_4[((signed long int )0)].__is_dtor__b_1=0));
+            ((void)(__acceptables_4[((signed long int )0)].__anonymous_object202.func=((void (*)())__f3__F_MR2sM__1)));
+            ((void)(__acceptables_4[((signed long int )0)].__anonymous_object202.list=__monitors_4));
+            ((void)(__acceptables_4[((signed long int )0)].__anonymous_object202.size=((signed short int )1)));
+            ((void)(__do_run_4=((_Bool )1)));
+        }
+
+        unsigned long long int __timeout_4 = -1;
+        if ( 1 ) {
+            ((void)(__timeout_4=0));
+            ((void)(__do_run_4=((_Bool )1)));
+        }
+
+        if ( __do_run_4 ) {
+            signed short int __index_4 = -1;
+            struct __waitfor_mask_t __mask_4 = { (&__index_4), __acceptables_4, 1 };
+            ((void)____waitfor_internal__F_RC17s__waitfor_mask_ti__1((&__mask_4), __timeout_4));
+            switch ( __index_4 ) {
+                case 0:
+                    {
+                        ((void)5);
+                    }
+                    break;
+                case -1:
+                    {
+                        ((void)6);
+                    }
+                    break;
+            }
+
+        }
+
+    }
+
+    {
+        struct __acceptable_t __acceptables_5[1];
+        ((void)__builtin_memset(((void *)__acceptables_5), 0, sizeof(__acceptables_5)));
+        _Bool __do_run_5 = 0;
+        struct monitor_desc *__monitors_5[2] = { ((struct monitor_desc *)__get_monitor__FP13smonitor_desc_R2sM__1((&__a__2sM_1))), ((struct monitor_desc *)__get_monitor__FP13smonitor_desc_R2sM__1((&__a__2sM_1))) };
+        if ( ((signed int )((3<3)!=((signed int )0))) ) {
+            ((void)(__acceptables_5[((signed long int )0)].__is_dtor__b_1=0));
+            ((void)(__acceptables_5[((signed long int )0)].__anonymous_object202.func=((void (*)())__f3__F_MR2sMMR2sM__1)));
+            ((void)(__acceptables_5[((signed long int )0)].__anonymous_object202.list=__monitors_5));
+            ((void)(__acceptables_5[((signed long int )0)].__anonymous_object202.size=((signed short int )2)));
+            ((void)(__do_run_5=((_Bool )1)));
+        }
+
+        unsigned long long int __timeout_5 = -1;
+        if ( ((signed int )((4<3)!=((signed int )0))) ) {
+            ((void)(__timeout_5=((unsigned long long int )101)));
+            ((void)(__do_run_5=((_Bool )1)));
+        }
+
+        if ( ((signed int )((5<3)!=((signed int )0))) ) {
+            ((void)(__timeout_5=0));
+            ((void)(__do_run_5=((_Bool )1)));
+        }
+
+        if ( __do_run_5 ) {
+            signed short int __index_5 = -1;
+            struct __waitfor_mask_t __mask_5 = { (&__index_5), __acceptables_5, 1 };
+            ((void)____waitfor_internal__F_RC17s__waitfor_mask_ti__1((&__mask_5), __timeout_5));
+            switch ( __index_5 ) {
+                case 0:
+                    {
+                        ((void)7);
+                    }
+                    break;
+                case -2:
+                    {
+                        ((void)8);
+                    }
+                    break;
+                case -1:
+                    {
+                        ((void)9);
+                    }
+                    break;
+            }
+
+        }
+
+    }
+
+    {
+        struct __acceptable_t __acceptables_6[2];
+        ((void)__builtin_memset(((void *)__acceptables_6), 0, sizeof(__acceptables_6)));
+        _Bool __do_run_6 = 0;
+        struct monitor_desc *__monitors_6[3] = { ((struct monitor_desc *)__get_monitor__FP13smonitor_desc_R2sM__1((&__a__2sM_1))), ((struct monitor_desc *)__get_monitor__FP13smonitor_desc_R2sM__1((&__a__2sM_1))), ((struct monitor_desc *)__get_monitor__FP13smonitor_desc_R2sM__1((&__a__2sM_1))) };
+        if ( ((signed int )((6<3)!=((signed int )0))) ) {
+            ((void)(__acceptables_6[((signed long int )0)].__is_dtor__b_1=0));
+            ((void)(__acceptables_6[((signed long int )0)].__anonymous_object202.func=((void (*)())__f3__F_MR2sMMR2sMMR2sM__1)));
+            ((void)(__acceptables_6[((signed long int )0)].__anonymous_object202.list=__monitors_6));
+            ((void)(__acceptables_6[((signed long int )0)].__anonymous_object202.size=((signed short int )3)));
+            ((void)(__do_run_6=((_Bool )1)));
+        }
+
+        struct monitor_desc *__monitors_7[1] = { ((struct monitor_desc *)__get_monitor__FP13smonitor_desc_R2sM__1((&__a__2sM_1))) };
+        if ( ((signed int )((7<3)!=((signed int )0))) ) {
+            ((void)(__acceptables_6[((signed long int )1)].__is_dtor__b_1=0));
+            ((void)(__acceptables_6[((signed long int )1)].__anonymous_object202.func=((void (*)())__f1__F_MR2sM__1)));
+            ((void)(__acceptables_6[((signed long int )1)].__anonymous_object202.list=__monitors_7));
+            ((void)(__acceptables_6[((signed long int )1)].__anonymous_object202.size=((signed short int )1)));
+            ((void)(__do_run_6=((_Bool )1)));
+        }
+
+        unsigned long long int __timeout_6 = -1;
+        if ( 1 ) {
+            ((void)(__timeout_6=0));
+            ((void)(__do_run_6=((_Bool )1)));
+        }
+
+        if ( __do_run_6 ) {
+            signed short int __index_6 = -1;
+            struct __waitfor_mask_t __mask_6 = { (&__index_6), __acceptables_6, 2 };
+            ((void)____waitfor_internal__F_RC17s__waitfor_mask_ti__1((&__mask_6), __timeout_6));
+            switch ( __index_6 ) {
+                case 0:
+                    {
+                        ((void)10);
+                    }
+                    break;
+                case 1:
+                    {
+                        ((void)11);
+                    }
+                    break;
+                case -1:
+                    {
+                        ((void)12);
+                    }
+                    break;
+            }
+
+        }
+
+    }
+
+    {
+        struct __acceptable_t __acceptables_7[2];
+        ((void)__builtin_memset(((void *)__acceptables_7), 0, sizeof(__acceptables_7)));
+        _Bool __do_run_7 = 0;
+        struct monitor_desc *__monitors_8[2] = { ((struct monitor_desc *)__get_monitor__FP13smonitor_desc_R2sM__1((&__a__2sM_1))), ((struct monitor_desc *)__get_monitor__FP13smonitor_desc_R2sM__1((&__a__2sM_1))) };
+        if ( ((signed int )((8<3)!=((signed int )0))) ) {
+            ((void)(__acceptables_7[((signed long int )0)].__is_dtor__b_1=0));
+            ((void)(__acceptables_7[((signed long int )0)].__anonymous_object202.func=((void (*)())__f3__F_MR2sMMR2sM__1)));
+            ((void)(__acceptables_7[((signed long int )0)].__anonymous_object202.list=__monitors_8));
+            ((void)(__acceptables_7[((signed long int )0)].__anonymous_object202.size=((signed short int )2)));
+            ((void)(__do_run_7=((_Bool )1)));
+        }
+
+        struct monitor_desc *__monitors_9[1] = { ((struct monitor_desc *)__get_monitor__FP13smonitor_desc_R2sM__1((&__a__2sM_1))) };
+        if ( 1 ) {
+            ((void)(__acceptables_7[((signed long int )1)].__is_dtor__b_1=0));
+            ((void)(__acceptables_7[((signed long int )1)].__anonymous_object202.func=((void (*)())__f1__F_MR2sM__1)));
+            ((void)(__acceptables_7[((signed long int )1)].__anonymous_object202.list=__monitors_9));
+            ((void)(__acceptables_7[((signed long int )1)].__anonymous_object202.size=((signed short int )1)));
+            ((void)(__do_run_7=((_Bool )1)));
+        }
+
+        unsigned long long int __timeout_7 = -1;
+        if ( ((signed int )((9<3)!=((signed int )0))) ) {
+            ((void)(__timeout_7=((unsigned long long int )102)));
+            ((void)(__do_run_7=((_Bool )1)));
+        }
+
+        if ( __do_run_7 ) {
+            signed short int __index_7 = -1;
+            struct __waitfor_mask_t __mask_7 = { (&__index_7), __acceptables_7, 2 };
+            ((void)____waitfor_internal__F_RC17s__waitfor_mask_ti__1((&__mask_7), __timeout_7));
+            switch ( __index_7 ) {
+                case 0:
+                    {
+                        ((void)13);
+                    }
+                    break;
+                case 1:
+                    {
+                        ((void)14);
+                    }
+                    break;
+                case -2:
+                    {
+                        ((void)15);
+                    }
+                    break;
+            }
+
+        }
+
+    }
+
+    {
+        struct __acceptable_t __acceptables_8[2];
+        ((void)__builtin_memset(((void *)__acceptables_8), 0, sizeof(__acceptables_8)));
+        _Bool __do_run_8 = 0;
+        struct monitor_desc *__monitors_10[1] = { ((struct monitor_desc *)__get_monitor__FP13smonitor_desc_R2sM__1((&__a__2sM_1))) };
+        if ( ((signed int )((10<3)!=((signed int )0))) ) {
+            ((void)(__acceptables_8[((signed long int )0)].__is_dtor__b_1=0));
+            ((void)(__acceptables_8[((signed long int )0)].__anonymous_object202.func=((void (*)())__f1__F_MR2sM__1)));
+            ((void)(__acceptables_8[((signed long int )0)].__anonymous_object202.list=__monitors_10));
+            ((void)(__acceptables_8[((signed long int )0)].__anonymous_object202.size=((signed short int )1)));
+            ((void)(__do_run_8=((_Bool )1)));
+        }
+
+        struct monitor_desc *__monitors_11[2] = { ((struct monitor_desc *)__get_monitor__FP13smonitor_desc_R2sM__1((&__a__2sM_1))), ((struct monitor_desc *)__get_monitor__FP13smonitor_desc_R2sM__1((&__a__2sM_1))) };
+        if ( 1 ) {
+            ((void)(__acceptables_8[((signed long int )1)].__is_dtor__b_1=0));
+            ((void)(__acceptables_8[((signed long int )1)].__anonymous_object202.func=((void (*)())__f2__F_MR2sMMR2sM__1)));
+            ((void)(__acceptables_8[((signed long int )1)].__anonymous_object202.list=__monitors_11));
+            ((void)(__acceptables_8[((signed long int )1)].__anonymous_object202.size=((signed short int )2)));
+            ((void)(__do_run_8=((_Bool )1)));
+        }
+
+        unsigned long long int __timeout_8 = -1;
+        if ( 1 ) {
+            ((void)(__timeout_8=((unsigned long long int )103)));
+            ((void)(__do_run_8=((_Bool )1)));
+        }
+
+        if ( ((signed int )((11<3)!=((signed int )0))) ) {
+            ((void)(__timeout_8=0));
+            ((void)(__do_run_8=((_Bool )1)));
+        }
+
+        if ( __do_run_8 ) {
+            signed short int __index_8 = -1;
+            struct __waitfor_mask_t __mask_8 = { (&__index_8), __acceptables_8, 2 };
+            ((void)____waitfor_internal__F_RC17s__waitfor_mask_ti__1((&__mask_8), __timeout_8));
+            switch ( __index_8 ) {
+                case 0:
+                    {
+                        ((void)16);
+                    }
+                    break;
+                case 1:
+                    {
+                        ((void)17);
+                    }
+                    break;
+                case -2:
+                    {
+                        ((void)18);
+                    }
+                    break;
+                case -1:
+                    {
+                        ((void)19);
+                    }
+                    break;
+            }
+
+        }
+
+    }
+
+}
+signed int __main__Fi___1(){
+    __attribute__ ((unused)) signed int ___retval_main__i_1;
+    ((void)(___retval_main__i_1=0) /* ?{} */);
+    return ((signed int )___retval_main__i_1);
+}
+__attribute__ ((constructor)) static void _init_sched_ext_parse(void){
+    ((void)___constructor__F_R2sM_autogen___1((&__a__2sM_1)));
+}
+__attribute__ ((destructor)) static void _destroy_sched_ext_parse(void){
+    ((void)___destructor__F_MR2sM_autogen___1((&__a__2sM_1)));
+}
+static inline int invoke_main(int argc, char* argv[], char* envp[]) { (void)argc; (void)argv; (void)envp; return __main__Fi___1(); }
+__attribute__ ((__nothrow__,__leaf__,__malloc__)) extern void *malloc(unsigned long int __size);
+__attribute__ ((__nothrow__,__leaf__)) extern void free(void *__ptr);
+__attribute__ ((__nothrow__,__leaf__,__noreturn__)) extern void abort(void);
+__attribute__ ((__nothrow__,__leaf__,__nonnull__(1))) extern signed int atexit(void (*__func)(void));
+__attribute__ ((__nothrow__,__leaf__,__noreturn__)) extern void exit(signed int __status);
+extern signed int printf(const char *__restrict __format, ...);
+static inline signed int invoke_main(signed int argc, char **argv, char **envp);
+signed int main(signed int __argc__i_1, char **__argv__PPc_1, char **__envp__PPc_1){
+    __attribute__ ((unused)) signed int ___retval_main__i_1;
+    signed int _tmp_cp_ret0;
+    ((void)(___retval_main__i_1=(((void)(_tmp_cp_ret0=invoke_main(__argc__i_1, __argv__PPc_1, __envp__PPc_1))) , _tmp_cp_ret0)) /* ?{} */);
+    ((void)(_tmp_cp_ret0) /* ^?{} */);
+    return ((signed int )___retval_main__i_1);
+}
Index: src/tests/.expect/concurrent/sched-ext-barge.txt
===================================================================
--- src/tests/.expect/concurrent/sched-ext-barge.txt	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
+++ src/tests/.expect/concurrent/sched-ext-barge.txt	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -0,0 +1,5002 @@
+Starting
+0
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+724
+725
+726
+727
+728
+729
+730
+731
+732
+733
+734
+735
+736
+737
+738
+739
+740
+741
+742
+743
+744
+745
+746
+747
+748
+749
+750
+751
+752
+753
+754
+755
+756
+757
+758
+759
+760
+761
+762
+763
+764
+765
+766
+767
+768
+769
+770
+771
+772
+773
+774
+775
+776
+777
+778
+779
+780
+781
+782
+783
+784
+785
+786
+787
+788
+789
+790
+791
+792
+793
+794
+795
+796
+797
+798
+799
+800
+801
+802
+803
+804
+805
+806
+807
+808
+809
+810
+811
+812
+813
+814
+815
+816
+817
+818
+819
+820
+821
+822
+823
+824
+825
+826
+827
+828
+829
+830
+831
+832
+833
+834
+835
+836
+837
+838
+839
+840
+841
+842
+843
+844
+845
+846
+847
+848
+849
+850
+851
+852
+853
+854
+855
+856
+857
+858
+859
+860
+861
+862
+863
+864
+865
+866
+867
+868
+869
+870
+871
+872
+873
+874
+875
+876
+877
+878
+879
+880
+881
+882
+883
+884
+885
+886
+887
+888
+889
+890
+891
+892
+893
+894
+895
+896
+897
+898
+899
+900
+901
+902
+903
+904
+905
+906
+907
+908
+909
+910
+911
+912
+913
+914
+915
+916
+917
+918
+919
+920
+921
+922
+923
+924
+925
+926
+927
+928
+929
+930
+931
+932
+933
+934
+935
+936
+937
+938
+939
+940
+941
+942
+943
+944
+945
+946
+947
+948
+949
+950
+951
+952
+953
+954
+955
+956
+957
+958
+959
+960
+961
+962
+963
+964
+965
+966
+967
+968
+969
+970
+971
+972
+973
+974
+975
+976
+977
+978
+979
+980
+981
+982
+983
+984
+985
+986
+987
+988
+989
+990
+991
+992
+993
+994
+995
+996
+997
+998
+999
+1000
+1001
+1002
+1003
+1004
+1005
+1006
+1007
+1008
+1009
+1010
+1011
+1012
+1013
+1014
+1015
+1016
+1017
+1018
+1019
+1020
+1021
+1022
+1023
+1024
+1025
+1026
+1027
+1028
+1029
+1030
+1031
+1032
+1033
+1034
+1035
+1036
+1037
+1038
+1039
+1040
+1041
+1042
+1043
+1044
+1045
+1046
+1047
+1048
+1049
+1050
+1051
+1052
+1053
+1054
+1055
+1056
+1057
+1058
+1059
+1060
+1061
+1062
+1063
+1064
+1065
+1066
+1067
+1068
+1069
+1070
+1071
+1072
+1073
+1074
+1075
+1076
+1077
+1078
+1079
+1080
+1081
+1082
+1083
+1084
+1085
+1086
+1087
+1088
+1089
+1090
+1091
+1092
+1093
+1094
+1095
+1096
+1097
+1098
+1099
+1100
+1101
+1102
+1103
+1104
+1105
+1106
+1107
+1108
+1109
+1110
+1111
+1112
+1113
+1114
+1115
+1116
+1117
+1118
+1119
+1120
+1121
+1122
+1123
+1124
+1125
+1126
+1127
+1128
+1129
+1130
+1131
+1132
+1133
+1134
+1135
+1136
+1137
+1138
+1139
+1140
+1141
+1142
+1143
+1144
+1145
+1146
+1147
+1148
+1149
+1150
+1151
+1152
+1153
+1154
+1155
+1156
+1157
+1158
+1159
+1160
+1161
+1162
+1163
+1164
+1165
+1166
+1167
+1168
+1169
+1170
+1171
+1172
+1173
+1174
+1175
+1176
+1177
+1178
+1179
+1180
+1181
+1182
+1183
+1184
+1185
+1186
+1187
+1188
+1189
+1190
+1191
+1192
+1193
+1194
+1195
+1196
+1197
+1198
+1199
+1200
+1201
+1202
+1203
+1204
+1205
+1206
+1207
+1208
+1209
+1210
+1211
+1212
+1213
+1214
+1215
+1216
+1217
+1218
+1219
+1220
+1221
+1222
+1223
+1224
+1225
+1226
+1227
+1228
+1229
+1230
+1231
+1232
+1233
+1234
+1235
+1236
+1237
+1238
+1239
+1240
+1241
+1242
+1243
+1244
+1245
+1246
+1247
+1248
+1249
+1250
+1251
+1252
+1253
+1254
+1255
+1256
+1257
+1258
+1259
+1260
+1261
+1262
+1263
+1264
+1265
+1266
+1267
+1268
+1269
+1270
+1271
+1272
+1273
+1274
+1275
+1276
+1277
+1278
+1279
+1280
+1281
+1282
+1283
+1284
+1285
+1286
+1287
+1288
+1289
+1290
+1291
+1292
+1293
+1294
+1295
+1296
+1297
+1298
+1299
+1300
+1301
+1302
+1303
+1304
+1305
+1306
+1307
+1308
+1309
+1310
+1311
+1312
+1313
+1314
+1315
+1316
+1317
+1318
+1319
+1320
+1321
+1322
+1323
+1324
+1325
+1326
+1327
+1328
+1329
+1330
+1331
+1332
+1333
+1334
+1335
+1336
+1337
+1338
+1339
+1340
+1341
+1342
+1343
+1344
+1345
+1346
+1347
+1348
+1349
+1350
+1351
+1352
+1353
+1354
+1355
+1356
+1357
+1358
+1359
+1360
+1361
+1362
+1363
+1364
+1365
+1366
+1367
+1368
+1369
+1370
+1371
+1372
+1373
+1374
+1375
+1376
+1377
+1378
+1379
+1380
+1381
+1382
+1383
+1384
+1385
+1386
+1387
+1388
+1389
+1390
+1391
+1392
+1393
+1394
+1395
+1396
+1397
+1398
+1399
+1400
+1401
+1402
+1403
+1404
+1405
+1406
+1407
+1408
+1409
+1410
+1411
+1412
+1413
+1414
+1415
+1416
+1417
+1418
+1419
+1420
+1421
+1422
+1423
+1424
+1425
+1426
+1427
+1428
+1429
+1430
+1431
+1432
+1433
+1434
+1435
+1436
+1437
+1438
+1439
+1440
+1441
+1442
+1443
+1444
+1445
+1446
+1447
+1448
+1449
+1450
+1451
+1452
+1453
+1454
+1455
+1456
+1457
+1458
+1459
+1460
+1461
+1462
+1463
+1464
+1465
+1466
+1467
+1468
+1469
+1470
+1471
+1472
+1473
+1474
+1475
+1476
+1477
+1478
+1479
+1480
+1481
+1482
+1483
+1484
+1485
+1486
+1487
+1488
+1489
+1490
+1491
+1492
+1493
+1494
+1495
+1496
+1497
+1498
+1499
+1500
+1501
+1502
+1503
+1504
+1505
+1506
+1507
+1508
+1509
+1510
+1511
+1512
+1513
+1514
+1515
+1516
+1517
+1518
+1519
+1520
+1521
+1522
+1523
+1524
+1525
+1526
+1527
+1528
+1529
+1530
+1531
+1532
+1533
+1534
+1535
+1536
+1537
+1538
+1539
+1540
+1541
+1542
+1543
+1544
+1545
+1546
+1547
+1548
+1549
+1550
+1551
+1552
+1553
+1554
+1555
+1556
+1557
+1558
+1559
+1560
+1561
+1562
+1563
+1564
+1565
+1566
+1567
+1568
+1569
+1570
+1571
+1572
+1573
+1574
+1575
+1576
+1577
+1578
+1579
+1580
+1581
+1582
+1583
+1584
+1585
+1586
+1587
+1588
+1589
+1590
+1591
+1592
+1593
+1594
+1595
+1596
+1597
+1598
+1599
+1600
+1601
+1602
+1603
+1604
+1605
+1606
+1607
+1608
+1609
+1610
+1611
+1612
+1613
+1614
+1615
+1616
+1617
+1618
+1619
+1620
+1621
+1622
+1623
+1624
+1625
+1626
+1627
+1628
+1629
+1630
+1631
+1632
+1633
+1634
+1635
+1636
+1637
+1638
+1639
+1640
+1641
+1642
+1643
+1644
+1645
+1646
+1647
+1648
+1649
+1650
+1651
+1652
+1653
+1654
+1655
+1656
+1657
+1658
+1659
+1660
+1661
+1662
+1663
+1664
+1665
+1666
+1667
+1668
+1669
+1670
+1671
+1672
+1673
+1674
+1675
+1676
+1677
+1678
+1679
+1680
+1681
+1682
+1683
+1684
+1685
+1686
+1687
+1688
+1689
+1690
+1691
+1692
+1693
+1694
+1695
+1696
+1697
+1698
+1699
+1700
+1701
+1702
+1703
+1704
+1705
+1706
+1707
+1708
+1709
+1710
+1711
+1712
+1713
+1714
+1715
+1716
+1717
+1718
+1719
+1720
+1721
+1722
+1723
+1724
+1725
+1726
+1727
+1728
+1729
+1730
+1731
+1732
+1733
+1734
+1735
+1736
+1737
+1738
+1739
+1740
+1741
+1742
+1743
+1744
+1745
+1746
+1747
+1748
+1749
+1750
+1751
+1752
+1753
+1754
+1755
+1756
+1757
+1758
+1759
+1760
+1761
+1762
+1763
+1764
+1765
+1766
+1767
+1768
+1769
+1770
+1771
+1772
+1773
+1774
+1775
+1776
+1777
+1778
+1779
+1780
+1781
+1782
+1783
+1784
+1785
+1786
+1787
+1788
+1789
+1790
+1791
+1792
+1793
+1794
+1795
+1796
+1797
+1798
+1799
+1800
+1801
+1802
+1803
+1804
+1805
+1806
+1807
+1808
+1809
+1810
+1811
+1812
+1813
+1814
+1815
+1816
+1817
+1818
+1819
+1820
+1821
+1822
+1823
+1824
+1825
+1826
+1827
+1828
+1829
+1830
+1831
+1832
+1833
+1834
+1835
+1836
+1837
+1838
+1839
+1840
+1841
+1842
+1843
+1844
+1845
+1846
+1847
+1848
+1849
+1850
+1851
+1852
+1853
+1854
+1855
+1856
+1857
+1858
+1859
+1860
+1861
+1862
+1863
+1864
+1865
+1866
+1867
+1868
+1869
+1870
+1871
+1872
+1873
+1874
+1875
+1876
+1877
+1878
+1879
+1880
+1881
+1882
+1883
+1884
+1885
+1886
+1887
+1888
+1889
+1890
+1891
+1892
+1893
+1894
+1895
+1896
+1897
+1898
+1899
+1900
+1901
+1902
+1903
+1904
+1905
+1906
+1907
+1908
+1909
+1910
+1911
+1912
+1913
+1914
+1915
+1916
+1917
+1918
+1919
+1920
+1921
+1922
+1923
+1924
+1925
+1926
+1927
+1928
+1929
+1930
+1931
+1932
+1933
+1934
+1935
+1936
+1937
+1938
+1939
+1940
+1941
+1942
+1943
+1944
+1945
+1946
+1947
+1948
+1949
+1950
+1951
+1952
+1953
+1954
+1955
+1956
+1957
+1958
+1959
+1960
+1961
+1962
+1963
+1964
+1965
+1966
+1967
+1968
+1969
+1970
+1971
+1972
+1973
+1974
+1975
+1976
+1977
+1978
+1979
+1980
+1981
+1982
+1983
+1984
+1985
+1986
+1987
+1988
+1989
+1990
+1991
+1992
+1993
+1994
+1995
+1996
+1997
+1998
+1999
+2000
+2001
+2002
+2003
+2004
+2005
+2006
+2007
+2008
+2009
+2010
+2011
+2012
+2013
+2014
+2015
+2016
+2017
+2018
+2019
+2020
+2021
+2022
+2023
+2024
+2025
+2026
+2027
+2028
+2029
+2030
+2031
+2032
+2033
+2034
+2035
+2036
+2037
+2038
+2039
+2040
+2041
+2042
+2043
+2044
+2045
+2046
+2047
+2048
+2049
+2050
+2051
+2052
+2053
+2054
+2055
+2056
+2057
+2058
+2059
+2060
+2061
+2062
+2063
+2064
+2065
+2066
+2067
+2068
+2069
+2070
+2071
+2072
+2073
+2074
+2075
+2076
+2077
+2078
+2079
+2080
+2081
+2082
+2083
+2084
+2085
+2086
+2087
+2088
+2089
+2090
+2091
+2092
+2093
+2094
+2095
+2096
+2097
+2098
+2099
+2100
+2101
+2102
+2103
+2104
+2105
+2106
+2107
+2108
+2109
+2110
+2111
+2112
+2113
+2114
+2115
+2116
+2117
+2118
+2119
+2120
+2121
+2122
+2123
+2124
+2125
+2126
+2127
+2128
+2129
+2130
+2131
+2132
+2133
+2134
+2135
+2136
+2137
+2138
+2139
+2140
+2141
+2142
+2143
+2144
+2145
+2146
+2147
+2148
+2149
+2150
+2151
+2152
+2153
+2154
+2155
+2156
+2157
+2158
+2159
+2160
+2161
+2162
+2163
+2164
+2165
+2166
+2167
+2168
+2169
+2170
+2171
+2172
+2173
+2174
+2175
+2176
+2177
+2178
+2179
+2180
+2181
+2182
+2183
+2184
+2185
+2186
+2187
+2188
+2189
+2190
+2191
+2192
+2193
+2194
+2195
+2196
+2197
+2198
+2199
+2200
+2201
+2202
+2203
+2204
+2205
+2206
+2207
+2208
+2209
+2210
+2211
+2212
+2213
+2214
+2215
+2216
+2217
+2218
+2219
+2220
+2221
+2222
+2223
+2224
+2225
+2226
+2227
+2228
+2229
+2230
+2231
+2232
+2233
+2234
+2235
+2236
+2237
+2238
+2239
+2240
+2241
+2242
+2243
+2244
+2245
+2246
+2247
+2248
+2249
+2250
+2251
+2252
+2253
+2254
+2255
+2256
+2257
+2258
+2259
+2260
+2261
+2262
+2263
+2264
+2265
+2266
+2267
+2268
+2269
+2270
+2271
+2272
+2273
+2274
+2275
+2276
+2277
+2278
+2279
+2280
+2281
+2282
+2283
+2284
+2285
+2286
+2287
+2288
+2289
+2290
+2291
+2292
+2293
+2294
+2295
+2296
+2297
+2298
+2299
+2300
+2301
+2302
+2303
+2304
+2305
+2306
+2307
+2308
+2309
+2310
+2311
+2312
+2313
+2314
+2315
+2316
+2317
+2318
+2319
+2320
+2321
+2322
+2323
+2324
+2325
+2326
+2327
+2328
+2329
+2330
+2331
+2332
+2333
+2334
+2335
+2336
+2337
+2338
+2339
+2340
+2341
+2342
+2343
+2344
+2345
+2346
+2347
+2348
+2349
+2350
+2351
+2352
+2353
+2354
+2355
+2356
+2357
+2358
+2359
+2360
+2361
+2362
+2363
+2364
+2365
+2366
+2367
+2368
+2369
+2370
+2371
+2372
+2373
+2374
+2375
+2376
+2377
+2378
+2379
+2380
+2381
+2382
+2383
+2384
+2385
+2386
+2387
+2388
+2389
+2390
+2391
+2392
+2393
+2394
+2395
+2396
+2397
+2398
+2399
+2400
+2401
+2402
+2403
+2404
+2405
+2406
+2407
+2408
+2409
+2410
+2411
+2412
+2413
+2414
+2415
+2416
+2417
+2418
+2419
+2420
+2421
+2422
+2423
+2424
+2425
+2426
+2427
+2428
+2429
+2430
+2431
+2432
+2433
+2434
+2435
+2436
+2437
+2438
+2439
+2440
+2441
+2442
+2443
+2444
+2445
+2446
+2447
+2448
+2449
+2450
+2451
+2452
+2453
+2454
+2455
+2456
+2457
+2458
+2459
+2460
+2461
+2462
+2463
+2464
+2465
+2466
+2467
+2468
+2469
+2470
+2471
+2472
+2473
+2474
+2475
+2476
+2477
+2478
+2479
+2480
+2481
+2482
+2483
+2484
+2485
+2486
+2487
+2488
+2489
+2490
+2491
+2492
+2493
+2494
+2495
+2496
+2497
+2498
+2499
+2500
+2501
+2502
+2503
+2504
+2505
+2506
+2507
+2508
+2509
+2510
+2511
+2512
+2513
+2514
+2515
+2516
+2517
+2518
+2519
+2520
+2521
+2522
+2523
+2524
+2525
+2526
+2527
+2528
+2529
+2530
+2531
+2532
+2533
+2534
+2535
+2536
+2537
+2538
+2539
+2540
+2541
+2542
+2543
+2544
+2545
+2546
+2547
+2548
+2549
+2550
+2551
+2552
+2553
+2554
+2555
+2556
+2557
+2558
+2559
+2560
+2561
+2562
+2563
+2564
+2565
+2566
+2567
+2568
+2569
+2570
+2571
+2572
+2573
+2574
+2575
+2576
+2577
+2578
+2579
+2580
+2581
+2582
+2583
+2584
+2585
+2586
+2587
+2588
+2589
+2590
+2591
+2592
+2593
+2594
+2595
+2596
+2597
+2598
+2599
+2600
+2601
+2602
+2603
+2604
+2605
+2606
+2607
+2608
+2609
+2610
+2611
+2612
+2613
+2614
+2615
+2616
+2617
+2618
+2619
+2620
+2621
+2622
+2623
+2624
+2625
+2626
+2627
+2628
+2629
+2630
+2631
+2632
+2633
+2634
+2635
+2636
+2637
+2638
+2639
+2640
+2641
+2642
+2643
+2644
+2645
+2646
+2647
+2648
+2649
+2650
+2651
+2652
+2653
+2654
+2655
+2656
+2657
+2658
+2659
+2660
+2661
+2662
+2663
+2664
+2665
+2666
+2667
+2668
+2669
+2670
+2671
+2672
+2673
+2674
+2675
+2676
+2677
+2678
+2679
+2680
+2681
+2682
+2683
+2684
+2685
+2686
+2687
+2688
+2689
+2690
+2691
+2692
+2693
+2694
+2695
+2696
+2697
+2698
+2699
+2700
+2701
+2702
+2703
+2704
+2705
+2706
+2707
+2708
+2709
+2710
+2711
+2712
+2713
+2714
+2715
+2716
+2717
+2718
+2719
+2720
+2721
+2722
+2723
+2724
+2725
+2726
+2727
+2728
+2729
+2730
+2731
+2732
+2733
+2734
+2735
+2736
+2737
+2738
+2739
+2740
+2741
+2742
+2743
+2744
+2745
+2746
+2747
+2748
+2749
+2750
+2751
+2752
+2753
+2754
+2755
+2756
+2757
+2758
+2759
+2760
+2761
+2762
+2763
+2764
+2765
+2766
+2767
+2768
+2769
+2770
+2771
+2772
+2773
+2774
+2775
+2776
+2777
+2778
+2779
+2780
+2781
+2782
+2783
+2784
+2785
+2786
+2787
+2788
+2789
+2790
+2791
+2792
+2793
+2794
+2795
+2796
+2797
+2798
+2799
+2800
+2801
+2802
+2803
+2804
+2805
+2806
+2807
+2808
+2809
+2810
+2811
+2812
+2813
+2814
+2815
+2816
+2817
+2818
+2819
+2820
+2821
+2822
+2823
+2824
+2825
+2826
+2827
+2828
+2829
+2830
+2831
+2832
+2833
+2834
+2835
+2836
+2837
+2838
+2839
+2840
+2841
+2842
+2843
+2844
+2845
+2846
+2847
+2848
+2849
+2850
+2851
+2852
+2853
+2854
+2855
+2856
+2857
+2858
+2859
+2860
+2861
+2862
+2863
+2864
+2865
+2866
+2867
+2868
+2869
+2870
+2871
+2872
+2873
+2874
+2875
+2876
+2877
+2878
+2879
+2880
+2881
+2882
+2883
+2884
+2885
+2886
+2887
+2888
+2889
+2890
+2891
+2892
+2893
+2894
+2895
+2896
+2897
+2898
+2899
+2900
+2901
+2902
+2903
+2904
+2905
+2906
+2907
+2908
+2909
+2910
+2911
+2912
+2913
+2914
+2915
+2916
+2917
+2918
+2919
+2920
+2921
+2922
+2923
+2924
+2925
+2926
+2927
+2928
+2929
+2930
+2931
+2932
+2933
+2934
+2935
+2936
+2937
+2938
+2939
+2940
+2941
+2942
+2943
+2944
+2945
+2946
+2947
+2948
+2949
+2950
+2951
+2952
+2953
+2954
+2955
+2956
+2957
+2958
+2959
+2960
+2961
+2962
+2963
+2964
+2965
+2966
+2967
+2968
+2969
+2970
+2971
+2972
+2973
+2974
+2975
+2976
+2977
+2978
+2979
+2980
+2981
+2982
+2983
+2984
+2985
+2986
+2987
+2988
+2989
+2990
+2991
+2992
+2993
+2994
+2995
+2996
+2997
+2998
+2999
+3000
+3001
+3002
+3003
+3004
+3005
+3006
+3007
+3008
+3009
+3010
+3011
+3012
+3013
+3014
+3015
+3016
+3017
+3018
+3019
+3020
+3021
+3022
+3023
+3024
+3025
+3026
+3027
+3028
+3029
+3030
+3031
+3032
+3033
+3034
+3035
+3036
+3037
+3038
+3039
+3040
+3041
+3042
+3043
+3044
+3045
+3046
+3047
+3048
+3049
+3050
+3051
+3052
+3053
+3054
+3055
+3056
+3057
+3058
+3059
+3060
+3061
+3062
+3063
+3064
+3065
+3066
+3067
+3068
+3069
+3070
+3071
+3072
+3073
+3074
+3075
+3076
+3077
+3078
+3079
+3080
+3081
+3082
+3083
+3084
+3085
+3086
+3087
+3088
+3089
+3090
+3091
+3092
+3093
+3094
+3095
+3096
+3097
+3098
+3099
+3100
+3101
+3102
+3103
+3104
+3105
+3106
+3107
+3108
+3109
+3110
+3111
+3112
+3113
+3114
+3115
+3116
+3117
+3118
+3119
+3120
+3121
+3122
+3123
+3124
+3125
+3126
+3127
+3128
+3129
+3130
+3131
+3132
+3133
+3134
+3135
+3136
+3137
+3138
+3139
+3140
+3141
+3142
+3143
+3144
+3145
+3146
+3147
+3148
+3149
+3150
+3151
+3152
+3153
+3154
+3155
+3156
+3157
+3158
+3159
+3160
+3161
+3162
+3163
+3164
+3165
+3166
+3167
+3168
+3169
+3170
+3171
+3172
+3173
+3174
+3175
+3176
+3177
+3178
+3179
+3180
+3181
+3182
+3183
+3184
+3185
+3186
+3187
+3188
+3189
+3190
+3191
+3192
+3193
+3194
+3195
+3196
+3197
+3198
+3199
+3200
+3201
+3202
+3203
+3204
+3205
+3206
+3207
+3208
+3209
+3210
+3211
+3212
+3213
+3214
+3215
+3216
+3217
+3218
+3219
+3220
+3221
+3222
+3223
+3224
+3225
+3226
+3227
+3228
+3229
+3230
+3231
+3232
+3233
+3234
+3235
+3236
+3237
+3238
+3239
+3240
+3241
+3242
+3243
+3244
+3245
+3246
+3247
+3248
+3249
+3250
+3251
+3252
+3253
+3254
+3255
+3256
+3257
+3258
+3259
+3260
+3261
+3262
+3263
+3264
+3265
+3266
+3267
+3268
+3269
+3270
+3271
+3272
+3273
+3274
+3275
+3276
+3277
+3278
+3279
+3280
+3281
+3282
+3283
+3284
+3285
+3286
+3287
+3288
+3289
+3290
+3291
+3292
+3293
+3294
+3295
+3296
+3297
+3298
+3299
+3300
+3301
+3302
+3303
+3304
+3305
+3306
+3307
+3308
+3309
+3310
+3311
+3312
+3313
+3314
+3315
+3316
+3317
+3318
+3319
+3320
+3321
+3322
+3323
+3324
+3325
+3326
+3327
+3328
+3329
+3330
+3331
+3332
+3333
+3334
+3335
+3336
+3337
+3338
+3339
+3340
+3341
+3342
+3343
+3344
+3345
+3346
+3347
+3348
+3349
+3350
+3351
+3352
+3353
+3354
+3355
+3356
+3357
+3358
+3359
+3360
+3361
+3362
+3363
+3364
+3365
+3366
+3367
+3368
+3369
+3370
+3371
+3372
+3373
+3374
+3375
+3376
+3377
+3378
+3379
+3380
+3381
+3382
+3383
+3384
+3385
+3386
+3387
+3388
+3389
+3390
+3391
+3392
+3393
+3394
+3395
+3396
+3397
+3398
+3399
+3400
+3401
+3402
+3403
+3404
+3405
+3406
+3407
+3408
+3409
+3410
+3411
+3412
+3413
+3414
+3415
+3416
+3417
+3418
+3419
+3420
+3421
+3422
+3423
+3424
+3425
+3426
+3427
+3428
+3429
+3430
+3431
+3432
+3433
+3434
+3435
+3436
+3437
+3438
+3439
+3440
+3441
+3442
+3443
+3444
+3445
+3446
+3447
+3448
+3449
+3450
+3451
+3452
+3453
+3454
+3455
+3456
+3457
+3458
+3459
+3460
+3461
+3462
+3463
+3464
+3465
+3466
+3467
+3468
+3469
+3470
+3471
+3472
+3473
+3474
+3475
+3476
+3477
+3478
+3479
+3480
+3481
+3482
+3483
+3484
+3485
+3486
+3487
+3488
+3489
+3490
+3491
+3492
+3493
+3494
+3495
+3496
+3497
+3498
+3499
+3500
+3501
+3502
+3503
+3504
+3505
+3506
+3507
+3508
+3509
+3510
+3511
+3512
+3513
+3514
+3515
+3516
+3517
+3518
+3519
+3520
+3521
+3522
+3523
+3524
+3525
+3526
+3527
+3528
+3529
+3530
+3531
+3532
+3533
+3534
+3535
+3536
+3537
+3538
+3539
+3540
+3541
+3542
+3543
+3544
+3545
+3546
+3547
+3548
+3549
+3550
+3551
+3552
+3553
+3554
+3555
+3556
+3557
+3558
+3559
+3560
+3561
+3562
+3563
+3564
+3565
+3566
+3567
+3568
+3569
+3570
+3571
+3572
+3573
+3574
+3575
+3576
+3577
+3578
+3579
+3580
+3581
+3582
+3583
+3584
+3585
+3586
+3587
+3588
+3589
+3590
+3591
+3592
+3593
+3594
+3595
+3596
+3597
+3598
+3599
+3600
+3601
+3602
+3603
+3604
+3605
+3606
+3607
+3608
+3609
+3610
+3611
+3612
+3613
+3614
+3615
+3616
+3617
+3618
+3619
+3620
+3621
+3622
+3623
+3624
+3625
+3626
+3627
+3628
+3629
+3630
+3631
+3632
+3633
+3634
+3635
+3636
+3637
+3638
+3639
+3640
+3641
+3642
+3643
+3644
+3645
+3646
+3647
+3648
+3649
+3650
+3651
+3652
+3653
+3654
+3655
+3656
+3657
+3658
+3659
+3660
+3661
+3662
+3663
+3664
+3665
+3666
+3667
+3668
+3669
+3670
+3671
+3672
+3673
+3674
+3675
+3676
+3677
+3678
+3679
+3680
+3681
+3682
+3683
+3684
+3685
+3686
+3687
+3688
+3689
+3690
+3691
+3692
+3693
+3694
+3695
+3696
+3697
+3698
+3699
+3700
+3701
+3702
+3703
+3704
+3705
+3706
+3707
+3708
+3709
+3710
+3711
+3712
+3713
+3714
+3715
+3716
+3717
+3718
+3719
+3720
+3721
+3722
+3723
+3724
+3725
+3726
+3727
+3728
+3729
+3730
+3731
+3732
+3733
+3734
+3735
+3736
+3737
+3738
+3739
+3740
+3741
+3742
+3743
+3744
+3745
+3746
+3747
+3748
+3749
+3750
+3751
+3752
+3753
+3754
+3755
+3756
+3757
+3758
+3759
+3760
+3761
+3762
+3763
+3764
+3765
+3766
+3767
+3768
+3769
+3770
+3771
+3772
+3773
+3774
+3775
+3776
+3777
+3778
+3779
+3780
+3781
+3782
+3783
+3784
+3785
+3786
+3787
+3788
+3789
+3790
+3791
+3792
+3793
+3794
+3795
+3796
+3797
+3798
+3799
+3800
+3801
+3802
+3803
+3804
+3805
+3806
+3807
+3808
+3809
+3810
+3811
+3812
+3813
+3814
+3815
+3816
+3817
+3818
+3819
+3820
+3821
+3822
+3823
+3824
+3825
+3826
+3827
+3828
+3829
+3830
+3831
+3832
+3833
+3834
+3835
+3836
+3837
+3838
+3839
+3840
+3841
+3842
+3843
+3844
+3845
+3846
+3847
+3848
+3849
+3850
+3851
+3852
+3853
+3854
+3855
+3856
+3857
+3858
+3859
+3860
+3861
+3862
+3863
+3864
+3865
+3866
+3867
+3868
+3869
+3870
+3871
+3872
+3873
+3874
+3875
+3876
+3877
+3878
+3879
+3880
+3881
+3882
+3883
+3884
+3885
+3886
+3887
+3888
+3889
+3890
+3891
+3892
+3893
+3894
+3895
+3896
+3897
+3898
+3899
+3900
+3901
+3902
+3903
+3904
+3905
+3906
+3907
+3908
+3909
+3910
+3911
+3912
+3913
+3914
+3915
+3916
+3917
+3918
+3919
+3920
+3921
+3922
+3923
+3924
+3925
+3926
+3927
+3928
+3929
+3930
+3931
+3932
+3933
+3934
+3935
+3936
+3937
+3938
+3939
+3940
+3941
+3942
+3943
+3944
+3945
+3946
+3947
+3948
+3949
+3950
+3951
+3952
+3953
+3954
+3955
+3956
+3957
+3958
+3959
+3960
+3961
+3962
+3963
+3964
+3965
+3966
+3967
+3968
+3969
+3970
+3971
+3972
+3973
+3974
+3975
+3976
+3977
+3978
+3979
+3980
+3981
+3982
+3983
+3984
+3985
+3986
+3987
+3988
+3989
+3990
+3991
+3992
+3993
+3994
+3995
+3996
+3997
+3998
+3999
+4000
+4001
+4002
+4003
+4004
+4005
+4006
+4007
+4008
+4009
+4010
+4011
+4012
+4013
+4014
+4015
+4016
+4017
+4018
+4019
+4020
+4021
+4022
+4023
+4024
+4025
+4026
+4027
+4028
+4029
+4030
+4031
+4032
+4033
+4034
+4035
+4036
+4037
+4038
+4039
+4040
+4041
+4042
+4043
+4044
+4045
+4046
+4047
+4048
+4049
+4050
+4051
+4052
+4053
+4054
+4055
+4056
+4057
+4058
+4059
+4060
+4061
+4062
+4063
+4064
+4065
+4066
+4067
+4068
+4069
+4070
+4071
+4072
+4073
+4074
+4075
+4076
+4077
+4078
+4079
+4080
+4081
+4082
+4083
+4084
+4085
+4086
+4087
+4088
+4089
+4090
+4091
+4092
+4093
+4094
+4095
+4096
+4097
+4098
+4099
+4100
+4101
+4102
+4103
+4104
+4105
+4106
+4107
+4108
+4109
+4110
+4111
+4112
+4113
+4114
+4115
+4116
+4117
+4118
+4119
+4120
+4121
+4122
+4123
+4124
+4125
+4126
+4127
+4128
+4129
+4130
+4131
+4132
+4133
+4134
+4135
+4136
+4137
+4138
+4139
+4140
+4141
+4142
+4143
+4144
+4145
+4146
+4147
+4148
+4149
+4150
+4151
+4152
+4153
+4154
+4155
+4156
+4157
+4158
+4159
+4160
+4161
+4162
+4163
+4164
+4165
+4166
+4167
+4168
+4169
+4170
+4171
+4172
+4173
+4174
+4175
+4176
+4177
+4178
+4179
+4180
+4181
+4182
+4183
+4184
+4185
+4186
+4187
+4188
+4189
+4190
+4191
+4192
+4193
+4194
+4195
+4196
+4197
+4198
+4199
+4200
+4201
+4202
+4203
+4204
+4205
+4206
+4207
+4208
+4209
+4210
+4211
+4212
+4213
+4214
+4215
+4216
+4217
+4218
+4219
+4220
+4221
+4222
+4223
+4224
+4225
+4226
+4227
+4228
+4229
+4230
+4231
+4232
+4233
+4234
+4235
+4236
+4237
+4238
+4239
+4240
+4241
+4242
+4243
+4244
+4245
+4246
+4247
+4248
+4249
+4250
+4251
+4252
+4253
+4254
+4255
+4256
+4257
+4258
+4259
+4260
+4261
+4262
+4263
+4264
+4265
+4266
+4267
+4268
+4269
+4270
+4271
+4272
+4273
+4274
+4275
+4276
+4277
+4278
+4279
+4280
+4281
+4282
+4283
+4284
+4285
+4286
+4287
+4288
+4289
+4290
+4291
+4292
+4293
+4294
+4295
+4296
+4297
+4298
+4299
+4300
+4301
+4302
+4303
+4304
+4305
+4306
+4307
+4308
+4309
+4310
+4311
+4312
+4313
+4314
+4315
+4316
+4317
+4318
+4319
+4320
+4321
+4322
+4323
+4324
+4325
+4326
+4327
+4328
+4329
+4330
+4331
+4332
+4333
+4334
+4335
+4336
+4337
+4338
+4339
+4340
+4341
+4342
+4343
+4344
+4345
+4346
+4347
+4348
+4349
+4350
+4351
+4352
+4353
+4354
+4355
+4356
+4357
+4358
+4359
+4360
+4361
+4362
+4363
+4364
+4365
+4366
+4367
+4368
+4369
+4370
+4371
+4372
+4373
+4374
+4375
+4376
+4377
+4378
+4379
+4380
+4381
+4382
+4383
+4384
+4385
+4386
+4387
+4388
+4389
+4390
+4391
+4392
+4393
+4394
+4395
+4396
+4397
+4398
+4399
+4400
+4401
+4402
+4403
+4404
+4405
+4406
+4407
+4408
+4409
+4410
+4411
+4412
+4413
+4414
+4415
+4416
+4417
+4418
+4419
+4420
+4421
+4422
+4423
+4424
+4425
+4426
+4427
+4428
+4429
+4430
+4431
+4432
+4433
+4434
+4435
+4436
+4437
+4438
+4439
+4440
+4441
+4442
+4443
+4444
+4445
+4446
+4447
+4448
+4449
+4450
+4451
+4452
+4453
+4454
+4455
+4456
+4457
+4458
+4459
+4460
+4461
+4462
+4463
+4464
+4465
+4466
+4467
+4468
+4469
+4470
+4471
+4472
+4473
+4474
+4475
+4476
+4477
+4478
+4479
+4480
+4481
+4482
+4483
+4484
+4485
+4486
+4487
+4488
+4489
+4490
+4491
+4492
+4493
+4494
+4495
+4496
+4497
+4498
+4499
+4500
+4501
+4502
+4503
+4504
+4505
+4506
+4507
+4508
+4509
+4510
+4511
+4512
+4513
+4514
+4515
+4516
+4517
+4518
+4519
+4520
+4521
+4522
+4523
+4524
+4525
+4526
+4527
+4528
+4529
+4530
+4531
+4532
+4533
+4534
+4535
+4536
+4537
+4538
+4539
+4540
+4541
+4542
+4543
+4544
+4545
+4546
+4547
+4548
+4549
+4550
+4551
+4552
+4553
+4554
+4555
+4556
+4557
+4558
+4559
+4560
+4561
+4562
+4563
+4564
+4565
+4566
+4567
+4568
+4569
+4570
+4571
+4572
+4573
+4574
+4575
+4576
+4577
+4578
+4579
+4580
+4581
+4582
+4583
+4584
+4585
+4586
+4587
+4588
+4589
+4590
+4591
+4592
+4593
+4594
+4595
+4596
+4597
+4598
+4599
+4600
+4601
+4602
+4603
+4604
+4605
+4606
+4607
+4608
+4609
+4610
+4611
+4612
+4613
+4614
+4615
+4616
+4617
+4618
+4619
+4620
+4621
+4622
+4623
+4624
+4625
+4626
+4627
+4628
+4629
+4630
+4631
+4632
+4633
+4634
+4635
+4636
+4637
+4638
+4639
+4640
+4641
+4642
+4643
+4644
+4645
+4646
+4647
+4648
+4649
+4650
+4651
+4652
+4653
+4654
+4655
+4656
+4657
+4658
+4659
+4660
+4661
+4662
+4663
+4664
+4665
+4666
+4667
+4668
+4669
+4670
+4671
+4672
+4673
+4674
+4675
+4676
+4677
+4678
+4679
+4680
+4681
+4682
+4683
+4684
+4685
+4686
+4687
+4688
+4689
+4690
+4691
+4692
+4693
+4694
+4695
+4696
+4697
+4698
+4699
+4700
+4701
+4702
+4703
+4704
+4705
+4706
+4707
+4708
+4709
+4710
+4711
+4712
+4713
+4714
+4715
+4716
+4717
+4718
+4719
+4720
+4721
+4722
+4723
+4724
+4725
+4726
+4727
+4728
+4729
+4730
+4731
+4732
+4733
+4734
+4735
+4736
+4737
+4738
+4739
+4740
+4741
+4742
+4743
+4744
+4745
+4746
+4747
+4748
+4749
+4750
+4751
+4752
+4753
+4754
+4755
+4756
+4757
+4758
+4759
+4760
+4761
+4762
+4763
+4764
+4765
+4766
+4767
+4768
+4769
+4770
+4771
+4772
+4773
+4774
+4775
+4776
+4777
+4778
+4779
+4780
+4781
+4782
+4783
+4784
+4785
+4786
+4787
+4788
+4789
+4790
+4791
+4792
+4793
+4794
+4795
+4796
+4797
+4798
+4799
+4800
+4801
+4802
+4803
+4804
+4805
+4806
+4807
+4808
+4809
+4810
+4811
+4812
+4813
+4814
+4815
+4816
+4817
+4818
+4819
+4820
+4821
+4822
+4823
+4824
+4825
+4826
+4827
+4828
+4829
+4830
+4831
+4832
+4833
+4834
+4835
+4836
+4837
+4838
+4839
+4840
+4841
+4842
+4843
+4844
+4845
+4846
+4847
+4848
+4849
+4850
+4851
+4852
+4853
+4854
+4855
+4856
+4857
+4858
+4859
+4860
+4861
+4862
+4863
+4864
+4865
+4866
+4867
+4868
+4869
+4870
+4871
+4872
+4873
+4874
+4875
+4876
+4877
+4878
+4879
+4880
+4881
+4882
+4883
+4884
+4885
+4886
+4887
+4888
+4889
+4890
+4891
+4892
+4893
+4894
+4895
+4896
+4897
+4898
+4899
+4900
+4901
+4902
+4903
+4904
+4905
+4906
+4907
+4908
+4909
+4910
+4911
+4912
+4913
+4914
+4915
+4916
+4917
+4918
+4919
+4920
+4921
+4922
+4923
+4924
+4925
+4926
+4927
+4928
+4929
+4930
+4931
+4932
+4933
+4934
+4935
+4936
+4937
+4938
+4939
+4940
+4941
+4942
+4943
+4944
+4945
+4946
+4947
+4948
+4949
+4950
+4951
+4952
+4953
+4954
+4955
+4956
+4957
+4958
+4959
+4960
+4961
+4962
+4963
+4964
+4965
+4966
+4967
+4968
+4969
+4970
+4971
+4972
+4973
+4974
+4975
+4976
+4977
+4978
+4979
+4980
+4981
+4982
+4983
+4984
+4985
+4986
+4987
+4988
+4989
+4990
+4991
+4992
+4993
+4994
+4995
+4996
+4997
+4998
+4999
+Stopping
Index: src/tests/.expect/concurrent/sched-ext-statment.txt
===================================================================
--- src/tests/.expect/concurrent/sched-ext-statment.txt	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
+++ src/tests/.expect/concurrent/sched-ext-statment.txt	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -0,0 +1,702 @@
+Starting
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Statement
+Stopping
Index: src/tests/.expect/sched-ext-else.txt
===================================================================
--- src/tests/.expect/sched-ext-else.txt	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
+++ src/tests/.expect/sched-ext-else.txt	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -0,0 +1,9 @@
+Starting
+Step 0
+else called
+Step 1
+else called
+Step 2
+else called
+Step 3
+Done
Index: src/tests/Makefile.am
===================================================================
--- src/tests/Makefile.am	(revision 201aeb9b7c42eb7c7aa8bc065247bffda4932b33)
+++ src/tests/Makefile.am	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -22,5 +22,5 @@
 concurrent = yes
 quick_test += coroutine thread monitor
-concurrent_test = coroutine thread monitor multi-monitor sched-int-barge sched-int-block sched-int-disjoint sched-int-wait sched-ext sched-ext-multi preempt
+concurrent_test = coroutine thread monitor multi-monitor sched-int-block sched-int-disjoint sched-int-wait sched-ext-barge sched-ext-else sched-ext-parse sched-ext-statment preempt
 else
 concurrent=no
@@ -104,4 +104,7 @@
 	${CC} ${AM_CFLAGS} ${CFLAGS} -CFA -XCFA -p -XCFA -L ${<} -o ${@}
 
+sched-ext-parse : sched-ext-parse.c @CFA_BINDIR@/@CFA_NAME@
+	${CC} ${AM_CFLAGS} ${CFLAGS} -CFA -XCFA -p -XCFA -L ${<} -o ${@}
+
 gmp : gmp.c @CFA_BINDIR@/@CFA_NAME@
 	${CC} ${AM_CFLAGS} ${CFLAGS} -lgmp ${<} -o ${@}
Index: src/tests/Makefile.in
===================================================================
--- src/tests/Makefile.in	(revision 201aeb9b7c42eb7c7aa8bc065247bffda4932b33)
+++ src/tests/Makefile.in	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -320,5 +320,5 @@
 @BUILD_CONCURRENCY_TRUE@concurrent = yes
 @BUILD_CONCURRENCY_FALSE@concurrent_test = 
-@BUILD_CONCURRENCY_TRUE@concurrent_test = coroutine thread monitor multi-monitor sched-int-barge sched-int-block sched-int-disjoint sched-int-wait sched-ext sched-ext-multi preempt
+@BUILD_CONCURRENCY_TRUE@concurrent_test = coroutine thread monitor multi-monitor sched-int-block sched-int-disjoint sched-int-wait sched-ext-barge sched-ext-else sched-ext-parse sched-ext-statment preempt
 
 # applies to both programs
@@ -856,4 +856,7 @@
 	${CC} ${AM_CFLAGS} ${CFLAGS} -CFA -XCFA -p -XCFA -L ${<} -o ${@}
 
+sched-ext-parse : sched-ext-parse.c @CFA_BINDIR@/@CFA_NAME@
+	${CC} ${AM_CFLAGS} ${CFLAGS} -CFA -XCFA -p -XCFA -L ${<} -o ${@}
+
 gmp : gmp.c @CFA_BINDIR@/@CFA_NAME@
 	${CC} ${AM_CFLAGS} ${CFLAGS} -lgmp ${<} -o ${@}
Index: src/tests/sched-ext-barge.c
===================================================================
--- src/tests/sched-ext-barge.c	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
+++ src/tests/sched-ext-barge.c	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -0,0 +1,85 @@
+#include <fstream>
+#include <kernel>
+#include <monitor>
+#include <stdlib>
+#include <thread>
+
+#include <stdbool.h>
+
+static const unsigned long N = 5_000ul;
+
+enum state_t { WAITFOR, CALL, BARGE };
+
+monitor global_t {
+	bool done;
+	bool started;
+	state_t state;
+};
+
+void ?{} ( global_t & this ) {
+	this.done = false;
+	this.started = false;
+	this.state = BARGE;
+}
+
+void ^?{} ( global_t & mutex this ) {}
+
+global_t global;
+
+bool barge( global_t & mutex this ) {
+	this.state = BARGE;
+	return !this.done;
+}
+
+thread barger_t {};
+void main( barger_t & this ) {
+	yield();
+	while( barge( global ) ) { yield(((unsigned)rand48()) % 10); }
+}
+
+bool do_call( global_t & mutex this ) {
+	yield(((unsigned)rand48()) % 10);
+	if( this.state != WAITFOR && !this.done && this.started ) {
+		serr | "Barging before caller detected" | endl;
+	}
+
+	this.state = CALL;
+	return !this.done;
+}
+
+thread caller_t {};
+void main( caller_t & this ) {
+	while( do_call(global) ) { yield(((unsigned)rand48()) % 10); }
+}
+
+void do_wait( global_t & mutex this ) {
+	this.started = true;
+	for( int i = 0; i < N; i++) {
+		yield(((unsigned)rand48()) % 10);
+		this.state = WAITFOR;
+		waitfor(do_call, this) {
+			sout | i | endl;
+		}
+
+		if( this.state != CALL ) {
+			serr | "Barging after caller detected" | endl;
+		}
+	}
+
+	this.done = true;
+}
+
+thread waiter_t{};
+void main( waiter_t & this ) {
+	do_wait(global);
+}
+
+int main() {
+	sout | "Starting" | endl;
+	{
+		barger_t bargers[17];
+		caller_t callers[7];
+		waiter_t waiters;
+	}
+	sout | "Stopping" | endl;
+}
Index: src/tests/sched-ext-else.c
===================================================================
--- src/tests/sched-ext-else.c	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
+++ src/tests/sched-ext-else.c	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -0,0 +1,48 @@
+#include <fstream>
+#include <monitor>
+
+#include <stdbool.h>
+
+monitor M {};
+
+void notcalled( M & mutex m ) {
+	abort();
+}
+
+void test( M & mutex m ) {
+	int i = 0;
+	sout | "Starting" | endl;
+
+	when( false ) waitfor( notcalled, m );
+
+	sout | "Step" | i++ | endl;
+
+	waitfor( notcalled, m ); or else {
+		sout | "else called" | endl;
+	}
+
+	sout | "Step" | i++ | endl;
+
+	when( true ) waitfor( notcalled, m ); or when( true ) else {
+		sout | "else called" | endl;
+	}
+
+	sout | "Step" | i++ | endl;
+
+	when( false ) waitfor( notcalled, m ); or when( true ) else {
+		sout | "else called" | endl;
+	}
+
+	sout | "Step" | i++ | endl;
+
+	when( false ) waitfor( notcalled, m ); or when( false ) else {
+		sout | "else called" | endl;
+	}
+
+	sout | "Done" | endl;
+}
+
+int main() {
+	M m;
+	test(m);
+}
Index: src/tests/sched-ext-parse.c
===================================================================
--- src/tests/sched-ext-parse.c	(revision 201aeb9b7c42eb7c7aa8bc065247bffda4932b33)
+++ src/tests/sched-ext-parse.c	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -80,5 +80,5 @@
 		16;
 	}
- 	or waitfor( f1, a, a ) {
+ 	or waitfor( f2, a, a ) {
 		17;
 	}
Index: src/tests/sched-ext-statment.c
===================================================================
--- src/tests/sched-ext-statment.c	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
+++ src/tests/sched-ext-statment.c	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -0,0 +1,136 @@
+#include <fstream>
+#include <kernel>
+#include <monitor>
+#include <thread>
+
+#include <stdbool.h>
+
+monitor M {
+	int index;
+	int last_val;
+	int calls[7];
+};
+
+volatile bool start = false;
+
+void ?{}( M & this ) {
+	this.index = 0;
+	this.last_val = 0;
+	for( int i = 0; i < 7; i++ ) {
+		this.calls[i] = 100; //10_000;
+	}
+}
+
+void ^?{} ( M &  mutex this ) {}
+
+int get_index( M & mutex this ) {
+	this.index += 1;
+	return this.index;
+}
+
+bool call1( M & mutex this ) {
+	this.last_val = 1;
+	this.calls[0] -= 1;
+	return this.calls[0] > 0;
+}
+
+bool call2( M & mutex this ) {
+	this.last_val = 2;
+	this.calls[1] -= 1;
+	return this.calls[1] > 0;
+}
+
+bool call3( M & mutex this ) {
+	this.last_val = 3;
+	this.calls[2] -= 1;
+	return this.calls[2] > 0;
+}
+
+bool call4( M & mutex this ) {
+	this.last_val = 4;
+	this.calls[3] -= 1;
+	return this.calls[3] > 0;
+}
+
+bool call5( M & mutex this ) {
+	this.last_val = 5;
+	this.calls[4] -= 1;
+	return this.calls[4] > 0;
+}
+
+bool call6( M & mutex this ) {
+	this.last_val = 6;
+	this.calls[5] -= 1;
+	return this.calls[5] > 0;
+}
+
+bool call7( M & mutex this ) {
+	this.last_val = 7;
+	this.calls[6] -= 1;
+	return this.calls[6] > 0;
+}
+
+M m;
+thread caller{};
+
+bool call( int index ) {
+	switch( index ) {
+		case 1: return call1( m );
+		case 2: return call2( m );
+		case 3: return call3( m );
+		case 4: return call4( m );
+		case 5: return call5( m );
+		case 6: return call6( m );
+		case 7: return call7( m );
+		default :
+			serr | "Incorrect index" | index | endl;
+			abort();
+	}
+}
+
+void main( caller & this ) {
+	int index = get_index( m );
+	while( !start ) yield();
+	while( call( index ) );
+}
+
+void do_wait( M & mutex this ) {
+	bool done = false;
+
+	start = true;
+
+	while( !done ) {
+		   waitfor( get_index, this );
+		or waitfor( call1, this ) { sout | "Statement" | endl; if( this.last_val != 1 ) { serr | "Incorrect index: expected" | 1 | "got" | this.last_val | endl; } }
+		or waitfor( call2, this ) { sout | "Statement" | endl; if( this.last_val != 2 ) { serr | "Incorrect index: expected" | 2 | "got" | this.last_val | endl; } }
+		or waitfor( call3, this ) { sout | "Statement" | endl; if( this.last_val != 3 ) { serr | "Incorrect index: expected" | 3 | "got" | this.last_val | endl; } }
+		or waitfor( call4, this ) { sout | "Statement" | endl; if( this.last_val != 4 ) { serr | "Incorrect index: expected" | 4 | "got" | this.last_val | endl; } }
+		or waitfor( call5, this ) { sout | "Statement" | endl; if( this.last_val != 5 ) { serr | "Incorrect index: expected" | 5 | "got" | this.last_val | endl; } }
+		or waitfor( call6, this ) { sout | "Statement" | endl; if( this.last_val != 6 ) { serr | "Incorrect index: expected" | 6 | "got" | this.last_val | endl; } }
+		or waitfor( call7, this ) { sout | "Statement" | endl; if( this.last_val != 7 ) { serr | "Incorrect index: expected" | 7 | "got" | this.last_val | endl; } }
+
+		done = true;
+		for( int i = 0; i < 7; i++ ) {
+			if( this.calls[i] > 0 ) {
+				done = false;
+				break;
+			}
+		}
+	}
+}
+
+thread waiter{};
+
+void main( waiter & this ) {
+	do_wait( m );
+}
+
+int main() {
+	processor p[2];
+	sout | "Starting" | endl;
+	{
+		caller c[7];
+		waiter w;
+	}
+	sout | "Stopping" | endl;
+}
Index: src/tests/sched-ext.c
===================================================================
--- src/tests/sched-ext.c	(revision 201aeb9b7c42eb7c7aa8bc065247bffda4932b33)
+++ src/tests/sched-ext.c	(revision 5dc26f53998df11e71288f9072c8d8f0ff8eafbf)
@@ -45,5 +45,5 @@
 	acceptable.monitors      = &a;
 
-	__accept_internal( 1, &acceptable );
+	__waitfor_internal( 1, &acceptable );
 
 	sout | "Accepted" | endl;
