//
// X509_policy_tree_free from 0x1071870 to 0x107193c (204 bytes)
//
// 7 xrefs:
// > X509_STORE_CTX_cleanup @ 0x106bc00
// > X509_policy_check @ 0x10719c8
// > X509_policy_check @ 0x1071bcc
// > X509_policy_check @ 0x1071e30
// > X509_policy_check @ 0x1071e98
// > X509_policy_check @ 0x1072100
// > ??> @ 0xe2738
//
// 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:01 +0000
//
void __fastcall X509_policy_tree_free(__int64 a1)
{
int v2; // w20
__int64 *v3; // x19
__int64 v4; // x0
if ( a1 )
{
v2 = 0;
OPENSSL_sk_free(*(void ***)(a1 + 24));
OPENSSL_sk_pop_free(*(int **)(a1 + 32), (void (__fastcall *)(__int64))sub_107184C);
v3 = *(__int64 **)a1;
if ( *(int *)(a1 + 8) > 0 )
{
do
{
v4 = *v3;
v3 += 4;
++v2;
X509_free(v4);
OPENSSL_sk_pop_free((int *)*(v3 - 3), (void (__fastcall *)(__int64))policy_node_free);
policy_node_free(*(v3 - 2));
}
while ( *(_DWORD *)(a1 + 8) > v2 );
}
OPENSSL_sk_pop_free(*(int **)(a1 + 16), (void (__fastcall *)(__int64))policy_data_free);
CRYPTO_free(*(void **)a1, (__int64)"crypto/x509v3/pcy_tree.c", 622);
CRYPTO_free((void *)a1, (__int64)"crypto/x509v3/pcy_tree.c", 623);
}
}