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 k[3]={1,0,-1};
int l[3]={1,0,-1};
int a[51][51],h,w;

void dps(int y,int x){
    int i,j;
    if(x==-1 || y==-1 || x==w || y==h)
        return;
    
    a[y][x]=0;
    for(i=0;i<3;i++){
        for (j=0; j<3; j++){
           if(a[y+k[i]][x+l[j]]==1)
               dps(y+k[i],x+l[j]);
        }
    }
}

int main(void){
    int i,j,count=0;
    while(1){
    i=0;j=0;w=0;h=0;count=0;
    scanf("%d %d",&w,&h);
        if(w==0)break;
    for(i=0;i<h;i++)
        for (j=0; j<w; j++) {
            scanf("%d",&a[i][j]);
        }
    for(i=0;i<h;i++)
        for (j=0; j<w; j++)
            if(a[i][j]==1){
                dps(i,j);
                count++;
            }
    printf("%d\n",count);
    }
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	k
	.data
	.align 8
	.type	k, @object
	.size	k, 12
k:
	.long	1
	.long	0
	.long	-1
	.globl	l
	.align 8
	.type	l, @object
	.size	l, 12
l:
	.long	1
	.long	0
	.long	-1
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 10404
a:
	.zero	10404
	.globl	h
	.align 4
	.type	h, @object
	.size	h, 4
h:
	.zero	4
	.globl	w
	.align 4
	.type	w, @object
	.size	w, 4
w:
	.zero	4
	.text
	.globl	dps
	.type	dps, @function
dps:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	cmpl	$-1, -24(%rbp)
	je	.L10
	cmpl	$-1, -20(%rbp)
	je	.L10
	movl	w(%rip), %eax
	cmpl	%eax, -24(%rbp)
	je	.L10
	movl	h(%rip), %eax
	cmpl	%eax, -20(%rbp)
	je	.L10
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	salq	$4, %rdx
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	$0, (%rdx,%rax)
	movl	$0, -8(%rbp)
	jmp	.L5
.L9:
	movl	$0, -4(%rbp)
	jmp	.L6
.L8:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	k(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-20(%rbp), %eax
	leal	(%rdx,%rax), %ecx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	l(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	movslq	%eax, %rsi
	movslq	%ecx, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	salq	$4, %rdx
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$1, %eax
	jne	.L7
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	l(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-24(%rbp), %eax
	addl	%eax, %edx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	k(%rip), %rax
	movl	(%rcx,%rax), %ecx
	movl	-20(%rbp), %eax
	addl	%ecx, %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	dps
.L7:
	addl	$1, -4(%rbp)
.L6:
	cmpl	$2, -4(%rbp)
	jle	.L8
	addl	$1, -8(%rbp)
.L5:
	cmpl	$2, -8(%rbp)
	jle	.L9
	jmp	.L1
.L10:
	nop
.L1:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	dps, .-dps
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	$0, -4(%rbp)
.L23:
	movl	$0, -12(%rbp)
	movl	$0, -8(%rbp)
	movl	$0, w(%rip)
	movl	$0, h(%rip)
	movl	$0, -4(%rbp)
	leaq	h(%rip), %rax
	movq	%rax, %rdx
	leaq	w(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	w(%rip), %eax
	testl	%eax, %eax
	je	.L26
	movl	$0, -12(%rbp)
	jmp	.L14
.L17:
	movl	$0, -8(%rbp)
	jmp	.L15
.L16:
	movl	-8(%rbp), %eax
	movslq	%eax, %rcx
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	salq	$4, %rdx
	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, -8(%rbp)
.L15:
	movl	w(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L16
	addl	$1, -12(%rbp)
.L14:
	movl	h(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L17
	movl	$0, -12(%rbp)
	jmp	.L18
.L22:
	movl	$0, -8(%rbp)
	jmp	.L19
.L21:
	movl	-8(%rbp), %eax
	movslq	%eax, %rcx
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	salq	$4, %rdx
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$1, %eax
	jne	.L20
	movl	-8(%rbp), %edx
	movl	-12(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	dps
	addl	$1, -4(%rbp)
.L20:
	addl	$1, -8(%rbp)
.L19:
	movl	w(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L21
	addl	$1, -12(%rbp)
.L18:
	movl	h(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L22
	movl	-4(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L23
.L26:
	nop
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
user
	.file	"temp.c"
	.text
	.p2align 4
	.type	dps.part.0, @function
dps.part.0:
.LFB25:
	.cfi_startproc
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	movl	%edi, %r14d
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	leaq	k(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	leaq	l(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	leaq	a(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	movl	%esi, %ebx
.L11:
	movl	0(%r13), %edi
	movl	(%r12), %esi
	addl	%r14d, %edi
	addl	%ebx, %esi
	movslq	%edi, %rax
	movslq	%esi, %rcx
	leaq	(%rax,%rax,2), %rdx
	movq	%rdx, %r8
	salq	$4, %r8
	addq	%r8, %rdx
	addq	%rcx, %rdx
	cmpl	$1, 0(%rbp,%rdx,4)
	je	.L17
.L2:
	leaq	(%rax,%rax,2), %rdx
	movl	4+l(%rip), %esi
	movq	%rdx, %r8
	addl	%ebx, %esi
	salq	$4, %r8
	addq	%r8, %rdx
	movslq	%esi, %rcx
	addq	%rcx, %rdx
	cmpl	$1, 0(%rbp,%rdx,4)
	je	.L18
.L3:
	leaq	(%rax,%rax,2), %rax
	movl	8+l(%rip), %esi
	movq	%rax, %rcx
	addl	%ebx, %esi
	salq	$4, %rcx
	addq	%rcx, %rax
	movslq	%esi, %rdx
	addq	%rdx, %rax
	cmpl	$1, 0(%rbp,%rax,4)
	je	.L19
.L4:
	movl	4+k(%rip), %edi
	movl	(%r12), %esi
	addl	%r14d, %edi
	addl	%ebx, %esi
	movslq	%edi, %rax
	movslq	%esi, %rcx
	leaq	(%rax,%rax,2), %rdx
	movq	%rdx, %r8
	salq	$4, %r8
	addq	%r8, %rdx
	addq	%rcx, %rdx
	cmpl	$1, 0(%rbp,%rdx,4)
	je	.L20
.L5:
	leaq	(%rax,%rax,2), %rdx
	movl	4+l(%rip), %esi
	movq	%rdx, %r8
	addl	%ebx, %esi
	salq	$4, %r8
	addq	%r8, %rdx
	movslq	%esi, %rcx
	addq	%rcx, %rdx
	cmpl	$1, 0(%rbp,%rdx,4)
	je	.L21
.L6:
	leaq	(%rax,%rax,2), %rax
	movl	8+l(%rip), %esi
	movq	%rax, %rcx
	addl	%ebx, %esi
	salq	$4, %rcx
	addq	%rcx, %rax
	movslq	%esi, %rdx
	addq	%rdx, %rax
	cmpl	$1, 0(%rbp,%rax,4)
	je	.L22
.L7:
	movl	8+k(%rip), %edi
	movl	(%r12), %esi
	addl	%r14d, %edi
	addl	%ebx, %esi
	movslq	%edi, %rax
	movslq	%esi, %rcx
	leaq	(%rax,%rax,2), %rdx
	movq	%rdx, %r8
	salq	$4, %r8
	addq	%r8, %rdx
	addq	%rcx, %rdx
	cmpl	$1, 0(%rbp,%rdx,4)
	je	.L23
.L8:
	leaq	(%rax,%rax,2), %rdx
	movl	4+l(%rip), %esi
	movq	%rdx, %r8
	addl	%ebx, %esi
	salq	$4, %r8
	addq	%r8, %rdx
	movslq	%esi, %rcx
	addq	%rcx, %rdx
	cmpl	$1, 0(%rbp,%rdx,4)
	je	.L24
.L9:
	leaq	(%rax,%rax,2), %rax
	addl	8+l(%rip), %ebx
	movq	%rax, %rcx
	movslq	%ebx, %rdx
	salq	$4, %rcx
	addq	%rcx, %rax
	addq	%rdx, %rax
	cmpl	$1, 0(%rbp,%rax,4)
	je	.L25
.L1:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L17:
	.cfi_restore_state
	cmpl	$-1, %edi
	je	.L2
	cmpl	$-1, %esi
	je	.L2
	cmpl	%esi, w(%rip)
	je	.L2
	cmpl	%edi, h(%rip)
	je	.L2
	movl	$0, 0(%rbp,%rdx,4)
	call	dps.part.0
	movl	0(%r13), %edi
	addl	%r14d, %edi
	movslq	%edi, %rax
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L25:
	cmpl	$-1, %ebx
	je	.L1
	cmpl	$-1, %edi
	je	.L1
	cmpl	w(%rip), %ebx
	je	.L1
	cmpl	%edi, h(%rip)
	je	.L1
	movl	$0, 0(%rbp,%rax,4)
	movl	%edi, %r14d
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L24:
	cmpl	$-1, %esi
	je	.L9
	cmpl	$-1, %edi
	je	.L9
	cmpl	w(%rip), %esi
	je	.L9
	cmpl	%edi, h(%rip)
	je	.L9
	movl	$0, 0(%rbp,%rdx,4)
	call	dps.part.0
	movl	8+k(%rip), %edi
	addl	%r14d, %edi
	movslq	%edi, %rax
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L23:
	cmpl	$-1, %esi
	je	.L8
	cmpl	$-1, %edi
	je	.L8
	cmpl	w(%rip), %esi
	je	.L8
	cmpl	h(%rip), %edi
	je	.L8
	movl	$0, 0(%rbp,%rdx,4)
	call	dps.part.0
	movl	8+k(%rip), %edi
	addl	%r14d, %edi
	movslq	%edi, %rax
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L22:
	cmpl	$-1, %esi
	je	.L7
	cmpl	$-1, %edi
	je	.L7
	cmpl	w(%rip), %esi
	je	.L7
	cmpl	h(%rip), %edi
	je	.L7
	movl	$0, 0(%rbp,%rax,4)
	call	dps.part.0
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L21:
	cmpl	$-1, %esi
	je	.L6
	cmpl	$-1, %edi
	je	.L6
	cmpl	w(%rip), %esi
	je	.L6
	cmpl	h(%rip), %edi
	je	.L6
	movl	$0, 0(%rbp,%rdx,4)
	call	dps.part.0
	movl	4+k(%rip), %edi
	addl	%r14d, %edi
	movslq	%edi, %rax
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L20:
	cmpl	$-1, %esi
	je	.L5
	cmpl	$-1, %edi
	je	.L5
	cmpl	w(%rip), %esi
	je	.L5
	cmpl	h(%rip), %edi
	je	.L5
	movl	$0, 0(%rbp,%rdx,4)
	call	dps.part.0
	movl	4+k(%rip), %edi
	addl	%r14d, %edi
	movslq	%edi, %rax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L19:
	cmpl	$-1, %esi
	je	.L4
	cmpl	$-1, %edi
	je	.L4
	cmpl	w(%rip), %esi
	je	.L4
	cmpl	h(%rip), %edi
	je	.L4
	movl	$0, 0(%rbp,%rax,4)
	call	dps.part.0
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L18:
	cmpl	$-1, %edi
	je	.L3
	cmpl	$-1, %esi
	je	.L3
	cmpl	%esi, w(%rip)
	je	.L3
	cmpl	%edi, h(%rip)
	je	.L3
	movl	$0, 0(%rbp,%rdx,4)
	call	dps.part.0
	movl	0(%r13), %edi
	addl	%r14d, %edi
	movslq	%edi, %rax
	jmp	.L3
	.cfi_endproc
.LFE25:
	.size	dps.part.0, .-dps.part.0
	.p2align 4
	.globl	dps
	.type	dps, @function
dps:
.LFB23:
	.cfi_startproc
	endbr64
	cmpl	$-1, %esi
	je	.L26
	cmpl	$-1, %edi
	je	.L26
	cmpl	%esi, w(%rip)
	je	.L26
	cmpl	%edi, h(%rip)
	je	.L26
	movslq	%edi, %rax
	movslq	%esi, %rdx
	leaq	(%rax,%rax,2), %rax
	movq	%rax, %rcx
	salq	$4, %rcx
	addq	%rcx, %rax
	addq	%rdx, %rax
	leaq	a(%rip), %rdx
	movl	$0, (%rdx,%rax,4)
	jmp	dps.part.0
	.p2align 4,,10
	.p2align 3
.L26:
	ret
	.cfi_endproc
.LFE23:
	.size	dps, .-dps
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	a(%rip), %r15
	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	$104, %rsp
	.cfi_def_cfa_offset 160
	.p2align 4,,10
	.p2align 3
.L66:
	leaq	h(%rip), %rdx
	leaq	w(%rip), %rsi
	xorl	%eax, %eax
	movl	$0, w(%rip)
	leaq	.LC0(%rip), %rdi
	movl	$0, h(%rip)
	call	__isoc99_scanf@PLT
	movl	w(%rip), %edx
	testl	%edx, %edx
	je	.L71
	movl	h(%rip), %eax
	xorl	%r12d, %r12d
	xorl	%ebp, %ebp
	leaq	.LC1(%rip), %rbx
	movl	%eax, 32(%rsp)
	testl	%eax, %eax
	jle	.L31
	testl	%edx, %edx
	jle	.L88
	.p2align 4,,10
	.p2align 3
.L37:
	leaq	(%r15,%r12,4), %r14
	xorl	%r13d, %r13d
	.p2align 4,,10
	.p2align 3
.L32:
	movq	%r14, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r13d
	call	__isoc99_scanf@PLT
	movl	w(%rip), %edx
	addq	$4, %r14
	cmpl	%r13d, %edx
	jg	.L32
	movl	h(%rip), %eax
	addl	$1, %ebp
	cmpl	%ebp, %eax
	jle	.L89
	addq	$51, %r12
	testl	%edx, %edx
	jg	.L37
.L88:
	movl	%eax, 32(%rsp)
.L35:
	leaq	a(%rip), %rax
	movl	%edx, %esi
	movl	$0, 44(%rsp)
	leaq	12+l(%rip), %r8
	movq	%rax, 48(%rsp)
	movl	$0, 16(%rsp)
	testl	%esi, %esi
	jle	.L64
	.p2align 4,,10
	.p2align 3
.L70:
	movq	48(%rsp), %r13
	xorl	%r12d, %r12d
	jmp	.L62
	.p2align 4,,10
	.p2align 3
.L39:
	addl	$1, %r12d
	addq	$4, %r13
	cmpl	%esi, %r12d
	jge	.L90
.L62:
	cmpl	$1, 0(%r13)
	jne	.L39
	movl	32(%rsp), %edi
	cmpl	%edi, 16(%rsp)
	je	.L40
	movl	$0, 0(%r13)
	leaq	k(%rip), %rax
	movq	%r13, 56(%rsp)
	movq	%rax, %r14
	movl	%r12d, 20(%rsp)
.L41:
	leaq	l(%rip), %r13
	movq	%r14, %rax
	movq	%r13, %r14
	movq	%rax, %r13
.L61:
	movl	16(%rsp), %r12d
	addl	0(%r13), %r12d
	movslq	%r12d, %rax
	movl	20(%rsp), %ebp
	addl	(%r14), %ebp
	leaq	(%rax,%rax,2), %rax
	movslq	%ebp, %rdx
	movq	%rax, %rcx
	salq	$4, %rcx
	addq	%rcx, %rax
	addq	%rdx, %rax
	cmpl	$1, (%r15,%rax,4)
	je	.L91
.L42:
	addq	$4, %r14
	cmpq	%r14, %r8
	jne	.L61
	movq	%r13, %r14
	leaq	12+k(%rip), %rax
	addq	$4, %r14
	cmpq	%r14, %rax
	jne	.L41
	movq	56(%rsp), %r13
	movl	20(%rsp), %r12d
.L40:
	addl	$1, %r12d
	addl	$1, 44(%rsp)
	addq	$4, %r13
	cmpl	%esi, %r12d
	jl	.L62
.L90:
	addl	$1, 16(%rsp)
	movl	16(%rsp), %eax
	cmpl	32(%rsp), %eax
	jge	.L64
	addq	$204, 48(%rsp)
	testl	%esi, %esi
	jg	.L70
.L64:
	movl	44(%rsp), %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L66
	.p2align 4,,10
	.p2align 3
.L91:
	cmpl	$-1, %ebp
	je	.L42
	cmpl	$-1, %r12d
	je	.L42
	cmpl	%esi, %ebp
	je	.L42
	cmpl	32(%rsp), %r12d
	je	.L42
	movl	$0, (%r15,%rax,4)
	leaq	k(%rip), %rax
	movq	%rax, 8(%rsp)
	movq	%r14, 64(%rsp)
	movq	%r13, 72(%rsp)
	movl	%r12d, 24(%rsp)
	movl	%ebp, 28(%rsp)
.L43:
	leaq	l(%rip), %r14
.L60:
	movq	8(%rsp), %rax
	movl	24(%rsp), %r12d
	movl	28(%rsp), %r13d
	addl	(%r14), %r13d
	addl	(%rax), %r12d
	movslq	%r13d, %rdx
	movslq	%r12d, %rax
	leaq	(%rax,%rax,2), %rax
	movq	%rax, %rcx
	salq	$4, %rcx
	addq	%rcx, %rax
	addq	%rdx, %rax
	cmpl	$1, (%r15,%rax,4)
	je	.L92
.L44:
	addq	$4, %r14
	cmpq	%r8, %r14
	jne	.L60
	addq	$4, 8(%rsp)
	movq	8(%rsp), %rax
	leaq	12+k(%rip), %rdi
	cmpq	%rax, %rdi
	jne	.L43
	movq	64(%rsp), %r14
	movq	72(%rsp), %r13
	jmp	.L42
	.p2align 4,,10
	.p2align 3
.L92:
	cmpl	$-1, %r13d
	je	.L44
	cmpl	$-1, %r12d
	je	.L44
	cmpl	%esi, %r13d
	je	.L44
	cmpl	32(%rsp), %r12d
	je	.L44
	movl	%r12d, 36(%rsp)
	movl	%r13d, 40(%rsp)
	movl	$0, (%r15,%rax,4)
	leaq	k(%rip), %rax
	movq	%r14, 80(%rsp)
	movq	%rax, %r14
.L45:
	leaq	l(%rip), %r9
.L59:
	movl	36(%rsp), %ebx
	addl	(%r14), %ebx
	movslq	%ebx, %rax
	movl	40(%rsp), %r11d
	addl	(%r9), %r11d
	leaq	(%rax,%rax,2), %rax
	movslq	%r11d, %rdx
	movq	%rax, %rcx
	salq	$4, %rcx
	addq	%rcx, %rax
	addq	%rdx, %rax
	cmpl	$1, (%r15,%rax,4)
	je	.L93
.L46:
	addq	$4, %r9
	cmpq	%r8, %r9
	jne	.L59
	addq	$4, %r14
	leaq	12+k(%rip), %rax
	cmpq	%r14, %rax
	jne	.L45
	movq	80(%rsp), %r14
	jmp	.L44
	.p2align 4,,10
	.p2align 3
.L93:
	cmpl	$-1, %r11d
	je	.L46
	cmpl	$-1, %ebx
	je	.L46
	cmpl	%esi, %r11d
	je	.L46
	cmpl	32(%rsp), %ebx
	je	.L46
	movl	$0, (%r15,%rax,4)
	leaq	k(%rip), %r13
	movq	%r14, 88(%rsp)
.L47:
	leaq	l(%rip), %r10
.L58:
	movl	0(%r13), %r12d
	movl	(%r10), %ebp
	addl	%ebx, %r12d
	addl	%r11d, %ebp
	movslq	%r12d, %rax
	movslq	%ebp, %rdx
	leaq	(%rax,%rax,2), %rax
	movq	%rax, %rcx
	salq	$4, %rcx
	addq	%rcx, %rax
	addq	%rdx, %rax
	cmpl	$1, (%r15,%rax,4)
	je	.L94
.L48:
	addq	$4, %r10
	cmpq	%r8, %r10
	jne	.L58
	addq	$4, %r13
	leaq	12+k(%rip), %rax
	cmpq	%r13, %rax
	jne	.L47
	movq	88(%rsp), %r14
	jmp	.L46
	.p2align 4,,10
	.p2align 3
.L94:
	cmpl	$-1, %ebp
	je	.L48
	cmpl	$-1, %r12d
	je	.L48
	cmpl	%esi, %ebp
	je	.L48
	cmpl	32(%rsp), %r12d
	je	.L48
	movl	$0, (%r15,%rax,4)
	leaq	k(%rip), %rax
	movl	(%rax), %edi
	leaq	l(%rip), %rax
	movl	(%rax), %esi
	addl	%r12d, %edi
	movslq	%edi, %rax
	addl	%ebp, %esi
	leaq	(%rax,%rax,2), %rdx
	movslq	%esi, %rcx
	movq	%rdx, %r14
	salq	$4, %r14
	addq	%r14, %rdx
	addq	%rcx, %rdx
	cmpl	$1, (%r15,%rdx,4)
	je	.L95
.L49:
	leaq	(%rax,%rax,2), %rdx
	movl	4+l(%rip), %esi
	movq	%rdx, %r14
	addl	%ebp, %esi
	salq	$4, %r14
	addq	%r14, %rdx
	movslq	%esi, %rcx
	addq	%rcx, %rdx
	cmpl	$1, (%r15,%rdx,4)
	je	.L96
.L50:
	leaq	(%rax,%rax,2), %rax
	movl	8+l(%rip), %esi
	movq	%rax, %rcx
	addl	%ebp, %esi
	salq	$4, %rcx
	addq	%rcx, %rax
	movslq	%esi, %rdx
	addq	%rdx, %rax
	cmpl	$1, (%r15,%rax,4)
	je	.L97
.L51:
	movl	4+k(%rip), %edi
	leaq	l(%rip), %rax
	movl	(%rax), %esi
	addl	%r12d, %edi
	movslq	%edi, %rax
	addl	%ebp, %esi
	leaq	(%rax,%rax,2), %rdx
	movslq	%esi, %rcx
	movq	%rdx, %r14
	salq	$4, %r14
	addq	%r14, %rdx
	addq	%rcx, %rdx
	cmpl	$1, (%r15,%rdx,4)
	je	.L98
.L52:
	leaq	(%rax,%rax,2), %rdx
	movl	4+l(%rip), %esi
	movq	%rdx, %r14
	addl	%ebp, %esi
	salq	$4, %r14
	addq	%r14, %rdx
	movslq	%esi, %rcx
	addq	%rcx, %rdx
	cmpl	$1, (%r15,%rdx,4)
	je	.L99
.L53:
	leaq	(%rax,%rax,2), %rax
	movl	8+l(%rip), %esi
	movq	%rax, %rcx
	addl	%ebp, %esi
	salq	$4, %rcx
	addq	%rcx, %rax
	movslq	%esi, %rdx
	addq	%rdx, %rax
	cmpl	$1, (%r15,%rax,4)
	je	.L100
.L54:
	movl	8+k(%rip), %edi
	leaq	l(%rip), %rax
	movl	(%rax), %esi
	addl	%r12d, %edi
	movslq	%edi, %rax
	addl	%ebp, %esi
	leaq	(%rax,%rax,2), %rdx
	movslq	%esi, %rcx
	movq	%rdx, %r14
	salq	$4, %r14
	addq	%r14, %rdx
	addq	%rcx, %rdx
	cmpl	$1, (%r15,%rdx,4)
	je	.L101
.L55:
	leaq	(%rax,%rax,2), %rdx
	movl	4+l(%rip), %esi
	movq	%rdx, %r14
	addl	%ebp, %esi
	salq	$4, %r14
	addq	%r14, %rdx
	movslq	%esi, %rcx
	addq	%rcx, %rdx
	cmpl	$1, (%r15,%rdx,4)
	je	.L102
.L56:
	leaq	(%rax,%rax,2), %rax
	addl	8+l(%rip), %ebp
	movq	%rax, %rcx
	movslq	%ebp, %rdx
	salq	$4, %rcx
	addq	%rcx, %rax
	addq	%rdx, %rax
	cmpl	$1, (%r15,%rax,4)
	je	.L57
	movl	h(%rip), %eax
	movl	w(%rip), %esi
	movl	%eax, 32(%rsp)
	jmp	.L48
	.p2align 4,,10
	.p2align 3
.L89:
	movl	%eax, 32(%rsp)
	testl	%eax, %eax
	jg	.L35
.L31:
	movl	$0, 44(%rsp)
	jmp	.L64
.L57:
	movl	%ebp, %esi
	call	dps
	movl	h(%rip), %eax
	movl	w(%rip), %esi
	leaq	12+l(%rip), %r8
	movl	%eax, 32(%rsp)
	jmp	.L48
.L102:
	call	dps
	movl	8+k(%rip), %edi
	leaq	12+l(%rip), %r8
	addl	%r12d, %edi
	movslq	%edi, %rax
	jmp	.L56
.L101:
	call	dps
	movl	8+k(%rip), %edi
	leaq	12+l(%rip), %r8
	addl	%r12d, %edi
	movslq	%edi, %rax
	jmp	.L55
.L100:
	call	dps
	leaq	12+l(%rip), %r8
	jmp	.L54
.L99:
	call	dps
	movl	4+k(%rip), %edi
	leaq	12+l(%rip), %r8
	addl	%r12d, %edi
	movslq	%edi, %rax
	jmp	.L53
.L98:
	call	dps
	movl	4+k(%rip), %edi
	leaq	12+l(%rip), %r8
	addl	%r12d, %edi
	movslq	%edi, %rax
	jmp	.L52
.L97:
	call	dps
	leaq	12+l(%rip), %r8
	jmp	.L51
.L96:
	call	dps
	leaq	k(%rip), %rax
	leaq	12+l(%rip), %r8
	movl	(%rax), %edi
	addl	%r12d, %edi
	movslq	%edi, %rax
	jmp	.L50
.L95:
	call	dps
	leaq	k(%rip), %rax
	leaq	12+l(%rip), %r8
	movl	(%rax), %edi
	addl	%r12d, %edi
	movslq	%edi, %rax
	jmp	.L49
.L71:
	addq	$104, %rsp
	.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
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	w
	.bss
	.align 4
	.type	w, @object
	.size	w, 4
w:
	.zero	4
	.globl	h
	.align 4
	.type	h, @object
	.size	h, 4
h:
	.zero	4
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 10404
a:
	.zero	10404
	.globl	l
	.data
	.align 8
	.type	l, @object
	.size	l, 12
l:
	.long	1
	.long	0
	.long	-1
	.globl	k
	.align 8
	.type	k, @object
	.size	k, 12
k:
	.long	1
	.long	0
	.long	-1
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

rule
	.file	"temp.c"
	.text
	.p2align 4
	.type	dps.part.0, @function
dps.part.0:
.LFB25:
	.cfi_startproc
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	movl	%edi, %r14d
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	leaq	k(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	leaq	l(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	leaq	a(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	movl	%esi, %ebx
.L11:
	movl	0(%r13), %edi
	movl	(%r12), %esi
	addl	%r14d, %edi
	addl	%ebx, %esi
	movslq	%edi, %rax
	movslq	%esi, %rcx
	leaq	(%rax,%rax,2), %rdx
	movq	%rdx, %r8
	salq	$4, %r8
	addq	%r8, %rdx
	addq	%rcx, %rdx
	cmpl	$1, 0(%rbp,%rdx,4)
	je	.L17
.L2:
	leaq	(%rax,%rax,2), %rdx
	movl	4+l(%rip), %esi
	movq	%rdx, %r8
	addl	%ebx, %esi
	salq	$4, %r8
	addq	%r8, %rdx
	movslq	%esi, %rcx
	addq	%rcx, %rdx
	cmpl	$1, 0(%rbp,%rdx,4)
	je	.L18
.L3:
	leaq	(%rax,%rax,2), %rax
	movl	8+l(%rip), %esi
	movq	%rax, %rcx
	addl	%ebx, %esi
	salq	$4, %rcx
	addq	%rcx, %rax
	movslq	%esi, %rdx
	addq	%rdx, %rax
	cmpl	$1, 0(%rbp,%rax,4)
	je	.L19
.L4:
	movl	4+k(%rip), %edi
	movl	(%r12), %esi
	addl	%r14d, %edi
	addl	%ebx, %esi
	movslq	%edi, %rax
	movslq	%esi, %rcx
	leaq	(%rax,%rax,2), %rdx
	movq	%rdx, %r8
	salq	$4, %r8
	addq	%r8, %rdx
	addq	%rcx, %rdx
	cmpl	$1, 0(%rbp,%rdx,4)
	je	.L20
.L5:
	leaq	(%rax,%rax,2), %rdx
	movl	4+l(%rip), %esi
	movq	%rdx, %r8
	addl	%ebx, %esi
	salq	$4, %r8
	addq	%r8, %rdx
	movslq	%esi, %rcx
	addq	%rcx, %rdx
	cmpl	$1, 0(%rbp,%rdx,4)
	je	.L21
.L6:
	leaq	(%rax,%rax,2), %rax
	movl	8+l(%rip), %esi
	movq	%rax, %rcx
	addl	%ebx, %esi
	salq	$4, %rcx
	addq	%rcx, %rax
	movslq	%esi, %rdx
	addq	%rdx, %rax
	cmpl	$1, 0(%rbp,%rax,4)
	je	.L22
.L7:
	movl	8+k(%rip), %edi
	movl	(%r12), %esi
	addl	%r14d, %edi
	addl	%ebx, %esi
	movslq	%edi, %rax
	movslq	%esi, %rcx
	leaq	(%rax,%rax,2), %rdx
	movq	%rdx, %r8
	salq	$4, %r8
	addq	%r8, %rdx
	addq	%rcx, %rdx
	cmpl	$1, 0(%rbp,%rdx,4)
	je	.L23
.L8:
	leaq	(%rax,%rax,2), %rdx
	movl	4+l(%rip), %esi
	movq	%rdx, %r8
	addl	%ebx, %esi
	salq	$4, %r8
	addq	%r8, %rdx
	movslq	%esi, %rcx
	addq	%rcx, %rdx
	cmpl	$1, 0(%rbp,%rdx,4)
	je	.L24
.L9:
	leaq	(%rax,%rax,2), %rax
	addl	8+l(%rip), %ebx
	movq	%rax, %rcx
	movslq	%ebx, %rdx
	salq	$4, %rcx
	addq	%rcx, %rax
	addq	%rdx, %rax
	cmpl	$1, 0(%rbp,%rax,4)
	je	.L25
.L1:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L17:
	.cfi_restore_state
	cmpl	$-1, %edi
	je	.L2
	cmpl	$-1, %esi
	je	.L2
	cmpl	%esi, w(%rip)
	je	.L2
	cmpl	%edi, h(%rip)
	je	.L2
	movl	$0, 0(%rbp,%rdx,4)
	call	dps.part.0
	movl	0(%r13), %edi
	addl	%r14d, %edi
	movslq	%edi, %rax
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L25:
	cmpl	$-1, %ebx
	je	.L1
	cmpl	$-1, %edi
	je	.L1
	cmpl	w(%rip), %ebx
	je	.L1
	cmpl	%edi, h(%rip)
	je	.L1
	movl	$0, 0(%rbp,%rax,4)
	movl	%edi, %r14d
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L24:
	cmpl	$-1, %esi
	je	.L9
	cmpl	$-1, %edi
	je	.L9
	cmpl	w(%rip), %esi
	je	.L9
	cmpl	%edi, h(%rip)
	je	.L9
	movl	$0, 0(%rbp,%rdx,4)
	call	dps.part.0
	movl	8+k(%rip), %edi
	addl	%r14d, %edi
	movslq	%edi, %rax
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L23:
	cmpl	$-1, %esi
	je	.L8
	cmpl	$-1, %edi
	je	.L8
	cmpl	w(%rip), %esi
	je	.L8
	cmpl	h(%rip), %edi
	je	.L8
	movl	$0, 0(%rbp,%rdx,4)
	call	dps.part.0
	movl	8+k(%rip), %edi
	addl	%r14d, %edi
	movslq	%edi, %rax
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L22:
	cmpl	$-1, %esi
	je	.L7
	cmpl	$-1, %edi
	je	.L7
	cmpl	w(%rip), %esi
	je	.L7
	cmpl	h(%rip), %edi
	je	.L7
	movl	$0, 0(%rbp,%rax,4)
	call	dps.part.0
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L21:
	cmpl	$-1, %esi
	je	.L6
	cmpl	$-1, %edi
	je	.L6
	cmpl	w(%rip), %esi
	je	.L6
	cmpl	h(%rip), %edi
	je	.L6
	movl	$0, 0(%rbp,%rdx,4)
	call	dps.part.0
	movl	4+k(%rip), %edi
	addl	%r14d, %edi
	movslq	%edi, %rax
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L20:
	cmpl	$-1, %esi
	je	.L5
	cmpl	$-1, %edi
	je	.L5
	cmpl	w(%rip), %esi
	je	.L5
	cmpl	h(%rip), %edi
	je	.L5
	movl	$0, 0(%rbp,%rdx,4)
	call	dps.part.0
	movl	4+k(%rip), %edi
	addl	%r14d, %edi
	movslq	%edi, %rax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L19:
	cmpl	$-1, %esi
	je	.L4
	cmpl	$-1, %edi
	je	.L4
	cmpl	w(%rip), %esi
	je	.L4
	cmpl	h(%rip), %edi
	je	.L4
	movl	$0, 0(%rbp,%rax,4)
	call	dps.part.0
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L18:
	cmpl	$-1, %edi
	je	.L3
	cmpl	$-1, %esi
	je	.L3
	cmpl	%esi, w(%rip)
	je	.L3
	cmpl	%edi, h(%rip)
	je	.L3
	movl	$0, 0(%rbp,%rdx,4)
	call	dps.part.0
	movl	0(%r13), %edi
	addl	%r14d, %edi
	movslq	%edi, %rax
	jmp	.L3
	.cfi_endproc
.LFE25:
	.size	dps.part.0, .-dps.part.0
	.p2align 4
	.globl	dps
	.type	dps, @function
dps:
.LFB23:
	.cfi_startproc
	endbr64
	cmpl	$-1, %esi
	je	.L26
	cmpl	$-1, %edi
	je	.L26
	cmpl	%esi, w(%rip)
	je	.L26
	cmpl	%edi, h(%rip)
	je	.L26
	movslq	%edi, %rax
	movslq	%esi, %rdx
	leaq	(%rax,%rax,2), %rax
	movq	%rax, %rcx
	salq	$4, %rcx
	addq	%rcx, %rax
	addq	%rdx, %rax
	leaq	a(%rip), %rdx
	movl	$0, (%rdx,%rax,4)
	jmp	dps.part.0
	.p2align 4,,10
	.p2align 3
.L26:
	ret
	.cfi_endproc
.LFE23:
	.size	dps, .-dps
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	a(%rip), %r15
	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	$104, %rsp
	.cfi_def_cfa_offset 160
	.p2align 4,,10
	.p2align 3
.L66:
	leaq	h(%rip), %rdx
	leaq	w(%rip), %rsi
	xorl	%eax, %eax
	movl	$0, w(%rip)
	leaq	.LC0(%rip), %rdi
	movl	$0, h(%rip)
	call	__isoc99_scanf@PLT
	movl	w(%rip), %edx
	testl	%edx, %edx
	je	.L71
	movl	h(%rip), %eax
	xorl	%r12d, %r12d
	xorl	%ebp, %ebp
	leaq	.LC1(%rip), %rbx
	movl	%eax, 32(%rsp)
	testl	%eax, %eax
	jle	.L31
	testl	%edx, %edx
	jle	.L88
	.p2align 4,,10
	.p2align 3
.L37:
	leaq	(%r15,%r12,4), %r14
	xorl	%r13d, %r13d
	.p2align 4,,10
	.p2align 3
.L32:
	movq	%r14, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r13d
	call	__isoc99_scanf@PLT
	movl	w(%rip), %edx
	addq	$4, %r14
	cmpl	%r13d, %edx
	jg	.L32
	movl	h(%rip), %eax
	addl	$1, %ebp
	cmpl	%ebp, %eax
	jle	.L89
	addq	$51, %r12
	testl	%edx, %edx
	jg	.L37
.L88:
	movl	%eax, 32(%rsp)
.L35:
	leaq	a(%rip), %rax
	movl	%edx, %esi
	movl	$0, 44(%rsp)
	leaq	12+l(%rip), %r8
	movq	%rax, 48(%rsp)
	movl	$0, 16(%rsp)
	testl	%esi, %esi
	jle	.L64
	.p2align 4,,10
	.p2align 3
.L70:
	movq	48(%rsp), %r13
	xorl	%r12d, %r12d
	jmp	.L62
	.p2align 4,,10
	.p2align 3
.L39:
	addl	$1, %r12d
	addq	$4, %r13
	cmpl	%esi, %r12d
	jge	.L90
.L62:
	cmpl	$1, 0(%r13)
	jne	.L39
	movl	32(%rsp), %edi
	cmpl	%edi, 16(%rsp)
	je	.L40
	movl	$0, 0(%r13)
	leaq	k(%rip), %rax
	movq	%r13, 56(%rsp)
	movq	%rax, %r14
	movl	%r12d, 20(%rsp)
.L41:
	leaq	l(%rip), %r13
	movq	%r14, %rax
	movq	%r13, %r14
	movq	%rax, %r13
.L61:
	movl	16(%rsp), %r12d
	addl	0(%r13), %r12d
	movslq	%r12d, %rax
	movl	20(%rsp), %ebp
	addl	(%r14), %ebp
	leaq	(%rax,%rax,2), %rax
	movslq	%ebp, %rdx
	movq	%rax, %rcx
	salq	$4, %rcx
	addq	%rcx, %rax
	addq	%rdx, %rax
	cmpl	$1, (%r15,%rax,4)
	je	.L91
.L42:
	addq	$4, %r14
	cmpq	%r14, %r8
	jne	.L61
	movq	%r13, %r14
	leaq	12+k(%rip), %rax
	addq	$4, %r14
	cmpq	%r14, %rax
	jne	.L41
	movq	56(%rsp), %r13
	movl	20(%rsp), %r12d
.L40:
	addl	$1, %r12d
	addl	$1, 44(%rsp)
	addq	$4, %r13
	cmpl	%esi, %r12d
	jl	.L62
.L90:
	addl	$1, 16(%rsp)
	movl	16(%rsp), %eax
	cmpl	32(%rsp), %eax
	jge	.L64
	addq	$204, 48(%rsp)
	testl	%esi, %esi
	jg	.L70
.L64:
	movl	44(%rsp), %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L66
	.p2align 4,,10
	.p2align 3
.L91:
	cmpl	$-1, %ebp
	je	.L42
	cmpl	$-1, %r12d
	je	.L42
	cmpl	%esi, %ebp
	je	.L42
	cmpl	32(%rsp), %r12d
	je	.L42
	movl	$0, (%r15,%rax,4)
	leaq	k(%rip), %rax
	movq	%rax, 8(%rsp)
	movq	%r14, 64(%rsp)
	movq	%r13, 72(%rsp)
	movl	%r12d, 24(%rsp)
	movl	%ebp, 28(%rsp)
.L43:
	leaq	l(%rip), %r14
.L60:
	movq	8(%rsp), %rax
	movl	24(%rsp), %r12d
	movl	28(%rsp), %r13d
	addl	(%r14), %r13d
	addl	(%rax), %r12d
	movslq	%r13d, %rdx
	movslq	%r12d, %rax
	leaq	(%rax,%rax,2), %rax
	movq	%rax, %rcx
	salq	$4, %rcx
	addq	%rcx, %rax
	addq	%rdx, %rax
	cmpl	$1, (%r15,%rax,4)
	je	.L92
.L44:
	addq	$4, %r14
	cmpq	%r8, %r14
	jne	.L60
	addq	$4, 8(%rsp)
	movq	8(%rsp), %rax
	leaq	12+k(%rip), %rdi
	cmpq	%rax, %rdi
	jne	.L43
	movq	64(%rsp), %r14
	movq	72(%rsp), %r13
	jmp	.L42
	.p2align 4,,10
	.p2align 3
.L92:
	cmpl	$-1, %r13d
	je	.L44
	cmpl	$-1, %r12d
	je	.L44
	cmpl	%esi, %r13d
	je	.L44
	cmpl	32(%rsp), %r12d
	je	.L44
	movl	%r12d, 36(%rsp)
	movl	%r13d, 40(%rsp)
	movl	$0, (%r15,%rax,4)
	leaq	k(%rip), %rax
	movq	%r14, 80(%rsp)
	movq	%rax, %r14
.L45:
	leaq	l(%rip), %r9
.L59:
	movl	36(%rsp), %ebx
	addl	(%r14), %ebx
	movslq	%ebx, %rax
	movl	40(%rsp), %r11d
	addl	(%r9), %r11d
	leaq	(%rax,%rax,2), %rax
	movslq	%r11d, %rdx
	movq	%rax, %rcx
	salq	$4, %rcx
	addq	%rcx, %rax
	addq	%rdx, %rax
	cmpl	$1, (%r15,%rax,4)
	je	.L93
.L46:
	addq	$4, %r9
	cmpq	%r8, %r9
	jne	.L59
	addq	$4, %r14
	leaq	12+k(%rip), %rax
	cmpq	%r14, %rax
	jne	.L45
	movq	80(%rsp), %r14
	jmp	.L44
	.p2align 4,,10
	.p2align 3
.L93:
	cmpl	$-1, %r11d
	je	.L46
	cmpl	$-1, %ebx
	je	.L46
	cmpl	%esi, %r11d
	je	.L46
	cmpl	32(%rsp), %ebx
	je	.L46
	movl	$0, (%r15,%rax,4)
	leaq	k(%rip), %r13
	movq	%r14, 88(%rsp)
.L47:
	leaq	l(%rip), %r10
.L58:
	movl	0(%r13), %r12d
	movl	(%r10), %ebp
	addl	%ebx, %r12d
	addl	%r11d, %ebp
	movslq	%r12d, %rax
	movslq	%ebp, %rdx
	leaq	(%rax,%rax,2), %rax
	movq	%rax, %rcx
	salq	$4, %rcx
	addq	%rcx, %rax
	addq	%rdx, %rax
	cmpl	$1, (%r15,%rax,4)
	je	.L94
.L48:
	addq	$4, %r10
	cmpq	%r8, %r10
	jne	.L58
	addq	$4, %r13
	leaq	12+k(%rip), %rax
	cmpq	%r13, %rax
	jne	.L47
	movq	88(%rsp), %r14
	jmp	.L46
	.p2align 4,,10
	.p2align 3
.L94:
	cmpl	$-1, %ebp
	je	.L48
	cmpl	$-1, %r12d
	je	.L48
	cmpl	%esi, %ebp
	je	.L48
	cmpl	32(%rsp), %r12d
	je	.L48
	movl	$0, (%r15,%rax,4)
	leaq	k(%rip), %rax
	movl	(%rax), %edi
	leaq	l(%rip), %rax
	movl	(%rax), %esi
	addl	%r12d, %edi
	movslq	%edi, %rax
	addl	%ebp, %esi
	leaq	(%rax,%rax,2), %rdx
	movslq	%esi, %rcx
	movq	%rdx, %r14
	salq	$4, %r14
	addq	%r14, %rdx
	addq	%rcx, %rdx
	cmpl	$1, (%r15,%rdx,4)
	je	.L95
.L49:
	leaq	(%rax,%rax,2), %rdx
	movl	4+l(%rip), %esi
	movq	%rdx, %r14
	addl	%ebp, %esi
	salq	$4, %r14
	addq	%r14, %rdx
	movslq	%esi, %rcx
	addq	%rcx, %rdx
	cmpl	$1, (%r15,%rdx,4)
	je	.L96
.L50:
	leaq	(%rax,%rax,2), %rax
	movl	8+l(%rip), %esi
	movq	%rax, %rcx
	addl	%ebp, %esi
	salq	$4, %rcx
	addq	%rcx, %rax
	movslq	%esi, %rdx
	addq	%rdx, %rax
	cmpl	$1, (%r15,%rax,4)
	je	.L97
.L51:
	movl	4+k(%rip), %edi
	leaq	l(%rip), %rax
	movl	(%rax), %esi
	addl	%r12d, %edi
	movslq	%edi, %rax
	addl	%ebp, %esi
	leaq	(%rax,%rax,2), %rdx
	movslq	%esi, %rcx
	movq	%rdx, %r14
	salq	$4, %r14
	addq	%r14, %rdx
	addq	%rcx, %rdx
	cmpl	$1, (%r15,%rdx,4)
	je	.L98
.L52:
	leaq	(%rax,%rax,2), %rdx
	movl	4+l(%rip), %esi
	movq	%rdx, %r14
	addl	%ebp, %esi
	salq	$4, %r14
	addq	%r14, %rdx
	movslq	%esi, %rcx
	addq	%rcx, %rdx
	cmpl	$1, (%r15,%rdx,4)
	je	.L99
.L53:
	leaq	(%rax,%rax,2), %rax
	movl	8+l(%rip), %esi
	movq	%rax, %rcx
	addl	%ebp, %esi
	salq	$4, %rcx
	addq	%rcx, %rax
	movslq	%esi, %rdx
	addq	%rdx, %rax
	cmpl	$1, (%r15,%rax,4)
	je	.L100
.L54:
	movl	8+k(%rip), %edi
	leaq	l(%rip), %rax
	movl	(%rax), %esi
	addl	%r12d, %edi
	movslq	%edi, %rax
	addl	%ebp, %esi
	leaq	(%rax,%rax,2), %rdx
	movslq	%esi, %rcx
	movq	%rdx, %r14
	salq	$4, %r14
	addq	%r14, %rdx
	addq	%rcx, %rdx
	cmpl	$1, (%r15,%rdx,4)
	je	.L101
.L55:
	leaq	(%rax,%rax,2), %rdx
	movl	4+l(%rip), %esi
	movq	%rdx, %r14
	addl	%ebp, %esi
	salq	$4, %r14
	addq	%r14, %rdx
	movslq	%esi, %rcx
	addq	%rcx, %rdx
	cmpl	$1, (%r15,%rdx,4)
	je	.L102
.L56:
	leaq	(%rax,%rax,2), %rax
	addl	8+l(%rip), %ebp
	movq	%rax, %rcx
	movslq	%ebp, %rdx
	salq	$4, %rcx
	addq	%rcx, %rax
	addq	%rdx, %rax
	cmpl	$1, (%r15,%rax,4)
	je	.L57
	movl	h(%rip), %eax
	movl	w(%rip), %esi
	movl	%eax, 32(%rsp)
	jmp	.L48
	.p2align 4,,10
	.p2align 3
.L89:
	movl	%eax, 32(%rsp)
	testl	%eax, %eax
	jg	.L35
.L31:
	movl	$0, 44(%rsp)
	jmp	.L64
.L57:
	movl	%ebp, %esi
	call	dps
	movl	h(%rip), %eax
	movl	w(%rip), %esi
	leaq	12+l(%rip), %r8
	movl	%eax, 32(%rsp)
	jmp	.L48
.L102:
	call	dps
	movl	8+k(%rip), %edi
	leaq	12+l(%rip), %r8
	addl	%r12d, %edi
	movslq	%edi, %rax
	jmp	.L56
.L101:
	call	dps
	movl	8+k(%rip), %edi
	leaq	12+l(%rip), %r8
	addl	%r12d, %edi
	movslq	%edi, %rax
	jmp	.L55
.L100:
	call	dps
	leaq	12+l(%rip), %r8
	jmp	.L54
.L99:
	call	dps
	movl	4+k(%rip), %edi
	leaq	12+l(%rip), %r8
	addl	%r12d, %edi
	movslq	%edi, %rax
	jmp	.L53
.L98:
	call	dps
	movl	4+k(%rip), %edi
	leaq	12+l(%rip), %r8
	addl	%r12d, %edi
	movslq	%edi, %rax
	jmp	.L52
.L97:
	call	dps
	leaq	12+l(%rip), %r8
	jmp	.L51
.L96:
	call	dps
	leaq	k(%rip), %rax
	leaq	12+l(%rip), %r8
	movl	(%rax), %edi
	addl	%r12d, %edi
	movslq	%edi, %rax
	jmp	.L50
.L95:
	call	dps
	leaq	k(%rip), %rax
	leaq	12+l(%rip), %r8
	movl	(%rax), %edi
	addl	%r12d, %edi
	movslq	%edi, %rax
	jmp	.L49
.L71:
	addq	$104, %rsp
	.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
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	w
	.bss
	.align 4
	.type	w, @object
	.size	w, 4
w:
	.zero	4
	.globl	h
	.align 4
	.type	h, @object
	.size	h, 4
h:
	.zero	4
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 10404
a:
	.zero	10404
	.globl	l
	.data
	.align 8
	.type	l, @object
	.size	l, 12
l:
	.long	1
	.long	0
	.long	-1
	.globl	k
	.align 8
	.type	k, @object
	.size	k, 12
k:
	.long	1
	.long	0
	.long	-1
	.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 k[3]={1,0,-1};
int l[3]={1,0,-1};
int a[51][51],h,w;

void dps(int y,int x){
    int i,j;
    if(x==-1 || y==-1 || x==w || y==h)
        return;
    
    a[y][x]=0;
    for(i=0;i<3;i++){
        for (j=0; j<3; j++){
           if(a[y+k[i]][x+l[j]]==1)
               dps(y+k[i],x+l[j]);
        }
    }
}

int main(void){
    int i,j,count=0;
    while(1){
    i=0;j=0;w=0;h=0;count=0;
    scanf("%d %d",&w,&h);
        if(w==0)break;
    for(i=0;i<h;i++)
        for (j=0; j<w; j++) {
            scanf("%d",&a[i][j]);
        }
    for(i=0;i<h;i++)
        for (j=0; j<w; j++)
            if(a[i][j]==1){
                dps(i,j);
                count++;
            }
    printf("%d\n",count);
    }
    return 0;
}
1 1
0
2 2
0 1
1 0
3 2
1 1 1
1 1 1
5 4
1 0 1 0 0
1 0 0 0 0
1 0 1 0 1
1 0 0 1 0
5 4
1 1 1 0 1
1 0 1 0 1
1 0 1 0 1
1 0 1 1 1
5 5
1 0 1 0 1
0 0 0 0 0
1 0 1 0 1
0 0 1 0 0
1 0 1 0 1
0 0
 1 1
0
2 2
0 1
1 0
3 2
1 1 1
1 1 1
5 4
1 0 1 0 0
1 0 0 0 1
1 0 1 0 1
1 0 0 1 0
5 4
1 1 1 0 1
1 1 1 0 1
1 0 1 0 1
2 0 1 1 1
5 5
0 0 1 0 1
0 0 0 0 0
1 0 1 0 1
0 0 1 0 0
1 0 1 0 1
0 0
 1 1
0
2 2
0 1
2 0
3 2
1 1 1
1 1 1
5 4
1 0 1 0 0
1 0 0 0 2
1 0 1 0 1
1 0 0 1 0
5 4
1 1 1 0 1
1 1 1 0 1
1 0 1 0 1
2 0 1 1 1
5 5
0 0 1 0 1
0 0 0 0 0
1 0 1 0 1
0 0 1 1 0
1 0 1 0 1
0 0
 1 1
0
2 2
0 1
1 0
3 2
1 1 1
1 1 1
5 4
1 0 1 0 0
1 0 0 0 0
1 1 1 0 1
1 0 0 1 0
5 4
1 1 1 0 1
1 0 1 0 1
1 0 1 0 1
2 0 1 1 1
5 5
1 0 1 0 1
0 0 0 0 0
1 0 1 0 1
0 0 1 0 0
1 0 1 0 1
0 0
 1 1
0
2 2
0 1
1 0
3 2
1 1 1
1 1 1
5 4
1 0 1 0 0
1 0 0 0 1
1 0 1 0 1
1 0 0 1 0
5 4
1 1 1 0 1
1 1 1 0 1
1 0 1 0 1
2 0 1 1 1
5 5
0 0 1 0 1
0 0 0 0 0
1 0 1 0 1
0 0 1 0 0
1 0 1 0 0
0 0
 1 1
0
2 2
0 1
2 0
3 2
1 1 1
1 1 1
5 4
1 0 1 0 0
1 0 0 0 2
1 0 1 0 0
1 0 0 1 0
5 4
1 1 1 0 1
1 1 1 0 1
1 0 1 0 1
2 0 1 1 1
5 5
0 0 0 0 1
0 0 0 0 0
1 0 1 0 1
0 0 1 1 0
1 0 1 0 1
0 0
 1 1
0
2 1
0 1
1 0
3 2
1 1 1
1 1 1
5 4
1 0 1 0 0
1 0 0 0 0
1 1 1 0 1
1 0 0 1 0
5 4
1 1 1 0 1
1 0 1 0 1
0 0 1 0 1
2 0 1 1 1
5 5
1 0 1 0 1
0 0 0 0 0
1 0 1 0 1
0 0 1 0 0
1 0 1 0 1
0 0
 1 1
0
2 1
0 1
1 0
3 2
1 1 1
1 1 1
5 4
1 0 1 0 0
1 0 0 0 0
1 1 1 0 1
1 0 0 1 0
5 4
1 1 1 0 1
1 0 1 0 1
0 0 1 0 1
2 0 1 1 1
5 5
1 0 1 0 1
0 0 0 0 0
1 0 1 0 1
0 0 1 0 0
1 0 1 1 1
0 0
 1 1
0
2 2
0 1
2 0
3 2
0 1 1
1 1 1
5 4
1 0 1 0 0
1 0 0 0 2
1 1 1 0 0
1 0 0 1 0
5 4
1 1 1 0 1
1 1 1 0 1
1 0 1 0 1
2 0 1 1 1
5 5
0 0 0 0 1
0 0 0 0 0
1 0 1 0 1
0 0 1 1 0
1 0 1 0 1
0 0
 1 1
0
2 2
0 1
1 0
3 2
1 1 1
1 1 1
5 4
2 0 1 0 0
1 0 1 0 0
1 0 1 0 2
1 0 0 1 0
5 4
1 1 1 0 1
1 0 1 0 1
1 0 1 0 1
1 0 1 1 1
5 5
1 0 1 0 1
0 0 0 0 1
1 0 1 0 1
0 0 1 0 0
1 0 1 0 1
0 0

0
1
1
3
1
8
 0
1
1
3
1
7
 0
1
1
3
1
5
 0
1
1
2
1
8
 0
1
1
3
1
6
 0
1
1
3
1
4
 0
1
0
1
2
1
8
 0
1
0
1
2
1
7
 0
1
1
2
1
4
 0
1
1
2
1
7

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 k[3]={1,0,-1};
int l[3]={1,0,-1};
int a[51][51],h,w;

void dps(int y,int x){
    int i,j;
    if(x==-1 || y==-1 || x==w || y==h)
        return;
    
    a[y][x]=0;
    for(i=0;i<3;i++){
        for (j=0; j<3; j++){
           if(a[y+k[i]][x+l[j]]==1)
               dps(y+k[i],x+l[j]);
        }
    }
}

int main(void){
    int i,j,count=0;
    while(1){
    i=0;j=0;w=0;h=0;count=0;
    scanf("%d %d",&w,&h);
        if(w==0)break;
    for(i=0;i<h;i++)
        for (j=0; j<w; j++) {
            scanf("%d",&a[i][j]);
        }
    for(i=0;i<h;i++)
        for (j=0; j<w; j++)
            if(a[i][j]==1){
                dps(i,j);
                count++;
            }
    printf("%d\n",count);
    }
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	k
	.data
	.align 8
	.type	k, @object
	.size	k, 12
k:
	.long	1
	.long	0
	.long	-1
	.globl	l
	.align 8
	.type	l, @object
	.size	l, 12
l:
	.long	1
	.long	0
	.long	-1
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 10404
a:
	.zero	10404
	.globl	h
	.align 4
	.type	h, @object
	.size	h, 4
h:
	.zero	4
	.globl	w
	.align 4
	.type	w, @object
	.size	w, 4
w:
	.zero	4
	.text
	.globl	dps
	.type	dps, @function
dps:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	cmpl	$-1, -24(%rbp)
	je	.L10
	cmpl	$-1, -20(%rbp)
	je	.L10
	movl	w(%rip), %eax
	cmpl	%eax, -24(%rbp)
	je	.L10
	movl	h(%rip), %eax
	cmpl	%eax, -20(%rbp)
	je	.L10
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	salq	$4, %rdx
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	$0, (%rdx,%rax)
	movl	$0, -8(%rbp)
	jmp	.L5
.L9:
	movl	$0, -4(%rbp)
	jmp	.L6
.L8:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	k(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-20(%rbp), %eax
	leal	(%rdx,%rax), %ecx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	l(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	movslq	%eax, %rsi
	movslq	%ecx, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	salq	$4, %rdx
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$1, %eax
	jne	.L7
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	l(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-24(%rbp), %eax
	addl	%eax, %edx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	k(%rip), %rax
	movl	(%rcx,%rax), %ecx
	movl	-20(%rbp), %eax
	addl	%ecx, %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	dps
.L7:
	addl	$1, -4(%rbp)
.L6:
	cmpl	$2, -4(%rbp)
	jle	.L8
	addl	$1, -8(%rbp)
.L5:
	cmpl	$2, -8(%rbp)
	jle	.L9
	jmp	.L1
.L10:
	nop
.L1:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	dps, .-dps
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	$0, -4(%rbp)
.L23:
	movl	$0, -12(%rbp)
	movl	$0, -8(%rbp)
	movl	$0, w(%rip)
	movl	$0, h(%rip)
	movl	$0, -4(%rbp)
	leaq	h(%rip), %rax
	movq	%rax, %rdx
	leaq	w(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	w(%rip), %eax
	testl	%eax, %eax
	je	.L26
	movl	$0, -12(%rbp)
	jmp	.L14
.L17:
	movl	$0, -8(%rbp)
	jmp	.L15
.L16:
	movl	-8(%rbp), %eax
	movslq	%eax, %rcx
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	salq	$4, %rdx
	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, -8(%rbp)
.L15:
	movl	w(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L16
	addl	$1, -12(%rbp)
.L14:
	movl	h(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L17
	movl	$0, -12(%rbp)
	jmp	.L18
.L22:
	movl	$0, -8(%rbp)
	jmp	.L19
.L21:
	movl	-8(%rbp), %eax
	movslq	%eax, %rcx
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	salq	$4, %rdx
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$1, %eax
	jne	.L20
	movl	-8(%rbp), %edx
	movl	-12(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	dps
	addl	$1, -4(%rbp)
.L20:
	addl	$1, -8(%rbp)
.L19:
	movl	w(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L21
	addl	$1, -12(%rbp)
.L18:
	movl	h(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L22
	movl	-4(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L23
.L26:
	nop
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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	k
	.data
	.align 8
	.type	k, @object
	.size	k, 12
k:
	.long	1
	.long	0
	.long	-1
	.globl	l
	.align 8
	.type	l, @object
	.size	l, 12
l:
	.long	1
	.long	0
	.long	-1
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 10404
a:
	.zero	10404
	.globl	h
	.align 4
	.type	h, @object
	.size	h, 4
h:
	.zero	4
	.globl	w
	.align 4
	.type	w, @object
	.size	w, 4
w:
	.zero	4
	.text
	.globl	dps
	.type	dps, @function
dps:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	cmpl	$-1, -24(%rbp)
	je	.L10
	cmpl	$-1, -20(%rbp)
	je	.L10
	movl	w(%rip), %eax
	cmpl	%eax, -24(%rbp)
	je	.L10
	movl	h(%rip), %eax
	cmpl	%eax, -20(%rbp)
	je	.L10
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	salq	$4, %rdx
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	$0, (%rdx,%rax)
	movl	$0, -8(%rbp)
	jmp	.L5
.L9:
	movl	$0, -4(%rbp)
	jmp	.L6
.L8:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	k(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-20(%rbp), %eax
	leal	(%rdx,%rax), %ecx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	l(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	movslq	%eax, %rsi
	movslq	%ecx, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	salq	$4, %rdx
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$1, %eax
	jne	.L7
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	l(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-24(%rbp), %eax
	addl	%eax, %edx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	k(%rip), %rax
	movl	(%rcx,%rax), %ecx
	movl	-20(%rbp), %eax
	addl	%ecx, %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	dps
.L7:
	addl	$1, -4(%rbp)
.L6:
	cmpl	$2, -4(%rbp)
	jle	.L8
	addl	$1, -8(%rbp)
.L5:
	cmpl	$2, -8(%rbp)
	jle	.L9
	jmp	.L1
.L10:
	nop
.L1:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	dps, .-dps
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	$0, -4(%rbp)
.L23:
	movl	$0, -12(%rbp)
	movl	$0, -8(%rbp)
	movl	$0, w(%rip)
	movl	$0, h(%rip)
	movl	$0, -4(%rbp)
	leaq	h(%rip), %rax
	movq	%rax, %rdx
	leaq	w(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	w(%rip), %eax
	testl	%eax, %eax
	je	.L26
	movl	$0, -12(%rbp)
	jmp	.L14
.L17:
	movl	$0, -8(%rbp)
	jmp	.L15
.L16:
	movl	-8(%rbp), %eax
	movslq	%eax, %rcx
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	salq	$4, %rdx
	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, -8(%rbp)
.L15:
	movl	w(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L16
	addl	$1, -12(%rbp)
.L14:
	movl	h(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L17
	movl	$0, -12(%rbp)
	jmp	.L18
.L22:
	movl	$0, -8(%rbp)
	jmp	.L19
.L21:
	movl	-8(%rbp), %eax
	movslq	%eax, %rcx
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	salq	$4, %rdx
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$1, %eax
	jne	.L20
	movl	-8(%rbp), %edx
	movl	-12(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	dps
	addl	$1, -4(%rbp)
.L20:
	addl	$1, -8(%rbp)
.L19:
	movl	w(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L21
	addl	$1, -12(%rbp)
.L18:
	movl	h(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L22
	movl	-4(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L23
.L26:
	nop
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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:
