00077394: two lines, checks for species = Necrozman, branches if false (stubbed). species is r1

00084534: two lines, checks for species = Necrozma, branches if true (stubbed). species is r0

00084588: three lines, checks if forme is 1 or 2, branches if not equal, now branches if >=1


0008f604: 4 lines, checks if forme 1 or 2, checks item if equal, now checks if not >=1. item is r1


check to enable ulta burst button
0009d398: 2 line, checks for species = necrozma, branches if false (stubbed), second line is a nop, then checks for forme, then item

species = r0

forme = r0 (later)

item = r0 (later)

function 1:

checks if species is in list

cmp(ne) rn, #0xZ

and

subne rn, #0xhi
subsne rn, #0xlo

set rn to 1 if true, otherwise false, at end, then return

function 2:

take item, species, forme (r1, r4, r0), return 1 if want to enable, otherwise 0

use r1 for 0009d398 call
r4 is species?

921 Solg
922 Lun
923 Necro

so basically in old function

bl <function 2 address>

new function

r4 is pointer(?) to index number
r0 is forme
r1 is item

push r2 to memory stack
write r0 to r2
write r4 to r0
run the covnert_loaded_spcies to_int

now r0 is species int, r2 is forme, r1 is item, r4 is still the pointer

for each 'mon

species check
forme check
valid item check


at end r0 = 1 if any true, otherwise 0

pop stack to r2

bl lr



function 3:

