// File: /workspace/github_cpp_makefile_star2_O3/millanek[P]Dsuite/KolmogorovSmirnovDist.cpp
// Function: mPower(double*, int, double*, int*, int, int)
static void mPower (double *A, int eA, double *V, int *eV, int m, int n)
{
   double *B;
   int eB, i;
   if (n == 1) {
      for (i = 0; i < m * m; i++)
         V[i] = A[i];
      *eV = eA;
      return;
   }
   mPower (A, eA, V, eV, m, n / 2);
   B = (double *) malloc ((m * m) * sizeof (double));
   mMultiply (V, V, B, m);
   eB = 2 * (*eV);
   if (B[(m / 2) * m + (m / 2)] > NORM)
      renormalize (B, m, &eB);

   if (n % 2 == 0) {
      for (i = 0; i < m * m; i++)
         V[i] = B[i];
      *eV = eB;
   } else {
      mMultiply (A, B, V, m);
      *eV = eA + eB;
   }

   if (V[(m / 2) * m + (m / 2)] > NORM)
      renormalize (V, m, eV);
   free (B);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %r15d
movq %rsi, %r14
movq %rdi, %r13
cmpl $0x1, %r8d
jne 0x40930
testl %r15d, %r15d
je 0x4091b
imull %r15d, %r15d
cmpl $0x1, %r15d
adcl $0x0, %r15d
xorl %eax, %eax
movsd (%r13,%rax,8), %xmm0
movsd %xmm0, (%r14,%rax,8)
incq %rax
cmpq %rax, %r15
jne 0x40906
movl $0x0, (%rdx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %r8d, %ebp
shrl $0x1f, %r8d
addl %ebp, %r8d
sarl %r8d
movq %r13, %rdi
movq %r14, %rsi
movq %rdx, 0x10(%rsp)
movl %r15d, %ecx
callq 0x408d6
movl %r15d, %eax
imull %eax, %eax
movq %rax, 0x8(%rsp)
leaq (,%rax,8), %rdi
callq 0x7570
movq %rax, %r12
testl %r15d, %r15d
jle 0x409d3
movl %r15d, %eax
leaq (,%rax,8), %rcx
xorl %edx, %edx
movq %r14, %rsi
movq %rdx, %rdi
imulq %rax, %rdi
leaq (%r12,%rdi,8), %rdi
movq %r14, %r8
xorl %r9d, %r9d
xorpd %xmm0, %xmm0
movq %r8, %r10
xorl %r11d, %r11d
movsd (%rsi,%r11), %xmm1
mulsd (%r10), %xmm1
addsd %xmm1, %xmm0
addq $0x8, %r11
addq %rcx, %r10
cmpq %r11, %rcx
jne 0x4099b
movsd %xmm0, (%rdi,%r9,8)
incq %r9
addq $0x8, %r8
cmpq %rax, %r9
jne 0x40991
incq %rdx
addq %rcx, %rsi
cmpq %rax, %rdx
jne 0x40980
movq 0x10(%rsp), %r11
movl (%r11), %ebx
addl %ebx, %ebx
movl %r15d, %eax
shrl $0x1f, %eax
addl %r15d, %eax
sarl %eax
leal 0x1(%r15), %ecx
imull %eax, %ecx
movslq %ecx, %rdx
movsd (%r12,%rdx,8), %xmm0
ucomisd 0x5a10(%rip), %xmm0     # 0x46410
jbe 0x40a3f
testl %r15d, %r15d
je 0x40a39
movq 0x8(%rsp), %rcx
cmpl $0x2, %ecx
movl $0x1, %eax
cmovael %ecx, %eax
xorl %ecx, %ecx
movsd 0x59f7(%rip), %xmm0     # 0x46418
movsd (%r12,%rcx,8), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, (%r12,%rcx,8)
incq %rcx
cmpq %rcx, %rax
jne 0x40a21
addl $0x8c, %ebx
testb $0x1, %bpl
jne 0x40a74
testl %r15d, %r15d
je 0x40b29
movq %rdx, %rbp
movq 0x8(%rsp), %rdx
cmpq $0x1, %rdx
adcq $0x0, %rdx
shlq $0x3, %rdx
movq %r14, %rdi
movq %r12, %rsi
callq 0x7370
movq 0x10(%rsp), %r11
jmp 0x40add
movq %rdx, %rbp
testl %r15d, %r15d
jle 0x40add
movl %r15d, %eax
leaq (,%rax,8), %rcx
xorl %edx, %edx
movq %rdx, %rsi
imulq %rax, %rsi
leaq (%r14,%rsi,8), %rsi
movq %r12, %rdi
xorl %r8d, %r8d
xorpd %xmm0, %xmm0
movq %rdi, %r9
xorl %r10d, %r10d
movsd (%r13,%r10), %xmm1
mulsd (%r9), %xmm1
addsd %xmm1, %xmm0
addq $0x8, %r10
addq %rcx, %r9
cmpq %r10, %rcx
jne 0x40aa4
movsd %xmm0, (%rsi,%r8,8)
incq %r8
addq $0x8, %rdi
cmpq %rax, %r8
jne 0x40a9a
incq %rdx
addq %rcx, %r13
cmpq %rax, %rdx
jne 0x40a89
movl %ebx, (%r11)
movsd (%r14,%rbp,8), %xmm0
ucomisd 0x5922(%rip), %xmm0     # 0x46410
jbe 0x40b45
testl %r15d, %r15d
je 0x40b3c
movq 0x8(%rsp), %rcx
cmpl $0x2, %ecx
movl $0x1, %eax
cmovael %ecx, %eax
xorl %ecx, %ecx
movsd 0x5909(%rip), %xmm0     # 0x46418
movsd (%r14,%rcx,8), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, (%r14,%rcx,8)
incq %rcx
cmpq %rcx, %rax
jne 0x40b0f
jmp 0x40b3c
movl %ebx, (%r11)
movsd (%r14,%rdx,8), %xmm0
ucomisd 0x58d6(%rip), %xmm0     # 0x46410
jbe 0x40b45
addl $0x8c, %ebx
movl %ebx, (%r11)
movq %r12, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x7500