//
// cocos2d::CCLayerRGBA::setOpacity from 0xd5c880 to 0xd5c918 (152 bytes)
//
// 18 xrefs:
// > cocos2d::extension::CCControlButton::setOpacity @ 0xd0e108
// > `non-virtual thunk to'cocos2d::CCLayerRGBA::setOpacity @ 0xd5c91c
// > cocos2d::CCLayerColor::setOpacity @ 0xd5c930
// > ??> @ 0xbeb40
// > ??> @ 0x1416590
// > ??> @ 0x141e1f0
// > ??> @ 0x14c35a0
// > ??> @ 0x14e2ec0
// > ??> @ 0x150a180
// > ??> @ 0x150b0d0
// > ??> @ 0x150b7e0
// > ??> @ 0x150bf00
// > ??> @ 0x150c620
// > ??> @ 0x150d380
// > ??> @ 0x150e060
// > ??> @ 0x150e760
// > ??> @ 0x1519b20
// > ??> @ 0x15243d0
//
// 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:07:48 +0000
//
__int64 __fastcall cocos2d::CCLayerRGBA::setOpacity(__int64 this, char a2)
{
int v2; // w2
__int64 v3; // x19
const void *v4; // x0
void *v5; // x0
void *v6; // x20
__int64 v7; // x1
*(_BYTE *)(this + 417) = a2;
v2 = *(unsigned __int8 *)(this + 424);
*(_BYTE *)(this + 416) = a2;
if ( v2 )
{
v3 = this;
v4 = *(const void **)(this + 216);
if ( v4
&& (v5 = _dynamic_cast(
v4,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCNode,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCRGBAProtocol,
-2),
(v6 = v5) != nullptr)
&& (*(unsigned __int8 (__fastcall **)(void *))(*(_QWORD *)v5 + 88LL))(v5) )
{
v7 = (*(unsigned __int8 (__fastcall **)(void *))(*(_QWORD *)v6 + 24LL))(v6);
}
else
{
v7 = 255;
}
return (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)v3 + 1176LL))(v3, v7);
}
return this;
}