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

```c
#include<stdio.h>

int main(void){
  int i,num,j;
  int x,y,w,h,n;
  int nx,ny;
  int count;

  scanf("%d",&num);

  for(i=0;i<num;i++){
    scanf("%d%d%d%d%d",&x,&y,&w,&h,&n);

    count=0;

    for(j=0;j<n;j++){
      scanf("%d%d",&nx,&ny);
      if(x<=nx && nx<=x+w &&
          y<=ny && ny<=y+h)
        count++;
    }

    printf("%d\n",count);
  }

  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d%d%d%d"
.LC2:
	.string	"%d%d"
.LC3:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-52(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -20(%rbp)
	jmp	.L2
.L6:
	leaq	-32(%rbp), %rdi
	leaq	-36(%rbp), %rsi
	leaq	-40(%rbp), %rcx
	leaq	-44(%rbp), %rdx
	leaq	-48(%rbp), %rax
	movq	%rdi, %r9
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -12(%rbp)
	movl	$0, -16(%rbp)
	jmp	.L3
.L5:
	leaq	-24(%rbp), %rdx
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-48(%rbp), %edx
	movl	-28(%rbp), %eax
	cmpl	%eax, %edx
	jg	.L4
	movl	-48(%rbp), %edx
	movl	-40(%rbp), %eax
	addl	%eax, %edx
	movl	-28(%rbp), %eax
	cmpl	%eax, %edx
	jl	.L4
	movl	-44(%rbp), %edx
	movl	-24(%rbp), %eax
	cmpl	%eax, %edx
	jg	.L4
	movl	-44(%rbp), %edx
	movl	-36(%rbp), %eax
	addl	%eax, %edx
	movl	-24(%rbp), %eax
	cmpl	%eax, %edx
	jl	.L4
	addl	$1, -12(%rbp)
.L4:
	addl	$1, -16(%rbp)
.L3:
	movl	-32(%rbp), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L5
	movl	-12(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -20(%rbp)
.L2:
	movl	-52(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L6
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
user
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d%d%d%d"
.LC2:
	.string	"%d%d"
.LC3:
	.string	"%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	$104, %rsp
	.cfi_def_cfa_offset 160
	movq	%fs:40, %rax
	movq	%rax, 88(%rsp)
	xorl	%eax, %eax
	leaq	56(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	56(%rsp), %edx
	testl	%edx, %edx
	jle	.L2
	leaq	76(%rsp), %rax
	xorl	%r14d, %r14d
	leaq	.LC2(%rip), %r12
	movq	%rax, 16(%rsp)
	leaq	72(%rsp), %rax
	movq	%rax, 8(%rsp)
	leaq	68(%rsp), %rax
	movq	%rax, 40(%rsp)
	leaq	64(%rsp), %rax
	movq	%rax, 32(%rsp)
	leaq	60(%rsp), %rax
	movq	%rax, 24(%rsp)
	.p2align 4,,10
	.p2align 3
.L6:
	movq	16(%rsp), %r9
	movq	8(%rsp), %r8
	xorl	%eax, %eax
	xorl	%r13d, %r13d
	movq	40(%rsp), %rcx
	movq	32(%rsp), %rdx
	leaq	.LC1(%rip), %rdi
	movq	24(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	76(%rsp), %eax
	testl	%eax, %eax
	jle	.L3
	xorl	%r15d, %r15d
	leaq	84(%rsp), %rbp
	leaq	80(%rsp), %rbx
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rbp, %rdx
	movq	%rbx, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	60(%rsp), %eax
	movl	80(%rsp), %edx
	cmpl	%edx, %eax
	jg	.L4
	addl	68(%rsp), %eax
	cmpl	%eax, %edx
	jg	.L4
	movl	64(%rsp), %eax
	movl	84(%rsp), %edx
	cmpl	%edx, %eax
	jg	.L4
	addl	72(%rsp), %eax
	cmpl	%eax, %edx
	setle	%al
	movzbl	%al, %eax
	addl	%eax, %r13d
	.p2align 4,,10
	.p2align 3
.L4:
	addl	$1, %r15d
	cmpl	%r15d, 76(%rsp)
	jg	.L5
.L3:
	movl	%r13d, %edx
	leaq	.LC3(%rip), %rsi
	xorl	%eax, %eax
	addl	$1, %r14d
	movl	$1, %edi
	call	__printf_chk@PLT
	cmpl	%r14d, 56(%rsp)
	jg	.L6
.L2:
	movq	88(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L13
	addq	$104, %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
.L13:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

rule
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d%d%d%d"
.LC2:
	.string	"%d%d"
.LC3:
	.string	"%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	$104, %rsp
	.cfi_def_cfa_offset 160
	movq	%fs:40, %rax
	movq	%rax, 88(%rsp)
	xorl	%eax, %eax
	leaq	56(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	56(%rsp), %edx
	testl	%edx, %edx
	jle	.L2
	leaq	76(%rsp), %rax
	xorl	%r14d, %r14d
	leaq	.LC2(%rip), %r12
	movq	%rax, 16(%rsp)
	leaq	72(%rsp), %rax
	movq	%rax, 8(%rsp)
	leaq	68(%rsp), %rax
	movq	%rax, 40(%rsp)
	leaq	64(%rsp), %rax
	movq	%rax, 32(%rsp)
	leaq	60(%rsp), %rax
	movq	%rax, 24(%rsp)
	.p2align 4,,10
	.p2align 3
.L6:
	movq	16(%rsp), %r9
	movq	8(%rsp), %r8
	xorl	%eax, %eax
	xorl	%r13d, %r13d
	movq	40(%rsp), %rcx
	movq	32(%rsp), %rdx
	leaq	.LC1(%rip), %rdi
	movq	24(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	76(%rsp), %eax
	testl	%eax, %eax
	jle	.L3
	xorl	%r15d, %r15d
	leaq	84(%rsp), %rbp
	leaq	80(%rsp), %rbx
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rbp, %rdx
	movq	%rbx, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	60(%rsp), %eax
	movl	80(%rsp), %edx
	cmpl	%edx, %eax
	jg	.L4
	addl	68(%rsp), %eax
	cmpl	%eax, %edx
	jg	.L4
	movl	64(%rsp), %eax
	movl	84(%rsp), %edx
	cmpl	%edx, %eax
	jg	.L4
	addl	72(%rsp), %eax
	cmpl	%eax, %edx
	setle	%al
	movzbl	%al, %eax
	addl	%eax, %r13d
	.p2align 4,,10
	.p2align 3
.L4:
	addl	$1, %r15d
	cmpl	%r15d, 76(%rsp)
	jg	.L5
.L3:
	movl	%r13d, %edx
	leaq	.LC3(%rip), %rsi
	xorl	%eax, %eax
	addl	$1, %r14d
	movl	$1, %edi
	call	__printf_chk@PLT
	cmpl	%r14d, 56(%rsp)
	jg	.L6
.L2:
	movq	88(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L13
	addq	$104, %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
.L13:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

#include<stdio.h>

int main(void){
  int i,num,j;
  int x,y,w,h,n;
  int nx,ny;
  int count;

  scanf("%d",&num);

  for(i=0;i<num;i++){
    scanf("%d%d%d%d%d",&x,&y,&w,&h,&n);

    count=0;

    for(j=0;j<n;j++){
      scanf("%d%d",&nx,&ny);
      if(x<=nx && nx<=x+w &&
          y<=ny && ny<=y+h)
        count++;
    }

    printf("%d\n",count);
  }

  return 0;
}
2
1 3 20 10
4
21 13
1 15
10 10
41 10
1 3 20 10
4
21 13
1 15
10 10
25 10
 2
1 3 6 10
4
21 13
1 15
10 10
25 10
1 3 20 10
4
21 13
1 15
10 10
25 10
 2
1 3 20 10
4
21 13
1 15
10 10
55 10
1 3 20 10
4
21 13
1 15
10 2
25 10
 2
1 3 6 10
4
21 13
1 15
10 10
25 10
1 3 20 4
4
21 6
1 15
10 10
25 10
 2
1 3 20 16
4
13 13
1 15
10 10
25 10
1 3 20 11
4
21 13
1 15
10 10
25 4
 2
1 3 20 10
4
21 13
1 15
10 10
55 10
1 3 3 10
4
21 13
1 15
10 10
25 10
 2
1 3 20 10
4
21 13
1 15
10 10
6 10
1 3 20 10
4
21 13
1 19
10 2
25 10
 2
1 3 6 10
4
21 13
1 7
10 10
25 10
1 3 20 10
4
21 6
1 15
10 10
25 10
 2
1 3 20 16
4
13 13
1 15
10 10
25 10
1 3 20 18
4
15 13
1 15
10 10
25 4
 2
1 3 20 16
4
13 13
1 15
10 10
5 10
1 3 20 18
4
5 13
1 15
10 10
25 4

2
2
 0
2
 2
1
 0
1
 3
2
 2
0
 3
1
 1
2
 3
3
 4
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 main(void){
  int i,num,j;
  int x,y,w,h,n;
  int nx,ny;
  int count;

  scanf("%d",&num);

  for(i=0;i<num;i++){
    scanf("%d%d%d%d%d",&x,&y,&w,&h,&n);

    count=0;

    for(j=0;j<n;j++){
      scanf("%d%d",&nx,&ny);
      if(x<=nx && nx<=x+w &&
          y<=ny && ny<=y+h)
        count++;
    }

    printf("%d\n",count);
  }

  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d%d%d%d"
.LC2:
	.string	"%d%d"
.LC3:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-52(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -20(%rbp)
	jmp	.L2
.L6:
	leaq	-32(%rbp), %rdi
	leaq	-36(%rbp), %rsi
	leaq	-40(%rbp), %rcx
	leaq	-44(%rbp), %rdx
	leaq	-48(%rbp), %rax
	movq	%rdi, %r9
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -12(%rbp)
	movl	$0, -16(%rbp)
	jmp	.L3
.L5:
	leaq	-24(%rbp), %rdx
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-48(%rbp), %edx
	movl	-28(%rbp), %eax
	cmpl	%eax, %edx
	jg	.L4
	movl	-48(%rbp), %edx
	movl	-40(%rbp), %eax
	addl	%eax, %edx
	movl	-28(%rbp), %eax
	cmpl	%eax, %edx
	jl	.L4
	movl	-44(%rbp), %edx
	movl	-24(%rbp), %eax
	cmpl	%eax, %edx
	jg	.L4
	movl	-44(%rbp), %edx
	movl	-36(%rbp), %eax
	addl	%eax, %edx
	movl	-24(%rbp), %eax
	cmpl	%eax, %edx
	jl	.L4
	addl	$1, -12(%rbp)
.L4:
	addl	$1, -16(%rbp)
.L3:
	movl	-32(%rbp), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L5
	movl	-12(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -20(%rbp)
.L2:
	movl	-52(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L6
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
train
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d%d%d%d"
.LC2:
	.string	"%d%d"
.LC3:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-52(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -20(%rbp)
	jmp	.L2
.L6:
	leaq	-32(%rbp), %rdi
	leaq	-36(%rbp), %rsi
	leaq	-40(%rbp), %rcx
	leaq	-44(%rbp), %rdx
	leaq	-48(%rbp), %rax
	movq	%rdi, %r9
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -12(%rbp)
	movl	$0, -16(%rbp)
	jmp	.L3
.L5:
	leaq	-24(%rbp), %rdx
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-48(%rbp), %edx
	movl	-28(%rbp), %eax
	cmpl	%eax, %edx
	jg	.L4
	movl	-48(%rbp), %edx
	movl	-40(%rbp), %eax
	addl	%eax, %edx
	movl	-28(%rbp), %eax
	cmpl	%eax, %edx
	jl	.L4
	movl	-44(%rbp), %edx
	movl	-24(%rbp), %eax
	cmpl	%eax, %edx
	jg	.L4
	movl	-44(%rbp), %edx
	movl	-36(%rbp), %eax
	addl	%eax, %edx
	movl	-24(%rbp), %eax
	cmpl	%eax, %edx
	jl	.L4
	addl	$1, -12(%rbp)
.L4:
	addl	$1, -16(%rbp)
.L3:
	movl	-32(%rbp), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L5
	movl	-12(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -20(%rbp)
.L2:
	movl	-52(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L6
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	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:
