//
// sub_10065A738 from 0x10065a738 to 0x10065a85c (292 bytes)
//
// 2 xrefs:
// > sub_100644CC4 @ 0x1006452e8
// > sub_10064C35C @ 0x10064c598
//
// 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:10:55 +0000
//
__int64 __fastcall sub_10065A738(_BYTE *a1, int *a2, __int64 a3)
{
int v5; // w0
__int64 v6; // x9
int v8; // w9
int v9; // w10
__int64 v10; // x11
int v11; // w8
if ( !a3 )
return 0;
v5 = sub_100711408(a3);
if ( dword_1009E3A3C == v5 )
{
v6 = 0;
}
else
{
v6 = 1;
if ( dword_1009E3A44 != v5 )
{
v6 = 2;
if ( dword_1009E3A4C != v5 )
{
v6 = 3;
if ( dword_1009E3A54 != v5 )
{
v6 = 4;
if ( dword_1009E3A5C != v5 )
{
v6 = 5;
if ( dword_1009E3A64 != v5 )
return 0;
}
}
}
}
}
v8 = *((_DWORD *)&unk_1009E3A00 + 2 * v6 + 16);
if ( v8 == -1 )
return 0;
v9 = *a2;
if ( dword_1009E3A04 == *a2 )
{
v10 = 0;
}
else
{
v10 = 1;
if ( dword_1009E3A0C != v9 )
{
v10 = 2;
if ( dword_1009E3A14 != v9 )
return 0;
}
}
v11 = *((_DWORD *)&unk_1009E3A00 + 2 * v10 + 2);
if ( v11 == -1 )
return 0;
*a1 = v8;
a1[1] = v11;
return 1;
}