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

```c
#include <stdio.h>
#include <string.h>

char a[1024][80];
int ap;

void reverse(char *s, int n)
{
    int i;
    for(i=0;i<n/2;++i) {
        char t=s[i];
        s[i]=s[n-1-i];
        s[n-1-i]=t;
    }
}
void swap(char *s1, char *s2)
{
    int i=0;
    char t[80], *p;
    for(p=s2;*p;++p) t[i++]=*p;
    for(p=s1;p!=s2;++p) t[i++]=*p;
    t[i]=0;
    strcpy(s1, t);
}
int contain(char* s)
{
    int i;
    for(i=0;i<ap;++i) if (!strcmp(a[i], s)) return 1;
    return 0;
}

int main(void)
{
    int n;
    scanf("%d", &n);
    while (n--) {
        int i, len;
        char s[80], t[80];
        scanf("%s", s);

        ap=0;
        len=strlen(s);
        strcpy(t, s);
        for(i=1;i<len;++i) {
            if (!contain(s)) strcpy(a[ap++], s);
            reverse(s, i); if (!contain(s)) strcpy(a[ap++], s);
            reverse(s+i, len-i); if (!contain(s)) strcpy(a[ap++], s);
            reverse(s, i); if (!contain(s)) strcpy(a[ap++], s);
            strcpy(s, t);
            swap(s, s+i);
            if (!contain(s)) strcpy(a[ap++], s);
            reverse(s, len-i); if (!contain(s)) strcpy(a[ap++], s);
            reverse(s+len-i, i); if (!contain(s)) strcpy(a[ap++], s);
            reverse(s, len-i); if (!contain(s)) strcpy(a[ap++], s);
            strcpy(s, t);
        }
        printf("%d\n", ap);
    }
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 81920
a:
	.zero	81920
	.globl	ap
	.align 4
	.type	ap, @object
	.size	ap, 4
ap:
	.zero	4
	.text
	.globl	reverse
	.type	reverse, @function
reverse:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L2
.L3:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	movb	%al, -5(%rbp)
	movl	-28(%rbp), %eax
	subl	$1, %eax
	subl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	-4(%rbp), %edx
	movslq	%edx, %rcx
	movq	-24(%rbp), %rdx
	addq	%rcx, %rdx
	movzbl	(%rax), %eax
	movb	%al, (%rdx)
	movl	-28(%rbp), %eax
	subl	$1, %eax
	subl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	-24(%rbp), %rax
	addq	%rax, %rdx
	movzbl	-5(%rbp), %eax
	movb	%al, (%rdx)
	addl	$1, -4(%rbp)
.L2:
	movl	-28(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cmpl	%eax, -4(%rbp)
	jl	.L3
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	reverse, .-reverse
	.globl	swap
	.type	swap, @function
swap:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	addq	$-128, %rsp
	movq	%rdi, -120(%rbp)
	movq	%rsi, -128(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -108(%rbp)
	movq	-128(%rbp), %rax
	movq	%rax, -104(%rbp)
	jmp	.L5
.L6:
	movl	-108(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -108(%rbp)
	movq	-104(%rbp), %rdx
	movzbl	(%rdx), %edx
	cltq
	movb	%dl, -96(%rbp,%rax)
	addq	$1, -104(%rbp)
.L5:
	movq	-104(%rbp), %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	jne	.L6
	movq	-120(%rbp), %rax
	movq	%rax, -104(%rbp)
	jmp	.L7
.L8:
	movl	-108(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -108(%rbp)
	movq	-104(%rbp), %rdx
	movzbl	(%rdx), %edx
	cltq
	movb	%dl, -96(%rbp,%rax)
	addq	$1, -104(%rbp)
.L7:
	movq	-104(%rbp), %rax
	cmpq	-128(%rbp), %rax
	jne	.L8
	movl	-108(%rbp), %eax
	cltq
	movb	$0, -96(%rbp,%rax)
	leaq	-96(%rbp), %rdx
	movq	-120(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcpy@PLT
	nop
	movq	-8(%rbp), %rax
	subq	%fs:40, %rax
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	swap, .-swap
	.globl	contain
	.type	contain, @function
contain:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L11
.L14:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$4, %rax
	leaq	a(%rip), %rdx
	addq	%rax, %rdx
	movq	-24(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L12
	movl	$1, %eax
	jmp	.L13
.L12:
	addl	$1, -4(%rbp)
.L11:
	movl	ap(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L14
	movl	$0, %eax
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	contain, .-contain
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$192, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-188(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L16
.L27:
	leaq	-176(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, ap(%rip)
	leaq	-176(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -180(%rbp)
	leaq	-176(%rbp), %rdx
	leaq	-96(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcpy@PLT
	movl	$1, -184(%rbp)
	jmp	.L17
.L26:
	leaq	-176(%rbp), %rax
	movq	%rax, %rdi
	call	contain
	testl	%eax, %eax
	jne	.L18
	movl	ap(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, ap(%rip)
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$4, %rax
	leaq	a(%rip), %rdx
	addq	%rax, %rdx
	leaq	-176(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
.L18:
	movl	-184(%rbp), %edx
	leaq	-176(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	reverse
	leaq	-176(%rbp), %rax
	movq	%rax, %rdi
	call	contain
	testl	%eax, %eax
	jne	.L19
	movl	ap(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, ap(%rip)
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$4, %rax
	leaq	a(%rip), %rdx
	addq	%rax, %rdx
	leaq	-176(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
.L19:
	movl	-180(%rbp), %eax
	subl	-184(%rbp), %eax
	movl	-184(%rbp), %edx
	movslq	%edx, %rdx
	leaq	-176(%rbp), %rcx
	addq	%rcx, %rdx
	movl	%eax, %esi
	movq	%rdx, %rdi
	call	reverse
	leaq	-176(%rbp), %rax
	movq	%rax, %rdi
	call	contain
	testl	%eax, %eax
	jne	.L20
	movl	ap(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, ap(%rip)
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$4, %rax
	leaq	a(%rip), %rdx
	addq	%rax, %rdx
	leaq	-176(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
.L20:
	movl	-184(%rbp), %edx
	leaq	-176(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	reverse
	leaq	-176(%rbp), %rax
	movq	%rax, %rdi
	call	contain
	testl	%eax, %eax
	jne	.L21
	movl	ap(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, ap(%rip)
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$4, %rax
	leaq	a(%rip), %rdx
	addq	%rax, %rdx
	leaq	-176(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
.L21:
	leaq	-96(%rbp), %rdx
	leaq	-176(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcpy@PLT
	movl	-184(%rbp), %eax
	cltq
	leaq	-176(%rbp), %rdx
	addq	%rax, %rdx
	leaq	-176(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	swap
	leaq	-176(%rbp), %rax
	movq	%rax, %rdi
	call	contain
	testl	%eax, %eax
	jne	.L22
	movl	ap(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, ap(%rip)
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$4, %rax
	leaq	a(%rip), %rdx
	addq	%rax, %rdx
	leaq	-176(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
.L22:
	movl	-180(%rbp), %eax
	subl	-184(%rbp), %eax
	movl	%eax, %edx
	leaq	-176(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	reverse
	leaq	-176(%rbp), %rax
	movq	%rax, %rdi
	call	contain
	testl	%eax, %eax
	jne	.L23
	movl	ap(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, ap(%rip)
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$4, %rax
	leaq	a(%rip), %rdx
	addq	%rax, %rdx
	leaq	-176(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
.L23:
	movl	-180(%rbp), %eax
	cltq
	movl	-184(%rbp), %edx
	movslq	%edx, %rdx
	subq	%rdx, %rax
	movq	%rax, %rcx
	leaq	-176(%rbp), %rax
	leaq	(%rax,%rcx), %rdx
	movl	-184(%rbp), %eax
	movl	%eax, %esi
	movq	%rdx, %rdi
	call	reverse
	leaq	-176(%rbp), %rax
	movq	%rax, %rdi
	call	contain
	testl	%eax, %eax
	jne	.L24
	movl	ap(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, ap(%rip)
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$4, %rax
	leaq	a(%rip), %rdx
	addq	%rax, %rdx
	leaq	-176(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
.L24:
	movl	-180(%rbp), %eax
	subl	-184(%rbp), %eax
	movl	%eax, %edx
	leaq	-176(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	reverse
	leaq	-176(%rbp), %rax
	movq	%rax, %rdi
	call	contain
	testl	%eax, %eax
	jne	.L25
	movl	ap(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, ap(%rip)
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$4, %rax
	leaq	a(%rip), %rdx
	addq	%rax, %rdx
	leaq	-176(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
.L25:
	leaq	-96(%rbp), %rdx
	leaq	-176(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcpy@PLT
	addl	$1, -184(%rbp)
.L17:
	movl	-184(%rbp), %eax
	cmpl	-180(%rbp), %eax
	jl	.L26
	movl	ap(%rip), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L16:
	movl	-188(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -188(%rbp)
	testl	%eax, %eax
	jne	.L27
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L29
	call	__stack_chk_fail@PLT
.L29:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.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	reverse
	.type	reverse, @function
reverse:
.LFB35:
	.cfi_startproc
	endbr64
	movl	%esi, %r8d
	shrl	$31, %r8d
	addl	%esi, %r8d
	sarl	%r8d
	cmpl	$1, %esi
	jle	.L1
	leal	-1(%rsi), %eax
	xorl	%edx, %edx
	cltq
	addq	%rdi, %rax
	.p2align 4,,10
	.p2align 3
.L3:
	movzbl	(%rax), %esi
	movzbl	(%rdi,%rdx), %ecx
	subq	$1, %rax
	movb	%sil, (%rdi,%rdx)
	addq	$1, %rdx
	movb	%cl, 1(%rax)
	cmpl	%edx, %r8d
	jg	.L3
.L1:
	ret
	.cfi_endproc
.LFE35:
	.size	reverse, .-reverse
	.p2align 4
	.globl	swap
	.type	swap, @function
swap:
.LFB36:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movq	%rdi, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$104, %rsp
	.cfi_def_cfa_offset 144
	movzbl	(%rsi), %edx
	movq	%fs:40, %rax
	movq	%rax, 88(%rsp)
	xorl	%eax, %eax
	testb	%dl, %dl
	je	.L12
	movl	$1, %eax
	leaq	-1(%rsp), %rcx
	.p2align 4,,10
	.p2align 3
.L9:
	movb	%dl, (%rcx,%rax)
	movl	%eax, %ebp
	addq	$1, %rax
	movzbl	-1(%rsi,%rax), %edx
	testb	%dl, %dl
	jne	.L9
.L8:
	movq	%rsp, %r13
	cmpq	%r12, %rsi
	je	.L10
	movq	%rsi, %rbx
	movslq	%ebp, %rdi
	movq	%r12, %rsi
	subq	%r12, %rbx
	addq	%r13, %rdi
	movq	%rbx, %rdx
	addl	%ebx, %ebp
	call	memcpy@PLT
.L10:
	movslq	%ebp, %rbp
	movq	%r13, %rsi
	movq	%r12, %rdi
	movb	$0, (%rsp,%rbp)
	call	strcpy@PLT
	movq	88(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	addq	$104, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	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
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	xorl	%ebp, %ebp
	jmp	.L8
.L17:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE36:
	.size	swap, .-swap
	.p2align 4
	.globl	contain
	.type	contain, @function
contain:
.LFB37:
	.cfi_startproc
	endbr64
	movl	ap(%rip), %eax
	testl	%eax, %eax
	jle	.L21
	subl	$1, %eax
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movq	%rdi, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	(%rax,%rax,4), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	a(%rip), %rbx
	salq	$4, %rbp
	leaq	80(%rbx), %rax
	addq	%rax, %rbp
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L29:
	addq	$80, %rbx
	cmpq	%rbp, %rbx
	je	.L28
.L20:
	movq	%r12, %rsi
	movq	%rbx, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L29
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	movl	$1, %eax
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L28:
	.cfi_restore_state
	popq	%rbx
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L21:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	xorl	%eax, %eax
	ret
	.cfi_endproc
.LFE37:
	.size	contain, .-contain
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB38:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$360, %rsp
	.cfi_def_cfa_offset 416
	movq	%fs:40, %rax
	movq	%rax, 344(%rsp)
	xorl	%eax, %eax
	leaq	92(%rsp), %rsi
	leaq	96(%rsp), %r14
	leaq	176(%rsp), %rbx
	movq	%r14, %r13
	call	__isoc99_scanf@PLT
	movl	92(%rsp), %eax
	movq	%rbx, 48(%rsp)
	leaq	97(%rsp), %rbx
	movq	%rbx, 72(%rsp)
	leal	-1(%rax), %edx
	movl	%edx, 92(%rsp)
	testl	%eax, %eax
	je	.L73
	.p2align 4,,10
	.p2align 3
.L31:
	movq	%r13, %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	%r13, %rdi
	movl	$0, ap(%rip)
	call	strlen@PLT
	movq	48(%rsp), %rdi
	movl	$80, %ecx
	movq	%r13, %rsi
	movq	%rax, %rbx
	leaq	1(%rax), %rdx
	call	__memcpy_chk@PLT
	cmpq	$1, %rbx
	jbe	.L91
	leal	-2(%rbx), %eax
	xorl	%r12d, %r12d
	movq	%r13, 16(%rsp)
	movl	%eax, 8(%rsp)
	leal	-1(%rbx), %eax
	movl	%eax, 36(%rsp)
	leaq	-1(%r13,%rbx), %rax
	movq	%rax, 56(%rsp)
	leaq	256(%rsp), %rax
	movq	$1, 24(%rsp)
	movl	24(%rsp), %ebp
	movq	$0, 40(%rsp)
	movq	%rax, 64(%rsp)
	testl	%r12d, %r12d
	je	.L36
	.p2align 4,,10
	.p2align 3
.L72:
	leal	-1(%r12), %eax
	leaq	a(%rip), %r14
	leaq	(%rax,%rax,4), %rbx
	movl	%eax, 32(%rsp)
	leaq	80(%r14), %rax
	salq	$4, %rbx
	addq	%rax, %rbx
	jmp	.L35
	.p2align 4,,10
	.p2align 3
.L145:
	addq	$80, %r14
	cmpq	%rbx, %r14
	je	.L36
.L35:
	movq	%r13, %rsi
	movq	%r14, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L145
	sarl	%ebp
	movl	%ebp, 12(%rsp)
	je	.L85
.L79:
	movl	12(%rsp), %eax
	movq	16(%rsp), %rdx
	leal	-1(%rax), %edi
	movq	%r13, %rax
	addq	72(%rsp), %rdi
	.p2align 4,,10
	.p2align 3
.L37:
	movzbl	(%rdx), %esi
	movzbl	(%rax), %ecx
	addq	$1, %rax
	subq	$1, %rdx
	movb	%sil, -1(%rax)
	movb	%cl, 1(%rdx)
	cmpq	%rdi, %rax
	jne	.L37
.L85:
	movl	32(%rsp), %r14d
	leaq	a(%rip), %rbp
	leaq	80(%rbp), %rax
	leaq	(%r14,%r14,4), %rbx
	salq	$4, %rbx
	addq	%rax, %rbx
	jmp	.L40
	.p2align 4,,10
	.p2align 3
.L147:
	addq	$80, %rbp
	cmpq	%rbx, %rbp
	je	.L146
.L40:
	movq	%r13, %rsi
	movq	%rbp, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L147
	movq	16(%rsp), %rax
	movl	%r12d, %r14d
	leaq	1(%rax), %rbp
	movl	36(%rsp), %eax
	movl	%eax, %ebx
	shrl	$31, %ebx
	addl	%eax, %ebx
	sarl	%ebx
	cmpl	$1, %eax
	jle	.L84
.L78:
	movl	8(%rsp), %edx
	xorl	%eax, %eax
	addq	%rbp, %rdx
	.p2align 4,,10
	.p2align 3
.L42:
	movzbl	(%rdx), %esi
	movzbl	0(%rbp,%rax), %ecx
	subq	$1, %rdx
	movb	%sil, 0(%rbp,%rax)
	addq	$1, %rax
	movb	%cl, 1(%rdx)
	cmpl	%eax, %ebx
	jg	.L42
.L84:
	leal	-1(%r14), %eax
	leaq	a(%rip), %r15
	leaq	(%rax,%rax,4), %r12
	movl	%eax, 32(%rsp)
	leaq	80(%r15), %rax
	salq	$4, %r12
	addq	%rax, %r12
	jmp	.L45
	.p2align 4,,10
	.p2align 3
.L149:
	addq	$80, %r15
	cmpq	%r12, %r15
	je	.L148
.L45:
	movq	%r13, %rsi
	movq	%r15, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L149
	movl	12(%rsp), %eax
	testl	%eax, %eax
	je	.L83
.L77:
	movl	12(%rsp), %eax
	movq	16(%rsp), %rdx
	leal	-1(%rax), %edi
	movq	%r13, %rax
	addq	72(%rsp), %rdi
	.p2align 4,,10
	.p2align 3
.L47:
	movzbl	(%rdx), %esi
	movzbl	(%rax), %ecx
	addq	$1, %rax
	subq	$1, %rdx
	movb	%sil, -1(%rax)
	movb	%cl, 1(%rdx)
	cmpq	%rax, %rdi
	jne	.L47
.L83:
	movl	32(%rsp), %eax
	leaq	a(%rip), %r15
	leaq	(%rax,%rax,4), %r12
	leaq	80(%r15), %rax
	salq	$4, %r12
	addq	%rax, %r12
	jmp	.L50
	.p2align 4,,10
	.p2align 3
.L151:
	addq	$80, %r15
	cmpq	%r15, %r12
	je	.L150
.L50:
	movq	%r13, %rsi
	movq	%r15, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L151
.L49:
	movq	48(%rsp), %rsi
	movl	$80, %edx
	movq	%r13, %rdi
	call	__strcpy_chk@PLT
	movq	16(%rsp), %rax
	movzbl	1(%rax), %edx
	testb	%dl, %dl
	je	.L92
	movl	$1, %eax
	leaq	255(%rsp), %rcx
	.p2align 4,,10
	.p2align 3
.L53:
	movb	%dl, (%rcx,%rax)
	movl	%eax, %r8d
	addq	$1, %rax
	movzbl	-1(%rbp,%rax), %edx
	testb	%dl, %dl
	jne	.L53
.L52:
	movq	24(%rsp), %rdi
	movslq	%r8d, %rax
	addq	64(%rsp), %rax
	movl	%edi, %ecx
	cmpl	$8, %edi
	jnb	.L86
	andl	$4, %edi
	jne	.L152
	testl	%ecx, %ecx
	je	.L87
	movzbl	0(%r13), %edx
	movb	%dl, (%rax)
	testb	$2, %cl
	jne	.L153
.L87:
	movq	40(%rsp), %rax
	movq	64(%rsp), %rsi
	movl	$80, %edx
	movq	%r13, %rdi
	leaq	a(%rip), %r15
	leal	1(%r8,%rax), %eax
	cltq
	movb	$0, 256(%rsp,%rax)
	call	__stpcpy_chk@PLT
	movq	%rax, 16(%rsp)
	movl	32(%rsp), %eax
	leaq	(%rax,%rax,4), %r12
	leaq	80(%r15), %rax
	salq	$4, %r12
	addq	%rax, %r12
	jmp	.L55
	.p2align 4,,10
	.p2align 3
.L155:
	addq	$80, %r15
	cmpq	%r15, %r12
	je	.L154
.L55:
	movq	%r13, %rsi
	movq	%r15, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L155
	cmpl	$1, 36(%rsp)
	jle	.L82
.L76:
	movl	8(%rsp), %eax
	movq	%r13, %rdx
	xorl	%ecx, %ecx
	addq	%r13, %rax
	.p2align 4,,10
	.p2align 3
.L57:
	movzbl	(%rdx), %esi
	movzbl	(%rax), %edi
	addl	$1, %ecx
	addq	$1, %rdx
	subq	$1, %rax
	movb	%dil, -1(%rdx)
	movb	%sil, 1(%rax)
	cmpl	%ebx, %ecx
	jl	.L57
.L82:
	movl	32(%rsp), %eax
	leaq	a(%rip), %r15
	leaq	(%rax,%rax,4), %r12
	leaq	80(%r15), %rax
	salq	$4, %r12
	addq	%rax, %r12
	jmp	.L60
	.p2align 4,,10
	.p2align 3
.L157:
	addq	$80, %r15
	cmpq	%r15, %r12
	je	.L156
.L60:
	movq	%r13, %rsi
	movq	%r15, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L157
	movl	12(%rsp), %edx
	movl	%r14d, %r12d
	testl	%edx, %edx
	je	.L81
.L75:
	movq	56(%rsp), %rcx
	movq	24(%rsp), %rdi
	movl	12(%rsp), %esi
	movq	40(%rsp), %rax
	leaq	-2(%rdi,%rcx), %rdi
	leal	-1(%rsi), %edx
	addq	%rcx, %rax
	subq	%rdx, %rdi
	movq	%rcx, %rdx
	.p2align 4,,10
	.p2align 3
.L62:
	movzbl	(%rdx), %ecx
	movzbl	(%rax), %esi
	subq	$1, %rax
	addq	$1, %rdx
	movb	%sil, -1(%rdx)
	movb	%cl, 1(%rax)
	cmpq	%rax, %rdi
	jne	.L62
.L81:
	leal	-1(%r12), %eax
	leaq	a(%rip), %r14
	leaq	(%rax,%rax,4), %r15
	movl	%eax, 32(%rsp)
	leaq	80(%r14), %rax
	salq	$4, %r15
	addq	%rax, %r15
	jmp	.L65
	.p2align 4,,10
	.p2align 3
.L159:
	addq	$80, %r14
	cmpq	%r14, %r15
	je	.L158
.L65:
	movq	%r13, %rsi
	movq	%r14, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L159
	cmpl	$1, 36(%rsp)
	jle	.L80
.L74:
	movl	8(%rsp), %eax
	movq	%r13, %rdx
	xorl	%ecx, %ecx
	addq	%r13, %rax
	.p2align 4,,10
	.p2align 3
.L67:
	movzbl	(%rdx), %esi
	movzbl	(%rax), %edi
	addl	$1, %ecx
	addq	$1, %rdx
	subq	$1, %rax
	movb	%dil, -1(%rdx)
	movb	%sil, 1(%rax)
	cmpl	%ebx, %ecx
	jl	.L67
.L80:
	movl	32(%rsp), %r14d
	leaq	a(%rip), %r15
	leaq	80(%r15), %rax
	leaq	(%r14,%r14,4), %rbx
	salq	$4, %rbx
	addq	%rax, %rbx
	jmp	.L70
	.p2align 4,,10
	.p2align 3
.L161:
	addq	$80, %r15
	cmpq	%rbx, %r15
	je	.L160
.L70:
	movq	%r13, %rsi
	movq	%r15, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L161
.L69:
	movq	48(%rsp), %rsi
	movl	$80, %edx
	movq	%r13, %rdi
	call	__strcpy_chk@PLT
	subl	$1, 8(%rsp)
	movl	8(%rsp), %eax
	addq	$1, 40(%rsp)
	addq	$1, 24(%rsp)
	subl	$1, 36(%rsp)
	subq	$1, 56(%rsp)
	cmpl	$-1, %eax
	je	.L32
	movq	%rbp, 16(%rsp)
	movl	24(%rsp), %ebp
	testl	%r12d, %r12d
	jne	.L72
	.p2align 4,,10
	.p2align 3
.L36:
	leal	1(%r12), %ebx
	movslq	%r12d, %r12
	leaq	a(%rip), %rax
	movq	%r13, %rsi
	leaq	(%r12,%r12,4), %rdi
	movl	%ebx, ap(%rip)
	movl	%ebx, %r12d
	salq	$4, %rdi
	addq	%rax, %rdi
	call	strcpy@PLT
	leal	-1(%rbx), %eax
	sarl	%ebp
	movl	%eax, 32(%rsp)
	movl	%ebp, 12(%rsp)
	jne	.L79
	jmp	.L85
	.p2align 4,,10
	.p2align 3
.L156:
	leal	1(%r14), %r12d
	movslq	%r14d, %r14
	leaq	a(%rip), %rax
	movq	%r13, %rsi
	leaq	(%r14,%r14,4), %rdi
	movl	%r12d, ap(%rip)
	salq	$4, %rdi
	addq	%rax, %rdi
	call	strcpy@PLT
	movl	12(%rsp), %esi
	testl	%esi, %esi
	jne	.L75
	jmp	.L81
	.p2align 4,,10
	.p2align 3
.L146:
	leal	1(%r12), %r14d
	movslq	%r12d, %r12
	leaq	a(%rip), %rax
	movq	%r13, %rsi
	leaq	(%r12,%r12,4), %rdi
	movl	%r14d, ap(%rip)
	salq	$4, %rdi
	addq	%rax, %rdi
	call	strcpy@PLT
	movq	16(%rsp), %rax
	leaq	1(%rax), %rbp
	movl	36(%rsp), %eax
	movl	%eax, %ebx
	shrl	$31, %ebx
	addl	%eax, %ebx
	sarl	%ebx
	cmpl	$1, %eax
	jg	.L78
	jmp	.L84
	.p2align 4,,10
	.p2align 3
.L86:
	movq	0(%r13), %rdx
	leaq	8(%rax), %rdi
	movq	%r13, %rsi
	andq	$-8, %rdi
	movq	%rdx, (%rax)
	movq	24(%rsp), %r9
	movl	%r9d, %edx
	movq	-8(%r13,%rdx), %rcx
	movq	%rcx, -8(%rax,%rdx)
	subq	%rdi, %rax
	movl	%r9d, %ecx
	addl	%eax, %ecx
	subq	%rax, %rsi
	shrl	$3, %ecx
	rep movsq
	jmp	.L87
	.p2align 4,,10
	.p2align 3
.L154:
	leal	1(%r14), %r12d
	movq	16(%rsp), %r15
	movslq	%r14d, %r14
	movq	%r13, %rsi
	leaq	(%r14,%r14,4), %rdi
	leaq	a(%rip), %rax
	movl	%r12d, %r14d
	movl	%r12d, ap(%rip)
	salq	$4, %rdi
	subq	%r13, %r15
	addq	%rax, %rdi
	leaq	1(%r15), %rdx
	call	memcpy@PLT
	leal	-1(%r12), %eax
	cmpl	$1, 36(%rsp)
	movl	%eax, 32(%rsp)
	jg	.L76
	jmp	.L82
	.p2align 4,,10
	.p2align 3
.L158:
	leal	1(%r12), %r14d
	movslq	%r12d, %r12
	leaq	a(%rip), %rax
	movq	%r13, %rsi
	leaq	(%r12,%r12,4), %rdi
	movl	%r14d, ap(%rip)
	movl	%r14d, %r12d
	salq	$4, %rdi
	addq	%rax, %rdi
	call	strcpy@PLT
	leal	-1(%r14), %eax
	cmpl	$1, 36(%rsp)
	movl	%eax, 32(%rsp)
	jg	.L74
	jmp	.L80
	.p2align 4,,10
	.p2align 3
.L160:
	leal	1(%r12), %ebx
	movslq	%r12d, %r12
	leaq	a(%rip), %rax
	movq	%r13, %rsi
	leaq	(%r12,%r12,4), %rdi
	movl	%ebx, ap(%rip)
	movl	%ebx, %r12d
	salq	$4, %rdi
	addq	%rax, %rdi
	call	strcpy@PLT
	jmp	.L69
	.p2align 4,,10
	.p2align 3
.L148:
	leal	1(%r14), %r12d
	movslq	%r14d, %r14
	leaq	a(%rip), %rax
	movq	%r13, %rsi
	leaq	(%r14,%r14,4), %rdi
	movl	%r12d, ap(%rip)
	movl	%r12d, %r14d
	salq	$4, %rdi
	addq	%rax, %rdi
	call	strcpy@PLT
	movl	12(%rsp), %ecx
	leal	-1(%r12), %eax
	movl	%eax, 32(%rsp)
	testl	%ecx, %ecx
	jne	.L77
	jmp	.L83
	.p2align 4,,10
	.p2align 3
.L150:
	leal	1(%r14), %r12d
	movslq	%r14d, %r14
	leaq	a(%rip), %rax
	movq	%r13, %rsi
	leaq	(%r14,%r14,4), %rdi
	movl	%r12d, ap(%rip)
	movl	%r12d, %r14d
	salq	$4, %rdi
	addq	%rax, %rdi
	call	strcpy@PLT
	leal	-1(%r12), %eax
	movl	%eax, 32(%rsp)
	jmp	.L49
.L91:
	xorl	%r12d, %r12d
	.p2align 4,,10
	.p2align 3
.L32:
	movl	%r12d, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	92(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 92(%rsp)
	testl	%eax, %eax
	jne	.L31
.L73:
	movq	344(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L162
	addq	$360, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L92:
	.cfi_restore_state
	xorl	%r8d, %r8d
	jmp	.L52
.L152:
	movl	0(%r13), %edx
	movl	%edx, (%rax)
	movl	-4(%r13,%rcx), %edx
	movl	%edx, -4(%rax,%rcx)
	jmp	.L87
.L153:
	movzwl	-2(%r13,%rcx), %edx
	movw	%dx, -2(%rax,%rcx)
	jmp	.L87
.L162:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE38:
	.size	main, .-main
	.globl	ap
	.bss
	.align 4
	.type	ap, @object
	.size	ap, 4
ap:
	.zero	4
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 81920
a:
	.zero	81920
	.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	reverse
	.type	reverse, @function
reverse:
.LFB35:
	.cfi_startproc
	endbr64
	movl	%esi, %r8d
	shrl	$31, %r8d
	addl	%esi, %r8d
	sarl	%r8d
	cmpl	$1, %esi
	jle	.L1
	leal	-1(%rsi), %eax
	xorl	%edx, %edx
	cltq
	addq	%rdi, %rax
	.p2align 4,,10
	.p2align 3
.L3:
	movzbl	(%rax), %esi
	movzbl	(%rdi,%rdx), %ecx
	subq	$1, %rax
	movb	%sil, (%rdi,%rdx)
	addq	$1, %rdx
	movb	%cl, 1(%rax)
	cmpl	%edx, %r8d
	jg	.L3
.L1:
	ret
	.cfi_endproc
.LFE35:
	.size	reverse, .-reverse
	.p2align 4
	.globl	swap
	.type	swap, @function
swap:
.LFB36:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movq	%rdi, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$104, %rsp
	.cfi_def_cfa_offset 144
	movzbl	(%rsi), %edx
	movq	%fs:40, %rax
	movq	%rax, 88(%rsp)
	xorl	%eax, %eax
	testb	%dl, %dl
	je	.L12
	movl	$1, %eax
	leaq	-1(%rsp), %rcx
	.p2align 4,,10
	.p2align 3
.L9:
	movb	%dl, (%rcx,%rax)
	movl	%eax, %ebp
	addq	$1, %rax
	movzbl	-1(%rsi,%rax), %edx
	testb	%dl, %dl
	jne	.L9
.L8:
	movq	%rsp, %r13
	cmpq	%r12, %rsi
	je	.L10
	movq	%rsi, %rbx
	movslq	%ebp, %rdi
	movq	%r12, %rsi
	subq	%r12, %rbx
	addq	%r13, %rdi
	movq	%rbx, %rdx
	addl	%ebx, %ebp
	call	memcpy@PLT
.L10:
	movslq	%ebp, %rbp
	movq	%r13, %rsi
	movq	%r12, %rdi
	movb	$0, (%rsp,%rbp)
	call	strcpy@PLT
	movq	88(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	addq	$104, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	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
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	xorl	%ebp, %ebp
	jmp	.L8
.L17:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE36:
	.size	swap, .-swap
	.p2align 4
	.globl	contain
	.type	contain, @function
contain:
.LFB37:
	.cfi_startproc
	endbr64
	movl	ap(%rip), %eax
	testl	%eax, %eax
	jle	.L21
	subl	$1, %eax
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movq	%rdi, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	(%rax,%rax,4), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	a(%rip), %rbx
	salq	$4, %rbp
	leaq	80(%rbx), %rax
	addq	%rax, %rbp
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L29:
	addq	$80, %rbx
	cmpq	%rbp, %rbx
	je	.L28
.L20:
	movq	%r12, %rsi
	movq	%rbx, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L29
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	movl	$1, %eax
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L28:
	.cfi_restore_state
	popq	%rbx
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L21:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	xorl	%eax, %eax
	ret
	.cfi_endproc
.LFE37:
	.size	contain, .-contain
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB38:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$360, %rsp
	.cfi_def_cfa_offset 416
	movq	%fs:40, %rax
	movq	%rax, 344(%rsp)
	xorl	%eax, %eax
	leaq	92(%rsp), %rsi
	leaq	96(%rsp), %r14
	leaq	176(%rsp), %rbx
	movq	%r14, %r13
	call	__isoc99_scanf@PLT
	movl	92(%rsp), %eax
	movq	%rbx, 48(%rsp)
	leaq	97(%rsp), %rbx
	movq	%rbx, 72(%rsp)
	leal	-1(%rax), %edx
	movl	%edx, 92(%rsp)
	testl	%eax, %eax
	je	.L73
	.p2align 4,,10
	.p2align 3
.L31:
	movq	%r13, %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	%r13, %rdi
	movl	$0, ap(%rip)
	call	strlen@PLT
	movq	48(%rsp), %rdi
	movl	$80, %ecx
	movq	%r13, %rsi
	movq	%rax, %rbx
	leaq	1(%rax), %rdx
	call	__memcpy_chk@PLT
	cmpq	$1, %rbx
	jbe	.L91
	leal	-2(%rbx), %eax
	xorl	%r12d, %r12d
	movq	%r13, 16(%rsp)
	movl	%eax, 8(%rsp)
	leal	-1(%rbx), %eax
	movl	%eax, 36(%rsp)
	leaq	-1(%r13,%rbx), %rax
	movq	%rax, 56(%rsp)
	leaq	256(%rsp), %rax
	movq	$1, 24(%rsp)
	movl	24(%rsp), %ebp
	movq	$0, 40(%rsp)
	movq	%rax, 64(%rsp)
	testl	%r12d, %r12d
	je	.L36
	.p2align 4,,10
	.p2align 3
.L72:
	leal	-1(%r12), %eax
	leaq	a(%rip), %r14
	leaq	(%rax,%rax,4), %rbx
	movl	%eax, 32(%rsp)
	leaq	80(%r14), %rax
	salq	$4, %rbx
	addq	%rax, %rbx
	jmp	.L35
	.p2align 4,,10
	.p2align 3
.L145:
	addq	$80, %r14
	cmpq	%rbx, %r14
	je	.L36
.L35:
	movq	%r13, %rsi
	movq	%r14, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L145
	sarl	%ebp
	movl	%ebp, 12(%rsp)
	je	.L85
.L79:
	movl	12(%rsp), %eax
	movq	16(%rsp), %rdx
	leal	-1(%rax), %edi
	movq	%r13, %rax
	addq	72(%rsp), %rdi
	.p2align 4,,10
	.p2align 3
.L37:
	movzbl	(%rdx), %esi
	movzbl	(%rax), %ecx
	addq	$1, %rax
	subq	$1, %rdx
	movb	%sil, -1(%rax)
	movb	%cl, 1(%rdx)
	cmpq	%rdi, %rax
	jne	.L37
.L85:
	movl	32(%rsp), %r14d
	leaq	a(%rip), %rbp
	leaq	80(%rbp), %rax
	leaq	(%r14,%r14,4), %rbx
	salq	$4, %rbx
	addq	%rax, %rbx
	jmp	.L40
	.p2align 4,,10
	.p2align 3
.L147:
	addq	$80, %rbp
	cmpq	%rbx, %rbp
	je	.L146
.L40:
	movq	%r13, %rsi
	movq	%rbp, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L147
	movq	16(%rsp), %rax
	movl	%r12d, %r14d
	leaq	1(%rax), %rbp
	movl	36(%rsp), %eax
	movl	%eax, %ebx
	shrl	$31, %ebx
	addl	%eax, %ebx
	sarl	%ebx
	cmpl	$1, %eax
	jle	.L84
.L78:
	movl	8(%rsp), %edx
	xorl	%eax, %eax
	addq	%rbp, %rdx
	.p2align 4,,10
	.p2align 3
.L42:
	movzbl	(%rdx), %esi
	movzbl	0(%rbp,%rax), %ecx
	subq	$1, %rdx
	movb	%sil, 0(%rbp,%rax)
	addq	$1, %rax
	movb	%cl, 1(%rdx)
	cmpl	%eax, %ebx
	jg	.L42
.L84:
	leal	-1(%r14), %eax
	leaq	a(%rip), %r15
	leaq	(%rax,%rax,4), %r12
	movl	%eax, 32(%rsp)
	leaq	80(%r15), %rax
	salq	$4, %r12
	addq	%rax, %r12
	jmp	.L45
	.p2align 4,,10
	.p2align 3
.L149:
	addq	$80, %r15
	cmpq	%r12, %r15
	je	.L148
.L45:
	movq	%r13, %rsi
	movq	%r15, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L149
	movl	12(%rsp), %eax
	testl	%eax, %eax
	je	.L83
.L77:
	movl	12(%rsp), %eax
	movq	16(%rsp), %rdx
	leal	-1(%rax), %edi
	movq	%r13, %rax
	addq	72(%rsp), %rdi
	.p2align 4,,10
	.p2align 3
.L47:
	movzbl	(%rdx), %esi
	movzbl	(%rax), %ecx
	addq	$1, %rax
	subq	$1, %rdx
	movb	%sil, -1(%rax)
	movb	%cl, 1(%rdx)
	cmpq	%rax, %rdi
	jne	.L47
.L83:
	movl	32(%rsp), %eax
	leaq	a(%rip), %r15
	leaq	(%rax,%rax,4), %r12
	leaq	80(%r15), %rax
	salq	$4, %r12
	addq	%rax, %r12
	jmp	.L50
	.p2align 4,,10
	.p2align 3
.L151:
	addq	$80, %r15
	cmpq	%r15, %r12
	je	.L150
.L50:
	movq	%r13, %rsi
	movq	%r15, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L151
.L49:
	movq	48(%rsp), %rsi
	movl	$80, %edx
	movq	%r13, %rdi
	call	__strcpy_chk@PLT
	movq	16(%rsp), %rax
	movzbl	1(%rax), %edx
	testb	%dl, %dl
	je	.L92
	movl	$1, %eax
	leaq	255(%rsp), %rcx
	.p2align 4,,10
	.p2align 3
.L53:
	movb	%dl, (%rcx,%rax)
	movl	%eax, %r8d
	addq	$1, %rax
	movzbl	-1(%rbp,%rax), %edx
	testb	%dl, %dl
	jne	.L53
.L52:
	movq	24(%rsp), %rdi
	movslq	%r8d, %rax
	addq	64(%rsp), %rax
	movl	%edi, %ecx
	cmpl	$8, %edi
	jnb	.L86
	andl	$4, %edi
	jne	.L152
	testl	%ecx, %ecx
	je	.L87
	movzbl	0(%r13), %edx
	movb	%dl, (%rax)
	testb	$2, %cl
	jne	.L153
.L87:
	movq	40(%rsp), %rax
	movq	64(%rsp), %rsi
	movl	$80, %edx
	movq	%r13, %rdi
	leaq	a(%rip), %r15
	leal	1(%r8,%rax), %eax
	cltq
	movb	$0, 256(%rsp,%rax)
	call	__stpcpy_chk@PLT
	movq	%rax, 16(%rsp)
	movl	32(%rsp), %eax
	leaq	(%rax,%rax,4), %r12
	leaq	80(%r15), %rax
	salq	$4, %r12
	addq	%rax, %r12
	jmp	.L55
	.p2align 4,,10
	.p2align 3
.L155:
	addq	$80, %r15
	cmpq	%r15, %r12
	je	.L154
.L55:
	movq	%r13, %rsi
	movq	%r15, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L155
	cmpl	$1, 36(%rsp)
	jle	.L82
.L76:
	movl	8(%rsp), %eax
	movq	%r13, %rdx
	xorl	%ecx, %ecx
	addq	%r13, %rax
	.p2align 4,,10
	.p2align 3
.L57:
	movzbl	(%rdx), %esi
	movzbl	(%rax), %edi
	addl	$1, %ecx
	addq	$1, %rdx
	subq	$1, %rax
	movb	%dil, -1(%rdx)
	movb	%sil, 1(%rax)
	cmpl	%ebx, %ecx
	jl	.L57
.L82:
	movl	32(%rsp), %eax
	leaq	a(%rip), %r15
	leaq	(%rax,%rax,4), %r12
	leaq	80(%r15), %rax
	salq	$4, %r12
	addq	%rax, %r12
	jmp	.L60
	.p2align 4,,10
	.p2align 3
.L157:
	addq	$80, %r15
	cmpq	%r15, %r12
	je	.L156
.L60:
	movq	%r13, %rsi
	movq	%r15, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L157
	movl	12(%rsp), %edx
	movl	%r14d, %r12d
	testl	%edx, %edx
	je	.L81
.L75:
	movq	56(%rsp), %rcx
	movq	24(%rsp), %rdi
	movl	12(%rsp), %esi
	movq	40(%rsp), %rax
	leaq	-2(%rdi,%rcx), %rdi
	leal	-1(%rsi), %edx
	addq	%rcx, %rax
	subq	%rdx, %rdi
	movq	%rcx, %rdx
	.p2align 4,,10
	.p2align 3
.L62:
	movzbl	(%rdx), %ecx
	movzbl	(%rax), %esi
	subq	$1, %rax
	addq	$1, %rdx
	movb	%sil, -1(%rdx)
	movb	%cl, 1(%rax)
	cmpq	%rax, %rdi
	jne	.L62
.L81:
	leal	-1(%r12), %eax
	leaq	a(%rip), %r14
	leaq	(%rax,%rax,4), %r15
	movl	%eax, 32(%rsp)
	leaq	80(%r14), %rax
	salq	$4, %r15
	addq	%rax, %r15
	jmp	.L65
	.p2align 4,,10
	.p2align 3
.L159:
	addq	$80, %r14
	cmpq	%r14, %r15
	je	.L158
.L65:
	movq	%r13, %rsi
	movq	%r14, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L159
	cmpl	$1, 36(%rsp)
	jle	.L80
.L74:
	movl	8(%rsp), %eax
	movq	%r13, %rdx
	xorl	%ecx, %ecx
	addq	%r13, %rax
	.p2align 4,,10
	.p2align 3
.L67:
	movzbl	(%rdx), %esi
	movzbl	(%rax), %edi
	addl	$1, %ecx
	addq	$1, %rdx
	subq	$1, %rax
	movb	%dil, -1(%rdx)
	movb	%sil, 1(%rax)
	cmpl	%ebx, %ecx
	jl	.L67
.L80:
	movl	32(%rsp), %r14d
	leaq	a(%rip), %r15
	leaq	80(%r15), %rax
	leaq	(%r14,%r14,4), %rbx
	salq	$4, %rbx
	addq	%rax, %rbx
	jmp	.L70
	.p2align 4,,10
	.p2align 3
.L161:
	addq	$80, %r15
	cmpq	%rbx, %r15
	je	.L160
.L70:
	movq	%r13, %rsi
	movq	%r15, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L161
.L69:
	movq	48(%rsp), %rsi
	movl	$80, %edx
	movq	%r13, %rdi
	call	__strcpy_chk@PLT
	subl	$1, 8(%rsp)
	movl	8(%rsp), %eax
	addq	$1, 40(%rsp)
	addq	$1, 24(%rsp)
	subl	$1, 36(%rsp)
	subq	$1, 56(%rsp)
	cmpl	$-1, %eax
	je	.L32
	movq	%rbp, 16(%rsp)
	movl	24(%rsp), %ebp
	testl	%r12d, %r12d
	jne	.L72
	.p2align 4,,10
	.p2align 3
.L36:
	leal	1(%r12), %ebx
	movslq	%r12d, %r12
	leaq	a(%rip), %rax
	movq	%r13, %rsi
	leaq	(%r12,%r12,4), %rdi
	movl	%ebx, ap(%rip)
	movl	%ebx, %r12d
	salq	$4, %rdi
	addq	%rax, %rdi
	call	strcpy@PLT
	leal	-1(%rbx), %eax
	sarl	%ebp
	movl	%eax, 32(%rsp)
	movl	%ebp, 12(%rsp)
	jne	.L79
	jmp	.L85
	.p2align 4,,10
	.p2align 3
.L156:
	leal	1(%r14), %r12d
	movslq	%r14d, %r14
	leaq	a(%rip), %rax
	movq	%r13, %rsi
	leaq	(%r14,%r14,4), %rdi
	movl	%r12d, ap(%rip)
	salq	$4, %rdi
	addq	%rax, %rdi
	call	strcpy@PLT
	movl	12(%rsp), %esi
	testl	%esi, %esi
	jne	.L75
	jmp	.L81
	.p2align 4,,10
	.p2align 3
.L146:
	leal	1(%r12), %r14d
	movslq	%r12d, %r12
	leaq	a(%rip), %rax
	movq	%r13, %rsi
	leaq	(%r12,%r12,4), %rdi
	movl	%r14d, ap(%rip)
	salq	$4, %rdi
	addq	%rax, %rdi
	call	strcpy@PLT
	movq	16(%rsp), %rax
	leaq	1(%rax), %rbp
	movl	36(%rsp), %eax
	movl	%eax, %ebx
	shrl	$31, %ebx
	addl	%eax, %ebx
	sarl	%ebx
	cmpl	$1, %eax
	jg	.L78
	jmp	.L84
	.p2align 4,,10
	.p2align 3
.L86:
	movq	0(%r13), %rdx
	leaq	8(%rax), %rdi
	movq	%r13, %rsi
	andq	$-8, %rdi
	movq	%rdx, (%rax)
	movq	24(%rsp), %r9
	movl	%r9d, %edx
	movq	-8(%r13,%rdx), %rcx
	movq	%rcx, -8(%rax,%rdx)
	subq	%rdi, %rax
	movl	%r9d, %ecx
	addl	%eax, %ecx
	subq	%rax, %rsi
	shrl	$3, %ecx
	rep movsq
	jmp	.L87
	.p2align 4,,10
	.p2align 3
.L154:
	leal	1(%r14), %r12d
	movq	16(%rsp), %r15
	movslq	%r14d, %r14
	movq	%r13, %rsi
	leaq	(%r14,%r14,4), %rdi
	leaq	a(%rip), %rax
	movl	%r12d, %r14d
	movl	%r12d, ap(%rip)
	salq	$4, %rdi
	subq	%r13, %r15
	addq	%rax, %rdi
	leaq	1(%r15), %rdx
	call	memcpy@PLT
	leal	-1(%r12), %eax
	cmpl	$1, 36(%rsp)
	movl	%eax, 32(%rsp)
	jg	.L76
	jmp	.L82
	.p2align 4,,10
	.p2align 3
.L158:
	leal	1(%r12), %r14d
	movslq	%r12d, %r12
	leaq	a(%rip), %rax
	movq	%r13, %rsi
	leaq	(%r12,%r12,4), %rdi
	movl	%r14d, ap(%rip)
	movl	%r14d, %r12d
	salq	$4, %rdi
	addq	%rax, %rdi
	call	strcpy@PLT
	leal	-1(%r14), %eax
	cmpl	$1, 36(%rsp)
	movl	%eax, 32(%rsp)
	jg	.L74
	jmp	.L80
	.p2align 4,,10
	.p2align 3
.L160:
	leal	1(%r12), %ebx
	movslq	%r12d, %r12
	leaq	a(%rip), %rax
	movq	%r13, %rsi
	leaq	(%r12,%r12,4), %rdi
	movl	%ebx, ap(%rip)
	movl	%ebx, %r12d
	salq	$4, %rdi
	addq	%rax, %rdi
	call	strcpy@PLT
	jmp	.L69
	.p2align 4,,10
	.p2align 3
.L148:
	leal	1(%r14), %r12d
	movslq	%r14d, %r14
	leaq	a(%rip), %rax
	movq	%r13, %rsi
	leaq	(%r14,%r14,4), %rdi
	movl	%r12d, ap(%rip)
	movl	%r12d, %r14d
	salq	$4, %rdi
	addq	%rax, %rdi
	call	strcpy@PLT
	movl	12(%rsp), %ecx
	leal	-1(%r12), %eax
	movl	%eax, 32(%rsp)
	testl	%ecx, %ecx
	jne	.L77
	jmp	.L83
	.p2align 4,,10
	.p2align 3
.L150:
	leal	1(%r14), %r12d
	movslq	%r14d, %r14
	leaq	a(%rip), %rax
	movq	%r13, %rsi
	leaq	(%r14,%r14,4), %rdi
	movl	%r12d, ap(%rip)
	movl	%r12d, %r14d
	salq	$4, %rdi
	addq	%rax, %rdi
	call	strcpy@PLT
	leal	-1(%r12), %eax
	movl	%eax, 32(%rsp)
	jmp	.L49
.L91:
	xorl	%r12d, %r12d
	.p2align 4,,10
	.p2align 3
.L32:
	movl	%r12d, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	92(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 92(%rsp)
	testl	%eax, %eax
	jne	.L31
.L73:
	movq	344(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L162
	addq	$360, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L92:
	.cfi_restore_state
	xorl	%r8d, %r8d
	jmp	.L52
.L152:
	movl	0(%r13), %edx
	movl	%edx, (%rax)
	movl	-4(%r13,%rcx), %edx
	movl	%edx, -4(%rax,%rcx)
	jmp	.L87
.L153:
	movzwl	-2(%r13,%rcx), %edx
	movw	%dx, -2(%rax,%rcx)
	jmp	.L87
.L162:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE38:
	.size	main, .-main
	.globl	ap
	.bss
	.align 4
	.type	ap, @object
	.size	ap, 4
ap:
	.zero	4
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 81920
a:
	.zero	81920
	.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 <stdio.h>
#include <string.h>

char a[1024][80];
int ap;

void reverse(char *s, int n)
{
    int i;
    for(i=0;i<n/2;++i) {
        char t=s[i];
        s[i]=s[n-1-i];
        s[n-1-i]=t;
    }
}
void swap(char *s1, char *s2)
{
    int i=0;
    char t[80], *p;
    for(p=s2;*p;++p) t[i++]=*p;
    for(p=s1;p!=s2;++p) t[i++]=*p;
    t[i]=0;
    strcpy(s1, t);
}
int contain(char* s)
{
    int i;
    for(i=0;i<ap;++i) if (!strcmp(a[i], s)) return 1;
    return 0;
}

int main(void)
{
    int n;
    scanf("%d", &n);
    while (n--) {
        int i, len;
        char s[80], t[80];
        scanf("%s", s);

        ap=0;
        len=strlen(s);
        strcpy(t, s);
        for(i=1;i<len;++i) {
            if (!contain(s)) strcpy(a[ap++], s);
            reverse(s, i); if (!contain(s)) strcpy(a[ap++], s);
            reverse(s+i, len-i); if (!contain(s)) strcpy(a[ap++], s);
            reverse(s, i); if (!contain(s)) strcpy(a[ap++], s);
            strcpy(s, t);
            swap(s, s+i);
            if (!contain(s)) strcpy(a[ap++], s);
            reverse(s, len-i); if (!contain(s)) strcpy(a[ap++], s);
            reverse(s+len-i, i); if (!contain(s)) strcpy(a[ap++], s);
            reverse(s, len-i); if (!contain(s)) strcpy(a[ap++], s);
            strcpy(s, t);
        }
        printf("%d\n", ap);
    }
    return 0;
}
4
aa
abba
bbcd
abcde
 4
ab
abba
bbcd
edcba
 4
b`
abba
bcbe
bbced
 4
`b
abba
bebe
becbd
 4
`b
aabb
bebe
becbd
 4
`c
aabb
bebe
becce
 4
e`
a`bb
bbee
eddeb
 4
e`
a`ba
bbee
eddeb
 4
_f
a`ba
ebbe
eddea
 4
_e
a`ba
ebbf
eddea

1
6
8
18
 2
6
8
18
 2
6
8
14
 2
6
4
18
 2
4
4
18
 2
4
4
13
 2
8
4
13
 2
12
4
13
 2
12
6
13
 2
12
12
13

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

```c
#include <stdio.h>
#include <string.h>

char a[1024][80];
int ap;

void reverse(char *s, int n)
{
    int i;
    for(i=0;i<n/2;++i) {
        char t=s[i];
        s[i]=s[n-1-i];
        s[n-1-i]=t;
    }
}
void swap(char *s1, char *s2)
{
    int i=0;
    char t[80], *p;
    for(p=s2;*p;++p) t[i++]=*p;
    for(p=s1;p!=s2;++p) t[i++]=*p;
    t[i]=0;
    strcpy(s1, t);
}
int contain(char* s)
{
    int i;
    for(i=0;i<ap;++i) if (!strcmp(a[i], s)) return 1;
    return 0;
}

int main(void)
{
    int n;
    scanf("%d", &n);
    while (n--) {
        int i, len;
        char s[80], t[80];
        scanf("%s", s);

        ap=0;
        len=strlen(s);
        strcpy(t, s);
        for(i=1;i<len;++i) {
            if (!contain(s)) strcpy(a[ap++], s);
            reverse(s, i); if (!contain(s)) strcpy(a[ap++], s);
            reverse(s+i, len-i); if (!contain(s)) strcpy(a[ap++], s);
            reverse(s, i); if (!contain(s)) strcpy(a[ap++], s);
            strcpy(s, t);
            swap(s, s+i);
            if (!contain(s)) strcpy(a[ap++], s);
            reverse(s, len-i); if (!contain(s)) strcpy(a[ap++], s);
            reverse(s+len-i, i); if (!contain(s)) strcpy(a[ap++], s);
            reverse(s, len-i); if (!contain(s)) strcpy(a[ap++], s);
            strcpy(s, t);
        }
        printf("%d\n", ap);
    }
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 81920
a:
	.zero	81920
	.globl	ap
	.align 4
	.type	ap, @object
	.size	ap, 4
ap:
	.zero	4
	.text
	.globl	reverse
	.type	reverse, @function
reverse:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L2
.L3:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	movb	%al, -5(%rbp)
	movl	-28(%rbp), %eax
	subl	$1, %eax
	subl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	-4(%rbp), %edx
	movslq	%edx, %rcx
	movq	-24(%rbp), %rdx
	addq	%rcx, %rdx
	movzbl	(%rax), %eax
	movb	%al, (%rdx)
	movl	-28(%rbp), %eax
	subl	$1, %eax
	subl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	-24(%rbp), %rax
	addq	%rax, %rdx
	movzbl	-5(%rbp), %eax
	movb	%al, (%rdx)
	addl	$1, -4(%rbp)
.L2:
	movl	-28(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cmpl	%eax, -4(%rbp)
	jl	.L3
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	reverse, .-reverse
	.globl	swap
	.type	swap, @function
swap:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	addq	$-128, %rsp
	movq	%rdi, -120(%rbp)
	movq	%rsi, -128(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -108(%rbp)
	movq	-128(%rbp), %rax
	movq	%rax, -104(%rbp)
	jmp	.L5
.L6:
	movl	-108(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -108(%rbp)
	movq	-104(%rbp), %rdx
	movzbl	(%rdx), %edx
	cltq
	movb	%dl, -96(%rbp,%rax)
	addq	$1, -104(%rbp)
.L5:
	movq	-104(%rbp), %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	jne	.L6
	movq	-120(%rbp), %rax
	movq	%rax, -104(%rbp)
	jmp	.L7
.L8:
	movl	-108(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -108(%rbp)
	movq	-104(%rbp), %rdx
	movzbl	(%rdx), %edx
	cltq
	movb	%dl, -96(%rbp,%rax)
	addq	$1, -104(%rbp)
.L7:
	movq	-104(%rbp), %rax
	cmpq	-128(%rbp), %rax
	jne	.L8
	movl	-108(%rbp), %eax
	cltq
	movb	$0, -96(%rbp,%rax)
	leaq	-96(%rbp), %rdx
	movq	-120(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcpy@PLT
	nop
	movq	-8(%rbp), %rax
	subq	%fs:40, %rax
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	swap, .-swap
	.globl	contain
	.type	contain, @function
contain:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L11
.L14:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$4, %rax
	leaq	a(%rip), %rdx
	addq	%rax, %rdx
	movq	-24(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L12
	movl	$1, %eax
	jmp	.L13
.L12:
	addl	$1, -4(%rbp)
.L11:
	movl	ap(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L14
	movl	$0, %eax
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	contain, .-contain
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$192, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-188(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L16
.L27:
	leaq	-176(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, ap(%rip)
	leaq	-176(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -180(%rbp)
	leaq	-176(%rbp), %rdx
	leaq	-96(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcpy@PLT
	movl	$1, -184(%rbp)
	jmp	.L17
.L26:
	leaq	-176(%rbp), %rax
	movq	%rax, %rdi
	call	contain
	testl	%eax, %eax
	jne	.L18
	movl	ap(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, ap(%rip)
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$4, %rax
	leaq	a(%rip), %rdx
	addq	%rax, %rdx
	leaq	-176(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
.L18:
	movl	-184(%rbp), %edx
	leaq	-176(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	reverse
	leaq	-176(%rbp), %rax
	movq	%rax, %rdi
	call	contain
	testl	%eax, %eax
	jne	.L19
	movl	ap(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, ap(%rip)
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$4, %rax
	leaq	a(%rip), %rdx
	addq	%rax, %rdx
	leaq	-176(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
.L19:
	movl	-180(%rbp), %eax
	subl	-184(%rbp), %eax
	movl	-184(%rbp), %edx
	movslq	%edx, %rdx
	leaq	-176(%rbp), %rcx
	addq	%rcx, %rdx
	movl	%eax, %esi
	movq	%rdx, %rdi
	call	reverse
	leaq	-176(%rbp), %rax
	movq	%rax, %rdi
	call	contain
	testl	%eax, %eax
	jne	.L20
	movl	ap(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, ap(%rip)
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$4, %rax
	leaq	a(%rip), %rdx
	addq	%rax, %rdx
	leaq	-176(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
.L20:
	movl	-184(%rbp), %edx
	leaq	-176(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	reverse
	leaq	-176(%rbp), %rax
	movq	%rax, %rdi
	call	contain
	testl	%eax, %eax
	jne	.L21
	movl	ap(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, ap(%rip)
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$4, %rax
	leaq	a(%rip), %rdx
	addq	%rax, %rdx
	leaq	-176(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
.L21:
	leaq	-96(%rbp), %rdx
	leaq	-176(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcpy@PLT
	movl	-184(%rbp), %eax
	cltq
	leaq	-176(%rbp), %rdx
	addq	%rax, %rdx
	leaq	-176(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	swap
	leaq	-176(%rbp), %rax
	movq	%rax, %rdi
	call	contain
	testl	%eax, %eax
	jne	.L22
	movl	ap(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, ap(%rip)
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$4, %rax
	leaq	a(%rip), %rdx
	addq	%rax, %rdx
	leaq	-176(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
.L22:
	movl	-180(%rbp), %eax
	subl	-184(%rbp), %eax
	movl	%eax, %edx
	leaq	-176(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	reverse
	leaq	-176(%rbp), %rax
	movq	%rax, %rdi
	call	contain
	testl	%eax, %eax
	jne	.L23
	movl	ap(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, ap(%rip)
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$4, %rax
	leaq	a(%rip), %rdx
	addq	%rax, %rdx
	leaq	-176(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
.L23:
	movl	-180(%rbp), %eax
	cltq
	movl	-184(%rbp), %edx
	movslq	%edx, %rdx
	subq	%rdx, %rax
	movq	%rax, %rcx
	leaq	-176(%rbp), %rax
	leaq	(%rax,%rcx), %rdx
	movl	-184(%rbp), %eax
	movl	%eax, %esi
	movq	%rdx, %rdi
	call	reverse
	leaq	-176(%rbp), %rax
	movq	%rax, %rdi
	call	contain
	testl	%eax, %eax
	jne	.L24
	movl	ap(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, ap(%rip)
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$4, %rax
	leaq	a(%rip), %rdx
	addq	%rax, %rdx
	leaq	-176(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
.L24:
	movl	-180(%rbp), %eax
	subl	-184(%rbp), %eax
	movl	%eax, %edx
	leaq	-176(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	reverse
	leaq	-176(%rbp), %rax
	movq	%rax, %rdi
	call	contain
	testl	%eax, %eax
	jne	.L25
	movl	ap(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, ap(%rip)
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$4, %rax
	leaq	a(%rip), %rdx
	addq	%rax, %rdx
	leaq	-176(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
.L25:
	leaq	-96(%rbp), %rdx
	leaq	-176(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcpy@PLT
	addl	$1, -184(%rbp)
.L17:
	movl	-184(%rbp), %eax
	cmpl	-180(%rbp), %eax
	jl	.L26
	movl	ap(%rip), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L16:
	movl	-188(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -188(%rbp)
	testl	%eax, %eax
	jne	.L27
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L29
	call	__stack_chk_fail@PLT
.L29:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.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	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 81920
a:
	.zero	81920
	.globl	ap
	.align 4
	.type	ap, @object
	.size	ap, 4
ap:
	.zero	4
	.text
	.globl	reverse
	.type	reverse, @function
reverse:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L2
.L3:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	movb	%al, -5(%rbp)
	movl	-28(%rbp), %eax
	subl	$1, %eax
	subl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	-4(%rbp), %edx
	movslq	%edx, %rcx
	movq	-24(%rbp), %rdx
	addq	%rcx, %rdx
	movzbl	(%rax), %eax
	movb	%al, (%rdx)
	movl	-28(%rbp), %eax
	subl	$1, %eax
	subl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	-24(%rbp), %rax
	addq	%rax, %rdx
	movzbl	-5(%rbp), %eax
	movb	%al, (%rdx)
	addl	$1, -4(%rbp)
.L2:
	movl	-28(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cmpl	%eax, -4(%rbp)
	jl	.L3
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	reverse, .-reverse
	.globl	swap
	.type	swap, @function
swap:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	addq	$-128, %rsp
	movq	%rdi, -120(%rbp)
	movq	%rsi, -128(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -108(%rbp)
	movq	-128(%rbp), %rax
	movq	%rax, -104(%rbp)
	jmp	.L5
.L6:
	movl	-108(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -108(%rbp)
	movq	-104(%rbp), %rdx
	movzbl	(%rdx), %edx
	cltq
	movb	%dl, -96(%rbp,%rax)
	addq	$1, -104(%rbp)
.L5:
	movq	-104(%rbp), %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	jne	.L6
	movq	-120(%rbp), %rax
	movq	%rax, -104(%rbp)
	jmp	.L7
.L8:
	movl	-108(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -108(%rbp)
	movq	-104(%rbp), %rdx
	movzbl	(%rdx), %edx
	cltq
	movb	%dl, -96(%rbp,%rax)
	addq	$1, -104(%rbp)
.L7:
	movq	-104(%rbp), %rax
	cmpq	-128(%rbp), %rax
	jne	.L8
	movl	-108(%rbp), %eax
	cltq
	movb	$0, -96(%rbp,%rax)
	leaq	-96(%rbp), %rdx
	movq	-120(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcpy@PLT
	nop
	movq	-8(%rbp), %rax
	subq	%fs:40, %rax
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	swap, .-swap
	.globl	contain
	.type	contain, @function
contain:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L11
.L14:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$4, %rax
	leaq	a(%rip), %rdx
	addq	%rax, %rdx
	movq	-24(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L12
	movl	$1, %eax
	jmp	.L13
.L12:
	addl	$1, -4(%rbp)
.L11:
	movl	ap(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L14
	movl	$0, %eax
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	contain, .-contain
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$192, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-188(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L16
.L27:
	leaq	-176(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, ap(%rip)
	leaq	-176(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -180(%rbp)
	leaq	-176(%rbp), %rdx
	leaq	-96(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcpy@PLT
	movl	$1, -184(%rbp)
	jmp	.L17
.L26:
	leaq	-176(%rbp), %rax
	movq	%rax, %rdi
	call	contain
	testl	%eax, %eax
	jne	.L18
	movl	ap(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, ap(%rip)
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$4, %rax
	leaq	a(%rip), %rdx
	addq	%rax, %rdx
	leaq	-176(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
.L18:
	movl	-184(%rbp), %edx
	leaq	-176(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	reverse
	leaq	-176(%rbp), %rax
	movq	%rax, %rdi
	call	contain
	testl	%eax, %eax
	jne	.L19
	movl	ap(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, ap(%rip)
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$4, %rax
	leaq	a(%rip), %rdx
	addq	%rax, %rdx
	leaq	-176(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
.L19:
	movl	-180(%rbp), %eax
	subl	-184(%rbp), %eax
	movl	-184(%rbp), %edx
	movslq	%edx, %rdx
	leaq	-176(%rbp), %rcx
	addq	%rcx, %rdx
	movl	%eax, %esi
	movq	%rdx, %rdi
	call	reverse
	leaq	-176(%rbp), %rax
	movq	%rax, %rdi
	call	contain
	testl	%eax, %eax
	jne	.L20
	movl	ap(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, ap(%rip)
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$4, %rax
	leaq	a(%rip), %rdx
	addq	%rax, %rdx
	leaq	-176(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
.L20:
	movl	-184(%rbp), %edx
	leaq	-176(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	reverse
	leaq	-176(%rbp), %rax
	movq	%rax, %rdi
	call	contain
	testl	%eax, %eax
	jne	.L21
	movl	ap(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, ap(%rip)
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$4, %rax
	leaq	a(%rip), %rdx
	addq	%rax, %rdx
	leaq	-176(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
.L21:
	leaq	-96(%rbp), %rdx
	leaq	-176(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcpy@PLT
	movl	-184(%rbp), %eax
	cltq
	leaq	-176(%rbp), %rdx
	addq	%rax, %rdx
	leaq	-176(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	swap
	leaq	-176(%rbp), %rax
	movq	%rax, %rdi
	call	contain
	testl	%eax, %eax
	jne	.L22
	movl	ap(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, ap(%rip)
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$4, %rax
	leaq	a(%rip), %rdx
	addq	%rax, %rdx
	leaq	-176(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
.L22:
	movl	-180(%rbp), %eax
	subl	-184(%rbp), %eax
	movl	%eax, %edx
	leaq	-176(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	reverse
	leaq	-176(%rbp), %rax
	movq	%rax, %rdi
	call	contain
	testl	%eax, %eax
	jne	.L23
	movl	ap(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, ap(%rip)
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$4, %rax
	leaq	a(%rip), %rdx
	addq	%rax, %rdx
	leaq	-176(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
.L23:
	movl	-180(%rbp), %eax
	cltq
	movl	-184(%rbp), %edx
	movslq	%edx, %rdx
	subq	%rdx, %rax
	movq	%rax, %rcx
	leaq	-176(%rbp), %rax
	leaq	(%rax,%rcx), %rdx
	movl	-184(%rbp), %eax
	movl	%eax, %esi
	movq	%rdx, %rdi
	call	reverse
	leaq	-176(%rbp), %rax
	movq	%rax, %rdi
	call	contain
	testl	%eax, %eax
	jne	.L24
	movl	ap(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, ap(%rip)
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$4, %rax
	leaq	a(%rip), %rdx
	addq	%rax, %rdx
	leaq	-176(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
.L24:
	movl	-180(%rbp), %eax
	subl	-184(%rbp), %eax
	movl	%eax, %edx
	leaq	-176(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	reverse
	leaq	-176(%rbp), %rax
	movq	%rax, %rdi
	call	contain
	testl	%eax, %eax
	jne	.L25
	movl	ap(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, ap(%rip)
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$4, %rax
	leaq	a(%rip), %rdx
	addq	%rax, %rdx
	leaq	-176(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
.L25:
	leaq	-96(%rbp), %rdx
	leaq	-176(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcpy@PLT
	addl	$1, -184(%rbp)
.L17:
	movl	-184(%rbp), %eax
	cmpl	-180(%rbp), %eax
	jl	.L26
	movl	ap(%rip), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L16:
	movl	-188(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -188(%rbp)
	testl	%eax, %eax
	jne	.L27
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L29
	call	__stack_chk_fail@PLT
.L29:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.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:
