//
// sub_1065588 from 0x1065588 to 0x10655cc (68 bytes)
//
// 1 xrefs:
// > X509_STORE_new @ 0x10659f4
//
// 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:16:53 +0000
//
__int64 __fastcall sub_1065588(int **a1, __int64 *a2)
{
int *v2; // x3
__int64 v3; // x2
int v4; // w1
__int64 result; // x0
v2 = *a1;
v3 = *a2;
v4 = **a1;
result = (unsigned int)(v4 - *(_DWORD *)v3);
if ( v4 == *(_DWORD *)v3 )
{
if ( v4 == 1 )
{
return X509_subject_name_cmp(*((_QWORD *)v2 + 1), *(_QWORD *)(v3 + 8));
}
else if ( v4 == 2 )
{
return X509_CRL_cmp(*((_QWORD *)v2 + 1), *(_QWORD *)(v3 + 8));
}
}
return result;
}