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,s,i,line[20000],ans,sum,o;
    for(;ans=0,scanf("%d %d",&n,&s),n+s;){
        for(i=0;i<n;i++)
            scanf("%d",&line[i]);
        for(i=0;i<n-1;i++)
            for(o=i+1;sum=0,o<n;o++){
                sum+=line[i]+line[o];
                if(sum > s)
                    ans++;
            }
        printf("%d\n",ans);
    }
    return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d %d"
	.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	-77824(%rsp), %r11
	.cfi_def_cfa 11, 77880
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2216, %rsp
	.cfi_def_cfa_offset 80096
	leaq	.LC2(%rip), %rbp
	leaq	.LC0(%rip), %rbx
	movq	%fs:40, %rax
	movq	%rax, 80024(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %r13
	leaq	8(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%r12, %rsi
	xorl	%eax, %eax
	movq	%r13, %rdx
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %esi
	movl	%esi, %eax
	addl	12(%rsp), %eax
	je	.L15
	leaq	16(%rsp), %r15
	xorl	%r14d, %r14d
	testl	%esi, %esi
	jle	.L17
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r15, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r14d
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %esi
	addq	$4, %r15
	cmpl	%r14d, %esi
	jg	.L3
.L17:
	leal	-1(%rsi), %r11d
	testl	%r11d, %r11d
	jle	.L19
	movl	12(%rsp), %r10d
	movl	%r11d, %r14d
	leaq	20(%rsp), %r8
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movd	%r10d, %xmm5
	pshufd	$0, %xmm5, %xmm3
	.p2align 4,,10
	.p2align 3
.L14:
	addl	$1, %ecx
	leal	-1(%r14), %r9d
	cmpl	%esi, %ecx
	jge	.L5
	leal	-1(%r14), %r9d
	movl	-4(%r8), %edi
	cmpl	$2, %r9d
	jbe	.L20
	movl	%r14d, %eax
	movd	%edi, %xmm4
	pxor	%xmm1, %xmm1
	shrl	$2, %eax
	pshufd	$0, %xmm4, %xmm2
	subl	$1, %eax
	salq	$4, %rax
	leaq	16(%r8,%rax), %r15
	movq	%r8, %rax
	.p2align 4,,10
	.p2align 3
.L7:
	movdqu	(%rax), %xmm0
	addq	$16, %rax
	paddd	%xmm2, %xmm0
	pcmpgtd	%xmm3, %xmm0
	psubd	%xmm0, %xmm1
	cmpq	%rax, %r15
	jne	.L7
	movdqa	%xmm1, %xmm0
	movl	%r14d, %r15d
	psrldq	$8, %xmm0
	andl	$-4, %r15d
	paddd	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %eax
	addl	%eax, %edx
	leal	(%r15,%rcx), %eax
	cmpl	%r15d, %r14d
	je	.L5
.L6:
	movslq	%eax, %r14
	movl	16(%rsp,%r14,4), %r15d
	addl	%edi, %r15d
	cmpl	%r10d, %r15d
	setg	%r14b
	movzbl	%r14b, %r14d
	addl	%r14d, %edx
	leal	1(%rax), %r14d
	cmpl	%esi, %r14d
	jge	.L5
	movslq	%r14d, %r14
	movl	16(%rsp,%r14,4), %r15d
	addl	%edi, %r15d
	cmpl	%r15d, %r10d
	setl	%r14b
	addl	$2, %eax
	movzbl	%r14b, %r14d
	addl	%r14d, %edx
	cmpl	%esi, %eax
	jge	.L5
	cltq
	addl	16(%rsp,%rax,4), %edi
	xorl	%eax, %eax
	cmpl	%edi, %r10d
	setl	%al
	addl	%eax, %edx
.L5:
	movl	%r9d, %r14d
	addq	$4, %r8
	cmpl	%ecx, %r11d
	jne	.L14
.L4:
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
.L20:
	movl	%ecx, %eax
	jmp	.L6
.L15:
	movq	80024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L30
	addq	$80040, %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
.L19:
	.cfi_restore_state
	xorl	%edx, %edx
	jmp	.L4
.L30:
	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:
```

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"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d %d"
	.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	-77824(%rsp), %r11
	.cfi_def_cfa 11, 77880
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2216, %rsp
	.cfi_def_cfa_offset 80096
	leaq	.LC2(%rip), %rbp
	leaq	.LC0(%rip), %rbx
	movq	%fs:40, %rax
	movq	%rax, 80024(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %r13
	leaq	8(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%r12, %rsi
	xorl	%eax, %eax
	movq	%r13, %rdx
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %esi
	movl	%esi, %eax
	addl	12(%rsp), %eax
	je	.L15
	leaq	16(%rsp), %r15
	xorl	%r14d, %r14d
	testl	%esi, %esi
	jle	.L17
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r15, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r14d
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %esi
	addq	$4, %r15
	cmpl	%r14d, %esi
	jg	.L3
.L17:
	leal	-1(%rsi), %r11d
	testl	%r11d, %r11d
	jle	.L19
	movl	12(%rsp), %r10d
	movl	%r11d, %r14d
	leaq	20(%rsp), %r8
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movd	%r10d, %xmm5
	pshufd	$0, %xmm5, %xmm3
	.p2align 4,,10
	.p2align 3
.L14:
	addl	$1, %ecx
	leal	-1(%r14), %r9d
	cmpl	%esi, %ecx
	jge	.L5
	leal	-1(%r14), %r9d
	movl	-4(%r8), %edi
	cmpl	$2, %r9d
	jbe	.L20
	movl	%r14d, %eax
	movd	%edi, %xmm4
	pxor	%xmm1, %xmm1
	shrl	$2, %eax
	pshufd	$0, %xmm4, %xmm2
	subl	$1, %eax
	salq	$4, %rax
	leaq	16(%r8,%rax), %r15
	movq	%r8, %rax
	.p2align 4,,10
	.p2align 3
.L7:
	movdqu	(%rax), %xmm0
	addq	$16, %rax
	paddd	%xmm2, %xmm0
	pcmpgtd	%xmm3, %xmm0
	psubd	%xmm0, %xmm1
	cmpq	%rax, %r15
	jne	.L7
	movdqa	%xmm1, %xmm0
	movl	%r14d, %r15d
	psrldq	$8, %xmm0
	andl	$-4, %r15d
	paddd	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %eax
	addl	%eax, %edx
	leal	(%r15,%rcx), %eax
	cmpl	%r15d, %r14d
	je	.L5
.L6:
	movslq	%eax, %r14
	movl	16(%rsp,%r14,4), %r15d
	addl	%edi, %r15d
	cmpl	%r10d, %r15d
	setg	%r14b
	movzbl	%r14b, %r14d
	addl	%r14d, %edx
	leal	1(%rax), %r14d
	cmpl	%esi, %r14d
	jge	.L5
	movslq	%r14d, %r14
	movl	16(%rsp,%r14,4), %r15d
	addl	%edi, %r15d
	cmpl	%r15d, %r10d
	setl	%r14b
	addl	$2, %eax
	movzbl	%r14b, %r14d
	addl	%r14d, %edx
	cmpl	%esi, %eax
	jge	.L5
	cltq
	addl	16(%rsp,%rax,4), %edi
	xorl	%eax, %eax
	cmpl	%edi, %r10d
	setl	%al
	addl	%eax, %edx
.L5:
	movl	%r9d, %r14d
	addq	$4, %r8
	cmpl	%ecx, %r11d
	jne	.L14
.L4:
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
.L20:
	movl	%ecx, %eax
	jmp	.L6
.L15:
	movq	80024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L30
	addq	$80040, %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
.L19:
	.cfi_restore_state
	xorl	%edx, %edx
	jmp	.L4
.L30:
	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
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d %d"
	.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	-77824(%rsp), %r11
	.cfi_def_cfa 11, 77880
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2216, %rsp
	.cfi_def_cfa_offset 80096
	leaq	.LC2(%rip), %rbp
	leaq	.LC0(%rip), %rbx
	movq	%fs:40, %rax
	movq	%rax, 80024(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %r13
	leaq	8(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%r12, %rsi
	xorl	%eax, %eax
	movq	%r13, %rdx
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %esi
	movl	%esi, %eax
	addl	12(%rsp), %eax
	je	.L15
	leaq	16(%rsp), %r15
	xorl	%r14d, %r14d
	testl	%esi, %esi
	jle	.L17
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r15, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r14d
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %esi
	addq	$4, %r15
	cmpl	%r14d, %esi
	jg	.L3
.L17:
	leal	-1(%rsi), %r11d
	testl	%r11d, %r11d
	jle	.L19
	movl	12(%rsp), %r10d
	movl	%r11d, %r14d
	leaq	20(%rsp), %r8
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movd	%r10d, %xmm5
	pshufd	$0, %xmm5, %xmm3
	.p2align 4,,10
	.p2align 3
.L14:
	addl	$1, %ecx
	leal	-1(%r14), %r9d
	cmpl	%esi, %ecx
	jge	.L5
	leal	-1(%r14), %r9d
	movl	-4(%r8), %edi
	cmpl	$2, %r9d
	jbe	.L20
	movl	%r14d, %eax
	movd	%edi, %xmm4
	pxor	%xmm1, %xmm1
	shrl	$2, %eax
	pshufd	$0, %xmm4, %xmm2
	subl	$1, %eax
	salq	$4, %rax
	leaq	16(%r8,%rax), %r15
	movq	%r8, %rax
	.p2align 4,,10
	.p2align 3
.L7:
	movdqu	(%rax), %xmm0
	addq	$16, %rax
	paddd	%xmm2, %xmm0
	pcmpgtd	%xmm3, %xmm0
	psubd	%xmm0, %xmm1
	cmpq	%rax, %r15
	jne	.L7
	movdqa	%xmm1, %xmm0
	movl	%r14d, %r15d
	psrldq	$8, %xmm0
	andl	$-4, %r15d
	paddd	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %eax
	addl	%eax, %edx
	leal	(%r15,%rcx), %eax
	cmpl	%r15d, %r14d
	je	.L5
.L6:
	movslq	%eax, %r14
	movl	16(%rsp,%r14,4), %r15d
	addl	%edi, %r15d
	cmpl	%r10d, %r15d
	setg	%r14b
	movzbl	%r14b, %r14d
	addl	%r14d, %edx
	leal	1(%rax), %r14d
	cmpl	%esi, %r14d
	jge	.L5
	movslq	%r14d, %r14
	movl	16(%rsp,%r14,4), %r15d
	addl	%edi, %r15d
	cmpl	%r15d, %r10d
	setl	%r14b
	addl	$2, %eax
	movzbl	%r14b, %r14d
	addl	%r14d, %edx
	cmpl	%esi, %eax
	jge	.L5
	cltq
	addl	16(%rsp,%rax,4), %edi
	xorl	%eax, %eax
	cmpl	%edi, %r10d
	setl	%al
	addl	%eax, %edx
.L5:
	movl	%r9d, %r14d
	addq	$4, %r8
	cmpl	%ecx, %r11d
	jne	.L14
.L4:
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
.L20:
	movl	%ecx, %eax
	jmp	.L6
.L15:
	movq	80024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L30
	addq	$80040, %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
.L19:
	.cfi_restore_state
	xorl	%edx, %edx
	jmp	.L4
.L30:
	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:
```
```c
#include <stdio.h>

int main(void){
    int n,s,i,line[20000],ans,sum,o;
    for(;ans=0,scanf("%d %d",&n,&s),n+s;){
        for(i=0;i<n;i++)
            scanf("%d",&line[i]);
        for(i=0;i<n-1;i++)
            for(o=i+1;sum=0,o<n;o++){
                sum+=line[i]+line[o];
                if(sum > s)
                    ans++;
            }
        printf("%d\n",ans);
    }
    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,s,i,line[20000],ans,sum,o;
    for(;ans=0,scanf("%d %d",&n,&s),n+s;){
        for(i=0;i<n;i++)
            scanf("%d",&line[i]);
        for(i=0;i<n-1;i++)
            for(o=i+1;sum=0,o<n;o++){
                sum+=line[i]+line[o];
                if(sum > s)
                    ans++;
            }
        printf("%d\n",ans);
    }
    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:

3 7
1
6
10
0 0
 3 11
0
3
10
0 0
 3 7
2
6
10
0 0
 3 7
1
0
5
0 0
 3 7
0
3
10
0 0
 3 7
1
3
16
0 0
 3 7
1
3
25
0 0
 3 11
0
3
18
0 0
 3 7
1
1
25
0 0
 3 11
0
3
20
0 0

2
 1
 3
 0
 2
 2
 2
 2
 2
 2

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,s,i,line[20000],ans,sum,o;
    for(;ans=0,scanf("%d %d",&n,&s),n+s;){
        for(i=0;i<n;i++)
            scanf("%d",&line[i]);
        for(i=0;i<n-1;i++)
            for(o=i+1;sum=0,o<n;o++){
                sum+=line[i]+line[o];
                if(sum > s)
                    ans++;
            }
        printf("%d\n",ans);
    }
    return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d %d"
	.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	-77824(%rsp), %r11
	.cfi_def_cfa 11, 77880
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2216, %rsp
	.cfi_def_cfa_offset 80096
	leaq	.LC2(%rip), %rbp
	leaq	.LC0(%rip), %rbx
	movq	%fs:40, %rax
	movq	%rax, 80024(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %r13
	leaq	8(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%r12, %rsi
	xorl	%eax, %eax
	movq	%r13, %rdx
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %esi
	movl	%esi, %eax
	addl	12(%rsp), %eax
	je	.L15
	leaq	16(%rsp), %r15
	xorl	%r14d, %r14d
	testl	%esi, %esi
	jle	.L17
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r15, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r14d
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %esi
	addq	$4, %r15
	cmpl	%r14d, %esi
	jg	.L3
.L17:
	leal	-1(%rsi), %r11d
	testl	%r11d, %r11d
	jle	.L19
	movl	12(%rsp), %r10d
	movl	%r11d, %r14d
	leaq	20(%rsp), %r8
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movd	%r10d, %xmm5
	pshufd	$0, %xmm5, %xmm3
	.p2align 4,,10
	.p2align 3
.L14:
	addl	$1, %ecx
	leal	-1(%r14), %r9d
	cmpl	%esi, %ecx
	jge	.L5
	leal	-1(%r14), %r9d
	movl	-4(%r8), %edi
	cmpl	$2, %r9d
	jbe	.L20
	movl	%r14d, %eax
	movd	%edi, %xmm4
	pxor	%xmm1, %xmm1
	shrl	$2, %eax
	pshufd	$0, %xmm4, %xmm2
	subl	$1, %eax
	salq	$4, %rax
	leaq	16(%r8,%rax), %r15
	movq	%r8, %rax
	.p2align 4,,10
	.p2align 3
.L7:
	movdqu	(%rax), %xmm0
	addq	$16, %rax
	paddd	%xmm2, %xmm0
	pcmpgtd	%xmm3, %xmm0
	psubd	%xmm0, %xmm1
	cmpq	%rax, %r15
	jne	.L7
	movdqa	%xmm1, %xmm0
	movl	%r14d, %r15d
	psrldq	$8, %xmm0
	andl	$-4, %r15d
	paddd	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %eax
	addl	%eax, %edx
	leal	(%r15,%rcx), %eax
	cmpl	%r15d, %r14d
	je	.L5
.L6:
	movslq	%eax, %r14
	movl	16(%rsp,%r14,4), %r15d
	addl	%edi, %r15d
	cmpl	%r10d, %r15d
	setg	%r14b
	movzbl	%r14b, %r14d
	addl	%r14d, %edx
	leal	1(%rax), %r14d
	cmpl	%esi, %r14d
	jge	.L5
	movslq	%r14d, %r14
	movl	16(%rsp,%r14,4), %r15d
	addl	%edi, %r15d
	cmpl	%r15d, %r10d
	setl	%r14b
	addl	$2, %eax
	movzbl	%r14b, %r14d
	addl	%r14d, %edx
	cmpl	%esi, %eax
	jge	.L5
	cltq
	addl	16(%rsp,%rax,4), %edi
	xorl	%eax, %eax
	cmpl	%edi, %r10d
	setl	%al
	addl	%eax, %edx
.L5:
	movl	%r9d, %r14d
	addq	$4, %r8
	cmpl	%ecx, %r11d
	jne	.L14
.L4:
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
.L20:
	movl	%ecx, %eax
	jmp	.L6
.L15:
	movq	80024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L30
	addq	$80040, %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
.L19:
	.cfi_restore_state
	xorl	%edx, %edx
	jmp	.L4
.L30:
	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:
```

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"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d %d"
	.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	-77824(%rsp), %r11
	.cfi_def_cfa 11, 77880
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2216, %rsp
	.cfi_def_cfa_offset 80096
	leaq	.LC2(%rip), %rbp
	leaq	.LC0(%rip), %rbx
	movq	%fs:40, %rax
	movq	%rax, 80024(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %r13
	leaq	8(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%r12, %rsi
	xorl	%eax, %eax
	movq	%r13, %rdx
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %esi
	movl	%esi, %eax
	addl	12(%rsp), %eax
	je	.L15
	leaq	16(%rsp), %r15
	xorl	%r14d, %r14d
	testl	%esi, %esi
	jle	.L17
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r15, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r14d
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %esi
	addq	$4, %r15
	cmpl	%r14d, %esi
	jg	.L3
.L17:
	leal	-1(%rsi), %r11d
	testl	%r11d, %r11d
	jle	.L19
	movl	12(%rsp), %r10d
	movl	%r11d, %r14d
	leaq	20(%rsp), %r8
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movd	%r10d, %xmm5
	pshufd	$0, %xmm5, %xmm3
	.p2align 4,,10
	.p2align 3
.L14:
	addl	$1, %ecx
	leal	-1(%r14), %r9d
	cmpl	%esi, %ecx
	jge	.L5
	leal	-1(%r14), %r9d
	movl	-4(%r8), %edi
	cmpl	$2, %r9d
	jbe	.L20
	movl	%r14d, %eax
	movd	%edi, %xmm4
	pxor	%xmm1, %xmm1
	shrl	$2, %eax
	pshufd	$0, %xmm4, %xmm2
	subl	$1, %eax
	salq	$4, %rax
	leaq	16(%r8,%rax), %r15
	movq	%r8, %rax
	.p2align 4,,10
	.p2align 3
.L7:
	movdqu	(%rax), %xmm0
	addq	$16, %rax
	paddd	%xmm2, %xmm0
	pcmpgtd	%xmm3, %xmm0
	psubd	%xmm0, %xmm1
	cmpq	%rax, %r15
	jne	.L7
	movdqa	%xmm1, %xmm0
	movl	%r14d, %r15d
	psrldq	$8, %xmm0
	andl	$-4, %r15d
	paddd	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %eax
	addl	%eax, %edx
	leal	(%r15,%rcx), %eax
	cmpl	%r15d, %r14d
	je	.L5
.L6:
	movslq	%eax, %r14
	movl	16(%rsp,%r14,4), %r15d
	addl	%edi, %r15d
	cmpl	%r10d, %r15d
	setg	%r14b
	movzbl	%r14b, %r14d
	addl	%r14d, %edx
	leal	1(%rax), %r14d
	cmpl	%esi, %r14d
	jge	.L5
	movslq	%r14d, %r14
	movl	16(%rsp,%r14,4), %r15d
	addl	%edi, %r15d
	cmpl	%r15d, %r10d
	setl	%r14b
	addl	$2, %eax
	movzbl	%r14b, %r14d
	addl	%r14d, %edx
	cmpl	%esi, %eax
	jge	.L5
	cltq
	addl	16(%rsp,%rax,4), %edi
	xorl	%eax, %eax
	cmpl	%edi, %r10d
	setl	%al
	addl	%eax, %edx
.L5:
	movl	%r9d, %r14d
	addq	$4, %r8
	cmpl	%ecx, %r11d
	jne	.L14
.L4:
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
.L20:
	movl	%ecx, %eax
	jmp	.L6
.L15:
	movq	80024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L30
	addq	$80040, %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
.L19:
	.cfi_restore_state
	xorl	%edx, %edx
	jmp	.L4
.L30:
	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:
```