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>
int main()
{
	int m[2][4],n,i,j,k,
		x[4][4]={{1,-1,-1,-1},{1,1,1,-1},{1,-1,1,1},{1,1,-1,1}},
		y[4][4]={{0,1,2,3},{1,0,3,2},{2,3,0,1},{3,2,1,0}};
	for(;scanf("%d",&n),n;)
	{
		for(;n--;)
		{
			for(i=0;i<2;i++)
				for(j=0;j<4;j++)
					scanf("%d",&m[i][j]);
			for(i=0;i<4;i++,printf("%d%s",k,i==4?"\n":" "))
				for(j=k=0;j<4;j++)
					k+=m[0][j]*m[1][y[i][j]]*x[i][j];
		}
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"\n"
.LC2:
	.string	" "
.LC3:
	.string	"%d%s"
	.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	$192, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$1, -144(%rbp)
	movl	$-1, -140(%rbp)
	movl	$-1, -136(%rbp)
	movl	$-1, -132(%rbp)
	movl	$1, -128(%rbp)
	movl	$1, -124(%rbp)
	movl	$1, -120(%rbp)
	movl	$-1, -116(%rbp)
	movl	$1, -112(%rbp)
	movl	$-1, -108(%rbp)
	movl	$1, -104(%rbp)
	movl	$1, -100(%rbp)
	movl	$1, -96(%rbp)
	movl	$1, -92(%rbp)
	movl	$-1, -88(%rbp)
	movl	$1, -84(%rbp)
	movl	$0, -80(%rbp)
	movl	$1, -76(%rbp)
	movl	$2, -72(%rbp)
	movl	$3, -68(%rbp)
	movl	$1, -64(%rbp)
	movl	$0, -60(%rbp)
	movl	$3, -56(%rbp)
	movl	$2, -52(%rbp)
	movl	$2, -48(%rbp)
	movl	$3, -44(%rbp)
	movl	$0, -40(%rbp)
	movl	$1, -36(%rbp)
	movl	$3, -32(%rbp)
	movl	$2, -28(%rbp)
	movl	$1, -24(%rbp)
	movl	$0, -20(%rbp)
	jmp	.L2
.L14:
	movl	$0, -188(%rbp)
	jmp	.L4
.L7:
	movl	$0, -184(%rbp)
	jmp	.L5
.L6:
	leaq	-176(%rbp), %rdx
	movl	-184(%rbp), %eax
	movslq	%eax, %rcx
	movl	-188(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rcx, %rax
	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, -184(%rbp)
.L5:
	cmpl	$3, -184(%rbp)
	jle	.L6
	addl	$1, -188(%rbp)
.L4:
	cmpl	$1, -188(%rbp)
	jle	.L7
	movl	$0, -188(%rbp)
	jmp	.L8
.L13:
	movl	$0, -180(%rbp)
	movl	-180(%rbp), %eax
	movl	%eax, -184(%rbp)
	jmp	.L9
.L10:
	movl	-184(%rbp), %eax
	cltq
	movl	-176(%rbp,%rax,4), %edx
	movl	-184(%rbp), %eax
	movslq	%eax, %rcx
	movl	-188(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rcx, %rax
	movl	-80(%rbp,%rax,4), %eax
	cltq
	addq	$4, %rax
	movl	-176(%rbp,%rax,4), %eax
	imull	%eax, %edx
	movl	-184(%rbp), %eax
	movslq	%eax, %rcx
	movl	-188(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rcx, %rax
	movl	-144(%rbp,%rax,4), %eax
	imull	%edx, %eax
	addl	%eax, -180(%rbp)
	addl	$1, -184(%rbp)
.L9:
	cmpl	$3, -184(%rbp)
	jle	.L10
	addl	$1, -188(%rbp)
	cmpl	$4, -188(%rbp)
	jne	.L11
	leaq	.LC1(%rip), %rax
	jmp	.L12
.L11:
	leaq	.LC2(%rip), %rax
.L12:
	movl	-180(%rbp), %ecx
	movq	%rax, %rdx
	movl	%ecx, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L8:
	cmpl	$3, -188(%rbp)
	jle	.L13
.L3:
	movl	-192(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -192(%rbp)
	testl	%eax, %eax
	jne	.L14
.L2:
	leaq	-192(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-192(%rbp), %eax
	testl	%eax, %eax
	jne	.L3
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	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
.LC8:
	.string	"%d"
.LC9:
	.string	"\n"
.LC10:
	.string	"%d%s"
.LC11:
	.string	" "
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC11(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	.LC8(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	.LC10(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$264, %rsp
	.cfi_def_cfa_offset 320
	movdqa	.LC0(%rip), %xmm0
	movq	%fs:40, %rax
	movq	%rax, 248(%rsp)
	xorl	%eax, %eax
	leaq	76(%rsp), %rax
	movaps	%xmm0, 112(%rsp)
	movdqa	.LC1(%rip), %xmm0
	movq	%rax, 56(%rsp)
	movaps	%xmm0, 128(%rsp)
	movdqa	.LC2(%rip), %xmm0
	movaps	%xmm0, 144(%rsp)
	movdqa	.LC3(%rip), %xmm0
	movaps	%xmm0, 160(%rsp)
	movdqa	.LC4(%rip), %xmm0
	movaps	%xmm0, 176(%rsp)
	movdqa	.LC5(%rip), %xmm0
	movaps	%xmm0, 192(%rsp)
	movdqa	.LC6(%rip), %xmm0
	movaps	%xmm0, 208(%rsp)
	movdqa	.LC7(%rip), %xmm0
	movaps	%xmm0, 224(%rsp)
.L2:
	movq	56(%rsp), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	76(%rsp), %eax
	testl	%eax, %eax
	je	.L16
	subl	$1, %eax
	leaq	96(%rsp), %rbx
	movl	%eax, 76(%rsp)
	leaq	80(%rsp), %rax
	movq	%rax, 16(%rsp)
	leaq	100(%rsp), %rax
	movq	%rax, 32(%rsp)
	leaq	104(%rsp), %rax
	movq	%rax, 40(%rsp)
	leaq	108(%rsp), %rax
	movq	%rax, 48(%rsp)
	leaq	176(%rsp), %rax
	movq	%rax, 24(%rsp)
	leaq	112(%rsp), %rax
	movq	%rax, 8(%rsp)
	leaq	240(%rsp), %rax
	movq	%rax, (%rsp)
	.p2align 4,,10
	.p2align 3
.L8:
	movq	16(%rsp), %rbp
.L5:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addq	$4, %rbp
	call	__isoc99_scanf@PLT
	cmpq	%rbp, %rbx
	jne	.L5
	movq	%rbx, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	32(%rsp), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	40(%rsp), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	48(%rsp), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	24(%rsp), %rbp
	movq	8(%rsp), %rax
	movq	%rbp, %r14
	movq	%rax, %rbp
.L6:
	movslq	(%r14), %rax
	addq	$16, %rbp
	addq	$16, %r14
	movl	96(%rsp,%rax,4), %edx
	movslq	-12(%r14), %rax
	imull	80(%rsp), %edx
	movl	96(%rsp,%rax,4), %eax
	imull	-16(%rbp), %edx
	imull	84(%rsp), %eax
	imull	-12(%rbp), %eax
	addl	%eax, %edx
	movslq	-8(%r14), %rax
	movl	96(%rsp,%rax,4), %eax
	imull	88(%rsp), %eax
	imull	-8(%rbp), %eax
	addl	%edx, %eax
	movslq	-4(%r14), %rdx
	movl	96(%rsp,%rdx,4), %edx
	imull	92(%rsp), %edx
	imull	-4(%rbp), %edx
	addl	%eax, %edx
	cmpq	(%rsp), %r14
	je	.L17
	movq	%r15, %rcx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L17:
	leaq	.LC9(%rip), %rcx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	76(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 76(%rsp)
	testl	%eax, %eax
	jne	.L8
	jmp	.L2
.L16:
	movq	248(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	addq	$264, %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
.L18:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	1
	.long	-1
	.long	-1
	.long	-1
	.align 16
.LC1:
	.long	1
	.long	1
	.long	1
	.long	-1
	.align 16
.LC2:
	.long	1
	.long	-1
	.long	1
	.long	1
	.align 16
.LC3:
	.long	1
	.long	1
	.long	-1
	.long	1
	.align 16
.LC4:
	.long	0
	.long	1
	.long	2
	.long	3
	.align 16
.LC5:
	.long	1
	.long	0
	.long	3
	.long	2
	.align 16
.LC6:
	.long	2
	.long	3
	.long	0
	.long	1
	.align 16
.LC7:
	.long	3
	.long	2
	.long	1
	.long	0
	.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
.LC8:
	.string	"%d"
.LC9:
	.string	"\n"
.LC10:
	.string	"%d%s"
.LC11:
	.string	" "
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC11(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	.LC8(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	.LC10(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$264, %rsp
	.cfi_def_cfa_offset 320
	movdqa	.LC0(%rip), %xmm0
	movq	%fs:40, %rax
	movq	%rax, 248(%rsp)
	xorl	%eax, %eax
	leaq	76(%rsp), %rax
	movaps	%xmm0, 112(%rsp)
	movdqa	.LC1(%rip), %xmm0
	movq	%rax, 56(%rsp)
	movaps	%xmm0, 128(%rsp)
	movdqa	.LC2(%rip), %xmm0
	movaps	%xmm0, 144(%rsp)
	movdqa	.LC3(%rip), %xmm0
	movaps	%xmm0, 160(%rsp)
	movdqa	.LC4(%rip), %xmm0
	movaps	%xmm0, 176(%rsp)
	movdqa	.LC5(%rip), %xmm0
	movaps	%xmm0, 192(%rsp)
	movdqa	.LC6(%rip), %xmm0
	movaps	%xmm0, 208(%rsp)
	movdqa	.LC7(%rip), %xmm0
	movaps	%xmm0, 224(%rsp)
.L2:
	movq	56(%rsp), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	76(%rsp), %eax
	testl	%eax, %eax
	je	.L16
	subl	$1, %eax
	leaq	96(%rsp), %rbx
	movl	%eax, 76(%rsp)
	leaq	80(%rsp), %rax
	movq	%rax, 16(%rsp)
	leaq	100(%rsp), %rax
	movq	%rax, 32(%rsp)
	leaq	104(%rsp), %rax
	movq	%rax, 40(%rsp)
	leaq	108(%rsp), %rax
	movq	%rax, 48(%rsp)
	leaq	176(%rsp), %rax
	movq	%rax, 24(%rsp)
	leaq	112(%rsp), %rax
	movq	%rax, 8(%rsp)
	leaq	240(%rsp), %rax
	movq	%rax, (%rsp)
	.p2align 4,,10
	.p2align 3
.L8:
	movq	16(%rsp), %rbp
.L5:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addq	$4, %rbp
	call	__isoc99_scanf@PLT
	cmpq	%rbp, %rbx
	jne	.L5
	movq	%rbx, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	32(%rsp), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	40(%rsp), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	48(%rsp), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	24(%rsp), %rbp
	movq	8(%rsp), %rax
	movq	%rbp, %r14
	movq	%rax, %rbp
.L6:
	movslq	(%r14), %rax
	addq	$16, %rbp
	addq	$16, %r14
	movl	96(%rsp,%rax,4), %edx
	movslq	-12(%r14), %rax
	imull	80(%rsp), %edx
	movl	96(%rsp,%rax,4), %eax
	imull	-16(%rbp), %edx
	imull	84(%rsp), %eax
	imull	-12(%rbp), %eax
	addl	%eax, %edx
	movslq	-8(%r14), %rax
	movl	96(%rsp,%rax,4), %eax
	imull	88(%rsp), %eax
	imull	-8(%rbp), %eax
	addl	%edx, %eax
	movslq	-4(%r14), %rdx
	movl	96(%rsp,%rdx,4), %edx
	imull	92(%rsp), %edx
	imull	-4(%rbp), %edx
	addl	%eax, %edx
	cmpq	(%rsp), %r14
	je	.L17
	movq	%r15, %rcx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L17:
	leaq	.LC9(%rip), %rcx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	76(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 76(%rsp)
	testl	%eax, %eax
	jne	.L8
	jmp	.L2
.L16:
	movq	248(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	addq	$264, %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
.L18:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	1
	.long	-1
	.long	-1
	.long	-1
	.align 16
.LC1:
	.long	1
	.long	1
	.long	1
	.long	-1
	.align 16
.LC2:
	.long	1
	.long	-1
	.long	1
	.long	1
	.align 16
.LC3:
	.long	1
	.long	1
	.long	-1
	.long	1
	.align 16
.LC4:
	.long	0
	.long	1
	.long	2
	.long	3
	.align 16
.LC5:
	.long	1
	.long	0
	.long	3
	.long	2
	.align 16
.LC6:
	.long	2
	.long	3
	.long	0
	.long	1
	.align 16
.LC7:
	.long	3
	.long	2
	.long	1
	.long	0
	.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>
int main()
{
	int m[2][4],n,i,j,k,
		x[4][4]={{1,-1,-1,-1},{1,1,1,-1},{1,-1,1,1},{1,1,-1,1}},
		y[4][4]={{0,1,2,3},{1,0,3,2},{2,3,0,1},{3,2,1,0}};
	for(;scanf("%d",&n),n;)
	{
		for(;n--;)
		{
			for(i=0;i<2;i++)
				for(j=0;j<4;j++)
					scanf("%d",&m[i][j]);
			for(i=0;i<4;i++,printf("%d%s",k,i==4?"\n":" "))
				for(j=k=0;j<4;j++)
					k+=m[0][j]*m[1][y[i][j]]*x[i][j];
		}
	}
	return 0;
}
2
1 2 3 4 7 6 7 8
5 6 4 8 3 2 3 4
0
 2
1 2 3 4 7 6 14 8
5 6 4 8 3 2 3 4
0
 2
1 3 3 4 7 6 14 8
5 6 4 8 3 2 3 4
0
 2
1 3 3 4 7 6 14 8
5 11 4 8 3 2 3 4
0
 2
1 3 3 7 7 6 14 8
5 11 4 8 3 2 3 4
0
 2
1 3 3 7 7 6 14 8
5 11 4 5 3 2 3 4
0
 2
1 3 3 7 7 6 14 8
5 11 7 5 3 2 3 4
0
 2
1 3 3 7 7 6 14 8
5 11 7 5 3 2 3 6
0
 2
1 1 3 7 7 6 14 8
5 11 7 5 3 2 3 6
0
 2
1 1 3 7 7 6 14 8
5 4 7 5 3 2 3 6
0

-58 16 36 32
-41 20 19 54
 -79 -12 43 46
-41 20 19 54
 -85 -5 35 60
-41 20 19 54
 -85 -5 35 60
-51 35 -1 69
 -109 -47 53 81
-51 35 -1 69
 -109 -47 53 81
-39 44 -7 60
 -109 -47 53 81
-48 56 2 54
 -109 -47 53 81
-58 70 -20 64
 -97 -61 69 53
-58 70 -20 64
 -97 -61 69 53
-44 49 22 43

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>
int main()
{
	int m[2][4],n,i,j,k,
		x[4][4]={{1,-1,-1,-1},{1,1,1,-1},{1,-1,1,1},{1,1,-1,1}},
		y[4][4]={{0,1,2,3},{1,0,3,2},{2,3,0,1},{3,2,1,0}};
	for(;scanf("%d",&n),n;)
	{
		for(;n--;)
		{
			for(i=0;i<2;i++)
				for(j=0;j<4;j++)
					scanf("%d",&m[i][j]);
			for(i=0;i<4;i++,printf("%d%s",k,i==4?"\n":" "))
				for(j=k=0;j<4;j++)
					k+=m[0][j]*m[1][y[i][j]]*x[i][j];
		}
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"\n"
.LC2:
	.string	" "
.LC3:
	.string	"%d%s"
	.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	$192, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$1, -144(%rbp)
	movl	$-1, -140(%rbp)
	movl	$-1, -136(%rbp)
	movl	$-1, -132(%rbp)
	movl	$1, -128(%rbp)
	movl	$1, -124(%rbp)
	movl	$1, -120(%rbp)
	movl	$-1, -116(%rbp)
	movl	$1, -112(%rbp)
	movl	$-1, -108(%rbp)
	movl	$1, -104(%rbp)
	movl	$1, -100(%rbp)
	movl	$1, -96(%rbp)
	movl	$1, -92(%rbp)
	movl	$-1, -88(%rbp)
	movl	$1, -84(%rbp)
	movl	$0, -80(%rbp)
	movl	$1, -76(%rbp)
	movl	$2, -72(%rbp)
	movl	$3, -68(%rbp)
	movl	$1, -64(%rbp)
	movl	$0, -60(%rbp)
	movl	$3, -56(%rbp)
	movl	$2, -52(%rbp)
	movl	$2, -48(%rbp)
	movl	$3, -44(%rbp)
	movl	$0, -40(%rbp)
	movl	$1, -36(%rbp)
	movl	$3, -32(%rbp)
	movl	$2, -28(%rbp)
	movl	$1, -24(%rbp)
	movl	$0, -20(%rbp)
	jmp	.L2
.L14:
	movl	$0, -188(%rbp)
	jmp	.L4
.L7:
	movl	$0, -184(%rbp)
	jmp	.L5
.L6:
	leaq	-176(%rbp), %rdx
	movl	-184(%rbp), %eax
	movslq	%eax, %rcx
	movl	-188(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rcx, %rax
	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, -184(%rbp)
.L5:
	cmpl	$3, -184(%rbp)
	jle	.L6
	addl	$1, -188(%rbp)
.L4:
	cmpl	$1, -188(%rbp)
	jle	.L7
	movl	$0, -188(%rbp)
	jmp	.L8
.L13:
	movl	$0, -180(%rbp)
	movl	-180(%rbp), %eax
	movl	%eax, -184(%rbp)
	jmp	.L9
.L10:
	movl	-184(%rbp), %eax
	cltq
	movl	-176(%rbp,%rax,4), %edx
	movl	-184(%rbp), %eax
	movslq	%eax, %rcx
	movl	-188(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rcx, %rax
	movl	-80(%rbp,%rax,4), %eax
	cltq
	addq	$4, %rax
	movl	-176(%rbp,%rax,4), %eax
	imull	%eax, %edx
	movl	-184(%rbp), %eax
	movslq	%eax, %rcx
	movl	-188(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rcx, %rax
	movl	-144(%rbp,%rax,4), %eax
	imull	%edx, %eax
	addl	%eax, -180(%rbp)
	addl	$1, -184(%rbp)
.L9:
	cmpl	$3, -184(%rbp)
	jle	.L10
	addl	$1, -188(%rbp)
	cmpl	$4, -188(%rbp)
	jne	.L11
	leaq	.LC1(%rip), %rax
	jmp	.L12
.L11:
	leaq	.LC2(%rip), %rax
.L12:
	movl	-180(%rbp), %ecx
	movq	%rax, %rdx
	movl	%ecx, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L8:
	cmpl	$3, -188(%rbp)
	jle	.L13
.L3:
	movl	-192(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -192(%rbp)
	testl	%eax, %eax
	jne	.L14
.L2:
	leaq	-192(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-192(%rbp), %eax
	testl	%eax, %eax
	jne	.L3
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	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
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"\n"
.LC2:
	.string	" "
.LC3:
	.string	"%d%s"
	.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	$192, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$1, -144(%rbp)
	movl	$-1, -140(%rbp)
	movl	$-1, -136(%rbp)
	movl	$-1, -132(%rbp)
	movl	$1, -128(%rbp)
	movl	$1, -124(%rbp)
	movl	$1, -120(%rbp)
	movl	$-1, -116(%rbp)
	movl	$1, -112(%rbp)
	movl	$-1, -108(%rbp)
	movl	$1, -104(%rbp)
	movl	$1, -100(%rbp)
	movl	$1, -96(%rbp)
	movl	$1, -92(%rbp)
	movl	$-1, -88(%rbp)
	movl	$1, -84(%rbp)
	movl	$0, -80(%rbp)
	movl	$1, -76(%rbp)
	movl	$2, -72(%rbp)
	movl	$3, -68(%rbp)
	movl	$1, -64(%rbp)
	movl	$0, -60(%rbp)
	movl	$3, -56(%rbp)
	movl	$2, -52(%rbp)
	movl	$2, -48(%rbp)
	movl	$3, -44(%rbp)
	movl	$0, -40(%rbp)
	movl	$1, -36(%rbp)
	movl	$3, -32(%rbp)
	movl	$2, -28(%rbp)
	movl	$1, -24(%rbp)
	movl	$0, -20(%rbp)
	jmp	.L2
.L14:
	movl	$0, -188(%rbp)
	jmp	.L4
.L7:
	movl	$0, -184(%rbp)
	jmp	.L5
.L6:
	leaq	-176(%rbp), %rdx
	movl	-184(%rbp), %eax
	movslq	%eax, %rcx
	movl	-188(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rcx, %rax
	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, -184(%rbp)
.L5:
	cmpl	$3, -184(%rbp)
	jle	.L6
	addl	$1, -188(%rbp)
.L4:
	cmpl	$1, -188(%rbp)
	jle	.L7
	movl	$0, -188(%rbp)
	jmp	.L8
.L13:
	movl	$0, -180(%rbp)
	movl	-180(%rbp), %eax
	movl	%eax, -184(%rbp)
	jmp	.L9
.L10:
	movl	-184(%rbp), %eax
	cltq
	movl	-176(%rbp,%rax,4), %edx
	movl	-184(%rbp), %eax
	movslq	%eax, %rcx
	movl	-188(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rcx, %rax
	movl	-80(%rbp,%rax,4), %eax
	cltq
	addq	$4, %rax
	movl	-176(%rbp,%rax,4), %eax
	imull	%eax, %edx
	movl	-184(%rbp), %eax
	movslq	%eax, %rcx
	movl	-188(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rcx, %rax
	movl	-144(%rbp,%rax,4), %eax
	imull	%edx, %eax
	addl	%eax, -180(%rbp)
	addl	$1, -184(%rbp)
.L9:
	cmpl	$3, -184(%rbp)
	jle	.L10
	addl	$1, -188(%rbp)
	cmpl	$4, -188(%rbp)
	jne	.L11
	leaq	.LC1(%rip), %rax
	jmp	.L12
.L11:
	leaq	.LC2(%rip), %rax
.L12:
	movl	-180(%rbp), %ecx
	movq	%rax, %rdx
	movl	%ecx, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L8:
	cmpl	$3, -188(%rbp)
	jle	.L13
.L3:
	movl	-192(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -192(%rbp)
	testl	%eax, %eax
	jne	.L14
.L2:
	leaq	-192(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-192(%rbp), %eax
	testl	%eax, %eax
	jne	.L3
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	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:
