Zaslat SMS: Discrete circuit optimization