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

```c
#include<stdio.h>
#include<string.h>
int main(void)
{
    long int i,j,sum = 0,a,k;
    char s[11];
    scanf("%s",s);
    a = strlen(s);
    for(i = 0 ; i < (1 << (a - 1)) ; i++)
    {
        k = 1;
        sum += s[a - 1] - 48;
        for(j = 0 ; j <= a - 2 ; j++)
        {
            if((i >> j) & 1)
            {
                k *= 10;
            }
            else
            {
                k = 1;
            }
            sum += (s[a - 2 - j] - 48) * k;
        }
    }
    printf("%ld\n",sum);
    return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s"
.LC1:
	.string	"%ld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	subq	$40, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	13(%rsp), %rbp
	movq	%rbp, %rsi
	call	__isoc99_scanf@PLT
	movq	%rbp, %rdi
	call	strlen@PLT
	movl	$1, %r9d
	xorl	%edx, %edx
	movsbl	12(%rsp,%rax), %r8d
	leal	-1(%rax), %ecx
	movq	%rax, %rdi
	leaq	-1(%rax), %rsi
	sall	%cl, %r9d
	xorl	%eax, %eax
	leaq	-2(%rdi), %r10
	subl	$48, %r8d
	movslq	%r9d, %r9
	movslq	%r8d, %r8
	.p2align 4,,10
	.p2align 3
.L14:
	addq	%r8, %rdx
	testq	%rsi, %rsi
	jle	.L2
	movq	%rax, %rcx
	andl	$1, %ecx
	cmpq	$1, %rcx
	movsbl	13(%rsp,%r10), %ecx
	sbbq	%r11, %r11
	andq	$-9, %r11
	subl	$48, %ecx
	addq	$10, %r11
	movslq	%ecx, %rcx
	imulq	%r11, %rcx
	addq	%rcx, %rdx
	cmpq	$1, %rsi
	je	.L2
	movl	$1, %ebx
	testb	$2, %al
	je	.L5
	leaq	(%r11,%r11,4), %rbx
	addq	%rbx, %rbx
.L5:
	movsbl	10(%rsp,%rdi), %ecx
	subl	$48, %ecx
	movslq	%ecx, %rcx
	imulq	%rbx, %rcx
	addq	%rcx, %rdx
	cmpq	$2, %rsi
	je	.L2
	movl	$1, %r11d
	testb	$4, %al
	je	.L6
	leaq	(%rbx,%rbx,4), %r11
	addq	%r11, %r11
.L6:
	movsbl	9(%rsp,%rdi), %ecx
	subl	$48, %ecx
	movslq	%ecx, %rcx
	imulq	%r11, %rcx
	addq	%rcx, %rdx
	cmpq	$3, %rsi
	je	.L2
	movl	$1, %ebx
	testb	$8, %al
	je	.L7
	leaq	(%r11,%r11,4), %rbx
	addq	%rbx, %rbx
.L7:
	movsbl	8(%rsp,%rdi), %ecx
	subl	$48, %ecx
	movslq	%ecx, %rcx
	imulq	%rbx, %rcx
	addq	%rcx, %rdx
	cmpq	$4, %rsi
	je	.L2
	movl	$1, %r11d
	testb	$16, %al
	je	.L8
	leaq	(%rbx,%rbx,4), %r11
	addq	%r11, %r11
.L8:
	movsbl	7(%rsp,%rdi), %ecx
	subl	$48, %ecx
	movslq	%ecx, %rcx
	imulq	%r11, %rcx
	addq	%rcx, %rdx
	cmpq	$5, %rsi
	je	.L2
	movl	$1, %ebx
	testb	$32, %al
	je	.L9
	leaq	(%r11,%r11,4), %rbx
	addq	%rbx, %rbx
.L9:
	movsbl	6(%rsp,%rdi), %ecx
	subl	$48, %ecx
	movslq	%ecx, %rcx
	imulq	%rbx, %rcx
	addq	%rcx, %rdx
	cmpq	$6, %rsi
	je	.L2
	movl	$1, %r11d
	testb	$64, %al
	je	.L10
	leaq	(%rbx,%rbx,4), %r11
	addq	%r11, %r11
.L10:
	movsbl	5(%rsp,%rdi), %ecx
	subl	$48, %ecx
	movslq	%ecx, %rcx
	imulq	%r11, %rcx
	addq	%rcx, %rdx
	cmpq	$7, %rsi
	je	.L2
	movl	$1, %ebx
	testb	$-128, %al
	je	.L11
	leaq	(%r11,%r11,4), %rbx
	addq	%rbx, %rbx
.L11:
	movsbl	4(%rsp,%rdi), %ecx
	subl	$48, %ecx
	movslq	%ecx, %rcx
	imulq	%rbx, %rcx
	addq	%rcx, %rdx
	cmpq	$9, %rsi
	jne	.L2
	movl	$1, %r11d
	testb	$1, %ah
	je	.L13
	leaq	(%rbx,%rbx,4), %r11
	addq	%r11, %r11
.L13:
	movsbl	3(%rsp,%rdi), %ecx
	subl	$48, %ecx
	movslq	%ecx, %rcx
	imulq	%r11, %rcx
	addq	%rcx, %rdx
.L2:
	addq	$1, %rax
	cmpq	%r9, %rax
	jl	.L14
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L57
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L57:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.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.
Optimized Assembly Code:

user
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s"
.LC1:
	.string	"%ld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	subq	$40, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	13(%rsp), %rbp
	movq	%rbp, %rsi
	call	__isoc99_scanf@PLT
	movq	%rbp, %rdi
	call	strlen@PLT
	movl	$1, %r9d
	xorl	%edx, %edx
	movsbl	12(%rsp,%rax), %r8d
	leal	-1(%rax), %ecx
	movq	%rax, %rdi
	leaq	-1(%rax), %rsi
	sall	%cl, %r9d
	xorl	%eax, %eax
	leaq	-2(%rdi), %r10
	subl	$48, %r8d
	movslq	%r9d, %r9
	movslq	%r8d, %r8
	.p2align 4,,10
	.p2align 3
.L14:
	addq	%r8, %rdx
	testq	%rsi, %rsi
	jle	.L2
	movq	%rax, %rcx
	andl	$1, %ecx
	cmpq	$1, %rcx
	movsbl	13(%rsp,%r10), %ecx
	sbbq	%r11, %r11
	andq	$-9, %r11
	subl	$48, %ecx
	addq	$10, %r11
	movslq	%ecx, %rcx
	imulq	%r11, %rcx
	addq	%rcx, %rdx
	cmpq	$1, %rsi
	je	.L2
	movl	$1, %ebx
	testb	$2, %al
	je	.L5
	leaq	(%r11,%r11,4), %rbx
	addq	%rbx, %rbx
.L5:
	movsbl	10(%rsp,%rdi), %ecx
	subl	$48, %ecx
	movslq	%ecx, %rcx
	imulq	%rbx, %rcx
	addq	%rcx, %rdx
	cmpq	$2, %rsi
	je	.L2
	movl	$1, %r11d
	testb	$4, %al
	je	.L6
	leaq	(%rbx,%rbx,4), %r11
	addq	%r11, %r11
.L6:
	movsbl	9(%rsp,%rdi), %ecx
	subl	$48, %ecx
	movslq	%ecx, %rcx
	imulq	%r11, %rcx
	addq	%rcx, %rdx
	cmpq	$3, %rsi
	je	.L2
	movl	$1, %ebx
	testb	$8, %al
	je	.L7
	leaq	(%r11,%r11,4), %rbx
	addq	%rbx, %rbx
.L7:
	movsbl	8(%rsp,%rdi), %ecx
	subl	$48, %ecx
	movslq	%ecx, %rcx
	imulq	%rbx, %rcx
	addq	%rcx, %rdx
	cmpq	$4, %rsi
	je	.L2
	movl	$1, %r11d
	testb	$16, %al
	je	.L8
	leaq	(%rbx,%rbx,4), %r11
	addq	%r11, %r11
.L8:
	movsbl	7(%rsp,%rdi), %ecx
	subl	$48, %ecx
	movslq	%ecx, %rcx
	imulq	%r11, %rcx
	addq	%rcx, %rdx
	cmpq	$5, %rsi
	je	.L2
	movl	$1, %ebx
	testb	$32, %al
	je	.L9
	leaq	(%r11,%r11,4), %rbx
	addq	%rbx, %rbx
.L9:
	movsbl	6(%rsp,%rdi), %ecx
	subl	$48, %ecx
	movslq	%ecx, %rcx
	imulq	%rbx, %rcx
	addq	%rcx, %rdx
	cmpq	$6, %rsi
	je	.L2
	movl	$1, %r11d
	testb	$64, %al
	je	.L10
	leaq	(%rbx,%rbx,4), %r11
	addq	%r11, %r11
.L10:
	movsbl	5(%rsp,%rdi), %ecx
	subl	$48, %ecx
	movslq	%ecx, %rcx
	imulq	%r11, %rcx
	addq	%rcx, %rdx
	cmpq	$7, %rsi
	je	.L2
	movl	$1, %ebx
	testb	$-128, %al
	je	.L11
	leaq	(%r11,%r11,4), %rbx
	addq	%rbx, %rbx
.L11:
	movsbl	4(%rsp,%rdi), %ecx
	subl	$48, %ecx
	movslq	%ecx, %rcx
	imulq	%rbx, %rcx
	addq	%rcx, %rdx
	cmpq	$9, %rsi
	jne	.L2
	movl	$1, %r11d
	testb	$1, %ah
	je	.L13
	leaq	(%rbx,%rbx,4), %r11
	addq	%r11, %r11
.L13:
	movsbl	3(%rsp,%rdi), %ecx
	subl	$48, %ecx
	movslq	%ecx, %rcx
	imulq	%r11, %rcx
	addq	%rcx, %rdx
.L2:
	addq	$1, %rax
	cmpq	%r9, %rax
	jl	.L14
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L57
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L57:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.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
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s"
.LC1:
	.string	"%ld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	subq	$40, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	13(%rsp), %rbp
	movq	%rbp, %rsi
	call	__isoc99_scanf@PLT
	movq	%rbp, %rdi
	call	strlen@PLT
	movl	$1, %r9d
	xorl	%edx, %edx
	movsbl	12(%rsp,%rax), %r8d
	leal	-1(%rax), %ecx
	movq	%rax, %rdi
	leaq	-1(%rax), %rsi
	sall	%cl, %r9d
	xorl	%eax, %eax
	leaq	-2(%rdi), %r10
	subl	$48, %r8d
	movslq	%r9d, %r9
	movslq	%r8d, %r8
	.p2align 4,,10
	.p2align 3
.L14:
	addq	%r8, %rdx
	testq	%rsi, %rsi
	jle	.L2
	movq	%rax, %rcx
	andl	$1, %ecx
	cmpq	$1, %rcx
	movsbl	13(%rsp,%r10), %ecx
	sbbq	%r11, %r11
	andq	$-9, %r11
	subl	$48, %ecx
	addq	$10, %r11
	movslq	%ecx, %rcx
	imulq	%r11, %rcx
	addq	%rcx, %rdx
	cmpq	$1, %rsi
	je	.L2
	movl	$1, %ebx
	testb	$2, %al
	je	.L5
	leaq	(%r11,%r11,4), %rbx
	addq	%rbx, %rbx
.L5:
	movsbl	10(%rsp,%rdi), %ecx
	subl	$48, %ecx
	movslq	%ecx, %rcx
	imulq	%rbx, %rcx
	addq	%rcx, %rdx
	cmpq	$2, %rsi
	je	.L2
	movl	$1, %r11d
	testb	$4, %al
	je	.L6
	leaq	(%rbx,%rbx,4), %r11
	addq	%r11, %r11
.L6:
	movsbl	9(%rsp,%rdi), %ecx
	subl	$48, %ecx
	movslq	%ecx, %rcx
	imulq	%r11, %rcx
	addq	%rcx, %rdx
	cmpq	$3, %rsi
	je	.L2
	movl	$1, %ebx
	testb	$8, %al
	je	.L7
	leaq	(%r11,%r11,4), %rbx
	addq	%rbx, %rbx
.L7:
	movsbl	8(%rsp,%rdi), %ecx
	subl	$48, %ecx
	movslq	%ecx, %rcx
	imulq	%rbx, %rcx
	addq	%rcx, %rdx
	cmpq	$4, %rsi
	je	.L2
	movl	$1, %r11d
	testb	$16, %al
	je	.L8
	leaq	(%rbx,%rbx,4), %r11
	addq	%r11, %r11
.L8:
	movsbl	7(%rsp,%rdi), %ecx
	subl	$48, %ecx
	movslq	%ecx, %rcx
	imulq	%r11, %rcx
	addq	%rcx, %rdx
	cmpq	$5, %rsi
	je	.L2
	movl	$1, %ebx
	testb	$32, %al
	je	.L9
	leaq	(%r11,%r11,4), %rbx
	addq	%rbx, %rbx
.L9:
	movsbl	6(%rsp,%rdi), %ecx
	subl	$48, %ecx
	movslq	%ecx, %rcx
	imulq	%rbx, %rcx
	addq	%rcx, %rdx
	cmpq	$6, %rsi
	je	.L2
	movl	$1, %r11d
	testb	$64, %al
	je	.L10
	leaq	(%rbx,%rbx,4), %r11
	addq	%r11, %r11
.L10:
	movsbl	5(%rsp,%rdi), %ecx
	subl	$48, %ecx
	movslq	%ecx, %rcx
	imulq	%r11, %rcx
	addq	%rcx, %rdx
	cmpq	$7, %rsi
	je	.L2
	movl	$1, %ebx
	testb	$-128, %al
	je	.L11
	leaq	(%r11,%r11,4), %rbx
	addq	%rbx, %rbx
.L11:
	movsbl	4(%rsp,%rdi), %ecx
	subl	$48, %ecx
	movslq	%ecx, %rcx
	imulq	%rbx, %rcx
	addq	%rcx, %rdx
	cmpq	$9, %rsi
	jne	.L2
	movl	$1, %r11d
	testb	$1, %ah
	je	.L13
	leaq	(%rbx,%rbx,4), %r11
	addq	%r11, %r11
.L13:
	movsbl	3(%rsp,%rdi), %ecx
	subl	$48, %ecx
	movslq	%ecx, %rcx
	imulq	%r11, %rcx
	addq	%rcx, %rdx
.L2:
	addq	$1, %rax
	cmpq	%r9, %rax
	jl	.L14
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L57
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L57:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.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:
```
```c
#include<stdio.h>
#include<string.h>
int main(void)
{
    long int i,j,sum = 0,a,k;
    char s[11];
    scanf("%s",s);
    a = strlen(s);
    for(i = 0 ; i < (1 << (a - 1)) ; i++)
    {
        k = 1;
        sum += s[a - 1] - 48;
        for(j = 0 ; j <= a - 2 ; j++)
        {
            if((i >> j) & 1)
            {
                k *= 10;
            }
            else
            {
                k = 1;
            }
            sum += (s[a - 2 - j] - 48) * k;
        }
    }
    printf("%ld\n",sum);
    return 0;
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>
#include<string.h>
int main(void)
{
    long int i,j,sum = 0,a,k;
    char s[11];
    scanf("%s",s);
    a = strlen(s);
    for(i = 0 ; i < (1 << (a - 1)) ; i++)
    {
        k = 1;
        sum += s[a - 1] - 48;
        for(j = 0 ; j <= a - 2 ; j++)
        {
            if((i >> j) & 1)
            {
                k *= 10;
            }
            else
            {
                k = 1;
            }
            sum += (s[a - 2 - j] - 48) * k;
        }
    }
    printf("%ld\n",sum);
    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:

88
 131
 189
 292
 348
 260
 11
 16
 0
 1

104
 182
 324
 430
 456
 356
 13
 23
 0
 1

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

```c
#include<stdio.h>
#include<string.h>
int main(void)
{
    long int i,j,sum = 0,a,k;
    char s[11];
    scanf("%s",s);
    a = strlen(s);
    for(i = 0 ; i < (1 << (a - 1)) ; i++)
    {
        k = 1;
        sum += s[a - 1] - 48;
        for(j = 0 ; j <= a - 2 ; j++)
        {
            if((i >> j) & 1)
            {
                k *= 10;
            }
            else
            {
                k = 1;
            }
            sum += (s[a - 2 - j] - 48) * k;
        }
    }
    printf("%ld\n",sum);
    return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s"
.LC1:
	.string	"%ld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	subq	$40, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	13(%rsp), %rbp
	movq	%rbp, %rsi
	call	__isoc99_scanf@PLT
	movq	%rbp, %rdi
	call	strlen@PLT
	movl	$1, %r9d
	xorl	%edx, %edx
	movsbl	12(%rsp,%rax), %r8d
	leal	-1(%rax), %ecx
	movq	%rax, %rdi
	leaq	-1(%rax), %rsi
	sall	%cl, %r9d
	xorl	%eax, %eax
	leaq	-2(%rdi), %r10
	subl	$48, %r8d
	movslq	%r9d, %r9
	movslq	%r8d, %r8
	.p2align 4,,10
	.p2align 3
.L14:
	addq	%r8, %rdx
	testq	%rsi, %rsi
	jle	.L2
	movq	%rax, %rcx
	andl	$1, %ecx
	cmpq	$1, %rcx
	movsbl	13(%rsp,%r10), %ecx
	sbbq	%r11, %r11
	andq	$-9, %r11
	subl	$48, %ecx
	addq	$10, %r11
	movslq	%ecx, %rcx
	imulq	%r11, %rcx
	addq	%rcx, %rdx
	cmpq	$1, %rsi
	je	.L2
	movl	$1, %ebx
	testb	$2, %al
	je	.L5
	leaq	(%r11,%r11,4), %rbx
	addq	%rbx, %rbx
.L5:
	movsbl	10(%rsp,%rdi), %ecx
	subl	$48, %ecx
	movslq	%ecx, %rcx
	imulq	%rbx, %rcx
	addq	%rcx, %rdx
	cmpq	$2, %rsi
	je	.L2
	movl	$1, %r11d
	testb	$4, %al
	je	.L6
	leaq	(%rbx,%rbx,4), %r11
	addq	%r11, %r11
.L6:
	movsbl	9(%rsp,%rdi), %ecx
	subl	$48, %ecx
	movslq	%ecx, %rcx
	imulq	%r11, %rcx
	addq	%rcx, %rdx
	cmpq	$3, %rsi
	je	.L2
	movl	$1, %ebx
	testb	$8, %al
	je	.L7
	leaq	(%r11,%r11,4), %rbx
	addq	%rbx, %rbx
.L7:
	movsbl	8(%rsp,%rdi), %ecx
	subl	$48, %ecx
	movslq	%ecx, %rcx
	imulq	%rbx, %rcx
	addq	%rcx, %rdx
	cmpq	$4, %rsi
	je	.L2
	movl	$1, %r11d
	testb	$16, %al
	je	.L8
	leaq	(%rbx,%rbx,4), %r11
	addq	%r11, %r11
.L8:
	movsbl	7(%rsp,%rdi), %ecx
	subl	$48, %ecx
	movslq	%ecx, %rcx
	imulq	%r11, %rcx
	addq	%rcx, %rdx
	cmpq	$5, %rsi
	je	.L2
	movl	$1, %ebx
	testb	$32, %al
	je	.L9
	leaq	(%r11,%r11,4), %rbx
	addq	%rbx, %rbx
.L9:
	movsbl	6(%rsp,%rdi), %ecx
	subl	$48, %ecx
	movslq	%ecx, %rcx
	imulq	%rbx, %rcx
	addq	%rcx, %rdx
	cmpq	$6, %rsi
	je	.L2
	movl	$1, %r11d
	testb	$64, %al
	je	.L10
	leaq	(%rbx,%rbx,4), %r11
	addq	%r11, %r11
.L10:
	movsbl	5(%rsp,%rdi), %ecx
	subl	$48, %ecx
	movslq	%ecx, %rcx
	imulq	%r11, %rcx
	addq	%rcx, %rdx
	cmpq	$7, %rsi
	je	.L2
	movl	$1, %ebx
	testb	$-128, %al
	je	.L11
	leaq	(%r11,%r11,4), %rbx
	addq	%rbx, %rbx
.L11:
	movsbl	4(%rsp,%rdi), %ecx
	subl	$48, %ecx
	movslq	%ecx, %rcx
	imulq	%rbx, %rcx
	addq	%rcx, %rdx
	cmpq	$9, %rsi
	jne	.L2
	movl	$1, %r11d
	testb	$1, %ah
	je	.L13
	leaq	(%rbx,%rbx,4), %r11
	addq	%r11, %r11
.L13:
	movsbl	3(%rsp,%rdi), %ecx
	subl	$48, %ecx
	movslq	%ecx, %rcx
	imulq	%r11, %rcx
	addq	%rcx, %rdx
.L2:
	addq	$1, %rax
	cmpq	%r9, %rax
	jl	.L14
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L57
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L57:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.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.
Optimized Assembly Code:

train
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s"
.LC1:
	.string	"%ld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	subq	$40, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	13(%rsp), %rbp
	movq	%rbp, %rsi
	call	__isoc99_scanf@PLT
	movq	%rbp, %rdi
	call	strlen@PLT
	movl	$1, %r9d
	xorl	%edx, %edx
	movsbl	12(%rsp,%rax), %r8d
	leal	-1(%rax), %ecx
	movq	%rax, %rdi
	leaq	-1(%rax), %rsi
	sall	%cl, %r9d
	xorl	%eax, %eax
	leaq	-2(%rdi), %r10
	subl	$48, %r8d
	movslq	%r9d, %r9
	movslq	%r8d, %r8
	.p2align 4,,10
	.p2align 3
.L14:
	addq	%r8, %rdx
	testq	%rsi, %rsi
	jle	.L2
	movq	%rax, %rcx
	andl	$1, %ecx
	cmpq	$1, %rcx
	movsbl	13(%rsp,%r10), %ecx
	sbbq	%r11, %r11
	andq	$-9, %r11
	subl	$48, %ecx
	addq	$10, %r11
	movslq	%ecx, %rcx
	imulq	%r11, %rcx
	addq	%rcx, %rdx
	cmpq	$1, %rsi
	je	.L2
	movl	$1, %ebx
	testb	$2, %al
	je	.L5
	leaq	(%r11,%r11,4), %rbx
	addq	%rbx, %rbx
.L5:
	movsbl	10(%rsp,%rdi), %ecx
	subl	$48, %ecx
	movslq	%ecx, %rcx
	imulq	%rbx, %rcx
	addq	%rcx, %rdx
	cmpq	$2, %rsi
	je	.L2
	movl	$1, %r11d
	testb	$4, %al
	je	.L6
	leaq	(%rbx,%rbx,4), %r11
	addq	%r11, %r11
.L6:
	movsbl	9(%rsp,%rdi), %ecx
	subl	$48, %ecx
	movslq	%ecx, %rcx
	imulq	%r11, %rcx
	addq	%rcx, %rdx
	cmpq	$3, %rsi
	je	.L2
	movl	$1, %ebx
	testb	$8, %al
	je	.L7
	leaq	(%r11,%r11,4), %rbx
	addq	%rbx, %rbx
.L7:
	movsbl	8(%rsp,%rdi), %ecx
	subl	$48, %ecx
	movslq	%ecx, %rcx
	imulq	%rbx, %rcx
	addq	%rcx, %rdx
	cmpq	$4, %rsi
	je	.L2
	movl	$1, %r11d
	testb	$16, %al
	je	.L8
	leaq	(%rbx,%rbx,4), %r11
	addq	%r11, %r11
.L8:
	movsbl	7(%rsp,%rdi), %ecx
	subl	$48, %ecx
	movslq	%ecx, %rcx
	imulq	%r11, %rcx
	addq	%rcx, %rdx
	cmpq	$5, %rsi
	je	.L2
	movl	$1, %ebx
	testb	$32, %al
	je	.L9
	leaq	(%r11,%r11,4), %rbx
	addq	%rbx, %rbx
.L9:
	movsbl	6(%rsp,%rdi), %ecx
	subl	$48, %ecx
	movslq	%ecx, %rcx
	imulq	%rbx, %rcx
	addq	%rcx, %rdx
	cmpq	$6, %rsi
	je	.L2
	movl	$1, %r11d
	testb	$64, %al
	je	.L10
	leaq	(%rbx,%rbx,4), %r11
	addq	%r11, %r11
.L10:
	movsbl	5(%rsp,%rdi), %ecx
	subl	$48, %ecx
	movslq	%ecx, %rcx
	imulq	%r11, %rcx
	addq	%rcx, %rdx
	cmpq	$7, %rsi
	je	.L2
	movl	$1, %ebx
	testb	$-128, %al
	je	.L11
	leaq	(%r11,%r11,4), %rbx
	addq	%rbx, %rbx
.L11:
	movsbl	4(%rsp,%rdi), %ecx
	subl	$48, %ecx
	movslq	%ecx, %rcx
	imulq	%rbx, %rcx
	addq	%rcx, %rdx
	cmpq	$9, %rsi
	jne	.L2
	movl	$1, %r11d
	testb	$1, %ah
	je	.L13
	leaq	(%rbx,%rbx,4), %r11
	addq	%r11, %r11
.L13:
	movsbl	3(%rsp,%rdi), %ecx
	subl	$48, %ecx
	movslq	%ecx, %rcx
	imulq	%r11, %rcx
	addq	%rcx, %rdx
.L2:
	addq	$1, %rax
	cmpq	%r9, %rax
	jl	.L14
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L57
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L57:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.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:
```