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

```c
/*
  AOJ 2182
  Titl Eleven Lover
  @kankichi573
*/
#include <stdio.h>
#include <string.h>
char digits[80001];
int  hist[11];
int keta;

main()
{
  int ret,i;
  char d;

  while(scanf("%s",digits) && 0!=strcmp("0",digits))
    {
      memset(hist,0,sizeof(hist));
      keta=strlen(digits);
      while(digits[keta-1]<' ')
	{
	  digits[keta-1]='\0';
	  keta--;
	}
      d=ret=0;
      hist[0]=1;
      for(i=keta-1;i>=0;i--)
	{
	  digits[i] -= '0';
	  if((i % 2)==0)
	    d += digits[i];
	  else
	    d -= digits[i];
	  if(d < 0)
	    d+=11;
	  else if(d>10)
	    d-=11;
	  if(digits[i])
	    ret += hist[d]; 
	  hist[d]++;
	}
      printf("%d\n",ret);
    }
  return(0);
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d\n"
.LC1:
	.string	"%s"
.LC2:
	.string	"0"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	digits(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	hist(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	.LC1(%rip), %rbx
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movq	%r13, %rsi
	movq	%rbx, %rdi
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L12
	cmpw	$48, 0(%r13)
	je	.L12
	pxor	%xmm0, %xmm0
	movq	%r13, %rdi
	movq	$0, 32+hist(%rip)
	movl	$0, 40+hist(%rip)
	movaps	%xmm0, hist(%rip)
	movaps	%xmm0, 16+hist(%rip)
	call	strlen@PLT
	leal	-1(%rax), %edx
	movl	%eax, keta(%rip)
	addq	%r13, %rax
	movslq	%edx, %rcx
	cmpb	$31, 0(%r13,%rcx)
	jg	.L3
	.p2align 4,,10
	.p2align 3
.L4:
	movb	$0, -1(%rax)
	subq	$1, %rax
	movl	%edx, %ecx
	subl	$1, %edx
	cmpb	$31, -1(%rax)
	jle	.L4
	movl	%ecx, keta(%rip)
.L3:
	movl	$1, hist(%rip)
	testl	%edx, %edx
	js	.L16
	movslq	%edx, %rdi
	xorl	%esi, %esi
	xorl	%r8d, %r8d
	addq	%r13, %rdi
	.p2align 4,,10
	.p2align 3
.L11:
	movzbl	(%rdi), %eax
	movl	%esi, %ecx
	subl	$48, %eax
	movb	%al, (%rdi)
	subl	%eax, %ecx
	testb	$1, %dl
	jne	.L7
	leal	(%rsi,%rax), %ecx
.L7:
	leal	11(%rcx), %esi
	testb	%cl, %cl
	js	.L9
	leal	-11(%rcx), %esi
	cmpb	$10, %cl
	cmovle	%ecx, %esi
.L9:
	movsbq	%sil, %r9
	testb	%al, %al
	movl	(%r12,%r9,4), %ecx
	leal	(%r8,%rcx), %r10d
	cmovne	%r10d, %r8d
	addl	$1, %ecx
	subl	$1, %edx
	subq	$1, %rdi
	movl	%ecx, (%r12,%r9,4)
	cmpl	$-1, %edx
	jne	.L11
.L5:
	movl	%r8d, %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L12:
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	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
.L16:
	.cfi_restore_state
	xorl	%r8d, %r8d
	jmp	.L5
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.globl	keta
	.bss
	.align 4
	.type	keta, @object
	.size	keta, 4
keta:
	.zero	4
	.globl	hist
	.align 32
	.type	hist, @object
	.size	hist, 44
hist:
	.zero	44
	.globl	digits
	.align 32
	.type	digits, @object
	.size	digits, 80001
digits:
	.zero	80001
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
Optimized Assembly Code:

user
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d\n"
.LC1:
	.string	"%s"
.LC2:
	.string	"0"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	digits(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	hist(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	.LC1(%rip), %rbx
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movq	%r13, %rsi
	movq	%rbx, %rdi
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L12
	cmpw	$48, 0(%r13)
	je	.L12
	pxor	%xmm0, %xmm0
	movq	%r13, %rdi
	movq	$0, 32+hist(%rip)
	movl	$0, 40+hist(%rip)
	movaps	%xmm0, hist(%rip)
	movaps	%xmm0, 16+hist(%rip)
	call	strlen@PLT
	leal	-1(%rax), %edx
	movl	%eax, keta(%rip)
	addq	%r13, %rax
	movslq	%edx, %rcx
	cmpb	$31, 0(%r13,%rcx)
	jg	.L3
	.p2align 4,,10
	.p2align 3
.L4:
	movb	$0, -1(%rax)
	subq	$1, %rax
	movl	%edx, %ecx
	subl	$1, %edx
	cmpb	$31, -1(%rax)
	jle	.L4
	movl	%ecx, keta(%rip)
.L3:
	movl	$1, hist(%rip)
	testl	%edx, %edx
	js	.L16
	movslq	%edx, %rdi
	xorl	%esi, %esi
	xorl	%r8d, %r8d
	addq	%r13, %rdi
	.p2align 4,,10
	.p2align 3
.L11:
	movzbl	(%rdi), %eax
	movl	%esi, %ecx
	subl	$48, %eax
	movb	%al, (%rdi)
	subl	%eax, %ecx
	testb	$1, %dl
	jne	.L7
	leal	(%rsi,%rax), %ecx
.L7:
	leal	11(%rcx), %esi
	testb	%cl, %cl
	js	.L9
	leal	-11(%rcx), %esi
	cmpb	$10, %cl
	cmovle	%ecx, %esi
.L9:
	movsbq	%sil, %r9
	testb	%al, %al
	movl	(%r12,%r9,4), %ecx
	leal	(%r8,%rcx), %r10d
	cmovne	%r10d, %r8d
	addl	$1, %ecx
	subl	$1, %edx
	subq	$1, %rdi
	movl	%ecx, (%r12,%r9,4)
	cmpl	$-1, %edx
	jne	.L11
.L5:
	movl	%r8d, %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L12:
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	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
.L16:
	.cfi_restore_state
	xorl	%r8d, %r8d
	jmp	.L5
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.globl	keta
	.bss
	.align 4
	.type	keta, @object
	.size	keta, 4
keta:
	.zero	4
	.globl	hist
	.align 32
	.type	hist, @object
	.size	hist, 44
hist:
	.zero	44
	.globl	digits
	.align 32
	.type	digits, @object
	.size	digits, 80001
digits:
	.zero	80001
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```
rule
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d\n"
.LC1:
	.string	"%s"
.LC2:
	.string	"0"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	digits(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	hist(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	.LC1(%rip), %rbx
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movq	%r13, %rsi
	movq	%rbx, %rdi
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L12
	cmpw	$48, 0(%r13)
	je	.L12
	pxor	%xmm0, %xmm0
	movq	%r13, %rdi
	movq	$0, 32+hist(%rip)
	movl	$0, 40+hist(%rip)
	movaps	%xmm0, hist(%rip)
	movaps	%xmm0, 16+hist(%rip)
	call	strlen@PLT
	leal	-1(%rax), %edx
	movl	%eax, keta(%rip)
	addq	%r13, %rax
	movslq	%edx, %rcx
	cmpb	$31, 0(%r13,%rcx)
	jg	.L3
	.p2align 4,,10
	.p2align 3
.L4:
	movb	$0, -1(%rax)
	subq	$1, %rax
	movl	%edx, %ecx
	subl	$1, %edx
	cmpb	$31, -1(%rax)
	jle	.L4
	movl	%ecx, keta(%rip)
.L3:
	movl	$1, hist(%rip)
	testl	%edx, %edx
	js	.L16
	movslq	%edx, %rdi
	xorl	%esi, %esi
	xorl	%r8d, %r8d
	addq	%r13, %rdi
	.p2align 4,,10
	.p2align 3
.L11:
	movzbl	(%rdi), %eax
	movl	%esi, %ecx
	subl	$48, %eax
	movb	%al, (%rdi)
	subl	%eax, %ecx
	testb	$1, %dl
	jne	.L7
	leal	(%rsi,%rax), %ecx
.L7:
	leal	11(%rcx), %esi
	testb	%cl, %cl
	js	.L9
	leal	-11(%rcx), %esi
	cmpb	$10, %cl
	cmovle	%ecx, %esi
.L9:
	movsbq	%sil, %r9
	testb	%al, %al
	movl	(%r12,%r9,4), %ecx
	leal	(%r8,%rcx), %r10d
	cmovne	%r10d, %r8d
	addl	$1, %ecx
	subl	$1, %edx
	subq	$1, %rdi
	movl	%ecx, (%r12,%r9,4)
	cmpl	$-1, %edx
	jne	.L11
.L5:
	movl	%r8d, %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L12:
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	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
.L16:
	.cfi_restore_state
	xorl	%r8d, %r8d
	jmp	.L5
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.globl	keta
	.bss
	.align 4
	.type	keta, @object
	.size	keta, 4
keta:
	.zero	4
	.globl	hist
	.align 32
	.type	hist, @object
	.size	hist, 44
hist:
	.zero	44
	.globl	digits
	.align 32
	.type	digits, @object
	.size	digits, 80001
digits:
	.zero	80001
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```
```c
/*
  AOJ 2182
  Titl Eleven Lover
  @kankichi573
*/
#include <stdio.h>
#include <string.h>
char digits[80001];
int  hist[11];
int keta;

main()
{
  int ret,i;
  char d;

  while(scanf("%s",digits) && 0!=strcmp("0",digits))
    {
      memset(hist,0,sizeof(hist));
      keta=strlen(digits);
      while(digits[keta-1]<' ')
	{
	  digits[keta-1]='\0';
	  keta--;
	}
      d=ret=0;
      hist[0]=1;
      for(i=keta-1;i>=0;i--)
	{
	  digits[i] -= '0';
	  if((i % 2)==0)
	    d += digits[i];
	  else
	    d -= digits[i];
	  if(d < 0)
	    d+=11;
	  else if(d>10)
	    d-=11;
	  if(digits[i])
	    ret += hist[d]; 
	  hist[d]++;
	}
      printf("%d\n",ret);
    }
  return(0);
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
/*
  AOJ 2182
  Titl Eleven Lover
  @kankichi573
*/
#include <stdio.h>
#include <string.h>
char digits[80001];
int  hist[11];
int keta;

main()
{
  int ret,i;
  char d;

  while(scanf("%s",digits) && 0!=strcmp("0",digits))
    {
      memset(hist,0,sizeof(hist));
      keta=strlen(digits);
      while(digits[keta-1]<' ')
	{
	  digits[keta-1]='\0';
	  keta--;
	}
      d=ret=0;
      hist[0]=1;
      for(i=keta-1;i>=0;i--)
	{
	  digits[i] -= '0';
	  if((i % 2)==0)
	    d += digits[i];
	  else
	    d -= digits[i];
	  if(d < 0)
	    d+=11;
	  else if(d>10)
	    d-=11;
	  if(digits[i])
	    ret += hist[d]; 
	  hist[d]++;
	}
      printf("%d\n",ret);
    }
  return(0);
}```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
Optimized Assembly Code:

17819
1011
11011
1234567891011121314151617181920
0
 17819
1010
11011
1234567891011121314151617181920
0
 17819
1011
11011
1300831114838731654212402340246
0
 17819
1010
01011
1234567891011121314151617181920
0
 17819
1010
11011
1300831114838731654212402340246
0
 17819
1010
01011
1300831114838731654212402340246
0
 17819
1010
10011
1300831114838731654212402340246
0
 17819
1111
11001
1234567891011121314151617181920
0
 17819
1010
11011
1644832131651890431836205044158
0
 17819
1011
01011
1300831114838731654212402340246
0

1
1
4
38
 1
0
4
38
 1
1
4
32
 1
0
1
38
 1
0
4
32
 1
0
1
32
 1
0
2
32
 1
4
4
38
 1
0
4
39
 1
1
1
32

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

```c
/*
  AOJ 2182
  Titl Eleven Lover
  @kankichi573
*/
#include <stdio.h>
#include <string.h>
char digits[80001];
int  hist[11];
int keta;

main()
{
  int ret,i;
  char d;

  while(scanf("%s",digits) && 0!=strcmp("0",digits))
    {
      memset(hist,0,sizeof(hist));
      keta=strlen(digits);
      while(digits[keta-1]<' ')
	{
	  digits[keta-1]='\0';
	  keta--;
	}
      d=ret=0;
      hist[0]=1;
      for(i=keta-1;i>=0;i--)
	{
	  digits[i] -= '0';
	  if((i % 2)==0)
	    d += digits[i];
	  else
	    d -= digits[i];
	  if(d < 0)
	    d+=11;
	  else if(d>10)
	    d-=11;
	  if(digits[i])
	    ret += hist[d]; 
	  hist[d]++;
	}
      printf("%d\n",ret);
    }
  return(0);
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d\n"
.LC1:
	.string	"%s"
.LC2:
	.string	"0"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	digits(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	hist(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	.LC1(%rip), %rbx
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movq	%r13, %rsi
	movq	%rbx, %rdi
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L12
	cmpw	$48, 0(%r13)
	je	.L12
	pxor	%xmm0, %xmm0
	movq	%r13, %rdi
	movq	$0, 32+hist(%rip)
	movl	$0, 40+hist(%rip)
	movaps	%xmm0, hist(%rip)
	movaps	%xmm0, 16+hist(%rip)
	call	strlen@PLT
	leal	-1(%rax), %edx
	movl	%eax, keta(%rip)
	addq	%r13, %rax
	movslq	%edx, %rcx
	cmpb	$31, 0(%r13,%rcx)
	jg	.L3
	.p2align 4,,10
	.p2align 3
.L4:
	movb	$0, -1(%rax)
	subq	$1, %rax
	movl	%edx, %ecx
	subl	$1, %edx
	cmpb	$31, -1(%rax)
	jle	.L4
	movl	%ecx, keta(%rip)
.L3:
	movl	$1, hist(%rip)
	testl	%edx, %edx
	js	.L16
	movslq	%edx, %rdi
	xorl	%esi, %esi
	xorl	%r8d, %r8d
	addq	%r13, %rdi
	.p2align 4,,10
	.p2align 3
.L11:
	movzbl	(%rdi), %eax
	movl	%esi, %ecx
	subl	$48, %eax
	movb	%al, (%rdi)
	subl	%eax, %ecx
	testb	$1, %dl
	jne	.L7
	leal	(%rsi,%rax), %ecx
.L7:
	leal	11(%rcx), %esi
	testb	%cl, %cl
	js	.L9
	leal	-11(%rcx), %esi
	cmpb	$10, %cl
	cmovle	%ecx, %esi
.L9:
	movsbq	%sil, %r9
	testb	%al, %al
	movl	(%r12,%r9,4), %ecx
	leal	(%r8,%rcx), %r10d
	cmovne	%r10d, %r8d
	addl	$1, %ecx
	subl	$1, %edx
	subq	$1, %rdi
	movl	%ecx, (%r12,%r9,4)
	cmpl	$-1, %edx
	jne	.L11
.L5:
	movl	%r8d, %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L12:
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	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
.L16:
	.cfi_restore_state
	xorl	%r8d, %r8d
	jmp	.L5
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.globl	keta
	.bss
	.align 4
	.type	keta, @object
	.size	keta, 4
keta:
	.zero	4
	.globl	hist
	.align 32
	.type	hist, @object
	.size	hist, 44
hist:
	.zero	44
	.globl	digits
	.align 32
	.type	digits, @object
	.size	digits, 80001
digits:
	.zero	80001
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
Optimized Assembly Code:

train
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d\n"
.LC1:
	.string	"%s"
.LC2:
	.string	"0"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	digits(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	hist(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	.LC1(%rip), %rbx
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movq	%r13, %rsi
	movq	%rbx, %rdi
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L12
	cmpw	$48, 0(%r13)
	je	.L12
	pxor	%xmm0, %xmm0
	movq	%r13, %rdi
	movq	$0, 32+hist(%rip)
	movl	$0, 40+hist(%rip)
	movaps	%xmm0, hist(%rip)
	movaps	%xmm0, 16+hist(%rip)
	call	strlen@PLT
	leal	-1(%rax), %edx
	movl	%eax, keta(%rip)
	addq	%r13, %rax
	movslq	%edx, %rcx
	cmpb	$31, 0(%r13,%rcx)
	jg	.L3
	.p2align 4,,10
	.p2align 3
.L4:
	movb	$0, -1(%rax)
	subq	$1, %rax
	movl	%edx, %ecx
	subl	$1, %edx
	cmpb	$31, -1(%rax)
	jle	.L4
	movl	%ecx, keta(%rip)
.L3:
	movl	$1, hist(%rip)
	testl	%edx, %edx
	js	.L16
	movslq	%edx, %rdi
	xorl	%esi, %esi
	xorl	%r8d, %r8d
	addq	%r13, %rdi
	.p2align 4,,10
	.p2align 3
.L11:
	movzbl	(%rdi), %eax
	movl	%esi, %ecx
	subl	$48, %eax
	movb	%al, (%rdi)
	subl	%eax, %ecx
	testb	$1, %dl
	jne	.L7
	leal	(%rsi,%rax), %ecx
.L7:
	leal	11(%rcx), %esi
	testb	%cl, %cl
	js	.L9
	leal	-11(%rcx), %esi
	cmpb	$10, %cl
	cmovle	%ecx, %esi
.L9:
	movsbq	%sil, %r9
	testb	%al, %al
	movl	(%r12,%r9,4), %ecx
	leal	(%r8,%rcx), %r10d
	cmovne	%r10d, %r8d
	addl	$1, %ecx
	subl	$1, %edx
	subq	$1, %rdi
	movl	%ecx, (%r12,%r9,4)
	cmpl	$-1, %edx
	jne	.L11
.L5:
	movl	%r8d, %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L12:
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	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
.L16:
	.cfi_restore_state
	xorl	%r8d, %r8d
	jmp	.L5
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.globl	keta
	.bss
	.align 4
	.type	keta, @object
	.size	keta, 4
keta:
	.zero	4
	.globl	hist
	.align 32
	.type	hist, @object
	.size	hist, 44
hist:
	.zero	44
	.globl	digits
	.align 32
	.type	digits, @object
	.size	digits, 80001
digits:
	.zero	80001
	.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:
```