//
// std::__ndk1::__assoc_sub_state::set_value from 0x97f074 to 0x97f114 (160 bytes)
//
// 1 xrefs:
// > std::__ndk1::promise::set_value @ 0x97f76c
//
// 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:06:05 +0000
//
int __fastcall std::__assoc_sub_state::set_value(std::__assoc_sub_state *this)
{
pthread_mutex_t *v2; // r4
int v3; // r6
void *exception; // r5
_DWORD v6[2]; // [sp+4h] [bp-14h] BYREF
v2 = (pthread_mutex_t *)((char *)this + 12);
std::mutex::lock((pthread_mutex_t *)((char *)this + 12));
if ( (*((_BYTE *)this + 20) & 1) != 0
|| (v6[0] = 0, v3 = *((_DWORD *)this + 2), std::exception_ptr::~exception_ptr((std::exception_ptr *)v6), v3) )
{
exception = _cxa_allocate_exception(0x10u);
std::future_category();
std::future_error::future_error((int)exception, 2u, (unsigned int)&dword_D33CC4);
_cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::future_error,
(void (*)(void *))std::future_error::~future_error);
}
*((_DWORD *)this + 5) |= 5u;
std::condition_variable::notify_all((pthread_cond_t *)((char *)this + 16));
std::mutex::unlock(v2);
return _stack_chk_guard - v6[1];
}