Don't use BitCount. It's a pretty stupid function, I think.
EDIT:
Turns out BitCount is only one function of code 83.
If the structure of the first pop is type 2X (a list) then
Find first non-null value in list
All values in list become first non-null value
Pre-83 Post-83
10 0
0 0
0 0
0 0
0 0
0* 0
0 0
1 0
0 0
0 0
* - Since Self.FormationNumber is the only valid value at the time, this is considered non-null
The the 40 code comes around:
List 1 List 2 (result of the ActiveMask.FormationNumber)
0 10
0 F1*
0 F1*
0 F1*
0 0
0 0
0 0
0 1
0 F1*
0 F1*
This means not present
The result is that the three enemies are "equal" and the value of the result is 70, which becomes the new Mask for list 1 and that gets pushed to the stack and written in LocalVar:0000.
Then the Enemy ID of each of these masks gets checked and the one with a value of 68 gets saved as the new mask and gets set to LocalVar:0000. Then you have your target mask of enemy 68. Pretty round-about way of doing this. It's just as easy to do
LocalVar:0000 <- ActiveMask.EnemyID == 68
with the same result. 14 bytes vs 35. The caveat to this is that if there are multiple Rufuses, it would target all of them.
We can also see from this that "FormationNumber" is NOT FormationNumber or it would be numbered sequentially with Cloud being 0, Rufus being 4, and Dark Nation being 5. It's more like "Instance" as in, this is the 0th instance of Gagighandi, labeled Gagighandi A when Sensed, and 1st instance of Gagighandi, labeled Gagighandi B. For playable characters this is always 10h + CharacterID. That 1 toward the end? That's an invisible Helicopter actor that is....just there. It doesn't seem to serve any significance.
So Dark Nation is looking for all the zeroth instances of battle actors and then looking for the EnemyID within the results of that. If there were multiple Rufuses, it would only care about the first one.