Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>

typedef struct {
	int m[50][50];
} MATRIX;

void mulMatVec(int out[50],const MATRIX* m,const int v[50],int n,int modBy) {
	int i,j;
	for(i=0;i<n;i++) {
		out[i]=0;
		for(j=0;j<n;j++) {
			out[i]+=m->m[i][j]*v[j];
		}
		out[i]%=modBy;
	}
}

void mulMatMat(MATRIX* out,const MATRIX* x,const MATRIX* y,int n,int modBy) {
	int i,j,k;
	for(i=0;i<n;i++) {
		for(j=0;j<n;j++) {
			out->m[i][j]=0;
			for(k=0;k<n;k++)out->m[i][j]+=x->m[i][k]*y->m[k][j];
			out->m[i][j]%=modBy;
		}
	}
}

void powMat(MATRIX* out,const MATRIX* in,int powNum,int n,int modBy) {
	MATRIX resultBuf[2];
	MATRIX mulBuf[2];
	int i,j;
	int resultNo=0;
	int mulNo=0;
	for(i=0;i<n;i++) {
		for(j=0;j<n;j++) {
			mulBuf[0].m[i][j]=in->m[i][j];
			resultBuf[0].m[i][j]=(i==j?1:0);
		}
	}
	while(powNum>0) {
		if(powNum&1) {
			mulMatMat(&resultBuf[1-resultNo],
				&resultBuf[resultNo],&mulBuf[mulNo],n,modBy);
			resultNo=1-resultNo;
		}
		mulMatMat(&mulBuf[1-mulNo],&mulBuf[mulNo],&mulBuf[mulNo],n,modBy);
		mulNo=1-mulNo;
		powNum>>=1;
	}
	for(i=0;i<n;i++) {
		for(j=0;j<n;j++)out->m[i][j]=resultBuf[resultNo].m[i][j];
	}
}

int main(void) {
	int N,M,A,B,C,T;
	while(scanf("%d%d%d%d%d%d",&N,&M,&A,&B,&C,&T)==6 && (N|M|A|B|C|T)!=0) {
		MATRIX automaton;
		MATRIX automatonStatus;
		int initialStatus[50];
		int resultStatus[50];
		int i,j;
		for(i=0;i<N;i++)scanf("%d",&initialStatus[i]);
		for(i=0;i<N;i++) {
			for(j=0;j<N;j++) {
				switch(i-j) {
					case  1: automaton.m[i][j]=A;break;
					case  0: automaton.m[i][j]=B;break;
					case -1: automaton.m[i][j]=C;break;
					default: automaton.m[i][j]=0;break;
				}
			}
		}
		powMat(&automatonStatus,&automaton,T,N,M);
		mulMatVec(resultStatus,&automatonStatus,initialStatus,N,M);
		for(i=0;i<N;i++) {
			printf("%d%c",resultStatus[i],i+1<N?' ':'\n');
		}
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	mulMatVec
	.type	mulMatVec, @function
mulMatVec:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	%rdx, -40(%rbp)
	movl	%ecx, -44(%rbp)
	movl	%r8d, -48(%rbp)
	movl	$0, -8(%rbp)
	jmp	.L2
.L5:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	$0, (%rax)
	movl	$0, -4(%rbp)
	jmp	.L3
.L4:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %esi
	movq	-32(%rbp), %rdx
	movl	-4(%rbp), %eax
	movslq	%eax, %rdi
	movl	-8(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rdi, %rax
	movl	(%rdx,%rax,4), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-40(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	imull	%eax, %edx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	addl	%esi, %edx
	movl	%edx, (%rax)
	addl	$1, -4(%rbp)
.L3:
	movl	-4(%rbp), %eax
	cmpl	-44(%rbp), %eax
	jl	.L4
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	-8(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-24(%rbp), %rdx
	addq	%rdx, %rcx
	cltd
	idivl	-48(%rbp)
	movl	%edx, %eax
	movl	%eax, (%rcx)
	addl	$1, -8(%rbp)
.L2:
	movl	-8(%rbp), %eax
	cmpl	-44(%rbp), %eax
	jl	.L5
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	mulMatVec, .-mulMatVec
	.globl	mulMatMat
	.type	mulMatMat, @function
mulMatMat:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	%rdx, -40(%rbp)
	movl	%ecx, -44(%rbp)
	movl	%r8d, -48(%rbp)
	movl	$0, -12(%rbp)
	jmp	.L7
.L12:
	movl	$0, -8(%rbp)
	jmp	.L8
.L11:
	movq	-24(%rbp), %rdx
	movl	-8(%rbp), %eax
	movslq	%eax, %rsi
	movl	-12(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	$0, (%rdx,%rax,4)
	movl	$0, -4(%rbp)
	jmp	.L9
.L10:
	movq	-24(%rbp), %rdx
	movl	-8(%rbp), %eax
	movslq	%eax, %rsi
	movl	-12(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	(%rdx,%rax,4), %edi
	movq	-32(%rbp), %rdx
	movl	-4(%rbp), %eax
	movslq	%eax, %rsi
	movl	-12(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	(%rdx,%rax,4), %esi
	movq	-40(%rbp), %rdx
	movl	-8(%rbp), %eax
	movslq	%eax, %r8
	movl	-4(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%r8, %rax
	movl	(%rdx,%rax,4), %eax
	imull	%esi, %eax
	leal	(%rdi,%rax), %esi
	movq	-24(%rbp), %rdx
	movl	-8(%rbp), %eax
	movslq	%eax, %rdi
	movl	-12(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rdi, %rax
	movl	%esi, (%rdx,%rax,4)
	addl	$1, -4(%rbp)
.L9:
	movl	-4(%rbp), %eax
	cmpl	-44(%rbp), %eax
	jl	.L10
	movq	-24(%rbp), %rdx
	movl	-8(%rbp), %eax
	movslq	%eax, %rsi
	movl	-12(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	(%rdx,%rax,4), %eax
	cltd
	idivl	-48(%rbp)
	movl	%edx, %esi
	movq	-24(%rbp), %rdx
	movl	-8(%rbp), %eax
	movslq	%eax, %rdi
	movl	-12(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rdi, %rax
	movl	%esi, (%rdx,%rax,4)
	addl	$1, -8(%rbp)
.L8:
	movl	-8(%rbp), %eax
	cmpl	-44(%rbp), %eax
	jl	.L11
	addl	$1, -12(%rbp)
.L7:
	movl	-12(%rbp), %eax
	cmpl	-44(%rbp), %eax
	jl	.L12
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	mulMatMat, .-mulMatMat
	.globl	powMat
	.type	powMat, @function
powMat:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-36864(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$3200, %rsp
	movq	%rdi, -40040(%rbp)
	movq	%rsi, -40048(%rbp)
	movl	%edx, -40052(%rbp)
	movl	%ecx, -40056(%rbp)
	movl	%r8d, -40060(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -40024(%rbp)
	movl	$0, -40020(%rbp)
	movl	$0, -40032(%rbp)
	jmp	.L14
.L17:
	movl	$0, -40028(%rbp)
	jmp	.L15
.L16:
	movq	-40048(%rbp), %rdx
	movl	-40028(%rbp), %eax
	movslq	%eax, %rsi
	movl	-40032(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	(%rdx,%rax,4), %edx
	movl	-40028(%rbp), %eax
	movslq	%eax, %rsi
	movl	-40032(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	%edx, -20016(%rbp,%rax,4)
	movl	-40032(%rbp), %eax
	cmpl	-40028(%rbp), %eax
	sete	%al
	movzbl	%al, %edx
	movl	-40028(%rbp), %eax
	movslq	%eax, %rsi
	movl	-40032(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	%edx, -40016(%rbp,%rax,4)
	addl	$1, -40028(%rbp)
.L15:
	movl	-40028(%rbp), %eax
	cmpl	-40056(%rbp), %eax
	jl	.L16
	addl	$1, -40032(%rbp)
.L14:
	movl	-40032(%rbp), %eax
	cmpl	-40056(%rbp), %eax
	jl	.L17
	jmp	.L18
.L20:
	movl	-40052(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L19
	leaq	-20016(%rbp), %rdx
	movl	-40020(%rbp), %eax
	cltq
	imulq	$10000, %rax, %rax
	addq	%rax, %rdx
	leaq	-40016(%rbp), %rcx
	movl	-40024(%rbp), %eax
	cltq
	imulq	$10000, %rax, %rax
	leaq	(%rcx,%rax), %rsi
	movl	$1, %eax
	subl	-40024(%rbp), %eax
	leaq	-40016(%rbp), %rcx
	cltq
	imulq	$10000, %rax, %rax
	leaq	(%rcx,%rax), %rdi
	movl	-40060(%rbp), %ecx
	movl	-40056(%rbp), %eax
	movl	%ecx, %r8d
	movl	%eax, %ecx
	call	mulMatMat
	movl	$1, %eax
	subl	-40024(%rbp), %eax
	movl	%eax, -40024(%rbp)
.L19:
	leaq	-20016(%rbp), %rdx
	movl	-40020(%rbp), %eax
	cltq
	imulq	$10000, %rax, %rax
	addq	%rax, %rdx
	leaq	-20016(%rbp), %rcx
	movl	-40020(%rbp), %eax
	cltq
	imulq	$10000, %rax, %rax
	leaq	(%rcx,%rax), %rsi
	movl	$1, %eax
	subl	-40020(%rbp), %eax
	leaq	-20016(%rbp), %rcx
	cltq
	imulq	$10000, %rax, %rax
	leaq	(%rcx,%rax), %rdi
	movl	-40060(%rbp), %ecx
	movl	-40056(%rbp), %eax
	movl	%ecx, %r8d
	movl	%eax, %ecx
	call	mulMatMat
	movl	$1, %eax
	subl	-40020(%rbp), %eax
	movl	%eax, -40020(%rbp)
	sarl	-40052(%rbp)
.L18:
	cmpl	$0, -40052(%rbp)
	jg	.L20
	movl	$0, -40032(%rbp)
	jmp	.L21
.L24:
	movl	$0, -40028(%rbp)
	jmp	.L22
.L23:
	movl	-40028(%rbp), %eax
	movslq	%eax, %rcx
	movl	-40024(%rbp), %eax
	cltq
	movl	-40032(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$2500, %rax, %rsi
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	addq	%rcx, %rax
	movl	-40016(%rbp,%rax,4), %ecx
	movq	-40040(%rbp), %rdx
	movl	-40028(%rbp), %eax
	movslq	%eax, %rdi
	movl	-40032(%rbp), %eax
	movslq	%eax, %rsi
	movq	%rsi, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	addq	%rax, %rax
	addq	%rdi, %rax
	movl	%ecx, (%rdx,%rax,4)
	addl	$1, -40028(%rbp)
.L22:
	movl	-40028(%rbp), %eax
	cmpl	-40056(%rbp), %eax
	jl	.L23
	addl	$1, -40032(%rbp)
.L21:
	movl	-40032(%rbp), %eax
	cmpl	-40056(%rbp), %eax
	jl	.L24
	nop
	movq	-8(%rbp), %rax
	subq	%fs:40, %rax
	je	.L25
	call	__stack_chk_fail@PLT
.L25:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	powMat, .-powMat
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%c"
.LC2:
	.string	"%d%d%d%d%d%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-16384(%rsp), %r11
.LPSRL1:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL1
	subq	$4080, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L27
.L44:
	movl	$0, -20440(%rbp)
	jmp	.L28
.L29:
	leaq	-20432(%rbp), %rdx
	movl	-20440(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -20440(%rbp)
.L28:
	movl	-20464(%rbp), %eax
	cmpl	%eax, -20440(%rbp)
	jl	.L29
	movl	$0, -20440(%rbp)
	jmp	.L30
.L38:
	movl	$0, -20436(%rbp)
	jmp	.L31
.L37:
	movl	-20440(%rbp), %eax
	subl	-20436(%rbp), %eax
	cmpl	$1, %eax
	je	.L32
	cmpl	$1, %eax
	jg	.L33
	cmpl	$-1, %eax
	je	.L34
	testl	%eax, %eax
	je	.L35
	jmp	.L33
.L32:
	movl	-20456(%rbp), %edx
	movl	-20436(%rbp), %eax
	movslq	%eax, %rsi
	movl	-20440(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	%edx, -20016(%rbp,%rax,4)
	jmp	.L36
.L35:
	movl	-20452(%rbp), %edx
	movl	-20436(%rbp), %eax
	movslq	%eax, %rsi
	movl	-20440(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	%edx, -20016(%rbp,%rax,4)
	jmp	.L36
.L34:
	movl	-20448(%rbp), %edx
	movl	-20436(%rbp), %eax
	movslq	%eax, %rsi
	movl	-20440(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	%edx, -20016(%rbp,%rax,4)
	jmp	.L36
.L33:
	movl	-20436(%rbp), %eax
	movslq	%eax, %rcx
	movl	-20440(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	$0, -20016(%rbp,%rax,4)
	nop
.L36:
	addl	$1, -20436(%rbp)
.L31:
	movl	-20464(%rbp), %eax
	cmpl	%eax, -20436(%rbp)
	jl	.L37
	addl	$1, -20440(%rbp)
.L30:
	movl	-20464(%rbp), %eax
	cmpl	%eax, -20440(%rbp)
	jl	.L38
	movl	-20460(%rbp), %edi
	movl	-20464(%rbp), %ecx
	movl	-20444(%rbp), %edx
	leaq	-20016(%rbp), %rsi
	leaq	-10016(%rbp), %rax
	movl	%edi, %r8d
	movq	%rax, %rdi
	call	powMat
	movl	-20460(%rbp), %edi
	movl	-20464(%rbp), %ecx
	leaq	-20432(%rbp), %rdx
	leaq	-10016(%rbp), %rsi
	leaq	-20224(%rbp), %rax
	movl	%edi, %r8d
	movq	%rax, %rdi
	call	mulMatVec
	movl	$0, -20440(%rbp)
	jmp	.L39
.L42:
	movl	-20440(%rbp), %eax
	leal	1(%rax), %edx
	movl	-20464(%rbp), %eax
	cmpl	%eax, %edx
	jge	.L40
	movl	$32, %edx
	jmp	.L41
.L40:
	movl	$10, %edx
.L41:
	movl	-20440(%rbp), %eax
	cltq
	movl	-20224(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -20440(%rbp)
.L39:
	movl	-20464(%rbp), %eax
	cmpl	%eax, -20440(%rbp)
	jl	.L42
.L27:
	leaq	-20448(%rbp), %r8
	leaq	-20452(%rbp), %rdi
	leaq	-20456(%rbp), %rcx
	leaq	-20460(%rbp), %rdx
	leaq	-20464(%rbp), %rax
	subq	$8, %rsp
	leaq	-20444(%rbp), %rsi
	pushq	%rsi
	movq	%r8, %r9
	movq	%rdi, %r8
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$16, %rsp
	cmpl	$6, %eax
	jne	.L43
	movl	-20464(%rbp), %edx
	movl	-20460(%rbp), %eax
	orl	%eax, %edx
	movl	-20456(%rbp), %eax
	orl	%eax, %edx
	movl	-20452(%rbp), %eax
	orl	%eax, %edx
	movl	-20448(%rbp), %eax
	orl	%eax, %edx
	movl	-20444(%rbp), %eax
	orl	%edx, %eax
	testl	%eax, %eax
	jne	.L44
.L43:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L46
	call	__stack_chk_fail@PLT
.L46:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
user
	.file	"temp.c"
	.text
	.p2align 4
	.globl	mulMatVec
	.type	mulMatVec, @function
mulMatVec:
.LFB23:
	.cfi_startproc
	endbr64
	movq	%rdx, %r10
	testl	%ecx, %ecx
	jle	.L1
	leal	-1(%rcx), %eax
	movl	%ecx, %r9d
	leaq	4(%rdi,%rax,4), %r11
	.p2align 4,,10
	.p2align 3
.L4:
	movl	$0, (%rdi)
	xorl	%edx, %edx
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L3:
	movl	(%rsi,%rdx,4), %ecx
	imull	(%r10,%rdx,4), %ecx
	addq	$1, %rdx
	addl	%ecx, %eax
	movl	%eax, (%rdi)
	cmpq	%rdx, %r9
	jne	.L3
	cltd
	addq	$4, %rdi
	addq	$200, %rsi
	idivl	%r8d
	movl	%edx, -4(%rdi)
	cmpq	%r11, %rdi
	jne	.L4
.L1:
	ret
	.cfi_endproc
.LFE23:
	.size	mulMatVec, .-mulMatVec
	.p2align 4
	.globl	mulMatMat
	.type	mulMatMat, @function
mulMatMat:
.LFB24:
	.cfi_startproc
	endbr64
	movl	%ecx, %eax
	testl	%eax, %eax
	jle	.L17
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movq	%rdi, %r11
	movq	%rsi, %r9
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%rdx, %rbp
	leal	-1(%rax), %edx
	leaq	(%rax,%rax,4), %rax
	leaq	0(,%rdx,4), %rcx
	leaq	(%rax,%rax,4), %r12
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	xorl	%ebx, %ebx
	leaq	(%rcx,%rdx), %rax
	addq	%r12, %r12
	leaq	4(%rbp,%rcx), %r10
	leaq	(%rax,%rax,4), %rax
	leaq	200(%rbp,%rax,8), %r13
	.p2align 4,,10
	.p2align 3
.L11:
	movq	%r13, %r15
	movq	%rbp, %rdi
	movq	%r11, %rsi
	.p2align 4,,10
	.p2align 3
.L13:
	movl	$0, (%rsi)
	movq	%rdi, %rcx
	movq	%r9, %r14
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L12:
	movl	(%r14), %edx
	imull	(%rcx), %edx
	addq	$200, %rcx
	addq	$4, %r14
	addl	%edx, %eax
	movl	%eax, (%rsi)
	cmpq	%r15, %rcx
	jne	.L12
	cltd
	addq	$4, %rdi
	leaq	4(%rcx), %r15
	addq	$4, %rsi
	idivl	%r8d
	movl	%edx, -4(%rsi)
	cmpq	%r10, %rdi
	jne	.L13
	addq	$50, %rbx
	addq	$200, %r9
	addq	$200, %r11
	cmpq	%r12, %rbx
	jne	.L11
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L17:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	.cfi_restore 14
	.cfi_restore 15
	ret
	.cfi_endproc
.LFE24:
	.size	mulMatMat, .-mulMatMat
	.p2align 4
	.globl	powMat
	.type	powMat, @function
powMat:
.LFB25:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	-36864(%rsp), %r11
	.cfi_def_cfa 11, 36920
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$3240, %rsp
	.cfi_def_cfa_offset 40160
	movq	%rdi, 48(%rsp)
	movl	%ecx, %ebx
	movl	%r8d, %r14d
	movl	%edx, 16(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 40088(%rsp)
	xorl	%eax, %eax
	testl	%ecx, %ecx
	jle	.L21
	leal	-1(%rbx), %eax
	movl	%ebx, %r9d
	movl	%r8d, 8(%rsp)
	leaq	80(%rsp), %r15
	movl	%eax, 20(%rsp)
	movl	%ebx, %edx
	movl	%ebx, %r12d
	andl	$-4, %r9d
	movq	%r15, 24(%rsp)
	movq	%r15, %rbp
	salq	$2, %rdx
	xorl	%r13d, %r13d
	leaq	20080(%rsp), %rcx
	shrl	$2, %r12d
	movq	%rsi, %r14
	movl	%r9d, %r15d
.L22:
	movq	%rcx, %rdi
	movq	%r14, %rsi
	movq	%rdx, 32(%rsp)
	call	memcpy@PLT
	cmpl	$2, 20(%rsp)
	movq	32(%rsp), %rdx
	movdqa	.LC1(%rip), %xmm1
	movq	%rax, %rcx
	jbe	.L43
	movd	%r13d, %xmm3
	pshufd	$0, %xmm3, %xmm0
	movdqa	%xmm0, %xmm2
	pcmpeqd	.LC2(%rip), %xmm2
	pand	%xmm1, %xmm2
	movups	%xmm2, 0(%rbp)
	cmpl	$1, %r12d
	jbe	.L24
	movdqa	%xmm0, %xmm2
	pcmpeqd	.LC3(%rip), %xmm2
	pand	%xmm1, %xmm2
	movups	%xmm2, 16(%rbp)
	cmpl	$2, %r12d
	je	.L24
	movdqa	%xmm0, %xmm2
	pcmpeqd	.LC4(%rip), %xmm2
	pand	%xmm1, %xmm2
	movups	%xmm2, 32(%rbp)
	cmpl	$3, %r12d
	je	.L24
	movdqa	%xmm0, %xmm2
	pcmpeqd	.LC5(%rip), %xmm2
	pand	%xmm1, %xmm2
	movups	%xmm2, 48(%rbp)
	cmpl	$4, %r12d
	je	.L24
	movdqa	%xmm0, %xmm2
	pcmpeqd	.LC6(%rip), %xmm2
	pand	%xmm1, %xmm2
	movups	%xmm2, 64(%rbp)
	cmpl	$5, %r12d
	je	.L24
	movdqa	%xmm0, %xmm2
	pcmpeqd	.LC7(%rip), %xmm2
	pand	%xmm1, %xmm2
	movups	%xmm2, 80(%rbp)
	cmpl	$6, %r12d
	je	.L24
	movdqa	%xmm0, %xmm2
	pcmpeqd	.LC8(%rip), %xmm2
	pand	%xmm1, %xmm2
	movups	%xmm2, 96(%rbp)
	cmpl	$7, %r12d
	je	.L24
	movdqa	%xmm0, %xmm2
	pcmpeqd	.LC9(%rip), %xmm2
	pand	%xmm1, %xmm2
	movups	%xmm2, 112(%rbp)
	cmpl	$8, %r12d
	je	.L24
	movdqa	%xmm0, %xmm2
	pcmpeqd	.LC10(%rip), %xmm2
	pand	%xmm1, %xmm2
	movups	%xmm2, 128(%rbp)
	cmpl	$9, %r12d
	je	.L24
	movdqa	%xmm0, %xmm2
	pcmpeqd	.LC11(%rip), %xmm2
	pand	%xmm1, %xmm2
	movups	%xmm2, 144(%rbp)
	cmpl	$10, %r12d
	je	.L24
	movdqa	%xmm0, %xmm2
	pcmpeqd	.LC12(%rip), %xmm2
	pand	%xmm1, %xmm2
	movups	%xmm2, 160(%rbp)
	cmpl	$11, %r12d
	je	.L24
	pcmpeqd	.LC0(%rip), %xmm0
	pand	%xmm1, %xmm0
	movups	%xmm0, 176(%rbp)
.L24:
	movl	%r15d, %eax
	cmpl	%ebx, %r15d
	je	.L23
.L26:
	movslq	%r13d, %rsi
	movslq	%eax, %rdi
	xorl	%r10d, %r10d
	leaq	(%rsi,%rsi,4), %rsi
	leaq	(%rsi,%rsi,4), %rsi
	addq	%rsi, %rsi
	addq	%rsi, %rdi
	cmpl	%r13d, %eax
	sete	%r10b
	movl	%r10d, 80(%rsp,%rdi,4)
	leal	1(%rax), %r10d
	cmpl	%r10d, %ebx
	jle	.L23
	movslq	%r10d, %rdi
	addq	%rsi, %rdi
	cmpl	%r10d, %r13d
	sete	%r10b
	addl	$2, %eax
	movzbl	%r10b, %r10d
	movl	%r10d, 80(%rsp,%rdi,4)
	cmpl	%eax, %ebx
	jle	.L23
	movslq	%eax, %rdi
	addq	%rdi, %rsi
	cmpl	%eax, %r13d
	sete	%al
	movzbl	%al, %eax
	movl	%eax, 80(%rsp,%rsi,4)
.L23:
	addl	$1, %r13d
	addq	$200, %rcx
	addq	$200, %r14
	addq	$200, %rbp
	cmpl	%r13d, %ebx
	jne	.L22
	movl	16(%rsp), %edx
	movl	8(%rsp), %r14d
	xorl	%eax, %eax
	movq	24(%rsp), %r15
	testl	%edx, %edx
	jle	.L41
.L40:
	leaq	20080(%rsp), %rax
	movl	20(%rsp), %ebp
	movl	$0, 24(%rsp)
	xorl	%r12d, %r12d
	movq	%rax, 40(%rsp)
	leaq	80(%rsp), %rax
	movq	%rax, 56(%rsp)
	leaq	5(%rbp,%rbp,4), %rax
	leaq	(%rax,%rax,4), %rax
	addq	%rax, %rax
	movq	%rax, 64(%rsp)
	leaq	20084(%rsp), %rax
	movq	%rax, 72(%rsp)
.L37:
	movl	24(%rsp), %edi
	movl	$1, %eax
	subl	%edi, %eax
	movslq	%edi, %r11
	movl	%eax, 24(%rsp)
	testb	$1, 16(%rsp)
	jne	.L83
	testl	%ebx, %ebx
	jle	.L29
.L33:
	movslq	24(%rsp), %rax
	imulq	$10000, %r11, %r13
	xorl	%r10d, %r10d
	addq	40(%rsp), %r13
	movq	%r13, %rdi
	subq	%r11, %rax
	imulq	$10000, %rax, %r11
	.p2align 4,,10
	.p2align 3
.L36:
	leaq	(%rdi,%r11), %rsi
	movq	%r13, %r9
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L35:
	movl	$0, (%rsi)
	movq	%r9, %r15
	xorl	%edx, %edx
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L34:
	movl	(%rdi,%rdx,4), %ecx
	imull	(%r15), %ecx
	addq	$1, %rdx
	addq	$200, %r15
	addl	%ecx, %eax
	movl	%eax, (%rsi)
	cmpl	%edx, %ebx
	jg	.L34
	cltd
	addl	$1, %r8d
	addq	$4, %rsi
	addq	$4, %r9
	idivl	%r14d
	movl	%edx, -4(%rsi)
	cmpl	%r8d, %ebx
	jg	.L35
	addl	$1, %r10d
	addq	$200, %rdi
	cmpl	%r10d, %ebx
	jg	.L36
.L29:
	sarl	16(%rsp)
	jne	.L37
.L85:
	movl	%r12d, %eax
	testl	%ebx, %ebx
	jle	.L20
	leaq	80(%rsp), %r15
.L41:
	movslq	%eax, %rbp
	movl	20(%rsp), %eax
	movq	48(%rsp), %rcx
	imulq	$10000, %rbp, %rbp
	leaq	4(,%rax,4), %r13
	movl	$4, %eax
	addq	%r15, %rbp
	testl	%ebx, %ebx
	cmovle	%rax, %r13
	xorl	%r12d, %r12d
.L39:
	movq	%rbp, %rsi
	movq	%rcx, %rdi
	movq	%r13, %rdx
	call	memcpy@PLT
	addl	$1, %r12d
	addq	$200, %rbp
	movq	%rax, %rcx
	addq	$200, %rcx
	cmpl	%r12d, %ebx
	jg	.L39
.L20:
	movq	40088(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L84
	addq	$40104, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L83:
	.cfi_restore_state
	movl	$1, %eax
	subl	%r12d, %eax
	movl	%eax, 32(%rsp)
	testl	%ebx, %ebx
	jle	.L44
	cltq
	imulq	$10000, %r12, %rdi
	movq	64(%rsp), %rsi
	addq	56(%rsp), %rdi
	subq	%r12, %rax
	imulq	$-2500, %r12, %r10
	imulq	$10000, %rax, %r12
	imulq	$10000, %r11, %rax
	addq	40(%rsp), %rax
	movq	%rax, 8(%rsp)
	imulq	$2500, %r11, %rax
	leaq	(%rsi,%r10), %r13
	movq	72(%rsp), %rsi
	addq	%rbp, %rax
	leaq	(%rsi,%rax,4), %r9
.L30:
	movq	8(%rsp), %r8
	leaq	(%rdi,%r12), %rsi
	.p2align 4,,10
	.p2align 3
.L32:
	movl	$0, (%rsi)
	movq	%r8, %r15
	xorl	%edx, %edx
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L31:
	movl	(%rdi,%rdx,4), %ecx
	imull	(%r15), %ecx
	addq	$200, %r15
	addl	%ecx, %eax
	movq	%rdx, %rcx
	addq	$1, %rdx
	movl	%eax, (%rsi)
	cmpq	%rbp, %rcx
	jne	.L31
	cltd
	addq	$4, %r8
	addq	$4, %rsi
	idivl	%r14d
	movl	%edx, -4(%rsi)
	cmpq	%r9, %r8
	jne	.L32
	addq	$50, %r10
	addq	$200, %rdi
	cmpq	%r13, %r10
	jne	.L30
	movslq	32(%rsp), %r12
	jmp	.L33
.L43:
	xorl	%eax, %eax
	jmp	.L26
.L44:
	sarl	16(%rsp)
	movslq	%eax, %r12
	jne	.L37
	jmp	.L85
.L21:
	leal	-1(%rcx), %eax
	movl	%eax, 20(%rsp)
	movl	16(%rsp), %eax
	testl	%eax, %eax
	jg	.L40
	jmp	.L20
.L84:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE25:
	.size	powMat, .-powMat
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC13:
	.string	"%d"
.LC14:
	.string	"%d%c"
.LC15:
	.string	"%d%d%d%d%d%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB26:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	-20480(%rsp), %r11
	.cfi_def_cfa 11, 20536
.LPSRL1:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL1
	.cfi_def_cfa_register 7
	subq	$168, %rsp
	.cfi_def_cfa_offset 20704
	xorl	%ebx, %ebx
	movq	%fs:40, %rax
	movq	%rax, 20632(%rsp)
	xorl	%eax, %eax
	leaq	200(%rsp), %rax
	movq	%rax, 160(%rsp)
	leaq	196(%rsp), %rax
	movq	%rax, 152(%rsp)
	leaq	192(%rsp), %rax
	movq	%rax, 144(%rsp)
	leaq	188(%rsp), %rax
	movq	%rax, 136(%rsp)
	leaq	184(%rsp), %rax
	movq	%rax, 128(%rsp)
	leaq	204(%rsp), %rax
	movq	%rax, 168(%rsp)
	.p2align 4,,10
	.p2align 3
.L87:
	subq	$8, %rsp
	.cfi_def_cfa_offset 20712
	leaq	.LC15(%rip), %rdi
	xorl	%eax, %eax
	pushq	176(%rsp)
	.cfi_def_cfa_offset 20720
	movq	176(%rsp), %r9
	movq	168(%rsp), %r8
	movq	160(%rsp), %rcx
	movq	152(%rsp), %rdx
	movq	144(%rsp), %rsi
	call	__isoc99_scanf@PLT
	popq	%rdx
	.cfi_def_cfa_offset 20712
	popq	%rcx
	.cfi_def_cfa_offset 20704
	cmpl	$6, %eax
	jne	.L104
	movl	184(%rsp), %r12d
	movl	188(%rsp), %r13d
	movl	204(%rsp), %r10d
	movl	%r12d, %eax
	orl	%r13d, %eax
	orl	192(%rsp), %eax
	orl	196(%rsp), %eax
	orl	200(%rsp), %eax
	orl	%r10d, %eax
	je	.L104
	leaq	208(%rsp), %r15
	xorl	%r14d, %r14d
	testl	%r12d, %r12d
	jle	.L89
	.p2align 4,,10
	.p2align 3
.L88:
	movq	%r15, %rsi
	leaq	.LC13(%rip), %rdi
	xorl	%eax, %eax
	addl	$1, %r14d
	call	__isoc99_scanf@PLT
	movl	184(%rsp), %r12d
	addq	$4, %r15
	cmpl	%r14d, %r12d
	jg	.L88
	movl	204(%rsp), %r10d
	movl	188(%rsp), %r13d
	testl	%r12d, %r12d
	jle	.L89
	movl	%r12d, %esi
	leaq	624(%rsp), %r9
	movl	192(%rsp), %r8d
	movl	196(%rsp), %r14d
	movl	200(%rsp), %edi
	negl	%esi
	movq	%r9, %r11
	.p2align 4,,10
	.p2align 3
.L94:
	leal	(%rsi,%r12), %eax
	movq	%r11, %rdx
	.p2align 4,,10
	.p2align 3
.L93:
	testl	%eax, %eax
	je	.L90
.L152:
	movl	%r8d, %ecx
	cmpl	$1, %eax
	je	.L91
	cmpl	$-1, %eax
	movl	%ebx, %ecx
	cmove	%edi, %ecx
.L91:
	subl	$1, %eax
	movl	%ecx, (%rdx)
	addq	$4, %rdx
	cmpl	%esi, %eax
	jne	.L93
	addq	$200, %r11
	addl	$1, %esi
	jne	.L94
	.p2align 4,,10
	.p2align 3
.L95:
	movl	%r10d, %edx
	movl	%r13d, %r8d
	movl	%r12d, %ecx
	movq	%r9, %rsi
	leaq	10624(%rsp), %r11
	leaq	416(%rsp), %r15
	movq	%r11, %rdi
	movq	%r11, (%rsp)
	leal	-1(%r12), %r14d
	call	powMat
	movl	%r12d, %edx
	xorl	%esi, %esi
	movq	%r15, %rdi
	salq	$2, %rdx
	call	memset@PLT
	movq	(%rsp), %rcx
	movl	%r12d, %esi
	movl	%r12d, %r10d
	movdqa	272(%rsp), %xmm11
	movq	%r15, %rdi
	shrl	$2, %esi
	movdqa	288(%rsp), %xmm13
	movdqa	352(%rsp), %xmm7
	andl	$-4, %r10d
	xorl	%r8d, %r8d
	movdqa	304(%rsp), %xmm15
	movdqa	320(%rsp), %xmm4
	movdqa	%xmm11, %xmm0
	movdqa	368(%rsp), %xmm5
	psrlq	$32, %xmm0
	movaps	%xmm7, 80(%rsp)
	movdqa	208(%rsp), %xmm3
	movdqa	384(%rsp), %xmm7
	movdqa	224(%rsp), %xmm6
	movaps	%xmm0, (%rsp)
	movdqa	%xmm13, %xmm0
	movdqa	240(%rsp), %xmm8
	psrlq	$32, %xmm0
	movaps	%xmm4, 48(%rsp)
	psrlq	$32, %xmm4
	movdqa	256(%rsp), %xmm9
	movaps	%xmm0, 16(%rsp)
	movdqa	%xmm15, %xmm0
	movdqa	%xmm8, %xmm10
	movdqa	336(%rsp), %xmm14
	movaps	%xmm5, 96(%rsp)
	movdqa	%xmm9, %xmm12
	movdqa	%xmm3, %xmm5
	movaps	%xmm7, 112(%rsp)
	psrlq	$32, %xmm0
	movdqa	%xmm6, %xmm7
	psrlq	$32, %xmm5
	psrlq	$32, %xmm7
	movaps	%xmm0, 32(%rsp)
	psrlq	$32, %xmm10
	psrlq	$32, %xmm12
	movaps	%xmm4, 64(%rsp)
	.p2align 4,,10
	.p2align 3
.L99:
	cmpl	$2, %r14d
	jbe	.L111
	movdqu	(%rcx), %xmm1
	movdqu	(%rcx), %xmm0
	psrlq	$32, %xmm1
	pmuludq	%xmm3, %xmm0
	pmuludq	%xmm5, %xmm1
	pshufd	$8, %xmm0, %xmm0
	pshufd	$8, %xmm1, %xmm1
	punpckldq	%xmm1, %xmm0
	cmpl	$1, %esi
	jbe	.L97
	movdqu	16(%rcx), %xmm1
	movdqu	16(%rcx), %xmm2
	psrlq	$32, %xmm1
	pmuludq	%xmm6, %xmm2
	pmuludq	%xmm7, %xmm1
	pshufd	$8, %xmm2, %xmm2
	pshufd	$8, %xmm1, %xmm1
	punpckldq	%xmm1, %xmm2
	paddd	%xmm2, %xmm0
	cmpl	$2, %esi
	je	.L97
	movdqu	32(%rcx), %xmm1
	movdqu	32(%rcx), %xmm2
	psrlq	$32, %xmm1
	pmuludq	%xmm8, %xmm2
	pmuludq	%xmm10, %xmm1
	pshufd	$8, %xmm2, %xmm2
	pshufd	$8, %xmm1, %xmm1
	punpckldq	%xmm1, %xmm2
	paddd	%xmm2, %xmm0
	cmpl	$3, %esi
	je	.L97
	movdqu	48(%rcx), %xmm1
	movdqu	48(%rcx), %xmm2
	psrlq	$32, %xmm1
	pmuludq	%xmm9, %xmm2
	pmuludq	%xmm12, %xmm1
	pshufd	$8, %xmm2, %xmm2
	pshufd	$8, %xmm1, %xmm1
	punpckldq	%xmm1, %xmm2
	paddd	%xmm2, %xmm0
	cmpl	$4, %esi
	je	.L97
	movdqu	64(%rcx), %xmm2
	movdqu	64(%rcx), %xmm1
	pmuludq	%xmm11, %xmm2
	psrlq	$32, %xmm1
	pmuludq	(%rsp), %xmm1
	pshufd	$8, %xmm1, %xmm1
	pshufd	$8, %xmm2, %xmm2
	punpckldq	%xmm1, %xmm2
	paddd	%xmm2, %xmm0
	cmpl	$5, %esi
	je	.L97
	movdqu	80(%rcx), %xmm2
	movdqu	80(%rcx), %xmm1
	pmuludq	%xmm13, %xmm2
	psrlq	$32, %xmm1
	pmuludq	16(%rsp), %xmm1
	pshufd	$8, %xmm1, %xmm1
	pshufd	$8, %xmm2, %xmm2
	punpckldq	%xmm1, %xmm2
	paddd	%xmm2, %xmm0
	cmpl	$6, %esi
	je	.L97
	movdqu	96(%rcx), %xmm2
	movdqu	96(%rcx), %xmm1
	pmuludq	%xmm15, %xmm2
	psrlq	$32, %xmm1
	pmuludq	32(%rsp), %xmm1
	pshufd	$8, %xmm1, %xmm1
	pshufd	$8, %xmm2, %xmm2
	punpckldq	%xmm1, %xmm2
	paddd	%xmm2, %xmm0
	cmpl	$7, %esi
	je	.L97
	movdqu	112(%rcx), %xmm1
	movdqu	112(%rcx), %xmm2
	pmuludq	48(%rsp), %xmm2
	pshufd	$8, %xmm2, %xmm2
	psrlq	$32, %xmm1
	pmuludq	64(%rsp), %xmm1
	pshufd	$8, %xmm1, %xmm1
	punpckldq	%xmm1, %xmm2
	paddd	%xmm2, %xmm0
	cmpl	$8, %esi
	je	.L97
	movdqu	128(%rcx), %xmm4
	movdqu	128(%rcx), %xmm1
	movdqa	%xmm14, %xmm2
	psrlq	$32, %xmm2
	psrlq	$32, %xmm4
	pmuludq	%xmm14, %xmm1
	pmuludq	%xmm4, %xmm2
	pshufd	$8, %xmm1, %xmm1
	pshufd	$8, %xmm2, %xmm2
	punpckldq	%xmm2, %xmm1
	paddd	%xmm1, %xmm0
	cmpl	$9, %esi
	je	.L97
	movdqa	80(%rsp), %xmm2
	movdqu	144(%rcx), %xmm1
	movdqu	144(%rcx), %xmm4
	pmuludq	%xmm2, %xmm1
	psrlq	$32, %xmm2
	psrlq	$32, %xmm4
	pmuludq	%xmm4, %xmm2
	pshufd	$8, %xmm1, %xmm1
	pshufd	$8, %xmm2, %xmm2
	punpckldq	%xmm2, %xmm1
	paddd	%xmm1, %xmm0
	cmpl	$10, %esi
	je	.L97
	movdqa	96(%rsp), %xmm2
	movdqu	160(%rcx), %xmm1
	movdqu	160(%rcx), %xmm4
	pmuludq	%xmm2, %xmm1
	psrlq	$32, %xmm2
	psrlq	$32, %xmm4
	pmuludq	%xmm4, %xmm2
	pshufd	$8, %xmm1, %xmm1
	pshufd	$8, %xmm2, %xmm2
	punpckldq	%xmm2, %xmm1
	paddd	%xmm1, %xmm0
	cmpl	$11, %esi
	je	.L97
	movdqa	112(%rsp), %xmm2
	movdqu	176(%rcx), %xmm1
	movdqu	176(%rcx), %xmm4
	pmuludq	%xmm2, %xmm1
	psrlq	$32, %xmm2
	psrlq	$32, %xmm4
	pmuludq	%xmm4, %xmm2
	pshufd	$8, %xmm1, %xmm1
	pshufd	$8, %xmm2, %xmm2
	punpckldq	%xmm2, %xmm1
	paddd	%xmm1, %xmm0
	.p2align 4,,10
	.p2align 3
.L97:
	movdqa	%xmm0, %xmm1
	movl	%r10d, %edx
	psrldq	$8, %xmm1
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	cmpl	%r12d, %r10d
	je	.L98
.L96:
	movslq	%r8d, %r9
	movslq	%edx, %r11
	leaq	(%r9,%r9,4), %r9
	leaq	0(,%r11,4), %r15
	leaq	(%r9,%r9,4), %r9
	movl	208(%rsp,%r15), %ebp
	addq	%r9, %r9
	addq	%r9, %r11
	imull	10624(%rsp,%r11,4), %ebp
	leal	1(%rdx), %r11d
	addl	%ebp, %eax
	cmpl	%r11d, %r12d
	jle	.L98
	movslq	%r11d, %r11
	movl	212(%rsp,%r15), %ebp
	addl	$2, %edx
	addq	%r9, %r11
	imull	10624(%rsp,%r11,4), %ebp
	addl	%ebp, %eax
	cmpl	%edx, %r12d
	jle	.L98
	movslq	%edx, %rdx
	addq	%rdx, %r9
	movl	216(%rsp,%r15), %edx
	imull	10624(%rsp,%r9,4), %edx
	addl	%edx, %eax
.L98:
	cltd
	addl	$1, %r8d
	addq	$4, %rdi
	addq	$200, %rcx
	idivl	%r13d
	movl	%edx, -4(%rdi)
	cmpl	%r8d, %r12d
	jne	.L99
.L106:
	movl	184(%rsp), %eax
	xorl	%r13d, %r13d
	leaq	416(%rsp), %r15
	leaq	.LC14(%rip), %r12
	testl	%eax, %eax
	jle	.L87
	.p2align 4,,10
	.p2align 3
.L100:
	leal	1(%r13), %edx
	movl	$10, %ecx
	cmpl	%edx, %eax
	movl	(%r15,%r13,4), %edx
	jle	.L157
	movl	$32, %ecx
.L157:
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %r13
	call	__printf_chk@PLT
	movl	184(%rsp), %eax
	cmpl	%r13d, %eax
	jg	.L100
	jmp	.L87
	.p2align 4,,10
	.p2align 3
.L90:
	movl	$-1, %eax
	movl	%r14d, (%rdx)
	addq	$4, %rdx
	cmpl	%esi, %eax
	jne	.L152
	jmp	.L95
	.p2align 4,,10
	.p2align 3
.L111:
	xorl	%eax, %eax
	xorl	%edx, %edx
	jmp	.L96
.L104:
	movq	20632(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L158
	addq	$20648, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L89:
	.cfi_restore_state
	leaq	624(%rsp), %rsi
	movl	%r13d, %r8d
	movl	%r12d, %ecx
	movl	%r10d, %edx
	leaq	10624(%rsp), %rdi
	call	powMat
	jmp	.L106
.L158:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE26:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	44
	.long	45
	.long	46
	.long	47
	.align 16
.LC1:
	.long	1
	.long	1
	.long	1
	.long	1
	.align 16
.LC2:
	.long	0
	.long	1
	.long	2
	.long	3
	.align 16
.LC3:
	.long	4
	.long	5
	.long	6
	.long	7
	.align 16
.LC4:
	.long	8
	.long	9
	.long	10
	.long	11
	.align 16
.LC5:
	.long	12
	.long	13
	.long	14
	.long	15
	.align 16
.LC6:
	.long	16
	.long	17
	.long	18
	.long	19
	.align 16
.LC7:
	.long	20
	.long	21
	.long	22
	.long	23
	.align 16
.LC8:
	.long	24
	.long	25
	.long	26
	.long	27
	.align 16
.LC9:
	.long	28
	.long	29
	.long	30
	.long	31
	.align 16
.LC10:
	.long	32
	.long	33
	.long	34
	.long	35
	.align 16
.LC11:
	.long	36
	.long	37
	.long	38
	.long	39
	.align 16
.LC12:
	.long	40
	.long	41
	.long	42
	.long	43
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

rule
	.file	"temp.c"
	.text
	.p2align 4
	.globl	mulMatVec
	.type	mulMatVec, @function
mulMatVec:
.LFB23:
	.cfi_startproc
	endbr64
	movq	%rdx, %r10
	testl	%ecx, %ecx
	jle	.L1
	leal	-1(%rcx), %eax
	movl	%ecx, %r9d
	leaq	4(%rdi,%rax,4), %r11
	.p2align 4,,10
	.p2align 3
.L4:
	movl	$0, (%rdi)
	xorl	%edx, %edx
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L3:
	movl	(%rsi,%rdx,4), %ecx
	imull	(%r10,%rdx,4), %ecx
	addq	$1, %rdx
	addl	%ecx, %eax
	movl	%eax, (%rdi)
	cmpq	%rdx, %r9
	jne	.L3
	cltd
	addq	$4, %rdi
	addq	$200, %rsi
	idivl	%r8d
	movl	%edx, -4(%rdi)
	cmpq	%r11, %rdi
	jne	.L4
.L1:
	ret
	.cfi_endproc
.LFE23:
	.size	mulMatVec, .-mulMatVec
	.p2align 4
	.globl	mulMatMat
	.type	mulMatMat, @function
mulMatMat:
.LFB24:
	.cfi_startproc
	endbr64
	movl	%ecx, %eax
	testl	%eax, %eax
	jle	.L17
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movq	%rdi, %r11
	movq	%rsi, %r9
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%rdx, %rbp
	leal	-1(%rax), %edx
	leaq	(%rax,%rax,4), %rax
	leaq	0(,%rdx,4), %rcx
	leaq	(%rax,%rax,4), %r12
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	xorl	%ebx, %ebx
	leaq	(%rcx,%rdx), %rax
	addq	%r12, %r12
	leaq	4(%rbp,%rcx), %r10
	leaq	(%rax,%rax,4), %rax
	leaq	200(%rbp,%rax,8), %r13
	.p2align 4,,10
	.p2align 3
.L11:
	movq	%r13, %r15
	movq	%rbp, %rdi
	movq	%r11, %rsi
	.p2align 4,,10
	.p2align 3
.L13:
	movl	$0, (%rsi)
	movq	%rdi, %rcx
	movq	%r9, %r14
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L12:
	movl	(%r14), %edx
	imull	(%rcx), %edx
	addq	$200, %rcx
	addq	$4, %r14
	addl	%edx, %eax
	movl	%eax, (%rsi)
	cmpq	%r15, %rcx
	jne	.L12
	cltd
	addq	$4, %rdi
	leaq	4(%rcx), %r15
	addq	$4, %rsi
	idivl	%r8d
	movl	%edx, -4(%rsi)
	cmpq	%r10, %rdi
	jne	.L13
	addq	$50, %rbx
	addq	$200, %r9
	addq	$200, %r11
	cmpq	%r12, %rbx
	jne	.L11
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L17:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	.cfi_restore 14
	.cfi_restore 15
	ret
	.cfi_endproc
.LFE24:
	.size	mulMatMat, .-mulMatMat
	.p2align 4
	.globl	powMat
	.type	powMat, @function
powMat:
.LFB25:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	-36864(%rsp), %r11
	.cfi_def_cfa 11, 36920
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$3240, %rsp
	.cfi_def_cfa_offset 40160
	movq	%rdi, 48(%rsp)
	movl	%ecx, %ebx
	movl	%r8d, %r14d
	movl	%edx, 16(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 40088(%rsp)
	xorl	%eax, %eax
	testl	%ecx, %ecx
	jle	.L21
	leal	-1(%rbx), %eax
	movl	%ebx, %r9d
	movl	%r8d, 8(%rsp)
	leaq	80(%rsp), %r15
	movl	%eax, 20(%rsp)
	movl	%ebx, %edx
	movl	%ebx, %r12d
	andl	$-4, %r9d
	movq	%r15, 24(%rsp)
	movq	%r15, %rbp
	salq	$2, %rdx
	xorl	%r13d, %r13d
	leaq	20080(%rsp), %rcx
	shrl	$2, %r12d
	movq	%rsi, %r14
	movl	%r9d, %r15d
.L22:
	movq	%rcx, %rdi
	movq	%r14, %rsi
	movq	%rdx, 32(%rsp)
	call	memcpy@PLT
	cmpl	$2, 20(%rsp)
	movq	32(%rsp), %rdx
	movdqa	.LC1(%rip), %xmm1
	movq	%rax, %rcx
	jbe	.L43
	movd	%r13d, %xmm3
	pshufd	$0, %xmm3, %xmm0
	movdqa	%xmm0, %xmm2
	pcmpeqd	.LC2(%rip), %xmm2
	pand	%xmm1, %xmm2
	movups	%xmm2, 0(%rbp)
	cmpl	$1, %r12d
	jbe	.L24
	movdqa	%xmm0, %xmm2
	pcmpeqd	.LC3(%rip), %xmm2
	pand	%xmm1, %xmm2
	movups	%xmm2, 16(%rbp)
	cmpl	$2, %r12d
	je	.L24
	movdqa	%xmm0, %xmm2
	pcmpeqd	.LC4(%rip), %xmm2
	pand	%xmm1, %xmm2
	movups	%xmm2, 32(%rbp)
	cmpl	$3, %r12d
	je	.L24
	movdqa	%xmm0, %xmm2
	pcmpeqd	.LC5(%rip), %xmm2
	pand	%xmm1, %xmm2
	movups	%xmm2, 48(%rbp)
	cmpl	$4, %r12d
	je	.L24
	movdqa	%xmm0, %xmm2
	pcmpeqd	.LC6(%rip), %xmm2
	pand	%xmm1, %xmm2
	movups	%xmm2, 64(%rbp)
	cmpl	$5, %r12d
	je	.L24
	movdqa	%xmm0, %xmm2
	pcmpeqd	.LC7(%rip), %xmm2
	pand	%xmm1, %xmm2
	movups	%xmm2, 80(%rbp)
	cmpl	$6, %r12d
	je	.L24
	movdqa	%xmm0, %xmm2
	pcmpeqd	.LC8(%rip), %xmm2
	pand	%xmm1, %xmm2
	movups	%xmm2, 96(%rbp)
	cmpl	$7, %r12d
	je	.L24
	movdqa	%xmm0, %xmm2
	pcmpeqd	.LC9(%rip), %xmm2
	pand	%xmm1, %xmm2
	movups	%xmm2, 112(%rbp)
	cmpl	$8, %r12d
	je	.L24
	movdqa	%xmm0, %xmm2
	pcmpeqd	.LC10(%rip), %xmm2
	pand	%xmm1, %xmm2
	movups	%xmm2, 128(%rbp)
	cmpl	$9, %r12d
	je	.L24
	movdqa	%xmm0, %xmm2
	pcmpeqd	.LC11(%rip), %xmm2
	pand	%xmm1, %xmm2
	movups	%xmm2, 144(%rbp)
	cmpl	$10, %r12d
	je	.L24
	movdqa	%xmm0, %xmm2
	pcmpeqd	.LC12(%rip), %xmm2
	pand	%xmm1, %xmm2
	movups	%xmm2, 160(%rbp)
	cmpl	$11, %r12d
	je	.L24
	pcmpeqd	.LC0(%rip), %xmm0
	pand	%xmm1, %xmm0
	movups	%xmm0, 176(%rbp)
.L24:
	movl	%r15d, %eax
	cmpl	%ebx, %r15d
	je	.L23
.L26:
	movslq	%r13d, %rsi
	movslq	%eax, %rdi
	xorl	%r10d, %r10d
	leaq	(%rsi,%rsi,4), %rsi
	leaq	(%rsi,%rsi,4), %rsi
	addq	%rsi, %rsi
	addq	%rsi, %rdi
	cmpl	%r13d, %eax
	sete	%r10b
	movl	%r10d, 80(%rsp,%rdi,4)
	leal	1(%rax), %r10d
	cmpl	%r10d, %ebx
	jle	.L23
	movslq	%r10d, %rdi
	addq	%rsi, %rdi
	cmpl	%r10d, %r13d
	sete	%r10b
	addl	$2, %eax
	movzbl	%r10b, %r10d
	movl	%r10d, 80(%rsp,%rdi,4)
	cmpl	%eax, %ebx
	jle	.L23
	movslq	%eax, %rdi
	addq	%rdi, %rsi
	cmpl	%eax, %r13d
	sete	%al
	movzbl	%al, %eax
	movl	%eax, 80(%rsp,%rsi,4)
.L23:
	addl	$1, %r13d
	addq	$200, %rcx
	addq	$200, %r14
	addq	$200, %rbp
	cmpl	%r13d, %ebx
	jne	.L22
	movl	16(%rsp), %edx
	movl	8(%rsp), %r14d
	xorl	%eax, %eax
	movq	24(%rsp), %r15
	testl	%edx, %edx
	jle	.L41
.L40:
	leaq	20080(%rsp), %rax
	movl	20(%rsp), %ebp
	movl	$0, 24(%rsp)
	xorl	%r12d, %r12d
	movq	%rax, 40(%rsp)
	leaq	80(%rsp), %rax
	movq	%rax, 56(%rsp)
	leaq	5(%rbp,%rbp,4), %rax
	leaq	(%rax,%rax,4), %rax
	addq	%rax, %rax
	movq	%rax, 64(%rsp)
	leaq	20084(%rsp), %rax
	movq	%rax, 72(%rsp)
.L37:
	movl	24(%rsp), %edi
	movl	$1, %eax
	subl	%edi, %eax
	movslq	%edi, %r11
	movl	%eax, 24(%rsp)
	testb	$1, 16(%rsp)
	jne	.L83
	testl	%ebx, %ebx
	jle	.L29
.L33:
	movslq	24(%rsp), %rax
	imulq	$10000, %r11, %r13
	xorl	%r10d, %r10d
	addq	40(%rsp), %r13
	movq	%r13, %rdi
	subq	%r11, %rax
	imulq	$10000, %rax, %r11
	.p2align 4,,10
	.p2align 3
.L36:
	leaq	(%rdi,%r11), %rsi
	movq	%r13, %r9
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L35:
	movl	$0, (%rsi)
	movq	%r9, %r15
	xorl	%edx, %edx
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L34:
	movl	(%rdi,%rdx,4), %ecx
	imull	(%r15), %ecx
	addq	$1, %rdx
	addq	$200, %r15
	addl	%ecx, %eax
	movl	%eax, (%rsi)
	cmpl	%edx, %ebx
	jg	.L34
	cltd
	addl	$1, %r8d
	addq	$4, %rsi
	addq	$4, %r9
	idivl	%r14d
	movl	%edx, -4(%rsi)
	cmpl	%r8d, %ebx
	jg	.L35
	addl	$1, %r10d
	addq	$200, %rdi
	cmpl	%r10d, %ebx
	jg	.L36
.L29:
	sarl	16(%rsp)
	jne	.L37
.L85:
	movl	%r12d, %eax
	testl	%ebx, %ebx
	jle	.L20
	leaq	80(%rsp), %r15
.L41:
	movslq	%eax, %rbp
	movl	20(%rsp), %eax
	movq	48(%rsp), %rcx
	imulq	$10000, %rbp, %rbp
	leaq	4(,%rax,4), %r13
	movl	$4, %eax
	addq	%r15, %rbp
	testl	%ebx, %ebx
	cmovle	%rax, %r13
	xorl	%r12d, %r12d
.L39:
	movq	%rbp, %rsi
	movq	%rcx, %rdi
	movq	%r13, %rdx
	call	memcpy@PLT
	addl	$1, %r12d
	addq	$200, %rbp
	movq	%rax, %rcx
	addq	$200, %rcx
	cmpl	%r12d, %ebx
	jg	.L39
.L20:
	movq	40088(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L84
	addq	$40104, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L83:
	.cfi_restore_state
	movl	$1, %eax
	subl	%r12d, %eax
	movl	%eax, 32(%rsp)
	testl	%ebx, %ebx
	jle	.L44
	cltq
	imulq	$10000, %r12, %rdi
	movq	64(%rsp), %rsi
	addq	56(%rsp), %rdi
	subq	%r12, %rax
	imulq	$-2500, %r12, %r10
	imulq	$10000, %rax, %r12
	imulq	$10000, %r11, %rax
	addq	40(%rsp), %rax
	movq	%rax, 8(%rsp)
	imulq	$2500, %r11, %rax
	leaq	(%rsi,%r10), %r13
	movq	72(%rsp), %rsi
	addq	%rbp, %rax
	leaq	(%rsi,%rax,4), %r9
.L30:
	movq	8(%rsp), %r8
	leaq	(%rdi,%r12), %rsi
	.p2align 4,,10
	.p2align 3
.L32:
	movl	$0, (%rsi)
	movq	%r8, %r15
	xorl	%edx, %edx
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L31:
	movl	(%rdi,%rdx,4), %ecx
	imull	(%r15), %ecx
	addq	$200, %r15
	addl	%ecx, %eax
	movq	%rdx, %rcx
	addq	$1, %rdx
	movl	%eax, (%rsi)
	cmpq	%rbp, %rcx
	jne	.L31
	cltd
	addq	$4, %r8
	addq	$4, %rsi
	idivl	%r14d
	movl	%edx, -4(%rsi)
	cmpq	%r9, %r8
	jne	.L32
	addq	$50, %r10
	addq	$200, %rdi
	cmpq	%r13, %r10
	jne	.L30
	movslq	32(%rsp), %r12
	jmp	.L33
.L43:
	xorl	%eax, %eax
	jmp	.L26
.L44:
	sarl	16(%rsp)
	movslq	%eax, %r12
	jne	.L37
	jmp	.L85
.L21:
	leal	-1(%rcx), %eax
	movl	%eax, 20(%rsp)
	movl	16(%rsp), %eax
	testl	%eax, %eax
	jg	.L40
	jmp	.L20
.L84:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE25:
	.size	powMat, .-powMat
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC13:
	.string	"%d"
.LC14:
	.string	"%d%c"
.LC15:
	.string	"%d%d%d%d%d%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB26:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	-20480(%rsp), %r11
	.cfi_def_cfa 11, 20536
.LPSRL1:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL1
	.cfi_def_cfa_register 7
	subq	$168, %rsp
	.cfi_def_cfa_offset 20704
	xorl	%ebx, %ebx
	movq	%fs:40, %rax
	movq	%rax, 20632(%rsp)
	xorl	%eax, %eax
	leaq	200(%rsp), %rax
	movq	%rax, 160(%rsp)
	leaq	196(%rsp), %rax
	movq	%rax, 152(%rsp)
	leaq	192(%rsp), %rax
	movq	%rax, 144(%rsp)
	leaq	188(%rsp), %rax
	movq	%rax, 136(%rsp)
	leaq	184(%rsp), %rax
	movq	%rax, 128(%rsp)
	leaq	204(%rsp), %rax
	movq	%rax, 168(%rsp)
	.p2align 4,,10
	.p2align 3
.L87:
	subq	$8, %rsp
	.cfi_def_cfa_offset 20712
	leaq	.LC15(%rip), %rdi
	xorl	%eax, %eax
	pushq	176(%rsp)
	.cfi_def_cfa_offset 20720
	movq	176(%rsp), %r9
	movq	168(%rsp), %r8
	movq	160(%rsp), %rcx
	movq	152(%rsp), %rdx
	movq	144(%rsp), %rsi
	call	__isoc99_scanf@PLT
	popq	%rdx
	.cfi_def_cfa_offset 20712
	popq	%rcx
	.cfi_def_cfa_offset 20704
	cmpl	$6, %eax
	jne	.L104
	movl	184(%rsp), %r12d
	movl	188(%rsp), %r13d
	movl	204(%rsp), %r10d
	movl	%r12d, %eax
	orl	%r13d, %eax
	orl	192(%rsp), %eax
	orl	196(%rsp), %eax
	orl	200(%rsp), %eax
	orl	%r10d, %eax
	je	.L104
	leaq	208(%rsp), %r15
	xorl	%r14d, %r14d
	testl	%r12d, %r12d
	jle	.L89
	.p2align 4,,10
	.p2align 3
.L88:
	movq	%r15, %rsi
	leaq	.LC13(%rip), %rdi
	xorl	%eax, %eax
	addl	$1, %r14d
	call	__isoc99_scanf@PLT
	movl	184(%rsp), %r12d
	addq	$4, %r15
	cmpl	%r14d, %r12d
	jg	.L88
	movl	204(%rsp), %r10d
	movl	188(%rsp), %r13d
	testl	%r12d, %r12d
	jle	.L89
	movl	%r12d, %esi
	leaq	624(%rsp), %r9
	movl	192(%rsp), %r8d
	movl	196(%rsp), %r14d
	movl	200(%rsp), %edi
	negl	%esi
	movq	%r9, %r11
	.p2align 4,,10
	.p2align 3
.L94:
	leal	(%rsi,%r12), %eax
	movq	%r11, %rdx
	.p2align 4,,10
	.p2align 3
.L93:
	testl	%eax, %eax
	je	.L90
.L152:
	movl	%r8d, %ecx
	cmpl	$1, %eax
	je	.L91
	cmpl	$-1, %eax
	movl	%ebx, %ecx
	cmove	%edi, %ecx
.L91:
	subl	$1, %eax
	movl	%ecx, (%rdx)
	addq	$4, %rdx
	cmpl	%esi, %eax
	jne	.L93
	addq	$200, %r11
	addl	$1, %esi
	jne	.L94
	.p2align 4,,10
	.p2align 3
.L95:
	movl	%r10d, %edx
	movl	%r13d, %r8d
	movl	%r12d, %ecx
	movq	%r9, %rsi
	leaq	10624(%rsp), %r11
	leaq	416(%rsp), %r15
	movq	%r11, %rdi
	movq	%r11, (%rsp)
	leal	-1(%r12), %r14d
	call	powMat
	movl	%r12d, %edx
	xorl	%esi, %esi
	movq	%r15, %rdi
	salq	$2, %rdx
	call	memset@PLT
	movq	(%rsp), %rcx
	movl	%r12d, %esi
	movl	%r12d, %r10d
	movdqa	272(%rsp), %xmm11
	movq	%r15, %rdi
	shrl	$2, %esi
	movdqa	288(%rsp), %xmm13
	movdqa	352(%rsp), %xmm7
	andl	$-4, %r10d
	xorl	%r8d, %r8d
	movdqa	304(%rsp), %xmm15
	movdqa	320(%rsp), %xmm4
	movdqa	%xmm11, %xmm0
	movdqa	368(%rsp), %xmm5
	psrlq	$32, %xmm0
	movaps	%xmm7, 80(%rsp)
	movdqa	208(%rsp), %xmm3
	movdqa	384(%rsp), %xmm7
	movdqa	224(%rsp), %xmm6
	movaps	%xmm0, (%rsp)
	movdqa	%xmm13, %xmm0
	movdqa	240(%rsp), %xmm8
	psrlq	$32, %xmm0
	movaps	%xmm4, 48(%rsp)
	psrlq	$32, %xmm4
	movdqa	256(%rsp), %xmm9
	movaps	%xmm0, 16(%rsp)
	movdqa	%xmm15, %xmm0
	movdqa	%xmm8, %xmm10
	movdqa	336(%rsp), %xmm14
	movaps	%xmm5, 96(%rsp)
	movdqa	%xmm9, %xmm12
	movdqa	%xmm3, %xmm5
	movaps	%xmm7, 112(%rsp)
	psrlq	$32, %xmm0
	movdqa	%xmm6, %xmm7
	psrlq	$32, %xmm5
	psrlq	$32, %xmm7
	movaps	%xmm0, 32(%rsp)
	psrlq	$32, %xmm10
	psrlq	$32, %xmm12
	movaps	%xmm4, 64(%rsp)
	.p2align 4,,10
	.p2align 3
.L99:
	cmpl	$2, %r14d
	jbe	.L111
	movdqu	(%rcx), %xmm1
	movdqu	(%rcx), %xmm0
	psrlq	$32, %xmm1
	pmuludq	%xmm3, %xmm0
	pmuludq	%xmm5, %xmm1
	pshufd	$8, %xmm0, %xmm0
	pshufd	$8, %xmm1, %xmm1
	punpckldq	%xmm1, %xmm0
	cmpl	$1, %esi
	jbe	.L97
	movdqu	16(%rcx), %xmm1
	movdqu	16(%rcx), %xmm2
	psrlq	$32, %xmm1
	pmuludq	%xmm6, %xmm2
	pmuludq	%xmm7, %xmm1
	pshufd	$8, %xmm2, %xmm2
	pshufd	$8, %xmm1, %xmm1
	punpckldq	%xmm1, %xmm2
	paddd	%xmm2, %xmm0
	cmpl	$2, %esi
	je	.L97
	movdqu	32(%rcx), %xmm1
	movdqu	32(%rcx), %xmm2
	psrlq	$32, %xmm1
	pmuludq	%xmm8, %xmm2
	pmuludq	%xmm10, %xmm1
	pshufd	$8, %xmm2, %xmm2
	pshufd	$8, %xmm1, %xmm1
	punpckldq	%xmm1, %xmm2
	paddd	%xmm2, %xmm0
	cmpl	$3, %esi
	je	.L97
	movdqu	48(%rcx), %xmm1
	movdqu	48(%rcx), %xmm2
	psrlq	$32, %xmm1
	pmuludq	%xmm9, %xmm2
	pmuludq	%xmm12, %xmm1
	pshufd	$8, %xmm2, %xmm2
	pshufd	$8, %xmm1, %xmm1
	punpckldq	%xmm1, %xmm2
	paddd	%xmm2, %xmm0
	cmpl	$4, %esi
	je	.L97
	movdqu	64(%rcx), %xmm2
	movdqu	64(%rcx), %xmm1
	pmuludq	%xmm11, %xmm2
	psrlq	$32, %xmm1
	pmuludq	(%rsp), %xmm1
	pshufd	$8, %xmm1, %xmm1
	pshufd	$8, %xmm2, %xmm2
	punpckldq	%xmm1, %xmm2
	paddd	%xmm2, %xmm0
	cmpl	$5, %esi
	je	.L97
	movdqu	80(%rcx), %xmm2
	movdqu	80(%rcx), %xmm1
	pmuludq	%xmm13, %xmm2
	psrlq	$32, %xmm1
	pmuludq	16(%rsp), %xmm1
	pshufd	$8, %xmm1, %xmm1
	pshufd	$8, %xmm2, %xmm2
	punpckldq	%xmm1, %xmm2
	paddd	%xmm2, %xmm0
	cmpl	$6, %esi
	je	.L97
	movdqu	96(%rcx), %xmm2
	movdqu	96(%rcx), %xmm1
	pmuludq	%xmm15, %xmm2
	psrlq	$32, %xmm1
	pmuludq	32(%rsp), %xmm1
	pshufd	$8, %xmm1, %xmm1
	pshufd	$8, %xmm2, %xmm2
	punpckldq	%xmm1, %xmm2
	paddd	%xmm2, %xmm0
	cmpl	$7, %esi
	je	.L97
	movdqu	112(%rcx), %xmm1
	movdqu	112(%rcx), %xmm2
	pmuludq	48(%rsp), %xmm2
	pshufd	$8, %xmm2, %xmm2
	psrlq	$32, %xmm1
	pmuludq	64(%rsp), %xmm1
	pshufd	$8, %xmm1, %xmm1
	punpckldq	%xmm1, %xmm2
	paddd	%xmm2, %xmm0
	cmpl	$8, %esi
	je	.L97
	movdqu	128(%rcx), %xmm4
	movdqu	128(%rcx), %xmm1
	movdqa	%xmm14, %xmm2
	psrlq	$32, %xmm2
	psrlq	$32, %xmm4
	pmuludq	%xmm14, %xmm1
	pmuludq	%xmm4, %xmm2
	pshufd	$8, %xmm1, %xmm1
	pshufd	$8, %xmm2, %xmm2
	punpckldq	%xmm2, %xmm1
	paddd	%xmm1, %xmm0
	cmpl	$9, %esi
	je	.L97
	movdqa	80(%rsp), %xmm2
	movdqu	144(%rcx), %xmm1
	movdqu	144(%rcx), %xmm4
	pmuludq	%xmm2, %xmm1
	psrlq	$32, %xmm2
	psrlq	$32, %xmm4
	pmuludq	%xmm4, %xmm2
	pshufd	$8, %xmm1, %xmm1
	pshufd	$8, %xmm2, %xmm2
	punpckldq	%xmm2, %xmm1
	paddd	%xmm1, %xmm0
	cmpl	$10, %esi
	je	.L97
	movdqa	96(%rsp), %xmm2
	movdqu	160(%rcx), %xmm1
	movdqu	160(%rcx), %xmm4
	pmuludq	%xmm2, %xmm1
	psrlq	$32, %xmm2
	psrlq	$32, %xmm4
	pmuludq	%xmm4, %xmm2
	pshufd	$8, %xmm1, %xmm1
	pshufd	$8, %xmm2, %xmm2
	punpckldq	%xmm2, %xmm1
	paddd	%xmm1, %xmm0
	cmpl	$11, %esi
	je	.L97
	movdqa	112(%rsp), %xmm2
	movdqu	176(%rcx), %xmm1
	movdqu	176(%rcx), %xmm4
	pmuludq	%xmm2, %xmm1
	psrlq	$32, %xmm2
	psrlq	$32, %xmm4
	pmuludq	%xmm4, %xmm2
	pshufd	$8, %xmm1, %xmm1
	pshufd	$8, %xmm2, %xmm2
	punpckldq	%xmm2, %xmm1
	paddd	%xmm1, %xmm0
	.p2align 4,,10
	.p2align 3
.L97:
	movdqa	%xmm0, %xmm1
	movl	%r10d, %edx
	psrldq	$8, %xmm1
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	cmpl	%r12d, %r10d
	je	.L98
.L96:
	movslq	%r8d, %r9
	movslq	%edx, %r11
	leaq	(%r9,%r9,4), %r9
	leaq	0(,%r11,4), %r15
	leaq	(%r9,%r9,4), %r9
	movl	208(%rsp,%r15), %ebp
	addq	%r9, %r9
	addq	%r9, %r11
	imull	10624(%rsp,%r11,4), %ebp
	leal	1(%rdx), %r11d
	addl	%ebp, %eax
	cmpl	%r11d, %r12d
	jle	.L98
	movslq	%r11d, %r11
	movl	212(%rsp,%r15), %ebp
	addl	$2, %edx
	addq	%r9, %r11
	imull	10624(%rsp,%r11,4), %ebp
	addl	%ebp, %eax
	cmpl	%edx, %r12d
	jle	.L98
	movslq	%edx, %rdx
	addq	%rdx, %r9
	movl	216(%rsp,%r15), %edx
	imull	10624(%rsp,%r9,4), %edx
	addl	%edx, %eax
.L98:
	cltd
	addl	$1, %r8d
	addq	$4, %rdi
	addq	$200, %rcx
	idivl	%r13d
	movl	%edx, -4(%rdi)
	cmpl	%r8d, %r12d
	jne	.L99
.L106:
	movl	184(%rsp), %eax
	xorl	%r13d, %r13d
	leaq	416(%rsp), %r15
	leaq	.LC14(%rip), %r12
	testl	%eax, %eax
	jle	.L87
	.p2align 4,,10
	.p2align 3
.L100:
	leal	1(%r13), %edx
	movl	$10, %ecx
	cmpl	%edx, %eax
	movl	(%r15,%r13,4), %edx
	jle	.L157
	movl	$32, %ecx
.L157:
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %r13
	call	__printf_chk@PLT
	movl	184(%rsp), %eax
	cmpl	%r13d, %eax
	jg	.L100
	jmp	.L87
	.p2align 4,,10
	.p2align 3
.L90:
	movl	$-1, %eax
	movl	%r14d, (%rdx)
	addq	$4, %rdx
	cmpl	%esi, %eax
	jne	.L152
	jmp	.L95
	.p2align 4,,10
	.p2align 3
.L111:
	xorl	%eax, %eax
	xorl	%edx, %edx
	jmp	.L96
.L104:
	movq	20632(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L158
	addq	$20648, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L89:
	.cfi_restore_state
	leaq	624(%rsp), %rsi
	movl	%r13d, %r8d
	movl	%r12d, %ecx
	movl	%r10d, %edx
	leaq	10624(%rsp), %rdi
	call	powMat
	jmp	.L106
.L158:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE26:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	44
	.long	45
	.long	46
	.long	47
	.align 16
.LC1:
	.long	1
	.long	1
	.long	1
	.long	1
	.align 16
.LC2:
	.long	0
	.long	1
	.long	2
	.long	3
	.align 16
.LC3:
	.long	4
	.long	5
	.long	6
	.long	7
	.align 16
.LC4:
	.long	8
	.long	9
	.long	10
	.long	11
	.align 16
.LC5:
	.long	12
	.long	13
	.long	14
	.long	15
	.align 16
.LC6:
	.long	16
	.long	17
	.long	18
	.long	19
	.align 16
.LC7:
	.long	20
	.long	21
	.long	22
	.long	23
	.align 16
.LC8:
	.long	24
	.long	25
	.long	26
	.long	27
	.align 16
.LC9:
	.long	28
	.long	29
	.long	30
	.long	31
	.align 16
.LC10:
	.long	32
	.long	33
	.long	34
	.long	35
	.align 16
.LC11:
	.long	36
	.long	37
	.long	38
	.long	39
	.align 16
.LC12:
	.long	40
	.long	41
	.long	42
	.long	43
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

#include <stdio.h>

typedef struct {
	int m[50][50];
} MATRIX;

void mulMatVec(int out[50],const MATRIX* m,const int v[50],int n,int modBy) {
	int i,j;
	for(i=0;i<n;i++) {
		out[i]=0;
		for(j=0;j<n;j++) {
			out[i]+=m->m[i][j]*v[j];
		}
		out[i]%=modBy;
	}
}

void mulMatMat(MATRIX* out,const MATRIX* x,const MATRIX* y,int n,int modBy) {
	int i,j,k;
	for(i=0;i<n;i++) {
		for(j=0;j<n;j++) {
			out->m[i][j]=0;
			for(k=0;k<n;k++)out->m[i][j]+=x->m[i][k]*y->m[k][j];
			out->m[i][j]%=modBy;
		}
	}
}

void powMat(MATRIX* out,const MATRIX* in,int powNum,int n,int modBy) {
	MATRIX resultBuf[2];
	MATRIX mulBuf[2];
	int i,j;
	int resultNo=0;
	int mulNo=0;
	for(i=0;i<n;i++) {
		for(j=0;j<n;j++) {
			mulBuf[0].m[i][j]=in->m[i][j];
			resultBuf[0].m[i][j]=(i==j?1:0);
		}
	}
	while(powNum>0) {
		if(powNum&1) {
			mulMatMat(&resultBuf[1-resultNo],
				&resultBuf[resultNo],&mulBuf[mulNo],n,modBy);
			resultNo=1-resultNo;
		}
		mulMatMat(&mulBuf[1-mulNo],&mulBuf[mulNo],&mulBuf[mulNo],n,modBy);
		mulNo=1-mulNo;
		powNum>>=1;
	}
	for(i=0;i<n;i++) {
		for(j=0;j<n;j++)out->m[i][j]=resultBuf[resultNo].m[i][j];
	}
}

int main(void) {
	int N,M,A,B,C,T;
	while(scanf("%d%d%d%d%d%d",&N,&M,&A,&B,&C,&T)==6 && (N|M|A|B|C|T)!=0) {
		MATRIX automaton;
		MATRIX automatonStatus;
		int initialStatus[50];
		int resultStatus[50];
		int i,j;
		for(i=0;i<N;i++)scanf("%d",&initialStatus[i]);
		for(i=0;i<N;i++) {
			for(j=0;j<N;j++) {
				switch(i-j) {
					case  1: automaton.m[i][j]=A;break;
					case  0: automaton.m[i][j]=B;break;
					case -1: automaton.m[i][j]=C;break;
					default: automaton.m[i][j]=0;break;
				}
			}
		}
		powMat(&automatonStatus,&automaton,T,N,M);
		mulMatVec(resultStatus,&automatonStatus,initialStatus,N,M);
		for(i=0;i<N;i++) {
			printf("%d%c",resultStatus[i],i+1<N?' ':'\n');
		}
	}
	return 0;
}
5 4 1 3 2 0
0 1 2 0 1
5 7 1 3 2 0
0 1 2 0 1
5 13 1 3 2 11
0 1 2 0 1
5 5 2 0 1 100
0 1 2 0 1
6 6 0 2 3 1000
0 1 2 0 1 4
20 1000 0 2 3 1000000000
0 1 2 0 1 0 1 2 0 1 0 1 2 0 1 0 1 2 0 1
30 2 1 0 1 1000000000
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
30 2 1 1 1 1000000000
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
30 5 2 3 1 1000000000
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0
 5 4 1 3 2 0
0 1 2 0 1
5 7 1 3 2 0
0 1 2 0 1
5 13 1 3 2 11
0 1 2 0 1
5 5 2 0 1 100
0 1 2 0 1
6 6 0 2 3 1000
0 1 2 0 1 4
20 1000 0 2 3 1000000000
0 1 2 0 1 0 1 2 0 1 0 1 2 0 1 0 1 2 0 1
30 2 1 0 1 1000000000
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
30 2 1 1 1 1000000000
1 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
30 5 2 3 1 1000000000
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0
 5 4 1 3 3 0
0 1 2 0 1
5 7 1 3 2 0
0 1 2 0 1
5 13 1 3 2 11
0 1 2 0 1
5 5 2 0 1 100
0 1 2 0 1
6 6 0 2 3 1000
0 1 2 0 1 4
20 1000 0 2 3 1000000000
0 1 2 0 1 0 1 2 0 1 0 1 2 0 1 0 1 2 0 1
30 2 1 0 1 1000000000
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
30 2 1 1 1 1000000000
1 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0
30 5 2 3 1 1000000000
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0
 5 4 1 3 3 0
0 1 2 0 1
5 7 1 3 2 0
0 1 2 0 1
5 13 1 3 2 11
0 1 2 0 1
5 5 2 0 1 100
0 1 2 0 1
6 6 0 2 3 1000
0 1 2 0 1 4
20 1000 0 2 3 1000000000
0 1 2 0 1 0 1 2 0 1 0 1 2 0 1 0 1 2 0 1
30 2 1 0 1 1000000000
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
30 2 1 1 1 1000000000
1 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0
30 5 2 3 1 1000000000
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 -1 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0
 5 4 1 3 3 0
0 1 2 0 1
5 7 1 3 2 0
0 1 2 0 1
5 13 1 3 2 11
0 1 2 0 1
5 5 2 0 1 100
0 1 2 0 1
6 6 0 2 3 1000
0 1 2 0 1 4
20 1000 0 2 3 1000000000
0 1 2 0 1 0 1 2 0 1 0 1 2 0 1 0 1 2 0 1
30 2 1 0 1 1000000000
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
30 2 1 1 1 1000000000
1 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 -1 0 0
30 5 2 3 1 1000000000
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 -1 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0
 5 4 1 3 3 0
0 1 2 0 1
5 7 1 3 2 0
0 1 2 0 1
5 13 1 3 2 11
0 1 2 0 1
5 5 2 0 1 100
0 1 2 0 1
6 6 0 2 3 1000
0 1 2 0 1 4
20 1000 0 2 3 1000000000
0 1 2 0 1 0 1 2 0 1 0 1 2 0 1 0 1 2 0 1
30 2 1 0 1 1000000000
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
30 2 2 1 1 1000000000
1 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 -1 0 0
30 5 2 3 1 1000000000
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 -1 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0
 5 4 1 3 3 0
0 1 2 0 1
5 7 1 3 2 0
0 1 2 0 1
5 13 1 3 2 11
0 1 2 0 1
5 5 2 0 1 100
0 1 2 0 1
6 6 0 2 3 1000
0 0 2 0 1 4
20 1000 0 2 3 1000000000
0 1 2 0 1 0 1 2 0 1 0 1 2 0 1 0 1 2 0 1
30 2 1 0 1 1000000000
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
30 2 2 1 1 1000000000
1 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 -1 0 0
30 5 2 3 1 1000000000
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 -1 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0
 5 4 1 3 2 0
0 1 2 0 1
5 7 1 3 2 1
0 1 2 0 1
5 13 1 3 2 11
0 1 2 0 1
5 5 2 0 1 100
0 1 2 0 1
6 6 0 2 3 1000
0 1 2 0 1 4
20 1000 0 2 3 1000000000
0 1 2 0 1 0 1 2 0 1 0 1 2 0 1 0 1 2 0 1
30 2 1 0 1 1000000000
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
30 2 1 1 1 1000000000
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
30 5 2 3 1 1000000000
0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0
 5 4 1 3 2 0
0 1 2 0 1
5 7 1 3 2 0
0 1 2 0 1
5 13 1 3 2 11
0 1 2 0 1
5 5 2 0 1 100
0 1 2 0 1
6 6 0 2 3 1000
0 1 2 0 1 4
20 1000 0 2 3 1000000000
0 1 2 0 1 0 1 2 0 1 0 1 2 0 1 0 1 2 0 1
30 2 1 0 1 1000000000
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
30 2 1 1 1 1000000000
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
30 5 2 3 1 1000000000
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0
 5 4 1 3 2 0
0 1 2 0 1
5 7 1 3 2 0
0 1 2 0 1
5 13 1 5 2 11
0 1 2 0 1
5 5 2 0 1 100
0 1 2 0 1
6 6 0 2 3 1000
0 1 2 0 1 4
20 1000 0 2 3 1000000000
0 1 2 0 1 0 1 2 0 1 0 1 2 0 1 0 1 2 0 1
30 2 1 0 1 1000000000
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
30 2 1 1 1 1000000000
1 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
30 5 2 3 1 1000000000
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0

0 1 2 0 1
0 1 2 0 1
2 12 10 9 11
3 0 4 2 1
0 4 2 0 4 4
0 376 752 0 376 0 376 752 0 376 0 376 752 0 376 0 376 752 0 376
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0
1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
1 1 3 2 2 2 3 3 1 4 3 1 2 3 0 4 3 3 0 4 2 2 2 2 1 1 2 1 3 0
 0 1 2 0 1
0 1 2 0 1
2 12 10 9 11
3 0 4 2 1
0 4 2 0 4 4
0 376 752 0 376 0 376 752 0 376 0 376 752 0 376 0 376 752 0 376
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0
1 0 0 -1 0 0 0 0 0 0 0 -1 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 -1 0 0
1 1 3 2 2 2 3 3 1 4 3 1 2 3 0 4 3 3 0 4 2 2 2 2 1 1 2 1 3 0
 0 1 2 0 1
0 1 2 0 1
2 12 10 9 11
3 0 4 2 1
0 4 2 0 4 4
0 376 752 0 376 0 376 752 0 376 0 376 752 0 376 0 376 752 0 376
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0
1 0 0 -1 0 0 0 -1 0 0 0 -1 0 0 1 0 1 0 0 0 0 -1 0 -1 0 0 0 -1 0 0
1 1 3 2 2 2 3 3 1 4 3 1 2 3 0 4 3 3 0 4 2 2 2 2 1 1 2 1 3 0
 0 1 2 0 1
0 1 2 0 1
2 12 10 9 11
3 0 4 2 1
0 4 2 0 4 4
0 376 752 0 376 0 376 752 0 376 0 376 752 0 376 0 376 752 0 376
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0
1 0 0 -1 0 0 0 -1 0 0 0 -1 0 0 1 0 1 0 0 0 0 -1 0 -1 0 0 0 -1 0 0
1 1 3 1 1 -1 1 1 -1 1 0 0 -2 0 -1 2 0 3 -4 1 -1 2 -2 0 -1 -3 -2 -1 3 -1
 0 1 2 0 1
0 1 2 0 1
2 12 10 9 11
3 0 4 2 1
0 4 2 0 4 4
0 376 752 0 376 0 376 752 0 376 0 376 752 0 376 0 376 752 0 376
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0
1 0 0 -1 0 0 0 -1 0 0 0 0 0 0 1 0 1 -1 0 0 0 -1 0 -1 0 0 0 0 0 0
1 1 3 1 1 -1 1 1 -1 1 0 0 -2 0 -1 2 0 3 -4 1 -1 2 -2 0 -1 -3 -2 -1 3 -1
 0 1 2 0 1
0 1 2 0 1
2 12 10 9 11
3 0 4 2 1
0 4 2 0 4 4
0 376 752 0 376 0 376 752 0 376 0 376 752 0 376 0 376 752 0 376
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0
1 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 -1 0 0
1 1 3 1 1 -1 1 1 -1 1 0 0 -2 0 -1 2 0 3 -4 1 -1 2 -2 0 -1 -3 -2 -1 3 -1
 0 1 2 0 1
0 1 2 0 1
2 12 10 9 11
3 0 4 2 1
0 0 2 0 4 4
0 376 752 0 376 0 376 752 0 376 0 376 752 0 376 0 376 752 0 376
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0
1 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 -1 0 0
1 1 3 1 1 -1 1 1 -1 1 0 0 -2 0 -1 2 0 3 -4 1 -1 2 -2 0 -1 -3 -2 -1 3 -1
 0 1 2 0 1
2 0 0 4 3
2 12 10 9 11
3 0 4 2 1
0 4 2 0 4 4
0 376 752 0 376 0 376 752 0 376 0 376 752 0 376 0 376 752 0 376
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0
1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
-2 1 3 0 1 -1 0 -1 -2 1 3 -3 -2 0 -4 2 0 2 0 4 2 2 2 2 1 1 2 1 3 0
 0 1 2 0 1
0 1 2 0 1
2 12 10 9 11
3 0 4 2 1
0 4 2 0 4 4
0 376 752 0 376 0 376 752 0 376 0 376 752 0 376 0 376 752 0 376
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0
1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
1 1 4 3 0 4 0 0 4 2 4 0 0 4 2 2 3 2 3 2 2 1 4 4 3 3 2 1 2 4
 0 1 2 0 1
0 1 2 0 1
1 6 5 4 12
3 0 4 2 1
0 4 2 0 4 4
0 376 752 0 376 0 376 752 0 376 0 376 752 0 376 0 376 752 0 376
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0
1 0 0 -1 0 0 0 0 0 0 0 -1 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 -1 0 0
1 1 3 2 2 2 3 3 1 4 3 1 2 3 0 4 3 3 0 4 2 2 2 2 1 1 2 1 3 0

Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>

typedef struct {
	int m[50][50];
} MATRIX;

void mulMatVec(int out[50],const MATRIX* m,const int v[50],int n,int modBy) {
	int i,j;
	for(i=0;i<n;i++) {
		out[i]=0;
		for(j=0;j<n;j++) {
			out[i]+=m->m[i][j]*v[j];
		}
		out[i]%=modBy;
	}
}

void mulMatMat(MATRIX* out,const MATRIX* x,const MATRIX* y,int n,int modBy) {
	int i,j,k;
	for(i=0;i<n;i++) {
		for(j=0;j<n;j++) {
			out->m[i][j]=0;
			for(k=0;k<n;k++)out->m[i][j]+=x->m[i][k]*y->m[k][j];
			out->m[i][j]%=modBy;
		}
	}
}

void powMat(MATRIX* out,const MATRIX* in,int powNum,int n,int modBy) {
	MATRIX resultBuf[2];
	MATRIX mulBuf[2];
	int i,j;
	int resultNo=0;
	int mulNo=0;
	for(i=0;i<n;i++) {
		for(j=0;j<n;j++) {
			mulBuf[0].m[i][j]=in->m[i][j];
			resultBuf[0].m[i][j]=(i==j?1:0);
		}
	}
	while(powNum>0) {
		if(powNum&1) {
			mulMatMat(&resultBuf[1-resultNo],
				&resultBuf[resultNo],&mulBuf[mulNo],n,modBy);
			resultNo=1-resultNo;
		}
		mulMatMat(&mulBuf[1-mulNo],&mulBuf[mulNo],&mulBuf[mulNo],n,modBy);
		mulNo=1-mulNo;
		powNum>>=1;
	}
	for(i=0;i<n;i++) {
		for(j=0;j<n;j++)out->m[i][j]=resultBuf[resultNo].m[i][j];
	}
}

int main(void) {
	int N,M,A,B,C,T;
	while(scanf("%d%d%d%d%d%d",&N,&M,&A,&B,&C,&T)==6 && (N|M|A|B|C|T)!=0) {
		MATRIX automaton;
		MATRIX automatonStatus;
		int initialStatus[50];
		int resultStatus[50];
		int i,j;
		for(i=0;i<N;i++)scanf("%d",&initialStatus[i]);
		for(i=0;i<N;i++) {
			for(j=0;j<N;j++) {
				switch(i-j) {
					case  1: automaton.m[i][j]=A;break;
					case  0: automaton.m[i][j]=B;break;
					case -1: automaton.m[i][j]=C;break;
					default: automaton.m[i][j]=0;break;
				}
			}
		}
		powMat(&automatonStatus,&automaton,T,N,M);
		mulMatVec(resultStatus,&automatonStatus,initialStatus,N,M);
		for(i=0;i<N;i++) {
			printf("%d%c",resultStatus[i],i+1<N?' ':'\n');
		}
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	mulMatVec
	.type	mulMatVec, @function
mulMatVec:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	%rdx, -40(%rbp)
	movl	%ecx, -44(%rbp)
	movl	%r8d, -48(%rbp)
	movl	$0, -8(%rbp)
	jmp	.L2
.L5:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	$0, (%rax)
	movl	$0, -4(%rbp)
	jmp	.L3
.L4:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %esi
	movq	-32(%rbp), %rdx
	movl	-4(%rbp), %eax
	movslq	%eax, %rdi
	movl	-8(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rdi, %rax
	movl	(%rdx,%rax,4), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-40(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	imull	%eax, %edx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	addl	%esi, %edx
	movl	%edx, (%rax)
	addl	$1, -4(%rbp)
.L3:
	movl	-4(%rbp), %eax
	cmpl	-44(%rbp), %eax
	jl	.L4
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	-8(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-24(%rbp), %rdx
	addq	%rdx, %rcx
	cltd
	idivl	-48(%rbp)
	movl	%edx, %eax
	movl	%eax, (%rcx)
	addl	$1, -8(%rbp)
.L2:
	movl	-8(%rbp), %eax
	cmpl	-44(%rbp), %eax
	jl	.L5
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	mulMatVec, .-mulMatVec
	.globl	mulMatMat
	.type	mulMatMat, @function
mulMatMat:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	%rdx, -40(%rbp)
	movl	%ecx, -44(%rbp)
	movl	%r8d, -48(%rbp)
	movl	$0, -12(%rbp)
	jmp	.L7
.L12:
	movl	$0, -8(%rbp)
	jmp	.L8
.L11:
	movq	-24(%rbp), %rdx
	movl	-8(%rbp), %eax
	movslq	%eax, %rsi
	movl	-12(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	$0, (%rdx,%rax,4)
	movl	$0, -4(%rbp)
	jmp	.L9
.L10:
	movq	-24(%rbp), %rdx
	movl	-8(%rbp), %eax
	movslq	%eax, %rsi
	movl	-12(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	(%rdx,%rax,4), %edi
	movq	-32(%rbp), %rdx
	movl	-4(%rbp), %eax
	movslq	%eax, %rsi
	movl	-12(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	(%rdx,%rax,4), %esi
	movq	-40(%rbp), %rdx
	movl	-8(%rbp), %eax
	movslq	%eax, %r8
	movl	-4(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%r8, %rax
	movl	(%rdx,%rax,4), %eax
	imull	%esi, %eax
	leal	(%rdi,%rax), %esi
	movq	-24(%rbp), %rdx
	movl	-8(%rbp), %eax
	movslq	%eax, %rdi
	movl	-12(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rdi, %rax
	movl	%esi, (%rdx,%rax,4)
	addl	$1, -4(%rbp)
.L9:
	movl	-4(%rbp), %eax
	cmpl	-44(%rbp), %eax
	jl	.L10
	movq	-24(%rbp), %rdx
	movl	-8(%rbp), %eax
	movslq	%eax, %rsi
	movl	-12(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	(%rdx,%rax,4), %eax
	cltd
	idivl	-48(%rbp)
	movl	%edx, %esi
	movq	-24(%rbp), %rdx
	movl	-8(%rbp), %eax
	movslq	%eax, %rdi
	movl	-12(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rdi, %rax
	movl	%esi, (%rdx,%rax,4)
	addl	$1, -8(%rbp)
.L8:
	movl	-8(%rbp), %eax
	cmpl	-44(%rbp), %eax
	jl	.L11
	addl	$1, -12(%rbp)
.L7:
	movl	-12(%rbp), %eax
	cmpl	-44(%rbp), %eax
	jl	.L12
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	mulMatMat, .-mulMatMat
	.globl	powMat
	.type	powMat, @function
powMat:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-36864(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$3200, %rsp
	movq	%rdi, -40040(%rbp)
	movq	%rsi, -40048(%rbp)
	movl	%edx, -40052(%rbp)
	movl	%ecx, -40056(%rbp)
	movl	%r8d, -40060(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -40024(%rbp)
	movl	$0, -40020(%rbp)
	movl	$0, -40032(%rbp)
	jmp	.L14
.L17:
	movl	$0, -40028(%rbp)
	jmp	.L15
.L16:
	movq	-40048(%rbp), %rdx
	movl	-40028(%rbp), %eax
	movslq	%eax, %rsi
	movl	-40032(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	(%rdx,%rax,4), %edx
	movl	-40028(%rbp), %eax
	movslq	%eax, %rsi
	movl	-40032(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	%edx, -20016(%rbp,%rax,4)
	movl	-40032(%rbp), %eax
	cmpl	-40028(%rbp), %eax
	sete	%al
	movzbl	%al, %edx
	movl	-40028(%rbp), %eax
	movslq	%eax, %rsi
	movl	-40032(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	%edx, -40016(%rbp,%rax,4)
	addl	$1, -40028(%rbp)
.L15:
	movl	-40028(%rbp), %eax
	cmpl	-40056(%rbp), %eax
	jl	.L16
	addl	$1, -40032(%rbp)
.L14:
	movl	-40032(%rbp), %eax
	cmpl	-40056(%rbp), %eax
	jl	.L17
	jmp	.L18
.L20:
	movl	-40052(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L19
	leaq	-20016(%rbp), %rdx
	movl	-40020(%rbp), %eax
	cltq
	imulq	$10000, %rax, %rax
	addq	%rax, %rdx
	leaq	-40016(%rbp), %rcx
	movl	-40024(%rbp), %eax
	cltq
	imulq	$10000, %rax, %rax
	leaq	(%rcx,%rax), %rsi
	movl	$1, %eax
	subl	-40024(%rbp), %eax
	leaq	-40016(%rbp), %rcx
	cltq
	imulq	$10000, %rax, %rax
	leaq	(%rcx,%rax), %rdi
	movl	-40060(%rbp), %ecx
	movl	-40056(%rbp), %eax
	movl	%ecx, %r8d
	movl	%eax, %ecx
	call	mulMatMat
	movl	$1, %eax
	subl	-40024(%rbp), %eax
	movl	%eax, -40024(%rbp)
.L19:
	leaq	-20016(%rbp), %rdx
	movl	-40020(%rbp), %eax
	cltq
	imulq	$10000, %rax, %rax
	addq	%rax, %rdx
	leaq	-20016(%rbp), %rcx
	movl	-40020(%rbp), %eax
	cltq
	imulq	$10000, %rax, %rax
	leaq	(%rcx,%rax), %rsi
	movl	$1, %eax
	subl	-40020(%rbp), %eax
	leaq	-20016(%rbp), %rcx
	cltq
	imulq	$10000, %rax, %rax
	leaq	(%rcx,%rax), %rdi
	movl	-40060(%rbp), %ecx
	movl	-40056(%rbp), %eax
	movl	%ecx, %r8d
	movl	%eax, %ecx
	call	mulMatMat
	movl	$1, %eax
	subl	-40020(%rbp), %eax
	movl	%eax, -40020(%rbp)
	sarl	-40052(%rbp)
.L18:
	cmpl	$0, -40052(%rbp)
	jg	.L20
	movl	$0, -40032(%rbp)
	jmp	.L21
.L24:
	movl	$0, -40028(%rbp)
	jmp	.L22
.L23:
	movl	-40028(%rbp), %eax
	movslq	%eax, %rcx
	movl	-40024(%rbp), %eax
	cltq
	movl	-40032(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$2500, %rax, %rsi
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	addq	%rcx, %rax
	movl	-40016(%rbp,%rax,4), %ecx
	movq	-40040(%rbp), %rdx
	movl	-40028(%rbp), %eax
	movslq	%eax, %rdi
	movl	-40032(%rbp), %eax
	movslq	%eax, %rsi
	movq	%rsi, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	addq	%rax, %rax
	addq	%rdi, %rax
	movl	%ecx, (%rdx,%rax,4)
	addl	$1, -40028(%rbp)
.L22:
	movl	-40028(%rbp), %eax
	cmpl	-40056(%rbp), %eax
	jl	.L23
	addl	$1, -40032(%rbp)
.L21:
	movl	-40032(%rbp), %eax
	cmpl	-40056(%rbp), %eax
	jl	.L24
	nop
	movq	-8(%rbp), %rax
	subq	%fs:40, %rax
	je	.L25
	call	__stack_chk_fail@PLT
.L25:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	powMat, .-powMat
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%c"
.LC2:
	.string	"%d%d%d%d%d%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-16384(%rsp), %r11
.LPSRL1:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL1
	subq	$4080, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L27
.L44:
	movl	$0, -20440(%rbp)
	jmp	.L28
.L29:
	leaq	-20432(%rbp), %rdx
	movl	-20440(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -20440(%rbp)
.L28:
	movl	-20464(%rbp), %eax
	cmpl	%eax, -20440(%rbp)
	jl	.L29
	movl	$0, -20440(%rbp)
	jmp	.L30
.L38:
	movl	$0, -20436(%rbp)
	jmp	.L31
.L37:
	movl	-20440(%rbp), %eax
	subl	-20436(%rbp), %eax
	cmpl	$1, %eax
	je	.L32
	cmpl	$1, %eax
	jg	.L33
	cmpl	$-1, %eax
	je	.L34
	testl	%eax, %eax
	je	.L35
	jmp	.L33
.L32:
	movl	-20456(%rbp), %edx
	movl	-20436(%rbp), %eax
	movslq	%eax, %rsi
	movl	-20440(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	%edx, -20016(%rbp,%rax,4)
	jmp	.L36
.L35:
	movl	-20452(%rbp), %edx
	movl	-20436(%rbp), %eax
	movslq	%eax, %rsi
	movl	-20440(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	%edx, -20016(%rbp,%rax,4)
	jmp	.L36
.L34:
	movl	-20448(%rbp), %edx
	movl	-20436(%rbp), %eax
	movslq	%eax, %rsi
	movl	-20440(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	%edx, -20016(%rbp,%rax,4)
	jmp	.L36
.L33:
	movl	-20436(%rbp), %eax
	movslq	%eax, %rcx
	movl	-20440(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	$0, -20016(%rbp,%rax,4)
	nop
.L36:
	addl	$1, -20436(%rbp)
.L31:
	movl	-20464(%rbp), %eax
	cmpl	%eax, -20436(%rbp)
	jl	.L37
	addl	$1, -20440(%rbp)
.L30:
	movl	-20464(%rbp), %eax
	cmpl	%eax, -20440(%rbp)
	jl	.L38
	movl	-20460(%rbp), %edi
	movl	-20464(%rbp), %ecx
	movl	-20444(%rbp), %edx
	leaq	-20016(%rbp), %rsi
	leaq	-10016(%rbp), %rax
	movl	%edi, %r8d
	movq	%rax, %rdi
	call	powMat
	movl	-20460(%rbp), %edi
	movl	-20464(%rbp), %ecx
	leaq	-20432(%rbp), %rdx
	leaq	-10016(%rbp), %rsi
	leaq	-20224(%rbp), %rax
	movl	%edi, %r8d
	movq	%rax, %rdi
	call	mulMatVec
	movl	$0, -20440(%rbp)
	jmp	.L39
.L42:
	movl	-20440(%rbp), %eax
	leal	1(%rax), %edx
	movl	-20464(%rbp), %eax
	cmpl	%eax, %edx
	jge	.L40
	movl	$32, %edx
	jmp	.L41
.L40:
	movl	$10, %edx
.L41:
	movl	-20440(%rbp), %eax
	cltq
	movl	-20224(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -20440(%rbp)
.L39:
	movl	-20464(%rbp), %eax
	cmpl	%eax, -20440(%rbp)
	jl	.L42
.L27:
	leaq	-20448(%rbp), %r8
	leaq	-20452(%rbp), %rdi
	leaq	-20456(%rbp), %rcx
	leaq	-20460(%rbp), %rdx
	leaq	-20464(%rbp), %rax
	subq	$8, %rsp
	leaq	-20444(%rbp), %rsi
	pushq	%rsi
	movq	%r8, %r9
	movq	%rdi, %r8
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$16, %rsp
	cmpl	$6, %eax
	jne	.L43
	movl	-20464(%rbp), %edx
	movl	-20460(%rbp), %eax
	orl	%eax, %edx
	movl	-20456(%rbp), %eax
	orl	%eax, %edx
	movl	-20452(%rbp), %eax
	orl	%eax, %edx
	movl	-20448(%rbp), %eax
	orl	%eax, %edx
	movl	-20444(%rbp), %eax
	orl	%edx, %eax
	testl	%eax, %eax
	jne	.L44
.L43:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L46
	call	__stack_chk_fail@PLT
.L46:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
train
	.file	"temp.c"
	.text
	.globl	mulMatVec
	.type	mulMatVec, @function
mulMatVec:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	%rdx, -40(%rbp)
	movl	%ecx, -44(%rbp)
	movl	%r8d, -48(%rbp)
	movl	$0, -8(%rbp)
	jmp	.L2
.L5:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	$0, (%rax)
	movl	$0, -4(%rbp)
	jmp	.L3
.L4:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %esi
	movq	-32(%rbp), %rdx
	movl	-4(%rbp), %eax
	movslq	%eax, %rdi
	movl	-8(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rdi, %rax
	movl	(%rdx,%rax,4), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-40(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	imull	%eax, %edx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	addl	%esi, %edx
	movl	%edx, (%rax)
	addl	$1, -4(%rbp)
.L3:
	movl	-4(%rbp), %eax
	cmpl	-44(%rbp), %eax
	jl	.L4
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	-8(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-24(%rbp), %rdx
	addq	%rdx, %rcx
	cltd
	idivl	-48(%rbp)
	movl	%edx, %eax
	movl	%eax, (%rcx)
	addl	$1, -8(%rbp)
.L2:
	movl	-8(%rbp), %eax
	cmpl	-44(%rbp), %eax
	jl	.L5
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	mulMatVec, .-mulMatVec
	.globl	mulMatMat
	.type	mulMatMat, @function
mulMatMat:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	%rdx, -40(%rbp)
	movl	%ecx, -44(%rbp)
	movl	%r8d, -48(%rbp)
	movl	$0, -12(%rbp)
	jmp	.L7
.L12:
	movl	$0, -8(%rbp)
	jmp	.L8
.L11:
	movq	-24(%rbp), %rdx
	movl	-8(%rbp), %eax
	movslq	%eax, %rsi
	movl	-12(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	$0, (%rdx,%rax,4)
	movl	$0, -4(%rbp)
	jmp	.L9
.L10:
	movq	-24(%rbp), %rdx
	movl	-8(%rbp), %eax
	movslq	%eax, %rsi
	movl	-12(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	(%rdx,%rax,4), %edi
	movq	-32(%rbp), %rdx
	movl	-4(%rbp), %eax
	movslq	%eax, %rsi
	movl	-12(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	(%rdx,%rax,4), %esi
	movq	-40(%rbp), %rdx
	movl	-8(%rbp), %eax
	movslq	%eax, %r8
	movl	-4(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%r8, %rax
	movl	(%rdx,%rax,4), %eax
	imull	%esi, %eax
	leal	(%rdi,%rax), %esi
	movq	-24(%rbp), %rdx
	movl	-8(%rbp), %eax
	movslq	%eax, %rdi
	movl	-12(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rdi, %rax
	movl	%esi, (%rdx,%rax,4)
	addl	$1, -4(%rbp)
.L9:
	movl	-4(%rbp), %eax
	cmpl	-44(%rbp), %eax
	jl	.L10
	movq	-24(%rbp), %rdx
	movl	-8(%rbp), %eax
	movslq	%eax, %rsi
	movl	-12(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	(%rdx,%rax,4), %eax
	cltd
	idivl	-48(%rbp)
	movl	%edx, %esi
	movq	-24(%rbp), %rdx
	movl	-8(%rbp), %eax
	movslq	%eax, %rdi
	movl	-12(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rdi, %rax
	movl	%esi, (%rdx,%rax,4)
	addl	$1, -8(%rbp)
.L8:
	movl	-8(%rbp), %eax
	cmpl	-44(%rbp), %eax
	jl	.L11
	addl	$1, -12(%rbp)
.L7:
	movl	-12(%rbp), %eax
	cmpl	-44(%rbp), %eax
	jl	.L12
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	mulMatMat, .-mulMatMat
	.globl	powMat
	.type	powMat, @function
powMat:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-36864(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$3200, %rsp
	movq	%rdi, -40040(%rbp)
	movq	%rsi, -40048(%rbp)
	movl	%edx, -40052(%rbp)
	movl	%ecx, -40056(%rbp)
	movl	%r8d, -40060(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -40024(%rbp)
	movl	$0, -40020(%rbp)
	movl	$0, -40032(%rbp)
	jmp	.L14
.L17:
	movl	$0, -40028(%rbp)
	jmp	.L15
.L16:
	movq	-40048(%rbp), %rdx
	movl	-40028(%rbp), %eax
	movslq	%eax, %rsi
	movl	-40032(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	(%rdx,%rax,4), %edx
	movl	-40028(%rbp), %eax
	movslq	%eax, %rsi
	movl	-40032(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	%edx, -20016(%rbp,%rax,4)
	movl	-40032(%rbp), %eax
	cmpl	-40028(%rbp), %eax
	sete	%al
	movzbl	%al, %edx
	movl	-40028(%rbp), %eax
	movslq	%eax, %rsi
	movl	-40032(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	%edx, -40016(%rbp,%rax,4)
	addl	$1, -40028(%rbp)
.L15:
	movl	-40028(%rbp), %eax
	cmpl	-40056(%rbp), %eax
	jl	.L16
	addl	$1, -40032(%rbp)
.L14:
	movl	-40032(%rbp), %eax
	cmpl	-40056(%rbp), %eax
	jl	.L17
	jmp	.L18
.L20:
	movl	-40052(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L19
	leaq	-20016(%rbp), %rdx
	movl	-40020(%rbp), %eax
	cltq
	imulq	$10000, %rax, %rax
	addq	%rax, %rdx
	leaq	-40016(%rbp), %rcx
	movl	-40024(%rbp), %eax
	cltq
	imulq	$10000, %rax, %rax
	leaq	(%rcx,%rax), %rsi
	movl	$1, %eax
	subl	-40024(%rbp), %eax
	leaq	-40016(%rbp), %rcx
	cltq
	imulq	$10000, %rax, %rax
	leaq	(%rcx,%rax), %rdi
	movl	-40060(%rbp), %ecx
	movl	-40056(%rbp), %eax
	movl	%ecx, %r8d
	movl	%eax, %ecx
	call	mulMatMat
	movl	$1, %eax
	subl	-40024(%rbp), %eax
	movl	%eax, -40024(%rbp)
.L19:
	leaq	-20016(%rbp), %rdx
	movl	-40020(%rbp), %eax
	cltq
	imulq	$10000, %rax, %rax
	addq	%rax, %rdx
	leaq	-20016(%rbp), %rcx
	movl	-40020(%rbp), %eax
	cltq
	imulq	$10000, %rax, %rax
	leaq	(%rcx,%rax), %rsi
	movl	$1, %eax
	subl	-40020(%rbp), %eax
	leaq	-20016(%rbp), %rcx
	cltq
	imulq	$10000, %rax, %rax
	leaq	(%rcx,%rax), %rdi
	movl	-40060(%rbp), %ecx
	movl	-40056(%rbp), %eax
	movl	%ecx, %r8d
	movl	%eax, %ecx
	call	mulMatMat
	movl	$1, %eax
	subl	-40020(%rbp), %eax
	movl	%eax, -40020(%rbp)
	sarl	-40052(%rbp)
.L18:
	cmpl	$0, -40052(%rbp)
	jg	.L20
	movl	$0, -40032(%rbp)
	jmp	.L21
.L24:
	movl	$0, -40028(%rbp)
	jmp	.L22
.L23:
	movl	-40028(%rbp), %eax
	movslq	%eax, %rcx
	movl	-40024(%rbp), %eax
	cltq
	movl	-40032(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$2500, %rax, %rsi
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	addq	%rcx, %rax
	movl	-40016(%rbp,%rax,4), %ecx
	movq	-40040(%rbp), %rdx
	movl	-40028(%rbp), %eax
	movslq	%eax, %rdi
	movl	-40032(%rbp), %eax
	movslq	%eax, %rsi
	movq	%rsi, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	addq	%rax, %rax
	addq	%rdi, %rax
	movl	%ecx, (%rdx,%rax,4)
	addl	$1, -40028(%rbp)
.L22:
	movl	-40028(%rbp), %eax
	cmpl	-40056(%rbp), %eax
	jl	.L23
	addl	$1, -40032(%rbp)
.L21:
	movl	-40032(%rbp), %eax
	cmpl	-40056(%rbp), %eax
	jl	.L24
	nop
	movq	-8(%rbp), %rax
	subq	%fs:40, %rax
	je	.L25
	call	__stack_chk_fail@PLT
.L25:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	powMat, .-powMat
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%c"
.LC2:
	.string	"%d%d%d%d%d%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-16384(%rsp), %r11
.LPSRL1:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL1
	subq	$4080, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L27
.L44:
	movl	$0, -20440(%rbp)
	jmp	.L28
.L29:
	leaq	-20432(%rbp), %rdx
	movl	-20440(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -20440(%rbp)
.L28:
	movl	-20464(%rbp), %eax
	cmpl	%eax, -20440(%rbp)
	jl	.L29
	movl	$0, -20440(%rbp)
	jmp	.L30
.L38:
	movl	$0, -20436(%rbp)
	jmp	.L31
.L37:
	movl	-20440(%rbp), %eax
	subl	-20436(%rbp), %eax
	cmpl	$1, %eax
	je	.L32
	cmpl	$1, %eax
	jg	.L33
	cmpl	$-1, %eax
	je	.L34
	testl	%eax, %eax
	je	.L35
	jmp	.L33
.L32:
	movl	-20456(%rbp), %edx
	movl	-20436(%rbp), %eax
	movslq	%eax, %rsi
	movl	-20440(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	%edx, -20016(%rbp,%rax,4)
	jmp	.L36
.L35:
	movl	-20452(%rbp), %edx
	movl	-20436(%rbp), %eax
	movslq	%eax, %rsi
	movl	-20440(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	%edx, -20016(%rbp,%rax,4)
	jmp	.L36
.L34:
	movl	-20448(%rbp), %edx
	movl	-20436(%rbp), %eax
	movslq	%eax, %rsi
	movl	-20440(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	%edx, -20016(%rbp,%rax,4)
	jmp	.L36
.L33:
	movl	-20436(%rbp), %eax
	movslq	%eax, %rcx
	movl	-20440(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	$0, -20016(%rbp,%rax,4)
	nop
.L36:
	addl	$1, -20436(%rbp)
.L31:
	movl	-20464(%rbp), %eax
	cmpl	%eax, -20436(%rbp)
	jl	.L37
	addl	$1, -20440(%rbp)
.L30:
	movl	-20464(%rbp), %eax
	cmpl	%eax, -20440(%rbp)
	jl	.L38
	movl	-20460(%rbp), %edi
	movl	-20464(%rbp), %ecx
	movl	-20444(%rbp), %edx
	leaq	-20016(%rbp), %rsi
	leaq	-10016(%rbp), %rax
	movl	%edi, %r8d
	movq	%rax, %rdi
	call	powMat
	movl	-20460(%rbp), %edi
	movl	-20464(%rbp), %ecx
	leaq	-20432(%rbp), %rdx
	leaq	-10016(%rbp), %rsi
	leaq	-20224(%rbp), %rax
	movl	%edi, %r8d
	movq	%rax, %rdi
	call	mulMatVec
	movl	$0, -20440(%rbp)
	jmp	.L39
.L42:
	movl	-20440(%rbp), %eax
	leal	1(%rax), %edx
	movl	-20464(%rbp), %eax
	cmpl	%eax, %edx
	jge	.L40
	movl	$32, %edx
	jmp	.L41
.L40:
	movl	$10, %edx
.L41:
	movl	-20440(%rbp), %eax
	cltq
	movl	-20224(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -20440(%rbp)
.L39:
	movl	-20464(%rbp), %eax
	cmpl	%eax, -20440(%rbp)
	jl	.L42
.L27:
	leaq	-20448(%rbp), %r8
	leaq	-20452(%rbp), %rdi
	leaq	-20456(%rbp), %rcx
	leaq	-20460(%rbp), %rdx
	leaq	-20464(%rbp), %rax
	subq	$8, %rsp
	leaq	-20444(%rbp), %rsi
	pushq	%rsi
	movq	%r8, %r9
	movq	%rdi, %r8
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$16, %rsp
	cmpl	$6, %eax
	jne	.L43
	movl	-20464(%rbp), %edx
	movl	-20460(%rbp), %eax
	orl	%eax, %edx
	movl	-20456(%rbp), %eax
	orl	%eax, %edx
	movl	-20452(%rbp), %eax
	orl	%eax, %edx
	movl	-20448(%rbp), %eax
	orl	%eax, %edx
	movl	-20444(%rbp), %eax
	orl	%edx, %eax
	testl	%eax, %eax
	jne	.L44
.L43:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L46
	call	__stack_chk_fail@PLT
.L46:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
