//
// X509_policy_tree_free from 0xa6079c to 0xa60850 (180 bytes)
//
// 6 xrefs:
// > X509_STORE_CTX_cleanup @ 0xa5a7b0
// > X509_policy_check @ 0xa608d4
// > X509_policy_check @ 0xa60b0c
// > X509_policy_check @ 0xa60c24
// > X509_policy_check @ 0xa610d4
// > ??> @ 0x8124c
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 12:08:33 +0000
//
void __fastcall X509_policy_tree_free(int a1)
{
int v2; // r4
int v3; // r5
if ( a1 )
{
OPENSSL_sk_free(*(void ***)(a1 + 12));
OPENSSL_sk_pop_free(*(_DWORD *)(a1 + 16), (void (__fastcall *)(int))sub_A6076C);
if ( *(int *)(a1 + 4) > 0 )
{
v2 = *(_DWORD *)a1 + 16;
v3 = 0;
do
{
X509_free(*(_DWORD **)(v2 - 16));
OPENSSL_sk_pop_free(*(_DWORD *)(v2 - 12), (void (__fastcall *)(int))policy_node_free);
policy_node_free(*(_DWORD *)(v2 - 8));
++v3;
v2 += 16;
}
while ( *(_DWORD *)(a1 + 4) > v3 );
}
OPENSSL_sk_pop_free(*(_DWORD *)(a1 + 8), (void (__fastcall *)(int))policy_data_free);
CRYPTO_free(*(void **)a1, (int)"crypto/x509v3/pcy_tree.c", 622);
CRYPTO_free((void *)a1, (int)"crypto/x509v3/pcy_tree.c", 623);
}
}