//
// PlayerObject::hardFlipGravity from 0x10040d5e0 to 0x10040d670 (144 bytes)
//
// 1 xrefs:
// > GJBaseGameLayer::checkRepellPlayer @ 0x100153951
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void __fastcall PlayerObject::hardFlipGravity(PlayerObject *a1)
{
__m128d v1; // xmm0
double v2; // xmm1_8
__m128d v3; // xmm3
PlayerObject::flipGravity(a1, !a1->m_isUpsideDown, 1);
if ( a1->m_isUpsideDown )
v1 = (__m128d)0x4000000000000000uLL;
else
v1 = (__m128d)0xC000000000000000LL;
v2 = _mm_cvtepi32_pd(_mm_cvttpd_epi32(v1)).f64[0];
if ( v1.f64[0] != v2 )
{
v1.f64[0] = (v1.f64[0] - v2) * 1000.0;
v3 = _mm_or_pd(_mm_and_pd((__m128d)xmmword_100816590, v1), (__m128d)xmmword_100816960);
v3.f64[0] = v3.f64[0] + v1.f64[0];
v1.f64[0] = _mm_round_sd((__m128d)0LL, v3, 11).f64[0] / 1000.0 + v2;
}
a1->m_yVelocity = v1.f64[0];
}