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){
	char str[11];
	int len;
	long sum = 0, temp;

	scanf("%s", str);

	len = strlen(str);
	for(int i=0; i < 1<<(len-1); i++) {
		temp = str[0] - '0';
		for(int j=0; j < len; j++) {
			if(i & (1<<j)) {
				sum += temp;
				temp = 0;
			}
            if(j == len-1) {
                sum += temp;
                break;
            }
			temp = temp*10 + (str[j+1]-'0');
		}
	}
	printf("%ld", sum);

	return 0;
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s"
.LC1:
	.string	"%ld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.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	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	29(%rsp), %rbp
	movq	%rbp, %rsi
	call	__isoc99_scanf@PLT
	movq	%rbp, %rdi
	call	strlen@PLT
	movsbl	37(%rsp), %r15d
	movsbl	29(%rsp), %esi
	movl	$1, %r11d
	leal	-1(%rax), %ecx
	movq	%rax, %r9
	movsbl	38(%rsp), %eax
	movsbl	30(%rsp), %edi
	movsbl	31(%rsp), %r10d
	movsbl	32(%rsp), %ebx
	subl	$48, %esi
	xorl	%edx, %edx
	movsbl	33(%rsp), %ebp
	subl	$48, %r15d
	subl	$48, %eax
	subl	$48, %edi
	movsbl	34(%rsp), %r12d
	subl	$48, %r10d
	subl	$48, %ebx
	movslq	%r15d, %r15
	movsbl	35(%rsp), %r13d
	subl	$48, %ebp
	cltq
	movq	%r15, (%rsp)
	movsbl	36(%rsp), %r14d
	subl	$48, %r12d
	sall	%cl, %r11d
	movslq	%esi, %rsi
	subl	$48, %r13d
	movq	%rax, 8(%rsp)
	movslq	%edi, %rdi
	movslq	%r10d, %r10
	subl	$48, %r14d
	movslq	%ebx, %rbx
	movslq	%ebp, %rbp
	movslq	%r12d, %r12
	movslq	%r13d, %r13
	movslq	%r14d, %r14
	xorl	%r8d, %r8d
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L4:
	addq	%rax, %r8
.L2:
	addl	$1, %edx
	cmpl	%r11d, %edx
	je	.L81
.L13:
	testq	%r9, %r9
	je	.L2
	movq	%rsi, %rax
	testb	$1, %dl
	je	.L3
	addq	%rsi, %r8
	xorl	%eax, %eax
.L3:
	testl	%ecx, %ecx
	je	.L4
	leaq	(%rax,%rax,4), %rax
	leaq	(%rdi,%rax,2), %rax
	testb	$2, %dl
	je	.L5
	addq	%rax, %r8
	xorl	%eax, %eax
.L5:
	cmpl	$1, %ecx
	je	.L4
	leaq	(%rax,%rax,4), %rax
	leaq	(%r10,%rax,2), %rax
	testb	$4, %dl
	je	.L6
	addq	%rax, %r8
	xorl	%eax, %eax
.L6:
	cmpl	$2, %ecx
	je	.L4
	leaq	(%rax,%rax,4), %rax
	leaq	(%rbx,%rax,2), %rax
	testb	$8, %dl
	je	.L7
	addq	%rax, %r8
	xorl	%eax, %eax
.L7:
	cmpl	$3, %ecx
	je	.L4
	leaq	(%rax,%rax,4), %rax
	leaq	0(%rbp,%rax,2), %rax
	testb	$16, %dl
	je	.L8
	addq	%rax, %r8
	xorl	%eax, %eax
.L8:
	cmpl	$4, %ecx
	je	.L4
	leaq	(%rax,%rax,4), %rax
	leaq	(%r12,%rax,2), %rax
	testb	$32, %dl
	je	.L9
	addq	%rax, %r8
	xorl	%eax, %eax
.L9:
	cmpl	$5, %ecx
	je	.L4
	leaq	(%rax,%rax,4), %rax
	leaq	0(%r13,%rax,2), %rax
	testb	$64, %dl
	je	.L10
	addq	%rax, %r8
	xorl	%eax, %eax
.L10:
	cmpl	$6, %ecx
	je	.L4
	leaq	(%rax,%rax,4), %rax
	leaq	(%r14,%rax,2), %rax
	testb	$-128, %dl
	je	.L11
	addq	%rax, %r8
	xorl	%eax, %eax
.L11:
	cmpl	$7, %ecx
	je	.L4
	movq	(%rsp), %r15
	leaq	(%rax,%rax,4), %rax
	leaq	(%r15,%rax,2), %rax
	testb	$1, %dh
	je	.L12
	addq	%rax, %r8
	xorl	%eax, %eax
.L12:
	cmpl	$8, %ecx
	je	.L4
	movq	8(%rsp), %r15
	leaq	(%rax,%rax,4), %rax
	leaq	(%r15,%rax,2), %rax
	cmpl	$9, %ecx
	je	.L4
	addl	$1, %edx
	cmpl	%r11d, %edx
	jne	.L13
.L81:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L82
	addq	$56, %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
.L82:
	.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"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.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	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	29(%rsp), %rbp
	movq	%rbp, %rsi
	call	__isoc99_scanf@PLT
	movq	%rbp, %rdi
	call	strlen@PLT
	movsbl	37(%rsp), %r15d
	movsbl	29(%rsp), %esi
	movl	$1, %r11d
	leal	-1(%rax), %ecx
	movq	%rax, %r9
	movsbl	38(%rsp), %eax
	movsbl	30(%rsp), %edi
	movsbl	31(%rsp), %r10d
	movsbl	32(%rsp), %ebx
	subl	$48, %esi
	xorl	%edx, %edx
	movsbl	33(%rsp), %ebp
	subl	$48, %r15d
	subl	$48, %eax
	subl	$48, %edi
	movsbl	34(%rsp), %r12d
	subl	$48, %r10d
	subl	$48, %ebx
	movslq	%r15d, %r15
	movsbl	35(%rsp), %r13d
	subl	$48, %ebp
	cltq
	movq	%r15, (%rsp)
	movsbl	36(%rsp), %r14d
	subl	$48, %r12d
	sall	%cl, %r11d
	movslq	%esi, %rsi
	subl	$48, %r13d
	movq	%rax, 8(%rsp)
	movslq	%edi, %rdi
	movslq	%r10d, %r10
	subl	$48, %r14d
	movslq	%ebx, %rbx
	movslq	%ebp, %rbp
	movslq	%r12d, %r12
	movslq	%r13d, %r13
	movslq	%r14d, %r14
	xorl	%r8d, %r8d
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L4:
	addq	%rax, %r8
.L2:
	addl	$1, %edx
	cmpl	%r11d, %edx
	je	.L81
.L13:
	testq	%r9, %r9
	je	.L2
	movq	%rsi, %rax
	testb	$1, %dl
	je	.L3
	addq	%rsi, %r8
	xorl	%eax, %eax
.L3:
	testl	%ecx, %ecx
	je	.L4
	leaq	(%rax,%rax,4), %rax
	leaq	(%rdi,%rax,2), %rax
	testb	$2, %dl
	je	.L5
	addq	%rax, %r8
	xorl	%eax, %eax
.L5:
	cmpl	$1, %ecx
	je	.L4
	leaq	(%rax,%rax,4), %rax
	leaq	(%r10,%rax,2), %rax
	testb	$4, %dl
	je	.L6
	addq	%rax, %r8
	xorl	%eax, %eax
.L6:
	cmpl	$2, %ecx
	je	.L4
	leaq	(%rax,%rax,4), %rax
	leaq	(%rbx,%rax,2), %rax
	testb	$8, %dl
	je	.L7
	addq	%rax, %r8
	xorl	%eax, %eax
.L7:
	cmpl	$3, %ecx
	je	.L4
	leaq	(%rax,%rax,4), %rax
	leaq	0(%rbp,%rax,2), %rax
	testb	$16, %dl
	je	.L8
	addq	%rax, %r8
	xorl	%eax, %eax
.L8:
	cmpl	$4, %ecx
	je	.L4
	leaq	(%rax,%rax,4), %rax
	leaq	(%r12,%rax,2), %rax
	testb	$32, %dl
	je	.L9
	addq	%rax, %r8
	xorl	%eax, %eax
.L9:
	cmpl	$5, %ecx
	je	.L4
	leaq	(%rax,%rax,4), %rax
	leaq	0(%r13,%rax,2), %rax
	testb	$64, %dl
	je	.L10
	addq	%rax, %r8
	xorl	%eax, %eax
.L10:
	cmpl	$6, %ecx
	je	.L4
	leaq	(%rax,%rax,4), %rax
	leaq	(%r14,%rax,2), %rax
	testb	$-128, %dl
	je	.L11
	addq	%rax, %r8
	xorl	%eax, %eax
.L11:
	cmpl	$7, %ecx
	je	.L4
	movq	(%rsp), %r15
	leaq	(%rax,%rax,4), %rax
	leaq	(%r15,%rax,2), %rax
	testb	$1, %dh
	je	.L12
	addq	%rax, %r8
	xorl	%eax, %eax
.L12:
	cmpl	$8, %ecx
	je	.L4
	movq	8(%rsp), %r15
	leaq	(%rax,%rax,4), %rax
	leaq	(%r15,%rax,2), %rax
	cmpl	$9, %ecx
	je	.L4
	addl	$1, %edx
	cmpl	%r11d, %edx
	jne	.L13
.L81:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L82
	addq	$56, %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
.L82:
	.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"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.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	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	29(%rsp), %rbp
	movq	%rbp, %rsi
	call	__isoc99_scanf@PLT
	movq	%rbp, %rdi
	call	strlen@PLT
	movsbl	37(%rsp), %r15d
	movsbl	29(%rsp), %esi
	movl	$1, %r11d
	leal	-1(%rax), %ecx
	movq	%rax, %r9
	movsbl	38(%rsp), %eax
	movsbl	30(%rsp), %edi
	movsbl	31(%rsp), %r10d
	movsbl	32(%rsp), %ebx
	subl	$48, %esi
	xorl	%edx, %edx
	movsbl	33(%rsp), %ebp
	subl	$48, %r15d
	subl	$48, %eax
	subl	$48, %edi
	movsbl	34(%rsp), %r12d
	subl	$48, %r10d
	subl	$48, %ebx
	movslq	%r15d, %r15
	movsbl	35(%rsp), %r13d
	subl	$48, %ebp
	cltq
	movq	%r15, (%rsp)
	movsbl	36(%rsp), %r14d
	subl	$48, %r12d
	sall	%cl, %r11d
	movslq	%esi, %rsi
	subl	$48, %r13d
	movq	%rax, 8(%rsp)
	movslq	%edi, %rdi
	movslq	%r10d, %r10
	subl	$48, %r14d
	movslq	%ebx, %rbx
	movslq	%ebp, %rbp
	movslq	%r12d, %r12
	movslq	%r13d, %r13
	movslq	%r14d, %r14
	xorl	%r8d, %r8d
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L4:
	addq	%rax, %r8
.L2:
	addl	$1, %edx
	cmpl	%r11d, %edx
	je	.L81
.L13:
	testq	%r9, %r9
	je	.L2
	movq	%rsi, %rax
	testb	$1, %dl
	je	.L3
	addq	%rsi, %r8
	xorl	%eax, %eax
.L3:
	testl	%ecx, %ecx
	je	.L4
	leaq	(%rax,%rax,4), %rax
	leaq	(%rdi,%rax,2), %rax
	testb	$2, %dl
	je	.L5
	addq	%rax, %r8
	xorl	%eax, %eax
.L5:
	cmpl	$1, %ecx
	je	.L4
	leaq	(%rax,%rax,4), %rax
	leaq	(%r10,%rax,2), %rax
	testb	$4, %dl
	je	.L6
	addq	%rax, %r8
	xorl	%eax, %eax
.L6:
	cmpl	$2, %ecx
	je	.L4
	leaq	(%rax,%rax,4), %rax
	leaq	(%rbx,%rax,2), %rax
	testb	$8, %dl
	je	.L7
	addq	%rax, %r8
	xorl	%eax, %eax
.L7:
	cmpl	$3, %ecx
	je	.L4
	leaq	(%rax,%rax,4), %rax
	leaq	0(%rbp,%rax,2), %rax
	testb	$16, %dl
	je	.L8
	addq	%rax, %r8
	xorl	%eax, %eax
.L8:
	cmpl	$4, %ecx
	je	.L4
	leaq	(%rax,%rax,4), %rax
	leaq	(%r12,%rax,2), %rax
	testb	$32, %dl
	je	.L9
	addq	%rax, %r8
	xorl	%eax, %eax
.L9:
	cmpl	$5, %ecx
	je	.L4
	leaq	(%rax,%rax,4), %rax
	leaq	0(%r13,%rax,2), %rax
	testb	$64, %dl
	je	.L10
	addq	%rax, %r8
	xorl	%eax, %eax
.L10:
	cmpl	$6, %ecx
	je	.L4
	leaq	(%rax,%rax,4), %rax
	leaq	(%r14,%rax,2), %rax
	testb	$-128, %dl
	je	.L11
	addq	%rax, %r8
	xorl	%eax, %eax
.L11:
	cmpl	$7, %ecx
	je	.L4
	movq	(%rsp), %r15
	leaq	(%rax,%rax,4), %rax
	leaq	(%r15,%rax,2), %rax
	testb	$1, %dh
	je	.L12
	addq	%rax, %r8
	xorl	%eax, %eax
.L12:
	cmpl	$8, %ecx
	je	.L4
	movq	8(%rsp), %r15
	leaq	(%rax,%rax,4), %rax
	leaq	(%r15,%rax,2), %rax
	cmpl	$9, %ecx
	je	.L4
	addl	$1, %edx
	cmpl	%r11d, %edx
	jne	.L13
.L81:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L82
	addq	$56, %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
.L82:
	.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){
	char str[11];
	int len;
	long sum = 0, temp;

	scanf("%s", str);

	len = strlen(str);
	for(int i=0; i < 1<<(len-1); i++) {
		temp = str[0] - '0';
		for(int j=0; j < len; j++) {
			if(i & (1<<j)) {
				sum += temp;
				temp = 0;
			}
            if(j == len-1) {
                sum += temp;
                break;
            }
			temp = temp*10 + (str[j+1]-'0');
		}
	}
	printf("%ld", 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){
	char str[11];
	int len;
	long sum = 0, temp;

	scanf("%s", str);

	len = strlen(str);
	for(int i=0; i < 1<<(len-1); i++) {
		temp = str[0] - '0';
		for(int j=0; j < len; j++) {
			if(i & (1<<j)) {
				sum += temp;
				temp = 0;
			}
            if(j == len-1) {
                sum += temp;
                break;
            }
			temp = temp*10 + (str[j+1]-'0');
		}
	}
	printf("%ld", 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){
	char str[11];
	int len;
	long sum = 0, temp;

	scanf("%s", str);

	len = strlen(str);
	for(int i=0; i < 1<<(len-1); i++) {
		temp = str[0] - '0';
		for(int j=0; j < len; j++) {
			if(i & (1<<j)) {
				sum += temp;
				temp = 0;
			}
            if(j == len-1) {
                sum += temp;
                break;
            }
			temp = temp*10 + (str[j+1]-'0');
		}
	}
	printf("%ld", sum);

	return 0;
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s"
.LC1:
	.string	"%ld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.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	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	29(%rsp), %rbp
	movq	%rbp, %rsi
	call	__isoc99_scanf@PLT
	movq	%rbp, %rdi
	call	strlen@PLT
	movsbl	37(%rsp), %r15d
	movsbl	29(%rsp), %esi
	movl	$1, %r11d
	leal	-1(%rax), %ecx
	movq	%rax, %r9
	movsbl	38(%rsp), %eax
	movsbl	30(%rsp), %edi
	movsbl	31(%rsp), %r10d
	movsbl	32(%rsp), %ebx
	subl	$48, %esi
	xorl	%edx, %edx
	movsbl	33(%rsp), %ebp
	subl	$48, %r15d
	subl	$48, %eax
	subl	$48, %edi
	movsbl	34(%rsp), %r12d
	subl	$48, %r10d
	subl	$48, %ebx
	movslq	%r15d, %r15
	movsbl	35(%rsp), %r13d
	subl	$48, %ebp
	cltq
	movq	%r15, (%rsp)
	movsbl	36(%rsp), %r14d
	subl	$48, %r12d
	sall	%cl, %r11d
	movslq	%esi, %rsi
	subl	$48, %r13d
	movq	%rax, 8(%rsp)
	movslq	%edi, %rdi
	movslq	%r10d, %r10
	subl	$48, %r14d
	movslq	%ebx, %rbx
	movslq	%ebp, %rbp
	movslq	%r12d, %r12
	movslq	%r13d, %r13
	movslq	%r14d, %r14
	xorl	%r8d, %r8d
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L4:
	addq	%rax, %r8
.L2:
	addl	$1, %edx
	cmpl	%r11d, %edx
	je	.L81
.L13:
	testq	%r9, %r9
	je	.L2
	movq	%rsi, %rax
	testb	$1, %dl
	je	.L3
	addq	%rsi, %r8
	xorl	%eax, %eax
.L3:
	testl	%ecx, %ecx
	je	.L4
	leaq	(%rax,%rax,4), %rax
	leaq	(%rdi,%rax,2), %rax
	testb	$2, %dl
	je	.L5
	addq	%rax, %r8
	xorl	%eax, %eax
.L5:
	cmpl	$1, %ecx
	je	.L4
	leaq	(%rax,%rax,4), %rax
	leaq	(%r10,%rax,2), %rax
	testb	$4, %dl
	je	.L6
	addq	%rax, %r8
	xorl	%eax, %eax
.L6:
	cmpl	$2, %ecx
	je	.L4
	leaq	(%rax,%rax,4), %rax
	leaq	(%rbx,%rax,2), %rax
	testb	$8, %dl
	je	.L7
	addq	%rax, %r8
	xorl	%eax, %eax
.L7:
	cmpl	$3, %ecx
	je	.L4
	leaq	(%rax,%rax,4), %rax
	leaq	0(%rbp,%rax,2), %rax
	testb	$16, %dl
	je	.L8
	addq	%rax, %r8
	xorl	%eax, %eax
.L8:
	cmpl	$4, %ecx
	je	.L4
	leaq	(%rax,%rax,4), %rax
	leaq	(%r12,%rax,2), %rax
	testb	$32, %dl
	je	.L9
	addq	%rax, %r8
	xorl	%eax, %eax
.L9:
	cmpl	$5, %ecx
	je	.L4
	leaq	(%rax,%rax,4), %rax
	leaq	0(%r13,%rax,2), %rax
	testb	$64, %dl
	je	.L10
	addq	%rax, %r8
	xorl	%eax, %eax
.L10:
	cmpl	$6, %ecx
	je	.L4
	leaq	(%rax,%rax,4), %rax
	leaq	(%r14,%rax,2), %rax
	testb	$-128, %dl
	je	.L11
	addq	%rax, %r8
	xorl	%eax, %eax
.L11:
	cmpl	$7, %ecx
	je	.L4
	movq	(%rsp), %r15
	leaq	(%rax,%rax,4), %rax
	leaq	(%r15,%rax,2), %rax
	testb	$1, %dh
	je	.L12
	addq	%rax, %r8
	xorl	%eax, %eax
.L12:
	cmpl	$8, %ecx
	je	.L4
	movq	8(%rsp), %r15
	leaq	(%rax,%rax,4), %rax
	leaq	(%r15,%rax,2), %rax
	cmpl	$9, %ecx
	je	.L4
	addl	$1, %edx
	cmpl	%r11d, %edx
	jne	.L13
.L81:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L82
	addq	$56, %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
.L82:
	.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"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.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	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	29(%rsp), %rbp
	movq	%rbp, %rsi
	call	__isoc99_scanf@PLT
	movq	%rbp, %rdi
	call	strlen@PLT
	movsbl	37(%rsp), %r15d
	movsbl	29(%rsp), %esi
	movl	$1, %r11d
	leal	-1(%rax), %ecx
	movq	%rax, %r9
	movsbl	38(%rsp), %eax
	movsbl	30(%rsp), %edi
	movsbl	31(%rsp), %r10d
	movsbl	32(%rsp), %ebx
	subl	$48, %esi
	xorl	%edx, %edx
	movsbl	33(%rsp), %ebp
	subl	$48, %r15d
	subl	$48, %eax
	subl	$48, %edi
	movsbl	34(%rsp), %r12d
	subl	$48, %r10d
	subl	$48, %ebx
	movslq	%r15d, %r15
	movsbl	35(%rsp), %r13d
	subl	$48, %ebp
	cltq
	movq	%r15, (%rsp)
	movsbl	36(%rsp), %r14d
	subl	$48, %r12d
	sall	%cl, %r11d
	movslq	%esi, %rsi
	subl	$48, %r13d
	movq	%rax, 8(%rsp)
	movslq	%edi, %rdi
	movslq	%r10d, %r10
	subl	$48, %r14d
	movslq	%ebx, %rbx
	movslq	%ebp, %rbp
	movslq	%r12d, %r12
	movslq	%r13d, %r13
	movslq	%r14d, %r14
	xorl	%r8d, %r8d
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L4:
	addq	%rax, %r8
.L2:
	addl	$1, %edx
	cmpl	%r11d, %edx
	je	.L81
.L13:
	testq	%r9, %r9
	je	.L2
	movq	%rsi, %rax
	testb	$1, %dl
	je	.L3
	addq	%rsi, %r8
	xorl	%eax, %eax
.L3:
	testl	%ecx, %ecx
	je	.L4
	leaq	(%rax,%rax,4), %rax
	leaq	(%rdi,%rax,2), %rax
	testb	$2, %dl
	je	.L5
	addq	%rax, %r8
	xorl	%eax, %eax
.L5:
	cmpl	$1, %ecx
	je	.L4
	leaq	(%rax,%rax,4), %rax
	leaq	(%r10,%rax,2), %rax
	testb	$4, %dl
	je	.L6
	addq	%rax, %r8
	xorl	%eax, %eax
.L6:
	cmpl	$2, %ecx
	je	.L4
	leaq	(%rax,%rax,4), %rax
	leaq	(%rbx,%rax,2), %rax
	testb	$8, %dl
	je	.L7
	addq	%rax, %r8
	xorl	%eax, %eax
.L7:
	cmpl	$3, %ecx
	je	.L4
	leaq	(%rax,%rax,4), %rax
	leaq	0(%rbp,%rax,2), %rax
	testb	$16, %dl
	je	.L8
	addq	%rax, %r8
	xorl	%eax, %eax
.L8:
	cmpl	$4, %ecx
	je	.L4
	leaq	(%rax,%rax,4), %rax
	leaq	(%r12,%rax,2), %rax
	testb	$32, %dl
	je	.L9
	addq	%rax, %r8
	xorl	%eax, %eax
.L9:
	cmpl	$5, %ecx
	je	.L4
	leaq	(%rax,%rax,4), %rax
	leaq	0(%r13,%rax,2), %rax
	testb	$64, %dl
	je	.L10
	addq	%rax, %r8
	xorl	%eax, %eax
.L10:
	cmpl	$6, %ecx
	je	.L4
	leaq	(%rax,%rax,4), %rax
	leaq	(%r14,%rax,2), %rax
	testb	$-128, %dl
	je	.L11
	addq	%rax, %r8
	xorl	%eax, %eax
.L11:
	cmpl	$7, %ecx
	je	.L4
	movq	(%rsp), %r15
	leaq	(%rax,%rax,4), %rax
	leaq	(%r15,%rax,2), %rax
	testb	$1, %dh
	je	.L12
	addq	%rax, %r8
	xorl	%eax, %eax
.L12:
	cmpl	$8, %ecx
	je	.L4
	movq	8(%rsp), %r15
	leaq	(%rax,%rax,4), %rax
	leaq	(%r15,%rax,2), %rax
	cmpl	$9, %ecx
	je	.L4
	addl	$1, %edx
	cmpl	%r11d, %edx
	jne	.L13
.L81:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L82
	addq	$56, %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
.L82:
	.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:
```