//
// sub_1004C0114 from 0x1004c0114 to 0x1004c01c0 (172 bytes)
//
// 5 xrefs:
// > sub_1004BD1C8 @ 0x1004bd480
// > sub_1004BEB94 @ 0x1004bf428
// > sub_1004BEB94 @ 0x1004bf814
// > DeathTrackerPopup::mountVirtualRow @ 0x1004c07a8
// > DeathTrackerPopup::mountVirtualRow @ 0x1004c0a6c
//
// 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 11:06:19 +0000
//
__int64 __fastcall sub_1004C0114(double a1, float32x2_t a2)
{
int8x8_t v2; // d2
int32x2_t v3; // d3
int8x8_t v4; // d2
unsigned int v5; // w8
float v6; // s0
int v7; // w8
int32x2_t v8; // d0
if ( *(float *)&a1 < 0.0 )
*(float *)&a1 = 0.0;
if ( *(float *)&a1 > 1.0 )
*(float *)&a1 = 1.0;
a2.i32[0] = 0.5;
v2 = (int8x8_t)vdup_lane_s32(vcgt_f32(a2, *(float32x2_t *)&a1), 0);
v3 = (int32x2_t)vbsl_s8(v2, (int8x8_t)205LL, (int8x8_t)0xF00000019LL);
v4 = vbsl_s8(v2, (int8x8_t)0x2D000000EBLL, (int8x8_t)205LL);
if ( *(float *)&a1 >= 0.5 )
v5 = 255;
else
v5 = 25;
if ( *(float *)&a1 >= 0.5 )
*(float *)&a1 = *(float *)&a1 + -0.5;
v6 = *(float *)&a1 + *(float *)&a1;
v7 = (int)(float)((float)v5 + (float)((float)(v5 ^ 0xFF) * v6));
v8 = (int32x2_t)vshl_u32(
(uint32x2_t)vcvt_s32_f32(
vmla_n_f32(
vcvt_f32_u32((uint32x2_t)v4),
vcvt_f32_s32(vsub_s32(v3, (int32x2_t)v4)),
v6)),
(uint32x2_t)0x1000000008LL);
return vorr_s8((int8x8_t)v8, (int8x8_t)vdup_lane_s32(v8, 1)).u32[0] | v7;
}