Implement a rising-edge-triggered D flip-flop. Capture in on the rising edge of clk and drive the stored value on out.