From 32998ca8996a253abfd7822b7791c19f1102c932 Mon Sep 17 00:00:00 2001 From: UsernameFodder Date: Wed, 27 Dec 2023 01:08:08 -0600 Subject: [PATCH] Sync math operator/utility functions from pokeheartgold Compared/synced by hand from the pokeheartgold asm. Some of the functions had labels corresponding to libgcc counterparts; rename them all for consistency. Note that some of the functions have multiple names in pokeheartgold (of which at most one is actually used). Instead of polluting the xMAP files with multiple symbols (some with zero length), which makes it really hard for scripts to parse, just add these alternate names as comments. This makes them searchable without having an effect on build artifacts. --- asm/include/main_02000C6C.inc | 6 +- asm/include/main_0200C4CC.inc | 4 +- asm/include/main_02054C24.inc | 8 +- asm/include/overlay_00.inc | 14 +- asm/include/overlay_01.inc | 4 +- asm/include/overlay_02.inc | 6 +- asm/include/overlay_03.inc | 4 +- asm/include/overlay_05.inc | 4 +- asm/include/overlay_07.inc | 4 +- asm/include/overlay_11.inc | 6 +- asm/include/overlay_29_022F62CC.inc | 2 +- asm/main_02000C6C.s | 36 +- asm/main_0200C4CC.s | 8 +- asm/main_02054C24.s | 10 +- asm/main_02075600.s | 629 ++++++++++++---------- asm/overlay_00.s | 98 ++-- asm/overlay_01.s | 26 +- asm/overlay_02.s | 18 +- asm/overlay_03.s | 10 +- asm/overlay_05.s | 20 +- asm/overlay_07.s | 30 +- asm/overlay_11.s | 18 +- asm/overlay_29_022F62CC.s | 4 +- lib/asm/crt0.s | 2 +- lib/asm/include/crt0.inc | 2 +- sub/asm/include/main.inc | 4 +- sub/asm/main.s | 24 +- sub/asm/wram.s | 36 +- tools/sync_pmdsky_debug/symbol_details.py | 2 - 29 files changed, 538 insertions(+), 501 deletions(-) diff --git a/asm/include/main_02000C6C.inc b/asm/include/main_02000C6C.inc index d59b3cdf..c1353774 100644 --- a/asm/include/main_02000C6C.inc +++ b/asm/include/main_02000C6C.inc @@ -175,9 +175,9 @@ .public _022A3805 .public _022A3806 .public _022B966C -.public __addsf3 -.public __floatsisf -.public __mulsf3 +.public _fadd +.public _fflt +.public _fmul .public _s32_div_f .public abs .public ArrayFill32Fast diff --git a/asm/include/main_0200C4CC.inc b/asm/include/main_0200C4CC.inc index 7d5bb514..7f0914a1 100644 --- a/asm/include/main_0200C4CC.inc +++ b/asm/include/main_0200C4CC.inc @@ -741,8 +741,8 @@ .public _022AB92C .public _022AB930 .public _022ABDE0 -.public __extendsfdf2 -.public __subsf3 +.public _f2d +.public _fsub .public _s32_div_f .public _u32_div_f .public ADVANCED_MENU_DEFAULT_WINDOW_PARAMS diff --git a/asm/include/main_02054C24.inc b/asm/include/main_02054C24.inc index 59bf0608..6bdc9946 100644 --- a/asm/include/main_02054C24.inc +++ b/asm/include/main_02054C24.inc @@ -183,9 +183,9 @@ .public _022B9484 .public _022B94BC .public _022B9584 -.public __divsf3 -.public __floatunsisf -.public __mulsf3 +.public _fdiv +.public _ffltu +.public _fmul .public _s32_div_f .public _u32_div_f .public AddMoneyCarried @@ -606,7 +606,7 @@ .public sub_0207F748 .public sub_0207F808 .public sub_0207F828 -.public sub_0208F1CC +.public _fls .public TACTIC_NAME_STRING_IDS .public TACTICS_UNLOCK_LEVEL_TABLE .public TEAM_MEMBER_TABLE_PTR diff --git a/asm/include/overlay_00.inc b/asm/include/overlay_00.inc index 16d75b25..da8fdf04 100644 --- a/asm/include/overlay_00.inc +++ b/asm/include/overlay_00.inc @@ -227,13 +227,13 @@ .public sub_0208B360 .public sub_0208DEB0 .public sub_0208DEBC -.public sub_0208DEC8 -.public sub_0208E1E0 -.public sub_0208E370 -.public sub_0208E3EC -.public sub_0208E904 -.public sub_0208FE3C -.public sub_020902AC +.public _dadd +.public _d2f +.public _dflt +.public _dmul +.public _dsub +.public _ll_udiv +.public _ddiv .public SVC_WaitByLoop .public ThreadExit .public UnloadOverlay diff --git a/asm/include/overlay_01.inc b/asm/include/overlay_01.inc index fa6d0cef..f5ddcdc9 100644 --- a/asm/include/overlay_01.inc +++ b/asm/include/overlay_01.inc @@ -369,8 +369,8 @@ .public sub_02062B64 .public sub_0207A2A4 .public sub_020851AC -.public sub_0208FE3C -.public sub_0208FE48 +.public _ll_udiv +.public _ull_mod .public UpdateWindow .public vsprintf .public WAN_TABLE diff --git a/asm/include/overlay_02.inc b/asm/include/overlay_02.inc index 4e094f4c..4eb74248 100644 --- a/asm/include/overlay_02.inc +++ b/asm/include/overlay_02.inc @@ -269,7 +269,7 @@ .public sub_02085030 .public sub_02085158 .public sub_0208B360 -.public sub_0208FE3C -.public sub_0208FE48 -.public sub_0208FE84 +.public _ll_udiv +.public _ull_mod +.public _ll_mul .public WaitForever2 diff --git a/asm/include/overlay_03.inc b/asm/include/overlay_03.inc index da8fb3a1..cf9d83b2 100644 --- a/asm/include/overlay_03.inc +++ b/asm/include/overlay_03.inc @@ -240,6 +240,6 @@ .public sub_020698B8 .public sub_02069904 .public sub_02069940 -.public sub_0208FE3C -.public sub_0208FE48 +.public _ll_udiv +.public _ull_mod .public UnloadFile diff --git a/asm/include/overlay_05.inc b/asm/include/overlay_05.inc index 3fa8aacc..0a21d274 100644 --- a/asm/include/overlay_05.inc +++ b/asm/include/overlay_05.inc @@ -105,6 +105,6 @@ .public sub_020590DC .public sub_0205BD78 .public sub_02062B64 -.public sub_0208FE3C -.public sub_0208FE48 +.public _ll_udiv +.public _ull_mod .public UpdateWindow diff --git a/asm/include/overlay_07.inc b/asm/include/overlay_07.inc index 5d24134b..8794a778 100644 --- a/asm/include/overlay_07.inc +++ b/asm/include/overlay_07.inc @@ -146,6 +146,6 @@ .public sub_0204A018 .public sub_0204A1CC .public sub_0205BD78 -.public sub_0208FE3C -.public sub_0208FE48 +.public _ll_udiv +.public _ull_mod .public UpdateWindow diff --git a/asm/include/overlay_11.inc b/asm/include/overlay_11.inc index eadf3096..0b18d3c2 100644 --- a/asm/include/overlay_11.inc +++ b/asm/include/overlay_11.inc @@ -2,9 +2,9 @@ .public _020A1870 .public _020A548A .public _020A5490 -.public __divsf3 -.public __fixsfsi -.public __floatsisf +.public _fdiv +.public _ffix +.public _fflt .public _s32_div_f .public abs .public AddBulkItemToStorage diff --git a/asm/include/overlay_29_022F62CC.inc b/asm/include/overlay_29_022F62CC.inc index 4092846d..1c58196d 100644 --- a/asm/include/overlay_29_022F62CC.inc +++ b/asm/include/overlay_29_022F62CC.inc @@ -52,7 +52,7 @@ .public RemoveGroundItem .public SpawnItem .public sub_020018A4 -.public sub_0208FC8C +.public _ll_sdiv .public TeamLeaderIqSkillIsEnabled .public TryWarp .public WAN_TABLE diff --git a/asm/main_02000C6C.s b/asm/main_02000C6C.s index 3a1ad526..f6506c7a 100644 --- a/asm/main_02000C6C.s +++ b/asm/main_02000C6C.s @@ -3584,16 +3584,16 @@ _020037D8: ldrh r5, [r1] bl EnableAllInterrupts mov r0, r4 - bl __floatsisf + bl _fflt mov r4, r0 mov r0, r5 - bl __floatsisf + bl _fflt mov r1, r0 ldr r0, _02003820 ; =0x3B792FB2 - bl __mulsf3 + bl _fmul mov r1, r0 mov r0, r4 - bl __addsf3 + bl _fadd ldmia sp!, {r3, r4, r5, pc} .align 2, 0 _02003818: .word _020AEF7C @@ -5427,25 +5427,25 @@ EuclideanNorm__02005050: ; 0x02005050 stmdb sp!, {r4, r5, r6, lr} ldmia r0, {r5, r6} mov r0, r5 - bl __floatsisf + bl _fflt mov r4, r0 mov r0, r5 - bl __floatsisf + bl _fflt mov r1, r0 mov r0, r4 - bl __mulsf3 + bl _fmul mov r5, r0 mov r0, r6 - bl __floatsisf + bl _fflt mov r4, r0 mov r0, r6 - bl __floatsisf + bl _fflt mov r1, r0 mov r0, r4 - bl __mulsf3 + bl _fmul mov r1, r0 mov r0, r5 - bl __addsf3 + bl _fadd bl sqrtf ldmia sp!, {r4, r5, r6, pc} arm_func_end EuclideanNorm__02005050 @@ -5455,25 +5455,25 @@ EuclideanNorm__020050B0: ; 0x020050B0 stmdb sp!, {r4, r5, r6, lr} ldmia r0, {r5, r6} mov r0, r5 - bl __floatsisf + bl _fflt mov r4, r0 mov r0, r5 - bl __floatsisf + bl _fflt mov r1, r0 mov r0, r4 - bl __mulsf3 + bl _fmul mov r5, r0 mov r0, r6 - bl __floatsisf + bl _fflt mov r4, r0 mov r0, r6 - bl __floatsisf + bl _fflt mov r1, r0 mov r0, r4 - bl __mulsf3 + bl _fmul mov r1, r0 mov r0, r5 - bl __addsf3 + bl _fadd bl sqrtf ldmia sp!, {r4, r5, r6, pc} arm_func_end EuclideanNorm__020050B0 diff --git a/asm/main_0200C4CC.s b/asm/main_0200C4CC.s index 6644c133..914ee80c 100644 --- a/asm/main_0200C4CC.s +++ b/asm/main_0200C4CC.s @@ -75434,8 +75434,8 @@ _0204900C: bl GetTime mov r1, r7 mov r7, r0 - bl __subsf3 - bl __extendsfdf2 + bl _fsub + bl _f2d mov r3, r0 mov r2, r1 ldr r0, _0204923C ; =_0209CD84 @@ -75492,8 +75492,8 @@ _020491A8: _020491C4: bl GetTime mov r1, r7 - bl __subsf3 - bl __extendsfdf2 + bl _fsub + bl _f2d mov r3, r0 mov r2, r1 ldr r0, _02049244 ; =_0209CD94 diff --git a/asm/main_02054C24.s b/asm/main_02054C24.s index 333a4385..237d9480 100644 --- a/asm/main_02054C24.s +++ b/asm/main_02054C24.s @@ -34410,16 +34410,16 @@ _02071030: addlo r1, r1, #0x10000 str r0, [r8, #0xec8] mov r0, r1 - bl __floatunsisf + bl _ffltu mov sb, r0 mov r0, sl - bl __floatunsisf + bl _ffltu mov r1, r0 mov r0, sb - bl __divsf3 + bl _fdiv mov r1, r0 ldr r0, _02071158 ; =0x42C80000 - bl __mulsf3 + bl _fmul mov sb, r0 ldrsh r0, [r7, #0xc4] mov r1, sb @@ -34428,7 +34428,7 @@ _02071030: strlt r0, [r8, #0xec0] str sb, [r8, #0xebc] ldr r0, [r8, #0xec0] - bl sub_0208F1CC + bl _fls strlo sb, [r8, #0xec0] movlo r0, #0x64 strloh r0, [r7, #0xc4] diff --git a/asm/main_02075600.s b/asm/main_02075600.s index b7d72692..8099d7c8 100644 --- a/asm/main_02075600.s +++ b/asm/main_02075600.s @@ -288,7 +288,7 @@ sub_02075930: ; 0x02075930 umull r0, r1, r4, sb mla r1, r4, r5, r1 mla r1, r6, sb, r1 - bl sub_0208FC8C + bl _ll_sdiv mov r4, r0 mov r6, r1 _020759E0: @@ -318,7 +318,7 @@ _020759E0: umull r0, r1, r5, sb mla r1, r5, ip, r1 mla r1, r7, sb, r1 - bl sub_0208FC8C + bl _ll_sdiv mov r5, r0 mov r7, r1 _02075A54: @@ -339,7 +339,7 @@ _02075A54: mov r1, r3 mov r2, #0x1000 mov r3, #0 - bl sub_0208FC8C + bl _ll_sdiv _02075A9C: ldr r3, [sp, #4] ldr r2, [sp] @@ -7488,7 +7488,7 @@ sub_0207B050: ; 0x0207B050 mov r2, r5 mov r3, r4 sbc r1, r1, r6 - bl sub_0208FE3C + bl _ll_udiv adds r2, r0, #1 adc r0, r1, #0 umull r3, r1, r5, r2 @@ -21372,7 +21372,7 @@ _02086270: mov r0, r7 mov r2, #0xa mov r3, #0 - bl sub_0208FE3C + bl _ll_udiv mov r2, #0xa umull r3, r2, r0, r2 subs r2, r7, r3 @@ -21510,12 +21510,12 @@ _0208644C: .word 0xCCCCCCCD arm_func_start sub_02086450 sub_02086450: ; 0x02086450 ldr r0, _02086460 ; =_020B2FBC - ldr ip, _02086464 ; =__extendsfdf2 + ldr ip, _02086464 ; =_f2d ldr r0, [r0] bx ip .align 2, 0 _02086460: .word _020B2FBC -_02086464: .word __extendsfdf2 +_02086464: .word _f2d arm_func_end sub_02086450 arm_func_start sub_02086468 @@ -23418,13 +23418,13 @@ _02087D6C: mov r1, sb mov r2, r7 mov r3, r6 - bl sub_0208FE48 + bl _ull_mod mov r5, r0 mov r0, sl mov r1, sb mov r2, r7 mov r3, r6 - bl sub_0208FE3C + bl _ll_udiv mov sl, r0 cmp r5, #0xa mov sb, r1 @@ -23562,7 +23562,7 @@ sub_02087F10: ; 0x02087F10 mov r0, sl mov r3, r1 mov r1, r0 - bl sub_0208F0B4 + bl _deq bne _02087FDC ldr r3, _020883C4 ; =_020B31E4 sub r0, r8, #6 @@ -24013,7 +24013,7 @@ _020885E4: mov r0, sl mov r1, r8 mov r3, r2 - bl sub_0208F018 + bl _dls bhs _020886A8 cmp r6, #0 sub r0, sb, #5 @@ -25854,13 +25854,13 @@ _02089E54: ldr r1, _0208AACC ; =_020B2FB8 mov r0, #0 ldr r1, [r1] - bl __subsf3 - bl __extendsfdf2 + bl _fsub + bl _f2d b _02089E90 _02089E84: ldr r0, _0208AACC ; =_020B2FB8 ldr r0, [r0] - bl __extendsfdf2 + bl _f2d _02089E90: ldr r2, [sp, #0x2c] add r3, r2, r5 @@ -25992,7 +25992,7 @@ _0208A020: mov r0, #0 mov r3, r1 mov r1, r0 - bl sub_0208E904 + bl _dsub b _0208A058 _0208A054: bl sub_02086450 @@ -26726,7 +26726,7 @@ _0208AA08: mov r0, #0 ldmia r1, {r2, r3} mov r1, r0 - bl sub_0208E904 + bl _dsub add sp, sp, #0xa8 ldmia sp!, {r3, r4, r5, r6, r7, r8, sb, sl, fp, pc} _0208AA64: @@ -26740,13 +26740,13 @@ _0208AA64: mov r1, r0 mov r2, r4 mov r3, r6 - bl sub_0208F140 + bl _dneq beq _0208AAE4 mov r0, r4 mov r1, r6 mov r2, #0 mov r3, #0x100000 - bl sub_0208F018 + bl _dls bhs _0208AAE4 ldr r0, [sp, #0xd0] mov r1, #1 @@ -26768,7 +26768,7 @@ _0208AAE4: mov r0, r4 mov r1, r6 mvn r2, #0 - bl sub_0208EEDC + bl _dgeq bls _0208AB10 ldr r0, [sp, #0xd0] mov r2, #1 @@ -26786,7 +26786,7 @@ _0208AB10: mov r1, r0 mov r2, r4 mov r3, r6 - bl sub_0208E904 + bl _dsub mov r4, r0 mov r6, r1 _0208AB44: @@ -26956,19 +26956,19 @@ sub_0208AD28: ; 0x0208AD28 mov r1, r0 mov r2, r4 mov r3, r5 - bl sub_0208F140 + bl _dneq beq _0208ADEC mov r0, r6 mov r1, r7 mov r2, #0 mov r3, #0x100000 - bl sub_0208F018 + bl _dls blo _0208ADE0 ldr r3, _0208AE00 ; =0x7FEFFFFF mov r0, r6 mov r1, r7 mvn r2, #0 - bl sub_0208EEDC + bl _dgeq bls _0208ADEC _0208ADE0: ldr r0, _0208AE04 ; =_022BCA70 @@ -27495,7 +27495,7 @@ _0208B474: ldr r1, [sp, #0xac] ldr r2, [sp, #0xb0] ldr r3, [sp, #0xb4] - bl sub_0208DEC8 + bl _dadd add sp, sp, #0x80 ldmia sp!, {r3, r4, r5, r6, r7, r8, sb, sl, fp, lr} add sp, sp, #0x10 @@ -27542,7 +27542,7 @@ _0208B500: ldr r1, [sp, #0xb4] mov r2, r0 mov r3, r1 - bl sub_0208E904 + bl _dsub add sp, sp, #0x80 ldmia sp!, {r3, r4, r5, r6, r7, r8, sb, sl, fp, lr} add sp, sp, #0x10 @@ -27571,7 +27571,7 @@ _0208B578: ldr r2, [sp, #0xb0] ldr r3, [sp, #0xb4] mov r1, r0 - bl sub_0208E904 + bl _dsub add sp, sp, #0x80 ldmia sp!, {r3, r4, r5, r6, r7, r8, sb, sl, fp, lr} add sp, sp, #0x10 @@ -27591,7 +27591,7 @@ _0208B5B4: ldr r3, [sp, #0xac] sub r1, r1, #0x40000000 mov r0, #0 - bl sub_020902AC + bl _ddiv add sp, sp, #0x80 ldmia sp!, {r3, r4, r5, r6, r7, r8, sb, sl, fp, lr} add sp, sp, #0x10 @@ -27603,7 +27603,7 @@ _0208B600: ldr r1, [sp, #0xac] mov r2, r0 mov r3, r1 - bl sub_0208E3EC + bl _dmul add sp, sp, #0x80 ldmia sp!, {r3, r4, r5, r6, r7, r8, sb, sl, fp, lr} add sp, sp, #0x10 @@ -27616,7 +27616,7 @@ _0208B62C: blt _0208B65C ldr r0, [sp, #0xa8] ldr r1, [sp, #0xac] - bl sub_0208E750 + bl _dsqrt add sp, sp, #0x80 ldmia sp!, {r3, r4, r5, r6, r7, r8, sb, sl, fp, lr} add sp, sp, #0x10 @@ -27643,7 +27643,7 @@ _0208B65C: bge _0208B6BC ldr r1, _0208B9B0 ; =0x3FF00000 mov r0, #0 - bl sub_020902AC + bl _ddiv str r0, [sp, #0x78] str r1, [sp, #0x7c] _0208B6BC: @@ -27657,19 +27657,19 @@ _0208B6BC: ldr r1, [sp, #0x7c] mov r2, r0 mov r3, r1 - bl sub_0208E904 + bl _dsub mov r4, r0 mov r5, r1 ldr r0, [sp, #0x78] ldr r1, [sp, #0x7c] mov r2, r0 mov r3, r1 - bl sub_0208E904 + bl _dsub mov r2, r0 mov r3, r1 mov r0, r4 mov r1, r5 - bl sub_020902AC + bl _ddiv str r0, [sp, #0x78] str r1, [sp, #0x7c] b _0208B748 @@ -27680,7 +27680,7 @@ _0208B724: ldr r2, [sp, #0x78] ldr r3, [sp, #0x7c] mov r1, r0 - bl sub_0208E904 + bl _dsub str r0, [sp, #0x78] str r1, [sp, #0x7c] _0208B748: @@ -27700,7 +27700,7 @@ _0208B760: ldr r0, [r0] mov r2, #0x21 str r2, [r1] - bl __extendsfdf2 + bl _f2d add sp, sp, #0x80 ldmia sp!, {r3, r4, r5, r6, r7, r8, sb, sl, fp, lr} add sp, sp, #0x10 @@ -27764,83 +27764,83 @@ _0208B860: ldr r1, [sp, #0xac] add r3, r2, #1 mov r2, #0 - bl sub_0208E904 + bl _dsub mov r2, r0 mov r3, r1 str r0, [sp, #0x50] str r1, [sp, #0x54] - bl sub_0208E3EC + bl _dmul mov r6, r1 mov r4, r0 ldr r2, [sp, #0x50] ldr r3, [sp, #0x54] ldr r1, _0208B9D4 ; =0x3FD00000 mov r0, #0 - bl sub_0208E3EC + bl _dmul mov r2, r0 mov r3, r1 ldr r0, _0208B9D8 ; =0x55555555 sub r1, r0, #0x15800000 - bl sub_0208E904 + bl _dsub mov r2, r0 mov r3, r1 ldr r0, [sp, #0x50] ldr r1, [sp, #0x54] - bl sub_0208E3EC + bl _dmul mov r2, r0 mov r3, r1 mov r0, #0 ldr r1, _0208B9C0 ; =0x3FE00000 - bl sub_0208E904 + bl _dsub mov r2, r0 mov r0, r4 mov r3, r1 mov r1, r6 - bl sub_0208E3EC + bl _dmul mov r6, r0 mov r8, r1 mov r0, #0x60000000 ldr r1, _0208B9DC ; =0x3FF71547 ldr r2, [sp, #0x50] ldr r3, [sp, #0x54] - bl sub_0208E3EC + bl _dmul mov r4, r0 mov sb, r1 ldr r0, _0208B9E0 ; =0xF85DDF44 ldr r1, _0208B9E4 ; =0x3E54AE0B ldr r2, [sp, #0x50] ldr r3, [sp, #0x54] - bl sub_0208E3EC + bl _dmul mov fp, r0 mov sl, r1 ldr r0, _0208B9E8 ; =0x652B82FE ldr r1, _0208B9DC ; =0x3FF71547 mov r2, r6 mov r3, r8 - bl sub_0208E3EC + bl _dmul mov r2, r0 mov r3, r1 mov r0, fp mov r1, sl - bl sub_0208E904 + bl _dsub mov r6, r0 mov r8, r1 mov r0, r4 mov r1, sb mov r2, r6 mov r3, r8 - bl sub_0208DEC8 + bl _dadd mov r2, r4 mov r3, sb str r1, [sp, #0x5c] mov r0, #0 str r0, [sp, #0x58] - bl sub_0208E904 + bl _dsub mov r2, r0 mov r0, r6 mov r3, r1 mov r1, r8 - bl sub_0208E904 + bl _dsub mov r4, r0 mov r8, r1 b _0208BFF8 @@ -27912,7 +27912,7 @@ _0208BA9C: ldr r1, [sp, #0x74] mov r2, r6 add r3, r3, #0x1600000 - bl sub_0208E3EC + bl _dmul mov r4, r1 str r0, [sp, #0x70] str r4, [sp, #0x74] @@ -27942,7 +27942,7 @@ _0208BB0C: ldr r2, [r2, r8, lsl #3] mov r1, sb str sb, [sp, #0x74] - bl sub_0208E904 + bl _dsub ldr r2, _0208B9F4 ; =_020AEED0 mov sl, r0 add r3, r2, r8, lsl #3 @@ -27951,19 +27951,19 @@ _0208BB0C: ldr r2, [r2, r8, lsl #3] ldr r3, [r3, #4] mov r1, sb - bl sub_0208DEC8 + bl _dadd mov r3, r1 mov r2, r0 ldr r1, _0208B9B0 ; =0x3FF00000 mov r0, #0 - bl sub_020902AC + bl _ddiv str r1, [sp, #0x24] mov fp, r0 ldr r3, [sp, #0x24] mov r0, sl mov r1, r4 mov r2, fp - bl sub_0208E3EC + bl _dmul mov r2, sb, asr #1 orr r2, r2, #0x20000000 mov sb, r1 @@ -27979,275 +27979,275 @@ _0208BB0C: str r1, [sp, #0x44] str r0, [sp, #0x48] str r0, [sp, #0x40] - bl sub_0208E904 + bl _dsub mov r2, r0 mov r3, r1 ldr r0, [sp, #0x70] ldr r1, [sp, #0x74] - bl sub_0208E904 + bl _dsub str r0, [sp, #0x2c] str r1, [sp, #0x1c] ldr r0, [sp, #0x48] ldr r2, [sp, #0x40] ldr r3, [sp, #0x44] mov r1, sb - bl sub_0208E3EC + bl _dmul mov r2, r0 mov r3, r1 mov r0, sl mov r1, r4 - bl sub_0208E904 + bl _dsub mov sl, r0 mov r4, r1 ldr r2, [sp, #0x2c] ldr r3, [sp, #0x1c] ldr r0, [sp, #0x48] mov r1, sb - bl sub_0208E3EC + bl _dmul mov r2, r0 mov r3, r1 mov r0, sl mov r1, r4 - bl sub_0208E904 + bl _dsub mov r3, r1 mov r2, r0 ldr r1, [sp, #0x24] mov r0, fp - bl sub_0208E3EC + bl _dmul str r0, [sp, #0x30] ldr r0, [sp, #0x28] str r1, [sp, #0x14] mov r1, sb mov r2, r0 mov r3, sb - bl sub_0208E3EC + bl _dmul mov r4, r0 mov sl, r1 mov r2, r4 mov r3, sl - bl sub_0208E3EC + bl _dmul str r0, [sp, #0x34] mov fp, r1 ldr r0, _0208B9F8 ; =0x4A454EEF ldr r1, _0208B9FC ; =0x3FCA7E28 mov r2, r4 mov r3, sl - bl sub_0208E3EC + bl _dmul mov r2, r0 mov r3, r1 ldr r0, _0208BA00 ; =0x93C9DB65 ldr r1, _0208BA04 ; =0x3FCD864A - bl sub_0208DEC8 + bl _dadd mov r2, r0 mov r3, r1 mov r0, r4 mov r1, sl - bl sub_0208E3EC + bl _dmul mov r2, r0 mov r3, r1 ldr r0, _0208BA08 ; =0xA91D4101 ldr r1, _0208BA0C ; =0x3FD17460 - bl sub_0208DEC8 + bl _dadd mov r2, r0 mov r3, r1 mov r0, r4 mov r1, sl - bl sub_0208E3EC + bl _dmul mov r2, r0 mov r3, r1 ldr r0, _0208BA10 ; =0x518F264D ldr r1, _0208BA14 ; =0x3FD55555 - bl sub_0208DEC8 + bl _dadd mov r2, r0 mov r3, r1 mov r0, r4 mov r1, sl - bl sub_0208E3EC + bl _dmul mov r2, r0 mov r3, r1 ldr r0, _0208BA18 ; =0xDB6FABFF ldr r1, _0208BA1C ; =0x3FDB6DB6 - bl sub_0208DEC8 + bl _dadd mov r2, r0 mov r3, r1 mov r0, r4 mov r1, sl - bl sub_0208E3EC + bl _dmul mov r2, r0 mov r3, r1 ldr r0, _0208BA20 ; =0x33333303 ldr r1, _0208BA24 ; =0x3FE33333 - bl sub_0208DEC8 + bl _dadd mov r2, r0 mov r3, r1 ldr r0, [sp, #0x34] mov r1, fp - bl sub_0208E3EC + bl _dmul mov r4, r0 mov sl, r1 ldr r0, [sp, #0x48] ldr r2, [sp, #0x28] mov r1, sb mov r3, sb - bl sub_0208DEC8 + bl _dadd mov r2, r0 mov r3, r1 ldr r0, [sp, #0x30] ldr r1, [sp, #0x14] - bl sub_0208E3EC + bl _dmul mov r2, r0 mov r3, r1 mov r0, r4 mov r1, sl - bl sub_0208DEC8 + bl _dadd mov r4, r0 ldr r0, [sp, #0x48] mov sl, r1 mov r1, sb mov r2, r0 mov r3, r1 - bl sub_0208E3EC + bl _dmul str r1, [sp, #0xc] mov fp, r0 ldr r1, _0208BA28 ; =0x40080000 ldr r3, [sp, #0xc] mov r0, #0 mov r2, fp - bl sub_0208DEC8 + bl _dadd mov r2, r4 mov r3, sl - bl sub_0208DEC8 + bl _dadd mov r0, #0 ldr r3, _0208BA28 ; =0x40080000 mov r2, r0 str r1, [sp, #0x44] str r0, [sp, #0x40] - bl sub_0208E904 + bl _dsub ldr r3, [sp, #0xc] mov r2, fp - bl sub_0208E904 + bl _dsub mov r2, r0 mov r3, r1 mov r0, r4 mov r1, sl - bl sub_0208E904 + bl _dsub str r0, [sp, #0x38] str r1, [sp, #4] ldr r0, [sp, #0x48] ldr r2, [sp, #0x40] ldr r3, [sp, #0x44] mov r1, sb - bl sub_0208E3EC + bl _dmul mov r4, r0 mov sl, r1 ldr r0, [sp, #0x30] ldr r1, [sp, #0x14] ldr r2, [sp, #0x40] ldr r3, [sp, #0x44] - bl sub_0208E3EC + bl _dmul str r0, [sp, #0x3c] mov fp, r1 ldr r0, [sp, #0x38] ldr r1, [sp, #4] ldr r2, [sp, #0x28] mov r3, sb - bl sub_0208E3EC + bl _dmul mov r2, r0 mov r3, r1 ldr r0, [sp, #0x3c] mov r1, fp - bl sub_0208DEC8 + bl _dadd mov sb, r0 mov fp, r1 mov r0, r4 mov r1, sl mov r2, sb mov r3, fp - bl sub_0208DEC8 + bl _dadd mov r0, #0 mov r2, r4 mov r3, sl str r1, [sp, #0x6c] str r0, [sp, #0x68] - bl sub_0208E904 + bl _dsub mov r2, r0 mov r3, r1 mov r0, sb mov r1, fp - bl sub_0208E904 + bl _dsub mov sl, r1 mov fp, r0 ldr r1, _0208BA2C ; =0x3FEEC709 ldr r2, [sp, #0x68] ldr r3, [sp, #0x6c] mov r0, #0xe0000000 - bl sub_0208E3EC + bl _dmul mov r4, r0 mov sb, r1 ldr r0, _0208BA30 ; =0x145B01F5 ldr r1, _0208BA34 ; =0xBE3E2FE0 ldr r2, [sp, #0x68] ldr r3, [sp, #0x6c] - bl sub_0208E3EC + bl _dmul mov r2, fp mov r3, sl mov fp, r0 mov sl, r1 ldr r0, _0208BA38 ; =0xDC3A03FD ldr r1, _0208BA2C ; =0x3FEEC709 - bl sub_0208E3EC + bl _dmul mov r2, r0 mov r3, r1 mov r0, fp mov r1, sl - bl sub_0208DEC8 + bl _dadd mov r2, r0 mov r3, r1 ldr r0, _0208BA3C ; =_020AEEE0 add r1, r0, r8, lsl #3 ldr r0, [r0, r8, lsl #3] ldr r1, [r1, #4] - bl sub_0208DEC8 + bl _dadd mov fp, r0 mov sl, r1 mov r0, r6 - bl sub_0208E370 + bl _dflt str r0, [sp, #0x50] str r1, [sp, #0x54] mov r0, r4 mov r1, sb mov r2, fp mov r3, sl - bl sub_0208DEC8 + bl _dadd ldr r2, _0208BA40 ; =_020AEEC0 add r3, r2, r8, lsl #3 ldr r2, [r2, r8, lsl #3] ldr r3, [r3, #4] - bl sub_0208DEC8 + bl _dadd mov r2, r0 mov r3, r1 ldr r0, [sp, #0x50] ldr r1, [sp, #0x54] - bl sub_0208DEC8 + bl _dadd str r1, [sp, #0x5c] mov r0, #0 str r0, [sp, #0x58] ldr r2, [sp, #0x50] ldr r3, [sp, #0x54] - bl sub_0208E904 + bl _dsub ldr r2, _0208BA40 ; =_020AEEC0 add r3, r2, r8, lsl #3 ldr r2, [r2, r8, lsl #3] ldr r3, [r3, #4] - bl sub_0208E904 + bl _dsub mov r2, r4 mov r3, sb - bl sub_0208E904 + bl _dsub mov r2, r0 mov r0, fp mov r3, r1 mov r1, sl - bl sub_0208E904 + bl _dsub mov r4, r0 mov r8, r1 _0208BFF8: @@ -28262,38 +28262,38 @@ _0208BFF8: subeq r5, r5, #0x80000000 str r1, [sp, #0x64] str r2, [sp, #0x60] - bl sub_0208E904 + bl _dsub mov r2, r0 mov r3, r1 ldr r0, [sp, #0x58] ldr r1, [sp, #0x5c] - bl sub_0208E3EC + bl _dmul mov r7, r0 mov sb, r1 ldr r0, [sp, #0xb0] ldr r1, [sp, #0xb4] mov r2, r4 mov r3, r8 - bl sub_0208E3EC + bl _dmul mov r2, r0 mov r3, r1 mov r0, r7 mov r1, sb - bl sub_0208DEC8 + bl _dadd mov r7, r0 mov r8, r1 ldr r0, [sp, #0x60] ldr r1, [sp, #0x64] ldr r2, [sp, #0x58] ldr r3, [sp, #0x5c] - bl sub_0208E3EC + bl _dmul mov r2, r0 mov r3, r1 mov r0, r7 mov r1, r8 str r2, [sp, #0x68] str r3, [sp, #0x6c] - bl sub_0208DEC8 + bl _dadd mov sb, r1 ldr r2, _0208BA44 ; =0x40900000 str r0, [sp, #0x78] @@ -28308,12 +28308,12 @@ _0208BFF8: ldr r1, _0208BA4C ; =0x7E37E43C mov r2, r6 mov r3, r5 - bl sub_0208E3EC + bl _dmul mov r2, r0 mov r3, r1 ldr r0, _0208BA48 ; =0x8800759C ldr r1, _0208BA4C ; =0x7E37E43C - bl sub_0208E3EC + bl _dmul add sp, sp, #0x80 ldmia sp!, {r3, r4, r5, r6, r7, r8, sb, sl, fp, lr} add sp, sp, #0x10 @@ -28323,30 +28323,30 @@ _0208C104: ldr r1, _0208BA50 ; =0x3C971547 mov r2, r7 mov r3, r8 - bl sub_0208DEC8 + bl _dadd mov r4, r0 mov sl, r1 ldr r0, [sp, #0x78] ldr r2, [sp, #0x68] ldr r3, [sp, #0x6c] mov r1, sb - bl sub_0208E904 + bl _dsub mov r2, r0 mov r3, r1 mov r0, r4 mov r1, sl - bl sub_0208EEDC + bl _dgeq bls _0208C238 ldr r0, _0208BA48 ; =0x8800759C ldr r1, _0208BA4C ; =0x7E37E43C mov r2, r6 mov r3, r5 - bl sub_0208E3EC + bl _dmul mov r2, r0 mov r3, r1 ldr r0, _0208BA48 ; =0x8800759C ldr r1, _0208BA4C ; =0x7E37E43C - bl sub_0208E3EC + bl _dmul add sp, sp, #0x80 ldmia sp!, {r3, r4, r5, r6, r7, r8, sb, sl, fp, lr} add sp, sp, #0x10 @@ -28364,12 +28364,12 @@ _0208C184: ldr r1, _0208BA5C ; =0x01A56E1F mov r2, r6 mov r3, r5 - bl sub_0208E3EC + bl _dmul mov r2, r0 mov r3, r1 ldr r0, _0208BA58 ; =0xC2F8F359 ldr r1, _0208BA5C ; =0x01A56E1F - bl sub_0208E3EC + bl _dmul add sp, sp, #0x80 ldmia sp!, {r3, r4, r5, r6, r7, r8, sb, sl, fp, lr} add sp, sp, #0x10 @@ -28377,23 +28377,23 @@ _0208C184: _0208C1DC: ldr r2, [sp, #0x68] ldr r3, [sp, #0x6c] - bl sub_0208E904 + bl _dsub mov r2, r0 mov r3, r1 mov r0, r7 mov r1, r8 - bl sub_0208EF74 + bl _dleq bhi _0208C238 ldr r0, _0208BA58 ; =0xC2F8F359 ldr r1, _0208BA5C ; =0x01A56E1F mov r2, r6 mov r3, r5 - bl sub_0208E3EC + bl _dmul mov r2, r0 mov r3, r1 ldr r0, _0208BA58 ; =0xC2F8F359 ldr r1, _0208BA5C ; =0x01A56E1F - bl sub_0208E3EC + bl _dmul add sp, sp, #0x80 ldmia sp!, {r3, r4, r5, r6, r7, r8, sb, sl, fp, lr} add sp, sp, #0x10 @@ -28427,7 +28427,7 @@ _0208C238: ldr r2, [sp, #0x50] ldr r3, [sp, #0x54] rsblt r4, r4, #0 - bl sub_0208E904 + bl _dsub str r0, [sp, #0x68] str r1, [sp, #0x6c] _0208C2B4: @@ -28435,163 +28435,163 @@ _0208C2B4: ldr r3, [sp, #0x6c] mov r0, r7 mov r1, r8 - bl sub_0208DEC8 + bl _dadd mov r3, r1 mov r0, #0 ldr r1, _0208BA60 ; =0x3FE62E43 mov r2, r0 str r3, [sp, #0x54] str r0, [sp, #0x50] - bl sub_0208E3EC + bl _dmul mov sb, r0 mov sl, r1 ldr r0, [sp, #0x50] ldr r1, [sp, #0x54] ldr r2, [sp, #0x68] ldr r3, [sp, #0x6c] - bl sub_0208E904 + bl _dsub mov r2, r0 mov r0, r7 mov r3, r1 mov r1, r8 - bl sub_0208E904 + bl _dsub mov r2, r0 mov r3, r1 ldr r0, _0208BA64 ; =0xFEFA39EF ldr r1, _0208BA68 ; =0x3FE62E42 - bl sub_0208E3EC + bl _dmul mov r7, r0 mov r8, r1 ldr r0, _0208BA6C ; =0x0CA86C39 ldr r1, _0208BA70 ; =0xBE205C61 ldr r2, [sp, #0x50] ldr r3, [sp, #0x54] - bl sub_0208E3EC + bl _dmul mov r2, r0 mov r0, r7 mov r3, r1 mov r1, r8 - bl sub_0208DEC8 + bl _dadd mov r7, r0 mov r8, r1 mov r0, sb mov r1, sl mov r2, r7 mov r3, r8 - bl sub_0208DEC8 + bl _dadd mov r2, sb mov r3, sl str r0, [sp, #0x78] str r1, [sp, #0x7c] - bl sub_0208E904 + bl _dsub mov r2, r0 mov r3, r1 mov r0, r7 mov r1, r8 - bl sub_0208E904 + bl _dsub mov r8, r0 mov sb, r1 ldr r0, [sp, #0x78] ldr r1, [sp, #0x7c] mov r2, r0 mov r3, r1 - bl sub_0208E3EC + bl _dmul mov r2, r0 str r2, [sp, #0x50] mov r3, r1 str r3, [sp, #0x54] ldr r0, _0208BA74 ; =0x72BEA4D0 ldr r1, _0208BA78 ; =0x3E663769 - bl sub_0208E3EC + bl _dmul mov r2, r0 mov r3, r1 ldr r0, _0208BA7C ; =0xC5D26BF1 ldr r1, _0208BA80 ; =0xBEBBBD41 - bl sub_0208DEC8 + bl _dadd mov r2, r0 mov r3, r1 ldr r0, [sp, #0x50] ldr r1, [sp, #0x54] - bl sub_0208E3EC + bl _dmul mov r2, r0 mov r3, r1 ldr r0, _0208BA84 ; =0xAF25DE2C ldr r1, _0208BA88 ; =0x3F11566A - bl sub_0208DEC8 + bl _dadd mov r2, r0 mov r3, r1 ldr r0, [sp, #0x50] ldr r1, [sp, #0x54] - bl sub_0208E3EC + bl _dmul mov r2, r0 mov r3, r1 ldr r0, _0208BA8C ; =0x16BEBD93 ldr r1, _0208BA90 ; =0xBF66C16C - bl sub_0208DEC8 + bl _dadd mov r2, r0 mov r3, r1 ldr r0, [sp, #0x50] ldr r1, [sp, #0x54] - bl sub_0208E3EC + bl _dmul mov r2, r0 mov r3, r1 ldr r0, _0208BA94 ; =0x5555553E ldr r1, _0208BA98 ; =0x3FC55555 - bl sub_0208DEC8 + bl _dadd mov r2, r0 mov r3, r1 ldr r0, [sp, #0x50] ldr r1, [sp, #0x54] - bl sub_0208E3EC + bl _dmul mov r2, r0 mov r3, r1 ldr r0, [sp, #0x78] ldr r1, [sp, #0x7c] - bl sub_0208E904 + bl _dsub mov r2, r0 str r2, [sp, #0x58] mov r3, r1 str r3, [sp, #0x5c] ldr r0, [sp, #0x78] ldr r1, [sp, #0x7c] - bl sub_0208E3EC + bl _dmul mov r7, r0 mov sl, r1 ldr r0, [sp, #0x58] ldr r1, [sp, #0x5c] mov r2, #0 mov r3, #0x40000000 - bl sub_0208E904 + bl _dsub mov r2, r0 mov r0, r7 mov r3, r1 mov r1, sl - bl sub_020902AC + bl _ddiv mov r7, r0 mov sl, r1 ldr r0, [sp, #0x78] ldr r1, [sp, #0x7c] mov r2, r8 mov r3, sb - bl sub_0208E3EC + bl _dmul mov r2, r0 mov r0, r8 mov r3, r1 mov r1, sb - bl sub_0208DEC8 + bl _dadd mov r2, r0 mov r0, r7 mov r3, r1 mov r1, sl - bl sub_0208E904 + bl _dsub ldr r2, [sp, #0x78] ldr r3, [sp, #0x7c] - bl sub_0208E904 + bl _dsub mov r3, r1 mov r2, r0 ldr r1, _0208B9B0 ; =0x3FF00000 mov r0, #0 - bl sub_0208E904 + bl _dsub add r3, r1, r4, lsl #20 mov r2, r3, asr #0x14 str r0, [sp, #0x78] @@ -28609,7 +28609,7 @@ _0208C568: ldr r3, [sp, #0x7c] mov r0, r6 mov r1, r5 - bl sub_0208E3EC + bl _dmul add sp, sp, #0x80 ldmia sp!, {r3, r4, r5, r6, r7, r8, sb, sl, fp, lr} add sp, sp, #0x10 @@ -28669,7 +28669,7 @@ _0208C61C: ldr r0, [sp, #8] ldr r1, [sp, #0xc] ldr r3, _0208C684 ; =0x43500000 - bl sub_0208E3EC + bl _dmul mvn r2, #0x35 str r0, [sp, #8] str r1, [sp, #0xc] @@ -28711,7 +28711,7 @@ sub_0208C690: ; 0x0208C690 ldr r2, [sp, #8] ldr r3, [sp, #0xc] mov r1, r0 - bl sub_0208F0B4 + bl _deq bne _0208C6DC _0208C6C8: ldr r0, [sp, #8] @@ -28737,7 +28737,7 @@ _0208C6DC: ldr r1, [sp, #0xc] ldr r3, _0208C8B4 ; =0x43500000 mov r2, #0 - bl sub_0208E3EC + bl _dmul mov r3, r1 ldr r1, _0208C8B0 ; =0x7FF00000 ldr ip, _0208C8B8 ; =0xFFFF3CB0 @@ -28751,7 +28751,7 @@ _0208C6DC: bge _0208C768 ldr r0, _0208C8BC ; =0xC2F8F359 ldr r1, _0208C8C0 ; =0x01A56E1F - bl sub_0208E3EC + bl _dmul ldmia sp!, {r4, lr} add sp, sp, #0x10 bx lr @@ -28763,7 +28763,7 @@ _0208C768: ldr r1, [sp, #0xc] mov r2, r0 mov r3, r1 - bl sub_0208DEC8 + bl _dadd ldmia sp!, {r4, lr} add sp, sp, #0x10 bx lr @@ -28781,7 +28781,7 @@ _0208C794: mov r3, r1 ldr r0, _0208C8C8 ; =0x8800759C ldr r1, _0208C8CC ; =0x7E37E43C - bl sub_0208E3EC + bl _dmul ldmia sp!, {r4, lr} add sp, sp, #0x10 bx lr @@ -28812,7 +28812,7 @@ _0208C800: mov r3, r1 ldr r0, _0208C8C8 ; =0x8800759C ldr r1, _0208C8CC ; =0x7E37E43C - bl sub_0208E3EC + bl _dmul ldmia sp!, {r4, lr} add sp, sp, #0x10 bx lr @@ -28826,7 +28826,7 @@ _0208C84C: mov r3, r1 ldr r0, _0208C8BC ; =0xC2F8F359 ldr r1, _0208C8C0 ; =0x01A56E1F - bl sub_0208E3EC + bl _dmul ldmia sp!, {r4, lr} add sp, sp, #0x10 bx lr @@ -28839,7 +28839,7 @@ _0208C880: ldr r1, _0208C8D8 ; =0x3C900000 mov r0, #0 str r3, [sp, #0xc] - bl sub_0208E3EC + bl _dmul ldmia sp!, {r4, lr} add sp, sp, #0x10 bx lr @@ -28973,14 +28973,14 @@ _0208CA1C: strb r3, [sl, #4] mov r1, r8 mov r3, fp - bl sub_0208FE48 + bl _ull_mod add r1, sl, r7 strb r0, [r1, #5] mov r0, sb mov r1, r8 mov r2, #0xa mov r3, #0 - bl sub_0208FE3C + bl _ll_udiv mov r8, r1 mov sb, r0 cmp r8, r5 @@ -29775,7 +29775,7 @@ sub_0208D4B8: ; 0x0208D4B8 mov r2, r8 mov r3, r6 mov r5, r4, asr #0x18 - bl sub_0208F0B4 + bl _deq bne _0208D524 strb r5, [r7] mov r1, #0 @@ -29812,7 +29812,7 @@ _0208D570: mov r1, r0 mov r2, r8 mov r3, r6 - bl sub_0208E904 + bl _dsub mov r8, r0 mov r6, r1 _0208D594: @@ -29845,7 +29845,7 @@ _0208D594: mov r1, r6 mov r2, r8 bl sub_0208C690 - bl sub_0208E2E4 + bl _ll_ufrom_d mov r2, r1 mov r1, r0 add r0, sp, #0x32 @@ -29954,7 +29954,7 @@ _0208D768: ldr r0, _0208DCEC ; =_020B2FB8 ldrne r4, _0208DCE8 ; =0xBFF00000 ldr r0, [r0] - bl __extendsfdf2 + bl _f2d mov r2, r5 mov r3, r4 bl sub_0208C58C @@ -30029,7 +30029,7 @@ _0208D840: ldr r0, _0208DCEC ; =_020B2FB8 ldrne r4, _0208DCE8 ; =0xBFF00000 ldr r0, [r0] - bl __extendsfdf2 + bl _f2d mov r2, r5 mov r3, r4 bl sub_0208C58C @@ -30039,7 +30039,7 @@ _0208D8B0: add r1, sp, #0xdb ldrb r0, [r1] add r8, r1, #1 - bl sub_0208E3B0 + bl _dfltu str r0, [sp, #8] str r1, [sp, #0xc] cmp r8, r5 @@ -30068,16 +30068,16 @@ _0208D90C: ldr r2, [r3, #-8] ldr r0, [sp, #8] ldr r3, [r3, #-4] - bl sub_0208E3EC + bl _dmul mov r4, r0 mov sb, r1 mov r0, r6 - bl sub_0208E3B0 + bl _dfltu mov r2, r0 mov r3, r1 mov r0, r4 mov r1, sb - bl sub_0208DEC8 + bl _dadd cmp r6, #0 mov r6, r0 mov sl, r1 @@ -30086,7 +30086,7 @@ _0208D90C: mov r1, sb mov r2, r6 mov r3, sl - bl sub_0208F0B4 + bl _deq beq _0208D988 _0208D974: str r6, [sp, #8] @@ -30098,7 +30098,7 @@ _0208D988: cmp fp, #0 bge _0208D9CC rsb r0, fp, #0 - bl sub_0208E370 + bl _dflt mov r3, r1 mov r2, r0 ldr r1, _0208DCFC ; =0x40140000 @@ -30108,13 +30108,13 @@ _0208D988: mov r3, r1 ldr r0, [sp, #8] ldr r1, [sp, #0xc] - bl sub_020902AC + bl _ddiv str r0, [sp, #8] str r1, [sp, #0xc] b _0208DA04 _0208D9CC: mov r0, fp - bl sub_0208E370 + bl _dflt mov r3, r1 mov r2, r0 ldr r1, _0208DCFC ; =0x40140000 @@ -30124,7 +30124,7 @@ _0208D9CC: mov r3, r1 ldr r0, [sp, #8] ldr r1, [sp, #0xc] - bl sub_0208E3EC + bl _dmul str r0, [sp, #8] str r1, [sp, #0xc] _0208DA04: @@ -30318,7 +30318,7 @@ _0208DCAC: ldr r2, [sp, #8] ldr r3, [sp, #0xc] mov r1, r0 - bl sub_0208E904 + bl _dsub str r0, [sp, #8] str r1, [sp, #0xc] _0208DCD4: @@ -30488,13 +30488,16 @@ sub_0208DEBC: ; 0x0208DEBC _0208DEC4: .word sub_0208DE48 arm_func_end sub_0208DEBC - arm_func_start sub_0208DEC8 -sub_0208DEC8: ; 0x0208DEC8 + ; FP_fastI_v5t_LE.a + + ; Other names: _d_add + arm_func_start _dadd +_dadd: ; 0x0208DEC8 stmdb sp!, {r4, lr} eors ip, r1, r3 eormi r3, r3, #0x80000000 bmi _0208E914 -_0208DED8: +__dadd_start: subs ip, r0, r2 sbcs lr, r1, r3 bhs _0208DEF4 @@ -30710,10 +30713,11 @@ _0208E1BC: bx lr .align 2, 0 _0208E1DC: .word 0x7FF00000 - arm_func_end sub_0208DEC8 + arm_func_end _dadd - arm_func_start sub_0208E1E0 -sub_0208E1E0: ; 0x0208E1E0 + ; Other names: _d_dtof, _f_qtof + arm_func_start _d2f +_d2f: ; 0x0208E1E0 and r2, r1, #0x80000000 mov ip, r1, lsr #0x14 bics ip, ip, #0x800 @@ -30748,13 +30752,14 @@ _0208E250: bx lr _0208E258: orrs r3, r0, r1, lsl #12 - bne _0208E2D0 + bne __f_underflow +__f_result_zero: mov r0, r2 bx lr _0208E268: cmn ip, #0x17 beq _0208E2BC - bmi _0208E2D0 + bmi __f_underflow mov r1, r1, lsl #0xb orr r1, r1, #0x80000000 mov r3, r1, lsr #8 @@ -30775,21 +30780,23 @@ _0208E268: bx lr _0208E2BC: orr r0, r0, r1, lsl #12 +__f_very_tiny_result: movs r1, r0 mov r0, r2 addne r0, r0, #1 bx lr -_0208E2D0: +__f_underflow: mov r0, r2 bx lr _0208E2D8: mov r0, #0xff000000 orr r0, r2, r0, lsr #1 bx lr - arm_func_end sub_0208E1E0 + arm_func_end _d2f - arm_func_start sub_0208E2E4 -sub_0208E2E4: ; 0x0208E2E4 + ; Other names: _d_dtoull + arm_func_start _ll_ufrom_d +_ll_ufrom_d: ; 0x0208E2E4 tst r1, #0x80000000 bne _0208E348 ldr r2, _0208E36C ; =0x0000043E @@ -30830,13 +30837,15 @@ _0208E360: bx lr .align 2, 0 _0208E36C: .word 0x0000043E - arm_func_end sub_0208E2E4 + arm_func_end _ll_ufrom_d - arm_func_start sub_0208E370 -sub_0208E370: ; 0x0208E370 + ; Other names: _d_itod + arm_func_start _dflt +_dflt: ; 0x0208E370 ands r2, r0, #0x80000000 rsbmi r0, r0, #0 cmp r0, #0 +__d_itod_common: mov r1, #0 bxeq lr mov r3, #0x400 @@ -30850,10 +30859,11 @@ sub_0208E370: ; 0x0208E370 orr r1, r2, r1, lsr #12 orr r1, r1, r3, lsl #20 bx lr - arm_func_end sub_0208E370 + arm_func_end _dflt - arm_func_start sub_0208E3B0 -sub_0208E3B0: ; 0x0208E3B0 + ; Other names: _d_utod + arm_func_start _dfltu +_dfltu: ; 0x0208E3B0 cmp r0, #0 mov r1, #0 bxeq lr @@ -30870,10 +30880,11 @@ _0208E3D4: mov r1, r1, lsr #0xc orr r1, r1, r3, lsl #20 bx lr - arm_func_end sub_0208E3B0 + arm_func_end _dfltu - arm_func_start sub_0208E3EC -sub_0208E3EC: ; 0x0208E3EC + ; Other names: _d_mul + arm_func_start _dmul +_dmul: ; 0x0208E3EC stmdb sp!, {r4, r5, r6, r7, lr} eor lr, r1, r3 and lr, lr, #0x80000000 @@ -31112,10 +31123,10 @@ _0208E73C: bx lr .align 2, 0 _0208E74C: .word 0x7FF00000 - arm_func_end sub_0208E3EC + arm_func_end _dmul - arm_func_start sub_0208E750 -sub_0208E750: ; 0x0208E750 + arm_func_start _dsqrt +_dsqrt: ; 0x0208E750 stmdb sp!, {r4, r5, r6, lr} ldr r2, _0208E8E0 ; =0x7FF00000 cmp r1, r2 @@ -31231,18 +31242,19 @@ _0208E8C4: _0208E8E0: .word 0x7FF00000 _0208E8E4: .word 0x7FF80000 _0208E8E8: .word _022BCA70 - arm_func_end sub_0208E750 + arm_func_end _dsqrt _0208E8EC: .byte 0x03, 0x10, 0x21, 0xE0 .byte 0x03, 0x30, 0x21, 0xE0, 0x03, 0x10, 0x21, 0xE0, 0x02, 0x00, 0x20, 0xE0, 0x02, 0x20, 0x20, 0xE0 .byte 0x02, 0x00, 0x20, 0xE0 - arm_func_start sub_0208E904 -sub_0208E904: ; 0x0208E904 + ; Other names: _d_sub + arm_func_start _dsub +_dsub: ; 0x0208E904 stmdb sp!, {r4, lr} eors ip, r1, r3 eormi r3, r3, #0x80000000 - bmi _0208DED8 + bmi __dadd_start _0208E914: subs ip, r0, r2 sbcs lr, r1, r3 @@ -31503,14 +31515,15 @@ _0208ECA4: bx lr .align 2, 0 _0208ECB4: .word 0x7FF00000 - arm_func_end sub_0208E904 + arm_func_end _dsub - arm_func_start __addsf3 -__addsf3: ; 0x0208ECB8 + ; Other names: _f_add + arm_func_start _fadd +_fadd: ; 0x0208ECB8 eors r2, r0, r1 eormi r1, r1, #0x80000000 - bmi _0208FA10 -_0208ECC4: + bmi __fsub_start +__fadd_start: subs ip, r0, r1 sublo r0, r0, ip addlo r1, r1, ip @@ -31659,7 +31672,7 @@ _0208EEC0: _0208EECC: mvn r0, #0x80000000 bx lr - arm_func_end __addsf3 + arm_func_end _fadd arm_func_start sub_0208EED4 sub_0208EED4: ; 0x0208EED4 @@ -31667,8 +31680,9 @@ sub_0208EED4: ; 0x0208EED4 bx lr arm_func_end sub_0208EED4 - arm_func_start sub_0208EEDC -sub_0208EEDC: ; 0x0208EEDC + ; Other names: _d_fge + arm_func_start _dgeq +_dgeq: ; 0x0208EEDC mov ip, #0x200000 cmn ip, r1, lsl #1 bhs _0208EF50 @@ -31712,10 +31726,11 @@ _0208EF64: cmp r2, #0 bhi _0208EF0C b _0208EEF0 - arm_func_end sub_0208EEDC + arm_func_end _dgeq - arm_func_start sub_0208EF74 -sub_0208EF74: ; 0x0208EF74 + ; Other names: _d_fle + arm_func_start _dleq +_dleq: ; 0x0208EF74 mov ip, #0x200000 cmn ip, r1, lsl #1 bhs _0208EFF4 @@ -31763,10 +31778,11 @@ _0208F008: cmp r2, #0 bhi _0208EFA4 b _0208EF88 - arm_func_end sub_0208EF74 + arm_func_end _dleq - arm_func_start sub_0208F018 -sub_0208F018: ; 0x0208F018 + ; Other names: _d_flt + arm_func_start _dls +_dls: ; 0x0208F018 mov ip, #0x200000 cmn ip, r1, lsl #1 bhs _0208F090 @@ -31812,10 +31828,11 @@ _0208F0A4: cmp r2, #0 bhi _0208F048 b _0208F02C - arm_func_end sub_0208F018 + arm_func_end _dls - arm_func_start sub_0208F0B4 -sub_0208F0B4: ; 0x0208F0B4 + ; Other names: _d_feq + arm_func_start _deq +_deq: ; 0x0208F0B4 mov ip, #0x200000 cmn ip, r1, lsl #1 bhs _0208F11C @@ -31856,10 +31873,11 @@ _0208F130: cmp r2, #0 bhi _0208F0E4 b _0208F0C8 - arm_func_end sub_0208F0B4 + arm_func_end _deq - arm_func_start sub_0208F140 -sub_0208F140: ; 0x0208F140 + ; Other names: _d_fne + arm_func_start _dneq +_dneq: ; 0x0208F140 mov ip, #0x200000 cmn ip, r1, lsl #1 bhs _0208F1A8 @@ -31900,10 +31918,11 @@ _0208F1BC: cmp r2, #0 bhi _0208F170 b _0208F154 - arm_func_end sub_0208F140 + arm_func_end _dneq - arm_func_start sub_0208F1CC -sub_0208F1CC: ; 0x0208F1CC + ; Other names: _f_flt + arm_func_start _fls +_fls: ; 0x0208F1CC mov r3, #0xff000000 cmp r3, r0, lsl #1 cmphs r3, r1, lsl #1 @@ -31928,13 +31947,14 @@ _0208F214: orr ip, ip, #0x20000000 msr cpsr_f, ip bx lr - arm_func_end sub_0208F1CC + arm_func_end _fls _0208F228: .byte 0x01, 0x00, 0x20, 0xE0, 0x01, 0x10, 0x20, 0xE0 .byte 0x01, 0x00, 0x20, 0xE0 - arm_func_start __divsf3 -__divsf3: ; 0x0208F234 + ; Other names: _f_div + arm_func_start _fdiv +_fdiv: ; 0x0208F234 stmdb sp!, {lr} mov ip, #0xff ands r3, ip, r0, lsr #23 @@ -32147,10 +32167,11 @@ _0208F5E0: mov r0, lr ldmia sp!, {lr} bx lr - arm_func_end __divsf3 + arm_func_end _fdiv - arm_func_start __extendsfdf2 -__extendsfdf2: ; 0x0208F5EC + ; Other names: _f_ftod + arm_func_start _f2d +_f2d: ; 0x0208F5EC and r2, r0, #0x80000000 mov ip, r0, lsr #0x17 mov r3, r0, lsl #9 @@ -32190,10 +32211,11 @@ _0208F660: bx lr .align 2, 0 _0208F66C: .word 0x7FF00000 - arm_func_end __extendsfdf2 + arm_func_end _f2d - arm_func_start __fixsfsi -__fixsfsi: ; 0x0208F670 + ; Other names: _f_ftoi + arm_func_start _ffix +_ffix: ; 0x0208F670 bic r1, r0, #0x80000000 mov r2, #0x9e subs r2, r2, r1, lsr #23 @@ -32208,13 +32230,15 @@ _0208F698: mvn r0, r0, asr #31 add r0, r0, #0x80000000 bx lr - arm_func_end __fixsfsi + arm_func_end _ffix - arm_func_start __floatsisf -__floatsisf: ; 0x0208F6A4 + ; Other names: _f_itof + arm_func_start _fflt +_fflt: ; 0x0208F6A4 ands r2, r0, #0x80000000 rsbmi r0, r0, #0 cmp r0, #0 +__f_itof_common: bxeq lr clz r3, r0 movs r0, r0, lsl r3 @@ -32230,11 +32254,13 @@ __floatsisf: ; 0x0208F6A4 andeqs r3, r0, #1 addne r0, r0, #1 bx lr - arm_func_end __floatsisf + arm_func_end _fflt - arm_func_start __floatunsisf -__floatunsisf: ; 0x0208F6EC + ; Other names: _f_utof + arm_func_start _ffltu +_ffltu: ; 0x0208F6EC cmp r0, #0 +__f_utof_common: bxeq lr mov r3, #0x9e bmi _0208F708 @@ -32253,10 +32279,11 @@ _0208F708: andeqs r1, r0, #1 addne r0, r0, #1 bx lr - arm_func_end __floatunsisf + arm_func_end _ffltu - arm_func_start __mulsf3 -__mulsf3: ; 0x0208F734 + ; Other names: _f_mul + arm_func_start _fmul +_fmul: ; 0x0208F734 eor r2, r0, r1 and r2, r2, #0x80000000 mov ip, #0xff @@ -32293,27 +32320,27 @@ _0208F7B0: cmp r3, #0 beq _0208F804 movs r0, r0, lsl #1 - bne _0208F8D8 + bne __f_result_x_NaN mov ip, r1, lsr #0x17 mov r1, r1, lsl #9 ands ip, ip, #0xff beq _0208F7E4 cmp ip, #0xff - blt _0208F8CC + blt __f_result_INF cmp r1, #0 - beq _0208F8CC - b _0208F8D8 + beq __f_result_INF + b __f_result_x_NaN _0208F7E4: cmp r1, #0 - beq _0208F8E0 - b _0208F8CC + beq __f_result_invalid + b __f_result_INF _0208F7F0: cmp ip, #0 beq _0208F860 _0208F7F8: movs r1, r1, lsl #1 - bne _0208F8D8 - b _0208F8CC + bne __f_result_x_NaN + b __f_result_INF _0208F804: movs r0, r0, lsl #1 beq _0208F83C @@ -32337,8 +32364,8 @@ _0208F83C: cmp ip, #0xff blt _0208F90C cmp r1, #0 - beq _0208F8E0 - b _0208F8D8 + beq __f_result_invalid + b __f_result_x_NaN _0208F860: movs r1, r1, lsl #1 beq _0208F90C @@ -32369,14 +32396,14 @@ _0208F87C: _0208F8C4: mov r0, r0, lsl #1 b _0208F8F4 -_0208F8CC: +__f_result_INF: mov r0, #0xff000000 orr r0, r2, r0, lsr #1 bx lr -_0208F8D8: +__f_result_x_NaN: mvn r0, #0x80000000 bx lr -_0208F8E0: +__f_result_invalid: mvn r0, #0x80000000 bx lr _0208F8E8: @@ -32394,7 +32421,7 @@ _0208F904: _0208F90C: mov r0, r2 bx lr - arm_func_end __mulsf3 + arm_func_end _fmul arm_func_start sqrtf sqrtf: ; 0x0208F914 @@ -32467,12 +32494,13 @@ _0208F9F8: .byte 0x01, 0x00, 0x20, 0xE0, 0x01, 0x10, 0x20, 0xE0 .byte 0x01, 0x00, 0x20, 0xE0 - arm_func_start __subsf3 -__subsf3: ; 0x0208FA04 + ; Other names: _f_sub + arm_func_start _fsub +_fsub: ; 0x0208FA04 eors r2, r0, r1 eormi r1, r1, #0x80000000 - bmi _0208ECC4 -_0208FA10: + bmi __fadd_start +__fsub_start: subs ip, r0, r1 eorlo ip, ip, #0x80000000 sublo r0, r0, ip @@ -32648,18 +32676,19 @@ _0208FC6C: _0208FC74: mvn r0, #0x80000000 bx lr - arm_func_end __subsf3 + arm_func_end _fsub - arm_func_start sub_0208FC7C -sub_0208FC7C: ; 0x0208FC7C + arm_func_start _ll_mod +_ll_mod: ; 0x0208FC7C stmdb sp!, {r4, r5, r6, r7, fp, ip, lr} mov r4, r1 orr r4, r4, #1 b _0208FC9C - arm_func_end sub_0208FC7C + arm_func_end _ll_mod - arm_func_start sub_0208FC8C -sub_0208FC8C: ; 0x0208FC8C + ; Other names: _ll_div + arm_func_start _ll_sdiv +_ll_sdiv: ; 0x0208FC8C stmdb sp!, {r4, r5, r6, r7, fp, ip, lr} eor r4, r1, r3 mov r4, r4, asr #1 @@ -32787,17 +32816,18 @@ _0208FE28: blt _0208FE14 ldmia sp!, {r4, r5, r6, r7, fp, ip, lr} bx lr - arm_func_end sub_0208FC8C + arm_func_end _ll_sdiv - arm_func_start sub_0208FE3C -sub_0208FE3C: ; 0x0208FE3C + ; Other names: _ull_div + arm_func_start _ll_udiv +_ll_udiv: ; 0x0208FE3C stmdb sp!, {r4, r5, r6, r7, fp, ip, lr} mov r4, #0 b _0208FE50 - arm_func_end sub_0208FE3C + arm_func_end _ll_udiv - arm_func_start sub_0208FE48 -sub_0208FE48: ; 0x0208FE48 + arm_func_start _ull_mod +_ull_mod: ; 0x0208FE48 stmdb sp!, {r4, r5, r6, r7, fp, ip, lr} mov r4, #1 _0208FE50: @@ -32809,16 +32839,17 @@ _0208FE60: orrs r5, r1, r3 bne _0208FD00 mov r1, r2 - bl __udivsi3_no_zero_check + bl _u32_div_not_0_f cmp r4, #0 movne r0, r1 mov r1, #0 ldmia sp!, {r4, r5, r6, r7, fp, ip, lr} bx lr - arm_func_end sub_0208FE48 + arm_func_end _ull_mod - arm_func_start sub_0208FE84 -sub_0208FE84: ; 0x0208FE84 + ; Other names: _ull_mul + arm_func_start _ll_mul +_ll_mul: ; 0x0208FE84 stmdb sp!, {r4, r5, lr} umull r5, r4, r0, r2 mla r4, r0, r3, r4 @@ -32827,7 +32858,7 @@ sub_0208FE84: ; 0x0208FE84 mov r0, r5 ldmia sp!, {r4, r5, lr} bx lr - arm_func_end sub_0208FE84 + arm_func_end _ll_mul arm_func_start _s32_div_f _s32_div_f: ; 0x0208FEA4 @@ -32971,8 +33002,8 @@ _u32_div_f: ; 0x020900B0 bxeq lr arm_func_end _u32_div_f - arm_func_start __udivsi3_no_zero_check -__udivsi3_no_zero_check: ; 0x020900B8 + arm_func_start _u32_div_not_0_f +_u32_div_not_0_f: ; 0x020900B8 cmp r0, r1 movlo r1, r0 movlo r0, #0 @@ -33092,13 +33123,21 @@ __udivsi3_no_zero_check: ; 0x020900B8 adcs r0, r0, r0 mov r1, r3 bx lr - arm_func_end __udivsi3_no_zero_check -_02090294: - .byte 0x03, 0x10, 0x21, 0xE0, 0x03, 0x30, 0x21, 0xE0, 0x03, 0x10, 0x21, 0xE0 - .byte 0x02, 0x00, 0x20, 0xE0, 0x02, 0x20, 0x20, 0xE0, 0x02, 0x00, 0x20, 0xE0 + arm_func_end _u32_div_not_0_f - arm_func_start sub_020902AC -sub_020902AC: ; 0x020902AC + arm_func_start _drdiv +_drdiv: ; 0x02090294 + eor r1, r1, r3 + eor r3, r1, r3 + eor r1, r1, r3 + eor r0, r0, r2 + eor r2, r0, r2 + eor r0, r0, r2 + arm_func_end _drdiv + + ; Other names: _d_div + arm_func_start _ddiv +_ddiv: ; 0x020902AC stmdb sp!, {r4, r5, r6, lr} ldr lr, _020907EC ; =0x00000FFE eor r4, r1, r3 @@ -33417,12 +33456,12 @@ _020907DC: bx lr .align 2, 0 _020907EC: .word 0x00000FFE - arm_func_end sub_020902AC + arm_func_end _ddiv - arm_func_start sub_020907F0 -sub_020907F0: ; 0x020907F0 + arm_func_start _fp_init +_fp_init: ; 0x020907F0 bx lr - arm_func_end sub_020907F0 + arm_func_end _fp_init arm_func_start sub_020907F4 sub_020907F4: ; 0x020907F4 diff --git a/asm/overlay_00.s b/asm/overlay_00.s index 051aeb25..7de5b2ad 100644 --- a/asm/overlay_00.s +++ b/asm/overlay_00.s @@ -28381,7 +28381,7 @@ _022D42C4: bl ov00_022D419C ldr r2, [sp, #0x18] ldr r3, [sp, #0x10] - bl sub_0208FE3C + bl _ll_udiv mov r5, r0 ldr r0, _022D4394 ; =0x0000FFFF cmp r5, r0 @@ -34667,7 +34667,7 @@ ov00_022D9540: ; 0x022D9540 orr r1, r1, r3, lsr #26 mov r0, r3, lsl #6 mov r3, #0 - bl sub_0208FE3C + bl _ll_udiv cmp r1, #0 cmpeq r0, #0x12c blo _022D95D0 @@ -34737,7 +34737,7 @@ ov00_022D962C: ; 0x022D962C orr r1, r1, r3, lsr #26 mov r0, r3, lsl #6 mov r3, #0 - bl sub_0208FE3C + bl _ll_udiv cmp r1, #0 cmpeq r0, #0x96 bhs _022D9688 @@ -34821,7 +34821,7 @@ ov00_022D9754: ; 0x022D9754 orr r1, r1, r3, lsr #26 mov r0, r3, lsl #6 mov r3, #0 - bl sub_0208FE3C + bl _ll_udiv cmp r1, #0 cmpeq r0, #0x96 bhs _022D97B4 @@ -35226,7 +35226,7 @@ _022D9CA0: orr r1, r1, r3, lsr #26 mov r0, r3, lsl #6 mov r3, #0 - bl sub_0208FE3C + bl _ll_udiv cmp r1, #0 cmpeq r0, #0xa movlo r0, #0xc @@ -36453,7 +36453,7 @@ _022DACF4: mov r1, r0, lsl #6 orr r1, r1, r5, lsr #26 mov r0, r5, lsl #6 - bl sub_0208FE3C + bl _ll_udiv ldr r2, _022DAF34 ; =0x00000BB8 cmp r1, #0 cmpeq r0, r2 @@ -38253,7 +38253,7 @@ _022DC2BC: mov r0, r2, lsl #6 ldr r2, _022DC428 ; =0x000082EA mov r3, #0 - bl sub_0208FE3C + bl _ll_udiv cmp r1, #0 ldr r7, _022DC42C ; =0x00001388 cmpeq r0, r7 @@ -38296,7 +38296,7 @@ _022DC358: mov r0, r2, lsl #6 mov r2, r6 mov r3, fp - bl sub_0208FE3C + bl _ll_udiv cmp r1, r4 cmpeq r0, r7 blo _022DC30C @@ -39731,7 +39731,7 @@ _022DD7C4: orr r1, r1, r2, lsr #26 mov r0, r2, lsl #6 ldr r2, _022DD88C ; =0x000082EA - bl sub_0208FE3C + bl _ll_udiv cmp r1, r8, asr #31 cmpeq r0, r8 bls _022DD820 @@ -46017,7 +46017,7 @@ _022E2BD0: mov r1, r0, lsl #6 orr r1, r1, lr, lsr #26 mov r0, lr, lsl #6 - bl sub_0208FE3C + bl _ll_udiv ldr r2, _022E2C50 ; =0x0000EA60 cmp r1, #0 cmpeq r0, r2 @@ -46497,7 +46497,7 @@ _022E3244: mov r1, r0, lsl #6 orr r1, r1, lr, lsr #26 mov r0, lr, lsl #6 - bl sub_0208FE3C + bl _ll_udiv ldr r2, _022E3370 ; =0x00002710 cmp r1, #0 cmpeq r0, r2 @@ -47486,7 +47486,7 @@ ov00_022E3FA4: ; 0x022E3FA4 orr r1, r1, r3, lsr #26 mov r0, r3, lsl #6 mov r3, r4 - bl sub_0208FE3C + bl _ll_udiv cmp r1, #0 cmpeq r0, #0x12c blo _022E4020 @@ -49066,7 +49066,7 @@ _022E554C: mov r0, r2, lsl #6 ldr r2, _022E5EE0 ; =0x000082EA mov r3, #0 - bl sub_0208FE3C + bl _ll_udiv cmp r1, #0 ldr r1, [r4, #0x1c8] cmpeq r0, r1 @@ -49131,7 +49131,7 @@ _022E5638: mov r0, r2, lsl #6 ldr r2, _022E5EE0 ; =0x000082EA mov r3, #0 - bl sub_0208FE3C + bl _ll_udiv cmp r1, #0 cmpeq r0, r5 blo _022E5C18 @@ -49180,7 +49180,7 @@ _022E5718: orr r1, r1, r3, lsr #26 mov r0, r3, lsl #6 mov r3, #0 - bl sub_0208FE3C + bl _ll_udiv cmp r1, #0 cmpeq r0, r5 bls _022E5C18 @@ -49215,7 +49215,7 @@ _022E5788: orr r1, r1, r3, lsr #26 mov r0, r3, lsl #6 mov r3, #0 - bl sub_0208FE3C + bl _ll_udiv ldr r2, _022E5EEC ; =0x000061A8 cmp r1, #0 cmpeq r0, r2 @@ -49249,7 +49249,7 @@ _022E5814: orr r1, r1, r3, lsr #26 mov r0, r3, lsl #6 mov r3, #0 - bl sub_0208FE3C + bl _ll_udiv ldr r2, _022E5EF0 ; =0x00001770 cmp r1, #0 cmpeq r0, r2 @@ -49317,7 +49317,7 @@ _022E590C: orr r1, r1, r3, lsr #26 mov r0, r3, lsl #6 mov r3, #0 - bl sub_0208FE3C + bl _ll_udiv ldr r2, _022E5EF0 ; =0x00001770 cmp r1, #0 cmpeq r0, r2 @@ -49340,7 +49340,7 @@ _022E5974: orr r1, r1, r3, lsr #26 mov r0, r3, lsl #6 mov r3, #0 - bl sub_0208FE3C + bl _ll_udiv ldr r2, _022E5EF4 ; =0x00004A38 cmp r1, #0 cmpeq r0, r2 @@ -49377,7 +49377,7 @@ _022E5A00: orr r1, r1, r3, lsr #26 mov r0, r3, lsl #6 mov r3, #0 - bl sub_0208FE3C + bl _ll_udiv ldr r2, _022E5EF8 ; =0x00007530 cmp r1, #0 cmpeq r0, r2 @@ -49451,7 +49451,7 @@ _022E5B20: orr r1, r1, r3, lsr #26 mov r0, r3, lsl #6 mov r3, #0 - bl sub_0208FE3C + bl _ll_udiv ldr r2, _022E5EF8 ; =0x00007530 cmp r1, #0 cmpeq r0, r2 @@ -49527,7 +49527,7 @@ _022E5C38: orr r1, r1, r3, lsr #26 mov r0, r3, lsl #6 mov r3, #0 - bl sub_0208FE3C + bl _ll_udiv ldr r2, _022E5F00 ; =0x00002710 cmp r1, #0 cmpeq r0, r2 @@ -49633,7 +49633,7 @@ _022E5DD4: orr r1, r1, r3, lsr #26 mov r0, r3, lsl #6 mov r3, #0 - bl sub_0208FE3C + bl _ll_udiv ldr r2, _022E5EE8 ; =0x00000BB8 cmp r1, #0 cmpeq r0, r2 @@ -52689,7 +52689,7 @@ _022E8934: orr r1, r1, r3, lsr #26 mov r0, r3, lsl #6 mov r3, #0 - bl sub_0208FE3C + bl _ll_udiv ldr r2, [r4, #4] cmp r1, #0 cmpeq r0, r2 @@ -54931,7 +54931,7 @@ _022EA87C: orr r1, r1, r3, lsr #26 mov r0, r3, lsl #6 mov r3, #0 - bl sub_0208FE3C + bl _ll_udiv mov r4, r0 mov r5, r1 b _022EA8C8 @@ -55166,7 +55166,7 @@ _022EABB0: orr r1, r1, r3, lsr #26 mov r0, r3, lsl #6 mov r3, #0 - bl sub_0208FE3C + bl _ll_udiv mov r2, r0, lsr #1 mov r0, r1, lsr #1 cmp r0, #0 @@ -55183,7 +55183,7 @@ _022EABB0: orr r1, r1, r3, lsr #26 mov r0, r3, lsl #6 mov r3, #0 - bl sub_0208FE3C + bl _ll_udiv mov r3, r0, lsr #1 mov r0, #0x12c orr r3, r3, r1, lsl #31 @@ -55295,7 +55295,7 @@ _022EAD90: orr r1, r1, r3, lsr #26 mov r0, r3, lsl #6 mov r3, #0 - bl sub_0208FE3C + bl _ll_udiv mov r4, r0 mov r5, r1 b _022EADDC @@ -55714,7 +55714,7 @@ _022EB328: orr r1, r1, r3, lsr #26 mov r0, r3, lsl #6 mov r3, #0 - bl sub_0208FE3C + bl _ll_udiv ldr r2, _022EB61C ; =0x00001770 mul r2, r4, r2 cmp r1, r2, asr #31 @@ -55816,7 +55816,7 @@ _022EB474: orr r1, r1, r3, lsr #26 mov r0, r3, lsl #6 mov r3, #0 - bl sub_0208FE3C + bl _ll_udiv ldr r2, [r4, #4] cmp r1, #0 cmpeq r0, r2 @@ -55838,7 +55838,7 @@ _022EB4E8: orr r1, r1, r3, lsr #26 mov r0, r3, lsl #6 mov r3, #0 - bl sub_0208FE3C + bl _ll_udiv ldr r2, [r4, #4] cmp r1, #0 cmpeq r0, r2, lsr #2 @@ -57318,7 +57318,7 @@ _022EC78C: orr r1, r1, r2, lsr #26 ldr r2, _022EC8EC ; =0x000082EA mov r3, #0 - bl sub_0208FE3C + bl _ll_udiv ldr r1, [r6, #0x2c] cmp r0, r1 bls _022EC824 @@ -58932,7 +58932,7 @@ _022EDCAC: mla r1, lr, sb, r1 ldr r2, _022EDD54 ; =0x000082EA mov r3, r6 - bl sub_0208FE3C + bl _ll_udiv mov r2, r6 cmp r1, r2 cmpeq r0, r8 @@ -62891,7 +62891,7 @@ _022F11E0: mov r1, r8 mov r2, r7 mov r3, r6 - bl sub_0208FE3C + bl _ll_udiv umull r3, r2, r0, r7 mla r2, r0, r6, r2 add r0, r0, #0x30 @@ -67990,7 +67990,7 @@ ov00_022F5478: ; 0x022F5478 ldr r2, _022F54A8 ; =0x01FF6210 mov r0, r0, lsl #6 mov r3, #0 - bl sub_0208FE3C + bl _ll_udiv cmp r4, #0 strne r0, [r4] ldmia sp!, {r4, pc} @@ -68099,7 +68099,7 @@ ov00_022F5594: ; 0x022F5594 ldr r2, _022F55B8 ; =0x000082EA mov r0, r0, lsl #6 mov r3, #0 - bl sub_0208FE3C + bl _ll_udiv ldmia sp!, {r3, pc} .align 2, 0 _022F55B8: .word 0x000082EA @@ -68116,7 +68116,7 @@ ov00_022F55BC: ; 0x022F55BC mov r0, ip mov r1, r3 mov r3, #0 - bl sub_0208FE3C + bl _ll_udiv ldmia sp!, {r3, pc} .align 2, 0 _022F55E8: .word 0x000082EA @@ -69635,7 +69635,7 @@ _022F6994: mov r0, sb mov r1, ip mov r3, #0 - bl sub_0208FE3C + bl _ll_udiv mov sb, r0 mov r0, #0 mov ip, r1 @@ -86024,7 +86024,7 @@ _02304F20: beq _02304FBC add r0, sp, #0xec bl sub_0208AE08 - bl sub_0208E1E0 + bl _d2f str r0, [sp, #0x1a4] _02304FBC: ldr r1, _023054A0 ; =ov00_0231B520 @@ -86038,7 +86038,7 @@ _02304FBC: beq _02304FF0 add r0, sp, #0xec bl sub_0208AE08 - bl sub_0208E1E0 + bl _d2f str r0, [sp, #0x1a8] _02304FF0: ldr r1, _023054A4 ; =ov00_0231B528 @@ -93931,7 +93931,7 @@ _0230BE58: mov r3, r0 ldmia r5, {r0, r1} ldmia r3, {r2, r3} - bl sub_0208DEC8 + bl _dadd bl ov00_0230C184 mov r1, r0 mov r0, r4 @@ -93973,7 +93973,7 @@ _0230BEE4: ldr r1, [r0, #4] mov r0, ip ldmia r5, {r2, r3} - bl sub_0208E904 + bl _dsub bl ov00_0230C184 mov r1, r0 mov r0, r4 @@ -94011,7 +94011,7 @@ _0230BF68: mov r3, r0 ldmia r5, {r0, r1} ldmia r3, {r2, r3} - bl sub_0208E3EC + bl _dmul bl ov00_0230C184 mov r1, r0 mov r0, r4 @@ -94050,7 +94050,7 @@ _0230BFE8: ldr r1, [r0, #4] mov r0, ip ldmia r5, {r2, r3} - bl sub_020902AC + bl _ddiv bl ov00_0230C184 mov r1, r0 mov r0, r4 @@ -94127,22 +94127,22 @@ _0230C0F0: add r6, r1, #1 mov r0, r6 str r6, [r4, #8] - bl sub_0208E370 + bl _dflt ldmia r5, {r2, r3} - bl sub_0208E3EC + bl _dmul mov r2, r0 mov r3, r1 ldmia r7, {r0, r1} - bl sub_0208DEC8 + bl _dadd mov r5, r0 mov r0, r6 mov r6, r1 - bl sub_0208E370 + bl _dflt mov r2, r0 mov r3, r1 mov r0, r5 mov r1, r6 - bl sub_020902AC + bl _ddiv bl ov00_0230C184 mov r1, r0 mov r0, r4 diff --git a/asm/overlay_01.s b/asm/overlay_01.s index 31396f4f..1d1e99c0 100644 --- a/asm/overlay_01.s +++ b/asm/overlay_01.s @@ -12135,25 +12135,25 @@ _02333464: mov r0, r6 mov r1, r5 mov r3, #0 - bl sub_0208FE48 + bl _ull_mod str r0, [sp, #0x90] ldr r2, _02333668 ; =0x00002710 mov r0, r6 mov r1, r5 mov r3, #0 - bl sub_0208FE3C + bl _ll_udiv ldr r2, _02333668 ; =0x00002710 mov r3, #0 - bl sub_0208FE48 + bl _ull_mod str r0, [sp, #0x8c] ldr r2, _0233366C ; =0x05F5E100 mov r1, r5 mov r0, r6 mov r3, #0 - bl sub_0208FE3C + bl _ll_udiv ldr r2, _02333668 ; =0x00002710 mov r3, #0 - bl sub_0208FE48 + bl _ull_mod str r0, [sp, #0x88] add r0, sp, #0x400 ldr r1, _02333670 ; =0x00000217 @@ -14982,7 +14982,7 @@ ov01_02335848: ; 0x02335848 mov r3, r5 mov r6, #0x64 mov sb, r5 - bl sub_0208FE48 + bl _ull_mod mov r7, r0 mov r8, r1 mov r4, r5 @@ -14992,7 +14992,7 @@ _023358A4: mov r1, r8 mov r2, r6 mov r3, sb - bl sub_0208FE3C + bl _ll_udiv ldr r1, _0233592C ; =ov01_0233C1A8 mov r3, sb ldr r2, [r1] @@ -15001,14 +15001,14 @@ _023358A4: strb r0, [r2, #0xe0] mov r0, r7 mov r2, r6 - bl sub_0208FE48 + bl _ull_mod mov r7, r0 mov r8, r1 mov r0, r6 mov r1, sb mov r2, #0xa mov r3, #0 - bl sub_0208FE3C + bl _ll_udiv mov r6, r0 add r0, r5, #1 mov r0, r0, lsl #0x10 @@ -15266,7 +15266,7 @@ _02335C90: umull r2, r3, r5, r4 mla r3, sb, r4, r3 mov r7, #0 - bl sub_0208FE48 + bl _ull_mod mov r6, r0 mov r8, r1 ldr sl, _02335F58 ; =ov01_0233C1A8 @@ -15278,7 +15278,7 @@ _02335CBC: mov r1, r8 mov r2, r5 mov r3, sb - bl sub_0208FE3C + bl _ll_udiv ldr r2, [sl] mov r1, r8 add r2, r2, r7 @@ -15286,14 +15286,14 @@ _02335CBC: mov r0, r6 mov r2, r5 mov r3, sb - bl sub_0208FE48 + bl _ull_mod mov r6, r0 mov r8, r1 mov r0, r5 mov r1, sb mov r2, #0xa mov r3, #0 - bl sub_0208FE3C + bl _ll_udiv mov r5, r0 add r0, r7, #1 mov r0, r0, lsl #0x10 diff --git a/asm/overlay_02.s b/asm/overlay_02.s index 6fe7b20a..45b70886 100644 --- a/asm/overlay_02.s +++ b/asm/overlay_02.s @@ -9831,7 +9831,7 @@ ov02_0232FE1C: ; 0x0232FE1C ldr r2, _0232FE6C ; =0x01FF6210 asr r1, r0, #0x1f add r3, r4, #0 - bl sub_0208FE84 + bl _ll_mul lsr r3, r0, #6 lsl r2, r1, #0x1a orr r3, r2 @@ -9842,7 +9842,7 @@ ov02_0232FE1C: ; 0x0232FE1C ldr r2, _0232FE6C ; =0x01FF6210 asr r1, r0, #0x1f mov r3, #0 - bl sub_0208FE84 + bl _ll_mul lsr r3, r0, #6 lsl r2, r1, #0x1a orr r3, r2 @@ -15512,7 +15512,7 @@ _0233284C: ldr r2, [sp, #0x20] ldr r1, [sp, #0x18] asr r3, r2, #0x1f - bl sub_0208FE84 + bl _ll_mul str r0, [sp, #0xc] mov r0, #0 str r1, [sp, #8] @@ -15745,7 +15745,7 @@ _02332A0A: ldr r2, [sp, #0x24] ldr r1, [sp, #0x18] asr r3, r2, #0x1f - bl sub_0208FE84 + bl _ll_mul str r0, [sp, #0xc] mov r0, #0 str r1, [sp, #8] @@ -18720,7 +18720,7 @@ ov02_02334140: ; 0x02334140 ldr r2, _02334158 ; =0x000082EA lsl r0, r0, #6 mov r3, #0 - bl sub_0208FE3C + bl _ll_udiv pop {r3, pc} .align 2, 0 _02334158: .word 0x000082EA @@ -26543,7 +26543,7 @@ ov02_0233A508: ; 0x0233A508 mov r0, r8 mov r1, sl mov r2, #0xa - bl sub_0208FE48 + bl _ull_mod mov r1, #0x3e8 umull r4, r1, r0, r1 mov r0, r8 @@ -26551,7 +26551,7 @@ ov02_0233A508: ; 0x0233A508 mov r3, #0 mov r2, #0xa str r4, [sp, #0x64] - bl sub_0208FE3C + bl _ll_udiv mov sb, #0 ldr r7, _0233A700 ; =0x00002710 mov r8, r0 @@ -26564,14 +26564,14 @@ _0233A614: mov r1, sl mov r2, r7 mov r3, r6 - bl sub_0208FE48 + bl _ull_mod rsb r1, sb, #2 str r0, [r5, r1, lsl #2] mov r0, r8 mov r1, sl mov r2, r7 mov r3, r4 - bl sub_0208FE3C + bl _ll_udiv mov r8, r0 mov sl, r1 add sb, sb, #1 diff --git a/asm/overlay_03.s b/asm/overlay_03.s index 45049174..d716d369 100644 --- a/asm/overlay_03.s +++ b/asm/overlay_03.s @@ -8197,25 +8197,25 @@ _02343C90: mov r0, r6 mov r1, r4 mov r3, #0 - bl sub_0208FE48 + bl _ull_mod str r0, [sp, #0x15c] ldr r2, _02343FE0 ; =0x00002710 mov r0, r6 mov r1, r4 mov r3, #0 - bl sub_0208FE3C + bl _ll_udiv ldr r2, _02343FE0 ; =0x00002710 mov r3, #0 - bl sub_0208FE48 + bl _ull_mod str r0, [sp, #0x158] ldr r2, _02343FE4 ; =0x05F5E100 mov r1, r4 mov r0, r6 mov r3, #0 - bl sub_0208FE3C + bl _ll_udiv ldr r2, _02343FE0 ; =0x00002710 mov r3, #0 - bl sub_0208FE48 + bl _ull_mod str r0, [sp, #0x154] ldr r1, _02343FE8 ; =0x00003867 mov r0, #0x1c diff --git a/asm/overlay_05.s b/asm/overlay_05.s index 1fb06a89..e8316628 100644 --- a/asm/overlay_05.s +++ b/asm/overlay_05.s @@ -1591,25 +1591,25 @@ _0233DEF0: ldr r2, _0233EB2C ; =0x00002710 mov r1, r5 mov r3, #0 - bl sub_0208FE48 + bl _ull_mod str r0, [sp, #0x324] ldr r2, _0233EB2C ; =0x00002710 mov r0, r4 mov r1, r5 mov r3, #0 - bl sub_0208FE3C + bl _ll_udiv ldr r2, _0233EB2C ; =0x00002710 mov r3, #0 - bl sub_0208FE48 + bl _ull_mod str r0, [sp, #0x320] ldr r2, _0233EB30 ; =0x05F5E100 mov r1, r5 mov r0, r4 mov r3, #0 - bl sub_0208FE3C + bl _ll_udiv ldr r2, _0233EB2C ; =0x00002710 mov r3, #0 - bl sub_0208FE48 + bl _ull_mod str r0, [sp, #0x31c] mov r0, #5 bl ov01_0233767C @@ -3207,25 +3207,25 @@ _0233F664: mov r0, r5 mov r1, r4 mov r3, #0 - bl sub_0208FE48 + bl _ull_mod str r0, [sp, #0x184] ldr r2, _0233EB2C ; =0x00002710 mov r0, r5 mov r1, r4 mov r3, #0 - bl sub_0208FE3C + bl _ll_udiv ldr r2, _0233EB2C ; =0x00002710 mov r3, #0 - bl sub_0208FE48 + bl _ull_mod str r0, [sp, #0x180] ldr r2, _0233EB30 ; =0x05F5E100 mov r1, r4 mov r0, r5 mov r3, #0 - bl sub_0208FE3C + bl _ll_udiv ldr r2, _0233EB2C ; =0x00002710 mov r3, #0 - bl sub_0208FE48 + bl _ull_mod add r1, sp, #0x58 str r1, [sp, #0x190] str r0, [sp, #0x17c] diff --git a/asm/overlay_07.s b/asm/overlay_07.s index ea4c3a2f..7e8eaed2 100644 --- a/asm/overlay_07.s +++ b/asm/overlay_07.s @@ -1391,25 +1391,25 @@ _0233DCB0: ldr r2, _0233DD4C ; =0x00002710 mov r0, r4 mov r1, r5 - bl sub_0208FE48 + bl _ull_mod str r0, [sp, #0x30] ldr r2, _0233DD4C ; =0x00002710 mov r0, r4 mov r1, r5 mov r3, #0 - bl sub_0208FE3C + bl _ll_udiv ldr r2, _0233DD4C ; =0x00002710 mov r3, #0 - bl sub_0208FE48 + bl _ull_mod str r0, [sp, #0x2c] ldr r2, _0233DD50 ; =0x05F5E100 mov r0, r4 mov r1, r5 mov r3, #0 - bl sub_0208FE3C + bl _ll_udiv ldr r2, _0233DD4C ; =0x00002710 mov r3, #0 - bl sub_0208FE48 + bl _ull_mod str r0, [sp, #0x28] add r2, sp, #4 str r2, [sp] @@ -2136,25 +2136,25 @@ _0233E6C8: mov r3, #0 mov r5, r0 mov r6, r1 - bl sub_0208FE48 + bl _ull_mod str r0, [sp, #0x80] ldr r2, _0233E9BC ; =0x00002710 mov r0, r5 mov r1, r6 mov r3, #0 - bl sub_0208FE3C + bl _ll_udiv ldr r2, _0233E9BC ; =0x00002710 mov r3, #0 - bl sub_0208FE48 + bl _ull_mod str r0, [sp, #0x7c] ldr r2, _0233E9C0 ; =0x05F5E100 mov r1, r6 mov r0, r5 mov r3, #0 - bl sub_0208FE3C + bl _ll_udiv ldr r2, _0233E9BC ; =0x00002710 mov r3, #0 - bl sub_0208FE48 + bl _ull_mod str r0, [sp, #0x78] ldr r1, _0233E9C4 ; =0x00003713 mov r0, #0x1c @@ -2212,25 +2212,25 @@ _0233E7E0: mov r3, #0 mov r5, r0 mov r6, r1 - bl sub_0208FE48 + bl _ull_mod str r0, [sp, #0x30] ldr r2, _0233E9BC ; =0x00002710 mov r0, r5 mov r1, r6 mov r3, #0 - bl sub_0208FE3C + bl _ll_udiv ldr r2, _0233E9BC ; =0x00002710 mov r3, #0 - bl sub_0208FE48 + bl _ull_mod str r0, [sp, #0x2c] ldr r2, _0233E9C0 ; =0x05F5E100 mov r1, r6 mov r0, r5 mov r3, #0 - bl sub_0208FE3C + bl _ll_udiv ldr r2, _0233E9BC ; =0x00002710 mov r3, #0 - bl sub_0208FE48 + bl _ull_mod str r0, [sp, #0x28] ldr r1, _0233E9C4 ; =0x00003713 mov r0, #0x1c diff --git a/asm/overlay_11.s b/asm/overlay_11.s index 1bcabfbb..c8ba73c8 100644 --- a/asm/overlay_11.s +++ b/asm/overlay_11.s @@ -8087,11 +8087,11 @@ _022E33C4: bl EuclideanNorm__02005050 mov r4, r0 ldr r0, [sb, #0x4c] - bl __floatsisf + bl _fflt mov r1, r0 mov r0, r4 - bl __divsf3 - bl __fixsfsi + bl _fdiv + bl _ffix strh r0, [sb, #0x46] ldrsh r0, [sb, #0x46] cmp r0, #0 @@ -17952,11 +17952,11 @@ _022EB5F4: bl EuclideanNorm__020050B0 str r0, [sp, #8] ldr r0, [r8, #0xc] - bl __floatsisf + bl _fflt mov r1, r0 ldr r0, [sp, #8] - bl __divsf3 - bl __fixsfsi + bl _fdiv + bl _ffix str r0, [r8, #0x10] cmp r0, #0 movle r0, #1 @@ -61643,11 +61643,11 @@ _0230FE78: mov r4, r0 ldr r5, [r1, #8] ldr r0, [r5, #0x38] - bl __floatsisf + bl _fflt mov r1, r0 mov r0, r4 - bl __divsf3 - bl __fixsfsi + bl _fdiv + bl _ffix ldr r1, _02310050 ; =WORLD_MAP_MODE str r0, [r5, #0x3c] ldr r1, [r1, #8] diff --git a/asm/overlay_29_022F62CC.s b/asm/overlay_29_022F62CC.s index d2d3f133..1a87c10e 100644 --- a/asm/overlay_29_022F62CC.s +++ b/asm/overlay_29_022F62CC.s @@ -401,7 +401,7 @@ ov29_022F67D0: ; 0x022F67D0 mov r2, #0x64 smull r0, r1, r3, r1 mov r3, #0 - bl sub_0208FC8C + bl _ll_sdiv bl sub_020018A4 mov r4, r0 ldr r1, _022F69F8 ; =0x00000E4F @@ -549,7 +549,7 @@ ov29_022F6A0C: ; 0x022F6A0C mov r2, #0x64 smull r0, r1, r3, r0 mov r3, #0 - bl sub_0208FC8C + bl _ll_sdiv bl sub_020018A4 mov r6, r0 _022F6A80: diff --git a/lib/asm/crt0.s b/lib/asm/crt0.s index 92630c5e..1140e07b 100644 --- a/lib/asm/crt0.s +++ b/lib/asm/crt0.s @@ -78,7 +78,7 @@ _020008D4: add r1, r1, #0x3c ldr r0, _02000948 ; =sub_01FF95E8 str r0, [r1] - bl sub_020907F0 + bl _fp_init bl sub_02000B98 bl sub_020908A8 ldr r1, _0200094C ; =NitroMain diff --git a/lib/asm/include/crt0.inc b/lib/asm/include/crt0.inc index 4c44d5aa..60d753b3 100644 --- a/lib/asm/include/crt0.inc +++ b/lib/asm/include/crt0.inc @@ -7,5 +7,5 @@ .public SDK_STATIC_BSS_END .public SDK_STATIC_BSS_START .public sub_01FF95E8 -.public sub_020907F0 +.public _fp_init .public sub_020908A8 diff --git a/sub/asm/include/main.inc b/sub/asm/include/main.inc index 28d2b7ad..ef2b80d8 100644 --- a/sub/asm/include/main.inc +++ b/sub/asm/include/main.inc @@ -4,8 +4,8 @@ .public _0380B408 .public _0380B434 .public _0380B460 -.public __divsi3 -.public __udivsi3 +.public _s32_div_f +.public _u32_div_f .public ClearIeFlag .public EnableIrqFlag .public GetCurrentPlaybackTime diff --git a/sub/asm/main.s b/sub/asm/main.s index 3e2fc2f5..bf899dc5 100644 --- a/sub/asm/main.s +++ b/sub/asm/main.s @@ -4377,7 +4377,7 @@ _027E3B68: blo _027E3B68 sub r0, r7, #0x40 mov r1, #0x42 - bl __udivsi3 + bl _u32_div_f add r2, sp, #0x4e stmia sp, {r2, r5} add r1, sp, #0x1e @@ -4737,7 +4737,7 @@ _027E4074: moveq r0, #1 beq _027E409C ldr r0, _027E445C ; =0x00002710 - bl __divsi3 + bl _s32_div_f add r0, r0, #1 _027E409C: mov r0, r0, lsl #0x10 @@ -10054,7 +10054,7 @@ sub_027E89E0: ; 0x027E89E0 ldr r2, [r4, #0x14] str r2, [r0, #0x304] ldr r0, [r4, #0x30] - bl __udivsi3 + bl _u32_div_f mov r1, r0 ldr r0, [r4, #0x2c] bl sub_027E8DDC @@ -11575,7 +11575,7 @@ sub_027E9E30: ; 0x027E9E30 ldrh r0, [r4, #0x6e] mov r1, #0x64 mul r0, r6, r0 - bl __udivsi3 + bl _u32_div_f cmp r0, #0x10000 movhi r0, #5 bhi _027E9E84 @@ -16191,7 +16191,7 @@ _027ED9B8: mov r2, #0 cmpne r0, #0 beq _027ED9F8 - bl __udivsi3 + bl _u32_div_f add r2, r0, #1 cmp r2, #0x64 movhi r2, #0x64 @@ -18970,7 +18970,7 @@ _027EFCA8: add r0, r3, r0 mov r1, #0xa add r0, r0, #0x32 - bl __udivsi3 + bl _u32_div_f mov r4, r0 bl EnableIrqFlag ldr r1, _027EFE04 ; =0x00003FFF @@ -18992,7 +18992,7 @@ _027EFD40: add r0, sb, r0 mov r0, r0, lsl #0x10 mov r0, r0, lsr #0x10 - bl __udivsi3 + bl _u32_div_f ldrh r3, [sl, #0x18] add r1, r0, #3 cmp r1, r3 @@ -24422,7 +24422,7 @@ _027F47D0: sub r0, r0, #0x18 strh r0, [r4, #0x20] ldrh r0, [r4, #0x20] - bl __udivsi3 + bl _u32_div_f mov r1, r6 strh r0, [r1, #2] b _027F4AC8 @@ -26067,24 +26067,24 @@ _027F5D7C: mov r0, r7 mov r1, #0x190 addls r6, r6, #0xc - bl __udivsi3 + bl _u32_div_f mov r4, r0 mov r0, r7 mov r1, #0x64 - bl __udivsi3 + bl _u32_div_f mov r1, #0xd mul r1, r6, r1 mov r6, r0 add r0, r1, #8 mov r1, #5 - bl __udivsi3 + bl _u32_div_f add r1, r7, r7, lsr #2 sub r1, r1, r6 add r1, r4, r1 add r0, r1, r0 add r0, r5, r0 mov r1, #7 - bl __udivsi3 + bl _u32_div_f ldr r0, _027F5F04 ; =0x027FFDE8 ldr r2, [r0] mov r3, r2, lsl #5 diff --git a/sub/asm/wram.s b/sub/asm/wram.s index 4aa8a2f0..f38c4db9 100644 --- a/sub/asm/wram.s +++ b/sub/asm/wram.s @@ -5456,7 +5456,7 @@ _037FC714: ble _037FC6F4 ldr r0, [r6, #0x18] add r0, r0, r2 - bl __divsi3 + bl _s32_div_f ldr r2, [r6, #0x10] add r0, r6, #8 str r5, [r2, r1, lsl #2] @@ -5504,7 +5504,7 @@ _037FC7A0: ldr r0, [r6, #0x18] ldr r1, [r6, #0x14] add r0, r0, #1 - bl __divsi3 + bl _s32_div_f str r1, [r6, #0x18] ldr r1, [r6, #0x1c] mov r0, r6 @@ -9948,7 +9948,7 @@ sub_037FFE64: ; 0x037FFE64 blt _037FFEAC rsb r1, r0, #0x7e mov r0, #0x1e00 - bl __divsi3 + bl _s32_div_f mov r0, r0, lsl #0x10 mov r0, r0, lsr #0x10 _037FFEAC: @@ -11723,7 +11723,7 @@ _038015AC: beq _038017D0 mov r1, sb ldrsh r0, [r4] - bl __divsi3 + bl _s32_div_f strh r0, [r4] b _038017D0 _038015C8: @@ -15319,11 +15319,11 @@ _03804200: b _03804284 _03804230: mul r0, sb, r8 - bl __udivsi3 + bl _u32_div_f ldr r2, [sl, #0xc] mov r1, r8 add r0, r2, r0 - bl __udivsi3 + bl _u32_div_f mov r0, r1, lsl #0x10 mov r0, r0, lsr #0x10 cmp r0, #0xc8 @@ -16483,7 +16483,7 @@ _03805164: ldr r0, [r1] add r6, r5, r4 ldrh r1, [r6, #0xa] - bl __udivsi3 + bl _u32_div_f mov r1, #0 mov r3, r1, lsr r0 ldr ip, [r6, #4] @@ -18408,7 +18408,7 @@ _038069F0: orrs r6, r5, r6 bne _03806A24 mov r1, r2 - bl __divsi3 + bl _s32_div_f ands r4, r4, #1 movne r0, r1 mov r1, r0, asr #0x1f @@ -18537,7 +18537,7 @@ _03806BA4: orrs r5, r1, r3 bne _03806A44 mov r1, r2 - bl __udivsi3_no_zero_check + bl _u32_div_not_0_f cmp r4, #0 movne r0, r1 mov r1, #0 @@ -18545,8 +18545,8 @@ _03806BA4: bx lr arm_func_end sub_03806B80 - arm_func_start __divsi3 -__divsi3: ; 0x03806BC8 + arm_func_start _s32_div_f +_s32_div_f: ; 0x03806BC8 eor ip, r0, r1 and ip, ip, #0x80000000 cmp r0, #0 @@ -18679,16 +18679,16 @@ _03806DC0: ands r3, ip, #1 rsbne r1, r1, #0 bx lr - arm_func_end __divsi3 + arm_func_end _s32_div_f - arm_func_start __udivsi3 -__udivsi3: ; 0x03806DD4 + arm_func_start _u32_div_f +_u32_div_f: ; 0x03806DD4 cmp r1, #0 bxeq lr - arm_func_end __udivsi3 + arm_func_end _u32_div_f - arm_func_start __udivsi3_no_zero_check -__udivsi3_no_zero_check: ; 0x03806DDC + arm_func_start _u32_div_not_0_f +_u32_div_not_0_f: ; 0x03806DDC cmp r0, r1 movlo r1, r0 movlo r0, #0 @@ -18808,7 +18808,7 @@ __udivsi3_no_zero_check: ; 0x03806DDC adcs r0, r0, r0 mov r1, r3 bx lr - arm_func_end __udivsi3_no_zero_check + arm_func_end _u32_div_not_0_f _03806FB8: .byte 0x00, 0x06, 0x0C, 0x13, 0x19, 0x1F, 0x25, 0x2B, 0x31, 0x36, 0x3C, 0x41, 0x47, 0x4C, 0x51, 0x55 diff --git a/tools/sync_pmdsky_debug/symbol_details.py b/tools/sync_pmdsky_debug/symbol_details.py index 88e8f4a9..470f3118 100644 --- a/tools/sync_pmdsky_debug/symbol_details.py +++ b/tools/sync_pmdsky_debug/symbol_details.py @@ -1,8 +1,6 @@ from dataclasses import dataclass MIXED_CASE_SYMBOLS_ARM9 = { - '_s32_div_f': '__divsi3', - '_u32_div_f': '__udivsi3', '_secure': 'SECURE', '_start_AutoloadDoneCallback': 'StartAutoloadDoneCallback', '_start_ModuleParams': 'START_MODULE_PARAMS',