// File: /workspace/github_cpp_makefile_star2_O1/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 0x3d0db
testl %r15d, %r15d
je 0x3d0ca
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 0x3d0b5
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
movq %rcx, 0x10(%rsp)
movl %r15d, %r8d
callq 0x3d085
movl %r15d, %ebx
imull %ebx, %ebx
leaq (,%rbx,8), %rdi
callq 0x7570
movq %rax, %r12
testl %r15d, %r15d
jle 0x3d17d
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 0x3d145
movsd %xmm0, (%rdi,%r9,8)
incq %r9
addq $0x8, %r8
cmpq %rax, %r9
jne 0x3d13b
incq %rdx
addq %rcx, %rsi
cmpq %rax, %rdx
jne 0x3d12a
movq 0x10(%rsp), %r11
movl (%r11), %edx
addl %edx, %edx
testb $0x1, %bpl
jne 0x3d1b8
testl %r15d, %r15d
je 0x3d226
cmpl $0x1, %ebx
movl %edx, %ebp
movl %ebx, %edx
adcl $0x0, %edx
shlq $0x3, %rdx
movq %r14, %rdi
movq %r12, %rsi
callq 0x7370
movl %ebp, %edx
movq 0x10(%rsp), %r11
jmp 0x3d226
movl %edx, %ebp
testl %r15d, %r15d
jle 0x3d220
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 0x3d1e7
movsd %xmm0, (%rsi,%r8,8)
incq %r8
addq $0x8, %rdi
cmpq %rax, %r8
jne 0x3d1dd
incq %rdx
addq %rcx, %r13
cmpq %rax, %rdx
jne 0x3d1cc
movl %ebp, %edx
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 0x8134(%rip), %xmm0     # 0x45380
jbe 0x3d284
testl %r15d, %r15d
je 0x3d27b
cmpl $0x1, %ebx
adcl $0x0, %ebx
xorl %eax, %eax
movsd 0x8125(%rip), %xmm0     # 0x45388
movsd (%r14,%rax,8), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, (%r14,%rax,8)
incq %rax
cmpq %rax, %rbx
jne 0x3d263
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