Help. Confused in understanding where the code is failing

I had recently written a code which gives the maximum XOR sum of the subsets of an array. While submitting the code, my code fails a few test cases and I’m unable to see what test cases it fails.
The code is available on this gist

The input the file takes is as follows:
2 3 5

I’m unable to find out where it fails. Could you guys kindly help me?