//
// sub_1001F9FF0 from 0x1001f9ff0 to 0x1001fa0c6 (214 bytes)
//
// 1 xrefs:
// > GJRotateCommandLayer::updateDegreesLabel @ 0x100003ca2
//
// 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
//
_QWORD *__fastcall sub_1001F9FF0(_QWORD *a1, __m128 a2)
{
char v2; // al
cocos2d::CCString *v3; // rax
const char *CString; // r12
size_t v5; // rax
size_t v6; // r15
void *v7; // r14
size_t v8; // r13
if ( _mm_cvtepi32_ps(_mm_cvttps_epi32(a2)).f32[0] == a2.f32[0] )
{
v3 = (cocos2d::CCString *)sub_1007AB580("%i", v2);
}
else
{
*(double *)a2.i64 = a2.f32[0];
v3 = (cocos2d::CCString *)sub_1007AB580("%0.2f", v2);
}
CString = cocos2d::CCString::getCString(v3);
v5 = strlen(CString);
if ( v5 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100006BF0(*(double *)a2.i64);
v6 = v5;
if ( v5 >= 0x17 )
{
v8 = 26;
if ( (v5 | 7) != 0x17 )
v8 = (v5 | 7) + 1;
v7 = operator new(v8);
a1[2] = v7;
*a1 = v8 + 1;
a1[1] = v6;
}
else
{
*(_BYTE *)a1 = 2 * v5;
v7 = (char *)a1 + 1;
if ( !v5 )
goto LABEL_12;
}
memmove(v7, CString, v6);
LABEL_12:
*((_BYTE *)v7 + v6) = 0;
return a1;
}