#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 */
double abs_inverse(double, double, char const *);
double powGuarded(double, char *, double, char *);
double powIntExp_inverse(double x, int exponent, double y, const char *ys) {
  double xabs;
  double yabs;
  double invExp;
  ;
  invExp = 1.0 / exponent;
  xabs = (x < 0.0 ? -x : x);
  if (exponent % 2 == 0) {
    ;
    yabs = powGuarded((xabs), "xabs", (invExp), "invExp");
    return abs_inverse(yabs, y, ys);
  }
  yabs = powGuarded((xabs), "xabs", (invExp), "invExp");
  return (x < 0.0 ? -yabs : yabs);
}


x86 assembly (clang, -O0):
<powIntExp_inverse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movsd  %xmm0,-0x10(%rbp)
mov    %edi,-0x14(%rbp)
movsd  %xmm1,-0x20(%rbp)
mov    %rsi,-0x28(%rbp)
cvtsi2sdl -0x14(%rbp),%xmm1
movsd  0xeba(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1183 <powIntExp_inverse+0x63>
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x48(%rbp)
jmp    118d <powIntExp_inverse+0x6d>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x14(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11ea <powIntExp_inverse+0xca>
movsd  -0x30(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm1
lea    0xe4c(%rip),%rdi
lea    0xe4a(%rip),%rsi
call   1040 <powGuarded@plt>
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
mov    -0x28(%rbp),%rdi
call   1030 <abs_inverse@plt>
movsd  %xmm0,-0x8(%rbp)
jmp    1254 <powIntExp_inverse+0x134>
movsd  -0x30(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm1
lea    0xe0d(%rip),%rdi
lea    0xe0b(%rip),%rsi
call   1040 <powGuarded@plt>
movsd  %xmm0,-0x38(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1240 <powIntExp_inverse+0x120>
movsd  -0x38(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x50(%rbp)
jmp    124a <powIntExp_inverse+0x12a>
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<powIntExp_inverse>:
push   %rbp
push   %rbx
sub    $0x28,%rsp
mov    %rsi,%rbx
movsd  %xmm1,0x8(%rsp)
mov    %edi,%ebp
cvtsi2sd %edi,%xmm2
movsd  0xec3(%rip),%xmm1
divsd  %xmm2,%xmm1
movapd 0xec7(%rip),%xmm3
xorpd  %xmm0,%xmm3
xorpd  %xmm2,%xmm2
movapd %xmm0,%xmm4
cmpltsd %xmm2,%xmm4
andpd  %xmm4,%xmm3
movapd %xmm4,0x10(%rsp)
movapd %xmm4,%xmm2
andnpd %xmm0,%xmm2
orpd   %xmm3,%xmm2
lea    0xea9(%rip),%rdi
lea    0xea7(%rip),%rsi
movapd %xmm2,%xmm0
call   1040 <powGuarded@plt>
test   $0x1,%bpl
jne    11a1 <powIntExp_inverse+0x81>
movsd  0x8(%rsp),%xmm1
mov    %rbx,%rdi
add    $0x28,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <abs_inverse@plt>
movapd 0xe67(%rip),%xmm1
xorpd  %xmm0,%xmm1
movapd 0x10(%rsp),%xmm2
andpd  %xmm2,%xmm1
andnpd %xmm0,%xmm2
orpd   %xmm1,%xmm2
movapd %xmm2,%xmm0
add    $0x28,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"xabs\00"
@.str.1 = [7 x i8] c"invExp\00"
define double @powIntExp_inverse(double %0, i32 %1, double %2, i8* %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca i32
%8 = alloca double
%9 = alloca i8*
%10 = alloca double
%11 = alloca double
%12 = alloca double
store double %0, double* %6
store i32 %1, i32* %7
store double %2, double* %8
store i8* %3, i8** %9
%13 = load i32, i32* %7
%14 = sitofp i32 %13 to double
%15 = fdiv double 1.000000e+00, %14
store double %15, double* %12
%16 = load double, double* %6
%17 = fcmp olt double %16, 0.000000e+00
br i1 %17, label %18, label %21
18: ; preds = %4
%19 = load double, double* %6
%20 = fneg double %19
br label %23
21: ; preds = %4
%22 = load double, double* %6
br label %23
23: ; preds = %21, %18
%24 = phi double [ %20, %18 ], [ %22, %21 ]
store double %24, double* %10
%25 = load i32, i32* %7
%26 = srem i32 %25, 2
%27 = icmp eq i32 %26, 0
br i1 %27, label %28, label %36
28: ; preds = %23
%29 = load double, double* %10
%30 = load double, double* %12
%31 = call double @powGuarded(double %29, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), double %30, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
store double %31, double* %11
%32 = load double, double* %11
%33 = load double, double* %8
%34 = load i8*, i8** %9
%35 = call double @abs_inverse(double %32, double %33, i8* %34)
store double %35, double* %5
br label %49
36: ; preds = %23
%37 = load double, double* %10
%38 = load double, double* %12
%39 = call double @powGuarded(double %37, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), double %38, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
store double %39, double* %11
%40 = load double, double* %6
%41 = fcmp olt double %40, 0.000000e+00
br i1 %41, label %42, label %45
42: ; preds = %36
%43 = load double, double* %11
%44 = fneg double %43
br label %47
45: ; preds = %36
%46 = load double, double* %11
br label %47
47: ; preds = %45, %42
%48 = phi double [ %44, %42 ], [ %46, %45 ]
store double %48, double* %5
br label %49
49: ; preds = %47, %28
%50 = load double, double* %5
ret double %50
}

LLVM IR (-O2):
@.str = [5 x i8] c"xabs\00"
@.str.1 = [7 x i8] c"invExp\00"
define double @powIntExp_inverse(double %0, i32 %1, double %2, i8* %3) {
%5 = sitofp i32 %1 to double
%6 = fdiv double 1.000000e+00, %5
%7 = fcmp olt double %0, 0.000000e+00
%8 = fneg double %0
%9 = select i1 %7, double %8, double %0
%10 = and i32 %1, 1
%11 = icmp eq i32 %10, 0
%12 = tail call double @powGuarded(double %9, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), double %6, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
br i1 %11, label %13, label %15
13: ; preds = %4
%14 = tail call double @abs_inverse(double %12, double %2, i8* %3)
br label %18
15: ; preds = %4
%16 = fneg double %12
%17 = select i1 %7, double %16, double %12
br label %18
18: ; preds = %15, %13
%19 = phi double [ %14, %13 ], [ %17, %15 ]
ret double %19
}