int lpc;
void incarnation_internal_constraints(resource_t *rsc, GListPtr *ordering_constraints){	int lpc;	resource_t *last_rsc = NULL;	incarnation_variant_data_t *incarnation_data = NULL;	get_incarnation_variant_data(incarnation_data, rsc);	/* global stop before start */	order_new(incarnation_data->self, stop_rsc,  NULL,		  incarnation_data->self, start_rsc, NULL,		  pecs_startstop, ordering_constraints);		slist_iter(		child_rsc, resource_t, incarnation_data->child_list, lpc,		/* child stop before start */		order_new(child_rsc, stop_rsc,  NULL,			  child_rsc, start_rsc, NULL,			  pecs_startstop, ordering_constraints);				if(incarnation_data->ordered && last_rsc != NULL) {			if(lpc < incarnation_data->active_incarnation) {				/* child/child relative start */				order_new(last_rsc,  start_rsc, NULL,					  child_rsc, start_rsc, NULL,					  pecs_startstop, ordering_constraints);			}						/* child/child relative stop */			order_new(child_rsc, stop_rsc, NULL,				  last_rsc,  stop_rsc, NULL,				  pecs_startstop, ordering_constraints);		} else if(last_rsc != NULL) {			if(lpc < incarnation_data->active_incarnation) {				/* child start before global started */				order_new(child_rsc,              start_rsc, NULL,					  incarnation_data->self, started_rsc, NULL,					  pecs_startstop, ordering_constraints);			}					/* global start before child start */			order_new(incarnation_data->self, start_rsc, NULL,				  child_rsc,              start_rsc, NULL,				  pecs_startstop, ordering_constraints);			/* child stop before global stopped */			order_new(child_rsc,              stop_rsc, NULL,				  incarnation_data->self, stopped_rsc, NULL,				  pecs_startstop, ordering_constraints);						/* global stop before child stop */			order_new(incarnation_data->self, stop_rsc, NULL,				  child_rsc,               stop_rsc, NULL,				  pecs_startstop, ordering_constraints);		} else {			/* child start before global started */			order_new(child_rsc,              start_rsc, NULL,				  incarnation_data->self, started_rsc, NULL,				  pecs_startstop, ordering_constraints);						/* first child stop before global stopped */			order_new(child_rsc,              stop_rsc, NULL,				  incarnation_data->self, stopped_rsc, NULL,				  pecs_startstop, ordering_constraints);						/* global start before first child start */			order_new(incarnation_data->self, start_rsc, NULL,				  child_rsc,              start_rsc, NULL,				  pecs_startstop, ordering_constraints);		}		if(lpc < incarnation_data->active_incarnation) {			last_rsc = child_rsc;		}				);	if(incarnation_data->ordered && last_rsc != NULL) {		/* last child start before global started */		order_new(last_rsc,         start_rsc, NULL,			  incarnation_data->self, started_rsc, NULL,			  pecs_startstop, ordering_constraints);		/* global stop before first child stop */		order_new(incarnation_data->self, stop_rsc, NULL,			  last_rsc,         stop_rsc, NULL,			  pecs_startstop, ordering_constraints);	}		}