// File: /workspace/github_cpp_makefile_star2_O1/lvandeve[P]lodepng/lodepng_util.cpp
// Function: lodepng::lodepng_powf(float, float)
static float lodepng_powf(float x, float y) {
  float j, t0, t1, l;
  int i = 0;
  /* handle all the special floating point rules */
  if(x == 1 || y == 0) return 1; /*these cases return 1 even if the other value is NaN, as specified*/
  if(y == 1) return x; /* preserves negative-0 */
  if(!(x > 0 && x <= lodepng_flt_max && y >= -lodepng_flt_max && y <= lodepng_flt_max)) { /*all special cases*/
    if(x != x || y != y) return x + y; /* nan */
    if(x > 0) {
      if(x > lodepng_flt_max) return y <= 0 ? (y == 0 ? 1 : 0) : x; /* x = +infinity */
    } else {
      if(!(y < -1073741824.0f || y > 1073741824.0f)) { /* large y always even integer, but cast would overflow */
        i = (int)y; /* not using floor: not using math lib */
        if(i != y) {
          return (x < -lodepng_flt_max) ? (y < 0 ? 0 : lodepng_flt_inf) :
              (x == 0 ? (y < 0 ? lodepng_flt_inf : 0) : lodepng_flt_nan);
        }
        if(i & 1) return x == 0 ? (y < 0 ? (1 / x) : x) : -lodepng_powf(-x, y);
      }
      if(x == 0) return y <= 0 ? lodepng_flt_inf : 0;
      if(x < -lodepng_flt_max) { /* x == -infinity */
        return y <= 0 ? (y == 0 ? 1 : 0) : ((i & 1) ?
            -lodepng_flt_inf : lodepng_flt_inf);
      }
      x = -x;
      if(x == 1) return 1; /* under the C++ rules, pow(-1, +/- infinity) also returns 1 */
    }
    if(y < -lodepng_flt_max || y > lodepng_flt_max) return ((x < 1) != (y > 0)) ? (y < 0 ? -y : y) : 0;
  }

  l = x;
  j = 0;
  while(l < (1.0f / 65536)) { j -= 16; l *= 65536.0f; }
  while(l > 65536) { j += 16; l *= (1.0f / 65536); }
  while(l < 1) { j--; l *= 2.0f; }
  while(l > 2) { j++; l *= 0.5f; }
  /* polynomial to approximate log2(x) with x in range 1..2 */
  t0 = -0.393118410458557f + l * (-0.0883639468229365f + l * (0.466142650227994f + l * 0.0153397331014276f));
  t1 = 0.0907447971403586f + l * (0.388892024755479f + l * 0.137228280305862f);
  l = t0 / t1 + j;

  l *= y; /* using the formula exp2(y * log2(x)) */

  /* prevent int shift overflow, 0 or inf result are ok to return since exp will be taken, 127 is max float exponent */
  if(l <= -128.0f || l >= 128.0f) return ((x > 1) == (y > 0)) ? lodepng_flt_inf : 0;
  i = (int)l;
  l -= i;
  /* polynomial to approximate exp2(x) with x in range -1..1 */
  t0 = 1.0f + l * (0.41777833582744256f + l * (0.0728482595347711f + l * 0.005635023478609625f));
  t1 = 1.0f + l * (-0.27537016151408167f + l * 0.023501446055084033f);
  while(i <= -31) { t0 *= (1.0f / 2147483648.0f); i += 31; }
  while(i >= 31) { t0 *= 2147483648.0f; i -= 31; }
  return (i < 0) ? (t0 / (t1 * (1 << -i))) : ((t0 * (1 << i)) / t1);
}

// Assembly:
pushq %rax
movss 0x61ed5(%rip), %xmm2    # 0x75d64
ucomiss %xmm2, %xmm0
jne 0x13e96
jnp 0x13eae
xorps %xmm3, %xmm3
ucomiss %xmm3, %xmm1
jne 0x13ea0
jnp 0x13eae
ucomiss 0x61ebd(%rip), %xmm1    # 0x75d64
jne 0x13eb3
jp 0x13eb3
movaps %xmm0, %xmm2
movaps %xmm2, %xmm0
popq %rax
retq
ucomiss %xmm3, %xmm0
jbe 0x14062
movss 0x61ee8(%rip), %xmm3    # 0x75dac
ucomiss %xmm1, %xmm3
jb 0x14062
ucomiss %xmm0, %xmm3
jb 0x14062
ucomiss 0x61ed3(%rip), %xmm1    # 0x75db0
jb 0x14062
xorps %xmm2, %xmm2
movss 0x61e82(%rip), %xmm3    # 0x75d70
ucomiss %xmm0, %xmm3
movaps %xmm0, %xmm5
jbe 0x13f16
movss 0x61ec6(%rip), %xmm4    # 0x75dc4
movss 0x61ec2(%rip), %xmm6    # 0x75dc8
movaps %xmm0, %xmm5
addss %xmm4, %xmm2
mulss %xmm6, %xmm5
ucomiss %xmm5, %xmm3
ja 0x13f09
ucomiss 0x61eab(%rip), %xmm5    # 0x75dc8
jbe 0x13f3c
movss 0x61ea5(%rip), %xmm4    # 0x75dcc
movss 0x61e99(%rip), %xmm6    # 0x75dc8
addss %xmm4, %xmm2
mulss %xmm3, %xmm5
ucomiss %xmm6, %xmm5
ja 0x13f2f
movss 0x61e20(%rip), %xmm3    # 0x75d64
ucomiss %xmm5, %xmm3
jbe 0x13f5e
movss 0x61e6f(%rip), %xmm4    # 0x75dc0
addss %xmm4, %xmm2
addss %xmm5, %xmm5
ucomiss %xmm5, %xmm3
ja 0x13f51
ucomiss 0x61e6b(%rip), %xmm5    # 0x75dd0
jbe 0x13f84
movss 0x61e25(%rip), %xmm4    # 0x75d94
movss 0x61e59(%rip), %xmm6    # 0x75dd0
addss %xmm3, %xmm2
mulss %xmm4, %xmm5
ucomiss %xmm6, %xmm5
ja 0x13f77
movss 0x61e48(%rip), %xmm4    # 0x75dd4
mulss %xmm5, %xmm4
addss 0x61e40(%rip), %xmm4    # 0x75dd8
mulss %xmm5, %xmm4
addss 0x61e38(%rip), %xmm4    # 0x75ddc
mulss %xmm5, %xmm4
addss 0x61e30(%rip), %xmm4    # 0x75de0
movss 0x61e2c(%rip), %xmm6    # 0x75de4
mulss %xmm5, %xmm6
addss 0x61e24(%rip), %xmm6    # 0x75de8
mulss %xmm5, %xmm6
addss 0x61e1c(%rip), %xmm6    # 0x75dec
divss %xmm6, %xmm4
addss %xmm2, %xmm4
mulss %xmm1, %xmm4
movaps 0x61e3d(%rip), %xmm2    # 0x75e20
andps %xmm4, %xmm2
ucomiss 0x61e03(%rip), %xmm2    # 0x75df0
jae 0x14090
cvttss2si %xmm4, %eax
cvttps2dq %xmm4, %xmm0
cvtdq2ps %xmm0, %xmm0
subss %xmm0, %xmm4
movss 0x61dea(%rip), %xmm2    # 0x75df4
mulss %xmm4, %xmm2
addss 0x61de2(%rip), %xmm2    # 0x75df8
mulss %xmm4, %xmm2
addss 0x61dda(%rip), %xmm2    # 0x75dfc
mulss %xmm4, %xmm2
addss %xmm3, %xmm2
movss 0x61dce(%rip), %xmm0    # 0x75e00
mulss %xmm4, %xmm0
addss 0x61dc6(%rip), %xmm0    # 0x75e04
cmpl $-0x1f, %eax
jg 0x140f3
movss 0x61db9(%rip), %xmm1    # 0x75e08
mulss %xmm1, %xmm2
leal 0x1f(%rax), %edx
cmpl $-0x3d, %eax
movl %edx, %eax
jl 0x1404f
jmp 0x140f5
ucomiss %xmm1, %xmm0
jp 0x142a9
xorps %xmm3, %xmm3
ucomiss %xmm3, %xmm0
jbe 0x140c2
ucomiss 0x61d32(%rip), %xmm0    # 0x75dac
jbe 0x14232
xorps %xmm2, %xmm2
cmpnless %xmm2, %xmm1
andps %xmm0, %xmm1
jmp 0x141f5
movss 0x61ccc(%rip), %xmm3    # 0x75d64
cmpltps %xmm0, %xmm3
xorps %xmm2, %xmm2
xorps %xmm0, %xmm0
cmpnltps %xmm1, %xmm0
xorps %xmm3, %xmm0
movd %xmm0, %eax
testb $0x1, %al
je 0x13eae
movss 0x61cff(%rip), %xmm2    # 0x75dbc
jmp 0x13eae
movaps 0x61d57(%rip), %xmm3    # 0x75e20
andps %xmm1, %xmm3
xorl %eax, %eax
ucomiss 0x61cdf(%rip), %xmm3    # 0x75db4
jbe 0x14134
xorps %xmm3, %xmm3
ucomiss %xmm3, %xmm0
jne 0x14188
jp 0x14188
cmpless %xmm3, %xmm1
jmp 0x1420c
movl %eax, %edx
mulss %xmm0, %xmm4
cmpl $0x1f, %edx
jl 0x14116
movss 0x61d06(%rip), %xmm0    # 0x75e0c
mulss %xmm0, %xmm2
leal -0x1f(%rdx), %ecx
cmpl $0x3d, %edx
movl %ecx, %edx
jg 0x14106
jmp 0x14118
movl %edx, %ecx
addss %xmm3, %xmm4
testl %ecx, %ecx
js 0x1416b
movl $0x1, %eax
shll %cl, %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
mulss %xmm0, %xmm2
jmp 0x1417f
cvttps2dq %xmm1, %xmm3
cvtdq2ps %xmm3, %xmm3
ucomiss %xmm1, %xmm3
jne 0x14142
jnp 0x141bd
movss 0x61c66(%rip), %xmm2    # 0x75db0
ucomiss %xmm0, %xmm2
jbe 0x141fd
xorps %xmm0, %xmm0
cmpltss %xmm0, %xmm1
movss 0x61c59(%rip), %xmm0    # 0x75dbc
andnps %xmm0, %xmm1
jmp 0x141f5
negb %cl
movl $0x1, %eax
shll %cl, %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
mulss %xmm0, %xmm4
divss %xmm4, %xmm2
jmp 0x13eae
movss 0x61c20(%rip), %xmm3    # 0x75db0
ucomiss %xmm0, %xmm3
jbe 0x1421c
xorps %xmm2, %xmm2
ucomiss %xmm1, %xmm2
jae 0x13eae
xorl %ecx, %ecx
testb $0x1, %al
sete %cl
leaq 0x61c8d(%rip), %rax     # 0x75e40
movss (%rax,%rcx,4), %xmm2
jmp 0x13eae
cvttss2si %xmm1, %eax
testb $0x1, %al
je 0x140d7
xorps %xmm2, %xmm2
ucomiss %xmm2, %xmm0
jne 0x1428e
jp 0x1428e
movss 0x61b81(%rip), %xmm3    # 0x75d64
divss %xmm0, %xmm3
cmpltss %xmm2, %xmm1
andps %xmm1, %xmm3
andnps %xmm0, %xmm1
orps %xmm3, %xmm1
movaps %xmm1, %xmm2
jmp 0x13eae
xorps %xmm2, %xmm2
ucomiss %xmm2, %xmm0
jne 0x14281
jp 0x14281
cmpltss %xmm2, %xmm1
movss 0x61ba8(%rip), %xmm2    # 0x75dbc
andps %xmm1, %xmm2
jmp 0x13eae
ucomiss 0x61b9d(%rip), %xmm0    # 0x75dc0
jne 0x1422b
jnp 0x13eae
xorps 0x61bde(%rip), %xmm0    # 0x75e10
movaps 0x61be7(%rip), %xmm2    # 0x75e20
andps %xmm1, %xmm2
ucomiss 0x61b69(%rip), %xmm2    # 0x75dac
jbe 0x13ee3
movss 0x61b13(%rip), %xmm2    # 0x75d64
cmpltps %xmm2, %xmm0
xorps %xmm2, %xmm2
xorps %xmm3, %xmm3
cmpnltps %xmm1, %xmm3
xorps %xmm0, %xmm3
movd %xmm3, %eax
testb $0x1, %al
jne 0x13eae
movaps 0x61b9b(%rip), %xmm2    # 0x75e10
xorps %xmm1, %xmm2
maxss %xmm1, %xmm2
jmp 0x13eae
movss 0x61b2f(%rip), %xmm2    # 0x75db8
jmp 0x13eae
xorps 0x61b7b(%rip), %xmm0    # 0x75e10
callq 0x13e86
movaps %xmm0, %xmm2
xorps 0x61b6c(%rip), %xmm2    # 0x75e10
jmp 0x13eae
addss %xmm1, %xmm0
jmp 0x13eab