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 l,i,j,cnt=1,f=0;
  scanf("%d",&l);
  int mt[l];
  scanf("%d",&mt[0]);
  for(i=1;i<l;i++){
    f=0;
    scanf("%d",&mt[i]);
    for(j=0;j<i;j++){
      if(mt[i]<mt[j]){
        f=1;
      }
    }
    if(f==0){
      cnt++;
    }
  }
  printf("%d",cnt);
  return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	.cfi_offset 15, -24
	leaq	.LC0(%rip), %r15
	pushq	%r14
	leaq	-60(%rbp), %rsi
	movq	%r15, %rdi
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-60(%rbp), %rax
	movq	%rsp, %rcx
	leaq	15(,%rax,4), %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	subq	%rax, %rcx
	andq	$-16, %rdx
	cmpq	%rcx, %rsp
	je	.L3
.L26:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rcx, %rsp
	jne	.L26
.L3:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L27
.L4:
	movq	%rsp, %r14
	xorl	%eax, %eax
	movq	%r15, %rdi
	movq	%r14, %rsi
	call	__isoc99_scanf@PLT
	cmpl	$1, -60(%rbp)
	jle	.L15
	leaq	4(%r14), %r13
	movl	$1, %r12d
	movl	$1, %ebx
	.p2align 4,,10
	.p2align 3
.L12:
	xorl	%eax, %eax
	movq	%r13, %rsi
	movq	%r15, %rdi
	call	__isoc99_scanf@PLT
	leal	-1(%rbx), %eax
	movl	0(%r13), %ecx
	movdqa	.LC1(%rip), %xmm4
	cmpl	$2, %eax
	jbe	.L16
	movl	%ebx, %edx
	movd	%ecx, %xmm5
	pxor	%xmm1, %xmm1
	movq	%r14, %rax
	shrl	$2, %edx
	pshufd	$0, %xmm5, %xmm3
	subl	$1, %edx
	salq	$4, %rdx
	leaq	16(%r14,%rdx), %rdx
	.p2align 4,,10
	.p2align 3
.L7:
	movdqu	(%rax), %xmm0
	movdqa	%xmm4, %xmm2
	addq	$16, %rax
	pcmpgtd	%xmm3, %xmm0
	pand	%xmm0, %xmm2
	pandn	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	por	%xmm2, %xmm1
	cmpq	%rax, %rdx
	jne	.L7
	movdqa	%xmm1, %xmm2
	movl	%ebx, %edx
	psrldq	$8, %xmm2
	andl	$-4, %edx
	movdqa	%xmm2, %xmm0
	pcmpgtd	%xmm1, %xmm0
	pand	%xmm0, %xmm2
	pandn	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	por	%xmm2, %xmm1
	movdqa	%xmm1, %xmm2
	psrldq	$4, %xmm2
	movdqa	%xmm2, %xmm0
	pcmpgtd	%xmm1, %xmm0
	pand	%xmm0, %xmm2
	pandn	%xmm1, %xmm0
	por	%xmm2, %xmm0
	movd	%xmm0, %eax
	testb	$3, %bl
	je	.L8
.L6:
	movslq	%edx, %rsi
	addl	$1, %edx
	leaq	(%r14,%rsi,4), %rsi
	cmpl	(%rsi), %ecx
	jl	.L9
	cmpl	%ebx, %edx
	jge	.L8
.L13:
	cmpl	4(%rsi), %ecx
	jl	.L11
	addl	$1, %edx
	cmpl	%edx, %ebx
	jle	.L8
	cmpl	8(%rsi), %ecx
	jl	.L11
.L8:
	cmpl	$1, %eax
	adcl	$0, %r12d
.L11:
	addl	$1, %ebx
	addq	$4, %r13
	cmpl	%ebx, -60(%rbp)
	jg	.L12
.L5:
	xorl	%eax, %eax
	movl	%r12d, %edx
	movq	%r15, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L28
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	movl	$1, %eax
	cmpl	%edx, %ebx
	jg	.L13
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L16:
	xorl	%eax, %eax
	xorl	%edx, %edx
	jmp	.L6
.L27:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L4
.L15:
	movl	$1, %r12d
	jmp	.L5
.L28:
	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"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	.cfi_offset 15, -24
	leaq	.LC0(%rip), %r15
	pushq	%r14
	leaq	-60(%rbp), %rsi
	movq	%r15, %rdi
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-60(%rbp), %rax
	movq	%rsp, %rcx
	leaq	15(,%rax,4), %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	subq	%rax, %rcx
	andq	$-16, %rdx
	cmpq	%rcx, %rsp
	je	.L3
.L26:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rcx, %rsp
	jne	.L26
.L3:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L27
.L4:
	movq	%rsp, %r14
	xorl	%eax, %eax
	movq	%r15, %rdi
	movq	%r14, %rsi
	call	__isoc99_scanf@PLT
	cmpl	$1, -60(%rbp)
	jle	.L15
	leaq	4(%r14), %r13
	movl	$1, %r12d
	movl	$1, %ebx
	.p2align 4,,10
	.p2align 3
.L12:
	xorl	%eax, %eax
	movq	%r13, %rsi
	movq	%r15, %rdi
	call	__isoc99_scanf@PLT
	leal	-1(%rbx), %eax
	movl	0(%r13), %ecx
	movdqa	.LC1(%rip), %xmm4
	cmpl	$2, %eax
	jbe	.L16
	movl	%ebx, %edx
	movd	%ecx, %xmm5
	pxor	%xmm1, %xmm1
	movq	%r14, %rax
	shrl	$2, %edx
	pshufd	$0, %xmm5, %xmm3
	subl	$1, %edx
	salq	$4, %rdx
	leaq	16(%r14,%rdx), %rdx
	.p2align 4,,10
	.p2align 3
.L7:
	movdqu	(%rax), %xmm0
	movdqa	%xmm4, %xmm2
	addq	$16, %rax
	pcmpgtd	%xmm3, %xmm0
	pand	%xmm0, %xmm2
	pandn	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	por	%xmm2, %xmm1
	cmpq	%rax, %rdx
	jne	.L7
	movdqa	%xmm1, %xmm2
	movl	%ebx, %edx
	psrldq	$8, %xmm2
	andl	$-4, %edx
	movdqa	%xmm2, %xmm0
	pcmpgtd	%xmm1, %xmm0
	pand	%xmm0, %xmm2
	pandn	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	por	%xmm2, %xmm1
	movdqa	%xmm1, %xmm2
	psrldq	$4, %xmm2
	movdqa	%xmm2, %xmm0
	pcmpgtd	%xmm1, %xmm0
	pand	%xmm0, %xmm2
	pandn	%xmm1, %xmm0
	por	%xmm2, %xmm0
	movd	%xmm0, %eax
	testb	$3, %bl
	je	.L8
.L6:
	movslq	%edx, %rsi
	addl	$1, %edx
	leaq	(%r14,%rsi,4), %rsi
	cmpl	(%rsi), %ecx
	jl	.L9
	cmpl	%ebx, %edx
	jge	.L8
.L13:
	cmpl	4(%rsi), %ecx
	jl	.L11
	addl	$1, %edx
	cmpl	%edx, %ebx
	jle	.L8
	cmpl	8(%rsi), %ecx
	jl	.L11
.L8:
	cmpl	$1, %eax
	adcl	$0, %r12d
.L11:
	addl	$1, %ebx
	addq	$4, %r13
	cmpl	%ebx, -60(%rbp)
	jg	.L12
.L5:
	xorl	%eax, %eax
	movl	%r12d, %edx
	movq	%r15, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L28
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	movl	$1, %eax
	cmpl	%edx, %ebx
	jg	.L13
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L16:
	xorl	%eax, %eax
	xorl	%edx, %edx
	jmp	.L6
.L27:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L4
.L15:
	movl	$1, %r12d
	jmp	.L5
.L28:
	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"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	.cfi_offset 15, -24
	leaq	.LC0(%rip), %r15
	pushq	%r14
	leaq	-60(%rbp), %rsi
	movq	%r15, %rdi
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-60(%rbp), %rax
	movq	%rsp, %rcx
	leaq	15(,%rax,4), %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	subq	%rax, %rcx
	andq	$-16, %rdx
	cmpq	%rcx, %rsp
	je	.L3
.L26:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rcx, %rsp
	jne	.L26
.L3:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L27
.L4:
	movq	%rsp, %r14
	xorl	%eax, %eax
	movq	%r15, %rdi
	movq	%r14, %rsi
	call	__isoc99_scanf@PLT
	cmpl	$1, -60(%rbp)
	jle	.L15
	leaq	4(%r14), %r13
	movl	$1, %r12d
	movl	$1, %ebx
	.p2align 4,,10
	.p2align 3
.L12:
	xorl	%eax, %eax
	movq	%r13, %rsi
	movq	%r15, %rdi
	call	__isoc99_scanf@PLT
	leal	-1(%rbx), %eax
	movl	0(%r13), %ecx
	movdqa	.LC1(%rip), %xmm4
	cmpl	$2, %eax
	jbe	.L16
	movl	%ebx, %edx
	movd	%ecx, %xmm5
	pxor	%xmm1, %xmm1
	movq	%r14, %rax
	shrl	$2, %edx
	pshufd	$0, %xmm5, %xmm3
	subl	$1, %edx
	salq	$4, %rdx
	leaq	16(%r14,%rdx), %rdx
	.p2align 4,,10
	.p2align 3
.L7:
	movdqu	(%rax), %xmm0
	movdqa	%xmm4, %xmm2
	addq	$16, %rax
	pcmpgtd	%xmm3, %xmm0
	pand	%xmm0, %xmm2
	pandn	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	por	%xmm2, %xmm1
	cmpq	%rax, %rdx
	jne	.L7
	movdqa	%xmm1, %xmm2
	movl	%ebx, %edx
	psrldq	$8, %xmm2
	andl	$-4, %edx
	movdqa	%xmm2, %xmm0
	pcmpgtd	%xmm1, %xmm0
	pand	%xmm0, %xmm2
	pandn	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	por	%xmm2, %xmm1
	movdqa	%xmm1, %xmm2
	psrldq	$4, %xmm2
	movdqa	%xmm2, %xmm0
	pcmpgtd	%xmm1, %xmm0
	pand	%xmm0, %xmm2
	pandn	%xmm1, %xmm0
	por	%xmm2, %xmm0
	movd	%xmm0, %eax
	testb	$3, %bl
	je	.L8
.L6:
	movslq	%edx, %rsi
	addl	$1, %edx
	leaq	(%r14,%rsi,4), %rsi
	cmpl	(%rsi), %ecx
	jl	.L9
	cmpl	%ebx, %edx
	jge	.L8
.L13:
	cmpl	4(%rsi), %ecx
	jl	.L11
	addl	$1, %edx
	cmpl	%edx, %ebx
	jle	.L8
	cmpl	8(%rsi), %ecx
	jl	.L11
.L8:
	cmpl	$1, %eax
	adcl	$0, %r12d
.L11:
	addl	$1, %ebx
	addq	$4, %r13
	cmpl	%ebx, -60(%rbp)
	jg	.L12
.L5:
	xorl	%eax, %eax
	movl	%r12d, %edx
	movq	%r15, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L28
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	movl	$1, %eax
	cmpl	%edx, %ebx
	jg	.L13
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L16:
	xorl	%eax, %eax
	xorl	%edx, %edx
	jmp	.L6
.L27:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L4
.L15:
	movl	$1, %r12d
	jmp	.L5
.L28:
	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 l,i,j,cnt=1,f=0;
  scanf("%d",&l);
  int mt[l];
  scanf("%d",&mt[0]);
  for(i=1;i<l;i++){
    f=0;
    scanf("%d",&mt[i]);
    for(j=0;j<i;j++){
      if(mt[i]<mt[j]){
        f=1;
      }
    }
    if(f==0){
      cnt++;
    }
  }
  printf("%d",cnt);
  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 l,i,j,cnt=1,f=0;
  scanf("%d",&l);
  int mt[l];
  scanf("%d",&mt[0]);
  for(i=1;i<l;i++){
    f=0;
    scanf("%d",&mt[i]);
    for(j=0;j<i;j++){
      if(mt[i]<mt[j]){
        f=1;
      }
    }
    if(f==0){
      cnt++;
    }
  }
  printf("%d",cnt);
  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 l,i,j,cnt=1,f=0;
  scanf("%d",&l);
  int mt[l];
  scanf("%d",&mt[0]);
  for(i=1;i<l;i++){
    f=0;
    scanf("%d",&mt[i]);
    for(j=0;j<i;j++){
      if(mt[i]<mt[j]){
        f=1;
      }
    }
    if(f==0){
      cnt++;
    }
  }
  printf("%d",cnt);
  return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	.cfi_offset 15, -24
	leaq	.LC0(%rip), %r15
	pushq	%r14
	leaq	-60(%rbp), %rsi
	movq	%r15, %rdi
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-60(%rbp), %rax
	movq	%rsp, %rcx
	leaq	15(,%rax,4), %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	subq	%rax, %rcx
	andq	$-16, %rdx
	cmpq	%rcx, %rsp
	je	.L3
.L26:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rcx, %rsp
	jne	.L26
.L3:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L27
.L4:
	movq	%rsp, %r14
	xorl	%eax, %eax
	movq	%r15, %rdi
	movq	%r14, %rsi
	call	__isoc99_scanf@PLT
	cmpl	$1, -60(%rbp)
	jle	.L15
	leaq	4(%r14), %r13
	movl	$1, %r12d
	movl	$1, %ebx
	.p2align 4,,10
	.p2align 3
.L12:
	xorl	%eax, %eax
	movq	%r13, %rsi
	movq	%r15, %rdi
	call	__isoc99_scanf@PLT
	leal	-1(%rbx), %eax
	movl	0(%r13), %ecx
	movdqa	.LC1(%rip), %xmm4
	cmpl	$2, %eax
	jbe	.L16
	movl	%ebx, %edx
	movd	%ecx, %xmm5
	pxor	%xmm1, %xmm1
	movq	%r14, %rax
	shrl	$2, %edx
	pshufd	$0, %xmm5, %xmm3
	subl	$1, %edx
	salq	$4, %rdx
	leaq	16(%r14,%rdx), %rdx
	.p2align 4,,10
	.p2align 3
.L7:
	movdqu	(%rax), %xmm0
	movdqa	%xmm4, %xmm2
	addq	$16, %rax
	pcmpgtd	%xmm3, %xmm0
	pand	%xmm0, %xmm2
	pandn	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	por	%xmm2, %xmm1
	cmpq	%rax, %rdx
	jne	.L7
	movdqa	%xmm1, %xmm2
	movl	%ebx, %edx
	psrldq	$8, %xmm2
	andl	$-4, %edx
	movdqa	%xmm2, %xmm0
	pcmpgtd	%xmm1, %xmm0
	pand	%xmm0, %xmm2
	pandn	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	por	%xmm2, %xmm1
	movdqa	%xmm1, %xmm2
	psrldq	$4, %xmm2
	movdqa	%xmm2, %xmm0
	pcmpgtd	%xmm1, %xmm0
	pand	%xmm0, %xmm2
	pandn	%xmm1, %xmm0
	por	%xmm2, %xmm0
	movd	%xmm0, %eax
	testb	$3, %bl
	je	.L8
.L6:
	movslq	%edx, %rsi
	addl	$1, %edx
	leaq	(%r14,%rsi,4), %rsi
	cmpl	(%rsi), %ecx
	jl	.L9
	cmpl	%ebx, %edx
	jge	.L8
.L13:
	cmpl	4(%rsi), %ecx
	jl	.L11
	addl	$1, %edx
	cmpl	%edx, %ebx
	jle	.L8
	cmpl	8(%rsi), %ecx
	jl	.L11
.L8:
	cmpl	$1, %eax
	adcl	$0, %r12d
.L11:
	addl	$1, %ebx
	addq	$4, %r13
	cmpl	%ebx, -60(%rbp)
	jg	.L12
.L5:
	xorl	%eax, %eax
	movl	%r12d, %edx
	movq	%r15, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L28
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	movl	$1, %eax
	cmpl	%edx, %ebx
	jg	.L13
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L16:
	xorl	%eax, %eax
	xorl	%edx, %edx
	jmp	.L6
.L27:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L4
.L15:
	movl	$1, %r12d
	jmp	.L5
.L28:
	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"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	.cfi_offset 15, -24
	leaq	.LC0(%rip), %r15
	pushq	%r14
	leaq	-60(%rbp), %rsi
	movq	%r15, %rdi
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-60(%rbp), %rax
	movq	%rsp, %rcx
	leaq	15(,%rax,4), %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	subq	%rax, %rcx
	andq	$-16, %rdx
	cmpq	%rcx, %rsp
	je	.L3
.L26:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rcx, %rsp
	jne	.L26
.L3:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L27
.L4:
	movq	%rsp, %r14
	xorl	%eax, %eax
	movq	%r15, %rdi
	movq	%r14, %rsi
	call	__isoc99_scanf@PLT
	cmpl	$1, -60(%rbp)
	jle	.L15
	leaq	4(%r14), %r13
	movl	$1, %r12d
	movl	$1, %ebx
	.p2align 4,,10
	.p2align 3
.L12:
	xorl	%eax, %eax
	movq	%r13, %rsi
	movq	%r15, %rdi
	call	__isoc99_scanf@PLT
	leal	-1(%rbx), %eax
	movl	0(%r13), %ecx
	movdqa	.LC1(%rip), %xmm4
	cmpl	$2, %eax
	jbe	.L16
	movl	%ebx, %edx
	movd	%ecx, %xmm5
	pxor	%xmm1, %xmm1
	movq	%r14, %rax
	shrl	$2, %edx
	pshufd	$0, %xmm5, %xmm3
	subl	$1, %edx
	salq	$4, %rdx
	leaq	16(%r14,%rdx), %rdx
	.p2align 4,,10
	.p2align 3
.L7:
	movdqu	(%rax), %xmm0
	movdqa	%xmm4, %xmm2
	addq	$16, %rax
	pcmpgtd	%xmm3, %xmm0
	pand	%xmm0, %xmm2
	pandn	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	por	%xmm2, %xmm1
	cmpq	%rax, %rdx
	jne	.L7
	movdqa	%xmm1, %xmm2
	movl	%ebx, %edx
	psrldq	$8, %xmm2
	andl	$-4, %edx
	movdqa	%xmm2, %xmm0
	pcmpgtd	%xmm1, %xmm0
	pand	%xmm0, %xmm2
	pandn	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	por	%xmm2, %xmm1
	movdqa	%xmm1, %xmm2
	psrldq	$4, %xmm2
	movdqa	%xmm2, %xmm0
	pcmpgtd	%xmm1, %xmm0
	pand	%xmm0, %xmm2
	pandn	%xmm1, %xmm0
	por	%xmm2, %xmm0
	movd	%xmm0, %eax
	testb	$3, %bl
	je	.L8
.L6:
	movslq	%edx, %rsi
	addl	$1, %edx
	leaq	(%r14,%rsi,4), %rsi
	cmpl	(%rsi), %ecx
	jl	.L9
	cmpl	%ebx, %edx
	jge	.L8
.L13:
	cmpl	4(%rsi), %ecx
	jl	.L11
	addl	$1, %edx
	cmpl	%edx, %ebx
	jle	.L8
	cmpl	8(%rsi), %ecx
	jl	.L11
.L8:
	cmpl	$1, %eax
	adcl	$0, %r12d
.L11:
	addl	$1, %ebx
	addq	$4, %r13
	cmpl	%ebx, -60(%rbp)
	jg	.L12
.L5:
	xorl	%eax, %eax
	movl	%r12d, %edx
	movq	%r15, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L28
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	movl	$1, %eax
	cmpl	%edx, %ebx
	jg	.L13
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L16:
	xorl	%eax, %eax
	xorl	%edx, %edx
	jmp	.L6
.L27:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L4
.L15:
	movl	$1, %r12d
	jmp	.L5
.L28:
	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:
```