Solution for CodinGame's Nintendo Puzzle

CodinGame is a site where coding puzzles are presented and you can solve them online for fun. One of the "Very Hard" puzzles is a Nintendo sponsored puzzle, which grabbed my attention.

Here is the problem as presented:

The Goal
Big News!
The SETI program has received a series of messages from Alpha Centauri. The most frequent message seems to be: 541a4231 5d324646 27219a26 12497b0e 724eddcb 0e131617 9521bedf 55544dc7
It is not known why these messages are encoded, but there is a good chance that the Alpha Centaurians are trying to evaluate our cognitive abilities before establishing advanced contact.
Our best engineers are working to decode these messages, and they've already succeeded at identifying the program that the Centaurians use to encode the messages. This program takes a size and a list of numbers as inputs. It then outputs the encoded message (see the pseudo-code below).
But so far, no one has been able to decode the messages. We are well aware that this task is by far the hardest that we've encountered, and that only a true NERD will be able to pull it off!

Rules
Here is a pseudo-code version of the encoding program:
READ size
READ size / 16 integers in array a
WRITE size / 16 zeros in array b

For i from 0 to size - 1:
  For j from 0 to size - 1:
    b[(i+j)/32] ^= ((a[i/32] >> (i%32)) & (a[j/32 + size/32] >> (j%32)) & 1) << ((i+j)%32)

PRINT b
You can download a C++ version of the program here.

The goal is to determine the series of numbers entered (array a) from the encoded output of the program (array b). The numbers - input and output - should be displayed in hexadecimal, 8 characters padded with 0 (for example, 42 would be displayed as 0000002a).
If you pass the output of your program as input to the encoder above, you should obtain the input provided to your program.

If there are several possible decoded values, you should display all the possibilities in alphabetical order.

Game Input
Input
Line 1: size S
Line 2: N1 integers in hexadecimal format, separated by blank spaces

Output
N2 integers in hexadecimal format, representing the decoded message.

Constraints
0 < S <= 256
0 < N1 <= 16
0 < N2 <= 32

Example
Input
32
46508fb7 6677e201
Output
b0c152f9 ebf2831f
ebf2831f b0c152f9
There are two parts to solving any puzzle:The former will not be discussed here. I may save that for a later day. For the later, I will not be sharing source code to the solution directly as "Copy pasting solutions is not fun". (However, if you have also solved the problem and can demonstrate that on the site, I'd be more than happy to exchange solutions.) Instead, I have modified the code to write out, step by step, what is happening. i.e. This post is generated by the solution code while solving the problem.

So if you'd like to see very concrete solutions to test cases, read on! (if you want to solve this for yourself, stop now.)

- @mike_acton

CASE 1
32
7fe00033 0caea3f4
decode it!

CASE 1
64
f3268b49 661859eb 0b324559 65ee6bda
decode it!

CASE 3
32
46508fb7 6677e201
decode it!