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,p[100],i,j,x;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d",&p[i]);
	}
	for(i=0;;i++){
		x=0;
		for(j=0;j<n;j++){
			if(p[j]>=i){
				x++;
			}
		}
		if(x<i){
			break;
		}
	}
	printf("%d\n",i-1);
	return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.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
	xorl	%ebp, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$440, %rsp
	.cfi_def_cfa_offset 480
	movq	%fs:40, %rax
	movq	%rax, 424(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	leaq	16(%rsp), %rbx
	movq	%rbx, %r12
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %esi
	testl	%esi, %esi
	jle	.L2
	.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), %esi
	addq	$4, %r12
	cmpl	%ebp, %esi
	jg	.L3
.L2:
	movl	%esi, %eax
	movl	%esi, %r9d
	leal	-1(%rsi), %r10d
	xorl	%edx, %edx
	shrl	$2, %eax
	andl	$-4, %r9d
	pxor	%xmm3, %xmm3
	subl	$1, %eax
	salq	$4, %rax
	leaq	32(%rsp,%rax), %rdi
	testl	%esi, %esi
	jle	.L16
	.p2align 4,,10
	.p2align 3
.L24:
	cmpl	$2, %r10d
	jbe	.L17
	movd	%edx, %xmm4
	movq	%rbx, %rax
	pxor	%xmm0, %xmm0
	pshufd	$0, %xmm4, %xmm2
	.p2align 4,,10
	.p2align 3
.L6:
	movdqa	%xmm2, %xmm1
	addq	$16, %rax
	pcmpgtd	-16(%rax), %xmm1
	pcmpeqd	%xmm3, %xmm1
	psubd	%xmm1, %xmm0
	cmpq	%rax, %rdi
	jne	.L6
	movdqa	%xmm0, %xmm1
	movl	%r9d, %ecx
	psrldq	$8, %xmm1
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	cmpl	%r9d, %esi
	je	.L4
.L5:
	movslq	%ecx, %r8
	cmpl	16(%rsp,%r8,4), %edx
	jg	.L9
	addl	$1, %eax
.L9:
	leal	1(%rcx), %r8d
	cmpl	%esi, %r8d
	jge	.L4
	movslq	%r8d, %r8
	cmpl	16(%rsp,%r8,4), %edx
	jg	.L10
	addl	$1, %eax
.L10:
	addl	$2, %ecx
	cmpl	%ecx, %esi
	jle	.L4
	movslq	%ecx, %rcx
	cmpl	16(%rsp,%rcx,4), %edx
	jg	.L4
	addl	$1, %eax
.L4:
	cmpl	%eax, %edx
	jg	.L13
.L25:
	addl	$1, %edx
	testl	%esi, %esi
	jg	.L24
.L16:
	xorl	%eax, %eax
	cmpl	%eax, %edx
	jle	.L25
	.p2align 4,,10
	.p2align 3
.L13:
	subl	$1, %edx
	xorl	%eax, %eax
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L26
	addq	$440, %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
.L17:
	.cfi_restore_state
	xorl	%eax, %eax
	xorl	%ecx, %ecx
	jmp	.L5
.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	"%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
	xorl	%ebp, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$440, %rsp
	.cfi_def_cfa_offset 480
	movq	%fs:40, %rax
	movq	%rax, 424(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	leaq	16(%rsp), %rbx
	movq	%rbx, %r12
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %esi
	testl	%esi, %esi
	jle	.L2
	.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), %esi
	addq	$4, %r12
	cmpl	%ebp, %esi
	jg	.L3
.L2:
	movl	%esi, %eax
	movl	%esi, %r9d
	leal	-1(%rsi), %r10d
	xorl	%edx, %edx
	shrl	$2, %eax
	andl	$-4, %r9d
	pxor	%xmm3, %xmm3
	subl	$1, %eax
	salq	$4, %rax
	leaq	32(%rsp,%rax), %rdi
	testl	%esi, %esi
	jle	.L16
	.p2align 4,,10
	.p2align 3
.L24:
	cmpl	$2, %r10d
	jbe	.L17
	movd	%edx, %xmm4
	movq	%rbx, %rax
	pxor	%xmm0, %xmm0
	pshufd	$0, %xmm4, %xmm2
	.p2align 4,,10
	.p2align 3
.L6:
	movdqa	%xmm2, %xmm1
	addq	$16, %rax
	pcmpgtd	-16(%rax), %xmm1
	pcmpeqd	%xmm3, %xmm1
	psubd	%xmm1, %xmm0
	cmpq	%rax, %rdi
	jne	.L6
	movdqa	%xmm0, %xmm1
	movl	%r9d, %ecx
	psrldq	$8, %xmm1
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	cmpl	%r9d, %esi
	je	.L4
.L5:
	movslq	%ecx, %r8
	cmpl	16(%rsp,%r8,4), %edx
	jg	.L9
	addl	$1, %eax
.L9:
	leal	1(%rcx), %r8d
	cmpl	%esi, %r8d
	jge	.L4
	movslq	%r8d, %r8
	cmpl	16(%rsp,%r8,4), %edx
	jg	.L10
	addl	$1, %eax
.L10:
	addl	$2, %ecx
	cmpl	%ecx, %esi
	jle	.L4
	movslq	%ecx, %rcx
	cmpl	16(%rsp,%rcx,4), %edx
	jg	.L4
	addl	$1, %eax
.L4:
	cmpl	%eax, %edx
	jg	.L13
.L25:
	addl	$1, %edx
	testl	%esi, %esi
	jg	.L24
.L16:
	xorl	%eax, %eax
	cmpl	%eax, %edx
	jle	.L25
	.p2align 4,,10
	.p2align 3
.L13:
	subl	$1, %edx
	xorl	%eax, %eax
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L26
	addq	$440, %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
.L17:
	.cfi_restore_state
	xorl	%eax, %eax
	xorl	%ecx, %ecx
	jmp	.L5
.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	"%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
	xorl	%ebp, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$440, %rsp
	.cfi_def_cfa_offset 480
	movq	%fs:40, %rax
	movq	%rax, 424(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	leaq	16(%rsp), %rbx
	movq	%rbx, %r12
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %esi
	testl	%esi, %esi
	jle	.L2
	.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), %esi
	addq	$4, %r12
	cmpl	%ebp, %esi
	jg	.L3
.L2:
	movl	%esi, %eax
	movl	%esi, %r9d
	leal	-1(%rsi), %r10d
	xorl	%edx, %edx
	shrl	$2, %eax
	andl	$-4, %r9d
	pxor	%xmm3, %xmm3
	subl	$1, %eax
	salq	$4, %rax
	leaq	32(%rsp,%rax), %rdi
	testl	%esi, %esi
	jle	.L16
	.p2align 4,,10
	.p2align 3
.L24:
	cmpl	$2, %r10d
	jbe	.L17
	movd	%edx, %xmm4
	movq	%rbx, %rax
	pxor	%xmm0, %xmm0
	pshufd	$0, %xmm4, %xmm2
	.p2align 4,,10
	.p2align 3
.L6:
	movdqa	%xmm2, %xmm1
	addq	$16, %rax
	pcmpgtd	-16(%rax), %xmm1
	pcmpeqd	%xmm3, %xmm1
	psubd	%xmm1, %xmm0
	cmpq	%rax, %rdi
	jne	.L6
	movdqa	%xmm0, %xmm1
	movl	%r9d, %ecx
	psrldq	$8, %xmm1
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	cmpl	%r9d, %esi
	je	.L4
.L5:
	movslq	%ecx, %r8
	cmpl	16(%rsp,%r8,4), %edx
	jg	.L9
	addl	$1, %eax
.L9:
	leal	1(%rcx), %r8d
	cmpl	%esi, %r8d
	jge	.L4
	movslq	%r8d, %r8
	cmpl	16(%rsp,%r8,4), %edx
	jg	.L10
	addl	$1, %eax
.L10:
	addl	$2, %ecx
	cmpl	%ecx, %esi
	jle	.L4
	movslq	%ecx, %rcx
	cmpl	16(%rsp,%rcx,4), %edx
	jg	.L4
	addl	$1, %eax
.L4:
	cmpl	%eax, %edx
	jg	.L13
.L25:
	addl	$1, %edx
	testl	%esi, %esi
	jg	.L24
.L16:
	xorl	%eax, %eax
	cmpl	%eax, %edx
	jle	.L25
	.p2align 4,,10
	.p2align 3
.L13:
	subl	$1, %edx
	xorl	%eax, %eax
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L26
	addq	$440, %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
.L17:
	.cfi_restore_state
	xorl	%eax, %eax
	xorl	%ecx, %ecx
	jmp	.L5
.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(void)
{
	int n,p[100],i,j,x;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d",&p[i]);
	}
	for(i=0;;i++){
		x=0;
		for(j=0;j<n;j++){
			if(p[j]>=i){
				x++;
			}
		}
		if(x<i){
			break;
		}
	}
	printf("%d\n",i-1);
	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,p[100],i,j,x;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d",&p[i]);
	}
	for(i=0;;i++){
		x=0;
		for(j=0;j<n;j++){
			if(p[j]>=i){
				x++;
			}
		}
		if(x<i){
			break;
		}
	}
	printf("%d\n",i-1);
	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:

7
5 4 3 14 2 4 1
 3
1 0 100
 3
2 0 100
 7
0 1 5 37 2 4 1
 7
5 4 3 14 2 7 1
 7
5 4 2 14 2 7 1
 7
5 4 4 14 2 7 1
 7
5 4 4 14 1 7 1
 7
10 4 4 14 1 7 1
 7
10 4 4 14 1 7 2

4
 1
 2
 3
 4
 4
 4
 4
 4
 4

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,p[100],i,j,x;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d",&p[i]);
	}
	for(i=0;;i++){
		x=0;
		for(j=0;j<n;j++){
			if(p[j]>=i){
				x++;
			}
		}
		if(x<i){
			break;
		}
	}
	printf("%d\n",i-1);
	return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.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
	xorl	%ebp, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$440, %rsp
	.cfi_def_cfa_offset 480
	movq	%fs:40, %rax
	movq	%rax, 424(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	leaq	16(%rsp), %rbx
	movq	%rbx, %r12
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %esi
	testl	%esi, %esi
	jle	.L2
	.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), %esi
	addq	$4, %r12
	cmpl	%ebp, %esi
	jg	.L3
.L2:
	movl	%esi, %eax
	movl	%esi, %r9d
	leal	-1(%rsi), %r10d
	xorl	%edx, %edx
	shrl	$2, %eax
	andl	$-4, %r9d
	pxor	%xmm3, %xmm3
	subl	$1, %eax
	salq	$4, %rax
	leaq	32(%rsp,%rax), %rdi
	testl	%esi, %esi
	jle	.L16
	.p2align 4,,10
	.p2align 3
.L24:
	cmpl	$2, %r10d
	jbe	.L17
	movd	%edx, %xmm4
	movq	%rbx, %rax
	pxor	%xmm0, %xmm0
	pshufd	$0, %xmm4, %xmm2
	.p2align 4,,10
	.p2align 3
.L6:
	movdqa	%xmm2, %xmm1
	addq	$16, %rax
	pcmpgtd	-16(%rax), %xmm1
	pcmpeqd	%xmm3, %xmm1
	psubd	%xmm1, %xmm0
	cmpq	%rax, %rdi
	jne	.L6
	movdqa	%xmm0, %xmm1
	movl	%r9d, %ecx
	psrldq	$8, %xmm1
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	cmpl	%r9d, %esi
	je	.L4
.L5:
	movslq	%ecx, %r8
	cmpl	16(%rsp,%r8,4), %edx
	jg	.L9
	addl	$1, %eax
.L9:
	leal	1(%rcx), %r8d
	cmpl	%esi, %r8d
	jge	.L4
	movslq	%r8d, %r8
	cmpl	16(%rsp,%r8,4), %edx
	jg	.L10
	addl	$1, %eax
.L10:
	addl	$2, %ecx
	cmpl	%ecx, %esi
	jle	.L4
	movslq	%ecx, %rcx
	cmpl	16(%rsp,%rcx,4), %edx
	jg	.L4
	addl	$1, %eax
.L4:
	cmpl	%eax, %edx
	jg	.L13
.L25:
	addl	$1, %edx
	testl	%esi, %esi
	jg	.L24
.L16:
	xorl	%eax, %eax
	cmpl	%eax, %edx
	jle	.L25
	.p2align 4,,10
	.p2align 3
.L13:
	subl	$1, %edx
	xorl	%eax, %eax
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L26
	addq	$440, %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
.L17:
	.cfi_restore_state
	xorl	%eax, %eax
	xorl	%ecx, %ecx
	jmp	.L5
.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	"%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
	xorl	%ebp, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$440, %rsp
	.cfi_def_cfa_offset 480
	movq	%fs:40, %rax
	movq	%rax, 424(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	leaq	16(%rsp), %rbx
	movq	%rbx, %r12
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %esi
	testl	%esi, %esi
	jle	.L2
	.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), %esi
	addq	$4, %r12
	cmpl	%ebp, %esi
	jg	.L3
.L2:
	movl	%esi, %eax
	movl	%esi, %r9d
	leal	-1(%rsi), %r10d
	xorl	%edx, %edx
	shrl	$2, %eax
	andl	$-4, %r9d
	pxor	%xmm3, %xmm3
	subl	$1, %eax
	salq	$4, %rax
	leaq	32(%rsp,%rax), %rdi
	testl	%esi, %esi
	jle	.L16
	.p2align 4,,10
	.p2align 3
.L24:
	cmpl	$2, %r10d
	jbe	.L17
	movd	%edx, %xmm4
	movq	%rbx, %rax
	pxor	%xmm0, %xmm0
	pshufd	$0, %xmm4, %xmm2
	.p2align 4,,10
	.p2align 3
.L6:
	movdqa	%xmm2, %xmm1
	addq	$16, %rax
	pcmpgtd	-16(%rax), %xmm1
	pcmpeqd	%xmm3, %xmm1
	psubd	%xmm1, %xmm0
	cmpq	%rax, %rdi
	jne	.L6
	movdqa	%xmm0, %xmm1
	movl	%r9d, %ecx
	psrldq	$8, %xmm1
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	cmpl	%r9d, %esi
	je	.L4
.L5:
	movslq	%ecx, %r8
	cmpl	16(%rsp,%r8,4), %edx
	jg	.L9
	addl	$1, %eax
.L9:
	leal	1(%rcx), %r8d
	cmpl	%esi, %r8d
	jge	.L4
	movslq	%r8d, %r8
	cmpl	16(%rsp,%r8,4), %edx
	jg	.L10
	addl	$1, %eax
.L10:
	addl	$2, %ecx
	cmpl	%ecx, %esi
	jle	.L4
	movslq	%ecx, %rcx
	cmpl	16(%rsp,%rcx,4), %edx
	jg	.L4
	addl	$1, %eax
.L4:
	cmpl	%eax, %edx
	jg	.L13
.L25:
	addl	$1, %edx
	testl	%esi, %esi
	jg	.L24
.L16:
	xorl	%eax, %eax
	cmpl	%eax, %edx
	jle	.L25
	.p2align 4,,10
	.p2align 3
.L13:
	subl	$1, %edx
	xorl	%eax, %eax
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L26
	addq	$440, %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
.L17:
	.cfi_restore_state
	xorl	%eax, %eax
	xorl	%ecx, %ecx
	jmp	.L5
.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:
```