//
// ossl_init_thread_start from 0x1030208 to 0x10302a0 (152 bytes)
//
// 3 xrefs:
// > ASYNC_init_thread @ 0xfef2a0
// > ERR_get_state @ 0x101e38c
// > ??> @ 0x7f510
//
// 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:20 +0000
//
__int64 __fastcall ossl_init_thread_start(char a1)
{
_DWORD *local; // x20
__int64 result; // x0
local = (_DWORD *)CRYPTO_THREAD_get_local(&unk_1567EAC);
if ( !local )
{
local = (_DWORD *)CRYPTO_zalloc(8, "crypto/init.c", 45);
CRYPTO_THREAD_set_local(&unk_1567EAC, local);
if ( !local )
return 0;
}
if ( (a1 & 1) != 0 )
*local = 1;
result = 1;
if ( (a1 & 2) != 0 )
local[1] = 1;
return result;
}