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

```c
// AOJ 1327: One-Dimensional Cellular Automaton
// 2017.10.25 bal4u@uu

#include <stdio.h>
#include <string.h>

int s[2][52];
int d[32][52][52];

int main()
{
	int n, m, a, b, c, t;
	int i, j, k, l, k1, k2;

	while (scanf("%d%d%d%d%d%d", &n, &m, &a, &b, &c, &t) && n > 0) {
		memset(d, 0, sizeof(d));
		for (i = 1; i <= n; i++) scanf("%d", &s[0][i]);
		for (i = 1; i <= n; i++) d[0][i][i+1] = a, d[0][i][i] = b, d[0][i][i-1] = c;
		for (k = 1; (1<<k) <= t; k++) for (i = 1; i <= n; i++) for (j = 1; j <= n; j++) {
			for (l = 1; l <= n; l++) d[k][i][j] += d[k-1][i][l] * d[k-1][l][j];
			d[k][i][j] %= m;
		}

		for (k1 = 0, k2 = 1, k = 0; (1<<k) <= t; k++) if (t & (1<<k)) {
			memset(s[k2], 0, sizeof(s[k2]));
			for (i = 1; i <= n; i++) for (j = 1; j <= n; j++) s[k2][j] += s[k1][i] * d[k][i][j];
			for (i = 1; i <= n; i++) s[k2][i] %= m;
			k1 = k2, k2 = !k2;
		}
		printf("%d", s[k1][1]);
		for (i = 2; i <= n; i++) printf(" %d", s[k1][i]);
		putchar('\n');
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	s
	.bss
	.align 32
	.type	s, @object
	.size	s, 416
s:
	.zero	416
	.globl	d
	.align 32
	.type	d, @object
	.size	d, 346112
d:
	.zero	346112
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	" %d"
.LC2:
	.string	"%d%d%d%d%d%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L2
.L27:
	movl	$346112, %edx
	movl	$0, %esi
	leaq	d(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$1, -32(%rbp)
	jmp	.L3
.L4:
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	s(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -32(%rbp)
.L3:
	movl	-56(%rbp), %eax
	cmpl	%eax, -32(%rbp)
	jle	.L4
	movl	$1, -32(%rbp)
	jmp	.L5
.L6:
	movl	-32(%rbp), %eax
	addl	$1, %eax
	movl	-48(%rbp), %ecx
	movslq	%eax, %rsi
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-44(%rbp), %edx
	movl	-32(%rbp), %eax
	cltq
	imulq	$212, %rax, %rax
	leaq	d(%rip), %rcx
	movl	%edx, (%rax,%rcx)
	movl	-32(%rbp), %eax
	subl	$1, %eax
	movl	-40(%rbp), %ecx
	movslq	%eax, %rsi
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -32(%rbp)
.L5:
	movl	-56(%rbp), %eax
	cmpl	%eax, -32(%rbp)
	jle	.L6
	movl	$1, -24(%rbp)
	jmp	.L7
.L14:
	movl	$1, -32(%rbp)
	jmp	.L8
.L13:
	movl	$1, -28(%rbp)
	jmp	.L9
.L12:
	movl	$1, -20(%rbp)
	jmp	.L10
.L11:
	movl	-28(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	cltq
	movl	-32(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$2704, %rax, %rsi
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %esi
	movl	-24(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-20(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	movl	-32(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$2704, %rax, %rdi
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdi, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-24(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-28(%rbp), %eax
	movslq	%eax, %rdi
	movslq	%edx, %rax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$2704, %rax, %r8
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%r8, %rax
	addq	%rdi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %eax
	imull	%ecx, %eax
	leal	(%rsi,%rax), %ecx
	movl	-28(%rbp), %eax
	movslq	%eax, %rsi
	movl	-24(%rbp), %eax
	cltq
	movl	-32(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$2704, %rax, %rdi
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdi, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -20(%rbp)
.L10:
	movl	-56(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jle	.L11
	movl	-28(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	cltq
	movl	-32(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$2704, %rax, %rsi
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-52(%rbp), %ecx
	cltd
	idivl	%ecx
	movl	%edx, %ecx
	movl	-28(%rbp), %eax
	movslq	%eax, %rsi
	movl	-24(%rbp), %eax
	cltq
	movl	-32(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$2704, %rax, %rdi
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdi, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -28(%rbp)
.L9:
	movl	-56(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jle	.L12
	addl	$1, -32(%rbp)
.L8:
	movl	-56(%rbp), %eax
	cmpl	%eax, -32(%rbp)
	jle	.L13
	addl	$1, -24(%rbp)
.L7:
	movl	-24(%rbp), %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	-36(%rbp), %eax
	cmpl	%eax, %edx
	jle	.L14
	movl	$0, -16(%rbp)
	movl	$1, -12(%rbp)
	movl	$0, -24(%rbp)
	jmp	.L15
.L23:
	movl	-36(%rbp), %edx
	movl	-24(%rbp), %eax
	movl	%eax, %ecx
	sarl	%cl, %edx
	movl	%edx, %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L16
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$4, %rax
	leaq	s(%rip), %rdx
	addq	%rdx, %rax
	movl	$208, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$1, -32(%rbp)
	jmp	.L17
.L20:
	movl	$1, -28(%rbp)
	jmp	.L18
.L19:
	movl	-28(%rbp), %eax
	movslq	%eax, %rcx
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	s(%rip), %rax
	movl	(%rdx,%rax), %esi
	movl	-32(%rbp), %eax
	movslq	%eax, %rcx
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	s(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-28(%rbp), %eax
	movslq	%eax, %rdi
	movl	-24(%rbp), %eax
	cltq
	movl	-32(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$2704, %rax, %r8
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%r8, %rax
	addq	%rdi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %eax
	imull	%ecx, %eax
	leal	(%rsi,%rax), %ecx
	movl	-28(%rbp), %eax
	movslq	%eax, %rsi
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	s(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -28(%rbp)
.L18:
	movl	-56(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jle	.L19
	addl	$1, -32(%rbp)
.L17:
	movl	-56(%rbp), %eax
	cmpl	%eax, -32(%rbp)
	jle	.L20
	movl	$1, -32(%rbp)
	jmp	.L21
.L22:
	movl	-32(%rbp), %eax
	movslq	%eax, %rcx
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	s(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-52(%rbp), %ecx
	cltd
	idivl	%ecx
	movl	%edx, %ecx
	movl	-32(%rbp), %eax
	movslq	%eax, %rsi
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	s(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -32(%rbp)
.L21:
	movl	-56(%rbp), %eax
	cmpl	%eax, -32(%rbp)
	jle	.L22
	movl	-12(%rbp), %eax
	movl	%eax, -16(%rbp)
	cmpl	$0, -12(%rbp)
	sete	%al
	movzbl	%al, %eax
	movl	%eax, -12(%rbp)
.L16:
	addl	$1, -24(%rbp)
.L15:
	movl	-24(%rbp), %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	-36(%rbp), %eax
	cmpl	%eax, %edx
	jle	.L23
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	4+s(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$2, -32(%rbp)
	jmp	.L24
.L25:
	movl	-32(%rbp), %eax
	movslq	%eax, %rcx
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	s(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -32(%rbp)
.L24:
	movl	-56(%rbp), %eax
	cmpl	%eax, -32(%rbp)
	jle	.L25
	movl	$10, %edi
	call	putchar@PLT
.L2:
	leaq	-40(%rbp), %r8
	leaq	-44(%rbp), %rdi
	leaq	-48(%rbp), %rcx
	leaq	-52(%rbp), %rdx
	leaq	-56(%rbp), %rax
	subq	$8, %rsp
	leaq	-36(%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
	testl	%eax, %eax
	je	.L26
	movl	-56(%rbp), %eax
	testl	%eax, %eax
	jg	.L27
.L26:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L29
	call	__stack_chk_fail@PLT
.L29:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	" %d"
.LC2:
	.string	"%d%d%d%d%d%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.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
	subq	$200, %rsp
	.cfi_def_cfa_offset 256
	movq	%fs:40, %rax
	movq	%rax, 184(%rsp)
	xorl	%eax, %eax
	leaq	176(%rsp), %rax
	movq	%rax, 128(%rsp)
	leaq	172(%rsp), %rax
	movq	%rax, 120(%rsp)
	leaq	168(%rsp), %rax
	movq	%rax, 112(%rsp)
	leaq	164(%rsp), %rax
	movq	%rax, 104(%rsp)
	leaq	160(%rsp), %rax
	movq	%rax, 96(%rsp)
	leaq	180(%rsp), %rax
	movq	%rax, 136(%rsp)
	movl	$4, %eax
	subq	.LC3(%rip), %rax
	movq	%rax, 72(%rsp)
.L2:
	subq	$8, %rsp
	.cfi_def_cfa_offset 264
	leaq	.LC2(%rip), %rdi
	xorl	%eax, %eax
	pushq	144(%rsp)
	.cfi_def_cfa_offset 272
	movq	144(%rsp), %r9
	movq	136(%rsp), %r8
	movq	128(%rsp), %rcx
	movq	120(%rsp), %rdx
	movq	112(%rsp), %rsi
	call	__isoc99_scanf@PLT
	popq	%rdx
	.cfi_def_cfa_offset 264
	popq	%rcx
	.cfi_def_cfa_offset 256
	testl	%eax, %eax
	je	.L30
	movl	160(%rsp), %eax
	testl	%eax, %eax
	jle	.L30
	movl	$346112, %edx
	xorl	%esi, %esi
	leaq	d(%rip), %rdi
	movl	$1, %ebx
	call	memset@PLT
	leaq	4+s(%rip), %rbp
.L3:
	movq	%rbp, %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	160(%rsp), %r15d
	addq	$4, %rbp
	cmpl	%ebx, %r15d
	jge	.L3
	testl	%r15d, %r15d
	jle	.L4
	leal	-1(%r15), %edx
	leaq	208+d(%rip), %rcx
	movd	176(%rsp), %xmm0
	movd	172(%rsp), %xmm4
	movq	%rdx, %rax
	imulq	$212, %rdx, %rdx
	leaq	212(%rcx), %rsi
	movl	168(%rsp), %edi
	punpckldq	%xmm4, %xmm0
	addq	%rsi, %rdx
.L5:
	movl	%edi, 8(%rcx)
	addq	$212, %rcx
	movq	%xmm0, -212(%rcx)
	cmpq	%rdx, %rcx
	jne	.L5
	movl	180(%rsp), %r14d
	cmpl	$1, %r14d
	jle	.L33
	imulq	$-208, %rax, %rbx
	movl	$1, 32(%rsp)
	movl	164(%rsp), %r9d
	leaq	2(%rax), %r8
	movq	$0, 8(%rsp)
	leaq	10824(,%rax,4), %rbp
	subq	$416, %rbx
.L11:
	leaq	208+d(%rip), %rdi
	movq	$-208, %r12
	addq	8(%rsp), %rdi
	.p2align 4,,10
	.p2align 3
.L13:
	leaq	10820(%rdi), %rsi
	leaq	0(%rbp,%rdi), %r11
	leaq	-10816(%r12), %r10
	.p2align 4,,10
	.p2align 3
.L10:
	movl	(%rsi), %eax
	leaq	(%r10,%rsi), %r13
	movl	$1, %edx
	.p2align 4,,10
	.p2align 3
.L7:
	movl	(%rdi,%rdx,4), %ecx
	imull	208(%r13), %ecx
	addq	$1, %rdx
	addq	$208, %r13
	addl	%ecx, %eax
	movl	%eax, (%rsi)
	cmpq	%r8, %rdx
	jne	.L7
	cltd
	addq	$4, %rsi
	idivl	%r9d
	movl	%edx, -4(%rsi)
	cmpq	%r11, %rsi
	jne	.L10
	subq	$208, %r12
	addq	$208, %rdi
	cmpq	%rbx, %r12
	jne	.L13
	addl	$1, 32(%rsp)
	movl	32(%rsp), %edi
	movl	$1, %eax
	addq	$10816, 8(%rsp)
	movl	%edi, %ecx
	sall	%cl, %eax
	cmpl	%r14d, %eax
	jle	.L11
.L14:
	movl	%r15d, %ebx
	movl	%r15d, %ecx
	movl	%r15d, %r13d
	xorl	%edx, %edx
	andl	$-4, %ebx
	movl	$1, 8(%rsp)
	shrl	$2, %r13d
	leal	1(%rbx), %eax
	leal	2(%rbx), %edi
	movl	%ebx, 80(%rsp)
	addl	$3, %ebx
	cltq
	movl	%ebx, 88(%rsp)
	leaq	1(%rcx), %rbx
	movq	%rax, 56(%rsp)
	movl	$8, %eax
	subq	.LC3(%rip), %rax
	movl	%edi, 84(%rsp)
	movq	$0, 40(%rsp)
	movl	$0, 32(%rsp)
	movq	%rbx, 152(%rsp)
	movq	%rax, 64(%rsp)
	jmp	.L12
.L16:
	addl	$1, 32(%rsp)
	movl	32(%rsp), %ebx
	movl	$1, %eax
	addq	$10816, 40(%rsp)
	movl	%ebx, %ecx
	sall	%cl, %eax
	cmpl	%r14d, %eax
	jg	.L15
.L12:
	movzbl	32(%rsp), %ecx
	movl	%r14d, %r9d
	sarl	%cl, %r9d
	andl	$1, %r9d
	je	.L16
	movslq	8(%rsp), %rax
	leaq	s(%rip), %rbx
	leaq	(%rax,%rax,2), %rcx
	leaq	(%rax,%rcx,4), %r11
	movl	$26, %ecx
	xorl	%eax, %eax
	movq	%r11, %rbp
	salq	$4, %rbp
	leaq	(%rbx,%rbp), %rsi
	movq	%rsi, %rdi
	rep stosq
	testl	%r15d, %r15d
	jle	.L17
	leaq	(%rdx,%rdx,2), %rax
	salq	$2, %r11
	leal	-1(%r15), %esi
	addq	$4, %rbp
	leaq	(%rdx,%rax,4), %rdx
	leal	1(%r15), %eax
	movl	%esi, 92(%rsp)
	addq	%r11, %rsi
	movl	%eax, 36(%rsp)
	salq	$4, %rdx
	movq	152(%rsp), %rax
	leaq	212+d(%rip), %rcx
	addq	%rbx, %rdx
	movq	56(%rsp), %rdi
	addq	40(%rsp), %rcx
	addq	%r11, %rax
	salq	$2, %rax
	leaq	(%r11,%rdi), %r12
	movq	%rax, 24(%rsp)
	leaq	(%rbx,%rbp), %rax
	leaq	8+s(%rip), %rbx
	leaq	(%rbx,%rsi,4), %rbx
	movslq	32(%rsp), %rsi
	movq	%rax, 16(%rsp)
	imulq	$2704, %rsi, %rdi
	movq	%rdi, 144(%rsp)
.L18:
	movq	72(%rsp), %rdi
	leaq	(%rdi,%rdx), %rsi
	cmpq	%rsi, 24(%rsp)
	movq	64(%rsp), %rsi
	setle	%dil
	addq	%rdx, %rsi
	cmpq	%rsi, %rbp
	setge	%sil
	orb	%dil, %sil
	je	.L36
	cmpl	$2, 92(%rsp)
	jbe	.L36
	movd	4(%rdx), %xmm5
	movdqu	(%rcx), %xmm2
	movdqu	(%rcx), %xmm3
	pshufd	$0, %xmm5, %xmm0
	psrlq	$32, %xmm2
	movdqa	%xmm0, %xmm1
	pmuludq	%xmm0, %xmm3
	psrlq	$32, %xmm1
	pmuludq	%xmm1, %xmm2
	pshufd	$8, %xmm3, %xmm3
	pshufd	$8, %xmm2, %xmm2
	punpckldq	%xmm2, %xmm3
	movdqu	(%rax), %xmm2
	paddd	%xmm3, %xmm2
	movups	%xmm2, (%rax)
	cmpl	$1, %r13d
	jbe	.L22
	movdqu	16(%rcx), %xmm2
	movdqu	16(%rcx), %xmm3
	psrlq	$32, %xmm2
	pmuludq	%xmm0, %xmm3
	pmuludq	%xmm1, %xmm2
	pshufd	$8, %xmm3, %xmm3
	pshufd	$8, %xmm2, %xmm2
	punpckldq	%xmm2, %xmm3
	movdqu	16(%rax), %xmm2
	paddd	%xmm3, %xmm2
	movups	%xmm2, 16(%rax)
	cmpl	$2, %r13d
	je	.L22
	movdqu	32(%rcx), %xmm2
	movdqu	32(%rcx), %xmm3
	psrlq	$32, %xmm2
	pmuludq	%xmm0, %xmm3
	pmuludq	%xmm1, %xmm2
	pshufd	$8, %xmm3, %xmm3
	pshufd	$8, %xmm2, %xmm2
	punpckldq	%xmm2, %xmm3
	movdqu	32(%rax), %xmm2
	paddd	%xmm3, %xmm2
	movups	%xmm2, 32(%rax)
	cmpl	$3, %r13d
	je	.L22
	movdqu	48(%rcx), %xmm2
	movdqu	48(%rcx), %xmm3
	psrlq	$32, %xmm2
	pmuludq	%xmm0, %xmm3
	pmuludq	%xmm1, %xmm2
	pshufd	$8, %xmm3, %xmm3
	pshufd	$8, %xmm2, %xmm2
	punpckldq	%xmm2, %xmm3
	movdqu	48(%rax), %xmm2
	paddd	%xmm3, %xmm2
	movups	%xmm2, 48(%rax)
	cmpl	$4, %r13d
	je	.L22
	movdqu	64(%rcx), %xmm2
	movdqu	64(%rcx), %xmm3
	psrlq	$32, %xmm2
	pmuludq	%xmm0, %xmm3
	pmuludq	%xmm1, %xmm2
	pshufd	$8, %xmm3, %xmm3
	pshufd	$8, %xmm2, %xmm2
	punpckldq	%xmm2, %xmm3
	movdqu	64(%rax), %xmm2
	paddd	%xmm3, %xmm2
	movups	%xmm2, 64(%rax)
	cmpl	$5, %r13d
	je	.L22
	movdqu	80(%rcx), %xmm2
	movdqu	80(%rcx), %xmm3
	psrlq	$32, %xmm2
	pmuludq	%xmm0, %xmm3
	pmuludq	%xmm1, %xmm2
	pshufd	$8, %xmm3, %xmm3
	pshufd	$8, %xmm2, %xmm2
	punpckldq	%xmm2, %xmm3
	movdqu	80(%rax), %xmm2
	paddd	%xmm3, %xmm2
	movups	%xmm2, 80(%rax)
	cmpl	$6, %r13d
	je	.L22
	movdqu	96(%rcx), %xmm2
	movdqu	96(%rcx), %xmm3
	psrlq	$32, %xmm2
	pmuludq	%xmm0, %xmm3
	pmuludq	%xmm1, %xmm2
	pshufd	$8, %xmm3, %xmm3
	pshufd	$8, %xmm2, %xmm2
	punpckldq	%xmm2, %xmm3
	movdqu	96(%rax), %xmm2
	paddd	%xmm3, %xmm2
	movups	%xmm2, 96(%rax)
	cmpl	$7, %r13d
	je	.L22
	movdqu	112(%rcx), %xmm2
	movdqu	112(%rcx), %xmm3
	psrlq	$32, %xmm2
	pmuludq	%xmm0, %xmm3
	pmuludq	%xmm1, %xmm2
	pshufd	$8, %xmm3, %xmm3
	pshufd	$8, %xmm2, %xmm2
	punpckldq	%xmm2, %xmm3
	movdqu	112(%rax), %xmm2
	paddd	%xmm3, %xmm2
	movups	%xmm2, 112(%rax)
	cmpl	$8, %r13d
	je	.L22
	movdqu	128(%rcx), %xmm2
	movdqu	128(%rcx), %xmm3
	psrlq	$32, %xmm2
	pmuludq	%xmm0, %xmm3
	pmuludq	%xmm1, %xmm2
	pshufd	$8, %xmm3, %xmm3
	pshufd	$8, %xmm2, %xmm2
	punpckldq	%xmm2, %xmm3
	movdqu	128(%rax), %xmm2
	paddd	%xmm3, %xmm2
	movups	%xmm2, 128(%rax)
	cmpl	$9, %r13d
	je	.L22
	movdqu	144(%rcx), %xmm2
	movdqu	144(%rcx), %xmm3
	psrlq	$32, %xmm2
	pmuludq	%xmm0, %xmm3
	pmuludq	%xmm1, %xmm2
	pshufd	$8, %xmm3, %xmm3
	pshufd	$8, %xmm2, %xmm2
	punpckldq	%xmm2, %xmm3
	movdqu	144(%rax), %xmm2
	paddd	%xmm3, %xmm2
	movups	%xmm2, 144(%rax)
	cmpl	$10, %r13d
	je	.L22
	movdqu	160(%rcx), %xmm2
	movdqu	160(%rcx), %xmm3
	psrlq	$32, %xmm2
	pmuludq	%xmm0, %xmm3
	pmuludq	%xmm1, %xmm2
	pshufd	$8, %xmm3, %xmm3
	pshufd	$8, %xmm2, %xmm2
	punpckldq	%xmm2, %xmm3
	movdqu	160(%rax), %xmm2
	paddd	%xmm3, %xmm2
	movups	%xmm2, 160(%rax)
	cmpl	$11, %r13d
	je	.L22
	movdqu	176(%rcx), %xmm2
	movdqu	176(%rcx), %xmm6
	movdqu	176(%rax), %xmm7
	psrlq	$32, %xmm2
	pmuludq	%xmm6, %xmm0
	pmuludq	%xmm2, %xmm1
	pshufd	$8, %xmm0, %xmm0
	pshufd	$8, %xmm1, %xmm1
	punpckldq	%xmm1, %xmm0
	paddd	%xmm7, %xmm0
	movups	%xmm0, 176(%rax)
.L22:
	cmpl	%r15d, 80(%rsp)
	je	.L21
	movslq	%r9d, %rsi
	leaq	(%rsi,%rsi,2), %rdi
	leaq	(%rsi,%rdi,4), %rsi
	movq	144(%rsp), %rdi
	leaq	(%rdi,%rsi,4), %r8
	movq	56(%rsp), %rdi
	leaq	d(%rip), %rsi
	leaq	(%r8,%rdi), %r10
	movl	4(%rdx), %edi
	imull	(%rsi,%r10,4), %edi
	leaq	s(%rip), %r10
	addl	%edi, (%r10,%r12,4)
	movslq	84(%rsp), %rdi
	cmpl	%edi, %r15d
	jl	.L21
	leaq	(%r11,%rdi), %r10
	addq	%r8, %rdi
	movq	%r8, 48(%rsp)
	movl	4(%rdx), %r8d
	imull	(%rsi,%rdi,4), %r8d
	leaq	s(%rip), %rsi
	movl	%r8d, %edi
	addl	%edi, (%rsi,%r10,4)
	movl	88(%rsp), %edi
	movq	%rsi, %r8
	cmpl	%edi, %r15d
	jl	.L21
	movq	48(%rsp), %rsi
	movslq	%edi, %r10
	leaq	(%r11,%r10), %rdi
	addq	%r10, %rsi
	leaq	d(%rip), %r10
	movl	(%r10,%rsi,4), %esi
	imull	4(%rdx), %esi
	addl	%esi, (%r8,%rdi,4)
.L21:
	addl	$1, %r9d
	addq	$208, %rcx
	addq	$4, %rdx
	cmpl	36(%rsp), %r9d
	jne	.L18
	movq	16(%rsp), %r8
	movl	164(%rsp), %ecx
.L26:
	movl	(%r8), %eax
	addq	$4, %r8
	cltd
	idivl	%ecx
	movl	%edx, -4(%r8)
	cmpq	%rbx, %r8
	jne	.L26
.L17:
	movl	8(%rsp), %eax
	movslq	%eax, %rdx
	xorl	$1, %eax
	movl	%eax, 8(%rsp)
	jmp	.L16
.L36:
	movq	16(%rsp), %r8
	movq	%rcx, %r10
	movq	%rax, %rsi
.L20:
	movl	(%r10), %edi
	imull	4(%rdx), %edi
	addq	$4, %r10
	addl	%edi, (%rsi)
	addq	$4, %rsi
	cmpq	%rbx, %rsi
	jne	.L20
	movq	%r8, 16(%rsp)
	jmp	.L21
.L4:
	movl	180(%rsp), %r14d
	cmpl	$1, %r14d
	jg	.L14
.L33:
	cmpl	$1, %r14d
	je	.L14
	xorl	%edx, %edx
.L15:
	leaq	(%rdx,%rdx,2), %rax
	movl	$1, %edi
	leaq	.LC0(%rip), %rsi
	movl	$2, %ebp
	leaq	(%rdx,%rax,4), %rbx
	leaq	s(%rip), %rax
	salq	$4, %rbx
	leaq	.LC1(%rip), %r12
	addq	%rax, %rbx
	xorl	%eax, %eax
	movl	4(%rbx), %edx
	call	__printf_chk@PLT
	cmpl	$1, 160(%rsp)
	jle	.L29
.L28:
	movl	(%rbx,%rbp,4), %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbp
	call	__printf_chk@PLT
	cmpl	%ebp, 160(%rsp)
	jge	.L28
.L29:
	movq	stdout(%rip), %rsi
	movl	$10, %edi
	call	putc@PLT
	jmp	.L2
.L30:
	movq	184(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L92
	addq	$200, %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
.L92:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.globl	d
	.bss
	.align 32
	.type	d, @object
	.size	d, 346112
d:
	.zero	346112
	.globl	s
	.align 32
	.type	s, @object
	.size	s, 416
s:
	.zero	416
	.section	.data.rel.ro.local,"aw"
	.align 8
.LC3:
	.quad	s
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	" %d"
.LC2:
	.string	"%d%d%d%d%d%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.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
	subq	$200, %rsp
	.cfi_def_cfa_offset 256
	movq	%fs:40, %rax
	movq	%rax, 184(%rsp)
	xorl	%eax, %eax
	leaq	176(%rsp), %rax
	movq	%rax, 128(%rsp)
	leaq	172(%rsp), %rax
	movq	%rax, 120(%rsp)
	leaq	168(%rsp), %rax
	movq	%rax, 112(%rsp)
	leaq	164(%rsp), %rax
	movq	%rax, 104(%rsp)
	leaq	160(%rsp), %rax
	movq	%rax, 96(%rsp)
	leaq	180(%rsp), %rax
	movq	%rax, 136(%rsp)
	movl	$4, %eax
	subq	.LC3(%rip), %rax
	movq	%rax, 72(%rsp)
.L2:
	subq	$8, %rsp
	.cfi_def_cfa_offset 264
	leaq	.LC2(%rip), %rdi
	xorl	%eax, %eax
	pushq	144(%rsp)
	.cfi_def_cfa_offset 272
	movq	144(%rsp), %r9
	movq	136(%rsp), %r8
	movq	128(%rsp), %rcx
	movq	120(%rsp), %rdx
	movq	112(%rsp), %rsi
	call	__isoc99_scanf@PLT
	popq	%rdx
	.cfi_def_cfa_offset 264
	popq	%rcx
	.cfi_def_cfa_offset 256
	testl	%eax, %eax
	je	.L30
	movl	160(%rsp), %eax
	testl	%eax, %eax
	jle	.L30
	movl	$346112, %edx
	xorl	%esi, %esi
	leaq	d(%rip), %rdi
	movl	$1, %ebx
	call	memset@PLT
	leaq	4+s(%rip), %rbp
.L3:
	movq	%rbp, %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	160(%rsp), %r15d
	addq	$4, %rbp
	cmpl	%ebx, %r15d
	jge	.L3
	testl	%r15d, %r15d
	jle	.L4
	leal	-1(%r15), %edx
	leaq	208+d(%rip), %rcx
	movd	176(%rsp), %xmm0
	movd	172(%rsp), %xmm4
	movq	%rdx, %rax
	imulq	$212, %rdx, %rdx
	leaq	212(%rcx), %rsi
	movl	168(%rsp), %edi
	punpckldq	%xmm4, %xmm0
	addq	%rsi, %rdx
.L5:
	movl	%edi, 8(%rcx)
	addq	$212, %rcx
	movq	%xmm0, -212(%rcx)
	cmpq	%rdx, %rcx
	jne	.L5
	movl	180(%rsp), %r14d
	cmpl	$1, %r14d
	jle	.L33
	imulq	$-208, %rax, %rbx
	movl	$1, 32(%rsp)
	movl	164(%rsp), %r9d
	leaq	2(%rax), %r8
	movq	$0, 8(%rsp)
	leaq	10824(,%rax,4), %rbp
	subq	$416, %rbx
.L11:
	leaq	208+d(%rip), %rdi
	movq	$-208, %r12
	addq	8(%rsp), %rdi
	.p2align 4,,10
	.p2align 3
.L13:
	leaq	10820(%rdi), %rsi
	leaq	0(%rbp,%rdi), %r11
	leaq	-10816(%r12), %r10
	.p2align 4,,10
	.p2align 3
.L10:
	movl	(%rsi), %eax
	leaq	(%r10,%rsi), %r13
	movl	$1, %edx
	.p2align 4,,10
	.p2align 3
.L7:
	movl	(%rdi,%rdx,4), %ecx
	imull	208(%r13), %ecx
	addq	$1, %rdx
	addq	$208, %r13
	addl	%ecx, %eax
	movl	%eax, (%rsi)
	cmpq	%r8, %rdx
	jne	.L7
	cltd
	addq	$4, %rsi
	idivl	%r9d
	movl	%edx, -4(%rsi)
	cmpq	%r11, %rsi
	jne	.L10
	subq	$208, %r12
	addq	$208, %rdi
	cmpq	%rbx, %r12
	jne	.L13
	addl	$1, 32(%rsp)
	movl	32(%rsp), %edi
	movl	$1, %eax
	addq	$10816, 8(%rsp)
	movl	%edi, %ecx
	sall	%cl, %eax
	cmpl	%r14d, %eax
	jle	.L11
.L14:
	movl	%r15d, %ebx
	movl	%r15d, %ecx
	movl	%r15d, %r13d
	xorl	%edx, %edx
	andl	$-4, %ebx
	movl	$1, 8(%rsp)
	shrl	$2, %r13d
	leal	1(%rbx), %eax
	leal	2(%rbx), %edi
	movl	%ebx, 80(%rsp)
	addl	$3, %ebx
	cltq
	movl	%ebx, 88(%rsp)
	leaq	1(%rcx), %rbx
	movq	%rax, 56(%rsp)
	movl	$8, %eax
	subq	.LC3(%rip), %rax
	movl	%edi, 84(%rsp)
	movq	$0, 40(%rsp)
	movl	$0, 32(%rsp)
	movq	%rbx, 152(%rsp)
	movq	%rax, 64(%rsp)
	jmp	.L12
.L16:
	addl	$1, 32(%rsp)
	movl	32(%rsp), %ebx
	movl	$1, %eax
	addq	$10816, 40(%rsp)
	movl	%ebx, %ecx
	sall	%cl, %eax
	cmpl	%r14d, %eax
	jg	.L15
.L12:
	movzbl	32(%rsp), %ecx
	movl	%r14d, %r9d
	sarl	%cl, %r9d
	andl	$1, %r9d
	je	.L16
	movslq	8(%rsp), %rax
	leaq	s(%rip), %rbx
	leaq	(%rax,%rax,2), %rcx
	leaq	(%rax,%rcx,4), %r11
	movl	$26, %ecx
	xorl	%eax, %eax
	movq	%r11, %rbp
	salq	$4, %rbp
	leaq	(%rbx,%rbp), %rsi
	movq	%rsi, %rdi
	rep stosq
	testl	%r15d, %r15d
	jle	.L17
	leaq	(%rdx,%rdx,2), %rax
	salq	$2, %r11
	leal	-1(%r15), %esi
	addq	$4, %rbp
	leaq	(%rdx,%rax,4), %rdx
	leal	1(%r15), %eax
	movl	%esi, 92(%rsp)
	addq	%r11, %rsi
	movl	%eax, 36(%rsp)
	salq	$4, %rdx
	movq	152(%rsp), %rax
	leaq	212+d(%rip), %rcx
	addq	%rbx, %rdx
	movq	56(%rsp), %rdi
	addq	40(%rsp), %rcx
	addq	%r11, %rax
	salq	$2, %rax
	leaq	(%r11,%rdi), %r12
	movq	%rax, 24(%rsp)
	leaq	(%rbx,%rbp), %rax
	leaq	8+s(%rip), %rbx
	leaq	(%rbx,%rsi,4), %rbx
	movslq	32(%rsp), %rsi
	movq	%rax, 16(%rsp)
	imulq	$2704, %rsi, %rdi
	movq	%rdi, 144(%rsp)
.L18:
	movq	72(%rsp), %rdi
	leaq	(%rdi,%rdx), %rsi
	cmpq	%rsi, 24(%rsp)
	movq	64(%rsp), %rsi
	setle	%dil
	addq	%rdx, %rsi
	cmpq	%rsi, %rbp
	setge	%sil
	orb	%dil, %sil
	je	.L36
	cmpl	$2, 92(%rsp)
	jbe	.L36
	movd	4(%rdx), %xmm5
	movdqu	(%rcx), %xmm2
	movdqu	(%rcx), %xmm3
	pshufd	$0, %xmm5, %xmm0
	psrlq	$32, %xmm2
	movdqa	%xmm0, %xmm1
	pmuludq	%xmm0, %xmm3
	psrlq	$32, %xmm1
	pmuludq	%xmm1, %xmm2
	pshufd	$8, %xmm3, %xmm3
	pshufd	$8, %xmm2, %xmm2
	punpckldq	%xmm2, %xmm3
	movdqu	(%rax), %xmm2
	paddd	%xmm3, %xmm2
	movups	%xmm2, (%rax)
	cmpl	$1, %r13d
	jbe	.L22
	movdqu	16(%rcx), %xmm2
	movdqu	16(%rcx), %xmm3
	psrlq	$32, %xmm2
	pmuludq	%xmm0, %xmm3
	pmuludq	%xmm1, %xmm2
	pshufd	$8, %xmm3, %xmm3
	pshufd	$8, %xmm2, %xmm2
	punpckldq	%xmm2, %xmm3
	movdqu	16(%rax), %xmm2
	paddd	%xmm3, %xmm2
	movups	%xmm2, 16(%rax)
	cmpl	$2, %r13d
	je	.L22
	movdqu	32(%rcx), %xmm2
	movdqu	32(%rcx), %xmm3
	psrlq	$32, %xmm2
	pmuludq	%xmm0, %xmm3
	pmuludq	%xmm1, %xmm2
	pshufd	$8, %xmm3, %xmm3
	pshufd	$8, %xmm2, %xmm2
	punpckldq	%xmm2, %xmm3
	movdqu	32(%rax), %xmm2
	paddd	%xmm3, %xmm2
	movups	%xmm2, 32(%rax)
	cmpl	$3, %r13d
	je	.L22
	movdqu	48(%rcx), %xmm2
	movdqu	48(%rcx), %xmm3
	psrlq	$32, %xmm2
	pmuludq	%xmm0, %xmm3
	pmuludq	%xmm1, %xmm2
	pshufd	$8, %xmm3, %xmm3
	pshufd	$8, %xmm2, %xmm2
	punpckldq	%xmm2, %xmm3
	movdqu	48(%rax), %xmm2
	paddd	%xmm3, %xmm2
	movups	%xmm2, 48(%rax)
	cmpl	$4, %r13d
	je	.L22
	movdqu	64(%rcx), %xmm2
	movdqu	64(%rcx), %xmm3
	psrlq	$32, %xmm2
	pmuludq	%xmm0, %xmm3
	pmuludq	%xmm1, %xmm2
	pshufd	$8, %xmm3, %xmm3
	pshufd	$8, %xmm2, %xmm2
	punpckldq	%xmm2, %xmm3
	movdqu	64(%rax), %xmm2
	paddd	%xmm3, %xmm2
	movups	%xmm2, 64(%rax)
	cmpl	$5, %r13d
	je	.L22
	movdqu	80(%rcx), %xmm2
	movdqu	80(%rcx), %xmm3
	psrlq	$32, %xmm2
	pmuludq	%xmm0, %xmm3
	pmuludq	%xmm1, %xmm2
	pshufd	$8, %xmm3, %xmm3
	pshufd	$8, %xmm2, %xmm2
	punpckldq	%xmm2, %xmm3
	movdqu	80(%rax), %xmm2
	paddd	%xmm3, %xmm2
	movups	%xmm2, 80(%rax)
	cmpl	$6, %r13d
	je	.L22
	movdqu	96(%rcx), %xmm2
	movdqu	96(%rcx), %xmm3
	psrlq	$32, %xmm2
	pmuludq	%xmm0, %xmm3
	pmuludq	%xmm1, %xmm2
	pshufd	$8, %xmm3, %xmm3
	pshufd	$8, %xmm2, %xmm2
	punpckldq	%xmm2, %xmm3
	movdqu	96(%rax), %xmm2
	paddd	%xmm3, %xmm2
	movups	%xmm2, 96(%rax)
	cmpl	$7, %r13d
	je	.L22
	movdqu	112(%rcx), %xmm2
	movdqu	112(%rcx), %xmm3
	psrlq	$32, %xmm2
	pmuludq	%xmm0, %xmm3
	pmuludq	%xmm1, %xmm2
	pshufd	$8, %xmm3, %xmm3
	pshufd	$8, %xmm2, %xmm2
	punpckldq	%xmm2, %xmm3
	movdqu	112(%rax), %xmm2
	paddd	%xmm3, %xmm2
	movups	%xmm2, 112(%rax)
	cmpl	$8, %r13d
	je	.L22
	movdqu	128(%rcx), %xmm2
	movdqu	128(%rcx), %xmm3
	psrlq	$32, %xmm2
	pmuludq	%xmm0, %xmm3
	pmuludq	%xmm1, %xmm2
	pshufd	$8, %xmm3, %xmm3
	pshufd	$8, %xmm2, %xmm2
	punpckldq	%xmm2, %xmm3
	movdqu	128(%rax), %xmm2
	paddd	%xmm3, %xmm2
	movups	%xmm2, 128(%rax)
	cmpl	$9, %r13d
	je	.L22
	movdqu	144(%rcx), %xmm2
	movdqu	144(%rcx), %xmm3
	psrlq	$32, %xmm2
	pmuludq	%xmm0, %xmm3
	pmuludq	%xmm1, %xmm2
	pshufd	$8, %xmm3, %xmm3
	pshufd	$8, %xmm2, %xmm2
	punpckldq	%xmm2, %xmm3
	movdqu	144(%rax), %xmm2
	paddd	%xmm3, %xmm2
	movups	%xmm2, 144(%rax)
	cmpl	$10, %r13d
	je	.L22
	movdqu	160(%rcx), %xmm2
	movdqu	160(%rcx), %xmm3
	psrlq	$32, %xmm2
	pmuludq	%xmm0, %xmm3
	pmuludq	%xmm1, %xmm2
	pshufd	$8, %xmm3, %xmm3
	pshufd	$8, %xmm2, %xmm2
	punpckldq	%xmm2, %xmm3
	movdqu	160(%rax), %xmm2
	paddd	%xmm3, %xmm2
	movups	%xmm2, 160(%rax)
	cmpl	$11, %r13d
	je	.L22
	movdqu	176(%rcx), %xmm2
	movdqu	176(%rcx), %xmm6
	movdqu	176(%rax), %xmm7
	psrlq	$32, %xmm2
	pmuludq	%xmm6, %xmm0
	pmuludq	%xmm2, %xmm1
	pshufd	$8, %xmm0, %xmm0
	pshufd	$8, %xmm1, %xmm1
	punpckldq	%xmm1, %xmm0
	paddd	%xmm7, %xmm0
	movups	%xmm0, 176(%rax)
.L22:
	cmpl	%r15d, 80(%rsp)
	je	.L21
	movslq	%r9d, %rsi
	leaq	(%rsi,%rsi,2), %rdi
	leaq	(%rsi,%rdi,4), %rsi
	movq	144(%rsp), %rdi
	leaq	(%rdi,%rsi,4), %r8
	movq	56(%rsp), %rdi
	leaq	d(%rip), %rsi
	leaq	(%r8,%rdi), %r10
	movl	4(%rdx), %edi
	imull	(%rsi,%r10,4), %edi
	leaq	s(%rip), %r10
	addl	%edi, (%r10,%r12,4)
	movslq	84(%rsp), %rdi
	cmpl	%edi, %r15d
	jl	.L21
	leaq	(%r11,%rdi), %r10
	addq	%r8, %rdi
	movq	%r8, 48(%rsp)
	movl	4(%rdx), %r8d
	imull	(%rsi,%rdi,4), %r8d
	leaq	s(%rip), %rsi
	movl	%r8d, %edi
	addl	%edi, (%rsi,%r10,4)
	movl	88(%rsp), %edi
	movq	%rsi, %r8
	cmpl	%edi, %r15d
	jl	.L21
	movq	48(%rsp), %rsi
	movslq	%edi, %r10
	leaq	(%r11,%r10), %rdi
	addq	%r10, %rsi
	leaq	d(%rip), %r10
	movl	(%r10,%rsi,4), %esi
	imull	4(%rdx), %esi
	addl	%esi, (%r8,%rdi,4)
.L21:
	addl	$1, %r9d
	addq	$208, %rcx
	addq	$4, %rdx
	cmpl	36(%rsp), %r9d
	jne	.L18
	movq	16(%rsp), %r8
	movl	164(%rsp), %ecx
.L26:
	movl	(%r8), %eax
	addq	$4, %r8
	cltd
	idivl	%ecx
	movl	%edx, -4(%r8)
	cmpq	%rbx, %r8
	jne	.L26
.L17:
	movl	8(%rsp), %eax
	movslq	%eax, %rdx
	xorl	$1, %eax
	movl	%eax, 8(%rsp)
	jmp	.L16
.L36:
	movq	16(%rsp), %r8
	movq	%rcx, %r10
	movq	%rax, %rsi
.L20:
	movl	(%r10), %edi
	imull	4(%rdx), %edi
	addq	$4, %r10
	addl	%edi, (%rsi)
	addq	$4, %rsi
	cmpq	%rbx, %rsi
	jne	.L20
	movq	%r8, 16(%rsp)
	jmp	.L21
.L4:
	movl	180(%rsp), %r14d
	cmpl	$1, %r14d
	jg	.L14
.L33:
	cmpl	$1, %r14d
	je	.L14
	xorl	%edx, %edx
.L15:
	leaq	(%rdx,%rdx,2), %rax
	movl	$1, %edi
	leaq	.LC0(%rip), %rsi
	movl	$2, %ebp
	leaq	(%rdx,%rax,4), %rbx
	leaq	s(%rip), %rax
	salq	$4, %rbx
	leaq	.LC1(%rip), %r12
	addq	%rax, %rbx
	xorl	%eax, %eax
	movl	4(%rbx), %edx
	call	__printf_chk@PLT
	cmpl	$1, 160(%rsp)
	jle	.L29
.L28:
	movl	(%rbx,%rbp,4), %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbp
	call	__printf_chk@PLT
	cmpl	%ebp, 160(%rsp)
	jge	.L28
.L29:
	movq	stdout(%rip), %rsi
	movl	$10, %edi
	call	putc@PLT
	jmp	.L2
.L30:
	movq	184(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L92
	addq	$200, %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
.L92:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.globl	d
	.bss
	.align 32
	.type	d, @object
	.size	d, 346112
d:
	.zero	346112
	.globl	s
	.align 32
	.type	s, @object
	.size	s, 416
s:
	.zero	416
	.section	.data.rel.ro.local,"aw"
	.align 8
.LC3:
	.quad	s
	.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:

// AOJ 1327: One-Dimensional Cellular Automaton
// 2017.10.25 bal4u@uu

#include <stdio.h>
#include <string.h>

int s[2][52];
int d[32][52][52];

int main()
{
	int n, m, a, b, c, t;
	int i, j, k, l, k1, k2;

	while (scanf("%d%d%d%d%d%d", &n, &m, &a, &b, &c, &t) && n > 0) {
		memset(d, 0, sizeof(d));
		for (i = 1; i <= n; i++) scanf("%d", &s[0][i]);
		for (i = 1; i <= n; i++) d[0][i][i+1] = a, d[0][i][i] = b, d[0][i][i-1] = c;
		for (k = 1; (1<<k) <= t; k++) for (i = 1; i <= n; i++) for (j = 1; j <= n; j++) {
			for (l = 1; l <= n; l++) d[k][i][j] += d[k-1][i][l] * d[k-1][l][j];
			d[k][i][j] %= m;
		}

		for (k1 = 0, k2 = 1, k = 0; (1<<k) <= t; k++) if (t & (1<<k)) {
			memset(s[k2], 0, sizeof(s[k2]));
			for (i = 1; i <= n; i++) for (j = 1; j <= n; j++) s[k2][j] += s[k1][i] * d[k][i][j];
			for (i = 1; i <= n; i++) s[k2][i] %= m;
			k1 = k2, k2 = !k2;
		}
		printf("%d", s[k1][1]);
		for (i = 2; i <= n; i++) printf(" %d", s[k1][i]);
		putchar('\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 4 1 1 4 1 0 0 3 0 4 2 0 3 1 1 4 2 3 0 4 2 3 4 3 4
 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 4 1 1 4 1 0 0 3 0 4 2 0 3 1 1 4 2 3 0 4 2 3 4 3 4
 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 4 1 1 4 1 0 0 3 0 4 2 0 3 1 1 4 2 3 0 4 2 3 4 3 4
 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 4 1 1 4 1 0 0 3 0 4 2 0 3 1 1 4 2 3 0 4 2 3 4 3 4
 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
3 1 3 0 1 4 0 4 3 1 3 2 3 0 1 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
// AOJ 1327: One-Dimensional Cellular Automaton
// 2017.10.25 bal4u@uu

#include <stdio.h>
#include <string.h>

int s[2][52];
int d[32][52][52];

int main()
{
	int n, m, a, b, c, t;
	int i, j, k, l, k1, k2;

	while (scanf("%d%d%d%d%d%d", &n, &m, &a, &b, &c, &t) && n > 0) {
		memset(d, 0, sizeof(d));
		for (i = 1; i <= n; i++) scanf("%d", &s[0][i]);
		for (i = 1; i <= n; i++) d[0][i][i+1] = a, d[0][i][i] = b, d[0][i][i-1] = c;
		for (k = 1; (1<<k) <= t; k++) for (i = 1; i <= n; i++) for (j = 1; j <= n; j++) {
			for (l = 1; l <= n; l++) d[k][i][j] += d[k-1][i][l] * d[k-1][l][j];
			d[k][i][j] %= m;
		}

		for (k1 = 0, k2 = 1, k = 0; (1<<k) <= t; k++) if (t & (1<<k)) {
			memset(s[k2], 0, sizeof(s[k2]));
			for (i = 1; i <= n; i++) for (j = 1; j <= n; j++) s[k2][j] += s[k1][i] * d[k][i][j];
			for (i = 1; i <= n; i++) s[k2][i] %= m;
			k1 = k2, k2 = !k2;
		}
		printf("%d", s[k1][1]);
		for (i = 2; i <= n; i++) printf(" %d", s[k1][i]);
		putchar('\n');
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	s
	.bss
	.align 32
	.type	s, @object
	.size	s, 416
s:
	.zero	416
	.globl	d
	.align 32
	.type	d, @object
	.size	d, 346112
d:
	.zero	346112
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	" %d"
.LC2:
	.string	"%d%d%d%d%d%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L2
.L27:
	movl	$346112, %edx
	movl	$0, %esi
	leaq	d(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$1, -32(%rbp)
	jmp	.L3
.L4:
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	s(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -32(%rbp)
.L3:
	movl	-56(%rbp), %eax
	cmpl	%eax, -32(%rbp)
	jle	.L4
	movl	$1, -32(%rbp)
	jmp	.L5
.L6:
	movl	-32(%rbp), %eax
	addl	$1, %eax
	movl	-48(%rbp), %ecx
	movslq	%eax, %rsi
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-44(%rbp), %edx
	movl	-32(%rbp), %eax
	cltq
	imulq	$212, %rax, %rax
	leaq	d(%rip), %rcx
	movl	%edx, (%rax,%rcx)
	movl	-32(%rbp), %eax
	subl	$1, %eax
	movl	-40(%rbp), %ecx
	movslq	%eax, %rsi
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -32(%rbp)
.L5:
	movl	-56(%rbp), %eax
	cmpl	%eax, -32(%rbp)
	jle	.L6
	movl	$1, -24(%rbp)
	jmp	.L7
.L14:
	movl	$1, -32(%rbp)
	jmp	.L8
.L13:
	movl	$1, -28(%rbp)
	jmp	.L9
.L12:
	movl	$1, -20(%rbp)
	jmp	.L10
.L11:
	movl	-28(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	cltq
	movl	-32(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$2704, %rax, %rsi
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %esi
	movl	-24(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-20(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	movl	-32(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$2704, %rax, %rdi
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdi, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-24(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-28(%rbp), %eax
	movslq	%eax, %rdi
	movslq	%edx, %rax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$2704, %rax, %r8
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%r8, %rax
	addq	%rdi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %eax
	imull	%ecx, %eax
	leal	(%rsi,%rax), %ecx
	movl	-28(%rbp), %eax
	movslq	%eax, %rsi
	movl	-24(%rbp), %eax
	cltq
	movl	-32(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$2704, %rax, %rdi
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdi, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -20(%rbp)
.L10:
	movl	-56(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jle	.L11
	movl	-28(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	cltq
	movl	-32(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$2704, %rax, %rsi
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-52(%rbp), %ecx
	cltd
	idivl	%ecx
	movl	%edx, %ecx
	movl	-28(%rbp), %eax
	movslq	%eax, %rsi
	movl	-24(%rbp), %eax
	cltq
	movl	-32(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$2704, %rax, %rdi
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdi, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -28(%rbp)
.L9:
	movl	-56(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jle	.L12
	addl	$1, -32(%rbp)
.L8:
	movl	-56(%rbp), %eax
	cmpl	%eax, -32(%rbp)
	jle	.L13
	addl	$1, -24(%rbp)
.L7:
	movl	-24(%rbp), %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	-36(%rbp), %eax
	cmpl	%eax, %edx
	jle	.L14
	movl	$0, -16(%rbp)
	movl	$1, -12(%rbp)
	movl	$0, -24(%rbp)
	jmp	.L15
.L23:
	movl	-36(%rbp), %edx
	movl	-24(%rbp), %eax
	movl	%eax, %ecx
	sarl	%cl, %edx
	movl	%edx, %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L16
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$4, %rax
	leaq	s(%rip), %rdx
	addq	%rdx, %rax
	movl	$208, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$1, -32(%rbp)
	jmp	.L17
.L20:
	movl	$1, -28(%rbp)
	jmp	.L18
.L19:
	movl	-28(%rbp), %eax
	movslq	%eax, %rcx
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	s(%rip), %rax
	movl	(%rdx,%rax), %esi
	movl	-32(%rbp), %eax
	movslq	%eax, %rcx
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	s(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-28(%rbp), %eax
	movslq	%eax, %rdi
	movl	-24(%rbp), %eax
	cltq
	movl	-32(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$2704, %rax, %r8
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%r8, %rax
	addq	%rdi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %eax
	imull	%ecx, %eax
	leal	(%rsi,%rax), %ecx
	movl	-28(%rbp), %eax
	movslq	%eax, %rsi
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	s(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -28(%rbp)
.L18:
	movl	-56(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jle	.L19
	addl	$1, -32(%rbp)
.L17:
	movl	-56(%rbp), %eax
	cmpl	%eax, -32(%rbp)
	jle	.L20
	movl	$1, -32(%rbp)
	jmp	.L21
.L22:
	movl	-32(%rbp), %eax
	movslq	%eax, %rcx
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	s(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-52(%rbp), %ecx
	cltd
	idivl	%ecx
	movl	%edx, %ecx
	movl	-32(%rbp), %eax
	movslq	%eax, %rsi
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	s(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -32(%rbp)
.L21:
	movl	-56(%rbp), %eax
	cmpl	%eax, -32(%rbp)
	jle	.L22
	movl	-12(%rbp), %eax
	movl	%eax, -16(%rbp)
	cmpl	$0, -12(%rbp)
	sete	%al
	movzbl	%al, %eax
	movl	%eax, -12(%rbp)
.L16:
	addl	$1, -24(%rbp)
.L15:
	movl	-24(%rbp), %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	-36(%rbp), %eax
	cmpl	%eax, %edx
	jle	.L23
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	4+s(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$2, -32(%rbp)
	jmp	.L24
.L25:
	movl	-32(%rbp), %eax
	movslq	%eax, %rcx
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	s(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -32(%rbp)
.L24:
	movl	-56(%rbp), %eax
	cmpl	%eax, -32(%rbp)
	jle	.L25
	movl	$10, %edi
	call	putchar@PLT
.L2:
	leaq	-40(%rbp), %r8
	leaq	-44(%rbp), %rdi
	leaq	-48(%rbp), %rcx
	leaq	-52(%rbp), %rdx
	leaq	-56(%rbp), %rax
	subq	$8, %rsp
	leaq	-36(%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
	testl	%eax, %eax
	je	.L26
	movl	-56(%rbp), %eax
	testl	%eax, %eax
	jg	.L27
.L26:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L29
	call	__stack_chk_fail@PLT
.L29:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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	s
	.bss
	.align 32
	.type	s, @object
	.size	s, 416
s:
	.zero	416
	.globl	d
	.align 32
	.type	d, @object
	.size	d, 346112
d:
	.zero	346112
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	" %d"
.LC2:
	.string	"%d%d%d%d%d%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L2
.L27:
	movl	$346112, %edx
	movl	$0, %esi
	leaq	d(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$1, -32(%rbp)
	jmp	.L3
.L4:
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	s(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -32(%rbp)
.L3:
	movl	-56(%rbp), %eax
	cmpl	%eax, -32(%rbp)
	jle	.L4
	movl	$1, -32(%rbp)
	jmp	.L5
.L6:
	movl	-32(%rbp), %eax
	addl	$1, %eax
	movl	-48(%rbp), %ecx
	movslq	%eax, %rsi
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-44(%rbp), %edx
	movl	-32(%rbp), %eax
	cltq
	imulq	$212, %rax, %rax
	leaq	d(%rip), %rcx
	movl	%edx, (%rax,%rcx)
	movl	-32(%rbp), %eax
	subl	$1, %eax
	movl	-40(%rbp), %ecx
	movslq	%eax, %rsi
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -32(%rbp)
.L5:
	movl	-56(%rbp), %eax
	cmpl	%eax, -32(%rbp)
	jle	.L6
	movl	$1, -24(%rbp)
	jmp	.L7
.L14:
	movl	$1, -32(%rbp)
	jmp	.L8
.L13:
	movl	$1, -28(%rbp)
	jmp	.L9
.L12:
	movl	$1, -20(%rbp)
	jmp	.L10
.L11:
	movl	-28(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	cltq
	movl	-32(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$2704, %rax, %rsi
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %esi
	movl	-24(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-20(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	movl	-32(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$2704, %rax, %rdi
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdi, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-24(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-28(%rbp), %eax
	movslq	%eax, %rdi
	movslq	%edx, %rax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$2704, %rax, %r8
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%r8, %rax
	addq	%rdi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %eax
	imull	%ecx, %eax
	leal	(%rsi,%rax), %ecx
	movl	-28(%rbp), %eax
	movslq	%eax, %rsi
	movl	-24(%rbp), %eax
	cltq
	movl	-32(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$2704, %rax, %rdi
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdi, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -20(%rbp)
.L10:
	movl	-56(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jle	.L11
	movl	-28(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	cltq
	movl	-32(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$2704, %rax, %rsi
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-52(%rbp), %ecx
	cltd
	idivl	%ecx
	movl	%edx, %ecx
	movl	-28(%rbp), %eax
	movslq	%eax, %rsi
	movl	-24(%rbp), %eax
	cltq
	movl	-32(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$2704, %rax, %rdi
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdi, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -28(%rbp)
.L9:
	movl	-56(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jle	.L12
	addl	$1, -32(%rbp)
.L8:
	movl	-56(%rbp), %eax
	cmpl	%eax, -32(%rbp)
	jle	.L13
	addl	$1, -24(%rbp)
.L7:
	movl	-24(%rbp), %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	-36(%rbp), %eax
	cmpl	%eax, %edx
	jle	.L14
	movl	$0, -16(%rbp)
	movl	$1, -12(%rbp)
	movl	$0, -24(%rbp)
	jmp	.L15
.L23:
	movl	-36(%rbp), %edx
	movl	-24(%rbp), %eax
	movl	%eax, %ecx
	sarl	%cl, %edx
	movl	%edx, %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L16
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$4, %rax
	leaq	s(%rip), %rdx
	addq	%rdx, %rax
	movl	$208, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$1, -32(%rbp)
	jmp	.L17
.L20:
	movl	$1, -28(%rbp)
	jmp	.L18
.L19:
	movl	-28(%rbp), %eax
	movslq	%eax, %rcx
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	s(%rip), %rax
	movl	(%rdx,%rax), %esi
	movl	-32(%rbp), %eax
	movslq	%eax, %rcx
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	s(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-28(%rbp), %eax
	movslq	%eax, %rdi
	movl	-24(%rbp), %eax
	cltq
	movl	-32(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$2704, %rax, %r8
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%r8, %rax
	addq	%rdi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %eax
	imull	%ecx, %eax
	leal	(%rsi,%rax), %ecx
	movl	-28(%rbp), %eax
	movslq	%eax, %rsi
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	s(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -28(%rbp)
.L18:
	movl	-56(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jle	.L19
	addl	$1, -32(%rbp)
.L17:
	movl	-56(%rbp), %eax
	cmpl	%eax, -32(%rbp)
	jle	.L20
	movl	$1, -32(%rbp)
	jmp	.L21
.L22:
	movl	-32(%rbp), %eax
	movslq	%eax, %rcx
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	s(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-52(%rbp), %ecx
	cltd
	idivl	%ecx
	movl	%edx, %ecx
	movl	-32(%rbp), %eax
	movslq	%eax, %rsi
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	s(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -32(%rbp)
.L21:
	movl	-56(%rbp), %eax
	cmpl	%eax, -32(%rbp)
	jle	.L22
	movl	-12(%rbp), %eax
	movl	%eax, -16(%rbp)
	cmpl	$0, -12(%rbp)
	sete	%al
	movzbl	%al, %eax
	movl	%eax, -12(%rbp)
.L16:
	addl	$1, -24(%rbp)
.L15:
	movl	-24(%rbp), %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	-36(%rbp), %eax
	cmpl	%eax, %edx
	jle	.L23
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	4+s(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$2, -32(%rbp)
	jmp	.L24
.L25:
	movl	-32(%rbp), %eax
	movslq	%eax, %rcx
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	s(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -32(%rbp)
.L24:
	movl	-56(%rbp), %eax
	cmpl	%eax, -32(%rbp)
	jle	.L25
	movl	$10, %edi
	call	putchar@PLT
.L2:
	leaq	-40(%rbp), %r8
	leaq	-44(%rbp), %rdi
	leaq	-48(%rbp), %rcx
	leaq	-52(%rbp), %rdx
	leaq	-56(%rbp), %rax
	subq	$8, %rsp
	leaq	-36(%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
	testl	%eax, %eax
	je	.L26
	movl	-56(%rbp), %eax
	testl	%eax, %eax
	jg	.L27
.L26:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L29
	call	__stack_chk_fail@PLT
.L29:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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:
