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

```c
#include<stdio.h>
int main(void)
{
    int n,h[21],i,j,k,m=0;
    scanf("%d",&n);
    for(i=0;i<n;i++)
        scanf("%d",&h[i]);
    for(i=0;i<n;i++){
        k=0;
        for(j=0;j<i;j++){
            if(h[i]>=h[j])
                k++;
        }
        if(k==i)
            m++;
    }
    printf("%d\n",m);
    return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movq	%r13, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$120, %rsp
	.cfi_def_cfa_offset 160
	movq	%fs:40, %rax
	movq	%rax, 104(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	leaq	16(%rsp), %rbx
	xorl	%ebp, %ebp
	movq	%rbx, %r12
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r8d
	addq	$4, %r12
	cmpl	%ebp, %r8d
	jg	.L3
	testl	%r8d, %r8d
	jle	.L2
	movdqa	16(%rsp), %xmm5
	movdqa	32(%rsp), %xmm6
	xorl	%esi, %esi
	xorl	%edx, %edx
	movdqa	48(%rsp), %xmm7
	xorl	%r9d, %r9d
	xorl	%eax, %eax
	pxor	%xmm3, %xmm3
	movdqa	64(%rsp), %xmm8
	movdqa	80(%rsp), %xmm9
	movdqa	.LC1(%rip), %xmm4
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L13:
	movl	4(%rbx,%rsi,4), %edi
	cmpq	$2, %rsi
	jbe	.L16
	movd	%edi, %xmm2
	movdqa	%xmm5, %xmm0
	movl	%edx, %eax
	pshufd	$0, %xmm2, %xmm1
	shrl	$2, %eax
	pcmpgtd	%xmm1, %xmm0
	pandn	%xmm4, %xmm0
	cmpl	$1, %eax
	je	.L6
	movdqa	%xmm6, %xmm2
	pcmpgtd	%xmm1, %xmm2
	pcmpeqd	%xmm3, %xmm2
	psubd	%xmm2, %xmm0
	cmpl	$2, %eax
	je	.L6
	movdqa	%xmm7, %xmm2
	pcmpgtd	%xmm1, %xmm2
	pcmpeqd	%xmm3, %xmm2
	psubd	%xmm2, %xmm0
	cmpl	$3, %eax
	je	.L6
	movdqa	%xmm8, %xmm2
	pcmpgtd	%xmm1, %xmm2
	pcmpeqd	%xmm3, %xmm2
	psubd	%xmm2, %xmm0
	cmpl	$5, %eax
	jne	.L6
	movdqa	%xmm9, %xmm2
	pcmpgtd	%xmm1, %xmm2
	movdqa	%xmm2, %xmm1
	pcmpeqd	%xmm3, %xmm1
	psubd	%xmm1, %xmm0
.L6:
	movdqa	%xmm0, %xmm1
	movl	%edx, %ecx
	psrldq	$8, %xmm1
	andl	$-4, %ecx
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	testb	$3, %dl
	je	.L7
.L5:
	movslq	%ecx, %r10
	cmpl	16(%rsp,%r10,4), %edi
	jl	.L8
	addl	$1, %eax
.L8:
	leal	1(%rcx), %r10d
	movl	%esi, %r11d
	cmpl	%ecx, %esi
	jle	.L7
	movslq	%r10d, %rbp
	cmpl	16(%rsp,%rbp,4), %edi
	jl	.L9
	addl	$1, %eax
.L9:
	addl	$2, %ecx
	cmpl	%r11d, %r10d
	jge	.L7
	movslq	%ecx, %rcx
	cmpl	16(%rsp,%rcx,4), %edi
	jl	.L7
	addl	$1, %eax
.L7:
	addq	$1, %rsi
.L4:
	cmpl	%eax, %edx
	sete	%al
	addl	$1, %edx
	movzbl	%al, %eax
	addl	%eax, %r9d
	cmpl	%edx, %r8d
	jne	.L13
.L14:
	xorl	%eax, %eax
	movl	%r9d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	104(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L29
	addq	$120, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L16:
	.cfi_restore_state
	xorl	%eax, %eax
	xorl	%ecx, %ecx
	jmp	.L5
.L2:
	xorl	%r9d, %r9d
	jmp	.L14
.L29:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.long	1
	.long	1
	.long	1
	.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:
```

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.
Optimized Assembly Code:

user
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movq	%r13, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$120, %rsp
	.cfi_def_cfa_offset 160
	movq	%fs:40, %rax
	movq	%rax, 104(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	leaq	16(%rsp), %rbx
	xorl	%ebp, %ebp
	movq	%rbx, %r12
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r8d
	addq	$4, %r12
	cmpl	%ebp, %r8d
	jg	.L3
	testl	%r8d, %r8d
	jle	.L2
	movdqa	16(%rsp), %xmm5
	movdqa	32(%rsp), %xmm6
	xorl	%esi, %esi
	xorl	%edx, %edx
	movdqa	48(%rsp), %xmm7
	xorl	%r9d, %r9d
	xorl	%eax, %eax
	pxor	%xmm3, %xmm3
	movdqa	64(%rsp), %xmm8
	movdqa	80(%rsp), %xmm9
	movdqa	.LC1(%rip), %xmm4
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L13:
	movl	4(%rbx,%rsi,4), %edi
	cmpq	$2, %rsi
	jbe	.L16
	movd	%edi, %xmm2
	movdqa	%xmm5, %xmm0
	movl	%edx, %eax
	pshufd	$0, %xmm2, %xmm1
	shrl	$2, %eax
	pcmpgtd	%xmm1, %xmm0
	pandn	%xmm4, %xmm0
	cmpl	$1, %eax
	je	.L6
	movdqa	%xmm6, %xmm2
	pcmpgtd	%xmm1, %xmm2
	pcmpeqd	%xmm3, %xmm2
	psubd	%xmm2, %xmm0
	cmpl	$2, %eax
	je	.L6
	movdqa	%xmm7, %xmm2
	pcmpgtd	%xmm1, %xmm2
	pcmpeqd	%xmm3, %xmm2
	psubd	%xmm2, %xmm0
	cmpl	$3, %eax
	je	.L6
	movdqa	%xmm8, %xmm2
	pcmpgtd	%xmm1, %xmm2
	pcmpeqd	%xmm3, %xmm2
	psubd	%xmm2, %xmm0
	cmpl	$5, %eax
	jne	.L6
	movdqa	%xmm9, %xmm2
	pcmpgtd	%xmm1, %xmm2
	movdqa	%xmm2, %xmm1
	pcmpeqd	%xmm3, %xmm1
	psubd	%xmm1, %xmm0
.L6:
	movdqa	%xmm0, %xmm1
	movl	%edx, %ecx
	psrldq	$8, %xmm1
	andl	$-4, %ecx
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	testb	$3, %dl
	je	.L7
.L5:
	movslq	%ecx, %r10
	cmpl	16(%rsp,%r10,4), %edi
	jl	.L8
	addl	$1, %eax
.L8:
	leal	1(%rcx), %r10d
	movl	%esi, %r11d
	cmpl	%ecx, %esi
	jle	.L7
	movslq	%r10d, %rbp
	cmpl	16(%rsp,%rbp,4), %edi
	jl	.L9
	addl	$1, %eax
.L9:
	addl	$2, %ecx
	cmpl	%r11d, %r10d
	jge	.L7
	movslq	%ecx, %rcx
	cmpl	16(%rsp,%rcx,4), %edi
	jl	.L7
	addl	$1, %eax
.L7:
	addq	$1, %rsi
.L4:
	cmpl	%eax, %edx
	sete	%al
	addl	$1, %edx
	movzbl	%al, %eax
	addl	%eax, %r9d
	cmpl	%edx, %r8d
	jne	.L13
.L14:
	xorl	%eax, %eax
	movl	%r9d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	104(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L29
	addq	$120, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L16:
	.cfi_restore_state
	xorl	%eax, %eax
	xorl	%ecx, %ecx
	jmp	.L5
.L2:
	xorl	%r9d, %r9d
	jmp	.L14
.L29:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.long	1
	.long	1
	.long	1
	.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
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movq	%r13, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$120, %rsp
	.cfi_def_cfa_offset 160
	movq	%fs:40, %rax
	movq	%rax, 104(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	leaq	16(%rsp), %rbx
	xorl	%ebp, %ebp
	movq	%rbx, %r12
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r8d
	addq	$4, %r12
	cmpl	%ebp, %r8d
	jg	.L3
	testl	%r8d, %r8d
	jle	.L2
	movdqa	16(%rsp), %xmm5
	movdqa	32(%rsp), %xmm6
	xorl	%esi, %esi
	xorl	%edx, %edx
	movdqa	48(%rsp), %xmm7
	xorl	%r9d, %r9d
	xorl	%eax, %eax
	pxor	%xmm3, %xmm3
	movdqa	64(%rsp), %xmm8
	movdqa	80(%rsp), %xmm9
	movdqa	.LC1(%rip), %xmm4
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L13:
	movl	4(%rbx,%rsi,4), %edi
	cmpq	$2, %rsi
	jbe	.L16
	movd	%edi, %xmm2
	movdqa	%xmm5, %xmm0
	movl	%edx, %eax
	pshufd	$0, %xmm2, %xmm1
	shrl	$2, %eax
	pcmpgtd	%xmm1, %xmm0
	pandn	%xmm4, %xmm0
	cmpl	$1, %eax
	je	.L6
	movdqa	%xmm6, %xmm2
	pcmpgtd	%xmm1, %xmm2
	pcmpeqd	%xmm3, %xmm2
	psubd	%xmm2, %xmm0
	cmpl	$2, %eax
	je	.L6
	movdqa	%xmm7, %xmm2
	pcmpgtd	%xmm1, %xmm2
	pcmpeqd	%xmm3, %xmm2
	psubd	%xmm2, %xmm0
	cmpl	$3, %eax
	je	.L6
	movdqa	%xmm8, %xmm2
	pcmpgtd	%xmm1, %xmm2
	pcmpeqd	%xmm3, %xmm2
	psubd	%xmm2, %xmm0
	cmpl	$5, %eax
	jne	.L6
	movdqa	%xmm9, %xmm2
	pcmpgtd	%xmm1, %xmm2
	movdqa	%xmm2, %xmm1
	pcmpeqd	%xmm3, %xmm1
	psubd	%xmm1, %xmm0
.L6:
	movdqa	%xmm0, %xmm1
	movl	%edx, %ecx
	psrldq	$8, %xmm1
	andl	$-4, %ecx
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	testb	$3, %dl
	je	.L7
.L5:
	movslq	%ecx, %r10
	cmpl	16(%rsp,%r10,4), %edi
	jl	.L8
	addl	$1, %eax
.L8:
	leal	1(%rcx), %r10d
	movl	%esi, %r11d
	cmpl	%ecx, %esi
	jle	.L7
	movslq	%r10d, %rbp
	cmpl	16(%rsp,%rbp,4), %edi
	jl	.L9
	addl	$1, %eax
.L9:
	addl	$2, %ecx
	cmpl	%r11d, %r10d
	jge	.L7
	movslq	%ecx, %rcx
	cmpl	16(%rsp,%rcx,4), %edi
	jl	.L7
	addl	$1, %eax
.L7:
	addq	$1, %rsi
.L4:
	cmpl	%eax, %edx
	sete	%al
	addl	$1, %edx
	movzbl	%al, %eax
	addl	%eax, %r9d
	cmpl	%edx, %r8d
	jne	.L13
.L14:
	xorl	%eax, %eax
	movl	%r9d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	104(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L29
	addq	$120, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L16:
	.cfi_restore_state
	xorl	%eax, %eax
	xorl	%ecx, %ecx
	jmp	.L5
.L2:
	xorl	%r9d, %r9d
	jmp	.L14
.L29:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.long	1
	.long	1
	.long	1
	.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:
```
```c
#include<stdio.h>
int main(void)
{
    int n,h[21],i,j,k,m=0;
    scanf("%d",&n);
    for(i=0;i<n;i++)
        scanf("%d",&h[i]);
    for(i=0;i<n;i++){
        k=0;
        for(j=0;j<i;j++){
            if(h[i]>=h[j])
                k++;
        }
        if(k==i)
            m++;
    }
    printf("%d\n",m);
    return 0;
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>
int main(void)
{
    int n,h[21],i,j,k,m=0;
    scanf("%d",&n);
    for(i=0;i<n;i++)
        scanf("%d",&h[i]);
    for(i=0;i<n;i++){
        k=0;
        for(j=0;j<i;j++){
            if(h[i]>=h[j])
                k++;
        }
        if(k==i)
            m++;
    }
    printf("%d\n",m);
    return 0;
}```

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.
Optimized Assembly Code:

4
6 5 5 8
 5
9 0 6 8 4
 4
6 5 8 8
 5
2 3 3 4 8
 5
2 3 3 4 2
 5
4 5 3 1 4
 5
9 -1 6 8 4
 5
4 5 3 2 4
 4
6 5 11 8
 5
9 -1 4 8 4

2
 1
 3
 5
 4
 2
 1
 2
 2
 1

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

```c
#include<stdio.h>
int main(void)
{
    int n,h[21],i,j,k,m=0;
    scanf("%d",&n);
    for(i=0;i<n;i++)
        scanf("%d",&h[i]);
    for(i=0;i<n;i++){
        k=0;
        for(j=0;j<i;j++){
            if(h[i]>=h[j])
                k++;
        }
        if(k==i)
            m++;
    }
    printf("%d\n",m);
    return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movq	%r13, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$120, %rsp
	.cfi_def_cfa_offset 160
	movq	%fs:40, %rax
	movq	%rax, 104(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	leaq	16(%rsp), %rbx
	xorl	%ebp, %ebp
	movq	%rbx, %r12
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r8d
	addq	$4, %r12
	cmpl	%ebp, %r8d
	jg	.L3
	testl	%r8d, %r8d
	jle	.L2
	movdqa	16(%rsp), %xmm5
	movdqa	32(%rsp), %xmm6
	xorl	%esi, %esi
	xorl	%edx, %edx
	movdqa	48(%rsp), %xmm7
	xorl	%r9d, %r9d
	xorl	%eax, %eax
	pxor	%xmm3, %xmm3
	movdqa	64(%rsp), %xmm8
	movdqa	80(%rsp), %xmm9
	movdqa	.LC1(%rip), %xmm4
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L13:
	movl	4(%rbx,%rsi,4), %edi
	cmpq	$2, %rsi
	jbe	.L16
	movd	%edi, %xmm2
	movdqa	%xmm5, %xmm0
	movl	%edx, %eax
	pshufd	$0, %xmm2, %xmm1
	shrl	$2, %eax
	pcmpgtd	%xmm1, %xmm0
	pandn	%xmm4, %xmm0
	cmpl	$1, %eax
	je	.L6
	movdqa	%xmm6, %xmm2
	pcmpgtd	%xmm1, %xmm2
	pcmpeqd	%xmm3, %xmm2
	psubd	%xmm2, %xmm0
	cmpl	$2, %eax
	je	.L6
	movdqa	%xmm7, %xmm2
	pcmpgtd	%xmm1, %xmm2
	pcmpeqd	%xmm3, %xmm2
	psubd	%xmm2, %xmm0
	cmpl	$3, %eax
	je	.L6
	movdqa	%xmm8, %xmm2
	pcmpgtd	%xmm1, %xmm2
	pcmpeqd	%xmm3, %xmm2
	psubd	%xmm2, %xmm0
	cmpl	$5, %eax
	jne	.L6
	movdqa	%xmm9, %xmm2
	pcmpgtd	%xmm1, %xmm2
	movdqa	%xmm2, %xmm1
	pcmpeqd	%xmm3, %xmm1
	psubd	%xmm1, %xmm0
.L6:
	movdqa	%xmm0, %xmm1
	movl	%edx, %ecx
	psrldq	$8, %xmm1
	andl	$-4, %ecx
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	testb	$3, %dl
	je	.L7
.L5:
	movslq	%ecx, %r10
	cmpl	16(%rsp,%r10,4), %edi
	jl	.L8
	addl	$1, %eax
.L8:
	leal	1(%rcx), %r10d
	movl	%esi, %r11d
	cmpl	%ecx, %esi
	jle	.L7
	movslq	%r10d, %rbp
	cmpl	16(%rsp,%rbp,4), %edi
	jl	.L9
	addl	$1, %eax
.L9:
	addl	$2, %ecx
	cmpl	%r11d, %r10d
	jge	.L7
	movslq	%ecx, %rcx
	cmpl	16(%rsp,%rcx,4), %edi
	jl	.L7
	addl	$1, %eax
.L7:
	addq	$1, %rsi
.L4:
	cmpl	%eax, %edx
	sete	%al
	addl	$1, %edx
	movzbl	%al, %eax
	addl	%eax, %r9d
	cmpl	%edx, %r8d
	jne	.L13
.L14:
	xorl	%eax, %eax
	movl	%r9d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	104(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L29
	addq	$120, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L16:
	.cfi_restore_state
	xorl	%eax, %eax
	xorl	%ecx, %ecx
	jmp	.L5
.L2:
	xorl	%r9d, %r9d
	jmp	.L14
.L29:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.long	1
	.long	1
	.long	1
	.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:
```

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.
Optimized Assembly Code:

train
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movq	%r13, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$120, %rsp
	.cfi_def_cfa_offset 160
	movq	%fs:40, %rax
	movq	%rax, 104(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	leaq	16(%rsp), %rbx
	xorl	%ebp, %ebp
	movq	%rbx, %r12
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r8d
	addq	$4, %r12
	cmpl	%ebp, %r8d
	jg	.L3
	testl	%r8d, %r8d
	jle	.L2
	movdqa	16(%rsp), %xmm5
	movdqa	32(%rsp), %xmm6
	xorl	%esi, %esi
	xorl	%edx, %edx
	movdqa	48(%rsp), %xmm7
	xorl	%r9d, %r9d
	xorl	%eax, %eax
	pxor	%xmm3, %xmm3
	movdqa	64(%rsp), %xmm8
	movdqa	80(%rsp), %xmm9
	movdqa	.LC1(%rip), %xmm4
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L13:
	movl	4(%rbx,%rsi,4), %edi
	cmpq	$2, %rsi
	jbe	.L16
	movd	%edi, %xmm2
	movdqa	%xmm5, %xmm0
	movl	%edx, %eax
	pshufd	$0, %xmm2, %xmm1
	shrl	$2, %eax
	pcmpgtd	%xmm1, %xmm0
	pandn	%xmm4, %xmm0
	cmpl	$1, %eax
	je	.L6
	movdqa	%xmm6, %xmm2
	pcmpgtd	%xmm1, %xmm2
	pcmpeqd	%xmm3, %xmm2
	psubd	%xmm2, %xmm0
	cmpl	$2, %eax
	je	.L6
	movdqa	%xmm7, %xmm2
	pcmpgtd	%xmm1, %xmm2
	pcmpeqd	%xmm3, %xmm2
	psubd	%xmm2, %xmm0
	cmpl	$3, %eax
	je	.L6
	movdqa	%xmm8, %xmm2
	pcmpgtd	%xmm1, %xmm2
	pcmpeqd	%xmm3, %xmm2
	psubd	%xmm2, %xmm0
	cmpl	$5, %eax
	jne	.L6
	movdqa	%xmm9, %xmm2
	pcmpgtd	%xmm1, %xmm2
	movdqa	%xmm2, %xmm1
	pcmpeqd	%xmm3, %xmm1
	psubd	%xmm1, %xmm0
.L6:
	movdqa	%xmm0, %xmm1
	movl	%edx, %ecx
	psrldq	$8, %xmm1
	andl	$-4, %ecx
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	testb	$3, %dl
	je	.L7
.L5:
	movslq	%ecx, %r10
	cmpl	16(%rsp,%r10,4), %edi
	jl	.L8
	addl	$1, %eax
.L8:
	leal	1(%rcx), %r10d
	movl	%esi, %r11d
	cmpl	%ecx, %esi
	jle	.L7
	movslq	%r10d, %rbp
	cmpl	16(%rsp,%rbp,4), %edi
	jl	.L9
	addl	$1, %eax
.L9:
	addl	$2, %ecx
	cmpl	%r11d, %r10d
	jge	.L7
	movslq	%ecx, %rcx
	cmpl	16(%rsp,%rcx,4), %edi
	jl	.L7
	addl	$1, %eax
.L7:
	addq	$1, %rsi
.L4:
	cmpl	%eax, %edx
	sete	%al
	addl	$1, %edx
	movzbl	%al, %eax
	addl	%eax, %r9d
	cmpl	%edx, %r8d
	jne	.L13
.L14:
	xorl	%eax, %eax
	movl	%r9d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	104(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L29
	addq	$120, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L16:
	.cfi_restore_state
	xorl	%eax, %eax
	xorl	%ecx, %ecx
	jmp	.L5
.L2:
	xorl	%r9d, %r9d
	jmp	.L14
.L29:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.long	1
	.long	1
	.long	1
	.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:
```