//
// sub_10771AC from 0x10771ac to 0x10772b4 (264 bytes)
//
// 2 xrefs:
// > X509v3_asid_add_id_or_range @ 0x1077f7c
// > X509v3_asid_add_id_or_range @ 0x1077f84
//
// 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:17:04 +0000
//
__int64 __fastcall sub_10771AC(int **a1, __int64 *a2)
{
int *v2; // x19
__int64 v3; // x20
int v4; // w3
_QWORD *v5; // x0
__int64 *v6; // x2
__int64 v7; // x1
__int64 result; // x0
v2 = *a1;
v3 = *a2;
v4 = **a1;
if ( !v4 )
{
v5 = *((_QWORD **)v2 + 1);
if ( v5 )
goto LABEL_3;
LABEL_15:
OPENSSL_die(
"assertion failed: (a->type == ASIdOrRange_id && a->u.id != NULL) || (a->type == ASIdOrRange_range && a->u.range !="
" NULL && a->u.range->min != NULL && a->u.range->max != NULL)",
"crypto/x509v3/v3_asid.c",
128);
}
if ( v4 != 1 )
goto LABEL_15;
v5 = *((_QWORD **)v2 + 1);
if ( !v5 || !*v5 || !v5[1] )
goto LABEL_15;
LABEL_3:
if ( !*(_DWORD *)v3 )
{
v7 = *(_QWORD *)(v3 + 8);
if ( v7 )
{
if ( v4 )
v5 = (_QWORD *)*v5;
return ASN1_INTEGER_cmp(v5, v7);
}
LABEL_21:
OPENSSL_die(
"assertion failed: (b->type == ASIdOrRange_id && b->u.id != NULL) || (b->type == ASIdOrRange_range && b->u.range !="
" NULL && b->u.range->min != NULL && b->u.range->max != NULL)",
"crypto/x509v3/v3_asid.c",
132);
}
if ( *(_DWORD *)v3 != 1 )
goto LABEL_21;
v6 = *(__int64 **)(v3 + 8);
if ( !v6 )
goto LABEL_21;
v7 = *v6;
if ( !*v6 || !v6[1] )
goto LABEL_21;
if ( !v4 )
return ASN1_INTEGER_cmp(v5, v7);
result = ASN1_INTEGER_cmp(*v5, v7);
if ( !(_DWORD)result )
return ASN1_INTEGER_cmp(*(_QWORD *)(*((_QWORD *)v2 + 1) + 8LL), *(_QWORD *)(*(_QWORD *)(v3 + 8) + 8LL));
return result;
}