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(void){
	int h,w,i,j,k,save=0,ari=0;
	scanf("%d %d",&h,&w);
	char a[h][w+1];
	int ans[h][w];
	for(i=0;i<h;i++){
		scanf("%s",a[i]);
	}
	
//	
	for(i=0;i<h;i++){
		for(j=0;j<w;j++){
			ans[i][j]=-1;
		}
	}
//
	
	for(i=0;i<h;i++){
		for(j=0;j<w;j++){
			if(a[i][j]=='c'){
				ans[i][j]=0;
				save=0;
				ari=1;
			}
			else{
				if(ari==1){
					ans[i][j]=++save;
				}
			}
		}
		save=0;
		ari=0;
	}
	
	
	
	for(i=0;i<h;i++){
		for(j=0;j<w-1;j++){
			printf("%d ",ans[i][j]);
		}
		printf("%d\n",ans[i][j]);
	}
	return 0;
}	```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d "
.LC3:
	.string	"%d\n"
	.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
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$232, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, -264(%rbp)
	movl	$0, -112(%rbp)
	movl	$0, -108(%rbp)
	leaq	-124(%rbp), %rdx
	leaq	-128(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-124(%rbp), %eax
	leal	1(%rax), %esi
	movl	-128(%rbp), %edi
	movslq	%esi, %rax
	subq	$1, %rax
	movq	%rax, -104(%rbp)
	movslq	%esi, %rax
	movq	%rax, -144(%rbp)
	movq	$0, -136(%rbp)
	movslq	%esi, %rax
	movq	%rax, -144(%rbp)
	movslq	%edi, %rax
	subq	$1, %rax
	movq	%rax, -96(%rbp)
	movslq	%esi, %rax
	movq	%rax, %r14
	movl	$0, %r15d
	movslq	%edi, %rax
	movq	%rax, %r12
	movl	$0, %r13d
	movq	%r15, %rdx
	imulq	%r12, %rdx
	movq	%r13, %rax
	imulq	%r14, %rax
	leaq	(%rdx,%rax), %rcx
	movq	%r14, %rax
	mulq	%r12
	addq	%rdx, %rcx
	movq	%rcx, %rdx
	movslq	%esi, %rax
	movq	%rax, -160(%rbp)
	movq	$0, -152(%rbp)
	movslq	%edi, %rax
	movq	%rax, -176(%rbp)
	movq	$0, -168(%rbp)
	movq	-160(%rbp), %r8
	movq	-152(%rbp), %r9
	movq	%r9, %rdx
	movq	-176(%rbp), %r10
	movq	-168(%rbp), %r11
	imulq	%r10, %rdx
	movq	%r11, %rax
	imulq	%r8, %rax
	leaq	(%rdx,%rax), %rcx
	movq	%r8, %rax
	mulq	%r10
	addq	%rdx, %rcx
	movq	%rcx, %rdx
	movslq	%esi, %rdx
	movslq	%edi, %rax
	imulq	%rdx, %rax
	movl	$16, %edx
	subq	$1, %rdx
	addq	%rdx, %rax
	movl	$16, %ebx
	movl	$0, %edx
	divq	%rbx
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L2:
	cmpq	%rdx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L4
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$0, %rax
	movq	%rax, -88(%rbp)
	movl	-124(%rbp), %esi
	movl	-128(%rbp), %edi
	movslq	%esi, %rax
	subq	$1, %rax
	movq	%rax, -80(%rbp)
	movslq	%esi, %rax
	movq	%rax, -256(%rbp)
	movq	$0, -248(%rbp)
	movslq	%esi, %rax
	leaq	0(,%rax,4), %rbx
	movslq	%edi, %rax
	subq	$1, %rax
	movq	%rax, -72(%rbp)
	movslq	%esi, %rax
	movq	%rax, -192(%rbp)
	movq	$0, -184(%rbp)
	movslq	%edi, %rax
	movq	%rax, -208(%rbp)
	movq	$0, -200(%rbp)
	movq	-192(%rbp), %r10
	movq	-184(%rbp), %r11
	movq	%r11, %rdx
	movq	-208(%rbp), %r8
	movq	-200(%rbp), %r9
	imulq	%r8, %rdx
	movq	%r9, %rax
	imulq	%r10, %rax
	leaq	(%rdx,%rax), %rcx
	movq	%r10, %rax
	mulq	%r8
	addq	%rdx, %rcx
	movq	%rcx, %rdx
	movslq	%esi, %rax
	movq	%rax, -224(%rbp)
	movq	$0, -216(%rbp)
	movslq	%edi, %rax
	movq	%rax, -240(%rbp)
	movq	$0, -232(%rbp)
	movq	-224(%rbp), %r8
	movq	-216(%rbp), %r9
	movq	%r9, %rdx
	movq	-240(%rbp), %r14
	movq	-232(%rbp), %r15
	imulq	%r14, %rdx
	movq	%r15, %rax
	imulq	%r8, %rax
	leaq	(%rdx,%rax), %rcx
	movq	%r8, %rax
	mulq	%r14
	addq	%rdx, %rcx
	movq	%rcx, %rdx
	movslq	%esi, %rdx
	movslq	%edi, %rax
	imulq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L5:
	cmpq	%rdx, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L6:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L7
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L7:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -120(%rbp)
	jmp	.L8
.L9:
	movl	-120(%rbp), %eax
	cltq
	imulq	-144(%rbp), %rax
	movq	%rax, %rdx
	movq	-88(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -120(%rbp)
.L8:
	movl	-128(%rbp), %eax
	cmpl	%eax, -120(%rbp)
	jl	.L9
	movl	$0, -120(%rbp)
	jmp	.L10
.L13:
	movl	$0, -116(%rbp)
	jmp	.L11
.L12:
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movq	-64(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rsi
	movl	-120(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	$-1, (%rax,%rdx,4)
	addl	$1, -116(%rbp)
.L11:
	movl	-124(%rbp), %eax
	cmpl	%eax, -116(%rbp)
	jl	.L12
	addl	$1, -120(%rbp)
.L10:
	movl	-128(%rbp), %eax
	cmpl	%eax, -120(%rbp)
	jl	.L13
	movl	$0, -120(%rbp)
	jmp	.L14
.L19:
	movl	$0, -116(%rbp)
	jmp	.L15
.L18:
	movq	-88(%rbp), %rcx
	movl	-116(%rbp), %eax
	movslq	%eax, %rdx
	movl	-120(%rbp), %eax
	cltq
	imulq	-144(%rbp), %rax
	addq	%rcx, %rdx
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$99, %al
	jne	.L16
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movq	-64(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rsi
	movl	-120(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	$0, (%rax,%rdx,4)
	movl	$0, -112(%rbp)
	movl	$1, -108(%rbp)
	jmp	.L17
.L16:
	cmpl	$1, -108(%rbp)
	jne	.L17
	addl	$1, -112(%rbp)
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movq	-64(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rsi
	movl	-120(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	leaq	(%rsi,%rdx), %rcx
	movl	-112(%rbp), %edx
	movl	%edx, (%rax,%rcx,4)
.L17:
	addl	$1, -116(%rbp)
.L15:
	movl	-124(%rbp), %eax
	cmpl	%eax, -116(%rbp)
	jl	.L18
	movl	$0, -112(%rbp)
	movl	$0, -108(%rbp)
	addl	$1, -120(%rbp)
.L14:
	movl	-128(%rbp), %eax
	cmpl	%eax, -120(%rbp)
	jl	.L19
	movl	$0, -120(%rbp)
	jmp	.L20
.L23:
	movl	$0, -116(%rbp)
	jmp	.L21
.L22:
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movq	-64(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rsi
	movl	-120(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	(%rax,%rdx,4), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -116(%rbp)
.L21:
	movl	-124(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -116(%rbp)
	jl	.L22
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movq	-64(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rsi
	movl	-120(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	(%rax,%rdx,4), %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -120(%rbp)
.L20:
	movl	-128(%rbp), %eax
	cmpl	%eax, -120(%rbp)
	jl	.L23
	movl	$0, %eax
	movq	-264(%rbp), %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L25
	call	__stack_chk_fail@PLT
.L25:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.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 %d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d "
.LC3:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rdi
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	leaq	-60(%rbp), %rdx
	leaq	-64(%rbp), %rsi
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-60(%rbp), %rcx
	movslq	-64(%rbp), %rdi
	movq	%rsp, %r9
	leal	1(%rcx), %ebx
	movq	%rdi, %r8
	movslq	%ebx, %rbx
	movq	%rbx, %rdx
	imulq	%rdi, %rdx
	leaq	15(%rdx), %rax
	movq	%rax, %rsi
	andq	$-4096, %rax
	subq	%rax, %r9
	andq	$-16, %rsi
	cmpq	%r9, %rsp
	je	.L3
.L39:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%r9, %rsp
	jne	.L39
.L3:
	andl	$4095, %esi
	subq	%rsi, %rsp
	testq	%rsi, %rsi
	jne	.L40
.L4:
	subq	%rdi, %rdx
	movq	%rsp, -88(%rbp)
	leaq	0(,%rcx,4), %r13
	movq	%rsp, %rcx
	leaq	15(,%rdx,4), %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	andq	$-16, %rdx
	subq	%rax, %rcx
.L5:
	cmpq	%rcx, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L40:
	orq	$0, -8(%rsp,%rsi)
	jmp	.L4
.L6:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L41
.L7:
	movq	%rsp, -80(%rbp)
	testl	%r8d, %r8d
	jle	.L8
	movq	-88(%rbp), %r15
	xorl	%r14d, %r14d
	leaq	.LC1(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%r15, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %r14d
	call	__isoc99_scanf@PLT
	movl	-64(%rbp), %ecx
	addq	%rbx, %r15
	cmpl	%r14d, %ecx
	jg	.L9
	testl	%ecx, %ecx
	jle	.L8
	movl	-60(%rbp), %r14d
	testl	%r14d, %r14d
	jle	.L20
	movslq	%r14d, %r12
	movq	-80(%rbp), %rdi
	xorl	%r15d, %r15d
	salq	$2, %r12
	.p2align 4,,10
	.p2align 3
.L11:
	movq	%r12, %rdx
	movl	$255, %esi
	movl	%ecx, -72(%rbp)
	addl	$1, %r15d
	call	memset@PLT
	movl	-72(%rbp), %ecx
	movq	%rax, %rdi
	addq	%r13, %rdi
	cmpl	%r15d, %ecx
	jne	.L11
	movq	-88(%rbp), %r15
	leal	-1(%r14), %r9d
	movq	-80(%rbp), %r10
	movl	%r14d, %r14d
	xorl	%r8d, %r8d
	addq	%r14, %r15
	.p2align 4,,10
	.p2align 3
.L21:
	movq	%r15, %rax
	movq	%r10, %rdx
	xorl	%edi, %edi
	xorl	%esi, %esi
	subq	%r9, %rax
	subq	$1, %rax
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L13:
	cmpl	$1, %edi
	jne	.L14
	addl	$1, %esi
	movl	%esi, (%rdx)
.L14:
	addq	$1, %rax
	addq	$4, %rdx
	cmpq	%r15, %rax
	je	.L42
.L15:
	cmpb	$99, (%rax)
	jne	.L13
	addq	$1, %rax
	movl	$0, (%rdx)
	xorl	%esi, %esi
	addq	$4, %rdx
	movl	$1, %edi
	cmpq	%r15, %rax
	jne	.L15
.L42:
	addl	$1, %r8d
	addq	%rbx, %r15
	addq	%r13, %r10
	cmpl	%r8d, %ecx
	jne	.L21
.L20:
	movq	%r13, %rax
	xorl	%r12d, %r12d
	leaq	.LC2(%rip), %rbx
	shrq	$2, %rax
	movq	%rax, -88(%rbp)
	movq	-80(%rbp), %rax
	movq	%rax, -72(%rbp)
	.p2align 4,,10
	.p2align 3
.L16:
	xorl	%r15d, %r15d
	cmpl	$1, -60(%rbp)
	movq	-72(%rbp), %r14
	jle	.L19
	.p2align 4,,10
	.p2align 3
.L17:
	movl	(%r14), %edx
	movq	%rbx, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addl	$1, %r15d
	addq	$4, %r14
	call	__printf_chk@PLT
	movl	-60(%rbp), %eax
	subl	$1, %eax
	cmpl	%r15d, %eax
	jg	.L17
.L19:
	movslq	%r12d, %rax
	imulq	-88(%rbp), %rax
	movslq	%r15d, %rcx
	movl	$1, %edi
	leaq	.LC3(%rip), %rsi
	addl	$1, %r12d
	addq	%rax, %rcx
	movq	-80(%rbp), %rax
	movl	(%rax,%rcx,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	%r13, -72(%rbp)
	cmpl	%r12d, -64(%rbp)
	jg	.L16
.L18:
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L43
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L8:
	.cfi_restore_state
	cmpl	$0, -64(%rbp)
	jle	.L18
	jmp	.L20
.L41:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L7
.L43:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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:

rule
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d "
.LC3:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rdi
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	leaq	-60(%rbp), %rdx
	leaq	-64(%rbp), %rsi
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-60(%rbp), %rcx
	movslq	-64(%rbp), %rdi
	movq	%rsp, %r9
	leal	1(%rcx), %ebx
	movq	%rdi, %r8
	movslq	%ebx, %rbx
	movq	%rbx, %rdx
	imulq	%rdi, %rdx
	leaq	15(%rdx), %rax
	movq	%rax, %rsi
	andq	$-4096, %rax
	subq	%rax, %r9
	andq	$-16, %rsi
	cmpq	%r9, %rsp
	je	.L3
.L39:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%r9, %rsp
	jne	.L39
.L3:
	andl	$4095, %esi
	subq	%rsi, %rsp
	testq	%rsi, %rsi
	jne	.L40
.L4:
	subq	%rdi, %rdx
	movq	%rsp, -88(%rbp)
	leaq	0(,%rcx,4), %r13
	movq	%rsp, %rcx
	leaq	15(,%rdx,4), %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	andq	$-16, %rdx
	subq	%rax, %rcx
.L5:
	cmpq	%rcx, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L40:
	orq	$0, -8(%rsp,%rsi)
	jmp	.L4
.L6:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L41
.L7:
	movq	%rsp, -80(%rbp)
	testl	%r8d, %r8d
	jle	.L8
	movq	-88(%rbp), %r15
	xorl	%r14d, %r14d
	leaq	.LC1(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%r15, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %r14d
	call	__isoc99_scanf@PLT
	movl	-64(%rbp), %ecx
	addq	%rbx, %r15
	cmpl	%r14d, %ecx
	jg	.L9
	testl	%ecx, %ecx
	jle	.L8
	movl	-60(%rbp), %r14d
	testl	%r14d, %r14d
	jle	.L20
	movslq	%r14d, %r12
	movq	-80(%rbp), %rdi
	xorl	%r15d, %r15d
	salq	$2, %r12
	.p2align 4,,10
	.p2align 3
.L11:
	movq	%r12, %rdx
	movl	$255, %esi
	movl	%ecx, -72(%rbp)
	addl	$1, %r15d
	call	memset@PLT
	movl	-72(%rbp), %ecx
	movq	%rax, %rdi
	addq	%r13, %rdi
	cmpl	%r15d, %ecx
	jne	.L11
	movq	-88(%rbp), %r15
	leal	-1(%r14), %r9d
	movq	-80(%rbp), %r10
	movl	%r14d, %r14d
	xorl	%r8d, %r8d
	addq	%r14, %r15
	.p2align 4,,10
	.p2align 3
.L21:
	movq	%r15, %rax
	movq	%r10, %rdx
	xorl	%edi, %edi
	xorl	%esi, %esi
	subq	%r9, %rax
	subq	$1, %rax
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L13:
	cmpl	$1, %edi
	jne	.L14
	addl	$1, %esi
	movl	%esi, (%rdx)
.L14:
	addq	$1, %rax
	addq	$4, %rdx
	cmpq	%r15, %rax
	je	.L42
.L15:
	cmpb	$99, (%rax)
	jne	.L13
	addq	$1, %rax
	movl	$0, (%rdx)
	xorl	%esi, %esi
	addq	$4, %rdx
	movl	$1, %edi
	cmpq	%r15, %rax
	jne	.L15
.L42:
	addl	$1, %r8d
	addq	%rbx, %r15
	addq	%r13, %r10
	cmpl	%r8d, %ecx
	jne	.L21
.L20:
	movq	%r13, %rax
	xorl	%r12d, %r12d
	leaq	.LC2(%rip), %rbx
	shrq	$2, %rax
	movq	%rax, -88(%rbp)
	movq	-80(%rbp), %rax
	movq	%rax, -72(%rbp)
	.p2align 4,,10
	.p2align 3
.L16:
	xorl	%r15d, %r15d
	cmpl	$1, -60(%rbp)
	movq	-72(%rbp), %r14
	jle	.L19
	.p2align 4,,10
	.p2align 3
.L17:
	movl	(%r14), %edx
	movq	%rbx, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addl	$1, %r15d
	addq	$4, %r14
	call	__printf_chk@PLT
	movl	-60(%rbp), %eax
	subl	$1, %eax
	cmpl	%r15d, %eax
	jg	.L17
.L19:
	movslq	%r12d, %rax
	imulq	-88(%rbp), %rax
	movslq	%r15d, %rcx
	movl	$1, %edi
	leaq	.LC3(%rip), %rsi
	addl	$1, %r12d
	addq	%rax, %rcx
	movq	-80(%rbp), %rax
	movl	(%rax,%rcx,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	%r13, -72(%rbp)
	cmpl	%r12d, -64(%rbp)
	jg	.L16
.L18:
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L43
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L8:
	.cfi_restore_state
	cmpl	$0, -64(%rbp)
	jle	.L18
	jmp	.L20
.L41:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L7
.L43:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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:

#include <stdio.h>

int main(void){
	int h,w,i,j,k,save=0,ari=0;
	scanf("%d %d",&h,&w);
	char a[h][w+1];
	int ans[h][w];
	for(i=0;i<h;i++){
		scanf("%s",a[i]);
	}
	
//	
	for(i=0;i<h;i++){
		for(j=0;j<w;j++){
			ans[i][j]=-1;
		}
	}
//
	
	for(i=0;i<h;i++){
		for(j=0;j<w;j++){
			if(a[i][j]=='c'){
				ans[i][j]=0;
				save=0;
				ari=1;
			}
			else{
				if(ari==1){
					ans[i][j]=++save;
				}
			}
		}
		save=0;
		ari=0;
	}
	
	
	
	for(i=0;i<h;i++){
		for(j=0;j<w-1;j++){
			printf("%d ",ans[i][j]);
		}
		printf("%d\n",ans[i][j]);
	}
	return 0;
}	
3 4
c..c
..c.
....

0 1 2 0
-1 -1 0 1
-1 -1 -1 -1

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(void){
	int h,w,i,j,k,save=0,ari=0;
	scanf("%d %d",&h,&w);
	char a[h][w+1];
	int ans[h][w];
	for(i=0;i<h;i++){
		scanf("%s",a[i]);
	}
	
//	
	for(i=0;i<h;i++){
		for(j=0;j<w;j++){
			ans[i][j]=-1;
		}
	}
//
	
	for(i=0;i<h;i++){
		for(j=0;j<w;j++){
			if(a[i][j]=='c'){
				ans[i][j]=0;
				save=0;
				ari=1;
			}
			else{
				if(ari==1){
					ans[i][j]=++save;
				}
			}
		}
		save=0;
		ari=0;
	}
	
	
	
	for(i=0;i<h;i++){
		for(j=0;j<w-1;j++){
			printf("%d ",ans[i][j]);
		}
		printf("%d\n",ans[i][j]);
	}
	return 0;
}	```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d "
.LC3:
	.string	"%d\n"
	.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
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$232, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, -264(%rbp)
	movl	$0, -112(%rbp)
	movl	$0, -108(%rbp)
	leaq	-124(%rbp), %rdx
	leaq	-128(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-124(%rbp), %eax
	leal	1(%rax), %esi
	movl	-128(%rbp), %edi
	movslq	%esi, %rax
	subq	$1, %rax
	movq	%rax, -104(%rbp)
	movslq	%esi, %rax
	movq	%rax, -144(%rbp)
	movq	$0, -136(%rbp)
	movslq	%esi, %rax
	movq	%rax, -144(%rbp)
	movslq	%edi, %rax
	subq	$1, %rax
	movq	%rax, -96(%rbp)
	movslq	%esi, %rax
	movq	%rax, %r14
	movl	$0, %r15d
	movslq	%edi, %rax
	movq	%rax, %r12
	movl	$0, %r13d
	movq	%r15, %rdx
	imulq	%r12, %rdx
	movq	%r13, %rax
	imulq	%r14, %rax
	leaq	(%rdx,%rax), %rcx
	movq	%r14, %rax
	mulq	%r12
	addq	%rdx, %rcx
	movq	%rcx, %rdx
	movslq	%esi, %rax
	movq	%rax, -160(%rbp)
	movq	$0, -152(%rbp)
	movslq	%edi, %rax
	movq	%rax, -176(%rbp)
	movq	$0, -168(%rbp)
	movq	-160(%rbp), %r8
	movq	-152(%rbp), %r9
	movq	%r9, %rdx
	movq	-176(%rbp), %r10
	movq	-168(%rbp), %r11
	imulq	%r10, %rdx
	movq	%r11, %rax
	imulq	%r8, %rax
	leaq	(%rdx,%rax), %rcx
	movq	%r8, %rax
	mulq	%r10
	addq	%rdx, %rcx
	movq	%rcx, %rdx
	movslq	%esi, %rdx
	movslq	%edi, %rax
	imulq	%rdx, %rax
	movl	$16, %edx
	subq	$1, %rdx
	addq	%rdx, %rax
	movl	$16, %ebx
	movl	$0, %edx
	divq	%rbx
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L2:
	cmpq	%rdx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L4
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$0, %rax
	movq	%rax, -88(%rbp)
	movl	-124(%rbp), %esi
	movl	-128(%rbp), %edi
	movslq	%esi, %rax
	subq	$1, %rax
	movq	%rax, -80(%rbp)
	movslq	%esi, %rax
	movq	%rax, -256(%rbp)
	movq	$0, -248(%rbp)
	movslq	%esi, %rax
	leaq	0(,%rax,4), %rbx
	movslq	%edi, %rax
	subq	$1, %rax
	movq	%rax, -72(%rbp)
	movslq	%esi, %rax
	movq	%rax, -192(%rbp)
	movq	$0, -184(%rbp)
	movslq	%edi, %rax
	movq	%rax, -208(%rbp)
	movq	$0, -200(%rbp)
	movq	-192(%rbp), %r10
	movq	-184(%rbp), %r11
	movq	%r11, %rdx
	movq	-208(%rbp), %r8
	movq	-200(%rbp), %r9
	imulq	%r8, %rdx
	movq	%r9, %rax
	imulq	%r10, %rax
	leaq	(%rdx,%rax), %rcx
	movq	%r10, %rax
	mulq	%r8
	addq	%rdx, %rcx
	movq	%rcx, %rdx
	movslq	%esi, %rax
	movq	%rax, -224(%rbp)
	movq	$0, -216(%rbp)
	movslq	%edi, %rax
	movq	%rax, -240(%rbp)
	movq	$0, -232(%rbp)
	movq	-224(%rbp), %r8
	movq	-216(%rbp), %r9
	movq	%r9, %rdx
	movq	-240(%rbp), %r14
	movq	-232(%rbp), %r15
	imulq	%r14, %rdx
	movq	%r15, %rax
	imulq	%r8, %rax
	leaq	(%rdx,%rax), %rcx
	movq	%r8, %rax
	mulq	%r14
	addq	%rdx, %rcx
	movq	%rcx, %rdx
	movslq	%esi, %rdx
	movslq	%edi, %rax
	imulq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L5:
	cmpq	%rdx, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L6:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L7
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L7:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -120(%rbp)
	jmp	.L8
.L9:
	movl	-120(%rbp), %eax
	cltq
	imulq	-144(%rbp), %rax
	movq	%rax, %rdx
	movq	-88(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -120(%rbp)
.L8:
	movl	-128(%rbp), %eax
	cmpl	%eax, -120(%rbp)
	jl	.L9
	movl	$0, -120(%rbp)
	jmp	.L10
.L13:
	movl	$0, -116(%rbp)
	jmp	.L11
.L12:
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movq	-64(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rsi
	movl	-120(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	$-1, (%rax,%rdx,4)
	addl	$1, -116(%rbp)
.L11:
	movl	-124(%rbp), %eax
	cmpl	%eax, -116(%rbp)
	jl	.L12
	addl	$1, -120(%rbp)
.L10:
	movl	-128(%rbp), %eax
	cmpl	%eax, -120(%rbp)
	jl	.L13
	movl	$0, -120(%rbp)
	jmp	.L14
.L19:
	movl	$0, -116(%rbp)
	jmp	.L15
.L18:
	movq	-88(%rbp), %rcx
	movl	-116(%rbp), %eax
	movslq	%eax, %rdx
	movl	-120(%rbp), %eax
	cltq
	imulq	-144(%rbp), %rax
	addq	%rcx, %rdx
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$99, %al
	jne	.L16
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movq	-64(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rsi
	movl	-120(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	$0, (%rax,%rdx,4)
	movl	$0, -112(%rbp)
	movl	$1, -108(%rbp)
	jmp	.L17
.L16:
	cmpl	$1, -108(%rbp)
	jne	.L17
	addl	$1, -112(%rbp)
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movq	-64(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rsi
	movl	-120(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	leaq	(%rsi,%rdx), %rcx
	movl	-112(%rbp), %edx
	movl	%edx, (%rax,%rcx,4)
.L17:
	addl	$1, -116(%rbp)
.L15:
	movl	-124(%rbp), %eax
	cmpl	%eax, -116(%rbp)
	jl	.L18
	movl	$0, -112(%rbp)
	movl	$0, -108(%rbp)
	addl	$1, -120(%rbp)
.L14:
	movl	-128(%rbp), %eax
	cmpl	%eax, -120(%rbp)
	jl	.L19
	movl	$0, -120(%rbp)
	jmp	.L20
.L23:
	movl	$0, -116(%rbp)
	jmp	.L21
.L22:
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movq	-64(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rsi
	movl	-120(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	(%rax,%rdx,4), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -116(%rbp)
.L21:
	movl	-124(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -116(%rbp)
	jl	.L22
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movq	-64(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rsi
	movl	-120(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	(%rax,%rdx,4), %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -120(%rbp)
.L20:
	movl	-128(%rbp), %eax
	cmpl	%eax, -120(%rbp)
	jl	.L23
	movl	$0, %eax
	movq	-264(%rbp), %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L25
	call	__stack_chk_fail@PLT
.L25:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.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 %d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d "
.LC3:
	.string	"%d\n"
	.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
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$232, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, -264(%rbp)
	movl	$0, -112(%rbp)
	movl	$0, -108(%rbp)
	leaq	-124(%rbp), %rdx
	leaq	-128(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-124(%rbp), %eax
	leal	1(%rax), %esi
	movl	-128(%rbp), %edi
	movslq	%esi, %rax
	subq	$1, %rax
	movq	%rax, -104(%rbp)
	movslq	%esi, %rax
	movq	%rax, -144(%rbp)
	movq	$0, -136(%rbp)
	movslq	%esi, %rax
	movq	%rax, -144(%rbp)
	movslq	%edi, %rax
	subq	$1, %rax
	movq	%rax, -96(%rbp)
	movslq	%esi, %rax
	movq	%rax, %r14
	movl	$0, %r15d
	movslq	%edi, %rax
	movq	%rax, %r12
	movl	$0, %r13d
	movq	%r15, %rdx
	imulq	%r12, %rdx
	movq	%r13, %rax
	imulq	%r14, %rax
	leaq	(%rdx,%rax), %rcx
	movq	%r14, %rax
	mulq	%r12
	addq	%rdx, %rcx
	movq	%rcx, %rdx
	movslq	%esi, %rax
	movq	%rax, -160(%rbp)
	movq	$0, -152(%rbp)
	movslq	%edi, %rax
	movq	%rax, -176(%rbp)
	movq	$0, -168(%rbp)
	movq	-160(%rbp), %r8
	movq	-152(%rbp), %r9
	movq	%r9, %rdx
	movq	-176(%rbp), %r10
	movq	-168(%rbp), %r11
	imulq	%r10, %rdx
	movq	%r11, %rax
	imulq	%r8, %rax
	leaq	(%rdx,%rax), %rcx
	movq	%r8, %rax
	mulq	%r10
	addq	%rdx, %rcx
	movq	%rcx, %rdx
	movslq	%esi, %rdx
	movslq	%edi, %rax
	imulq	%rdx, %rax
	movl	$16, %edx
	subq	$1, %rdx
	addq	%rdx, %rax
	movl	$16, %ebx
	movl	$0, %edx
	divq	%rbx
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L2:
	cmpq	%rdx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L4
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$0, %rax
	movq	%rax, -88(%rbp)
	movl	-124(%rbp), %esi
	movl	-128(%rbp), %edi
	movslq	%esi, %rax
	subq	$1, %rax
	movq	%rax, -80(%rbp)
	movslq	%esi, %rax
	movq	%rax, -256(%rbp)
	movq	$0, -248(%rbp)
	movslq	%esi, %rax
	leaq	0(,%rax,4), %rbx
	movslq	%edi, %rax
	subq	$1, %rax
	movq	%rax, -72(%rbp)
	movslq	%esi, %rax
	movq	%rax, -192(%rbp)
	movq	$0, -184(%rbp)
	movslq	%edi, %rax
	movq	%rax, -208(%rbp)
	movq	$0, -200(%rbp)
	movq	-192(%rbp), %r10
	movq	-184(%rbp), %r11
	movq	%r11, %rdx
	movq	-208(%rbp), %r8
	movq	-200(%rbp), %r9
	imulq	%r8, %rdx
	movq	%r9, %rax
	imulq	%r10, %rax
	leaq	(%rdx,%rax), %rcx
	movq	%r10, %rax
	mulq	%r8
	addq	%rdx, %rcx
	movq	%rcx, %rdx
	movslq	%esi, %rax
	movq	%rax, -224(%rbp)
	movq	$0, -216(%rbp)
	movslq	%edi, %rax
	movq	%rax, -240(%rbp)
	movq	$0, -232(%rbp)
	movq	-224(%rbp), %r8
	movq	-216(%rbp), %r9
	movq	%r9, %rdx
	movq	-240(%rbp), %r14
	movq	-232(%rbp), %r15
	imulq	%r14, %rdx
	movq	%r15, %rax
	imulq	%r8, %rax
	leaq	(%rdx,%rax), %rcx
	movq	%r8, %rax
	mulq	%r14
	addq	%rdx, %rcx
	movq	%rcx, %rdx
	movslq	%esi, %rdx
	movslq	%edi, %rax
	imulq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L5:
	cmpq	%rdx, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L6:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L7
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L7:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -120(%rbp)
	jmp	.L8
.L9:
	movl	-120(%rbp), %eax
	cltq
	imulq	-144(%rbp), %rax
	movq	%rax, %rdx
	movq	-88(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -120(%rbp)
.L8:
	movl	-128(%rbp), %eax
	cmpl	%eax, -120(%rbp)
	jl	.L9
	movl	$0, -120(%rbp)
	jmp	.L10
.L13:
	movl	$0, -116(%rbp)
	jmp	.L11
.L12:
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movq	-64(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rsi
	movl	-120(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	$-1, (%rax,%rdx,4)
	addl	$1, -116(%rbp)
.L11:
	movl	-124(%rbp), %eax
	cmpl	%eax, -116(%rbp)
	jl	.L12
	addl	$1, -120(%rbp)
.L10:
	movl	-128(%rbp), %eax
	cmpl	%eax, -120(%rbp)
	jl	.L13
	movl	$0, -120(%rbp)
	jmp	.L14
.L19:
	movl	$0, -116(%rbp)
	jmp	.L15
.L18:
	movq	-88(%rbp), %rcx
	movl	-116(%rbp), %eax
	movslq	%eax, %rdx
	movl	-120(%rbp), %eax
	cltq
	imulq	-144(%rbp), %rax
	addq	%rcx, %rdx
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$99, %al
	jne	.L16
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movq	-64(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rsi
	movl	-120(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	$0, (%rax,%rdx,4)
	movl	$0, -112(%rbp)
	movl	$1, -108(%rbp)
	jmp	.L17
.L16:
	cmpl	$1, -108(%rbp)
	jne	.L17
	addl	$1, -112(%rbp)
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movq	-64(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rsi
	movl	-120(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	leaq	(%rsi,%rdx), %rcx
	movl	-112(%rbp), %edx
	movl	%edx, (%rax,%rcx,4)
.L17:
	addl	$1, -116(%rbp)
.L15:
	movl	-124(%rbp), %eax
	cmpl	%eax, -116(%rbp)
	jl	.L18
	movl	$0, -112(%rbp)
	movl	$0, -108(%rbp)
	addl	$1, -120(%rbp)
.L14:
	movl	-128(%rbp), %eax
	cmpl	%eax, -120(%rbp)
	jl	.L19
	movl	$0, -120(%rbp)
	jmp	.L20
.L23:
	movl	$0, -116(%rbp)
	jmp	.L21
.L22:
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movq	-64(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rsi
	movl	-120(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	(%rax,%rdx,4), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -116(%rbp)
.L21:
	movl	-124(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -116(%rbp)
	jl	.L22
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movq	-64(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rsi
	movl	-120(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	(%rax,%rdx,4), %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -120(%rbp)
.L20:
	movl	-128(%rbp), %eax
	cmpl	%eax, -120(%rbp)
	jl	.L23
	movl	$0, %eax
	movq	-264(%rbp), %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L25
	call	__stack_chk_fail@PLT
.L25:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.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:
