// // cocos2d::ccpSegmentIntersect from 0x100341af0 to 0x100341bee (254 bytes) // // 0 xrefs: // // 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 12:28:43 +0000 // char __fastcall cocos2d::ccpSegmentIntersect(float *a1, float *a2, __int64 a3, unsigned int *a4) { __m128d v4; // xmm0 __m128 v5; // xmm2 float v6; // xmm4_4 __m128 v7; // xmm1 __m128 v8; // xmm5 __m128 v9; // xmm3 char v10; // cl __m128 v11; // xmm6 __m128 v12; // xmm3 __m128 inserted; // xmm5 __m128 v14; // xmm6 __m128 v15; // xmm2 __m128 v16; // xmm0 v4 = (__m128d)*(unsigned int *)a1; v5 = (__m128)*(unsigned int *)a2; if ( *(float *)v4.f64 == v5.f32[0] && a1[1] == a2[1] ) goto LABEL_5; v6 = *(float *)a3; v7 = (__m128)*a4; if ( *(float *)a3 == v7.f32[0] ) { v8 = (__m128)*(unsigned int *)(a3 + 4); v9 = (__m128)a4[1]; if ( v8.f32[0] == v9.f32[0] ) { LABEL_5: v10 = 0; goto LABEL_10; } } else { v9 = (__m128)a4[1]; v8 = (__m128)*(unsigned int *)(a3 + 4); } v7.f32[0] = v7.f32[0] - v6; v11 = (__m128)*((unsigned int *)a1 + 1); v12 = _mm_sub_ps(_mm_insert_ps(v9, (__m128)*((unsigned int *)a2 + 1), 16), _mm_insert_ps(v8, v11, 16)); inserted = _mm_insert_ps(v8, (__m128)v4, 16); *(float *)v4.f64 = *(float *)v4.f64 - v6; v14 = _mm_sub_ps(_mm_insert_ps(v11, v5, 16), inserted); v15 = _mm_movehdup_ps(v14); v15.f32[0] = (float)(v15.f32[0] * v12.f32[0]) - (float)(_mm_movehdup_ps(v12).f32[0] * v7.f32[0]); v4 = (__m128d)_mm_sub_ps( _mm_mul_ps(_mm_blend_ps(_mm_moveldup_ps(v14), v7, 1), v14), _mm_mul_ps(_mm_moveldup_ps((__m128)v4), v12)); if ( v15.f32[0] == 0.0 ) { v10 = _mm_cvtsi128_si32((__m128i)_mm_or_ps( _mm_cmpeq_ps((__m128)0LL, (__m128)v4), _mm_cmpeq_ps(_mm_movehdup_ps((__m128)v4), (__m128)0LL))); } else { v4 = (__m128d)_mm_div_ps((__m128)v4, _mm_moveldup_ps(v15)); v10 = 1; } LABEL_10: v16 = (__m128)_mm_movedup_pd(v4); return v10 & (_mm_movemask_ps( _mm_blend_ps( _mm_cmple_ps((__m128)0x3F8000003F800000uLL, v16), _mm_cmple_ps(v16, (__m128)0x3F8000003F800000uLL), 3)) == 15); }
GD Web Decomp Icon

GD Web Decomp

Raw Source