in circuit 1, when the transistor is on, the current is = il , when the transistor is off, is = 0 and il circulates through the inductor, diode and resistor
the purpose of the disode is to provide a current path for il, the energy gets dissipated by the resistor.
in circuit 2, when both transistors are on, it looks like circuit 1 with the transistor on.
when both transistors are off, il goes through the diode to Vcc. essentially is reverses direction. is still = il
the second diode clamps the voltage at the "top" end of the inductor to within 1 diode drop of ground, forcing
the bottom end to be positive, as the voltage across the inductor is now dropping.
recall that v = L di/dt so that is di/dt is increasing, v is positive - when the transistors are on, top of inductor is +, di/dt increases
and when di/dt is decreasing, polarity of v has to flip, so bottom is (relatively) positive.
clamping "top" of inductor near ground gives the voltage across the inductor a reference point
need the second diode to provide the reference