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>
#include <inttypes.h>
#include <string.h>

int main(void) {
	char S[16];
	int len;
	int put;
	uint64_t answer = 0;
	if (scanf("%15s", S) != 1) return 1;
	len = (int)strlen(S);
	for (put = 1 << (len - 1); put < (1 << len); put++) {
		uint64_t current = 0;
		uint64_t current2 = 0;
		int i;
		for (i = 0; i < len; i++) {
			current2 = current2 * 10 + (S[i] - '0');
			if ((put >> i) & 1) {
				current += current2;
				current2 = 0;
			}
		}
		answer += current;
	}
	printf("%" PRIu64 "\n", answer);
	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%15s"
.LC1:
	.string	"%lu\n"
	.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
	subq	$80, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -56(%rbp)
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	je	.L2
	movl	$1, %eax
	jmp	.L9
.L2:
	leaq	-32(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -60(%rbp)
	movl	-60(%rbp), %eax
	subl	$1, %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	%edx, %eax
	movl	%eax, -68(%rbp)
	jmp	.L4
.L8:
	movq	$0, -48(%rbp)
	movq	$0, -40(%rbp)
	movl	$0, -64(%rbp)
	jmp	.L5
.L7:
	movq	-40(%rbp), %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	movq	%rax, %rdx
	movl	-64(%rbp), %eax
	cltq
	movzbl	-32(%rbp,%rax), %eax
	movsbl	%al, %eax
	subl	$48, %eax
	cltq
	addq	%rdx, %rax
	movq	%rax, -40(%rbp)
	movl	-64(%rbp), %eax
	movl	-68(%rbp), %edx
	movl	%eax, %ecx
	sarl	%cl, %edx
	movl	%edx, %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L6
	movq	-40(%rbp), %rax
	addq	%rax, -48(%rbp)
	movq	$0, -40(%rbp)
.L6:
	addl	$1, -64(%rbp)
.L5:
	movl	-64(%rbp), %eax
	cmpl	-60(%rbp), %eax
	jl	.L7
	movq	-48(%rbp), %rax
	addq	%rax, -56(%rbp)
	addl	$1, -68(%rbp)
.L4:
	movl	-60(%rbp), %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	%edx, %eax
	cmpl	%eax, -68(%rbp)
	jl	.L8
	movq	-56(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L9:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	leave
	.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	"%15s"
.LC1:
	.string	"%lu\n"
	.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	$120, %rsp
	.cfi_def_cfa_offset 176
	movq	%fs:40, %rax
	movq	%rax, 104(%rsp)
	xorl	%eax, %eax
	leaq	80(%rsp), %rbp
	movq	%rbp, %rsi
	call	__isoc99_scanf@PLT
	movl	%eax, %ebx
	movl	$1, %eax
	cmpl	$1, %ebx
	jne	.L1
	movq	%rbp, %rdi
	call	strlen@PLT
	leal	-1(%rax), %ecx
	movq	%rax, %r11
	movl	%eax, %esi
	movl	%ebx, %eax
	sall	%cl, %eax
	movl	%r11d, %ecx
	sall	%cl, %ebx
	movl	%ebx, %edi
	cmpl	%ebx, %eax
	jge	.L25
	movsbl	87(%rsp), %edx
	movsbl	81(%rsp), %ebx
	xorl	%r9d, %r9d
	xorl	%r10d, %r10d
	movsbl	86(%rsp), %r15d
	movsbl	80(%rsp), %r8d
	subl	$48, %edx
	movsbl	82(%rsp), %ebp
	subl	$48, %ebx
	movsbl	83(%rsp), %r12d
	movslq	%edx, %rdx
	subl	$48, %r15d
	movsbl	84(%rsp), %r13d
	movslq	%ebx, %rbx
	movq	%rdx, 16(%rsp)
	movsbl	88(%rsp), %edx
	movslq	%r15d, %r15
	subl	$48, %ebp
	movq	%r15, 8(%rsp)
	subl	$48, %r8d
	subl	$48, %r12d
	movslq	%ebp, %rbp
	subl	$48, %edx
	movsbl	85(%rsp), %r14d
	subl	$48, %r13d
	movslq	%r8d, %r8
	movslq	%edx, %rdx
	movslq	%r12d, %r12
	movslq	%r13d, %r13
	movq	%rdx, 24(%rsp)
	movsbl	89(%rsp), %edx
	subl	$48, %r14d
	movslq	%r14d, %r14
	subl	$48, %edx
	movslq	%edx, %rdx
	movq	%rdx, 32(%rsp)
	movsbl	90(%rsp), %edx
	subl	$48, %edx
	movslq	%edx, %rdx
	movq	%rdx, 40(%rsp)
	movsbl	91(%rsp), %edx
	subl	$48, %edx
	movslq	%edx, %rdx
	movq	%rdx, 48(%rsp)
	movsbl	92(%rsp), %edx
	subl	$48, %edx
	movslq	%edx, %rdx
	movq	%rdx, 56(%rsp)
	movsbl	93(%rsp), %edx
	subl	$48, %edx
	movslq	%edx, %rdx
	movq	%rdx, 64(%rsp)
	movsbl	94(%rsp), %edx
	subl	$48, %edx
	movslq	%edx, %rdx
	movq	%rdx, 72(%rsp)
	.p2align 4,,10
	.p2align 3
.L4:
	xorl	%edx, %edx
	testq	%r11, %r11
	je	.L22
	testb	$1, %al
	movq	%r10, %rdx
	movq	%r10, %rcx
	cmovne	%r8, %rdx
	cmove	%r8, %rcx
	cmpl	$1, %esi
	je	.L22
	leaq	(%rcx,%rcx,4), %rcx
	leaq	(%rbx,%rcx,2), %rcx
	testb	$2, %al
	je	.L7
	addq	%rcx, %rdx
	xorl	%ecx, %ecx
.L7:
	cmpl	$2, %esi
	je	.L22
	leaq	(%rcx,%rcx,4), %rcx
	leaq	0(%rbp,%rcx,2), %rcx
	testb	$4, %al
	je	.L8
	addq	%rcx, %rdx
	xorl	%ecx, %ecx
.L8:
	cmpl	$3, %esi
	je	.L22
	leaq	(%rcx,%rcx,4), %rcx
	leaq	(%r12,%rcx,2), %rcx
	testb	$8, %al
	je	.L9
	addq	%rcx, %rdx
	xorl	%ecx, %ecx
.L9:
	cmpl	$4, %esi
	je	.L22
	leaq	(%rcx,%rcx,4), %rcx
	leaq	0(%r13,%rcx,2), %rcx
	testb	$16, %al
	je	.L10
	addq	%rcx, %rdx
	xorl	%ecx, %ecx
.L10:
	cmpl	$5, %esi
	je	.L22
	leaq	(%rcx,%rcx,4), %rcx
	leaq	(%r14,%rcx,2), %rcx
	testb	$32, %al
	je	.L11
	addq	%rcx, %rdx
	xorl	%ecx, %ecx
.L11:
	cmpl	$6, %esi
	je	.L22
	movq	8(%rsp), %r15
	leaq	(%rcx,%rcx,4), %rcx
	leaq	(%r15,%rcx,2), %rcx
	testb	$64, %al
	je	.L12
	addq	%rcx, %rdx
	xorl	%ecx, %ecx
.L12:
	cmpl	$7, %esi
	je	.L22
	movq	16(%rsp), %r15
	leaq	(%rcx,%rcx,4), %rcx
	leaq	(%r15,%rcx,2), %rcx
	testb	$-128, %al
	je	.L13
	addq	%rcx, %rdx
	xorl	%ecx, %ecx
.L13:
	cmpl	$8, %esi
	je	.L22
	movq	24(%rsp), %r15
	leaq	(%rcx,%rcx,4), %rcx
	leaq	(%r15,%rcx,2), %rcx
	testb	$1, %ah
	je	.L14
	addq	%rcx, %rdx
	xorl	%ecx, %ecx
.L14:
	cmpl	$9, %esi
	je	.L22
	movq	32(%rsp), %r15
	leaq	(%rcx,%rcx,4), %rcx
	leaq	(%r15,%rcx,2), %rcx
	testb	$2, %ah
	je	.L15
	addq	%rcx, %rdx
	xorl	%ecx, %ecx
.L15:
	cmpl	$10, %esi
	je	.L22
	movq	40(%rsp), %r15
	leaq	(%rcx,%rcx,4), %rcx
	leaq	(%r15,%rcx,2), %rcx
	testb	$4, %ah
	je	.L16
	addq	%rcx, %rdx
	xorl	%ecx, %ecx
.L16:
	cmpl	$11, %esi
	je	.L22
	movq	48(%rsp), %r15
	leaq	(%rcx,%rcx,4), %rcx
	leaq	(%r15,%rcx,2), %rcx
	testb	$8, %ah
	je	.L17
	addq	%rcx, %rdx
	xorl	%ecx, %ecx
.L17:
	cmpl	$12, %esi
	je	.L22
	movq	56(%rsp), %r15
	leaq	(%rcx,%rcx,4), %rcx
	leaq	(%r15,%rcx,2), %rcx
	testb	$16, %ah
	je	.L18
	addq	%rcx, %rdx
	xorl	%ecx, %ecx
.L18:
	cmpl	$13, %esi
	je	.L22
	movq	64(%rsp), %r15
	leaq	(%rcx,%rcx,4), %rcx
	leaq	(%r15,%rcx,2), %rcx
	testb	$32, %ah
	je	.L19
	addq	%rcx, %rdx
	xorl	%ecx, %ecx
.L19:
	cmpl	$15, %esi
	jne	.L22
	movq	72(%rsp), %r15
	leaq	(%rcx,%rcx,4), %rcx
	leaq	(%r15,%rcx,2), %rcx
	addq	%rdx, %rcx
	testb	$64, %ah
	cmovne	%rcx, %rdx
	.p2align 4,,10
	.p2align 3
.L22:
	addl	$1, %eax
	addq	%rdx, %r9
	cmpl	%edi, %eax
	jne	.L4
.L3:
	movq	%r9, %rdx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	xorl	%eax, %eax
.L1:
	movq	104(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L111
	addq	$120, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L25:
	.cfi_restore_state
	xorl	%r9d, %r9d
	jmp	.L3
.L111:
	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
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%15s"
.LC1:
	.string	"%lu\n"
	.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	$120, %rsp
	.cfi_def_cfa_offset 176
	movq	%fs:40, %rax
	movq	%rax, 104(%rsp)
	xorl	%eax, %eax
	leaq	80(%rsp), %rbp
	movq	%rbp, %rsi
	call	__isoc99_scanf@PLT
	movl	%eax, %ebx
	movl	$1, %eax
	cmpl	$1, %ebx
	jne	.L1
	movq	%rbp, %rdi
	call	strlen@PLT
	leal	-1(%rax), %ecx
	movq	%rax, %r11
	movl	%eax, %esi
	movl	%ebx, %eax
	sall	%cl, %eax
	movl	%r11d, %ecx
	sall	%cl, %ebx
	movl	%ebx, %edi
	cmpl	%ebx, %eax
	jge	.L25
	movsbl	87(%rsp), %edx
	movsbl	81(%rsp), %ebx
	xorl	%r9d, %r9d
	xorl	%r10d, %r10d
	movsbl	86(%rsp), %r15d
	movsbl	80(%rsp), %r8d
	subl	$48, %edx
	movsbl	82(%rsp), %ebp
	subl	$48, %ebx
	movsbl	83(%rsp), %r12d
	movslq	%edx, %rdx
	subl	$48, %r15d
	movsbl	84(%rsp), %r13d
	movslq	%ebx, %rbx
	movq	%rdx, 16(%rsp)
	movsbl	88(%rsp), %edx
	movslq	%r15d, %r15
	subl	$48, %ebp
	movq	%r15, 8(%rsp)
	subl	$48, %r8d
	subl	$48, %r12d
	movslq	%ebp, %rbp
	subl	$48, %edx
	movsbl	85(%rsp), %r14d
	subl	$48, %r13d
	movslq	%r8d, %r8
	movslq	%edx, %rdx
	movslq	%r12d, %r12
	movslq	%r13d, %r13
	movq	%rdx, 24(%rsp)
	movsbl	89(%rsp), %edx
	subl	$48, %r14d
	movslq	%r14d, %r14
	subl	$48, %edx
	movslq	%edx, %rdx
	movq	%rdx, 32(%rsp)
	movsbl	90(%rsp), %edx
	subl	$48, %edx
	movslq	%edx, %rdx
	movq	%rdx, 40(%rsp)
	movsbl	91(%rsp), %edx
	subl	$48, %edx
	movslq	%edx, %rdx
	movq	%rdx, 48(%rsp)
	movsbl	92(%rsp), %edx
	subl	$48, %edx
	movslq	%edx, %rdx
	movq	%rdx, 56(%rsp)
	movsbl	93(%rsp), %edx
	subl	$48, %edx
	movslq	%edx, %rdx
	movq	%rdx, 64(%rsp)
	movsbl	94(%rsp), %edx
	subl	$48, %edx
	movslq	%edx, %rdx
	movq	%rdx, 72(%rsp)
	.p2align 4,,10
	.p2align 3
.L4:
	xorl	%edx, %edx
	testq	%r11, %r11
	je	.L22
	testb	$1, %al
	movq	%r10, %rdx
	movq	%r10, %rcx
	cmovne	%r8, %rdx
	cmove	%r8, %rcx
	cmpl	$1, %esi
	je	.L22
	leaq	(%rcx,%rcx,4), %rcx
	leaq	(%rbx,%rcx,2), %rcx
	testb	$2, %al
	je	.L7
	addq	%rcx, %rdx
	xorl	%ecx, %ecx
.L7:
	cmpl	$2, %esi
	je	.L22
	leaq	(%rcx,%rcx,4), %rcx
	leaq	0(%rbp,%rcx,2), %rcx
	testb	$4, %al
	je	.L8
	addq	%rcx, %rdx
	xorl	%ecx, %ecx
.L8:
	cmpl	$3, %esi
	je	.L22
	leaq	(%rcx,%rcx,4), %rcx
	leaq	(%r12,%rcx,2), %rcx
	testb	$8, %al
	je	.L9
	addq	%rcx, %rdx
	xorl	%ecx, %ecx
.L9:
	cmpl	$4, %esi
	je	.L22
	leaq	(%rcx,%rcx,4), %rcx
	leaq	0(%r13,%rcx,2), %rcx
	testb	$16, %al
	je	.L10
	addq	%rcx, %rdx
	xorl	%ecx, %ecx
.L10:
	cmpl	$5, %esi
	je	.L22
	leaq	(%rcx,%rcx,4), %rcx
	leaq	(%r14,%rcx,2), %rcx
	testb	$32, %al
	je	.L11
	addq	%rcx, %rdx
	xorl	%ecx, %ecx
.L11:
	cmpl	$6, %esi
	je	.L22
	movq	8(%rsp), %r15
	leaq	(%rcx,%rcx,4), %rcx
	leaq	(%r15,%rcx,2), %rcx
	testb	$64, %al
	je	.L12
	addq	%rcx, %rdx
	xorl	%ecx, %ecx
.L12:
	cmpl	$7, %esi
	je	.L22
	movq	16(%rsp), %r15
	leaq	(%rcx,%rcx,4), %rcx
	leaq	(%r15,%rcx,2), %rcx
	testb	$-128, %al
	je	.L13
	addq	%rcx, %rdx
	xorl	%ecx, %ecx
.L13:
	cmpl	$8, %esi
	je	.L22
	movq	24(%rsp), %r15
	leaq	(%rcx,%rcx,4), %rcx
	leaq	(%r15,%rcx,2), %rcx
	testb	$1, %ah
	je	.L14
	addq	%rcx, %rdx
	xorl	%ecx, %ecx
.L14:
	cmpl	$9, %esi
	je	.L22
	movq	32(%rsp), %r15
	leaq	(%rcx,%rcx,4), %rcx
	leaq	(%r15,%rcx,2), %rcx
	testb	$2, %ah
	je	.L15
	addq	%rcx, %rdx
	xorl	%ecx, %ecx
.L15:
	cmpl	$10, %esi
	je	.L22
	movq	40(%rsp), %r15
	leaq	(%rcx,%rcx,4), %rcx
	leaq	(%r15,%rcx,2), %rcx
	testb	$4, %ah
	je	.L16
	addq	%rcx, %rdx
	xorl	%ecx, %ecx
.L16:
	cmpl	$11, %esi
	je	.L22
	movq	48(%rsp), %r15
	leaq	(%rcx,%rcx,4), %rcx
	leaq	(%r15,%rcx,2), %rcx
	testb	$8, %ah
	je	.L17
	addq	%rcx, %rdx
	xorl	%ecx, %ecx
.L17:
	cmpl	$12, %esi
	je	.L22
	movq	56(%rsp), %r15
	leaq	(%rcx,%rcx,4), %rcx
	leaq	(%r15,%rcx,2), %rcx
	testb	$16, %ah
	je	.L18
	addq	%rcx, %rdx
	xorl	%ecx, %ecx
.L18:
	cmpl	$13, %esi
	je	.L22
	movq	64(%rsp), %r15
	leaq	(%rcx,%rcx,4), %rcx
	leaq	(%r15,%rcx,2), %rcx
	testb	$32, %ah
	je	.L19
	addq	%rcx, %rdx
	xorl	%ecx, %ecx
.L19:
	cmpl	$15, %esi
	jne	.L22
	movq	72(%rsp), %r15
	leaq	(%rcx,%rcx,4), %rcx
	leaq	(%r15,%rcx,2), %rcx
	addq	%rdx, %rcx
	testb	$64, %ah
	cmovne	%rcx, %rdx
	.p2align 4,,10
	.p2align 3
.L22:
	addl	$1, %eax
	addq	%rdx, %r9
	cmpl	%edi, %eax
	jne	.L4
.L3:
	movq	%r9, %rdx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	xorl	%eax, %eax
.L1:
	movq	104(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L111
	addq	$120, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L25:
	.cfi_restore_state
	xorl	%r9d, %r9d
	jmp	.L3
.L111:
	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:

#include <stdio.h>
#include <inttypes.h>
#include <string.h>

int main(void) {
	char S[16];
	int len;
	int put;
	uint64_t answer = 0;
	if (scanf("%15s", S) != 1) return 1;
	len = (int)strlen(S);
	for (put = 1 << (len - 1); put < (1 << len); put++) {
		uint64_t current = 0;
		uint64_t current2 = 0;
		int i;
		for (i = 0; i < len; i++) {
			current2 = current2 * 10 + (S[i] - '0');
			if ((put >> i) & 1) {
				current += current2;
				current2 = 0;
			}
		}
		answer += current;
	}
	printf("%" PRIu64 "\n", answer);
	return 0;
}

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 unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>
#include <inttypes.h>
#include <string.h>

int main(void) {
	char S[16];
	int len;
	int put;
	uint64_t answer = 0;
	if (scanf("%15s", S) != 1) return 1;
	len = (int)strlen(S);
	for (put = 1 << (len - 1); put < (1 << len); put++) {
		uint64_t current = 0;
		uint64_t current2 = 0;
		int i;
		for (i = 0; i < len; i++) {
			current2 = current2 * 10 + (S[i] - '0');
			if ((put >> i) & 1) {
				current += current2;
				current2 = 0;
			}
		}
		answer += current;
	}
	printf("%" PRIu64 "\n", answer);
	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%15s"
.LC1:
	.string	"%lu\n"
	.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
	subq	$80, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -56(%rbp)
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	je	.L2
	movl	$1, %eax
	jmp	.L9
.L2:
	leaq	-32(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -60(%rbp)
	movl	-60(%rbp), %eax
	subl	$1, %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	%edx, %eax
	movl	%eax, -68(%rbp)
	jmp	.L4
.L8:
	movq	$0, -48(%rbp)
	movq	$0, -40(%rbp)
	movl	$0, -64(%rbp)
	jmp	.L5
.L7:
	movq	-40(%rbp), %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	movq	%rax, %rdx
	movl	-64(%rbp), %eax
	cltq
	movzbl	-32(%rbp,%rax), %eax
	movsbl	%al, %eax
	subl	$48, %eax
	cltq
	addq	%rdx, %rax
	movq	%rax, -40(%rbp)
	movl	-64(%rbp), %eax
	movl	-68(%rbp), %edx
	movl	%eax, %ecx
	sarl	%cl, %edx
	movl	%edx, %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L6
	movq	-40(%rbp), %rax
	addq	%rax, -48(%rbp)
	movq	$0, -40(%rbp)
.L6:
	addl	$1, -64(%rbp)
.L5:
	movl	-64(%rbp), %eax
	cmpl	-60(%rbp), %eax
	jl	.L7
	movq	-48(%rbp), %rax
	addq	%rax, -56(%rbp)
	addl	$1, -68(%rbp)
.L4:
	movl	-60(%rbp), %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	%edx, %eax
	cmpl	%eax, -68(%rbp)
	jl	.L8
	movq	-56(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L9:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	leave
	.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
	.section	.rodata
.LC0:
	.string	"%15s"
.LC1:
	.string	"%lu\n"
	.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
	subq	$80, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -56(%rbp)
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	je	.L2
	movl	$1, %eax
	jmp	.L9
.L2:
	leaq	-32(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -60(%rbp)
	movl	-60(%rbp), %eax
	subl	$1, %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	%edx, %eax
	movl	%eax, -68(%rbp)
	jmp	.L4
.L8:
	movq	$0, -48(%rbp)
	movq	$0, -40(%rbp)
	movl	$0, -64(%rbp)
	jmp	.L5
.L7:
	movq	-40(%rbp), %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	movq	%rax, %rdx
	movl	-64(%rbp), %eax
	cltq
	movzbl	-32(%rbp,%rax), %eax
	movsbl	%al, %eax
	subl	$48, %eax
	cltq
	addq	%rdx, %rax
	movq	%rax, -40(%rbp)
	movl	-64(%rbp), %eax
	movl	-68(%rbp), %edx
	movl	%eax, %ecx
	sarl	%cl, %edx
	movl	%edx, %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L6
	movq	-40(%rbp), %rax
	addq	%rax, -48(%rbp)
	movq	$0, -40(%rbp)
.L6:
	addl	$1, -64(%rbp)
.L5:
	movl	-64(%rbp), %eax
	cmpl	-60(%rbp), %eax
	jl	.L7
	movq	-48(%rbp), %rax
	addq	%rax, -56(%rbp)
	addl	$1, -68(%rbp)
.L4:
	movl	-60(%rbp), %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	%edx, %eax
	cmpl	%eax, -68(%rbp)
	jl	.L8
	movq	-56(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L9:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	leave
	.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:
