Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
a,b,s[104],n,i;main(c){for(scanf("%d",&n);~scanf("%d%d%d%d",&a,&b,&c,s);)c-*s?s[c>*s?a:b]+=3:++s[a]-++s[b];for(;a=b=i++<n;printf("%d\n",b))for(;a<=n;)b+=s[i]<s[a++];}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d%d%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	n(%rip), %rsi
	xorl	%eax, %eax
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	leaq	b(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	leaq	a(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	leaq	.LC1(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	s(%rip), %rbx
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	movl	%edi, 12(%rsp)
	leaq	.LC0(%rip), %rdi
	leaq	12(%rsp), %r14
	call	scanf@PLT
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movq	%rbx, %r8
	movq	%r14, %rcx
	movq	%r13, %rdx
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	scanf@PLT
	cmpl	$-1, %eax
	je	.L22
	movl	12(%rsp), %eax
	cmpl	%eax, (%rbx)
	je	.L3
	movl	a(%rip), %eax
	cmovge	b(%rip), %eax
	cltq
	addl	$3, (%rbx,%rax,4)
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	movslq	a(%rip), %rax
	addl	$1, (%rbx,%rax,4)
	movslq	b(%rip), %rax
	addl	$1, (%rbx,%rax,4)
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L22:
	movl	i(%rip), %ecx
	leaq	s(%rip), %r12
	movl	n(%rip), %edx
	leaq	.LC2(%rip), %rbx
	leaq	20(%r12), %rbp
	leal	1(%rcx), %eax
	movl	%eax, i(%rip)
	.p2align 4,,10
	.p2align 3
.L20:
	cmpl	%edx, %ecx
	setl	%cl
	movzbl	%cl, %ecx
	movl	%ecx, b(%rip)
	movl	%ecx, a(%rip)
	jge	.L9
	movl	$1, %esi
	testl	%edx, %edx
	jle	.L14
	cltq
	movl	(%r12,%rax,4), %edi
	leal	-1(%rdx), %eax
	cmpl	$2, %eax
	jbe	.L15
	movl	%edx, %ecx
	movd	%edi, %xmm3
	leaq	4+s(%rip), %rax
	shrl	$2, %ecx
	pshufd	$0, %xmm3, %xmm2
	pxor	%xmm1, %xmm1
	subl	$1, %ecx
	salq	$4, %rcx
	addq	%rbp, %rcx
	.p2align 4,,10
	.p2align 3
.L11:
	movdqu	(%rax), %xmm0
	addq	$16, %rax
	pcmpgtd	%xmm2, %xmm0
	psubd	%xmm0, %xmm1
	cmpq	%rax, %rcx
	jne	.L11
	movdqa	%xmm1, %xmm0
	movl	%edx, %ecx
	psrldq	$8, %xmm0
	andl	$-4, %ecx
	paddd	%xmm0, %xmm1
	leal	1(%rcx), %eax
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %esi
	addl	$1, %esi
	cmpl	%ecx, %edx
	je	.L12
.L10:
	movslq	%eax, %r8
	leal	1(%rax), %ecx
	cmpl	(%r12,%r8,4), %edi
	setl	%r8b
	movzbl	%r8b, %r8d
	addl	%r8d, %esi
	cmpl	%edx, %ecx
	jg	.L12
	movslq	%ecx, %rcx
	addl	$2, %eax
	cmpl	(%r12,%rcx,4), %edi
	setl	%cl
	movzbl	%cl, %ecx
	addl	%ecx, %esi
	cmpl	%eax, %edx
	jl	.L12
	cltq
	cmpl	(%r12,%rax,4), %edi
	setl	%al
	movzbl	%al, %eax
	addl	%eax, %esi
.L12:
	addl	$1, %edx
	movl	%esi, b(%rip)
	movl	%edx, a(%rip)
.L14:
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	printf@PLT
	movl	i(%rip), %ecx
	movl	n(%rip), %edx
	leal	1(%rcx), %eax
	movl	%eax, i(%rip)
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L9:
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L15:
	.cfi_restore_state
	movl	$1, %esi
	movl	$1, %eax
	jmp	.L10
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	i
	.bss
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	s
	.align 32
	.type	s, @object
	.size	s, 416
s:
	.zero	416
	.globl	b
	.align 4
	.type	b, @object
	.size	b, 4
b:
	.zero	4
	.globl	a
	.align 4
	.type	a, @object
	.size	a, 4
a:
	.zero	4
	.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%d%d%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	n(%rip), %rsi
	xorl	%eax, %eax
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	leaq	b(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	leaq	a(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	leaq	.LC1(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	s(%rip), %rbx
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	movl	%edi, 12(%rsp)
	leaq	.LC0(%rip), %rdi
	leaq	12(%rsp), %r14
	call	scanf@PLT
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movq	%rbx, %r8
	movq	%r14, %rcx
	movq	%r13, %rdx
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	scanf@PLT
	cmpl	$-1, %eax
	je	.L22
	movl	12(%rsp), %eax
	cmpl	%eax, (%rbx)
	je	.L3
	movl	a(%rip), %eax
	cmovge	b(%rip), %eax
	cltq
	addl	$3, (%rbx,%rax,4)
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	movslq	a(%rip), %rax
	addl	$1, (%rbx,%rax,4)
	movslq	b(%rip), %rax
	addl	$1, (%rbx,%rax,4)
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L22:
	movl	i(%rip), %ecx
	leaq	s(%rip), %r12
	movl	n(%rip), %edx
	leaq	.LC2(%rip), %rbx
	leaq	20(%r12), %rbp
	leal	1(%rcx), %eax
	movl	%eax, i(%rip)
	.p2align 4,,10
	.p2align 3
.L20:
	cmpl	%edx, %ecx
	setl	%cl
	movzbl	%cl, %ecx
	movl	%ecx, b(%rip)
	movl	%ecx, a(%rip)
	jge	.L9
	movl	$1, %esi
	testl	%edx, %edx
	jle	.L14
	cltq
	movl	(%r12,%rax,4), %edi
	leal	-1(%rdx), %eax
	cmpl	$2, %eax
	jbe	.L15
	movl	%edx, %ecx
	movd	%edi, %xmm3
	leaq	4+s(%rip), %rax
	shrl	$2, %ecx
	pshufd	$0, %xmm3, %xmm2
	pxor	%xmm1, %xmm1
	subl	$1, %ecx
	salq	$4, %rcx
	addq	%rbp, %rcx
	.p2align 4,,10
	.p2align 3
.L11:
	movdqu	(%rax), %xmm0
	addq	$16, %rax
	pcmpgtd	%xmm2, %xmm0
	psubd	%xmm0, %xmm1
	cmpq	%rax, %rcx
	jne	.L11
	movdqa	%xmm1, %xmm0
	movl	%edx, %ecx
	psrldq	$8, %xmm0
	andl	$-4, %ecx
	paddd	%xmm0, %xmm1
	leal	1(%rcx), %eax
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %esi
	addl	$1, %esi
	cmpl	%ecx, %edx
	je	.L12
.L10:
	movslq	%eax, %r8
	leal	1(%rax), %ecx
	cmpl	(%r12,%r8,4), %edi
	setl	%r8b
	movzbl	%r8b, %r8d
	addl	%r8d, %esi
	cmpl	%edx, %ecx
	jg	.L12
	movslq	%ecx, %rcx
	addl	$2, %eax
	cmpl	(%r12,%rcx,4), %edi
	setl	%cl
	movzbl	%cl, %ecx
	addl	%ecx, %esi
	cmpl	%eax, %edx
	jl	.L12
	cltq
	cmpl	(%r12,%rax,4), %edi
	setl	%al
	movzbl	%al, %eax
	addl	%eax, %esi
.L12:
	addl	$1, %edx
	movl	%esi, b(%rip)
	movl	%edx, a(%rip)
.L14:
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	printf@PLT
	movl	i(%rip), %ecx
	movl	n(%rip), %edx
	leal	1(%rcx), %eax
	movl	%eax, i(%rip)
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L9:
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L15:
	.cfi_restore_state
	movl	$1, %esi
	movl	$1, %eax
	jmp	.L10
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	i
	.bss
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	s
	.align 32
	.type	s, @object
	.size	s, 416
s:
	.zero	416
	.globl	b
	.align 4
	.type	b, @object
	.size	b, 4
b:
	.zero	4
	.globl	a
	.align 4
	.type	a, @object
	.size	a, 4
a:
	.zero	4
	.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%d%d%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	n(%rip), %rsi
	xorl	%eax, %eax
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	leaq	b(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	leaq	a(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	leaq	.LC1(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	s(%rip), %rbx
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	movl	%edi, 12(%rsp)
	leaq	.LC0(%rip), %rdi
	leaq	12(%rsp), %r14
	call	scanf@PLT
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movq	%rbx, %r8
	movq	%r14, %rcx
	movq	%r13, %rdx
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	scanf@PLT
	cmpl	$-1, %eax
	je	.L22
	movl	12(%rsp), %eax
	cmpl	%eax, (%rbx)
	je	.L3
	movl	a(%rip), %eax
	cmovge	b(%rip), %eax
	cltq
	addl	$3, (%rbx,%rax,4)
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	movslq	a(%rip), %rax
	addl	$1, (%rbx,%rax,4)
	movslq	b(%rip), %rax
	addl	$1, (%rbx,%rax,4)
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L22:
	movl	i(%rip), %ecx
	leaq	s(%rip), %r12
	movl	n(%rip), %edx
	leaq	.LC2(%rip), %rbx
	leaq	20(%r12), %rbp
	leal	1(%rcx), %eax
	movl	%eax, i(%rip)
	.p2align 4,,10
	.p2align 3
.L20:
	cmpl	%edx, %ecx
	setl	%cl
	movzbl	%cl, %ecx
	movl	%ecx, b(%rip)
	movl	%ecx, a(%rip)
	jge	.L9
	movl	$1, %esi
	testl	%edx, %edx
	jle	.L14
	cltq
	movl	(%r12,%rax,4), %edi
	leal	-1(%rdx), %eax
	cmpl	$2, %eax
	jbe	.L15
	movl	%edx, %ecx
	movd	%edi, %xmm3
	leaq	4+s(%rip), %rax
	shrl	$2, %ecx
	pshufd	$0, %xmm3, %xmm2
	pxor	%xmm1, %xmm1
	subl	$1, %ecx
	salq	$4, %rcx
	addq	%rbp, %rcx
	.p2align 4,,10
	.p2align 3
.L11:
	movdqu	(%rax), %xmm0
	addq	$16, %rax
	pcmpgtd	%xmm2, %xmm0
	psubd	%xmm0, %xmm1
	cmpq	%rax, %rcx
	jne	.L11
	movdqa	%xmm1, %xmm0
	movl	%edx, %ecx
	psrldq	$8, %xmm0
	andl	$-4, %ecx
	paddd	%xmm0, %xmm1
	leal	1(%rcx), %eax
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %esi
	addl	$1, %esi
	cmpl	%ecx, %edx
	je	.L12
.L10:
	movslq	%eax, %r8
	leal	1(%rax), %ecx
	cmpl	(%r12,%r8,4), %edi
	setl	%r8b
	movzbl	%r8b, %r8d
	addl	%r8d, %esi
	cmpl	%edx, %ecx
	jg	.L12
	movslq	%ecx, %rcx
	addl	$2, %eax
	cmpl	(%r12,%rcx,4), %edi
	setl	%cl
	movzbl	%cl, %ecx
	addl	%ecx, %esi
	cmpl	%eax, %edx
	jl	.L12
	cltq
	cmpl	(%r12,%rax,4), %edi
	setl	%al
	movzbl	%al, %eax
	addl	%eax, %esi
.L12:
	addl	$1, %edx
	movl	%esi, b(%rip)
	movl	%edx, a(%rip)
.L14:
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	printf@PLT
	movl	i(%rip), %ecx
	movl	n(%rip), %edx
	leal	1(%rcx), %eax
	movl	%eax, i(%rip)
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L9:
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L15:
	.cfi_restore_state
	movl	$1, %esi
	movl	$1, %eax
	jmp	.L10
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	i
	.bss
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	s
	.align 32
	.type	s, @object
	.size	s, 416
s:
	.zero	416
	.globl	b
	.align 4
	.type	b, @object
	.size	b, 4
b:
	.zero	4
	.globl	a
	.align 4
	.type	a, @object
	.size	a, 4
a:
	.zero	4
	.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
a,b,s[104],n,i;main(c){for(scanf("%d",&n);~scanf("%d%d%d%d",&a,&b,&c,s);)c-*s?s[c>*s?a:b]+=3:++s[a]-++s[b];for(;a=b=i++<n;printf("%d\n",b))for(;a<=n;)b+=s[i]<s[a++];}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
a,b,s[104],n,i;main(c){for(scanf("%d",&n);~scanf("%d%d%d%d",&a,&b,&c,s);)c-*s?s[c>*s?a:b]+=3:++s[a]-++s[b];for(;a=b=i++<n;printf("%d\n",b))for(;a<=n;)b+=s[i]<s[a++];}```

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
1 2 0 1
1 3 2 1
1 4 2 2
2 3 2 1
2 4 3 0
3 4 1 3
 4
1 2 0 1
1 3 2 1
1 4 2 2
4 3 2 1
2 4 3 0
3 4 1 3
 4
1 2 1 1
1 3 2 1
1 4 2 2
4 0 3 1
2 4 3 0
0 4 1 4
 4
1 1 1 1
1 3 2 1
1 4 2 0
4 0 3 1
2 4 3 0
0 4 1 4
 4
1 2 0 1
2 3 2 1
1 4 2 2
2 3 2 1
2 4 3 0
3 4 1 3
 4
1 2 0 1
1 3 2 1
1 4 2 2
4 0 2 1
3 4 3 0
0 4 1 4
 4
1 1 1 1
1 3 2 1
1 3 2 2
4 0 3 2
2 4 3 0
0 4 1 4
 4
1 4 0 1
1 3 2 1
1 4 2 2
4 0 2 1
3 4 3 0
-1 4 1 4
 4
1 1 1 1
1 3 2 1
2 4 2 0
4 0 3 1
2 4 3 0
0 4 2 8
 4
1 2 0 1
1 3 2 1
1 4 2 2
2 3 1 0
2 4 3 0
3 4 1 0

2
1
4
2
 3
2
4
1
 2
3
4
1
 1
3
4
2
 3
1
4
2
 2
3
3
1
 1
3
4
1
 2
4
3
1
 3
1
4
1
 2
1
3
4

Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
a,b,s[104],n,i;main(c){for(scanf("%d",&n);~scanf("%d%d%d%d",&a,&b,&c,s);)c-*s?s[c>*s?a:b]+=3:++s[a]-++s[b];for(;a=b=i++<n;printf("%d\n",b))for(;a<=n;)b+=s[i]<s[a++];}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d%d%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	n(%rip), %rsi
	xorl	%eax, %eax
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	leaq	b(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	leaq	a(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	leaq	.LC1(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	s(%rip), %rbx
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	movl	%edi, 12(%rsp)
	leaq	.LC0(%rip), %rdi
	leaq	12(%rsp), %r14
	call	scanf@PLT
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movq	%rbx, %r8
	movq	%r14, %rcx
	movq	%r13, %rdx
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	scanf@PLT
	cmpl	$-1, %eax
	je	.L22
	movl	12(%rsp), %eax
	cmpl	%eax, (%rbx)
	je	.L3
	movl	a(%rip), %eax
	cmovge	b(%rip), %eax
	cltq
	addl	$3, (%rbx,%rax,4)
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	movslq	a(%rip), %rax
	addl	$1, (%rbx,%rax,4)
	movslq	b(%rip), %rax
	addl	$1, (%rbx,%rax,4)
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L22:
	movl	i(%rip), %ecx
	leaq	s(%rip), %r12
	movl	n(%rip), %edx
	leaq	.LC2(%rip), %rbx
	leaq	20(%r12), %rbp
	leal	1(%rcx), %eax
	movl	%eax, i(%rip)
	.p2align 4,,10
	.p2align 3
.L20:
	cmpl	%edx, %ecx
	setl	%cl
	movzbl	%cl, %ecx
	movl	%ecx, b(%rip)
	movl	%ecx, a(%rip)
	jge	.L9
	movl	$1, %esi
	testl	%edx, %edx
	jle	.L14
	cltq
	movl	(%r12,%rax,4), %edi
	leal	-1(%rdx), %eax
	cmpl	$2, %eax
	jbe	.L15
	movl	%edx, %ecx
	movd	%edi, %xmm3
	leaq	4+s(%rip), %rax
	shrl	$2, %ecx
	pshufd	$0, %xmm3, %xmm2
	pxor	%xmm1, %xmm1
	subl	$1, %ecx
	salq	$4, %rcx
	addq	%rbp, %rcx
	.p2align 4,,10
	.p2align 3
.L11:
	movdqu	(%rax), %xmm0
	addq	$16, %rax
	pcmpgtd	%xmm2, %xmm0
	psubd	%xmm0, %xmm1
	cmpq	%rax, %rcx
	jne	.L11
	movdqa	%xmm1, %xmm0
	movl	%edx, %ecx
	psrldq	$8, %xmm0
	andl	$-4, %ecx
	paddd	%xmm0, %xmm1
	leal	1(%rcx), %eax
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %esi
	addl	$1, %esi
	cmpl	%ecx, %edx
	je	.L12
.L10:
	movslq	%eax, %r8
	leal	1(%rax), %ecx
	cmpl	(%r12,%r8,4), %edi
	setl	%r8b
	movzbl	%r8b, %r8d
	addl	%r8d, %esi
	cmpl	%edx, %ecx
	jg	.L12
	movslq	%ecx, %rcx
	addl	$2, %eax
	cmpl	(%r12,%rcx,4), %edi
	setl	%cl
	movzbl	%cl, %ecx
	addl	%ecx, %esi
	cmpl	%eax, %edx
	jl	.L12
	cltq
	cmpl	(%r12,%rax,4), %edi
	setl	%al
	movzbl	%al, %eax
	addl	%eax, %esi
.L12:
	addl	$1, %edx
	movl	%esi, b(%rip)
	movl	%edx, a(%rip)
.L14:
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	printf@PLT
	movl	i(%rip), %ecx
	movl	n(%rip), %edx
	leal	1(%rcx), %eax
	movl	%eax, i(%rip)
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L9:
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L15:
	.cfi_restore_state
	movl	$1, %esi
	movl	$1, %eax
	jmp	.L10
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	i
	.bss
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	s
	.align 32
	.type	s, @object
	.size	s, 416
s:
	.zero	416
	.globl	b
	.align 4
	.type	b, @object
	.size	b, 4
b:
	.zero	4
	.globl	a
	.align 4
	.type	a, @object
	.size	a, 4
a:
	.zero	4
	.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%d%d%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	n(%rip), %rsi
	xorl	%eax, %eax
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	leaq	b(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	leaq	a(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	leaq	.LC1(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	s(%rip), %rbx
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	movl	%edi, 12(%rsp)
	leaq	.LC0(%rip), %rdi
	leaq	12(%rsp), %r14
	call	scanf@PLT
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movq	%rbx, %r8
	movq	%r14, %rcx
	movq	%r13, %rdx
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	scanf@PLT
	cmpl	$-1, %eax
	je	.L22
	movl	12(%rsp), %eax
	cmpl	%eax, (%rbx)
	je	.L3
	movl	a(%rip), %eax
	cmovge	b(%rip), %eax
	cltq
	addl	$3, (%rbx,%rax,4)
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	movslq	a(%rip), %rax
	addl	$1, (%rbx,%rax,4)
	movslq	b(%rip), %rax
	addl	$1, (%rbx,%rax,4)
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L22:
	movl	i(%rip), %ecx
	leaq	s(%rip), %r12
	movl	n(%rip), %edx
	leaq	.LC2(%rip), %rbx
	leaq	20(%r12), %rbp
	leal	1(%rcx), %eax
	movl	%eax, i(%rip)
	.p2align 4,,10
	.p2align 3
.L20:
	cmpl	%edx, %ecx
	setl	%cl
	movzbl	%cl, %ecx
	movl	%ecx, b(%rip)
	movl	%ecx, a(%rip)
	jge	.L9
	movl	$1, %esi
	testl	%edx, %edx
	jle	.L14
	cltq
	movl	(%r12,%rax,4), %edi
	leal	-1(%rdx), %eax
	cmpl	$2, %eax
	jbe	.L15
	movl	%edx, %ecx
	movd	%edi, %xmm3
	leaq	4+s(%rip), %rax
	shrl	$2, %ecx
	pshufd	$0, %xmm3, %xmm2
	pxor	%xmm1, %xmm1
	subl	$1, %ecx
	salq	$4, %rcx
	addq	%rbp, %rcx
	.p2align 4,,10
	.p2align 3
.L11:
	movdqu	(%rax), %xmm0
	addq	$16, %rax
	pcmpgtd	%xmm2, %xmm0
	psubd	%xmm0, %xmm1
	cmpq	%rax, %rcx
	jne	.L11
	movdqa	%xmm1, %xmm0
	movl	%edx, %ecx
	psrldq	$8, %xmm0
	andl	$-4, %ecx
	paddd	%xmm0, %xmm1
	leal	1(%rcx), %eax
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %esi
	addl	$1, %esi
	cmpl	%ecx, %edx
	je	.L12
.L10:
	movslq	%eax, %r8
	leal	1(%rax), %ecx
	cmpl	(%r12,%r8,4), %edi
	setl	%r8b
	movzbl	%r8b, %r8d
	addl	%r8d, %esi
	cmpl	%edx, %ecx
	jg	.L12
	movslq	%ecx, %rcx
	addl	$2, %eax
	cmpl	(%r12,%rcx,4), %edi
	setl	%cl
	movzbl	%cl, %ecx
	addl	%ecx, %esi
	cmpl	%eax, %edx
	jl	.L12
	cltq
	cmpl	(%r12,%rax,4), %edi
	setl	%al
	movzbl	%al, %eax
	addl	%eax, %esi
.L12:
	addl	$1, %edx
	movl	%esi, b(%rip)
	movl	%edx, a(%rip)
.L14:
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	printf@PLT
	movl	i(%rip), %ecx
	movl	n(%rip), %edx
	leal	1(%rcx), %eax
	movl	%eax, i(%rip)
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L9:
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L15:
	.cfi_restore_state
	movl	$1, %esi
	movl	$1, %eax
	jmp	.L10
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	i
	.bss
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	s
	.align 32
	.type	s, @object
	.size	s, 416
s:
	.zero	416
	.globl	b
	.align 4
	.type	b, @object
	.size	b, 4
b:
	.zero	4
	.globl	a
	.align 4
	.type	a, @object
	.size	a, 4
a:
	.zero	4
	.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:
```