pmd-sky/include
cecilarmitais 14c23438b4 Decomp UFixedPoint64CmpLt
Decompile UFixedPoint64CmpLt (0x02001A30) from asm. It compares two 64-bit
values held as high/low word pairs and returns whether the first is less than
the second.

asm/main_02001A30.s held only this function, so the file and its .inc are
removed rather than split, the function merges into the adjacent
src/main_020018D0.c, and main.lsf drops asm/main_02001A30.o.

Three details of the interface are read off the target rather than assumed,
each tested with the others held fixed. The four words arrive as separate
parameters: a 2-word struct passed by value makes the compiler push all four
argument registers and reload them, which the target does not do. Those
parameters are unsigned: the comparisons select movlo/movhi, where signed high
words give movlt/movgt. The return is word-sized: a u8-width return such as
bool8 appends and r0, r0, #0xff, which the target does not have. BOOL is used
rather than int because it is the tree's word-sized boolean, and it produces
the same bytes.

src/main_02001BB4.c declared this function from its call site, before it was
decompiled. That declaration is replaced by an include of the header. It was
never visible to the compiler at the same time as the definition, so the two
disagreeing prototypes could not be caught by a build; its parameter types were
signed, which does not describe this function.

No comments are added to any pmd-sky file.

Authored by Claude (Opus 4.8, amended by Opus 5) under human direction.
Confirmed by a matching build: build/pmdsky.us/pmdsky.us.nds: OK.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-25 15:16:15 -07:00
..
adventure_log.h Decomped SetPokemonJoined 2026-03-19 23:37:46 -04:00
ansi_params.h
common.h Decomp ReturnEggExclusiveItem 2026-07-11 17:18:26 -04:00
config.h
debug.h
dg_camera.h
dg_effect.h
dg_object.h
dg_random.h merge overlay_29_022EA9EC with dg_random.c 2026-05-06 08:40:40 -04:00
dg_uty.h
dg.h
direction.h
directional_bit_masks.h
directory_file_mngr.h
directory_file.h
dungeon_action_helper.h
dungeon_action.h
dungeon_ai_attack.h
dungeon_ai_itcm.h Match LightningRodStormDrainCheck thanks to @taxicat1 and other funcs 2026-07-23 16:47:54 -07:00
dungeon_ai_item_weight.h
dungeon_ai_items_1.h
dungeon_ai_items.h
dungeon_ai_leader.h
dungeon_ai_movement.h little itcm work 2026-07-18 09:27:28 -07:00
dungeon_ai_parameters.h
dungeon_ai_targeting_1.h
dungeon_ai_targeting.h
dungeon_ai.h
dungeon_capabilities_1.h
dungeon_capabilities_3.h
dungeon_capabilities_4.h Renamed IsMonsterCornered 2026-01-31 22:43:34 -05:00
dungeon_capabilities.h
dungeon_damage.h
dungeon_generation.h
dungeon_init_2.h Decomp GetDungeonModeSpecial and IsNoLossPenaltyDungeon 2026-01-01 20:32:30 +00:00
dungeon_init.h more dungeon_init funcs 2026-04-06 16:25:40 -07:00
dungeon_items.h
dungeon_logic_2.h
dungeon_logic_3.h decomp few type functions 2026-01-31 08:58:35 -08:00
dungeon_logic_4.h
dungeon_logic_5.h more move decomp 2026-01-09 10:00:14 -08:00
dungeon_logic_6.h
dungeon_logic_7.h
dungeon_logic_8.h
dungeon_logic.h
dungeon_map_access_1.h
dungeon_map_access.h
dungeon_misc.h
dungeon_mobility.h
dungeon_mode.h Decomp MonsterSpawnListPartialCopy 2026-05-19 20:23:58 +00:00
dungeon_move_util.h
dungeon_move.h
dungeon_parameters_1.h
dungeon_parameters_2.h
dungeon_parameters_3.h Moved min IQ consts to C 2025-12-04 22:11:07 -05:00
dungeon_parameters_4.h Moved min IQ consts to C 2025-12-04 22:11:07 -05:00
dungeon_parameters.h
dungeon_pokemon_attributes_1.h
dungeon_pokemon_attributes.h
dungeon_projectile_throw.h
dungeon_range_2.h
dungeon_range.h
dungeon_recruitment_2.h decomp dungeon restriction funcs 2026-01-09 11:44:31 -08:00
dungeon_recruitment.h
dungeon_statuses.h
dungeon_util_1.h
dungeon_util_2.h
dungeon_util_static.h
dungeon_util.h
dungeon_visibility.h
dungeon.h Match LightningRodStormDrainCheck thanks to @taxicat1 and other funcs 2026-07-23 16:47:54 -07:00
enums.h Added comments to script_entity_id 2026-07-24 13:35:26 -07:00
exclusive_item.h
file_rom.h
file.h
fixed_room_data_1.h
fixed_room_data.h
game_mode.h Decomp GetGameMode 2025-12-18 20:19:02 +00:00
get_category_string.h forgot include file 2026-01-09 09:15:46 -08:00
global.pch
graphics.h
ground_bg.h
inflict_status.h
iq_skills.h Moved IQ_SKILL_RESTRICTIONS to C 2025-12-04 23:36:51 -05:00
item_util_1.h decomp 2 item funcs 2026-03-28 10:18:53 -07:00
item_util_4.h Decomp GetActualSellPrice 2026-07-11 17:18:25 -04:00
item_util.h initial decomp work 2026-01-03 13:06:03 -08:00
item.h Decomp GetMoneyQuantity 2026-07-11 17:18:26 -04:00
joined_at_checks.h
LICENSE.txt
main_0200B330.h Decomped sub_0200B330 2026-04-26 23:30:17 -04:00
main_0200BC54.h Decomped HandleFadesVeneer 2026-04-26 23:15:53 -04:00
main_0200BD2C.h Decomped GetFadeStatus 2026-04-26 23:18:03 -04:00
main_0200C4FC.h Decomped GetPartnerOptionString 2026-07-10 23:22:20 +03:00
main_0200D81C.h Decomp GetMoneyQuantity 2026-07-11 17:18:26 -04:00
main_0200ECFC.h Decomp ReturnEggExclusiveItem 2026-07-11 17:18:26 -04:00
main_0200EDC0.h
main_0202A388.h Decomped sub_0202A388 2026-04-26 23:19:39 -04:00
main_0203C760.h
main_0204DA2C.h Decomped sub_0204DB08 2026-06-12 17:09:45 -04:00
main_0204DD80.h
main_0204F050.h Decomped sub_0204F050 2026-03-19 23:44:13 -04:00
main_0204FDFC.h Decomped SetPokemonJoined 2026-03-19 23:37:46 -04:00
main_0205A288.h Decomped HandleShedinjaEvolution 2026-03-16 22:36:19 -04:00
main_0205A430.h Decomped GetStatBoostsForMonsterSummary 2026-03-16 22:51:16 -04:00
main_0205B6EC.h Refactor structs 2026-03-18 17:43:47 -04:00
main_0205B008.h Decomped sub_0205B354 2026-03-17 21:08:34 -04:00
main_0205B9C8.h Decomped sub_0205B9C8 2026-03-17 22:59:00 -04:00
main_0205B77C.h Refactor structs 2026-03-18 17:43:47 -04:00
main_0205B354.h Synced from pmdsky-debug 2026-03-17 21:59:30 -04:00
main_0205B440.h Decomped sub_0205B44C 2026-03-17 22:01:34 -04:00
main_0205B554.h Decomped sub_0205B584 2026-03-17 22:05:24 -04:00
main_0205B690.h Decomped sub_0205C19C 2026-03-18 23:17:16 -04:00
main_0205BBFC.h Refactor structs 2026-03-18 17:43:47 -04:00
main_0205BD14.h use bitstreams 2026-05-06 12:49:58 -04:00
main_0205C73C.h Decomp 6 functions 2026-04-16 12:23:36 -04:00
main_0205C440.h use bitstreams 2026-05-06 12:49:58 -04:00
main_0205D11C.h Synced from pmdsky-debug 2026-06-16 19:29:57 -04:00
main_0205E01C.h Decomped sub_0205E090 2026-06-21 19:17:04 -04:00
main_0205E288.h Synced from pmdsky-debug 2026-06-16 19:29:57 -04:00
main_0205E954.h Decomped CountJobListMissions 2026-03-19 22:23:31 -04:00
main_0205EAC8.h Decomped CountJobListMissions 2026-03-19 22:23:31 -04:00
main_0205EBD8.h Decomped sub_0205EC18 2026-03-19 22:18:28 -04:00
main_0205EC18.h Decomped sub_0205EC18 2026-03-19 22:18:28 -04:00
main_0205EC78.h Decomped sub_0205EC78 2026-03-19 22:20:19 -04:00
main_0205ED84.h Decomped CountJobListMissions 2026-03-19 22:23:31 -04:00
main_0206A84C.h Decomped sub_0206A84C 2026-03-19 23:38:50 -04:00
main_0206C98C.h
main_0207E81C.h Synced from pmdsky-debug 2026-05-15 19:05:14 -04:00
main_0207F3E4.h clean up fs_file and move to NitroSDK folder 2026-06-23 08:23:50 -07:00
main_0207F818.h Synced from pmdsky-debug 2026-05-15 19:05:14 -04:00
main_02000C6C.h
main_02001A54.h Decomp sub_02001AB0 2026-07-11 17:18:25 -04:00
main_02001BB4.h Decomp IntToFixedPoint64 2026-07-11 17:18:25 -04:00
main_02001CD4.h Decomp FixedPoint64IsNegative 2026-07-11 17:18:25 -04:00
main_02003D2C.h
main_02008BD4.h
main_02009D48.h Decomped sub_02009D48 2026-04-26 23:25:28 -04:00
main_02009F9C.h Decomped sub_02009E70 2026-04-26 23:27:29 -04:00
main_02013C04.h initial commit of moves decomp 2026-01-09 08:51:36 -08:00
main_02014A4C.h Decomp CopyMovesetFromStream 2026-05-06 12:49:58 -04:00
main_02014CEC.h Decomp IsRealMoveInTimeDarkness, IsMovesetValidInTimeDarkness, and GetFirstNotRealMoveInTimeDarkness 2026-07-11 17:18:26 -04:00
main_02029A50.h Decomped sub_02029A50 2026-04-26 23:00:29 -04:00
main_02051FF0.h Decomped sub_02051FF0 2026-03-19 23:44:55 -04:00
main_02052B28.h match GetExclusiveItem thanks to @taxicat1 2026-01-31 08:58:35 -08:00
main_02054AA4.h Decomp IsCastform and IsCherrim 2026-07-11 17:55:51 -04:00
main_02054BE0.h
main_02054C24.h Decomp BaseFormsEqual 2026-07-11 17:18:26 -04:00
main_02054DC4.h initial decomp work 2026-01-03 13:06:03 -08:00
main_02058C3C.h
main_02058CD8.h Decomped CanLearnIqSkill 2025-12-04 23:03:02 -05:00
main_02058E68.h Decomped EnableIqSkill and DisableIqSkill 2025-12-06 14:34:25 -05:00
main_02058FA4.h use bitstreams 2026-05-06 12:49:58 -04:00
main_02059A74.h Decomped sub_02059B08 2026-03-16 22:18:04 -04:00
main_02065B3C.h Added union comment to special_actors 2026-07-24 13:42:08 -07:00
main_020018D0.h Decomp UFixedPoint64CmpLt 2026-07-25 15:16:15 -07:00
main_020251AC.h
main_020265C4.h
main_020348E4.h
main_020514CC.h
main_020517D4.h
main_020526EC.h
main_020527A8.h
main_020897AC.h
main_0200224C.h Decomp GetRngSeed 2026-07-11 17:18:25 -04:00
main_0200330C.h
main_0200383C.h
main_0200961C.h Decomped sub_0200961C 2026-04-26 23:31:27 -04:00
main_0201398C.h move moves 2026-01-09 10:14:05 -08:00
main_0201514C.h Decomp GetMoveCategory 2026-07-11 17:18:26 -04:00
main_0202593C.h quick decomp of two funcs - 03272026 2026-03-27 13:56:38 -07:00
main_0205283C.h
main_02001188.h
main_02001894.h
main_02008254.h
main_02025788.h
main_02051760.h Decomp IsSkyExclusiveDungeon 2026-07-19 16:27:08 -07:00
main_02059334.h use bitstreams 2026-05-06 12:49:58 -04:00
main_02089678.h
math.h
mission.h Add missing field_0x3 to struct mission; make struct dungeon_floor_pair.dungeon_id use enum dungeon_id 2026-04-15 21:43:30 -04:00
monster_data.h match GetExclusiveItem thanks to @taxicat1 2026-01-31 08:58:35 -08:00
monster_parameters.h Moved IQ_SKILL_RESTRICTIONS to C 2025-12-04 23:36:51 -05:00
move_checks.h
move_data.h
move_effects.h
move_orb_effects.h
move.h
moves_1.h Decomped GetDungeonResultMsg 2026-06-12 17:33:06 -04:00
moves_2.h
moves_3.h moves decomp 2026-03-28 18:46:30 -07:00
moves_4.h initial commit of moves decomp 2026-01-09 08:51:36 -08:00
moves.h initial commit of moves decomp 2026-01-09 08:51:36 -08:00
natural_gift_data.h
number_util.h
options.h Decomp SetOptions, GetOptions and InitOptions 2025-12-26 11:25:50 +00:00
overlay_03_0233CA80.h overlay 03 work 2026-03-28 18:46:39 -07:00
overlay_10_022BCC60.h
overlay_10_022C434C.h
overlay_10_022C2574.h
overlay_13_0238BDA8.h Decomp PersonalityTestDebug 2026-07-11 00:26:53 +03:00
overlay_13_EntryOverlay13.h Synced from pmdsky-debug 2026-03-25 21:02:46 -04:00
overlay_15_0238A140.h Synced from pmdsky-debug 2026-07-02 20:51:00 -04:00
overlay_15_0238AD78.h Synced from pmdsky-debug 2026-07-02 20:51:00 -04:00
overlay_15_0238AE6C.h Synced from pmdsky-debug 2026-07-02 20:51:00 -04:00
overlay_17_0238A71C.h
overlay_28_0238A58C.h
overlay_29_022DC61C.h
overlay_29_022DEAB0.h
overlay_29_022E1610.h
overlay_29_022EBC50.h
overlay_29_022EC608.h
overlay_29_022ECDC0.h
overlay_29_022EE348.h
overlay_29_022EF7A0.h
overlay_29_022F62A8.h
overlay_29_022F73B4.h
overlay_29_022F528C.h
overlay_29_022F0590.h
overlay_29_022F5994.h
overlay_29_022F7364.h
overlay_29_022F7654.h
overlay_29_022F9720.h
overlay_29_022FA430.h
overlay_29_022FAC98.h
overlay_29_022FB538.h more move decomp 2026-01-09 10:00:14 -08:00
overlay_29_022FBA54.h Decomped fleeing outlaw teleport logic 2026-01-31 22:26:26 -05:00
overlay_29_022FBBEC.h Decomped fleeing outlaw teleport logic 2026-01-31 22:26:26 -05:00
overlay_29_022FC99C.h
overlay_29_022FED98.h
overlay_29_022FF898.h
overlay_29_022FFF28.h
overlay_29_0230A9DC.h
overlay_29_0230A994.h
overlay_29_0230AB58.h
overlay_29_0230E578.h
overlay_29_0230F8AC.h
overlay_29_0230F810.h
overlay_29_0231A9D4.h
overlay_29_0231A87C.h
overlay_29_0231ACAC.h
overlay_29_0231B194.h
overlay_29_0231B318.h
overlay_29_0231CBC8.h
overlay_29_0231E9F0.h
overlay_29_0231EDD8.h
overlay_29_0231F570.h
overlay_29_0231FBFC.h
overlay_29_0232A3D8.h
overlay_29_0232C500.h
overlay_29_0232E250.h
overlay_29_0232E840.h
overlay_29_0234AEA4.h Decomped fleeing outlaw teleport logic 2026-01-31 22:26:26 -05:00
overlay_29_0234BBE8.h
overlay_29_0234CA68.h
overlay_29_0234D460.h
overlay_29_0234DDD0.h
overlay_29_0234EC14.h
overlay_29_02301A60.h
overlay_29_02302A38.h
overlay_29_02305C04.h
overlay_29_02307EF8.h
overlay_29_02308FBC.h
overlay_29_02311BF8.h
overlay_29_02318A4C.h Synced from pmdsky-debug 2026-05-25 15:32:06 -04:00
overlay_29_02318AB0.h
overlay_29_02318D34.h
overlay_29_02318E4C.h
overlay_29_02322DB8.h
overlay_29_02337CA8.h
overlay_29_02340CAC.h
overlay_29_02344AF8.h
overlay_29_02348D00.h
overlay_29_023000E4.h
overlay_29_023018AC.h
overlay_29_023026CC.h
overlay_29_023047B8.h
overlay_29_023118B4.h
overlay_29_023329E8.h
overlay_29_023350D8.h
overlay_29_023383A8.h Decompile RevealAttackedTile and ResetVictoryCounter 2026-04-14 20:44:43 -04:00
overlay_29_0230558C.h
overlay_29_0232017C.h
overlay_29_0232800C.h
overlay_29_0233836C.h Decomp gravity funcs 2025-11-29 20:11:47 -08:00
overlay_29_0233847C.h Decomped ov29_0233847C 2026-06-21 19:27:18 -04:00
overlay_29_0234987C.h
overlay_29_02311010.h
overlay_29_02315118.h
overlay_29_02320764.h
overlay_29_02321438.h
overlay_29_02323918.h
overlay_29_02325620.h
overlay_29_02336428.h
overlay_29_02338350.h
overlay_29_02338548.h
overlay_29_02338560.h decomp TrySpawnDoughSeedPoke 2026-01-03 12:02:10 -08:00
overlay_29_02338604.h
overlay_29_02345698.h
overlay_31_02382820.h
overlay_31_02383328.h
overlay_31_02383478.h
overlay_31_02383880.h
overlay_34_022DCB98.h Decomped ov34_022DCB64 2026-04-26 23:11:33 -04:00
overlay_00_0230D388.h Synced from pmdsky-debug 2026-05-25 15:32:06 -04:00
pokemon.h
poly_text.h
position_util.h
preprocessString.h
progression.h Decomp ZinitScriptVariable. Organise funcs. 2025-12-07 07:23:31 +00:00
random_trap.h Rename random trap functions to maintain pmdsky-debug compatibility 2026-05-26 20:44:01 -04:00
run_dungeon_1.h
run_dungeon.h
save.h Decomp CopyMoveTo/FromStream 2026-05-06 12:49:58 -04:00
scenario_flag.h Decomp ScenarioFlagRestore and ScenarioFlagBackup 2025-12-07 06:11:38 +00:00
script_variable_2.h Decomped SetDungeonConquest 2026-06-21 19:14:04 -04:00
script_variable.h Decomp game mode funcs 2025-12-18 13:09:43 +00:00
secondary_terrain_types.h
spawn_1.h Decomp GetRandomSecretRoomItem, GetRandomBazaarItem and GetItemIdToSpawn 2026-05-19 20:59:36 +00:00
spawn_2.h Decomp CopySpawnEntriesOnce. Ensure 100% matches by localising DUNGEON_PTR externs with slightly different definitions. 2026-05-19 20:03:27 +00:00
special_episode.h Decomp ScenarioFlagRestore and ScenarioFlagBackup 2025-12-07 06:11:38 +00:00
special_move_types.h Decomped fleeing outlaw teleport logic 2026-01-31 22:26:26 -05:00
status_checks.h
stdarg.h
story_progress.h Decomp InitScriptVariableValues. Replace enum script_var_id parameters with s16 (required to match InitScriptVariableValues) 2025-12-15 17:36:41 +00:00
tactics_data.h
targeting.h
thread.h renaming, moving, and splitting 2026-06-04 18:39:56 -07:00
tileset.h
trap.h
two_turn_moves_and_statuses.h
type_effectiveness.h
type_matchup_table.h
util.h Decomp IsMovesetValid 2026-07-11 17:18:26 -04:00
wan.h
weather.h
window.h Decomped GetPartnerOptionString 2026-07-10 23:22:20 +03:00