{"type": "func", "start": 5975836, "end": 5976088, "name": "FMODAudioEngine::fadeMusic", "pseudocode": "// \n// FMODAudioEngine::fadeMusic from 0x5b2f1c to 0x5b3018 (252 bytes)\n// \n// 3 xrefs:\n// > SecretRewardsLayer::fadeInMusic @ 0xa609e8\n// > SecretRewardsLayer::fadeInOutMusic @ 0xa621c4\n// > <???> @ 0x8e278\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nvoid FMODAudioEngine::fadeMusic(FMODAudioEngine *a1, float a2, int a3, float a4, float a5)\n{\n  FMOD::Channel *ActiveMusicChannel; // x0\n  FMOD::ChannelControl *v10; // x19\n  unsigned __int64 v11; // [xsp+50h] [xbp+50h] BYREF\n\n  ActiveMusicChannel = FMODAudioEngine::getActiveMusicChannel(a1, a3);\n  v10 = ActiveMusicChannel;\n  if ( ActiveMusicChannel )\n  {\n    FMODAudioEngine::stopAndGetFade(a1, ActiveMusicChannel);\n    a1->m_lastResult = FMOD::ChannelControl::getDSPClock(v10, nullptr, &v11);\n    ERRCHECK_fn();\n    a1->m_lastResult = FMOD::ChannelControl::addFadePoint(v10, v11, a4);\n    ERRCHECK_fn();\n    a1->m_lastResult = FMOD::ChannelControl::addFadePoint(\n                         v10,\n                         (unsigned __int64)(float)((float)v11 + (float)((float)a1->m_sampleRate * a2)),\n                         a5);\n    ERRCHECK_fn();\n  }\n}", "assembly": "; \n; FMODAudioEngine::fadeMusic from 0x5b2f1c to 0x5b3018 (252 bytes)\n; \n; 3 xrefs:\n; > SecretRewardsLayer::fadeInMusic @ 0xa609e8\n; > SecretRewardsLayer::fadeInOutMusic @ 0xa621c4\n; > <???> @ 0x8e278\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nSTP             X29, X30, [SP,#var_60]!                                ; +0x0, 0x5b2f1c\nMOV             X29, SP                                                ; +0x4, 0x5b2f20\nSTP             X19, X20, [SP,#0x60+var_50]                            ; +0x8, 0x5b2f24\nSTP             D8, D9, [SP,#0x60+var_30]                              ; +0xc, 0x5b2f28\nADRP            X20, #__stack_chk_guard_ptr@PAGE                       ; +0x10, 0x5b2f2c\nSTR             D10, [SP,#0x60+var_20]                                 ; +0x14, 0x5b2f30\nFMOV            S8, S0                                                 ; +0x18, 0x5b2f34\nLDR             X2, [X20,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x1c, 0x5b2f38\nFMOV            S10, S1                                                ; +0x20, 0x5b2f3c\nFMOV            S9, S2                                                 ; +0x24, 0x5b2f40\nLDR             X2, [X2]                                               ; +0x28, 0x5b2f44\nSTP             X21, X22, [SP,#0x60+var_40]                            ; +0x2c, 0x5b2f48\nSTR             X2, [X29,#0x60+var_8]                                  ; +0x30, 0x5b2f4c\nMOV             X21, X0                                                ; +0x34, 0x5b2f50\nBL              _ZN15FMODAudioEngine21getActiveMusicChannelEi; FMODAudioEngine::getActiveMusicChannel(int) ; +0x38, 0x5b2f54\nMOV             X19, X0                                                ; +0x3c, 0x5b2f58\nCBZ             X0, loc_5B2FE8                                         ; +0x40, 0x5b2f5c\nMOV             X1, X0; FMOD::Channel *                                ; +0x44, 0x5b2f60\nMOV             X0, X21; this                                          ; +0x48, 0x5b2f64\nADRP            X22, #aUsersRobertLib@PAGE; \"/Users/robert/Library/CloudStorage/Drop\"... ; +0x4c, 0x5b2f68\nBL              _ZN15FMODAudioEngine14stopAndGetFadeEPN4FMOD7ChannelE; FMODAudioEngine::stopAndGetFade(FMOD::Channel *) ; +0x50, 0x5b2f6c\nADD             X22, X22, #aUsersRobertLib@PAGEOFF; \"/Users/robert/Library/CloudStorage/Drop\"... ; +0x54, 0x5b2f70\nMOV             X1, #0; unsigned __int64 *                             ; +0x58, 0x5b2f74\nADD             X2, X29, #0x60+var_10; unsigned __int64 *              ; +0x5c, 0x5b2f78\nMOV             X0, X19; this                                          ; +0x60, 0x5b2f7c\nBL              ._ZN4FMOD14ChannelControl11getDSPClockEPyS1_; FMOD::ChannelControl::getDSPClock(ulong long *,ulong long *) ; +0x64, 0x5b2f80\nSTR             W0, [X21,#0x240]                                       ; +0x68, 0x5b2f84\nMOV             W2, #0xB14                                             ; +0x6c, 0x5b2f88\nMOV             X1, X22                                                ; +0x70, 0x5b2f8c\nBL              _Z11ERRCHECK_fn11FMOD_RESULTPKci; ERRCHECK_fn(FMOD_RESULT,char const*,int) ; +0x74, 0x5b2f90\nFMOV            S0, S10; float                                         ; +0x78, 0x5b2f94\nLDR             X1, [X29,#0x60+var_10]; unsigned __int64               ; +0x7c, 0x5b2f98\nMOV             X0, X19; this                                          ; +0x80, 0x5b2f9c\nBL              ._ZN4FMOD14ChannelControl12addFadePointEyf; FMOD::ChannelControl::addFadePoint(ulong long,float) ; +0x84, 0x5b2fa0\nSTR             W0, [X21,#0x240]                                       ; +0x88, 0x5b2fa4\nMOV             W2, #0xB18                                             ; +0x8c, 0x5b2fa8\nMOV             X1, X22                                                ; +0x90, 0x5b2fac\nBL              _Z11ERRCHECK_fn11FMOD_RESULTPKci; ERRCHECK_fn(FMOD_RESULT,char const*,int) ; +0x94, 0x5b2fb0\nLDR             W1, [X21,#0x244]                                       ; +0x98, 0x5b2fb4\nMOV             X0, X19; this                                          ; +0x9c, 0x5b2fb8\nFMOV            S0, S9; float                                          ; +0xa0, 0x5b2fbc\nSCVTF           S2, W1                                                 ; +0xa4, 0x5b2fc0\nLDR             X1, [X29,#0x60+var_10]                                 ; +0xa8, 0x5b2fc4\nUCVTF           S1, X1                                                 ; +0xac, 0x5b2fc8\nFMADD           S1, S2, S8, S1                                         ; +0xb0, 0x5b2fcc\nFCVTZU          X1, S1; unsigned __int64                               ; +0xb4, 0x5b2fd0\nBL              ._ZN4FMOD14ChannelControl12addFadePointEyf; FMOD::ChannelControl::addFadePoint(ulong long,float) ; +0xb8, 0x5b2fd4\nSTR             W0, [X21,#0x240]                                       ; +0xbc, 0x5b2fd8\nMOV             X1, X22                                                ; +0xc0, 0x5b2fdc\nMOV             W2, #0xB1A                                             ; +0xc4, 0x5b2fe0\nBL              _Z11ERRCHECK_fn11FMOD_RESULTPKci; ERRCHECK_fn(FMOD_RESULT,char const*,int) ; +0xc8, 0x5b2fe4\nLDR             X20, [X20,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0xcc, 0x5b2fe8\nLDR             X1, [X29,#0x60+var_8]                                  ; +0xd0, 0x5b2fec\nLDR             X0, [X20]                                              ; +0xd4, 0x5b2ff0\nCMP             X1, X0                                                 ; +0xd8, 0x5b2ff4\nB.NE            loc_5B3014                                             ; +0xdc, 0x5b2ff8\nLDP             X19, X20, [SP,#0x60+var_50]                            ; +0xe0, 0x5b2ffc\nLDP             D8, D9, [SP,#0x60+var_30]                              ; +0xe4, 0x5b3000\nLDP             X21, X22, [SP,#0x60+var_40]                            ; +0xe8, 0x5b3004\nLDR             D10, [SP,#0x60+var_20]                                 ; +0xec, 0x5b3008\nLDP             X29, X30, [SP+0x60+var_60],#0x60                       ; +0xf0, 0x5b300c\nRET                                                                    ; +0xf4, 0x5b3010\nBL              .__stack_chk_fail                                      ; +0xf8, 0x5b3014", "xrefs": ["SecretRewardsLayer::fadeInMusic @ 0xa609e8", "SecretRewardsLayer::fadeInOutMusic @ 0xa621c4", "<???> @ 0x8e278"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}