//
// CCCountdown::init from 0x68f788 to 0x68f9ec (612 bytes)
//
// 3 xrefs:
// > CCCountdown::create @ 0x68fbec
// > ??> @ 0x5bd38
// > ??> @ 0x14149a0
//
// 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 12:50:34 +0000
//
__int64 __fastcall CCCountdown::init(cocos2d::CCProgressTimer **this)
{
unsigned __int8 v2; // w0
const char *v3; // x1
unsigned int v4; // w22
cocos2d::CCProgressTimer *v5; // x0
cocos2d::CCSprite *v6; // x1
__int64 v7; // x24
void (__fastcall *v8)(__int64, __int64 *); // x25
__int64 v9; // x0
__int64 v10; // x0
void (__fastcall *v11)(__int64, __int64 *); // x2
__int64 v12; // x2
__int64 v13; // x24
cocos2d::CCProgressTimer *v14; // x1
void (__fastcall *v15)(__int64, __int64 *); // x25
__int64 v16; // x0
__int64 v17; // x24
void (__fastcall *v18)(__int64, __int64 *); // x25
__int64 v19; // x24
void (__fastcall *v20)(__int64, __int64 *); // x25
__int64 v21; // x26
float v23; // [xsp+60h] [xbp+60h]
float v24; // [xsp+60h] [xbp+60h]
_BYTE v25[8]; // [xsp+78h] [xbp+78h] BYREF
__int64 v26; // [xsp+80h] [xbp+80h] BYREF
v2 = cocos2d::CCSprite::initWithFile((cocos2d::CCSprite *)this, "timer_outerCircle.png");
v4 = v2;
if ( v2 )
{
v5 = (cocos2d::CCProgressTimer *)cocos2d::CCSprite::create((cocos2d::CCSprite *)"timer_innerCircle.png", v3);
*(this + 75) = (cocos2d::CCProgressTimer *)cocos2d::CCProgressTimer::create(v5, v6);
cocos2d::CCProgressTimer::setType();
(*((void (__fastcall **)(cocos2d::CCProgressTimer **, _QWORD, __int64))*this + 58))(
this,
*(this + 75),
0xFFFFFFFFLL);
v7 = (__int64)*(this + 75);
v8 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v7 + 184LL);
v23 = *(float *)(*((__int64 (__fastcall **)(cocos2d::CCProgressTimer **))*this + 41))(this) * 0.5;
v9 = (*((__int64 (__fastcall **)(cocos2d::CCProgressTimer **))*this + 41))(this);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v26, v23, *(float *)(v9 + 4) * 0.5);
v8(v7, &v26);
cocos2d::CCProgressTimer::setPercentage(*(this + 75), 100.0);
v10 = *((_QWORD *)*(this + 75) + 44);
v11 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v10 + 960LL);
LOWORD(v26) = 10240;
BYTE2(v26) = 70;
v11(v10, &v26);
cocos2d::CCProgressTimer::updateColor(*(this + 75));
v12 = (__int64)*(this + 75);
*(_BYTE *)(v12 + 392) = 1;
v13 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"0", "levelFont.fnt", (const char *)v12);
v14 = *this;
*(this + 77) = (cocos2d::CCProgressTimer *)v13;
v15 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v13 + 184LL);
v24 = *(float *)(*((__int64 (__fastcall **)(cocos2d::CCProgressTimer **))v14 + 41))(this) * 0.5;
v16 = (*((__int64 (__fastcall **)(cocos2d::CCProgressTimer **))*this + 41))(this);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v26, v24, *(float *)(v16 + 4) * 0.5);
v15(v13, &v26);
v17 = (__int64)*(this + 77);
v18 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v17 + 296LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v26, 0.5, 0.5);
v18(v17, &v26);
v19 = (__int64)*(this + 77);
v20 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v19 + 184LL);
v21 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v19 + 192LL))(v19);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v25, 0.0, -3.0);
cocos2d::CCPoint::operator+(&v26, v21, v25);
v20(v19, &v26);
(*((void (__fastcall **)(cocos2d::CCProgressTimer **, _QWORD, __int64))*this + 58))(this, *(this + 77), 1);
}
return v4;
}