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

```c

//#include "pch.h"
#include <stdio.h>
#include <math.h>
#include <string.h>
#include <stdlib.h>

#define ll long long
#define fr(i,l,r) for(i=(l);i<(r);i++)
#define min(p,q) ((p)<(q)?(p):(q))
#define max(p,q) ((p)>(q)?(p):(q))
#define INF 1000000000000//10^12


int main(void)
{
	//変数の宣言
	int n;
	char s[60][60];
	int strtemp[30];
	int strans[30];

	//よく使う変数
	int i,j,k,l;
	int flag=0;
	int ans=0;
	int count=0;
	int temp,temp1,temp2;
	int max,min;
	int len;
	int sum=0;
	
	
	//データの読み込み
	scanf("%d",&n);
//	scanf_s("%d",&n);

	for(i=0;i<n;i++){
		scanf("%s",&s[i]);
//		scanf_s("\n%s",&s[i],60);	
//		printf("s[%d]=%s",i,s[i]);
	}

	for(i=0;i<30;i++){
		strtemp[i]=0;
		strans[i]=0;
	}

	//	printf("nは%dです\n", n);
	//	printf("データの読み込み終了\n");
	//実際の処理
	
	for(i=0;i<n;i++){
		len=strlen(s[i]);
		for(j=0;j<len;j++){
//			printf("s[i][j]=%d",s[i][j]);
			strtemp[s[i][j]-97]++;
		}
		for(j=0;j<26;j++){
//			printf("%c=%d",'a'+j,strtemp[j]);
			if(i==0) strans[j]=strtemp[j];
			strans[j]=min(strans[j],strtemp[j]);
			strtemp[j]=0;
		}
//		printf("\n");
	}
	


	//	printf("計算部分終了\n");
	
	//出力
	
	for(i=0;i<26;i++){
//		printf("%c=%d",'a'+i,strans[i]);
		for(j=0;j<strans[i];j++){
			printf("%c",i+97);
		}
	}


	//	printf("結果の出力終了\n");

	
	return 0;
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$3904, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -3892(%rbp)
	movl	$0, -3888(%rbp)
	movl	$0, -3884(%rbp)
	movl	$0, -3880(%rbp)
	leaq	-3904(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -3900(%rbp)
	jmp	.L2
.L3:
	leaq	-3616(%rbp), %rcx
	movl	-3900(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	subq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -3900(%rbp)
.L2:
	movl	-3904(%rbp), %eax
	cmpl	%eax, -3900(%rbp)
	jl	.L3
	movl	$0, -3900(%rbp)
	jmp	.L4
.L5:
	movl	-3900(%rbp), %eax
	cltq
	movl	$0, -3872(%rbp,%rax,4)
	movl	-3900(%rbp), %eax
	cltq
	movl	$0, -3744(%rbp,%rax,4)
	addl	$1, -3900(%rbp)
.L4:
	cmpl	$29, -3900(%rbp)
	jle	.L5
	movl	$0, -3900(%rbp)
	jmp	.L6
.L12:
	leaq	-3616(%rbp), %rcx
	movl	-3900(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	subq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -3876(%rbp)
	movl	$0, -3896(%rbp)
	jmp	.L7
.L8:
	movl	-3896(%rbp), %eax
	movslq	%eax, %rcx
	movl	-3900(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	subq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	addq	%rcx, %rax
	subq	$3616, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	subl	$97, %eax
	movslq	%eax, %rdx
	movl	-3872(%rbp,%rdx,4), %edx
	addl	$1, %edx
	cltq
	movl	%edx, -3872(%rbp,%rax,4)
	addl	$1, -3896(%rbp)
.L7:
	movl	-3896(%rbp), %eax
	cmpl	-3876(%rbp), %eax
	jl	.L8
	movl	$0, -3896(%rbp)
	jmp	.L9
.L11:
	cmpl	$0, -3900(%rbp)
	jne	.L10
	movl	-3896(%rbp), %eax
	cltq
	movl	-3872(%rbp,%rax,4), %edx
	movl	-3896(%rbp), %eax
	cltq
	movl	%edx, -3744(%rbp,%rax,4)
.L10:
	movl	-3896(%rbp), %eax
	cltq
	movl	-3872(%rbp,%rax,4), %edx
	movl	-3896(%rbp), %eax
	cltq
	movl	-3744(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	cmovg	%eax, %edx
	movl	-3896(%rbp), %eax
	cltq
	movl	%edx, -3744(%rbp,%rax,4)
	movl	-3896(%rbp), %eax
	cltq
	movl	$0, -3872(%rbp,%rax,4)
	addl	$1, -3896(%rbp)
.L9:
	cmpl	$25, -3896(%rbp)
	jle	.L11
	addl	$1, -3900(%rbp)
.L6:
	movl	-3904(%rbp), %eax
	cmpl	%eax, -3900(%rbp)
	jl	.L12
	movl	$0, -3900(%rbp)
	jmp	.L13
.L16:
	movl	$0, -3896(%rbp)
	jmp	.L14
.L15:
	movl	-3900(%rbp), %eax
	addl	$97, %eax
	movl	%eax, %edi
	call	putchar@PLT
	addl	$1, -3896(%rbp)
.L14:
	movl	-3900(%rbp), %eax
	cltq
	movl	-3744(%rbp,%rax,4), %eax
	cmpl	%eax, -3896(%rbp)
	jl	.L15
	addl	$1, -3900(%rbp)
.L13:
	cmpl	$25, -3900(%rbp)
	jle	.L16
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.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	$3896, %rsp
	.cfi_def_cfa_offset 3952
	movq	%fs:40, %rax
	movq	%rax, 3880(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	leaq	272(%rsp), %rbp
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r13
	movq	%rbp, %r12
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r14d
	addq	$60, %r12
	cmpl	%ebx, %r14d
	jg	.L3
	leaq	16(%rsp), %r12
	xorl	%eax, %eax
	movl	$15, %ecx
	movq	%r12, %rdi
	leaq	144(%rsp), %r13
	rep stosq
	movl	$15, %ecx
	movq	%r13, %rdi
	rep stosq
	testl	%r14d, %r14d
	jle	.L9
	xorl	%r15d, %r15d
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L10:
	movq	%rbp, %rdi
	call	strlen@PLT
	pxor	%xmm1, %xmm1
	testl	%eax, %eax
	je	.L12
.L6:
	subl	$1, %eax
	movq	%rbp, %rdx
	leaq	1(%rbp,%rax), %rcx
	.p2align 4,,10
	.p2align 3
.L11:
	movsbl	(%rdx), %eax
	addq	$1, %rdx
	subl	$97, %eax
	cltq
	addl	$1, 16(%rsp,%rax,4)
	cmpq	%rcx, %rdx
	jne	.L11
.L12:
	testl	%r15d, %r15d
	je	.L26
.L7:
	movdqa	144(%rsp), %xmm0
	movdqa	16(%rsp), %xmm2
	pcmpgtd	16(%rsp), %xmm0
	movaps	%xmm1, 16(%rsp)
	pand	%xmm0, %xmm2
	pandn	144(%rsp), %xmm0
	por	%xmm2, %xmm0
	movdqa	32(%rsp), %xmm2
	movaps	%xmm0, 144(%rsp)
	movdqa	160(%rsp), %xmm0
	pcmpgtd	32(%rsp), %xmm0
	movaps	%xmm1, 32(%rsp)
	pand	%xmm0, %xmm2
	pandn	160(%rsp), %xmm0
	por	%xmm2, %xmm0
	movdqa	48(%rsp), %xmm2
	movaps	%xmm0, 160(%rsp)
	movdqa	176(%rsp), %xmm0
	pcmpgtd	48(%rsp), %xmm0
	movaps	%xmm1, 48(%rsp)
	pand	%xmm0, %xmm2
	pandn	176(%rsp), %xmm0
	por	%xmm2, %xmm0
	movdqa	64(%rsp), %xmm2
	movaps	%xmm0, 176(%rsp)
	movdqa	192(%rsp), %xmm0
	pcmpgtd	64(%rsp), %xmm0
	movaps	%xmm1, 64(%rsp)
	pand	%xmm0, %xmm2
	pandn	192(%rsp), %xmm0
	por	%xmm2, %xmm0
	movdqa	80(%rsp), %xmm2
	movaps	%xmm0, 192(%rsp)
	movdqa	208(%rsp), %xmm0
	pcmpgtd	80(%rsp), %xmm0
	movaps	%xmm1, 80(%rsp)
	pand	%xmm0, %xmm2
	pandn	208(%rsp), %xmm0
	por	%xmm2, %xmm0
	movaps	%xmm0, 208(%rsp)
	movdqa	224(%rsp), %xmm0
	pcmpgtd	96(%rsp), %xmm0
	movdqa	96(%rsp), %xmm2
	movl	112(%rsp), %edx
	movaps	%xmm1, 96(%rsp)
	movl	240(%rsp), %eax
	pand	%xmm0, %xmm2
	cmpl	%edx, %eax
	pandn	224(%rsp), %xmm0
	cmovle	%eax, %edx
	movl	116(%rsp), %eax
	movq	$0, 112(%rsp)
	por	%xmm2, %xmm0
	movaps	%xmm0, 224(%rsp)
	movd	%edx, %xmm0
	movl	244(%rsp), %edx
	cmpl	%edx, %eax
	cmovg	%edx, %eax
	addl	$1, %r15d
	addq	$60, %rbp
	movd	%eax, %xmm3
	punpckldq	%xmm3, %xmm0
	movq	%xmm0, 240(%rsp)
	cmpl	%r15d, %r14d
	jne	.L10
.L9:
	leaq	248(%rsp), %r14
	movl	$97, %ebp
	.p2align 4,,10
	.p2align 3
.L5:
	movl	0(%r13), %r12d
	xorl	%ebx, %ebx
	testl	%r12d, %r12d
	jle	.L16
	.p2align 4,,10
	.p2align 3
.L13:
	movl	%ebp, %edi
	addl	$1, %ebx
	call	putchar@PLT
	cmpl	%r12d, %ebx
	jne	.L13
.L16:
	addq	$4, %r13
	addl	$1, %ebp
	cmpq	%r14, %r13
	jne	.L5
	movq	3880(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L27
	addq	$3896, %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
.L26:
	.cfi_restore_state
	movdqa	(%r12), %xmm4
	movq	96(%r12), %rax
	movl	$13, %ecx
	movq	%r12, %rdi
	movdqa	16(%r12), %xmm5
	movdqa	32(%r12), %xmm6
	addq	$60, %rbp
	movdqa	48(%r12), %xmm7
	movaps	%xmm4, 0(%r13)
	movdqa	64(%r12), %xmm4
	movaps	%xmm5, 16(%r13)
	movdqa	80(%r12), %xmm5
	movq	%rax, 96(%r13)
	movq	%rbx, %rax
	rep stosq
	movaps	%xmm6, 32(%r13)
	movaps	%xmm7, 48(%r13)
	movaps	%xmm4, 64(%r13)
	movaps	%xmm5, 80(%r13)
	cmpl	$1, %r14d
	je	.L9
	movq	%rbp, %rdi
	movl	$1, %r15d
	call	strlen@PLT
	pxor	%xmm1, %xmm1
	testl	%eax, %eax
	jne	.L6
	jmp	.L7
.L2:
	leaq	16(%rsp), %rdx
	xorl	%eax, %eax
	movl	$30, %ecx
	movq	%rdx, %rdi
	leaq	144(%rsp), %r13
	rep stosl
	movl	$30, %ecx
	movq	%r13, %rdi
	rep stosl
	jmp	.L9
.L27:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

rule
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.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	$3896, %rsp
	.cfi_def_cfa_offset 3952
	movq	%fs:40, %rax
	movq	%rax, 3880(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	leaq	272(%rsp), %rbp
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r13
	movq	%rbp, %r12
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r14d
	addq	$60, %r12
	cmpl	%ebx, %r14d
	jg	.L3
	leaq	16(%rsp), %r12
	xorl	%eax, %eax
	movl	$15, %ecx
	movq	%r12, %rdi
	leaq	144(%rsp), %r13
	rep stosq
	movl	$15, %ecx
	movq	%r13, %rdi
	rep stosq
	testl	%r14d, %r14d
	jle	.L9
	xorl	%r15d, %r15d
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L10:
	movq	%rbp, %rdi
	call	strlen@PLT
	pxor	%xmm1, %xmm1
	testl	%eax, %eax
	je	.L12
.L6:
	subl	$1, %eax
	movq	%rbp, %rdx
	leaq	1(%rbp,%rax), %rcx
	.p2align 4,,10
	.p2align 3
.L11:
	movsbl	(%rdx), %eax
	addq	$1, %rdx
	subl	$97, %eax
	cltq
	addl	$1, 16(%rsp,%rax,4)
	cmpq	%rcx, %rdx
	jne	.L11
.L12:
	testl	%r15d, %r15d
	je	.L26
.L7:
	movdqa	144(%rsp), %xmm0
	movdqa	16(%rsp), %xmm2
	pcmpgtd	16(%rsp), %xmm0
	movaps	%xmm1, 16(%rsp)
	pand	%xmm0, %xmm2
	pandn	144(%rsp), %xmm0
	por	%xmm2, %xmm0
	movdqa	32(%rsp), %xmm2
	movaps	%xmm0, 144(%rsp)
	movdqa	160(%rsp), %xmm0
	pcmpgtd	32(%rsp), %xmm0
	movaps	%xmm1, 32(%rsp)
	pand	%xmm0, %xmm2
	pandn	160(%rsp), %xmm0
	por	%xmm2, %xmm0
	movdqa	48(%rsp), %xmm2
	movaps	%xmm0, 160(%rsp)
	movdqa	176(%rsp), %xmm0
	pcmpgtd	48(%rsp), %xmm0
	movaps	%xmm1, 48(%rsp)
	pand	%xmm0, %xmm2
	pandn	176(%rsp), %xmm0
	por	%xmm2, %xmm0
	movdqa	64(%rsp), %xmm2
	movaps	%xmm0, 176(%rsp)
	movdqa	192(%rsp), %xmm0
	pcmpgtd	64(%rsp), %xmm0
	movaps	%xmm1, 64(%rsp)
	pand	%xmm0, %xmm2
	pandn	192(%rsp), %xmm0
	por	%xmm2, %xmm0
	movdqa	80(%rsp), %xmm2
	movaps	%xmm0, 192(%rsp)
	movdqa	208(%rsp), %xmm0
	pcmpgtd	80(%rsp), %xmm0
	movaps	%xmm1, 80(%rsp)
	pand	%xmm0, %xmm2
	pandn	208(%rsp), %xmm0
	por	%xmm2, %xmm0
	movaps	%xmm0, 208(%rsp)
	movdqa	224(%rsp), %xmm0
	pcmpgtd	96(%rsp), %xmm0
	movdqa	96(%rsp), %xmm2
	movl	112(%rsp), %edx
	movaps	%xmm1, 96(%rsp)
	movl	240(%rsp), %eax
	pand	%xmm0, %xmm2
	cmpl	%edx, %eax
	pandn	224(%rsp), %xmm0
	cmovle	%eax, %edx
	movl	116(%rsp), %eax
	movq	$0, 112(%rsp)
	por	%xmm2, %xmm0
	movaps	%xmm0, 224(%rsp)
	movd	%edx, %xmm0
	movl	244(%rsp), %edx
	cmpl	%edx, %eax
	cmovg	%edx, %eax
	addl	$1, %r15d
	addq	$60, %rbp
	movd	%eax, %xmm3
	punpckldq	%xmm3, %xmm0
	movq	%xmm0, 240(%rsp)
	cmpl	%r15d, %r14d
	jne	.L10
.L9:
	leaq	248(%rsp), %r14
	movl	$97, %ebp
	.p2align 4,,10
	.p2align 3
.L5:
	movl	0(%r13), %r12d
	xorl	%ebx, %ebx
	testl	%r12d, %r12d
	jle	.L16
	.p2align 4,,10
	.p2align 3
.L13:
	movl	%ebp, %edi
	addl	$1, %ebx
	call	putchar@PLT
	cmpl	%r12d, %ebx
	jne	.L13
.L16:
	addq	$4, %r13
	addl	$1, %ebp
	cmpq	%r14, %r13
	jne	.L5
	movq	3880(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L27
	addq	$3896, %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
.L26:
	.cfi_restore_state
	movdqa	(%r12), %xmm4
	movq	96(%r12), %rax
	movl	$13, %ecx
	movq	%r12, %rdi
	movdqa	16(%r12), %xmm5
	movdqa	32(%r12), %xmm6
	addq	$60, %rbp
	movdqa	48(%r12), %xmm7
	movaps	%xmm4, 0(%r13)
	movdqa	64(%r12), %xmm4
	movaps	%xmm5, 16(%r13)
	movdqa	80(%r12), %xmm5
	movq	%rax, 96(%r13)
	movq	%rbx, %rax
	rep stosq
	movaps	%xmm6, 32(%r13)
	movaps	%xmm7, 48(%r13)
	movaps	%xmm4, 64(%r13)
	movaps	%xmm5, 80(%r13)
	cmpl	$1, %r14d
	je	.L9
	movq	%rbp, %rdi
	movl	$1, %r15d
	call	strlen@PLT
	pxor	%xmm1, %xmm1
	testl	%eax, %eax
	jne	.L6
	jmp	.L7
.L2:
	leaq	16(%rsp), %rdx
	xorl	%eax, %eax
	movl	$30, %ecx
	movq	%rdx, %rdi
	leaq	144(%rsp), %r13
	rep stosl
	movl	$30, %ecx
	movq	%r13, %rdi
	rep stosl
	jmp	.L9
.L27:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.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:


//#include "pch.h"
#include <stdio.h>
#include <math.h>
#include <string.h>
#include <stdlib.h>

#define ll long long
#define fr(i,l,r) for(i=(l);i<(r);i++)
#define min(p,q) ((p)<(q)?(p):(q))
#define max(p,q) ((p)>(q)?(p):(q))
#define INF 1000000000000//10^12


int main(void)
{
	//変数の宣言
	int n;
	char s[60][60];
	int strtemp[30];
	int strans[30];

	//よく使う変数
	int i,j,k,l;
	int flag=0;
	int ans=0;
	int count=0;
	int temp,temp1,temp2;
	int max,min;
	int len;
	int sum=0;
	
	
	//データの読み込み
	scanf("%d",&n);
//	scanf_s("%d",&n);

	for(i=0;i<n;i++){
		scanf("%s",&s[i]);
//		scanf_s("\n%s",&s[i],60);	
//		printf("s[%d]=%s",i,s[i]);
	}

	for(i=0;i<30;i++){
		strtemp[i]=0;
		strans[i]=0;
	}

	//	printf("nは%dです\n", n);
	//	printf("データの読み込み終了\n");
	//実際の処理
	
	for(i=0;i<n;i++){
		len=strlen(s[i]);
		for(j=0;j<len;j++){
//			printf("s[i][j]=%d",s[i][j]);
			strtemp[s[i][j]-97]++;
		}
		for(j=0;j<26;j++){
//			printf("%c=%d",'a'+j,strtemp[j]);
			if(i==0) strans[j]=strtemp[j];
			strans[j]=min(strans[j],strtemp[j]);
			strtemp[j]=0;
		}
//		printf("\n");
	}
	


	//	printf("計算部分終了\n");
	
	//出力
	
	for(i=0;i<26;i++){
//		printf("%c=%d",'a'+i,strans[i]);
		for(j=0;j<strans[i];j++){
			printf("%c",i+97);
		}
	}


	//	printf("結果の出力終了\n");

	
	return 0;
}


3
cbaa
daacc
acacac

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

```c

//#include "pch.h"
#include <stdio.h>
#include <math.h>
#include <string.h>
#include <stdlib.h>

#define ll long long
#define fr(i,l,r) for(i=(l);i<(r);i++)
#define min(p,q) ((p)<(q)?(p):(q))
#define max(p,q) ((p)>(q)?(p):(q))
#define INF 1000000000000//10^12


int main(void)
{
	//変数の宣言
	int n;
	char s[60][60];
	int strtemp[30];
	int strans[30];

	//よく使う変数
	int i,j,k,l;
	int flag=0;
	int ans=0;
	int count=0;
	int temp,temp1,temp2;
	int max,min;
	int len;
	int sum=0;
	
	
	//データの読み込み
	scanf("%d",&n);
//	scanf_s("%d",&n);

	for(i=0;i<n;i++){
		scanf("%s",&s[i]);
//		scanf_s("\n%s",&s[i],60);	
//		printf("s[%d]=%s",i,s[i]);
	}

	for(i=0;i<30;i++){
		strtemp[i]=0;
		strans[i]=0;
	}

	//	printf("nは%dです\n", n);
	//	printf("データの読み込み終了\n");
	//実際の処理
	
	for(i=0;i<n;i++){
		len=strlen(s[i]);
		for(j=0;j<len;j++){
//			printf("s[i][j]=%d",s[i][j]);
			strtemp[s[i][j]-97]++;
		}
		for(j=0;j<26;j++){
//			printf("%c=%d",'a'+j,strtemp[j]);
			if(i==0) strans[j]=strtemp[j];
			strans[j]=min(strans[j],strtemp[j]);
			strtemp[j]=0;
		}
//		printf("\n");
	}
	


	//	printf("計算部分終了\n");
	
	//出力
	
	for(i=0;i<26;i++){
//		printf("%c=%d",'a'+i,strans[i]);
		for(j=0;j<strans[i];j++){
			printf("%c",i+97);
		}
	}


	//	printf("結果の出力終了\n");

	
	return 0;
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$3904, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -3892(%rbp)
	movl	$0, -3888(%rbp)
	movl	$0, -3884(%rbp)
	movl	$0, -3880(%rbp)
	leaq	-3904(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -3900(%rbp)
	jmp	.L2
.L3:
	leaq	-3616(%rbp), %rcx
	movl	-3900(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	subq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -3900(%rbp)
.L2:
	movl	-3904(%rbp), %eax
	cmpl	%eax, -3900(%rbp)
	jl	.L3
	movl	$0, -3900(%rbp)
	jmp	.L4
.L5:
	movl	-3900(%rbp), %eax
	cltq
	movl	$0, -3872(%rbp,%rax,4)
	movl	-3900(%rbp), %eax
	cltq
	movl	$0, -3744(%rbp,%rax,4)
	addl	$1, -3900(%rbp)
.L4:
	cmpl	$29, -3900(%rbp)
	jle	.L5
	movl	$0, -3900(%rbp)
	jmp	.L6
.L12:
	leaq	-3616(%rbp), %rcx
	movl	-3900(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	subq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -3876(%rbp)
	movl	$0, -3896(%rbp)
	jmp	.L7
.L8:
	movl	-3896(%rbp), %eax
	movslq	%eax, %rcx
	movl	-3900(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	subq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	addq	%rcx, %rax
	subq	$3616, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	subl	$97, %eax
	movslq	%eax, %rdx
	movl	-3872(%rbp,%rdx,4), %edx
	addl	$1, %edx
	cltq
	movl	%edx, -3872(%rbp,%rax,4)
	addl	$1, -3896(%rbp)
.L7:
	movl	-3896(%rbp), %eax
	cmpl	-3876(%rbp), %eax
	jl	.L8
	movl	$0, -3896(%rbp)
	jmp	.L9
.L11:
	cmpl	$0, -3900(%rbp)
	jne	.L10
	movl	-3896(%rbp), %eax
	cltq
	movl	-3872(%rbp,%rax,4), %edx
	movl	-3896(%rbp), %eax
	cltq
	movl	%edx, -3744(%rbp,%rax,4)
.L10:
	movl	-3896(%rbp), %eax
	cltq
	movl	-3872(%rbp,%rax,4), %edx
	movl	-3896(%rbp), %eax
	cltq
	movl	-3744(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	cmovg	%eax, %edx
	movl	-3896(%rbp), %eax
	cltq
	movl	%edx, -3744(%rbp,%rax,4)
	movl	-3896(%rbp), %eax
	cltq
	movl	$0, -3872(%rbp,%rax,4)
	addl	$1, -3896(%rbp)
.L9:
	cmpl	$25, -3896(%rbp)
	jle	.L11
	addl	$1, -3900(%rbp)
.L6:
	movl	-3904(%rbp), %eax
	cmpl	%eax, -3900(%rbp)
	jl	.L12
	movl	$0, -3900(%rbp)
	jmp	.L13
.L16:
	movl	$0, -3896(%rbp)
	jmp	.L14
.L15:
	movl	-3900(%rbp), %eax
	addl	$97, %eax
	movl	%eax, %edi
	call	putchar@PLT
	addl	$1, -3896(%rbp)
.L14:
	movl	-3900(%rbp), %eax
	cltq
	movl	-3744(%rbp,%rax,4), %eax
	cmpl	%eax, -3896(%rbp)
	jl	.L15
	addl	$1, -3900(%rbp)
.L13:
	cmpl	$25, -3900(%rbp)
	jle	.L16
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$3904, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -3892(%rbp)
	movl	$0, -3888(%rbp)
	movl	$0, -3884(%rbp)
	movl	$0, -3880(%rbp)
	leaq	-3904(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -3900(%rbp)
	jmp	.L2
.L3:
	leaq	-3616(%rbp), %rcx
	movl	-3900(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	subq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -3900(%rbp)
.L2:
	movl	-3904(%rbp), %eax
	cmpl	%eax, -3900(%rbp)
	jl	.L3
	movl	$0, -3900(%rbp)
	jmp	.L4
.L5:
	movl	-3900(%rbp), %eax
	cltq
	movl	$0, -3872(%rbp,%rax,4)
	movl	-3900(%rbp), %eax
	cltq
	movl	$0, -3744(%rbp,%rax,4)
	addl	$1, -3900(%rbp)
.L4:
	cmpl	$29, -3900(%rbp)
	jle	.L5
	movl	$0, -3900(%rbp)
	jmp	.L6
.L12:
	leaq	-3616(%rbp), %rcx
	movl	-3900(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	subq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -3876(%rbp)
	movl	$0, -3896(%rbp)
	jmp	.L7
.L8:
	movl	-3896(%rbp), %eax
	movslq	%eax, %rcx
	movl	-3900(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	subq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	addq	%rcx, %rax
	subq	$3616, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	subl	$97, %eax
	movslq	%eax, %rdx
	movl	-3872(%rbp,%rdx,4), %edx
	addl	$1, %edx
	cltq
	movl	%edx, -3872(%rbp,%rax,4)
	addl	$1, -3896(%rbp)
.L7:
	movl	-3896(%rbp), %eax
	cmpl	-3876(%rbp), %eax
	jl	.L8
	movl	$0, -3896(%rbp)
	jmp	.L9
.L11:
	cmpl	$0, -3900(%rbp)
	jne	.L10
	movl	-3896(%rbp), %eax
	cltq
	movl	-3872(%rbp,%rax,4), %edx
	movl	-3896(%rbp), %eax
	cltq
	movl	%edx, -3744(%rbp,%rax,4)
.L10:
	movl	-3896(%rbp), %eax
	cltq
	movl	-3872(%rbp,%rax,4), %edx
	movl	-3896(%rbp), %eax
	cltq
	movl	-3744(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	cmovg	%eax, %edx
	movl	-3896(%rbp), %eax
	cltq
	movl	%edx, -3744(%rbp,%rax,4)
	movl	-3896(%rbp), %eax
	cltq
	movl	$0, -3872(%rbp,%rax,4)
	addl	$1, -3896(%rbp)
.L9:
	cmpl	$25, -3896(%rbp)
	jle	.L11
	addl	$1, -3900(%rbp)
.L6:
	movl	-3904(%rbp), %eax
	cmpl	%eax, -3900(%rbp)
	jl	.L12
	movl	$0, -3900(%rbp)
	jmp	.L13
.L16:
	movl	$0, -3896(%rbp)
	jmp	.L14
.L15:
	movl	-3900(%rbp), %eax
	addl	$97, %eax
	movl	%eax, %edi
	call	putchar@PLT
	addl	$1, -3896(%rbp)
.L14:
	movl	-3900(%rbp), %eax
	cltq
	movl	-3744(%rbp,%rax,4), %eax
	cmpl	%eax, -3896(%rbp)
	jl	.L15
	addl	$1, -3900(%rbp)
.L13:
	cmpl	$25, -3900(%rbp)
	jle	.L16
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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:
