//
// -[CCDirectorCaller startMainLoop] from 0x1002af68c to 0x1002af790 (260 bytes)
//
// 1 xrefs:
// > ??> @ 0x1009cdcb0
//
// 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 11:02:19 +0000
//
void __cdecl -[CCDirectorCaller startMainLoop](CCDirectorCaller *self, SEL a2)
{
__int64 v3; // x0
__int64 v4; // x20
int v5; // w0
id displayLink; // x21
float v7; // s8
__int64 v8; // x0
double v9; // d0
double v10; // d1
double v11; // d2
CAFrameRateRange v12; // 0:kr00_12.12
self->_lastTime = 0.0;
objc_msgSend(self->displayLink, "invalidate");
self->displayLink = nullptr;
self->displayLink = -[objc_class displayLinkWithTarget:selector:](
NSClassFromString(&CFSTR("CADisplayLink").isa),
"displayLinkWithTarget:selector:",
self,
"doCaller:");
v3 = -[UIScreen maximumFramesPerSecond](
+[UIScreen mainScreen](&OBJC_CLASS___UIScreen, "mainScreen"),
"maximumFramesPerSecond");
if ( v3 >= 60 )
v4 = 60;
else
v4 = v3;
v5 = sub_100754934(2, 15, 0, 0);
displayLink = self->displayLink;
if ( v5 )
{
v7 = (float)v4;
v12 = CAFrameRateRangeMake((float)v4, (float)v4, (float)v4);
*(float *)&v9 = v12.minimum;
*(float *)&v10 = v12.maximum;
*(float *)&v11 = v12.preferred;
objc_msgSend(displayLink, "setPreferredFrameRateRange:", v9, v10, v11);
}
else
{
objc_msgSend(self->displayLink, "setPreferredFramesPerSecond:", v4);
v7 = (float)v4;
}
objc_msgSend(
self->displayLink,
"addToRunLoop:forMode:",
+[NSRunLoop currentRunLoop](&OBJC_CLASS___NSRunLoop, "currentRunLoop"),
NSRunLoopCommonModes);
v8 = cocos2d::CCDirector::sharedDirector();
(*(void (__fastcall **)(__int64, double))(*(_QWORD *)v8 + 96LL))(v8, (float)(1.0 / v7));
}