Is it epanalepsis or antimetabole?
2 Answers
Antanaclasis. Review the examples shown here:
It's part Antanaclasis, but that is nested within an overarching chiasmus structure. a,b,b,a, usually in an antithetical pairing. An example is found in Leapor's 'An Essay on Woman':
Despised, if ugly; if she's fair, betrayed.