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( )
{
    int n , num[500] , i , j , sum= 0 , temp ;
    scanf("%d" , &n);
    
    for( i = 1 ; i <= n ; i++)
        scanf("%d" , &num[i] );
    
    for( i = 1 ; i <= n ; i++)
    {
        for( j = 1 ; j < n ; j++)
        {
            if( num[j] > num[j+1] )
            {
                temp = num[j] ;
                num[j] = num[j+1] ;
                num[j+1] = temp ;
            }
        }
    }
    
    for( i = 1 ; i < n ; i++)
        sum = sum + num[i] ;
    
    if( num[n] < sum)
        printf("Yes\n");
    else 
        printf("No\n");
    
    return 0;
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"Yes"
.LC2:
	.string	"No"
	.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	$2040, %rsp
	.cfi_def_cfa_offset 2080
	movq	%fs:40, %rax
	movq	%rax, 2024(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	12(%rsp), %rdi
	testl	%edi, %edi
	jle	.L16
	leaq	20(%rsp), %rbx
	movl	$1, %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
	movslq	12(%rsp), %rdi
	addq	$4, %r12
	cmpl	%ebp, %edi
	jge	.L3
	cmpl	$1, %edi
	jle	.L16
	leal	-2(%rdi), %eax
	leal	1(%rdi), %r9d
	movl	$1, %r8d
	movq	%rax, %r10
	leaq	24(%rsp,%rax,4), %rsi
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%rbx, %rdx
	.p2align 4,,10
	.p2align 3
.L6:
	movq	(%rdx), %xmm0
	pshufd	$0xe5, %xmm0, %xmm2
	movd	%xmm0, %eax
	movd	%xmm2, %ecx
	pshufd	$225, %xmm0, %xmm1
	cmpl	%eax, %ecx
	jge	.L5
	movq	%xmm1, (%rdx)
.L5:
	addq	$4, %rdx
	cmpq	%rsi, %rdx
	jne	.L6
	addl	$1, %r8d
	cmpl	%r9d, %r8d
	jne	.L4
	leal	-1(%rdi), %ecx
	cmpl	$2, %r10d
	jbe	.L25
	movl	%ecx, %eax
	pxor	%xmm0, %xmm0
	shrl	$2, %eax
	subl	$1, %eax
	salq	$4, %rax
	leaq	36(%rsp,%rax), %rax
	.p2align 4,,10
	.p2align 3
.L8:
	movdqu	(%rbx), %xmm3
	addq	$16, %rbx
	paddd	%xmm3, %xmm0
	cmpq	%rax, %rbx
	jne	.L8
	movdqa	%xmm0, %xmm1
	movl	%ecx, %esi
	psrldq	$8, %xmm1
	andl	$-4, %esi
	paddd	%xmm1, %xmm0
	leal	1(%rsi), %edx
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	cmpl	%esi, %ecx
	je	.L2
.L12:
	movslq	%edx, %rcx
	addl	16(%rsp,%rcx,4), %eax
	leal	1(%rdx), %ecx
	cmpl	%ecx, %edi
	jle	.L2
	movslq	%ecx, %rcx
	addl	$2, %edx
	addl	16(%rsp,%rcx,4), %eax
	cmpl	%edx, %edi
	jle	.L2
	movslq	%edx, %rdx
	addl	16(%rsp,%rdx,4), %eax
.L2:
	cmpl	%eax, 16(%rsp,%rdi,4)
	jge	.L10
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
.L11:
	movq	2024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L26
	addq	$2040, %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
.L10:
	.cfi_restore_state
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L11
.L16:
	xorl	%eax, %eax
	jmp	.L2
.L25:
	xorl	%eax, %eax
	movl	$1, %edx
	jmp	.L12
.L26:
	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	"Yes"
.LC2:
	.string	"No"
	.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	$2040, %rsp
	.cfi_def_cfa_offset 2080
	movq	%fs:40, %rax
	movq	%rax, 2024(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	12(%rsp), %rdi
	testl	%edi, %edi
	jle	.L16
	leaq	20(%rsp), %rbx
	movl	$1, %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
	movslq	12(%rsp), %rdi
	addq	$4, %r12
	cmpl	%ebp, %edi
	jge	.L3
	cmpl	$1, %edi
	jle	.L16
	leal	-2(%rdi), %eax
	leal	1(%rdi), %r9d
	movl	$1, %r8d
	movq	%rax, %r10
	leaq	24(%rsp,%rax,4), %rsi
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%rbx, %rdx
	.p2align 4,,10
	.p2align 3
.L6:
	movq	(%rdx), %xmm0
	pshufd	$0xe5, %xmm0, %xmm2
	movd	%xmm0, %eax
	movd	%xmm2, %ecx
	pshufd	$225, %xmm0, %xmm1
	cmpl	%eax, %ecx
	jge	.L5
	movq	%xmm1, (%rdx)
.L5:
	addq	$4, %rdx
	cmpq	%rsi, %rdx
	jne	.L6
	addl	$1, %r8d
	cmpl	%r9d, %r8d
	jne	.L4
	leal	-1(%rdi), %ecx
	cmpl	$2, %r10d
	jbe	.L25
	movl	%ecx, %eax
	pxor	%xmm0, %xmm0
	shrl	$2, %eax
	subl	$1, %eax
	salq	$4, %rax
	leaq	36(%rsp,%rax), %rax
	.p2align 4,,10
	.p2align 3
.L8:
	movdqu	(%rbx), %xmm3
	addq	$16, %rbx
	paddd	%xmm3, %xmm0
	cmpq	%rax, %rbx
	jne	.L8
	movdqa	%xmm0, %xmm1
	movl	%ecx, %esi
	psrldq	$8, %xmm1
	andl	$-4, %esi
	paddd	%xmm1, %xmm0
	leal	1(%rsi), %edx
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	cmpl	%esi, %ecx
	je	.L2
.L12:
	movslq	%edx, %rcx
	addl	16(%rsp,%rcx,4), %eax
	leal	1(%rdx), %ecx
	cmpl	%ecx, %edi
	jle	.L2
	movslq	%ecx, %rcx
	addl	$2, %edx
	addl	16(%rsp,%rcx,4), %eax
	cmpl	%edx, %edi
	jle	.L2
	movslq	%edx, %rdx
	addl	16(%rsp,%rdx,4), %eax
.L2:
	cmpl	%eax, 16(%rsp,%rdi,4)
	jge	.L10
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
.L11:
	movq	2024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L26
	addq	$2040, %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
.L10:
	.cfi_restore_state
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L11
.L16:
	xorl	%eax, %eax
	jmp	.L2
.L25:
	xorl	%eax, %eax
	movl	$1, %edx
	jmp	.L12
.L26:
	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	"Yes"
.LC2:
	.string	"No"
	.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	$2040, %rsp
	.cfi_def_cfa_offset 2080
	movq	%fs:40, %rax
	movq	%rax, 2024(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	12(%rsp), %rdi
	testl	%edi, %edi
	jle	.L16
	leaq	20(%rsp), %rbx
	movl	$1, %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
	movslq	12(%rsp), %rdi
	addq	$4, %r12
	cmpl	%ebp, %edi
	jge	.L3
	cmpl	$1, %edi
	jle	.L16
	leal	-2(%rdi), %eax
	leal	1(%rdi), %r9d
	movl	$1, %r8d
	movq	%rax, %r10
	leaq	24(%rsp,%rax,4), %rsi
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%rbx, %rdx
	.p2align 4,,10
	.p2align 3
.L6:
	movq	(%rdx), %xmm0
	pshufd	$0xe5, %xmm0, %xmm2
	movd	%xmm0, %eax
	movd	%xmm2, %ecx
	pshufd	$225, %xmm0, %xmm1
	cmpl	%eax, %ecx
	jge	.L5
	movq	%xmm1, (%rdx)
.L5:
	addq	$4, %rdx
	cmpq	%rsi, %rdx
	jne	.L6
	addl	$1, %r8d
	cmpl	%r9d, %r8d
	jne	.L4
	leal	-1(%rdi), %ecx
	cmpl	$2, %r10d
	jbe	.L25
	movl	%ecx, %eax
	pxor	%xmm0, %xmm0
	shrl	$2, %eax
	subl	$1, %eax
	salq	$4, %rax
	leaq	36(%rsp,%rax), %rax
	.p2align 4,,10
	.p2align 3
.L8:
	movdqu	(%rbx), %xmm3
	addq	$16, %rbx
	paddd	%xmm3, %xmm0
	cmpq	%rax, %rbx
	jne	.L8
	movdqa	%xmm0, %xmm1
	movl	%ecx, %esi
	psrldq	$8, %xmm1
	andl	$-4, %esi
	paddd	%xmm1, %xmm0
	leal	1(%rsi), %edx
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	cmpl	%esi, %ecx
	je	.L2
.L12:
	movslq	%edx, %rcx
	addl	16(%rsp,%rcx,4), %eax
	leal	1(%rdx), %ecx
	cmpl	%ecx, %edi
	jle	.L2
	movslq	%ecx, %rcx
	addl	$2, %edx
	addl	16(%rsp,%rcx,4), %eax
	cmpl	%edx, %edi
	jle	.L2
	movslq	%edx, %rdx
	addl	16(%rsp,%rdx,4), %eax
.L2:
	cmpl	%eax, 16(%rsp,%rdi,4)
	jge	.L10
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
.L11:
	movq	2024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L26
	addq	$2040, %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
.L10:
	.cfi_restore_state
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L11
.L16:
	xorl	%eax, %eax
	jmp	.L2
.L25:
	xorl	%eax, %eax
	movl	$1, %edx
	jmp	.L12
.L26:
	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( )
{
    int n , num[500] , i , j , sum= 0 , temp ;
    scanf("%d" , &n);
    
    for( i = 1 ; i <= n ; i++)
        scanf("%d" , &num[i] );
    
    for( i = 1 ; i <= n ; i++)
    {
        for( j = 1 ; j < n ; j++)
        {
            if( num[j] > num[j+1] )
            {
                temp = num[j] ;
                num[j] = num[j+1] ;
                num[j+1] = temp ;
            }
        }
    }
    
    for( i = 1 ; i < n ; i++)
        sum = sum + num[i] ;
    
    if( num[n] < sum)
        printf("Yes\n");
    else 
        printf("No\n");
    
    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( )
{
    int n , num[500] , i , j , sum= 0 , temp ;
    scanf("%d" , &n);
    
    for( i = 1 ; i <= n ; i++)
        scanf("%d" , &num[i] );
    
    for( i = 1 ; i <= n ; i++)
    {
        for( j = 1 ; j < n ; j++)
        {
            if( num[j] > num[j+1] )
            {
                temp = num[j] ;
                num[j] = num[j+1] ;
                num[j+1] = temp ;
            }
        }
    }
    
    for( i = 1 ; i < n ; i++)
        sum = sum + num[i] ;
    
    if( num[n] < sum)
        printf("Yes\n");
    else 
        printf("No\n");
    
    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
3 5 5 1
 10
1 0 10 5 8 12 34 100 11 3
 4
3 3 4 1
 4
3 5 6 1
 4
4 3 4 1
 10
1 0 10 10 8 12 34 100 11 3
 4
3 5 0 1
 4
4 1 4 1
 10
1 0 10 10 8 12 34 110 11 3
 4
3 5 0 0

Yes
 No
 Yes
 Yes
 Yes
 No
 No
 Yes
 No
 No

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( )
{
    int n , num[500] , i , j , sum= 0 , temp ;
    scanf("%d" , &n);
    
    for( i = 1 ; i <= n ; i++)
        scanf("%d" , &num[i] );
    
    for( i = 1 ; i <= n ; i++)
    {
        for( j = 1 ; j < n ; j++)
        {
            if( num[j] > num[j+1] )
            {
                temp = num[j] ;
                num[j] = num[j+1] ;
                num[j+1] = temp ;
            }
        }
    }
    
    for( i = 1 ; i < n ; i++)
        sum = sum + num[i] ;
    
    if( num[n] < sum)
        printf("Yes\n");
    else 
        printf("No\n");
    
    return 0;
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"Yes"
.LC2:
	.string	"No"
	.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	$2040, %rsp
	.cfi_def_cfa_offset 2080
	movq	%fs:40, %rax
	movq	%rax, 2024(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	12(%rsp), %rdi
	testl	%edi, %edi
	jle	.L16
	leaq	20(%rsp), %rbx
	movl	$1, %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
	movslq	12(%rsp), %rdi
	addq	$4, %r12
	cmpl	%ebp, %edi
	jge	.L3
	cmpl	$1, %edi
	jle	.L16
	leal	-2(%rdi), %eax
	leal	1(%rdi), %r9d
	movl	$1, %r8d
	movq	%rax, %r10
	leaq	24(%rsp,%rax,4), %rsi
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%rbx, %rdx
	.p2align 4,,10
	.p2align 3
.L6:
	movq	(%rdx), %xmm0
	pshufd	$0xe5, %xmm0, %xmm2
	movd	%xmm0, %eax
	movd	%xmm2, %ecx
	pshufd	$225, %xmm0, %xmm1
	cmpl	%eax, %ecx
	jge	.L5
	movq	%xmm1, (%rdx)
.L5:
	addq	$4, %rdx
	cmpq	%rsi, %rdx
	jne	.L6
	addl	$1, %r8d
	cmpl	%r9d, %r8d
	jne	.L4
	leal	-1(%rdi), %ecx
	cmpl	$2, %r10d
	jbe	.L25
	movl	%ecx, %eax
	pxor	%xmm0, %xmm0
	shrl	$2, %eax
	subl	$1, %eax
	salq	$4, %rax
	leaq	36(%rsp,%rax), %rax
	.p2align 4,,10
	.p2align 3
.L8:
	movdqu	(%rbx), %xmm3
	addq	$16, %rbx
	paddd	%xmm3, %xmm0
	cmpq	%rax, %rbx
	jne	.L8
	movdqa	%xmm0, %xmm1
	movl	%ecx, %esi
	psrldq	$8, %xmm1
	andl	$-4, %esi
	paddd	%xmm1, %xmm0
	leal	1(%rsi), %edx
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	cmpl	%esi, %ecx
	je	.L2
.L12:
	movslq	%edx, %rcx
	addl	16(%rsp,%rcx,4), %eax
	leal	1(%rdx), %ecx
	cmpl	%ecx, %edi
	jle	.L2
	movslq	%ecx, %rcx
	addl	$2, %edx
	addl	16(%rsp,%rcx,4), %eax
	cmpl	%edx, %edi
	jle	.L2
	movslq	%edx, %rdx
	addl	16(%rsp,%rdx,4), %eax
.L2:
	cmpl	%eax, 16(%rsp,%rdi,4)
	jge	.L10
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
.L11:
	movq	2024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L26
	addq	$2040, %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
.L10:
	.cfi_restore_state
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L11
.L16:
	xorl	%eax, %eax
	jmp	.L2
.L25:
	xorl	%eax, %eax
	movl	$1, %edx
	jmp	.L12
.L26:
	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	"Yes"
.LC2:
	.string	"No"
	.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	$2040, %rsp
	.cfi_def_cfa_offset 2080
	movq	%fs:40, %rax
	movq	%rax, 2024(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	12(%rsp), %rdi
	testl	%edi, %edi
	jle	.L16
	leaq	20(%rsp), %rbx
	movl	$1, %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
	movslq	12(%rsp), %rdi
	addq	$4, %r12
	cmpl	%ebp, %edi
	jge	.L3
	cmpl	$1, %edi
	jle	.L16
	leal	-2(%rdi), %eax
	leal	1(%rdi), %r9d
	movl	$1, %r8d
	movq	%rax, %r10
	leaq	24(%rsp,%rax,4), %rsi
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%rbx, %rdx
	.p2align 4,,10
	.p2align 3
.L6:
	movq	(%rdx), %xmm0
	pshufd	$0xe5, %xmm0, %xmm2
	movd	%xmm0, %eax
	movd	%xmm2, %ecx
	pshufd	$225, %xmm0, %xmm1
	cmpl	%eax, %ecx
	jge	.L5
	movq	%xmm1, (%rdx)
.L5:
	addq	$4, %rdx
	cmpq	%rsi, %rdx
	jne	.L6
	addl	$1, %r8d
	cmpl	%r9d, %r8d
	jne	.L4
	leal	-1(%rdi), %ecx
	cmpl	$2, %r10d
	jbe	.L25
	movl	%ecx, %eax
	pxor	%xmm0, %xmm0
	shrl	$2, %eax
	subl	$1, %eax
	salq	$4, %rax
	leaq	36(%rsp,%rax), %rax
	.p2align 4,,10
	.p2align 3
.L8:
	movdqu	(%rbx), %xmm3
	addq	$16, %rbx
	paddd	%xmm3, %xmm0
	cmpq	%rax, %rbx
	jne	.L8
	movdqa	%xmm0, %xmm1
	movl	%ecx, %esi
	psrldq	$8, %xmm1
	andl	$-4, %esi
	paddd	%xmm1, %xmm0
	leal	1(%rsi), %edx
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	cmpl	%esi, %ecx
	je	.L2
.L12:
	movslq	%edx, %rcx
	addl	16(%rsp,%rcx,4), %eax
	leal	1(%rdx), %ecx
	cmpl	%ecx, %edi
	jle	.L2
	movslq	%ecx, %rcx
	addl	$2, %edx
	addl	16(%rsp,%rcx,4), %eax
	cmpl	%edx, %edi
	jle	.L2
	movslq	%edx, %rdx
	addl	16(%rsp,%rdx,4), %eax
.L2:
	cmpl	%eax, 16(%rsp,%rdi,4)
	jge	.L10
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
.L11:
	movq	2024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L26
	addq	$2040, %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
.L10:
	.cfi_restore_state
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L11
.L16:
	xorl	%eax, %eax
	jmp	.L2
.L25:
	xorl	%eax, %eax
	movl	$1, %edx
	jmp	.L12
.L26:
	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:
```