//
// sub_E6B68C from 0xe6b68c to 0xe6b7c4 (312 bytes)
//
// 1 xrefs:
// > jinit_c_coef_controller @ 0xe6b7fc
//
// 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:10:34 +0000
//
__int64 (__fastcall *__fastcall sub_E6B68C(void (__fastcall ***a1)(_QWORD), int a2))(__int64 a1, __int64 a2)
{
void (__fastcall **v2)(_QWORD); // x19
int v3; // w2
__int64 (__fastcall *v4)(_QWORD); // x2
void (__fastcall *v6)(_QWORD); // x2
void (__fastcall **v7)(_QWORD); // x2
void (__fastcall *v8)(_QWORD); // x2
void (__fastcall *v9)(_QWORD); // x3
v2 = a1[65];
v3 = *((_DWORD *)a1 + 93);
*((_DWORD *)v2 + 4) = 0;
if ( v3 > 1 )
{
*((_DWORD *)v2 + 7) = 1;
goto LABEL_3;
}
v7 = a1[47];
if ( *((_DWORD *)a1 + 92) != 1 )
{
*((_DWORD *)v2 + 7) = *((_DWORD *)v7 + 3);
LABEL_3:
*((_DWORD *)v2 + 5) = 0;
*((_DWORD *)v2 + 6) = 0;
if ( a2 != 2 )
goto LABEL_4;
goto LABEL_13;
}
*((_DWORD *)v2 + 7) = *((_DWORD *)v7 + 19);
*((_DWORD *)v2 + 5) = 0;
*((_DWORD *)v2 + 6) = 0;
if ( a2 != 2 )
{
LABEL_4:
if ( a2 == 3 )
{
if ( !v2[14] )
{
v9 = **a1;
*((_DWORD *)*a1 + 10) = 3;
v9(a1);
}
v2[1] = (void (__fastcall *)(_QWORD))sub_E6AED8;
return sub_E6AED8;
}
else if ( a2 )
{
v4 = (__int64 (__fastcall *)(_QWORD))**a1;
*((_DWORD *)*a1 + 10) = 3;
return (__int64 (__fastcall *)(__int64, __int64))v4(a1);
}
else
{
if ( v2[14] )
{
v6 = **a1;
*((_DWORD *)*a1 + 10) = 3;
v6(a1);
}
v2[1] = (void (__fastcall *)(_QWORD))sub_E6B168;
return sub_E6B168;
}
}
LABEL_13:
if ( !v2[14] )
{
v8 = **a1;
*((_DWORD *)*a1 + 10) = 3;
v8(a1);
}
v2[1] = (void (__fastcall *)(_QWORD))sub_E6A9B4;
return (__int64 (__fastcall *)(__int64, __int64))sub_E6A9B4;
}