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, max, sum = 0;
  scanf("%d", &n);
  
  int x[n];
  for(int i = 0; i < n; i++) {
    scanf("%d", &x[i]);
  }
  
  max = x[0];
  for(int i = 0; i < n; i++) {
    if(max < x[i]) {
      max = x[i];
    }
    sum += x[i];
  }
  
  if(max < sum-max) {
    printf("Yes");
  } else {
    printf("No");
  }
}
```

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	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	leaq	.LC0(%rip), %r14
	leaq	-60(%rbp), %rsi
	pushq	%r13
	movq	%r14, %rdi
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.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, %rsi
	movq	%rax, %rcx
	leaq	15(,%rax,4), %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	subq	%rax, %rsi
	andq	$-16, %rdx
	cmpq	%rsi, %rsp
	je	.L3
.L25:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L25
.L3:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L26
.L4:
	leaq	3(%rsp), %r13
	movq	%r13, %rax
	andq	$-4, %r13
	shrq	$2, %rax
	movq	%rax, -72(%rbp)
	testl	%ecx, %ecx
	jle	.L5
	movq	%r13, %r15
	movq	%r13, %r12
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r12, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	-60(%rbp), %ecx
	addq	$4, %r12
	cmpl	%ebx, %ecx
	jg	.L6
	movq	-72(%rbp), %rax
	movl	0(,%rax,4), %eax
	testl	%ecx, %ecx
	jle	.L15
	leal	-1(%rcx), %esi
	cmpl	$2, %esi
	jbe	.L16
	movd	%eax, %xmm4
	movl	%ecx, %eax
	pxor	%xmm2, %xmm2
	shrl	$2, %eax
	pshufd	$0, %xmm4, %xmm0
	salq	$4, %rax
	addq	%r13, %rax
	.p2align 4,,10
	.p2align 3
.L9:
	movdqu	(%r15), %xmm3
	movdqa	%xmm0, %xmm1
	addq	$16, %r15
	pcmpgtd	%xmm3, %xmm1
	paddd	%xmm3, %xmm2
	pand	%xmm1, %xmm0
	pandn	%xmm3, %xmm1
	por	%xmm1, %xmm0
	cmpq	%r15, %rax
	jne	.L9
	movdqa	%xmm2, %xmm1
	movl	%ecx, %esi
	psrldq	$8, %xmm1
	andl	$-4, %esi
	paddd	%xmm1, %xmm2
	movdqa	%xmm2, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm2
	movd	%xmm2, %edx
	movdqa	%xmm0, %xmm2
	psrldq	$8, %xmm2
	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, %eax
	testb	$3, %cl
	je	.L7
.L8:
	movslq	%esi, %rdi
	leaq	0(%r13,%rdi,4), %r8
	movl	(%r8), %edi
	cmpl	%edi, %eax
	cmovl	%edi, %eax
	addl	%edi, %edx
	leal	1(%rsi), %edi
	cmpl	%edi, %ecx
	jle	.L7
	movl	4(%r8), %edi
	cmpl	%edi, %eax
	cmovl	%edi, %eax
	addl	$2, %esi
	addl	%edi, %edx
	cmpl	%esi, %ecx
	jle	.L7
	movl	8(%r8), %ecx
	cmpl	%ecx, %eax
	cmovl	%ecx, %eax
	addl	%ecx, %edx
.L7:
	subl	%eax, %edx
	cmpl	%eax, %edx
	jle	.L12
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L13:
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L27
	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
.L12:
	.cfi_restore_state
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L13
.L26:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L4
.L5:
	movq	-72(%rbp), %rax
	xorl	%edx, %edx
	movl	0(,%rax,4), %eax
	jmp	.L7
.L16:
	xorl	%esi, %esi
	xorl	%edx, %edx
	jmp	.L8
.L15:
	xorl	%edx, %edx
	jmp	.L7
.L27:
	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	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	leaq	.LC0(%rip), %r14
	leaq	-60(%rbp), %rsi
	pushq	%r13
	movq	%r14, %rdi
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.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, %rsi
	movq	%rax, %rcx
	leaq	15(,%rax,4), %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	subq	%rax, %rsi
	andq	$-16, %rdx
	cmpq	%rsi, %rsp
	je	.L3
.L25:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L25
.L3:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L26
.L4:
	leaq	3(%rsp), %r13
	movq	%r13, %rax
	andq	$-4, %r13
	shrq	$2, %rax
	movq	%rax, -72(%rbp)
	testl	%ecx, %ecx
	jle	.L5
	movq	%r13, %r15
	movq	%r13, %r12
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r12, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	-60(%rbp), %ecx
	addq	$4, %r12
	cmpl	%ebx, %ecx
	jg	.L6
	movq	-72(%rbp), %rax
	movl	0(,%rax,4), %eax
	testl	%ecx, %ecx
	jle	.L15
	leal	-1(%rcx), %esi
	cmpl	$2, %esi
	jbe	.L16
	movd	%eax, %xmm4
	movl	%ecx, %eax
	pxor	%xmm2, %xmm2
	shrl	$2, %eax
	pshufd	$0, %xmm4, %xmm0
	salq	$4, %rax
	addq	%r13, %rax
	.p2align 4,,10
	.p2align 3
.L9:
	movdqu	(%r15), %xmm3
	movdqa	%xmm0, %xmm1
	addq	$16, %r15
	pcmpgtd	%xmm3, %xmm1
	paddd	%xmm3, %xmm2
	pand	%xmm1, %xmm0
	pandn	%xmm3, %xmm1
	por	%xmm1, %xmm0
	cmpq	%r15, %rax
	jne	.L9
	movdqa	%xmm2, %xmm1
	movl	%ecx, %esi
	psrldq	$8, %xmm1
	andl	$-4, %esi
	paddd	%xmm1, %xmm2
	movdqa	%xmm2, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm2
	movd	%xmm2, %edx
	movdqa	%xmm0, %xmm2
	psrldq	$8, %xmm2
	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, %eax
	testb	$3, %cl
	je	.L7
.L8:
	movslq	%esi, %rdi
	leaq	0(%r13,%rdi,4), %r8
	movl	(%r8), %edi
	cmpl	%edi, %eax
	cmovl	%edi, %eax
	addl	%edi, %edx
	leal	1(%rsi), %edi
	cmpl	%edi, %ecx
	jle	.L7
	movl	4(%r8), %edi
	cmpl	%edi, %eax
	cmovl	%edi, %eax
	addl	$2, %esi
	addl	%edi, %edx
	cmpl	%esi, %ecx
	jle	.L7
	movl	8(%r8), %ecx
	cmpl	%ecx, %eax
	cmovl	%ecx, %eax
	addl	%ecx, %edx
.L7:
	subl	%eax, %edx
	cmpl	%eax, %edx
	jle	.L12
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L13:
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L27
	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
.L12:
	.cfi_restore_state
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L13
.L26:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L4
.L5:
	movq	-72(%rbp), %rax
	xorl	%edx, %edx
	movl	0(,%rax,4), %eax
	jmp	.L7
.L16:
	xorl	%esi, %esi
	xorl	%edx, %edx
	jmp	.L8
.L15:
	xorl	%edx, %edx
	jmp	.L7
.L27:
	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	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	leaq	.LC0(%rip), %r14
	leaq	-60(%rbp), %rsi
	pushq	%r13
	movq	%r14, %rdi
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.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, %rsi
	movq	%rax, %rcx
	leaq	15(,%rax,4), %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	subq	%rax, %rsi
	andq	$-16, %rdx
	cmpq	%rsi, %rsp
	je	.L3
.L25:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L25
.L3:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L26
.L4:
	leaq	3(%rsp), %r13
	movq	%r13, %rax
	andq	$-4, %r13
	shrq	$2, %rax
	movq	%rax, -72(%rbp)
	testl	%ecx, %ecx
	jle	.L5
	movq	%r13, %r15
	movq	%r13, %r12
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r12, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	-60(%rbp), %ecx
	addq	$4, %r12
	cmpl	%ebx, %ecx
	jg	.L6
	movq	-72(%rbp), %rax
	movl	0(,%rax,4), %eax
	testl	%ecx, %ecx
	jle	.L15
	leal	-1(%rcx), %esi
	cmpl	$2, %esi
	jbe	.L16
	movd	%eax, %xmm4
	movl	%ecx, %eax
	pxor	%xmm2, %xmm2
	shrl	$2, %eax
	pshufd	$0, %xmm4, %xmm0
	salq	$4, %rax
	addq	%r13, %rax
	.p2align 4,,10
	.p2align 3
.L9:
	movdqu	(%r15), %xmm3
	movdqa	%xmm0, %xmm1
	addq	$16, %r15
	pcmpgtd	%xmm3, %xmm1
	paddd	%xmm3, %xmm2
	pand	%xmm1, %xmm0
	pandn	%xmm3, %xmm1
	por	%xmm1, %xmm0
	cmpq	%r15, %rax
	jne	.L9
	movdqa	%xmm2, %xmm1
	movl	%ecx, %esi
	psrldq	$8, %xmm1
	andl	$-4, %esi
	paddd	%xmm1, %xmm2
	movdqa	%xmm2, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm2
	movd	%xmm2, %edx
	movdqa	%xmm0, %xmm2
	psrldq	$8, %xmm2
	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, %eax
	testb	$3, %cl
	je	.L7
.L8:
	movslq	%esi, %rdi
	leaq	0(%r13,%rdi,4), %r8
	movl	(%r8), %edi
	cmpl	%edi, %eax
	cmovl	%edi, %eax
	addl	%edi, %edx
	leal	1(%rsi), %edi
	cmpl	%edi, %ecx
	jle	.L7
	movl	4(%r8), %edi
	cmpl	%edi, %eax
	cmovl	%edi, %eax
	addl	$2, %esi
	addl	%edi, %edx
	cmpl	%esi, %ecx
	jle	.L7
	movl	8(%r8), %ecx
	cmpl	%ecx, %eax
	cmovl	%ecx, %eax
	addl	%ecx, %edx
.L7:
	subl	%eax, %edx
	cmpl	%eax, %edx
	jle	.L12
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L13:
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L27
	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
.L12:
	.cfi_restore_state
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L13
.L26:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L4
.L5:
	movq	-72(%rbp), %rax
	xorl	%edx, %edx
	movl	0(,%rax,4), %eax
	jmp	.L7
.L16:
	xorl	%esi, %esi
	xorl	%edx, %edx
	jmp	.L8
.L15:
	xorl	%edx, %edx
	jmp	.L7
.L27:
	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, max, sum = 0;
  scanf("%d", &n);
  
  int x[n];
  for(int i = 0; i < n; i++) {
    scanf("%d", &x[i]);
  }
  
  max = x[0];
  for(int i = 0; i < n; i++) {
    if(max < x[i]) {
      max = x[i];
    }
    sum += x[i];
  }
  
  if(max < sum-max) {
    printf("Yes");
  } else {
    printf("No");
  }
}
```
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, max, sum = 0;
  scanf("%d", &n);
  
  int x[n];
  for(int i = 0; i < n; i++) {
    scanf("%d", &x[i]);
  }
  
  max = x[0];
  for(int i = 0; i < n; i++) {
    if(max < x[i]) {
      max = x[i];
    }
    sum += x[i];
  }
  
  if(max < sum-max) {
    printf("Yes");
  } else {
    printf("No");
  }
}
```

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, max, sum = 0;
  scanf("%d", &n);
  
  int x[n];
  for(int i = 0; i < n; i++) {
    scanf("%d", &x[i]);
  }
  
  max = x[0];
  for(int i = 0; i < n; i++) {
    if(max < x[i]) {
      max = x[i];
    }
    sum += x[i];
  }
  
  if(max < sum-max) {
    printf("Yes");
  } else {
    printf("No");
  }
}
```

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	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	leaq	.LC0(%rip), %r14
	leaq	-60(%rbp), %rsi
	pushq	%r13
	movq	%r14, %rdi
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.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, %rsi
	movq	%rax, %rcx
	leaq	15(,%rax,4), %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	subq	%rax, %rsi
	andq	$-16, %rdx
	cmpq	%rsi, %rsp
	je	.L3
.L25:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L25
.L3:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L26
.L4:
	leaq	3(%rsp), %r13
	movq	%r13, %rax
	andq	$-4, %r13
	shrq	$2, %rax
	movq	%rax, -72(%rbp)
	testl	%ecx, %ecx
	jle	.L5
	movq	%r13, %r15
	movq	%r13, %r12
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r12, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	-60(%rbp), %ecx
	addq	$4, %r12
	cmpl	%ebx, %ecx
	jg	.L6
	movq	-72(%rbp), %rax
	movl	0(,%rax,4), %eax
	testl	%ecx, %ecx
	jle	.L15
	leal	-1(%rcx), %esi
	cmpl	$2, %esi
	jbe	.L16
	movd	%eax, %xmm4
	movl	%ecx, %eax
	pxor	%xmm2, %xmm2
	shrl	$2, %eax
	pshufd	$0, %xmm4, %xmm0
	salq	$4, %rax
	addq	%r13, %rax
	.p2align 4,,10
	.p2align 3
.L9:
	movdqu	(%r15), %xmm3
	movdqa	%xmm0, %xmm1
	addq	$16, %r15
	pcmpgtd	%xmm3, %xmm1
	paddd	%xmm3, %xmm2
	pand	%xmm1, %xmm0
	pandn	%xmm3, %xmm1
	por	%xmm1, %xmm0
	cmpq	%r15, %rax
	jne	.L9
	movdqa	%xmm2, %xmm1
	movl	%ecx, %esi
	psrldq	$8, %xmm1
	andl	$-4, %esi
	paddd	%xmm1, %xmm2
	movdqa	%xmm2, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm2
	movd	%xmm2, %edx
	movdqa	%xmm0, %xmm2
	psrldq	$8, %xmm2
	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, %eax
	testb	$3, %cl
	je	.L7
.L8:
	movslq	%esi, %rdi
	leaq	0(%r13,%rdi,4), %r8
	movl	(%r8), %edi
	cmpl	%edi, %eax
	cmovl	%edi, %eax
	addl	%edi, %edx
	leal	1(%rsi), %edi
	cmpl	%edi, %ecx
	jle	.L7
	movl	4(%r8), %edi
	cmpl	%edi, %eax
	cmovl	%edi, %eax
	addl	$2, %esi
	addl	%edi, %edx
	cmpl	%esi, %ecx
	jle	.L7
	movl	8(%r8), %ecx
	cmpl	%ecx, %eax
	cmovl	%ecx, %eax
	addl	%ecx, %edx
.L7:
	subl	%eax, %edx
	cmpl	%eax, %edx
	jle	.L12
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L13:
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L27
	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
.L12:
	.cfi_restore_state
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L13
.L26:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L4
.L5:
	movq	-72(%rbp), %rax
	xorl	%edx, %edx
	movl	0(,%rax,4), %eax
	jmp	.L7
.L16:
	xorl	%esi, %esi
	xorl	%edx, %edx
	jmp	.L8
.L15:
	xorl	%edx, %edx
	jmp	.L7
.L27:
	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	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	leaq	.LC0(%rip), %r14
	leaq	-60(%rbp), %rsi
	pushq	%r13
	movq	%r14, %rdi
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.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, %rsi
	movq	%rax, %rcx
	leaq	15(,%rax,4), %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	subq	%rax, %rsi
	andq	$-16, %rdx
	cmpq	%rsi, %rsp
	je	.L3
.L25:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L25
.L3:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L26
.L4:
	leaq	3(%rsp), %r13
	movq	%r13, %rax
	andq	$-4, %r13
	shrq	$2, %rax
	movq	%rax, -72(%rbp)
	testl	%ecx, %ecx
	jle	.L5
	movq	%r13, %r15
	movq	%r13, %r12
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r12, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	-60(%rbp), %ecx
	addq	$4, %r12
	cmpl	%ebx, %ecx
	jg	.L6
	movq	-72(%rbp), %rax
	movl	0(,%rax,4), %eax
	testl	%ecx, %ecx
	jle	.L15
	leal	-1(%rcx), %esi
	cmpl	$2, %esi
	jbe	.L16
	movd	%eax, %xmm4
	movl	%ecx, %eax
	pxor	%xmm2, %xmm2
	shrl	$2, %eax
	pshufd	$0, %xmm4, %xmm0
	salq	$4, %rax
	addq	%r13, %rax
	.p2align 4,,10
	.p2align 3
.L9:
	movdqu	(%r15), %xmm3
	movdqa	%xmm0, %xmm1
	addq	$16, %r15
	pcmpgtd	%xmm3, %xmm1
	paddd	%xmm3, %xmm2
	pand	%xmm1, %xmm0
	pandn	%xmm3, %xmm1
	por	%xmm1, %xmm0
	cmpq	%r15, %rax
	jne	.L9
	movdqa	%xmm2, %xmm1
	movl	%ecx, %esi
	psrldq	$8, %xmm1
	andl	$-4, %esi
	paddd	%xmm1, %xmm2
	movdqa	%xmm2, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm2
	movd	%xmm2, %edx
	movdqa	%xmm0, %xmm2
	psrldq	$8, %xmm2
	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, %eax
	testb	$3, %cl
	je	.L7
.L8:
	movslq	%esi, %rdi
	leaq	0(%r13,%rdi,4), %r8
	movl	(%r8), %edi
	cmpl	%edi, %eax
	cmovl	%edi, %eax
	addl	%edi, %edx
	leal	1(%rsi), %edi
	cmpl	%edi, %ecx
	jle	.L7
	movl	4(%r8), %edi
	cmpl	%edi, %eax
	cmovl	%edi, %eax
	addl	$2, %esi
	addl	%edi, %edx
	cmpl	%esi, %ecx
	jle	.L7
	movl	8(%r8), %ecx
	cmpl	%ecx, %eax
	cmovl	%ecx, %eax
	addl	%ecx, %edx
.L7:
	subl	%eax, %edx
	cmpl	%eax, %edx
	jle	.L12
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L13:
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L27
	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
.L12:
	.cfi_restore_state
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L13
.L26:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L4
.L5:
	movq	-72(%rbp), %rax
	xorl	%edx, %edx
	movl	0(,%rax,4), %eax
	jmp	.L7
.L16:
	xorl	%esi, %esi
	xorl	%edx, %edx
	jmp	.L8
.L15:
	xorl	%edx, %edx
	jmp	.L7
.L27:
	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:
```