// File: /workspace/github_cpp_makefile_star2_O1/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 0x3f997
testl %r15d, %r15d
je 0x3f982
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 0x3f96d
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, 0x8(%rsp)
movl %r15d, %ecx
callq 0x3f93d
movl %r15d, %ebx
imull %ebx, %ebx
leaq (,%rbx,8), %rdi
callq 0x7570
movq %rax, %r12
testl %r15d, %r15d
jle 0x3fa35
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 0x3f9fd
movsd %xmm0, (%rdi,%r9,8)
incq %r9
addq $0x8, %r8
cmpq %rax, %r9
jne 0x3f9f3
incq %rdx
addq %rcx, %rsi
cmpq %rax, %rdx
jne 0x3f9e2
movq 0x8(%rsp), %r11
movl (%r11), %edx
addl %edx, %edx
movl %r15d, %eax
shrl $0x1f, %eax
addl %r15d, %eax
sarl %eax
leal 0x1(%r15), %ecx
imull %eax, %ecx
movslq %ecx, %rax
movq %rax, 0x10(%rsp)
movsd (%r12,%rax,8), %xmm0
ucomisd 0x5919(%rip), %xmm0     # 0x45380
jbe 0x3fa9e
testl %r15d, %r15d
je 0x3fa98
cmpl $0x1, %ebx
movl %ebx, %eax
adcl $0x0, %eax
xorl %ecx, %ecx
movsd 0x5908(%rip), %xmm0     # 0x45388
movsd (%r12,%rcx,8), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, (%r12,%rcx,8)
incq %rcx
cmpq %rcx, %rax
jne 0x3fa80
addl $0x8c, %edx
movl %edx, 0x4(%rsp)
testb $0x1, %bpl
jne 0x3facf
testl %r15d, %r15d
je 0x3fb35
cmpl $0x1, %ebx
movl %ebx, %edx
adcl $0x0, %edx
shlq $0x3, %rdx
movq %r14, %rdi
movq %r12, %rsi
callq 0x7370
movq 0x8(%rsp), %r11
jmp 0x3fb35
testl %r15d, %r15d
jle 0x3fb35
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 0x3fafc
movsd %xmm0, (%rsi,%r8,8)
incq %r8
addq $0x8, %rdi
cmpq %rax, %r8
jne 0x3faf2
incq %rdx
addq %rcx, %r13
cmpq %rax, %rdx
jne 0x3fae1
movl 0x4(%rsp), %ecx
movl %ecx, (%r11)
movq 0x10(%rsp), %rax
movsd (%r14,%rax,8), %xmm0
ucomisd 0x5831(%rip), %xmm0     # 0x45380
jbe 0x3fb87
testl %r15d, %r15d
je 0x3fb7e
cmpl $0x1, %ebx
adcl $0x0, %ebx
xorl %eax, %eax
movsd 0x5822(%rip), %xmm0     # 0x45388
movsd (%r14,%rax,8), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, (%r14,%rax,8)
incq %rax
cmpq %rax, %rbx
jne 0x3fb66
addl $0x8c, %ecx
movl %ecx, (%r11)
movq %r12, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x7500