general topology – Understanding Path Independence in Complex Analysis, Cauchy Integral Theorem

I don’t understand the path independence in the Cauchy integral theorem which $0$ for a closed curve.

For example, consider Cauchy integral theorem on the closed curve $gamma$ which is created by gluing $2$ non-identical or asymmetrical looking curves $gamma_1, gamma_2$. Since, it is on complex plain, then all values of an arbitrary function $f_1$ on both $gamma_1, gamma_2$ of x-axis is same but the complex component is not, so while integrating on the closed curve $gamma$, all the x-components will be cancelled out (since $gamma_1, gamma_2$ are clockwise anti-clock-wise curve, respectively), but the y-axis or the complex component will not be a $0$!

What am I missing?

I am not saying Cauchy integral theorem is wrong, I am just trying to understand as newbie. I have seen other posts ( like, 1, 2,, 3) on this forum, but didn’t help.