Both inputs of U7 are connected together making it a simple Cmos inverter, not a NAND gate.U7 is a 4011, NAND GATE
U12 is a 4017, Decade Counter
U20 is a 4043, R/S latch, tri-state output I'm gussing?
Don't guess wrongly about the 4043, look it up.