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 a[505][505];
int move[300000][4];

int main(){

	int H,W;

	scanf("%d %d",&H,&W);

	int i,j;

	for(i=1;i<=H;i++){
		for(j=1;j<=W;j++){
			scanf(" %d",&a[i][j]);
		}
	}

	int N=0;

	for(i=H;i>=2;i--){
		int sum1=0;
		for(j=1;j<=W;j++){
			sum1+=a[i][j];
		}
		if(sum1%2==1){
			int flag=0;
			for(j=1;j<=W;j++){
				if(flag==0&&a[i][j]%2==1){
					a[i][j]--;
					a[i-1][j]++;
					move[N][0]=i;
					move[N][1]=j;
					move[N][2]=i-1;
					move[N][3]=j;
					N++;
					flag=1;
				}
				else if(a[i][j]%2==1 && j<W){
					a[i][j]--;
					a[i][j+1]++;
					move[N][0]=i;
					move[N][1]=j;
					move[N][2]=i;
					move[N][3]=j+1;
					N++;
				}
			}
		}
		else{
			for(j=1;j<W;j++){
				if(a[i][j]%2==1){
					a[i][j]--;
					a[i][j+1]++;
					move[N][0]=i;
					move[N][1]=j;
					move[N][2]=i;
					move[N][3]=j+1;
					N++;
				}
			}
		}
	}

	for(j=1;j<W;j++){
		if(a[1][j]%2==1){
			a[1][j]--;
			a[1][j+1]++;
			move[N][0]=1;
			move[N][1]=j;
			move[N][2]=1;
			move[N][3]=j+1;
			N++;
		}
	}
	printf("%d\n",N);
	for(i=0;i<N;i++){
	printf("%d %d %d %d\n",move[i][0],move[i][1],move[i][2],move[i][3]);
	}


	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 1020100
a:
	.zero	1020100
	.globl	move
	.align 32
	.type	move, @object
	.size	move, 4800000
move:
	.zero	4800000
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	" %d"
.LC2:
	.string	"%d\n"
.LC3:
	.string	"%d %d %d %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
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-32(%rbp), %rdx
	leaq	-36(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -28(%rbp)
	jmp	.L2
.L5:
	movl	$1, -24(%rbp)
	jmp	.L3
.L4:
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	subq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -24(%rbp)
.L3:
	movl	-32(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jle	.L4
	addl	$1, -28(%rbp)
.L2:
	movl	-36(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jle	.L5
	movl	$0, -20(%rbp)
	movl	-36(%rbp), %eax
	movl	%eax, -28(%rbp)
	jmp	.L6
.L18:
	movl	$0, -16(%rbp)
	movl	$1, -24(%rbp)
	jmp	.L7
.L8:
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	subq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%eax, -16(%rbp)
	addl	$1, -24(%rbp)
.L7:
	movl	-32(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jle	.L8
	movl	-16(%rbp), %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	cmpl	$1, %eax
	jne	.L9
	movl	$0, -12(%rbp)
	movl	$1, -24(%rbp)
	jmp	.L10
.L13:
	cmpl	$0, -12(%rbp)
	jne	.L11
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	subq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	cmpl	$1, %eax
	jne	.L11
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	subq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	-1(%rax), %ecx
	movl	-24(%rbp), %eax
	movslq	%eax, %rsi
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	subq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-28(%rbp), %eax
	leal	-1(%rax), %ecx
	movl	-24(%rbp), %eax
	movslq	%eax, %rsi
	movslq	%ecx, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	subq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	1(%rax), %esi
	movl	-24(%rbp), %eax
	movslq	%eax, %rdi
	movslq	%ecx, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	subq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rdi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	%esi, (%rdx,%rax)
	movl	-20(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	leaq	move(%rip), %rdx
	movl	-28(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	leaq	4+move(%rip), %rdx
	movl	-24(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-28(%rbp), %eax
	leal	-1(%rax), %ecx
	movl	-20(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	8+move(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-20(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	leaq	12+move(%rip), %rdx
	movl	-24(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	addl	$1, -20(%rbp)
	movl	$1, -12(%rbp)
	jmp	.L12
.L11:
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	subq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	cmpl	$1, %eax
	jne	.L12
	movl	-32(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jge	.L12
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	subq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	-1(%rax), %ecx
	movl	-24(%rbp), %eax
	movslq	%eax, %rsi
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	subq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-24(%rbp), %eax
	leal	1(%rax), %ecx
	movslq	%ecx, %rsi
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	subq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	1(%rax), %esi
	movslq	%ecx, %rcx
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	subq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	%esi, (%rdx,%rax)
	movl	-20(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	leaq	move(%rip), %rdx
	movl	-28(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	leaq	4+move(%rip), %rdx
	movl	-24(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	leaq	8+move(%rip), %rdx
	movl	-28(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-24(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-20(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	12+move(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -20(%rbp)
.L12:
	addl	$1, -24(%rbp)
.L10:
	movl	-32(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jle	.L13
	jmp	.L14
.L9:
	movl	$1, -24(%rbp)
	jmp	.L15
.L17:
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	subq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	cmpl	$1, %eax
	jne	.L16
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	subq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	-1(%rax), %ecx
	movl	-24(%rbp), %eax
	movslq	%eax, %rsi
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	subq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-24(%rbp), %eax
	leal	1(%rax), %ecx
	movslq	%ecx, %rsi
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	subq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	1(%rax), %esi
	movslq	%ecx, %rcx
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	subq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	%esi, (%rdx,%rax)
	movl	-20(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	leaq	move(%rip), %rdx
	movl	-28(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	leaq	4+move(%rip), %rdx
	movl	-24(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	leaq	8+move(%rip), %rdx
	movl	-28(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-24(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-20(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	12+move(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -20(%rbp)
.L16:
	addl	$1, -24(%rbp)
.L15:
	movl	-32(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L17
.L14:
	subl	$1, -28(%rbp)
.L6:
	cmpl	$1, -28(%rbp)
	jg	.L18
	movl	$1, -24(%rbp)
	jmp	.L19
.L21:
	movl	-24(%rbp), %eax
	cltq
	addq	$505, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	cmpl	$1, %eax
	jne	.L20
	movl	-24(%rbp), %eax
	cltq
	addq	$505, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	-1(%rax), %ecx
	movl	-24(%rbp), %eax
	cltq
	addq	$505, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-24(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	addq	$505, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	a(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	leal	1(%rdx), %ecx
	cltq
	addq	$505, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-20(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	move(%rip), %rax
	movl	$1, (%rdx,%rax)
	movl	-20(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	leaq	4+move(%rip), %rdx
	movl	-24(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	8+move(%rip), %rax
	movl	$1, (%rdx,%rax)
	movl	-24(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-20(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	12+move(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -20(%rbp)
.L20:
	addl	$1, -24(%rbp)
.L19:
	movl	-32(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L21
	movl	-20(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, -28(%rbp)
	jmp	.L22
.L23:
	movl	-28(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	12+move(%rip), %rax
	movl	(%rdx,%rax), %edi
	movl	-28(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	8+move(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-28(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	4+move(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-28(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rsi
	leaq	move(%rip), %rax
	movl	(%rsi,%rax), %eax
	movl	%edi, %r8d
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -28(%rbp)
.L22:
	movl	-28(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jl	.L23
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L25
	call	__stack_chk_fail@PLT
.L25:
	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 %d"
.LC1:
	.string	" %d"
.LC2:
	.string	"%d\n"
.LC3:
	.string	"%d %d %d %d\n"
	.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	.LC0(%rip), %rdi
	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	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	36(%rsp), %rdx
	leaq	32(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	32(%rsp), %rax
	movl	36(%rsp), %ecx
	testl	%eax, %eax
	jle	.L10
	leaq	2024+a(%rip), %r14
	movl	$1, %r13d
	leaq	.LC1(%rip), %r12
	testl	%ecx, %ecx
	jle	.L71
	.p2align 4,,10
	.p2align 3
.L40:
	movq	%r14, %rbp
	movl	$1, %ebx
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	36(%rsp), %ecx
	addq	$4, %rbp
	cmpl	%ebx, %ecx
	jge	.L4
	movslq	32(%rsp), %rax
	addl	$1, %r13d
	cmpl	%eax, %r13d
	jg	.L72
	addq	$2020, %r14
	testl	%ecx, %ecx
	jg	.L40
.L71:
	cmpl	%r13d, %eax
	jle	.L73
.L7:
	leal	-1(%rax), %r8d
	leaq	a(%rip), %rsi
	movl	%ecx, %ebx
	imulq	$2020, %rax, %rax
	andl	$-4, %ebx
	leaq	move(%rip), %r15
	movl	%ebx, 24(%rsp)
	addl	$1, %ebx
	movl	%ebx, 28(%rsp)
	xorl	%ebx, %ebx
	leaq	4(%rsi,%rax), %r12
	leal	-1(%rcx), %eax
	movl	%eax, 4(%rsp)
	movl	%ecx, %eax
	shrl	$2, %eax
	subl	$1, %eax
	addq	$1, %rax
	salq	$4, %rax
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L11:
	leal	1(%r8), %eax
	movd	%eax, %xmm1
	testl	%ecx, %ecx
	jle	.L74
	cmpl	$2, 4(%rsp)
	jbe	.L41
	movq	8(%rsp), %rax
	pxor	%xmm0, %xmm0
	leaq	(%rax,%r12), %rdx
	movq	%r12, %rax
	.p2align 4,,10
	.p2align 3
.L13:
	movdqu	(%rax), %xmm5
	addq	$16, %rax
	paddd	%xmm5, %xmm0
	cmpq	%rdx, %rax
	jne	.L13
	movdqa	%xmm0, %xmm2
	psrldq	$8, %xmm2
	paddd	%xmm2, %xmm0
	movdqa	%xmm0, %xmm2
	psrldq	$4, %xmm2
	paddd	%xmm2, %xmm0
	movd	%xmm0, %eax
	cmpl	%ecx, 24(%rsp)
	je	.L14
	movl	28(%rsp), %edx
.L12:
	movd	%xmm1, %edi
	movslq	%edx, %r9
	movslq	%edi, %rdi
	movq	%rdi, %r10
	salq	$6, %r10
	subq	%rdi, %r10
	leaq	(%rdi,%r10,8), %r10
	addq	%r10, %r9
	addl	(%rsi,%r9,4), %eax
	leal	1(%rdx), %r9d
	cmpl	%ecx, %r9d
	jg	.L15
	movslq	%r9d, %r9
	addl	$2, %edx
	addq	%r10, %r9
	addl	(%rsi,%r9,4), %eax
	cmpl	%ecx, %edx
	jg	.L14
	movslq	%edx, %rdx
	addq	%rdx, %r10
	addl	(%rsi,%r10,4), %eax
.L14:
	movl	%eax, %edx
	movl	%r8d, %r14d
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	cmpl	$1, %eax
	je	.L75
.L17:
	movq	%r12, %rdi
	movl	$1, %edx
	.p2align 4,,10
	.p2align 3
.L24:
	movl	(%rdi), %r9d
	movl	%edx, %eax
	addl	$1, %edx
	movdqa	%xmm1, %xmm2
	movd	%eax, %xmm4
	movd	%edx, %xmm3
	movdqa	%xmm1, %xmm0
	movl	%r9d, %r10d
	punpckldq	%xmm3, %xmm2
	punpckldq	%xmm4, %xmm0
	shrl	$31, %r10d
	punpcklqdq	%xmm2, %xmm0
	leal	(%r9,%r10), %eax
	andl	$1, %eax
	subl	%r10d, %eax
	cmpl	$1, %eax
	jne	.L23
	movslq	%ebx, %rax
	subl	$1, %r9d
	addl	$1, 4(%rdi)
	addl	$1, %ebx
	salq	$4, %rax
	movl	%r9d, (%rdi)
	movaps	%xmm0, (%r15,%rax)
.L23:
	addq	$4, %rdi
	cmpl	%edx, %ecx
	jne	.L24
.L21:
	subl	$1, %r8d
	subq	$2020, %r12
	cmpl	$1, %r14d
	jne	.L11
	cmpl	$1, %ecx
	jle	.L30
.L28:
	leaq	2024+a(%rip), %rsi
	movl	$1, %edx
	leaq	move(%rip), %r10
	.p2align 4,,10
	.p2align 3
.L32:
	movl	(%rsi), %edi
	movl	%edx, %r9d
	addl	$1, %edx
	movl	%edi, %r8d
	shrl	$31, %r8d
	leal	(%rdi,%r8), %eax
	andl	$1, %eax
	subl	%r8d, %eax
	cmpl	$1, %eax
	jne	.L31
	movslq	%ebx, %rax
	subl	$1, %edi
	addl	$1, 4(%rsi)
	addl	$1, %ebx
	salq	$4, %rax
	movl	%edi, (%rsi)
	addq	%r10, %rax
	movl	$1, (%rax)
	movl	%r9d, 4(%rax)
	movl	$1, 8(%rax)
	movl	%edx, 12(%rax)
.L31:
	addq	$4, %rsi
	cmpl	%edx, %ecx
	jg	.L32
.L30:
	xorl	%eax, %eax
	movl	%ebx, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	testl	%ebx, %ebx
	je	.L29
	leaq	move(%rip), %rbp
	subl	$1, %ebx
	leaq	.LC3(%rip), %r12
	salq	$4, %rbx
	leaq	16(%rbp), %rax
	addq	%rax, %rbx
	.p2align 4,,10
	.p2align 3
.L34:
	movl	4(%rbp), %ecx
	movl	12(%rbp), %r9d
	movq	%r12, %rsi
	movl	$1, %edi
	movl	8(%rbp), %r8d
	movl	0(%rbp), %edx
	xorl	%eax, %eax
	addq	$16, %rbp
	call	__printf_chk@PLT
	cmpq	%rbp, %rbx
	jne	.L34
.L29:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L76
	addq	$56, %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
	.p2align 4,,10
	.p2align 3
.L75:
	.cfi_restore_state
	movd	%xmm1, %eax
	movslq	%eax, %rdi
.L16:
	movq	%rdi, %rdx
	movl	%r8d, %r14d
	xorl	%r13d, %r13d
	movl	$1, %eax
	salq	$6, %rdx
	subq	%rdi, %rdx
	leaq	(%rdi,%rdx,8), %rbp
	movslq	%r8d, %rdx
	movq	%rdx, %rdi
	salq	$6, %rdi
	subq	%rdx, %rdi
	leaq	(%rdx,%rdi,8), %rdi
	movq	%rdi, 16(%rsp)
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L78:
	leal	1(%rax), %edx
	movl	%r10d, %eax
	shrl	$31, %eax
	leal	(%r10,%rax), %edi
	andl	$1, %edi
	subl	%eax, %edi
	movl	%edx, %eax
	cmpl	$1, %edi
	je	.L77
.L20:
	cmpl	%eax, %ecx
	jl	.L21
.L22:
	movd	%eax, %xmm6
	movdqa	%xmm1, %xmm2
	movd	%r8d, %xmm0
	movslq	%eax, %r9
	punpckldq	%xmm6, %xmm2
	punpckldq	%xmm6, %xmm0
	leaq	0(%rbp,%r9), %r11
	movl	(%rsi,%r11,4), %r10d
	punpcklqdq	%xmm0, %xmm2
	testl	%r13d, %r13d
	je	.L78
	movl	%eax, %edx
.L19:
	leal	1(%rdx), %eax
	movdqa	%xmm1, %xmm2
	movdqa	%xmm1, %xmm0
	movslq	%edx, %r9
	addq	%rbp, %r9
	movd	%eax, %xmm6
	movd	%edx, %xmm7
	movl	(%rsi,%r9,4), %r10d
	punpckldq	%xmm6, %xmm2
	punpckldq	%xmm7, %xmm0
	punpcklqdq	%xmm2, %xmm0
	movl	%r10d, %r11d
	shrl	$31, %r11d
	leal	(%r10,%r11), %edi
	andl	$1, %edi
	subl	%r11d, %edi
	cmpl	$1, %edi
	jne	.L44
	cmpl	%ecx, %edx
	jge	.L44
	leal	-1(%r10), %edx
	movl	$1, %r13d
	movl	%edx, (%rsi,%r9,4)
	movslq	%eax, %rdx
	addq	%rbp, %rdx
	addl	$1, (%rsi,%rdx,4)
	movslq	%ebx, %rdx
	addl	$1, %ebx
	salq	$4, %rdx
	movaps	%xmm0, (%r15,%rdx)
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L44:
	movl	$1, %r13d
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L77:
	movslq	%ebx, %rdi
	subl	$1, %r10d
	addq	16(%rsp), %r9
	addl	$1, %ebx
	salq	$4, %rdi
	movl	%r10d, (%rsi,%r11,4)
	addl	$1, (%rsi,%r9,4)
	movaps	%xmm2, (%r15,%rdi)
	cmpl	%edx, %ecx
	jge	.L19
	jmp	.L21
.L41:
	xorl	%eax, %eax
	movl	$1, %edx
	jmp	.L12
.L15:
	cltd
	movl	$2, %r14d
	idivl	%r14d
	subl	$1, %edx
	je	.L16
	movl	%r8d, %r14d
	cmpl	$1, %ecx
	jg	.L17
	jmp	.L21
.L74:
	movl	%r8d, %r14d
	jmp	.L21
.L72:
	cmpl	$1, %eax
	jg	.L7
.L10:
	xorl	%ebx, %ebx
	cmpl	$1, %ecx
	jg	.L28
.L38:
	xorl	%edx, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L29
.L76:
	call	__stack_chk_fail@PLT
.L73:
	cmpl	$1, %eax
	jg	.L7
	jmp	.L38
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	move
	.bss
	.align 32
	.type	move, @object
	.size	move, 4800000
move:
	.zero	4800000
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 1020100
a:
	.zero	1020100
	.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	" %d"
.LC2:
	.string	"%d\n"
.LC3:
	.string	"%d %d %d %d\n"
	.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	.LC0(%rip), %rdi
	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	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	36(%rsp), %rdx
	leaq	32(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	32(%rsp), %rax
	movl	36(%rsp), %ecx
	testl	%eax, %eax
	jle	.L10
	leaq	2024+a(%rip), %r14
	movl	$1, %r13d
	leaq	.LC1(%rip), %r12
	testl	%ecx, %ecx
	jle	.L71
	.p2align 4,,10
	.p2align 3
.L40:
	movq	%r14, %rbp
	movl	$1, %ebx
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	36(%rsp), %ecx
	addq	$4, %rbp
	cmpl	%ebx, %ecx
	jge	.L4
	movslq	32(%rsp), %rax
	addl	$1, %r13d
	cmpl	%eax, %r13d
	jg	.L72
	addq	$2020, %r14
	testl	%ecx, %ecx
	jg	.L40
.L71:
	cmpl	%r13d, %eax
	jle	.L73
.L7:
	leal	-1(%rax), %r8d
	leaq	a(%rip), %rsi
	movl	%ecx, %ebx
	imulq	$2020, %rax, %rax
	andl	$-4, %ebx
	leaq	move(%rip), %r15
	movl	%ebx, 24(%rsp)
	addl	$1, %ebx
	movl	%ebx, 28(%rsp)
	xorl	%ebx, %ebx
	leaq	4(%rsi,%rax), %r12
	leal	-1(%rcx), %eax
	movl	%eax, 4(%rsp)
	movl	%ecx, %eax
	shrl	$2, %eax
	subl	$1, %eax
	addq	$1, %rax
	salq	$4, %rax
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L11:
	leal	1(%r8), %eax
	movd	%eax, %xmm1
	testl	%ecx, %ecx
	jle	.L74
	cmpl	$2, 4(%rsp)
	jbe	.L41
	movq	8(%rsp), %rax
	pxor	%xmm0, %xmm0
	leaq	(%rax,%r12), %rdx
	movq	%r12, %rax
	.p2align 4,,10
	.p2align 3
.L13:
	movdqu	(%rax), %xmm5
	addq	$16, %rax
	paddd	%xmm5, %xmm0
	cmpq	%rdx, %rax
	jne	.L13
	movdqa	%xmm0, %xmm2
	psrldq	$8, %xmm2
	paddd	%xmm2, %xmm0
	movdqa	%xmm0, %xmm2
	psrldq	$4, %xmm2
	paddd	%xmm2, %xmm0
	movd	%xmm0, %eax
	cmpl	%ecx, 24(%rsp)
	je	.L14
	movl	28(%rsp), %edx
.L12:
	movd	%xmm1, %edi
	movslq	%edx, %r9
	movslq	%edi, %rdi
	movq	%rdi, %r10
	salq	$6, %r10
	subq	%rdi, %r10
	leaq	(%rdi,%r10,8), %r10
	addq	%r10, %r9
	addl	(%rsi,%r9,4), %eax
	leal	1(%rdx), %r9d
	cmpl	%ecx, %r9d
	jg	.L15
	movslq	%r9d, %r9
	addl	$2, %edx
	addq	%r10, %r9
	addl	(%rsi,%r9,4), %eax
	cmpl	%ecx, %edx
	jg	.L14
	movslq	%edx, %rdx
	addq	%rdx, %r10
	addl	(%rsi,%r10,4), %eax
.L14:
	movl	%eax, %edx
	movl	%r8d, %r14d
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	cmpl	$1, %eax
	je	.L75
.L17:
	movq	%r12, %rdi
	movl	$1, %edx
	.p2align 4,,10
	.p2align 3
.L24:
	movl	(%rdi), %r9d
	movl	%edx, %eax
	addl	$1, %edx
	movdqa	%xmm1, %xmm2
	movd	%eax, %xmm4
	movd	%edx, %xmm3
	movdqa	%xmm1, %xmm0
	movl	%r9d, %r10d
	punpckldq	%xmm3, %xmm2
	punpckldq	%xmm4, %xmm0
	shrl	$31, %r10d
	punpcklqdq	%xmm2, %xmm0
	leal	(%r9,%r10), %eax
	andl	$1, %eax
	subl	%r10d, %eax
	cmpl	$1, %eax
	jne	.L23
	movslq	%ebx, %rax
	subl	$1, %r9d
	addl	$1, 4(%rdi)
	addl	$1, %ebx
	salq	$4, %rax
	movl	%r9d, (%rdi)
	movaps	%xmm0, (%r15,%rax)
.L23:
	addq	$4, %rdi
	cmpl	%edx, %ecx
	jne	.L24
.L21:
	subl	$1, %r8d
	subq	$2020, %r12
	cmpl	$1, %r14d
	jne	.L11
	cmpl	$1, %ecx
	jle	.L30
.L28:
	leaq	2024+a(%rip), %rsi
	movl	$1, %edx
	leaq	move(%rip), %r10
	.p2align 4,,10
	.p2align 3
.L32:
	movl	(%rsi), %edi
	movl	%edx, %r9d
	addl	$1, %edx
	movl	%edi, %r8d
	shrl	$31, %r8d
	leal	(%rdi,%r8), %eax
	andl	$1, %eax
	subl	%r8d, %eax
	cmpl	$1, %eax
	jne	.L31
	movslq	%ebx, %rax
	subl	$1, %edi
	addl	$1, 4(%rsi)
	addl	$1, %ebx
	salq	$4, %rax
	movl	%edi, (%rsi)
	addq	%r10, %rax
	movl	$1, (%rax)
	movl	%r9d, 4(%rax)
	movl	$1, 8(%rax)
	movl	%edx, 12(%rax)
.L31:
	addq	$4, %rsi
	cmpl	%edx, %ecx
	jg	.L32
.L30:
	xorl	%eax, %eax
	movl	%ebx, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	testl	%ebx, %ebx
	je	.L29
	leaq	move(%rip), %rbp
	subl	$1, %ebx
	leaq	.LC3(%rip), %r12
	salq	$4, %rbx
	leaq	16(%rbp), %rax
	addq	%rax, %rbx
	.p2align 4,,10
	.p2align 3
.L34:
	movl	4(%rbp), %ecx
	movl	12(%rbp), %r9d
	movq	%r12, %rsi
	movl	$1, %edi
	movl	8(%rbp), %r8d
	movl	0(%rbp), %edx
	xorl	%eax, %eax
	addq	$16, %rbp
	call	__printf_chk@PLT
	cmpq	%rbp, %rbx
	jne	.L34
.L29:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L76
	addq	$56, %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
	.p2align 4,,10
	.p2align 3
.L75:
	.cfi_restore_state
	movd	%xmm1, %eax
	movslq	%eax, %rdi
.L16:
	movq	%rdi, %rdx
	movl	%r8d, %r14d
	xorl	%r13d, %r13d
	movl	$1, %eax
	salq	$6, %rdx
	subq	%rdi, %rdx
	leaq	(%rdi,%rdx,8), %rbp
	movslq	%r8d, %rdx
	movq	%rdx, %rdi
	salq	$6, %rdi
	subq	%rdx, %rdi
	leaq	(%rdx,%rdi,8), %rdi
	movq	%rdi, 16(%rsp)
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L78:
	leal	1(%rax), %edx
	movl	%r10d, %eax
	shrl	$31, %eax
	leal	(%r10,%rax), %edi
	andl	$1, %edi
	subl	%eax, %edi
	movl	%edx, %eax
	cmpl	$1, %edi
	je	.L77
.L20:
	cmpl	%eax, %ecx
	jl	.L21
.L22:
	movd	%eax, %xmm6
	movdqa	%xmm1, %xmm2
	movd	%r8d, %xmm0
	movslq	%eax, %r9
	punpckldq	%xmm6, %xmm2
	punpckldq	%xmm6, %xmm0
	leaq	0(%rbp,%r9), %r11
	movl	(%rsi,%r11,4), %r10d
	punpcklqdq	%xmm0, %xmm2
	testl	%r13d, %r13d
	je	.L78
	movl	%eax, %edx
.L19:
	leal	1(%rdx), %eax
	movdqa	%xmm1, %xmm2
	movdqa	%xmm1, %xmm0
	movslq	%edx, %r9
	addq	%rbp, %r9
	movd	%eax, %xmm6
	movd	%edx, %xmm7
	movl	(%rsi,%r9,4), %r10d
	punpckldq	%xmm6, %xmm2
	punpckldq	%xmm7, %xmm0
	punpcklqdq	%xmm2, %xmm0
	movl	%r10d, %r11d
	shrl	$31, %r11d
	leal	(%r10,%r11), %edi
	andl	$1, %edi
	subl	%r11d, %edi
	cmpl	$1, %edi
	jne	.L44
	cmpl	%ecx, %edx
	jge	.L44
	leal	-1(%r10), %edx
	movl	$1, %r13d
	movl	%edx, (%rsi,%r9,4)
	movslq	%eax, %rdx
	addq	%rbp, %rdx
	addl	$1, (%rsi,%rdx,4)
	movslq	%ebx, %rdx
	addl	$1, %ebx
	salq	$4, %rdx
	movaps	%xmm0, (%r15,%rdx)
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L44:
	movl	$1, %r13d
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L77:
	movslq	%ebx, %rdi
	subl	$1, %r10d
	addq	16(%rsp), %r9
	addl	$1, %ebx
	salq	$4, %rdi
	movl	%r10d, (%rsi,%r11,4)
	addl	$1, (%rsi,%r9,4)
	movaps	%xmm2, (%r15,%rdi)
	cmpl	%edx, %ecx
	jge	.L19
	jmp	.L21
.L41:
	xorl	%eax, %eax
	movl	$1, %edx
	jmp	.L12
.L15:
	cltd
	movl	$2, %r14d
	idivl	%r14d
	subl	$1, %edx
	je	.L16
	movl	%r8d, %r14d
	cmpl	$1, %ecx
	jg	.L17
	jmp	.L21
.L74:
	movl	%r8d, %r14d
	jmp	.L21
.L72:
	cmpl	$1, %eax
	jg	.L7
.L10:
	xorl	%ebx, %ebx
	cmpl	$1, %ecx
	jg	.L28
.L38:
	xorl	%edx, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L29
.L76:
	call	__stack_chk_fail@PLT
.L73:
	cmpl	$1, %eax
	jg	.L7
	jmp	.L38
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	move
	.bss
	.align 32
	.type	move, @object
	.size	move, 4800000
move:
	.zero	4800000
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 1020100
a:
	.zero	1020100
	.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 a[505][505];
int move[300000][4];

int main(){

	int H,W;

	scanf("%d %d",&H,&W);

	int i,j;

	for(i=1;i<=H;i++){
		for(j=1;j<=W;j++){
			scanf(" %d",&a[i][j]);
		}
	}

	int N=0;

	for(i=H;i>=2;i--){
		int sum1=0;
		for(j=1;j<=W;j++){
			sum1+=a[i][j];
		}
		if(sum1%2==1){
			int flag=0;
			for(j=1;j<=W;j++){
				if(flag==0&&a[i][j]%2==1){
					a[i][j]--;
					a[i-1][j]++;
					move[N][0]=i;
					move[N][1]=j;
					move[N][2]=i-1;
					move[N][3]=j;
					N++;
					flag=1;
				}
				else if(a[i][j]%2==1 && j<W){
					a[i][j]--;
					a[i][j+1]++;
					move[N][0]=i;
					move[N][1]=j;
					move[N][2]=i;
					move[N][3]=j+1;
					N++;
				}
			}
		}
		else{
			for(j=1;j<W;j++){
				if(a[i][j]%2==1){
					a[i][j]--;
					a[i][j+1]++;
					move[N][0]=i;
					move[N][1]=j;
					move[N][2]=i;
					move[N][3]=j+1;
					N++;
				}
			}
		}
	}

	for(j=1;j<W;j++){
		if(a[1][j]%2==1){
			a[1][j]--;
			a[1][j+1]++;
			move[N][0]=1;
			move[N][1]=j;
			move[N][2]=1;
			move[N][3]=j+1;
			N++;
		}
	}
	printf("%d\n",N);
	for(i=0;i<N;i++){
	printf("%d %d %d %d\n",move[i][0],move[i][1],move[i][2],move[i][3]);
	}


	return 0;
}
1 5
9 9 9 9 11
 3 2
1 0
2 1
1 -1
 2 3
1 2 3
0 2 1
 2 3
1 2 3
-1 2 1
 2 3
1 2 6
-1 2 1
 0 5
9 3 15 9 11
 2 3
0 2 7
-1 2 0
 2 3
0 2 7
-1 1 0
 2 3
0 1 7
-1 0 0
 2 3
0 1 2
-1 0 0

2
1 1 1 2
1 3 1 4
 3
3 1 3 2
2 2 1 2
1 1 1 2
 3
2 3 1 3
1 1 1 2
1 2 1 3
 2
1 1 1 2
1 2 1 3
 2
1 1 1 2
1 2 1 3
 0
 0
 1
2 2 2 3
 1
1 2 1 3
 1
1 2 1 3

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 a[505][505];
int move[300000][4];

int main(){

	int H,W;

	scanf("%d %d",&H,&W);

	int i,j;

	for(i=1;i<=H;i++){
		for(j=1;j<=W;j++){
			scanf(" %d",&a[i][j]);
		}
	}

	int N=0;

	for(i=H;i>=2;i--){
		int sum1=0;
		for(j=1;j<=W;j++){
			sum1+=a[i][j];
		}
		if(sum1%2==1){
			int flag=0;
			for(j=1;j<=W;j++){
				if(flag==0&&a[i][j]%2==1){
					a[i][j]--;
					a[i-1][j]++;
					move[N][0]=i;
					move[N][1]=j;
					move[N][2]=i-1;
					move[N][3]=j;
					N++;
					flag=1;
				}
				else if(a[i][j]%2==1 && j<W){
					a[i][j]--;
					a[i][j+1]++;
					move[N][0]=i;
					move[N][1]=j;
					move[N][2]=i;
					move[N][3]=j+1;
					N++;
				}
			}
		}
		else{
			for(j=1;j<W;j++){
				if(a[i][j]%2==1){
					a[i][j]--;
					a[i][j+1]++;
					move[N][0]=i;
					move[N][1]=j;
					move[N][2]=i;
					move[N][3]=j+1;
					N++;
				}
			}
		}
	}

	for(j=1;j<W;j++){
		if(a[1][j]%2==1){
			a[1][j]--;
			a[1][j+1]++;
			move[N][0]=1;
			move[N][1]=j;
			move[N][2]=1;
			move[N][3]=j+1;
			N++;
		}
	}
	printf("%d\n",N);
	for(i=0;i<N;i++){
	printf("%d %d %d %d\n",move[i][0],move[i][1],move[i][2],move[i][3]);
	}


	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 1020100
a:
	.zero	1020100
	.globl	move
	.align 32
	.type	move, @object
	.size	move, 4800000
move:
	.zero	4800000
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	" %d"
.LC2:
	.string	"%d\n"
.LC3:
	.string	"%d %d %d %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
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-32(%rbp), %rdx
	leaq	-36(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -28(%rbp)
	jmp	.L2
.L5:
	movl	$1, -24(%rbp)
	jmp	.L3
.L4:
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	subq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -24(%rbp)
.L3:
	movl	-32(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jle	.L4
	addl	$1, -28(%rbp)
.L2:
	movl	-36(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jle	.L5
	movl	$0, -20(%rbp)
	movl	-36(%rbp), %eax
	movl	%eax, -28(%rbp)
	jmp	.L6
.L18:
	movl	$0, -16(%rbp)
	movl	$1, -24(%rbp)
	jmp	.L7
.L8:
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	subq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%eax, -16(%rbp)
	addl	$1, -24(%rbp)
.L7:
	movl	-32(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jle	.L8
	movl	-16(%rbp), %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	cmpl	$1, %eax
	jne	.L9
	movl	$0, -12(%rbp)
	movl	$1, -24(%rbp)
	jmp	.L10
.L13:
	cmpl	$0, -12(%rbp)
	jne	.L11
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	subq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	cmpl	$1, %eax
	jne	.L11
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	subq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	-1(%rax), %ecx
	movl	-24(%rbp), %eax
	movslq	%eax, %rsi
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	subq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-28(%rbp), %eax
	leal	-1(%rax), %ecx
	movl	-24(%rbp), %eax
	movslq	%eax, %rsi
	movslq	%ecx, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	subq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	1(%rax), %esi
	movl	-24(%rbp), %eax
	movslq	%eax, %rdi
	movslq	%ecx, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	subq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rdi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	%esi, (%rdx,%rax)
	movl	-20(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	leaq	move(%rip), %rdx
	movl	-28(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	leaq	4+move(%rip), %rdx
	movl	-24(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-28(%rbp), %eax
	leal	-1(%rax), %ecx
	movl	-20(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	8+move(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-20(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	leaq	12+move(%rip), %rdx
	movl	-24(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	addl	$1, -20(%rbp)
	movl	$1, -12(%rbp)
	jmp	.L12
.L11:
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	subq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	cmpl	$1, %eax
	jne	.L12
	movl	-32(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jge	.L12
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	subq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	-1(%rax), %ecx
	movl	-24(%rbp), %eax
	movslq	%eax, %rsi
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	subq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-24(%rbp), %eax
	leal	1(%rax), %ecx
	movslq	%ecx, %rsi
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	subq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	1(%rax), %esi
	movslq	%ecx, %rcx
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	subq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	%esi, (%rdx,%rax)
	movl	-20(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	leaq	move(%rip), %rdx
	movl	-28(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	leaq	4+move(%rip), %rdx
	movl	-24(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	leaq	8+move(%rip), %rdx
	movl	-28(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-24(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-20(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	12+move(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -20(%rbp)
.L12:
	addl	$1, -24(%rbp)
.L10:
	movl	-32(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jle	.L13
	jmp	.L14
.L9:
	movl	$1, -24(%rbp)
	jmp	.L15
.L17:
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	subq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	cmpl	$1, %eax
	jne	.L16
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	subq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	-1(%rax), %ecx
	movl	-24(%rbp), %eax
	movslq	%eax, %rsi
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	subq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-24(%rbp), %eax
	leal	1(%rax), %ecx
	movslq	%ecx, %rsi
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	subq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	1(%rax), %esi
	movslq	%ecx, %rcx
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	subq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	%esi, (%rdx,%rax)
	movl	-20(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	leaq	move(%rip), %rdx
	movl	-28(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	leaq	4+move(%rip), %rdx
	movl	-24(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	leaq	8+move(%rip), %rdx
	movl	-28(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-24(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-20(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	12+move(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -20(%rbp)
.L16:
	addl	$1, -24(%rbp)
.L15:
	movl	-32(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L17
.L14:
	subl	$1, -28(%rbp)
.L6:
	cmpl	$1, -28(%rbp)
	jg	.L18
	movl	$1, -24(%rbp)
	jmp	.L19
.L21:
	movl	-24(%rbp), %eax
	cltq
	addq	$505, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	cmpl	$1, %eax
	jne	.L20
	movl	-24(%rbp), %eax
	cltq
	addq	$505, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	-1(%rax), %ecx
	movl	-24(%rbp), %eax
	cltq
	addq	$505, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-24(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	addq	$505, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	a(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	leal	1(%rdx), %ecx
	cltq
	addq	$505, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-20(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	move(%rip), %rax
	movl	$1, (%rdx,%rax)
	movl	-20(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	leaq	4+move(%rip), %rdx
	movl	-24(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	8+move(%rip), %rax
	movl	$1, (%rdx,%rax)
	movl	-24(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-20(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	12+move(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -20(%rbp)
.L20:
	addl	$1, -24(%rbp)
.L19:
	movl	-32(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L21
	movl	-20(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, -28(%rbp)
	jmp	.L22
.L23:
	movl	-28(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	12+move(%rip), %rax
	movl	(%rdx,%rax), %edi
	movl	-28(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	8+move(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-28(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	4+move(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-28(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rsi
	leaq	move(%rip), %rax
	movl	(%rsi,%rax), %eax
	movl	%edi, %r8d
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -28(%rbp)
.L22:
	movl	-28(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jl	.L23
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L25
	call	__stack_chk_fail@PLT
.L25:
	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	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 1020100
a:
	.zero	1020100
	.globl	move
	.align 32
	.type	move, @object
	.size	move, 4800000
move:
	.zero	4800000
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	" %d"
.LC2:
	.string	"%d\n"
.LC3:
	.string	"%d %d %d %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
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-32(%rbp), %rdx
	leaq	-36(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -28(%rbp)
	jmp	.L2
.L5:
	movl	$1, -24(%rbp)
	jmp	.L3
.L4:
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	subq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -24(%rbp)
.L3:
	movl	-32(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jle	.L4
	addl	$1, -28(%rbp)
.L2:
	movl	-36(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jle	.L5
	movl	$0, -20(%rbp)
	movl	-36(%rbp), %eax
	movl	%eax, -28(%rbp)
	jmp	.L6
.L18:
	movl	$0, -16(%rbp)
	movl	$1, -24(%rbp)
	jmp	.L7
.L8:
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	subq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%eax, -16(%rbp)
	addl	$1, -24(%rbp)
.L7:
	movl	-32(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jle	.L8
	movl	-16(%rbp), %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	cmpl	$1, %eax
	jne	.L9
	movl	$0, -12(%rbp)
	movl	$1, -24(%rbp)
	jmp	.L10
.L13:
	cmpl	$0, -12(%rbp)
	jne	.L11
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	subq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	cmpl	$1, %eax
	jne	.L11
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	subq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	-1(%rax), %ecx
	movl	-24(%rbp), %eax
	movslq	%eax, %rsi
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	subq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-28(%rbp), %eax
	leal	-1(%rax), %ecx
	movl	-24(%rbp), %eax
	movslq	%eax, %rsi
	movslq	%ecx, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	subq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	1(%rax), %esi
	movl	-24(%rbp), %eax
	movslq	%eax, %rdi
	movslq	%ecx, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	subq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rdi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	%esi, (%rdx,%rax)
	movl	-20(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	leaq	move(%rip), %rdx
	movl	-28(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	leaq	4+move(%rip), %rdx
	movl	-24(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-28(%rbp), %eax
	leal	-1(%rax), %ecx
	movl	-20(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	8+move(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-20(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	leaq	12+move(%rip), %rdx
	movl	-24(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	addl	$1, -20(%rbp)
	movl	$1, -12(%rbp)
	jmp	.L12
.L11:
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	subq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	cmpl	$1, %eax
	jne	.L12
	movl	-32(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jge	.L12
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	subq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	-1(%rax), %ecx
	movl	-24(%rbp), %eax
	movslq	%eax, %rsi
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	subq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-24(%rbp), %eax
	leal	1(%rax), %ecx
	movslq	%ecx, %rsi
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	subq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	1(%rax), %esi
	movslq	%ecx, %rcx
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	subq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	%esi, (%rdx,%rax)
	movl	-20(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	leaq	move(%rip), %rdx
	movl	-28(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	leaq	4+move(%rip), %rdx
	movl	-24(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	leaq	8+move(%rip), %rdx
	movl	-28(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-24(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-20(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	12+move(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -20(%rbp)
.L12:
	addl	$1, -24(%rbp)
.L10:
	movl	-32(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jle	.L13
	jmp	.L14
.L9:
	movl	$1, -24(%rbp)
	jmp	.L15
.L17:
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	subq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	cmpl	$1, %eax
	jne	.L16
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	subq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	-1(%rax), %ecx
	movl	-24(%rbp), %eax
	movslq	%eax, %rsi
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	subq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-24(%rbp), %eax
	leal	1(%rax), %ecx
	movslq	%ecx, %rsi
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	subq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	1(%rax), %esi
	movslq	%ecx, %rcx
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$6, %rax
	subq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	%esi, (%rdx,%rax)
	movl	-20(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	leaq	move(%rip), %rdx
	movl	-28(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	leaq	4+move(%rip), %rdx
	movl	-24(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	leaq	8+move(%rip), %rdx
	movl	-28(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-24(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-20(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	12+move(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -20(%rbp)
.L16:
	addl	$1, -24(%rbp)
.L15:
	movl	-32(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L17
.L14:
	subl	$1, -28(%rbp)
.L6:
	cmpl	$1, -28(%rbp)
	jg	.L18
	movl	$1, -24(%rbp)
	jmp	.L19
.L21:
	movl	-24(%rbp), %eax
	cltq
	addq	$505, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	cmpl	$1, %eax
	jne	.L20
	movl	-24(%rbp), %eax
	cltq
	addq	$505, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	-1(%rax), %ecx
	movl	-24(%rbp), %eax
	cltq
	addq	$505, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-24(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	addq	$505, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	a(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	leal	1(%rdx), %ecx
	cltq
	addq	$505, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-20(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	move(%rip), %rax
	movl	$1, (%rdx,%rax)
	movl	-20(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	leaq	4+move(%rip), %rdx
	movl	-24(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	8+move(%rip), %rax
	movl	$1, (%rdx,%rax)
	movl	-24(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-20(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	12+move(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -20(%rbp)
.L20:
	addl	$1, -24(%rbp)
.L19:
	movl	-32(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L21
	movl	-20(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, -28(%rbp)
	jmp	.L22
.L23:
	movl	-28(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	12+move(%rip), %rax
	movl	(%rdx,%rax), %edi
	movl	-28(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	8+move(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-28(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	4+move(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-28(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rsi
	leaq	move(%rip), %rax
	movl	(%rsi,%rax), %eax
	movl	%edi, %r8d
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -28(%rbp)
.L22:
	movl	-28(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jl	.L23
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L25
	call	__stack_chk_fail@PLT
.L25:
	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:
