//
// cocos2d::CCLabelBMFont::limitLabelWidth from 0x1005db560 to 0x1005db634 (212 bytes)
//
// 209 xrefs:
// > GJRotateCommandLayer::updateEasingLabel @ 0x100003f2f
// > EditorUI::updateGroupIDLabel @ 0x10002c6ec
// > GJScaleControl::loadValues @ 0x10003f405
// > GJScaleControl::loadValues @ 0x10003f455
// > GJScaleControl::loadValues @ 0x10003f4a5
// > GJScaleControl::updateLabelX @ 0x100052493
// > GJScaleControl::updateLabelY @ 0x1000524f3
// > GJScaleControl::updateLabelXY @ 0x100052553
// > GJScaleControl::ccTouchMoved @ 0x100052a96
// > GJScaleControl::ccTouchMoved @ 0x100052afe
// > GJScaleControl::ccTouchMoved @ 0x100052b4d
// > LevelEditorLayer::updateObjectLabel @ 0x1000ea12a
// > EditLevelLayer::init @ 0x1001fb71b
// > EditLevelLayer::setupLevelInfo @ 0x1001fc65c
// > EditLevelLayer::setIDPopupClosed @ 0x1001fe576
// > sub_1001FE580 @ 0x1001fe5ed
// > RewardUnlockLayer::playLabelEffect @ 0x10021f4a0
// > MessagesProfilePage::init @ 0x10022dbc6
// > SetupTriggerPopup::updateEaseLabel @ 0x10023edab
// > SetupTriggerPopup::updateCustomEaseLabel @ 0x10023fcbb
// > LevelListCell::loadFromList @ 0x1002459c3
// > LevelListCell::loadFromList @ 0x100245c63
// > LevelListCell::loadFromList @ 0x10024631b
// > LevelListCell::loadFromList @ 0x1002464d4
// > LevelListCell::loadFromList @ 0x100246770
// > ArtistCell::loadFromObject @ 0x100247295
// > URLCell::loadFromObject @ 0x1002475fd
// > CommentCell::loadFromComment @ 0x100247a78
// > CommentCell::loadFromComment @ 0x10024868e
// > CommentCell::loadFromComment @ 0x100248f4b
// > GJScoreCell::loadFromScore @ 0x100249999
// > GJScoreCell::loadFromScore @ 0x100249a28
// > GJScoreCell::loadFromScore @ 0x100249ed0
// > GJScoreCell::loadFromScore @ 0x10024a06a
// > GJScoreCell::loadFromScore @ 0x10024a293
// > GJScoreCell::loadFromScore @ 0x10024a466
// > GJScoreCell::loadFromScore @ 0x10024a631
// > GJScoreCell::loadFromScore @ 0x10024a805
// > GJScoreCell::loadFromScore @ 0x10024a9f6
// > GJLevelScoreCell::loadFromScore @ 0x10024af1c
// > GJLevelScoreCell::loadFromScore @ 0x10024b091
// > GJLevelScoreCell::loadFromScore @ 0x10024b2e7
// > GJLevelScoreCell::loadFromScore @ 0x10024b368
// > GJLevelScoreCell::loadFromScore @ 0x10024b5c5
// > GJLocalLevelScoreCell::loadFromScore @ 0x10024b883
// > GJUserCell::loadFromScore @ 0x10024bd00
// > GJRequestCell::loadFromScore @ 0x10024c508
// > GJMessageCell::loadFromMessage @ 0x10024cb7e
// > GJMessageCell::loadFromMessage @ 0x10024ce89
// > SmartTemplateCell::loadFromObject @ 0x10024d4fd
// > LevelCell::loadCustomLevelCell @ 0x10024f58d
// > LevelCell::loadCustomLevelCell @ 0x10024f74d
// > LevelCell::loadCustomLevelCell @ 0x10024f7b6
// > LevelCell::loadCustomLevelCell @ 0x10024ffea
// > LevelCell::loadCustomLevelCell @ 0x1002500d6
// > LevelCell::loadCustomLevelCell @ 0x1002504a6
// > LevelCell::loadCustomLevelCell @ 0x10025114f
// > LevelCell::loadCustomLevelCell @ 0x1002512c6
// > LevelCell::loadCustomLevelCell @ 0x100251479
// > LevelCell::loadCustomLevelCell @ 0x100251722
// > ShareLevelSettingsLayer::init @ 0x100282de9
// > CollisionBlockPopup::createToggleButton @ 0x100286f6e
// > GJAccountSettingsLayer::createToggleButton @ 0x1002a13c9
// > LevelInfoLayer::init @ 0x1002bd9f3
// > LevelInfoLayer::init @ 0x1002bdc78
// > LevelInfoLayer::init @ 0x1002bf302
// > LevelInfoLayer::setupPlatformerStats @ 0x1002c0edc
// > LevelInfoLayer::setupPlatformerStats @ 0x1002c0fc9
// > LevelInfoLayer::setIDPopupClosed @ 0x1002c2c46
// > sub_1002C2C50 @ 0x1002c2cbd
// > LevelInfoLayer::updateLabelValues @ 0x1002c3122
// > LevelInfoLayer::updateLabelValues @ 0x1002c3141
// > LevelInfoLayer::updateLabelValues @ 0x1002c3160
// > LevelInfoLayer::updateLabelValues @ 0x1002c317f
// > LevelInfoLayer::updateLabelValues @ 0x1002c319e
// > ColorChannelSprite::updateCopyLabel @ 0x1002d8dc6
// > TopArtistsLayer::setupPageInfo @ 0x100311755
// > TopArtistsLayer::updateLevelsLabel @ 0x10031186d
// > CommunityCreditsPage::init @ 0x10032019f
// > CommunityCreditsPage::init @ 0x1003205c8
// > CommunityCreditsPage::init @ 0x100320716
// > CommunityCreditsPage::init @ 0x100320869
// > LevelListLayer::init @ 0x10035c523
// > LevelListLayer::init @ 0x10035c5af
// > ItemInfoPopup::init @ 0x1003727cb
// > ItemInfoPopup::init @ 0x1003728cf
// > MenuLayer::init @ 0x1003912a9
// > MenuLayer::updateUserProfileButton @ 0x100391b58
// > GauntletLayer::setupGauntlet @ 0x1003938e7
// > SecretLayer4::init @ 0x1003b123b
// > SecretLayer4::updateMessageLabel @ 0x1003b1d67
// > SecretLayer4::onSubmit @ 0x1003b241d
// > SecretLayer4::onSubmit @ 0x1003b246f
// > SecretLayer4::onSubmit @ 0x1003b254c
// > SecretLayer4::onSubmit @ 0x1003b2591
// > SecretLayer4::onSubmit @ 0x1003b26ed
// > SecretLayer4::onSubmit @ 0x1003b27b5
// > SecretLayer4::onSubmit @ 0x1003b27fa
// > SecretLayer4::onSubmit @ 0x1003b2925
// > SecretLayer4::onSubmit @ 0x1003b2977
// > SecretLayer4::onSubmit @ 0x1003b2ab4
// > SecretLayer4::onSubmit @ 0x1003b2ba6
// > SecretLayer4::onSubmit @ 0x1003b2c8e
// > WorldLevelPage::init @ 0x1003c58ca
// > DialogLayer::init @ 0x1003c75d8
// > PauseLayer::setupProgressBars @ 0x1003d6fd5
// > PauseLayer::setupProgressBars @ 0x1003d70f0
// > PauseLayer::createToggleButton @ 0x1003d77a2
// > LevelLeaderboard::init @ 0x1003da3c6
// > GJSmartBlockPreview::addCount @ 0x100429510
// > GJSmartBlockPreview::addChance @ 0x100429696
// > SFXBrowser::setupList @ 0x10043ff9a
// > SFXBrowser::setupList @ 0x100440071
// > SFXBrowser::setupList @ 0x1004400b0
// > CreateParticlePopup::createParticleSlider @ 0x100473d63
// > SecretLayer5::init @ 0x10047a476
// > SecretLayer5::updateMessageLabel @ 0x10047b127
// > LevelBrowserLayer::updatePageLabel @ 0x10048cc2a
// > LevelBrowserLayer::updatePageLabel @ 0x10048cc90
// > LevelBrowserLayer::setupPageInfo @ 0x100490dc9
// > LevelBrowserLayer::updateLevelsLabel @ 0x100490f37
// > SecretLayer2::init @ 0x10049d75b
// > SecretLayer2::updateMessageLabel @ 0x10049e097
// > SecretLayer2::onSubmit @ 0x10049e7fe
// > SecretLayer2::onSubmit @ 0x10049e843
// > SecretLayer2::onSubmit @ 0x10049e87f
// > SecretLayer2::onSubmit @ 0x10049e9bc
// > SecretLayer2::onSubmit @ 0x10049eb8b
// > SecretLayer2::onSubmit @ 0x10049ecaf
// > SecretLayer2::onSubmit @ 0x10049ed01
// > SecretLayer2::onSubmit @ 0x10049eeb3
// > SecretLayer2::onSubmit @ 0x10049efee
// > SecretLayer2::onSubmit @ 0x10049f0eb
// > SecretLayer2::onSubmit @ 0x10049f1d1
// > SecretLayer2::onSubmit @ 0x10049f2b7
// > SecretLayer2::onSubmit @ 0x10049f39d
// > SetupReverbPopup::updateReverbLabel @ 0x1004b847c
// > SetupCameraRotatePopup::updateEasingLabel @ 0x1004be06f
// > EndLevelLayer::customSetup @ 0x1004c06d5
// > EndLevelLayer::customSetup @ 0x1004c07c2
// > EndLevelLayer::customSetup @ 0x1004c0b5d
// > EndLevelLayer::playCurrencyEffect @ 0x1004c2beb
// > EndLevelLayer::playDiamondEffect @ 0x1004c2f4b
// > SetupSmartTemplateLayer::init @ 0x1004e8201
// > GameToolbox::createToggleButton @ 0x1004ef005
// > RetryLevelLayer::customSetup @ 0x1004f86ea
// > SetupMGTrigger::updateEasingLabel @ 0x100509d7f
// > ColorSelectLiveOverlay::createToggleButton @ 0x10056a34a
// > GauntletNode::generateNode @ 0x100574a0e
// > SetupItemEditTriggerPopup::updateOpButton @ 0x10057f737
// > SetupItemEditTriggerPopup::updateFormulaLabel @ 0x100580078
// > SetupItemCompareTriggerPopup::updateFormulaLabel @ 0x1005829ef
// > GJListLayer::init @ 0x1005d2c00
// > CustomSFXWidget::updateSFXInfo @ 0x1005e41dc
// > CustomSFXWidget::updateSFXInfo @ 0x1005e41fb
// > CustomSFXWidget::updateSFXInfo @ 0x1005e44c1
// > CustomSFXWidget::updateSFXInfo @ 0x1005e44e0
// > CustomSFXWidget::deleteSFX @ 0x1005e4725
// > CustomSFXWidget::downloadSFXFailed @ 0x1005e4ce9
// > CustomSFXWidget::updateError @ 0x1005e4d91
// > sub_1005E4DA0 @ 0x1005e4e43
// > SetupGradientPopup::init @ 0x1005f2689
// > SetupGradientPopup::updateBlendingLabel @ 0x1005f2dc5
// > SetupGradientPopup::onBlending @ 0x1005f2ee9
// > SecretLayer::init @ 0x1005fb19c
// > SecretLayer::updateMessageLabel @ 0x1005fb5c7
// > SecretLayer::onSubmit @ 0x1005fbd73
// > SecretLayer::onSubmit @ 0x1005fbee4
// > SecretLayer::onSubmit @ 0x1005fbfe7
// > SecretLayer::onSubmit @ 0x1005fc0c4
// > SecretLayer::onSubmit @ 0x1005fc2e3
// > SongInfoLayer::init @ 0x1006010a1
// > KeybindingsLayer::addKeyPair @ 0x10060a936
// > KeybindingsLayer::addKeyPair @ 0x10060a9d9
// > CustomSongWidget::updateSongInfo @ 0x10061df13
// > CustomSongWidget::updateSongInfo @ 0x10061df32
// > CustomSongWidget::updateSongInfo @ 0x10061df8a
// > CustomSongWidget::updateSongInfo @ 0x10061dfa9
// > CustomSongWidget::updateSongInfo @ 0x10061dfd1
// > CustomSongWidget::updateSongInfo @ 0x10061e0d5
// > CustomSongWidget::updateSongInfo @ 0x10061e139
// > CustomSongWidget::updateSongInfo @ 0x10061e161
// > CustomSongWidget::deleteSong @ 0x10061ea19
// > CustomSongWidget::updateMultiAssetInfo @ 0x100620084
// > CustomSongWidget::loadSongInfoFailed @ 0x100620650
// > CustomSongWidget::updateError @ 0x1006207b7
// > CustomSongWidget::downloadSongFinished @ 0x100620a2c
// > CustomSongWidget::downloadSongFailed @ 0x100620dd7
// > CustomSongWidget::processNextMultiAsset @ 0x100621196
// > CustomSongWidget::processNextMultiAsset @ 0x1006211bd
// > FriendsProfilePage::init @ 0x100657daa
// > SetupCameraOffsetTrigger::updateEasingLabel @ 0x10066327f
// > ColorSelectPopup::init @ 0x1007260e1
// > FRequestProfilePage::init @ 0x10078ff6a
// > VideoOptionsLayer::init @ 0x10079fdc7
// > VideoOptionsLayer::createToggleButton @ 0x1007a0161
// > VideoOptionsLayer::onTextureQualityPrev @ 0x1007a027c
// > VideoOptionsLayer::onTextureQualityNext @ 0x1007a02fd
// > VideoOptionsLayer::updateTextureQuality @ 0x1007a0633
// > VideoOptionsLayer::updateResolution @ 0x1007a06f0
// > InfoLayer::init @ 0x1007ae68e
// > InfoLayer::init @ 0x1007ae7c7
// > InfoLayer::init @ 0x1007ae909
// > ProfilePage::init @ 0x1007b8ac0
// > ProfilePage::loadPageFromUserInfo @ 0x1007ba21e
// > ProfilePage::loadPageFromUserInfo @ 0x1007bb1a1
// > ProfilePage::loadPageFromUserInfo @ 0x1007bb963
// > ProfilePage::loadPageFromUserInfo @ 0x1007bbab7
// > ProfilePage::loadPageFromUserInfo @ 0x1007bbc11
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
// local variable allocation has failed, the output may be wrong!
void __fastcall cocos2d::CCLabelBMFont::limitLabelWidth(cocos2d::CCLabelBMFont *a1, float a2, float a3, float a4)
{
float *v5; // rax
__m128 v6; // xmm0
__m128 v7; // xmm1
__m128 v8; // xmm4
__m128 v9; // xmm2
__m128 v10; // xmm2
__m128 v11; // xmm3
__m128 v12; // xmm3
__m128 v13; // xmm0
__m128 v14; // xmm4
__m128 v15; // xmm4
__m128 v16; // xmm2
__m128 v17; // [rsp+0h] [rbp-30h]
__m128 v18; // [rsp+10h] [rbp-20h]
float v20; // [rsp+24h] [rbp-Ch]
v17 = *(__m128 *)&a4;
v18 = *(__m128 *)&a3;
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))a1->setScale)(a1, 1.0);
v5 = (float *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))a1->getContentSize)(a1);
v6 = (__m128)*(unsigned int *)v5;
v20 = *v5;
*(double *)v6.i64 = ((double (__fastcall *)(cocos2d::CCLabelBMFont *))a1->getScale)(a1);
v7 = (__m128)LODWORD(a2);
v7.f32[0] = a2 / v20;
v8.f32[0] = a2;
v9 = _mm_cmplt_ss((__m128)LODWORD(a2), (__m128)LODWORD(v20));
v10 = _mm_or_ps(_mm_andnot_ps(v9, v6), _mm_and_ps(v7, v9));
v7.i32[0] = 0;
v11 = _mm_cmplt_ss((__m128)0LL, v8);
v12 = _mm_or_ps(_mm_andnot_ps(v11, v6), _mm_and_ps(v10, v11));
v13 = v12;
v13.f32[0] = fminf(v12.f32[0], v18.f32[0]);
v14 = _mm_cmpneq_ss(v18, v7);
v15 = _mm_or_ps(_mm_and_ps(v14, v13), _mm_andnot_ps(v14, v12));
v13.i32[1] = v15.i32[1];
v13.f32[0] = fmaxf(v15.f32[0], v17.f32[0]);
v16 = _mm_cmpneq_ss(v17, v7);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, double))a1->setScale)(
a1,
COERCE_DOUBLE(v16.i64[0] & v13.i64[0] | _mm_andnot_ps(v16, v15).u64[0]));
}