zetacf

decompiled_code:
float __fastcall zetacf(double a1, double a2)
{
float result; // xmm0_4
double v4; // xmm0_8
float v5; // xmm3_4
float v6; // xmm1_4
float v7; // xmm2_4
float v8; // xmm0_4
float v9; // xmm0_4
double v10; // xmm0_8
double v11; // xmm4_8
float v12; // xmm0_4
float v13; // xmm0_4
double v14; // xmm3_8
float v15; // xmm0_4
float v16; // xmm2_4
float v17; // xmm1_4
float v18; // [rsp+0h] [rbp-18h]
float v19; // [rsp+0h] [rbp-18h]
float v20; // [rsp+0h] [rbp-18h]
float v21; // [rsp+0h] [rbp-18h]
float y; // [rsp+4h] [rbp-14h]
float v23; // [rsp+8h] [rbp-10h]
float v24; // [rsp+8h] [rbp-10h]
float v25; // [rsp+Ch] [rbp-Ch]

if ( *(float *)&a1 < 0.0 )
{
v10 = *(float *)&a1;
if ( v10 >= -30.8148 )
{
*(_QWORD *)&v11 = (unsigned int)LC1;
*(float *)&v11 = 1.0 - *(float *)&a1;
v24 = zetacf(v11);
v18 = sinf(*(float *)&a1 * PIO2F);
v19 = v18 * powf(PIF + PIF, *(float *)&a1);
v12 = (v24 + 1.0) * (float)(gammaf(1.0 - *(float *)&a1) * v19) / PIF;
result = v12 - 1.0;
}
else
{
mtherr("zetacf", 3LL, v10, -30.8148, a1);
result = 0.0;
}
}
else
{
result = 0.0;
if ( *(float *)&a1 < 127.0 )
{
HIDWORD(v4) = HIDWORD(a1);
*(float *)&v4 = floorf(*(float *)&a1);
if ( *(float *)&a1 == *(float *)&v4 && (int)*(float *)&a1 <= 30 )
{
result = azetacf[*(float *)&a1];
}
else
{
v5 = *(float *)&LC1;
if ( *(float *)&a1 < 1.0 )
{
v13 = polevlf(&R, 5LL, COERCE_DOUBLE((unsigned __int64)LODWORD(a1)));
result = v13 / (float)((float)(1.0 - *(float *)&a1) * p1evlf(&S, 5LL, *(float *)&a1));
}
else if ( *(float *)&a1 == 1.0 )
{
mtherr("zetacf", 2LL, v4, a2, COERCE_DOUBLE((unsigned __int64)LODWORD(a1)));
result = MAXNUMF;
}
else if ( *(float *)&a1 <= 10.0 )
{
*(_QWORD *)&v14 = (unsigned int)LC1;
v25 = powf(2.0, *(float *)&a1);
*(float *)&v14 = 1.0 / *(float *)&a1;
v20 = polevlf(&P, 8LL, v14) * *(float *)&a1;
v15 = p1evlf(&Q, 8LL, 1.0 / *(float *)&a1);
v16 = (*(float *)&a1 - 1.0) * v25;
result = v20 / (float)(v16 * v15);
}
else
{
LODWORD(v6) = LODWORD(a1) ^ LC8;
if ( *(float *)&a1 <= 50.0 )
{
v21 = powf(2.0, v6);
y = polevlf(&A, 10LL, COERCE_DOUBLE((unsigned __int64)LODWORD(a1)));
v17 = y / p1evlf(&B, 10LL, *(float *)&a1);
result = expf(v17) + v21;
}
else
{
v7 = 0.0;
do
{
v23 = v7;
v8 = powf(v5 + 2.0, v6);
v5 = v5 + 2.0;
v7 = v7 + v8;
}
while ( (float)(v8 / (float)(v23 + v8)) > MACHEPF );
v9 = powf(2.0, v6);
result = (float)(v7 + v9) / (1.0 - v9);
}
}
}
}
}
return result;
}

canonical_decompiled_code:
float __fastcall func0(double a1, double a2)
{
float result; // xmm0_4
double v4; // xmm0_8
float v5; // xmm3_4
float v6; // xmm1_4
float v7; // xmm2_4
float v8; // xmm0_4
float v9; // xmm0_4
double v10; // xmm0_8
double v11; // xmm4_8
float v12; // xmm0_4
float v13; // xmm0_4
double v14; // xmm3_8
float v15; // xmm0_4
float v16; // xmm2_4
float v17; // xmm1_4
float v18; // [rsp+0h] [rbp-18h]
float v19; // [rsp+0h] [rbp-18h]
float v20; // [rsp+0h] [rbp-18h]
float v21; // [rsp+0h] [rbp-18h]
float y; // [rsp+4h] [rbp-14h]
float v23; // [rsp+8h] [rbp-10h]
float v24; // [rsp+8h] [rbp-10h]
float v25; // [rsp+Ch] [rbp-Ch]

if ( *(float *)&a1 < 0.0 )
{
v10 = *(float *)&a1;
if ( v10 >= -30.8148 )
{
*(_QWORD *)&v11 = (unsigned int)LC1;
*(float *)&v11 = 1.0 - *(float *)&a1;
v24 = func0(v11);
v18 = sinf(*(float *)&a1 * PIO2F);
v19 = v18 * powf(PIF + PIF, *(float *)&a1);
v12 = (v24 + 1.0) * (float)(gammaf(1.0 - *(float *)&a1) * v19) / PIF;
result = v12 - 1.0;
}
else
{
mtherr("zetacf", 3LL, v10, -30.8148, a1);
result = 0.0;
}
}
else
{
result = 0.0;
if ( *(float *)&a1 < 127.0 )
{
HIDWORD(v4) = HIDWORD(a1);
*(float *)&v4 = floorf(*(float *)&a1);
if ( *(float *)&a1 == *(float *)&v4 && (int)*(float *)&a1 <= 30 )
{
result = azetacf[*(float *)&a1];
}
else
{
v5 = *(float *)&LC1;
if ( *(float *)&a1 < 1.0 )
{
v13 = polevlf(&R, 5LL, COERCE_DOUBLE((unsigned __int64)LODWORD(a1)));
result = v13 / (float)((float)(1.0 - *(float *)&a1) * p1evlf(&S, 5LL, *(float *)&a1));
}
else if ( *(float *)&a1 == 1.0 )
{
mtherr("zetacf", 2LL, v4, a2, COERCE_DOUBLE((unsigned __int64)LODWORD(a1)));
result = MAXNUMF;
}
else if ( *(float *)&a1 <= 10.0 )
{
*(_QWORD *)&v14 = (unsigned int)LC1;
v25 = powf(2.0, *(float *)&a1);
*(float *)&v14 = 1.0 / *(float *)&a1;
v20 = polevlf(&P, 8LL, v14) * *(float *)&a1;
v15 = p1evlf(&Q, 8LL, 1.0 / *(float *)&a1);
v16 = (*(float *)&a1 - 1.0) * v25;
result = v20 / (float)(v16 * v15);
}
else
{
LODWORD(v6) = LODWORD(a1) ^ LC8;
if ( *(float *)&a1 <= 50.0 )
{
v21 = powf(2.0, v6);
y = polevlf(&A, 10LL, COERCE_DOUBLE((unsigned __int64)LODWORD(a1)));
v17 = y / p1evlf(&B, 10LL, *(float *)&a1);
result = expf(v17) + v21;
}
else
{
v7 = 0.0;
do
{
v23 = v7;
v8 = powf(v5 + 2.0, v6);
v5 = v5 + 2.0;
v7 = v7 + v8;
}
while ( (float)(v8 / (float)(v23 + v8)) > MACHEPF );
v9 = powf(2.0, v6);
result = (float)(v7 + v9) / (1.0 - v9);
}
}
}
}
}
return result;
}

canonical_original_code:
float zetacf(float xx)
{
int i;
float x; float a; float b; float s; float w;
x = xx;
if( x < 0.0 )
 {
 if( x < -30.8148 )
  {
  mtherr( "zetacf", 3 );
  return(0.0);
  }
 s = 1.0 - x;
 w = zetacf( s );
 b = sinf(PIO2F*x) * powf(2.0*PIF, x) * gammaf(s) * (1.0 + w) / PIF;
 return(b - 1.0);
 }
if( x >= 127 )
 return(0.0);
w = floorf(x);
if( w == x )
 {
 i = x;
 if( i < 31 )
  {
  return( azetacf[i] );
  }
 }
if( x < 1.0 )
 {
 w = 1.0 - x;
 a = polevlf( x, R, 5 ) / ( w * p1evlf( x, S, 5 ));
 return( a );
 }
if( x == 1.0 )
 {
 mtherr( "zetacf", 2 );
 return( MAXNUMF );
 }
if( x <= 10.0 )
 {
 b = powf( 2.0, x ) * (x - 1.0);
 w = 1.0/x;
 s = (x * polevlf( w, P, 8 )) / (b * p1evlf( w, Q, 8 ));
 return( s );
 }
if( x <= 50.0 )
 {
 b = powf( 2.0, -x );
 w = polevlf( x, A, 10 ) / p1evlf( x, B, 10 );
 w = expf(w) + b;
 return(w);
 }
s = 0.0;
a = 1.0;
do
 {
 a += 2.0;
 b = powf( a, -x );
 s += b;
 }
while( b/s > MACHEPF );
b = powf( 2.0, -x );
s = (s + b)/(1.0-b);
return(s);
}

variable_types: xx float

variable_types: i int

variable_types: x float

variable_types: w float


expf

repo: jeremybarnes/cephes

variable_types: z float

variable_types: n int

return_type: float


betaf

original_code:
float betaf( float aa, float bb )
{
float a, b, y;
int sign;
sign = 1;
a = aa;
b = bb;
if( a <= 0.0 )
 {
 if( a == floorf(a) )
  goto over;
 }
if( b <= 0.0 )
 {
 if( b == floorf(b) )
  goto over;
 }
y = a + b;
if( ( (y) < 0 ? -(y) : (y) ) > 34.84425627277176174 )
 {
 y = lgamf(y);
 sign *= sgngamf;
 y = lgamf(b) - y;
 sign *= sgngamf;
 y = lgamf(a) + y;
 sign *= sgngamf;
 if( y > MAXLOGF )
  {
over:
  mtherr( "betaf", 3 );
  return( sign * MAXNUMF );
  }
 return( sign * expf(y) );
 }
y = gammaf(y);
if( y == 0.0 )
 goto over;
if( a > b )
 {
 y = gammaf(a)/y;
 y *= gammaf(b);
 }
else
 {
 y = gammaf(b)/y;
 y *= gammaf(a);
 }
return(y);
}

canonical_original_code:
float betaf(float aa, float bb)
{
float a; float b; float y;
int sign;
sign = 1;
a = aa;
b = bb;
if( a <= 0.0 )
 {
 if( a == floorf(a) )
  goto over;
 }
if( b <= 0.0 )
 {
 if( b == floorf(b) )
  goto over;
 }
y = a + b;
if( ( (y) < 0 ? -(y) : (y) ) > 34.84425627277176174 )
 {
 y = lgamf(y);
 sign *= sgngamf;
 y = lgamf(b) - y;
 sign *= sgngamf;
 y = lgamf(a) + y;
 sign *= sgngamf;
 if( y > MAXLOGF )
  {
over:
  mtherr( "betaf", 3 );
  return( sign * MAXNUMF );
  }
 return( sign * expf(y) );
 }
y = gammaf(y);
if( y == 0.0 )
 goto over;
if( a > b )
 {
 y = gammaf(a)/y;
 y *= gammaf(b);
 }
else
 {
 y = gammaf(b)/y;
 y *= gammaf(a);
 }
return(y);
}

variable_types: aa float

variable_types: bb float

variable_types: a float

variable_types: b float

variable_types: y float

variable_types: sign int


fdtrcf

decompiled_code:
float __fastcall fdtrcf(int a1, int a2, float a3)
{
double v3; // xmm4_8
float v4; // xmm2_4
float result; // xmm0_4

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

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

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

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

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

variable_types: ia int

variable_types: ib int


fdtrf

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

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

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

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

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


fdtrif

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)a1 * *(float *)&v4);
}
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)a1 * *(float *)&v4);
}
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: yy float


powf

variable_types: u 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: 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

variable_types: x float

variable_types: z 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 );
}

variable_types: y float


decompiled_code:
float __fastcall j1f(float a1)
{
float v1; // xmm1_4
float v2; // xmm3_4
float v3; // xmm0_4
float v5; // [rsp+0h] [rbp-14h]

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

canonical_decompiled_code:
float __fastcall func0(float a1)
{
float v1; // xmm1_4
float v2; // xmm3_4
float v3; // xmm0_4
float v5; // [rsp+0h] [rbp-14h]

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

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: w float

variable_types: p float

variable_types: q float

variable_types: xn float


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

if ( a1 > 2.0 )
{
v5 = sqrtf(1.0 / a1);
v6 = v5 * polevlf(&MO1, 7LL);
v3 = polevlf(&PH1, 7LL);
result = sinf((float)((float)(v3 * (float)(1.0 / a1)) - 2.3561945) + a1) * v6;
}
else if ( a1 <= 0.0 )
{
mtherr(&unk_2F5, 1LL);
LODWORD(result) = MAXNUMF ^ LC1;
}
else
{
v7 = 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) + v7;
}
return result;
}

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

if ( a1 > 2.0 )
{
v5 = sqrtf(1.0 / a1);
v6 = v5 * polevlf(&MO1, 7LL);
v3 = polevlf(&PH1, 7LL);
result = sinf((float)((float)(v3 * (float)(1.0 / a1)) - 2.3561945) + a1) * v6;
}
else if ( a1 <= 0.0 )
{
mtherr(&unk_2F5, 1LL);
LODWORD(result) = MAXNUMF ^ LC1;
}
else
{
v7 = 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) + v7;
}
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:
double __fastcall tandgf(float a1)
{
return tancotf(0, a1);
}

canonical_decompiled_code:
double __fastcall func1(float 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(float a1)
{
double v1; // xmm0_8

if ( a1 == 0.0 )
{
mtherr("cotdgf", 2LL);
LODWORD(v1) = MAXNUMF;
}
else
{
v1 = tancotf(1, a1);
}
return *(float *)&v1;
}

canonical_decompiled_code:
float __fastcall func2(float a1)
{
double v1; // xmm0_8

if ( a1 == 0.0 )
{
mtherr("cotdgf", 2LL);
LODWORD(v1) = MAXNUMF;
}
else
{
v1 = func0(1, a1);
}
return *(float *)&v1;
}

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: 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 );
}


decompiled_code:
void __fastcall exp2f(float a1)
{
__int64 v1; // xmm1_8
float v2; // xmm0_4
float v3; // xmm2_4
int v4; // ebp
double v5; // xmm1_8
float v6; // xmm1_4

if ( a1 > 127.0 )
{
mtherr(fname, 3LL);
}
else
{
*(float *)&v1 = a1;
if ( a1 < -127.0 )
{
mtherr(fname, 4LL);
}
else if ( a1 != 0.0 )
{
v2 = floorf(a1);
v1 = (unsigned int)v1;
v3 = *(float *)&LC1;
v4 = (int)v2;
*(float *)&v5 = *(float *)&v1 - v2;
if ( *(float *)&v5 > 0.5 )
{
v3 = *(float *)&LC1;
++v4;
*(float *)&v5 = *(float *)&v5 - 1.0;
}
v6 = (float)(*(float *)&v5 * polevlf(&P, 5LL, v5)) + v3;
ldexpf(v6, v4);
}
}
}

canonical_decompiled_code:
void __fastcall func0(float a1)
{
__int64 v1; // xmm1_8
float v2; // xmm0_4
float v3; // xmm2_4
int v4; // ebp
double v5; // xmm1_8
float v6; // xmm1_4

if ( a1 > 127.0 )
{
mtherr(fname, 3LL);
}
else
{
*(float *)&v1 = a1;
if ( a1 < -127.0 )
{
mtherr(fname, 4LL);
}
else if ( a1 != 0.0 )
{
v2 = floorf(a1);
v1 = (unsigned int)v1;
v3 = *(float *)&LC1;
v4 = (int)v2;
*(float *)&v5 = *(float *)&v1 - v2;
if ( *(float *)&v5 > 0.5 )
{
v3 = *(float *)&LC1;
++v4;
*(float *)&v5 = *(float *)&v5 - 1.0;
}
v6 = (float)(*(float *)&v5 * polevlf(&P, 5LL, v5)) + v3;
ldexpf(v6, v4);
}
}
}

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)
{
double v5; // xmm2_8
float v8; // xmm1_4
float v9; // xmm3_4
int v10; // eax
int v11; // edx
float v12; // xmm12_4
float v13; // xmm6_4
float v14; // xmm4_4
float v15; // xmm0_4
float v16; // xmm2_4
float v17; // xmm7_4
float v18; // xmm0_4
float v19; // xmm2_4
float v20; // xmm0_4
float v21; // xmm1_4
float v22; // xmm5_4
float v23; // xmm11_4
float v24; // xmm7_4
float v25; // xmm12_4
float v26; // xmm6_4
float v27; // xmm2_4
float v28; // xmm1_4
float v29; // xmm0_4
float v30; // xmm5_4
float v31; // xmm2_4
float v32; // xmm0_4
float v33; // xmm1_4
float v34; // xmm0_4
float v35; // xmm12_4
float v36; // xmm6_4
float v37; // xmm5_4
__int64 result; // rax
double v39; // xmm4_8
__m128i v40; // xmm0
float v41; // er14
double v42; // xmm5_8
float v43; // xmm4_4
float v44; // xmm4_4
__m128i v45; // xmm0
float v46; // xmm2_4
float v47; // xmm2_4
float v48; // xmm0_4
float v49; // xmm6_4
float v50; // xmm3_4
double v51; // xmm0_8
double v52; // xmm0_8
float v53; // xmm9_4
float v54; // xmm4_4
float v55; // xmm2_4
float v56; // xmm4_4
double v57; // xmm0_8
float v58; // xmm1_4
double v59; // xmm0_8
int v60; // xmm0_4
float xa; // [rsp+0h] [rbp-58h]
double x; // [rsp+0h] [rbp-58h]
float xb; // [rsp+0h] [rbp-58h]
float xc; // [rsp+0h] [rbp-58h]
float v65; // [rsp+8h] [rbp-50h]
float v66; // [rsp+10h] [rbp-48h]
float v67; // [rsp+10h] [rbp-48h]
float v68; // [rsp+14h] [rbp-44h]
float v69; // [rsp+14h] [rbp-44h]
float v70; // [rsp+14h] [rbp-44h]
float v71; // [rsp+14h] [rbp-44h]
float v72; // [rsp+20h] [rbp-38h]
float v73; // [rsp+28h] [rbp-30h]
float v74; // [rsp+2Ch] [rbp-2Ch]

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

canonical_decompiled_code:
__int64 __fastcall func0(float *a1, float *a2, float *a3, float *a4, float a5)
{
double v5; // xmm2_8
float v8; // xmm1_4
float v9; // xmm3_4
int v10; // eax
int v11; // edx
float v12; // xmm12_4
float v13; // xmm6_4
float v14; // xmm4_4
float v15; // xmm0_4
float v16; // xmm2_4
float v17; // xmm7_4
float v18; // xmm0_4
float v19; // xmm2_4
float v20; // xmm0_4
float v21; // xmm1_4
float v22; // xmm5_4
float v23; // xmm11_4
float v24; // xmm7_4
float v25; // xmm12_4
float v26; // xmm6_4
float v27; // xmm2_4
float v28; // xmm1_4
float v29; // xmm0_4
float v30; // xmm5_4
float v31; // xmm2_4
float v32; // xmm0_4
float v33; // xmm1_4
float v34; // xmm0_4
float v35; // xmm12_4
float v36; // xmm6_4
float v37; // xmm5_4
__int64 result; // rax
double v39; // xmm4_8
__m128i v40; // xmm0
float v41; // er14
double v42; // xmm5_8
float v43; // xmm4_4
float v44; // xmm4_4
__m128i v45; // xmm0
float v46; // xmm2_4
float v47; // xmm2_4
float v48; // xmm0_4
float v49; // xmm6_4
float v50; // xmm3_4
double v51; // xmm0_8
double v52; // xmm0_8
float v53; // xmm9_4
float v54; // xmm4_4
float v55; // xmm2_4
float v56; // xmm4_4
double v57; // xmm0_8
float v58; // xmm1_4
double v59; // xmm0_8
int v60; // xmm0_4
float xa; // [rsp+0h] [rbp-58h]
double x; // [rsp+0h] [rbp-58h]
float xb; // [rsp+0h] [rbp-58h]
float xc; // [rsp+0h] [rbp-58h]
float v65; // [rsp+8h] [rbp-50h]
float v66; // [rsp+10h] [rbp-48h]
float v67; // [rsp+10h] [rbp-48h]
float v68; // [rsp+14h] [rbp-44h]
float v69; // [rsp+14h] [rbp-44h]
float v70; // [rsp+14h] [rbp-44h]
float v71; // [rsp+14h] [rbp-44h]
float v72; // [rsp+20h] [rbp-38h]
float v73; // [rsp+28h] [rbp-30h]
float v74; // [rsp+2Ch] [rbp-2Ch]

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

v1 = a1;
do
{
v2 = *v1++;
printf("%08x ", v2);
}
while ( a1 + 4 != v1 );
return putchar(10);
}

canonical_decompiled_code:
int __fastcall func0(unsigned int *a1)
{
unsigned int *v1; // rbx
__int64 v2; // rsi

v1 = a1;
do
{
v2 = *v1++;
printf("%08x ", v2);
}
while ( a1 + 4 != 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:
void __fastcall bdtrf(int a1, int a2, float a3)
{
double v3; // xmm2_8
double v4; // xmm0_8

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

canonical_decompiled_code:
void __fastcall func1(int a1, int a2, float a3)
{
double v3; // xmm2_8
double v4; // xmm0_8

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

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 func2(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(double a1)
{
double v1; // xmm2_8
int v2; // ebx
float v3; // xmm1_4
double v4; // xmm3_8
float result; // xmm0_4
float v6; // xmm0_4
double v7; // xmm3_8
__int64 v8; // rsi
void *v9; // rdi
float v10; // xmm1_4
float v11; // xmm0_4
double v12; // [rsp+0h] [rbp-18h]
float v13; // [rsp+8h] [rbp-10h]
float v14; // [rsp+8h] [rbp-10h]
float v15; // [rsp+Ch] [rbp-Ch]

v1 = a1;
v2 = 1;
if ( *(float *)&a1 < 0.0 )
{
*(_QWORD *)&v1 = *(_QWORD *)&a1 ^ LC1;
v2 = -1;
}
v3 = *(float *)&v1 * *(float *)&v1;
if ( *(float *)&v1 < 3.25 )
{
v14 = *(float *)&v1 * polevlf(&AN, 9LL, v1);
result = (float)v2
* (float)(v14
/ polevlf(
&AD,
10LL,
COERCE_DOUBLE((unsigned __int64)COERCE_UNSIGNED_INT(*(float *)&v1 * *(float *)&v1))));
}
else
{
*(_QWORD *)&v4 = (unsigned int)LC3;
*(float *)&v4 = 1.0 / v3;
if ( *(float *)&v1 < 6.25 )
{
v15 = *(float *)&v1;
v12 = *(float *)&v1;
v11 = polevlf(&BN, 10LL, v4);
*(_QWORD *)&v7 = COERCE_UNSIGNED_INT(1.0 / v3);
v8 = 10LL;
v9 = &BD;
v13 = v11 * (float)(1.0 / v3);
}
else
{
if ( *(float *)&v1 > 1000000000.0 )
return (double)v2 * 0.5 / *(float *)&v1;
v15 = *(float *)&v1;
v12 = *(float *)&v1;
v6 = polevlf(&CN, 4LL, v4);
*(_QWORD *)&v7 = COERCE_UNSIGNED_INT(1.0 / v3);
v8 = 5LL;
v9 = &CD;
v13 = v6 * (float)(1.0 / v3);
}
v10 = (float)(v13 / (float)(v15 * p1evlf(v9, v8, v7))) + 1.0 / v12;
result = (double)v2 * 0.5 * v10;
}
return result;
}

canonical_decompiled_code:
float __fastcall func0(double a1)
{
double v1; // xmm2_8
int v2; // ebx
float v3; // xmm1_4
double v4; // xmm3_8
float result; // xmm0_4
float v6; // xmm0_4
double v7; // xmm3_8
__int64 v8; // rsi
void *v9; // rdi
float v10; // xmm1_4
float v11; // xmm0_4
double v12; // [rsp+0h] [rbp-18h]
float v13; // [rsp+8h] [rbp-10h]
float v14; // [rsp+8h] [rbp-10h]
float v15; // [rsp+Ch] [rbp-Ch]

v1 = a1;
v2 = 1;
if ( *(float *)&a1 < 0.0 )
{
*(_QWORD *)&v1 = *(_QWORD *)&a1 ^ LC1;
v2 = -1;
}
v3 = *(float *)&v1 * *(float *)&v1;
if ( *(float *)&v1 < 3.25 )
{
v14 = *(float *)&v1 * polevlf(&AN, 9LL, v1);
result = (float)v2
* (float)(v14
/ polevlf(
&AD,
10LL,
COERCE_DOUBLE((unsigned __int64)COERCE_UNSIGNED_INT(*(float *)&v1 * *(float *)&v1))));
}
else
{
*(_QWORD *)&v4 = (unsigned int)LC3;
*(float *)&v4 = 1.0 / v3;
if ( *(float *)&v1 < 6.25 )
{
v15 = *(float *)&v1;
v12 = *(float *)&v1;
v11 = polevlf(&BN, 10LL, v4);
*(_QWORD *)&v7 = COERCE_UNSIGNED_INT(1.0 / v3);
v8 = 10LL;
v9 = &BD;
v13 = v11 * (float)(1.0 / v3);
}
else
{
if ( *(float *)&v1 > 1000000000.0 )
return (double)v2 * 0.5 / *(float *)&v1;
v15 = *(float *)&v1;
v12 = *(float *)&v1;
v6 = polevlf(&CN, 4LL, v4);
*(_QWORD *)&v7 = COERCE_UNSIGNED_INT(1.0 / v3);
v8 = 5LL;
v9 = &CD;
v13 = v6 * (float)(1.0 / v3);
}
v10 = (float)(v13 / (float)(v15 * p1evlf(v9, v8, v7))) + 1.0 / v12;
result = (double)v2 * 0.5 * v10;
}
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)
{
float v1; // xmm1_4
float v2; // xmm2_4
float result; // xmm0_4
float v4; // xmm0_4
float v5; // [rsp+0h] [rbp-14h]
float v6; // [rsp+0h] [rbp-14h]

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

canonical_decompiled_code:
float __fastcall func0(float a1)
{
float v1; // xmm1_4
float v2; // xmm2_4
float result; // xmm0_4
float v4; // xmm0_4
float v5; // [rsp+0h] [rbp-14h]
float v6; // [rsp+0h] [rbp-14h]

v1 = a1;
if ( a1 < 0.0 )
LODWORD(v1) = LODWORD(a1) ^ LC1;
if ( v1 > 2.0 )
{
v5 = sqrtf(1.0 / v1);
v6 = v5 * polevlf(&MO, 7LL, 1.0 / v1);
v4 = polevlf(&PH, 7LL, (float)(1.0 / v1) * (float)(1.0 / v1));
result = cosf((float)((float)(v4 * (float)(1.0 / v1)) - PIO4F) + v1) * v6;
}
else
{
v2 = v1 * v1;
if ( v1 >= 0.001 )
result = polevlf(&JP, 4LL, v2) * (float)((float)(v1 * v1) - 5.783186);
else
result = 1.0 - (float)(v2 * 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)
{
float result; // xmm0_4
float v3; // xmm0_4
float v4; // [rsp+4h] [rbp-14h]
float v5; // [rsp+4h] [rbp-14h]
float v6; // [rsp+4h] [rbp-14h]
float v7; // [rsp+4h] [rbp-14h]
float x; // [rsp+8h] [rbp-10h]

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

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

if ( a1 > 2.0 )
{
v6 = sqrtf(1.0 / a1);
v7 = v6 * polevlf(&MO, 7LL, 1.0 / a1);
v3 = polevlf(&PH, 7LL, (float)(1.0 / a1) * (float)(1.0 / a1));
result = sinf((float)((float)(v3 * (float)(1.0 / a1)) - PIO4F) + a1) * v7;
}
else if ( a1 <= 0.0 )
{
mtherr(&unk_341, 1LL);
LODWORD(result) = MAXNUMF ^ LC1;
}
else
{
v4 = (float)(a1 * a1) - *(float *)&YZ1;
v5 = polevlf(&YP, 4LL, a1 * a1) * v4;
x = logf(a1);
result = (float)((float)(x * 0.63661975) * func0(a1)) + v5;
}
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 result; // xmm0_4
float *v5; // rax

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

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

result = *a1;
v5 = a1 + 1;
do
result = (float)(result * a3) + *v5++;
while ( v5 != &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 = *a1 + a3;
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 = *a1 + a3;
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; // xmm2_4
float result; // xmm0_4
float v3; // xmm0_4
float v4; // xmm1_4
int v5; // ebx
float v6; // xmm1_4
float v7; // xmm0_4
float v8; // [rsp+0h] [rbp-18h]
float v9; // [rsp+0h] [rbp-18h]
double v10; // [rsp+0h] [rbp-18h]

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

canonical_decompiled_code:
float __fastcall func0(float a1)
{
float i; // xmm2_4
float result; // xmm0_4
float v3; // xmm0_4
float v4; // xmm1_4
int v5; // ebx
float v6; // xmm1_4
float v7; // xmm0_4
float v8; // [rsp+0h] [rbp-18h]
float v9; // [rsp+0h] [rbp-18h]
double v10; // [rsp+0h] [rbp-18h]

if ( a1 > 34.84425627277176 )
{
mtherr(name, 4LL);
result = 1.0 / MAXNUMF;
}
else if ( a1 < -34.034 )
{
LODWORD(v8) = LODWORD(a1) ^ LC4;
v3 = sinf(COERCE_FLOAT(LODWORD(a1) ^ LC4) * PIF);
v4 = v8;
if ( v3 == 0.0 )
return 0.0;
v5 = -1;
if ( v3 < 0.0 )
{
LODWORD(v3) ^= LC4;
v5 = 1;
}
v9 = logf((float)(v3 * v8) / PIF);
v6 = v9 + lgamf(v4);
if ( COERCE_FLOAT(MAXLOGF ^ LC4) > v6 )
{
mtherr(name, 4LL);
result = (double)v5 / MAXNUMF;
}
else if ( v6 <= MAXLOGF )
{
expf(v6);
result = (float)v5 * v6;
}
else
{
mtherr(name, 3LL);
result = (float)v5 * MAXNUMF;
}
}
else
{
for ( i = *(float *)&LC0; a1 > 1.0; i = i * a1 )
a1 = a1 - 1.0;
for ( ; a1 < 0.0; a1 = a1 + 1.0 )
i = i / a1;
if ( a1 == 0.0 )
return 0.0;
if ( a1 == 1.0 )
{
result = 1.0 / i;
}
else
{
v10 = a1;
v7 = a1 * 4.0 - 2.0;
result = (chbevlf(&R, 10LL, v7) + 1.0) * v10 / 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


decompiled_code:
float __fastcall atan2f(float a1, float a2)
{
float v2; // xmm4_4
float result; // xmm0_4
float v4; // xmm0_4
float v5; // xmm4_4

if ( a2 < 0.0 )
{
v2 = PIF;
if ( a1 >= 0.0 && a1 == 0.0 )
return v2;
LABEL_11:
v4 = atanf(a1 / a2).m128_f32[0];
return v5 + v4;
}
if ( a1 < 0.0 )
{
if ( a2 == 0.0 )
{
LODWORD(result) = PIO2F ^ LC2;
return result;
}
goto LABEL_11;
}
if ( a2 != 0.0 )
{
v2 = 0.0;
if ( a1 == 0.0 )
return v2;
goto LABEL_11;
}
if ( a1 == 0.0 )
return 0.0;
return PIO2F;
}

canonical_decompiled_code:
float __fastcall func1(float a1, float a2)
{
float v2; // xmm4_4
float result; // xmm0_4
float v4; // xmm0_4
float v5; // xmm4_4

if ( a2 < 0.0 )
{
v2 = PIF;
if ( a1 >= 0.0 && a1 == 0.0 )
return v2;
LABEL_11:
v4 = func0(a1 / a2).m128_f32[0];
return v5 + v4;
}
if ( a1 < 0.0 )
{
if ( a2 == 0.0 )
{
LODWORD(result) = PIO2F ^ LC2;
return result;
}
goto LABEL_11;
}
if ( a2 != 0.0 )
{
v2 = 0.0;
if ( a1 == 0.0 )
return v2;
goto LABEL_11;
}
if ( a1 == 0.0 )
return 0.0;
return PIO2F;
}

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

decompiled_code:
__int64 __fastcall sicif(float *a1, float *a2, double a3)
{
double v3; // xmm1_8
int v4; // er12
double v5; // xmm3_8
float v6; // xmm2_4
float v7; // xmm0_4
float v8; // xmm4_4
float v9; // xmm2_4
float v10; // xmm0_4
__int64 result; // rax
float v12; // xmm0_4
double v13; // xmm3_8
float v14; // xmm1_4
float v15; // xmm0_4
float v16; // xmm2_4
float v17; // xmm4_4
float v18; // xmm1_4
float v19; // xmm0_4
float v20; // xmm0_4
float v21; // [rsp+0h] [rbp-2Ch]
float v22; // [rsp+4h] [rbp-28h]
float v23; // [rsp+4h] [rbp-28h]
float v24; // [rsp+4h] [rbp-28h]
float x; // [rsp+8h] [rbp-24h]
float xa; // [rsp+8h] [rbp-24h]
float xb; // [rsp+8h] [rbp-24h]
float xc; // [rsp+8h] [rbp-24h]
float v29; // [rsp+Ch] [rbp-20h]

v3 = a3;
v4 = 0;
if ( *(float *)&a3 < 0.0 )
{
*(_QWORD *)&v3 = *(_QWORD *)&a3 ^ LC1;
v4 = -1;
}
if ( *(float *)&v3 == 0.0 )
{
*a1 = 0.0;
result = 0LL;
*(_DWORD *)a2 = MAXNUMF ^ LC1;
}
else if ( *(float *)&v3 > 1000000000.0 )
{
v24 = PIO2F;
*a1 = v24 - (float)(cosf(*(float *)&v3) / *(float *)&v3);
v20 = sinf(*(float *)&v3);
result = 0LL;
*a2 = v20 / *(float *)&v3;
}
else if ( *(float *)&v3 > 4.0 )
{
v21 = sinf(*(float *)&v3);
*(_QWORD *)&v13 = (unsigned int)LC4;
*(float *)&v13 = 1.0 / (float)(*(float *)&v3 * *(float *)&v3);
v29 = cosf(*(float *)&v3);
if ( *(float *)&v3 >= 8.0 )
{
xb = polevlf(&FN8, 8LL, v13);
xc = xb / (float)(*(float *)&v3 * p1evlf(&FD8, 8LL, *(float *)&v13));
v14 = polevlf(&GN8, 8LL, COERCE_DOUBLE((unsigned __int64)LODWORD(v13))) * *(float *)&v13;
v15 = p1evlf(&GD8, 9LL, *(float *)&v13);
v17 = v29;
v16 = xc;
}
else
{
x = polevlf(&FN4, 6LL, v13);
xa = x / (float)(*(float *)&v3 * p1evlf(&FD4, 7LL, *(float *)&v13));
v14 = polevlf(&GN4, 7LL, COERCE_DOUBLE((unsigned __int64)LODWORD(v13))) * *(float *)&v13;
v15 = p1evlf(&GD4, 7LL, *(float *)&v13);
v16 = xa;
v17 = v29;
}
v18 = v14 / v15;
v19 = (float)(PIO2F - (float)(v16 * v17)) - (float)(v21 * v18);
if ( v4 )
LODWORD(v19) ^= LC1;
*a1 = v19;
result = 0LL;
*a2 = (float)(v16 * v21) - (float)(v18 * v17);
}
else
{
HIDWORD(v5) = HIDWORD(v3);
*(float *)&v5 = *(float *)&v3 * *(float *)&v3;
v22 = polevlf(&SN, 5LL, v5) * *(float *)&v3;
v23 = v22 / polevlf(&SD, 5LL, COERCE_DOUBLE((unsigned __int64)COERCE_UNSIGNED_INT(*(float *)&v3 * *(float *)&v3)));
v6 = polevlf(&CN, 5LL, COERCE_DOUBLE((unsigned __int64)COERCE_UNSIGNED_INT(*(float *)&v3 * *(float *)&v3)))
* (float)(*(float *)&v3 * *(float *)&v3);
v7 = polevlf(&CD, 5LL, COERCE_DOUBLE((unsigned __int64)COERCE_UNSIGNED_INT(*(float *)&v3 * *(float *)&v3)));
v8 = v23;
v9 = v6 / v7;
if ( v4 )
LODWORD(v8) = LODWORD(v23) ^ LC1;
*a1 = v8;
v10 = logf(*(float *)&v3);
result = 0LL;
v12 = v10 + 0.5772156649015329 + v9;
*a2 = v12;
}
return result;
}

canonical_decompiled_code:
__int64 __fastcall func0(float *a1, float *a2, double a3)
{
double v3; // xmm1_8
int v4; // er12
double v5; // xmm3_8
float v6; // xmm2_4
float v7; // xmm0_4
float v8; // xmm4_4
float v9; // xmm2_4
float v10; // xmm0_4
__int64 result; // rax
float v12; // xmm0_4
double v13; // xmm3_8
float v14; // xmm1_4
float v15; // xmm0_4
float v16; // xmm2_4
float v17; // xmm4_4
float v18; // xmm1_4
float v19; // xmm0_4
float v20; // xmm0_4
float v21; // [rsp+0h] [rbp-2Ch]
float v22; // [rsp+4h] [rbp-28h]
float v23; // [rsp+4h] [rbp-28h]
float v24; // [rsp+4h] [rbp-28h]
float x; // [rsp+8h] [rbp-24h]
float xa; // [rsp+8h] [rbp-24h]
float xb; // [rsp+8h] [rbp-24h]
float xc; // [rsp+8h] [rbp-24h]
float v29; // [rsp+Ch] [rbp-20h]

v3 = a3;
v4 = 0;
if ( *(float *)&a3 < 0.0 )
{
*(_QWORD *)&v3 = *(_QWORD *)&a3 ^ LC1;
v4 = -1;
}
if ( *(float *)&v3 == 0.0 )
{
*a1 = 0.0;
result = 0LL;
*(_DWORD *)a2 = MAXNUMF ^ LC1;
}
else if ( *(float *)&v3 > 1000000000.0 )
{
v24 = PIO2F;
*a1 = v24 - (float)(cosf(*(float *)&v3) / *(float *)&v3);
v20 = sinf(*(float *)&v3);
result = 0LL;
*a2 = v20 / *(float *)&v3;
}
else if ( *(float *)&v3 > 4.0 )
{
v21 = sinf(*(float *)&v3);
*(_QWORD *)&v13 = (unsigned int)LC4;
*(float *)&v13 = 1.0 / (float)(*(float *)&v3 * *(float *)&v3);
v29 = cosf(*(float *)&v3);
if ( *(float *)&v3 >= 8.0 )
{
xb = polevlf(&FN8, 8LL, v13);
xc = xb / (float)(*(float *)&v3 * p1evlf(&FD8, 8LL, *(float *)&v13));
v14 = polevlf(&GN8, 8LL, COERCE_DOUBLE((unsigned __int64)LODWORD(v13))) * *(float *)&v13;
v15 = p1evlf(&GD8, 9LL, *(float *)&v13);
v17 = v29;
v16 = xc;
}
else
{
x = polevlf(&FN4, 6LL, v13);
xa = x / (float)(*(float *)&v3 * p1evlf(&FD4, 7LL, *(float *)&v13));
v14 = polevlf(&GN4, 7LL, COERCE_DOUBLE((unsigned __int64)LODWORD(v13))) * *(float *)&v13;
v15 = p1evlf(&GD4, 7LL, *(float *)&v13);
v16 = xa;
v17 = v29;
}
v18 = v14 / v15;
v19 = (float)(PIO2F - (float)(v16 * v17)) - (float)(v21 * v18);
if ( v4 )
LODWORD(v19) ^= LC1;
*a1 = v19;
result = 0LL;
*a2 = (float)(v16 * v21) - (float)(v18 * v17);
}
else
{
HIDWORD(v5) = HIDWORD(v3);
*(float *)&v5 = *(float *)&v3 * *(float *)&v3;
v22 = polevlf(&SN, 5LL, v5) * *(float *)&v3;
v23 = v22 / polevlf(&SD, 5LL, COERCE_DOUBLE((unsigned __int64)COERCE_UNSIGNED_INT(*(float *)&v3 * *(float *)&v3)));
v6 = polevlf(&CN, 5LL, COERCE_DOUBLE((unsigned __int64)COERCE_UNSIGNED_INT(*(float *)&v3 * *(float *)&v3)))
* (float)(*(float *)&v3 * *(float *)&v3);
v7 = polevlf(&CD, 5LL, COERCE_DOUBLE((unsigned __int64)COERCE_UNSIGNED_INT(*(float *)&v3 * *(float *)&v3)));
v8 = v23;
v9 = v6 / v7;
if ( v4 )
LODWORD(v8) = LODWORD(v23) ^ LC1;
*a1 = v8;
v10 = logf(*(float *)&v3);
result = 0LL;
v12 = v10 + 0.5772156649015329 + v9;
*a2 = v12;
}
return result;
}

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)
{
double v1; // xmm1_8
double v2; // xmm0_8
float result; // xmm0_4
float v4; // [rsp+0h] [rbp-10h]
float v5; // [rsp+0h] [rbp-10h]
float v6; // [rsp+0h] [rbp-10h]

*(float *)&v1 = a1;
if ( a1 < 0.0 )
LODWORD(v1) = LODWORD(a1) ^ LC1;
if ( *(float *)&v1 <= 8.0 )
{
*(_QWORD *)&v1 = LODWORD(v1);
v6 = expf(*(float *)&v1);
*(float *)&v1 = (float)(*(float *)&v1 * 0.5) - 2.0;
result = chbevlf(&A, 18LL, v1) * v6;
}
else
{
v4 = expf(*(float *)&v1);
*(_QWORD *)&v2 = (unsigned int)LC5;
*(float *)&v2 = (float)(32.0 / *(float *)&v1) - 2.0;
v5 = v4 * chbevlf(&B, 7LL, v2);
result = v5 / sqrtf(*(float *)&v1);
}
return result;
}

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

*(float *)&v1 = a1;
if ( a1 < 0.0 )
LODWORD(v1) = LODWORD(a1) ^ LC1;
if ( *(float *)&v1 <= 8.0 )
{
*(_QWORD *)&v1 = LODWORD(v1);
v6 = expf(*(float *)&v1);
*(float *)&v1 = (float)(*(float *)&v1 * 0.5) - 2.0;
result = chbevlf(&A, 18LL, v1) * v6;
}
else
{
v4 = expf(*(float *)&v1);
*(_QWORD *)&v2 = (unsigned int)LC5;
*(float *)&v2 = (float)(32.0 / *(float *)&v1) - 2.0;
v5 = v4 * chbevlf(&B, 7LL, v2);
result = v5 / sqrtf(*(float *)&v1);
}
return result;
}

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(double a1)
{
double v1; // xmm1_8
double v2; // xmm0_8
float result; // xmm0_4
float v4; // [rsp+0h] [rbp-10h]

v1 = a1;
if ( *(float *)&a1 < 0.0 )
*(_QWORD *)&v1 = *(_QWORD *)&a1 ^ LC1;
if ( *(float *)&v1 <= 8.0 )
{
*(float *)&v1 = (float)(*(float *)&v1 * 0.5) - 2.0;
result = chbevlf(&A, 18LL, v1);
}
else
{
*(_QWORD *)&v2 = (unsigned int)LC5;
*(float *)&v2 = (float)(32.0 / *(float *)&v1) - 2.0;
v4 = chbevlf(&B, 7LL, v2);
result = v4 / sqrtf(*(float *)&v1);
}
return result;
}

canonical_decompiled_code:
float __fastcall func1(double a1)
{
double v1; // xmm1_8
double v2; // xmm0_8
float result; // xmm0_4
float v4; // [rsp+0h] [rbp-10h]

v1 = a1;
if ( *(float *)&a1 < 0.0 )
*(_QWORD *)&v1 = *(_QWORD *)&a1 ^ LC1;
if ( *(float *)&v1 <= 8.0 )
{
*(float *)&v1 = (float)(*(float *)&v1 * 0.5) - 2.0;
result = chbevlf(&A, 18LL, v1);
}
else
{
*(_QWORD *)&v2 = (unsigned int)LC5;
*(float *)&v2 = (float)(32.0 / *(float *)&v1) - 2.0;
v4 = chbevlf(&B, 7LL, v2);
result = v4 / sqrtf(*(float *)&v1);
}
return result;
}

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)
{
float v1; // xmm0_4
double v2; // xmm1_8
float v3; // xmm0_4
float v4; // xmm2_4
float v5; // xmm2_4
float result; // xmm0_4
int exponent[3]; // [rsp+14h] [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);
HIDWORD(v2) = HIDWORD(a1);
if ( *(float *)&a1 < 0.7071067811865476 )
{
HIDWORD(v2) = 0;
--exponent[0];
*(float *)&v2 = v1 + v1 - 1.0;
}
else
{
*(float *)&v2 = v1 - 1.0;
}
v3 = (float)((float)(polevlf(&P, 8LL, v2) * (float)(*(float *)&v2 * *(float *)&v2)) * *(float *)&v2)
- (float)(*(float *)&v2 * *(float *)&v2) * 0.5;
v4 = v3 * 0.4426950408889634;
v5 = v4 + *(float *)&v2 * 0.4426950408889634;
result = (float)((float)(v3 + v5) + *(float *)&v2) + (float)exponent[0];
}
return result;
}

canonical_decompiled_code:
float __fastcall func0(double a1)
{
float v1; // xmm0_4
double v2; // xmm1_8
float v3; // xmm0_4
float v4; // xmm2_4
float v5; // xmm2_4
float result; // xmm0_4
int exponent[3]; // [rsp+14h] [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);
HIDWORD(v2) = HIDWORD(a1);
if ( *(float *)&a1 < 0.7071067811865476 )
{
HIDWORD(v2) = 0;
--exponent[0];
*(float *)&v2 = v1 + v1 - 1.0;
}
else
{
*(float *)&v2 = v1 - 1.0;
}
v3 = (float)((float)(polevlf(&P, 8LL, v2) * (float)(*(float *)&v2 * *(float *)&v2)) * *(float *)&v2)
- (float)(*(float *)&v2 * *(float *)&v2) * 0.5;
v4 = v3 * 0.4426950408889634;
v5 = v4 + *(float *)&v2 * 0.4426950408889634;
result = (float)((float)(v3 + v5) + *(float *)&v2) + (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

decompiled_code:
double __fastcall spencef(double a1)
{
double v1; // xmm1_8
int v2; // ebx
double v3; // xmm4_8
double v4; // xmm3_8
double v5; // xmm0_8
unsigned int v6; // xmm2_4
double v7; // xmm0_8
double v8; // xmm2_8
double result; // xmm0_8
double v10; // xmm3_8
double v11; // xmm0_8
float v12; // xmm2_4
double v13; // xmm0_8
float v14; // xmm0_4
double v15; // xmm0_8
double v16; // xmm0_8
float v17; // [rsp+0h] [rbp-14h]
float v18; // [rsp+0h] [rbp-14h]
float v19; // [rsp+8h] [rbp-Ch]

if ( *(float *)&a1 < 0.0 )
{
mtherr("spencef", 1LL);
result = 0.0;
}
else
{
v1 = a1;
if ( *(float *)&a1 == 1.0 )
{
result = 0.0;
}
else if ( *(float *)&a1 == 0.0 )
{
*(_QWORD *)&result = (unsigned int)LC1;
}
else
{
v2 = 0;
if ( *(float *)&a1 > 2.0 )
{
*(_QWORD *)&v3 = (unsigned int)LC3;
v2 = 2;
*(float *)&v3 = 1.0 / *(float *)&a1;
v1 = v3;
}
if ( *(float *)&v1 > 1.5 )
{
v10 = 1.0 / *(float *)&v1 - 1.0;
*(float *)&v10 = v10;
v11 = polevlf(&A, 7LL, v10);
v12 = *(float *)&v11 * COERCE_FLOAT(LODWORD(v10) ^ LC7);
v13 = polevlf(&B, 7LL, COERCE_DOUBLE((unsigned __int64)LODWORD(v10)));
*(float *)&v8 = v12 / *(float *)&v13;
}
else
{
HIDWORD(v4) = HIDWORD(v1);
if ( *(float *)&v1 < 0.5 )
{
v15 = polevlf(&A, 7LL, COERCE_DOUBLE(*(_QWORD *)&v1 ^ LC7));
v17 = *(float *)&v15 * *(float *)&v1;
v16 = polevlf(&B, 7LL, COERCE_DOUBLE((unsigned __int64)(LODWORD(v1) ^ (unsigned int)LC7)));
v19 = v17 / *(float *)&v16;
v18 = logf(*(float *)&v1);
HIDWORD(v8) = 0;
*(float *)&v8 = 1.644934066848226 - (float)(logf(1.0 - *(float *)&v1) * v18) - v19;
}
else
{
*(float *)&v4 = *(float *)&v1 - 1.0;
v5 = polevlf(&A, 7LL, v4);
*(float *)&v6 = *(float *)&v5 * COERCE_FLOAT(COERCE_UNSIGNED_INT(*(float *)&v1 - 1.0) ^ LC7);
v7 = polevlf(&B, 7LL, COERCE_DOUBLE((unsigned __int64)COERCE_UNSIGNED_INT(*(float *)&v1 - 1.0)));
*(_QWORD *)&v8 = v6;
*(float *)&v8 = *(float *)&v6 / *(float *)&v7;
}
if ( !v2 )
return v8;
}
v14 = logf(*(float *)&v1);
HIDWORD(v8) = 0;
*(float *)&v8 = -0.5 * v14 * v14 - *(float *)&v8;
result = v8;
}
}
return result;
}

canonical_decompiled_code:
double __fastcall func0(double a1)
{
double v1; // xmm1_8
int v2; // ebx
double v3; // xmm4_8
double v4; // xmm3_8
double v5; // xmm0_8
unsigned int v6; // xmm2_4
double v7; // xmm0_8
double v8; // xmm2_8
double result; // xmm0_8
double v10; // xmm3_8
double v11; // xmm0_8
float v12; // xmm2_4
double v13; // xmm0_8
float v14; // xmm0_4
double v15; // xmm0_8
double v16; // xmm0_8
float v17; // [rsp+0h] [rbp-14h]
float v18; // [rsp+0h] [rbp-14h]
float v19; // [rsp+8h] [rbp-Ch]

if ( *(float *)&a1 < 0.0 )
{
mtherr("spencef", 1LL);
result = 0.0;
}
else
{
v1 = a1;
if ( *(float *)&a1 == 1.0 )
{
result = 0.0;
}
else if ( *(float *)&a1 == 0.0 )
{
*(_QWORD *)&result = (unsigned int)LC1;
}
else
{
v2 = 0;
if ( *(float *)&a1 > 2.0 )
{
*(_QWORD *)&v3 = (unsigned int)LC3;
v2 = 2;
*(float *)&v3 = 1.0 / *(float *)&a1;
v1 = v3;
}
if ( *(float *)&v1 > 1.5 )
{
v10 = 1.0 / *(float *)&v1 - 1.0;
*(float *)&v10 = v10;
v11 = polevlf(&A, 7LL, v10);
v12 = *(float *)&v11 * COERCE_FLOAT(LODWORD(v10) ^ LC7);
v13 = polevlf(&B, 7LL, COERCE_DOUBLE((unsigned __int64)LODWORD(v10)));
*(float *)&v8 = v12 / *(float *)&v13;
}
else
{
HIDWORD(v4) = HIDWORD(v1);
if ( *(float *)&v1 < 0.5 )
{
v15 = polevlf(&A, 7LL, COERCE_DOUBLE(*(_QWORD *)&v1 ^ LC7));
v17 = *(float *)&v15 * *(float *)&v1;
v16 = polevlf(&B, 7LL, COERCE_DOUBLE((unsigned __int64)(LODWORD(v1) ^ (unsigned int)LC7)));
v19 = v17 / *(float *)&v16;
v18 = logf(*(float *)&v1);
HIDWORD(v8) = 0;
*(float *)&v8 = 1.644934066848226 - (float)(logf(1.0 - *(float *)&v1) * v18) - v19;
}
else
{
*(float *)&v4 = *(float *)&v1 - 1.0;
v5 = polevlf(&A, 7LL, v4);
*(float *)&v6 = *(float *)&v5 * COERCE_FLOAT(COERCE_UNSIGNED_INT(*(float *)&v1 - 1.0) ^ LC7);
v7 = polevlf(&B, 7LL, COERCE_DOUBLE((unsigned __int64)COERCE_UNSIGNED_INT(*(float *)&v1 - 1.0)));
*(_QWORD *)&v8 = v6;
*(float *)&v8 = *(float *)&v6 / *(float *)&v7;
}
if ( !v2 )
return v8;
}
v14 = logf(*(float *)&v1);
HIDWORD(v8) = 0;
*(float *)&v8 = -0.5 * v14 * v14 - *(float *)&v8;
result = v8;
}
}
return result;
}

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; // er14
char v1; // r13
unsigned int v2; // er12
int v3; // ebp
int v4; // ebx
void *v5; // rsi
__int64 v7; // [rsp+8h] [rbp-70h] BYREF
char v8[4]; // [rsp+10h] [rbp-68h] BYREF
unsigned int v9; // [rsp+14h] [rbp-64h]

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

canonical_decompiled_code:
__int64 func0()
{
int v0; // er14
char v1; // r13
unsigned int v2; // er12
int v3; // ebp
int v4; // ebx
void *v5; // rsi
__int64 v7; // [rsp+8h] [rbp-70h] BYREF
char v8[4]; // [rsp+10h] [rbp-68h] BYREF
unsigned int v9; // [rsp+14h] [rbp-64h]

v0 = 3;
v1 = 1;
v2 = 0x10000;
v3 = 5;
qmov(qone, &qk);
qmov(qone, &qden);
qclear(&uf);
qclear(&ug);
v7 = 216LL;
ltoq(&v7, &q216);
do
{
v4 = v0;
qmov(&qk, v8);
++v9;
qadd(qone, v8);
qmov(v8, &qnum);
if ( v3 > v0 )
{
do
{
v4 += 2;
qadd(&qtwo, v8);
qmuli(v8, &qnum);
}
while ( v3 > v4 );
}
qmuli(&q216, &qden);
qmuli(&qk, &qden);
qmul(&zeta, &qden);
qdiv(&qden, &qnum, v8);
if ( (v1 & 1) != 0 )
{
v5 = &ug;
if ( (v1 & 2) != 0 )
goto LABEL_6;
}
else
{
v5 = &uf;
if ( (v1 & 2) != 0 )
{
LABEL_6:
qsub(v8, v5);
goto LABEL_7;
}
}
qadd(v8, v5);
LABEL_7:
if ( v2 > v9 )
v2 = v9;
if ( v9 > v2 )
break;
++v1;
v0 += 2;
v3 += 6;
qadd(qone, &qk);
}
while ( (int)(qone[1] - v9) <= 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