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

```c
#include <limits.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <math.h>

#define P 1000000007

int comp(const void *a, const void *b){return *(int*)a-*(int*)b;}
int compl(const void *a, const void *b){return (*(long*)a<*(long*)b)-(*(long*)a>*(long*)b);}

int main(void){
	int n, i;
	char s[200002];
	int a[200001];
	scanf("%d%s", &n, s+1);

	a[0]=0;
	for(i=1; i<=n; i++){
		a[i]=a[i-1]+(s[i]=='#');
	}
	int min=INT_MAX;
	for(i=0; i<=n; i++){
		int now = a[i]+(n-i-a[n]+a[i]);
		if(now<min) min=now;
	}
	printf("%d\n", min);
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	comp
	.type	comp, @function
comp:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	comp, .-comp
	.globl	compl
	.type	compl, @function
compl:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	setl	%al
	movzbl	%al, %edx
	movq	-8(%rbp), %rax
	movq	(%rax), %rcx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rcx
	setg	%al
	movzbl	%al, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	compl, .-compl
	.section	.rodata
.LC0:
	.string	"%d%s"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-999424(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$624, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-200016(%rbp), %rax
	addq	$1, %rax
	leaq	-1000048(%rbp), %rcx
	movq	%rax, %rdx
	movq	%rcx, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -1000032(%rbp)
	movl	$1, -1000044(%rbp)
	jmp	.L6
.L7:
	movl	-1000044(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-1000032(%rbp,%rax,4), %edx
	movl	-1000044(%rbp), %eax
	cltq
	movzbl	-200016(%rbp,%rax), %eax
	cmpb	$35, %al
	sete	%al
	movzbl	%al, %eax
	addl	%eax, %edx
	movl	-1000044(%rbp), %eax
	cltq
	movl	%edx, -1000032(%rbp,%rax,4)
	addl	$1, -1000044(%rbp)
.L6:
	movl	-1000048(%rbp), %eax
	cmpl	%eax, -1000044(%rbp)
	jle	.L7
	movl	$2147483647, -1000040(%rbp)
	movl	$0, -1000044(%rbp)
	jmp	.L8
.L10:
	movl	-1000044(%rbp), %eax
	cltq
	movl	-1000032(%rbp,%rax,4), %ecx
	movl	-1000048(%rbp), %eax
	subl	-1000044(%rbp), %eax
	movl	%eax, %edx
	movl	-1000048(%rbp), %eax
	cltq
	movl	-1000032(%rbp,%rax,4), %eax
	subl	%eax, %edx
	movl	-1000044(%rbp), %eax
	cltq
	movl	-1000032(%rbp,%rax,4), %eax
	addl	%edx, %eax
	addl	%ecx, %eax
	movl	%eax, -1000036(%rbp)
	movl	-1000036(%rbp), %eax
	cmpl	-1000040(%rbp), %eax
	jge	.L9
	movl	-1000036(%rbp), %eax
	movl	%eax, -1000040(%rbp)
.L9:
	addl	$1, -1000044(%rbp)
.L8:
	movl	-1000048(%rbp), %eax
	cmpl	%eax, -1000044(%rbp)
	jle	.L10
	movl	-1000040(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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.
user
	.file	"temp.c"
	.text
	.p2align 4
	.globl	comp
	.type	comp, @function
comp:
.LFB63:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE63:
	.size	comp, .-comp
	.p2align 4
	.globl	compl
	.type	compl, @function
compl:
.LFB64:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rax
	cmpq	%rax, (%rdi)
	setl	%al
	setg	%dl
	movzbl	%dl, %edx
	movzbl	%al, %eax
	subl	%edx, %eax
	ret
	.cfi_endproc
.LFE64:
	.size	compl, .-compl
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC2:
	.string	"%d%s"
.LC4:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB65:
	.cfi_startproc
	endbr64
	leaq	-999424(%rsp), %r11
	.cfi_def_cfa 11, 999432
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$632, %rsp
	.cfi_def_cfa_offset 1000064
	leaq	.LC2(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 1000040(%rsp)
	xorl	%eax, %eax
	leaq	800033(%rsp), %rdx
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r9d
	movl	$0, 16(%rsp)
	testl	%r9d, %r9d
	jle	.L5
	leal	1(%r9), %r8d
	movl	$1, %eax
	leaq	16(%rsp), %rdx
	xorl	%ecx, %ecx
	movq	%r8, %r10
	leaq	800032(%rsp), %rdi
	.p2align 4,,10
	.p2align 3
.L6:
	xorl	%esi, %esi
	cmpb	$35, (%rdi,%rax)
	sete	%sil
	addl	%esi, %ecx
	movl	%ecx, (%rdx,%rax,4)
	addq	$1, %rax
	cmpq	%r8, %rax
	jne	.L6
	movslq	%r9d, %rax
	movl	16(%rsp,%rax,4), %ecx
	cmpl	$2, %r9d
	jle	.L7
	movq	%rdx, %rax
	movl	%r10d, %edx
	movd	%r9d, %xmm7
	movdqa	.LC0(%rip), %xmm1
	shrl	$2, %edx
	pshufd	$0, %xmm7, %xmm6
	movdqa	.LC1(%rip), %xmm3
	movd	%ecx, %xmm7
	subl	$1, %edx
	movdqa	.LC3(%rip), %xmm4
	pshufd	$0, %xmm7, %xmm5
	salq	$4, %rdx
	leaq	32(%rsp,%rdx), %rdx
	.p2align 4,,10
	.p2align 3
.L8:
	movdqa	%xmm3, %xmm2
	movdqa	%xmm6, %xmm0
	paddd	%xmm4, %xmm3
	addq	$16, %rax
	psubd	%xmm2, %xmm0
	psubd	%xmm5, %xmm0
	paddd	-16(%rax), %xmm0
	paddd	-16(%rax), %xmm0
	movdqa	%xmm0, %xmm2
	pcmpgtd	%xmm1, %xmm2
	pand	%xmm2, %xmm1
	pandn	%xmm0, %xmm2
	por	%xmm2, %xmm1
	cmpq	%rdx, %rax
	jne	.L8
	movdqa	%xmm1, %xmm2
	movl	%r10d, %eax
	psrldq	$8, %xmm2
	andl	$-4, %eax
	andl	$3, %r10d
	movdqa	%xmm2, %xmm0
	pcmpgtd	%xmm1, %xmm0
	pand	%xmm0, %xmm1
	pandn	%xmm2, %xmm0
	por	%xmm1, %xmm0
	movdqa	%xmm0, %xmm2
	psrldq	$4, %xmm2
	movdqa	%xmm2, %xmm1
	pcmpgtd	%xmm0, %xmm1
	pand	%xmm1, %xmm0
	pandn	%xmm2, %xmm1
	por	%xmm0, %xmm1
	movd	%xmm1, %edx
	je	.L10
	movslq	%eax, %rsi
	movl	16(%rsp,%rsi,4), %edi
	movl	%r9d, %esi
	subl	%eax, %esi
	subl	%ecx, %esi
	leal	(%rsi,%rdi,2), %esi
	cmpl	%esi, %edx
	cmovg	%esi, %edx
	addl	$1, %eax
	cmpl	%eax, %r9d
	jl	.L10
.L13:
	movslq	%eax, %rsi
	movl	16(%rsp,%rsi,4), %edi
	movl	%r9d, %esi
	subl	%eax, %esi
	subl	%ecx, %esi
	leal	(%rsi,%rdi,2), %esi
	cmpl	%esi, %edx
	cmovg	%esi, %edx
	addl	$1, %eax
	cmpl	%eax, %r9d
	jl	.L10
	movslq	%eax, %rsi
	subl	%eax, %r9d
	movl	16(%rsp,%rsi,4), %esi
	subl	%ecx, %r9d
	leal	(%r9,%rsi,2), %eax
	cmpl	%eax, %edx
	cmovg	%eax, %edx
.L10:
	xorl	%eax, %eax
	leaq	.LC4(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	1000040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L20
	xorl	%eax, %eax
	addq	$1000056, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L5:
	.cfi_restore_state
	negl	%r9d
	sbbl	%edx, %edx
	andl	$2147483647, %edx
	jmp	.L10
.L7:
	movl	16(%rsp), %edx
	movl	%r9d, %eax
	subl	%ecx, %eax
	leal	(%rax,%rdx,2), %edx
	movl	$1, %eax
	jmp	.L13
.L20:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE65:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	2147483647
	.long	2147483647
	.long	2147483647
	.long	2147483647
	.align 16
.LC1:
	.long	0
	.long	1
	.long	2
	.long	3
	.align 16
.LC3:
	.long	4
	.long	4
	.long	4
	.long	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
	.file	"temp.c"
	.text
	.p2align 4
	.globl	comp
	.type	comp, @function
comp:
.LFB63:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE63:
	.size	comp, .-comp
	.p2align 4
	.globl	compl
	.type	compl, @function
compl:
.LFB64:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rax
	cmpq	%rax, (%rdi)
	setl	%al
	setg	%dl
	movzbl	%dl, %edx
	movzbl	%al, %eax
	subl	%edx, %eax
	ret
	.cfi_endproc
.LFE64:
	.size	compl, .-compl
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC2:
	.string	"%d%s"
.LC4:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB65:
	.cfi_startproc
	endbr64
	leaq	-999424(%rsp), %r11
	.cfi_def_cfa 11, 999432
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$632, %rsp
	.cfi_def_cfa_offset 1000064
	leaq	.LC2(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 1000040(%rsp)
	xorl	%eax, %eax
	leaq	800033(%rsp), %rdx
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r9d
	movl	$0, 16(%rsp)
	testl	%r9d, %r9d
	jle	.L5
	leal	1(%r9), %r8d
	movl	$1, %eax
	leaq	16(%rsp), %rdx
	xorl	%ecx, %ecx
	movq	%r8, %r10
	leaq	800032(%rsp), %rdi
	.p2align 4,,10
	.p2align 3
.L6:
	xorl	%esi, %esi
	cmpb	$35, (%rdi,%rax)
	sete	%sil
	addl	%esi, %ecx
	movl	%ecx, (%rdx,%rax,4)
	addq	$1, %rax
	cmpq	%r8, %rax
	jne	.L6
	movslq	%r9d, %rax
	movl	16(%rsp,%rax,4), %ecx
	cmpl	$2, %r9d
	jle	.L7
	movq	%rdx, %rax
	movl	%r10d, %edx
	movd	%r9d, %xmm7
	movdqa	.LC0(%rip), %xmm1
	shrl	$2, %edx
	pshufd	$0, %xmm7, %xmm6
	movdqa	.LC1(%rip), %xmm3
	movd	%ecx, %xmm7
	subl	$1, %edx
	movdqa	.LC3(%rip), %xmm4
	pshufd	$0, %xmm7, %xmm5
	salq	$4, %rdx
	leaq	32(%rsp,%rdx), %rdx
	.p2align 4,,10
	.p2align 3
.L8:
	movdqa	%xmm3, %xmm2
	movdqa	%xmm6, %xmm0
	paddd	%xmm4, %xmm3
	addq	$16, %rax
	psubd	%xmm2, %xmm0
	psubd	%xmm5, %xmm0
	paddd	-16(%rax), %xmm0
	paddd	-16(%rax), %xmm0
	movdqa	%xmm0, %xmm2
	pcmpgtd	%xmm1, %xmm2
	pand	%xmm2, %xmm1
	pandn	%xmm0, %xmm2
	por	%xmm2, %xmm1
	cmpq	%rdx, %rax
	jne	.L8
	movdqa	%xmm1, %xmm2
	movl	%r10d, %eax
	psrldq	$8, %xmm2
	andl	$-4, %eax
	andl	$3, %r10d
	movdqa	%xmm2, %xmm0
	pcmpgtd	%xmm1, %xmm0
	pand	%xmm0, %xmm1
	pandn	%xmm2, %xmm0
	por	%xmm1, %xmm0
	movdqa	%xmm0, %xmm2
	psrldq	$4, %xmm2
	movdqa	%xmm2, %xmm1
	pcmpgtd	%xmm0, %xmm1
	pand	%xmm1, %xmm0
	pandn	%xmm2, %xmm1
	por	%xmm0, %xmm1
	movd	%xmm1, %edx
	je	.L10
	movslq	%eax, %rsi
	movl	16(%rsp,%rsi,4), %edi
	movl	%r9d, %esi
	subl	%eax, %esi
	subl	%ecx, %esi
	leal	(%rsi,%rdi,2), %esi
	cmpl	%esi, %edx
	cmovg	%esi, %edx
	addl	$1, %eax
	cmpl	%eax, %r9d
	jl	.L10
.L13:
	movslq	%eax, %rsi
	movl	16(%rsp,%rsi,4), %edi
	movl	%r9d, %esi
	subl	%eax, %esi
	subl	%ecx, %esi
	leal	(%rsi,%rdi,2), %esi
	cmpl	%esi, %edx
	cmovg	%esi, %edx
	addl	$1, %eax
	cmpl	%eax, %r9d
	jl	.L10
	movslq	%eax, %rsi
	subl	%eax, %r9d
	movl	16(%rsp,%rsi,4), %esi
	subl	%ecx, %r9d
	leal	(%r9,%rsi,2), %eax
	cmpl	%eax, %edx
	cmovg	%eax, %edx
.L10:
	xorl	%eax, %eax
	leaq	.LC4(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	1000040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L20
	xorl	%eax, %eax
	addq	$1000056, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L5:
	.cfi_restore_state
	negl	%r9d
	sbbl	%edx, %edx
	andl	$2147483647, %edx
	jmp	.L10
.L7:
	movl	16(%rsp), %edx
	movl	%r9d, %eax
	subl	%ecx, %eax
	leal	(%rax,%rdx,2), %edx
	movl	$1, %eax
	jmp	.L13
.L20:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE65:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	2147483647
	.long	2147483647
	.long	2147483647
	.long	2147483647
	.align 16
.LC1:
	.long	0
	.long	1
	.long	2
	.long	3
	.align 16
.LC3:
	.long	4
	.long	4
	.long	4
	.long	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:

#include <limits.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <math.h>

#define P 1000000007

int comp(const void *a, const void *b){return *(int*)a-*(int*)b;}
int compl(const void *a, const void *b){return (*(long*)a<*(long*)b)-(*(long*)a>*(long*)b);}

int main(void){
	int n, i;
	char s[200002];
	int a[200001];
	scanf("%d%s", &n, s+1);

	a[0]=0;
	for(i=1; i<=n; i++){
		a[i]=a[i-1]+(s[i]=='#');
	}
	int min=INT_MAX;
	for(i=0; i<=n; i++){
		int now = a[i]+(n-i-a[n]+a[i]);
		if(now<min) min=now;
	}
	printf("%d\n", min);
}

3
#.#

1

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

```c
#include <limits.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <math.h>

#define P 1000000007

int comp(const void *a, const void *b){return *(int*)a-*(int*)b;}
int compl(const void *a, const void *b){return (*(long*)a<*(long*)b)-(*(long*)a>*(long*)b);}

int main(void){
	int n, i;
	char s[200002];
	int a[200001];
	scanf("%d%s", &n, s+1);

	a[0]=0;
	for(i=1; i<=n; i++){
		a[i]=a[i-1]+(s[i]=='#');
	}
	int min=INT_MAX;
	for(i=0; i<=n; i++){
		int now = a[i]+(n-i-a[n]+a[i]);
		if(now<min) min=now;
	}
	printf("%d\n", min);
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	comp
	.type	comp, @function
comp:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	comp, .-comp
	.globl	compl
	.type	compl, @function
compl:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	setl	%al
	movzbl	%al, %edx
	movq	-8(%rbp), %rax
	movq	(%rax), %rcx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rcx
	setg	%al
	movzbl	%al, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	compl, .-compl
	.section	.rodata
.LC0:
	.string	"%d%s"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-999424(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$624, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-200016(%rbp), %rax
	addq	$1, %rax
	leaq	-1000048(%rbp), %rcx
	movq	%rax, %rdx
	movq	%rcx, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -1000032(%rbp)
	movl	$1, -1000044(%rbp)
	jmp	.L6
.L7:
	movl	-1000044(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-1000032(%rbp,%rax,4), %edx
	movl	-1000044(%rbp), %eax
	cltq
	movzbl	-200016(%rbp,%rax), %eax
	cmpb	$35, %al
	sete	%al
	movzbl	%al, %eax
	addl	%eax, %edx
	movl	-1000044(%rbp), %eax
	cltq
	movl	%edx, -1000032(%rbp,%rax,4)
	addl	$1, -1000044(%rbp)
.L6:
	movl	-1000048(%rbp), %eax
	cmpl	%eax, -1000044(%rbp)
	jle	.L7
	movl	$2147483647, -1000040(%rbp)
	movl	$0, -1000044(%rbp)
	jmp	.L8
.L10:
	movl	-1000044(%rbp), %eax
	cltq
	movl	-1000032(%rbp,%rax,4), %ecx
	movl	-1000048(%rbp), %eax
	subl	-1000044(%rbp), %eax
	movl	%eax, %edx
	movl	-1000048(%rbp), %eax
	cltq
	movl	-1000032(%rbp,%rax,4), %eax
	subl	%eax, %edx
	movl	-1000044(%rbp), %eax
	cltq
	movl	-1000032(%rbp,%rax,4), %eax
	addl	%edx, %eax
	addl	%ecx, %eax
	movl	%eax, -1000036(%rbp)
	movl	-1000036(%rbp), %eax
	cmpl	-1000040(%rbp), %eax
	jge	.L9
	movl	-1000036(%rbp), %eax
	movl	%eax, -1000040(%rbp)
.L9:
	addl	$1, -1000044(%rbp)
.L8:
	movl	-1000048(%rbp), %eax
	cmpl	%eax, -1000044(%rbp)
	jle	.L10
	movl	-1000040(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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.
train
	.file	"temp.c"
	.text
	.globl	comp
	.type	comp, @function
comp:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	comp, .-comp
	.globl	compl
	.type	compl, @function
compl:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	setl	%al
	movzbl	%al, %edx
	movq	-8(%rbp), %rax
	movq	(%rax), %rcx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rcx
	setg	%al
	movzbl	%al, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	compl, .-compl
	.section	.rodata
.LC0:
	.string	"%d%s"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-999424(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$624, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-200016(%rbp), %rax
	addq	$1, %rax
	leaq	-1000048(%rbp), %rcx
	movq	%rax, %rdx
	movq	%rcx, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -1000032(%rbp)
	movl	$1, -1000044(%rbp)
	jmp	.L6
.L7:
	movl	-1000044(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-1000032(%rbp,%rax,4), %edx
	movl	-1000044(%rbp), %eax
	cltq
	movzbl	-200016(%rbp,%rax), %eax
	cmpb	$35, %al
	sete	%al
	movzbl	%al, %eax
	addl	%eax, %edx
	movl	-1000044(%rbp), %eax
	cltq
	movl	%edx, -1000032(%rbp,%rax,4)
	addl	$1, -1000044(%rbp)
.L6:
	movl	-1000048(%rbp), %eax
	cmpl	%eax, -1000044(%rbp)
	jle	.L7
	movl	$2147483647, -1000040(%rbp)
	movl	$0, -1000044(%rbp)
	jmp	.L8
.L10:
	movl	-1000044(%rbp), %eax
	cltq
	movl	-1000032(%rbp,%rax,4), %ecx
	movl	-1000048(%rbp), %eax
	subl	-1000044(%rbp), %eax
	movl	%eax, %edx
	movl	-1000048(%rbp), %eax
	cltq
	movl	-1000032(%rbp,%rax,4), %eax
	subl	%eax, %edx
	movl	-1000044(%rbp), %eax
	cltq
	movl	-1000032(%rbp,%rax,4), %eax
	addl	%edx, %eax
	addl	%ecx, %eax
	movl	%eax, -1000036(%rbp)
	movl	-1000036(%rbp), %eax
	cmpl	-1000040(%rbp), %eax
	jge	.L9
	movl	-1000036(%rbp), %eax
	movl	%eax, -1000040(%rbp)
.L9:
	addl	$1, -1000044(%rbp)
.L8:
	movl	-1000048(%rbp), %eax
	cmpl	%eax, -1000044(%rbp)
	jle	.L10
	movl	-1000040(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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:
