fdtrf

decompiled_code:
double __fastcall fdtrf(int a1, int a2, int a3)
{
float v3; // xmm2_4
double result; // xmm0_8

if ( a1 <= 0 || (v3 = (float)a3, a2 <= 0) || v3 < 0.0 )
{
mtherr("fdtrf", 1LL);
result = 0.0;
}
else
{
HIDWORD(result) = 0;
*(float *)&result = (float)a1 * 0.5;
incbetf(result, 0.5 * (float)a2, (float)(v3 * (float)a1) / (float)((float)a2 + (float)(v3 * (float)a1)));
}
return result;
}

canonical_decompiled_code:
double __fastcall func1(int a1, int a2, int a3)
{
float v3; // xmm2_4
double result; // xmm0_8

if ( a1 <= 0 || (v3 = (float)a3, a2 <= 0) || v3 < 0.0 )
{
mtherr("fdtrf", 1LL);
result = 0.0;
}
else
{
HIDWORD(result) = 0;
*(float *)&result = (float)a1 * 0.5;
incbetf(result, 0.5 * (float)a2, (float)(v3 * (float)a1) / (float)((float)a2 + (float)(v3 * (float)a1)));
}
return result;
}

original_code:
float fdtrf( int ia, int ib, int xx )
{
float x, a, b, w;
x = xx;
if( (ia < 1) || (ib < 1) || (x < 0.0) )
 {
 mtherr( "fdtrf", 1 );
 return( 0.0 );
 }
a = ia;
b = ib;
w = a * x;
w = w / (b + w);
return( incbetf( 0.5*a, 0.5*b, w) );
}

canonical_original_code:
float fdtrf(int ia, int ib, int xx)
{
float x; float a; float b; float w;
x = xx;
if( (ia < 1) || (ib < 1) || (x < 0.0) )
 {
 mtherr( "fdtrf", 1 );
 return( 0.0 );
 }
a = ia;
b = ib;
w = a * x;
w = w / (b + w);
return( incbetf( 0.5*a, 0.5*b, w) );
}

variable_types: xx int

variable_types: a float


fdtrif

repo: jeremybarnes/cephes

decompiled_code:
float __fastcall fdtrif(int a1, int a2, float a3)
{
float result; // xmm0_4
double v4; // xmm0_8

if ( a1 > 0 && a2 > 0 && a3 > 0.0 && a3 <= 1.0 )
{
v4 = incbif((float)a2 * 0.5, 0.5 * (float)a1);
result = (float)((float)a2 - (float)((float)a2 * *(float *)&v4)) / (float)(*(float *)&v4 * (float)a1);
}
else
{
mtherr("fdtrif", 1LL);
result = 0.0;
}
return result;
}

canonical_decompiled_code:
float __fastcall func2(int a1, int a2, float a3)
{
float result; // xmm0_4
double v4; // xmm0_8

if ( a1 > 0 && a2 > 0 && a3 > 0.0 && a3 <= 1.0 )
{
v4 = incbif((float)a2 * 0.5, 0.5 * (float)a1);
result = (float)((float)a2 - (float)((float)a2 * *(float *)&v4)) / (float)(*(float *)&v4 * (float)a1);
}
else
{
mtherr("fdtrif", 1LL);
result = 0.0;
}
return result;
}

original_code:
float fdtrif( int ia, int ib, float yy )
{
float y, a, b, w, x;
y = yy;
if( (ia < 1) || (ib < 1) || (y <= 0.0) || (y > 1.0) )
 {
 mtherr( "fdtrif", 1 );
 return( 0.0 );
 }
a = ia;
b = ib;
w = incbif( 0.5*b, 0.5*a, y );
x = (b - b*w)/(a*w);
return(x);
}

canonical_original_code:
float fdtrif(int ia, int ib, float yy)
{
float y; float a; float b; float w; float x;
y = yy;
if( (ia < 1) || (ib < 1) || (y <= 0.0) || (y > 1.0) )
 {
 mtherr( "fdtrif", 1 );
 return( 0.0 );
 }
a = ia;
b = ib;
w = incbif( 0.5*b, 0.5*a, y );
x = (b - b*w)/(a*w);
return(x);
}

variable_types: ia int

variable_types: ib int

variable_types: yy float

variable_types: y float

variable_types: b float

variable_types: w float

variable_types: x float

return_type: float


powf

variable_types: u float

variable_types: z float

variable_types: W float

variable_types: Wa float

variable_types: Wb float

variable_types: ya float

variable_types: yb float

variable_types: e int

variable_types: i int

variable_types: nflg int


original_code:
float i1f(float xx)
{
float x, y, z;
x = xx;
z = ( (x) < 0 ? -(x) : (x) );
if( z <= 8.0f )
 {
 y = 0.5f*z - 2.0f;
 z = chbevlf( y, A, 17 ) * z * expf(z);
 }
else
 {
 z = expf(z) * chbevlf( 32.0f/z - 2.0f, B, 7 ) / sqrtf(z);
 }
if( x < 0.0f )
 z = -z;
return( z );
}

canonical_original_code:
float i1f(float xx)
{
float x; float y; float z;
x = xx;
z = ( (x) < 0 ? -(x) : (x) );
if( z <= 8.0f )
 {
 y = 0.5f*z - 2.0f;
 z = chbevlf( y, A, 17 ) * z * expf(z);
 }
else
 {
 z = expf(z) * chbevlf( 32.0f/z - 2.0f, B, 7 ) / sqrtf(z);
 }
if( x < 0.0f )
 z = -z;
return( z );
}

variable_types: xx float


canonical_original_code:
float i1ef(float xx)
{
float x; float y; float z;
x = xx;
z = ( (x) < 0 ? -(x) : (x) );
if( z <= 8.0f )
 {
 y = 0.5f*z - 2.0f;
 z = chbevlf( y, A, 17 ) * z;
 }
else
 {
 z = chbevlf( 32.0f/z - 2.0f, B, 7 ) / sqrtf(z);
 }
if( x < 0.0f )
 z = -z;
return( z );
}


decompiled_code:
float __fastcall j1f(float a1)
{
float v1; // xmm0_4
float v3; // [rsp+4h] [rbp-14h]
float v4; // [rsp+Ch] [rbp-Ch]
float v5; // [rsp+Ch] [rbp-Ch]

v3 = a1;
if ( a1 < 0.0 )
LODWORD(v3) = LODWORD(a1) ^ LC1;
if ( v3 <= 2.0 )
return polevlf(&JP, 4LL) * (float)((float)((float)(v3 * v3) - 14.681971) * v3);
v4 = sqrtf(1.0 / v3);
v5 = polevlf(&MO1, 7LL) * v4;
v1 = polevlf(&PH1, 7LL);
return cosf((float)((float)(v1 * (float)(1.0 / v3)) - 2.3561945) + v3) * v5;
}

canonical_decompiled_code:
float __fastcall func0(float a1)
{
float v1; // xmm0_4
float v3; // [rsp+4h] [rbp-14h]
float v4; // [rsp+Ch] [rbp-Ch]
float v5; // [rsp+Ch] [rbp-Ch]

v3 = a1;
if ( a1 < 0.0 )
LODWORD(v3) = LODWORD(a1) ^ LC1;
if ( v3 <= 2.0 )
return polevlf(&JP, 4LL) * (float)((float)((float)(v3 * v3) - 14.681971) * v3);
v4 = sqrtf(1.0 / v3);
v5 = polevlf(&MO1, 7LL) * v4;
v1 = polevlf(&PH1, 7LL);
return cosf((float)((float)(v1 * (float)(1.0 / v3)) - 2.3561945) + v3) * v5;
}

original_code:
float j1f( float xx )
{
float x, w, z, p, q, xn;
x = xx;
if( x < 0 )
 x = -xx;
if( x <= 2.0f )
 {
 z = x * x;
 p = (z-Z1) * x * polevlf( z, JP, 4 );
 return( p );
 }
q = 1.0f/x;
w = sqrtf(q);
p = w * polevlf( q, MO1, 7);
w = q*q;
xn = q * polevlf( w, PH1, 7) - THPIO4F;
p = p * cosf(xn + x);
return(p);
}

canonical_original_code:
float j1f(float xx)
{
float x; float w; float z; float p; float q; float xn;
x = xx;
if( x < 0 )
 x = -xx;
if( x <= 2.0f )
 {
 z = x * x;
 p = (z-Z1) * x * polevlf( z, JP, 4 );
 return( p );
 }
q = 1.0f/x;
w = sqrtf(q);
p = w * polevlf( q, MO1, 7);
w = q*q;
xn = q * polevlf( w, PH1, 7) - THPIO4F;
p = p * cosf(xn + x);
return(p);
}

variable_types: p float

variable_types: q float

variable_types: xn float


decompiled_code:
float __fastcall y1f(float a1)
{
float result; // xmm0_4
float v2; // xmm0_4
float v4; // [rsp+8h] [rbp-10h]
float v5; // [rsp+Ch] [rbp-Ch]
float v6; // [rsp+Ch] [rbp-Ch]
float v7; // [rsp+Ch] [rbp-Ch]

if ( a1 > 2.0 )
{
v6 = sqrtf(1.0 / a1);
v7 = polevlf(&MO1, 7LL) * v6;
v2 = polevlf(&PH1, 7LL);
result = sinf((float)((float)(v2 * (float)(1.0 / a1)) - 2.3561945) + a1) * v7;
}
else if ( a1 <= 0.0 )
{
mtherr(&unk_2D5, 1LL);
LODWORD(result) = MAXNUMF ^ LC1;
}
else
{
v5 = polevlf(&YP, 4LL) * (float)((float)((float)(a1 * a1) - 4.6653934) * a1);
v4 = j1f(a1);
result = (float)((float)((float)(logf(a1) * v4) - (float)(1.0 / a1)) * 0.63661975) + v5;
}
return result;
}

canonical_decompiled_code:
float __fastcall func1(float a1)
{
float result; // xmm0_4
float v2; // xmm0_4
float v4; // [rsp+8h] [rbp-10h]
float v5; // [rsp+Ch] [rbp-Ch]
float v6; // [rsp+Ch] [rbp-Ch]
float v7; // [rsp+Ch] [rbp-Ch]

if ( a1 > 2.0 )
{
v6 = sqrtf(1.0 / a1);
v7 = polevlf(&MO1, 7LL) * v6;
v2 = polevlf(&PH1, 7LL);
result = sinf((float)((float)(v2 * (float)(1.0 / a1)) - 2.3561945) + a1) * v7;
}
else if ( a1 <= 0.0 )
{
mtherr(&unk_2D5, 1LL);
LODWORD(result) = MAXNUMF ^ LC1;
}
else
{
v5 = polevlf(&YP, 4LL) * (float)((float)((float)(a1 * a1) - 4.6653934) * a1);
v4 = func0(a1);
result = (float)((float)((float)(logf(a1) * v4) - (float)(1.0 / a1)) * 0.63661975) + v5;
}
return result;
}

original_code:
float y1f( float xx )
{
float x, w, z, p, q, xn;
x = xx;
if( x <= 2.0f )
 {
 if( x <= 0.0f )
  {
  mtherr( "y1f", 1 );
  return( -MAXNUMF );
  }
 z = x * x;
 w = (z - YO1) * x * polevlf( z, YP, 4 );
 w += TWOOPI * ( j1f(x) * logf(x) - 1.0f/x );
 return( w );
 }
q = 1.0f/x;
w = sqrtf(q);
p = w * polevlf( q, MO1, 7);
w = q*q;
xn = q * polevlf( w, PH1, 7) - THPIO4F;
p = p * sinf(xn + x);
return(p);
}

canonical_original_code:
float y1f(float xx)
{
float x; float w; float z; float p; float q; float xn;
x = xx;
if( x <= 2.0f )
 {
 if( x <= 0.0f )
  {
  mtherr( "y1f", 1 );
  return( -MAXNUMF );
  }
 z = x * x;
 w = (z - YO1) * x * polevlf( z, YP, 4 );
 w += TWOOPI * ( j1f(x) * logf(x) - 1.0f/x );
 return( w );
 }
q = 1.0f/x;
w = sqrtf(q);
p = w * polevlf( q, MO1, 7);
w = q*q;
xn = q * polevlf( w, PH1, 7) - THPIO4F;
p = p * sinf(xn + x);
return(p);
}


tandgf

decompiled_code:
__m128 __fastcall tandgf(__m128 a1)
{
return tancotf(0, a1);
}

canonical_decompiled_code:
__m128 __fastcall func1(__m128 a1)
{
return func0(0, a1);
}

original_code:
float tandgf( float x )
{
return( tancotf(x,0) );
}

canonical_original_code:
float tandgf(float x)
{
return( tancotf(x,0) );
}


cotdgf

decompiled_code:
float __fastcall cotdgf(__m128 a1)
{
float result; // xmm0_4

if ( a1.m128_f32[0] == 0.0 )
{
mtherr("cotdgf", 2LL);
result = MAXNUMF;
}
else
{
LODWORD(result) = tancotf(1, a1).m128_u32[0];
}
return result;
}

canonical_decompiled_code:
float __fastcall func2(__m128 a1)
{
float result; // xmm0_4

if ( a1.m128_f32[0] == 0.0 )
{
mtherr("cotdgf", 2LL);
result = MAXNUMF;
}
else
{
LODWORD(result) = func0(1, a1).m128_u32[0];
}
return result;
}

original_code:
float cotdgf( float x )
{
if( x == 0.0 )
 {
 mtherr( "cotdgf", 2 );
 return( MAXNUMF );
 }
return( tancotf(x,1) );
}

canonical_original_code:
float cotdgf(float x)
{
if( x == 0.0 )
 {
 mtherr( "cotdgf", 2 );
 return( MAXNUMF );
 }
return( tancotf(x,1) );
}


tancotf

variable_types: cotflg int

variable_types: y float

variable_types: zz float

variable_types: j long

variable_types: sign int


coshf

decompiled_code:
float __fastcall coshf(float a1)
{
double v1; // xmm1_8
float v2; // xmm0_4
float result; // xmm0_4

if ( a1 < 0.0 )
LODWORD(a1) ^= LC1;
if ( a1 > MAXLOGF )
{
mtherr("coshf", 3LL);
result = MAXNUMF;
}
else
{
v1 = expf(a1);
v2 = 1.0 / v1 + v1;
result = v2 * 0.5;
}
return result;
}

canonical_decompiled_code:
float __fastcall func0(float a1)
{
double v1; // xmm1_8
float v2; // xmm0_4
float result; // xmm0_4

if ( a1 < 0.0 )
LODWORD(a1) ^= LC1;
if ( a1 > MAXLOGF )
{
mtherr("coshf", 3LL);
result = MAXNUMF;
}
else
{
v1 = expf(a1);
v2 = 1.0 / v1 + v1;
result = v2 * 0.5;
}
return result;
}

original_code:
float coshf(float xx)
{
float x, y;
x = xx;
if( x < 0 )
 x = -x;
if( x > MAXLOGF )
 {
 mtherr( "coshf", 3 );
 return( MAXNUMF );
 }
y = expf(x);
y = y + 1.0/y;
return( 0.5*y );
}

canonical_original_code:
float coshf(float xx)
{
float x; float y;
x = xx;
if( x < 0 )
 x = -x;
if( x > MAXLOGF )
 {
 mtherr( "coshf", 3 );
 return( MAXNUMF );
 }
y = expf(x);
y = y + 1.0/y;
return( 0.5*y );
}

variable_types: x float


decompiled_code:
float __fastcall exp2f(float a1, double a2)
{
double v2; // xmm3_8
float result; // xmm0_4
float v4; // xmm0_4
int v5; // ebx
double v6; // xmm2_8
float v7; // xmm0_4
float xa; // [rsp+Ch] [rbp-Ch]

if ( a1 > 127.0 )
{
mtherr(fname, 3LL);
result = MAXNUMF;
}
else if ( a1 < -127.0 )
{
mtherr(fname, 4LL);
result = 0.0;
}
else
{
*(_QWORD *)&v2 = LODWORD(a1);
if ( a1 == 0.0 )
{
result = *(float *)&LC1;
}
else
{
v4 = floorf(a1);
v5 = (int)v4;
*(_QWORD *)&v6 = LODWORD(a1);
*(float *)&v6 = a1 - v4;
xa = *(float *)&v6;
if ( *(float *)&v6 > 0.5 )
{
++v5;
*(float *)&v6 = *(float *)&v6 - 1.0;
xa = *(float *)&v6;
}
v7 = polevlf(&P, 5LL, xa, a2, v6, v2);
result = ldexpf((float)(v7 * xa) + 1.0, v5);
}
}
return result;
}

canonical_decompiled_code:
float __fastcall func0(float a1, double a2)
{
double v2; // xmm3_8
float result; // xmm0_4
float v4; // xmm0_4
int v5; // ebx
double v6; // xmm2_8
float v7; // xmm0_4
float xa; // [rsp+Ch] [rbp-Ch]

if ( a1 > 127.0 )
{
mtherr(fname, 3LL);
result = MAXNUMF;
}
else if ( a1 < -127.0 )
{
mtherr(fname, 4LL);
result = 0.0;
}
else
{
*(_QWORD *)&v2 = LODWORD(a1);
if ( a1 == 0.0 )
{
result = *(float *)&LC1;
}
else
{
v4 = floorf(a1);
v5 = (int)v4;
*(_QWORD *)&v6 = LODWORD(a1);
*(float *)&v6 = a1 - v4;
xa = *(float *)&v6;
if ( *(float *)&v6 > 0.5 )
{
++v5;
*(float *)&v6 = *(float *)&v6 - 1.0;
xa = *(float *)&v6;
}
v7 = polevlf(&P, 5LL, xa, a2, v6, v2);
result = ldexpf((float)(v7 * xa) + 1.0, v5);
}
}
return result;
}

original_code:
float exp2f( float xx )
{
float x, px;
int i0;
x = xx;
if( x > 127.0)
 {
 mtherr( fname, 3 );
 return( MAXNUMF );
 }
if( x < -127.0 )
 {
 mtherr( fname, 4 );
 return(0.0);
 }
if( x == 0 )
 return(1.0);
px = floorf(x);
i0 = px;
x = x - px;
if( x > 0.5 )
 {
 i0 += 1;
 x -= 1.0;
 }
px = 1.0 + x * polevlf( x, P, 5 );
px = ldexpf( px, i0 );
return(px);
}

canonical_original_code:
float exp2f(float xx)
{
float x; float px;
int i0;
x = xx;
if( x > 127.0)
 {
 mtherr( fname, 3 );
 return( MAXNUMF );
 }
if( x < -127.0 )
 {
 mtherr( fname, 4 );
 return(0.0);
 }
if( x == 0 )
 return(1.0);
px = floorf(x);
i0 = px;
x = x - px;
if( x > 0.5 )
 {
 i0 += 1;
 x -= 1.0;
 }
px = 1.0 + x * polevlf( x, P, 5 );
px = ldexpf( px, i0 );
return(px);
}

variable_types: px float


airyf

decompiled_code:
__int64 __fastcall airyf(float *a1, float *a2, float *a3, float *a4, float a5)
{
char v7; // al
float v8; // xmm2_4
float v9; // xmm5_4
float v10; // xmm3_4
float v11; // xmm0_4
float v12; // xmm1_4
float v13; // xmm4_4
int v14; // xmm0_4
__int64 result; // rax
float v16; // xmm0_4
float v17; // xmm3_4
double v18; // xmm0_8
double v19; // xmm0_8
__m128i v20; // xmm1
float v21; // xmm4_4
__m128i v22; // xmm0
__m128i v23; // xmm6
__m128i v24; // xmm0
__m128i v25; // xmm4
float v26; // xmm5_4
double v27; // xmm7_8
double v28; // xmm0_8
double v29; // xmm0_8
float v30; // xmm1_4
double v31; // xmm0_8
double v32; // xmm0_8
float v33; // xmm2_4
__m128i v34; // xmm0
__m128i v35; // xmm5
__m128i v36; // xmm0
__m128i v37; // xmm7
float v38; // xmm0_4
float v39; // xmm1_4
float v40; // xmm0_4
float v41; // xmm2_4
float v42; // xmm10_4
float v43; // xmm4_4
float v44; // xmm0_4
float v45; // xmm5_4
float v46; // xmm1_4
float v47; // xmm6_4
float v48; // xmm2_4
float v49; // xmm0_4
float v50; // xmm1_4
float v51; // xmm0_4
float v52; // xmm2_4
float v53; // xmm0_4
float v54; // xmm4_4
float v55; // xmm5_4
float v56; // xmm6_4
float x; // [rsp+4h] [rbp-54h]
double v58; // [rsp+8h] [rbp-50h]
float v59; // [rsp+8h] [rbp-50h]
float v60; // [rsp+10h] [rbp-48h]
float v61; // [rsp+10h] [rbp-48h]
double v62; // [rsp+10h] [rbp-48h]
float v63; // [rsp+18h] [rbp-40h]
float v64; // [rsp+18h] [rbp-40h]
float v65; // [rsp+20h] [rbp-38h]
float v66; // [rsp+20h] [rbp-38h]
float v67; // [rsp+20h] [rbp-38h]
float v68; // [rsp+24h] [rbp-34h]
float v69; // [rsp+24h] [rbp-34h]
float v70; // [rsp+28h] [rbp-30h]
float v71; // [rsp+28h] [rbp-30h]
float v72; // [rsp+28h] [rbp-30h]
float v73; // [rsp+2Ch] [rbp-2Ch]

x = a5;
v58 = a5;
if ( a5 > 25.77 )
{
*a1 = 0.0;
*a2 = 0.0;
v14 = MAXNUMF;
*(_DWORD *)a3 = MAXNUMF;
*(_DWORD *)a4 = v14;
result = 0xFFFFFFFFLL;
}
else if ( v58 < -2.09 )
{
v16 = sqrtf(COERCE_FLOAT(LODWORD(a5) ^ LC5));
v17 = v58 * -2.0 * v16 / 3.0;
v68 = sqrtf(v16);
v65 = 1.0 / v17;
v18 = polevlf(&AFN, 8LL, COERCE_DOUBLE((unsigned __int64)COERCE_UNSIGNED_INT(v65 * v65)));
v63 = (float)((float)(*(float *)&v18 * (float)(v65 * v65)) / p1evlf(&AFD, 9LL, v65 * v65)) + 1.0;
v19 = polevlf(&AGN, 10LL, COERCE_DOUBLE((unsigned __int64)COERCE_UNSIGNED_INT(v65 * v65)));
v60 = (float)(*(float *)&v19 * (float)(1.0 / v17)) / p1evlf(&AGD, 10LL, v65 * v65);
v20 = 0LL;
*(float *)v20.m128i_i32 = PIF * 0.25 + v17;
v59 = sinf(*(float *)v20.m128i_i32);
*(float *)&v19 = cosf(COERCE_FLOAT(_mm_cvtsi128_si32(v20)));
v21 = v63;
*a1 = (float)((float)(v63 * v59) - (float)(v60 * *(float *)&v19)) * (float)(0.56418961 / v68);
v64 = *(float *)&v19;
*a3 = (float)((float)(v21 * *(float *)&v19) + (float)(v60 * v59)) * (float)(0.56418961 / v68);
v22 = (__m128i)COERCE_UNSIGNED_INT(v65 * v65);
*(double *)v22.m128i_i64 = polevlf(&APFN, 8LL, COERCE_DOUBLE((unsigned __int64)COERCE_UNSIGNED_INT(v65 * v65)));
v23 = v22;
*(float *)v23.m128i_i32 = *(float *)v22.m128i_i32 * (float)(v65 * v65);
v61 = (float)(COERCE_FLOAT(_mm_cvtsi128_si32(v23)) / p1evlf(&APFD, 9LL, v65 * v65)) + 1.0;
v24 = (__m128i)COERCE_UNSIGNED_INT(v65 * v65);
*(double *)v24.m128i_i64 = polevlf(&APGN, 10LL, COERCE_DOUBLE((unsigned __int64)COERCE_UNSIGNED_INT(v65 * v65)));
v25 = v24;
*(float *)v25.m128i_i32 = *(float *)v24.m128i_i32 * (float)(1.0 / v17);
*(float *)v20.m128i_i32 = COERCE_FLOAT(_mm_cvtsi128_si32(v25)) / p1evlf(&APGD, 10LL, v65 * v65);
*a2 = (float)((float)(v61 * v64) + (float)(v59 * *(float *)v20.m128i_i32))
* COERCE_FLOAT(COERCE_UNSIGNED_INT(0.56418961 * v68) ^ LC5);
*a4 = (float)((float)(v61 * v59) - (float)(*(float *)v20.m128i_i32 * v64)) * (float)(0.56418961 * v68);
result = 0LL;
}
else
{
v7 = 0;
if ( v58 < 2.09 )
goto LABEL_4;
v66 = sqrtf(a5);
v26 = (v58 + v58) * v66 / 3.0;
v70 = v26;
v69 = expf(v26);
v73 = sqrtf(v66);
v62 = v73;
*(_QWORD *)&v27 = (unsigned int)LC0;
*(float *)&v27 = 1.0 / v70;
v67 = 1.0 / v70;
v28 = polevlf(&AN, 7LL, v27);
v71 = *(float *)&v28;
v29 = polevlf(&AD, 7LL, COERCE_DOUBLE((unsigned __int64)LODWORD(v67)));
v30 = (v62 + v62) * v69;
*a1 = (float)((float)(v71 / *(float *)&v29) * 0.56418961) / v30;
v31 = polevlf(&APN, 7LL, COERCE_DOUBLE((unsigned __int64)LODWORD(v67)));
v72 = *(float *)&v31;
v32 = polevlf(&APD, 7LL, COERCE_DOUBLE((unsigned __int64)LODWORD(v67)));
v33 = *(float *)&v32;
*(float *)&v32 = v73 * -0.282094806432724 / v69;
*a2 = *(float *)&v32 * (float)(v72 / v33);
v7 = 5;
if ( v58 <= 8.3203353 )
{
LABEL_4:
v8 = x;
v9 = v8 * v8;
v10 = x * (float)(v8 * v8);
v11 = *(float *)&LC0;
if ( MACHEPF >= 1.0 )
{
v13 = *(float *)&LC0;
}
else
{
v12 = *(float *)&LC0;
v13 = *(float *)&LC0;
do
{
v38 = v11 + 1.0;
v39 = (float)(v12 * v10) / v38;
v40 = v38 + 1.0;
v41 = (float)(v8 * v10) / v40;
v12 = v39 / v40;
v13 = v13 + v12;
v11 = v40 + 1.0;
v8 = v41 / v11;
x = x + v8;
v42 = v12 / v13;
if ( (float)(v12 / v13) < 0.0 )
LODWORD(v42) ^= LC5;
}
while ( v42 > MACHEPF );
}
v43 = v13 * 0.35502806;
v44 = x * 0.2588194;
if ( (v7 & 1) == 0 )
*a1 = v43 - v44;
*a3 = (float)(v43 + v44) * 1.7320508;
v45 = v9 * 0.5;
v46 = v10 / 3.0;
v47 = (float)(v10 / 3.0) + 1.0;
v48 = v45 / 3.0;
v49 = *(float *)&LC1;
if ( MACHEPF < 1.0 )
{
do
{
v50 = v46 / v49;
v51 = v49 + 1.0;
v52 = (float)(v48 * v10) / v51;
v45 = v45 + v52;
v53 = v51 + 1.0;
v46 = (float)(v50 * v10) / v53;
v48 = v52 / v53;
v47 = v47 + v46;
v49 = v53 + 1.0;
v54 = v46 / v47;
if ( (float)(v46 / v47) < 0.0 )
LODWORD(v54) = LODWORD(v46) ^ LC5;
}
while ( v54 > MACHEPF );
}
v55 = v45 * 0.35502806;
v56 = v47 * 0.2588194;
if ( (v7 & 4) == 0 )
*a2 = v55 - v56;
*a4 = (float)(v55 + v56) * 1.7320508;
result = 0LL;
}
else
{
v34 = (__m128i)LODWORD(v67);
*(double *)v34.m128i_i64 = polevlf(&BN16, 4LL, COERCE_DOUBLE((unsigned __int64)LODWORD(v67)));
v35 = v34;
*(float *)v35.m128i_i32 = *(float *)v34.m128i_i32 * v67;
*(float *)v34.m128i_i32 = ((float)(COERCE_FLOAT(_mm_cvtsi128_si32(v35)) / p1evlf(&BD16, 5LL, v67)) + 1.0)
* (float)(v69 * 0.56418961)
/ v62;
*a3 = *(float *)v34.m128i_i32;
v36 = (__m128i)LODWORD(v67);
*(double *)v36.m128i_i64 = polevlf(&BPPN, 4LL, COERCE_DOUBLE((unsigned __int64)LODWORD(v67)));
v37 = v36;
*(float *)v37.m128i_i32 = *(float *)v36.m128i_i32 * v67;
*(float *)v36.m128i_i32 = (float)(v73 * (float)(v69 * 0.56418961))
* ((float)(COERCE_FLOAT(_mm_cvtsi128_si32(v37)) / p1evlf(&BPPD, 5LL, v67)) + 1.0);
*a4 = *(float *)v36.m128i_i32;
result = 0LL;
}
}
return result;
}

canonical_decompiled_code:
__int64 __fastcall func0(float *a1, float *a2, float *a3, float *a4, float a5)
{
char v7; // al
float v8; // xmm2_4
float v9; // xmm5_4
float v10; // xmm3_4
float v11; // xmm0_4
float v12; // xmm1_4
float v13; // xmm4_4
int v14; // xmm0_4
__int64 result; // rax
float v16; // xmm0_4
float v17; // xmm3_4
double v18; // xmm0_8
double v19; // xmm0_8
__m128i v20; // xmm1
float v21; // xmm4_4
__m128i v22; // xmm0
__m128i v23; // xmm6
__m128i v24; // xmm0
__m128i v25; // xmm4
float v26; // xmm5_4
double v27; // xmm7_8
double v28; // xmm0_8
double v29; // xmm0_8
float v30; // xmm1_4
double v31; // xmm0_8
double v32; // xmm0_8
float v33; // xmm2_4
__m128i v34; // xmm0
__m128i v35; // xmm5
__m128i v36; // xmm0
__m128i v37; // xmm7
float v38; // xmm0_4
float v39; // xmm1_4
float v40; // xmm0_4
float v41; // xmm2_4
float v42; // xmm10_4
float v43; // xmm4_4
float v44; // xmm0_4
float v45; // xmm5_4
float v46; // xmm1_4
float v47; // xmm6_4
float v48; // xmm2_4
float v49; // xmm0_4
float v50; // xmm1_4
float v51; // xmm0_4
float v52; // xmm2_4
float v53; // xmm0_4
float v54; // xmm4_4
float v55; // xmm5_4
float v56; // xmm6_4
float x; // [rsp+4h] [rbp-54h]
double v58; // [rsp+8h] [rbp-50h]
float v59; // [rsp+8h] [rbp-50h]
float v60; // [rsp+10h] [rbp-48h]
float v61; // [rsp+10h] [rbp-48h]
double v62; // [rsp+10h] [rbp-48h]
float v63; // [rsp+18h] [rbp-40h]
float v64; // [rsp+18h] [rbp-40h]
float v65; // [rsp+20h] [rbp-38h]
float v66; // [rsp+20h] [rbp-38h]
float v67; // [rsp+20h] [rbp-38h]
float v68; // [rsp+24h] [rbp-34h]
float v69; // [rsp+24h] [rbp-34h]
float v70; // [rsp+28h] [rbp-30h]
float v71; // [rsp+28h] [rbp-30h]
float v72; // [rsp+28h] [rbp-30h]
float v73; // [rsp+2Ch] [rbp-2Ch]

x = a5;
v58 = a5;
if ( a5 > 25.77 )
{
*a1 = 0.0;
*a2 = 0.0;
v14 = MAXNUMF;
*(_DWORD *)a3 = MAXNUMF;
*(_DWORD *)a4 = v14;
result = 0xFFFFFFFFLL;
}
else if ( v58 < -2.09 )
{
v16 = sqrtf(COERCE_FLOAT(LODWORD(a5) ^ LC5));
v17 = v58 * -2.0 * v16 / 3.0;
v68 = sqrtf(v16);
v65 = 1.0 / v17;
v18 = polevlf(&AFN, 8LL, COERCE_DOUBLE((unsigned __int64)COERCE_UNSIGNED_INT(v65 * v65)));
v63 = (float)((float)(*(float *)&v18 * (float)(v65 * v65)) / p1evlf(&AFD, 9LL, v65 * v65)) + 1.0;
v19 = polevlf(&AGN, 10LL, COERCE_DOUBLE((unsigned __int64)COERCE_UNSIGNED_INT(v65 * v65)));
v60 = (float)(*(float *)&v19 * (float)(1.0 / v17)) / p1evlf(&AGD, 10LL, v65 * v65);
v20 = 0LL;
*(float *)v20.m128i_i32 = PIF * 0.25 + v17;
v59 = sinf(*(float *)v20.m128i_i32);
*(float *)&v19 = cosf(COERCE_FLOAT(_mm_cvtsi128_si32(v20)));
v21 = v63;
*a1 = (float)((float)(v63 * v59) - (float)(v60 * *(float *)&v19)) * (float)(0.56418961 / v68);
v64 = *(float *)&v19;
*a3 = (float)((float)(v21 * *(float *)&v19) + (float)(v60 * v59)) * (float)(0.56418961 / v68);
v22 = (__m128i)COERCE_UNSIGNED_INT(v65 * v65);
*(double *)v22.m128i_i64 = polevlf(&APFN, 8LL, COERCE_DOUBLE((unsigned __int64)COERCE_UNSIGNED_INT(v65 * v65)));
v23 = v22;
*(float *)v23.m128i_i32 = *(float *)v22.m128i_i32 * (float)(v65 * v65);
v61 = (float)(COERCE_FLOAT(_mm_cvtsi128_si32(v23)) / p1evlf(&APFD, 9LL, v65 * v65)) + 1.0;
v24 = (__m128i)COERCE_UNSIGNED_INT(v65 * v65);
*(double *)v24.m128i_i64 = polevlf(&APGN, 10LL, COERCE_DOUBLE((unsigned __int64)COERCE_UNSIGNED_INT(v65 * v65)));
v25 = v24;
*(float *)v25.m128i_i32 = *(float *)v24.m128i_i32 * (float)(1.0 / v17);
*(float *)v20.m128i_i32 = COERCE_FLOAT(_mm_cvtsi128_si32(v25)) / p1evlf(&APGD, 10LL, v65 * v65);
*a2 = (float)((float)(v61 * v64) + (float)(v59 * *(float *)v20.m128i_i32))
* COERCE_FLOAT(COERCE_UNSIGNED_INT(0.56418961 * v68) ^ LC5);
*a4 = (float)((float)(v61 * v59) - (float)(*(float *)v20.m128i_i32 * v64)) * (float)(0.56418961 * v68);
result = 0LL;
}
else
{
v7 = 0;
if ( v58 < 2.09 )
goto LABEL_4;
v66 = sqrtf(a5);
v26 = (v58 + v58) * v66 / 3.0;
v70 = v26;
v69 = expf(v26);
v73 = sqrtf(v66);
v62 = v73;
*(_QWORD *)&v27 = (unsigned int)LC0;
*(float *)&v27 = 1.0 / v70;
v67 = 1.0 / v70;
v28 = polevlf(&AN, 7LL, v27);
v71 = *(float *)&v28;
v29 = polevlf(&AD, 7LL, COERCE_DOUBLE((unsigned __int64)LODWORD(v67)));
v30 = (v62 + v62) * v69;
*a1 = (float)((float)(v71 / *(float *)&v29) * 0.56418961) / v30;
v31 = polevlf(&APN, 7LL, COERCE_DOUBLE((unsigned __int64)LODWORD(v67)));
v72 = *(float *)&v31;
v32 = polevlf(&APD, 7LL, COERCE_DOUBLE((unsigned __int64)LODWORD(v67)));
v33 = *(float *)&v32;
*(float *)&v32 = v73 * -0.282094806432724 / v69;
*a2 = *(float *)&v32 * (float)(v72 / v33);
v7 = 5;
if ( v58 <= 8.3203353 )
{
LABEL_4:
v8 = x;
v9 = v8 * v8;
v10 = x * (float)(v8 * v8);
v11 = *(float *)&LC0;
if ( MACHEPF >= 1.0 )
{
v13 = *(float *)&LC0;
}
else
{
v12 = *(float *)&LC0;
v13 = *(float *)&LC0;
do
{
v38 = v11 + 1.0;
v39 = (float)(v12 * v10) / v38;
v40 = v38 + 1.0;
v41 = (float)(v8 * v10) / v40;
v12 = v39 / v40;
v13 = v13 + v12;
v11 = v40 + 1.0;
v8 = v41 / v11;
x = x + v8;
v42 = v12 / v13;
if ( (float)(v12 / v13) < 0.0 )
LODWORD(v42) ^= LC5;
}
while ( v42 > MACHEPF );
}
v43 = v13 * 0.35502806;
v44 = x * 0.2588194;
if ( (v7 & 1) == 0 )
*a1 = v43 - v44;
*a3 = (float)(v43 + v44) * 1.7320508;
v45 = v9 * 0.5;
v46 = v10 / 3.0;
v47 = (float)(v10 / 3.0) + 1.0;
v48 = v45 / 3.0;
v49 = *(float *)&LC1;
if ( MACHEPF < 1.0 )
{
do
{
v50 = v46 / v49;
v51 = v49 + 1.0;
v52 = (float)(v48 * v10) / v51;
v45 = v45 + v52;
v53 = v51 + 1.0;
v46 = (float)(v50 * v10) / v53;
v48 = v52 / v53;
v47 = v47 + v46;
v49 = v53 + 1.0;
v54 = v46 / v47;
if ( (float)(v46 / v47) < 0.0 )
LODWORD(v54) = LODWORD(v46) ^ LC5;
}
while ( v54 > MACHEPF );
}
v55 = v45 * 0.35502806;
v56 = v47 * 0.2588194;
if ( (v7 & 4) == 0 )
*a2 = v55 - v56;
*a4 = (float)(v55 + v56) * 1.7320508;
result = 0LL;
}
else
{
v34 = (__m128i)LODWORD(v67);
*(double *)v34.m128i_i64 = polevlf(&BN16, 4LL, COERCE_DOUBLE((unsigned __int64)LODWORD(v67)));
v35 = v34;
*(float *)v35.m128i_i32 = *(float *)v34.m128i_i32 * v67;
*(float *)v34.m128i_i32 = ((float)(COERCE_FLOAT(_mm_cvtsi128_si32(v35)) / p1evlf(&BD16, 5LL, v67)) + 1.0)
* (float)(v69 * 0.56418961)
/ v62;
*a3 = *(float *)v34.m128i_i32;
v36 = (__m128i)LODWORD(v67);
*(double *)v36.m128i_i64 = polevlf(&BPPN, 4LL, COERCE_DOUBLE((unsigned __int64)LODWORD(v67)));
v37 = v36;
*(float *)v37.m128i_i32 = *(float *)v36.m128i_i32 * v67;
*(float *)v36.m128i_i32 = (float)(v73 * (float)(v69 * 0.56418961))
* ((float)(COERCE_FLOAT(_mm_cvtsi128_si32(v37)) / p1evlf(&BPPD, 5LL, v67)) + 1.0);
*a4 = *(float *)v36.m128i_i32;
result = 0LL;
}
}
return result;
}

original_code:
int airyf( float xx, float *ai, float *aip, float *bi, float *bip )
{
float x, z, zz, t, f, g, uf, ug, k, zeta, theta;
int domflg;
x = xx;
domflg = 0;
if( x > 25.77 )
 {
 *ai = 0;
 *aip = 0;
 *bi = MAXNUMF;
 *bip = MAXNUMF;
 return(-1);
 }
if( x < -2.09 )
 {
 domflg = 15;
 t = sqrtf(-x);
 zeta = -2.0 * x * t / 3.0;
 t = sqrtf(t);
 k = sqpii / t;
 z = 1.0/zeta;
 zz = z * z;
 uf = 1.0 + zz * polevlf( zz, AFN, 8 ) / p1evlf( zz, AFD, 9 );
 ug = z * polevlf( zz, AGN, 10 ) / p1evlf( zz, AGD, 10 );
 theta = zeta + 0.25 * PIF;
 f = sinf( theta );
 g = cosf( theta );
 *ai = k * (f * uf - g * ug);
 *bi = k * (g * uf + f * ug);
 uf = 1.0 + zz * polevlf( zz, APFN, 8 ) / p1evlf( zz, APFD, 9 );
 ug = z * polevlf( zz, APGN, 10 ) / p1evlf( zz, APGD, 10 );
 k = sqpii * t;
 *aip = -k * (g * uf + f * ug);
 *bip = k * (f * uf - g * ug);
 return(0);
 }
if( x >= 2.09 )
 {
 domflg = 5;
 t = sqrtf(x);
 zeta = 2.0 * x * t / 3.0;
 g = expf( zeta );
 t = sqrtf(t);
 k = 2.0 * t * g;
 z = 1.0/zeta;
 f = polevlf( z, AN, 7 ) / polevlf( z, AD, 7 );
 *ai = sqpii * f / k;
 k = -0.5 * sqpii * t / g;
 f = polevlf( z, APN, 7 ) / polevlf( z, APD, 7 );
 *aip = f * k;
 if( x > 8.3203353 )
  {
  f = z * polevlf( z, BN16, 4 ) / p1evlf( z, BD16, 5 );
  k = sqpii * g;
  *bi = k * (1.0 + f) / t;
  f = z * polevlf( z, BPPN, 4 ) / p1evlf( z, BPPD, 5 );
  *bip = k * t * (1.0 + f);
  return(0);
  }
 }
f = 1.0;
g = x;
t = 1.0;
uf = 1.0;
ug = x;
k = 1.0;
z = x * x * x;
while( t > MACHEPF )
 {
 uf *= z;
 k += 1.0;
 uf /=k;
 ug *= z;
 k += 1.0;
 ug /=k;
 uf /=k;
 f += uf;
 k += 1.0;
 ug /=k;
 g += ug;
 t = ( (uf/f) < 0 ? -(uf/f) : (uf/f) );
 }
uf = c1 * f;
ug = c2 * g;
if( (domflg & 1) == 0 )
 *ai = uf - ug;
if( (domflg & 2) == 0 )
 *bi = sqrt3 * (uf + ug);
k = 4.0;
uf = x * x/2.0;
ug = z/3.0;
f = uf;
g = 1.0 + ug;
uf /= 3.0;
t = 1.0;
while( t > MACHEPF )
 {
 uf *= z;
 ug /=k;
 k += 1.0;
 ug *= z;
 uf /=k;
 f += uf;
 k += 1.0;
 ug /=k;
 uf /=k;
 g += ug;
 k += 1.0;
 t = ( (ug/g) < 0 ? -(ug/g) : (ug/g) );
 }
uf = c1 * f;
ug = c2 * g;
if( (domflg & 4) == 0 )
 *aip = uf - ug;
if( (domflg & 8) == 0 )
 *bip = sqrt3 * (uf + ug);
return(0);
}

canonical_original_code:
int airyf(float xx, float *ai, float *aip, float *bi, float *bip)
{
float x; float z; float zz; float t; float f; float g; float uf; float ug; float k; float zeta; float theta;
int domflg;
x = xx;
domflg = 0;
if( x > 25.77 )
 {
 *ai = 0;
 *aip = 0;
 *bi = MAXNUMF;
 *bip = MAXNUMF;
 return(-1);
 }
if( x < -2.09 )
 {
 domflg = 15;
 t = sqrtf(-x);
 zeta = -2.0 * x * t / 3.0;
 t = sqrtf(t);
 k = sqpii / t;
 z = 1.0/zeta;
 zz = z * z;
 uf = 1.0 + zz * polevlf( zz, AFN, 8 ) / p1evlf( zz, AFD, 9 );
 ug = z * polevlf( zz, AGN, 10 ) / p1evlf( zz, AGD, 10 );
 theta = zeta + 0.25 * PIF;
 f = sinf( theta );
 g = cosf( theta );
 *ai = k * (f * uf - g * ug);
 *bi = k * (g * uf + f * ug);
 uf = 1.0 + zz * polevlf( zz, APFN, 8 ) / p1evlf( zz, APFD, 9 );
 ug = z * polevlf( zz, APGN, 10 ) / p1evlf( zz, APGD, 10 );
 k = sqpii * t;
 *aip = -k * (g * uf + f * ug);
 *bip = k * (f * uf - g * ug);
 return(0);
 }
if( x >= 2.09 )
 {
 domflg = 5;
 t = sqrtf(x);
 zeta = 2.0 * x * t / 3.0;
 g = expf( zeta );
 t = sqrtf(t);
 k = 2.0 * t * g;
 z = 1.0/zeta;
 f = polevlf( z, AN, 7 ) / polevlf( z, AD, 7 );
 *ai = sqpii * f / k;
 k = -0.5 * sqpii * t / g;
 f = polevlf( z, APN, 7 ) / polevlf( z, APD, 7 );
 *aip = f * k;
 if( x > 8.3203353 )
  {
  f = z * polevlf( z, BN16, 4 ) / p1evlf( z, BD16, 5 );
  k = sqpii * g;
  *bi = k * (1.0 + f) / t;
  f = z * polevlf( z, BPPN, 4 ) / p1evlf( z, BPPD, 5 );
  *bip = k * t * (1.0 + f);
  return(0);
  }
 }
f = 1.0;
g = x;
t = 1.0;
uf = 1.0;
ug = x;
k = 1.0;
z = x * x * x;
while( t > MACHEPF )
 {
 uf *= z;
 k += 1.0;
 uf /=k;
 ug *= z;
 k += 1.0;
 ug /=k;
 uf /=k;
 f += uf;
 k += 1.0;
 ug /=k;
 g += ug;
 t = ( (uf/f) < 0 ? -(uf/f) : (uf/f) );
 }
uf = c1 * f;
ug = c2 * g;
if( (domflg & 1) == 0 )
 *ai = uf - ug;
if( (domflg & 2) == 0 )
 *bi = sqrt3 * (uf + ug);
k = 4.0;
uf = x * x/2.0;
ug = z/3.0;
f = uf;
g = 1.0 + ug;
uf /= 3.0;
t = 1.0;
while( t > MACHEPF )
 {
 uf *= z;
 ug /=k;
 k += 1.0;
 ug *= z;
 uf /=k;
 f += uf;
 k += 1.0;
 ug /=k;
 uf /=k;
 g += ug;
 k += 1.0;
 t = ( (ug/g) < 0 ? -(ug/g) : (ug/g) );
 }
uf = c1 * f;
ug = c2 * g;
if( (domflg & 4) == 0 )
 *aip = uf - ug;
if( (domflg & 8) == 0 )
 *bip = sqrt3 * (uf + ug);
return(0);
}

variable_types:
ai
float *

variable_types:
aip
float *

variable_types:
bi
float *

variable_types:
bip
float *

variable_types: z float

variable_types: t float

variable_types: f float

variable_types: g float

variable_types: uf float

variable_types: ug float

variable_types: k float

variable_types: zeta float

variable_types: theta float

variable_types: domflg int

return_type: int


pchex

decompiled_code:
int __fastcall pchex(__int64 a1)
{
__int64 v1; // rbx

v1 = a1;
do
{
v1 += 4LL;
printf("%08x ", *(unsigned int *)(v1 - 4));
}
while ( a1 + 16 != v1 );
return putchar(10);
}

canonical_decompiled_code:
int __fastcall func0(__int64 a1)
{
__int64 v1; // rbx

v1 = a1;
do
{
v1 += 4LL;
printf("%08x ", *(unsigned int *)(v1 - 4));
}
while ( a1 + 16 != v1 );
return putchar(10);
}

original_code:
void
pchex (void *pc)
{
  unsigned int *pi;
  int k;
  pi = (unsigned int *) pc;
  for (k = 0; k < 4; k++)
    printf ("%08x ", *pi++);
  printf ("\n");
}

canonical_original_code:
void pchex(void *pc)
{
  unsigned int *pi;
  int k;
  pi = (unsigned int *) pc;
  for (k = 0; k < 4; k++)
    printf ("%08x ", *pi++);
  printf ("\n");
}

variable_types:
pc
void *

variable_types:
pi
unsigned int *

variable_types: k int

return_type: void


fresnlf

original_code:
void fresnlf( float xxa, float *ssa, float *cca )
{
float f, g, cc, ss, c, s, t, u, x, x2;
x = xxa;
x = ( (x) < 0 ? -(x) : (x) );
x2 = x * x;
if( x2 < 2.5625 )
 {
 t = x2 * x2;
 ss = x * x2 * polevlf( t, sn, 6);
 cc = x * polevlf( t, cn, 6);
 goto done;
 }
if( x > 36974.0 )
 {
 cc = 0.5;
 ss = 0.5;
 goto done;
 }
 x2 = x * x;
 t = PIF * x2;
 u = 1.0/(t * t);
 t = 1.0/t;
 f = 1.0 - u * polevlf( u, fn, 7);
 g = t * polevlf( u, gn, 7);
 t = PIO2F * x2;
 c = cosf(t);
 s = sinf(t);
 t = PIF * x;
 cc = 0.5 + (f * s - g * c)/t;
 ss = 0.5 - (f * c + g * s)/t;
done:
if( xxa < 0.0 )
 {
 cc = -cc;
 ss = -ss;
 }
*cca = cc;
*ssa = ss;
}

canonical_original_code:
void fresnlf(float xxa, float *ssa, float *cca)
{
float f; float g; float cc; float ss; float c; float s; float t; float u; float x; float x2;
x = xxa;
x = ( (x) < 0 ? -(x) : (x) );
x2 = x * x;
if( x2 < 2.5625 )
 {
 t = x2 * x2;
 ss = x * x2 * polevlf( t, sn, 6);
 cc = x * polevlf( t, cn, 6);
 goto done;
 }
if( x > 36974.0 )
 {
 cc = 0.5;
 ss = 0.5;
 goto done;
 }
 x2 = x * x;
 t = PIF * x2;
 u = 1.0/(t * t);
 t = 1.0/t;
 f = 1.0 - u * polevlf( u, fn, 7);
 g = t * polevlf( u, gn, 7);
 t = PIO2F * x2;
 c = cosf(t);
 s = sinf(t);
 t = PIF * x;
 cc = 0.5 + (f * s - g * c)/t;
 ss = 0.5 - (f * c + g * s)/t;
done:
if( xxa < 0.0 )
 {
 cc = -cc;
 ss = -ss;
 }
*cca = cc;
*ssa = ss;
}

variable_types: xxa float

variable_types:
ssa
float *

variable_types:
cca
float *

variable_types: cc float

variable_types: ss float

variable_types: c float

variable_types: s float

variable_types: u float

variable_types: x float


bdtrf

decompiled_code:
double __fastcall bdtrf(int a1, int a2, float a3)
{
double result; // xmm0_8
double v5; // xmm0_8
double v6; // xmm2_8

if ( a3 < 0.0 || a3 > 1.0 || a1 < 0 || a1 > a2 )
{
mtherr("bdtrf", 1LL);
result = 0.0;
}
else
{
*(_QWORD *)&result = (unsigned int)LC1;
if ( a1 != a2 )
{
HIDWORD(v5) = 0;
*(float *)&v5 = (float)(a2 - a1);
if ( a1 )
{
*(_QWORD *)&v6 = (unsigned int)LC1;
*(float *)&v6 = 1.0 - a3;
result = incbetf(v5, (float)(a1 + 1), v6);
}
else
{
HIDWORD(result) = 0;
*(float *)&result = powf(1.0 - a3, *(float *)&v5);
}
}
}
return result;
}

canonical_decompiled_code:
double __fastcall func0(int a1, int a2, float a3)
{
double result; // xmm0_8
double v5; // xmm0_8
double v6; // xmm2_8

if ( a3 < 0.0 || a3 > 1.0 || a1 < 0 || a1 > a2 )
{
mtherr("bdtrf", 1LL);
result = 0.0;
}
else
{
*(_QWORD *)&result = (unsigned int)LC1;
if ( a1 != a2 )
{
HIDWORD(v5) = 0;
*(float *)&v5 = (float)(a2 - a1);
if ( a1 )
{
*(_QWORD *)&v6 = (unsigned int)LC1;
*(float *)&v6 = 1.0 - a3;
result = incbetf(v5, (float)(a1 + 1), v6);
}
else
{
HIDWORD(result) = 0;
*(float *)&result = powf(1.0 - a3, *(float *)&v5);
}
}
}
return result;
}

original_code:
float bdtrf( int k, int n, float pp )
{
float p, dk, dn;
p = pp;
if( (p < 0.0) || (p > 1.0) )
 goto domerr;
if( (k < 0) || (n < k) )
 {
domerr:
 mtherr( "bdtrf", 1 );
 return( 0.0 );
 }
if( k == n )
 return( 1.0 );
dn = n - k;
if( k == 0 )
 {
 dk = powf( 1.0-p, dn );
 }
else
 {
 dk = k + 1;
 dk = incbetf( dn, dk, 1.0 - p );
 }
return( dk );
}

canonical_original_code:
float bdtrf(int k, int n, float pp)
{
float p; float dk; float dn;
p = pp;
if( (p < 0.0) || (p > 1.0) )
 goto domerr;
if( (k < 0) || (n < k) )
 {
domerr:
 mtherr( "bdtrf", 1 );
 return( 0.0 );
 }
if( k == n )
 return( 1.0 );
dn = n - k;
if( k == 0 )
 {
 dk = powf( 1.0-p, dn );
 }
else
 {
 dk = k + 1;
 dk = incbetf( dn, dk, 1.0 - p );
 }
return( dk );
}

variable_types: n int

variable_types: pp float

variable_types: p float

variable_types: dk float

variable_types: dn float


bdtrif

decompiled_code:
float __fastcall bdtrif(int a1, int a2, double a3)
{
double v3; // xmm3_8
float v4; // xmm1_4
float result; // xmm0_4
double v6; // xmm0_8

if ( *(float *)&a3 < 0.0 || *(float *)&a3 > 1.0 || a1 < 0 || a1 >= a2 )
{
mtherr("bdtrif", 1LL);
result = 0.0;
}
else
{
HIDWORD(v3) = 0;
*(float *)&v3 = (float)(a2 - a1);
if ( a1 )
{
v6 = incbif(v3, (float)(a1 + 1), a3);
v4 = *(float *)&v6;
}
else
{
v4 = powf(*(float *)&a3, 1.0 / *(float *)&v3);
}
result = 1.0 - v4;
}
return result;
}

canonical_decompiled_code:
float __fastcall func1(int a1, int a2, double a3)
{
double v3; // xmm3_8
float v4; // xmm1_4
float result; // xmm0_4
double v6; // xmm0_8

if ( *(float *)&a3 < 0.0 || *(float *)&a3 > 1.0 || a1 < 0 || a1 >= a2 )
{
mtherr("bdtrif", 1LL);
result = 0.0;
}
else
{
HIDWORD(v3) = 0;
*(float *)&v3 = (float)(a2 - a1);
if ( a1 )
{
v6 = incbif(v3, (float)(a1 + 1), a3);
v4 = *(float *)&v6;
}
else
{
v4 = powf(*(float *)&a3, 1.0 / *(float *)&v3);
}
result = 1.0 - v4;
}
return result;
}

original_code:
float bdtrif( int k, int n, float yy )
{
float y, dk, dn, p;
y = yy;
if( (y < 0.0) || (y > 1.0) )
 goto domerr;
if( (k < 0) || (n <= k) )
 {
domerr:
 mtherr( "bdtrif", 1 );
 return( 0.0 );
 }
dn = n - k;
if( k == 0 )
 {
 p = 1.0 - powf( y, 1.0/dn );
 }
else
 {
 dk = k + 1;
 p = 1.0 - incbif( dn, dk, y );
 }
return( p );
}

canonical_original_code:
float bdtrif(int k, int n, float yy)
{
float y; float dk; float dn; float p;
y = yy;
if( (y < 0.0) || (y > 1.0) )
 goto domerr;
if( (k < 0) || (n <= k) )
 {
domerr:
 mtherr( "bdtrif", 1 );
 return( 0.0 );
 }
dn = n - k;
if( k == 0 )
 {
 p = 1.0 - powf( y, 1.0/dn );
 }
else
 {
 dk = k + 1;
 p = 1.0 - incbif( dn, dk, y );
 }
return( p );
}

variable_types: yy float

variable_types: y float


sindgf

variable_types: xx float

variable_types: z float

variable_types: j long

variable_types: sign int


cosdgf

variable_types: j int


dawsnf

decompiled_code:
float __fastcall dawsnf(float a1)
{
int v1; // ebx
double v2; // xmm1_8
float result; // xmm0_4
__m128i v4; // xmm7
float v5; // xmm0_4
float v6; // xmm0_4
float v7; // xmm0_4
float v8; // xmm0_4
float v9; // [rsp+8h] [rbp-20h]
float v10; // [rsp+8h] [rbp-20h]
float v11; // [rsp+Ch] [rbp-1Ch]

v9 = a1;
v1 = 1;
if ( a1 < 0.0 )
{
LODWORD(v9) = LODWORD(a1) ^ LC1;
v1 = -1;
}
if ( v9 < 3.25 )
{
v4 = (__m128i)LODWORD(v9);
*(float *)v4.m128i_i32 = *(float *)v4.m128i_i32 * *(float *)v4.m128i_i32;
v10 = polevlf(&AN, 9LL, *(double *)v4.m128i_i64) * v9;
result = (float)v1
* (float)(v10 / polevlf(&AD, 10LL, *(double *)_mm_cvtsi32_si128(_mm_cvtsi128_si32(v4)).m128i_i64));
}
else
{
*(_QWORD *)&v2 = (unsigned int)LC3;
v11 = 1.0 / (float)(v9 * v9);
if ( v9 < 6.25 )
{
*(float *)&v2 = 1.0 / (float)(v9 * v9);
v5 = polevlf(&BN, 10LL, v2);
v6 = (float)((float)(v5 * v11) / (float)(p1evlf(&BD, 10LL, v11) * v9)) + 1.0 / v9;
result = (double)v1 * 0.5 * v6;
}
else if ( v9 <= 1000000000.0 )
{
v7 = polevlf(&CN, 4LL, COERCE_DOUBLE((unsigned __int64)LODWORD(v11)));
v8 = (float)((float)(v7 * v11) / (float)(p1evlf(&CD, 5LL, v11) * v9)) + 1.0 / v9;
result = (double)v1 * 0.5 * v8;
}
else
{
result = (double)v1 * 0.5 / v9;
}
}
return result;
}

canonical_decompiled_code:
float __fastcall func0(float a1)
{
int v1; // ebx
double v2; // xmm1_8
float result; // xmm0_4
__m128i v4; // xmm7
float v5; // xmm0_4
float v6; // xmm0_4
float v7; // xmm0_4
float v8; // xmm0_4
float v9; // [rsp+8h] [rbp-20h]
float v10; // [rsp+8h] [rbp-20h]
float v11; // [rsp+Ch] [rbp-1Ch]

v9 = a1;
v1 = 1;
if ( a1 < 0.0 )
{
LODWORD(v9) = LODWORD(a1) ^ LC1;
v1 = -1;
}
if ( v9 < 3.25 )
{
v4 = (__m128i)LODWORD(v9);
*(float *)v4.m128i_i32 = *(float *)v4.m128i_i32 * *(float *)v4.m128i_i32;
v10 = polevlf(&AN, 9LL, *(double *)v4.m128i_i64) * v9;
result = (float)v1
* (float)(v10 / polevlf(&AD, 10LL, *(double *)_mm_cvtsi32_si128(_mm_cvtsi128_si32(v4)).m128i_i64));
}
else
{
*(_QWORD *)&v2 = (unsigned int)LC3;
v11 = 1.0 / (float)(v9 * v9);
if ( v9 < 6.25 )
{
*(float *)&v2 = 1.0 / (float)(v9 * v9);
v5 = polevlf(&BN, 10LL, v2);
v6 = (float)((float)(v5 * v11) / (float)(p1evlf(&BD, 10LL, v11) * v9)) + 1.0 / v9;
result = (double)v1 * 0.5 * v6;
}
else if ( v9 <= 1000000000.0 )
{
v7 = polevlf(&CN, 4LL, COERCE_DOUBLE((unsigned __int64)LODWORD(v11)));
v8 = (float)((float)(v7 * v11) / (float)(p1evlf(&CD, 5LL, v11) * v9)) + 1.0 / v9;
result = (double)v1 * 0.5 * v8;
}
else
{
result = (double)v1 * 0.5 / v9;
}
}
return result;
}

original_code:
float dawsnf( float xxx )
{
float xx, x, y;
int sign;
xx = xxx;
sign = 1;
if( xx < 0.0 )
 {
 sign = -1;
 xx = -xx;
 }
if( xx < 3.25 )
 {
 x = xx*xx;
 y = xx * polevlf( x, AN, 9 )/polevlf( x, AD, 10 );
 return( sign * y );
 }
x = 1.0/(xx*xx);
if( xx < 6.25 )
 {
 y = 1.0/xx + x * polevlf( x, BN, 10) / (p1evlf( x, BD, 10) * xx);
 return( sign * 0.5 * y );
 }
if( xx > 1.0e9 )
 return( (sign * 0.5)/xx );
y = 1.0/xx + x * polevlf( x, CN, 4) / (p1evlf( x, CD, 5) * xx);
return( sign * 0.5 * y );
}

canonical_original_code:
float dawsnf(float xxx)
{
float xx; float x; float y;
int sign;
xx = xxx;
sign = 1;
if( xx < 0.0 )
 {
 sign = -1;
 xx = -xx;
 }
if( xx < 3.25 )
 {
 x = xx*xx;
 y = xx * polevlf( x, AN, 9 )/polevlf( x, AD, 10 );
 return( sign * y );
 }
x = 1.0/(xx*xx);
if( xx < 6.25 )
 {
 y = 1.0/xx + x * polevlf( x, BN, 10) / (p1evlf( x, BD, 10) * xx);
 return( sign * 0.5 * y );
 }
if( xx > 1.0e9 )
 return( (sign * 0.5)/xx );
y = 1.0/xx + x * polevlf( x, CN, 4) / (p1evlf( x, CD, 5) * xx);
return( sign * 0.5 * y );
}

variable_types: xxx float


logf

variable_types: fe float

variable_types: e int


decompiled_code:
float __fastcall j0f(float a1)
{
__m128i v1; // xmm2
float v2; // ebx
float result; // xmm0_4
double v4; // xmm0_8
double v5; // xmm0_8
double v6; // xmm0_8
float v7; // [rsp+4h] [rbp-14h]
float v8; // [rsp+Ch] [rbp-Ch]
float v9; // [rsp+Ch] [rbp-Ch]

v7 = a1;
if ( a1 < 0.0 )
LODWORD(v7) = LODWORD(a1) ^ LC1;
if ( v7 > 2.0 )
{
v8 = sqrtf(1.0 / v7);
v5 = polevlf(&MO, 7LL, 1.0 / v7);
v9 = *(float *)&v5 * v8;
v6 = polevlf(&PH, 7LL, (float)(1.0 / v7) * (float)(1.0 / v7));
result = cosf((float)((float)(*(float *)&v6 * (float)(1.0 / v7)) - PIO4F) + v7) * v9;
}
else
{
v1 = (__m128i)LODWORD(v7);
*(float *)v1.m128i_i32 = v7 * v7;
v2 = COERCE_FLOAT(_mm_cvtsi128_si32(v1));
if ( v7 >= 0.001 )
{
v4 = polevlf(&JP, 4LL, *(float *)v1.m128i_i32);
result = *(float *)&v4 * (float)(v2 - 5.783186);
}
else
{
result = 1.0 - (float)(*(float *)v1.m128i_i32 * 0.25);
}
}
return result;
}

canonical_decompiled_code:
float __fastcall func0(float a1)
{
__m128i v1; // xmm2
float v2; // ebx
float result; // xmm0_4
double v4; // xmm0_8
double v5; // xmm0_8
double v6; // xmm0_8
float v7; // [rsp+4h] [rbp-14h]
float v8; // [rsp+Ch] [rbp-Ch]
float v9; // [rsp+Ch] [rbp-Ch]

v7 = a1;
if ( a1 < 0.0 )
LODWORD(v7) = LODWORD(a1) ^ LC1;
if ( v7 > 2.0 )
{
v8 = sqrtf(1.0 / v7);
v5 = polevlf(&MO, 7LL, 1.0 / v7);
v9 = *(float *)&v5 * v8;
v6 = polevlf(&PH, 7LL, (float)(1.0 / v7) * (float)(1.0 / v7));
result = cosf((float)((float)(*(float *)&v6 * (float)(1.0 / v7)) - PIO4F) + v7) * v9;
}
else
{
v1 = (__m128i)LODWORD(v7);
*(float *)v1.m128i_i32 = v7 * v7;
v2 = COERCE_FLOAT(_mm_cvtsi128_si32(v1));
if ( v7 >= 0.001 )
{
v4 = polevlf(&JP, 4LL, *(float *)v1.m128i_i32);
result = *(float *)&v4 * (float)(v2 - 5.783186);
}
else
{
result = 1.0 - (float)(*(float *)v1.m128i_i32 * 0.25);
}
}
return result;
}

original_code:
float j0f( float xx )
{
float x, w, z, p, q, xn;
if( xx < 0 )
 x = -xx;
else
 x = xx;
if( x <= 2.0f )
 {
 z = x * x;
 if( x < 1.0e-3f )
  return( 1.0f - 0.25f*z );
 p = (z-DR1) * polevlf( z, JP, 4);
 return( p );
 }
q = 1.0f/x;
w = sqrtf(q);
p = w * polevlf( q, MO, 7);
w = q*q;
xn = q * polevlf( w, PH, 7) - PIO4F;
p = p * cosf(xn + x);
return(p);
}

canonical_original_code:
float j0f(float xx)
{
float x; float w; float z; float p; float q; float xn;
if( xx < 0 )
 x = -xx;
else
 x = xx;
if( x <= 2.0f )
 {
 z = x * x;
 if( x < 1.0e-3f )
  return( 1.0f - 0.25f*z );
 p = (z-DR1) * polevlf( z, JP, 4);
 return( p );
 }
q = 1.0f/x;
w = sqrtf(q);
p = w * polevlf( q, MO, 7);
w = q*q;
xn = q * polevlf( w, PH, 7) - PIO4F;
p = p * cosf(xn + x);
return(p);
}

variable_types: w float

variable_types: q float

variable_types: xn float


decompiled_code:
float __fastcall y0f(float a1)
{
double v1; // xmm0_8
float result; // xmm0_4
double v3; // xmm0_8
double v4; // xmm0_8
float v6; // [rsp+8h] [rbp-10h]
float v7; // [rsp+8h] [rbp-10h]
float v8; // [rsp+Ch] [rbp-Ch]
float v9; // [rsp+Ch] [rbp-Ch]
float v10; // [rsp+Ch] [rbp-Ch]

if ( a1 > 2.0 )
{
v9 = sqrtf(1.0 / a1);
v3 = polevlf(&MO, 7LL, 1.0 / a1);
v10 = *(float *)&v3 * v9;
v4 = polevlf(&PH, 7LL, (float)(1.0 / a1) * (float)(1.0 / a1));
result = sinf((float)((float)(*(float *)&v4 * (float)(1.0 / a1)) - PIO4F) + a1) * v10;
}
else if ( a1 <= 0.0 )
{
mtherr(&unk_2E1, 1LL);
LODWORD(result) = MAXNUMF ^ LC1;
}
else
{
v6 = (float)(a1 * a1) - *(float *)&YZ1;
v1 = polevlf(&YP, 4LL, a1 * a1);
v8 = *(float *)&v1 * v6;
v7 = logf(a1);
result = (float)((float)(v7 * 0.63661975) * j0f(a1)) + v8;
}
return result;
}

canonical_decompiled_code:
float __fastcall func1(float a1)
{
double v1; // xmm0_8
float result; // xmm0_4
double v3; // xmm0_8
double v4; // xmm0_8
float v6; // [rsp+8h] [rbp-10h]
float v7; // [rsp+8h] [rbp-10h]
float v8; // [rsp+Ch] [rbp-Ch]
float v9; // [rsp+Ch] [rbp-Ch]
float v10; // [rsp+Ch] [rbp-Ch]

if ( a1 > 2.0 )
{
v9 = sqrtf(1.0 / a1);
v3 = polevlf(&MO, 7LL, 1.0 / a1);
v10 = *(float *)&v3 * v9;
v4 = polevlf(&PH, 7LL, (float)(1.0 / a1) * (float)(1.0 / a1));
result = sinf((float)((float)(*(float *)&v4 * (float)(1.0 / a1)) - PIO4F) + a1) * v10;
}
else if ( a1 <= 0.0 )
{
mtherr(&unk_2E1, 1LL);
LODWORD(result) = MAXNUMF ^ LC1;
}
else
{
v6 = (float)(a1 * a1) - *(float *)&YZ1;
v1 = polevlf(&YP, 4LL, a1 * a1);
v8 = *(float *)&v1 * v6;
v7 = logf(a1);
result = (float)((float)(v7 * 0.63661975) * func0(a1)) + v8;
}
return result;
}

original_code:
float y0f( float xx )
{
float x, w, z, p, q, xn;
x = xx;
if( x <= 2.0f )
 {
 if( x <= 0.0f )
  {
  mtherr( "y0f", 1 );
  return( -MAXNUMF );
  }
 z = x * x;
 w = (z-YZ1) * polevlf( z, YP, 4);
 w += TWOOPI * logf(x) * j0f(x);
 return( w );
 }
q = 1.0f/x;
w = sqrtf(q);
p = w * polevlf( q, MO, 7);
w = q*q;
xn = q * polevlf( w, PH, 7) - PIO4F;
p = p * sinf(xn + x);
return( p );
}

canonical_original_code:
float y0f(float xx)
{
float x; float w; float z; float p; float q; float xn;
x = xx;
if( x <= 2.0f )
 {
 if( x <= 0.0f )
  {
  mtherr( "y0f", 1 );
  return( -MAXNUMF );
  }
 z = x * x;
 w = (z-YZ1) * polevlf( z, YP, 4);
 w += TWOOPI * logf(x) * j0f(x);
 return( w );
 }
q = 1.0f/x;
w = sqrtf(q);
p = w * polevlf( q, MO, 7);
w = q*q;
xn = q * polevlf( w, PH, 7) - PIO4F;
p = p * sinf(xn + x);
return( p );
}

variable_types: x float


polevlf

decompiled_code:
float __fastcall polevlf(float *a1, int a2, float a3)
{
float *v4; // rax
float result; // xmm0_4

v4 = a1 + 1;
result = *a1;
do
result = (float)(result * a3) + *v4++;
while ( v4 != &a1[a2 - 1 + 2] );
return result;
}

canonical_decompiled_code:
float __fastcall func0(float *a1, int a2, float a3)
{
float *v4; // rax
float result; // xmm0_4

v4 = a1 + 1;
result = *a1;
do
result = (float)(result * a3) + *v4++;
while ( v4 != &a1[a2 - 1 + 2] );
return result;
}

original_code:
float polevlf( float xx, float *coef, int N )
{
float ans, x;
float *p;
int i;
x = xx;
p = coef;
ans = *p++;
i = N;
do
 ans = ans * x + *p++;
while( --i );
return( ans );
}

canonical_original_code:
float polevlf(float xx, float *coef, int N)
{
float ans; float x;
float *p;
int i;
x = xx;
p = coef;
ans = *p++;
i = N;
do
 ans = ans * x + *p++;
while( --i );
return( ans );
}

variable_types:
coef
float *

variable_types: N int

variable_types: ans float

variable_types:
p
float *

variable_types: i int


decompiled_code:
float __fastcall p1evlf(float *a1, int a2, float a3)
{
float *v4; // rax
float result; // xmm0_4

v4 = a1 + 1;
result = a3 + *a1;
do
result = (float)(result * a3) + *v4++;
while ( v4 != &a1[a2 - 2 + 2] );
return result;
}

canonical_decompiled_code:
float __fastcall func1(float *a1, int a2, float a3)
{
float *v4; // rax
float result; // xmm0_4

v4 = a1 + 1;
result = a3 + *a1;
do
result = (float)(result * a3) + *v4++;
while ( v4 != &a1[a2 - 2 + 2] );
return result;
}

original_code:
float p1evlf( float xx, float *coef, int N )
{
float ans, x;
float *p;
int i;
x = xx;
p = coef;
ans = x + *p++;
i = N-1;
do
 ans = ans * x + *p++;
while( --i );
return( ans );
}

canonical_original_code:
float p1evlf(float xx, float *coef, int N)
{
float ans; float x;
float *p;
int i;
x = xx;
p = coef;
ans = x + *p++;
i = N-1;
do
 ans = ans * x + *p++;
while( --i );
return( ans );
}

variable_types: xx float


tanhf

variable_types: z float


rgammaf

decompiled_code:
float __fastcall rgammaf(float a1)
{
float i; // ebx
__m128i v2; // xmm4
__m128i v3; // xmm5
float result; // xmm0_4
float v5; // xmm0_4
int v6; // ebx
float v7; // xmm0_4
float v8; // xmm0_4
float v9; // [rsp+0h] [rbp-18h]
double v10; // [rsp+0h] [rbp-18h]
float v11; // [rsp+Ch] [rbp-Ch]

if ( a1 > 34.84425627277176 )
{
mtherr(name, 4LL);
result = 1.0 / MAXNUMF;
}
else if ( a1 < -34.034 )
{
LODWORD(v9) = LODWORD(a1) ^ LC4;
v5 = sinf(COERCE_FLOAT(LODWORD(a1) ^ LC4) * PIF);
if ( v5 == 0.0 )
{
result = 0.0;
}
else
{
v6 = -1;
if ( v5 < 0.0 )
{
LODWORD(v5) ^= LC4;
v6 = 1;
}
v11 = logf((float)(v5 * v9) / PIF);
v7 = lgamf(v9) + v11;
if ( COERCE_FLOAT(MAXLOGF ^ LC4) > v7 )
{
mtherr(name, 4LL);
result = (double)v6 / MAXNUMF;
}
else if ( v7 <= MAXLOGF )
{
result = (float)v6 * expf(v7);
}
else
{
mtherr(name, 3LL);
result = (float)v6 * MAXNUMF;
}
}
}
else
{
for ( i = *(float *)&LC0; a1 > 1.0; i = COERCE_FLOAT(_mm_cvtsi128_si32(v2)) )
{
a1 = a1 - 1.0;
v2 = _mm_cvtsi32_si128(LODWORD(i));
*(float *)v2.m128i_i32 = *(float *)v2.m128i_i32 * a1;
}
for ( ; a1 < 0.0; a1 = a1 + 1.0 )
{
v3 = _mm_cvtsi32_si128(LODWORD(i));
*(float *)v3.m128i_i32 = *(float *)v3.m128i_i32 / a1;
i = COERCE_FLOAT(_mm_cvtsi128_si32(v3));
}
if ( a1 == 0.0 )
{
result = 0.0;
}
else if ( a1 == 1.0 )
{
result = 1.0 / i;
}
else
{
v10 = a1;
v8 = a1 * 4.0 - 2.0;
result = v10 * (chbevlf(&R, 10LL, v8, 0.0, COERCE_DOUBLE((unsigned __int64)LC0)) + 1.0) / i;
}
}
return result;
}

canonical_decompiled_code:
float __fastcall func0(float a1)
{
float i; // ebx
__m128i v2; // xmm4
__m128i v3; // xmm5
float result; // xmm0_4
float v5; // xmm0_4
int v6; // ebx
float v7; // xmm0_4
float v8; // xmm0_4
float v9; // [rsp+0h] [rbp-18h]
double v10; // [rsp+0h] [rbp-18h]
float v11; // [rsp+Ch] [rbp-Ch]

if ( a1 > 34.84425627277176 )
{
mtherr(name, 4LL);
result = 1.0 / MAXNUMF;
}
else if ( a1 < -34.034 )
{
LODWORD(v9) = LODWORD(a1) ^ LC4;
v5 = sinf(COERCE_FLOAT(LODWORD(a1) ^ LC4) * PIF);
if ( v5 == 0.0 )
{
result = 0.0;
}
else
{
v6 = -1;
if ( v5 < 0.0 )
{
LODWORD(v5) ^= LC4;
v6 = 1;
}
v11 = logf((float)(v5 * v9) / PIF);
v7 = lgamf(v9) + v11;
if ( COERCE_FLOAT(MAXLOGF ^ LC4) > v7 )
{
mtherr(name, 4LL);
result = (double)v6 / MAXNUMF;
}
else if ( v7 <= MAXLOGF )
{
result = (float)v6 * expf(v7);
}
else
{
mtherr(name, 3LL);
result = (float)v6 * MAXNUMF;
}
}
}
else
{
for ( i = *(float *)&LC0; a1 > 1.0; i = COERCE_FLOAT(_mm_cvtsi128_si32(v2)) )
{
a1 = a1 - 1.0;
v2 = _mm_cvtsi32_si128(LODWORD(i));
*(float *)v2.m128i_i32 = *(float *)v2.m128i_i32 * a1;
}
for ( ; a1 < 0.0; a1 = a1 + 1.0 )
{
v3 = _mm_cvtsi32_si128(LODWORD(i));
*(float *)v3.m128i_i32 = *(float *)v3.m128i_i32 / a1;
i = COERCE_FLOAT(_mm_cvtsi128_si32(v3));
}
if ( a1 == 0.0 )
{
result = 0.0;
}
else if ( a1 == 1.0 )
{
result = 1.0 / i;
}
else
{
v10 = a1;
v8 = a1 * 4.0 - 2.0;
result = v10 * (chbevlf(&R, 10LL, v8, 0.0, COERCE_DOUBLE((unsigned __int64)LC0)) + 1.0) / i;
}
}
return result;
}

original_code:
float rgammaf(float xx)
{
float x, w, y, z;
int sign;
x = xx;
if( x > 34.84425627277176174)
 {
 mtherr( name, 4 );
 return(1.0/MAXNUMF);
 }
if( x < -34.034 )
 {
 w = -x;
 z = sinf( PIF*w );
 if( z == 0.0 )
  return(0.0);
 if( z < 0.0 )
  {
  sign = 1;
  z = -z;
  }
 else
  sign = -1;
 y = logf( w * z / PIF ) + lgamf(w);
 if( y < -MAXLOGF )
  {
  mtherr( name, 4 );
  return( sign * 1.0 / MAXNUMF );
  }
 if( y > MAXLOGF )
  {
  mtherr( name, 3 );
  return( sign * MAXNUMF );
  }
 return( sign * expf(y));
 }
z = 1.0;
w = x;
while( w > 1.0 )
 {
 w -= 1.0;
 z *= w;
 }
while( w < 0.0 )
 {
 z /= w;
 w += 1.0;
 }
if( w == 0.0 )
 return(0.0);
if( w == 1.0 )
 return( 1.0/z );
y = w * ( 1.0 + chbevlf( 4.0*w-2.0, R, 10 ) ) / z;
return(y);
}

canonical_original_code:
float rgammaf(float xx)
{
float x; float w; float y; float z;
int sign;
x = xx;
if( x > 34.84425627277176174)
 {
 mtherr( name, 4 );
 return(1.0/MAXNUMF);
 }
if( x < -34.034 )
 {
 w = -x;
 z = sinf( PIF*w );
 if( z == 0.0 )
  return(0.0);
 if( z < 0.0 )
  {
  sign = 1;
  z = -z;
  }
 else
  sign = -1;
 y = logf( w * z / PIF ) + lgamf(w);
 if( y < -MAXLOGF )
  {
  mtherr( name, 4 );
  return( sign * 1.0 / MAXNUMF );
  }
 if( y > MAXLOGF )
  {
  mtherr( name, 3 );
  return( sign * MAXNUMF );
  }
 return( sign * expf(y));
 }
z = 1.0;
w = x;
while( w > 1.0 )
 {
 w -= 1.0;
 z *= w;
 }
while( w < 0.0 )
 {
 z /= w;
 w += 1.0;
 }
if( w == 0.0 )
 return(0.0);
if( w == 1.0 )
 return( 1.0/z );
y = w * ( 1.0 + chbevlf( 4.0*w-2.0, R, 10 ) ) / z;
return(y);
}

variable_types: y float


atanf

variable_types: sign int


original_code:
float atan2f( float y, float x )
{
float z, w;
int code;
code = 0;
if( x < 0.0 )
 code = 2;
if( y < 0.0 )
 code |= 1;
if( x == 0.0 )
 {
 if( code & 1 )
  {
  return( -PIO2F );
  }
 if( y == 0.0 )
  return( 0.0 );
 return( PIO2F );
 }
if( y == 0.0 )
 {
 if( code & 2 )
  return( PIF );
 return( 0.0 );
 }
switch( code )
 {
 default:
 case 0:
 case 1: w = 0.0; break;
 case 2: w = PIF; break;
 case 3: w = -PIF; break;
 }
z = atanf( y/x );
return( w + z );
}

canonical_original_code:
float atan2f(float y, float x)
{
float z; float w;
int code;
code = 0;
if( x < 0.0 )
 code = 2;
if( y < 0.0 )
 code |= 1;
if( x == 0.0 )
 {
 if( code & 1 )
  {
  return( -PIO2F );
  }
 if( y == 0.0 )
  return( 0.0 );
 return( PIO2F );
 }
if( y == 0.0 )
 {
 if( code & 2 )
  return( PIF );
 return( 0.0 );
 }
switch( code )
 {
 default:
 case 0:
 case 1: w = 0.0; break;
 case 2: w = PIF; break;
 case 3: w = -PIF; break;
 }
z = atanf( y/x );
return( w + z );
}

variable_types: code int


ellief

original_code:
float ellief( float phia, float ma )
{
float phi, m, a, b, c, e, temp;
float lphi, t;
int d, mod;
phi = phia;
m = ma;
if( m == 0.0 )
 return( phi );
if( m == 1.0 )
 return( sinf(phi) );
lphi = phi;
if( lphi < 0.0 )
 lphi = -lphi;
a = 1.0;
b = 1.0 - m;
b = sqrtf(b);
c = sqrtf(m);
d = 1;
e = 0.0;
t = tanf( lphi );
mod = (lphi + PIO2F)/PIF;
while( ( (c/a) < 0 ? -(c/a) : (c/a) ) > MACHEPF )
 {
 temp = b/a;
 lphi = lphi + atanf(t*temp) + mod * PIF;
 mod = (lphi + PIO2F)/PIF;
 t = t * ( 1.0 + temp )/( 1.0 - temp * t * t );
 c = 0.5 * ( a - b );
 temp = sqrtf( a * b );
 a = 0.5 * ( a + b );
 b = temp;
 d += d;
 e += c * sinf(lphi);
 }
b = 1.0 - m;
temp = ellpef(b)/ellpkf(b);
temp *= (atanf(t) + mod * PIF)/(d * a);
temp += e;
if( phi < 0.0 )
 temp = -temp;
return( temp );
}

canonical_original_code:
float ellief(float phia, float ma)
{
float phi; float m; float a; float b; float c; float e; float temp;
float lphi; float t;
int d; int mod;
phi = phia;
m = ma;
if( m == 0.0 )
 return( phi );
if( m == 1.0 )
 return( sinf(phi) );
lphi = phi;
if( lphi < 0.0 )
 lphi = -lphi;
a = 1.0;
b = 1.0 - m;
b = sqrtf(b);
c = sqrtf(m);
d = 1;
e = 0.0;
t = tanf( lphi );
mod = (lphi + PIO2F)/PIF;
while( ( (c/a) < 0 ? -(c/a) : (c/a) ) > MACHEPF )
 {
 temp = b/a;
 lphi = lphi + atanf(t*temp) + mod * PIF;
 mod = (lphi + PIO2F)/PIF;
 t = t * ( 1.0 + temp )/( 1.0 - temp * t * t );
 c = 0.5 * ( a - b );
 temp = sqrtf( a * b );
 a = 0.5 * ( a + b );
 b = temp;
 d += d;
 e += c * sinf(lphi);
 }
b = 1.0 - m;
temp = ellpef(b)/ellpkf(b);
temp *= (atanf(t) + mod * PIF)/(d * a);
temp += e;
if( phi < 0.0 )
 temp = -temp;
return( temp );
}

variable_types: phia float

variable_types: ma float

variable_types: phi float

variable_types: m float

variable_types: a float

variable_types: b float

variable_types: c float

variable_types: e float

variable_types: temp float

variable_types: lphi float

variable_types: t float

variable_types: d int

variable_types: mod int


shichif

original_code:
int shichif( float xx, float *si, float *ci )
{
float x, k, z, c, s, a;
short sign;
x = xx;
if( x < 0.0 )
 {
 sign = -1;
 x = -x;
 }
else
 sign = 0;
if( x == 0.0 )
 {
 *si = 0.0;
 *ci = -MAXNUMF;
 return( 0 );
 }
if( x >= 8.0 )
 goto chb;
z = x * x;
a = 1.0;
s = 1.0;
c = 0.0;
k = 2.0;
do
 {
 a *= z/k;
 c += a/k;
 k += 1.0;
 a /= k;
 s += a/k;
 k += 1.0;
 }
while( ( (a/s) < 0 ? -(a/s) : (a/s) ) > MACHEPF );
s *= x;
goto done;
chb:
if( x < 18.0 )
 {
 a = (576.0/x - 52.0)/10.0;
 k = expf(x) / x;
 s = k * chbevlf( a, S1, 9 );
 c = k * chbevlf( a, C1, 10 );
 goto done;
 }
if( x <= 88.0 )
 {
 a = (6336.0/x - 212.0)/70.0;
 k = expf(x) / x;
 s = k * chbevlf( a, S2, 7 );
 c = k * chbevlf( a, C2, 7 );
 goto done;
 }
else
 {
 if( sign )
  *si = -MAXNUMF;
 else
  *si = MAXNUMF;
 *ci = MAXNUMF;
 return(0);
 }
done:
if( sign )
 s = -s;
*si = s;
*ci = 0.57721566490153286061 + logf(x) + c;
return(0);
}

canonical_original_code:
int shichif(float xx, float *si, float *ci)
{
float x; float k; float z; float c; float s; float a;
short sign;
x = xx;
if( x < 0.0 )
 {
 sign = -1;
 x = -x;
 }
else
 sign = 0;
if( x == 0.0 )
 {
 *si = 0.0;
 *ci = -MAXNUMF;
 return( 0 );
 }
if( x >= 8.0 )
 goto chb;
z = x * x;
a = 1.0;
s = 1.0;
c = 0.0;
k = 2.0;
do
 {
 a *= z/k;
 c += a/k;
 k += 1.0;
 a /= k;
 s += a/k;
 k += 1.0;
 }
while( ( (a/s) < 0 ? -(a/s) : (a/s) ) > MACHEPF );
s *= x;
goto done;
chb:
if( x < 18.0 )
 {
 a = (576.0/x - 52.0)/10.0;
 k = expf(x) / x;
 s = k * chbevlf( a, S1, 9 );
 c = k * chbevlf( a, C1, 10 );
 goto done;
 }
if( x <= 88.0 )
 {
 a = (6336.0/x - 212.0)/70.0;
 k = expf(x) / x;
 s = k * chbevlf( a, S2, 7 );
 c = k * chbevlf( a, C2, 7 );
 goto done;
 }
else
 {
 if( sign )
  *si = -MAXNUMF;
 else
  *si = MAXNUMF;
 *ci = MAXNUMF;
 return(0);
 }
done:
if( sign )
 s = -s;
*si = s;
*ci = 0.57721566490153286061 + logf(x) + c;
return(0);
}

variable_types: xx float

variable_types:
si
float *

variable_types:
ci
float *

variable_types: x float

variable_types: k float

variable_types: z float

variable_types: s float

variable_types: sign short


sicif

original_code:
int sicif( float xx, float *si, float *ci )
{
float x, z, c, s, f, g;
int sign;
x = xx;
if( x < 0.0 )
 {
 sign = -1;
 x = -x;
 }
else
 sign = 0;
if( x == 0.0 )
 {
 *si = 0.0;
 *ci = -MAXNUMF;
 return( 0 );
 }
if( x > 1.0e9 )
 {
 *si = PIO2F - cosf(x)/x;
 *ci = sinf(x)/x;
 return( 0 );
 }
if( x > 4.0 )
 goto asympt;
z = x * x;
s = x * polevlf( z, SN, 5 ) / polevlf( z, SD, 5 );
c = z * polevlf( z, CN, 5 ) / polevlf( z, CD, 5 );
if( sign )
 s = -s;
*si = s;
*ci = 0.57721566490153286061 + logf(x) + c;
return(0);
asympt:
s = sinf(x);
c = cosf(x);
z = 1.0/(x*x);
if( x < 8.0 )
 {
 f = polevlf( z, FN4, 6 ) / (x * p1evlf( z, FD4, 7 ));
 g = z * polevlf( z, GN4, 7 ) / p1evlf( z, GD4, 7 );
 }
else
 {
 f = polevlf( z, FN8, 8 ) / (x * p1evlf( z, FD8, 8 ));
 g = z * polevlf( z, GN8, 8 ) / p1evlf( z, GD8, 9 );
 }
*si = PIO2F - f * c - g * s;
if( sign )
 *si = -( *si );
*ci = f * s - g * c;
return(0);
}

canonical_original_code:
int sicif(float xx, float *si, float *ci)
{
float x; float z; float c; float s; float f; float g;
int sign;
x = xx;
if( x < 0.0 )
 {
 sign = -1;
 x = -x;
 }
else
 sign = 0;
if( x == 0.0 )
 {
 *si = 0.0;
 *ci = -MAXNUMF;
 return( 0 );
 }
if( x > 1.0e9 )
 {
 *si = PIO2F - cosf(x)/x;
 *ci = sinf(x)/x;
 return( 0 );
 }
if( x > 4.0 )
 goto asympt;
z = x * x;
s = x * polevlf( z, SN, 5 ) / polevlf( z, SD, 5 );
c = z * polevlf( z, CN, 5 ) / polevlf( z, CD, 5 );
if( sign )
 s = -s;
*si = s;
*ci = 0.57721566490153286061 + logf(x) + c;
return(0);
asympt:
s = sinf(x);
c = cosf(x);
z = 1.0/(x*x);
if( x < 8.0 )
 {
 f = polevlf( z, FN4, 6 ) / (x * p1evlf( z, FD4, 7 ));
 g = z * polevlf( z, GN4, 7 ) / p1evlf( z, GD4, 7 );
 }
else
 {
 f = polevlf( z, FN8, 8 ) / (x * p1evlf( z, FD8, 8 ));
 g = z * polevlf( z, GN8, 8 ) / p1evlf( z, GD8, 9 );
 }
*si = PIO2F - f * c - g * s;
if( sign )
 *si = -( *si );
*ci = f * s - g * c;
return(0);
}

variable_types: f float

variable_types: g float

variable_types: sign int


ellpjf

original_code:
int ellpjf( float uu, float mm,
   float *sn, float *cn, float *dn, float *ph )
{
float u, m, ai, b, phi, t, twon;
float a[10], c[10];
int i;
u = uu;
m = mm;
if( m < 0.0 || m > 1.0 )
 {
 mtherr( "ellpjf", 1 );
 return(-1);
 }
if( m < 1.0e-5 )
 {
 t = sinf(u);
 b = cosf(u);
 ai = 0.25 * m * (u - t*b);
 *sn = t - ai*b;
 *cn = b + ai*t;
 *ph = u - ai;
 *dn = 1.0 - 0.5*m*t*t;
 return(0);
 }
if( m >= 0.99999 )
 {
 ai = 0.25 * (1.0-m);
 b = coshf(u);
 t = tanhf(u);
 phi = 1.0/b;
 twon = b * sinhf(u);
 *sn = t + ai * (twon - u)/(b*b);
 *ph = 2.0*atanf(expf(u)) - PIO2F + ai*(twon - u)/b;
 ai *= t * phi;
 *cn = phi - ai * (twon - u);
 *dn = phi + ai * (twon + u);
 return(0);
 }
a[0] = 1.0;
b = sqrtf(1.0 - m);
c[0] = sqrtf(m);
twon = 1.0;
i = 0;
while( ( ((c[i]/a[i])) < 0 ? -((c[i]/a[i])) : ((c[i]/a[i])) ) > MACHEPF )
 {
 if( i > 8 )
  {
  break;
  }
 ai = a[i];
 ++i;
 c[i] = 0.5 * ( ai - b );
 t = sqrtf( ai * b );
 a[i] = 0.5 * ( ai + b );
 b = t;
 twon += twon;
 }
phi = twon * a[i] * u;
do
 {
 t = c[i] * sinf(phi) / a[i];
 b = phi;
 phi = 0.5 * (asinf(t) + phi);
 }
while( --i );
*sn = sinf(phi);
t = cosf(phi);
*cn = t;
*dn = t/cosf(phi-b);
*ph = phi;
return(0);
}

canonical_original_code:
int ellpjf(float uu, float mm, float *sn, float *cn, float *dn, float *ph)
{
float u; float m; float ai; float b; float phi; float t; float twon;
float a[10]; float c[10];
int i;
u = uu;
m = mm;
if( m < 0.0 || m > 1.0 )
 {
 mtherr( "ellpjf", 1 );
 return(-1);
 }
if( m < 1.0e-5 )
 {
 t = sinf(u);
 b = cosf(u);
 ai = 0.25 * m * (u - t*b);
 *sn = t - ai*b;
 *cn = b + ai*t;
 *ph = u - ai;
 *dn = 1.0 - 0.5*m*t*t;
 return(0);
 }
if( m >= 0.99999 )
 {
 ai = 0.25 * (1.0-m);
 b = coshf(u);
 t = tanhf(u);
 phi = 1.0/b;
 twon = b * sinhf(u);
 *sn = t + ai * (twon - u)/(b*b);
 *ph = 2.0*atanf(expf(u)) - PIO2F + ai*(twon - u)/b;
 ai *= t * phi;
 *cn = phi - ai * (twon - u);
 *dn = phi + ai * (twon + u);
 return(0);
 }
a[0] = 1.0;
b = sqrtf(1.0 - m);
c[0] = sqrtf(m);
twon = 1.0;
i = 0;
while( ( ((c[i]/a[i])) < 0 ? -((c[i]/a[i])) : ((c[i]/a[i])) ) > MACHEPF )
 {
 if( i > 8 )
  {
  break;
  }
 ai = a[i];
 ++i;
 c[i] = 0.5 * ( ai - b );
 t = sqrtf( ai * b );
 a[i] = 0.5 * ( ai + b );
 b = t;
 twon += twon;
 }
phi = twon * a[i] * u;
do
 {
 t = c[i] * sinf(phi) / a[i];
 b = phi;
 phi = 0.5 * (asinf(t) + phi);
 }
while( --i );
*sn = sinf(phi);
t = cosf(phi);
*cn = t;
*dn = t/cosf(phi-b);
*ph = phi;
return(0);
}

variable_types: uu float

variable_types: mm float

variable_types:
sn
float *

variable_types:
cn
float *

variable_types:
dn
float *

variable_types:
ph
float *

variable_types: u float

variable_types: m float

variable_types: ai float

variable_types: b float

variable_types: phi float

variable_types: twon float

variable_types:
a
float [10]

variable_types:
c
float [10]

variable_types: i int


decompiled_code:
float __fastcall i0f(float a1)
{
float x; // [rsp+8h] [rbp-10h]
float v3; // [rsp+Ch] [rbp-Ch]
float v4; // [rsp+Ch] [rbp-Ch]

x = a1;
if ( a1 < 0.0 )
LODWORD(x) = LODWORD(a1) ^ LC1;
v3 = expf(x);
if ( x <= 8.0 )
return chbevlf(&A, 18LL, (float)(x * 0.5) - 2.0) * v3;
v4 = chbevlf(&B, 7LL, (float)(32.0 / x) - 2.0) * v3;
return v4 / sqrtf(x);
}

canonical_decompiled_code:
float __fastcall func0(float a1)
{
float x; // [rsp+8h] [rbp-10h]
float v3; // [rsp+Ch] [rbp-Ch]
float v4; // [rsp+Ch] [rbp-Ch]

x = a1;
if ( a1 < 0.0 )
LODWORD(x) = LODWORD(a1) ^ LC1;
v3 = expf(x);
if ( x <= 8.0 )
return chbevlf(&A, 18LL, (float)(x * 0.5) - 2.0) * v3;
v4 = chbevlf(&B, 7LL, (float)(32.0 / x) - 2.0) * v3;
return v4 / sqrtf(x);
}

original_code:
float i0f( float x )
{
float y;
if( x < 0 )
 x = -x;
if( x <= 8.0f )
 {
 y = 0.5f*x - 2.0f;
 return( expf(x) * chbevlf( y, A, 18 ) );
 }
return( expf(x) * chbevlf( 32.0f/x - 2.0f, B, 7 ) / sqrtf(x) );
}

canonical_original_code:
float i0f(float x)
{
float y;
if( x < 0 )
 x = -x;
if( x <= 8.0f )
 {
 y = 0.5f*x - 2.0f;
 return( expf(x) * chbevlf( y, A, 18 ) );
 }
return( expf(x) * chbevlf( 32.0f/x - 2.0f, B, 7 ) / sqrtf(x) );
}

variable_types: x float

variable_types: y float


decompiled_code:
float __fastcall i0ef(float a1)
{
float x; // [rsp+8h] [rbp-10h]
float v3; // [rsp+Ch] [rbp-Ch]

x = a1;
if ( a1 < 0.0 )
LODWORD(x) = LODWORD(a1) ^ LC1;
if ( x <= 8.0 )
return chbevlf(&A, 18LL, (float)(x * 0.5) - 2.0);
v3 = chbevlf(&B, 7LL, (float)(32.0 / x) - 2.0);
return v3 / sqrtf(x);
}

canonical_decompiled_code:
float __fastcall func1(float a1)
{
float x; // [rsp+8h] [rbp-10h]
float v3; // [rsp+Ch] [rbp-Ch]

x = a1;
if ( a1 < 0.0 )
LODWORD(x) = LODWORD(a1) ^ LC1;
if ( x <= 8.0 )
return chbevlf(&A, 18LL, (float)(x * 0.5) - 2.0);
v3 = chbevlf(&B, 7LL, (float)(32.0 / x) - 2.0);
return v3 / sqrtf(x);
}

original_code:
float i0ef( float x )
{
float y;
if( x < 0 )
 x = -x;
if( x <= 8.0f )
 {
 y = 0.5f*x - 2.0f;
 return( chbevlf( y, A, 18 ) );
 }
return( chbevlf( 32.0f/x - 2.0f, B, 7 ) / sqrtf(x) );
}

canonical_original_code:
float i0ef(float x)
{
float y;
if( x < 0 )
 x = -x;
if( x <= 8.0f )
 {
 y = 0.5f*x - 2.0f;
 return( chbevlf( y, A, 18 ) );
 }
return( chbevlf( 32.0f/x - 2.0f, B, 7 ) / sqrtf(x) );
}


decompiled_code:
float __fastcall log2f(double a1)
{
double v1; // xmm1_8
double v2; // xmm0_8
float v3; // xmm6_4
float v4; // xmm0_4
float v5; // xmm1_4
float v6; // xmm1_4
float result; // xmm0_4
float v8; // [rsp+8h] [rbp-20h]
int exponent[3]; // [rsp+1Ch] [rbp-Ch] BYREF

if ( *(float *)&a1 <= 0.0 )
{
if ( *(float *)&a1 == 0.0 )
mtherr(fname, 2LL);
else
mtherr(fname, 1LL);
result = MINLOGF / LOGE2F;
}
else
{
*(float *)&a1 = frexpf(*(float *)&a1, exponent);
v1 = a1;
v2 = *(float *)&a1;
if ( v2 >= 0.7071067811865476 )
{
*(float *)&v1 = *(float *)&v1 - 1.0;
v8 = *(float *)&v1;
}
else
{
--exponent[0];
v3 = v2 + v2 - 1.0;
v8 = v3;
}
v4 = (float)((float)(polevlf(&P, 8LL, v8, v1) * (float)(v8 * v8)) * v8) - (float)(v8 * v8) * 0.5;
v5 = v4 * 0.4426950408889634;
v6 = v5 + v8 * 0.4426950408889634;
result = (float)((float)(v4 + v6) + v8) + (float)exponent[0];
}
return result;
}

canonical_decompiled_code:
float __fastcall func0(double a1)
{
double v1; // xmm1_8
double v2; // xmm0_8
float v3; // xmm6_4
float v4; // xmm0_4
float v5; // xmm1_4
float v6; // xmm1_4
float result; // xmm0_4
float v8; // [rsp+8h] [rbp-20h]
int exponent[3]; // [rsp+1Ch] [rbp-Ch] BYREF

if ( *(float *)&a1 <= 0.0 )
{
if ( *(float *)&a1 == 0.0 )
mtherr(fname, 2LL);
else
mtherr(fname, 1LL);
result = MINLOGF / LOGE2F;
}
else
{
*(float *)&a1 = frexpf(*(float *)&a1, exponent);
v1 = a1;
v2 = *(float *)&a1;
if ( v2 >= 0.7071067811865476 )
{
*(float *)&v1 = *(float *)&v1 - 1.0;
v8 = *(float *)&v1;
}
else
{
--exponent[0];
v3 = v2 + v2 - 1.0;
v8 = v3;
}
v4 = (float)((float)(polevlf(&P, 8LL, v8, v1) * (float)(v8 * v8)) * v8) - (float)(v8 * v8) * 0.5;
v5 = v4 * 0.4426950408889634;
v6 = v5 + v8 * 0.4426950408889634;
result = (float)((float)(v4 + v6) + v8) + (float)exponent[0];
}
return result;
}

variable_types: xx float

variable_types: z float

variable_types: e int


knf

canonical_original_code:
float knf(int nnn, float xx)
{
float x; float k; float kf; float nk1f; float nkf; float zn; float t; float s; float z0; float z;
float ans; float fn; float pn; float pk; float zmn; float tlg; float tox;
int i; int n; int nn;
nn = nnn;
x = xx;
if( nn < 0 )
 n = -nn;
else
 n = nn;
if( n > 31 )
 {
overf:
 mtherr( "knf", 3 );
 return( MAXNUMF );
 }
if( x <= 0.0 )
 {
 if( x < 0.0 )
  mtherr( "knf", 1 );
 else
  mtherr( "knf", 2 );
 return( MAXNUMF );
 }
if( x > 9.55 )
 goto asymp;
ans = 0.0;
z0 = 0.25 * x * x;
fn = 1.0;
pn = 0.0;
zmn = 1.0;
tox = 2.0/x;
if( n > 0 )
 {
 pn = -5.772156649015328606065e-1;
 k = 1.0;
 for( i=1; i<n; i++ )
  {
  pn += 1.0/k;
  k += 1.0;
  fn *= k;
  }
 zmn = tox;
 if( n == 1 )
  {
  ans = 1.0/x;
  }
 else
  {
  nk1f = fn/n;
  kf = 1.0;
  s = nk1f;
  z = -z0;
  zn = 1.0;
  for( i=1; i<n; i++ )
   {
   nk1f = nk1f/(n-i);
   kf = kf * i;
   zn *= z;
   t = nk1f * zn / kf;
   s += t;
   if( (MAXNUMF - ( (t) < 0 ? -(t) : (t) )) < ( (s) < 0 ? -(s) : (s) ) )
    goto overf;
   if( (tox > 1.0) && ((MAXNUMF/tox) < zmn) )
    goto overf;
   zmn *= tox;
   }
  s *= 0.5;
  t = ( (s) < 0 ? -(s) : (s) );
  if( (zmn > 1.0) && ((MAXNUMF/zmn) < t) )
   goto overf;
  if( (t > 1.0) && ((MAXNUMF/t) < zmn) )
   goto overf;
  ans = s * zmn;
  }
 }
tlg = 2.0 * logf( 0.5 * x );
pk = -5.772156649015328606065e-1;
if( n == 0 )
 {
 pn = pk;
 t = 1.0;
 }
else
 {
 pn = pn + 1.0/n;
 t = 1.0/fn;
 }
s = (pk+pn-tlg)*t;
k = 1.0;
do
 {
 t *= z0 / (k * (k+n));
 pk += 1.0/k;
 pn += 1.0/(k+n);
 s += (pk+pn-tlg)*t;
 k += 1.0;
 }
while( ( (t/s) < 0 ? -(t/s) : (t/s) ) > MACHEPF );
s = 0.5 * s / zmn;
if( n & 1 )
 s = -s;
ans += s;
return(ans);
asymp:
if( x > MAXLOGF )
 {
 mtherr( "knf", 4 );
 return(0.0);
 }
k = n;
pn = 4.0 * k * k;
pk = 1.0;
z0 = 8.0 * x;
fn = 1.0;
t = 1.0;
s = t;
nkf = MAXNUMF;
i = 0;
do
 {
 z = pn - pk * pk;
 t = t * z /(fn * z0);
 nk1f = ( (t) < 0 ? -(t) : (t) );
 if( (i >= n) && (nk1f > nkf) )
  {
  goto adone;
  }
 nkf = nk1f;
 s += t;
 fn += 1.0;
 pk += 2.0;
 i += 1;
 }
while( ( (t/s) < 0 ? -(t/s) : (t/s) ) > MACHEPF );
adone:
ans = expf(-x) * sqrtf( PIF/(2.0*x) ) * s;
return(ans);
}

variable_types: nnn int

variable_types: k float

variable_types: kf float

variable_types: nkf float

variable_types: zn float

variable_types: t float

variable_types: s float

variable_types: ans float

variable_types: fn float

variable_types: pn float

variable_types: pk float

variable_types: zmn float

variable_types: tlg float

variable_types: tox float

variable_types: n int

variable_types: nn int


expnf

original_code:
float expnf( int n, float xx )
{
float x, ans, r, t, yk, xk;
float pk, pkm1, pkm2, qk, qkm1, qkm2;
float psi, z;
int i, k;
static float big = 16777216.;
x = xx;
if( n < 0 )
 goto domerr;
if( x < 0 )
 {
domerr: mtherr( "expnf", 1 );
 return( MAXNUMF );
 }
if( x > MAXLOGF )
 return( 0.0 );
if( x == 0.0 )
 {
 if( n < 2 )
  {
  mtherr( "expnf", 2 );
  return( MAXNUMF );
  }
 else
  return( 1.0/(n-1.0) );
 }
if( n == 0 )
 return( expf(-x)/x );
if( n > 5000 )
 {
 xk = x + n;
 yk = 1.0 / (xk * xk);
 t = n;
 ans = yk * t * (6.0 * x * x - 8.0 * t * x + t * t);
 ans = yk * (ans + t * (t - 2.0 * x));
 ans = yk * (ans + t);
 ans = (ans + 1.0) * expf( -x ) / xk;
 goto done;
 }
if( x > 1.0 )
 goto cfrac;
psi = -0.57721566490153286060 - logf(x);
for( i=1; i<n; i++ )
 psi = psi + 1.0/i;
z = -x;
xk = 0.0;
yk = 1.0;
pk = 1.0 - n;
if( n == 1 )
 ans = 0.0;
else
 ans = 1.0/pk;
do
 {
 xk += 1.0;
 yk *= z/xk;
 pk += 1.0;
 if( pk != 0.0 )
  {
  ans += yk/pk;
  }
 if( ans != 0.0 )
  t = ( (yk/ans) < 0 ? -(yk/ans) : (yk/ans) );
 else
  t = 1.0;
 }
while( t > MACHEPF );
k = xk;
t = n;
r = n - 1;
ans = (powf(z, r) * psi / gammaf(t)) - ans;
goto done;
cfrac:
k = 1;
pkm2 = 1.0;
qkm2 = x;
pkm1 = 1.0;
qkm1 = x + n;
ans = pkm1/qkm1;
do
 {
 k += 1;
 if( k & 1 )
  {
  yk = 1.0;
  xk = n + (k-1)/2;
  }
 else
  {
  yk = x;
  xk = k/2;
  }
 pk = pkm1 * yk + pkm2 * xk;
 qk = qkm1 * yk + qkm2 * xk;
 if( qk != 0 )
  {
  r = pk/qk;
  t = ( ((ans - r)/r) < 0 ? -((ans - r)/r) : ((ans - r)/r) );
  ans = r;
  }
 else
  t = 1.0;
 pkm2 = pkm1;
 pkm1 = pk;
 qkm2 = qkm1;
 qkm1 = qk;
if( ( (pk) < 0 ? -(pk) : (pk) ) > big )
  {
  pkm2 *= MACHEPF;
  pkm1 *= MACHEPF;
  qkm2 *= MACHEPF;
  qkm1 *= MACHEPF;
  }
 }
while( t > MACHEPF );
ans *= expf( -x );
done:
return( ans );
}

canonical_original_code:
float expnf(int n, float xx)
{
float x; float ans; float r; float t; float yk; float xk;
float pk; float pkm1; float pkm2; float qk; float qkm1; float qkm2;
float psi; float z;
int i; int k;
static float big = 16777216.;
x = xx;
if( n < 0 )
 goto domerr;
if( x < 0 )
 {
domerr: mtherr( "expnf", 1 );
 return( MAXNUMF );
 }
if( x > MAXLOGF )
 return( 0.0 );
if( x == 0.0 )
 {
 if( n < 2 )
  {
  mtherr( "expnf", 2 );
  return( MAXNUMF );
  }
 else
  return( 1.0/(n-1.0) );
 }
if( n == 0 )
 return( expf(-x)/x );
if( n > 5000 )
 {
 xk = x + n;
 yk = 1.0 / (xk * xk);
 t = n;
 ans = yk * t * (6.0 * x * x - 8.0 * t * x + t * t);
 ans = yk * (ans + t * (t - 2.0 * x));
 ans = yk * (ans + t);
 ans = (ans + 1.0) * expf( -x ) / xk;
 goto done;
 }
if( x > 1.0 )
 goto cfrac;
psi = -0.57721566490153286060 - logf(x);
for( i=1; i<n; i++ )
 psi = psi + 1.0/i;
z = -x;
xk = 0.0;
yk = 1.0;
pk = 1.0 - n;
if( n == 1 )
 ans = 0.0;
else
 ans = 1.0/pk;
do
 {
 xk += 1.0;
 yk *= z/xk;
 pk += 1.0;
 if( pk != 0.0 )
  {
  ans += yk/pk;
  }
 if( ans != 0.0 )
  t = ( (yk/ans) < 0 ? -(yk/ans) : (yk/ans) );
 else
  t = 1.0;
 }
while( t > MACHEPF );
k = xk;
t = n;
r = n - 1;
ans = (powf(z, r) * psi / gammaf(t)) - ans;
goto done;
cfrac:
k = 1;
pkm2 = 1.0;
qkm2 = x;
pkm1 = 1.0;
qkm1 = x + n;
ans = pkm1/qkm1;
do
 {
 k += 1;
 if( k & 1 )
  {
  yk = 1.0;
  xk = n + (k-1)/2;
  }
 else
  {
  yk = x;
  xk = k/2;
  }
 pk = pkm1 * yk + pkm2 * xk;
 qk = qkm1 * yk + qkm2 * xk;
 if( qk != 0 )
  {
  r = pk/qk;
  t = ( ((ans - r)/r) < 0 ? -((ans - r)/r) : ((ans - r)/r) );
  ans = r;
  }
 else
  t = 1.0;
 pkm2 = pkm1;
 pkm1 = pk;
 qkm2 = qkm1;
 qkm1 = qk;
if( ( (pk) < 0 ? -(pk) : (pk) ) > big )
  {
  pkm2 *= MACHEPF;
  pkm1 *= MACHEPF;
  qkm2 *= MACHEPF;
  qkm1 *= MACHEPF;
  }
 }
while( t > MACHEPF );
ans *= expf( -x );
done:
return( ans );
}

variable_types: xx float

variable_types: x float

variable_types: r float

variable_types: yk float

variable_types: xk float

variable_types: qk float

variable_types: psi float

variable_types: z float

variable_types: i int

variable_types: k int

variable_types: big float


spencef

variable_types: w float

variable_types: y float

variable_types: flag int


ellikf

original_code:
float ellikf( float phia, float ma )
{
float phi, m, a, b, c, temp;
float t;
int d, mod, sign;
phi = phia;
m = ma;
if( m == 0.0 )
 return( phi );
if( phi < 0.0 )
 {
 phi = -phi;
 sign = -1;
 }
else
 sign = 0;
a = 1.0;
b = 1.0 - m;
if( b == 0.0 )
 return( logf( tanf( 0.5*(PIO2F + phi) ) ) );
b = sqrtf(b);
c = sqrtf(m);
d = 1;
t = tanf( phi );
mod = (phi + PIO2F)/PIF;
while( ( (c/a) < 0 ? -(c/a) : (c/a) ) > MACHEPF )
 {
 temp = b/a;
 phi = phi + atanf(t*temp) + mod * PIF;
 mod = (phi + PIO2F)/PIF;
 t = t * ( 1.0 + temp )/( 1.0 - temp * t * t );
 c = ( a - b )/2.0;
 temp = sqrtf( a * b );
 a = ( a + b )/2.0;
 b = temp;
 d += d;
 }
temp = (atanf(t) + mod * PIF)/(d * a);
if( sign < 0 )
 temp = -temp;
return( temp );
}

canonical_original_code:
float ellikf(float phia, float ma)
{
float phi; float m; float a; float b; float c; float temp;
float t;
int d; int mod; int sign;
phi = phia;
m = ma;
if( m == 0.0 )
 return( phi );
if( phi < 0.0 )
 {
 phi = -phi;
 sign = -1;
 }
else
 sign = 0;
a = 1.0;
b = 1.0 - m;
if( b == 0.0 )
 return( logf( tanf( 0.5*(PIO2F + phi) ) ) );
b = sqrtf(b);
c = sqrtf(m);
d = 1;
t = tanf( phi );
mod = (phi + PIO2F)/PIF;
while( ( (c/a) < 0 ? -(c/a) : (c/a) ) > MACHEPF )
 {
 temp = b/a;
 phi = phi + atanf(t*temp) + mod * PIF;
 mod = (phi + PIO2F)/PIF;
 t = t * ( 1.0 + temp )/( 1.0 - temp * t * t );
 c = ( a - b )/2.0;
 temp = sqrtf( a * b );
 a = ( a + b )/2.0;
 b = temp;
 d += d;
 }
temp = (atanf(t) + mod * PIF)/(d * a);
if( sign < 0 )
 temp = -temp;
return( temp );
}

variable_types: phia float

variable_types: ma float

variable_types: phi float

variable_types: m float

variable_types: a float

variable_types: b float

variable_types: c float

variable_types: temp float

variable_types: t float

variable_types: d int

variable_types: mod int

variable_types: sign int


qainfg

decompiled_code:
__int64 qainfg()
{
int v0; // er15
int v1; // er14
char v2; // r13
unsigned int v3; // er12
int v4; // ebx
__int64 v6; // [rsp+8h] [rbp-80h] BYREF
char v7[4]; // [rsp+10h] [rbp-78h] BYREF
unsigned int v8; // [rsp+14h] [rbp-74h]

qmov(qone, &qk);
qmov(qone, &qden);
qclear(&uf);
qclear(&ug);
v6 = 216LL;
ltoq(&v6, &q216);
v0 = 5;
v1 = 3;
v2 = 1;
v3 = 0x10000;
do
{
v4 = v1;
qmov(&qk, v7);
++v8;
qadd(qone, v7);
qmov(v7, &qnum);
if ( v1 < v0 )
{
do
{
v4 += 2;
qadd(&qtwo, v7);
qmuli(v7, &qnum);
}
while ( v4 < v0 );
}
qmuli(&q216, &qden);
qmuli(&qk, &qden);
qmul(&zeta, &qden);
qdiv(&qden, &qnum, v7);
if ( (v2 & 1) != 0 )
{
if ( (v2 & 2) != 0 )
qsub(v7, &ug);
else
qadd(v7, &ug);
}
else if ( (v2 & 2) != 0 )
{
qsub(v7, &uf);
}
else
{
qadd(v7, &uf);
}
if ( v3 > v8 )
v3 = v8;
if ( v8 > v3 )
break;
qadd(qone, &qk);
++v2;
v1 += 2;
v0 += 6;
}
while ( (int)(qone[1] - v8) <= 175 );
return 0LL;
}

canonical_decompiled_code:
__int64 func0()
{
int v0; // er15
int v1; // er14
char v2; // r13
unsigned int v3; // er12
int v4; // ebx
__int64 v6; // [rsp+8h] [rbp-80h] BYREF
char v7[4]; // [rsp+10h] [rbp-78h] BYREF
unsigned int v8; // [rsp+14h] [rbp-74h]

qmov(qone, &qk);
qmov(qone, &qden);
qclear(&uf);
qclear(&ug);
v6 = 216LL;
ltoq(&v6, &q216);
v0 = 5;
v1 = 3;
v2 = 1;
v3 = 0x10000;
do
{
v4 = v1;
qmov(&qk, v7);
++v8;
qadd(qone, v7);
qmov(v7, &qnum);
if ( v1 < v0 )
{
do
{
v4 += 2;
qadd(&qtwo, v7);
qmuli(v7, &qnum);
}
while ( v4 < v0 );
}
qmuli(&q216, &qden);
qmuli(&qk, &qden);
qmul(&zeta, &qden);
qdiv(&qden, &qnum, v7);
if ( (v2 & 1) != 0 )
{
if ( (v2 & 2) != 0 )
qsub(v7, &ug);
else
qadd(v7, &ug);
}
else if ( (v2 & 2) != 0 )
{
qsub(v7, &uf);
}
else
{
qadd(v7, &uf);
}
if ( v3 > v8 )
v3 = v8;
if ( v8 > v3 )
break;
qadd(qone, &qk);
++v2;
v1 += 2;
v0 += 6;
}
while ( (int)(qone[1] - v8) <= 175 );
return 0LL;
}

original_code:
int qainfg()
{
QELT temp[14];
QELT maxf;
int k, i;
long ll;
maxf = 65536;
k = 1;
qmov( qone, qk );
qmov( qone, qden );
qclear( uf );
qclear( ug );
ll = 216;
ltoq( &ll, q216);
do
 {
 i = 2*k + 1;
 qmov( qk, temp );
 temp[1] += 1;
 qadd( qone, temp, temp );
 qmov( temp, qnum );
 while( i < (6*k-1) )
  {
  i += 2;
  qadd( qtwo, temp, temp );
  qmuli( temp, qnum, qnum );
  }
 qmuli( q216, qden, qden );
 qmuli( qk, qden, qden );
 qmul( zeta, qden, qden );
 qdiv( qden, qnum, temp );
 if( k & 1 )
  {
  if( k & 2 )
   qsub( temp, ug, ug );
  else
   qadd( temp, ug, ug );
  }
 else
  {
  if( k & 2 )
   qsub( temp, uf, uf );
  else
   qadd( temp, uf, uf );
  }
 if( temp[1] < maxf )
  maxf = temp[1];
 if( temp[1] > maxf )
  break;
 qadd( qone, qk, qk );
 k += 1;
 }
while( ((int) qone[1] - (int) temp[1]) < (((14 -2)-1)*32)/2 );
return 0;
}

canonical_original_code:
int qainfg()
{
unsigned int temp[14];
unsigned int maxf;
int k; int i;
long ll;
maxf = 65536;
k = 1;
qmov( qone, qk );
qmov( qone, qden );
qclear( uf );
qclear( ug );
ll = 216;
ltoq( &ll, q216);
do
 {
 i = 2*k + 1;
 qmov( qk, temp );
 temp[1] += 1;
 qadd( qone, temp, temp );
 qmov( temp, qnum );
 while( i < (6*k-1) )
  {
  i += 2;
  qadd( qtwo, temp, temp );
  qmuli( temp, qnum, qnum );
  }
 qmuli( q216, qden, qden );
 qmuli( qk, qden, qden );
 qmul( zeta, qden, qden );
 qdiv( qden, qnum, temp );
 if( k & 1 )
  {
  if( k & 2 )
   qsub( temp, ug, ug );
  else
   qadd( temp, ug, ug );
  }
 else
  {
  if( k & 2 )
   qsub( temp, uf, uf );
  else
   qadd( temp, uf, uf );
  }
 if( temp[1] < maxf )
  maxf = temp[1];
 if( temp[1] > maxf )
  break;
 qadd( qone, qk, qk );
 k += 1;
 }
while( ((int) qone[1] - (int) temp[1]) < (((14 -2)-1)*32)/2 );
return 0;
}

variable_types:
temp
unsigned int [14]

variable_types:
maxf
unsigned int

variable_types: k int

variable_types: i int

variable_types: ll long


qanfgp

decompiled_code:
__int64 qanfgp()
{
int v0; // er15
int v1; // er14
char v2; // r13
unsigned int v3; // er12
int v4; // ebx
__int64 v6; // [rsp+8h] [rbp-80h] BYREF
char v7[4]; // [rsp+10h] [rbp-78h] BYREF
unsigned int v8; // [rsp+14h] [rbp-74h]

qmov(qone, &qk);
qmov(qone, &qden);
qclear(&uf);
qclear(&ug);
v6 = 216LL;
ltoq(&v6, &q216);
qmov(&qk, v7);
++v8;
qadd(qone, v7);
qmov(v7, &qnum);
v0 = 9;
v1 = 5;
v2 = 1;
v3 = 0x10000;
while ( 1 )
{
qadd(&qtwo, v7);
qadd(&qtwo, v7);
qmuli(v7, &qnum);
qnum = -(qnum == 0);
qmuli(&q216, &qden);
qmuli(&qk, &qden);
qmul(&zeta, &qden);
qdiv(&qden, &qnum, v7);
if ( (v2 & 1) != 0 )
{
if ( (v2 & 2) != 0 )
qsub(v7, &ug);
else
qadd(v7, &ug);
}
else if ( (v2 & 2) != 0 )
{
qsub(v7, &uf);
}
else
{
qadd(v7, &uf);
}
if ( v3 > v8 )
v3 = v8;
if ( v8 > v3 )
break;
++v2;
qadd(qone, &qk);
if ( (int)(qone[1] - v8) > 175 )
break;
v4 = v1;
qmov(&qk, v7);
++v8;
qadd(qone, v7);
qmov(v7, &qnum);
if ( v0 > v1 )
{
do
{
v4 += 2;
qadd(&qtwo, v7);
qmuli(v7, &qnum);
}
while ( v0 > v4 );
}
v1 += 2;
v0 += 6;
}
return 0LL;
}

canonical_decompiled_code:
__int64 func1()
{
int v0; // er15
int v1; // er14
char v2; // r13
unsigned int v3; // er12
int v4; // ebx
__int64 v6; // [rsp+8h] [rbp-80h] BYREF
char v7[4]; // [rsp+10h] [rbp-78h] BYREF
unsigned int v8; // [rsp+14h] [rbp-74h]

qmov(qone, &qk);
qmov(qone, &qden);
qclear(&uf);
qclear(&ug);
v6 = 216LL;
ltoq(&v6, &q216);
qmov(&qk, v7);
++v8;
qadd(qone, v7);
qmov(v7, &qnum);
v0 = 9;
v1 = 5;
v2 = 1;
v3 = 0x10000;
while ( 1 )
{
qadd(&qtwo, v7);
qadd(&qtwo, v7);
qmuli(v7, &qnum);
qnum = -(qnum == 0);
qmuli(&q216, &qden);
qmuli(&qk, &qden);
qmul(&zeta, &qden);
qdiv(&qden, &qnum, v7);
if ( (v2 & 1) != 0 )
{
if ( (v2 & 2) != 0 )
qsub(v7, &ug);
else
qadd(v7, &ug);
}
else if ( (v2 & 2) != 0 )
{
qsub(v7, &uf);
}
else
{
qadd(v7, &uf);
}
if ( v3 > v8 )
v3 = v8;
if ( v8 > v3 )
break;
++v2;
qadd(qone, &qk);
if ( (int)(qone[1] - v8) > 175 )
break;
v4 = v1;
qmov(&qk, v7);
++v8;
qadd(qone, v7);
qmov(v7, &qnum);
if ( v0 > v1 )
{
do
{
v4 += 2;
qadd(&qtwo, v7);
qmuli(v7, &qnum);
}
while ( v0 > v4 );
}
v1 += 2;
v0 += 6;
}
return 0LL;
}

original_code:
int qanfgp()
{
QELT temp[14];
QELT maxf;
int k, i;
long ll;
maxf = 65536;
k = 1;
qmov( qone, qk );
qmov( qone, qden );
qclear( uf );
qclear( ug );
ll = 216;
ltoq( &ll, q216);
do
 {
 i = 2*k + 1;
 qmov( qk, temp );
 temp[1] += 1;
 qadd( qone, temp, temp );
 qmov( temp, qnum );
 while( i < (6*k-3) )
  {
  i += 2;
  qadd( qtwo, temp, temp );
  qmuli( temp, qnum, qnum );
  }
 qadd( qtwo, temp, temp );
 qadd( qtwo, temp, temp );
 qmuli( temp, qnum, qnum );
 if( qnum[0] != 0 )
  qnum[0] = 0;
 else
  qnum[0] = -1;
 qmuli( q216, qden, qden );
 qmuli( qk, qden, qden );
 qmul( zeta, qden, qden );
 qdiv( qden, qnum, temp );
 if( k & 1 )
  {
  if( k & 2 )
   qsub( temp, ug, ug );
  else
   qadd( temp, ug, ug );
  }
 else
  {
  if( k & 2 )
   qsub( temp, uf, uf );
  else
   qadd( temp, uf, uf );
  }
 if( temp[1] < maxf )
  maxf = temp[1];
 if( temp[1] > maxf )
  break;
 k += 1;
 qadd( qone, qk, qk );
 }
while( ((int) qone[1] - (int) temp[1]) < (((14 -2)-1)*32)/2 );
return 0;
}

canonical_original_code:
int qanfgp()
{
unsigned int temp[14];
unsigned int maxf;
int k; int i;
long ll;
maxf = 65536;
k = 1;
qmov( qone, qk );
qmov( qone, qden );
qclear( uf );
qclear( ug );
ll = 216;
ltoq( &ll, q216);
do
 {
 i = 2*k + 1;
 qmov( qk, temp );
 temp[1] += 1;
 qadd( qone, temp, temp );
 qmov( temp, qnum );
 while( i < (6*k-3) )
  {
  i += 2;
  qadd( qtwo, temp, temp );
  qmuli( temp, qnum, qnum );
  }
 qadd( qtwo, temp, temp );
 qadd( qtwo, temp, temp );
 qmuli( temp, qnum, qnum );
 if( qnum[0] != 0 )
  qnum[0] = 0;
 else
  qnum[0] = -1;
 qmuli( q216, qden, qden );
 qmuli( qk, qden, qden );
 qmul( zeta, qden, qden );
 qdiv( qden, qnum, temp );
 if( k & 1 )
  {
  if( k & 2 )
   qsub( temp, ug, ug );
  else
   qadd( temp, ug, ug );
  }
 else
  {
  if( k & 2 )
   qsub( temp, uf, uf );
  else
   qadd( temp, uf, uf );
  }
 if( temp[1] < maxf )
  maxf = temp[1];
 if( temp[1] > maxf )
  break;
 k += 1;
 qadd( qone, qk, qk );
 }
while( ((int) qone[1] - (int) temp[1]) < (((14 -2)-1)*32)/2 );
return 0;
}


nbdtrcf

decompiled_code:
double __fastcall nbdtrcf(int a1, int a2, float a3)
{
double v3; // xmm3_8
float v4; // xmm2_4
double result; // xmm0_8

if ( a3 < 0.0 || a3 > 1.0 || a1 < 0 )
{
mtherr("nbdtrf", 1LL);
result = 0.0;
}
else
{
HIDWORD(v3) = 0;
*(float *)&v3 = (float)(a1 + 1);
v4 = 1.0 - a3;
result = v3;
incbetf(v3, (float)a2, v4);
}
return result;
}

canonical_decompiled_code:
double __fastcall func0(int a1, int a2, float a3)
{
double v3; // xmm3_8
float v4; // xmm2_4
double result; // xmm0_8

if ( a3 < 0.0 || a3 > 1.0 || a1 < 0 )
{
mtherr("nbdtrf", 1LL);
result = 0.0;
}
else
{
HIDWORD(v3) = 0;
*(float *)&v3 = (float)(a1 + 1);
v4 = 1.0 - a3;
result = v3;
incbetf(v3, (float)a2, v4);
}
return result;
}

original_code:
float nbdtrcf( int k, int n, float pp )
{
float dk, dn, p;
p = pp;
if( (p < 0.0) || (p > 1.0) )
 goto domerr;
if( k < 0 )
 {
domerr:
 mtherr( "nbdtrf", 1 );
 return( 0.0 );
 }
dk = k+1;
dn = n;
return( incbetf( dk, dn, 1.0 - p ) );
}

canonical_original_code:
float nbdtrcf(int k, int n, float pp)
{
float dk; float dn; float p;
p = pp;
if( (p < 0.0) || (p > 1.0) )
 goto domerr;
if( k < 0 )
 {
domerr:
 mtherr( "nbdtrf", 1 );
 return( 0.0 );
 }
dk = k+1;
dn = n;
return( incbetf( dk, dn, 1.0 - p ) );
}

variable_types: n int

variable_types: pp float

variable_types: dk float

variable_types: dn float

variable_types: p float


nbdtrf

decompiled_code:
double __fastcall nbdtrf(int a1, int a2, float a3)
{
double result; // xmm0_8

if ( a3 < 0.0 || a3 > 1.0 || a1 < 0 )
{
mtherr("nbdtrf", 1LL);
result = 0.0;
}
else
{
HIDWORD(result) = 0;
*(float *)&result = (float)a2;
incbetf(result, (float)(a1 + 1), a3);
}
return result;
}

canonical_decompiled_code:
double __fastcall func1(int a1, int a2, float a3)
{
double result; // xmm0_8

if ( a3 < 0.0 || a3 > 1.0 || a1 < 0 )
{
mtherr("nbdtrf", 1LL);
result = 0.0;
}
else
{
HIDWORD(result) = 0;
*(float *)&result = (float)a2;
incbetf(result, (float)(a1 + 1), a3);
}
return result;
}

original_code:
float nbdtrf( int k, int n, float pp )
{
float dk, dn, p;
p = pp;
if( (p < 0.0) || (p > 1.0) )
 goto domerr;
if( k < 0 )
 {
domerr:
 mtherr( "nbdtrf", 1 );
 return( 0.0 );
 }
dk = k+1;
dn = n;
return( incbetf( dn, dk, p ) );
}

canonical_original_code:
float nbdtrf(int k, int n, float pp)
{
float dk; float dn; float p;
p = pp;
if( (p < 0.0) || (p > 1.0) )
 goto domerr;
if( k < 0 )
 {
domerr:
 mtherr( "nbdtrf", 1 );
 return( 0.0 );
 }
dk = k+1;
dn = n;
return( incbetf( dn, dk, p ) );
}


decompiled_code:
float __fastcall k1f(float a1)
{
float result; // xmm0_4
double v2; // xmm0_8
float v4; // [rsp+Ch] [rbp-Ch]
float v5; // [rsp+Ch] [rbp-Ch]
float v6; // [rsp+Ch] [rbp-Ch]

if ( a1 <= 6.000000000000001e-39 )
{
mtherr(&unk_26D, 1LL);
result = MAXNUMF;
}
else if ( a1 <= 2.0 )
{
v6 = logf(a1 * 0.5);
v2 = i1f(a1);
result = (float)(chbevlf(&A, 7LL, (float)(a1 * a1) - 2.0) / a1) + (float)(*(float *)&v2 * v6);
}
else
{
v4 = expf(COERCE_FLOAT(LODWORD(a1) ^ LC4));
v5 = chbevlf(&B, 10LL, (float)(8.0 / a1) - 2.0) * v4;
result = v5 / sqrtf(a1);
}
return result;
}

canonical_decompiled_code:
float __fastcall func0(float a1)
{
float result; // xmm0_4
double v2; // xmm0_8
float v4; // [rsp+Ch] [rbp-Ch]
float v5; // [rsp+Ch] [rbp-Ch]
float v6; // [rsp+Ch] [rbp-Ch]

if ( a1 <= 6.000000000000001e-39 )
{
mtherr(&unk_26D, 1LL);
result = MAXNUMF;
}
else if ( a1 <= 2.0 )
{
v6 = logf(a1 * 0.5);
v2 = i1f(a1);
result = (float)(chbevlf(&A, 7LL, (float)(a1 * a1) - 2.0) / a1) + (float)(*(float *)&v2 * v6);
}
else
{
v4 = expf(COERCE_FLOAT(LODWORD(a1) ^ LC4));
v5 = chbevlf(&B, 10LL, (float)(8.0 / a1) - 2.0) * v4;
result = v5 / sqrtf(a1);
}
return result;
}

original_code:
float k1f(float xx)
{
float x, y;
x = xx;
if( x <= 6.0e-39 )
 {
 mtherr( "k1f", 1 );
 return( MAXNUMF );
 }
if( x <= 2.0f )
 {
 y = x * x - 2.0f;
 y = logf( 0.5f * x ) * i1f(x) + chbevlf( y, A, 7 ) / x;
 return( y );
 }
return( expf(-x) * chbevlf( 8.0f/x - 2.0f, B, 10 ) / sqrtf(x) );
}

canonical_original_code:
float k1f(float xx)
{
float x; float y;
x = xx;
if( x <= 6.0e-39 )
 {
 mtherr( "k1f", 1 );
 return( MAXNUMF );
 }
if( x <= 2.0f )
 {
 y = x * x - 2.0f;
 y = logf( 0.5f * x ) * i1f(x) + chbevlf( y, A, 7 ) / x;
 return( y );
 }
return( expf(-x) * chbevlf( 8.0f/x - 2.0f, B, 10 ) / sqrtf(x) );
}

variable_types: xx float

variable_types: x float

variable_types: y float


decompiled_code:
float __fastcall k1ef(float a1)
{
float result; // xmm0_4
double v2; // xmm0_8
float v3; // xmm3_4
float xa; // [rsp+8h] [rbp-10h]
float v6; // [rsp+Ch] [rbp-Ch]
float v7; // [rsp+Ch] [rbp-Ch]

if ( a1 <= 0.0 )
{
mtherr("k1ef", 1LL);
result = MAXNUMF;
}
else if ( a1 <= 2.0 )
{
v7 = logf(a1 * 0.5);
v2 = i1f(a1);
v3 = a1;
xa = (float)(chbevlf(&A, 7LL, (float)(a1 * a1) - 2.0) / a1) + (float)(*(float *)&v2 * v7);
result = expf(v3) * xa;
}
else
{
v6 = chbevlf(&B, 10LL, (float)(8.0 / a1) - 2.0);
result = v6 / sqrtf(a1);
}
return result;
}

canonical_decompiled_code:
float __fastcall func1(float a1)
{
float result; // xmm0_4
double v2; // xmm0_8
float v3; // xmm3_4
float xa; // [rsp+8h] [rbp-10h]
float v6; // [rsp+Ch] [rbp-Ch]
float v7; // [rsp+Ch] [rbp-Ch]

if ( a1 <= 0.0 )
{
mtherr("k1ef", 1LL);
result = MAXNUMF;
}
else if ( a1 <= 2.0 )
{
v7 = logf(a1 * 0.5);
v2 = i1f(a1);
v3 = a1;
xa = (float)(chbevlf(&A, 7LL, (float)(a1 * a1) - 2.0) / a1) + (float)(*(float *)&v2 * v7);
result = expf(v3) * xa;
}
else
{
v6 = chbevlf(&B, 10LL, (float)(8.0 / a1) - 2.0);
result = v6 / sqrtf(a1);
}
return result;
}

original_code:
float k1ef( float xx )
{
float x, y;
x = xx;
if( x <= 0.0f )
 {
 mtherr( "k1ef", 1 );
 return( MAXNUMF );
 }
if( x <= 2.0f )
 {
 y = x * x - 2.0f;
 y = logf( 0.5f * x ) * i1f(x) + chbevlf( y, A, 7 ) / x;
 return( y * expf(x) );
 }
return( chbevlf( 8.0f/x - 2.0f, B, 10 ) / sqrtf(x) );
}

canonical_original_code:
float k1ef(float xx)
{
float x; float y;
x = xx;
if( x <= 0.0f )
 {
 mtherr( "k1ef", 1 );
 return( MAXNUMF );
 }
if( x <= 2.0f )
 {
 y = x * x - 2.0f;
 y = logf( 0.5f * x ) * i1f(x) + chbevlf( y, A, 7 ) / x;
 return( y * expf(x) );
 }
return( chbevlf( 8.0f/x - 2.0f, B, 10 ) / sqrtf(x) );
}


decompiled_code:
float __fastcall exp10f(float a1)
{
float result; // xmm0_4
float v2; // xmm3_4
float v3; // xmm0_4

if ( a1 > 38.230808 )
{
mtherr("exp10f", 3LL);
result = MAXNUMF;
}
else if ( a1 < -38.230808 )
{
mtherr("exp10f", 4LL);
result = 0.0;
}
else if ( a1 == 0.0 )
{
result = *(float *)&LC1;
}
else
{
v2 = floorf((float)(a1 * 3.321928) + 0.5);
v3 = polevlf(&P, 5LL);
result = ldexpf(
(float)(v3 * (float)((float)(a1 - (float)(v2 * 0.30078125)) - (float)(v2 * 0.00024874567))) + 1.0,
(__int16)(int)v2);
}
return result;
}

canonical_decompiled_code:
float __fastcall func0(float a1)
{
float result; // xmm0_4
float v2; // xmm3_4
float v3; // xmm0_4

if ( a1 > 38.230808 )
{
mtherr("exp10f", 3LL);
result = MAXNUMF;
}
else if ( a1 < -38.230808 )
{
mtherr("exp10f", 4LL);
result = 0.0;
}
else if ( a1 == 0.0 )
{
result = *(float *)&LC1;
}
else
{
v2 = floorf((float)(a1 * 3.321928) + 0.5);
v3 = polevlf(&P, 5LL);
result = ldexpf(
(float)(v3 * (float)((float)(a1 - (float)(v2 * 0.30078125)) - (float)(v2 * 0.00024874567))) + 1.0,
(__int16)(int)v2);
}
return result;
}

original_code:
float exp10f(float xx)
{
float x, px, qx;
short n;
x = xx;
if( x > MAXL10 )
 {
 mtherr( "exp10f", 3 );
 return( MAXNUMF );
 }
if( x < -MAXL10 )
 {
 mtherr( "exp10f", 4 );
 return(0.0);
 }
if( x == 0 )
 return(1.0);
px = x * LOG210;
qx = floorf( px + 0.5 );
n = qx;
x -= qx * LG102A;
x -= qx * LG102B;
px = 1.0 + x * polevlf( x, P, 5 );
x = ldexpf( px, n );
return(x);
}

canonical_original_code:
float exp10f(float xx)
{
float x; float px; float qx;
short n;
x = xx;
if( x > MAXL10 )
 {
 mtherr( "exp10f", 3 );
 return( MAXNUMF );
 }
if( x < -MAXL10 )
 {
 mtherr( "exp10f", 4 );
 return(0.0);
 }
if( x == 0 )
 return(1.0);
px = x * LOG210;
qx = floorf( px + 0.5 );
n = qx;
x -= qx * LG102A;
x -= qx * LG102B;
px = 1.0 + x * polevlf( x, P, 5 );
x = ldexpf( px, n );
return(x);
}

variable_types: px float

variable_types: qx float

variable_types: n short


stdtrf

canonical_original_code:
float stdtrf(int k, float tt)
{
float t; float x; float rk; float z; float f; float tz; float p; float xsqk;
int j;
t = tt;
if( k <= 0 )
 {
 mtherr( "stdtrf", 1 );
 return(0.0);
 }
if( t == 0 )
 return( 0.5 );
if( t < -1.0 )
 {
 rk = k;
 z = rk / (rk + t * t);
 p = 0.5 * incbetf( 0.5*rk, 0.5, z );
 return( p );
 }
if( t < 0 )
 x = -t;
else
 x = t;
rk = k;
z = 1.0 + ( x * x )/rk;
if( (k & 1) != 0)
 {
 xsqk = x/sqrtf(rk);
 p = atanf( xsqk );
 if( k > 1 )
  {
  f = 1.0;
  tz = 1.0;
  j = 3;
  while( (j<=(k-2)) && ( (tz/f) > MACHEPF ) )
   {
   tz *= (j-1)/( z * j );
   f += tz;
   j += 2;
   }
  p += f * xsqk/z;
  }
 p *= 2.0/PIF;
 }
else
 {
 f = 1.0;
 tz = 1.0;
 j = 2;
 while( ( j <= (k-2) ) && ( (tz/f) > MACHEPF ) )
  {
  tz *= (j - 1)/( z * j );
  f += tz;
  j += 2;
  }
 p = f * x/sqrtf(z*rk);
 }
if( t < 0 )
 p = -p;
 p = 0.5 + 0.5 * p;
return(p);
}

variable_types: tt float

variable_types: t float

variable_types: rk float

variable_types: z float

variable_types: f float

variable_types: tz float

variable_types: xsqk float

variable_types: j int


psif

canonical_original_code:
float psif(float xx)
{
float p; float q; float nz; float x; float s; float w; float y; float z;
int i; int n; int negative;
x = xx;
nz = 0.0;
negative = 0;
if( x <= 0.0 )
 {
 negative = 1;
 q = x;
 p = floorf(q);
 if( p == q )
  {
  mtherr( "psif", 2 );
  return( MAXNUMF );
  }
 nz = q - p;
 if( nz != 0.5 )
  {
  if( nz > 0.5 )
   {
   p += 1.0;
   nz = q - p;
   }
  nz = PIF/tanf(PIF*nz);
  }
 else
  {
  nz = 0.0;
  }
 x = 1.0 - x;
 }
if( (x <= 10.0) && (x == floorf(x)) )
 {
 y = 0.0;
 n = x;
 for( i=1; i<n; i++ )
  {
  w = i;
  y += 1.0/w;
  }
 y -= 0.57721566490153286061;
 goto done;
 }
s = x;
w = 0.0;
while( s < 10.0 )
 {
 w += 1.0/s;
 s += 1.0;
 }
if( s < 1.0e8 )
 {
 z = 1.0/(s * s);
 y = z * polevlf( z, A, 3 );
 }
else
 y = 0.0;
y = logf(s) - (0.5/s) - y - w;
done:
if( negative )
 {
 y -= nz;
 }
return(y);
}

variable_types: q float

variable_types: nz float

variable_types: s float

variable_types: w float

variable_types: i int

variable_types: n int

variable_types: negative int


sinhf

original_code:
float sinhf( float xx )
{
register float z;
float x;
x = xx;
if( xx < 0 )
 z = -x;
else
 z = x;
if( z > MAXLOGF )
 {
 mtherr( "sinhf", 1 );
 if( x > 0 )
  return( MAXNUMF );
 else
  return( -MAXNUMF );
 }
if( z > 1.0 )
 {
 z = expf(z);
 z = 0.5*z - (0.5/z);
 if( x < 0 )
  z = -z;
 }
else
 {
 z = x * x;
 z =
 (( 2.03721912945E-4 * z
   + 8.33028376239E-3) * z
   + 1.66667160211E-1) * z * x
   + x;
 }
return( z );
}

canonical_original_code:
float sinhf(float xx)
{
register float z;
float x;
x = xx;
if( xx < 0 )
 z = -x;
else
 z = x;
if( z > MAXLOGF )
 {
 mtherr( "sinhf", 1 );
 if( x > 0 )
  return( MAXNUMF );
 else
  return( -MAXNUMF );
 }
if( z > 1.0 )
 {
 z = expf(z);
 z = 0.5*z - (0.5/z);
 if( x < 0 )
  z = -z;
 }
else
 {
 z = x * x;
 z =
 (( 2.03721912945E-4 * z
   + 8.33028376239E-3) * z
   + 1.66667160211E-1) * z * x
   + x;
 }
return( z );
}

variable_types: xx float

variable_types: x float


ellpkf

decompiled_code:
float __fastcall ellpkf(float a1)
{
float result; // xmm0_4
float v3; // [rsp+8h] [rbp-10h]
float v4; // [rsp+Ch] [rbp-Ch]

if ( a1 < 0.0 || a1 > 1.0 )
{
mtherr("ellpkf", 1LL);
result = 0.0;
}
else if ( a1 > MACHEPF )
{
v3 = polevlf(&P, 10LL, a1);
v4 = logf(a1);
result = v3 - (float)(v4 * polevlf(&Q, 10LL, a1));
}
else if ( a1 == 0.0 )
{
mtherr("ellpkf", 2LL);
result = MAXNUMF;
}
else
{
result = 1.386294364929199 - logf(a1) * 0.5;
}
return result;
}

canonical_decompiled_code:
float __fastcall func0(float a1)
{
float result; // xmm0_4
float v3; // [rsp+8h] [rbp-10h]
float v4; // [rsp+Ch] [rbp-Ch]

if ( a1 < 0.0 || a1 > 1.0 )
{
mtherr("ellpkf", 1LL);
result = 0.0;
}
else if ( a1 > MACHEPF )
{
v3 = polevlf(&P, 10LL, a1);
v4 = logf(a1);
result = v3 - (float)(v4 * polevlf(&Q, 10LL, a1));
}
else if ( a1 == 0.0 )
{
mtherr("ellpkf", 2LL);
result = MAXNUMF;
}
else
{
result = 1.386294364929199 - logf(a1) * 0.5;
}
return result;
}

original_code:
float ellpkf(float xx)
{
float x;
x = xx;
if( (x < 0.0) || (x > 1.0) )
 {
 mtherr( "ellpkf", 1 );
 return( 0.0 );
 }
if( x > MACHEPF )
 {
 return( polevlf(x,P,10) - logf(x) * polevlf(x,Q,10) );
 }
else
 {
 if( x == 0.0 )
  {
  mtherr( "ellpkf", 2 );
  return( MAXNUMF );
  }
 else
  {
  return( C1 - 0.5 * logf(x) );
  }
 }
}


jnf

original_code:
float jnf( int n, float xx )
{
float x, pkm2, pkm1, pk, xk, r, ans, xinv, sign;
int k;
x = xx;
sign = 1.0;
if( n < 0 )
 {
 n = -n;
 if( (n & 1) != 0 )
  sign = -1.0;
 }
if( n == 0 )
 return( sign * j0f(x) );
if( n == 1 )
 return( sign * j1f(x) );
if( n == 2 )
 return( sign * (2.0 * j1f(x) / x - j0f(x)) );
k = 24;
pk = 2 * (n + k);
ans = pk;
xk = x * x;
do
 {
 pk -= 2.0;
 ans = pk - (xk/ans);
 }
while( --k > 0 );
pk = 1.0;
xinv = 1.0/x;
pkm1 = ans * xinv;
k = n-1;
r = (float )(2 * k);
do
 {
 pkm2 = (pkm1 * r - pk * x) * xinv;
 pk = pkm1;
 pkm1 = pkm2;
 r -= 2.0;
 }
while( --k > 0 );
r = pk;
if( r < 0 )
 r = -r;
ans = pkm1;
if( ans < 0 )
 ans = -ans;
if( r > ans )
 ans = sign * j1f(x)/pk;
else
 ans = sign * j0f(x)/pkm1;
return( ans );
}

canonical_original_code:
float jnf(int n, float xx)
{
float x; float pkm2; float pkm1; float pk; float xk; float r; float ans; float xinv; float sign;
int k;
x = xx;
sign = 1.0;
if( n < 0 )
 {
 n = -n;
 if( (n & 1) != 0 )
  sign = -1.0;
 }
if( n == 0 )
 return( sign * j0f(x) );
if( n == 1 )
 return( sign * j1f(x) );
if( n == 2 )
 return( sign * (2.0 * j1f(x) / x - j0f(x)) );
k = 24;
pk = 2 * (n + k);
ans = pk;
xk = x * x;
do
 {
 pk -= 2.0;
 ans = pk - (xk/ans);
 }
while( --k > 0 );
pk = 1.0;
xinv = 1.0/x;
pkm1 = ans * xinv;
k = n-1;
r = (float )(2 * k);
do
 {
 pkm2 = (pkm1 * r - pk * x) * xinv;
 pk = pkm1;
 pkm1 = pkm2;
 r -= 2.0;
 }
while( --k > 0 );
r = pk;
if( r < 0 )
 r = -r;
ans = pkm1;
if( ans < 0 )
 ans = -ans;
if( r > ans )
 ans = sign * j1f(x)/pk;
else
 ans = sign * j0f(x)/pkm1;
return( ans );
}

variable_types: pk float

variable_types: xk float

variable_types: r float

variable_types: ans float

variable_types: xinv float

variable_types: sign float

variable_types: k int


facf

decompiled_code:
float __fastcall facf(int a1)
{
float result; // xmm0_4

if ( a1 < 0 )
{
mtherr("facf", 2LL);
result = MAXNUMF;
}
else if ( a1 > 33 )
{
mtherr("facf", 3LL);
result = MAXNUMF;
}
else
{
result = factbl[a1];
}
return result;
}

canonical_decompiled_code:
float __fastcall func0(int a1)
{
float result; // xmm0_4

if ( a1 < 0 )
{
mtherr("facf", 2LL);
result = MAXNUMF;
}
else if ( a1 > 33 )
{
mtherr("facf", 3LL);
result = MAXNUMF;
}
else
{
result = factbl[a1];
}
return result;
}

original_code:
float facf( int i )
{
if( i < 0 )
 {
 mtherr( "facf", 2 );
 return( MAXNUMF );
 }
if( i > 33 )
 {
 mtherr( "facf", 3 );
 return( MAXNUMF );
 }
return( factbl[i] );
}

canonical_original_code:
float facf(int i)
{
if( i < 0 )
 {
 mtherr( "facf", 2 );
 return( MAXNUMF );
 }
if( i > 33 )
 {
 mtherr( "facf", 3 );
 return( MAXNUMF );
 }
return( factbl[i] );
}