#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
long double M_LN2;
long double expl(long double);
int floorl(long double);
long double frexpl(long double, int *);
long double ldexpl(long double, int);
long double logl(long double);
long double powl(long double x, long double y) {
  long double base, yExp;
  long double result;
  int exp;
  base = frexpl(x, &exp);
  yExp = y * exp;
  exp = floorl(yExp);
  yExp -= exp;
  result = expl(logl(base) * y);
  result *= expl(M_LN2 * yExp);
  return ldexpl(result, exp);
}


x86 assembly (clang, -O0):
<powl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
lea    -0x54(%rbp),%rdi
call   1050 <frexpl@plt>
fstpt  -0x30(%rbp)
fldt   -0x20(%rbp)
mov    -0x54(%rbp),%eax
mov    %eax,-0x5c(%rbp)
fildl  -0x5c(%rbp)
fmulp  %st,%st(1)
fstpt  -0x40(%rbp)
fldt   -0x40(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1070 <floorl@plt>
mov    %eax,-0x54(%rbp)
mov    -0x54(%rbp),%eax
mov    %eax,-0x58(%rbp)
fildl  -0x58(%rbp)
fldt   -0x40(%rbp)
fsubp  %st,%st(1)
fstpt  -0x40(%rbp)
fldt   -0x30(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <logl@plt>
fldt   -0x20(%rbp)
fmulp  %st,%st(1)
mov    %rsp,%rax
fstpt  (%rax)
call   1040 <expl@plt>
fstpt  -0x50(%rbp)
mov    0x2e10(%rip),%rax
fldt   (%rax)
fldt   -0x40(%rbp)
fmulp  %st,%st(1)
mov    %rsp,%rax
fstpt  (%rax)
call   1040 <expl@plt>
fldt   -0x50(%rbp)
fmulp  %st,%st(1)
fstpt  -0x50(%rbp)
fldt   -0x50(%rbp)
mov    -0x54(%rbp),%edi
mov    %rsp,%rax
fstpt  (%rax)
call   1060 <ldexpl@plt>
fld    %st(0)
fstp   %st(0)
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<powl>:
push   %rbx
sub    $0x40,%rsp
fldt   0x60(%rsp)
fstpt  0x10(%rsp)
fldt   0x50(%rsp)
fstpt  (%rsp)
lea    0x24(%rsp),%rdi
call   1050 <frexpl@plt>
fstpt  0x34(%rsp)
mov    0x24(%rsp),%eax
mov    %eax,0x1c(%rsp)
fldt   0x10(%rsp)
fimull 0x1c(%rsp)
fld    %st(0)
fstpt  0x28(%rsp)
fstpt  (%rsp)
call   1070 <floorl@plt>
mov    %eax,%ebx
mov    %eax,0x20(%rsp)
fldt   0x28(%rsp)
fisubl 0x20(%rsp)
fstpt  0x28(%rsp)
fldt   0x34(%rsp)
fstpt  (%rsp)
call   1030 <logl@plt>
fldt   0x10(%rsp)
fmulp  %st,%st(1)
fstpt  (%rsp)
call   1040 <expl@plt>
fstpt  0x10(%rsp)
mov    0x2e19(%rip),%rax
fldt   (%rax)
fldt   0x28(%rsp)
fmulp  %st,%st(1)
fstpt  (%rsp)
call   1040 <expl@plt>
fldt   0x10(%rsp)
fmulp  %st,%st(1)
fstpt  (%rsp)
mov    %ebx,%edi
call   1060 <ldexpl@plt>
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@M_LN2 = global x86_fp80 0xK00000000000000000000
define x86_fp80 @powl(x86_fp80 %0, x86_fp80 %1) {
%3 = alloca x86_fp80
%4 = alloca x86_fp80
%5 = alloca x86_fp80
%6 = alloca x86_fp80
%7 = alloca x86_fp80
%8 = alloca i32
store x86_fp80 %0, x86_fp80* %3
store x86_fp80 %1, x86_fp80* %4
%9 = load x86_fp80, x86_fp80* %3
%10 = call x86_fp80 @frexpl(x86_fp80 %9, i32* %8)
store x86_fp80 %10, x86_fp80* %5
%11 = load x86_fp80, x86_fp80* %4
%12 = load i32, i32* %8
%13 = sitofp i32 %12 to x86_fp80
%14 = fmul x86_fp80 %11, %13
store x86_fp80 %14, x86_fp80* %6
%15 = load x86_fp80, x86_fp80* %6
%16 = call i32 @floorl(x86_fp80 %15)
store i32 %16, i32* %8
%17 = load i32, i32* %8
%18 = sitofp i32 %17 to x86_fp80
%19 = load x86_fp80, x86_fp80* %6
%20 = fsub x86_fp80 %19, %18
store x86_fp80 %20, x86_fp80* %6
%21 = load x86_fp80, x86_fp80* %5
%22 = call x86_fp80 @logl(x86_fp80 %21)
%23 = load x86_fp80, x86_fp80* %4
%24 = fmul x86_fp80 %22, %23
%25 = call x86_fp80 @expl(x86_fp80 %24)
store x86_fp80 %25, x86_fp80* %7
%26 = load x86_fp80, x86_fp80* @M_LN2
%27 = load x86_fp80, x86_fp80* %6
%28 = fmul x86_fp80 %26, %27
%29 = call x86_fp80 @expl(x86_fp80 %28)
%30 = load x86_fp80, x86_fp80* %7
%31 = fmul x86_fp80 %30, %29
store x86_fp80 %31, x86_fp80* %7
%32 = load x86_fp80, x86_fp80* %7
%33 = load i32, i32* %8
%34 = call x86_fp80 @ldexpl(x86_fp80 %32, i32 %33)
ret x86_fp80 %34
}

LLVM IR (-O2):
@M_LN2 = global x86_fp80 0xK00000000000000000000
define x86_fp80 @powl(x86_fp80 %0, x86_fp80 %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call x86_fp80 @frexpl(x86_fp80 %0, i32* %3)
%6 = load i32, i32* %3
%7 = sitofp i32 %6 to x86_fp80
%8 = fmul x86_fp80 %7, %1
%9 = tail call i32 @floorl(x86_fp80 %8)
%10 = sitofp i32 %9 to x86_fp80
%11 = fsub x86_fp80 %8, %10
%12 = tail call x86_fp80 @logl(x86_fp80 %5)
%13 = fmul x86_fp80 %12, %1
%14 = tail call x86_fp80 @expl(x86_fp80 %13)
%15 = load x86_fp80, x86_fp80* @M_LN2
%16 = fmul x86_fp80 %11, %15
%17 = tail call x86_fp80 @expl(x86_fp80 %16)
%18 = fmul x86_fp80 %14, %17
%19 = tail call x86_fp80 @ldexpl(x86_fp80 %18, i32 %9)
ret x86_fp80 %19
}