//
// TouchControlEditLayer::copyTouchFrom from 0x140456500 to 0x14045658c (140 bytes)
//
// 4 xrefs:
// > TouchControlEditLayer::onReset @ 0x14045553f
// > TouchControlEditLayer::onPaste @ 0x140455d2f
// > TouchControlEditLayer::onApplyGlobal @ 0x1404565bd
// > ??> @ 0x140927a7c
//
// 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:32:29 +0000
//
__int64 __fastcall TouchControlEditLayer::copyTouchFrom(__int64 a1, __int64 a2)
{
__int64 v4; // rcx
__int64 v5; // r9
__int64 result; // rax
v4 = *(_QWORD *)(a1 + 1008) + 136LL;
if ( v4 != a2 + 136 )
{
v5 = *(_QWORD *)(a2 + 144) - *(_QWORD *)(a2 + 136);
sub_140457120(v4, *(_QWORD *)(a2 + 136), v5 / 60 + v5);
}
*(_DWORD *)(*(_QWORD *)(a1 + 1008) + 60LL) = *(_DWORD *)(a2 + 60);
*(_DWORD *)(*(_QWORD *)(a1 + 1008) + 64LL) = *(_DWORD *)(a2 + 64);
result = *(unsigned int *)(a2 + 68);
*(_DWORD *)(*(_QWORD *)(a1 + 1008) + 68LL) = result;
return result;
}