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>

char abc[27] = "abcdefghijklmnopqrstuvwxyz";

int  main(void){
  int n;
  scanf("%d",&n);

  char s[n][51];
  for(int i = 0;i < n;i ++){
    scanf("%s",s[i]);
  }

  int count[50][26] = {0};
  for(int i = 0;i < n;i ++){
    for(int j = 0;s[i][j] != '\0';j ++){
      count[i][s[i][j] - 'a'] ++;
    }
  }

  int min[26] = {0} , k = 100;
  for(int i = 0;i < 26;i ++){
    for(int j = 0;j < n;j ++){
      if(k > count[j][i]){
        k = count[j][i];
      }
    }
    min[i] = k;
    k = 100;
  }

  for(int i = 0;i < 26;i ++){
    while(min[i] > 0){
      printf("%c",abc[i]);
      min[i] --;
    }
  }

  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	abc
	.data
	.align 16
	.type	abc, @object
	.size	abc, 27
abc:
	.string	"abcdefghijklmnopqrstuvwxyz"
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$4096, %rsp
	orq	$0, (%rsp)
	subq	$1288, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	leaq	-5424(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-5424(%rbp), %ecx
	movslq	%ecx, %rax
	subq	$1, %rax
	movq	%rax, -5392(%rbp)
	movslq	%ecx, %rax
	movq	%rax, %r14
	movl	$0, %r15d
	imulq	$408, %r15, %rdx
	imulq	$0, %r14, %rax
	leaq	(%rdx,%rax), %rsi
	movl	$408, %eax
	mulq	%r14
	addq	%rdx, %rsi
	movq	%rsi, %rdx
	movslq	%ecx, %rax
	movq	%rax, %r12
	movl	$0, %r13d
	imulq	$408, %r13, %rdx
	imulq	$0, %r12, %rax
	leaq	(%rdx,%rax), %rsi
	movl	$408, %eax
	mulq	%r12
	addq	%rdx, %rsi
	movq	%rsi, %rdx
	movslq	%ecx, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	salq	$4, %rdx
	addq	%rax, %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L2:
	cmpq	%rdx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L4
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$0, %rax
	movq	%rax, -5384(%rbp)
	movl	$0, -5420(%rbp)
	jmp	.L5
.L6:
	movl	-5420(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	salq	$4, %rdx
	addq	%rdx, %rax
	movq	-5384(%rbp), %rdx
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -5420(%rbp)
.L5:
	movl	-5424(%rbp), %eax
	cmpl	%eax, -5420(%rbp)
	jl	.L6
	leaq	-5264(%rbp), %rdx
	movl	$0, %eax
	movl	$650, %ecx
	movq	%rdx, %rdi
	rep stosq
	movl	$0, -5416(%rbp)
	jmp	.L7
.L10:
	movl	$0, -5412(%rbp)
	jmp	.L8
.L9:
	movq	-5384(%rbp), %rsi
	movl	-5412(%rbp), %eax
	movslq	%eax, %rcx
	movl	-5416(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	salq	$4, %rdx
	addq	%rdx, %rax
	addq	%rsi, %rax
	addq	%rcx, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	leal	-97(%rax), %ecx
	movslq	%ecx, %rsi
	movl	-5416(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	-5264(%rbp,%rax,4), %eax
	leal	1(%rax), %esi
	movslq	%ecx, %rcx
	movl	-5416(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	%esi, -5264(%rbp,%rax,4)
	addl	$1, -5412(%rbp)
.L8:
	movq	-5384(%rbp), %rsi
	movl	-5412(%rbp), %eax
	movslq	%eax, %rcx
	movl	-5416(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	salq	$4, %rdx
	addq	%rdx, %rax
	addq	%rsi, %rax
	addq	%rcx, %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	jne	.L9
	addl	$1, -5416(%rbp)
.L7:
	movl	-5424(%rbp), %eax
	cmpl	%eax, -5416(%rbp)
	jl	.L10
	leaq	-5376(%rbp), %rdx
	movl	$0, %eax
	movl	$13, %ecx
	movq	%rdx, %rdi
	rep stosq
	movl	$100, -5408(%rbp)
	movl	$0, -5404(%rbp)
	jmp	.L11
.L15:
	movl	$0, -5400(%rbp)
	jmp	.L12
.L14:
	movl	-5404(%rbp), %eax
	movslq	%eax, %rcx
	movl	-5400(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-5264(%rbp,%rax,4), %eax
	cmpl	%eax, -5408(%rbp)
	jle	.L13
	movl	-5404(%rbp), %eax
	movslq	%eax, %rcx
	movl	-5400(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-5264(%rbp,%rax,4), %eax
	movl	%eax, -5408(%rbp)
.L13:
	addl	$1, -5400(%rbp)
.L12:
	movl	-5424(%rbp), %eax
	cmpl	%eax, -5400(%rbp)
	jl	.L14
	movl	-5404(%rbp), %eax
	cltq
	movl	-5408(%rbp), %edx
	movl	%edx, -5376(%rbp,%rax,4)
	movl	$100, -5408(%rbp)
	addl	$1, -5404(%rbp)
.L11:
	cmpl	$25, -5404(%rbp)
	jle	.L15
	movl	$0, -5396(%rbp)
	jmp	.L16
.L18:
	movl	-5396(%rbp), %eax
	cltq
	leaq	abc(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	movl	%eax, %edi
	call	putchar@PLT
	movl	-5396(%rbp), %eax
	cltq
	movl	-5376(%rbp,%rax,4), %eax
	leal	-1(%rax), %edx
	movl	-5396(%rbp), %eax
	cltq
	movl	%edx, -5376(%rbp,%rax,4)
.L17:
	movl	-5396(%rbp), %eax
	cltq
	movl	-5376(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jg	.L18
	addl	$1, -5396(%rbp)
.L16:
	cmpl	$25, -5396(%rbp)
	jle	.L17
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$4096, %rsp
	orq	$0, (%rsp)
	subq	$1248, %rsp
	.cfi_offset 14, -24
	.cfi_offset 13, -32
	.cfi_offset 12, -40
	.cfi_offset 3, -48
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, -40(%rbp)
	xorl	%eax, %eax
	leaq	-5364(%rbp), %rsi
	call	__isoc99_scanf@PLT
	movslq	-5364(%rbp), %rax
	movq	%rsp, %rcx
	movq	%rax, %rsi
	leaq	(%rax,%rax,2), %rax
	movq	%rax, %rdx
	salq	$4, %rdx
	leaq	15(%rax,%rdx), %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	subq	%rax, %rcx
	andq	$-16, %rdx
	cmpq	%rcx, %rsp
	je	.L3
.L35:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rcx, %rsp
	jne	.L35
.L3:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L36
.L4:
	testl	%esi, %esi
	jle	.L5
	movq	%rsp, %rbx
	movq	%rsp, %r13
	leaq	.LC1(%rip), %r14
	xorl	%r12d, %r12d
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r13, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %r12d
	call	__isoc99_scanf@PLT
	movl	-5364(%rbp), %r8d
	addq	$51, %r13
	cmpl	%r12d, %r8d
	jg	.L6
	leaq	-5248(%rbp), %rdi
	movl	$650, %ecx
	xorl	%eax, %eax
	rep stosq
	testl	%r8d, %r8d
	jle	.L37
	xorl	%esi, %esi
	.p2align 4,,10
	.p2align 3
.L7:
	movsbl	(%rbx), %eax
	movq	%rbx, %rdx
	movslq	%esi, %rcx
	testb	%al, %al
	je	.L10
	leaq	(%rcx,%rcx,2), %rdi
	leaq	(%rcx,%rdi,4), %rcx
	addq	%rcx, %rcx
	.p2align 4,,10
	.p2align 3
.L9:
	subl	$97, %eax
	addq	$1, %rdx
	cltq
	addq	%rcx, %rax
	addl	$1, -5248(%rbp,%rax,4)
	movsbl	(%rdx), %eax
	testb	%al, %al
	jne	.L9
.L10:
	addl	$1, %esi
	addq	$51, %rbx
	cmpl	%esi, %r8d
	jne	.L7
.L8:
	xorl	%eax, %eax
	leaq	-5360(%rbp), %rdi
	movl	$13, %ecx
	movq	$-104, %r9
	rep stosq
	leal	-1(%rsi), %eax
	leaq	-5360(%rbp), %r12
	leaq	(%rax,%rax,2), %rdx
	leaq	-5256(%rbp), %r13
	movq	%r12, %r8
	leaq	(%rax,%rdx,4), %rax
	salq	$3, %rax
	leaq	-5144(%rbp,%rax), %rdi
	subq	%rax, %r9
	.p2align 4,,10
	.p2align 3
.L11:
	leaq	(%r9,%rdi), %rax
	movl	$100, %edx
	testl	%esi, %esi
	jle	.L15
	.p2align 4,,10
	.p2align 3
.L12:
	movl	(%rax), %ecx
	cmpl	%ecx, %edx
	cmovg	%ecx, %edx
	addq	$104, %rax
	cmpq	%rdi, %rax
	jne	.L12
.L15:
	movl	%edx, (%r8)
	addq	$4, %r8
	addq	$4, %rdi
	cmpq	%r13, %r8
	jne	.L11
	leaq	abc(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L13:
	movl	(%r12), %ebx
	testl	%ebx, %ebx
	jle	.L18
	.p2align 4,,10
	.p2align 3
.L16:
	movsbl	(%r14), %edi
	call	putchar@PLT
	subl	$1, %ebx
	movl	%ebx, (%r12)
	jne	.L16
.L18:
	addq	$4, %r12
	addq	$1, %r14
	cmpq	%r13, %r12
	jne	.L13
	movq	-40(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L38
	leaq	-32(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L36:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rdx)
	jmp	.L4
.L5:
	leaq	-5248(%rbp), %rdi
	movl	$650, %ecx
	xorl	%eax, %eax
	rep stosq
	jmp	.L8
.L38:
	call	__stack_chk_fail@PLT
.L37:
	movl	%r8d, %esi
	jmp	.L8
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	abc
	.data
	.align 16
	.type	abc, @object
	.size	abc, 27
abc:
	.string	"abcdefghijklmnopqrstuvwxyz"
	.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:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$4096, %rsp
	orq	$0, (%rsp)
	subq	$1248, %rsp
	.cfi_offset 14, -24
	.cfi_offset 13, -32
	.cfi_offset 12, -40
	.cfi_offset 3, -48
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, -40(%rbp)
	xorl	%eax, %eax
	leaq	-5364(%rbp), %rsi
	call	__isoc99_scanf@PLT
	movslq	-5364(%rbp), %rax
	movq	%rsp, %rcx
	movq	%rax, %rsi
	leaq	(%rax,%rax,2), %rax
	movq	%rax, %rdx
	salq	$4, %rdx
	leaq	15(%rax,%rdx), %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	subq	%rax, %rcx
	andq	$-16, %rdx
	cmpq	%rcx, %rsp
	je	.L3
.L35:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rcx, %rsp
	jne	.L35
.L3:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L36
.L4:
	testl	%esi, %esi
	jle	.L5
	movq	%rsp, %rbx
	movq	%rsp, %r13
	leaq	.LC1(%rip), %r14
	xorl	%r12d, %r12d
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r13, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %r12d
	call	__isoc99_scanf@PLT
	movl	-5364(%rbp), %r8d
	addq	$51, %r13
	cmpl	%r12d, %r8d
	jg	.L6
	leaq	-5248(%rbp), %rdi
	movl	$650, %ecx
	xorl	%eax, %eax
	rep stosq
	testl	%r8d, %r8d
	jle	.L37
	xorl	%esi, %esi
	.p2align 4,,10
	.p2align 3
.L7:
	movsbl	(%rbx), %eax
	movq	%rbx, %rdx
	movslq	%esi, %rcx
	testb	%al, %al
	je	.L10
	leaq	(%rcx,%rcx,2), %rdi
	leaq	(%rcx,%rdi,4), %rcx
	addq	%rcx, %rcx
	.p2align 4,,10
	.p2align 3
.L9:
	subl	$97, %eax
	addq	$1, %rdx
	cltq
	addq	%rcx, %rax
	addl	$1, -5248(%rbp,%rax,4)
	movsbl	(%rdx), %eax
	testb	%al, %al
	jne	.L9
.L10:
	addl	$1, %esi
	addq	$51, %rbx
	cmpl	%esi, %r8d
	jne	.L7
.L8:
	xorl	%eax, %eax
	leaq	-5360(%rbp), %rdi
	movl	$13, %ecx
	movq	$-104, %r9
	rep stosq
	leal	-1(%rsi), %eax
	leaq	-5360(%rbp), %r12
	leaq	(%rax,%rax,2), %rdx
	leaq	-5256(%rbp), %r13
	movq	%r12, %r8
	leaq	(%rax,%rdx,4), %rax
	salq	$3, %rax
	leaq	-5144(%rbp,%rax), %rdi
	subq	%rax, %r9
	.p2align 4,,10
	.p2align 3
.L11:
	leaq	(%r9,%rdi), %rax
	movl	$100, %edx
	testl	%esi, %esi
	jle	.L15
	.p2align 4,,10
	.p2align 3
.L12:
	movl	(%rax), %ecx
	cmpl	%ecx, %edx
	cmovg	%ecx, %edx
	addq	$104, %rax
	cmpq	%rdi, %rax
	jne	.L12
.L15:
	movl	%edx, (%r8)
	addq	$4, %r8
	addq	$4, %rdi
	cmpq	%r13, %r8
	jne	.L11
	leaq	abc(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L13:
	movl	(%r12), %ebx
	testl	%ebx, %ebx
	jle	.L18
	.p2align 4,,10
	.p2align 3
.L16:
	movsbl	(%r14), %edi
	call	putchar@PLT
	subl	$1, %ebx
	movl	%ebx, (%r12)
	jne	.L16
.L18:
	addq	$4, %r12
	addq	$1, %r14
	cmpq	%r13, %r12
	jne	.L13
	movq	-40(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L38
	leaq	-32(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L36:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rdx)
	jmp	.L4
.L5:
	leaq	-5248(%rbp), %rdi
	movl	$650, %ecx
	xorl	%eax, %eax
	rep stosq
	jmp	.L8
.L38:
	call	__stack_chk_fail@PLT
.L37:
	movl	%r8d, %esi
	jmp	.L8
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	abc
	.data
	.align 16
	.type	abc, @object
	.size	abc, 27
abc:
	.string	"abcdefghijklmnopqrstuvwxyz"
	.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>

char abc[27] = "abcdefghijklmnopqrstuvwxyz";

int  main(void){
  int n;
  scanf("%d",&n);

  char s[n][51];
  for(int i = 0;i < n;i ++){
    scanf("%s",s[i]);
  }

  int count[50][26] = {0};
  for(int i = 0;i < n;i ++){
    for(int j = 0;s[i][j] != '\0';j ++){
      count[i][s[i][j] - 'a'] ++;
    }
  }

  int min[26] = {0} , k = 100;
  for(int i = 0;i < 26;i ++){
    for(int j = 0;j < n;j ++){
      if(k > count[j][i]){
        k = count[j][i];
      }
    }
    min[i] = k;
    k = 100;
  }

  for(int i = 0;i < 26;i ++){
    while(min[i] > 0){
      printf("%c",abc[i]);
      min[i] --;
    }
  }

  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<stdio.h>

char abc[27] = "abcdefghijklmnopqrstuvwxyz";

int  main(void){
  int n;
  scanf("%d",&n);

  char s[n][51];
  for(int i = 0;i < n;i ++){
    scanf("%s",s[i]);
  }

  int count[50][26] = {0};
  for(int i = 0;i < n;i ++){
    for(int j = 0;s[i][j] != '\0';j ++){
      count[i][s[i][j] - 'a'] ++;
    }
  }

  int min[26] = {0} , k = 100;
  for(int i = 0;i < 26;i ++){
    for(int j = 0;j < n;j ++){
      if(k > count[j][i]){
        k = count[j][i];
      }
    }
    min[i] = k;
    k = 100;
  }

  for(int i = 0;i < 26;i ++){
    while(min[i] > 0){
      printf("%c",abc[i]);
      min[i] --;
    }
  }

  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	abc
	.data
	.align 16
	.type	abc, @object
	.size	abc, 27
abc:
	.string	"abcdefghijklmnopqrstuvwxyz"
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$4096, %rsp
	orq	$0, (%rsp)
	subq	$1288, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	leaq	-5424(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-5424(%rbp), %ecx
	movslq	%ecx, %rax
	subq	$1, %rax
	movq	%rax, -5392(%rbp)
	movslq	%ecx, %rax
	movq	%rax, %r14
	movl	$0, %r15d
	imulq	$408, %r15, %rdx
	imulq	$0, %r14, %rax
	leaq	(%rdx,%rax), %rsi
	movl	$408, %eax
	mulq	%r14
	addq	%rdx, %rsi
	movq	%rsi, %rdx
	movslq	%ecx, %rax
	movq	%rax, %r12
	movl	$0, %r13d
	imulq	$408, %r13, %rdx
	imulq	$0, %r12, %rax
	leaq	(%rdx,%rax), %rsi
	movl	$408, %eax
	mulq	%r12
	addq	%rdx, %rsi
	movq	%rsi, %rdx
	movslq	%ecx, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	salq	$4, %rdx
	addq	%rax, %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L2:
	cmpq	%rdx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L4
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$0, %rax
	movq	%rax, -5384(%rbp)
	movl	$0, -5420(%rbp)
	jmp	.L5
.L6:
	movl	-5420(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	salq	$4, %rdx
	addq	%rdx, %rax
	movq	-5384(%rbp), %rdx
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -5420(%rbp)
.L5:
	movl	-5424(%rbp), %eax
	cmpl	%eax, -5420(%rbp)
	jl	.L6
	leaq	-5264(%rbp), %rdx
	movl	$0, %eax
	movl	$650, %ecx
	movq	%rdx, %rdi
	rep stosq
	movl	$0, -5416(%rbp)
	jmp	.L7
.L10:
	movl	$0, -5412(%rbp)
	jmp	.L8
.L9:
	movq	-5384(%rbp), %rsi
	movl	-5412(%rbp), %eax
	movslq	%eax, %rcx
	movl	-5416(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	salq	$4, %rdx
	addq	%rdx, %rax
	addq	%rsi, %rax
	addq	%rcx, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	leal	-97(%rax), %ecx
	movslq	%ecx, %rsi
	movl	-5416(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	-5264(%rbp,%rax,4), %eax
	leal	1(%rax), %esi
	movslq	%ecx, %rcx
	movl	-5416(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	%esi, -5264(%rbp,%rax,4)
	addl	$1, -5412(%rbp)
.L8:
	movq	-5384(%rbp), %rsi
	movl	-5412(%rbp), %eax
	movslq	%eax, %rcx
	movl	-5416(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	salq	$4, %rdx
	addq	%rdx, %rax
	addq	%rsi, %rax
	addq	%rcx, %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	jne	.L9
	addl	$1, -5416(%rbp)
.L7:
	movl	-5424(%rbp), %eax
	cmpl	%eax, -5416(%rbp)
	jl	.L10
	leaq	-5376(%rbp), %rdx
	movl	$0, %eax
	movl	$13, %ecx
	movq	%rdx, %rdi
	rep stosq
	movl	$100, -5408(%rbp)
	movl	$0, -5404(%rbp)
	jmp	.L11
.L15:
	movl	$0, -5400(%rbp)
	jmp	.L12
.L14:
	movl	-5404(%rbp), %eax
	movslq	%eax, %rcx
	movl	-5400(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-5264(%rbp,%rax,4), %eax
	cmpl	%eax, -5408(%rbp)
	jle	.L13
	movl	-5404(%rbp), %eax
	movslq	%eax, %rcx
	movl	-5400(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-5264(%rbp,%rax,4), %eax
	movl	%eax, -5408(%rbp)
.L13:
	addl	$1, -5400(%rbp)
.L12:
	movl	-5424(%rbp), %eax
	cmpl	%eax, -5400(%rbp)
	jl	.L14
	movl	-5404(%rbp), %eax
	cltq
	movl	-5408(%rbp), %edx
	movl	%edx, -5376(%rbp,%rax,4)
	movl	$100, -5408(%rbp)
	addl	$1, -5404(%rbp)
.L11:
	cmpl	$25, -5404(%rbp)
	jle	.L15
	movl	$0, -5396(%rbp)
	jmp	.L16
.L18:
	movl	-5396(%rbp), %eax
	cltq
	leaq	abc(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	movl	%eax, %edi
	call	putchar@PLT
	movl	-5396(%rbp), %eax
	cltq
	movl	-5376(%rbp,%rax,4), %eax
	leal	-1(%rax), %edx
	movl	-5396(%rbp), %eax
	cltq
	movl	%edx, -5376(%rbp,%rax,4)
.L17:
	movl	-5396(%rbp), %eax
	cltq
	movl	-5376(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jg	.L18
	addl	$1, -5396(%rbp)
.L16:
	cmpl	$25, -5396(%rbp)
	jle	.L17
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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	abc
	.data
	.align 16
	.type	abc, @object
	.size	abc, 27
abc:
	.string	"abcdefghijklmnopqrstuvwxyz"
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$4096, %rsp
	orq	$0, (%rsp)
	subq	$1288, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	leaq	-5424(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-5424(%rbp), %ecx
	movslq	%ecx, %rax
	subq	$1, %rax
	movq	%rax, -5392(%rbp)
	movslq	%ecx, %rax
	movq	%rax, %r14
	movl	$0, %r15d
	imulq	$408, %r15, %rdx
	imulq	$0, %r14, %rax
	leaq	(%rdx,%rax), %rsi
	movl	$408, %eax
	mulq	%r14
	addq	%rdx, %rsi
	movq	%rsi, %rdx
	movslq	%ecx, %rax
	movq	%rax, %r12
	movl	$0, %r13d
	imulq	$408, %r13, %rdx
	imulq	$0, %r12, %rax
	leaq	(%rdx,%rax), %rsi
	movl	$408, %eax
	mulq	%r12
	addq	%rdx, %rsi
	movq	%rsi, %rdx
	movslq	%ecx, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	salq	$4, %rdx
	addq	%rax, %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L2:
	cmpq	%rdx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L4
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$0, %rax
	movq	%rax, -5384(%rbp)
	movl	$0, -5420(%rbp)
	jmp	.L5
.L6:
	movl	-5420(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	salq	$4, %rdx
	addq	%rdx, %rax
	movq	-5384(%rbp), %rdx
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -5420(%rbp)
.L5:
	movl	-5424(%rbp), %eax
	cmpl	%eax, -5420(%rbp)
	jl	.L6
	leaq	-5264(%rbp), %rdx
	movl	$0, %eax
	movl	$650, %ecx
	movq	%rdx, %rdi
	rep stosq
	movl	$0, -5416(%rbp)
	jmp	.L7
.L10:
	movl	$0, -5412(%rbp)
	jmp	.L8
.L9:
	movq	-5384(%rbp), %rsi
	movl	-5412(%rbp), %eax
	movslq	%eax, %rcx
	movl	-5416(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	salq	$4, %rdx
	addq	%rdx, %rax
	addq	%rsi, %rax
	addq	%rcx, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	leal	-97(%rax), %ecx
	movslq	%ecx, %rsi
	movl	-5416(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	-5264(%rbp,%rax,4), %eax
	leal	1(%rax), %esi
	movslq	%ecx, %rcx
	movl	-5416(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	%esi, -5264(%rbp,%rax,4)
	addl	$1, -5412(%rbp)
.L8:
	movq	-5384(%rbp), %rsi
	movl	-5412(%rbp), %eax
	movslq	%eax, %rcx
	movl	-5416(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	salq	$4, %rdx
	addq	%rdx, %rax
	addq	%rsi, %rax
	addq	%rcx, %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	jne	.L9
	addl	$1, -5416(%rbp)
.L7:
	movl	-5424(%rbp), %eax
	cmpl	%eax, -5416(%rbp)
	jl	.L10
	leaq	-5376(%rbp), %rdx
	movl	$0, %eax
	movl	$13, %ecx
	movq	%rdx, %rdi
	rep stosq
	movl	$100, -5408(%rbp)
	movl	$0, -5404(%rbp)
	jmp	.L11
.L15:
	movl	$0, -5400(%rbp)
	jmp	.L12
.L14:
	movl	-5404(%rbp), %eax
	movslq	%eax, %rcx
	movl	-5400(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-5264(%rbp,%rax,4), %eax
	cmpl	%eax, -5408(%rbp)
	jle	.L13
	movl	-5404(%rbp), %eax
	movslq	%eax, %rcx
	movl	-5400(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-5264(%rbp,%rax,4), %eax
	movl	%eax, -5408(%rbp)
.L13:
	addl	$1, -5400(%rbp)
.L12:
	movl	-5424(%rbp), %eax
	cmpl	%eax, -5400(%rbp)
	jl	.L14
	movl	-5404(%rbp), %eax
	cltq
	movl	-5408(%rbp), %edx
	movl	%edx, -5376(%rbp,%rax,4)
	movl	$100, -5408(%rbp)
	addl	$1, -5404(%rbp)
.L11:
	cmpl	$25, -5404(%rbp)
	jle	.L15
	movl	$0, -5396(%rbp)
	jmp	.L16
.L18:
	movl	-5396(%rbp), %eax
	cltq
	leaq	abc(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	movl	%eax, %edi
	call	putchar@PLT
	movl	-5396(%rbp), %eax
	cltq
	movl	-5376(%rbp,%rax,4), %eax
	leal	-1(%rax), %edx
	movl	-5396(%rbp), %eax
	cltq
	movl	%edx, -5376(%rbp,%rax,4)
.L17:
	movl	-5396(%rbp), %eax
	cltq
	movl	-5376(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jg	.L18
	addl	$1, -5396(%rbp)
.L16:
	cmpl	$25, -5396(%rbp)
	jle	.L17
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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:
