* SPICE netlist
M1 Vdd A N003 N001 PMOS
M2 Vdd B N003 N002 PMOS
M3 N003 N004 S N005 PMOS
M4 N003 N007 S N006 PMOS
M5 S A N014 N012 NMOS
M6 N014 B 0 N017 NMOS
M7 N004 A 0 N010 NMOS
M8 Vdd A N004 N008 PMOS
M9 S N004 N015 N013 NMOS
M10 N015 N007 0 N018 NMOS
M11 N007 B 0 N011 NMOS
M12 Vdd B N007 N009 PMOS
V1 Vdd 0 5
V2 A 0 5
V3 B 0 5
M13 Cout N007 0 N020 NMOS
M14 Cout N004 0 N021 NMOS
M15 Vdd N004 P001 N016 PMOS
M16 P001 N007 Cout N019 PMOS
.op

* LTspice schematic (.asc)
Version 4.1
SHEET 1 1824 1008
WIRE 640 -472 -256 -472
WIRE 208 -344 208 -504
WIRE 208 -344 112 -344
WIRE 304 -344 208 -344
WIRE -256 -328 -256 -472
WIRE -256 -328 -304 -328
WIRE 912 -328 400 -328
WIRE 112 -312 112 -344
WIRE 304 -312 304 -344
WIRE 880 -248 816 -248
WIRE -816 -232 -912 -232
WIRE -752 -232 -816 -232
WIRE -720 -232 -752 -232
WIRE -256 -232 -304 -232
WIRE 16 -232 -256 -232
WIRE 64 -232 16 -232
WIRE 112 -232 112 -264
WIRE 304 -232 304 -264
WIRE 640 -232 640 -472
WIRE 640 -232 352 -232
WIRE 208 -216 112 -216
WIRE 304 -216 208 -216
WIRE -752 -200 -752 -232
WIRE 208 -184 208 -216
WIRE 208 -184 112 -184
WIRE 304 -184 208 -184
WIRE 64 -104 0 -104
WIRE 112 -104 112 -136
WIRE 304 -104 304 -136
WIRE 432 -104 352 -104
WIRE 208 -88 112 -88
WIRE 304 -88 208 -88
WIRE -160 -72 -208 -72
WIRE -112 -72 -112 -104
WIRE 512 -72 512 -104
WIRE 608 -72 560 -72
WIRE -16 -56 -112 -56
WIRE 0 -56 0 -104
WIRE 0 -56 -16 -56
WIRE 208 -56 208 -88
WIRE 400 -56 400 -328
WIRE 400 -56 208 -56
WIRE 432 -56 432 -104
WIRE 512 -56 432 -56
WIRE -256 -24 -256 -232
WIRE -208 -24 -208 -72
WIRE -208 -24 -256 -24
WIRE 208 -24 208 -56
WIRE 208 -24 112 -24
WIRE 304 -24 208 -24
WIRE 608 -24 608 -72
WIRE 640 -24 640 -232
WIRE 640 -24 608 -24
WIRE 112 -8 112 -24
WIRE -208 24 -208 -24
WIRE -160 24 -208 24
WIRE -112 24 -112 -8
WIRE 512 24 512 -8
WIRE 608 24 608 -24
WIRE 608 24 560 24
WIRE 16 56 16 -232
WIRE 64 56 16 56
WIRE 112 56 112 24
WIRE 304 56 304 24
WIRE 368 56 352 56
WIRE 704 56 704 40
WIRE 640 72 640 -24
WIRE 640 72 464 72
WIRE 112 104 112 72
WIRE 304 104 304 72
WIRE 656 136 512 136
WIRE 704 136 704 104
WIRE 432 152 432 -56
WIRE 576 152 432 152
WIRE 64 184 16 184
WIRE 112 184 112 152
WIRE 304 184 304 152
WIRE 432 184 432 152
WIRE 432 184 352 184
WIRE 208 200 112 200
WIRE 304 200 208 200
WIRE 208 216 208 200
WIRE 368 216 368 56
WIRE 512 216 512 136
WIRE 512 216 368 216
WIRE 576 232 576 152
WIRE 576 232 544 232
WIRE 656 232 576 232
WIRE 704 232 704 200
WIRE -16 248 -16 -56
WIRE 368 248 368 216
WIRE 368 248 -16 248
WIRE 16 264 16 184
WIRE 464 264 464 72
WIRE 464 264 16 264
WIRE 704 264 704 248
WIRE 816 264 816 -248
WIRE 816 264 704 264
WIRE 704 296 704 264
WIRE 704 296 624 296
WIRE 800 296 704 296
WIRE 544 376 544 232
WIRE 576 376 544 376
WIRE 624 376 624 344
WIRE 800 376 800 344
WIRE 864 376 848 376
WIRE 704 392 624 392
WIRE 800 392 704 392
WIRE 704 408 704 392
WIRE 512 504 512 216
WIRE 864 504 864 376
WIRE 864 504 512 504
FLAG 208 216 0
FLAG -112 40 0
FLAG -112 -152 Vdd
IOPIN -32 208 In
FLAG 208 -504 Vdd
IOPIN 288 -144 In
FLAG -304 -232 A
IOPIN -224 128 In
FLAG 512 40 0
FLAG 512 -152 Vdd
IOPIN 592 208 In
FLAG -304 -328 B
IOPIN -224 32 In
FLAG -816 -312 A
IOPIN -736 48 In
FLAG -720 -312 B
IOPIN -640 48 In
FLAG -752 -200 0
FLAG -912 -312 Vdd
IOPIN -832 48 In
FLAG 704 408 0
FLAG 704 40 Vdd
IOPIN 784 400 In
FLAG 912 -328 S
IOPIN 992 32 Out
FLAG 880 -248 Cout
IOPIN 960 112 Out
SYMBOL pmos4 64 -312 R0
SYMATTR InstName M1
SYMBOL pmos4 352 -312 M0
SYMATTR InstName M2
SYMBOL pmos4 64 -184 R0
SYMATTR InstName M3
SYMBOL pmos4 352 -184 M0
SYMATTR InstName M4
SYMBOL nmos4 64 -24 R0
SYMATTR InstName M5
SYMBOL nmos4 64 104 R0
SYMATTR InstName M6
SYMBOL nmos4 -160 -56 R0
SYMATTR InstName M7
SYMBOL pmos4 -160 -152 R0
SYMATTR InstName M8
SYMBOL nmos4 352 -24 M0
SYMATTR InstName M9
SYMBOL nmos4 352 104 M0
SYMATTR InstName M10
SYMBOL nmos4 560 -56 M0
SYMATTR InstName M11
SYMBOL pmos4 560 -152 M0
SYMATTR InstName M12
SYMBOL voltage -912 -328 R0
SYMATTR InstName V1
SYMATTR Value 5
SYMBOL voltage -816 -328 R0
SYMATTR InstName V2
SYMATTR Value 5
SYMBOL voltage -720 -328 R0
SYMATTR InstName V3
SYMATTR Value 5
SYMBOL nmos4 576 296 R0
SYMATTR InstName M13
SYMBOL nmos4 848 296 M0
SYMATTR InstName M14
SYMBOL pmos4 656 56 R0
SYMATTR InstName M15
SYMBOL pmos4 656 152 R0
SYMATTR InstName M16