Thanks @camelon for your answer :)

I agree that readability is the goal. And if accidently it produce less lines of code it is even better :)
So all we need to do is:
1. check if there is a need for change.
1.1. switch values for `s->valid` from `TDXYZ` to `XYZ` and vice versa `XYZ` to `TDXYZ` 
1.2. adapt change to the chunk state.
for example (I am aware that my example is not perfect but I believe it is readable and clear) this could be like below:
```
bool need_of_change = td ? (s->valid == BUSY || s->valid == VALID) : (s->valid == TDBUSY || s->valid == TDVALID));

if (need_of_change) {
	switch(s->valid) {
		VALIID: 	s->valid = TDVALID; break;
		TDVALID:	s->valid = VALID; break;
		TDBUSY:		s->valid = BUSY; break;
		BUSY:		s->valid = TDBUSY; break; 
	}
	int delta = td ? -1 : 1;
	chunk_state_change(c->goal, c->goal,
		c->allvalidcopies, c->allvalidcopies,
		c->regularvalidcopies, c->regularvalidcopies + delta);
		c->regularvalidcopies += delta;
}
```
I will be very glad to understand what is unlclear in it ?
Using cascade of `if else` with double `&&` conditions inside and copy paste of almost the same code... is very unclear for sure.
Please consider refactor :)
I promise not push more in this case :)