//
// cocos2d::CCTileMapAtlas::updateAtlasValueAt from 0x1800aee00 to 0x1800af104 (772 bytes)
//
// 4 xrefs:
// > cocos2d::CCTileMapAtlas::setTile @ 0x1800aed8e
// > cocos2d::CCTileMapAtlas::updateAtlasValues @ 0x1800af1d2
// > ??> @ 0x18014cf68
// > ??> @ 0x1801c2340
//
// This function is hookable on this platform (idp: pc, 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 11:22:18 +0000
//
void __fastcall cocos2d::CCTileMapAtlas::updateAtlasValueAt(
cocos2d::CCTextureAtlas **this,
const struct cocos2d::CCPoint *a2,
const struct cocos2d::_ccColor3B *a3,
unsigned int a4)
{
cocos2d::CCTileMapAtlas *v4; // rsi
__int64 v7; // r13
__int64 v8; // rax
int v9; // ebp
__int64 v10; // r12
__int64 v11; // r15
int v12; // r14d
cocos2d::CCTileMapAtlas *v13; // rdi
__int64 v14; // rax
float v15; // xmm7_4
__int64 v16; // rax
float v17; // xmm6_4
cocos2d::CCDirector *v18; // rax
float v19; // xmm8_4
cocos2d::CCDirector *v20; // rax
float v21; // xmm2_4
float v22; // xmm1_4
float v23; // xmm0_4
float v24; // xmm8_4
float v25; // xmm2_4
int v26; // eax
int v27; // eax
int v28; // eax
int v29; // ecx
unsigned int v30; // eax
int v32; // [rsp+A8h] [rbp+20h]
v4 = (cocos2d::CCTileMapAtlas *)this;
v7 = a4;
(*(void (__fastcall **)(_QWORD))(*(_QWORD *)*(this + 47) + 80LL))(*(this + 47));
v8 = (*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)v4 + 47) + 104LL))(*((_QWORD *)v4 + 47));
v9 = (int)*(float *)a2;
LODWORD(v4) = *((_DWORD *)v4 + 88);
v10 = v8;
v11 = 96 * v7;
v12 = (int)*((float *)a2 + 1);
LODWORD(a2) = *(unsigned __int8 *)a3;
v13 = (cocos2d::CCTileMapAtlas *)this;
v14 = (*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)*(this + 47) + 88LL))(*(this + 47));
v15 = (float)(*(int (__fastcall **)(__int64))(*(_QWORD *)v14 + 80LL))(v14);
v16 = (*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)v13 + 47) + 88LL))(*((_QWORD *)v13 + 47));
v17 = (float)(*(int (__fastcall **)(__int64))(*(_QWORD *)v16 + 88LL))(v16);
v18 = cocos2d::CCDirector::sharedDirector();
v19 = (float)*((int *)this + 90) * cocos2d::CCDirector::getContentScaleFactor(v18);
v20 = cocos2d::CCDirector::sharedDirector();
v21 = (float)*((int *)this + 91) * cocos2d::CCDirector::getContentScaleFactor(v20);
v22 = (float)((float)(int)((unsigned int)a2 % (unsigned int)v4) * v19) / v15;
v23 = (float)((float)(int)((unsigned int)a2 / (unsigned int)v4) * v21) / v17;
v24 = (float)(v19 / v15) + v22;
*(float *)(v10 + v11 + 16) = v22;
v25 = (float)(v21 / v17) + v23;
*(float *)(v10 + v11 + 20) = v23;
*(float *)(v10 + v11 + 68) = v23;
*(float *)(v10 + v11 + 40) = v22;
*(float *)(v10 + v11 + 64) = v24;
*(float *)(v10 + v11 + 44) = v25;
*(float *)(v10 + v11 + 92) = v25;
*(float *)(v10 + v11 + 88) = v24;
*(float *)(v10 + v11 + 24) = (float)(*((_DWORD *)this + 90) * v9);
v26 = *((_DWORD *)this + 91) * v12;
*(_DWORD *)(v10 + v11 + 32) = 0;
*(float *)(v10 + v11 + 28) = (float)v26;
*(float *)(v10 + v11 + 72) = (float)(*((_DWORD *)this + 90) * (v9 + 1));
v27 = *((_DWORD *)this + 91) * v12;
*(_DWORD *)(v10 + v11 + 80) = 0;
*(float *)(v10 + v11 + 76) = (float)v27;
*(float *)(v10 + 96 * v7) = (float)(*((_DWORD *)this + 90) * v9);
v28 = *((_DWORD *)this + 91) * (v12 + 1);
*(_DWORD *)(v10 + v11 + 8) = 0;
*(float *)(v10 + v11 + 4) = (float)v28;
*(float *)(v10 + v11 + 48) = (float)(*((_DWORD *)this + 90) * (v9 + 1));
v29 = *((_DWORD *)this + 91) * (v12 + 1);
*(_DWORD *)(v10 + v11 + 56) = 0;
*(float *)(v10 + v11 + 52) = (float)v29;
LOWORD(v32) = *((_WORD *)this + 165);
BYTE2(v32) = *((_BYTE *)this + 332);
HIBYTE(v32) = *((_BYTE *)this + 328);
*(_DWORD *)(v10 + v11 + 60) = v32;
*(_DWORD *)(v10 + v11 + 12) = v32;
*(_DWORD *)(v10 + v11 + 84) = v32;
*(_DWORD *)(v10 + v11 + 36) = v32;
*((_BYTE *)*(this + 47) + 72) = 1;
v30 = (*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)v13 + 47) + 72LL))(*((_QWORD *)v13 + 47));
if ( (int)v7 + 1 > v30 )
cocos2d::CCTextureAtlas::increaseTotalQuadsWith(*(this + 47), v7 - v30 + 1);
}