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 max(int,int);

int main(void){
  int n,m,h[201],r[201],i,j,t,dp[201],res;

  while(scanf("%d",&n),n){
    for(i=0;i<n;i++)scanf("%d %d",&h[i],&r[i]);
    scanf("%d",&m);
    for(i=n;i<n+m;i++)scanf("%d %d",&h[i],&r[i]);

      for(i=0;i<n+m;i++){
	  for(j=i;j<n+m;j++){
	      if(h[i]>h[j]){
		  t=h[i];
		  h[i]=h[j];
		  h[j]=t;
		  t=r[i];
		  r [i]=r[j];
		  r[j]=t;
		}
	      else if(h[i]==h[j] && r[i]>r[j]){
		  t=h[i];
		  h[i]=h[j];
		  h[j]=t;
		  t=r[i];
		  r [i]=r[j];
		  r[j]=t;
	      }
	  }
	}
      for(i=0;i<n+m;i++)dp[i]=0;
      dp[0]=1;
      
      for(i=0;i<n+m;i++){
	for(j=i+1;j<n+m;j++){
	  if(h[i]<h[j] && r[i]<r[j] && dp[i]>=dp[j])dp[j]=dp[i]+1;
	}
      }
      res=0;
      for(i=0;i<n+m;i++)res=max(res,dp[i]);

      printf("%d\n",res);
  }
  
  return 0;
}

int max(int x,int y){
  return x>y?x:y;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d"
.LC2:
	.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	$2480, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L2
.L22:
	movl	$0, -2464(%rbp)
	jmp	.L3
.L4:
	leaq	-1632(%rbp), %rdx
	movl	-2464(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	leaq	-2448(%rbp), %rcx
	movl	-2464(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -2464(%rbp)
.L3:
	movl	-2472(%rbp), %eax
	cmpl	%eax, -2464(%rbp)
	jl	.L4
	leaq	-2468(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-2472(%rbp), %eax
	movl	%eax, -2464(%rbp)
	jmp	.L5
.L6:
	leaq	-1632(%rbp), %rdx
	movl	-2464(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	leaq	-2448(%rbp), %rcx
	movl	-2464(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -2464(%rbp)
.L5:
	movl	-2472(%rbp), %edx
	movl	-2468(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -2464(%rbp)
	jl	.L6
	movl	$0, -2464(%rbp)
	jmp	.L7
.L12:
	movl	-2464(%rbp), %eax
	movl	%eax, -2460(%rbp)
	jmp	.L8
.L11:
	movl	-2464(%rbp), %eax
	cltq
	movl	-2448(%rbp,%rax,4), %edx
	movl	-2460(%rbp), %eax
	cltq
	movl	-2448(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jle	.L9
	movl	-2464(%rbp), %eax
	cltq
	movl	-2448(%rbp,%rax,4), %eax
	movl	%eax, -2452(%rbp)
	movl	-2460(%rbp), %eax
	cltq
	movl	-2448(%rbp,%rax,4), %edx
	movl	-2464(%rbp), %eax
	cltq
	movl	%edx, -2448(%rbp,%rax,4)
	movl	-2460(%rbp), %eax
	cltq
	movl	-2452(%rbp), %edx
	movl	%edx, -2448(%rbp,%rax,4)
	movl	-2464(%rbp), %eax
	cltq
	movl	-1632(%rbp,%rax,4), %eax
	movl	%eax, -2452(%rbp)
	movl	-2460(%rbp), %eax
	cltq
	movl	-1632(%rbp,%rax,4), %edx
	movl	-2464(%rbp), %eax
	cltq
	movl	%edx, -1632(%rbp,%rax,4)
	movl	-2460(%rbp), %eax
	cltq
	movl	-2452(%rbp), %edx
	movl	%edx, -1632(%rbp,%rax,4)
	jmp	.L10
.L9:
	movl	-2464(%rbp), %eax
	cltq
	movl	-2448(%rbp,%rax,4), %edx
	movl	-2460(%rbp), %eax
	cltq
	movl	-2448(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jne	.L10
	movl	-2464(%rbp), %eax
	cltq
	movl	-1632(%rbp,%rax,4), %edx
	movl	-2460(%rbp), %eax
	cltq
	movl	-1632(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jle	.L10
	movl	-2464(%rbp), %eax
	cltq
	movl	-2448(%rbp,%rax,4), %eax
	movl	%eax, -2452(%rbp)
	movl	-2460(%rbp), %eax
	cltq
	movl	-2448(%rbp,%rax,4), %edx
	movl	-2464(%rbp), %eax
	cltq
	movl	%edx, -2448(%rbp,%rax,4)
	movl	-2460(%rbp), %eax
	cltq
	movl	-2452(%rbp), %edx
	movl	%edx, -2448(%rbp,%rax,4)
	movl	-2464(%rbp), %eax
	cltq
	movl	-1632(%rbp,%rax,4), %eax
	movl	%eax, -2452(%rbp)
	movl	-2460(%rbp), %eax
	cltq
	movl	-1632(%rbp,%rax,4), %edx
	movl	-2464(%rbp), %eax
	cltq
	movl	%edx, -1632(%rbp,%rax,4)
	movl	-2460(%rbp), %eax
	cltq
	movl	-2452(%rbp), %edx
	movl	%edx, -1632(%rbp,%rax,4)
.L10:
	addl	$1, -2460(%rbp)
.L8:
	movl	-2472(%rbp), %edx
	movl	-2468(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -2460(%rbp)
	jl	.L11
	addl	$1, -2464(%rbp)
.L7:
	movl	-2472(%rbp), %edx
	movl	-2468(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -2464(%rbp)
	jl	.L12
	movl	$0, -2464(%rbp)
	jmp	.L13
.L14:
	movl	-2464(%rbp), %eax
	cltq
	movl	$0, -816(%rbp,%rax,4)
	addl	$1, -2464(%rbp)
.L13:
	movl	-2472(%rbp), %edx
	movl	-2468(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -2464(%rbp)
	jl	.L14
	movl	$1, -816(%rbp)
	movl	$0, -2464(%rbp)
	jmp	.L15
.L19:
	movl	-2464(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -2460(%rbp)
	jmp	.L16
.L18:
	movl	-2464(%rbp), %eax
	cltq
	movl	-2448(%rbp,%rax,4), %edx
	movl	-2460(%rbp), %eax
	cltq
	movl	-2448(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jge	.L17
	movl	-2464(%rbp), %eax
	cltq
	movl	-1632(%rbp,%rax,4), %edx
	movl	-2460(%rbp), %eax
	cltq
	movl	-1632(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jge	.L17
	movl	-2464(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %edx
	movl	-2460(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jl	.L17
	movl	-2464(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	leal	1(%rax), %edx
	movl	-2460(%rbp), %eax
	cltq
	movl	%edx, -816(%rbp,%rax,4)
.L17:
	addl	$1, -2460(%rbp)
.L16:
	movl	-2472(%rbp), %edx
	movl	-2468(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -2460(%rbp)
	jl	.L18
	addl	$1, -2464(%rbp)
.L15:
	movl	-2472(%rbp), %edx
	movl	-2468(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -2464(%rbp)
	jl	.L19
	movl	$0, -2456(%rbp)
	movl	$0, -2464(%rbp)
	jmp	.L20
.L21:
	movl	-2464(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %edx
	movl	-2456(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	max
	movl	%eax, -2456(%rbp)
	addl	$1, -2464(%rbp)
.L20:
	movl	-2472(%rbp), %edx
	movl	-2468(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -2464(%rbp)
	jl	.L21
	movl	-2456(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L2:
	leaq	-2472(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-2472(%rbp), %eax
	testl	%eax, %eax
	jne	.L22
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L24
	call	__stack_chk_fail@PLT
.L24:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	max
	.type	max, @function
max:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-8(%rbp), %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	max, .-max
	.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"
	.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
	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
	leaq	.LC0(%rip), %rbx
	subq	$2488, %rsp
	.cfi_def_cfa_offset 2544
	movq	%fs:40, %rax
	movq	%rax, 2472(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rax
	leaq	1664(%rsp), %r14
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	movq	8(%rsp), %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %eax
	testl	%eax, %eax
	je	.L23
	jle	.L25
	leaq	32(%rsp), %r15
	xorl	%r12d, %r12d
	leaq	848(%rsp), %r13
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	0(%r13,%r12,4), %rdx
	movq	%r15, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	addq	$1, %r12
	addq	$4, %r15
	cmpl	%r12d, 24(%rsp)
	jg	.L3
.L25:
	leaq	28(%rsp), %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %ebp
	movl	28(%rsp), %esi
	addl	%ebp, %esi
	cmpl	%esi, %ebp
	jge	.L4
	movslq	%ebp, %r15
	leaq	32(%rsp), %r12
	leaq	848(%rsp), %r13
	salq	$2, %r15
	.p2align 4,,10
	.p2align 3
.L5:
	leaq	(%r12,%r15), %rsi
	leaq	0(%r13,%r15), %rdx
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	addl	$1, %ebp
	movl	28(%rsp), %esi
	addl	24(%rsp), %esi
	addq	$4, %r15
	cmpl	%ebp, %esi
	jg	.L5
.L4:
	testl	%esi, %esi
	jle	.L6
	leaq	848(%rsp), %r13
	leaq	32(%rsp), %r12
	xorl	%r15d, %r15d
	movq	%r12, %r10
	movq	%r13, %r8
	movq	%r13, %r11
	.p2align 4,,10
	.p2align 3
.L10:
	movq	%r11, %rdx
	movq	%r10, %rax
	movl	%r15d, %ecx
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L46:
	movl	%r9d, (%r10)
	movl	(%rdx), %r9d
	movl	%edi, (%rax)
	movl	(%r11), %edi
	movl	%r9d, (%r11)
	movl	%edi, (%rdx)
.L8:
	addl	$1, %ecx
	addq	$4, %rax
	addq	$4, %rdx
	cmpl	%esi, %ecx
	jge	.L45
.L9:
	movl	(%r10), %edi
	movl	(%rax), %r9d
	cmpl	%r9d, %edi
	jg	.L46
	jne	.L8
	movl	(%r11), %edi
	movl	(%rdx), %r9d
	cmpl	%r9d, %edi
	jle	.L8
	addl	$1, %ecx
	movl	%r9d, (%r11)
	addq	$4, %rax
	addq	$4, %rdx
	movl	%edi, -4(%rdx)
	cmpl	%esi, %ecx
	jl	.L9
	.p2align 4,,10
	.p2align 3
.L45:
	addl	$1, %r15d
	addq	$4, %r10
	addq	$4, %r11
	cmpl	%esi, %r15d
	jne	.L10
	movl	%esi, %edx
	leal	-1(%rsi), %r9d
	movq	%r14, %rdi
	salq	$2, %rdx
	cmpl	$8, %edx
	jb	.L11
	movl	%edx, %ecx
	xorl	%eax, %eax
	shrl	$3, %ecx
	rep stosq
.L11:
	andl	$4, %edx
	je	.L14
	movl	$0, (%rdi)
.L14:
	movl	$1, 1664(%rsp)
	cmpl	$1, %esi
	je	.L15
	leal	-2(%rsi), %r10d
	movl	$1, %edi
	addq	$2, %r10
	.p2align 4,,10
	.p2align 3
.L16:
	movl	-4(%r12,%rdi,4), %edx
	movq	%rdi, %rax
	.p2align 4,,10
	.p2align 3
.L19:
	cmpl	(%r12,%rax,4), %edx
	jge	.L18
	movl	0(%r13,%rax,4), %ecx
	cmpl	%ecx, (%r8)
	jge	.L18
	movl	-4(%r14,%rdi,4), %ecx
	cmpl	(%r14,%rax,4), %ecx
	jl	.L18
	addl	$1, %ecx
	movl	%ecx, (%r14,%rax,4)
	.p2align 4,,10
	.p2align 3
.L18:
	addq	$1, %rax
	cmpl	%eax, %esi
	jg	.L19
	addq	$1, %rdi
	addq	$4, %r8
	cmpq	%r10, %rdi
	jne	.L16
	cmpl	$2, %r9d
	jbe	.L47
.L29:
	movl	%esi, %edx
	movq	%r14, %rax
	pxor	%xmm0, %xmm0
	shrl	$2, %edx
	subl	$1, %edx
	salq	$4, %rdx
	leaq	1680(%rsp,%rdx), %rdx
	.p2align 4,,10
	.p2align 3
.L21:
	movdqa	%xmm0, %xmm1
	addq	$16, %rax
	pcmpgtd	-16(%rax), %xmm1
	pand	%xmm1, %xmm0
	pandn	-16(%rax), %xmm1
	por	%xmm1, %xmm0
	cmpq	%rdx, %rax
	jne	.L21
	movdqa	%xmm0, %xmm2
	movl	%esi, %eax
	psrldq	$8, %xmm2
	andl	$-4, %eax
	movdqa	%xmm2, %xmm1
	pcmpgtd	%xmm0, %xmm1
	pand	%xmm1, %xmm2
	pandn	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	por	%xmm2, %xmm0
	movdqa	%xmm0, %xmm2
	psrldq	$4, %xmm2
	movdqa	%xmm2, %xmm1
	pcmpgtd	%xmm0, %xmm1
	pand	%xmm1, %xmm2
	pandn	%xmm0, %xmm1
	por	%xmm2, %xmm1
	movd	%xmm1, %edx
	testb	$3, %sil
	je	.L26
	movslq	%eax, %rcx
	movl	1664(%rsp,%rcx,4), %ecx
	cmpl	%ecx, %edx
	cmovl	%ecx, %edx
	addl	$1, %eax
	cmpl	%esi, %eax
	jge	.L26
.L27:
	movslq	%eax, %rcx
	movl	1664(%rsp,%rcx,4), %ecx
	cmpl	%ecx, %edx
	cmovl	%ecx, %edx
	addl	$1, %eax
	cmpl	%esi, %eax
	jge	.L26
	cltq
	movl	1664(%rsp,%rax,4), %eax
	cmpl	%eax, %edx
	cmovl	%eax, %edx
.L26:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
.L23:
	movq	2472(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L48
	addq	$2488, %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
.L6:
	.cfi_restore_state
	movl	$1, 1664(%rsp)
	xorl	%edx, %edx
	jmp	.L26
.L15:
	cmpl	$2, %r9d
	ja	.L29
	movl	$1, %edx
	jmp	.L26
.L47:
	movl	1664(%rsp), %edx
	xorl	%eax, %eax
	testl	%edx, %edx
	cmovs	%eax, %edx
	movl	$1, %eax
	jmp	.L27
.L48:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.text
	.p2align 4
	.globl	max
	.type	max, @function
max:
.LFB24:
	.cfi_startproc
	endbr64
	cmpl	%edi, %esi
	movl	%edi, %eax
	cmovge	%esi, %eax
	ret
	.cfi_endproc
.LFE24:
	.size	max, .-max
	.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"
	.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
	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
	leaq	.LC0(%rip), %rbx
	subq	$2488, %rsp
	.cfi_def_cfa_offset 2544
	movq	%fs:40, %rax
	movq	%rax, 2472(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rax
	leaq	1664(%rsp), %r14
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	movq	8(%rsp), %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %eax
	testl	%eax, %eax
	je	.L23
	jle	.L25
	leaq	32(%rsp), %r15
	xorl	%r12d, %r12d
	leaq	848(%rsp), %r13
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	0(%r13,%r12,4), %rdx
	movq	%r15, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	addq	$1, %r12
	addq	$4, %r15
	cmpl	%r12d, 24(%rsp)
	jg	.L3
.L25:
	leaq	28(%rsp), %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %ebp
	movl	28(%rsp), %esi
	addl	%ebp, %esi
	cmpl	%esi, %ebp
	jge	.L4
	movslq	%ebp, %r15
	leaq	32(%rsp), %r12
	leaq	848(%rsp), %r13
	salq	$2, %r15
	.p2align 4,,10
	.p2align 3
.L5:
	leaq	(%r12,%r15), %rsi
	leaq	0(%r13,%r15), %rdx
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	addl	$1, %ebp
	movl	28(%rsp), %esi
	addl	24(%rsp), %esi
	addq	$4, %r15
	cmpl	%ebp, %esi
	jg	.L5
.L4:
	testl	%esi, %esi
	jle	.L6
	leaq	848(%rsp), %r13
	leaq	32(%rsp), %r12
	xorl	%r15d, %r15d
	movq	%r12, %r10
	movq	%r13, %r8
	movq	%r13, %r11
	.p2align 4,,10
	.p2align 3
.L10:
	movq	%r11, %rdx
	movq	%r10, %rax
	movl	%r15d, %ecx
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L46:
	movl	%r9d, (%r10)
	movl	(%rdx), %r9d
	movl	%edi, (%rax)
	movl	(%r11), %edi
	movl	%r9d, (%r11)
	movl	%edi, (%rdx)
.L8:
	addl	$1, %ecx
	addq	$4, %rax
	addq	$4, %rdx
	cmpl	%esi, %ecx
	jge	.L45
.L9:
	movl	(%r10), %edi
	movl	(%rax), %r9d
	cmpl	%r9d, %edi
	jg	.L46
	jne	.L8
	movl	(%r11), %edi
	movl	(%rdx), %r9d
	cmpl	%r9d, %edi
	jle	.L8
	addl	$1, %ecx
	movl	%r9d, (%r11)
	addq	$4, %rax
	addq	$4, %rdx
	movl	%edi, -4(%rdx)
	cmpl	%esi, %ecx
	jl	.L9
	.p2align 4,,10
	.p2align 3
.L45:
	addl	$1, %r15d
	addq	$4, %r10
	addq	$4, %r11
	cmpl	%esi, %r15d
	jne	.L10
	movl	%esi, %edx
	leal	-1(%rsi), %r9d
	movq	%r14, %rdi
	salq	$2, %rdx
	cmpl	$8, %edx
	jb	.L11
	movl	%edx, %ecx
	xorl	%eax, %eax
	shrl	$3, %ecx
	rep stosq
.L11:
	andl	$4, %edx
	je	.L14
	movl	$0, (%rdi)
.L14:
	movl	$1, 1664(%rsp)
	cmpl	$1, %esi
	je	.L15
	leal	-2(%rsi), %r10d
	movl	$1, %edi
	addq	$2, %r10
	.p2align 4,,10
	.p2align 3
.L16:
	movl	-4(%r12,%rdi,4), %edx
	movq	%rdi, %rax
	.p2align 4,,10
	.p2align 3
.L19:
	cmpl	(%r12,%rax,4), %edx
	jge	.L18
	movl	0(%r13,%rax,4), %ecx
	cmpl	%ecx, (%r8)
	jge	.L18
	movl	-4(%r14,%rdi,4), %ecx
	cmpl	(%r14,%rax,4), %ecx
	jl	.L18
	addl	$1, %ecx
	movl	%ecx, (%r14,%rax,4)
	.p2align 4,,10
	.p2align 3
.L18:
	addq	$1, %rax
	cmpl	%eax, %esi
	jg	.L19
	addq	$1, %rdi
	addq	$4, %r8
	cmpq	%r10, %rdi
	jne	.L16
	cmpl	$2, %r9d
	jbe	.L47
.L29:
	movl	%esi, %edx
	movq	%r14, %rax
	pxor	%xmm0, %xmm0
	shrl	$2, %edx
	subl	$1, %edx
	salq	$4, %rdx
	leaq	1680(%rsp,%rdx), %rdx
	.p2align 4,,10
	.p2align 3
.L21:
	movdqa	%xmm0, %xmm1
	addq	$16, %rax
	pcmpgtd	-16(%rax), %xmm1
	pand	%xmm1, %xmm0
	pandn	-16(%rax), %xmm1
	por	%xmm1, %xmm0
	cmpq	%rdx, %rax
	jne	.L21
	movdqa	%xmm0, %xmm2
	movl	%esi, %eax
	psrldq	$8, %xmm2
	andl	$-4, %eax
	movdqa	%xmm2, %xmm1
	pcmpgtd	%xmm0, %xmm1
	pand	%xmm1, %xmm2
	pandn	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	por	%xmm2, %xmm0
	movdqa	%xmm0, %xmm2
	psrldq	$4, %xmm2
	movdqa	%xmm2, %xmm1
	pcmpgtd	%xmm0, %xmm1
	pand	%xmm1, %xmm2
	pandn	%xmm0, %xmm1
	por	%xmm2, %xmm1
	movd	%xmm1, %edx
	testb	$3, %sil
	je	.L26
	movslq	%eax, %rcx
	movl	1664(%rsp,%rcx,4), %ecx
	cmpl	%ecx, %edx
	cmovl	%ecx, %edx
	addl	$1, %eax
	cmpl	%esi, %eax
	jge	.L26
.L27:
	movslq	%eax, %rcx
	movl	1664(%rsp,%rcx,4), %ecx
	cmpl	%ecx, %edx
	cmovl	%ecx, %edx
	addl	$1, %eax
	cmpl	%esi, %eax
	jge	.L26
	cltq
	movl	1664(%rsp,%rax,4), %eax
	cmpl	%eax, %edx
	cmovl	%eax, %edx
.L26:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
.L23:
	movq	2472(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L48
	addq	$2488, %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
.L6:
	.cfi_restore_state
	movl	$1, 1664(%rsp)
	xorl	%edx, %edx
	jmp	.L26
.L15:
	cmpl	$2, %r9d
	ja	.L29
	movl	$1, %edx
	jmp	.L26
.L47:
	movl	1664(%rsp), %edx
	xorl	%eax, %eax
	testl	%edx, %edx
	cmovs	%eax, %edx
	movl	$1, %eax
	jmp	.L27
.L48:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.text
	.p2align 4
	.globl	max
	.type	max, @function
max:
.LFB24:
	.cfi_startproc
	endbr64
	cmpl	%edi, %esi
	movl	%edi, %eax
	cmovge	%esi, %eax
	ret
	.cfi_endproc
.LFE24:
	.size	max, .-max
	.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 max(int,int);

int main(void){
  int n,m,h[201],r[201],i,j,t,dp[201],res;

  while(scanf("%d",&n),n){
    for(i=0;i<n;i++)scanf("%d %d",&h[i],&r[i]);
    scanf("%d",&m);
    for(i=n;i<n+m;i++)scanf("%d %d",&h[i],&r[i]);

      for(i=0;i<n+m;i++){
	  for(j=i;j<n+m;j++){
	      if(h[i]>h[j]){
		  t=h[i];
		  h[i]=h[j];
		  h[j]=t;
		  t=r[i];
		  r [i]=r[j];
		  r[j]=t;
		}
	      else if(h[i]==h[j] && r[i]>r[j]){
		  t=h[i];
		  h[i]=h[j];
		  h[j]=t;
		  t=r[i];
		  r [i]=r[j];
		  r[j]=t;
	      }
	  }
	}
      for(i=0;i<n+m;i++)dp[i]=0;
      dp[0]=1;
      
      for(i=0;i<n+m;i++){
	for(j=i+1;j<n+m;j++){
	  if(h[i]<h[j] && r[i]<r[j] && dp[i]>=dp[j])dp[j]=dp[i]+1;
	}
      }
      res=0;
      for(i=0;i<n+m;i++)res=max(res,dp[i]);

      printf("%d\n",res);
  }
  
  return 0;
}

int max(int x,int y){
  return x>y?x:y;
}
6
1 1
4 3
6 5
8 6
10 10
14 14
5
2 1
5 4
6 6
9 8
15 10
4
1 1
4 3
6 5
8 6
3
2 2
5 4
6 6
4
1 1
4 3
6 5
8 6
4
10 10
12 11
18 15
24 20
0
 6
1 1
4 3
6 5
8 6
10 10
14 14
5
2 2
5 4
6 6
9 8
15 10
4
1 1
4 3
6 5
8 6
3
2 2
5 4
6 6
4
1 2
4 3
6 5
8 6
4
10 10
12 11
18 15
24 20
0
 6
1 1
4 3
6 5
8 6
10 10
14 14
5
2 2
5 4
6 6
9 8
15 10
4
1 1
4 3
6 5
8 6
3
4 2
5 4
6 6
4
1 1
4 3
6 5
8 6
4
10 10
12 11
18 15
24 20
0
 6
1 1
4 3
6 0
8 6
10 10
14 14
5
2 2
5 4
6 6
9 8
15 10
4
1 1
4 3
6 5
8 6
3
2 2
9 4
6 6
4
1 2
4 3
6 5
8 6
4
10 10
12 11
18 15
24 20
0
 6
1 1
4 3
6 0
8 6
10 10
14 14
5
2 2
5 4
6 6
9 10
15 10
4
1 1
4 3
6 5
12 6
3
2 2
9 4
9 6
4
1 2
4 3
6 5
8 6
4
10 10
12 11
18 15
24 20
0
 6
1 1
4 3
6 0
8 6
10 10
14 14
5
2 2
5 4
6 6
9 8
15 10
4
2 1
4 3
6 5
8 6
3
2 2
9 4
6 6
4
1 2
4 3
6 5
8 6
4
10 10
12 11
18 15
24 20
0
 6
1 1
4 3
6 0
8 6
10 10
14 14
5
2 2
5 4
6 6
9 10
15 10
4
1 1
4 3
6 5
12 6
3
1 2
9 4
9 6
4
1 2
4 3
6 5
8 6
4
10 10
12 11
18 15
24 20
0
 6
1 1
4 3
6 5
8 6
10 10
14 14
5
2 2
5 4
6 6
9 15
15 20
4
1 1
4 3
6 3
8 6
3
4 2
5 4
6 6
4
1 1
4 3
6 5
8 6
4
10 10
12 11
18 15
24 20
0
 6
0 1
4 3
6 5
8 6
10 10
14 14
5
2 1
5 5
6 6
9 8
15 10
4
1 1
4 3
6 5
8 6
3
2 2
5 4
6 6
4
1 1
4 3
6 5
8 6
4
10 10
12 11
18 15
24 20
0
 6
1 1
4 3
6 5
8 6
10 10
14 14
5
2 2
5 4
6 6
9 15
15 10
4
1 1
4 3
6 5
8 11
3
4 2
5 4
6 7
4
1 1
4 3
6 5
8 6
4
10 2
12 11
18 15
24 20
0

8
6
8
 9
6
8
 9
5
8
 8
5
8
 7
5
8
 8
4
8
 7
4
8
 9
4
8
 7
6
8
 8
5
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 max(int,int);

int main(void){
  int n,m,h[201],r[201],i,j,t,dp[201],res;

  while(scanf("%d",&n),n){
    for(i=0;i<n;i++)scanf("%d %d",&h[i],&r[i]);
    scanf("%d",&m);
    for(i=n;i<n+m;i++)scanf("%d %d",&h[i],&r[i]);

      for(i=0;i<n+m;i++){
	  for(j=i;j<n+m;j++){
	      if(h[i]>h[j]){
		  t=h[i];
		  h[i]=h[j];
		  h[j]=t;
		  t=r[i];
		  r [i]=r[j];
		  r[j]=t;
		}
	      else if(h[i]==h[j] && r[i]>r[j]){
		  t=h[i];
		  h[i]=h[j];
		  h[j]=t;
		  t=r[i];
		  r [i]=r[j];
		  r[j]=t;
	      }
	  }
	}
      for(i=0;i<n+m;i++)dp[i]=0;
      dp[0]=1;
      
      for(i=0;i<n+m;i++){
	for(j=i+1;j<n+m;j++){
	  if(h[i]<h[j] && r[i]<r[j] && dp[i]>=dp[j])dp[j]=dp[i]+1;
	}
      }
      res=0;
      for(i=0;i<n+m;i++)res=max(res,dp[i]);

      printf("%d\n",res);
  }
  
  return 0;
}

int max(int x,int y){
  return x>y?x:y;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d"
.LC2:
	.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	$2480, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L2
.L22:
	movl	$0, -2464(%rbp)
	jmp	.L3
.L4:
	leaq	-1632(%rbp), %rdx
	movl	-2464(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	leaq	-2448(%rbp), %rcx
	movl	-2464(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -2464(%rbp)
.L3:
	movl	-2472(%rbp), %eax
	cmpl	%eax, -2464(%rbp)
	jl	.L4
	leaq	-2468(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-2472(%rbp), %eax
	movl	%eax, -2464(%rbp)
	jmp	.L5
.L6:
	leaq	-1632(%rbp), %rdx
	movl	-2464(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	leaq	-2448(%rbp), %rcx
	movl	-2464(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -2464(%rbp)
.L5:
	movl	-2472(%rbp), %edx
	movl	-2468(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -2464(%rbp)
	jl	.L6
	movl	$0, -2464(%rbp)
	jmp	.L7
.L12:
	movl	-2464(%rbp), %eax
	movl	%eax, -2460(%rbp)
	jmp	.L8
.L11:
	movl	-2464(%rbp), %eax
	cltq
	movl	-2448(%rbp,%rax,4), %edx
	movl	-2460(%rbp), %eax
	cltq
	movl	-2448(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jle	.L9
	movl	-2464(%rbp), %eax
	cltq
	movl	-2448(%rbp,%rax,4), %eax
	movl	%eax, -2452(%rbp)
	movl	-2460(%rbp), %eax
	cltq
	movl	-2448(%rbp,%rax,4), %edx
	movl	-2464(%rbp), %eax
	cltq
	movl	%edx, -2448(%rbp,%rax,4)
	movl	-2460(%rbp), %eax
	cltq
	movl	-2452(%rbp), %edx
	movl	%edx, -2448(%rbp,%rax,4)
	movl	-2464(%rbp), %eax
	cltq
	movl	-1632(%rbp,%rax,4), %eax
	movl	%eax, -2452(%rbp)
	movl	-2460(%rbp), %eax
	cltq
	movl	-1632(%rbp,%rax,4), %edx
	movl	-2464(%rbp), %eax
	cltq
	movl	%edx, -1632(%rbp,%rax,4)
	movl	-2460(%rbp), %eax
	cltq
	movl	-2452(%rbp), %edx
	movl	%edx, -1632(%rbp,%rax,4)
	jmp	.L10
.L9:
	movl	-2464(%rbp), %eax
	cltq
	movl	-2448(%rbp,%rax,4), %edx
	movl	-2460(%rbp), %eax
	cltq
	movl	-2448(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jne	.L10
	movl	-2464(%rbp), %eax
	cltq
	movl	-1632(%rbp,%rax,4), %edx
	movl	-2460(%rbp), %eax
	cltq
	movl	-1632(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jle	.L10
	movl	-2464(%rbp), %eax
	cltq
	movl	-2448(%rbp,%rax,4), %eax
	movl	%eax, -2452(%rbp)
	movl	-2460(%rbp), %eax
	cltq
	movl	-2448(%rbp,%rax,4), %edx
	movl	-2464(%rbp), %eax
	cltq
	movl	%edx, -2448(%rbp,%rax,4)
	movl	-2460(%rbp), %eax
	cltq
	movl	-2452(%rbp), %edx
	movl	%edx, -2448(%rbp,%rax,4)
	movl	-2464(%rbp), %eax
	cltq
	movl	-1632(%rbp,%rax,4), %eax
	movl	%eax, -2452(%rbp)
	movl	-2460(%rbp), %eax
	cltq
	movl	-1632(%rbp,%rax,4), %edx
	movl	-2464(%rbp), %eax
	cltq
	movl	%edx, -1632(%rbp,%rax,4)
	movl	-2460(%rbp), %eax
	cltq
	movl	-2452(%rbp), %edx
	movl	%edx, -1632(%rbp,%rax,4)
.L10:
	addl	$1, -2460(%rbp)
.L8:
	movl	-2472(%rbp), %edx
	movl	-2468(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -2460(%rbp)
	jl	.L11
	addl	$1, -2464(%rbp)
.L7:
	movl	-2472(%rbp), %edx
	movl	-2468(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -2464(%rbp)
	jl	.L12
	movl	$0, -2464(%rbp)
	jmp	.L13
.L14:
	movl	-2464(%rbp), %eax
	cltq
	movl	$0, -816(%rbp,%rax,4)
	addl	$1, -2464(%rbp)
.L13:
	movl	-2472(%rbp), %edx
	movl	-2468(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -2464(%rbp)
	jl	.L14
	movl	$1, -816(%rbp)
	movl	$0, -2464(%rbp)
	jmp	.L15
.L19:
	movl	-2464(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -2460(%rbp)
	jmp	.L16
.L18:
	movl	-2464(%rbp), %eax
	cltq
	movl	-2448(%rbp,%rax,4), %edx
	movl	-2460(%rbp), %eax
	cltq
	movl	-2448(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jge	.L17
	movl	-2464(%rbp), %eax
	cltq
	movl	-1632(%rbp,%rax,4), %edx
	movl	-2460(%rbp), %eax
	cltq
	movl	-1632(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jge	.L17
	movl	-2464(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %edx
	movl	-2460(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jl	.L17
	movl	-2464(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	leal	1(%rax), %edx
	movl	-2460(%rbp), %eax
	cltq
	movl	%edx, -816(%rbp,%rax,4)
.L17:
	addl	$1, -2460(%rbp)
.L16:
	movl	-2472(%rbp), %edx
	movl	-2468(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -2460(%rbp)
	jl	.L18
	addl	$1, -2464(%rbp)
.L15:
	movl	-2472(%rbp), %edx
	movl	-2468(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -2464(%rbp)
	jl	.L19
	movl	$0, -2456(%rbp)
	movl	$0, -2464(%rbp)
	jmp	.L20
.L21:
	movl	-2464(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %edx
	movl	-2456(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	max
	movl	%eax, -2456(%rbp)
	addl	$1, -2464(%rbp)
.L20:
	movl	-2472(%rbp), %edx
	movl	-2468(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -2464(%rbp)
	jl	.L21
	movl	-2456(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L2:
	leaq	-2472(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-2472(%rbp), %eax
	testl	%eax, %eax
	jne	.L22
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L24
	call	__stack_chk_fail@PLT
.L24:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	max
	.type	max, @function
max:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-8(%rbp), %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	max, .-max
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
train
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d"
.LC2:
	.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	$2480, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L2
.L22:
	movl	$0, -2464(%rbp)
	jmp	.L3
.L4:
	leaq	-1632(%rbp), %rdx
	movl	-2464(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	leaq	-2448(%rbp), %rcx
	movl	-2464(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -2464(%rbp)
.L3:
	movl	-2472(%rbp), %eax
	cmpl	%eax, -2464(%rbp)
	jl	.L4
	leaq	-2468(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-2472(%rbp), %eax
	movl	%eax, -2464(%rbp)
	jmp	.L5
.L6:
	leaq	-1632(%rbp), %rdx
	movl	-2464(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	leaq	-2448(%rbp), %rcx
	movl	-2464(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -2464(%rbp)
.L5:
	movl	-2472(%rbp), %edx
	movl	-2468(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -2464(%rbp)
	jl	.L6
	movl	$0, -2464(%rbp)
	jmp	.L7
.L12:
	movl	-2464(%rbp), %eax
	movl	%eax, -2460(%rbp)
	jmp	.L8
.L11:
	movl	-2464(%rbp), %eax
	cltq
	movl	-2448(%rbp,%rax,4), %edx
	movl	-2460(%rbp), %eax
	cltq
	movl	-2448(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jle	.L9
	movl	-2464(%rbp), %eax
	cltq
	movl	-2448(%rbp,%rax,4), %eax
	movl	%eax, -2452(%rbp)
	movl	-2460(%rbp), %eax
	cltq
	movl	-2448(%rbp,%rax,4), %edx
	movl	-2464(%rbp), %eax
	cltq
	movl	%edx, -2448(%rbp,%rax,4)
	movl	-2460(%rbp), %eax
	cltq
	movl	-2452(%rbp), %edx
	movl	%edx, -2448(%rbp,%rax,4)
	movl	-2464(%rbp), %eax
	cltq
	movl	-1632(%rbp,%rax,4), %eax
	movl	%eax, -2452(%rbp)
	movl	-2460(%rbp), %eax
	cltq
	movl	-1632(%rbp,%rax,4), %edx
	movl	-2464(%rbp), %eax
	cltq
	movl	%edx, -1632(%rbp,%rax,4)
	movl	-2460(%rbp), %eax
	cltq
	movl	-2452(%rbp), %edx
	movl	%edx, -1632(%rbp,%rax,4)
	jmp	.L10
.L9:
	movl	-2464(%rbp), %eax
	cltq
	movl	-2448(%rbp,%rax,4), %edx
	movl	-2460(%rbp), %eax
	cltq
	movl	-2448(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jne	.L10
	movl	-2464(%rbp), %eax
	cltq
	movl	-1632(%rbp,%rax,4), %edx
	movl	-2460(%rbp), %eax
	cltq
	movl	-1632(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jle	.L10
	movl	-2464(%rbp), %eax
	cltq
	movl	-2448(%rbp,%rax,4), %eax
	movl	%eax, -2452(%rbp)
	movl	-2460(%rbp), %eax
	cltq
	movl	-2448(%rbp,%rax,4), %edx
	movl	-2464(%rbp), %eax
	cltq
	movl	%edx, -2448(%rbp,%rax,4)
	movl	-2460(%rbp), %eax
	cltq
	movl	-2452(%rbp), %edx
	movl	%edx, -2448(%rbp,%rax,4)
	movl	-2464(%rbp), %eax
	cltq
	movl	-1632(%rbp,%rax,4), %eax
	movl	%eax, -2452(%rbp)
	movl	-2460(%rbp), %eax
	cltq
	movl	-1632(%rbp,%rax,4), %edx
	movl	-2464(%rbp), %eax
	cltq
	movl	%edx, -1632(%rbp,%rax,4)
	movl	-2460(%rbp), %eax
	cltq
	movl	-2452(%rbp), %edx
	movl	%edx, -1632(%rbp,%rax,4)
.L10:
	addl	$1, -2460(%rbp)
.L8:
	movl	-2472(%rbp), %edx
	movl	-2468(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -2460(%rbp)
	jl	.L11
	addl	$1, -2464(%rbp)
.L7:
	movl	-2472(%rbp), %edx
	movl	-2468(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -2464(%rbp)
	jl	.L12
	movl	$0, -2464(%rbp)
	jmp	.L13
.L14:
	movl	-2464(%rbp), %eax
	cltq
	movl	$0, -816(%rbp,%rax,4)
	addl	$1, -2464(%rbp)
.L13:
	movl	-2472(%rbp), %edx
	movl	-2468(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -2464(%rbp)
	jl	.L14
	movl	$1, -816(%rbp)
	movl	$0, -2464(%rbp)
	jmp	.L15
.L19:
	movl	-2464(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -2460(%rbp)
	jmp	.L16
.L18:
	movl	-2464(%rbp), %eax
	cltq
	movl	-2448(%rbp,%rax,4), %edx
	movl	-2460(%rbp), %eax
	cltq
	movl	-2448(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jge	.L17
	movl	-2464(%rbp), %eax
	cltq
	movl	-1632(%rbp,%rax,4), %edx
	movl	-2460(%rbp), %eax
	cltq
	movl	-1632(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jge	.L17
	movl	-2464(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %edx
	movl	-2460(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jl	.L17
	movl	-2464(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	leal	1(%rax), %edx
	movl	-2460(%rbp), %eax
	cltq
	movl	%edx, -816(%rbp,%rax,4)
.L17:
	addl	$1, -2460(%rbp)
.L16:
	movl	-2472(%rbp), %edx
	movl	-2468(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -2460(%rbp)
	jl	.L18
	addl	$1, -2464(%rbp)
.L15:
	movl	-2472(%rbp), %edx
	movl	-2468(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -2464(%rbp)
	jl	.L19
	movl	$0, -2456(%rbp)
	movl	$0, -2464(%rbp)
	jmp	.L20
.L21:
	movl	-2464(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %edx
	movl	-2456(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	max
	movl	%eax, -2456(%rbp)
	addl	$1, -2464(%rbp)
.L20:
	movl	-2472(%rbp), %edx
	movl	-2468(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -2464(%rbp)
	jl	.L21
	movl	-2456(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L2:
	leaq	-2472(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-2472(%rbp), %eax
	testl	%eax, %eax
	jne	.L22
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L24
	call	__stack_chk_fail@PLT
.L24:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	max
	.type	max, @function
max:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-8(%rbp), %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	max, .-max
	.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:
