# s400
# 24 inputs
# 27 outputs
# 56 inverters
# 106 gates ( 11 ANDs + 36 NANDs + 25 ORs + 34 NORs )

INPUT(FM)
INPUT(TEST)
INPUT(CLR)
INPUT(TESTL)
INPUT(FML)
INPUT(OLATCH_Y2L)
INPUT(OLATCHVUC_6)
INPUT(OLATCHVUC_5)
INPUT(OLATCH_R1L)
INPUT(OLATCH_G2L)
INPUT(OLATCH_G1L)
INPUT(OLATCH_FEL)
INPUT(C3_Q3)
INPUT(C3_Q2)
INPUT(C3_Q1)
INPUT(C3_Q0)
INPUT(UC_16)
INPUT(UC_17)
INPUT(UC_18)
INPUT(UC_19)
INPUT(UC_8)
INPUT(UC_9)
INPUT(UC_10)
INPUT(UC_11)

OUTPUT(YLW2)
OUTPUT(YLW1)
OUTPUT(RED2)
OUTPUT(RED1)
OUTPUT(GRN2)
OUTPUT(GRN1)
OUTPUT(TCOMB_FE_BF)
OUTPUT(TESTLVINLATCHVCDAD)
OUTPUT(FMLVINLATCHVCDAD)
OUTPUT(TCOMB_RA1)
OUTPUT(C3_Q3VD)
OUTPUT(C3_Q2VD)
OUTPUT(C3_Q1VD)
OUTPUT(C3_Q0VD)
OUTPUT(UC_16VD)
OUTPUT(UC_17VD)
OUTPUT(UC_18VD)
OUTPUT(UC_19VD)
OUTPUT(UC_8VD)
OUTPUT(UC_9VD)
OUTPUT(UC_10VD)
OUTPUT(UC_11VD)
OUTPUT(TCOMB_GA2)
OUTPUT(TCOMB_YA2)
OUTPUT(TCOMB_GA1)
OUTPUT(Y1C)
OUTPUT(R2C)

TESTLVINMUXVIR1 = NOT(TESTB)
TESTLVINMUX = NOT(TESTLVINMUXVND1)
TESTLVINLATCHN = NOT(TESTL)
TESTLVINLATCHVCDN = NOT(CLRB)
FMLVINMUXVIR1 = NOT(FMB)
FMLVINMUX = NOT(FMLVINMUXVND1)
FMLVINLATCHN = NOT(FML)
FMLVINLATCHVCDN = NOT(CLRB)
YLW2 = NOT(OUTBUFVBUFY2VIR1)
OUTBU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ATCHVCDAD = AND(TESTLVINLATCHVCDN, TESTLVINMUX)
FMLVINLATCHVCDAD = AND(FMLVINLATCHVCDN, FMLVINMUX)
TCOMB_GA2VAD4NF = AND(OLATCH_FEL, TCOMBVNCLR)
TCOMB_GA2VAD3NF = AND(C3_Q2, TCOMBVNCLR)
TCOMB_GA2VAD2NF = AND(C3_Q0, C3_Q1, TCOMBVNCLR)
TCOMB_GA2VAD1NF = AND(TCOMBVNQA, C3_Q3, TCOMBVNCLR)
TCOMB_GA1VAD1NF = AND(TCOMBVNODE6, OLATCH_FEL)
Y1CVAD2NF = AND(FEN, TCOMB_YA1)
Y1CVAD1NF = AND(TCOMB_FE, TCOMB_YA1, C2_QN2)
R2CVAD2NF = AND(FEN, TCOMB_RA2)
R2CVAD1NF = AND(TCOMB_FE, TCOMB_RA2, C2_QN2)
TESTLVINMUXVOR2NF = OR(TESTLVINMUXVIR1, TESTLVINLATCHN)
TESTLVINMUXVOR1NF = OR(TESTB, TESTL)
FMLVINMUXVOR2NF = OR(FMLVINMUXVIR1, FMLVINLATCHN)
FMLVINMUXVOR1NF = OR(FMB, FML)
C3_Q3VZVOR1NF = OR(C3VCO2, C3_Q3)
C3_Q2VZVOR1NF = OR(C3VCO1, C3_Q2)
C3_Q1VZVOR1NF = OR(C3VCO0, C3_Q1)
C3_Q0VZVOR1NF = OR(C3VINHN, C3_Q0)
UC_16VZVOR1NF = OR(C2VCO2, UC_16)
UC_17VZVOR1NF = OR(C2VCO1, UC_17)
UC_18VZVOR1NF = OR(C2VCO0, UC_18)
UC_19VZVOR1NF = OR(C2VINHN, UC_19)
UC_8VZVOR1NF = OR(C1VCO2, UC_8)
UC_9VZVOR1NF = OR(C1VCO1, UC_9)
UC_10VZVOR1NF = OR(C1VCO0, UC_10)
TCOMBVNODE16VOR1NF = OR(TCOMBVNODE18, FML, C3_Q3, TCOMBVNQC)
TCOMB_RA2VOR3NF = OR(TCOMBVNQC, CLRB)
TCOMB_RA2VOR2NF = OR(TCOMBVN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)
UC_8VUC_0 = NAND(C1VCO2, UC_8)
UC_9VZ = NAND(UC_9VZVOR1NF, UC_9VUC_0)
UC_9VUC_0 = NAND(C1VCO1, UC_9)
UC_10VZ = NAND(UC_10VZVOR1NF, UC_10VUC_0)
UC_10VUC_0 = NAND(C1VCO0, UC_10)
TCOMBVNODE16 = NAND(TCOMBVNODE19, TCOMBVNODE16VOR1NF)
TCOMBVNODE18 = NAND(TCOMBVNQB, C3_Q0)
TCOMB_RA2 = NAND(TCOMB_RA2VOR3NF, TCOMB_RA2VOR2NF, TCOMB_RA2VOR1NF)
TCOMBVNODE4 = NAND(TCOMBVNODE4VOR2NF, TCOMBVNODE4VOR1NF)
TCOMBVNODE12 = NAND(TCOMBVNCLR, TCOMBVNFEL, TCOMBVNQC, C3_Q1)
TCOMBVNODE3 = NAND(TCOMBVNODE4, TCOMBVNQB, TCOMBVNQA)
TCOMB_YA1 = NAND(TCOMBVNODE16, TCOMBVNODE3)
TCOMBVNODE14 = NAND(TCOMBVNODE15, TCOMBVNQA)
TCOMB_FE = NAND(TCOMBVNODE16, TCOMBVNODE14)
TCOMBVNODE8 = NAND(TCOMBVNCLR, C3_Q2, TCOMBVNODE8VOR2NF, TCOMBVNODE8VOR1NF)
TCOMB_RA1 = NAND(TCOMBVNCLR, TCOMB_RA1VOR2NF, TCOMB_RA1VOR1NF)
TCOMBVNODE6 = NAND(TCOMBVNFM, TCOMBVNQD, TCOMBVNQB, C3_Q0)
CTST = NOR(C1_CO, TESTL)
C3VCO2 = NOR(CO2, UC_24, UC_25, UC_26)
C3VCO1 = NOR(CO2, UC_25, UC_26)
UC_27 = NOR(C3VCIA, CO2, UC_23)
C3VCIA = NOR(C3_Q2, C3_Q1, C3_Q0)
C3VCO0 = NOR(CO2, UC_26)
C3_Q3VD = NOR(CLRB, C3_Q3VZ, UC_27)
C3_Q2VD = NOR(CLRB, C3_Q2VZ, UC_27)
C3_Q1VD = NOR(CLRB, C3_Q1VZ, UC_27)
C3_Q0VD = NOR(CLRB, C3_Q0VZ, UC_27)
C2VCO2 = NOR(CTST, C2_QN2, UC_21, UC_22)
C2VCO1 = NOR(CTST, UC_21, UC_22)
C2_CO = NOR(C2VCIA, CTST, UC_20)
C2VCIA = NOR(UC_17, UC_18, UC_19)
C2VCO0 = NOR(CTST, UC_22)
UC_16VD = NOR(CLRB, UC_16VZ, C2_CO)
UC_17VD = NOR(CLRB, UC_17VZ, C2_CO)
UC_18VD = NOR(CLRB, UC_18VZ, C2_CO)
UC_19VD = NOR(CLRB, UC_19VZ, C2_CO)
C1VCO2 = NOR(UC_13, UC_14, UC_15)
C1VCO1 = NOR(UC_14, UC_15)
C1_CO = NOR(C1VCIA, UC_12)
C1VCIA = NOR(UC_9, UC_10, UC_11)
UC_8VD = NOR(CLRB, UC_8VZ, C1_CO)
UC_9VD = NOR(CLRB, UC_9VZ, C1_CO)
UC_10VD = NOR(CLRB, UC_10VZ, C1_CO)
UC_11VD = NOR(CLRB, UC_11VZ, C1_CO)
TCOMBVNODE19 = NOR(CLRB, TCOMBVNFEL)
TCOMB_GA2 = NOR(TCOMB_GA2VAD4NF, TCOMB_GA2VAD3NF, TCOMB_GA2VAD2NF, TCOMB_GA2VAD1NF)
TCOMBVNODE15 = NOR(CLRB, TCOMBVNFM, TCOMBVNQC, C3_Q1)
TCOMB_YA2 = NOR(TCOMBVNODE12, TCOMBVNQA)
TCOMB_GA1 = NOR(TCOMBVNODE8, TCOMB_GA1VAD1NF)
Y1C = NOR(Y1CVAD2NF, Y1CVAD1NF)
R2C = NOR(R2CVAD2NF, R2CVAD1NF)
