//
// cocos2d::CCUserDefault::setDoubleForKey from 0xb1fb98 to 0xb1fc50 (184 bytes)
//
// 2 xrefs:
// > cocos2d::CCUserDefault::getDoubleForKey @ 0xb20194
// > ??> @ 0x5d180
//
// 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 cocos2d::CCUserDefault::setDoubleForKey(cocos2d::CCUserDefault *a1, const char *a2, double a3)
{
tinyxml2::XMLNode **v4; // x0
tinyxml2::XMLDocument *v5; // x20
double v6; // d0
cocos2d::CCUserDefault *v7; // x0
__int64 *XMLFilePath; // x0
long double v9; // [xsp+30h] [xbp+30h]
tinyxml2::XMLDocument *v10; // [xsp+40h] [xbp+40h] BYREF
v9 = *(long double *)&a3;
v10 = nullptr;
v4 = (tinyxml2::XMLNode **)sub_B1F9A4(a2, &v10);
v5 = v10;
v6 = *(double *)&v9;
if ( v4 )
{
tinyxml2::XMLNode::DeleteChild(v4[2], (tinyxml2::XMLNode *)v4);
v7 = cocos2d::CCUserDefault::sharedUserDefault();
XMLFilePath = cocos2d::CCUserDefault::getXMLFilePath(v7);
tinyxml2::XMLDocument::SaveFile(v5, (const char *)*XMLFilePath, 0);
v6 = *(double *)&v9;
if ( v5 )
{
(*(void (__fastcall **)(tinyxml2::XMLDocument *, long double))(*(_QWORD *)v5 + 136LL))(v5, v9);
v6 = *(double *)&v9;
}
}
setDoubleForKeyJNI(a2, v6);
}