This HAS to be a for-loop of some variety, but I can't make a for-loop to match. If you replace this with for(var_v1 = 0; var_v1 < size; var_v1++) The diff gets massive.
put this define in types.h or similar. Certain functions are marked as having return values, but do not actually return a value. This causes undefined behavior, which we'd rather avoid on modern GCC. This only impacts -O2 and can matter for both the function itself and functions that call it.
Generate tlut based on the actual texture. The textures these tluts are for are not in common_textures.inc.c This applies to common_tlut_lakitu_checkered_flag, common_tlut_lakitu_second_lap, common_tlut_lakitu_final_lap, common_tlut_lakitu_reverse, common_tlut_lakitu_fishing Appears to be animation textures.