Consider $x_i$, with $i=1,\ldots, 10$, such that $$ 5 \leq 3(x_1 + x_2 + x_3 + x_4) +2(x_5 + x_6 + x_7 + x_8 + x_9 + x_{10}) \leq 12\,, $$ where each $x_i$ can be either $0$ or $1$. In addition, each $x_i$ from $i=5$ to $10$ are restricted to be $0$ if some of the $x_i$ from $i=1$ to $4$ are equal to $1$, according to the following diagram:
Each $x_i$ in the bottom line is restricted by two of the $x_i$ in the top line. For example, if $x_1 = x_2 = 0$, then $x_5$ can be either $0$ or $1$, but if $x_1=1$ and/or $x_2 = 1$, then $x_5=0$ necessarily. The problem is to know in how many ways can we satisfy the inequality, subjected to these restrictions, using a method which is easily used for a computer, like generating functions, for example.
The way I'm trying to answer this is the following: if the additional restrictions did not exist, the number of solutions would be obtainable by using the generating function $$ (1+x^3)^4 (1+x^2)^6 $$ and the solution would be the sum of all coefficients from $x^5$ to $x^{12}$. The restrictions can be incorporated by defining $x^c_i$ such that, in the case of $i=5$ for example, $$ x^c_5 = \quad \left\{ \begin{array}{lll} 0, \quad \, \textrm{if} \quad (1-x_1)(1-x_2)=0 \\ \\ x_5, \quad \, \textrm{if} \quad (1-x_1)(1-x_2)=1 \\ \end{array} \right. \,, $$ and so on for the other variables. Using these $x^c_i$ in the inequality, instead of the $x_i$ (for $i=5$ up to $10$), we have $$ 5 \leq 3(x_1 + x_2 + x_3 + x_4) +2(x^c_5 + x^c_6 + x^c_7 + x^c_8 + x^c_9 + x^c_{10}) \leq 12 $$ which in principle should contain all the restricted possibilities. This is where I'm currently stuck, as I don't know how the generating function for this inequality should be built.