82{
86 unsigned * pIn, * pOut, * pTemp;
87 unsigned uPhase;
88 int NodeIndex, i, k;
89
90
94
96 for ( i = 0; i < (int)pCutF->
nLeaves - 1; i++ )
98
100 for ( i = 0; i < (int)pCutT->
nLeaves - 1; i++ )
102
104 for ( i = 0; i < (int)pCutRes->
nLeaves - 1; i++ )
106
107 for ( i = 0; i < (int)pCutF->
nLeaves; i++ )
108 {
109 if ( pCutF->
pLeaves[i] == Node )
110 continue;
111 for ( k = 0; k < (int)pCutRes->
nLeaves; k++ )
113 break;
115 }
116
117 for ( i = 0; i < (int)pCutT->
nLeaves; i++ )
118 {
119 for ( k = 0; k < (int)pCutRes->
nLeaves; k++ )
121 break;
123 }
124
125
126
127 NodeIndex = -1;
128 for ( NodeIndex = 0; NodeIndex < (int)pCutF->
nLeaves; NodeIndex++ )
129 if ( pCutF->
pLeaves[NodeIndex] == Node )
130 break;
132
133
134 Extra_TruthCopy( uTemp, Cut_CutReadTruth(pCutF), pCutF->
nLeaves );
135
136
137 pIn = uTemp; pOut = uCof0;
138 for ( i = NodeIndex; i < (int)pCutF->
nLeaves - 1; i++ )
139 {
141 pTemp = pIn; pIn = pOut; pOut = pTemp;
142 }
143 if ( (pCutF->
nLeaves - 1 - NodeIndex) & 1 )
144 Extra_TruthCopy( pOut, pIn, pCutF->
nLeaves );
145
146
147
148 Extra_TruthCopy( uCof0, uTemp, pCutF->
nLeaves );
150 Extra_TruthCopy( uCof1, uTemp, pCutF->
nLeaves );
152
153
154 for ( i = NodeIndex; i < (int)pCutF->
nLeaves - 1; i++ )
157
158
159 uPhase = Cut_TruthPhase(pCutRes, pCutF);
160 assert( Extra_WordCountOnes(uPhase) == (
int)pCutF->
nLeaves );
162 Extra_TruthCopy( uCof0, uTemp, pCutF->
nVarsMax );
164 Extra_TruthCopy( uCof1, uTemp, pCutF->
nVarsMax );
165
166
167 uPhase = Cut_TruthPhase(pCutRes, pCutT);
168 assert( Extra_WordCountOnes(uPhase) == (
int)pCutT->
nLeaves );
170
171
172 pTemp = Cut_CutReadTruth(pCutRes);
173 for ( i = Extra_TruthWordNum(pCutRes->
nLeaves)-1; i >= 0; i-- )
174 pTemp[i] = (uCof0[i] & ~uTemp[i]) | (uCof1[i] & uTemp[i]);
175
176
177 for ( i = (
int)pCutF->
nLeaves - 1; i >= NodeIndex; --i )
179 pCutF->
pLeaves[NodeIndex] = Node;
181}
#define CUT_CELL_MVAR
DECLARATIONS ///.