//
// ossl_init_thread_start from 0xa1fa40 to 0xa1fad8 (152 bytes)
//
// 3 xrefs:
// > ASYNC_init_thread @ 0x9dfa78
// > ERR_get_state @ 0xa0ee58
// > ??> @ 0x78d2c
//
// 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:07:55 +0000
//
int __fastcall ossl_init_thread_start(char a1)
{
int *local; // r5
bool v3; // zf
int v4; // r3
__int64 v5; // r6
local = (int *)CRYPTO_THREAD_get_local(&unk_D35708);
if ( !local )
{
local = (int *)CRYPTO_zalloc(8, "crypto/init.c", 45);
CRYPTO_THREAD_set_local(&unk_D35708, local);
if ( !local )
return 0;
}
v4 = a1 & 1;
v3 = v4 == 0;
if ( (a1 & 1) != 0 )
v4 = 1;
v5 = a1 & 2;
if ( !v3 )
*local = v4;
if ( v5 )
local[1] = 1;
return 1;
}