// File: /workspace/github_cpp_makefile_star2_O3/millanek[P]Dsuite/kstest.cpp
// Function: mPower(double*, int, double*, int*, int, int)
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(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)]>1e140) {for(i=0;i<m*m;i++) V[i]=V[i]*1e-140;*eV+=140;}
    free(B);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r8d, %r15d
movq %rdx, %r14
movq %rdi, %r13
cmpl $0x1, %r9d
jne 0x3da97
testl %r15d, %r15d
je 0x3da86
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 0x3da71
movl %esi, (%rcx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %r9d, %ebp
shrl $0x1f, %r9d
addl %ebp, %r9d
sarl %r9d
movq %r13, %rdi
movl %esi, 0xc(%rsp)
movq %r14, %rdx
movl %r15d, %r8d
movq %rcx, %rbx
callq 0x3da41
movl %r15d, %eax
imull %eax, %eax
movq %rax, 0x10(%rsp)
leaq (,%rax,8), %rdi
callq 0x7570
movq %rax, %r12
testl %r15d, %r15d
jle 0x3dba9
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 0x3db08
movsd %xmm0, (%rdi,%r9,8)
incq %r9
addq $0x8, %r8
cmpq %rax, %r9
jne 0x3dafe
incq %rdx
addq %rcx, %rsi
cmpq %rax, %rdx
jne 0x3daed
movq %rbx, %r11
movl (%rbx), %edx
addl %edx, %edx
testb $0x1, %bpl
je 0x3dbb6
movl %edx, %ebx
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 0x3db6c
movsd %xmm0, (%rsi,%r8,8)
incq %r8
addq $0x8, %rdi
cmpq %rax, %r8
jne 0x3db62
incq %rdx
addq %rcx, %r13
cmpq %rax, %rdx
jne 0x3db51
movl %ebx, %edx
jmp 0x3dbe3
movl (%rbx), %edx
addl %edx, %edx
testb $0x1, %bpl
movq %rbx, %r11
jne 0x3dbe3
testl %r15d, %r15d
je 0x3dbe7
movl %edx, %ebp
movq 0x10(%rsp), %rdx
cmpq $0x1, %rdx
adcq $0x0, %rdx
shlq $0x3, %rdx
movq %r14, %rdi
movq %r12, %rsi
movq %r11, %rbx
callq 0x7370
movl %ebp, %edx
movq %rbx, %r11
jmp 0x3dbe7
addl 0xc(%rsp), %edx
movl %edx, (%r11)
movl %r15d, %eax
shrl $0x1f, %eax
addl %r15d, %eax
sarl %eax
leal 0x1(%r15), %ecx
imull %eax, %ecx
movslq %ecx, %rax
movsd (%r14,%rax,8), %xmm0
ucomisd 0x8803(%rip), %xmm0     # 0x46410
jbe 0x3dc4f
testl %r15d, %r15d
je 0x3dc46
movq 0x10(%rsp), %rcx
cmpl $0x2, %ecx
movl $0x1, %eax
cmovael %ecx, %eax
xorl %ecx, %ecx
movsd 0x87ea(%rip), %xmm0     # 0x46418
movsd (%r14,%rcx,8), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, (%r14,%rcx,8)
incq %rcx
cmpq %rcx, %rax
jne 0x3dc2e
addl $0x8c, %edx
movl %edx, (%r11)
movq %r12, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x7500