//
// sub_7757BC from 0x7757bc to 0x775802 (70 bytes)
//
// 58 xrefs:
// > MultilineBitmapFont::stringWithMaxWidth @ 0x2f0e70
// > MultilineBitmapFont::stringWithMaxWidth @ 0x2f0ede
// > MultilineBitmapFont::stringWithMaxWidth @ 0x2f0eec
// > MultilineBitmapFont::stringWithMaxWidth @ 0x2f0f94
// > MultilineBitmapFont::readColorInfo @ 0x2f1158
// > CCTextInputNode::onTextFieldInsertText @ 0x2faed6
// > LevelEditorLayer::breakApartTextObject @ 0x37158c
// > EditorUI::createPrefab @ 0x3a418a
// > GameLevelManager::getNextLevelName @ 0x3bf02e
// > GJSmartTemplate::getVerySimplifiedKey @ 0x53995c
// > GJSmartTemplate::getSimplifiedKey @ 0x53a182
// > GJSmartTemplate::getSimplifiedKey @ 0x53a18e
// > GJSmartTemplate::getSimplifiedKey @ 0x53a198
// > GJSmartTemplate::getSimplifiedKey @ 0x53a1a6
// > GJSmartTemplate::getSimplifiedKey @ 0x53a1b4
// > GJSmartTemplate::getSimplifiedKey @ 0x53a1c6
// > GJSmartTemplate::getSimplifiedKey @ 0x53a1d4
// > GJSmartTemplate::getSimplifiedKey @ 0x53a1e2
// > GJSmartTemplate::getSimplifiedKey @ 0x53a1f0
// > GJSmartTemplate::rotateKey @ 0x53af7a
// > GJSmartTemplate::rotateKey @ 0x53af8a
// > GJSmartTemplate::rotateKey @ 0x53af96
// > GJSmartTemplate::rotateKey @ 0x53afa2
// > GJSmartTemplate::rotateKey @ 0x53afae
// > GJSmartTemplate::rotateKey @ 0x53afba
// > GJSmartTemplate::rotateKey @ 0x53afc4
// > GJSmartTemplate::rotateKey @ 0x53afce
// > GJSmartTemplate::rotateKey @ 0x53afda
// > GJSmartTemplate::flipKey @ 0x53b0ea
// > GJSmartTemplate::flipKey @ 0x53b0f6
// > GJSmartTemplate::flipKey @ 0x53b106
// > GJSmartTemplate::flipKey @ 0x53b112
// > GJSmartTemplate::flipKey @ 0x53b11e
// > GJSmartTemplate::flipKey @ 0x53b12a
// > GJSmartTemplate::flipKey @ 0x53b136
// > GJSmartTemplate::flipKey @ 0x53b142
// > GJSmartTemplate::flipKey @ 0x53b14c
// > GJSmartTemplate::isUnrequired @ 0x53b23a
// > GJSmartTemplate::isUnrequired @ 0x53b24a
// > GJSmartTemplate::isUnrequired @ 0x53b254
// > GJSmartTemplate::isUnrequired @ 0x53b26a
// > GJSmartTemplate::isUnrequired @ 0x53b27a
// > GJSmartTemplate::isUnrequired @ 0x53b286
// > GJSmartTemplate::isUnrequired @ 0x53b292
// > GJSmartTemplate::isUnrequired @ 0x53b29e
// > GJSmartBlockPreview::addPreview @ 0x53b7b0
// > GJSmartBlockPreview::addTemplateGuide @ 0x53bba2
// > GJSmartBlockPreview::addTemplateGuide @ 0x53bc6e
// > GJSmartBlockPreview::addTemplateGuide @ 0x53bd78
// > GJSmartTemplate::generateRemapDict @ 0x53ccf6
// > GJSmartTemplate::generateRemapDict @ 0x53cd0c
// > GJSmartTemplate::generateRemapDict @ 0x53cd22
// > GJSmartTemplate::generateRemapDict @ 0x53cd38
// > GJSmartTemplate::generateRemapDict @ 0x53cd4a
// > GJSmartTemplate::generateRemapDict @ 0x53cd56
// > GJSmartTemplate::generateRemapDict @ 0x53cd66
// > GJSmartTemplate::generateRemapDict @ 0x53cd70
// > cocos2d::CCTextFieldTTF::deleteBackward @ 0x5f333e
//
// 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
//
int __fastcall sub_7757BC(int *a1, unsigned int a2)
{
int v2; // r3
unsigned int v4; // r2
int v6; // r1
v2 = *a1;
v4 = *(_DWORD *)(*a1 - 12);
if ( a2 >= v4 )
sub_7732C4("basic_string::at: __n (which is %zu) >= this->size() (which is %zu)", a2, v4);
v6 = *(_DWORD *)(v2 - 4);
if ( v6 >= 0 && (int *)(v2 - 12) != &dword_ACDD9C )
{
if ( v6 )
{
sub_77500C(a1, 0, nullptr, nullptr);
v2 = *a1;
}
*(_DWORD *)(v2 - 4) = -1;
}
return v2 + a2;
}