//
// GJScaleControl::loadValues from 0xbd3244 to 0xbd3684 (1088 bytes)
//
// 4 xrefs:
// > EditorUI::updateScaleControl @ 0xc0202c
// > EditorUI::updateScaleControl @ 0xc02078
// > EditorUI::updateScaleControl @ 0xc02100
// > ??> @ 0xc2f38
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 13:03:38 +0000
//
__int64 __fastcall GJScaleControl::loadValues(GJScaleControl *this, float *a2, cocos2d::CCArray *a3, __int64 a4)
{
int v7; // w0
float v8; // s10
unsigned int v9; // w25
float v10; // s9
__int64 v11; // x19
__int64 v12; // x0
float v13; // s3
float v14; // s2
float v15; // s1
float v16; // s0
Slider *v17; // x19
GJScaleControl *v18; // x0
float v19; // s8
float v20; // s0
float v21; // s0
Slider *v22; // x19
float v23; // s0
float v24; // s10
Slider *v25; // x19
float v26; // s0
const char *v27; // x1
const char *v28; // x1
const char *v29; // x1
__int64 v30; // x1
int v31; // w2
__int64 v32; // x21
__int64 v33; // x2
__int64 v34; // x0
void (__fastcall *v35)(__int64, __int64 *); // x20
__int64 v36; // x0
__int64 v37; // x23
unsigned int v39; // w25
unsigned int v40; // w1
GameObject *v41; // x26
float *v42; // x19
float v43; // s0
float *v44; // [xsp+78h] [xbp+78h]
_BYTE v45[8]; // [xsp+88h] [xbp+88h] BYREF
__int64 v46; // [xsp+90h] [xbp+90h] BYREF
*((_BYTE *)this + 456) = 1;
if ( a3 )
{
v44 = a2;
v7 = cocos2d::CCArray::count(a3);
a2 = v44;
if ( v7 )
{
v8 = -1.0;
v9 = 0;
v10 = -1.0;
while ( 1 )
{
if ( v9 >= (unsigned int)cocos2d::CCArray::count(a3) )
{
v19 = v8;
if ( v10 == -2.0 )
v10 = 1.0;
if ( v8 == -2.0 )
v19 = 1.0;
v39 = 0;
while ( v39 < (unsigned int)cocos2d::CCArray::count(a3) )
{
v40 = v39++;
v41 = (GameObject *)cocos2d::CCArray::objectAtIndex(a3, v40);
LODWORD(v46) = *((_DWORD *)v41 + 229);
v42 = (float *)std::unordered_map::operator[](a4, (int *)&v46);
GameObjectEditorState::loadValues((GameObjectEditorState *)v42, v41);
v43 = v42[3] / v19;
v42[2] = v42[2] / v10;
v42[3] = v43;
}
v20 = v10;
v17 = *((Slider **)this + 51);
v18 = this;
LABEL_16:
v21 = GJScaleControl::valueFromScale(v18, v20);
Slider::setValue(v17, v21);
v22 = *((Slider **)this + 52);
v23 = GJScaleControl::valueFromScale(this, v19);
Slider::setValue(v22, v23);
v24 = v19;
if ( v10 >= v19 )
v24 = v10;
goto LABEL_18;
}
v11 = cocos2d::CCArray::objectAtIndex(a3, v9);
LODWORD(v46) = *(_DWORD *)(v11 + 916);
v12 = std::unordered_map::operator[](a4, (int *)&v46);
v13 = *(float *)(v11 + 1312);
v14 = *(float *)(v11 + 1316);
v15 = *(float *)(v11 + 1152) / v13;
v16 = *(float *)(v11 + 1156) / v14;
if ( v10 == -1.0 )
{
v10 = *(float *)(v11 + 1152) / v13;
if ( v8 == -1.0 )
goto LABEL_13;
}
else
{
if ( v10 != v15 )
v10 = -2.0;
if ( v8 == -1.0 )
{
LABEL_13:
v8 = *(float *)(v11 + 1156) / v14;
goto LABEL_9;
}
}
if ( v8 != v16 )
v8 = -2.0;
LABEL_9:
++v9;
*(float *)(v12 + 8) = v15;
*(float *)(v12 + 12) = v16;
}
}
}
if ( a2 )
{
v17 = *((Slider **)this + 51);
v18 = this;
v10 = a2[288] / a2[328];
v19 = a2[289] / a2[329];
v20 = v10;
goto LABEL_16;
}
v19 = -1.0;
v10 = -1.0;
v24 = -1.0;
LABEL_18:
v25 = *((Slider **)this + 53);
v26 = GJScaleControl::valueFromScale(this, v24);
Slider::setValue(v25, v26);
GJScaleControl::updateLabelX(this, v10, v27);
GJScaleControl::updateLabelY(this, v19, v28);
GJScaleControl::updateLabelXY(this, v24, v29);
v30 = *((_QWORD *)this + 53);
v31 = *((_DWORD *)this + 148);
*((float *)this + 109) = v10;
*((float *)this + 110) = v19;
LODWORD(v25) = v31 == 46;
(*(void (__fastcall **)(__int64, bool))(*(_QWORD *)v30 + 344LL))(v30, v31 != 46);
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 60) + 344LL))(
*((_QWORD *)this + 60),
(unsigned int)v25 ^ 1);
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 63) + 344LL))(
*((_QWORD *)this + 63),
(unsigned int)v25 ^ 1);
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 66) + 344LL))(
*((_QWORD *)this + 66),
(unsigned int)v25 ^ 1);
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 51) + 344LL))(*((_QWORD *)this + 51), (unsigned int)v25);
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 58) + 344LL))(*((_QWORD *)this + 58), (unsigned int)v25);
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 61) + 344LL))(*((_QWORD *)this + 61), (unsigned int)v25);
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 64) + 344LL))(*((_QWORD *)this + 64), (unsigned int)v25);
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 52) + 344LL))(*((_QWORD *)this + 52), (unsigned int)v25);
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 59) + 344LL))(*((_QWORD *)this + 59), (unsigned int)v25);
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 62) + 344LL))(*((_QWORD *)this + 62), (unsigned int)v25);
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 65) + 344LL))(*((_QWORD *)this + 65), (unsigned int)v25);
v32 = (*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 75) + 512LL))(*((_QWORD *)this + 75));
v33 = *((_QWORD *)this + 52);
v34 = *((_QWORD *)this + 53);
v35 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v32 + 184LL);
if ( (_DWORD)v25 )
v36 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v33 + 192LL))(v33);
else
v36 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v34 + 192LL))(v34);
v37 = v36;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v45, 0.0, 60.0);
cocos2d::CCPoint::operator+(&v46, v37);
v35(v32, &v46);
return _stack_chk_guard;
}