signed __int64 sub_181AFD18() { tesla *v0; // x0 __int64 v1; // x19 __int128 v2; // q0 __int128 v3; // q1 tesla::detail::InitializedShmSession *v4; // x20 __int64 v5; // x19 __int128 v6; // q0 __int128 v7; // q1 tesla::detail::InitializedShmSession *v8; // x20 tesla *v10; // x0 __int64 v11; // x0 __int64 v12; // x0 __int64 v13; // [xsp+0h] [xbp-350h] __int64 (__fastcall *v14)(); // [xsp+160h] [xbp-1F0h] void (*v15)(void); // [xsp+170h] [xbp-1E0h] __int64 (__fastcall *v16)(); // [xsp+178h] [xbp-1D8h] char v17; // [xsp+180h] [xbp-1D0h] __int128 v18; // [xsp+2E0h] [xbp-70h] __int128 v19; // [xsp+2F8h] [xbp-58h] __int64 v20; // [xsp+308h] [xbp-48h] if ( tesla::BaseDvGroup::sync_shm_session_ptr_ ) { v0 = (tesla *)pthread_mutex_trylock( *(_QWORD *)tesla::BaseDvGroup::sync_shm_session_ptr_ + 64LL); if ( (_DWORD)v0 ) goto LABEL_18; v0 = (tesla *)pthread_mutex_unlock( *(_QWORD *)tesla::BaseDvGroup::sync_shm_session_ptr_ + 64LL); } else { sub_181AFF74("TeslaDv_VisionSignals_3cdef8b1da7f2bf5_sync", 43LL); v14 = sub_181B0178; v15 = (void (*)(void))std::_Function_base::_Base_manager::_M_manager; v16 = std::_Function_handler::_M_invoke; v1 = operator new(0x18uLL); memcpy(&v17, &v13, 348LL); *(_QWORD *)&v2 = std::_Function_base::_Base_manager::_M_manager; *(_QWORD *)&v3 = (unsigned __int128)vdupq_n_s64(0x110uLL); *((_QWORD *)&v2 + 1) = std::_Function_handler::_M_invoke; *((_QWORD *)&v3 + 1) = sub_181B0178; v18 = v3; v19 = v2; tesla::detail::InitializedShmSession::InitializedShmSession(v1, &v17); if ( (_QWORD)v19 ) ((void (*)(void))v19)(); v4 = (tesla::detail::InitializedShmSession *)tesla::BaseDvGroup::sync_shm_session_ptr_; tesla::BaseDvGroup::sync_shm_session_ptr_ = v1; if ( v4 ) { tesla::detail::InitializedShmSession::~InitializedShmSession(v4); operator delete((void *)v4); } if ( v15 ) v15(); sub_181AFF74("TeslaDv_VisionSignals_3cdef8b1da7f2bf5_data", 43LL); v15 = (void (*)(void))std::_Function_base::_Base_manager::_M_manager; v16 = std::_Function_handler::_M_invoke; v14 = sub_181B02AC; v5 = operator new(0x18uLL); memcpy(&v17, &v13, 348LL); *(_QWORD *)&v6 = std::_Function_base::_Base_manager::_M_manager; *(_QWORD *)&v7 = (unsigned __int128)vdupq_n_s64(0x2537630uLL); *((_QWORD *)&v6 + 1) = std::_Function_handler::_M_invoke; *((_QWORD *)&v7 + 1) = sub_181B02AC; v18 = v7; v19 = v6; v0 = (tesla *)tesla::detail::InitializedShmSession::InitializedShmSession(v5, &v17); if ( (_QWORD)v19 ) v0 = (tesla *)((__int64 (*)(void))v19)(); v8 = (tesla::detail::InitializedShmSession *)tesla::BaseDvGroup::data_shm_session_ptr_; tesla::BaseDvGroup::data_shm_session_ptr_ = v5; if ( v8 ) { tesla::detail::InitializedShmSession::~InitializedShmSession(v8); operator delete((void *)v8); } if ( v15 ) v0 = (tesla *)((__int64 (*)(void))v15)(); } if ( _stack_chk_guard != v20 ) { LABEL_18: v10 = (tesla *)tesla::get_global_logger(v0); v11 = tesla::get_global_logger(v10); v12 = tesla::logger::send_text_log_message_printf_FATAL( v11, "include/dv/dv_base.hpp", 99LL, "Multiple wait free writer instantiation not allowed"); abort(v12); } return 1LL; }