Bohr-Sommerfeld quantization for different potentials

Let's have Bohr-Sommerfeld quantization for one-dimensional case: $$\int \limits_{a}^{b} p(x)dx ~=~ \pi \hbar (n + \nu ).$$ Here $p(x) = \sqrt{2m(E - U)}$, $a, b$ are turning points, and the area which isn't located at interval $(a, b)$ is classically forbidden. I know that when we don't have infinite wells at $a, b$, i.e. the wave-function isn't equal to zero out of the range $(a, b)$, we have $\nu = \frac{1}{2}$, when we have infinite well in, for example, point $a$, $\nu = \frac{3}{4}$, and finally in case when there are two wells, we have $\nu = 1$.

I know that in the first case $\nu = |\varphi_{1} - \varphi_{2}|$ is combined as result of matching of function out of $(a, b)$, $\frac{1}{\sqrt{p}}e^{-|\int pdx|}$ and solution in $(a, b)$, $$\frac{C_{1}}{\sqrt{p}}e^{i \int pdx + i\varphi_{1}} + \frac{C_{2}}{\sqrt{p}}e^{-i \int pdx + i\varphi_{2}},$$ after bypassing of turning points. But what to do in the second and third cases, when function is equal to zero outside at least on one side of the rangle?

OP is considering the Bohr-Sommerfeld quantization rule

$$\tag{1} \oint k(x) \mathrm{d}x ~=~2\pi (n + \frac{1}{4}\sum_i\mu_i) , \qquad n\in\mathbb{N}_0,$$ where the sum $\sum_i$ is over turning points $i$ with positions $x_i$ and where $\mu_i\in\mathbb{Z}$ is the metaplectic correction/Maslov index of the $i$th turning point. See also this Phys.SE post for references.

I) A turning point of generic type has Maslov index $\mu_i=1$. This is seen from the semiclassical connection formulas. The connection formulas with the well-known $\exp(\pm i\frac{\pi}{4})$ phase shift [which induces a $2\times \frac{\pi}{4}=\frac{\pi}{2}$ phase shift between the left and the right mover, and corresponds to $\mu_i=1$] are derived under the assumption that there exists an overlapping region where the following two conditions are both satisfied:

1. The quasi-classical condition: $|\lambda^{\prime}(x)| \ll 1$. This typically holds away from the turning point.

2. A linearization of the potential $V(x)$ is valid. This typically holds only in a small neighborhood around the turning point.

II) An infinite square well potential (say located at $x=x_i$) typically satisfies condition 1 for $x\neq x_i$ but fails condition 2. The connection formula is then replaced by a boundary condition (BC)

$$\tag{2} \psi(x_i)~=~0,$$

cf. e.g. this Phys.SE post. The BC (2) implies a $\pi$ phase shift between the left and the right mover, which corresponds to a Maslov index $\mu_i=2$.